forked from primefaces/primevue
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'primefaces:master' into master
- Loading branch information
Showing
196 changed files
with
4,711 additions
and
1,660 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"id": 65, | ||
"content": "Summer Sale: Up to 50% Off 🛍️", | ||
"linkText": "Visit Store", | ||
"linkHref": "https://primefaces.org/store" | ||
"id": 67, | ||
"content": "480 Vue Components with Tailwind 🚀", | ||
"linkText": "Visit PrimeBlocks", | ||
"linkHref": "https://primeblocks.org" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<template> | ||
<div ref="container" class="doc-ptviewerwrapper card"> | ||
<div id="doc-ptviewer" class="doc-ptviewer"> | ||
<slot /> | ||
</div> | ||
<div class="doc-ptoptions"> | ||
<template v-if="docs[0].data"> | ||
<template v-for="doc of docs" :key="doc.key"> | ||
<div v-for="item of handleData(doc.data)" :key="item.value" class="doc-ptoption" @mouseenter="enterSection(item, doc.key)" @mouseleave="leaveSection"> | ||
<span class="doc-ptoption-text"> | ||
{{ item.label }} | ||
<template v-if="docs.length > 1">| {{ doc.key }}</template> | ||
</span> | ||
</div> | ||
</template> | ||
</template> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { addClass, find, removeClass } from '@primeuix/utils/dom'; | ||
export default { | ||
props: ['docs'], | ||
data() { | ||
return { | ||
hoveredElements: [] | ||
}; | ||
}, | ||
methods: { | ||
enterSection(item, componentName) { | ||
let selector, | ||
cmpName = componentName; | ||
if (componentName === 'ConfirmDialog') cmpName = 'Dialog'; | ||
else if (componentName === 'ScrollTop') cmpName = 'Button'; | ||
if (item.label === 'root') selector = `[data-pc-name="${cmpName.toLowerCase()}"]`; | ||
else if (item.label.startsWith('pc')) selector = `[data-pc-name="${item.label.toLowerCase()}"]`; | ||
else selector = `[data-pc-section="${item.label.toLowerCase()}"]`; | ||
this.hoveredElements = find(this.$refs.container, selector); | ||
if (this.hoveredElements.length === 0) this.hoveredElements = find(document.querySelector('body'), selector); //TODO: | ||
this.hoveredElements?.forEach((el) => { | ||
addClass(el, '!ring !ring-blue-500 !z-10'); | ||
}); | ||
}, | ||
leaveSection() { | ||
this.hoveredElements.forEach((el) => { | ||
removeClass(el, '!ring !ring-blue-500 !z-10'); | ||
}); | ||
this.hoveredElements = []; | ||
}, | ||
handleData(doc) { | ||
return doc.filter((item) => item.label !== 'hooks' && item.label !== 'transition'); | ||
} | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<template> | ||
<DocSectionText v-bind="$attrs" /> | ||
<DocPTViewer :docs="docs"> | ||
<Accordion value="0"> | ||
<AccordionPanel value="0"> | ||
<AccordionHeader>Header I</AccordionHeader> | ||
<AccordionContent> | ||
<p class="m-0"> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | ||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
</p> | ||
</AccordionContent> | ||
</AccordionPanel> | ||
<AccordionPanel value="1"> | ||
<AccordionHeader>Header II</AccordionHeader> | ||
<AccordionContent> | ||
<p class="m-0"> | ||
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim | ||
ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi. | ||
</p> | ||
</AccordionContent> | ||
</AccordionPanel> | ||
<AccordionPanel value="2"> | ||
<AccordionHeader>Header III</AccordionHeader> | ||
<AccordionContent> | ||
<p class="m-0"> | ||
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa | ||
qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus. | ||
</p> | ||
</AccordionContent> | ||
</AccordionPanel> | ||
</Accordion> | ||
</DocPTViewer> | ||
</template> | ||
|
||
<script> | ||
import { getPTOptions } from '@/components/doc/helpers'; | ||
export default { | ||
data() { | ||
return { | ||
docs: [ | ||
{ | ||
data: getPTOptions('Accordion'), | ||
key: 'Accordion' | ||
}, | ||
{ | ||
data: getPTOptions('AccordionPanel'), | ||
key: 'AccordionPanel' | ||
}, | ||
{ | ||
data: getPTOptions('AccordionHeader'), | ||
key: 'AccordionHeader' | ||
}, | ||
{ | ||
data: getPTOptions('AccordionContent'), | ||
key: 'AccordionContent' | ||
} | ||
] | ||
}; | ||
} | ||
}; | ||
</script> |
Oops, something went wrong.