Skip to content

Commit

Permalink
Merge branch 'primefaces:master' into fix/filter-with-columngroup-type
Browse files Browse the repository at this point in the history
  • Loading branch information
avramz authored Sep 18, 2024
2 parents bd13116 + 7fc53b7 commit afcea2d
Show file tree
Hide file tree
Showing 88 changed files with 2,518 additions and 230 deletions.
8 changes: 7 additions & 1 deletion 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
11 changes: 4 additions & 7 deletions apps/showcase/assets/styles/layout/_doc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
display: flex;
align-items: center;
justify-content: center;
border-color: var(--p-content-border-color);
border-color: var(--border-color);
border-width: 0 1px 0 0;
padding: 1rem;
width: 75%;
Expand All @@ -461,16 +461,13 @@
display: flex;
flex-direction: column;
padding: .5rem;
cursor: pointer;

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

.doc-ptoption-text {
color: var(--p-text-muted-color);
font-size: 0.875rem;
line-height: 1.25rem;
.doc-ptoption-text:hover {
cursor: default;
}
}
}
Expand Down
13 changes: 8 additions & 5 deletions apps/showcase/components/doc/DocPTViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
<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>{{ item.label }}</span>
<span class="doc-ptoption-text">{{ item.label }} element of {{ doc.key }} component</span>
<span class="doc-ptoption-text">
{{ item.label }}
<template v-if="docs.length > 1">| {{ doc.key }}</template>
</span>
</div>
</template>
</template>
Expand All @@ -32,6 +34,7 @@ export default {
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()}"]`;
Expand All @@ -42,18 +45,18 @@ export default {
if (this.hoveredElements.length === 0) this.hoveredElements = find(document.querySelector('body'), selector); //TODO:
this.hoveredElements?.forEach((el) => {
addClass(el, '!ring !ring-red-500 !z-10');
addClass(el, '!ring !ring-blue-500 !z-10');
});
},
leaveSection() {
this.hoveredElements.forEach((el) => {
removeClass(el, '!ring !ring-red-500 !z-10');
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
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
92 changes: 92 additions & 0 deletions apps/showcase/doc/chart/pt/PTViewer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<template>
<DocSectionText v-bind="$attrs" />
<DocPTViewer :docs="ptViewerDoc">
<Chart type="bar" :data="chartData" :options="chartOptions" />
</DocPTViewer>
</template>

<script>
import { getPTOptions } from '@/components/doc/helpers';
import EventBus from '@/layouts/AppEventBus';
export default {
data() {
return {
chartData: null,
chartOptions: null,
ptViewerDoc: [
{
data: getPTOptions('Chart'),
key: 'Chart'
}
]
};
},
beforeUnmount() {
EventBus.off('dark-mode-toggle-complete', this.redrawListener);
EventBus.off('theme-palette-change', this.redrawListener);
},
mounted() {
this.chartData = this.setChartData();
this.chartOptions = this.setChartOptions();
this.redrawListener = () => {
this.chartOptions = this.setChartOptions();
};
EventBus.on('theme-palette-change', this.redrawListener);
EventBus.on('dark-mode-toggle-complete', this.redrawListener);
},
methods: {
setChartData() {
return {
labels: ['Q1', 'Q2', 'Q3', 'Q4'],
datasets: [
{
label: 'Sales',
data: [540, 325, 702, 620],
backgroundColor: ['rgba(249, 115, 22, 0.2)', 'rgba(6, 182, 212, 0.2)', 'rgb(107, 114, 128, 0.2)', 'rgba(139, 92, 246, 0.2)'],
borderColor: ['rgb(249, 115, 22)', 'rgb(6, 182, 212)', 'rgb(107, 114, 128)', 'rgb(139, 92, 246)'],
borderWidth: 1
}
]
};
},
setChartOptions() {
const documentStyle = getComputedStyle(document.documentElement);
const textColor = documentStyle.getPropertyValue('--p-text-color');
const textColorSecondary = documentStyle.getPropertyValue('--p-text-muted-color');
const surfaceBorder = documentStyle.getPropertyValue('--p-content-border-color');
return {
plugins: {
legend: {
labels: {
color: textColor
}
}
},
scales: {
x: {
ticks: {
color: textColorSecondary
},
grid: {
color: surfaceBorder
}
},
y: {
beginAtZero: true,
ticks: {
color: textColorSecondary
},
grid: {
color: surfaceBorder
}
}
}
};
}
}
};
</script>
8 changes: 4 additions & 4 deletions apps/showcase/doc/chart/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.chart',
Expand Down
Loading

0 comments on commit afcea2d

Please sign in to comment.