@pine-ds/core 5.0.0-mercury.0 → 5.0.0
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/components/aria-references.js +1 -0
- package/components/attributes.js +1 -0
- package/components/closest.js +1 -11
- package/components/floating-ui.dom.js +1 -0
- package/components/form.js +1 -0
- package/components/i18n-format.js +1 -0
- package/components/index.d.ts +51 -0
- package/components/index.js +1 -33
- package/components/index2.js +1 -14
- package/components/keep-hydrated.js +1 -0
- package/components/mock-pds-modal.d.ts +11 -0
- package/components/mock-pds-modal.js +1 -0
- package/components/pds-accordion.js +1 -68
- package/components/pds-alert.d.ts +11 -0
- package/components/pds-alert.js +1 -0
- package/components/pds-avatar.js +1 -103
- package/components/pds-box.js +1 -124
- package/components/pds-box2.js +1 -0
- package/components/pds-button.js +1 -8
- package/components/pds-button2.js +1 -84
- package/components/pds-checkbox.js +1 -8
- package/components/pds-checkbox2.js +1 -101
- package/components/pds-chip.js +1 -78
- package/components/pds-chip2.js +1 -0
- package/components/pds-combobox.d.ts +11 -0
- package/components/pds-combobox.js +2 -0
- package/components/pds-container.d.ts +11 -0
- package/components/pds-container.js +1 -0
- package/components/pds-copytext.js +1 -88
- package/components/pds-datepicker.d.ts +11 -0
- package/components/pds-datepicker.js +1 -0
- package/components/pds-divider.js +1 -54
- package/components/pds-drawer-content.d.ts +11 -0
- package/components/pds-drawer-content.js +1 -0
- package/components/pds-drawer-footer.d.ts +11 -0
- package/components/pds-drawer-footer.js +1 -0
- package/components/pds-drawer-header.d.ts +11 -0
- package/components/pds-drawer-header.js +1 -0
- package/components/pds-drawer.d.ts +11 -0
- package/components/pds-drawer.js +1 -0
- package/components/pds-dropdown-menu-item.d.ts +11 -0
- package/components/pds-dropdown-menu-item.js +1 -0
- package/components/pds-dropdown-menu-separator.d.ts +11 -0
- package/components/pds-dropdown-menu-separator.js +1 -0
- package/components/pds-dropdown-menu.d.ts +11 -0
- package/components/pds-dropdown-menu.js +1 -0
- package/components/pds-filter.d.ts +11 -0
- package/components/pds-filter.js +1 -0
- package/components/pds-filters.d.ts +11 -0
- package/components/pds-filters.js +1 -0
- package/components/pds-icon.js +1 -8
- package/components/pds-icon2.js +1 -370
- package/components/pds-image.js +1 -55
- package/components/pds-input.js +1 -72
- package/components/pds-input2.js +1 -0
- package/components/pds-link.js +1 -65
- package/components/pds-link2.js +1 -0
- package/components/pds-loader.js +1 -68
- package/components/pds-loader2.js +1 -0
- package/components/pds-modal-content.d.ts +11 -0
- package/components/pds-modal-content.js +1 -0
- package/components/pds-modal-footer.d.ts +11 -0
- package/components/pds-modal-footer.js +1 -0
- package/components/pds-modal-header.d.ts +11 -0
- package/components/pds-modal-header.js +1 -0
- package/components/pds-modal.d.ts +11 -0
- package/components/pds-modal.js +1 -0
- package/components/pds-modal2.js +1 -0
- package/components/pds-multiselect.d.ts +11 -0
- package/components/pds-multiselect.js +1 -0
- package/components/pds-popover.d.ts +11 -0
- package/components/pds-popover.js +1 -0
- package/components/pds-progress.js +1 -49
- package/components/pds-property.d.ts +11 -0
- package/components/pds-property.js +1 -0
- package/components/pds-radio-group.d.ts +11 -0
- package/components/pds-radio-group.js +1 -0
- package/components/pds-radio.js +1 -78
- package/components/pds-row.js +1 -72
- package/components/pds-select.d.ts +11 -0
- package/components/pds-select.js +1 -0
- package/components/pds-sortable-item.js +1 -58
- package/components/pds-sortable.js +3 -2718
- package/components/pds-switch.js +1 -82
- package/components/pds-tab.js +1 -53
- package/components/pds-table-body.js +1 -36
- package/components/pds-table-cell.js +1 -8
- package/components/pds-table-cell2.js +1 -72
- package/components/pds-table-head-cell.js +1 -8
- package/components/pds-table-head-cell2.js +1 -98
- package/components/pds-table-head.js +1 -90
- package/components/pds-table-row.js +1 -95
- package/components/pds-table.js +1 -124
- package/components/pds-tabpanel.js +1 -45
- package/components/pds-tabs.js +1 -119
- package/components/pds-text.d.ts +11 -0
- package/components/pds-text.js +1 -0
- package/components/pds-text2.js +1 -0
- package/components/pds-textarea.js +1 -82
- package/components/pds-toast.d.ts +11 -0
- package/components/pds-toast.js +1 -0
- package/components/pds-tooltip.js +1 -178
- package/components/portal-target.js +1 -0
- package/components/reconnected-content.js +1 -0
- package/components/reflected-attribute-default.js +1 -0
- package/components/scroll.js +1 -0
- package/components/sortable-label.js +1 -0
- package/components/tabbable.js +1 -0
- package/components/truncation-tooltip.js +1 -0
- package/components/utils.js +1 -0
- package/dist/cjs/aria-references-CUmqibnO.js +54 -0
- package/dist/cjs/attributes-Cgbkw6gO.js +188 -0
- package/dist/cjs/closest-D0qyYtJ3.js +20 -0
- package/dist/cjs/floating-ui.dom-Dw41zbyY.js +1715 -0
- package/dist/cjs/form-MhwfKTuo.js +69 -0
- package/dist/cjs/i18n-format-BD0PmYzT.js +65 -0
- package/dist/cjs/index-BDnbr0DK.js +39 -0
- package/dist/cjs/index-D9iJuJCP.js +2950 -0
- package/dist/cjs/index.cjs.js +21 -2
- package/dist/cjs/keep-hydrated-AKoh0DG4.js +197 -0
- package/dist/cjs/loader.cjs.js +4 -8
- package/dist/cjs/mock-pds-modal.cjs.entry.js +92 -0
- package/dist/cjs/pds-accordion.cjs.entry.js +16 -14
- package/dist/cjs/pds-alert.cjs.entry.js +88 -0
- package/dist/cjs/pds-avatar.cjs.entry.js +123 -28
- package/dist/cjs/pds-box.cjs.entry.js +143 -58
- package/dist/cjs/pds-button.cjs.entry.js +234 -25
- package/dist/cjs/pds-checkbox.cjs.entry.js +102 -26
- package/dist/cjs/pds-chip.cjs.entry.js +226 -23
- package/dist/cjs/pds-combobox.cjs.entry.js +4500 -0
- package/dist/cjs/pds-container.cjs.entry.js +37 -0
- package/dist/cjs/pds-copytext.cjs.entry.js +98 -17
- package/dist/cjs/pds-datepicker.cjs.entry.js +2139 -0
- package/dist/cjs/pds-divider.cjs.entry.js +16 -11
- package/dist/cjs/pds-drawer-content.cjs.entry.js +24 -0
- package/dist/cjs/pds-drawer-footer.cjs.entry.js +24 -0
- package/dist/cjs/pds-drawer-header.cjs.entry.js +24 -0
- package/dist/cjs/pds-drawer.cjs.entry.js +156 -0
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +151 -0
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +23 -0
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +453 -0
- package/dist/cjs/pds-filter.cjs.entry.js +512 -0
- package/dist/cjs/pds-filters.cjs.entry.js +18 -0
- package/dist/cjs/pds-icon.cjs.entry.js +334 -44
- package/dist/cjs/pds-image.cjs.entry.js +158 -16
- package/dist/cjs/pds-input.cjs.entry.js +300 -26
- package/dist/cjs/pds-link.cjs.entry.js +50 -13
- package/dist/cjs/pds-loader.cjs.entry.js +49 -14
- package/dist/cjs/pds-modal-content.cjs.entry.js +199 -0
- package/dist/cjs/pds-modal-footer.cjs.entry.js +24 -0
- package/dist/cjs/pds-modal-header.cjs.entry.js +24 -0
- package/dist/cjs/pds-modal.cjs.entry.js +592 -0
- package/dist/cjs/pds-multiselect.cjs.entry.js +1384 -0
- package/dist/cjs/pds-popover.cjs.entry.js +1103 -0
- package/dist/cjs/pds-progress.cjs.entry.js +30 -12
- package/dist/cjs/pds-property.cjs.entry.js +22 -0
- package/dist/cjs/pds-radio-group.cjs.entry.js +260 -0
- package/dist/cjs/pds-radio.cjs.entry.js +101 -23
- package/dist/cjs/pds-row.cjs.entry.js +50 -21
- package/dist/cjs/pds-select.cjs.entry.js +380 -0
- package/dist/cjs/pds-sortable-item.cjs.entry.js +59 -11
- package/dist/cjs/pds-sortable.cjs.entry.js +504 -119
- package/dist/cjs/pds-switch.cjs.entry.js +185 -27
- package/dist/cjs/pds-tab.cjs.entry.js +78 -16
- package/dist/cjs/pds-table-body.cjs.entry.js +5 -9
- package/dist/cjs/pds-table-cell.cjs.entry.js +150 -19
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +222 -30
- package/dist/cjs/pds-table-head.cjs.entry.js +17 -13
- package/dist/cjs/pds-table-row.cjs.entry.js +104 -16
- package/dist/cjs/pds-table.cjs.entry.js +434 -22
- package/dist/cjs/pds-tabpanel.cjs.entry.js +32 -13
- package/dist/cjs/pds-tabs.cjs.entry.js +206 -18
- package/dist/cjs/pds-text.cjs.entry.js +141 -0
- package/dist/cjs/pds-textarea.cjs.entry.js +318 -29
- package/dist/cjs/pds-toast.cjs.entry.js +156 -0
- package/dist/cjs/pds-tooltip.cjs.entry.js +401 -110
- package/dist/cjs/pine-core.cjs.js +8 -10
- package/dist/cjs/portal-target-e8WQ6dLx.js +70 -0
- package/dist/cjs/reconnected-content-CpnEQcTp.js +29 -0
- package/dist/cjs/reflected-attribute-default-DVYHG6O1.js +44 -0
- package/dist/cjs/scroll-2XcoE_6Q.js +79 -0
- package/dist/cjs/sortable-label-DOcJrHvA.js +37 -0
- package/dist/cjs/tabbable-BrrrGvdG.js +86 -0
- package/dist/cjs/truncation-tooltip-CM5HgRHh.js +430 -0
- package/dist/cjs/utils-BhRmyxT8.js +121 -0
- package/dist/collection/collection-manifest.json +30 -3
- package/dist/collection/components/_internal/pds-label/pds-label.js +0 -1
- package/dist/collection/components/pds-accordion/pds-accordion.css +24 -29
- package/dist/collection/components/pds-accordion/pds-accordion.js +36 -9
- package/dist/collection/components/pds-accordion/stories/pds-accordion.stories.js +12 -18
- package/dist/collection/components/pds-alert/pds-alert.css +141 -0
- package/dist/collection/components/pds-alert/pds-alert.js +291 -0
- package/dist/collection/components/pds-alert/pds-alert.tokens.css +85 -0
- package/dist/collection/components/pds-alert/stories/pds-alert.stories.js +114 -0
- package/dist/collection/components/pds-avatar/pds-avatar.css +56 -23
- package/dist/collection/components/pds-avatar/pds-avatar.js +284 -32
- package/dist/collection/components/pds-avatar/stories/pds-avatar.stories.js +41 -3
- package/dist/collection/components/pds-box/pds-box.css +5520 -264
- package/dist/collection/components/pds-box/pds-box.js +2854 -252
- package/dist/collection/components/pds-box/stories/pds-box.stories.js +86 -30
- package/dist/collection/components/pds-button/pds-button.css +255 -93
- package/dist/collection/components/pds-button/pds-button.js +470 -40
- package/dist/collection/components/pds-button/stories/pds-button.stories.js +242 -16
- package/dist/collection/components/pds-checkbox/checkbox-interface.js +0 -1
- package/dist/collection/components/pds-checkbox/pds-checkbox.css +168 -60
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +186 -54
- package/dist/collection/components/pds-checkbox/stories/pds-checkbox.stories.js +45 -15
- package/dist/collection/components/pds-chip/pds-chip.css +239 -114
- package/dist/collection/components/pds-chip/pds-chip.js +437 -60
- package/dist/collection/components/pds-chip/pds-chip.tokens.css +69 -0
- package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +164 -24
- package/dist/collection/components/pds-combobox/combobox-interface.js +1 -0
- package/dist/collection/components/pds-combobox/grouped-options-panel.js +318 -0
- package/dist/collection/components/pds-combobox/pds-combobox.css +953 -0
- package/dist/collection/components/pds-combobox/pds-combobox.js +3839 -0
- package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +934 -0
- package/dist/collection/components/pds-container/pds-container.css +26 -0
- package/dist/collection/components/pds-container/pds-container.js +111 -0
- package/dist/collection/components/pds-container/stories/pds-container.stories.js +89 -0
- package/dist/collection/components/pds-copytext/pds-copytext.css +39 -51
- package/dist/collection/components/pds-copytext/pds-copytext.js +116 -23
- package/dist/collection/components/pds-copytext/stories/pds-copytext.stories.js +6 -12
- package/dist/collection/components/pds-datepicker/calendar-portal.js +99 -0
- package/dist/collection/components/pds-datepicker/date-utils.js +174 -0
- package/dist/collection/components/pds-datepicker/datepicker-interface.js +1 -0
- package/dist/collection/components/pds-datepicker/pds-datepicker.css +547 -0
- package/dist/collection/components/pds-datepicker/pds-datepicker.js +2505 -0
- package/dist/collection/components/pds-datepicker/presets.js +131 -0
- package/dist/collection/components/pds-datepicker/stories/pds-datepicker.stories.js +206 -0
- package/dist/collection/components/pds-datepicker/value.js +296 -0
- package/dist/collection/components/pds-divider/pds-divider.css +71 -40
- package/dist/collection/components/pds-divider/pds-divider.js +47 -11
- package/dist/collection/components/pds-divider/stories/pds-divider.stories.js +7 -2
- package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.css +22 -0
- package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +27 -0
- package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.css +15 -0
- package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +27 -0
- package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.css +15 -0
- package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +27 -0
- package/dist/collection/components/pds-drawer/pds-drawer.css +47 -0
- package/dist/collection/components/pds-drawer/pds-drawer.js +405 -0
- package/dist/collection/components/pds-drawer/stories/pds-drawer.stories.js +77 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +93 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +398 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.css +7 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +71 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +68 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +545 -0
- package/dist/collection/components/pds-dropdown-menu/stories/pds-dropdown-menu.stories.js +100 -0
- package/dist/collection/components/pds-filters/pds-filter/filter-interface.js +1 -0
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.css +200 -0
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +756 -0
- package/dist/collection/components/pds-filters/pds-filter/stories/pds-filter.stories.js +87 -0
- package/dist/collection/components/pds-filters/pds-filters.css +10 -0
- package/dist/collection/components/pds-filters/pds-filters.js +44 -0
- package/dist/collection/components/pds-filters/stories/pds-filters.stories.js +34 -0
- package/dist/collection/components/pds-icon/stories/pds-icon.stories.js +2 -2
- package/dist/collection/components/pds-image/image-interface.js +1 -0
- package/dist/collection/components/pds-image/pds-image.css +13 -1
- package/dist/collection/components/pds-image/pds-image.js +297 -31
- package/dist/collection/components/pds-image/stories/pds-image.stories.js +124 -8
- package/dist/collection/components/pds-input/input-interface.js +1 -0
- package/dist/collection/components/pds-input/pds-input.css +275 -63
- package/dist/collection/components/pds-input/pds-input.js +687 -57
- package/dist/collection/components/pds-input/pds-input.tokens.css +3 -0
- package/dist/collection/components/pds-input/stories/pds-input.stories.js +310 -14
- package/dist/collection/components/pds-link/pds-link.css +45 -30
- package/dist/collection/components/pds-link/pds-link.js +332 -19
- package/dist/collection/components/pds-link/stories/pds-link.stories.js +82 -4
- package/dist/collection/components/pds-loader/pds-loader.css +17 -30
- package/dist/collection/components/pds-loader/pds-loader.js +62 -14
- package/dist/collection/components/pds-loader/stories/pds-loader.stories.js +3 -5
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.css +25 -0
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +235 -0
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.css +8 -0
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +27 -0
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.css +8 -0
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +27 -0
- package/dist/collection/components/pds-modal/pds-modal.css +142 -0
- package/dist/collection/components/pds-modal/pds-modal.js +852 -0
- package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +745 -0
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +286 -0
- package/dist/collection/components/pds-multiselect/multiselect-interface.js +1 -0
- package/dist/collection/components/pds-multiselect/pds-multiselect.css +365 -0
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +2597 -0
- package/dist/collection/components/pds-multiselect/stories/pds-multiselect.stories.js +866 -0
- package/dist/collection/components/pds-popover/pds-popover.css +16 -0
- package/dist/collection/components/pds-popover/pds-popover.js +1347 -0
- package/dist/collection/components/pds-popover/popover-interface.js +1 -0
- package/dist/collection/components/pds-popover/stories/pds-popover.stories.js +117 -0
- package/dist/collection/components/pds-progress/pds-progress.css +11 -24
- package/dist/collection/components/pds-progress/pds-progress.js +49 -16
- package/dist/collection/components/pds-progress/stories/pds-progress.stories.js +2 -4
- package/dist/collection/components/pds-property/pds-property.css +4 -0
- package/dist/collection/components/pds-property/pds-property.js +70 -0
- package/dist/collection/components/pds-property/stories/pds-property.stories.js +16 -0
- package/dist/collection/components/pds-radio/pds-radio.css +285 -54
- package/dist/collection/components/pds-radio/pds-radio.js +226 -53
- package/dist/collection/components/pds-radio/stories/pds-radio.stories.js +66 -19
- package/dist/collection/components/pds-radio-group/pds-radio-group.css +45 -0
- package/dist/collection/components/pds-radio-group/pds-radio-group.js +514 -0
- package/dist/collection/components/pds-radio-group/radio-group-interface.js +1 -0
- package/dist/collection/components/pds-radio-group/stories/pds-radio-group.stories.js +179 -0
- package/dist/collection/components/pds-row/pds-row.css +10 -9
- package/dist/collection/components/pds-row/pds-row.js +132 -30
- package/dist/collection/components/pds-row/stories/pds-row.stories.js +27 -24
- package/dist/collection/components/pds-select/pds-select.css +168 -0
- package/dist/collection/components/pds-select/pds-select.js +728 -0
- package/dist/collection/components/pds-select/pds-select.tokens.css +3 -0
- package/dist/collection/components/pds-select/stories/pds-select.stories.js +205 -0
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.css +64 -26
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +87 -10
- package/dist/collection/components/pds-sortable/pds-sortable-item/stories/pds-sortable-item.stories.js +0 -2
- package/dist/collection/components/pds-sortable/pds-sortable.css +2 -4
- package/dist/collection/components/pds-sortable/pds-sortable.js +571 -17
- package/dist/collection/components/pds-sortable/sortable-interface.js +0 -1
- package/dist/collection/components/pds-sortable/sortable-label.js +33 -0
- package/dist/collection/components/pds-sortable/stories/pds-sortable.stories.js +49 -13
- package/dist/collection/components/pds-switch/pds-switch.css +60 -59
- package/dist/collection/components/pds-switch/pds-switch.js +268 -63
- package/dist/collection/components/pds-switch/stories/pds-switch.stories.js +90 -28
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +4 -2
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.css +36 -19
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +193 -15
- package/dist/collection/components/pds-table/pds-table-cell/stories/pds-table-cell.stories.js +22 -7
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.css +22 -5
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +75 -11
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.css +57 -25
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +328 -24
- package/dist/collection/components/pds-table/pds-table-head-cell/stories/pds-table-head-cell.stories.js +12 -7
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.css +14 -5
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +118 -13
- package/dist/collection/components/pds-table/pds-table-row/stories/pds-table-row.stories.js +3 -9
- package/dist/collection/components/pds-table/pds-table.css +106 -17
- package/dist/collection/components/pds-table/pds-table.js +576 -44
- package/dist/collection/components/pds-table/stories/pds-table.stories.js +428 -33
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.css +102 -60
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +240 -18
- package/dist/collection/components/pds-tabs/pds-tab/stories/pds-tab.stories.js +15 -0
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.css +15 -2
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +68 -12
- package/dist/collection/components/pds-tabs/pds-tabpanel/stories/pds-tabpanel.stories.js +15 -0
- package/dist/collection/components/pds-tabs/pds-tabs.css +31 -11
- package/dist/collection/components/pds-tabs/pds-tabs.js +301 -30
- package/dist/collection/components/pds-tabs/stories/pds-tabs.stories.js +70 -27
- package/dist/collection/components/pds-text/pds-text.css +207 -0
- package/dist/collection/components/pds-text/pds-text.js +328 -0
- package/dist/collection/components/pds-text/stories/pds-text.stories.js +141 -0
- package/dist/collection/components/pds-textarea/pds-textarea.css +127 -57
- package/dist/collection/components/pds-textarea/pds-textarea.js +598 -57
- package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +101 -25
- package/dist/collection/components/pds-textarea/textarea-interface.js +0 -1
- package/dist/collection/components/pds-toast/pds-toast.css +167 -0
- package/dist/collection/components/pds-toast/pds-toast.js +362 -0
- package/dist/collection/components/pds-toast/stories/pds-toast.stories.js +98 -0
- package/dist/collection/components/pds-tooltip/pds-tooltip.css +73 -79
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +451 -80
- package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +52 -24
- package/dist/collection/global/pine-global.js +6 -0
- package/dist/collection/global/pine-ui-global.js +0 -1
- package/dist/collection/global/styles/utils/label.css +17 -0
- package/dist/collection/i18n/i18n-format.js +59 -0
- package/dist/collection/i18n/index.js +1 -0
- package/dist/collection/index.js +3 -1
- package/dist/collection/utils/aria-references.js +48 -0
- package/dist/collection/utils/attributes.js +180 -0
- package/dist/collection/utils/closest.js +8 -1
- package/dist/collection/utils/css.js +41 -0
- package/dist/collection/utils/form.js +41 -8
- package/dist/collection/utils/interfaces.js +1 -0
- package/dist/collection/utils/keep-hydrated.js +188 -0
- package/dist/collection/utils/overlay.js +66 -50
- package/dist/collection/utils/portal-target.js +64 -0
- package/dist/collection/utils/reconnected-content.js +25 -0
- package/dist/collection/utils/reflected-attribute-default.js +40 -0
- package/dist/collection/utils/scroll.js +77 -0
- package/dist/collection/utils/tabbable.js +82 -0
- package/dist/collection/utils/test/axe.js +106 -0
- package/dist/collection/utils/test/host-strip.js +50 -0
- package/dist/collection/utils/test/reconnect-safety.js +31 -0
- package/dist/collection/utils/test/reduced-motion.js +78 -0
- package/dist/collection/utils/truncation-tooltip.js +422 -0
- package/dist/collection/utils/types.js +18 -2
- package/dist/collection/utils/utils.js +109 -4
- package/dist/docs.d.ts +45 -0
- package/dist/docs.json +25718 -2809
- package/dist/esm/aria-references-CNn1lObg.js +50 -0
- package/dist/esm/attributes-CD8knu3a.js +183 -0
- package/dist/esm/closest-DHPzKMVS.js +17 -0
- package/dist/esm/floating-ui.dom-Cuc0DYlm.js +1706 -0
- package/dist/esm/form-BuRbS7Hp.js +63 -0
- package/dist/esm/i18n-format-BJgZHCWe.js +61 -0
- package/dist/esm/index-4_RRPJTO.js +2938 -0
- package/dist/esm/index-B0DXTeeV.js +21 -0
- package/dist/esm/index.js +21 -2
- package/dist/esm/keep-hydrated-BgNaWLoS.js +190 -0
- package/dist/esm/loader.js +4 -6
- package/dist/esm/mock-pds-modal.entry.js +90 -0
- package/dist/esm/pds-accordion.entry.js +16 -12
- package/dist/esm/pds-alert.entry.js +86 -0
- package/dist/esm/pds-avatar.entry.js +123 -26
- package/dist/esm/pds-box.entry.js +143 -56
- package/dist/esm/pds-button.entry.js +233 -22
- package/dist/esm/pds-checkbox.entry.js +103 -25
- package/dist/esm/pds-chip.entry.js +227 -22
- package/dist/esm/pds-combobox.entry.js +4498 -0
- package/dist/esm/pds-container.entry.js +35 -0
- package/dist/esm/pds-copytext.entry.js +98 -15
- package/dist/esm/pds-datepicker.entry.js +2137 -0
- package/dist/esm/pds-divider.entry.js +16 -9
- package/dist/esm/pds-drawer-content.entry.js +22 -0
- package/dist/esm/pds-drawer-footer.entry.js +22 -0
- package/dist/esm/pds-drawer-header.entry.js +22 -0
- package/dist/esm/pds-drawer.entry.js +154 -0
- package/dist/esm/pds-dropdown-menu-item.entry.js +149 -0
- package/dist/esm/pds-dropdown-menu-separator.entry.js +21 -0
- package/dist/esm/pds-dropdown-menu.entry.js +451 -0
- package/dist/esm/pds-filter.entry.js +510 -0
- package/dist/esm/pds-filters.entry.js +16 -0
- package/dist/esm/pds-icon.entry.js +334 -42
- package/dist/esm/pds-image.entry.js +158 -14
- package/dist/esm/pds-input.entry.js +301 -25
- package/dist/esm/pds-link.entry.js +50 -11
- package/dist/esm/pds-loader.entry.js +49 -12
- package/dist/esm/pds-modal-content.entry.js +197 -0
- package/dist/esm/pds-modal-footer.entry.js +22 -0
- package/dist/esm/pds-modal-header.entry.js +22 -0
- package/dist/esm/pds-modal.entry.js +590 -0
- package/dist/esm/pds-multiselect.entry.js +1382 -0
- package/dist/esm/pds-popover.entry.js +1101 -0
- package/dist/esm/pds-progress.entry.js +30 -10
- package/dist/esm/pds-property.entry.js +20 -0
- package/dist/esm/pds-radio-group.entry.js +258 -0
- package/dist/esm/pds-radio.entry.js +102 -22
- package/dist/esm/pds-row.entry.js +50 -19
- package/dist/esm/pds-select.entry.js +378 -0
- package/dist/esm/pds-sortable-item.entry.js +59 -9
- package/dist/esm/pds-sortable.entry.js +504 -117
- package/dist/esm/pds-switch.entry.js +186 -26
- package/dist/esm/pds-tab.entry.js +78 -14
- package/dist/esm/pds-table-body.entry.js +5 -7
- package/dist/esm/pds-table-cell.entry.js +150 -17
- package/dist/esm/pds-table-head-cell.entry.js +222 -28
- package/dist/esm/pds-table-head.entry.js +17 -11
- package/dist/esm/pds-table-row.entry.js +104 -14
- package/dist/esm/pds-table.entry.js +434 -20
- package/dist/esm/pds-tabpanel.entry.js +32 -11
- package/dist/esm/pds-tabs.entry.js +206 -16
- package/dist/esm/pds-text.entry.js +139 -0
- package/dist/esm/pds-textarea.entry.js +319 -28
- package/dist/esm/pds-toast.entry.js +154 -0
- package/dist/esm/pds-tooltip.entry.js +401 -108
- package/dist/esm/pine-core.js +6 -7
- package/dist/esm/portal-target-CKRzRKdO.js +66 -0
- package/dist/esm/reconnected-content-RFpTWV6r.js +27 -0
- package/dist/esm/reflected-attribute-default-t3idJwV0.js +42 -0
- package/dist/esm/scroll-DtgUQhjl.js +75 -0
- package/dist/esm/sortable-label-PItnzVVR.js +35 -0
- package/dist/esm/tabbable-C6ZWpp3v.js +84 -0
- package/dist/esm/truncation-tooltip-CkIWm6Z-.js +425 -0
- package/dist/esm/utils-OYK5-nwe.js +114 -0
- package/dist/esm-es5/aria-references-CNn1lObg.js +1 -0
- package/dist/esm-es5/attributes-CD8knu3a.js +1 -0
- package/dist/esm-es5/closest-DHPzKMVS.js +1 -0
- package/dist/esm-es5/floating-ui.dom-Cuc0DYlm.js +1 -0
- package/dist/esm-es5/form-BuRbS7Hp.js +1 -0
- package/dist/esm-es5/i18n-format-BJgZHCWe.js +1 -0
- package/dist/esm-es5/index-4_RRPJTO.js +2 -0
- package/dist/esm-es5/index-B0DXTeeV.js +1 -0
- package/dist/esm-es5/index.js +1 -2
- package/dist/esm-es5/keep-hydrated-BgNaWLoS.js +1 -0
- package/dist/esm-es5/loader.js +1 -2
- package/dist/esm-es5/mock-pds-modal.entry.js +1 -0
- package/dist/esm-es5/pds-accordion.entry.js +1 -2
- package/dist/esm-es5/pds-alert.entry.js +1 -0
- package/dist/esm-es5/pds-avatar.entry.js +1 -2
- package/dist/esm-es5/pds-box.entry.js +1 -2
- package/dist/esm-es5/pds-button.entry.js +1 -2
- package/dist/esm-es5/pds-checkbox.entry.js +1 -2
- package/dist/esm-es5/pds-chip.entry.js +1 -2
- package/dist/esm-es5/pds-combobox.entry.js +2 -0
- package/dist/esm-es5/pds-container.entry.js +1 -0
- package/dist/esm-es5/pds-copytext.entry.js +1 -2
- package/dist/esm-es5/pds-datepicker.entry.js +1 -0
- package/dist/esm-es5/pds-divider.entry.js +1 -2
- package/dist/esm-es5/pds-drawer-content.entry.js +1 -0
- package/dist/esm-es5/pds-drawer-footer.entry.js +1 -0
- package/dist/esm-es5/pds-drawer-header.entry.js +1 -0
- package/dist/esm-es5/pds-drawer.entry.js +1 -0
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -0
- package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -0
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -0
- package/dist/esm-es5/pds-filter.entry.js +1 -0
- package/dist/esm-es5/pds-filters.entry.js +1 -0
- package/dist/esm-es5/pds-icon.entry.js +1 -2
- package/dist/esm-es5/pds-image.entry.js +1 -2
- package/dist/esm-es5/pds-input.entry.js +1 -2
- package/dist/esm-es5/pds-link.entry.js +1 -2
- package/dist/esm-es5/pds-loader.entry.js +1 -2
- package/dist/esm-es5/pds-modal-content.entry.js +1 -0
- package/dist/esm-es5/pds-modal-footer.entry.js +1 -0
- package/dist/esm-es5/pds-modal-header.entry.js +1 -0
- package/dist/esm-es5/pds-modal.entry.js +1 -0
- package/dist/esm-es5/pds-multiselect.entry.js +1 -0
- package/dist/esm-es5/pds-popover.entry.js +1 -0
- package/dist/esm-es5/pds-progress.entry.js +1 -2
- package/dist/esm-es5/pds-property.entry.js +1 -0
- package/dist/esm-es5/pds-radio-group.entry.js +1 -0
- package/dist/esm-es5/pds-radio.entry.js +1 -2
- package/dist/esm-es5/pds-row.entry.js +1 -2
- package/dist/esm-es5/pds-select.entry.js +1 -0
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -2
- package/dist/esm-es5/pds-sortable.entry.js +3 -4
- package/dist/esm-es5/pds-switch.entry.js +1 -2
- package/dist/esm-es5/pds-tab.entry.js +1 -2
- package/dist/esm-es5/pds-table-body.entry.js +1 -2
- package/dist/esm-es5/pds-table-cell.entry.js +1 -2
- package/dist/esm-es5/pds-table-head-cell.entry.js +1 -2
- package/dist/esm-es5/pds-table-head.entry.js +1 -2
- package/dist/esm-es5/pds-table-row.entry.js +1 -2
- package/dist/esm-es5/pds-table.entry.js +1 -2
- package/dist/esm-es5/pds-tabpanel.entry.js +1 -2
- package/dist/esm-es5/pds-tabs.entry.js +1 -2
- package/dist/esm-es5/pds-text.entry.js +1 -0
- package/dist/esm-es5/pds-textarea.entry.js +1 -2
- package/dist/esm-es5/pds-toast.entry.js +1 -0
- package/dist/esm-es5/pds-tooltip.entry.js +1 -2
- package/dist/esm-es5/pine-core.js +1 -2
- package/dist/esm-es5/portal-target-CKRzRKdO.js +1 -0
- package/dist/esm-es5/reconnected-content-RFpTWV6r.js +1 -0
- package/dist/esm-es5/reflected-attribute-default-t3idJwV0.js +1 -0
- package/dist/esm-es5/scroll-DtgUQhjl.js +1 -0
- package/dist/esm-es5/sortable-label-PItnzVVR.js +1 -0
- package/dist/esm-es5/tabbable-C6ZWpp3v.js +1 -0
- package/dist/esm-es5/truncation-tooltip-CkIWm6Z-.js +1 -0
- package/dist/esm-es5/utils-OYK5-nwe.js +1 -0
- package/dist/pine-core/index.esm.js +1 -2
- package/dist/pine-core/p-053ff8eb.system.entry.js +1 -0
- package/dist/pine-core/p-08b9e3ad.entry.js +1 -0
- package/dist/pine-core/p-0ac4262e.system.entry.js +1 -0
- package/dist/pine-core/p-0e1b8bd1.system.entry.js +1 -0
- package/dist/pine-core/p-12fdc65f.entry.js +1 -0
- package/dist/pine-core/p-1765a41b.system.entry.js +1 -0
- package/dist/pine-core/p-18524c25.entry.js +1 -0
- package/dist/pine-core/p-191eb9e5.system.entry.js +1 -0
- package/dist/pine-core/p-1c584a20.entry.js +1 -0
- package/dist/pine-core/p-1d4ecc35.entry.js +7 -0
- package/dist/pine-core/p-1e0c9738.system.entry.js +1 -0
- package/dist/pine-core/p-1fb1ca3d.entry.js +1 -0
- package/dist/pine-core/p-2482e4ab.system.entry.js +1 -0
- package/dist/pine-core/p-2cc7c682.entry.js +1 -0
- package/dist/pine-core/p-2f15e85f.entry.js +1 -0
- package/dist/pine-core/p-3306dc5a.system.entry.js +1 -0
- package/dist/pine-core/p-3338fc2e.entry.js +1 -0
- package/dist/pine-core/p-33da254f.system.entry.js +1 -0
- package/dist/pine-core/p-34d22a45.system.entry.js +1 -0
- package/dist/pine-core/p-35b90796.entry.js +1 -0
- package/dist/pine-core/p-38148f5b.entry.js +1 -0
- package/dist/pine-core/p-39264dfb.system.entry.js +1 -0
- package/dist/pine-core/p-3aed0418.system.entry.js +1 -0
- package/dist/pine-core/p-3dd879fd.entry.js +1 -0
- package/dist/pine-core/p-3f1c05cd.system.entry.js +1 -0
- package/dist/pine-core/p-3fc9ef80.system.entry.js +1 -0
- package/dist/pine-core/p-4125a4a6.system.entry.js +1 -0
- package/dist/pine-core/p-42376f2c.entry.js +1 -0
- package/dist/pine-core/p-4263038f.entry.js +1 -0
- package/dist/pine-core/p-47df9e9f.system.entry.js +3 -0
- package/dist/pine-core/p-55a4659a.system.entry.js +1 -0
- package/dist/pine-core/p-563baadd.system.entry.js +1 -0
- package/dist/pine-core/p-57af5c29.system.entry.js +1 -0
- package/dist/pine-core/p-587bd9ed.entry.js +1 -0
- package/dist/pine-core/p-5c7dfa7a.entry.js +1 -0
- package/dist/pine-core/p-5db87fda.system.entry.js +1 -0
- package/dist/pine-core/p-5eb0c78c.system.entry.js +1 -0
- package/dist/pine-core/p-6017afb5.system.entry.js +1 -0
- package/dist/pine-core/p-63d47dd4.system.entry.js +1 -0
- package/dist/pine-core/p-66e61921.system.entry.js +1 -0
- package/dist/pine-core/p-67999353.entry.js +1 -0
- package/dist/pine-core/p-68328afc.entry.js +1 -0
- package/dist/pine-core/p-6a965119.entry.js +1 -0
- package/dist/pine-core/p-6fdc6df9.system.entry.js +1 -0
- package/dist/pine-core/p-72668673.system.entry.js +1 -0
- package/dist/pine-core/p-765f4207.entry.js +1 -0
- package/dist/pine-core/p-77530cf2.entry.js +1 -0
- package/dist/pine-core/p-77a22399.entry.js +1 -0
- package/dist/pine-core/p-783127bf.entry.js +1 -0
- package/dist/pine-core/p-7a51f15e.entry.js +1 -0
- package/dist/pine-core/p-7b978fff.system.entry.js +1 -0
- package/dist/pine-core/p-82f7eed1.entry.js +1 -0
- package/dist/pine-core/p-863ff553.system.entry.js +1 -0
- package/dist/pine-core/p-87a32ded.system.entry.js +1 -0
- package/dist/pine-core/p-87cadd6f.system.entry.js +8 -0
- package/dist/pine-core/p-8db554fe.entry.js +1 -0
- package/dist/pine-core/p-8e7e7bba.entry.js +1 -0
- package/dist/pine-core/p-907c69e9.system.entry.js +1 -0
- package/dist/pine-core/p-90f83a5b.system.entry.js +1 -0
- package/dist/pine-core/p-931a0ccd.system.entry.js +1 -0
- package/dist/pine-core/p-94fd9595.entry.js +1 -0
- package/dist/pine-core/p-96bccf85.system.entry.js +1 -0
- package/dist/pine-core/p-9a63bf72.entry.js +1 -0
- package/dist/pine-core/p-9d983e09.system.entry.js +1 -0
- package/dist/pine-core/p-9da10cfb.system.entry.js +1 -0
- package/dist/pine-core/p-9e005996.entry.js +1 -0
- package/dist/pine-core/p-B0DXTeeV.js +1 -0
- package/dist/pine-core/p-BJgZHCWe.js +1 -0
- package/dist/pine-core/p-BK1sLRfg.system.js +2 -0
- package/dist/pine-core/p-BNTlHhoO.system.js +1 -0
- package/dist/pine-core/p-BSRFZB4I.system.js +1 -0
- package/dist/pine-core/p-BZ1l3LGl.system.js +1 -0
- package/dist/pine-core/p-BZsj6eAn.system.js +1 -0
- package/dist/pine-core/p-BbXp4qBM.system.js +1 -0
- package/dist/pine-core/p-BgNaWLoS.js +1 -0
- package/dist/pine-core/p-Bkho_oFB.system.js +1 -0
- package/dist/pine-core/p-BlJQebvG.system.js +1 -0
- package/dist/pine-core/p-BuRbS7Hp.js +1 -0
- package/dist/pine-core/p-BxIzb-Wc.system.js +1 -0
- package/dist/pine-core/p-C35-349-.system.js +1 -0
- package/dist/pine-core/p-C6ZWpp3v.js +1 -0
- package/dist/pine-core/p-CANeE7Ss.system.js +1 -0
- package/dist/pine-core/p-CIe1DGXa.system.js +1 -0
- package/dist/pine-core/p-CKRzRKdO.js +1 -0
- package/dist/pine-core/p-CNn1lObg.js +1 -0
- package/dist/pine-core/p-CQJ44c6o.system.js +1 -0
- package/dist/pine-core/p-Cuc0DYlm.js +1 -0
- package/dist/pine-core/p-DHPzKMVS.js +1 -0
- package/dist/pine-core/p-DVra397g.system.js +1 -0
- package/dist/pine-core/p-DtgUQhjl.js +1 -0
- package/dist/pine-core/p-Dv9QBmIF.js +1 -0
- package/dist/pine-core/p-Dx8tEj0U.system.js +1 -0
- package/dist/pine-core/p-M31tvpDN.js +2 -0
- package/dist/pine-core/p-OYK5-nwe.js +1 -0
- package/dist/pine-core/p-PItnzVVR.js +1 -0
- package/dist/pine-core/p-RFpTWV6r.js +1 -0
- package/dist/pine-core/p-VPGVqK3P.system.js +1 -0
- package/dist/pine-core/p-XK45dzWR.system.js +1 -0
- package/dist/pine-core/p-a0fa77b1.system.entry.js +1 -0
- package/dist/pine-core/p-a149af29.entry.js +1 -0
- package/dist/pine-core/p-a1575919.entry.js +1 -0
- package/dist/pine-core/p-a20d9eca.system.entry.js +1 -0
- package/dist/pine-core/p-a5782d99.entry.js +1 -0
- package/dist/pine-core/p-a9eaf160.system.entry.js +1 -0
- package/dist/pine-core/p-aae96744.entry.js +1 -0
- package/dist/pine-core/p-b379d9bc.system.entry.js +1 -0
- package/dist/pine-core/p-b96bdff6.entry.js +1 -0
- package/dist/pine-core/p-badde164.entry.js +1 -0
- package/dist/pine-core/p-bbd9ab75.entry.js +1 -0
- package/dist/pine-core/p-biShcgLI.js +1 -0
- package/dist/pine-core/p-c12b5cd7.system.entry.js +1 -0
- package/dist/pine-core/p-c2afe4f3.system.entry.js +1 -0
- package/dist/pine-core/p-c65f4eaa.system.entry.js +1 -0
- package/dist/pine-core/p-c6c5ada6.system.entry.js +1 -0
- package/dist/pine-core/p-c76d8b9e.system.entry.js +1 -0
- package/dist/pine-core/p-c89ea2d3.entry.js +1 -0
- package/dist/pine-core/p-ce9fa14b.entry.js +1 -0
- package/dist/pine-core/p-d4b0122f.system.entry.js +1 -0
- package/dist/pine-core/p-d61a0fe8.system.entry.js +1 -0
- package/dist/pine-core/p-d7d7a4e1.entry.js +1 -0
- package/dist/pine-core/p-d85d50cb.entry.js +1 -0
- package/dist/pine-core/p-daa802f1.entry.js +2 -0
- package/dist/pine-core/p-de3f4a28.system.entry.js +1 -0
- package/dist/pine-core/p-e00777da.system.entry.js +1 -0
- package/dist/pine-core/p-e2a1a49a.system.entry.js +1 -0
- package/dist/pine-core/p-e334af06.entry.js +1 -0
- package/dist/pine-core/p-e4216ff6.entry.js +1 -0
- package/dist/pine-core/p-e68044b3.entry.js +1 -0
- package/dist/pine-core/p-e75d8bc1.entry.js +1 -0
- package/dist/pine-core/p-e871cfce.entry.js +1 -0
- package/dist/pine-core/p-e92d0f0f.system.entry.js +1 -0
- package/dist/pine-core/p-eab165b9.system.entry.js +1 -0
- package/dist/pine-core/p-eabc4bd8.entry.js +1 -0
- package/dist/pine-core/p-eeYeEogd.system.js +1 -0
- package/dist/pine-core/p-eee042d3.entry.js +1 -0
- package/dist/pine-core/p-ef9f84f2.system.entry.js +1 -0
- package/dist/pine-core/p-f026af73.entry.js +1 -0
- package/dist/pine-core/p-f0509c8e.entry.js +1 -0
- package/dist/pine-core/p-f1252e72.system.entry.js +1 -0
- package/dist/pine-core/p-f3496fd1.entry.js +1 -0
- package/dist/pine-core/p-f65127f1.entry.js +1 -0
- package/dist/pine-core/p-f90f4be7.system.entry.js +1 -0
- package/dist/pine-core/p-f99bd77f.entry.js +1 -0
- package/dist/pine-core/p-fda791df.entry.js +1 -0
- package/dist/pine-core/p-t3idJwV0.js +1 -0
- package/dist/pine-core/p-wB2y8gR7.system.js +1 -0
- package/dist/pine-core/pine-core.css +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -2
- package/dist/pine-core/pine-core.js +1 -1
- package/dist/scripts/vscode-custom-data-generator.js +406 -0
- package/dist/scripts/vscode-settings-patcher.cjs +89 -0
- package/dist/types/components/pds-accordion/pds-accordion.d.ts +9 -1
- package/dist/types/components/pds-alert/pds-alert.d.ts +62 -0
- package/dist/types/components/pds-avatar/pds-avatar.d.ts +53 -3
- package/dist/types/components/pds-box/pds-box.d.ts +495 -16
- package/dist/types/components/pds-button/pds-button.d.ts +91 -13
- package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +43 -9
- package/dist/types/components/pds-chip/pds-chip.d.ts +77 -14
- package/dist/types/components/pds-combobox/combobox-interface.d.ts +73 -0
- package/dist/types/components/pds-combobox/grouped-options-panel.d.ts +128 -0
- package/dist/types/components/pds-combobox/pds-combobox.d.ts +714 -0
- package/dist/types/components/pds-container/pds-container.d.ts +22 -0
- package/dist/types/components/pds-copytext/pds-copytext.d.ts +20 -5
- package/dist/types/components/pds-datepicker/calendar-portal.d.ts +36 -0
- package/dist/types/components/pds-datepicker/date-utils.d.ts +67 -0
- package/dist/types/components/pds-datepicker/datepicker-interface.d.ts +47 -0
- package/dist/types/components/pds-datepicker/pds-datepicker.d.ts +515 -0
- package/dist/types/components/pds-datepicker/presets.d.ts +24 -0
- package/dist/types/components/pds-datepicker/value.d.ts +59 -0
- package/dist/types/components/pds-divider/pds-divider.d.ts +10 -2
- package/dist/types/components/pds-drawer/pds-drawer-content/pds-drawer-content.d.ts +9 -0
- package/dist/types/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.d.ts +9 -0
- package/dist/types/components/pds-drawer/pds-drawer-header/pds-drawer-header.d.ts +9 -0
- package/dist/types/components/pds-drawer/pds-drawer.d.ts +89 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +87 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.d.ts +13 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +60 -0
- package/dist/types/components/pds-filters/pds-filter/filter-interface.d.ts +19 -0
- package/dist/types/components/pds-filters/pds-filter/pds-filter.d.ts +135 -0
- package/dist/types/components/pds-filters/pds-filters.d.ts +11 -0
- package/dist/types/components/pds-image/image-interface.d.ts +12 -0
- package/dist/types/components/pds-image/pds-image.d.ts +75 -11
- package/dist/types/components/pds-input/input-interface.d.ts +12 -0
- package/dist/types/components/pds-input/pds-input.d.ts +174 -9
- package/dist/types/components/pds-link/pds-link.d.ts +81 -11
- package/dist/types/components/pds-loader/pds-loader.d.ts +10 -3
- package/dist/types/components/pds-modal/pds-modal-content/pds-modal-content.d.ts +43 -0
- package/dist/types/components/pds-modal/pds-modal-footer/pds-modal-footer.d.ts +9 -0
- package/dist/types/components/pds-modal/pds-modal-header/pds-modal-header.d.ts +9 -0
- package/dist/types/components/pds-modal/pds-modal.d.ts +152 -0
- package/dist/types/components/pds-modal/test/mock-pds-modal.d.ts +68 -0
- package/dist/types/components/pds-multiselect/multiselect-interface.d.ts +61 -0
- package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +402 -0
- package/dist/types/components/pds-popover/pds-popover.d.ts +292 -0
- package/dist/types/components/pds-popover/popover-interface.d.ts +4 -0
- package/dist/types/components/pds-progress/pds-progress.d.ts +6 -2
- package/dist/types/components/pds-property/pds-property.d.ts +14 -0
- package/dist/types/components/pds-radio/pds-radio.d.ts +42 -11
- package/dist/types/components/pds-radio-group/pds-radio-group.d.ts +84 -0
- package/dist/types/components/pds-radio-group/radio-group-interface.d.ts +5 -0
- package/dist/types/components/pds-row/pds-row.d.ts +17 -2
- package/dist/types/components/pds-select/pds-select.d.ts +182 -0
- package/dist/types/components/pds-sortable/pds-sortable-item/pds-sortable-item.d.ts +14 -3
- package/dist/types/components/pds-sortable/pds-sortable.d.ts +99 -4
- package/dist/types/components/pds-sortable/sortable-interface.d.ts +3 -1
- package/dist/types/components/pds-sortable/sortable-label.d.ts +7 -0
- package/dist/types/components/pds-switch/pds-switch.d.ts +51 -17
- package/dist/types/components/pds-table/pds-table-body/pds-table-body.d.ts +3 -0
- package/dist/types/components/pds-table/pds-table-cell/pds-table-cell.d.ts +40 -1
- package/dist/types/components/pds-table/pds-table-head/pds-table-head.d.ts +19 -2
- package/dist/types/components/pds-table/pds-table-head-cell/pds-table-head-cell.d.ts +73 -2
- package/dist/types/components/pds-table/pds-table-row/pds-table-row.d.ts +27 -4
- package/dist/types/components/pds-table/pds-table.d.ts +138 -12
- package/dist/types/components/pds-tabs/pds-tab/pds-tab.d.ts +55 -0
- package/dist/types/components/pds-tabs/pds-tabpanel/pds-tabpanel.d.ts +12 -0
- package/dist/types/components/pds-tabs/pds-tabs.d.ts +45 -5
- package/dist/types/components/pds-text/pds-text.d.ts +61 -0
- package/dist/types/components/pds-textarea/pds-textarea.d.ts +140 -15
- package/dist/types/components/pds-textarea/textarea-interface.d.ts +5 -1
- package/dist/types/components/pds-toast/pds-toast.d.ts +83 -0
- package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +80 -20
- package/dist/types/components.d.ts +7070 -1247
- package/dist/types/global/pine-global.d.ts +2 -0
- package/dist/types/home/runner/work/pine/pine/libs/core/.stencil/scripts/vscode-custom-data-generator.d.ts +6 -0
- package/dist/types/i18n/i18n-format.d.ts +38 -0
- package/dist/types/i18n/index.d.ts +2 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/stencil-public-runtime.d.ts +195 -8
- package/dist/types/utils/aria-references.d.ts +28 -0
- package/dist/types/utils/attributes.d.ts +44 -0
- package/dist/types/utils/closest.d.ts +2 -0
- package/dist/types/utils/css.d.ts +7 -0
- package/dist/types/utils/form.d.ts +23 -1
- package/dist/types/utils/interfaces.d.ts +6 -0
- package/dist/types/utils/keep-hydrated.d.ts +56 -0
- package/dist/types/utils/overlay.d.ts +3 -3
- package/dist/types/utils/portal-target.d.ts +17 -0
- package/dist/types/utils/reconnected-content.d.ts +14 -0
- package/dist/types/utils/reflected-attribute-default.d.ts +31 -0
- package/dist/types/utils/scroll.d.ts +21 -0
- package/dist/types/utils/tabbable.d.ts +2 -0
- package/dist/types/utils/test/axe.d.ts +81 -0
- package/dist/types/utils/test/host-strip.d.ts +10 -0
- package/dist/types/utils/test/reconnect-safety.d.ts +11 -0
- package/dist/types/utils/test/reduced-motion.d.ts +30 -0
- package/dist/types/utils/truncation-tooltip.d.ts +88 -0
- package/dist/types/utils/types.d.ts +13 -2
- package/dist/types/utils/utils.d.ts +37 -2
- package/dist/vscode.html-data.json +11913 -0
- package/hydrate/index.d.ts +58 -7
- package/hydrate/index.js +29932 -3726
- package/hydrate/index.mjs +29929 -3725
- package/package.json +52 -26
- package/readme.md +26 -55
- package/components/closest.js.map +0 -1
- package/components/index.js.map +0 -1
- package/components/index2.js.map +0 -1
- package/components/pds-accordion.js.map +0 -1
- package/components/pds-avatar.js.map +0 -1
- package/components/pds-box.js.map +0 -1
- package/components/pds-button.js.map +0 -1
- package/components/pds-button2.js.map +0 -1
- package/components/pds-checkbox.js.map +0 -1
- package/components/pds-checkbox2.js.map +0 -1
- package/components/pds-chip.js.map +0 -1
- package/components/pds-copytext.js.map +0 -1
- package/components/pds-divider.js.map +0 -1
- package/components/pds-icon.js.map +0 -1
- package/components/pds-icon2.js.map +0 -1
- package/components/pds-image.js.map +0 -1
- package/components/pds-input.js.map +0 -1
- package/components/pds-label.js +0 -39
- package/components/pds-label.js.map +0 -1
- package/components/pds-link.js.map +0 -1
- package/components/pds-loader.js.map +0 -1
- package/components/pds-progress.js.map +0 -1
- package/components/pds-radio.js.map +0 -1
- package/components/pds-row.js.map +0 -1
- package/components/pds-sortable-item.js.map +0 -1
- package/components/pds-sortable.js.map +0 -1
- package/components/pds-switch.js.map +0 -1
- package/components/pds-tab.js.map +0 -1
- package/components/pds-table-body.js.map +0 -1
- package/components/pds-table-cell.js.map +0 -1
- package/components/pds-table-cell2.js.map +0 -1
- package/components/pds-table-head-cell.js.map +0 -1
- package/components/pds-table-head-cell2.js.map +0 -1
- package/components/pds-table-head.js.map +0 -1
- package/components/pds-table-row.js.map +0 -1
- package/components/pds-table.js.map +0 -1
- package/components/pds-tabpanel.js.map +0 -1
- package/components/pds-tabs.js.map +0 -1
- package/components/pds-textarea.js.map +0 -1
- package/components/pds-tooltip.js.map +0 -1
- package/dist/cjs/app-globals-3a1e7e63.js +0 -7
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/closest-b45138d3.js +0 -13
- package/dist/cjs/closest-b45138d3.js.map +0 -1
- package/dist/cjs/index-46fb0736.js +0 -1956
- package/dist/cjs/index-46fb0736.js.map +0 -1
- package/dist/cjs/index-de3f0730.js +0 -24
- package/dist/cjs/index-de3f0730.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/pds-accordion.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-avatar.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-box.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-button.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-checkbox.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-chip.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-copytext.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-divider.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-icon.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-image.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-input.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-label-7aabdc4e.js +0 -44
- package/dist/cjs/pds-label-7aabdc4e.js.map +0 -1
- package/dist/cjs/pds-link.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-loader.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-progress.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-radio.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-row.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-sortable-item.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-sortable.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-switch.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-tab.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-table-body.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-table-cell.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-table-head-cell.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-table-head.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-table-row.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-table.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-tabpanel.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-tabs.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-textarea.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-tooltip.cjs.entry.js.map +0 -1
- package/dist/cjs/pine-core.cjs.js.map +0 -1
- package/dist/collection/components/_internal/pds-label/pds-label.js.map +0 -1
- package/dist/collection/components/pds-accordion/pds-accordion.js.map +0 -1
- package/dist/collection/components/pds-avatar/pds-avatar.js.map +0 -1
- package/dist/collection/components/pds-box/pds-box.js.map +0 -1
- package/dist/collection/components/pds-button/pds-button.js.map +0 -1
- package/dist/collection/components/pds-checkbox/checkbox-interface.js.map +0 -1
- package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +0 -1
- package/dist/collection/components/pds-chip/pds-chip.js.map +0 -1
- package/dist/collection/components/pds-copytext/pds-copytext.js.map +0 -1
- package/dist/collection/components/pds-divider/pds-divider.js.map +0 -1
- package/dist/collection/components/pds-image/pds-image.js.map +0 -1
- package/dist/collection/components/pds-input/pds-input.js.map +0 -1
- package/dist/collection/components/pds-link/pds-link.js.map +0 -1
- package/dist/collection/components/pds-loader/pds-loader.js.map +0 -1
- package/dist/collection/components/pds-progress/pds-progress.js.map +0 -1
- package/dist/collection/components/pds-radio/pds-radio.js.map +0 -1
- package/dist/collection/components/pds-row/pds-row.js.map +0 -1
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js.map +0 -1
- package/dist/collection/components/pds-sortable/pds-sortable.js.map +0 -1
- package/dist/collection/components/pds-sortable/sortable-interface.js.map +0 -1
- package/dist/collection/components/pds-switch/pds-switch.js.map +0 -1
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js.map +0 -1
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js.map +0 -1
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js.map +0 -1
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js.map +0 -1
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js.map +0 -1
- package/dist/collection/components/pds-table/pds-table.js.map +0 -1
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js.map +0 -1
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js.map +0 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js.map +0 -1
- package/dist/collection/components/pds-textarea/pds-textarea.js.map +0 -1
- package/dist/collection/components/pds-textarea/textarea-interface.js.map +0 -1
- package/dist/collection/components/pds-tooltip/pds-tooltip.js.map +0 -1
- package/dist/collection/global/pine-ui-global.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/stories/_helpers/index.js +0 -15
- package/dist/collection/stories/_helpers/index.js.map +0 -1
- package/dist/collection/utils/closest.js.map +0 -1
- package/dist/collection/utils/form.js.map +0 -1
- package/dist/collection/utils/overlay.js.map +0 -1
- package/dist/collection/utils/types.js.map +0 -1
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/esm/app-globals-0f993ce5.js +0 -5
- package/dist/esm/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm/closest-d2d192be.js +0 -11
- package/dist/esm/closest-d2d192be.js.map +0 -1
- package/dist/esm/index-2a33b470.js +0 -1927
- package/dist/esm/index-2a33b470.js.map +0 -1
- package/dist/esm/index-a1e2f9af.js +0 -14
- package/dist/esm/index-a1e2f9af.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/pds-accordion.entry.js.map +0 -1
- package/dist/esm/pds-avatar.entry.js.map +0 -1
- package/dist/esm/pds-box.entry.js.map +0 -1
- package/dist/esm/pds-button.entry.js.map +0 -1
- package/dist/esm/pds-checkbox.entry.js.map +0 -1
- package/dist/esm/pds-chip.entry.js.map +0 -1
- package/dist/esm/pds-copytext.entry.js.map +0 -1
- package/dist/esm/pds-divider.entry.js.map +0 -1
- package/dist/esm/pds-icon.entry.js.map +0 -1
- package/dist/esm/pds-image.entry.js.map +0 -1
- package/dist/esm/pds-input.entry.js.map +0 -1
- package/dist/esm/pds-label-31a5848b.js +0 -39
- package/dist/esm/pds-label-31a5848b.js.map +0 -1
- package/dist/esm/pds-link.entry.js.map +0 -1
- package/dist/esm/pds-loader.entry.js.map +0 -1
- package/dist/esm/pds-progress.entry.js.map +0 -1
- package/dist/esm/pds-radio.entry.js.map +0 -1
- package/dist/esm/pds-row.entry.js.map +0 -1
- package/dist/esm/pds-sortable-item.entry.js.map +0 -1
- package/dist/esm/pds-sortable.entry.js.map +0 -1
- package/dist/esm/pds-switch.entry.js.map +0 -1
- package/dist/esm/pds-tab.entry.js.map +0 -1
- package/dist/esm/pds-table-body.entry.js.map +0 -1
- package/dist/esm/pds-table-cell.entry.js.map +0 -1
- package/dist/esm/pds-table-head-cell.entry.js.map +0 -1
- package/dist/esm/pds-table-head.entry.js.map +0 -1
- package/dist/esm/pds-table-row.entry.js.map +0 -1
- package/dist/esm/pds-table.entry.js.map +0 -1
- package/dist/esm/pds-tabpanel.entry.js.map +0 -1
- package/dist/esm/pds-tabs.entry.js.map +0 -1
- package/dist/esm/pds-textarea.entry.js.map +0 -1
- package/dist/esm/pds-tooltip.entry.js.map +0 -1
- package/dist/esm/pine-core.js.map +0 -1
- package/dist/esm-es5/app-globals-0f993ce5.js +0 -2
- package/dist/esm-es5/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm-es5/closest-d2d192be.js +0 -2
- package/dist/esm-es5/closest-d2d192be.js.map +0 -1
- package/dist/esm-es5/index-2a33b470.js +0 -3
- package/dist/esm-es5/index-2a33b470.js.map +0 -1
- package/dist/esm-es5/index-a1e2f9af.js +0 -2
- package/dist/esm-es5/index-a1e2f9af.js.map +0 -1
- package/dist/esm-es5/index.js.map +0 -1
- package/dist/esm-es5/loader.js.map +0 -1
- package/dist/esm-es5/pds-accordion.entry.js.map +0 -1
- package/dist/esm-es5/pds-avatar.entry.js.map +0 -1
- package/dist/esm-es5/pds-box.entry.js.map +0 -1
- package/dist/esm-es5/pds-button.entry.js.map +0 -1
- package/dist/esm-es5/pds-checkbox.entry.js.map +0 -1
- package/dist/esm-es5/pds-chip.entry.js.map +0 -1
- package/dist/esm-es5/pds-copytext.entry.js.map +0 -1
- package/dist/esm-es5/pds-divider.entry.js.map +0 -1
- package/dist/esm-es5/pds-icon.entry.js.map +0 -1
- package/dist/esm-es5/pds-image.entry.js.map +0 -1
- package/dist/esm-es5/pds-input.entry.js.map +0 -1
- package/dist/esm-es5/pds-label-31a5848b.js +0 -2
- package/dist/esm-es5/pds-label-31a5848b.js.map +0 -1
- package/dist/esm-es5/pds-link.entry.js.map +0 -1
- package/dist/esm-es5/pds-loader.entry.js.map +0 -1
- package/dist/esm-es5/pds-progress.entry.js.map +0 -1
- package/dist/esm-es5/pds-radio.entry.js.map +0 -1
- package/dist/esm-es5/pds-row.entry.js.map +0 -1
- package/dist/esm-es5/pds-sortable-item.entry.js.map +0 -1
- package/dist/esm-es5/pds-sortable.entry.js.map +0 -1
- package/dist/esm-es5/pds-switch.entry.js.map +0 -1
- package/dist/esm-es5/pds-tab.entry.js.map +0 -1
- package/dist/esm-es5/pds-table-body.entry.js.map +0 -1
- package/dist/esm-es5/pds-table-cell.entry.js.map +0 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js.map +0 -1
- package/dist/esm-es5/pds-table-head.entry.js.map +0 -1
- package/dist/esm-es5/pds-table-row.entry.js.map +0 -1
- package/dist/esm-es5/pds-table.entry.js.map +0 -1
- package/dist/esm-es5/pds-tabpanel.entry.js.map +0 -1
- package/dist/esm-es5/pds-tabs.entry.js.map +0 -1
- package/dist/esm-es5/pds-textarea.entry.js.map +0 -1
- package/dist/esm-es5/pds-tooltip.entry.js.map +0 -1
- package/dist/esm-es5/pine-core.js.map +0 -1
- package/dist/pine-core/index.esm.js.map +0 -1
- package/dist/pine-core/p-06c33261.system.entry.js +0 -2
- package/dist/pine-core/p-06c33261.system.entry.js.map +0 -1
- package/dist/pine-core/p-07f80cb6.entry.js +0 -2
- package/dist/pine-core/p-07f80cb6.entry.js.map +0 -1
- package/dist/pine-core/p-09b1c7f1.system.entry.js +0 -2
- package/dist/pine-core/p-09b1c7f1.system.entry.js.map +0 -1
- package/dist/pine-core/p-0a4b1ce9.system.entry.js +0 -2
- package/dist/pine-core/p-0a4b1ce9.system.entry.js.map +0 -1
- package/dist/pine-core/p-0b541f88.js +0 -3
- package/dist/pine-core/p-0b541f88.js.map +0 -1
- package/dist/pine-core/p-0b77685e.js +0 -2
- package/dist/pine-core/p-0b77685e.js.map +0 -1
- package/dist/pine-core/p-0d6fafef.system.entry.js +0 -2
- package/dist/pine-core/p-0d6fafef.system.entry.js.map +0 -1
- package/dist/pine-core/p-0e1c0d03.entry.js +0 -8
- package/dist/pine-core/p-0e1c0d03.entry.js.map +0 -1
- package/dist/pine-core/p-0e936138.entry.js +0 -2
- package/dist/pine-core/p-0e936138.entry.js.map +0 -1
- package/dist/pine-core/p-143795e5.system.entry.js +0 -2
- package/dist/pine-core/p-143795e5.system.entry.js.map +0 -1
- package/dist/pine-core/p-1f2b0be3.system.entry.js +0 -2
- package/dist/pine-core/p-1f2b0be3.system.entry.js.map +0 -1
- package/dist/pine-core/p-224a435b.system.js +0 -2
- package/dist/pine-core/p-224a435b.system.js.map +0 -1
- package/dist/pine-core/p-31056348.system.entry.js +0 -2
- package/dist/pine-core/p-31056348.system.entry.js.map +0 -1
- package/dist/pine-core/p-32498622.system.entry.js +0 -2
- package/dist/pine-core/p-32498622.system.entry.js.map +0 -1
- package/dist/pine-core/p-3261fdf5.system.entry.js +0 -2
- package/dist/pine-core/p-3261fdf5.system.entry.js.map +0 -1
- package/dist/pine-core/p-32e41e3d.system.entry.js +0 -2
- package/dist/pine-core/p-32e41e3d.system.entry.js.map +0 -1
- package/dist/pine-core/p-34631565.system.js +0 -2
- package/dist/pine-core/p-34631565.system.js.map +0 -1
- package/dist/pine-core/p-3ba3d44c.entry.js +0 -2
- package/dist/pine-core/p-3ba3d44c.entry.js.map +0 -1
- package/dist/pine-core/p-46161cec.entry.js +0 -2
- package/dist/pine-core/p-46161cec.entry.js.map +0 -1
- package/dist/pine-core/p-4f69a7b7.entry.js +0 -2
- package/dist/pine-core/p-4f69a7b7.entry.js.map +0 -1
- package/dist/pine-core/p-50a23474.entry.js +0 -2
- package/dist/pine-core/p-50a23474.entry.js.map +0 -1
- package/dist/pine-core/p-511bf308.entry.js +0 -2
- package/dist/pine-core/p-511bf308.entry.js.map +0 -1
- package/dist/pine-core/p-52515d64.system.entry.js +0 -2
- package/dist/pine-core/p-52515d64.system.entry.js.map +0 -1
- package/dist/pine-core/p-56ba5cbf.system.js +0 -2
- package/dist/pine-core/p-56ba5cbf.system.js.map +0 -1
- package/dist/pine-core/p-5a384517.entry.js +0 -2
- package/dist/pine-core/p-5a384517.entry.js.map +0 -1
- package/dist/pine-core/p-5bee6677.system.entry.js +0 -2
- package/dist/pine-core/p-5bee6677.system.entry.js.map +0 -1
- package/dist/pine-core/p-5df76e04.system.js +0 -2
- package/dist/pine-core/p-5df76e04.system.js.map +0 -1
- package/dist/pine-core/p-62ec9a0f.system.entry.js +0 -2
- package/dist/pine-core/p-62ec9a0f.system.entry.js.map +0 -1
- package/dist/pine-core/p-6a7a864f.entry.js +0 -2
- package/dist/pine-core/p-6a7a864f.entry.js.map +0 -1
- package/dist/pine-core/p-6ae2f0f5.entry.js +0 -2
- package/dist/pine-core/p-6ae2f0f5.entry.js.map +0 -1
- package/dist/pine-core/p-6e146962.entry.js +0 -2
- package/dist/pine-core/p-6e146962.entry.js.map +0 -1
- package/dist/pine-core/p-6ff9ebfa.entry.js +0 -2
- package/dist/pine-core/p-6ff9ebfa.entry.js.map +0 -1
- package/dist/pine-core/p-701ba882.entry.js +0 -2
- package/dist/pine-core/p-701ba882.entry.js.map +0 -1
- package/dist/pine-core/p-73eb1722.entry.js +0 -2
- package/dist/pine-core/p-73eb1722.entry.js.map +0 -1
- package/dist/pine-core/p-78c6c37a.system.entry.js +0 -2
- package/dist/pine-core/p-78c6c37a.system.entry.js.map +0 -1
- package/dist/pine-core/p-79ca4ab9.system.entry.js +0 -2
- package/dist/pine-core/p-79ca4ab9.system.entry.js.map +0 -1
- package/dist/pine-core/p-7c33a02e.entry.js +0 -2
- package/dist/pine-core/p-7c33a02e.entry.js.map +0 -1
- package/dist/pine-core/p-7dac515e.system.entry.js +0 -2
- package/dist/pine-core/p-7dac515e.system.entry.js.map +0 -1
- package/dist/pine-core/p-7ea6838b.system.entry.js +0 -2
- package/dist/pine-core/p-7ea6838b.system.entry.js.map +0 -1
- package/dist/pine-core/p-7ebfdef4.system.entry.js +0 -2
- package/dist/pine-core/p-7ebfdef4.system.entry.js.map +0 -1
- package/dist/pine-core/p-829777e4.system.entry.js +0 -2
- package/dist/pine-core/p-829777e4.system.entry.js.map +0 -1
- package/dist/pine-core/p-8317c6c2.js +0 -2
- package/dist/pine-core/p-8317c6c2.js.map +0 -1
- package/dist/pine-core/p-8469b65a.entry.js +0 -2
- package/dist/pine-core/p-8469b65a.entry.js.map +0 -1
- package/dist/pine-core/p-8d8de5fd.entry.js +0 -2
- package/dist/pine-core/p-8d8de5fd.entry.js.map +0 -1
- package/dist/pine-core/p-8df8debd.entry.js +0 -2
- package/dist/pine-core/p-8df8debd.entry.js.map +0 -1
- package/dist/pine-core/p-8f73bf14.system.entry.js +0 -2
- package/dist/pine-core/p-8f73bf14.system.entry.js.map +0 -1
- package/dist/pine-core/p-8fbec4fe.system.js +0 -2
- package/dist/pine-core/p-8fbec4fe.system.js.map +0 -1
- package/dist/pine-core/p-909b305c.system.entry.js +0 -2
- package/dist/pine-core/p-909b305c.system.entry.js.map +0 -1
- package/dist/pine-core/p-936d96ec.system.entry.js +0 -9
- package/dist/pine-core/p-936d96ec.system.entry.js.map +0 -1
- package/dist/pine-core/p-9583e6d5.entry.js +0 -2
- package/dist/pine-core/p-9583e6d5.entry.js.map +0 -1
- package/dist/pine-core/p-96c750d1.entry.js +0 -2
- package/dist/pine-core/p-96c750d1.entry.js.map +0 -1
- package/dist/pine-core/p-a03e587c.entry.js +0 -2
- package/dist/pine-core/p-a03e587c.entry.js.map +0 -1
- package/dist/pine-core/p-a79a8159.entry.js +0 -2
- package/dist/pine-core/p-a79a8159.entry.js.map +0 -1
- package/dist/pine-core/p-a962fe8e.entry.js +0 -2
- package/dist/pine-core/p-a962fe8e.entry.js.map +0 -1
- package/dist/pine-core/p-ac228abf.entry.js +0 -2
- package/dist/pine-core/p-ac228abf.entry.js.map +0 -1
- package/dist/pine-core/p-ad4238c9.system.entry.js +0 -2
- package/dist/pine-core/p-ad4238c9.system.entry.js.map +0 -1
- package/dist/pine-core/p-af7df3c2.system.entry.js +0 -2
- package/dist/pine-core/p-af7df3c2.system.entry.js.map +0 -1
- package/dist/pine-core/p-b18b20f4.system.js +0 -2
- package/dist/pine-core/p-b18b20f4.system.js.map +0 -1
- package/dist/pine-core/p-b4518566.entry.js +0 -2
- package/dist/pine-core/p-b4518566.entry.js.map +0 -1
- package/dist/pine-core/p-b5c7e02a.entry.js +0 -2
- package/dist/pine-core/p-b5c7e02a.entry.js.map +0 -1
- package/dist/pine-core/p-bc20946b.system.entry.js +0 -2
- package/dist/pine-core/p-bc20946b.system.entry.js.map +0 -1
- package/dist/pine-core/p-c52d0465.system.entry.js +0 -2
- package/dist/pine-core/p-c52d0465.system.entry.js.map +0 -1
- package/dist/pine-core/p-c84cc2f8.system.entry.js +0 -2
- package/dist/pine-core/p-c84cc2f8.system.entry.js.map +0 -1
- package/dist/pine-core/p-ca239d59.system.entry.js +0 -2
- package/dist/pine-core/p-ca239d59.system.entry.js.map +0 -1
- package/dist/pine-core/p-cfacf2e0.system.entry.js +0 -2
- package/dist/pine-core/p-cfacf2e0.system.entry.js.map +0 -1
- package/dist/pine-core/p-e1255160.js +0 -2
- package/dist/pine-core/p-e1255160.js.map +0 -1
- package/dist/pine-core/p-e4b3115c.entry.js +0 -2
- package/dist/pine-core/p-e4b3115c.entry.js.map +0 -1
- package/dist/pine-core/p-e60fccc0.js +0 -2
- package/dist/pine-core/p-e60fccc0.js.map +0 -1
- package/dist/pine-core/p-eb56f262.system.entry.js +0 -2
- package/dist/pine-core/p-eb56f262.system.entry.js.map +0 -1
- package/dist/pine-core/p-ec484bf6.entry.js +0 -2
- package/dist/pine-core/p-ec484bf6.entry.js.map +0 -1
- package/dist/pine-core/p-f59d4a46.entry.js +0 -2
- package/dist/pine-core/p-f59d4a46.entry.js.map +0 -1
- package/dist/pine-core/p-f74c489d.system.js +0 -3
- package/dist/pine-core/p-f74c489d.system.js.map +0 -1
- package/dist/pine-core/pine-core.esm.js.map +0 -1
- package/dist/pine-core/svg/access-key.svg +0 -1
- package/dist/pine-core/svg/add-circle.svg +0 -1
- package/dist/pine-core/svg/add-image.svg +0 -1
- package/dist/pine-core/svg/add-small.svg +0 -1
- package/dist/pine-core/svg/add-square.svg +0 -1
- package/dist/pine-core/svg/add.svg +0 -1
- package/dist/pine-core/svg/advanced.svg +0 -1
- package/dist/pine-core/svg/ai-sparkle.svg +0 -1
- package/dist/pine-core/svg/ai-writer-filled.svg +0 -1
- package/dist/pine-core/svg/ai-writer.svg +0 -1
- package/dist/pine-core/svg/align-center.svg +0 -1
- package/dist/pine-core/svg/align-justify.svg +0 -1
- package/dist/pine-core/svg/align-left.svg +0 -1
- package/dist/pine-core/svg/align-right.svg +0 -1
- package/dist/pine-core/svg/app-store.svg +0 -1
- package/dist/pine-core/svg/archive.svg +0 -1
- package/dist/pine-core/svg/arrow-corner.svg +0 -1
- package/dist/pine-core/svg/arrow-down.svg +0 -1
- package/dist/pine-core/svg/arrow-left.svg +0 -1
- package/dist/pine-core/svg/arrow-right.svg +0 -1
- package/dist/pine-core/svg/arrow-up.svg +0 -1
- package/dist/pine-core/svg/assessment.svg +0 -1
- package/dist/pine-core/svg/at-sign.svg +0 -1
- package/dist/pine-core/svg/attach.svg +0 -1
- package/dist/pine-core/svg/automations.svg +0 -1
- package/dist/pine-core/svg/ban.svg +0 -1
- package/dist/pine-core/svg/bank.svg +0 -1
- package/dist/pine-core/svg/bar-chart-10-tone.svg +0 -1
- package/dist/pine-core/svg/bell-01-tone.svg +0 -1
- package/dist/pine-core/svg/bell.svg +0 -1
- package/dist/pine-core/svg/block.svg +0 -1
- package/dist/pine-core/svg/blog-filled.svg +0 -1
- package/dist/pine-core/svg/blog.svg +0 -1
- package/dist/pine-core/svg/bold.svg +0 -1
- package/dist/pine-core/svg/broadcast.svg +0 -1
- package/dist/pine-core/svg/bulb.svg +0 -1
- package/dist/pine-core/svg/button.svg +0 -1
- package/dist/pine-core/svg/calendar-date.svg +0 -1
- package/dist/pine-core/svg/calendar-schedule.svg +0 -1
- package/dist/pine-core/svg/calendar-simple.svg +0 -1
- package/dist/pine-core/svg/card-amex.svg +0 -1
- package/dist/pine-core/svg/card-android.svg +0 -1
- package/dist/pine-core/svg/card-apple.svg +0 -1
- package/dist/pine-core/svg/card-diners-club.svg +0 -1
- package/dist/pine-core/svg/card-discover.svg +0 -1
- package/dist/pine-core/svg/card-generic.svg +0 -1
- package/dist/pine-core/svg/card-gpay.svg +0 -1
- package/dist/pine-core/svg/card-mastercard.svg +0 -1
- package/dist/pine-core/svg/card-paypal.svg +0 -1
- package/dist/pine-core/svg/card-stripe.svg +0 -1
- package/dist/pine-core/svg/card-update.svg +0 -1
- package/dist/pine-core/svg/card-visa.svg +0 -1
- package/dist/pine-core/svg/caret-down.svg +0 -1
- package/dist/pine-core/svg/caret-left.svg +0 -1
- package/dist/pine-core/svg/caret-right.svg +0 -1
- package/dist/pine-core/svg/caret-up.svg +0 -1
- package/dist/pine-core/svg/cart-add.svg +0 -1
- package/dist/pine-core/svg/cart.svg +0 -1
- package/dist/pine-core/svg/certificate.svg +0 -1
- package/dist/pine-core/svg/chart-filled.svg +0 -1
- package/dist/pine-core/svg/chart.svg +0 -1
- package/dist/pine-core/svg/check-circle-filled.svg +0 -1
- package/dist/pine-core/svg/check-circle.svg +0 -1
- package/dist/pine-core/svg/check.svg +0 -1
- package/dist/pine-core/svg/circle-1.svg +0 -1
- package/dist/pine-core/svg/circle-2.svg +0 -1
- package/dist/pine-core/svg/circle-3.svg +0 -1
- package/dist/pine-core/svg/circle-4.svg +0 -1
- package/dist/pine-core/svg/circle-5.svg +0 -1
- package/dist/pine-core/svg/circle-6.svg +0 -1
- package/dist/pine-core/svg/circle-7.svg +0 -1
- package/dist/pine-core/svg/circle-8.svg +0 -1
- package/dist/pine-core/svg/circle-9.svg +0 -1
- package/dist/pine-core/svg/circle-a.svg +0 -1
- package/dist/pine-core/svg/circle-b.svg +0 -1
- package/dist/pine-core/svg/circle-dashed.svg +0 -1
- package/dist/pine-core/svg/clapperboard-tone.svg +0 -1
- package/dist/pine-core/svg/clock.svg +0 -1
- package/dist/pine-core/svg/closed-captions.svg +0 -1
- package/dist/pine-core/svg/cloud-upload.svg +0 -1
- package/dist/pine-core/svg/code-block.svg +0 -1
- package/dist/pine-core/svg/code.svg +0 -1
- package/dist/pine-core/svg/color.svg +0 -1
- package/dist/pine-core/svg/columns.svg +0 -1
- package/dist/pine-core/svg/comment-no.svg +0 -1
- package/dist/pine-core/svg/comment.svg +0 -1
- package/dist/pine-core/svg/connect.svg +0 -1
- package/dist/pine-core/svg/contact.svg +0 -1
- package/dist/pine-core/svg/conversation.svg +0 -1
- package/dist/pine-core/svg/copy.svg +0 -1
- package/dist/pine-core/svg/coupon.svg +0 -1
- package/dist/pine-core/svg/course-filled.svg +0 -1
- package/dist/pine-core/svg/course.svg +0 -1
- package/dist/pine-core/svg/creator-studio-filled.svg +0 -1
- package/dist/pine-core/svg/creator-studio.svg +0 -1
- package/dist/pine-core/svg/credit-card-02-tone.svg +0 -1
- package/dist/pine-core/svg/cube-01-tone.svg +0 -1
- package/dist/pine-core/svg/cursor-pointer.svg +0 -1
- package/dist/pine-core/svg/cursor.svg +0 -1
- package/dist/pine-core/svg/custom-field.svg +0 -1
- package/dist/pine-core/svg/customize.svg +0 -1
- package/dist/pine-core/svg/danger-filled.svg +0 -1
- package/dist/pine-core/svg/danger.svg +0 -1
- package/dist/pine-core/svg/delete-circle.svg +0 -1
- package/dist/pine-core/svg/delete-key.svg +0 -1
- package/dist/pine-core/svg/delete-x.svg +0 -1
- package/dist/pine-core/svg/dollar.svg +0 -1
- package/dist/pine-core/svg/dot-menu-horizontal.svg +0 -1
- package/dist/pine-core/svg/dots-horizontal-tone.svg +0 -1
- package/dist/pine-core/svg/down-small.svg +0 -1
- package/dist/pine-core/svg/download.svg +0 -1
- package/dist/pine-core/svg/downsell.svg +0 -1
- package/dist/pine-core/svg/draft.svg +0 -1
- package/dist/pine-core/svg/drawer-collapse.svg +0 -1
- package/dist/pine-core/svg/drawer-expand.svg +0 -1
- package/dist/pine-core/svg/drop.svg +0 -1
- package/dist/pine-core/svg/duplicate.svg +0 -1
- package/dist/pine-core/svg/editor-filled.svg +0 -1
- package/dist/pine-core/svg/editor.svg +0 -1
- package/dist/pine-core/svg/email-activity.svg +0 -1
- package/dist/pine-core/svg/emoji.svg +0 -1
- package/dist/pine-core/svg/enlarge-vertical.svg +0 -1
- package/dist/pine-core/svg/enlarge.svg +0 -1
- package/dist/pine-core/svg/expand.svg +0 -1
- package/dist/pine-core/svg/favorite.svg +0 -1
- package/dist/pine-core/svg/feedback.svg +0 -1
- package/dist/pine-core/svg/file-02.svg +0 -1
- package/dist/pine-core/svg/file-money.svg +0 -1
- package/dist/pine-core/svg/file.svg +0 -1
- package/dist/pine-core/svg/filter.svg +0 -1
- package/dist/pine-core/svg/flag.svg +0 -1
- package/dist/pine-core/svg/flash-filled.svg +0 -1
- package/dist/pine-core/svg/flash.svg +0 -1
- package/dist/pine-core/svg/floppy-disk.svg +0 -1
- package/dist/pine-core/svg/folder-group.svg +0 -1
- package/dist/pine-core/svg/folder.svg +0 -1
- package/dist/pine-core/svg/form-field.svg +0 -1
- package/dist/pine-core/svg/form-filled.svg +0 -1
- package/dist/pine-core/svg/form.svg +0 -1
- package/dist/pine-core/svg/fullscreen.svg +0 -1
- package/dist/pine-core/svg/funnel.svg +0 -1
- package/dist/pine-core/svg/gear-filled.svg +0 -1
- package/dist/pine-core/svg/gear.svg +0 -1
- package/dist/pine-core/svg/grant-offer.svg +0 -1
- package/dist/pine-core/svg/handle-2-vertical.svg +0 -1
- package/dist/pine-core/svg/handle-2.svg +0 -1
- package/dist/pine-core/svg/handle.svg +0 -1
- package/dist/pine-core/svg/hashtag.svg +0 -1
- package/dist/pine-core/svg/hd-video.svg +0 -1
- package/dist/pine-core/svg/heading-1.svg +0 -1
- package/dist/pine-core/svg/heading-2.svg +0 -1
- package/dist/pine-core/svg/heading-3.svg +0 -1
- package/dist/pine-core/svg/heading-4.svg +0 -1
- package/dist/pine-core/svg/heading-5.svg +0 -1
- package/dist/pine-core/svg/heading-6.svg +0 -1
- package/dist/pine-core/svg/heading-large.svg +0 -1
- package/dist/pine-core/svg/heading-small.svg +0 -1
- package/dist/pine-core/svg/headset-tone.svg +0 -1
- package/dist/pine-core/svg/headset.svg +0 -1
- package/dist/pine-core/svg/help-filled.svg +0 -1
- package/dist/pine-core/svg/help.svg +0 -1
- package/dist/pine-core/svg/home-02-tone.svg +0 -1
- package/dist/pine-core/svg/home-alt.svg +0 -1
- package/dist/pine-core/svg/home-filled.svg +0 -1
- package/dist/pine-core/svg/home.svg +0 -1
- package/dist/pine-core/svg/horizontal-line.svg +0 -1
- package/dist/pine-core/svg/image.svg +0 -1
- package/dist/pine-core/svg/info-circle-filled.svg +0 -1
- package/dist/pine-core/svg/info-circle.svg +0 -1
- package/dist/pine-core/svg/ios-battery.svg +0 -1
- package/dist/pine-core/svg/ios-data.svg +0 -1
- package/dist/pine-core/svg/ios-wifi.svg +0 -1
- package/dist/pine-core/svg/italic.svg +0 -1
- package/dist/pine-core/svg/kajabi-filled.svg +0 -1
- package/dist/pine-core/svg/kajabi.svg +0 -1
- package/dist/pine-core/svg/klarna.svg +0 -1
- package/dist/pine-core/svg/lab.svg +0 -1
- package/dist/pine-core/svg/launch.svg +0 -1
- package/dist/pine-core/svg/layout-grid.svg +0 -1
- package/dist/pine-core/svg/layout-list.svg +0 -1
- package/dist/pine-core/svg/left-small.svg +0 -1
- package/dist/pine-core/svg/list-bullet.svg +0 -1
- package/dist/pine-core/svg/list-details.svg +0 -1
- package/dist/pine-core/svg/list-numbers.svg +0 -1
- package/dist/pine-core/svg/location.svg +0 -1
- package/dist/pine-core/svg/lock-alt.svg +0 -1
- package/dist/pine-core/svg/lock.svg +0 -1
- package/dist/pine-core/svg/logo-afterpay.svg +0 -1
- package/dist/pine-core/svg/logo-facebook-round.svg +0 -1
- package/dist/pine-core/svg/logo-facebook.svg +0 -1
- package/dist/pine-core/svg/logo-instagram.svg +0 -1
- package/dist/pine-core/svg/logo-linkedin.svg +0 -1
- package/dist/pine-core/svg/logo-tiktok.svg +0 -1
- package/dist/pine-core/svg/logo-twitter-x.svg +0 -1
- package/dist/pine-core/svg/logo-twitter.svg +0 -1
- package/dist/pine-core/svg/logo-youtube.svg +0 -1
- package/dist/pine-core/svg/loop.svg +0 -1
- package/dist/pine-core/svg/mail-01-tone.svg +0 -1
- package/dist/pine-core/svg/mail-filled.svg +0 -1
- package/dist/pine-core/svg/mail-open.svg +0 -1
- package/dist/pine-core/svg/mail.svg +0 -1
- package/dist/pine-core/svg/map.svg +0 -1
- package/dist/pine-core/svg/mapped.svg +0 -1
- package/dist/pine-core/svg/margin-left.svg +0 -1
- package/dist/pine-core/svg/margin-right.svg +0 -1
- package/dist/pine-core/svg/marker-filled.svg +0 -1
- package/dist/pine-core/svg/marker.svg +0 -1
- package/dist/pine-core/svg/megaphone-filled.svg +0 -1
- package/dist/pine-core/svg/megaphone.svg +0 -1
- package/dist/pine-core/svg/menu-alt.svg +0 -1
- package/dist/pine-core/svg/menu-bordered.svg +0 -1
- package/dist/pine-core/svg/menu.svg +0 -1
- package/dist/pine-core/svg/merge.svg +0 -1
- package/dist/pine-core/svg/microphone-off.svg +0 -1
- package/dist/pine-core/svg/microphone.svg +0 -1
- package/dist/pine-core/svg/monitor-03-tone.svg +0 -1
- package/dist/pine-core/svg/monitor-filled.svg +0 -1
- package/dist/pine-core/svg/monitor.svg +0 -1
- package/dist/pine-core/svg/more-menu-filled.svg +0 -1
- package/dist/pine-core/svg/more-menu.svg +0 -1
- package/dist/pine-core/svg/move-left.svg +0 -1
- package/dist/pine-core/svg/move-right.svg +0 -1
- package/dist/pine-core/svg/multi-pay.svg +0 -1
- package/dist/pine-core/svg/newsletter-2.svg +0 -1
- package/dist/pine-core/svg/newsletter.svg +0 -1
- package/dist/pine-core/svg/one-off-session.svg +0 -1
- package/dist/pine-core/svg/one-time.svg +0 -1
- package/dist/pine-core/svg/packages.svg +0 -1
- package/dist/pine-core/svg/pause-circle.svg +0 -1
- package/dist/pine-core/svg/pause.svg +0 -1
- package/dist/pine-core/svg/payout.svg +0 -1
- package/dist/pine-core/svg/pen.svg +0 -1
- package/dist/pine-core/svg/phone-02-tone.svg +0 -1
- package/dist/pine-core/svg/phone-portrait.svg +0 -1
- package/dist/pine-core/svg/phone-toolbar-filled.svg +0 -1
- package/dist/pine-core/svg/phone-toolbar.svg +0 -1
- package/dist/pine-core/svg/play-circle.svg +0 -1
- package/dist/pine-core/svg/play-outline.svg +0 -1
- package/dist/pine-core/svg/play-store.svg +0 -1
- package/dist/pine-core/svg/play.svg +0 -1
- package/dist/pine-core/svg/plug.svg +0 -1
- package/dist/pine-core/svg/premium.svg +0 -1
- package/dist/pine-core/svg/present.svg +0 -1
- package/dist/pine-core/svg/preview-off.svg +0 -1
- package/dist/pine-core/svg/preview-on.svg +0 -1
- package/dist/pine-core/svg/product-filled.svg +0 -1
- package/dist/pine-core/svg/product.svg +0 -1
- package/dist/pine-core/svg/question-circle.svg +0 -1
- package/dist/pine-core/svg/quote.svg +0 -1
- package/dist/pine-core/svg/redo.svg +0 -1
- package/dist/pine-core/svg/refresh.svg +0 -1
- package/dist/pine-core/svg/remove-circle.svg +0 -1
- package/dist/pine-core/svg/remove.svg +0 -1
- package/dist/pine-core/svg/rename.svg +0 -1
- package/dist/pine-core/svg/reset-password.svg +0 -1
- package/dist/pine-core/svg/restore.svg +0 -1
- package/dist/pine-core/svg/right-small.svg +0 -1
- package/dist/pine-core/svg/rocket-filled.svg +0 -1
- package/dist/pine-core/svg/rocket.svg +0 -1
- package/dist/pine-core/svg/round-dollar.svg +0 -1
- package/dist/pine-core/svg/rows.svg +0 -1
- package/dist/pine-core/svg/scissor.svg +0 -1
- package/dist/pine-core/svg/screen-share-off.svg +0 -1
- package/dist/pine-core/svg/screen-share-on.svg +0 -1
- package/dist/pine-core/svg/search-md-tone.svg +0 -1
- package/dist/pine-core/svg/search-small.svg +0 -1
- package/dist/pine-core/svg/search.svg +0 -1
- package/dist/pine-core/svg/send-message.svg +0 -1
- package/dist/pine-core/svg/sequences.svg +0 -1
- package/dist/pine-core/svg/settings-01-tone.svg +0 -1
- package/dist/pine-core/svg/share.svg +0 -1
- package/dist/pine-core/svg/skipped.svg +0 -1
- package/dist/pine-core/svg/slash-divider.svg +0 -1
- package/dist/pine-core/svg/speaker.svg +0 -1
- package/dist/pine-core/svg/stack.svg +0 -1
- package/dist/pine-core/svg/star.svg +0 -1
- package/dist/pine-core/svg/stars-01-tone.svg +0 -1
- package/dist/pine-core/svg/stop.svg +0 -1
- package/dist/pine-core/svg/stopwatch.svg +0 -1
- package/dist/pine-core/svg/strikethrough.svg +0 -1
- package/dist/pine-core/svg/subscript.svg +0 -1
- package/dist/pine-core/svg/subscriptions.svg +0 -1
- package/dist/pine-core/svg/super-admin.svg +0 -1
- package/dist/pine-core/svg/superscript.svg +0 -1
- package/dist/pine-core/svg/sync.svg +0 -1
- package/dist/pine-core/svg/tablet-landscape.svg +0 -1
- package/dist/pine-core/svg/tablet-portrait.svg +0 -1
- package/dist/pine-core/svg/tag-filled.svg +0 -1
- package/dist/pine-core/svg/tag.svg +0 -1
- package/dist/pine-core/svg/text-styles.svg +0 -1
- package/dist/pine-core/svg/theme-store-filled.svg +0 -1
- package/dist/pine-core/svg/theme-store.svg +0 -1
- package/dist/pine-core/svg/thumb-down-filled.svg +0 -1
- package/dist/pine-core/svg/thumb-down.svg +0 -1
- package/dist/pine-core/svg/thumb-up-filled.svg +0 -1
- package/dist/pine-core/svg/thumb-up.svg +0 -1
- package/dist/pine-core/svg/trash.svg +0 -1
- package/dist/pine-core/svg/trophy-filled.svg +0 -1
- package/dist/pine-core/svg/trophy.svg +0 -1
- package/dist/pine-core/svg/underline.svg +0 -1
- package/dist/pine-core/svg/undo.svg +0 -1
- package/dist/pine-core/svg/unlock.svg +0 -1
- package/dist/pine-core/svg/unmapped.svg +0 -1
- package/dist/pine-core/svg/up-small.svg +0 -1
- package/dist/pine-core/svg/upload.svg +0 -1
- package/dist/pine-core/svg/url.svg +0 -1
- package/dist/pine-core/svg/user-circle-filled.svg +0 -1
- package/dist/pine-core/svg/user-circle.svg +0 -1
- package/dist/pine-core/svg/user-filled.svg +0 -1
- package/dist/pine-core/svg/user-star-filled.svg +0 -1
- package/dist/pine-core/svg/user-star.svg +0 -1
- package/dist/pine-core/svg/user.svg +0 -1
- package/dist/pine-core/svg/users-02-tone.svg +0 -1
- package/dist/pine-core/svg/users-alt.svg +0 -1
- package/dist/pine-core/svg/users-filled.svg +0 -1
- package/dist/pine-core/svg/users.svg +0 -1
- package/dist/pine-core/svg/video-off.svg +0 -1
- package/dist/pine-core/svg/video-on.svg +0 -1
- package/dist/pine-core/svg/warning-filled.svg +0 -1
- package/dist/pine-core/svg/warning.svg +0 -1
- package/dist/pine-core/svg/window-paragraph.svg +0 -1
- package/dist/pine-core/svg/world.svg +0 -1
- package/dist/pine-core/svg/wrench.svg +0 -1
- package/dist/types/stories/_helpers/index.d.ts +0 -12
- package/loader/package.json +0 -11
|
@@ -0,0 +1,1382 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-4_RRPJTO.js';
|
|
2
|
+
import { a as autoUpdate, c as computePosition, o as offset, f as flip, s as shift, b as size } from './floating-ui.dom-Cuc0DYlm.js';
|
|
3
|
+
import { c as cancelDebouncedEvent, d as debounceEvent, f as flushDebouncedEvent } from './utils-OYK5-nwe.js';
|
|
4
|
+
import { i as isSpecTest, a as assignDescription, m as messageId } from './form-BuRbS7Hp.js';
|
|
5
|
+
import { e as enlarge, b as danger } from './index-B0DXTeeV.js';
|
|
6
|
+
import { f as formatMessage, p as pluralize } from './i18n-format-BJgZHCWe.js';
|
|
7
|
+
import { b as bindTruncationTooltips } from './truncation-tooltip-CkIWm6Z-.js';
|
|
8
|
+
import './keep-hydrated-BgNaWLoS.js';
|
|
9
|
+
import './portal-target-CKRzRKdO.js';
|
|
10
|
+
|
|
11
|
+
const pdsMultiselectCss = () => `:host{display:block}:host([aria-disabled=true]) .pds-multiselect__trigger{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}:host([aria-disabled=true]) .pds-multiselect__icon{color:var(--pine-color-text-disabled)}.pds-multiselect{position:relative}.pds-multiselect__label{color:var(--pine-color-text-label);display:block;font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-multiselect__wrapper{position:relative}.pds-multiselect__trigger{-ms-flex-align:center;align-items:center;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body);gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;letter-spacing:var(--pine-letter-spacing);min-height:var(--pine-dimension-450);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);position:relative;text-align:start;-webkit-transition:border-color var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, box-shadow var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;width:100%}.pds-multiselect__trigger:hover:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-hover)}.pds-multiselect__trigger:focus:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-multiselect__trigger.pds-multiselect__trigger--open{border-color:var(--pine-color-border-active)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid{background-color:var(--pine-color-red-050);border-color:var(--pine-color-border-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid:focus{outline-color:var(--pine-color-focus-ring-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-multiselect__trigger-label{display:grid;-ms-flex:1;flex:1;grid-template-columns:minmax(0, 1fr);min-width:0}.pds-multiselect__trigger-sizer{grid-area:1/1;overflow:hidden;visibility:hidden;white-space:nowrap}.pds-multiselect__trigger-label>.pds-multiselect__trigger-text{contain:inline-size;grid-area:1/1}.pds-multiselect__trigger-text{color:var(--pine-color-text-strong);-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__trigger-text.pds-multiselect__trigger-text--placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__trigger--disabled .pds-multiselect__trigger-text{color:var(--pine-color-text-disabled)}.pds-multiselect__icon{color:var(--pine-color-icon);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__pill-list{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-2xs)}.pds-multiselect__pill-list--inline{-ms-flex:1;flex:1;min-width:0}.pds-multiselect__pill-list--below{-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-multiselect__pill-overflow{color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);white-space:nowrap}.pds-multiselect__trigger--pill-inline{-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-2xs);min-height:var(--pine-dimension-450);padding:var(--pine-dimension-2xs) var(--pine-dimension-sm)}.pds-multiselect__trigger--pill-inline.pds-multiselect__trigger--open{border-color:var(--pine-color-border-active)}.pds-multiselect__trigger--pill-inline:focus-within:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-multiselect__trigger--pill-inline.pds-multiselect__trigger--invalid:focus-within{outline-color:var(--pine-color-focus-ring-danger)}.pds-multiselect__pill-toggle{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border-width:0;cursor:pointer;display:-ms-flexbox;display:flex;padding:0}.pds-multiselect__pill-toggle:focus{outline:3px solid transparent}.pds-multiselect__trigger--disabled .pds-multiselect__pill-toggle{cursor:not-allowed;pointer-events:none}.pds-multiselect__panel{background:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:fixed;z-index:var(--pine-z-index-raised)}.pds-multiselect__search{-ms-flex-align:center;align-items:center;-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-active);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.pds-multiselect__search pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__search-input{background:transparent;border:var(--pine-dimension-none);color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-width:var(--pine-dimension-none);outline:none}.pds-multiselect__search-input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__selected-section{-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);padding:var(--pine-dimension-xs)}.pds-multiselect__selected-list{list-style:none;margin:var(--pine-dimension-none);padding:var(--pine-dimension-none)}.pds-multiselect__selected-item{color:var(--pine-color-text-strong);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);overflow:hidden;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__listbox{background:transparent;border:var(--pine-dimension-none);-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;margin:var(--pine-dimension-none);overflow-y:auto;padding:var(--pine-dimension-xs)}.pds-multiselect__group-header{color:var(--pine-color-text-muted);display:block;font:var(--pine-typography-body-sm-medium);letter-spacing:var(--pine-letter-spacing);padding:var(--pine-dimension-sm) var(--pine-dimension-sm) var(--pine-dimension-2xs);text-transform:uppercase}.pds-multiselect__listbox>li:first-child>.pds-multiselect__group-header{-webkit-padding-before:var(--pine-dimension-xs);padding-block-start:var(--pine-dimension-xs)}.pds-multiselect__group-list{list-style:none;margin:var(--pine-dimension-none);padding:var(--pine-dimension-none)}.pds-multiselect__option{-ms-flex-align:center;align-items:center;background:transparent;border-radius:var(--pine-dimension-xs);cursor:pointer;display:-ms-flexbox;display:flex;padding:var(--pine-dimension-xs) var(--pine-dimension-sm);-webkit-transition:background 0.15s;transition:background 0.15s}.pds-multiselect__option pds-checkbox{min-width:var(--pine-dimension-none);pointer-events:none;width:100%}.pds-multiselect__option pds-chip{pointer-events:auto}.pds-multiselect__option:hover:not(.pds-multiselect__option--disabled),.pds-multiselect__option.pds-multiselect__option--highlighted:not(.pds-multiselect__option--disabled){background:var(--pine-color-background-muted)}.pds-multiselect__option.pds-multiselect__option--disabled{cursor:not-allowed;opacity:0.5}.pds-multiselect__option:focus-visible{outline:var(--pine-dimension-none)}.pds-multiselect__option-action{-ms-flex-align:center;align-items:center;block-size:var(--pine-dimension-md);color:var(--pine-color-icon);cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-dimension-md);-ms-flex-pack:center;justify-content:center;-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}.pds-multiselect__create-option{color:var(--pine-color-text-strong);width:100%}.pds-multiselect__create-option pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__empty,.pds-multiselect__loading{-ms-flex-align:center;align-items:center;color:var(--pine-color-text-muted);display:-ms-flexbox;display:flex;font:var(--pine-typography-body);-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-sm)}.pds-multiselect__load-more{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-xs)}.pds-multiselect__footer{-webkit-border-before:var(--pine-border);border-block-start:var(--pine-border);border-block-start-color:var(--pine-color-border-subtle);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.pds-multiselect__helper{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error{-ms-flex-align:start;align-items:flex-start;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error pds-icon{-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none);-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.visually-hidden{border:var(--pine-dimension-none);clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:var(--pine-dimension-none);position:absolute;white-space:nowrap;width:1px}`;
|
|
12
|
+
|
|
13
|
+
// Names only: pds-icon's `icon` prop also fetches URLs and data: SVGs, unsanitized.
|
|
14
|
+
const PINE_ICON_NAME = /^[a-z0-9-]+$/i;
|
|
15
|
+
const TABBABLE_SELECTOR = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
16
|
+
const PdsMultiselect = class {
|
|
17
|
+
constructor(hostRef) {
|
|
18
|
+
registerInstance(this, hostRef);
|
|
19
|
+
this.pdsMultiselectChange = createEvent(this, "pdsMultiselectChange");
|
|
20
|
+
this.pdsMultiselectSearch = createEvent(this, "pdsMultiselectSearch");
|
|
21
|
+
this.pdsMultiselectLoadOptions = createEvent(this, "pdsMultiselectLoadOptions");
|
|
22
|
+
this.pdsMultiselectCreate = createEvent(this, "pdsMultiselectCreate");
|
|
23
|
+
this.pdsMultiselectDismiss = createEvent(this, "pdsMultiselectDismiss");
|
|
24
|
+
this.pdsMultiselectOptionAction = createEvent(this, "pdsMultiselectOptionAction");
|
|
25
|
+
this.triggerTextTooltip = bindTruncationTooltips((textEl) => {
|
|
26
|
+
var _a;
|
|
27
|
+
return ({
|
|
28
|
+
// Not the host, which holds the panel.
|
|
29
|
+
hostEl: (_a = textEl.closest('[part="trigger"]')) !== null && _a !== void 0 ? _a : textEl,
|
|
30
|
+
contentEl: textEl,
|
|
31
|
+
getTooltipText: () => this.getTriggerText(),
|
|
32
|
+
manageTabIndex: false,
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
this.selectedItemTooltips = bindTruncationTooltips((item) => ({
|
|
36
|
+
hostEl: item,
|
|
37
|
+
contentEl: item,
|
|
38
|
+
getTooltipText: () => { var _a; return (_a = item.textContent) !== null && _a !== void 0 ? _a : ''; },
|
|
39
|
+
}));
|
|
40
|
+
this.hasDisabledSlottedTrigger = false;
|
|
41
|
+
/**
|
|
42
|
+
* Placeholder text for the input field. Pass a translated string to localize it; defaults to English.
|
|
43
|
+
* @defaultValue 'Select...'
|
|
44
|
+
*/
|
|
45
|
+
this.placeholder = 'Select...';
|
|
46
|
+
/**
|
|
47
|
+
* Placeholder text for the search input inside the dropdown panel. Pass a translated string to localize it; defaults to English.
|
|
48
|
+
* @defaultValue 'Find...'
|
|
49
|
+
*/
|
|
50
|
+
this.searchPlaceholder = 'Find...';
|
|
51
|
+
/**
|
|
52
|
+
* Accessible label for the search input. Pass a translated string to localize it; defaults to English.
|
|
53
|
+
* @defaultValue 'Search options'
|
|
54
|
+
*/
|
|
55
|
+
this.searchOptionsLabel = 'Search options';
|
|
56
|
+
/**
|
|
57
|
+
* Accessible label for the selected-items region. Pass a translated string to localize it; defaults to English.
|
|
58
|
+
* @defaultValue 'Selected items'
|
|
59
|
+
*/
|
|
60
|
+
this.selectedItemsLabel = 'Selected items';
|
|
61
|
+
/**
|
|
62
|
+
* Accessible label for the options listbox (falls back to this when `label` is unset). Pass a translated string to localize it; defaults to English.
|
|
63
|
+
* @defaultValue 'Options'
|
|
64
|
+
*/
|
|
65
|
+
this.optionsLabel = 'Options';
|
|
66
|
+
/**
|
|
67
|
+
* Text shown when no options match the search. Pass a translated string to localize it; defaults to English.
|
|
68
|
+
* @defaultValue 'No options found'
|
|
69
|
+
*/
|
|
70
|
+
this.noOptionsFoundLabel = 'No options found';
|
|
71
|
+
/**
|
|
72
|
+
* Visible label for the create-new-option row. Pass a translated string to localize it; `{text}` is interpolated.
|
|
73
|
+
* @defaultValue 'Add "{text}"'
|
|
74
|
+
*/
|
|
75
|
+
this.createOptionLabel = 'Add "{text}"';
|
|
76
|
+
/**
|
|
77
|
+
* Accessible label for the create-new-option row. Pass a translated string to localize it; `{text}` is interpolated.
|
|
78
|
+
* @defaultValue 'Create new tag: {text}'
|
|
79
|
+
*/
|
|
80
|
+
this.createOptionAriaLabel = 'Create new tag: {text}';
|
|
81
|
+
/**
|
|
82
|
+
* Screen-reader announcement when an item is removed. Pass a translated string to localize it; `{item}` is interpolated.
|
|
83
|
+
* @defaultValue '{item} removed'
|
|
84
|
+
*/
|
|
85
|
+
this.itemRemovedLabel = '{item} removed';
|
|
86
|
+
/**
|
|
87
|
+
* Accessible label for the remove button on each selected-item pill. Pass a translated string to localize it; defaults to English.
|
|
88
|
+
* @defaultValue 'Remove'
|
|
89
|
+
*/
|
|
90
|
+
this.pillRemoveLabel = 'Remove';
|
|
91
|
+
/**
|
|
92
|
+
* Singular form of the selected-count trigger text. Pass a translated string to localize it; `{count}` is interpolated.
|
|
93
|
+
* A single selection shows the item's name instead, so this applies to other counts that a locale's plural rules treat as singular, and to a single selection whose item has no text.
|
|
94
|
+
* @defaultValue '{count} item'
|
|
95
|
+
*/
|
|
96
|
+
this.selectedCountLabelOne = '{count} item';
|
|
97
|
+
/**
|
|
98
|
+
* Plural (and fallback) form of the selected-count trigger text — used for English and any locale whose selected plural category isn't supplied via `selectedCountLabels`. Pass a translated string to localize it; `{count}` is interpolated.
|
|
99
|
+
* @defaultValue '{count} items'
|
|
100
|
+
*/
|
|
101
|
+
this.selectedCountLabelOther = '{count} items';
|
|
102
|
+
/**
|
|
103
|
+
* Whether to close the panel after an option is selected.
|
|
104
|
+
* Defaults to `false` (panel stays open for multi-select).
|
|
105
|
+
*/
|
|
106
|
+
this.closePanelOnSelect = false;
|
|
107
|
+
/**
|
|
108
|
+
* Array of selected option values.
|
|
109
|
+
*/
|
|
110
|
+
this.value = [];
|
|
111
|
+
/**
|
|
112
|
+
* Determines whether or not the multiselect is disabled.
|
|
113
|
+
*/
|
|
114
|
+
this.disabled = false;
|
|
115
|
+
/**
|
|
116
|
+
* HTTP method for async requests.
|
|
117
|
+
*/
|
|
118
|
+
this.asyncMethod = 'GET';
|
|
119
|
+
/**
|
|
120
|
+
* Debounce delay in milliseconds for search/fetch.
|
|
121
|
+
*/
|
|
122
|
+
this.debounce = 300;
|
|
123
|
+
/**
|
|
124
|
+
* Timeout in milliseconds for async fetch requests.
|
|
125
|
+
*/
|
|
126
|
+
this.fetchTimeout = 30000;
|
|
127
|
+
/**
|
|
128
|
+
* Maximum height of the dropdown before scrolling.
|
|
129
|
+
*/
|
|
130
|
+
this.maxHeight = '300px';
|
|
131
|
+
/**
|
|
132
|
+
* Width of the trigger button (and reference for dropdown positioning).
|
|
133
|
+
*/
|
|
134
|
+
this.triggerWidth = '100%';
|
|
135
|
+
/**
|
|
136
|
+
* Minimum width of the dropdown panel.
|
|
137
|
+
*/
|
|
138
|
+
this.minWidth = '250px';
|
|
139
|
+
/**
|
|
140
|
+
* Visually hides the label but keeps it accessible.
|
|
141
|
+
*/
|
|
142
|
+
this.hideLabel = false;
|
|
143
|
+
/**
|
|
144
|
+
* Hides the selected items summary section in the dropdown panel.
|
|
145
|
+
*/
|
|
146
|
+
this.hideSelectedItems = false;
|
|
147
|
+
/**
|
|
148
|
+
* Display mode for selected items outside the dropdown panel.
|
|
149
|
+
* `'count'` shows the item's name in the trigger when one is selected and
|
|
150
|
+
* "N items" text otherwise (default). `'pill'` renders selected items as
|
|
151
|
+
* dismissible pds-chip tags.
|
|
152
|
+
* @default 'count'
|
|
153
|
+
*/
|
|
154
|
+
this.selectedDisplay = 'count';
|
|
155
|
+
/**
|
|
156
|
+
* Position of pill chips when `selectedDisplay` is `'pill'`.
|
|
157
|
+
* `'inline'` places chips inside the trigger; `'below'` places chips in a
|
|
158
|
+
* flex-wrap row directly below the trigger.
|
|
159
|
+
* @default 'inline'
|
|
160
|
+
*/
|
|
161
|
+
this.pillPosition = 'inline';
|
|
162
|
+
/**
|
|
163
|
+
* Maximum chips shown inline before collapsing to a "+N more" badge.
|
|
164
|
+
* Only applies when `selectedDisplay='pill'` and `pillPosition='inline'`.
|
|
165
|
+
* @default 3
|
|
166
|
+
*/
|
|
167
|
+
this.maxInlinePills = 3;
|
|
168
|
+
/**
|
|
169
|
+
* Display mode for options in the dropdown panel.
|
|
170
|
+
* `'text'` shows each option's text (default). `'chip'` shows each option as a
|
|
171
|
+
* pds-chip, with a dot when the option has a `dotColor`.
|
|
172
|
+
* @defaultValue 'text'
|
|
173
|
+
*/
|
|
174
|
+
this.optionDisplay = 'text';
|
|
175
|
+
/**
|
|
176
|
+
* If true, the multiselect is required.
|
|
177
|
+
*/
|
|
178
|
+
this.required = false;
|
|
179
|
+
/**
|
|
180
|
+
* Whether the component is currently loading async options.
|
|
181
|
+
*/
|
|
182
|
+
this.loading = false;
|
|
183
|
+
/**
|
|
184
|
+
* CSRF header name for authenticated requests. Defaults to `X-CSRF-Token`.
|
|
185
|
+
*/
|
|
186
|
+
this.csrfHeaderName = 'X-CSRF-Token';
|
|
187
|
+
/**
|
|
188
|
+
* Shows an action icon on each option that has an `actionIcon`, such as an edit pencil.
|
|
189
|
+
* The icon shows on the hovered or highlighted option; clicking it, or pressing Right Arrow on the highlighted option, emits `pdsMultiselectOptionAction`.
|
|
190
|
+
*/
|
|
191
|
+
this.optionActions = false;
|
|
192
|
+
/**
|
|
193
|
+
* Tooltip for an option's action icon when the option has no `actionLabel`. Pass a translated string to localize it; `{text}` is interpolated.
|
|
194
|
+
* @defaultValue 'Edit {text}'
|
|
195
|
+
*/
|
|
196
|
+
this.optionActionLabel = 'Edit {text}';
|
|
197
|
+
/**
|
|
198
|
+
* Screen-reader hint on each option that has an action, naming the key that runs it. Pass a translated string to localize it; `{action}` is interpolated with the option's action label.
|
|
199
|
+
* @defaultValue 'Press Right Arrow to {action}'
|
|
200
|
+
*/
|
|
201
|
+
this.optionActionDescription = 'Press Right Arrow to {action}';
|
|
202
|
+
// Internal state
|
|
203
|
+
this.isOpen = false;
|
|
204
|
+
this.searchQuery = '';
|
|
205
|
+
this.highlightedIndex = -1;
|
|
206
|
+
this.internalOptions = [];
|
|
207
|
+
this.selectedItems = [];
|
|
208
|
+
this.currentPage = 1;
|
|
209
|
+
this.hasMore = false;
|
|
210
|
+
this.creating = false;
|
|
211
|
+
this.removalAnnouncement = '';
|
|
212
|
+
// Flag to prevent focusout from closing during open transition
|
|
213
|
+
this.isOpening = false;
|
|
214
|
+
// Flag to suppress dismiss event when panel closes due to selection (not user dismissal)
|
|
215
|
+
this.isClosingViaSelection = false;
|
|
216
|
+
// Flag to track if initial async fetch has been triggered (prevents double fetch)
|
|
217
|
+
this.initialAsyncFetchTriggered = false;
|
|
218
|
+
// Flag to track if value changed during loading and needs resolution after fetch completes
|
|
219
|
+
this.pendingUnresolvedFetch = false;
|
|
220
|
+
this.handleTriggerClick = (e) => {
|
|
221
|
+
if (this.disabled)
|
|
222
|
+
return;
|
|
223
|
+
// In inline-pill mode, ignore clicks that originated inside a pds-chip.
|
|
224
|
+
// Chip close-button clicks are handled by handlePillRemove; chip body clicks should not toggle the panel.
|
|
225
|
+
if (e && !this.slottedTriggerEl && this.selectedDisplay === 'pill' && this.pillPosition === 'inline') {
|
|
226
|
+
const fromChip = e.composedPath().some(el => { var _a; return ((_a = el.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'pds-chip'; });
|
|
227
|
+
if (fromChip)
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
if (this.isOpen) {
|
|
231
|
+
this.closeDropdown();
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
this.openDropdown();
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
this.handleTriggerKeyDown = (e) => {
|
|
238
|
+
if (this.disabled)
|
|
239
|
+
return;
|
|
240
|
+
// Ignore keydown events that bubbled from child elements (e.g. chip close buttons).
|
|
241
|
+
// Only handle keys when the trigger itself is the event target.
|
|
242
|
+
if (e.target !== this.activeTriggerEl)
|
|
243
|
+
return;
|
|
244
|
+
switch (e.key) {
|
|
245
|
+
case 'ArrowDown':
|
|
246
|
+
case 'ArrowUp':
|
|
247
|
+
case 'Enter':
|
|
248
|
+
case ' ':
|
|
249
|
+
e.preventDefault();
|
|
250
|
+
if (!this.isOpen) {
|
|
251
|
+
this.openDropdown();
|
|
252
|
+
}
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
this.handleSearchInputChange = (e) => {
|
|
257
|
+
const target = e.target;
|
|
258
|
+
this.searchQuery = target.value;
|
|
259
|
+
this.highlightedIndex = -1;
|
|
260
|
+
// Emit search event for consumer-managed async
|
|
261
|
+
this.pdsMultiselectSearch.emit({ query: this.searchQuery });
|
|
262
|
+
// Fetch from async URL if configured
|
|
263
|
+
if (this.asyncUrl) {
|
|
264
|
+
this.debouncedFetchAsyncOptions(this.searchQuery, 1);
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
this.handleSearchInputKeyDown = (e) => {
|
|
268
|
+
var _a, _b, _c;
|
|
269
|
+
const filteredOptions = this.getFilteredOptions();
|
|
270
|
+
switch (e.key) {
|
|
271
|
+
case 'ArrowDown': {
|
|
272
|
+
e.preventDefault();
|
|
273
|
+
let nextIndex = this.highlightedIndex + 1;
|
|
274
|
+
while (nextIndex < filteredOptions.length && ((_a = filteredOptions[nextIndex]) === null || _a === void 0 ? void 0 : _a.disabled)) {
|
|
275
|
+
nextIndex++;
|
|
276
|
+
}
|
|
277
|
+
if (nextIndex < filteredOptions.length) {
|
|
278
|
+
this.highlightedIndex = nextIndex;
|
|
279
|
+
this.scrollOptionIntoView();
|
|
280
|
+
}
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
case 'ArrowUp': {
|
|
284
|
+
e.preventDefault();
|
|
285
|
+
// Clamp to 0 so ArrowUp from uninitialised state (-1) attempts the first option;
|
|
286
|
+
// stays at -1 if that option is disabled.
|
|
287
|
+
let prevIndex = Math.max(this.highlightedIndex - 1, 0);
|
|
288
|
+
while (prevIndex > 0 && ((_b = filteredOptions[prevIndex]) === null || _b === void 0 ? void 0 : _b.disabled)) {
|
|
289
|
+
prevIndex--;
|
|
290
|
+
}
|
|
291
|
+
if (!((_c = filteredOptions[prevIndex]) === null || _c === void 0 ? void 0 : _c.disabled)) {
|
|
292
|
+
this.highlightedIndex = prevIndex;
|
|
293
|
+
this.scrollOptionIntoView();
|
|
294
|
+
}
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
case 'Enter':
|
|
298
|
+
e.preventDefault();
|
|
299
|
+
if (this.highlightedIndex >= 0) {
|
|
300
|
+
const option = filteredOptions[this.highlightedIndex];
|
|
301
|
+
if (option) {
|
|
302
|
+
this.selectOption(option);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
break;
|
|
306
|
+
// Right Arrow still moves the caret through typed text; a plain Right Arrow at the end runs the action.
|
|
307
|
+
case 'ArrowRight': {
|
|
308
|
+
const option = filteredOptions[this.highlightedIndex];
|
|
309
|
+
const isPlainKey = !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.isComposing;
|
|
310
|
+
if (isPlainKey && option && this.hasOptionAction(option) && this.isCaretAtEndOfSearch()) {
|
|
311
|
+
e.preventDefault();
|
|
312
|
+
this.runOptionAction(option);
|
|
313
|
+
}
|
|
314
|
+
break;
|
|
315
|
+
}
|
|
316
|
+
// Escape is handled by the global @Listen('keydown') handler
|
|
317
|
+
case 'Tab': {
|
|
318
|
+
const row = e.shiftKey ? undefined : this.getSelectedItemTabbables()[0];
|
|
319
|
+
if (row !== undefined) {
|
|
320
|
+
row.focus();
|
|
321
|
+
e.preventDefault();
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
this.tabPastOptions(e);
|
|
325
|
+
}
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
this.handleSelectedListKeyDown = (e) => {
|
|
331
|
+
if (e.key === 'Tab' && !e.shiftKey && e.composedPath()[0] === this.getSelectedItemTabbables().pop())
|
|
332
|
+
this.tabPastOptions(e);
|
|
333
|
+
};
|
|
334
|
+
this.handleFooterKeyDown = (e) => {
|
|
335
|
+
var _a, _b;
|
|
336
|
+
if (e.key !== 'Tab')
|
|
337
|
+
return;
|
|
338
|
+
const tabbables = this.getFooterTabbables();
|
|
339
|
+
const focused = e.composedPath()[0];
|
|
340
|
+
if (e.shiftKey && focused === tabbables[0]) {
|
|
341
|
+
e.preventDefault();
|
|
342
|
+
(_b = ((_a = this.getSelectedItemTabbables().pop()) !== null && _a !== void 0 ? _a : this.searchInputEl)) === null || _b === void 0 ? void 0 : _b.focus();
|
|
343
|
+
}
|
|
344
|
+
else if (!e.shiftKey && focused === tabbables[tabbables.length - 1]) {
|
|
345
|
+
this.closeDropdown();
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
this.handleContainerFocusOut = () => {
|
|
349
|
+
// Use setTimeout to delay the check - this allows click events and focus transitions to complete
|
|
350
|
+
// before we decide to close the dropdown
|
|
351
|
+
setTimeout(() => {
|
|
352
|
+
var _a;
|
|
353
|
+
// Don't close if we're in the middle of opening, already closed,
|
|
354
|
+
// or closing due to a selection (not a user dismissal)
|
|
355
|
+
if (!this.isOpen || this.isOpening || this.isClosingViaSelection)
|
|
356
|
+
return;
|
|
357
|
+
const activeElement = document.activeElement;
|
|
358
|
+
// Check if focus is within our component's shadow root
|
|
359
|
+
const isInShadowRoot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(activeElement);
|
|
360
|
+
// Also check the host itself and its light DOM, where slotted trigger and footer content live
|
|
361
|
+
const isInHost = this.el.contains(activeElement);
|
|
362
|
+
if (!isInShadowRoot && !isInHost) {
|
|
363
|
+
this.pdsMultiselectDismiss.emit();
|
|
364
|
+
this.closeDropdown();
|
|
365
|
+
}
|
|
366
|
+
}, 0);
|
|
367
|
+
};
|
|
368
|
+
this.handleOptionMouseDown = (option) => (e) => {
|
|
369
|
+
e.preventDefault(); // Prevent focus change
|
|
370
|
+
this.toggleOption(option);
|
|
371
|
+
};
|
|
372
|
+
// mousedown already toggled the option. Without this, a click on the chip reaches the
|
|
373
|
+
// checkbox through its label and toggles it a second time.
|
|
374
|
+
this.handleOptionClick = (e) => {
|
|
375
|
+
e.preventDefault();
|
|
376
|
+
};
|
|
377
|
+
this.handleOptionMouseEnter = (index, option) => () => {
|
|
378
|
+
if (option.disabled)
|
|
379
|
+
return;
|
|
380
|
+
this.highlightedIndex = index;
|
|
381
|
+
};
|
|
382
|
+
this.handleOptionActionMouseDown = (e) => {
|
|
383
|
+
// Stops the row's mousedown from toggling the option, and keeps focus in the search input.
|
|
384
|
+
e.preventDefault();
|
|
385
|
+
e.stopPropagation();
|
|
386
|
+
};
|
|
387
|
+
this.handleOptionActionClick = (option) => () => {
|
|
388
|
+
this.runOptionAction(option);
|
|
389
|
+
};
|
|
390
|
+
// Keeps focus in the search input so the panel stays open until the footer's click lands.
|
|
391
|
+
this.handleFooterMouseDown = (e) => {
|
|
392
|
+
e.preventDefault();
|
|
393
|
+
};
|
|
394
|
+
this.handleScroll = (e) => {
|
|
395
|
+
if (!this.asyncUrl || !this.hasMore || this.loading)
|
|
396
|
+
return;
|
|
397
|
+
const target = e.target;
|
|
398
|
+
const scrollBottom = target.scrollHeight - target.scrollTop - target.clientHeight;
|
|
399
|
+
// Load more when near bottom (within 50px)
|
|
400
|
+
if (scrollBottom < 50) {
|
|
401
|
+
this.pdsMultiselectLoadOptions.emit({
|
|
402
|
+
query: this.searchQuery,
|
|
403
|
+
page: this.currentPage + 1,
|
|
404
|
+
});
|
|
405
|
+
this.debouncedFetchAsyncOptions(this.searchQuery, this.currentPage + 1);
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
this.handlePillRemove = (item) => () => {
|
|
409
|
+
var _a, _b;
|
|
410
|
+
if (this.disabled)
|
|
411
|
+
return;
|
|
412
|
+
const optionId = String(item.id);
|
|
413
|
+
this.value = this.value.filter(v => v !== optionId);
|
|
414
|
+
this.syncSelectedItems();
|
|
415
|
+
this.emitChange({ removed: [optionId] });
|
|
416
|
+
// Clear first so screen readers re-announce even when the same item is removed twice
|
|
417
|
+
this.removalAnnouncement = '';
|
|
418
|
+
queueMicrotask(() => { this.removalAnnouncement = formatMessage(this.itemRemovedLabel, { item: item.text }); });
|
|
419
|
+
this.isClosingViaSelection = true;
|
|
420
|
+
if (this.isOpen) {
|
|
421
|
+
(_a = this.searchInputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
(_b = this.activeTriggerEl) === null || _b === void 0 ? void 0 : _b.focus();
|
|
425
|
+
}
|
|
426
|
+
setTimeout(() => { this.isClosingViaSelection = false; }, 0);
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
connectedCallback() {
|
|
430
|
+
// Initialize ElementInternals for form association (only once per element instance)
|
|
431
|
+
if (this.el.attachInternals && !this.internals) {
|
|
432
|
+
this.internals = this.el.attachInternals();
|
|
433
|
+
}
|
|
434
|
+
this.syncTruncationTooltips();
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Form Associated Custom Elements API: Called when the form is disabled
|
|
438
|
+
*/
|
|
439
|
+
formDisabledCallback(disabled) {
|
|
440
|
+
// Also fires when this element's own `disabled` attribute is merely present, even as the
|
|
441
|
+
// literal string "false" (a consumer's or React's attribute serialization can write that) —
|
|
442
|
+
// the platform treats any value as disabled, independent of fieldset state. A real disabled
|
|
443
|
+
// fieldset ancestor confirms this is genuinely that, not this element's own attribute.
|
|
444
|
+
if (disabled && !this.el.closest('fieldset[disabled]'))
|
|
445
|
+
return;
|
|
446
|
+
this.disabled = disabled;
|
|
447
|
+
}
|
|
448
|
+
componentWillLoad() {
|
|
449
|
+
this.originalSearchEmitter = this.pdsMultiselectSearch;
|
|
450
|
+
this.syncSelectedItems();
|
|
451
|
+
this.syncSlottedTrigger();
|
|
452
|
+
}
|
|
453
|
+
componentDidLoad() {
|
|
454
|
+
this.setupDebounce();
|
|
455
|
+
this.setupMutationObserver();
|
|
456
|
+
this.setupSlotChangeListener();
|
|
457
|
+
this.updateFormValue();
|
|
458
|
+
// Ensure preselected values sync after DOM is fully ready
|
|
459
|
+
// This handles cases where slot content loads after initial render (e.g., in docs/MDX)
|
|
460
|
+
requestAnimationFrame(() => {
|
|
461
|
+
this.updateOptionsFromSlot();
|
|
462
|
+
this.syncSelectedItems();
|
|
463
|
+
});
|
|
464
|
+
// If we have preselected values and asyncUrl, fetch options to resolve them
|
|
465
|
+
// This ensures the trigger shows "X items" instead of placeholder on initial render
|
|
466
|
+
if (this.asyncUrl && this.ensureValueArray().length > 0) {
|
|
467
|
+
this.initialAsyncFetchTriggered = true;
|
|
468
|
+
this.fetchOptions('', 1);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
setupSlotChangeListener() {
|
|
472
|
+
var _a;
|
|
473
|
+
const slot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot:not([name])');
|
|
474
|
+
if (slot) {
|
|
475
|
+
slot.addEventListener('slotchange', () => {
|
|
476
|
+
this.updateOptionsFromSlot();
|
|
477
|
+
this.syncSelectedItems();
|
|
478
|
+
});
|
|
479
|
+
// Also call it immediately in case content is already slotted
|
|
480
|
+
this.updateOptionsFromSlot();
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
componentDidRender() {
|
|
484
|
+
this.syncTruncationTooltips();
|
|
485
|
+
}
|
|
486
|
+
syncTruncationTooltips() {
|
|
487
|
+
var _a;
|
|
488
|
+
const root = this.el.shadowRoot;
|
|
489
|
+
this.triggerTextTooltip.sync([root === null || root === void 0 ? void 0 : root.querySelector('.pds-multiselect__trigger-text')]);
|
|
490
|
+
this.selectedItemTooltips.sync((_a = root === null || root === void 0 ? void 0 : root.querySelectorAll('.pds-multiselect__selected-item')) !== null && _a !== void 0 ? _a : []);
|
|
491
|
+
}
|
|
492
|
+
disconnectedCallback() {
|
|
493
|
+
var _a, _b;
|
|
494
|
+
this.triggerTextTooltip.destroy();
|
|
495
|
+
this.selectedItemTooltips.destroy();
|
|
496
|
+
cancelDebouncedEvent(this.pdsMultiselectSearch);
|
|
497
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
498
|
+
(_b = this.cleanupAutoUpdate) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
499
|
+
this.clearAsyncFetchState();
|
|
500
|
+
}
|
|
501
|
+
setupDebounce() {
|
|
502
|
+
const { pdsMultiselectSearch, debounce, originalSearchEmitter } = this;
|
|
503
|
+
this.pdsMultiselectSearch = debounce === undefined
|
|
504
|
+
? originalSearchEmitter !== null && originalSearchEmitter !== void 0 ? originalSearchEmitter : pdsMultiselectSearch
|
|
505
|
+
: debounceEvent(pdsMultiselectSearch, debounce);
|
|
506
|
+
// After the swap, so an emit made while flushing goes to the new emitter, not the old one.
|
|
507
|
+
flushDebouncedEvent(pdsMultiselectSearch);
|
|
508
|
+
}
|
|
509
|
+
valueChanged(newValue) {
|
|
510
|
+
// Handle JSON string values (from HTML attributes)
|
|
511
|
+
if (typeof newValue === 'string') {
|
|
512
|
+
try {
|
|
513
|
+
const parsed = JSON.parse(newValue);
|
|
514
|
+
if (Array.isArray(parsed)) {
|
|
515
|
+
this.value = parsed;
|
|
516
|
+
return; // The assignment will trigger this watcher again with the array
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
catch (_a) {
|
|
520
|
+
// Not valid JSON, treat as single value
|
|
521
|
+
this.value = newValue ? [newValue] : [];
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
this.syncSelectedItems();
|
|
526
|
+
this.updateFormValue();
|
|
527
|
+
// If using asyncUrl and some values couldn't be resolved, fetch options
|
|
528
|
+
// This handles programmatic value changes where the options aren't loaded yet
|
|
529
|
+
if (this.asyncUrl) {
|
|
530
|
+
const valueArray = this.ensureValueArray();
|
|
531
|
+
const hasUnresolvedValues = valueArray.length > 0 && this.selectedItems.length < valueArray.length;
|
|
532
|
+
if (hasUnresolvedValues) {
|
|
533
|
+
if (this.loading) {
|
|
534
|
+
// Mark that we need to re-check after current fetch completes
|
|
535
|
+
this.pendingUnresolvedFetch = true;
|
|
536
|
+
}
|
|
537
|
+
else {
|
|
538
|
+
this.fetchOptions('', 1);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
optionsChanged() {
|
|
544
|
+
if (this.options) {
|
|
545
|
+
this.internalOptions = [...this.options];
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
internalOptionsChanged() {
|
|
549
|
+
// Re-sync selected items when options become available
|
|
550
|
+
// This handles the case where value is set before options are loaded (e.g., from slot)
|
|
551
|
+
this.syncSelectedItems();
|
|
552
|
+
}
|
|
553
|
+
isOpenChanged() {
|
|
554
|
+
var _a;
|
|
555
|
+
(_a = this.slottedTriggerEl) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-expanded', String(this.isOpen));
|
|
556
|
+
}
|
|
557
|
+
disabledChanged(disabled) {
|
|
558
|
+
var _a, _b;
|
|
559
|
+
this.syncSlottedTrigger();
|
|
560
|
+
// A disabled control can't stay open, or its options could still be toggled.
|
|
561
|
+
if (!disabled || !this.isOpen)
|
|
562
|
+
return;
|
|
563
|
+
const activeElement = document.activeElement;
|
|
564
|
+
const focusInside = !!(((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(activeElement)) || this.el.contains(activeElement));
|
|
565
|
+
this.closeDropdown();
|
|
566
|
+
// A disabled built-in trigger can't take focus back (falls to <body>, as natively); a slotted
|
|
567
|
+
// trigger without its own disabled property only gets aria-disabled and stays focusable, so
|
|
568
|
+
// focus would otherwise stay stranded on the closed panel's former content.
|
|
569
|
+
if (focusInside)
|
|
570
|
+
(_b = this.activeTriggerEl) === null || _b === void 0 ? void 0 : _b.focus();
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Sets focus on the trigger button.
|
|
574
|
+
*/
|
|
575
|
+
async setFocus() {
|
|
576
|
+
var _a;
|
|
577
|
+
(_a = this.activeTriggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Clears all selected values and resets the component. Works while disabled too, as setting a
|
|
581
|
+
* native control's value from script does.
|
|
582
|
+
*/
|
|
583
|
+
async clear() {
|
|
584
|
+
const hadValues = this.value.length > 0 || this.searchQuery !== '';
|
|
585
|
+
const removed = this.ensureValueArray();
|
|
586
|
+
this.value = [];
|
|
587
|
+
this.searchQuery = '';
|
|
588
|
+
this.syncSelectedItems();
|
|
589
|
+
this.updateFormValue();
|
|
590
|
+
if (hadValues) {
|
|
591
|
+
this.emitChange({ removed });
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Refetches the first page of options from `asyncUrl` for the current search, such as after an option is renamed
|
|
596
|
+
* or recolored elsewhere. Selected items in that page pick up the new text and dot color without emitting a change;
|
|
597
|
+
* other selected items keep the text and dot color they were last loaded with. Does nothing without `asyncUrl`.
|
|
598
|
+
*/
|
|
599
|
+
async refreshOptions() {
|
|
600
|
+
await this.fetchOptions(this.searchQuery, 1);
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Handle global keyboard events for accessibility.
|
|
604
|
+
* Closes dropdown on Escape key press regardless of focus location. Taken in document's capture
|
|
605
|
+
* phase, before a modal around the multiselect hears it on document and closes too.
|
|
606
|
+
*/
|
|
607
|
+
handleWindowKeyDown(event) {
|
|
608
|
+
var _a;
|
|
609
|
+
if (!this.isOpen || event.defaultPrevented)
|
|
610
|
+
return;
|
|
611
|
+
if (event.key === 'Escape') {
|
|
612
|
+
event.preventDefault();
|
|
613
|
+
this.pdsMultiselectDismiss.emit();
|
|
614
|
+
this.closeDropdown();
|
|
615
|
+
(_a = this.activeTriggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
get activeTriggerEl() {
|
|
619
|
+
var _a;
|
|
620
|
+
return (_a = this.slottedTriggerEl) !== null && _a !== void 0 ? _a : this.triggerEl;
|
|
621
|
+
}
|
|
622
|
+
syncSlottedTrigger() {
|
|
623
|
+
const trigger = Array.from(this.el.children).find(child => child.getAttribute('slot') === 'trigger');
|
|
624
|
+
if (trigger !== this.slottedTriggerEl) {
|
|
625
|
+
const previous = this.slottedTriggerEl;
|
|
626
|
+
if (previous) {
|
|
627
|
+
previous.removeEventListener('click', this.handleTriggerClick);
|
|
628
|
+
previous.removeEventListener('keydown', this.handleTriggerKeyDown);
|
|
629
|
+
previous.removeAttribute('aria-expanded');
|
|
630
|
+
previous.removeAttribute('aria-haspopup');
|
|
631
|
+
previous.removeAttribute('aria-disabled');
|
|
632
|
+
this.setSlottedTriggerDisabled(previous, false);
|
|
633
|
+
}
|
|
634
|
+
trigger === null || trigger === void 0 ? void 0 : trigger.addEventListener('click', this.handleTriggerClick);
|
|
635
|
+
trigger === null || trigger === void 0 ? void 0 : trigger.addEventListener('keydown', this.handleTriggerKeyDown);
|
|
636
|
+
this.slottedTriggerEl = trigger;
|
|
637
|
+
}
|
|
638
|
+
if (!trigger)
|
|
639
|
+
return;
|
|
640
|
+
trigger.setAttribute('aria-haspopup', 'listbox');
|
|
641
|
+
trigger.setAttribute('aria-expanded', String(this.isOpen));
|
|
642
|
+
if (this.disabled) {
|
|
643
|
+
trigger.setAttribute('aria-disabled', 'true');
|
|
644
|
+
}
|
|
645
|
+
else {
|
|
646
|
+
trigger.removeAttribute('aria-disabled');
|
|
647
|
+
}
|
|
648
|
+
this.setSlottedTriggerDisabled(trigger, this.disabled);
|
|
649
|
+
}
|
|
650
|
+
setSlottedTriggerDisabled(trigger, disabled) {
|
|
651
|
+
if (!('disabled' in trigger)) {
|
|
652
|
+
// A custom element gets its `disabled` property once it's defined, which can be after the multiselect loads.
|
|
653
|
+
if (disabled && trigger.localName.includes('-') && customElements.get(trigger.localName) === undefined) {
|
|
654
|
+
customElements.whenDefined(trigger.localName).then(() => this.syncSlottedTrigger());
|
|
655
|
+
}
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
const control = trigger;
|
|
659
|
+
// Only re-enable a trigger the multiselect disabled, so one the consumer disabled stays disabled.
|
|
660
|
+
if (disabled && !control.disabled) {
|
|
661
|
+
control.disabled = true;
|
|
662
|
+
this.hasDisabledSlottedTrigger = true;
|
|
663
|
+
}
|
|
664
|
+
else if (!disabled && this.hasDisabledSlottedTrigger) {
|
|
665
|
+
control.disabled = false;
|
|
666
|
+
this.hasDisabledSlottedTrigger = false;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
setupMutationObserver() {
|
|
670
|
+
this.observer = new MutationObserver(records => {
|
|
671
|
+
if (records.some(record => record.target === this.el)) {
|
|
672
|
+
this.syncSlottedTrigger();
|
|
673
|
+
}
|
|
674
|
+
// Changes inside the slotted trigger, like re-rendered chips, can't change the options.
|
|
675
|
+
const trigger = this.slottedTriggerEl;
|
|
676
|
+
if (!trigger || records.some(record => !trigger.contains(record.target))) {
|
|
677
|
+
this.updateOptionsFromSlot();
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
this.observer.observe(this.el, {
|
|
681
|
+
childList: true,
|
|
682
|
+
subtree: true,
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
updateOptionsFromSlot() {
|
|
686
|
+
var _a;
|
|
687
|
+
const slot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot:not([name])');
|
|
688
|
+
if (!slot)
|
|
689
|
+
return;
|
|
690
|
+
const options = [];
|
|
691
|
+
slot.assignedElements({ flatten: true }).forEach(el => {
|
|
692
|
+
if (el.tagName === 'OPTGROUP') {
|
|
693
|
+
const optgroup = el;
|
|
694
|
+
const groupLabel = optgroup.label;
|
|
695
|
+
const groupDisabled = optgroup.disabled;
|
|
696
|
+
optgroup.querySelectorAll('option').forEach((opt) => {
|
|
697
|
+
const option = this.parseSlottedOption(opt, groupDisabled);
|
|
698
|
+
if (groupLabel) {
|
|
699
|
+
option.group = groupLabel;
|
|
700
|
+
}
|
|
701
|
+
options.push(option);
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
else if (el.tagName === 'OPTION') {
|
|
705
|
+
options.push(this.parseSlottedOption(el, false));
|
|
706
|
+
}
|
|
707
|
+
});
|
|
708
|
+
// Only update if we actually found options AND we're not using async/external options
|
|
709
|
+
// Don't clear internalOptions if slot returns empty (might be mid-DOM-update)
|
|
710
|
+
if (options.length > 0 && !this.asyncUrl && !this.options) {
|
|
711
|
+
this.internalOptions = options;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
parseSlottedOption(opt, groupDisabled) {
|
|
715
|
+
var _a;
|
|
716
|
+
const option = {
|
|
717
|
+
id: opt.value,
|
|
718
|
+
text: ((_a = opt.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || opt.value,
|
|
719
|
+
disabled: opt.disabled || groupDisabled || undefined,
|
|
720
|
+
};
|
|
721
|
+
const dotColor = opt.getAttribute('data-dot-color');
|
|
722
|
+
if (dotColor) {
|
|
723
|
+
option.dotColor = dotColor;
|
|
724
|
+
}
|
|
725
|
+
const actionIcon = opt.getAttribute('data-action-icon');
|
|
726
|
+
if (actionIcon) {
|
|
727
|
+
option.actionIcon = actionIcon;
|
|
728
|
+
}
|
|
729
|
+
const actionLabel = opt.getAttribute('data-action-label');
|
|
730
|
+
if (actionLabel) {
|
|
731
|
+
option.actionLabel = actionLabel;
|
|
732
|
+
}
|
|
733
|
+
return option;
|
|
734
|
+
}
|
|
735
|
+
clearAsyncFetchState() {
|
|
736
|
+
var _a;
|
|
737
|
+
if (this.fetchDebounceTimer !== undefined) {
|
|
738
|
+
window.clearTimeout(this.fetchDebounceTimer);
|
|
739
|
+
this.fetchDebounceTimer = undefined;
|
|
740
|
+
}
|
|
741
|
+
if (this.fetchTimeoutTimer !== undefined) {
|
|
742
|
+
window.clearTimeout(this.fetchTimeoutTimer);
|
|
743
|
+
this.fetchTimeoutTimer = undefined;
|
|
744
|
+
}
|
|
745
|
+
(_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
746
|
+
this.abortController = undefined;
|
|
747
|
+
}
|
|
748
|
+
debouncedFetchAsyncOptions(query, page = 1) {
|
|
749
|
+
var _a;
|
|
750
|
+
if (!this.asyncUrl)
|
|
751
|
+
return;
|
|
752
|
+
if (this.fetchDebounceTimer !== undefined) {
|
|
753
|
+
window.clearTimeout(this.fetchDebounceTimer);
|
|
754
|
+
}
|
|
755
|
+
const delay = Math.max(0, (_a = this.debounce) !== null && _a !== void 0 ? _a : 0);
|
|
756
|
+
this.fetchDebounceTimer = window.setTimeout(() => {
|
|
757
|
+
this.fetchDebounceTimer = undefined;
|
|
758
|
+
this.fetchOptions(query, page);
|
|
759
|
+
}, delay);
|
|
760
|
+
}
|
|
761
|
+
syncSelectedItems() {
|
|
762
|
+
// Ensure value is an array (may be string from HTML attribute)
|
|
763
|
+
const valueArray = this.ensureValueArray();
|
|
764
|
+
const allOptions = this.getAllOptions();
|
|
765
|
+
// Map values to options, preserving existing selectedItems for values not yet in options
|
|
766
|
+
const newSelectedItems = [];
|
|
767
|
+
const existingItemsMap = new Map(this.selectedItems.map(item => [String(item.id), item]));
|
|
768
|
+
valueArray.forEach(val => {
|
|
769
|
+
// First try to find in available options
|
|
770
|
+
const option = allOptions.find(opt => String(opt.id) === String(val));
|
|
771
|
+
if (option) {
|
|
772
|
+
newSelectedItems.push(option);
|
|
773
|
+
}
|
|
774
|
+
else if (existingItemsMap.has(String(val))) {
|
|
775
|
+
// If not in options but exists in current selectedItems, preserve it
|
|
776
|
+
// This handles the case where async data hasn't loaded yet or newly created items
|
|
777
|
+
newSelectedItems.push(existingItemsMap.get(String(val)));
|
|
778
|
+
}
|
|
779
|
+
// Note: We don't create placeholders for values without matching options.
|
|
780
|
+
// This ensures selectedItems remains empty until options are actually loaded,
|
|
781
|
+
// which matches the expected behavior for preselected values.
|
|
782
|
+
});
|
|
783
|
+
this.selectedItems = newSelectedItems;
|
|
784
|
+
}
|
|
785
|
+
ensureValueArray() {
|
|
786
|
+
// Handle JSON string values passed via HTML attribute
|
|
787
|
+
if (typeof this.value === 'string') {
|
|
788
|
+
try {
|
|
789
|
+
const parsed = JSON.parse(this.value);
|
|
790
|
+
if (Array.isArray(parsed)) {
|
|
791
|
+
this.value = parsed;
|
|
792
|
+
return parsed;
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
catch (_a) {
|
|
796
|
+
// Not valid JSON, treat as single value
|
|
797
|
+
const singleValue = this.value;
|
|
798
|
+
this.value = singleValue ? [singleValue] : [];
|
|
799
|
+
return this.value;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
return Array.isArray(this.value) ? this.value : [];
|
|
803
|
+
}
|
|
804
|
+
getAllOptions() {
|
|
805
|
+
return this.options || this.internalOptions;
|
|
806
|
+
}
|
|
807
|
+
getFilteredOptions() {
|
|
808
|
+
const allOptions = this.getAllOptions();
|
|
809
|
+
const query = this.searchQuery.toLowerCase();
|
|
810
|
+
const filtered = allOptions.filter(opt => {
|
|
811
|
+
// Filter by search query only - don't filter out selected items
|
|
812
|
+
if (query) {
|
|
813
|
+
return opt.text.toLowerCase().includes(query);
|
|
814
|
+
}
|
|
815
|
+
return true;
|
|
816
|
+
});
|
|
817
|
+
// Add create option if enabled and no matches found
|
|
818
|
+
if (this.createUrl && this.searchQuery.trim() && filtered.length === 0) {
|
|
819
|
+
return [{
|
|
820
|
+
id: '__create__',
|
|
821
|
+
text: this.searchQuery.trim(),
|
|
822
|
+
isCreateOption: true,
|
|
823
|
+
}];
|
|
824
|
+
}
|
|
825
|
+
return filtered;
|
|
826
|
+
}
|
|
827
|
+
updateFormValue() {
|
|
828
|
+
var _a;
|
|
829
|
+
if (isSpecTest())
|
|
830
|
+
return;
|
|
831
|
+
if ((_a = this.internals) === null || _a === void 0 ? void 0 : _a.setFormValue) {
|
|
832
|
+
// Ensure value is an array before iterating
|
|
833
|
+
const valueArray = this.ensureValueArray();
|
|
834
|
+
// Submit as multiple values with same name (native select multiple behavior)
|
|
835
|
+
const formData = new FormData();
|
|
836
|
+
valueArray.forEach(val => {
|
|
837
|
+
if (this.name) {
|
|
838
|
+
formData.append(this.name, val);
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
this.internals.setFormValue(formData);
|
|
842
|
+
// Update validity state for required validation
|
|
843
|
+
if (this.required && valueArray.length === 0) {
|
|
844
|
+
this.internals.setValidity({ valueMissing: true }, 'Please select at least one option.', this.activeTriggerEl);
|
|
845
|
+
}
|
|
846
|
+
else {
|
|
847
|
+
this.internals.setValidity({});
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
getCsrfToken() {
|
|
852
|
+
// Use provided token if available
|
|
853
|
+
if (this.csrfToken) {
|
|
854
|
+
return this.csrfToken;
|
|
855
|
+
}
|
|
856
|
+
// Try to read from meta tag
|
|
857
|
+
const metaTag = document.querySelector('meta[name="csrf-token"]');
|
|
858
|
+
return (metaTag === null || metaTag === void 0 ? void 0 : metaTag.content) || null;
|
|
859
|
+
}
|
|
860
|
+
async fetchOptions(query, page = 1) {
|
|
861
|
+
var _a;
|
|
862
|
+
if (!this.asyncUrl)
|
|
863
|
+
return;
|
|
864
|
+
// Abort any pending request and clear existing timeout
|
|
865
|
+
(_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
866
|
+
if (this.fetchTimeoutTimer !== undefined) {
|
|
867
|
+
window.clearTimeout(this.fetchTimeoutTimer);
|
|
868
|
+
this.fetchTimeoutTimer = undefined;
|
|
869
|
+
}
|
|
870
|
+
this.abortController = new AbortController();
|
|
871
|
+
this.loading = true;
|
|
872
|
+
// Set up timeout for fetch request
|
|
873
|
+
this.fetchTimeoutTimer = window.setTimeout(() => {
|
|
874
|
+
var _a;
|
|
875
|
+
(_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
876
|
+
this.fetchTimeoutTimer = undefined;
|
|
877
|
+
}, this.fetchTimeout);
|
|
878
|
+
try {
|
|
879
|
+
// Guard against malformed asyncUrl
|
|
880
|
+
let url;
|
|
881
|
+
try {
|
|
882
|
+
url = new URL(this.asyncUrl, window.location.origin);
|
|
883
|
+
}
|
|
884
|
+
catch (urlError) {
|
|
885
|
+
throw new TypeError(`Invalid asyncUrl: ${this.asyncUrl}`);
|
|
886
|
+
}
|
|
887
|
+
if (this.asyncMethod === 'GET') {
|
|
888
|
+
url.searchParams.set('search', query);
|
|
889
|
+
url.searchParams.set('page', String(page));
|
|
890
|
+
}
|
|
891
|
+
const csrfToken = this.getCsrfToken();
|
|
892
|
+
const headers = {
|
|
893
|
+
'Content-Type': 'application/json',
|
|
894
|
+
'Accept': 'application/json',
|
|
895
|
+
};
|
|
896
|
+
if (csrfToken) {
|
|
897
|
+
const headerName = this.csrfHeaderName || 'X-CSRF-Token';
|
|
898
|
+
headers[headerName] = csrfToken;
|
|
899
|
+
}
|
|
900
|
+
const response = await fetch(url.toString(), Object.assign({ method: this.asyncMethod, signal: this.abortController.signal, headers }, (this.asyncMethod === 'POST' && {
|
|
901
|
+
body: JSON.stringify({ search: query, page }),
|
|
902
|
+
})));
|
|
903
|
+
// Clear timeout on successful response
|
|
904
|
+
if (this.fetchTimeoutTimer !== undefined) {
|
|
905
|
+
window.clearTimeout(this.fetchTimeoutTimer);
|
|
906
|
+
this.fetchTimeoutTimer = undefined;
|
|
907
|
+
}
|
|
908
|
+
if (!response.ok)
|
|
909
|
+
throw new Error('Failed to fetch options');
|
|
910
|
+
const data = await response.json();
|
|
911
|
+
const formattedResults = data.results.map(item => {
|
|
912
|
+
// If formatResult is provided, use it
|
|
913
|
+
if (this.formatResult) {
|
|
914
|
+
return this.formatResult(item);
|
|
915
|
+
}
|
|
916
|
+
// Defensive check: ensure item is an object before spreading
|
|
917
|
+
if (typeof item === 'object' && item !== null) {
|
|
918
|
+
return Object.assign({ id: item.id, text: item.text }, item);
|
|
919
|
+
}
|
|
920
|
+
// Handle primitives by converting to safe shape
|
|
921
|
+
return {
|
|
922
|
+
id: String(item),
|
|
923
|
+
text: String(item),
|
|
924
|
+
};
|
|
925
|
+
});
|
|
926
|
+
if (page === 1) {
|
|
927
|
+
this.internalOptions = formattedResults;
|
|
928
|
+
}
|
|
929
|
+
else {
|
|
930
|
+
this.internalOptions = [...this.internalOptions, ...formattedResults];
|
|
931
|
+
}
|
|
932
|
+
this.hasMore = data.totalCount ? this.internalOptions.length < data.totalCount : false;
|
|
933
|
+
this.currentPage = page;
|
|
934
|
+
}
|
|
935
|
+
catch (error) {
|
|
936
|
+
// Clear timeout on error
|
|
937
|
+
if (this.fetchTimeoutTimer !== undefined) {
|
|
938
|
+
window.clearTimeout(this.fetchTimeoutTimer);
|
|
939
|
+
this.fetchTimeoutTimer = undefined;
|
|
940
|
+
}
|
|
941
|
+
if (error.name !== 'AbortError') {
|
|
942
|
+
console.error('PdsMultiselect: Failed to fetch options', error);
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
finally {
|
|
946
|
+
this.loading = false;
|
|
947
|
+
// Check if value changed during loading and still has unresolved values
|
|
948
|
+
if (this.pendingUnresolvedFetch) {
|
|
949
|
+
this.pendingUnresolvedFetch = false;
|
|
950
|
+
const valueArray = this.ensureValueArray();
|
|
951
|
+
const hasUnresolvedValues = valueArray.length > 0 && this.selectedItems.length < valueArray.length;
|
|
952
|
+
if (hasUnresolvedValues) {
|
|
953
|
+
this.fetchOptions('', 1);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
async createOption(query) {
|
|
959
|
+
if (!this.createUrl || !query.trim())
|
|
960
|
+
return;
|
|
961
|
+
// Reentrancy guard: prevent duplicate POSTs if creation is already in-flight
|
|
962
|
+
if (this.creating)
|
|
963
|
+
return;
|
|
964
|
+
this.creating = true;
|
|
965
|
+
try {
|
|
966
|
+
const url = new URL(this.createUrl, window.location.origin);
|
|
967
|
+
const csrfToken = this.getCsrfToken();
|
|
968
|
+
const headers = {
|
|
969
|
+
'Content-Type': 'application/json',
|
|
970
|
+
'Accept': 'application/json',
|
|
971
|
+
};
|
|
972
|
+
if (csrfToken) {
|
|
973
|
+
const headerName = this.csrfHeaderName || 'X-CSRF-Token';
|
|
974
|
+
headers[headerName] = csrfToken;
|
|
975
|
+
}
|
|
976
|
+
const response = await fetch(url.toString(), {
|
|
977
|
+
method: 'POST',
|
|
978
|
+
headers,
|
|
979
|
+
body: JSON.stringify({ text: query.trim() }),
|
|
980
|
+
});
|
|
981
|
+
if (!response.ok)
|
|
982
|
+
throw new Error('Failed to create option');
|
|
983
|
+
const data = await response.json();
|
|
984
|
+
const newOption = Object.assign({ id: data.id, text: data.text }, data);
|
|
985
|
+
// Add to internal options first
|
|
986
|
+
this.internalOptions = [...this.internalOptions, newOption];
|
|
987
|
+
// Select the new option
|
|
988
|
+
this.value = [...this.value, String(newOption.id)];
|
|
989
|
+
// Sync selected items to update display with new option
|
|
990
|
+
this.syncSelectedItems();
|
|
991
|
+
// Emit create event
|
|
992
|
+
this.pdsMultiselectCreate.emit({
|
|
993
|
+
query: query.trim(),
|
|
994
|
+
newOption,
|
|
995
|
+
});
|
|
996
|
+
// Emit change event with synced items
|
|
997
|
+
this.emitChange({ added: [String(newOption.id)] });
|
|
998
|
+
// Clear search and keep dropdown open
|
|
999
|
+
this.searchQuery = '';
|
|
1000
|
+
this.highlightedIndex = -1;
|
|
1001
|
+
// Focus back on search input
|
|
1002
|
+
requestAnimationFrame(() => {
|
|
1003
|
+
var _a;
|
|
1004
|
+
(_a = this.searchInputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
catch (error) {
|
|
1008
|
+
console.error('PdsMultiselect: Failed to create option', error);
|
|
1009
|
+
}
|
|
1010
|
+
finally {
|
|
1011
|
+
this.creating = false;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
tabPastOptions(e) {
|
|
1015
|
+
const firstFooterTabbable = e.shiftKey ? undefined : this.getFooterTabbables()[0];
|
|
1016
|
+
firstFooterTabbable === null || firstFooterTabbable === void 0 ? void 0 : firstFooterTabbable.focus();
|
|
1017
|
+
if (firstFooterTabbable === null || firstFooterTabbable === void 0 ? void 0 : firstFooterTabbable.matches(':focus')) {
|
|
1018
|
+
// Each option's checkbox is a tab stop, so jump past them to the footer.
|
|
1019
|
+
e.preventDefault();
|
|
1020
|
+
}
|
|
1021
|
+
else {
|
|
1022
|
+
this.closeDropdown();
|
|
1023
|
+
// Tab would move on to an option's checkbox, which closing removes, dropping focus to the page.
|
|
1024
|
+
// Land on the trigger instead, as Escape does; Shift+Tab already reaches it.
|
|
1025
|
+
const trigger = e.shiftKey ? undefined : this.activeTriggerEl;
|
|
1026
|
+
trigger === null || trigger === void 0 ? void 0 : trigger.focus();
|
|
1027
|
+
if (trigger === null || trigger === void 0 ? void 0 : trigger.matches(':focus'))
|
|
1028
|
+
e.preventDefault();
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
getSelectedItemTabbables() {
|
|
1032
|
+
return Array.from(this.el.shadowRoot.querySelectorAll('.pds-multiselect__selected-item[tabindex="0"]'));
|
|
1033
|
+
}
|
|
1034
|
+
getFooterTabbables() {
|
|
1035
|
+
const candidates = [];
|
|
1036
|
+
Array.from(this.el.children)
|
|
1037
|
+
.filter(child => child.getAttribute('slot') === 'footer')
|
|
1038
|
+
.forEach(content => candidates.push(content, ...Array.from(content.querySelectorAll('*'))));
|
|
1039
|
+
// Browsers without checkVisibility (Safari before 17.4) count every control as visible.
|
|
1040
|
+
return candidates
|
|
1041
|
+
.map(el => { var _a; return (el.matches(TABBABLE_SELECTOR) ? el : (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(TABBABLE_SELECTOR)); })
|
|
1042
|
+
.filter((el) => { var _a, _b; return !!el && ((_b = (_a = el.checkVisibility) === null || _a === void 0 ? void 0 : _a.call(el)) !== null && _b !== void 0 ? _b : true); });
|
|
1043
|
+
}
|
|
1044
|
+
isCaretAtEndOfSearch() {
|
|
1045
|
+
var _a, _b;
|
|
1046
|
+
const input = this.searchInputEl;
|
|
1047
|
+
if (!input)
|
|
1048
|
+
return true;
|
|
1049
|
+
const end = input.value.length;
|
|
1050
|
+
return ((_a = input.selectionStart) !== null && _a !== void 0 ? _a : end) === end && ((_b = input.selectionEnd) !== null && _b !== void 0 ? _b : end) === end;
|
|
1051
|
+
}
|
|
1052
|
+
hasOptionAction(option) {
|
|
1053
|
+
return (this.optionActions &&
|
|
1054
|
+
typeof option.actionIcon === 'string' &&
|
|
1055
|
+
PINE_ICON_NAME.test(option.actionIcon) &&
|
|
1056
|
+
!option.isCreateOption &&
|
|
1057
|
+
!option.disabled);
|
|
1058
|
+
}
|
|
1059
|
+
// Without hover, revealing the icon would take a tap that also toggles the option, so touch shows every icon.
|
|
1060
|
+
get isHoverless() {
|
|
1061
|
+
var _a, _b, _c;
|
|
1062
|
+
(_a = this.hoverlessQuery) !== null && _a !== void 0 ? _a : (this.hoverlessQuery = (_b = window.matchMedia) === null || _b === void 0 ? void 0 : _b.call(window, '(hover: none)'));
|
|
1063
|
+
return !!((_c = this.hoverlessQuery) === null || _c === void 0 ? void 0 : _c.matches);
|
|
1064
|
+
}
|
|
1065
|
+
runOptionAction(option) {
|
|
1066
|
+
var _a;
|
|
1067
|
+
this.isClosingViaSelection = true;
|
|
1068
|
+
this.closeDropdown();
|
|
1069
|
+
(_a = this.activeTriggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
1070
|
+
this.pdsMultiselectOptionAction.emit({ option });
|
|
1071
|
+
}
|
|
1072
|
+
openDropdown() {
|
|
1073
|
+
if (this.disabled)
|
|
1074
|
+
return;
|
|
1075
|
+
this.isOpening = true;
|
|
1076
|
+
this.isOpen = true;
|
|
1077
|
+
this.highlightedIndex = -1;
|
|
1078
|
+
// Trigger initial fetch if async (skip if already fetching from componentDidLoad)
|
|
1079
|
+
if (this.asyncUrl && this.internalOptions.length === 0 && !this.initialAsyncFetchTriggered) {
|
|
1080
|
+
this.debouncedFetchAsyncOptions(this.searchQuery, 1);
|
|
1081
|
+
}
|
|
1082
|
+
// Reset the flag so subsequent opens can fetch if needed
|
|
1083
|
+
this.initialAsyncFetchTriggered = false;
|
|
1084
|
+
requestAnimationFrame(() => {
|
|
1085
|
+
var _a;
|
|
1086
|
+
this.positionDropdown();
|
|
1087
|
+
// Focus the search input after the panel is positioned
|
|
1088
|
+
(_a = this.searchInputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
1089
|
+
// Clear the opening flag after focus has moved
|
|
1090
|
+
setTimeout(() => {
|
|
1091
|
+
this.isOpening = false;
|
|
1092
|
+
}, 50);
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
closeDropdown() {
|
|
1096
|
+
this.isOpen = false;
|
|
1097
|
+
this.highlightedIndex = -1;
|
|
1098
|
+
this.searchQuery = '';
|
|
1099
|
+
// Reset the selection-close guard after the focusout handler's setTimeout has resolved
|
|
1100
|
+
if (this.isClosingViaSelection) {
|
|
1101
|
+
setTimeout(() => {
|
|
1102
|
+
this.isClosingViaSelection = false;
|
|
1103
|
+
}, 0);
|
|
1104
|
+
}
|
|
1105
|
+
// Clean up auto-update
|
|
1106
|
+
if (this.cleanupAutoUpdate) {
|
|
1107
|
+
this.cleanupAutoUpdate();
|
|
1108
|
+
this.cleanupAutoUpdate = undefined;
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
positionDropdown() {
|
|
1112
|
+
if (!this.containerEl || !this.panelEl)
|
|
1113
|
+
return;
|
|
1114
|
+
// In inline pill mode, triggerEl is the small chevron button — use the full-width
|
|
1115
|
+
// wrapper div as the Floating UI reference so the panel aligns with the whole trigger.
|
|
1116
|
+
const referenceEl = this.slottedTriggerEl || this.pillInlineTriggerEl || this.triggerEl || this.containerEl;
|
|
1117
|
+
const { minWidth, panelWidth } = this;
|
|
1118
|
+
const updatePosition = () => {
|
|
1119
|
+
computePosition(referenceEl, this.panelEl, {
|
|
1120
|
+
placement: 'bottom-start',
|
|
1121
|
+
strategy: 'fixed',
|
|
1122
|
+
middleware: [
|
|
1123
|
+
offset(12),
|
|
1124
|
+
flip(),
|
|
1125
|
+
shift({ padding: 8 }),
|
|
1126
|
+
size({
|
|
1127
|
+
apply: ({ rects, elements }) => {
|
|
1128
|
+
Object.assign(elements.floating.style, {
|
|
1129
|
+
width: panelWidth !== null && panelWidth !== void 0 ? panelWidth : `${rects.reference.width}px`,
|
|
1130
|
+
minWidth,
|
|
1131
|
+
});
|
|
1132
|
+
},
|
|
1133
|
+
}),
|
|
1134
|
+
],
|
|
1135
|
+
}).then(({ x, y }) => {
|
|
1136
|
+
if (this.panelEl) {
|
|
1137
|
+
this.panelEl.style.left = `${x}px`;
|
|
1138
|
+
this.panelEl.style.top = `${y}px`;
|
|
1139
|
+
}
|
|
1140
|
+
});
|
|
1141
|
+
};
|
|
1142
|
+
// Initial position
|
|
1143
|
+
updatePosition();
|
|
1144
|
+
// Set up auto-update for window resize and scroll
|
|
1145
|
+
const cleanupAutoUpdate = autoUpdate(referenceEl, this.panelEl, updatePosition);
|
|
1146
|
+
this.cleanupAutoUpdate = () => {
|
|
1147
|
+
cleanupAutoUpdate();
|
|
1148
|
+
this.clearAsyncFetchState();
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
scrollOptionIntoView() {
|
|
1152
|
+
requestAnimationFrame(() => {
|
|
1153
|
+
var _a;
|
|
1154
|
+
const highlighted = (_a = this.listboxEl) === null || _a === void 0 ? void 0 : _a.querySelector(`[data-index="${this.highlightedIndex}"]`);
|
|
1155
|
+
highlighted === null || highlighted === void 0 ? void 0 : highlighted.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
emitChange({ added = [], removed = [] }) {
|
|
1159
|
+
this.pdsMultiselectChange.emit({ values: this.value, items: this.selectedItems, added, removed });
|
|
1160
|
+
}
|
|
1161
|
+
toggleOption(option) {
|
|
1162
|
+
var _a, _b;
|
|
1163
|
+
if (option.disabled)
|
|
1164
|
+
return;
|
|
1165
|
+
// Handle create option
|
|
1166
|
+
if (option.isCreateOption) {
|
|
1167
|
+
// Prevent multiple create calls while one is in-flight
|
|
1168
|
+
if (!this.creating) {
|
|
1169
|
+
this.createOption(this.searchQuery);
|
|
1170
|
+
}
|
|
1171
|
+
return;
|
|
1172
|
+
}
|
|
1173
|
+
const optionId = String(option.id);
|
|
1174
|
+
const isSelected = this.value.includes(optionId);
|
|
1175
|
+
if (isSelected) {
|
|
1176
|
+
// Remove from selection
|
|
1177
|
+
this.value = this.value.filter(v => v !== optionId);
|
|
1178
|
+
}
|
|
1179
|
+
else {
|
|
1180
|
+
// Add to selection
|
|
1181
|
+
if (this.maxSelections && this.value.length >= this.maxSelections) {
|
|
1182
|
+
return;
|
|
1183
|
+
}
|
|
1184
|
+
this.value = [...this.value, optionId];
|
|
1185
|
+
}
|
|
1186
|
+
// Sync selected items to ensure no duplicates and accurate state
|
|
1187
|
+
this.syncSelectedItems();
|
|
1188
|
+
// Emit change event with synced items
|
|
1189
|
+
this.emitChange(isSelected ? { removed: [optionId] } : { added: [optionId] });
|
|
1190
|
+
if (this.closePanelOnSelect) {
|
|
1191
|
+
this.isClosingViaSelection = true;
|
|
1192
|
+
this.closeDropdown();
|
|
1193
|
+
(_a = this.activeTriggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
1194
|
+
}
|
|
1195
|
+
else {
|
|
1196
|
+
// Keep focus on search input, don't close dropdown
|
|
1197
|
+
(_b = this.searchInputEl) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
selectOption(option) {
|
|
1201
|
+
// For keyboard navigation - toggle the option
|
|
1202
|
+
this.toggleOption(option);
|
|
1203
|
+
}
|
|
1204
|
+
getGroupedRenderItems(filteredOptions) {
|
|
1205
|
+
const items = [];
|
|
1206
|
+
let currentGroup = null;
|
|
1207
|
+
filteredOptions.forEach((option, index) => {
|
|
1208
|
+
const group = option.group;
|
|
1209
|
+
if (group !== undefined) {
|
|
1210
|
+
if (!currentGroup || currentGroup.group !== group) {
|
|
1211
|
+
currentGroup = { type: 'group', group, options: [] };
|
|
1212
|
+
items.push(currentGroup);
|
|
1213
|
+
}
|
|
1214
|
+
currentGroup.options.push({ option, index });
|
|
1215
|
+
}
|
|
1216
|
+
else {
|
|
1217
|
+
currentGroup = null;
|
|
1218
|
+
items.push({ type: 'option', option, index });
|
|
1219
|
+
}
|
|
1220
|
+
});
|
|
1221
|
+
return items;
|
|
1222
|
+
}
|
|
1223
|
+
renderOption(option, index, valueArray) {
|
|
1224
|
+
const isSelected = valueArray.includes(String(option.id));
|
|
1225
|
+
const isCreateOption = option.isCreateOption;
|
|
1226
|
+
const isDisabled = option.disabled;
|
|
1227
|
+
const isHighlighted = index === this.highlightedIndex && !isCreateOption;
|
|
1228
|
+
const optionId = `${this.componentId}-option-${index}`;
|
|
1229
|
+
const isCreateDisabled = isCreateOption && this.creating;
|
|
1230
|
+
const hasAction = this.hasOptionAction(option);
|
|
1231
|
+
return (h("li", { key: String(option.id), id: optionId, class: {
|
|
1232
|
+
'pds-multiselect__option': true,
|
|
1233
|
+
'pds-multiselect__option--highlighted': isHighlighted,
|
|
1234
|
+
'pds-multiselect__option--selected': isSelected,
|
|
1235
|
+
'pds-multiselect__option--create': isCreateOption,
|
|
1236
|
+
'pds-multiselect__option--disabled': isDisabled || isCreateDisabled,
|
|
1237
|
+
}, role: "option", "aria-selected": isSelected ? 'true' : 'false', "aria-disabled": isDisabled || isCreateDisabled ? 'true' : undefined, "aria-label": isCreateOption ? formatMessage(this.createOptionAriaLabel, { text: option.text }) : undefined, "aria-describedby": hasAction ? `${optionId}-action-description` : undefined, "data-index": index, onMouseDown: this.handleOptionMouseDown(option), onClick: this.handleOptionClick, onMouseEnter: this.handleOptionMouseEnter(index, option) }, isCreateOption ? (h("pds-box", { class: "pds-multiselect__create-option", "align-items": "center", gap: "xs" }, h("pds-icon", { name: "add", size: "small", "aria-hidden": "true" }), h("pds-text", null, formatMessage(this.createOptionLabel, { text: option.text })))) : (h("pds-checkbox", { componentId: `${this.componentId}-checkbox-${index}`, checked: isSelected, label: option.text, disabled: isDisabled, style: { pointerEvents: 'none' } }, this.optionDisplay === 'chip' && (h("pds-chip", { slot: "label", sentiment: "subtle", dot: !!option.dotColor, "dot-color": option.dotColor, "max-width": "100%" }, option.text)))), hasAction && this.renderOptionAction(option, optionId, isHighlighted)));
|
|
1238
|
+
}
|
|
1239
|
+
renderOptionAction(option, optionId, isHighlighted) {
|
|
1240
|
+
var _a;
|
|
1241
|
+
const label = formatMessage((_a = option.actionLabel) !== null && _a !== void 0 ? _a : this.optionActionLabel, { text: option.text });
|
|
1242
|
+
return [
|
|
1243
|
+
h("span", { class: "pds-multiselect__option-action", title: label, "aria-hidden": "true", onMouseDown: this.handleOptionActionMouseDown, onClick: this.handleOptionActionClick(option) }, (isHighlighted || this.isHoverless) && h("pds-icon", { name: option.actionIcon })),
|
|
1244
|
+
h("span", { id: `${optionId}-action-description`, hidden: true }, formatMessage(this.optionActionDescription, { action: label })),
|
|
1245
|
+
];
|
|
1246
|
+
}
|
|
1247
|
+
renderSelectedItemsList() {
|
|
1248
|
+
if (this.hideSelectedItems || this.selectedItems.length === 0)
|
|
1249
|
+
return null;
|
|
1250
|
+
return (h("div", { class: "pds-multiselect__selected-section" }, h("ul", { class: "pds-multiselect__selected-list", role: "list", onKeyDown: this.handleSelectedListKeyDown }, this.selectedItems.map(item => (h("li", { key: String(item.id), class: "pds-multiselect__selected-item" }, item.text))))));
|
|
1251
|
+
}
|
|
1252
|
+
renderDropdown() {
|
|
1253
|
+
if (!this.isOpen)
|
|
1254
|
+
return null;
|
|
1255
|
+
const filteredOptions = this.getFilteredOptions();
|
|
1256
|
+
const valueArray = this.ensureValueArray();
|
|
1257
|
+
const hasSlottedEmpty = !!this.el.querySelector('[slot="empty"]');
|
|
1258
|
+
const hasSlottedLoading = !!this.el.querySelector('[slot="loading"]');
|
|
1259
|
+
const hasSlottedFooter = !!this.el.querySelector('[slot="footer"]');
|
|
1260
|
+
return (h("div", { class: "pds-multiselect__panel", ref: el => (this.panelEl = el), style: { minWidth: this.minWidth } }, h("div", { class: "pds-multiselect__search" }, h("pds-icon", { name: "search", size: "small", "aria-hidden": "true" }), h("input", { ref: el => (this.searchInputEl = el), type: "text", class: "pds-multiselect__search-input", placeholder: this.searchPlaceholder, value: this.searchQuery, "aria-label": this.searchOptionsLabel, "aria-controls": `${this.componentId}-listbox`, "aria-activedescendant": this.highlightedIndex >= 0 ? `${this.componentId}-option-${this.highlightedIndex}` : undefined, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": "true", "aria-autocomplete": "list", autocomplete: "off", onInput: this.handleSearchInputChange, onKeyDown: this.handleSearchInputKeyDown })), this.renderSelectedItemsList(), h("ul", { class: "pds-multiselect__listbox", role: "listbox", "aria-multiselectable": "true", "aria-label": this.label || this.optionsLabel, id: `${this.componentId}-listbox`, ref: el => (this.listboxEl = el), style: { maxHeight: this.maxHeight }, onScroll: this.handleScroll }, this.loading && (h("li", { class: "pds-multiselect__loading", role: "presentation" }, hasSlottedLoading ? (h("slot", { name: "loading" })) : (h("pds-loader", { size: "small" })))), !this.loading && filteredOptions.length === 0 && (h("li", { class: "pds-multiselect__empty", role: "presentation" }, hasSlottedEmpty ? (h("slot", { name: "empty" })) : (h("span", null, this.noOptionsFoundLabel)))), this.getGroupedRenderItems(filteredOptions).map((item, itemIndex) => {
|
|
1261
|
+
if (item.type === 'group') {
|
|
1262
|
+
return (h("li", { key: `group-${itemIndex}`, role: "group", "aria-label": item.group, class: "pds-multiselect__group" }, h("span", { class: "pds-multiselect__group-header", "aria-hidden": "true" }, item.group), h("ul", { class: "pds-multiselect__group-list", role: "presentation" }, item.options.map(({ option, index }) => this.renderOption(option, index, valueArray)))));
|
|
1263
|
+
}
|
|
1264
|
+
return this.renderOption(item.option, item.index, valueArray);
|
|
1265
|
+
}), this.hasMore && !this.loading && (h("li", { class: "pds-multiselect__load-more", role: "presentation" }, h("pds-loader", { size: "small" })))), hasSlottedFooter && (h("div", { class: "pds-multiselect__footer", onMouseDown: this.handleFooterMouseDown, onKeyDown: this.handleFooterKeyDown }, h("slot", { name: "footer" })))));
|
|
1266
|
+
}
|
|
1267
|
+
renderInlinePills() {
|
|
1268
|
+
const hasSelections = this.selectedItems.length > 0;
|
|
1269
|
+
if (!hasSelections) {
|
|
1270
|
+
return (h("span", { class: "pds-multiselect__trigger-text pds-multiselect__trigger-text--placeholder" }, this.placeholder || 'Select...'));
|
|
1271
|
+
}
|
|
1272
|
+
const variant = this.disabled ? 'text' : 'tag';
|
|
1273
|
+
const visibleItems = this.selectedItems.slice(0, Math.max(1, this.maxInlinePills));
|
|
1274
|
+
const overflowCount = this.selectedItems.length - visibleItems.length;
|
|
1275
|
+
return (h("div", { class: "pds-multiselect__pill-list pds-multiselect__pill-list--inline", "aria-label": this.selectedItemsLabel }, visibleItems.map(item => (h("pds-chip", { key: String(item.id), "component-id": `${this.componentId}-pill-${item.id}`, variant: variant, size: "sm", sentiment: "neutral", "dismiss-label": this.pillRemoveLabel, onPdsTagCloseClick: this.handlePillRemove(item) }, item.text))), overflowCount > 0 && (h("span", { class: "pds-multiselect__pill-overflow" }, "+", overflowCount))));
|
|
1276
|
+
}
|
|
1277
|
+
renderBelowPills() {
|
|
1278
|
+
if (this.selectedItems.length === 0)
|
|
1279
|
+
return null;
|
|
1280
|
+
const variant = this.disabled ? 'text' : 'tag';
|
|
1281
|
+
return (h("div", { class: "pds-multiselect__pill-list pds-multiselect__pill-list--below", "aria-label": this.selectedItemsLabel }, this.selectedItems.map(item => (h("pds-chip", { key: String(item.id), "component-id": `${this.componentId}-pill-${item.id}`, variant: variant, size: "md", sentiment: "neutral", "dismiss-label": this.pillRemoveLabel, onPdsTagCloseClick: this.handlePillRemove(item) }, item.text)))));
|
|
1282
|
+
}
|
|
1283
|
+
getTriggerText() {
|
|
1284
|
+
var _a;
|
|
1285
|
+
const count = this.selectedItems.length;
|
|
1286
|
+
if (count === 0 || (this.selectedDisplay === 'pill' && this.pillPosition === 'below')) {
|
|
1287
|
+
// Fall back to a non-empty string: the trigger's accessible name comes from
|
|
1288
|
+
// this text, so an empty/undefined placeholder must never leave it nameless
|
|
1289
|
+
// (WCAG 4.1.2). The prop is localizable; this last-resort default is not.
|
|
1290
|
+
return this.placeholder || 'Select...';
|
|
1291
|
+
}
|
|
1292
|
+
// One selection shows its name; the count only says something once there's more than one.
|
|
1293
|
+
// An option without text still falls back to the count, so the trigger is never nameless.
|
|
1294
|
+
if (count === 1 && ((_a = this.selectedItems[0].text) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
1295
|
+
return this.selectedItems[0].text;
|
|
1296
|
+
}
|
|
1297
|
+
return pluralize(this.el, count, this.resolveCountForms());
|
|
1298
|
+
}
|
|
1299
|
+
/**
|
|
1300
|
+
* The text that sets the trigger's width. A single selection's name could be any length, so the
|
|
1301
|
+
* trigger keeps the width the count would give it and the name truncates inside that, rather than
|
|
1302
|
+
* widening a multiselect that has no width of its own.
|
|
1303
|
+
*/
|
|
1304
|
+
getTriggerSizerText() {
|
|
1305
|
+
const text = this.getTriggerText();
|
|
1306
|
+
const count = this.selectedItems.length;
|
|
1307
|
+
const showsName = count === 1 && text === this.selectedItems[0].text && !(this.selectedDisplay === 'pill' && this.pillPosition === 'below');
|
|
1308
|
+
return showsName ? pluralize(this.el, count, this.resolveCountForms()) : text;
|
|
1309
|
+
}
|
|
1310
|
+
/**
|
|
1311
|
+
* The `one`/`other` props are the ergonomic English defaults; `selectedCountLabels`
|
|
1312
|
+
* (object or JSON-string attribute) layers full CLDR forms on top for locales
|
|
1313
|
+
* that need `few`/`many`/`two`/`zero`. Malformed JSON degrades to the defaults.
|
|
1314
|
+
*/
|
|
1315
|
+
resolveCountForms() {
|
|
1316
|
+
const base = {
|
|
1317
|
+
one: this.selectedCountLabelOne,
|
|
1318
|
+
other: this.selectedCountLabelOther,
|
|
1319
|
+
};
|
|
1320
|
+
const extra = this.selectedCountLabels;
|
|
1321
|
+
if (!extra)
|
|
1322
|
+
return base;
|
|
1323
|
+
if (typeof extra === 'string') {
|
|
1324
|
+
try {
|
|
1325
|
+
const parsed = JSON.parse(extra);
|
|
1326
|
+
return parsed && typeof parsed === 'object' ? Object.assign(Object.assign({}, base), parsed) : base;
|
|
1327
|
+
}
|
|
1328
|
+
catch (_a) {
|
|
1329
|
+
return base; // not valid JSON → fall back to the English-shape defaults
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
return Object.assign(Object.assign({}, base), extra);
|
|
1333
|
+
}
|
|
1334
|
+
render() {
|
|
1335
|
+
const hasSelections = this.selectedItems.length > 0;
|
|
1336
|
+
return (h(Host, { key: '12298f9692ac8644230195cc1abe0e26bb5715a9', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: '5d98f9edae2f471d9662c65454fbef7b2dec83e1', class: "pds-multiselect", onFocusout: this.handleContainerFocusOut }, this.label && (h("label", { key: '2f6d4162d0649978bc53c34327b6149dc971fd4c', id: `${this.componentId}-label`, htmlFor: this.componentId, class: {
|
|
1337
|
+
'pds-multiselect__label': true,
|
|
1338
|
+
'visually-hidden': this.hideLabel,
|
|
1339
|
+
} }, this.label)), h("div", { key: '7a337e876c8fff854e5b9a067ef89b9d5136df4f', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), style: { width: this.triggerWidth } }, this.slottedTriggerEl ? (h("slot", { name: "trigger" })) : this.selectedDisplay === 'pill' && this.pillPosition === 'inline' ? (h("div", { ref: el => (this.pillInlineTriggerEl = el || undefined), part: "trigger", class: {
|
|
1340
|
+
'pds-multiselect__trigger': true,
|
|
1341
|
+
'pds-multiselect__trigger--open': this.isOpen,
|
|
1342
|
+
'pds-multiselect__trigger--disabled': this.disabled,
|
|
1343
|
+
'pds-multiselect__trigger--invalid': this.invalid || !!this.errorMessage,
|
|
1344
|
+
'pds-multiselect__trigger--has-value': hasSelections,
|
|
1345
|
+
'pds-multiselect__trigger--pill-inline': true,
|
|
1346
|
+
}, onClick: this.handleTriggerClick }, this.renderInlinePills(), h("button", { ref: el => (this.triggerEl = el), type: "button", id: this.componentId, part: "pill-toggle", class: "pds-multiselect__pill-toggle", disabled: this.disabled, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-labelledby": this.label ? `${this.componentId}-label` : undefined, "aria-required": this.required ? 'true' : undefined, "aria-describedby": assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onKeyDown: this.handleTriggerKeyDown }, h("pds-icon", { "aria-hidden": "true", class: "pds-multiselect__icon", icon: enlarge })))) : (h("button", { ref: el => (this.triggerEl = el), type: "button", part: "trigger", class: {
|
|
1347
|
+
'pds-multiselect__trigger': true,
|
|
1348
|
+
'pds-multiselect__trigger--open': this.isOpen,
|
|
1349
|
+
'pds-multiselect__trigger--disabled': this.disabled,
|
|
1350
|
+
'pds-multiselect__trigger--invalid': this.invalid || !!this.errorMessage,
|
|
1351
|
+
'pds-multiselect__trigger--has-value': hasSelections,
|
|
1352
|
+
}, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, h("span", { class: "pds-multiselect__trigger-label" }, h("span", { class: "pds-multiselect__trigger-sizer", "aria-hidden": "true" }, this.getTriggerSizerText()), h("span", { class: {
|
|
1353
|
+
'pds-multiselect__trigger-text': true,
|
|
1354
|
+
'pds-multiselect__trigger-text--placeholder': !hasSelections || (this.selectedDisplay === 'pill' && this.pillPosition === 'below'),
|
|
1355
|
+
} }, this.getTriggerText())), h("pds-icon", { "aria-hidden": "true", class: "pds-multiselect__icon", icon: enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), h("span", { key: 'd3cf5bb64a6c296c84af30628698559c0c904117', class: "visually-hidden", "aria-live": "polite", "aria-atomic": "true" }, this.removalAnnouncement), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (h("p", { key: 'a711280151ff360758143906a76fa2d25f4078a9', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (h("p", { key: '17411d6bb55843f45f8d7ee410b627de846eed65', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: '446ffc0ed08b7856f0ef8c49bdf06b6011404a12', "aria-hidden": "true", icon: danger, size: "small" }), this.errorMessage)), h("div", { key: 'a83ed6c5d84cbf38f267f7e15bd871d09534c554', style: { display: 'none' } }, h("slot", { key: '294ce6a2bd4405854161aed5d8166fcc86e211e3' })))));
|
|
1356
|
+
}
|
|
1357
|
+
static get formAssociated() { return true; }
|
|
1358
|
+
get el() { return getElement(this); }
|
|
1359
|
+
static get watchers() { return {
|
|
1360
|
+
"debounce": [{
|
|
1361
|
+
"setupDebounce": 0
|
|
1362
|
+
}],
|
|
1363
|
+
"value": [{
|
|
1364
|
+
"valueChanged": 0
|
|
1365
|
+
}],
|
|
1366
|
+
"options": [{
|
|
1367
|
+
"optionsChanged": 0
|
|
1368
|
+
}],
|
|
1369
|
+
"internalOptions": [{
|
|
1370
|
+
"internalOptionsChanged": 0
|
|
1371
|
+
}],
|
|
1372
|
+
"isOpen": [{
|
|
1373
|
+
"isOpenChanged": 0
|
|
1374
|
+
}],
|
|
1375
|
+
"disabled": [{
|
|
1376
|
+
"disabledChanged": 0
|
|
1377
|
+
}]
|
|
1378
|
+
}; }
|
|
1379
|
+
};
|
|
1380
|
+
PdsMultiselect.style = pdsMultiselectCss();
|
|
1381
|
+
|
|
1382
|
+
export { PdsMultiselect as pds_multiselect };
|