Skip to content

Commit

Permalink
Merge branch 'primefaces:master' into fix/multiselect-selection-messa…
Browse files Browse the repository at this point in the history
…ge-locale
  • Loading branch information
avramz authored Sep 18, 2024
2 parents 46452f6 + 7fc53b7 commit 30fd8ad
Show file tree
Hide file tree
Showing 153 changed files with 3,928 additions and 1,199 deletions.
16 changes: 11 additions & 5 deletions apps/showcase/assets/menu/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,15 @@
"name": "Editor",
"to": "/editor"
},
{
"name": "IftaLabel",
"to": "/iftalabel",
"badge": "NEW"
},
{
"name": "FloatLabel",
"to": "/floatlabel"
"to": "/floatlabel",
"badge": "NEW"
},
{
"name": "IconField",
Expand Down Expand Up @@ -433,14 +439,14 @@
"name": "FocusTrap",
"to": "/focustrap"
},
{
"name": "Inplace",
"to": "/inplace"
},
{
"name": "Fluid",
"to": "/fluid"
},
{
"name": "Inplace",
"to": "/inplace"
},
{
"name": "MeterGroup",
"to": "/metergroup"
Expand Down
40 changes: 40 additions & 0 deletions apps/showcase/assets/styles/layout/_doc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -432,3 +432,43 @@
}
}
}

.doc-ptviewerwrapper {
display: flex;
flex-direction: row;
padding: 0 !important;

.doc-ptviewer {
display: flex;
align-items: center;
justify-content: center;
border-color: var(--border-color);
border-width: 0 1px 0 0;
padding: 1rem;
width: 75%;
}

.doc-ptoptions {
display: flex;
flex-direction: column;
gap: .5rem;
padding: .5rem;
width: 25%;
max-height: 720px;
overflow-y: auto;

.doc-ptoption {
display: flex;
flex-direction: column;
padding: .5rem;

&:hover {
background-color: var(--hover-background);
}

.doc-ptoption-text:hover {
cursor: default;
}
}
}
}
18 changes: 16 additions & 2 deletions apps/showcase/assets/styles/layout/_responsive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}

