@paperless/core 2.22.0-alpha.32 → 2.22.0-alpha.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build/{p-eb88330f.entry.js → p-0db34ade.entry.js} +1 -1
- package/dist/build/{p-dc7e3d2d.entry.js → p-114e0c9a.entry.js} +1 -1
- package/dist/build/{p-8527dffc.entry.js → p-1924cd9d.entry.js} +1 -1
- package/dist/build/{p-75c0d205.entry.js → p-1a17e046.entry.js} +1 -1
- package/dist/build/{p-a075f933.entry.js → p-1eed9342.entry.js} +1 -1
- package/dist/{paperless/p-a3c931c3.entry.js → build/p-1f260372.entry.js} +1 -1
- package/dist/build/{p-1bc013ea.entry.js → p-2695c4c1.entry.js} +1 -1
- package/dist/{paperless/p-88434ef8.entry.js → build/p-4752c1e2.entry.js} +1 -1
- package/dist/build/{p-ac64c055.entry.js → p-48862d6c.entry.js} +1 -1
- package/dist/build/{p-8d872235.entry.js → p-4ad6da03.entry.js} +1 -1
- package/dist/{paperless/p-d824b806.entry.js → build/p-4c1b92b5.entry.js} +1 -1
- package/dist/{paperless/p-f16b7c0e.entry.js → build/p-5c4efc42.entry.js} +1 -1
- package/dist/build/{p-96020614.entry.js → p-5e6e2031.entry.js} +1 -1
- package/dist/{paperless/p-cce41338.entry.js → build/p-608f6111.entry.js} +1 -1
- package/dist/build/p-6da67ab3.entry.js +1 -0
- package/dist/build/{p-3d4eed8c.entry.js → p-7e9886d6.entry.js} +1 -1
- package/dist/build/{p-26a84c2f.entry.js → p-84652e9e.entry.js} +1 -1
- package/dist/{paperless/p-8073ff56.entry.js → build/p-93542510.entry.js} +1 -1
- package/dist/{paperless/p-5abb4596.entry.js → build/p-94311485.entry.js} +1 -1
- package/dist/{paperless/p-443e1609.entry.js → build/p-a3f1e55c.entry.js} +1 -1
- package/dist/{paperless/p-d79097e9.entry.js → build/p-a6d1bac6.entry.js} +1 -1
- package/dist/build/{p-4c47faf5.entry.js → p-aa3c6754.entry.js} +1 -1
- package/dist/build/{p-39695802.js → p-bb93b60d.js} +1 -1
- package/dist/build/{p-7b05d594.entry.js → p-bf87972a.entry.js} +1 -1
- package/dist/build/{p-796ade92.entry.js → p-d15bb397.entry.js} +1 -1
- package/dist/build/{p-4ade4fd6.entry.js → p-d2de7714.entry.js} +1 -1
- package/dist/{paperless/p-16625524.entry.js → build/p-d388076a.entry.js} +1 -1
- package/dist/{paperless/p-2461cae0.entry.js → build/p-dafa1b62.entry.js} +1 -1
- package/dist/build/{p-3224460c.entry.js → p-e0b1116c.entry.js} +1 -1
- package/dist/build/p-f0405a75.entry.js +1 -0
- package/dist/build/{p-0595952f.entry.js → p-ff9f4b2b.entry.js} +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/p-accordion.cjs.entry.js +1 -1
- package/dist/cjs/p-attachment.cjs.entry.js +5 -5
- package/dist/cjs/p-avatar.cjs.entry.js +1 -1
- package/dist/cjs/p-badge_3.cjs.entry.js +1 -1
- package/dist/cjs/p-button_3.cjs.entry.js +6 -6
- package/dist/cjs/p-calendar.cjs.entry.js +6 -6
- package/dist/cjs/p-card-header.cjs.entry.js +1 -1
- package/dist/cjs/p-checkbox_3.cjs.entry.js +4 -4
- package/dist/cjs/p-content-slider.cjs.entry.js +2 -2
- package/dist/cjs/p-cropper.cjs.entry.js +1 -1
- package/dist/cjs/p-datepicker.cjs.entry.js +5 -5
- package/dist/cjs/p-drawer-body_3.cjs.entry.js +1 -1
- package/dist/cjs/p-drawer.cjs.entry.js +1 -1
- package/dist/cjs/p-empty-state_8.cjs.entry.js +8 -8
- package/dist/cjs/p-field_3.cjs.entry.js +15 -15
- package/dist/cjs/p-floating-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/p-label.cjs.entry.js +1 -1
- package/dist/cjs/p-modal-body_4.cjs.entry.js +1 -1
- package/dist/cjs/p-modal.cjs.entry.js +1 -1
- package/dist/cjs/p-navbar.cjs.entry.js +1 -1
- package/dist/cjs/p-pagination_3.cjs.entry.js +9 -9
- package/dist/cjs/p-profile.cjs.entry.js +1 -1
- package/dist/cjs/p-radio.cjs.entry.js +2 -2
- package/dist/cjs/p-range.cjs.entry.js +1 -1
- package/dist/cjs/p-select.cjs.entry.js +8 -8
- package/dist/cjs/p-stepper.cjs.entry.js +1 -1
- package/dist/cjs/p-table.cjs.entry.js +20 -42
- package/dist/cjs/p-toast.cjs.entry.js +1 -1
- package/dist/cjs/p-toggle.cjs.entry.js +2 -2
- package/dist/cjs/p-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/atoms/avatar/avatar/avatar.component.js +1 -1
- package/dist/collection/components/atoms/card/header/card-header.component.js +1 -1
- package/dist/collection/components/atoms/checkbox/checkbox.component.js +2 -2
- package/dist/collection/components/atoms/drawer/header/drawer-header.component.js +1 -1
- package/dist/collection/components/atoms/floating-menu/container/floating-menu-container.component.js +1 -1
- package/dist/collection/components/atoms/floating-menu/item/floating-menu-item.component.js +1 -1
- package/dist/collection/components/atoms/helper/helper.component.js +1 -1
- package/dist/collection/components/atoms/icon/icon.component.js +2 -2
- package/dist/collection/components/atoms/modal/header/modal-header.component.js +1 -1
- package/dist/collection/components/atoms/radio/radio.component.js +2 -2
- package/dist/collection/components/atoms/segment/item/segment-item.component.js +1 -1
- package/dist/collection/components/atoms/toggle/toggle.component.js +2 -2
- package/dist/collection/components/atoms/tooltip/tooltip.component.js +1 -1
- package/dist/collection/components/molecules/accordion/accordion.component.js +1 -1
- package/dist/collection/components/molecules/attachment/attachment.component.js +5 -5
- package/dist/collection/components/molecules/button/button.component.js +4 -4
- package/dist/collection/components/molecules/calendar/calendar.component.js +6 -6
- package/dist/collection/components/molecules/content-slider/content-slider.component.js +2 -2
- package/dist/collection/components/molecules/cropper/cropper.component.js +1 -1
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +5 -5
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +2 -2
- package/dist/collection/components/molecules/field/container/field-container.component.js +6 -6
- package/dist/collection/components/molecules/field/field/field.component.js +8 -8
- package/dist/collection/components/molecules/label/label.component.js +1 -1
- package/dist/collection/components/molecules/pagination/pages/pagination-pages.component.js +6 -6
- package/dist/collection/components/molecules/pagination/pagination/pagination.component.js +1 -1
- package/dist/collection/components/molecules/pagination/size/pagination-size.component.js +2 -2
- package/dist/collection/components/molecules/profile/profile.component.js +1 -1
- package/dist/collection/components/molecules/range/range.component.js +1 -1
- package/dist/collection/components/molecules/select/select.component.js +8 -8
- package/dist/collection/components/molecules/table/cell/table-cell.component.js +1 -1
- package/dist/collection/components/molecules/table/footer/table-footer.component.js +1 -1
- package/dist/collection/components/molecules/table/header/table-header.component.js +5 -5
- package/dist/collection/components/molecules/toast/toast.component.js +1 -1
- package/dist/collection/components/organisms/drawer/drawer.component.js +1 -1
- package/dist/collection/components/organisms/modal/modal.component.js +1 -1
- package/dist/collection/components/organisms/navbar/navbar.component.js +1 -1
- package/dist/collection/components/organisms/stepper/stepper.component.js +1 -1
- package/dist/collection/components/organisms/table/table.component.js +20 -42
- package/dist/components/index.js +1 -1
- package/dist/components/{p-Ch5U9kWZ.js → p-Bs4zUbgC.js} +1 -1
- package/dist/components/{p-OF_TU9VQ.js → p-Bsz5wpvX.js} +1 -1
- package/dist/components/{p-CCufTu-v.js → p-C4QFnooj.js} +1 -1
- package/dist/components/{p-nUd8Wpbr.js → p-C7oEohET.js} +1 -1
- package/dist/components/{p-BwD4wr14.js → p-CCdMFLeY.js} +1 -1
- package/dist/components/{p-DfBWP1bt.js → p-CCpo87pH.js} +1 -1
- package/dist/components/{p-PyPr6c8z.js → p-CGMb-Zik.js} +1 -1
- package/dist/components/{p-SggF_Jar.js → p-CGMitCrO.js} +1 -1
- package/dist/components/{p-DoDhkUVy.js → p-CJ7RtC-a.js} +1 -1
- package/dist/components/{p-CvE78NPe.js → p-CLQglqfD.js} +1 -1
- package/dist/components/{p-CkCQHYtH.js → p-CVCCA4eY.js} +1 -1
- package/dist/components/{p-ZcEew3GF.js → p-CWRAbDh-.js} +1 -1
- package/dist/components/{p-BBpjifjG.js → p-CzT4TxMT.js} +1 -1
- package/dist/components/{p-BQNrSoo9.js → p-D6xsDoHI.js} +1 -1
- package/dist/components/{p-BvUfWfx-.js → p-DCkiUXJN.js} +1 -1
- package/dist/components/{p-kAKe_qDq.js → p-DqtQfYz0.js} +1 -1
- package/dist/components/{p-D08B3cFE.js → p-DuNvWVbF.js} +1 -1
- package/dist/components/{p-CtHAbYCa.js → p-Dxh5RZDW.js} +1 -1
- package/dist/components/{p-h4mS749f.js → p-E_DVjH99.js} +1 -1
- package/dist/components/{p-BqgXqvox.js → p-KIL5rYXr.js} +1 -1
- package/dist/components/{p-2ng-Aose.js → p-Pk4ZTsZ4.js} +1 -1
- package/dist/components/{p-CGFPlslj.js → p-QVPuIpXI.js} +1 -1
- package/dist/components/{p-CNMa-_yN.js → p-TQjQ8aZG.js} +1 -1
- package/dist/components/p-accordion.js +1 -1
- package/dist/components/p-attachment.js +1 -1
- package/dist/components/p-avatar.js +1 -1
- package/dist/components/p-button.js +1 -1
- package/dist/components/p-calendar.js +1 -1
- package/dist/components/p-card-header.js +1 -1
- package/dist/components/p-checkbox.js +1 -1
- package/dist/components/p-content-slider.js +1 -1
- package/dist/components/p-cropper.js +2 -2
- package/dist/components/{p-CaN_dhnG.js → p-csyF2tkK.js} +1 -1
- package/dist/components/p-datepicker.js +1 -1
- package/dist/components/p-drawer-header.js +1 -1
- package/dist/components/p-drawer.js +1 -1
- package/dist/components/p-dropdown-menu-item.js +1 -1
- package/dist/components/p-dropdown.js +1 -1
- package/dist/components/p-empty-state.js +1 -1
- package/dist/components/p-field-container.js +1 -1
- package/dist/components/p-field.js +1 -1
- package/dist/components/p-floating-menu-container.js +1 -1
- package/dist/components/p-floating-menu-item.js +1 -1
- package/dist/components/p-helper.js +1 -1
- package/dist/components/p-icon.js +1 -1
- package/dist/components/p-info-panel.js +1 -1
- package/dist/components/p-label.js +1 -1
- package/dist/components/p-listing-item.js +1 -1
- package/dist/components/p-modal-header.js +1 -1
- package/dist/components/p-modal.js +1 -1
- package/dist/components/p-navbar.js +1 -1
- package/dist/components/p-navigation-item.js +1 -1
- package/dist/components/p-pagination-pages.js +1 -1
- package/dist/components/p-pagination-size.js +1 -1
- package/dist/components/p-pagination.js +1 -1
- package/dist/components/p-profile.js +1 -1
- package/dist/components/p-radio.js +1 -1
- package/dist/components/p-range.js +1 -1
- package/dist/components/p-segment-item.js +1 -1
- package/dist/components/p-select.js +1 -1
- package/dist/components/p-stepper.js +1 -1
- package/dist/components/p-table-cell.js +1 -1
- package/dist/components/p-table-footer.js +1 -1
- package/dist/components/p-table-header.js +1 -1
- package/dist/components/p-table.js +1 -1
- package/dist/components/p-toast.js +1 -1
- package/dist/components/p-toggle.js +1 -1
- package/dist/components/p-tooltip.js +1 -1
- package/dist/esm/p-accordion.entry.js +1 -1
- package/dist/esm/p-attachment.entry.js +5 -5
- package/dist/esm/p-avatar.entry.js +1 -1
- package/dist/esm/p-badge_3.entry.js +1 -1
- package/dist/esm/p-button_3.entry.js +6 -6
- package/dist/esm/p-calendar.entry.js +6 -6
- package/dist/esm/p-card-header.entry.js +1 -1
- package/dist/esm/p-checkbox_3.entry.js +4 -4
- package/dist/esm/p-content-slider.entry.js +2 -2
- package/dist/esm/p-cropper.entry.js +1 -1
- package/dist/esm/p-datepicker.entry.js +5 -5
- package/dist/esm/p-drawer-body_3.entry.js +1 -1
- package/dist/esm/p-drawer.entry.js +1 -1
- package/dist/esm/p-empty-state_8.entry.js +8 -8
- package/dist/esm/p-field_3.entry.js +15 -15
- package/dist/esm/p-floating-menu-item.entry.js +1 -1
- package/dist/esm/p-label.entry.js +1 -1
- package/dist/esm/p-modal-body_4.entry.js +1 -1
- package/dist/esm/p-modal.entry.js +1 -1
- package/dist/esm/p-navbar.entry.js +1 -1
- package/dist/esm/p-pagination_3.entry.js +9 -9
- package/dist/esm/p-profile.entry.js +1 -1
- package/dist/esm/p-radio.entry.js +2 -2
- package/dist/esm/p-range.entry.js +1 -1
- package/dist/esm/p-select.entry.js +8 -8
- package/dist/esm/p-stepper.entry.js +1 -1
- package/dist/esm/p-table.entry.js +20 -42
- package/dist/esm/p-toast.entry.js +1 -1
- package/dist/esm/p-toggle.entry.js +2 -2
- package/dist/esm/p-tooltip.entry.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/{p-eb88330f.entry.js → p-0db34ade.entry.js} +1 -1
- package/dist/paperless/{p-dc7e3d2d.entry.js → p-114e0c9a.entry.js} +1 -1
- package/dist/paperless/{p-8527dffc.entry.js → p-1924cd9d.entry.js} +1 -1
- package/dist/paperless/{p-75c0d205.entry.js → p-1a17e046.entry.js} +1 -1
- package/dist/paperless/{p-a075f933.entry.js → p-1eed9342.entry.js} +1 -1
- package/dist/{build/p-a3c931c3.entry.js → paperless/p-1f260372.entry.js} +1 -1
- package/dist/paperless/{p-1bc013ea.entry.js → p-2695c4c1.entry.js} +1 -1
- package/dist/{build/p-88434ef8.entry.js → paperless/p-4752c1e2.entry.js} +1 -1
- package/dist/paperless/{p-ac64c055.entry.js → p-48862d6c.entry.js} +1 -1
- package/dist/paperless/{p-8d872235.entry.js → p-4ad6da03.entry.js} +1 -1
- package/dist/{build/p-d824b806.entry.js → paperless/p-4c1b92b5.entry.js} +1 -1
- package/dist/{build/p-f16b7c0e.entry.js → paperless/p-5c4efc42.entry.js} +1 -1
- package/dist/paperless/{p-96020614.entry.js → p-5e6e2031.entry.js} +1 -1
- package/dist/{build/p-cce41338.entry.js → paperless/p-608f6111.entry.js} +1 -1
- package/dist/paperless/p-6da67ab3.entry.js +1 -0
- package/dist/paperless/{p-3d4eed8c.entry.js → p-7e9886d6.entry.js} +1 -1
- package/dist/paperless/{p-26a84c2f.entry.js → p-84652e9e.entry.js} +1 -1
- package/dist/{build/p-8073ff56.entry.js → paperless/p-93542510.entry.js} +1 -1
- package/dist/{build/p-5abb4596.entry.js → paperless/p-94311485.entry.js} +1 -1
- package/dist/{build/p-443e1609.entry.js → paperless/p-a3f1e55c.entry.js} +1 -1
- package/dist/{build/p-d79097e9.entry.js → paperless/p-a6d1bac6.entry.js} +1 -1
- package/dist/paperless/{p-4c47faf5.entry.js → p-aa3c6754.entry.js} +1 -1
- package/dist/paperless/{p-7b05d594.entry.js → p-bf87972a.entry.js} +1 -1
- package/dist/paperless/{p-796ade92.entry.js → p-d15bb397.entry.js} +1 -1
- package/dist/paperless/{p-4ade4fd6.entry.js → p-d2de7714.entry.js} +1 -1
- package/dist/{build/p-16625524.entry.js → paperless/p-d388076a.entry.js} +1 -1
- package/dist/{build/p-2461cae0.entry.js → paperless/p-dafa1b62.entry.js} +1 -1
- package/dist/paperless/{p-3224460c.entry.js → p-e0b1116c.entry.js} +1 -1
- package/dist/paperless/p-f0405a75.entry.js +1 -0
- package/dist/paperless/{p-0595952f.entry.js → p-ff9f4b2b.entry.js} +1 -1
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/hydrate/index.js +109 -131
- package/hydrate/index.mjs +109 -131
- package/package.json +1 -1
- package/dist/build/p-4b03700c.entry.js +0 -1
- package/dist/build/p-fc461e09.entry.js +0 -1
- package/dist/paperless/p-4b03700c.entry.js +0 -1
- package/dist/paperless/p-fc461e09.entry.js +0 -1
|
@@ -219,7 +219,7 @@ export class Calendar {
|
|
|
219
219
|
const daysInMonth = this._generateDaysInMonth();
|
|
220
220
|
return (h("div", { class: view({ view: 'day' }) }, this._getHeader('day'), h("div", { class: 'grid grid-cols-7 justify-between gap-1' }, this._weekDays.map(weekday => (h("span", { class: 'w-8 text-center text-xs text-storm-200' }, format(addDays(new Date(2022, 7, 1), weekday), state.locale === 'nl' ? 'EEEEEE' : 'eee', {
|
|
221
221
|
locale: state.locale === 'nl' ? nl : enUS,
|
|
222
|
-
})))), daysInMonth.map(day => day.active ? (h("p-button", {
|
|
222
|
+
})))), daysInMonth.map(day => day.active ? (h("p-button", { class: cn('w-8', `col-start-${day.offset}`), tabIndex: -1, variant: 'primary', onClick: () => this._setValue(day.date) }, day.day)) : (h("time", { class: cn('normal flex items-center justify-center rounded-lg', 'h-8 w-8 text-sm font-semibold', 'text-storm-300', 'dark:bg-white/15', {
|
|
223
223
|
'cursor-pointer hover:bg-white-600 hover:text-storm-500 dark:text-white dark:hover:bg-hurricane-300 dark:hover:text-white': !day.disabled,
|
|
224
224
|
'dark:text-hurricane-200': day.disabled,
|
|
225
225
|
}, `col-start-${day.offset}`, { 'cursor-not-allowed opacity-60': day.disabled }, {
|
|
@@ -228,13 +228,13 @@ export class Calendar {
|
|
|
228
228
|
}
|
|
229
229
|
_getMonthView() {
|
|
230
230
|
const months = this._generateMonths();
|
|
231
|
-
return (h("div", { class: view({ view: 'month' }) }, this._getHeader('month'), h("div", { class: 'flex flex-wrap items-start gap-2' }, months.map(month => (h("p-button", { variant: month.active ? 'primary' : 'secondary',
|
|
231
|
+
return (h("div", { class: view({ view: 'month' }) }, this._getHeader('month'), h("div", { class: 'flex flex-wrap items-start gap-2' }, months.map(month => (h("p-button", { disabled: month.disabled, tabIndex: -1, variant: month.active ? 'primary' : 'secondary', onClick: () => this._setMonth(month.month) }, format(setMonth(new Date(), month.month), 'MMMM', {
|
|
232
232
|
locale: state.locale === 'nl' ? nl : enUS,
|
|
233
233
|
})))))));
|
|
234
234
|
}
|
|
235
235
|
_getYearView() {
|
|
236
236
|
const years = this._generateYears();
|
|
237
|
-
return (h("div", { class: view({ view: 'year' }) }, this._getHeader('year'), h("div", { class: 'grid h-full grid-cols-4 gap-2 overflow-scroll', ref: ref => (this._yearItemsRef = ref) }, years.map(year => (h("p-button", { class: 'w-full', variant: year.active ? 'primary' : 'secondary',
|
|
237
|
+
return (h("div", { class: view({ view: 'year' }) }, this._getHeader('year'), h("div", { class: 'grid h-full grid-cols-4 gap-2 overflow-scroll', ref: ref => (this._yearItemsRef = ref) }, years.map(year => (h("p-button", { class: 'w-full', "data-active": year.active, "data-current": year.current, tabIndex: -1, variant: year.active ? 'primary' : 'secondary', onClick: () => this._setYear(year.year) }, year.year))))));
|
|
238
238
|
}
|
|
239
239
|
_getHeader(type = 'day') {
|
|
240
240
|
let nextFn = num => this._changeMonth(num);
|
|
@@ -243,11 +243,11 @@ export class Calendar {
|
|
|
243
243
|
nextFn = num => this._changeYear(num);
|
|
244
244
|
nextType = 'year';
|
|
245
245
|
}
|
|
246
|
-
return (h("div", { class: header({ type: this.mode }) }, this.mode !== 'year' && (h("p-button", {
|
|
246
|
+
return (h("div", { class: header({ type: this.mode }) }, this.mode !== 'year' && (h("p-button", { disabled: !this._canSetAmount(nextType, -1) || this._view === 'year', icon: 'caret', iconRotate: 90, size: 'sm', tabIndex: -1, variant: 'secondary', iconOnly: true, onClick: () => nextFn(-1) })), h("div", { class: cn('flex gap-2', {
|
|
247
247
|
'flex-1': this._enableToday,
|
|
248
|
-
}) }, this.mode !== 'year' && (h("p-button", {
|
|
248
|
+
}) }, this.mode !== 'year' && (h("p-button", { active: this._view === 'month' && this.mode !== 'month', disabled: !this._canChangeView('month'), size: 'sm', tabIndex: -1, variant: 'secondary', onClick: () => this._changeView('month') }, format(this._viewDate, 'MMMM', {
|
|
249
249
|
locale: state.locale === 'nl' ? nl : enUS,
|
|
250
|
-
}))), h("p-button", {
|
|
250
|
+
}))), h("p-button", { active: this._view === 'year' && this.mode !== 'year', disabled: !this._canChangeView('year'), size: 'sm', tabIndex: -1, variant: 'secondary', onClick: () => this._changeView('year') }, getYear(this._viewDate)), this._enableToday && (h("p-tooltip", { class: 'ml-auto', content: this.todayText }, h("p-button", { icon: 'calendar', iconOnly: true, size: 'sm', slot: 'trigger', tabIndex: -1, variant: 'secondary', onClick: () => this._setToday() })))), this.mode !== 'year' && (h("p-button", { disabled: !this._canSetAmount(nextType, 1) || this._view == 'year', icon: 'caret', iconRotate: -90, size: 'sm', tabIndex: -1, variant: 'secondary', iconOnly: true, onClick: () => nextFn(1) }))));
|
|
251
251
|
}
|
|
252
252
|
_setYear(year) {
|
|
253
253
|
const date = setYear(this._viewDate, year);
|
|
@@ -47,9 +47,9 @@ export class ContentSlider {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
|
-
return (h(Host, { key: '82853208f8862b3485a5a00b0c9c4f6986ea92ea', class: 'p-content-slider' }, h("div", { key: '3250c367ac25464a769c43d4093df28dbff8085d', class: `slider ${!this.disableDrag && 'draggable'} ${this._dragging && 'dragging'}`, style: {
|
|
50
|
+
return (h(Host, { key: '82853208f8862b3485a5a00b0c9c4f6986ea92ea', class: 'p-content-slider' }, h("div", { key: '3250c367ac25464a769c43d4093df28dbff8085d', class: `slider ${!this.disableDrag && 'draggable'} ${this._dragging && 'dragging'}`, ref: el => (this._sliderRef = el), style: {
|
|
51
51
|
height: `${this._outerHeight}px`,
|
|
52
|
-
},
|
|
52
|
+
}, onMouseDown: e => this._mouseDownHandler(e), onMouseMove: e => this._mouseMoveHandler(e), onTouchMove: e => this._mouseMoveHandler(e), onTouchStart: e => this._mouseDownHandler(e) }, h("div", { key: 'cb82eacdfc02898e9eeaff865b5e7fa7da69a2f9', class: 'inner-slider', ref: ref => this._setInnerSliderReft(ref), onTransitionEnd: () => this._transitionEndHandler() }, h("slot", { key: 'e6e5636ba8ed11665e0d623bcffb8a53bba03908', onSlotchange: () => this._slotChange() }))), h("div", { key: '9d596407cda3aaa5cbae5c0a0a19209623627edd', class: `indicator ${this.hideMobileIndicator && 'hidden'}` }, this._filteredItems.map((_, i) => (h("div", { class: `item ${!this.disableIndicatorClick && 'cursor-pointer'}`, onClick: () => this._scrollTo(i, true) }, h("div", { class: cn('block h-2 w-2 rounded-full', {
|
|
53
53
|
'bg-indigo-600': i === this._visibleIndex,
|
|
54
54
|
'bg-indigo-300': i !== this._visibleIndex,
|
|
55
55
|
}) })))))));
|
|
@@ -42,7 +42,7 @@ export class Cropper {
|
|
|
42
42
|
const themeColor = state.theme === 'dark'
|
|
43
43
|
? 'rgba(70, 75, 84, 0.5)'
|
|
44
44
|
: 'rgba(255, 255, 255, 0.5)';
|
|
45
|
-
return (h(ThemedHost, { key: 'dd4ea15cbdfbac6e25202bd1a4871d9635fd33a7' }, this._loaded && (h("cropper-canvas", { key: 'cb359d80b35eae4aa2e58c75bed8ccd5a15b2df2', class: 'h-[17.5rem] w-full border-0 border-b border-solid border-off-white-700 bg-white dark:border-hurricane-200', onAction: () => this._onAction() }, h("cropper-image", { key: '8a96ad1f1f11adc4a8291a1376f329af52c3d920',
|
|
45
|
+
return (h(ThemedHost, { key: 'dd4ea15cbdfbac6e25202bd1a4871d9635fd33a7' }, this._loaded && (h("cropper-canvas", { key: 'cb359d80b35eae4aa2e58c75bed8ccd5a15b2df2', class: 'h-[17.5rem] w-full border-0 border-b border-solid border-off-white-700 bg-white dark:border-hurricane-200', onAction: () => this._onAction() }, h("cropper-image", { key: '8a96ad1f1f11adc4a8291a1376f329af52c3d920', alt: 'Picture', crossorigin: 'anonymous', ref: ref => this._setImageRef(ref), src: this.value, scalable: true, translatable: true }), h("cropper-shade", { key: '1b375fe73b98ec31776ba4762e10781a1c33117b', class: 'aspect-branding rounded-full', "theme-color": themeColor, hidden: true }), h("cropper-selection", { key: 'ae41c83bf91f714beb89b79998c2636ffe837f51', "aspect-ratio": '1', "initial-coverage": '0.7', ref: ref => (this._selectionRef = ref) }), h("cropper-handle", { key: '45148a814f6b3d1f04e94c0a8ee756b31d6dc7cb', action: 'move', plain: true }))), h("p-range", { key: 'b215e5dfc3aea8cae98d85dc590436a52c667c28', class: 'w-full px-14 tablet:max-w-xs tablet:px-1', value: this._currentScale, onValueChange: ev => this._onInput(ev.detail) })));
|
|
46
46
|
}
|
|
47
47
|
_setImageRef(ref) {
|
|
48
48
|
if (this._imageRef || !ref) {
|
|
@@ -208,16 +208,16 @@ export class Datepicker {
|
|
|
208
208
|
this.parseValue(this.value);
|
|
209
209
|
}
|
|
210
210
|
render() {
|
|
211
|
-
return (h("p-dropdown", { key: 'c65daeff45afabeefa654b8d033a40d9fda5b4e2', allowOverflow: true,
|
|
212
|
-
format(this.
|
|
211
|
+
return (h("p-dropdown", { key: 'c65daeff45afabeefa654b8d033a40d9fda5b4e2', allowOverflow: true, applyFullWidth: false, applyMaxWidth: false, disableTriggerClick: true, insideClick: true, isDatepicker: true, placement: this.placement, show: this._showDropdown, strategy: this.strategy }, h("p-field", { key: '09aaa8a320e9a1852171aa59054a9b269667addb', autoShowError: false, disabled: asBoolean(this.disabled), error: this.error, focused: this._showDropdown, forceShowTooltip: !!this.error?.length && !this._showDropdown, helper: this.helper, icon: this.hideIconWhenFilled && !!this._value ? null : 'calendar-multi', iconPosition: 'start', label: this.label, loading: this.loading, placeholder: this.placeholder, prefix: this.prefix, required: asBoolean(this.required), showOptional: asBoolean(this.showOptional), size: this.size, slot: 'trigger', value: this._getFormattedDate(), onBlur: (ev) => this._onBlur(ev), onFocus: () => this._onFocus(), onInputRefChange: ev => (this._inputRef = ev.detail), onValueChange: ev => this._onValueChange(ev.detail) }), this.enableNativePicker && this._isMobileBrowser && (h("input", { key: 'f63ca80f15e52a5824a51e997f7b45664104a196', class: 'pointer-events-none absolute left-0 top-0 z-[-10] overflow-hidden opacity-0', max: this.maxDate &&
|
|
212
|
+
format(new Date(this.maxDate), 'yyyy-MM-dd', {
|
|
213
213
|
locale: state.locale === 'nl' ? nl : enUS,
|
|
214
214
|
}), min: this._minDate &&
|
|
215
215
|
format(new Date(this._minDate), 'yyyy-MM-dd', {
|
|
216
216
|
locale: state.locale === 'nl' ? nl : enUS,
|
|
217
|
-
}),
|
|
218
|
-
format(
|
|
217
|
+
}), ref: ref => (this._dateInputRef = ref), slot: 'trigger', type: this.mode === 'day' ? 'date' : 'month', value: this._value &&
|
|
218
|
+
format(this._value, 'yyyy-MM-dd', {
|
|
219
219
|
locale: state.locale === 'nl' ? nl : enUS,
|
|
220
|
-
}) })), h("div", { key: 'f57a7045507cc0bf0bb2ae070258c0d4ed1af81f',
|
|
220
|
+
}), onInput: ev => this._onNativeInput(ev) })), h("div", { key: 'f57a7045507cc0bf0bb2ae070258c0d4ed1af81f', slot: 'items', tabIndex: -1 }, h("p-calendar", { key: '469d4b2a4c2972a0bfb621d85a67fb3d8c3c3e83', disableWeekends: this.disableWeekends, disabledDates: this.disabledDates, enableToday: this.enableToday, maxDate: this.maxDate, minDate: this.minDate, mode: this.mode, preselectToday: this.preselectToday, todayText: this.todayText, value: this._value, variant: 'embedded', onValueChange: ({ detail }) => (this.value = detail) }))));
|
|
221
221
|
}
|
|
222
222
|
documentClickHandler({ target }) {
|
|
223
223
|
if (!this._showDropdown || childOf(target, this._el)) {
|
|
@@ -127,12 +127,12 @@ export class Dropdown {
|
|
|
127
127
|
this._checkItems();
|
|
128
128
|
}
|
|
129
129
|
render() {
|
|
130
|
-
return (h(Host, { key: 'a4b635c184cc8a58c74f1ba5dbb5f455df1a7b86', class: 'relative' }, h("div", { key: 'd0d1a3f05d117bb2b3a28022e8737fae2f25fcb3', class: 'trigger', onClick: () => this._triggerClickHandler() }, h("slot", { key: '5697825e61fb1c07139663c6c5ac400c48da998a', name: 'trigger' })), h("div", { key: '815b60a51d6b074e878eab047cac77cce5a3e337', class: 'relative w-full' }, h("p-dropdown-menu-container", { key: '60bf00e8beb6e42e7629b57283d317bfe0a2b40a',
|
|
130
|
+
return (h(Host, { key: 'a4b635c184cc8a58c74f1ba5dbb5f455df1a7b86', class: 'relative' }, h("div", { key: 'd0d1a3f05d117bb2b3a28022e8737fae2f25fcb3', class: 'trigger', onClick: () => this._triggerClickHandler() }, h("slot", { key: '5697825e61fb1c07139663c6c5ac400c48da998a', name: 'trigger' })), h("div", { key: '815b60a51d6b074e878eab047cac77cce5a3e337', class: 'relative w-full' }, h("p-dropdown-menu-container", { key: '60bf00e8beb6e42e7629b57283d317bfe0a2b40a', allowOverflow: this.allowOverflow, class: cn(dropdownContainerClass({
|
|
131
131
|
strategy: this.strategy,
|
|
132
132
|
maxWidth: this.applyMaxWidth,
|
|
133
133
|
fullWidth: this.applyFullWidth && !this.applyMaxWidth,
|
|
134
134
|
isDatepicker: this.isDatepicker,
|
|
135
|
-
}), this.containerClass),
|
|
135
|
+
}), this.containerClass), "data-placement": this.placement, "data-strategy": this.strategy, fullWidth: this.applyFullWidth && !this.applyMaxWidth, maxWidth: this.applyMaxWidth, ref: el => this._load(el), role: 'popover', scrollable: this.scrollable, variant: this.variant, onClick: () => this._containerClickHandler() }, h("slot", { key: '34a4da54cb7e3949a494b028b6188b9655b294c2', name: 'items' })))));
|
|
136
136
|
}
|
|
137
137
|
_checkButtons(active = false) {
|
|
138
138
|
if (!this.applyChevron) {
|
|
@@ -105,13 +105,13 @@ export class FieldContainer {
|
|
|
105
105
|
}
|
|
106
106
|
render() {
|
|
107
107
|
const { hasHeaderSlot, hasErrorSlot, helper, label, errorAndErrorIsNotBoolean, } = this._getSlotInfo();
|
|
108
|
-
let contentSlot = (h("slot", { key: 'e795f4695850003f41a5bfb815893affee00e8de',
|
|
108
|
+
let contentSlot = (h("slot", { key: 'e795f4695850003f41a5bfb815893affee00e8de', name: 'content', slot: 'trigger' }));
|
|
109
109
|
if (this.loading) {
|
|
110
|
-
contentSlot = (h("p-loader", { key: '1f65c3ca60cefbf0740c9d7235a18a3e69f1c788',
|
|
110
|
+
contentSlot = (h("p-loader", { key: '1f65c3ca60cefbf0740c9d7235a18a3e69f1c788', class: loader({ variant: this.variant, size: this.loadingSize }), slot: 'trigger', variant: 'ghost' }));
|
|
111
111
|
}
|
|
112
|
-
return (h(ThemedHost, { key: '9b4ab7a1d59cead07a2065b0d6bc72be41d24287' }, h("label", { key: 'ac31d16bdd75b4b236479638efd367f4771627d1',
|
|
112
|
+
return (h(ThemedHost, { key: '9b4ab7a1d59cead07a2065b0d6bc72be41d24287' }, h("label", { key: 'ac31d16bdd75b4b236479638efd367f4771627d1', class: cn('flex w-inherit flex-col gap-1', {
|
|
113
113
|
'cursor-auto': this.variant === 'read',
|
|
114
|
-
}) }, h("div", { key: '06a0c419582c71df7323bc3b0deb2d8a98541ca7', class: cn('flex items-end justify-between gap-1 empty:hidden', {
|
|
114
|
+
}), htmlFor: this.id }, h("div", { key: '06a0c419582c71df7323bc3b0deb2d8a98541ca7', class: cn('flex items-end justify-between gap-1 empty:hidden', {
|
|
115
115
|
'flex-row-reverse': this.align === 'end',
|
|
116
116
|
}) }, (!!label?.length || !!helper?.length) && (h("div", { key: '97d2b33bb04145650b000dde1859015361855fa3', class: 'flex min-w-0 gap-2', onClick: () => this.focus.emit() }, h("span", { key: '4a2fc2b62dba4fc7d4a5f816944996333cff2ca3', class: 'min-w-0 overflow-hidden text-ellipsis text-xs font-medium text-storm-300 dark:text-hurricane-200' }, label), helper && (h("p-helper", { key: '1638bb0c6c3683bd2bd0836b9f4fd0ca07561baf', class: 'flex flex-shrink-0', placement: 'top' }, helper)))), ((!asBoolean(this.required) && asBoolean(this.showOptional)) ||
|
|
117
117
|
hasHeaderSlot) && (h("div", { key: '4f9f56fc0951dab62bd75c4cc7ea724e17ec05aa', class: 'flex items-center gap-1' }, !asBoolean(this.required) &&
|
|
@@ -121,8 +121,8 @@ export class FieldContainer {
|
|
|
121
121
|
'ml-auto': this.align === 'end',
|
|
122
122
|
'font-normal': this.variant === 'read',
|
|
123
123
|
'text-storm-500 dark:text-white': this.variant === 'read',
|
|
124
|
-
}),
|
|
125
|
-
asBoolean(this.forceShowTooltip, false),
|
|
124
|
+
}), content: this.error, enableUserInput: false, placement: this.errorPlacement, show: errorAndErrorIsNotBoolean &&
|
|
125
|
+
asBoolean(this.forceShowTooltip, false), variant: 'error' }, hasErrorSlot && (h("slot", { key: '3670780d5e0907d655e282fbea6c43dcceea7e00', name: 'error', slot: 'content' })), contentSlot))));
|
|
126
126
|
}
|
|
127
127
|
async _setLocales() {
|
|
128
128
|
this._locales = await getLocaleComponentStrings(this._el);
|
|
@@ -329,17 +329,17 @@ export class Field {
|
|
|
329
329
|
}
|
|
330
330
|
render() {
|
|
331
331
|
const { id, prefix, suffix, hasHeaderSlot, hasLabelSlot, hasHelperSlot, hasErrorSlot, hasValueSlot, } = this._getSlotInfo();
|
|
332
|
-
return (h(ThemedHost, { key: '09b8254690a1603271faac4d9653c90a582a4766' }, h("p-field-container", { key: '776ed3812a980004c1cdc1b6c5b79df5908b383e', forceShowTooltip: (!!this.error?.length && !this._focused && this.autoShowError) ||
|
|
333
|
-
(!!this.error?.length && this.forceShowTooltip), id: id, label: this.label,
|
|
332
|
+
return (h(ThemedHost, { key: '09b8254690a1603271faac4d9653c90a582a4766' }, h("p-field-container", { key: '776ed3812a980004c1cdc1b6c5b79df5908b383e', align: this.align, error: this.error, forceShowTooltip: (!!this.error?.length && !this._focused && this.autoShowError) ||
|
|
333
|
+
(!!this.error?.length && this.forceShowTooltip), helper: this.helper, id: id, label: this.label, loading: this.loading, loadingSize: this.size, required: this.required, showOptional: this.showOptional, variant: this.variant }, hasLabelSlot && (h("slot", { key: '597e07f1227421eb34575f2c35a5f752f60a66a3', name: 'label', slot: 'label' })), hasHeaderSlot && (h("slot", { key: '0ec1fd3a079f51c605b593e90d8514119ae0ffa3', name: 'header', slot: 'header' })), hasHelperSlot && (h("slot", { key: 'c71b52f8f6f8fc374e9d7e0c2ed4f838c9f9cb86', name: 'helper', slot: 'helper' })), hasErrorSlot && (h("slot", { key: 'd62e1c5f5592540dacbb2e18cf5cc560efbbc5a4', name: 'error', slot: 'error' })), h("div", { key: '7d30604708a80bd509b5d739e46d82b5fa23b464', class: field({
|
|
334
334
|
error: !!this.error?.length,
|
|
335
335
|
disabled: asBoolean(this.disabled),
|
|
336
336
|
focused: asBoolean(this.focused) || this._focused,
|
|
337
337
|
size: this.size,
|
|
338
338
|
variant: this.variant,
|
|
339
339
|
isTextarea: this.type === 'textarea',
|
|
340
|
-
}), title: this.variant === 'read' && !hasValueSlot
|
|
340
|
+
}), slot: 'content', title: this.variant === 'read' && !hasValueSlot
|
|
341
341
|
? `${this.value}`
|
|
342
|
-
: undefined
|
|
342
|
+
: undefined }, (this.error?.length ||
|
|
343
343
|
prefix ||
|
|
344
344
|
(this.icon && this.iconPosition === 'start')) && (h("div", { key: 'b4b203ba8f20620b2d7f368d2c6367bdadea9878', class: prefixAndSuffix({
|
|
345
345
|
variant: this.variant,
|
|
@@ -351,7 +351,7 @@ export class Field {
|
|
|
351
351
|
}), onClick: () => this._focusInput() }, (this.icon && this.iconPosition === 'start') ||
|
|
352
352
|
this.error?.length ? (h("p-icon", { class: cn('flex', {
|
|
353
353
|
'mt-1': this.variant === 'read' && this.size === 'base',
|
|
354
|
-
}), variant: this.error?.length ? 'warning' : this.icon
|
|
354
|
+
}), flip: this.iconFlip, rotate: this.iconRotate, variant: this.error?.length ? 'warning' : this.icon })) : (prefix))), this._getContent(hasValueSlot, id), (suffix || (this.icon && this.iconPosition === 'end')) && (h("div", { key: '5fe27dcdc61d7ba5646ecd6e062ad51f808dc4dd', class: prefixAndSuffix({
|
|
355
355
|
variant: this.variant,
|
|
356
356
|
error: !!this.error?.length,
|
|
357
357
|
disabled: asBoolean(this.disabled),
|
|
@@ -360,7 +360,7 @@ export class Field {
|
|
|
360
360
|
isTextarea: this.type === 'textarea',
|
|
361
361
|
}), onClick: () => this._focusInput() }, this.icon && this.iconPosition === 'end' ? (h("p-icon", { class: cn('flex', {
|
|
362
362
|
'mt-1': this.variant === 'read' && this.size === 'base',
|
|
363
|
-
}),
|
|
363
|
+
}), flip: this.iconFlip, rotate: this.iconRotate, variant: this.icon })) : (suffix)))))));
|
|
364
364
|
}
|
|
365
365
|
watchvalue(value) {
|
|
366
366
|
if (!this._inputRef) {
|
|
@@ -435,7 +435,7 @@ export class Field {
|
|
|
435
435
|
}
|
|
436
436
|
_getContent(hasValueSlot = false, id) {
|
|
437
437
|
if (this.variant === 'read') {
|
|
438
|
-
return hasValueSlot ? (h("slot", { name: 'value' })) : !!this.value && `${this.value}`.length > 0 ? (this.value) : this.showAddOnEmpty ? (h("p-button", {
|
|
438
|
+
return hasValueSlot ? (h("slot", { name: 'value' })) : !!this.value && `${this.value}`.length > 0 ? (this.value) : this.showAddOnEmpty ? (h("p-button", { icon: 'plus', size: 'sm', variant: 'text', onClick: () => this.add.emit() }, this.addText)) : ('—');
|
|
439
439
|
}
|
|
440
440
|
if (this.type === 'slot') {
|
|
441
441
|
return h("slot", { name: 'input' });
|
|
@@ -459,7 +459,7 @@ export class Field {
|
|
|
459
459
|
if (this.type === 'textarea') {
|
|
460
460
|
return (h("textarea", { ref: ref => this._setInputRef(ref), ...props, ...properties }));
|
|
461
461
|
}
|
|
462
|
-
return (h("input", {
|
|
462
|
+
return (h("input", { ref: ref => this._setInputRef(ref), type: this.type, ...props, ...properties }));
|
|
463
463
|
}
|
|
464
464
|
_setInputRef(ref) {
|
|
465
465
|
this._inputRef = ref;
|
|
@@ -73,7 +73,7 @@ export class Label {
|
|
|
73
73
|
variant: this.variant,
|
|
74
74
|
iconOnly: this.iconOnly,
|
|
75
75
|
keepMobileContent: this.keepMobileContent,
|
|
76
|
-
}) }, this.icon && (h("p-icon", { key: '24ec81f74dfeea24990a76edac38ccdc79490e88', class: 'flex-shrink-0',
|
|
76
|
+
}) }, this.icon && (h("p-icon", { key: '24ec81f74dfeea24990a76edac38ccdc79490e88', class: 'flex-shrink-0', flip: this.iconFlip, rotate: this.iconRotate, variant: this.icon })), !this.iconOnly && (h("div", { key: 'd0b89fc24b7304a8e61e5157bcf4bdae3bdb26ca', class: cn('flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm font-medium', {
|
|
77
77
|
hidden: !this.keepMobileContent,
|
|
78
78
|
'desktop-xs:block': !this.keepMobileContent,
|
|
79
79
|
}) }, h("slot", { key: 'ad87aa170cc6f7980678a1cfc25f5dbdf510127e' }))))));
|
|
@@ -65,19 +65,19 @@ export class PaginationPages {
|
|
|
65
65
|
hidden: this.hideOnSinglePage && this._set?.length === 3,
|
|
66
66
|
}) }, this._set?.map(p => {
|
|
67
67
|
if (p.type === 'previous' || p.type === 'next') {
|
|
68
|
-
return (h("p-pagination-pages-item", {
|
|
68
|
+
return (h("p-pagination-pages-item", { disabled: this._carouselDisabled(p.type), variant: 'carousel', onClick: () => p.type === 'previous'
|
|
69
69
|
? this._previousClick()
|
|
70
70
|
: this._nextClick() }, p.value));
|
|
71
71
|
}
|
|
72
72
|
if (p.type === 'ellipsis') {
|
|
73
|
-
return (h("p-dropdown", { placement: 'top',
|
|
73
|
+
return (h("p-dropdown", { applyChevron: false, insideClick: true, placement: 'top', ref: el => (this._dropdowns[p.dropdownIndex] = el), show: this._showDropdown[p.dropdownIndex], onIsOpen: ({ detail }) => this._onShowDropdown(detail, p.dropdownIndex) }, h("p-pagination-pages-item", { slot: 'trigger' }, "..."), p.options?.slice(0, 5).map(v => (h("p-dropdown-menu-item", { autoHeight: true, slot: 'items', variant: 'pagination', onClick: () => this._pageClick(v) }, this.dropdownPageTemplate
|
|
74
74
|
? this.dropdownPageTemplate(v)
|
|
75
75
|
: this._defaultDropdownPageTemplate(v)))), p.options?.length > 5 &&
|
|
76
|
-
this._showDropdown[p.dropdownIndex] && (h("p-field", { class: 'mt-2 w-28',
|
|
76
|
+
this._showDropdown[p.dropdownIndex] && (h("p-field", { autoFocus: true, class: 'mt-2 w-28', icon: 'enter-key', iconPosition: 'end', properties: {
|
|
77
77
|
min: 1,
|
|
78
78
|
max: this._pages.length,
|
|
79
79
|
step: 1,
|
|
80
|
-
},
|
|
80
|
+
}, size: 'sm', slot: 'items', type: 'number', onEnter: ({ detail }) => this._enterPress(detail) }))));
|
|
81
81
|
}
|
|
82
82
|
return (h("p-pagination-pages-item", { active: p.value === this.page, onClick: () => this._pageClick(p.value) }, p.value));
|
|
83
83
|
}))));
|
|
@@ -190,11 +190,11 @@ export class PaginationPages {
|
|
|
190
190
|
const set = [];
|
|
191
191
|
const previous = {
|
|
192
192
|
type: 'previous',
|
|
193
|
-
value: (h("p-icon", {
|
|
193
|
+
value: (h("p-icon", { rotate: 90, size: 'sm', variant: 'caret' })),
|
|
194
194
|
};
|
|
195
195
|
const next = {
|
|
196
196
|
type: 'next',
|
|
197
|
-
value: (h("p-icon", {
|
|
197
|
+
value: (h("p-icon", { rotate: -90, size: 'sm', variant: 'caret' })),
|
|
198
198
|
};
|
|
199
199
|
// Disable page range, display all the pages
|
|
200
200
|
if (range === null) {
|
|
@@ -66,7 +66,7 @@ export class Pagination {
|
|
|
66
66
|
(!this.enablePaginationSize && !this.enablePaginationPages),
|
|
67
67
|
}) }, this.enablePaginationPages && this.enablePaginationSize && (h(Fragment, { key: '5812bfaaee47936e0f1d910c4da0421589e5cf9b' }, h("p-pagination-size", { key: '2fe1f8e733d96ef2843d184f17c02b2db44b3fb5', hidden: hidePageSizeSelect, size: this.pageSize, sizeOptions: this.pageSizeOptions, onSizeChange: ({ detail }) => this._changePageSize(detail) }), !hidePageSizeSelect &&
|
|
68
68
|
this.hideOnSinglePage &&
|
|
69
|
-
this._hasPaginationPages && (h("p-divider", { key: 'fa14cc1d718604f931f95ee9d2accd28b1bf43e7',
|
|
69
|
+
this._hasPaginationPages && (h("p-divider", { key: 'fa14cc1d718604f931f95ee9d2accd28b1bf43e7', class: 'mx-0 h-4 text-off-white-700 dark:text-hurricane-400', variant: 'vertical' })))), this.enablePaginationPages && (h("p-pagination-pages", { key: '265840dfb523c4330e5c44a00fe28d9397f7b45c', hideOnSinglePage: this.hideOnSinglePage, page: this.page, pageSize: this.pageSize, total: this.total, onPageChange: ({ detail }) => this.pageChange.emit(detail), onPagesChange: ({ detail }) => {
|
|
70
70
|
this._hasPaginationPages = detail > 1;
|
|
71
71
|
this.pagesChange.emit(detail);
|
|
72
72
|
} })))));
|
|
@@ -73,7 +73,7 @@ export class PaginationSize {
|
|
|
73
73
|
this._setLocales();
|
|
74
74
|
}
|
|
75
75
|
render() {
|
|
76
|
-
return (h(ThemedHost, { key: '1062e4a018038b23e5514a50f9fa658b6fae7010', class: paginationSize({ hidden: asBoolean(this.hidden) }) }, h("p-dropdown", { key: '521979380d535dcd911c26b881338ddaaf3e7344', applyFullWidth: true, applyMaxWidth: false,
|
|
76
|
+
return (h(ThemedHost, { key: '1062e4a018038b23e5514a50f9fa658b6fae7010', class: paginationSize({ hidden: asBoolean(this.hidden) }) }, h("p-dropdown", { key: '521979380d535dcd911c26b881338ddaaf3e7344', applyFullWidth: true, applyMaxWidth: false, chevronDirection: 'down', placement: 'top-start', onIsOpen: ({ detail }) => (this.dropdownIsOpen = detail) }, h("div", { key: '81cdccac14a27636661d30889d5894a9fb5d7ce6', class: trigger({
|
|
77
77
|
active: this.dropdownIsOpen,
|
|
78
78
|
}), slot: 'trigger' }, h("p", { key: '3477755b3365205fef5a3e3f8f465f0d1d41ddd1', class: 'min-w-0 flex-1 overflow-hidden text-ellipsis text-nowrap' }, this.itemTemplate
|
|
79
79
|
? this.itemTemplate(this.size)
|
|
@@ -84,7 +84,7 @@ export class PaginationSize {
|
|
|
84
84
|
], {
|
|
85
85
|
'text-storm-300 dark:text-hurricane-200': !this.dropdownIsOpen,
|
|
86
86
|
'text-storm-500 dark:text-white': !!this.dropdownIsOpen,
|
|
87
|
-
}),
|
|
87
|
+
}), size: 'sm', variant: 'double-caret' })), h("slot", { key: '4ac113bf401a0a3019c6430a58f5cfd8a153e5c4', slot: 'items' }, this.sizeOptions.map(option => (h("p-dropdown-menu-item", { active: option === this.size, onClick: () => this._changeSize(option) }, this.itemTemplate
|
|
88
88
|
? this.itemTemplate(option)
|
|
89
89
|
: this._defaultItemTemplate(option))))))));
|
|
90
90
|
}
|
|
@@ -28,7 +28,7 @@ export class Profile {
|
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
30
|
const content = this._getContent();
|
|
31
|
-
return (h(ThemedHost, { key: 'd8b3c59997be743df436a92d272715015d2e876d' }, this._hasDropdownSlot ? (h("p-dropdown", {
|
|
31
|
+
return (h(ThemedHost, { key: 'd8b3c59997be743df436a92d272715015d2e876d' }, this._hasDropdownSlot ? (h("p-dropdown", { applyChevron: false, applyFullWidth: true, applyMaxWidth: false, placement: this.dropdownLocation, strategy: 'absolute', onIsOpen: ev => (this._dropdownOpen = ev.detail) }, h("p-button", { active: this._dropdownOpen, chevron: this._dropdownOpen ? 'up' : 'down', class: 'w-full', size: 'lg', slot: 'trigger', variant: 'dropdown' }, content), h("div", { slot: 'items' }, h("slot", { name: 'dropdown', onSlotchange: () => this._checkDropdownSlot() })))) : (content)));
|
|
32
32
|
}
|
|
33
33
|
slotchange() {
|
|
34
34
|
this._checkDropdownSlot();
|
|
@@ -23,7 +23,7 @@ export class Range {
|
|
|
23
23
|
valueChange;
|
|
24
24
|
render() {
|
|
25
25
|
const percentage = Math.round((this.value / (this.max - this.min)) * 100);
|
|
26
|
-
return (h(ThemedHost, { key: 'cb6a6b717940ba17aa7a6df5cc36577a991d3831' }, h("div", { key: '86f3c5cfa6b35bab44279382db58fc28cbfb864d', class: 'flex w-inherit items-center gap-2 text-storm-300 dark:text-hurricane-200' }, h("p-icon", { key: 'c39ee42a23403c618cf6980ee68610b0d2210f59', variant: 'minus' }), h("div", { key: 'ea69ab86a1006f763f2306cc5a644b12ebd68540', class: 'relative h-6 flex-1' }, h("input", { key: '36594b239d75623d5494a27ac44fffab83f2c51d',
|
|
26
|
+
return (h(ThemedHost, { key: 'cb6a6b717940ba17aa7a6df5cc36577a991d3831' }, h("div", { key: '86f3c5cfa6b35bab44279382db58fc28cbfb864d', class: 'flex w-inherit items-center gap-2 text-storm-300 dark:text-hurricane-200' }, h("p-icon", { key: 'c39ee42a23403c618cf6980ee68610b0d2210f59', variant: 'minus' }), h("div", { key: 'ea69ab86a1006f763f2306cc5a644b12ebd68540', class: 'relative h-6 flex-1' }, h("input", { key: '36594b239d75623d5494a27ac44fffab83f2c51d', max: this.max, min: this.min, step: this.step, type: 'range', value: this.value, onInput: ev => {
|
|
27
27
|
const value = ev.target.value;
|
|
28
28
|
this.value = Number.parseFloat(value);
|
|
29
29
|
this.valueChange.emit(value);
|
|
@@ -322,8 +322,8 @@ export class Select {
|
|
|
322
322
|
if (this.error?.length) {
|
|
323
323
|
buttonIcon = 'warning';
|
|
324
324
|
}
|
|
325
|
-
return (h(ThemedHost, { key: '617063ca6cf31255928f6f6856cb1902b1d225a2' }, h("p-field-container", { key: '4a6d95f7bfbc79b886044f2fe31695990b4e210d',
|
|
326
|
-
this._selectedItem?.[this.iconClassKey], onClick: ev => this._onClick(ev) }, h("div", { key: '
|
|
325
|
+
return (h(ThemedHost, { key: '617063ca6cf31255928f6f6856cb1902b1d225a2' }, h("p-field-container", { key: '4a6d95f7bfbc79b886044f2fe31695990b4e210d', error: this.error, forceShowTooltip: !!this.error?.length && !this._showDropdown, helper: this.helper, label: this.label, prefix: this.prefix, required: this.required, showOptional: this.showOptional, variant: 'write' }, h("p-dropdown", { key: '85f6409928f327efcfc78cef1dddb9c30178e6ed', applyChevron: false, applyFullWidth: true, applyMaxWidth: false, "disable-trigger-click": this.disabled, insideClick: true, manual: true, scrollable: this.enableAutocomplete ? 'large' : true, show: this._showDropdown, slot: 'content', strategy: this.strategy, onIsOpen: ev => this._onDropdownOpen(ev) }, h("p-button", { key: '9c892e4edc472af73e0c2cbba419012d08302adc', active: this._showDropdown, chevron: this.showChevron ? (this._showDropdown ? 'up' : 'down') : false, class: 'w-full', error: !!this.error?.length, icon: buttonIcon, iconClass: this.applyClassOnSelectedItem &&
|
|
326
|
+
this._selectedItem?.[this.iconClassKey], size: this.size, slot: 'trigger', variant: 'secondary', onClick: ev => this._onClick(ev) }, h("div", { key: '6fa19bac84f26dbc0c3aa97985c6deb40c4eb641', class: 'relative min-w-0 flex-1', ref: ref => (this._inputRef = ref) }, this._displayValue)), this.loading ? this._getLoadingItems() : this._getItems(), this.showAddItem && this._getAddItem()))));
|
|
327
327
|
}
|
|
328
328
|
documentClickHandler(event) {
|
|
329
329
|
if (!this._showDropdown || childOfComposed(event, this._el)) {
|
|
@@ -480,7 +480,7 @@ export class Select {
|
|
|
480
480
|
? this._selectedItem.some(i => i[this._identifierKey] === item[this._identifierKey])
|
|
481
481
|
: item[this._identifierKey] ===
|
|
482
482
|
this._selectedItem?.[this._identifierKey];
|
|
483
|
-
return (h("p-dropdown-menu-item", { enableTextWrap: this.enableTextWrap, useContainer: false, onClick: () => this._selectValue(item)
|
|
483
|
+
return (h("p-dropdown-menu-item", { active: isSelected, checkbox: this.multi ? true : false, enableTextWrap: this.enableTextWrap, slot: 'items', useContainer: false, onClick: () => this._selectValue(item) }, this._getDisplay(item, false, isSelected)));
|
|
484
484
|
});
|
|
485
485
|
if (this._items.length === 0) {
|
|
486
486
|
items = [
|
|
@@ -488,7 +488,7 @@ export class Select {
|
|
|
488
488
|
];
|
|
489
489
|
}
|
|
490
490
|
if (this.enableSelectAll && this._items.length > 0) {
|
|
491
|
-
items.unshift(h("p-dropdown-menu-item", { slot: 'items', useContainer: false, checkbox: true, onClick: () => this._selectAllChange()
|
|
491
|
+
items.unshift(h("p-dropdown-menu-item", { active: this._allSelected, slot: 'items', useContainer: false, checkbox: true, onClick: () => this._selectAllChange() }, this.selectAllIcon?.length ? (h("span", { class: 'flex items-center gap-2' }, h("div", { class: 'flex w-6 justify-center text-lg' }, h("p-icon", { variant: this.selectAllIcon })), ' ', this.selectAllText)) : (this.selectAllText)));
|
|
492
492
|
}
|
|
493
493
|
if (this.enableAutocomplete) {
|
|
494
494
|
items.unshift(this._getAutoCompleteItem());
|
|
@@ -496,17 +496,17 @@ export class Select {
|
|
|
496
496
|
return items;
|
|
497
497
|
}
|
|
498
498
|
_getAddItem() {
|
|
499
|
-
return (h("p-dropdown-menu-item", { onClick: () => this.add.emit()
|
|
499
|
+
return (h("p-dropdown-menu-item", { slot: 'items', useContainer: false, onClick: () => this.add.emit() }, h("span", { class: 'flex items-center gap-1 font-semibold text-indigo-600' }, this.addItemText, h("p-icon", { variant: 'plus' }))));
|
|
500
500
|
}
|
|
501
501
|
_getLoadingItems() {
|
|
502
|
-
const items = [0, 0, 0].map(() => (h("p-dropdown-menu-item", { enableHover: false, slot: 'items' }, h("p-loader", {
|
|
502
|
+
const items = [0, 0, 0].map(() => (h("p-dropdown-menu-item", { enableHover: false, slot: 'items' }, h("p-loader", { class: 'h-6 w-full rounded', variant: 'ghost' }))));
|
|
503
503
|
if (this.enableAutocomplete) {
|
|
504
504
|
items.unshift(this._getAutoCompleteItem());
|
|
505
505
|
}
|
|
506
506
|
return items;
|
|
507
507
|
}
|
|
508
508
|
_getAutoCompleteItem() {
|
|
509
|
-
return (h("div", { class: 'sticky top-0 z-10 mb-3 h-8', slot: 'items' }, h("p-field", { class: 'block', placeholder: this.autocompletePlaceholder,
|
|
509
|
+
return (h("div", { class: 'sticky top-0 z-10 mb-3 h-8', slot: 'items' }, h("p-field", { class: 'block', placeholder: this.autocompletePlaceholder, value: this.query, onInputRefChange: ev => (this.autocompleteInputRef = ev.detail), onValueChange: ev => this._onAutoComplete(ev) })));
|
|
510
510
|
}
|
|
511
511
|
_setMultiContainerMaxWidth() {
|
|
512
512
|
if (!this._inputRef || !this._multiContainerRef) {
|
|
@@ -570,7 +570,7 @@ export class Select {
|
|
|
570
570
|
? (this.selectionDisplayKey ?? this.displayKey)
|
|
571
571
|
: this.displayKey]));
|
|
572
572
|
if (this.avatarKey) {
|
|
573
|
-
content = (h("span", { class: 'flex items-center gap-2' }, h("p-avatar", { size: 'sm', src: item[this.avatarKey]
|
|
573
|
+
content = (h("span", { class: 'flex items-center gap-2' }, h("p-avatar", { letters: item[this.avatarLettersKey], size: 'sm', src: item[this.avatarKey] }), h("div", { class: textContainer({
|
|
574
574
|
variant: 'default',
|
|
575
575
|
error: !!this.error?.length,
|
|
576
576
|
enableTextWrap: this.enableTextWrap && !isSelection,
|
|
@@ -91,7 +91,7 @@ export class TableCell {
|
|
|
91
91
|
}
|
|
92
92
|
_getContent() {
|
|
93
93
|
if (this.variant === 'loading') {
|
|
94
|
-
return (h("p-loader", {
|
|
94
|
+
return (h("p-loader", { class: 'h-6 w-[calc(100%-1rem)] flex-1 rounded', variant: 'ghost' }));
|
|
95
95
|
}
|
|
96
96
|
const align = this.variant === 'header'
|
|
97
97
|
? (this.definition.headerAlign ?? this.definition.align)
|
|
@@ -105,7 +105,7 @@ export class TableFooter {
|
|
|
105
105
|
hidden: this._hidden,
|
|
106
106
|
tableHeaderHasAction: this.tableHeaderHasAction,
|
|
107
107
|
}) }, (this.enablePaginationPages || this.enablePaginationSize) &&
|
|
108
|
-
this.total > 0 && (h("p-pagination", { key: '9bbe8d8de8dce310f2799829469b6826642aa295', class: 'z-[2]',
|
|
108
|
+
this.total > 0 && (h("p-pagination", { key: '9bbe8d8de8dce310f2799829469b6826642aa295', class: 'z-[2]', enablePaginationPages: this.enablePaginationPages, enablePaginationSize: this.enablePaginationSize, hideOnSinglePage: this.hideOnSinglePage, page: this.page, pageSize: this.pageSize, pageSizeOptions: this.pageSizeOptions, total: this.total, onPageChange: ({ detail }) => this.pageChange.emit(detail), onPageSizeChange: ({ detail }) => this._changePageSize(detail), onPagesChange: ({ detail }) => (this._hasPaginationPages = detail > 1) })))));
|
|
109
109
|
}
|
|
110
110
|
_changePageSize(s) {
|
|
111
111
|
if (!s) {
|
|
@@ -130,21 +130,21 @@ export class TableHeader {
|
|
|
130
130
|
const mobileTotal = (this.selectedFiltersAmount || 0) + (activeQuickFilter?.default ? 0 : 1);
|
|
131
131
|
const hasCustomFilterSlot = !!this._el.querySelector(':scope > [slot="custom-filter"]');
|
|
132
132
|
const hasCustomActionsSlot = !!this._el.querySelector(':scope > [slot="custom-actions"]');
|
|
133
|
-
return (h(ThemedHost, { key: 'dcf65ce62e7dc90f0c45e7748fd23872f21e7fad' }, h("div", { key: '3082ccae779f57c8812afc4b2400b20c87dd22a0', class: header() }, this.loading && (h("p-loader", { key: 'cbcf94e4afb27f7ee22b4adfbcadd9d72db2a189',
|
|
133
|
+
return (h(ThemedHost, { key: 'dcf65ce62e7dc90f0c45e7748fd23872f21e7fad' }, h("div", { key: '3082ccae779f57c8812afc4b2400b20c87dd22a0', class: header() }, this.loading && (h("p-loader", { key: 'cbcf94e4afb27f7ee22b4adfbcadd9d72db2a189', class: 'hidden h-8 w-3/4 rounded desktop-xs:flex', variant: 'ghost' })), !this.loading &&
|
|
134
134
|
(hasCustomFilterSlot || quickFilters.length > 0) && (h("div", { key: '04c40b4406a49b0faf09c1e72ffe0d3b64e54548', class: 'flex flex-col justify-start gap-4 justify-self-start desktop-xs:flex-row' }, hasCustomFilterSlot && h("slot", { key: '409423868e33814d87381c29d41cfede57deead0', name: 'custom-filter' }), quickFilters.length > 0 && (h("p-segment-container", { key: '51c257a5ad8c65e84dac192b86c2cb291435884e', class: 'hidden desktop-xs:flex' }, quickFilters.map(item => (h("p-segment-item", { active: item.identifier === this.activeQuickFilterIdentifier, onClick: () => this.quickFilter.emit(item) }, typeof item.text === 'string'
|
|
135
135
|
? item.text
|
|
136
|
-
: item.text(), ' ', item?.count >= 0 ? `(${item.count})` : ''))))))), h("div", { key: '6f8295a5c359b799f2f03d82e65d4f9e4acb5109', class: 'flex flex-col justify-end gap-2 desktop-xs:ml-auto desktop-xs:flex-row desktop-xs:items-center' }, this.enableSearch && (h("p-field", { key: 'e52e1dbe939f318c711e0f5ae25e8c667f6fcf31',
|
|
136
|
+
: item.text(), ' ', item?.count >= 0 ? `(${item.count})` : ''))))))), h("div", { key: '6f8295a5c359b799f2f03d82e65d4f9e4acb5109', class: 'flex flex-col justify-end gap-2 desktop-xs:ml-auto desktop-xs:flex-row desktop-xs:items-center' }, this.enableSearch && (h("p-field", { key: 'e52e1dbe939f318c711e0f5ae25e8c667f6fcf31', class: 'desktop-xs:max-w-60', icon: 'search', placeholder: 'Zoeken...', value: this.query, onValueChange: ev => this._queryObserver.next(ev.detail) })), h("div", { key: 'b914ffa439de0484c5528fa9c02b4a32dc853c27', class: 'flex items-center gap-2' }, this.enableFilter && (h("p-button", { key: '5ea25448415e1b54883dc86059192b065cb23093', class: `w-full ${this.enableFilterDesktop
|
|
137
137
|
? 'desktop-xs:w-auto'
|
|
138
|
-
: 'desktop-xs:hidden'}`, onOnClick: () => this.filter.emit() }, this.filterButtonTemplate
|
|
138
|
+
: 'desktop-xs:hidden'}`, icon: 'filter', variant: 'secondary', onOnClick: () => this.filter.emit() }, this.filterButtonTemplate
|
|
139
139
|
? this.filterButtonTemplate()
|
|
140
140
|
: this._defaultFilterButtonTemplate(), this.selectedFiltersAmount &&
|
|
141
|
-
this._getLabel(this.selectedFiltersAmount), mobileTotal > 0 && this._getLabel(mobileTotal, 'mobile'))), !this.loading && this.enableExport && this.enableFilter && (h("p-divider", { key: '38dc1a4aa1902f41b4b3e3cb85da7d442fc98fd0',
|
|
141
|
+
this._getLabel(this.selectedFiltersAmount), mobileTotal > 0 && this._getLabel(mobileTotal, 'mobile'))), !this.loading && this.enableExport && this.enableFilter && (h("p-divider", { key: '38dc1a4aa1902f41b4b3e3cb85da7d442fc98fd0', class: 'hidden h-4 tablet:flex dark:text-white/15', variant: 'vertical' })), !this.loading && this.enableExport && (h("p-button", { key: 'f8180ecb38e763dc2cf045c3c8e33ed276d591ab', class: 'desktop-xs:auto w-full', icon: 'upload', variant: 'secondary', onOnClick: () => this.export.emit() }, formatTranslation(this._locales.export)))), this.enableAction && this._buttonTemplate(), hasCustomActionsSlot && h("slot", { key: '24b7bee12f89bb16e4e4d690ee03564fcd106638', name: 'custom-actions' })), this.enableAction && this.canUseAction && (h("div", { key: '6c3739a262107b564f6418a605ba6e16943c2c36', class: 'fixed bottom-0 left-0 z-[2] block w-full border border-solid border-transparent bg-white p-4 desktop-xs:hidden dark:border-t-hurricane-400 dark:bg-hurricane-500' }, this._buttonTemplate(true))))));
|
|
142
142
|
}
|
|
143
143
|
async _setLocales() {
|
|
144
144
|
this._locales = await getLocaleComponentStrings(this._el);
|
|
145
145
|
}
|
|
146
146
|
_buttonTemplate(mobile = false) {
|
|
147
|
-
return (h("p-button", { class: mobile ? 'w-full' : 'hidden desktop-xs:flex', icon: this.actionIcon,
|
|
147
|
+
return (h("p-button", { class: mobile ? 'w-full' : 'hidden desktop-xs:flex', disabled: !this.canUseAction, icon: this.actionIcon, loading: this.actionLoading, onOnClick: () => this.action.emit() }, this.actionButtonTemplate
|
|
148
148
|
? this.actionButtonTemplate(mobile ? this.itemsSelectedAmount : 0)
|
|
149
149
|
: this._defaultActionButtonTemplate(mobile ? this.itemsSelectedAmount : 0)));
|
|
150
150
|
}
|
|
@@ -49,7 +49,7 @@ export class Toast {
|
|
|
49
49
|
*/
|
|
50
50
|
action;
|
|
51
51
|
render() {
|
|
52
|
-
return (h(ThemedHost, { key: '6fd875b74af13f4a1c7dd6e924d7044ff06c944f' }, h("div", { key: 'f908fa3fc32e0818e5b7ccd64adf925678719072', class: 'flex gap-2 rounded-lg border border-solid border-storm-100 bg-white p-2 shadow-2 dark:border-hurricane-800 dark:bg-hurricane-800', onClick: () => this._onClick() }, h("div", { key: '7f2788fde508ad480ffaaf544f6815f87e520499', class: indicator({ variant: this.variant }) }), h("div", { key: '99bde4f91347f270375852e62b573cba43d570d2', class: content() }, h("div", { key: '2ea0b73745021b483607c52166204f3e00b33d38', class: 'flex w-full min-w-0 flex-col' }, h("p", { key: 'd9cf48a043d897e211da6ce6d389ee65c59d7560', class: 'm-0 overflow-hidden text-ellipsis whitespace-nowrap text-sm font-semibold text-storm-500 dark:text-white' }, this.header?.length ? this.header : h("slot", { name: 'header' })), h("p", { key: 'cbae153aafab6f54d0af33ab3a99f1c03a44cd78', class: 'm-0 w-full overflow-hidden text-ellipsis whitespace-nowrap text-xs text-storm-300 dark:text-hurricane-200' }, this.content?.length ? this.content : h("slot", { name: 'content' }))), this.enableAction && (h("div", { key: '300ae00c2e2e30c87c32f78bf05a3bb3a65e2a97', class: 'flex-shrink-0 cursor-pointer p-2 text-storm-200 hover:text-storm-500 hover:text-white dark:text-hurricane-200' }, h("p-icon", { key: 'a7849a36ec22b1a300c0d788c0e41ea1e8e76340',
|
|
52
|
+
return (h(ThemedHost, { key: '6fd875b74af13f4a1c7dd6e924d7044ff06c944f' }, h("div", { key: 'f908fa3fc32e0818e5b7ccd64adf925678719072', class: 'flex gap-2 rounded-lg border border-solid border-storm-100 bg-white p-2 shadow-2 dark:border-hurricane-800 dark:bg-hurricane-800', onClick: () => this._onClick() }, h("div", { key: '7f2788fde508ad480ffaaf544f6815f87e520499', class: indicator({ variant: this.variant }) }), h("div", { key: '99bde4f91347f270375852e62b573cba43d570d2', class: content() }, h("div", { key: '2ea0b73745021b483607c52166204f3e00b33d38', class: 'flex w-full min-w-0 flex-col' }, h("p", { key: 'd9cf48a043d897e211da6ce6d389ee65c59d7560', class: 'm-0 overflow-hidden text-ellipsis whitespace-nowrap text-sm font-semibold text-storm-500 dark:text-white' }, this.header?.length ? this.header : h("slot", { name: 'header' })), h("p", { key: 'cbae153aafab6f54d0af33ab3a99f1c03a44cd78', class: 'm-0 w-full overflow-hidden text-ellipsis whitespace-nowrap text-xs text-storm-300 dark:text-hurricane-200' }, this.content?.length ? this.content : h("slot", { name: 'content' }))), this.enableAction && (h("div", { key: '300ae00c2e2e30c87c32f78bf05a3bb3a65e2a97', class: 'flex-shrink-0 cursor-pointer p-2 text-storm-200 hover:text-storm-500 hover:text-white dark:text-hurricane-200' }, h("p-icon", { key: 'a7849a36ec22b1a300c0d788c0e41ea1e8e76340', flip: this.actionIconFlip, rotate: this.actionIconRotate, variant: this.actionIcon })))))));
|
|
53
53
|
}
|
|
54
54
|
_onClick() {
|
|
55
55
|
if (this.enableAction) {
|
|
@@ -51,7 +51,7 @@ export class Drawer {
|
|
|
51
51
|
}
|
|
52
52
|
const headerContent = h("slot", { name: 'header' });
|
|
53
53
|
const bodyContent = h("slot", { name: 'content' });
|
|
54
|
-
return (h("p-backdrop", {
|
|
54
|
+
return (h("p-backdrop", { applyBlur: this.applyBlur, closing: this._closing, scrollLock: this.scrollLock, variant: 'drawer', onClicked: ev => this._backdropClick(ev.detail) }, h("p-drawer-container", { closing: this._closing }, (this.header?.length || this._hasHeaderSlot) && (h("p-drawer-header", { "show-close": this.showClose, onClose: ev => this.close(ev.detail, 'close') }, this._hasHeaderSlot ? headerContent : this.header)), h("p-drawer-body", null, bodyContent))));
|
|
55
55
|
}
|
|
56
56
|
_backdropClick(ev) {
|
|
57
57
|
if (!this.backdropClickClose) {
|
|
@@ -58,7 +58,7 @@ export class Modal {
|
|
|
58
58
|
const headerContent = h("slot", { name: 'header' });
|
|
59
59
|
const bodyContent = h("slot", { name: 'content' });
|
|
60
60
|
const footerContent = h("slot", { name: 'footer' });
|
|
61
|
-
return (h("p-backdrop", { applyBlur: this.applyBlur,
|
|
61
|
+
return (h("p-backdrop", { applyBlur: this.applyBlur, closing: this._closing, scrollLock: this.scrollLock, onClicked: ev => this._backdropClick(ev.detail) }, h("p-modal-container", { closing: this._closing, size: this.size }, (this.header?.length || this._hasHeaderSlot) && (h("p-modal-header", { showClose: this.showClose, onClose: ev => this.close('button', ev.detail) }, this._hasHeaderSlot ? headerContent : this.header)), h("p-modal-body", { roundedBottom: !this._hasFooterSlot, roundedTop: !this._hasHeaderSlot && !this.header?.length }, bodyContent), this._hasFooterSlot && (h("p-modal-footer", null, footerContent)))));
|
|
62
62
|
}
|
|
63
63
|
_backdropClick(ev) {
|
|
64
64
|
if (!this.backdropClickClose) {
|
|
@@ -44,7 +44,7 @@ const backdrop = cva(['z-navbar-backdrop layout-1280:hidden transition-opacity r
|
|
|
44
44
|
export class Navbar {
|
|
45
45
|
_show = false;
|
|
46
46
|
render() {
|
|
47
|
-
return (h(ThemedHost, { key: 'ee599d3472ef0a332d17353d8e7f559e36d5529b' }, h("p-backdrop", { key: 'aa5b71247881e2a23998bab23f194ff6f58a6662', class: backdrop({ show: this._show }), scrollLock: this._show, onClicked: () => (this._show = false) }), h("div", { key: '121da670f6b7dbbfbce4a018c56b56ac1352c212', class: sidebar({ class: sidebarAndTopbar(), show: this._show }) }, h("div", { key: 'e789b6c904b4715c271e03324d8e8643acd5d8a8', class: 'flex w-full items-center justify-end layout-1280:hidden' }, h("p-button", { key: '9d6f49157fc731f91ff34bc7e37aebe40c5d0612',
|
|
47
|
+
return (h(ThemedHost, { key: 'ee599d3472ef0a332d17353d8e7f559e36d5529b' }, h("p-backdrop", { key: 'aa5b71247881e2a23998bab23f194ff6f58a6662', class: backdrop({ show: this._show }), scrollLock: this._show, onClicked: () => (this._show = false) }), h("div", { key: '121da670f6b7dbbfbce4a018c56b56ac1352c212', class: sidebar({ class: sidebarAndTopbar(), show: this._show }) }, h("div", { key: 'e789b6c904b4715c271e03324d8e8643acd5d8a8', class: 'flex w-full items-center justify-end layout-1280:hidden' }, h("p-button", { key: '9d6f49157fc731f91ff34bc7e37aebe40c5d0612', icon: 'menu-arrow', iconFlip: 'horizontal', iconOnly: true, variant: 'secondary', onClick: () => (this._show = false) })), h("div", { key: 'c88909335eed7df5a93b32a65d24b1a8ff2a3f19', class: 'flex w-full flex-shrink-0 flex-col items-stretch' }, h("slot", { key: 'e09b2eaefb99e51502f3629c377728d298b0e8d9', name: 'company' })), h("div", { key: '2ce82f037a53e8529d834958812d74f3cdd25ef2', class: 'flex w-full flex-1 flex-col gap-6 overflow-y-auto' }, h("slot", { key: 'eaf615dd6f9d5b8fb260fe5a10c43b1e0b6f52c0', name: 'content' })), h("div", { key: '9b8bedc34ab2bcbe8935426007b6fd8c2d33c177', class: 'mt-auto hidden w-full flex-shrink-0 flex-col layout-1280:flex' }, h("slot", { key: '7a4889a2554cad25f9e8be122863fb5c2783376d', name: 'user' }))), h("div", { key: 'e9d88767781757f7fc81c772fbe750a15a03fa6c', class: topbar({ class: sidebarAndTopbar() }) }, h("p-button", { key: '3517c55339958c4461f20b190c220358658a71cf', icon: 'menu-arrow', iconOnly: true, variant: 'secondary', onClick: () => (this._show = true) }), h("slot", { key: 'b89f63dfbeba643e3f46f72e6862944ba75f1213', name: 'topbar' }))));
|
|
48
48
|
}
|
|
49
49
|
handleCloseNavbar() {
|
|
50
50
|
this._show = false;
|
|
@@ -104,7 +104,7 @@ export class Stepper {
|
|
|
104
104
|
}
|
|
105
105
|
_getItem(data, i) {
|
|
106
106
|
const activeStep = this.activeStep - 1 || 0;
|
|
107
|
-
return (h("p-stepper-item", { active: this.enableAutoStatus ? i === activeStep : data.active,
|
|
107
|
+
return (h("p-stepper-item", { active: this.enableAutoStatus ? i === activeStep : data.active, align: this.direction === 'vertical' ? this.align : 'start', contentPosition: this.contentPosition, finished: this.enableAutoStatus ? i < activeStep : data.finished, number: i + 1 }, data.content));
|
|
108
108
|
}
|
|
109
109
|
_getLine(i) {
|
|
110
110
|
const activeStep = this.activeStep - 1 || 0;
|