@media screen and (max-width: 1199px) {
.layout-topbar-inner {
.layout-topbar-inner {
padding-left: 2rem;
padding-right: 2rem;

Expand Down Expand Up @@ -128,6 +128,20 @@
.DocSearch-Container {
position: fixed !important;
}

.doc-ptviewerwrapper {
flex-direction: column;

.doc-ptviewer {
width: 100%;
border-width: 0 0 1px 0;
}

.doc-ptoptions {
width: 100%;
padding: 1rem;
}
}
}

@media screen and (max-width: 575px) {
Expand Down Expand Up @@ -174,4 +188,4 @@
display: none;
}
}
}
}
32 changes: 20 additions & 12 deletions apps/showcase/components/doc/DocPTViewer.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<template>
<div ref="container" class="card flex flex-col md:flex-row !p-0">
<div class="flex items-center justify-center md:border-r border-b md:border-b-0 border-surface md:w-3/4 w-full p-4">
<div ref="container" class="doc-ptviewerwrapper card">
<div id="doc-ptviewer" class="doc-ptviewer">
<slot />
</div>
<div class="flex flex-col gap-2 p-8 md:p-2 md:w-1/4 w-full max-h-[720px] overflow-y-auto">
<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="flex flex-col p-2 cursor-pointer hover:bg-emphasis" @mouseenter="enterSection(item, doc.key)" @mouseleave="leaveSection">
<span>{{ item.label }}</span>
<span class="text-muted-color text-sm">{{ item.label }} element of {{ doc.key }} component</span>
<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>
Expand All @@ -28,27 +30,33 @@ export default {
},
methods: {
enterSection(item, componentName) {
let selector;
let selector,
cmpName = componentName;
if (item.label === 'root') selector = `[data-pc-name="${componentName.toLowerCase()}"]`;
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);
this.hoveredElements.forEach((el) => {
addClass(el, '!ring !ring-red-500');
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-red-500');
removeClass(el, '!ring !ring-blue-500 !z-10');
});
this.hoveredElements = [];
},
handleData(doc) {
return doc.filter((item) => item.label !== 'hooks' && item.label !== 'transition');
return doc.filter((item) => item.label !== 'hooks' && item.label !== 'transition' && !item.label.includes('hidden'));
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion apps/showcase/components/landing/BlockSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
<div class="block-content flex-1 p-6 flex flex-col">
<div class="block-main h-full flex justify-center items-center flex-col">
<div class="block-item block-item-active animation-2 mx-4 w-32 text-center flex flex-col items-center overflow-visible">
<div class="-mt-6">
<div>
<img src="https://primefaces.org/cdn/primevue/images/landing/blocks/question.svg" alt="question mark" />
</div>
<div class="bar w-8 mt-2"></div>
Expand Down
2 changes: 1 addition & 1 deletion apps/showcase/components/landing/UsersSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<section class="landing-users py-20 px-4 lg:px-20">
<div class="section-header">Who Uses</div>
<p class="section-detail">
PrimeTek libraries have reached over <span class="font-semibold animated-text relative whitespace-nowrap"> <span>150 Million Downloads </span> </span> on npm! Join the PrimeLand community and experience the difference yourself.
PrimeTek libraries have reached over <span class="font-semibold animated-text relative whitespace-nowrap"> <span>200 Million Downloads </span> </span> on npm! Join the PrimeLand community and experience the difference yourself.
</p>
<div class="flex justify-center items-center mt-6">
<span class="ml-2"> </span>
Expand Down
4 changes: 2 additions & 2 deletions apps/showcase/components/landing/samples/OverviewApp.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="flex-1 h-full overflow-y-auto pb-0.5">
<div class="flex flex-wrap gap-4 items-start justify-between">
<div class="flex flex-wrap gap-4 items-start justify-between p-1">
<div class="flex-1">
<div class="text-muted-color font-medium leading-normal">Overview</div>
<div class="text-color text-3xl font-semibold leading-normal">Welcome to PrimeVue</div>
Expand All @@ -26,7 +26,7 @@
</Button>
</div>
</div>
<div class="mt-4 flex flex-wrap gap-6 items-center justify-between">
<div class="mt-4 flex flex-wrap gap-6 items-center justify-between p-1">
<SelectButton v-model="selectedTime" :options="timeOptions" aria-labelledby="basic" :allowEmpty="false" @change="changeSelect" />
<div class="flex items-center gap-2">
<Button label="Download" icon="pi pi-download" iconPos="right" />
Expand Down
8 changes: 0 additions & 8 deletions apps/showcase/doc/accordion/pt/PTImage.vue

This file was deleted.

63 changes: 63 additions & 0 deletions apps/showcase/doc/accordion/pt/PTViewer.vue
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>
8 changes: 4 additions & 4 deletions apps/showcase/doc/accordion/pt/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
<script>
import DocApiTable from '@/components/doc/DocApiTable.vue';
import { getPTOptions } from '@/components/doc/helpers';
import PTImage from './PTImage.vue';
import PTViewer from './PTViewer.vue';
export default {
data() {
return {
docs: [
{
id: 'pt.image',
label: 'Wireframe',
component: PTImage
id: 'pt.viewer',
label: 'Viewer',
component: PTViewer
},
{
id: 'pt.doc.accordion',
Expand Down
8 changes: 0 additions & 8 deletions apps/showcase/doc/breadcrumb/pt/PTImage.vue

This file was deleted.

27 changes: 27 additions & 0 deletions apps/showcase/doc/breadcrumb/pt/PTViewer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<DocSectionText v-bind="$attrs" />
<DocPTViewer :docs="ptViewerDoc">
<Breadcrumb :home="home" :model="items" />
</DocPTViewer>
</template>

<script>
import { getPTOptions } from '@/components/doc/helpers';
export default {
data() {
return {
home: {
icon: 'pi pi-home'
},
items: [{ label: 'Electronics' }, { label: 'Computer', icon: 'pi pi-desktop' }, { label: 'Accessories' }, { label: 'Keyboard' }, { label: 'Wireless' }],
ptViewerDoc: [
{
data: getPTOptions('Breadcrumb'),
key: 'Breadcrumb'
}
]
};
}
};
</script>
8 changes: 4 additions & 4 deletions apps/showcase/doc/breadcrumb/pt/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
<script>
import DocApiTable from '@/components/doc/DocApiTable.vue';
import { getPTOptions } from '@/components/doc/helpers';
import PTImage from './PTImage.vue';
import PTViewer from './PTViewer.vue';
export default {
data() {
return {
docs: [
{
id: 'pt.image',
label: 'Wireframe',
component: PTImage
id: 'pt.viewer',
label: 'Viewer',
component: PTViewer
},
{
id: 'pt.doc.breadcrumb',
Expand Down
8 changes: 0 additions & 8 deletions apps/showcase/doc/card/pt/PTImage.vue

This file was deleted.

Loading

0 comments on commit 30fd8ad

Please sign in to comment.