@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,3839 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { assignDescription, isSpecTest, messageId } from "../../utils/form";
|
|
3
|
+
import { autoUpdate, computePosition, flip, offset, shift } from "@floating-ui/dom";
|
|
4
|
+
import { cancelDebouncedEvent, debounceEvent, flushDebouncedEvent } from "../../utils/utils";
|
|
5
|
+
import { closest } from "../../utils/closest";
|
|
6
|
+
import DOMPurify from "dompurify";
|
|
7
|
+
import { FlyoutController, buildPanelEntries, findGroup, groupBadgeOf, groupIconOf, groupLabelOf, isGroupDisabled, isOptionDisabled, optionBadgeOf, optionIconOf, panelColumn, parentOptgroupOf, } from "./grouped-options-panel";
|
|
8
|
+
/**
|
|
9
|
+
* @slot option - Option elements for the combobox dropdown
|
|
10
|
+
* @slot trigger-content - Custom content for the button trigger when customTriggerContent is true
|
|
11
|
+
* @slot empty - Custom empty state message when no options match
|
|
12
|
+
* @slot loading - Custom loading indicator
|
|
13
|
+
* @part button-trigger - Exposes the button trigger for styling. Appears only when `trigger` is `button`.
|
|
14
|
+
* @part chip-trigger - Exposes the chip trigger for styling. Appears only when `trigger` is `chip`.
|
|
15
|
+
* @part combobox - Exposes the outer container around the label, trigger and messages for styling.
|
|
16
|
+
* @part input - Exposes the native `input` element for styling. Appears only when `trigger` is `input`, the default.
|
|
17
|
+
*/
|
|
18
|
+
export class PdsCombobox {
|
|
19
|
+
constructor() {
|
|
20
|
+
/**
|
|
21
|
+
* Enable custom layout content for options. Options with data-layout attribute will render their HTML content.
|
|
22
|
+
* ⚠️ Security Warning: Only use with trusted content. Basic XSS protection is applied, but avoid user-generated content.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
this.customOptionLayouts = false;
|
|
26
|
+
/**
|
|
27
|
+
* Enable custom layout content for the button trigger via the trigger-content slot.
|
|
28
|
+
* When true, uses slot content for initial state but updates dynamically with selected option layout.
|
|
29
|
+
* ⚠️ Security Warning: Only use with trusted content. Basic XSS protection is applied, but avoid user-generated content.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
this.customTriggerContent = false;
|
|
33
|
+
/**
|
|
34
|
+
* If true, the combobox is disabled.
|
|
35
|
+
*/
|
|
36
|
+
this.disabled = false;
|
|
37
|
+
/**
|
|
38
|
+
* Placement of the dropdown relative to the trigger.
|
|
39
|
+
* @default 'bottom-start'
|
|
40
|
+
*/
|
|
41
|
+
this.dropdownPlacement = 'bottom-start';
|
|
42
|
+
/**
|
|
43
|
+
* Where to mount the dropdown listbox (`host` or `body`, sometimes called “append to body”).
|
|
44
|
+
* Use `body` inside scrollable containers (for example modals) so the list is not clipped by
|
|
45
|
+
* `overflow: hidden` ancestors. The portal is appended to the nearest `<dialog>` when present
|
|
46
|
+
* (including `pds-modal` / `showModal()`), using a composed ascent so shadow DOM and slot
|
|
47
|
+
* boundaries do not hide the dialog from discovery; otherwise it is appended to `document.body`.
|
|
48
|
+
* Keyboard focus stays on the trigger, or moves to the panel's own search field, so modal focus
|
|
49
|
+
* traps keep working. The mounted dropdown renders in its own shadow root with the combobox's
|
|
50
|
+
* styles, so it needs no global CSS and page CSS can't reach it: customize it with custom
|
|
51
|
+
* properties on `pds-combobox`. Its reading direction, language, theme and custom properties are
|
|
52
|
+
* taken from the combobox when it opens. Custom `empty` and `loading` slots are not supported when
|
|
53
|
+
* `body` is used; the default empty and loading content is shown instead.
|
|
54
|
+
* @default 'host'
|
|
55
|
+
*/
|
|
56
|
+
this.dropdownMount = 'host';
|
|
57
|
+
/**
|
|
58
|
+
* Accessible prefix for the row that returns to the group list when `group-display` is
|
|
59
|
+
* `drill-in`, read before the open group's label. Pass a translated string to localize it; defaults to English.
|
|
60
|
+
* @defaultValue 'Back'
|
|
61
|
+
*/
|
|
62
|
+
this.drillInBackLabel = 'Back';
|
|
63
|
+
/**
|
|
64
|
+
* Text shown when no options match the search. Pass a translated string to localize it; defaults to English.
|
|
65
|
+
* @defaultValue 'No options found'
|
|
66
|
+
*/
|
|
67
|
+
this.noOptionsFoundLabel = 'No options found';
|
|
68
|
+
/**
|
|
69
|
+
* Maximum width of a group's flyout when `group-display` is `flyout`. Any valid CSS width
|
|
70
|
+
* value, including its padding.
|
|
71
|
+
* @default '388px'
|
|
72
|
+
*/
|
|
73
|
+
this.flyoutMaxWidth = '388px';
|
|
74
|
+
/**
|
|
75
|
+
* Minimum width of a group's flyout when `group-display` is `flyout`. Any valid CSS width
|
|
76
|
+
* value, including its padding. The flyout is as wide as its options, between this and
|
|
77
|
+
* `flyout-max-width`.
|
|
78
|
+
* @default '288px'
|
|
79
|
+
*/
|
|
80
|
+
this.flyoutMinWidth = '288px';
|
|
81
|
+
/**
|
|
82
|
+
* How option groups (`<optgroup>`, or the `group` field of `options`) are shown in the dropdown.
|
|
83
|
+
* `inline` lists each group's label above its options. `flyout` lists the groups, and opens a
|
|
84
|
+
* group's options in a panel beside it on hover or click; while searching, the matching options
|
|
85
|
+
* are listed under their group labels, and search also matches group labels. `flyout` groups
|
|
86
|
+
* by `<optgroup>` (or `group`) only: options under a `<pds-text>` heading are listed ungrouped.
|
|
87
|
+
* `drill-in` lists the groups too, but a click replaces the list with that group's options and a
|
|
88
|
+
* row back to the groups; use it where nothing can open beside the dropdown, such as a side
|
|
89
|
+
* panel. `flyout` falls back to `drill-in` when there is no room for a flyout on either side.
|
|
90
|
+
* @default 'inline'
|
|
91
|
+
*/
|
|
92
|
+
this.groupDisplay = 'inline';
|
|
93
|
+
/**
|
|
94
|
+
* Visually hides the label text for instances where only the combobox should be displayed.
|
|
95
|
+
* The visible `<label>` is omitted (same pattern as `pds-select`) so label spacing does not reserve layout;
|
|
96
|
+
* the trigger uses `aria-label` so the name stays available to assistive technology.
|
|
97
|
+
*/
|
|
98
|
+
this.hideLabel = false;
|
|
99
|
+
/**
|
|
100
|
+
* Determines the combobox mode: 'filter' (filter options as you type) or 'select-only' (show all options).
|
|
101
|
+
* In filter mode, reopening the menu while the input still shows the label of the selected option temporarily lists
|
|
102
|
+
* all options until you type (so you can switch to a different choice without clearing the field first).
|
|
103
|
+
* @default 'filter'
|
|
104
|
+
*/
|
|
105
|
+
this.mode = 'filter';
|
|
106
|
+
/**
|
|
107
|
+
* Shows a search field at the top of the dropdown for the `button` and `chip` triggers, which
|
|
108
|
+
* can't be typed into. Search filters the options the same way typing in the `input` trigger
|
|
109
|
+
* does; in a grouped display it also matches group labels.
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
112
|
+
this.panelSearch = false;
|
|
113
|
+
/**
|
|
114
|
+
* Accessible label for the search input inside the dropdown panel (`panel-search`). Pass a translated string to localize it; defaults to English.
|
|
115
|
+
* @defaultValue 'Search options'
|
|
116
|
+
*/
|
|
117
|
+
this.searchOptionsLabel = 'Search options';
|
|
118
|
+
/**
|
|
119
|
+
* Placeholder text for the search input inside the dropdown panel (`panel-search`). Pass a translated string to localize it; defaults to English.
|
|
120
|
+
* @defaultValue 'Find...'
|
|
121
|
+
*/
|
|
122
|
+
this.searchPlaceholder = 'Find...';
|
|
123
|
+
/**
|
|
124
|
+
* Determines the combobox trigger: 'input' (editable input), 'button' (button-like, non-editable), or 'chip' (chip-like, non-editable).
|
|
125
|
+
* @default 'input'
|
|
126
|
+
*/
|
|
127
|
+
this.trigger = 'input';
|
|
128
|
+
/**
|
|
129
|
+
* Width of the trigger (button or input). Any valid CSS width value.
|
|
130
|
+
* @default 'fit-content'
|
|
131
|
+
*/
|
|
132
|
+
this.triggerWidth = 'fit-content';
|
|
133
|
+
/**
|
|
134
|
+
* The visual variant for the button trigger. Matches Pine button variants.
|
|
135
|
+
* @default 'secondary'
|
|
136
|
+
*/
|
|
137
|
+
this.triggerVariant = 'secondary';
|
|
138
|
+
/**
|
|
139
|
+
* The shape of the button trigger. Use 'input' to render the trigger with input-like styling
|
|
140
|
+
* (subtle border radius, input height) for use in form or filter rows alongside PdsSelect and PdsMultiselect.
|
|
141
|
+
* @default 'pill'
|
|
142
|
+
*/
|
|
143
|
+
this.triggerShape = 'pill';
|
|
144
|
+
/**
|
|
145
|
+
* Determines whether the button trigger's label and the option labels should truncate and display with an ellipsis.
|
|
146
|
+
* When a label overflows, a `title` showing the full label will appear on hover.
|
|
147
|
+
* Chip options, custom layouts and group rows aren't affected.
|
|
148
|
+
* @defaultValue false
|
|
149
|
+
*/
|
|
150
|
+
this.truncate = false;
|
|
151
|
+
/**
|
|
152
|
+
* The sentiment for the chip trigger. Matches Pine chip sentiments.
|
|
153
|
+
* @default 'neutral'
|
|
154
|
+
*/
|
|
155
|
+
this.chipSentiment = 'neutral';
|
|
156
|
+
/**
|
|
157
|
+
* Whether the chip trigger should be displayed in a larger size.
|
|
158
|
+
* @default false
|
|
159
|
+
*/
|
|
160
|
+
this.chipLarge = false;
|
|
161
|
+
/**
|
|
162
|
+
* Whether a dot should be displayed on the chip trigger.
|
|
163
|
+
* @default false
|
|
164
|
+
*/
|
|
165
|
+
this.chipDot = false;
|
|
166
|
+
/**
|
|
167
|
+
* The `value` of the selected option.
|
|
168
|
+
*/
|
|
169
|
+
this.value = '';
|
|
170
|
+
/**
|
|
171
|
+
* HTTP method for async requests.
|
|
172
|
+
*/
|
|
173
|
+
this.asyncMethod = 'GET';
|
|
174
|
+
/**
|
|
175
|
+
* Debounce delay in milliseconds for search/fetch.
|
|
176
|
+
*/
|
|
177
|
+
this.debounce = 300;
|
|
178
|
+
/**
|
|
179
|
+
* Timeout in milliseconds for async fetch requests.
|
|
180
|
+
*/
|
|
181
|
+
this.fetchTimeout = 30000;
|
|
182
|
+
/**
|
|
183
|
+
* Whether the component is currently loading async options.
|
|
184
|
+
*/
|
|
185
|
+
this.loading = false;
|
|
186
|
+
/**
|
|
187
|
+
* Internal state for the display text shown in the input/trigger
|
|
188
|
+
*/
|
|
189
|
+
this.displayText = '';
|
|
190
|
+
/**
|
|
191
|
+
* Internal state for filtered options and group labels
|
|
192
|
+
*/
|
|
193
|
+
this.filteredItems = [];
|
|
194
|
+
/**
|
|
195
|
+
* Internal state for the currently highlighted option index
|
|
196
|
+
*/
|
|
197
|
+
this.highlightedIndex = -1;
|
|
198
|
+
/**
|
|
199
|
+
* Internal state for dropdown open/close
|
|
200
|
+
*/
|
|
201
|
+
this.isOpen = false;
|
|
202
|
+
/**
|
|
203
|
+
* The optgroup whose flyout is open, when `groupDisplay` is `flyout`.
|
|
204
|
+
*/
|
|
205
|
+
this.openGroup = null;
|
|
206
|
+
/**
|
|
207
|
+
* Which way drill-in just moved, so the list slides that way: `in` to a group, `out` back to the
|
|
208
|
+
* groups. Cleared once the slide ends, so later renders don't animate.
|
|
209
|
+
*/
|
|
210
|
+
this.drillDirection = null;
|
|
211
|
+
/**
|
|
212
|
+
* The group row highlighted in the grouped panel. It counts only while no option is
|
|
213
|
+
* highlighted (`highlightedIndex` is -1); see `highlightedGroupRow`.
|
|
214
|
+
*/
|
|
215
|
+
this.highlightedGroup = null;
|
|
216
|
+
/** The keys, not the pointer, moved the highlight last; the focus ring shows only then. */
|
|
217
|
+
this.keyboardNavigating = false;
|
|
218
|
+
/**
|
|
219
|
+
* A drill-in group row the first arrow showed rather than moved past. `aria-activedescendant`
|
|
220
|
+
* already pointed at it, so the status region says it instead.
|
|
221
|
+
*/
|
|
222
|
+
this.revealedGroupLabel = null;
|
|
223
|
+
/**
|
|
224
|
+
* The pointer in the panel can hover: a mouse or pen, not touch. Touch browsers keep a tapped row
|
|
225
|
+
* hovered, so group rows shade on `:hover` only for a pointer that can hover. Checked on the
|
|
226
|
+
* pointer itself rather than `(hover: hover)`, which a touch-first device with a trackpad fails.
|
|
227
|
+
*/
|
|
228
|
+
this.pointerCanHover = true;
|
|
229
|
+
/**
|
|
230
|
+
* What's typed in the dropdown's own search field (`panelSearch`).
|
|
231
|
+
*/
|
|
232
|
+
this.panelQuery = '';
|
|
233
|
+
/**
|
|
234
|
+
* `groupDisplay` is `flyout` but there's no room beside the dropdown, so groups drill in instead.
|
|
235
|
+
*/
|
|
236
|
+
this.flyoutFallback = false;
|
|
237
|
+
/**
|
|
238
|
+
* Internal state for the currently selected option
|
|
239
|
+
*/
|
|
240
|
+
this.selectedOption = null;
|
|
241
|
+
/**
|
|
242
|
+
* Internal state for the sanitized layout content of the selected option
|
|
243
|
+
*/
|
|
244
|
+
this.selectedOptionLayoutContent = '';
|
|
245
|
+
/**
|
|
246
|
+
* Internal state to track chip properties for automatic rendering
|
|
247
|
+
*/
|
|
248
|
+
this.selectedOptionChipProps = null;
|
|
249
|
+
/**
|
|
250
|
+
* Internal state for async options.
|
|
251
|
+
*/
|
|
252
|
+
this.internalOptions = [];
|
|
253
|
+
/**
|
|
254
|
+
* Internal state for current page (pagination).
|
|
255
|
+
*/
|
|
256
|
+
this.currentPage = 1;
|
|
257
|
+
/**
|
|
258
|
+
* Internal state for hasMore (pagination).
|
|
259
|
+
*/
|
|
260
|
+
this.hasMore = false;
|
|
261
|
+
this.optionEls = [];
|
|
262
|
+
this.allItems = [];
|
|
263
|
+
this.portalEl = null;
|
|
264
|
+
/** The portal's shadow root, which holds the dropdown and a copy of the combobox's styles. */
|
|
265
|
+
this.portalRoot = null;
|
|
266
|
+
this.bodyPortalAutoUpdateActive = false;
|
|
267
|
+
this.isUpdatingFromSelection = false;
|
|
268
|
+
this.flyout = new FlyoutController(() => this.openGroup, group => {
|
|
269
|
+
this.openGroup = group;
|
|
270
|
+
});
|
|
271
|
+
/** The groups in the flyout panel's last render, so a row's index finds its optgroup. */
|
|
272
|
+
this.renderedGroups = [];
|
|
273
|
+
/**
|
|
274
|
+
* Where each ungrouped option and optgroup built from the `options` prop came in the data, so
|
|
275
|
+
* the flyout and drill-in panels draw them in that order. Slotted markup is already in order.
|
|
276
|
+
*/
|
|
277
|
+
this.panelPositions = new WeakMap();
|
|
278
|
+
/** Room for a flyout was checked for this open. */
|
|
279
|
+
this.flyoutRoomChecked = false;
|
|
280
|
+
/** The highlighted option sits in a flyout that hasn't rendered yet; focus it after the next render. */
|
|
281
|
+
this.pendingOptionFocus = false;
|
|
282
|
+
/** Group rows' DOM ids, stable across renders so `aria-activedescendant` can point at a row. */
|
|
283
|
+
this.groupIds = new WeakMap();
|
|
284
|
+
this.groupIdCount = 0;
|
|
285
|
+
/**
|
|
286
|
+
* In filter mode, after choosing an option the input still shows the label and would
|
|
287
|
+
* otherwise filter the list to matching substrings only. While this flag is true,
|
|
288
|
+
* the list shows every option until the user types (then normal filtering applies).
|
|
289
|
+
*/
|
|
290
|
+
this.expandFilterListWhileOpen = false;
|
|
291
|
+
this.onHeightGlideCancel = (event) => {
|
|
292
|
+
const panel = this.listboxEl;
|
|
293
|
+
if (event.animationName !== 'pds-combobox-height-glide' || event.target !== panel)
|
|
294
|
+
return;
|
|
295
|
+
// Turning around mid-glide cancels the old glide as the new one starts; only a glide with none
|
|
296
|
+
// left running cleans up.
|
|
297
|
+
const running = panel.getAnimations().some(a => a.animationName === 'pds-combobox-height-glide');
|
|
298
|
+
// A drill waiting to render glides from here next; it cleans up then.
|
|
299
|
+
if (!running && this.drillFromHeight === undefined)
|
|
300
|
+
this.endHeightGlide();
|
|
301
|
+
};
|
|
302
|
+
this.onPanelPointer = (event) => {
|
|
303
|
+
const canHover = event.pointerType !== 'touch';
|
|
304
|
+
if (this.pointerCanHover !== canHover)
|
|
305
|
+
this.pointerCanHover = canHover;
|
|
306
|
+
};
|
|
307
|
+
this.onDrillAnimationEnd = (event) => {
|
|
308
|
+
// Only the component's own ends (the slide by name, the glide by its target): slotted consumer
|
|
309
|
+
// content can animate inside the list too.
|
|
310
|
+
if (event.animationName === 'pds-combobox-drill')
|
|
311
|
+
this.drillDirection = null;
|
|
312
|
+
if (event.animationName === 'pds-combobox-height-glide' && event.target === this.listboxEl && this.drillFromHeight === undefined) {
|
|
313
|
+
this.endHeightGlide();
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
/** `<label for>` only works on the input trigger; for a div trigger a click on the label focuses it. */
|
|
317
|
+
this.onLabelClick = () => {
|
|
318
|
+
var _a;
|
|
319
|
+
if (this.trigger !== 'input' && !this.disabled) {
|
|
320
|
+
(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
/** The query behind the options loaded from `async-url`. */
|
|
324
|
+
this.lastFetchedQuery = '';
|
|
325
|
+
this.handleInput = (e) => {
|
|
326
|
+
const target = e.target;
|
|
327
|
+
this.clearExpandFilterList();
|
|
328
|
+
this.displayText = target.value;
|
|
329
|
+
this.isOpen = true;
|
|
330
|
+
this.filterOptions();
|
|
331
|
+
// Emit search event for consumer-managed async
|
|
332
|
+
this.pdsComboboxSearch.emit({ query: this.displayText });
|
|
333
|
+
// Fetch from async URL if configured
|
|
334
|
+
if (this.asyncUrl) {
|
|
335
|
+
this.debouncedFetchAsyncOptions(this.displayText, 1);
|
|
336
|
+
}
|
|
337
|
+
setTimeout(() => this.openDropdownPositioning(), 0);
|
|
338
|
+
};
|
|
339
|
+
this.handleInputClick = () => {
|
|
340
|
+
// Open dropdown when input is clicked (but not when tabbed into)
|
|
341
|
+
if (!this.isOpen) {
|
|
342
|
+
this.isOpen = true;
|
|
343
|
+
this.prepareExpandFilterListOnOpen();
|
|
344
|
+
this.filterOptions();
|
|
345
|
+
// Trigger initial fetch if async and no options loaded yet
|
|
346
|
+
if (this.asyncUrl && this.internalOptions.length === 0) {
|
|
347
|
+
this.debouncedFetchAsyncOptions(this.displayText, 1);
|
|
348
|
+
}
|
|
349
|
+
this.setInitialHighlightedIndex();
|
|
350
|
+
setTimeout(() => {
|
|
351
|
+
this.openDropdownPositioning();
|
|
352
|
+
if (this.trigger === 'input' && this.expandFilterListWhileOpen && this.inputEl) {
|
|
353
|
+
this.inputEl.select();
|
|
354
|
+
}
|
|
355
|
+
}, 0);
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
this.handleKeyDown = (e) => {
|
|
359
|
+
if (!this.isOpen && (e.key === 'ArrowDown' || e.key === 'ArrowUp' || (e.altKey && e.key === 'ArrowDown'))) {
|
|
360
|
+
e.preventDefault();
|
|
361
|
+
this.keyboardNavigating = true;
|
|
362
|
+
this.isOpen = true;
|
|
363
|
+
this.prepareExpandFilterListOnOpen();
|
|
364
|
+
this.filterOptions();
|
|
365
|
+
// Set highlighted index immediately for testing
|
|
366
|
+
this.setInitialHighlightedIndex();
|
|
367
|
+
setTimeout(() => {
|
|
368
|
+
this.openDropdownPositioning();
|
|
369
|
+
// For input trigger, keep focus on input and use aria-activedescendant
|
|
370
|
+
// For button trigger, move focus to first option for keyboard navigation
|
|
371
|
+
if (this.trigger === 'input') {
|
|
372
|
+
this.focusFirstOption();
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
this.focusFirstOptionForArrowKeys();
|
|
376
|
+
}
|
|
377
|
+
}, 0);
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
if (!this.isOpen) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
if (this.handleGroupedPanelKey(e))
|
|
384
|
+
return;
|
|
385
|
+
// The input trigger's text keeps Space, Home and End while the grouped panel shows.
|
|
386
|
+
if (this.showsGroupedPanel && this.trigger === 'input' && (e.key === ' ' || e.key === 'Home' || e.key === 'End'))
|
|
387
|
+
return;
|
|
388
|
+
// Get only the option elements (skip group labels) for navigation
|
|
389
|
+
const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
|
|
390
|
+
switch (e.key) {
|
|
391
|
+
case 'ArrowDown':
|
|
392
|
+
e.preventDefault();
|
|
393
|
+
// If no option is highlighted, start at the first
|
|
394
|
+
this.highlightOptionAt(selectableOptions, this.highlightedIndex < 0 ? 0 : this.highlightedIndex + 1);
|
|
395
|
+
break;
|
|
396
|
+
case 'ArrowUp':
|
|
397
|
+
e.preventDefault();
|
|
398
|
+
// If no option is highlighted, start at the last
|
|
399
|
+
this.highlightOptionAt(selectableOptions, this.highlightedIndex < 0 ? selectableOptions.length - 1 : this.highlightedIndex - 1);
|
|
400
|
+
break;
|
|
401
|
+
case 'Home':
|
|
402
|
+
e.preventDefault();
|
|
403
|
+
this.highlightOptionAt(selectableOptions, 0);
|
|
404
|
+
break;
|
|
405
|
+
case 'End':
|
|
406
|
+
e.preventDefault();
|
|
407
|
+
this.highlightOptionAt(selectableOptions, selectableOptions.length - 1);
|
|
408
|
+
break;
|
|
409
|
+
case 'PageDown':
|
|
410
|
+
e.preventDefault();
|
|
411
|
+
this.highlightOptionAt(selectableOptions, this.highlightedIndex + 10);
|
|
412
|
+
break;
|
|
413
|
+
case 'PageUp':
|
|
414
|
+
e.preventDefault();
|
|
415
|
+
this.highlightOptionAt(selectableOptions, this.highlightedIndex - 10);
|
|
416
|
+
break;
|
|
417
|
+
case 'Enter':
|
|
418
|
+
case ' ': {
|
|
419
|
+
e.preventDefault();
|
|
420
|
+
// An option in a flyout the pointer has since closed isn't on screen; don't choose it.
|
|
421
|
+
if (this.showsGroupedPanel && this.activeDescendantId === undefined)
|
|
422
|
+
break;
|
|
423
|
+
const option = selectableOptions[this.highlightedIndex];
|
|
424
|
+
if (option !== undefined && !isOptionDisabled(option)) {
|
|
425
|
+
this.handleOptionClick(option);
|
|
426
|
+
this.restoreFocusToTrigger();
|
|
427
|
+
}
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
case 'Escape':
|
|
431
|
+
e.preventDefault();
|
|
432
|
+
this.isOpen = false;
|
|
433
|
+
this.highlightedIndex = -1;
|
|
434
|
+
this.clearExpandFilterList();
|
|
435
|
+
this.isArrowKeyNavigationMode = false; // Reset arrow-key navigation mode
|
|
436
|
+
this.restoreFocusToTrigger();
|
|
437
|
+
break;
|
|
438
|
+
case 'Tab':
|
|
439
|
+
// Allow normal tab behavior to close dropdown and move focus
|
|
440
|
+
this.isOpen = false;
|
|
441
|
+
this.highlightedIndex = -1;
|
|
442
|
+
this.clearExpandFilterList();
|
|
443
|
+
this.isArrowKeyNavigationMode = false; // Reset arrow-key navigation mode
|
|
444
|
+
break;
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
// Track if we're in arrow-key navigation mode (focus should move between options)
|
|
448
|
+
this.isArrowKeyNavigationMode = false;
|
|
449
|
+
// Event handler for option click
|
|
450
|
+
this.onOptionClick = (event) => {
|
|
451
|
+
const idx = Number(event.currentTarget.getAttribute('data-option-index'));
|
|
452
|
+
const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
|
|
453
|
+
const option = selectableOptions[idx];
|
|
454
|
+
if (isOptionDisabled(option))
|
|
455
|
+
return;
|
|
456
|
+
this.handleOptionClick(option);
|
|
457
|
+
// The search field closes with the panel; send focus back to the trigger instead of losing it.
|
|
458
|
+
// (Enter and Space already restore focus in the key handler.)
|
|
459
|
+
if (this.usesPanelSearch)
|
|
460
|
+
this.restoreFocusToTrigger();
|
|
461
|
+
};
|
|
462
|
+
this.onButtonTriggerMouseEnter = (event) => {
|
|
463
|
+
this.syncTitle(event.currentTarget, '.pds-combobox__button-trigger-text');
|
|
464
|
+
};
|
|
465
|
+
// Event handler for mouse enter on option
|
|
466
|
+
this.onOptionMouseEnter = (event) => {
|
|
467
|
+
const row = event.currentTarget;
|
|
468
|
+
if (this.truncate)
|
|
469
|
+
this.syncTitle(row, '.pds-combobox__option-text');
|
|
470
|
+
this.highlightedIndex = Number(row.getAttribute('data-option-index'));
|
|
471
|
+
this.keyboardNavigating = false;
|
|
472
|
+
};
|
|
473
|
+
this.onGroupRowMouseEnter = (event) => {
|
|
474
|
+
const group = this.groupFromEvent(event);
|
|
475
|
+
if (group !== null)
|
|
476
|
+
this.flyout.enter(group);
|
|
477
|
+
};
|
|
478
|
+
this.onGroupRowMouseLeave = (event) => {
|
|
479
|
+
const group = this.groupFromEvent(event);
|
|
480
|
+
if (group !== null)
|
|
481
|
+
this.flyout.leave(group);
|
|
482
|
+
};
|
|
483
|
+
// The pointer highlights a group's row as it does an option, so the keys carry on from there.
|
|
484
|
+
this.onGroupRowTriggerMouseEnter = (event) => {
|
|
485
|
+
const group = this.groupFromEvent(event);
|
|
486
|
+
if (group !== null)
|
|
487
|
+
this.highlightGroupRowByPointer(group);
|
|
488
|
+
};
|
|
489
|
+
this.onGroupBackMouseEnter = () => {
|
|
490
|
+
if (this.openGroup !== null)
|
|
491
|
+
this.highlightGroupRowByPointer(this.openGroup);
|
|
492
|
+
};
|
|
493
|
+
this.onGroupRowClick = (event) => {
|
|
494
|
+
var _a;
|
|
495
|
+
const group = this.groupFromEvent(event);
|
|
496
|
+
if (group === null)
|
|
497
|
+
return;
|
|
498
|
+
this.flyout.open(group);
|
|
499
|
+
// Highlight the group's first option, so the arrow keys carry on from the group just opened
|
|
500
|
+
// rather than from wherever the highlight was before.
|
|
501
|
+
const first = (_a = this.renderedGroups.find(entry => entry.optgroup === group)) === null || _a === void 0 ? void 0 : _a.options[0];
|
|
502
|
+
if (first !== undefined) {
|
|
503
|
+
this.highlightedIndex = first.index;
|
|
504
|
+
this.updateAriaActiveDescendant();
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
// Prevent blur on mousedown
|
|
508
|
+
this.onOptionMouseDown = (event) => {
|
|
509
|
+
event.preventDefault();
|
|
510
|
+
};
|
|
511
|
+
// Event handler for option keyboard events
|
|
512
|
+
this.onOptionKeyDown = (event) => {
|
|
513
|
+
// Delegate to main keyboard handler
|
|
514
|
+
this.handleKeyDown(event);
|
|
515
|
+
};
|
|
516
|
+
// Handler for button trigger click
|
|
517
|
+
this.onButtonTriggerClick = () => {
|
|
518
|
+
// The button and chip triggers are divs, so a click reaches them even while disabled.
|
|
519
|
+
if (this.disabled)
|
|
520
|
+
return;
|
|
521
|
+
this.isOpen = !this.isOpen;
|
|
522
|
+
if (this.isOpen) {
|
|
523
|
+
this.prepareExpandFilterListOnOpen();
|
|
524
|
+
this.filterOptions();
|
|
525
|
+
this.fetchAsyncOptionsOnOpen();
|
|
526
|
+
// Set highlighted index and prepare for keyboard navigation
|
|
527
|
+
this.setInitialHighlightedIndex();
|
|
528
|
+
// For button trigger, prepare for arrow-key navigation mode
|
|
529
|
+
this.isArrowKeyNavigationMode = true;
|
|
530
|
+
setTimeout(() => this.openDropdownPositioning(), 0);
|
|
531
|
+
}
|
|
532
|
+
else {
|
|
533
|
+
// Reset navigation mode when closing
|
|
534
|
+
this.clearExpandFilterList();
|
|
535
|
+
this.isArrowKeyNavigationMode = false;
|
|
536
|
+
}
|
|
537
|
+
};
|
|
538
|
+
// Handler for button trigger keyboard events
|
|
539
|
+
this.onButtonTriggerKeyDown = (e) => {
|
|
540
|
+
// Disabled takes it out of the tab order, but setFocus() or a click can still focus it.
|
|
541
|
+
if (this.disabled) {
|
|
542
|
+
// Keep Space from scrolling the page, as on a native disabled button.
|
|
543
|
+
if (e.key === ' ')
|
|
544
|
+
e.preventDefault();
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
// Escape closes an open group before the dropdown. Other keys reach the tree through handleKeyDown.
|
|
548
|
+
if (this.isOpen && e.key === 'Escape' && this.handleGroupedPanelKey(e))
|
|
549
|
+
return;
|
|
550
|
+
if ((e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowDown' || e.key === 'ArrowUp') && !this.isOpen) {
|
|
551
|
+
e.preventDefault();
|
|
552
|
+
e.stopPropagation(); // Prevent the event from bubbling and triggering click
|
|
553
|
+
this.keyboardNavigating = true;
|
|
554
|
+
this.isOpen = true;
|
|
555
|
+
this.prepareExpandFilterListOnOpen();
|
|
556
|
+
this.filterOptions();
|
|
557
|
+
this.fetchAsyncOptionsOnOpen();
|
|
558
|
+
// Set highlighted index immediately
|
|
559
|
+
this.setInitialHighlightedIndex();
|
|
560
|
+
setTimeout(() => {
|
|
561
|
+
this.openDropdownPositioning();
|
|
562
|
+
// For all button trigger keyboard opening, focus the first option so subsequent navigation works
|
|
563
|
+
this.focusFirstOptionForArrowKeys();
|
|
564
|
+
}, 0);
|
|
565
|
+
}
|
|
566
|
+
else if (e.key === 'Escape') {
|
|
567
|
+
// Only an open dropdown claims Escape; a closed one leaves it to a modal or popover around it.
|
|
568
|
+
if (this.isOpen) {
|
|
569
|
+
e.preventDefault();
|
|
570
|
+
this.isOpen = false;
|
|
571
|
+
this.highlightedIndex = -1;
|
|
572
|
+
this.clearExpandFilterList();
|
|
573
|
+
this.updateAriaActiveDescendant(); // Clear aria-activedescendant
|
|
574
|
+
this.restoreFocusToTrigger();
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
else if (this.isOpen) {
|
|
578
|
+
// Delegate other keys to main keyboard handler when dropdown is open
|
|
579
|
+
this.handleKeyDown(e);
|
|
580
|
+
}
|
|
581
|
+
};
|
|
582
|
+
// Handler for button trigger keyup events - prevents space key from triggering synthetic click
|
|
583
|
+
this.onButtonTriggerKeyUp = (e) => {
|
|
584
|
+
if (e.key === ' ') {
|
|
585
|
+
e.preventDefault();
|
|
586
|
+
e.stopPropagation();
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
// Close dropdown when focus leaves the combobox
|
|
590
|
+
this.onComboboxFocusOut = (event) => {
|
|
591
|
+
var _a, _b, _c;
|
|
592
|
+
const relatedTarget = event.relatedTarget;
|
|
593
|
+
const isRelatedTargetInListbox = relatedTarget &&
|
|
594
|
+
(((_a = this.listboxEl) === null || _a === void 0 ? void 0 : _a.contains(relatedTarget)) || ((_b = this.portalEl) === null || _b === void 0 ? void 0 : _b.contains(relatedTarget)));
|
|
595
|
+
// `contains` doesn't cross into the shadow root, where the trigger lives; with panel search,
|
|
596
|
+
// focus leaves the search field for the trigger whenever it's clicked to close.
|
|
597
|
+
const isRelatedTargetInCombobox = relatedTarget !== null && (this.el.contains(relatedTarget) || !!((_c = this.el.shadowRoot) === null || _c === void 0 ? void 0 : _c.contains(relatedTarget)));
|
|
598
|
+
// Don't close if focus is moving to an option in the listbox or staying within the combobox
|
|
599
|
+
if (!isRelatedTargetInCombobox && !isRelatedTargetInListbox) {
|
|
600
|
+
this.isOpen = false;
|
|
601
|
+
this.highlightedIndex = -1;
|
|
602
|
+
this.clearExpandFilterList();
|
|
603
|
+
this.isArrowKeyNavigationMode = false; // Reset arrow-key navigation mode
|
|
604
|
+
this.updateAriaActiveDescendant(); // Clear aria-activedescendant
|
|
605
|
+
// If there's a selected option but the display text doesn't match, restore the selected option's display text
|
|
606
|
+
if (this.selectedOption && this.displayText !== this.getOptionLabel(this.selectedOption)) {
|
|
607
|
+
this.displayText = this.getOptionLabel(this.selectedOption);
|
|
608
|
+
// The @Watch('selectedOption') will handle value and form internals if needed
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
};
|
|
612
|
+
/** A pick that fills the field from its placeholder fades in; a value it loads with doesn't. */
|
|
613
|
+
this.fadesValueIn = false;
|
|
614
|
+
this.handleScroll = (e) => {
|
|
615
|
+
if (!this.asyncUrl || !this.hasMore || this.loading)
|
|
616
|
+
return;
|
|
617
|
+
const target = e.target;
|
|
618
|
+
const scrollBottom = target.scrollHeight - target.scrollTop - target.clientHeight;
|
|
619
|
+
// Load more when near bottom (within 50px)
|
|
620
|
+
if (scrollBottom < 50) {
|
|
621
|
+
this.pdsComboboxLoadOptions.emit({
|
|
622
|
+
query: this.activeQuery,
|
|
623
|
+
page: this.currentPage + 1,
|
|
624
|
+
});
|
|
625
|
+
this.debouncedFetchAsyncOptions(this.activeQuery, this.currentPage + 1);
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
// A press on the panel's padding, captions or status rows keeps focus in the search field;
|
|
629
|
+
// otherwise it would blur the field, closing a portaled panel or stranding the keys.
|
|
630
|
+
this.onPanelMouseDown = (event) => {
|
|
631
|
+
if (event.target !== this.panelSearchEl)
|
|
632
|
+
event.preventDefault();
|
|
633
|
+
};
|
|
634
|
+
this.onPanelSearchInput = (event) => {
|
|
635
|
+
this.setPanelQuery(event.target.value);
|
|
636
|
+
};
|
|
637
|
+
// Space, Home and End edit the search text rather than moving through the options.
|
|
638
|
+
this.onPanelSearchKeyDown = (event) => {
|
|
639
|
+
if (event.key === ' ' || event.key === 'Home' || event.key === 'End')
|
|
640
|
+
return;
|
|
641
|
+
if (this.handlePanelTab(event))
|
|
642
|
+
return;
|
|
643
|
+
this.handleKeyDown(event);
|
|
644
|
+
};
|
|
645
|
+
/**
|
|
646
|
+
* Keys in the list while a drilled-in group hides the search field. Backspace, like ArrowLeft,
|
|
647
|
+
* steps back to the groups; a character starts a search of the whole list. Characters typed
|
|
648
|
+
* before the search field renders and takes focus still land on the list, so they add to the
|
|
649
|
+
* query rather than starting it again.
|
|
650
|
+
*/
|
|
651
|
+
this.onPanelTreeKeyDown = (event) => {
|
|
652
|
+
if (this.handlePanelTab(event))
|
|
653
|
+
return;
|
|
654
|
+
if (event.key === 'Backspace') {
|
|
655
|
+
event.preventDefault();
|
|
656
|
+
if (!this.leaveDrilledInGroup() && this.panelQuery !== '')
|
|
657
|
+
this.setPanelQuery(this.panelQuery.slice(0, -1));
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
// AltGr (Ctrl+Alt on Windows) and Option on macOS type characters too; Meta and Ctrl alone are
|
|
661
|
+
// shortcuts.
|
|
662
|
+
if (event.key.length === 1 && event.key !== ' ' && !event.metaKey && (!event.ctrlKey || event.altKey)) {
|
|
663
|
+
event.preventDefault();
|
|
664
|
+
this.flyout.reset();
|
|
665
|
+
// The query first, so leaving the group reads as search results, not a slide back.
|
|
666
|
+
this.setPanelQuery(this.panelQuery + event.key);
|
|
667
|
+
this.openGroup = null;
|
|
668
|
+
return;
|
|
669
|
+
}
|
|
670
|
+
this.handleKeyDown(event);
|
|
671
|
+
};
|
|
672
|
+
this.onGroupBackClick = () => {
|
|
673
|
+
this.leaveDrilledInGroup();
|
|
674
|
+
};
|
|
675
|
+
}
|
|
676
|
+
connectedCallback() {
|
|
677
|
+
// Initialize ElementInternals for form association (only once per element instance)
|
|
678
|
+
if (this.el.attachInternals && !this.internals) {
|
|
679
|
+
this.internals = this.el.attachInternals();
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Form Associated Custom Elements API: Called when the form is disabled
|
|
684
|
+
*/
|
|
685
|
+
formDisabledCallback(disabled) {
|
|
686
|
+
// Also fires when this element's own `disabled` attribute is merely present, even as the
|
|
687
|
+
// literal string "false" (a consumer's or React's attribute serialization can write that) —
|
|
688
|
+
// the platform treats any value as disabled, independent of fieldset state. A real disabled
|
|
689
|
+
// fieldset ancestor confirms this is genuinely that, not this element's own attribute.
|
|
690
|
+
if (disabled && !this.el.closest('fieldset[disabled]'))
|
|
691
|
+
return;
|
|
692
|
+
this.disabled = disabled;
|
|
693
|
+
}
|
|
694
|
+
componentWillLoad() {
|
|
695
|
+
this.originalSearchEmitter = this.pdsComboboxSearch;
|
|
696
|
+
this.updateOptions();
|
|
697
|
+
}
|
|
698
|
+
componentDidLoad() {
|
|
699
|
+
var _a, _b, _c;
|
|
700
|
+
this.setupDebounce();
|
|
701
|
+
// Check for value-based preselection if no option is selected yet
|
|
702
|
+
if (!this.selectedOption && this.value && this.optionEls.length > 0) {
|
|
703
|
+
const matchingOption = this.optionEls.find(opt => opt.value === this.value);
|
|
704
|
+
if (matchingOption) {
|
|
705
|
+
this.setSelectedOption(matchingOption);
|
|
706
|
+
// Update the display text to show the option's text content
|
|
707
|
+
this.displayText = this.getOptionLabel(matchingOption);
|
|
708
|
+
// Keep this.value as the actual option value
|
|
709
|
+
// this.value remains unchanged (already matches matchingOption.value)
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
// Initialize form value with current value
|
|
713
|
+
this.updateFormValue((_c = (_b = (_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : this.value) !== null && _c !== void 0 ? _c : '');
|
|
714
|
+
}
|
|
715
|
+
disconnectedCallback() {
|
|
716
|
+
var _a;
|
|
717
|
+
if (this.deferredPortalTeardownId !== undefined) {
|
|
718
|
+
clearTimeout(this.deferredPortalTeardownId);
|
|
719
|
+
this.deferredPortalTeardownId = undefined;
|
|
720
|
+
}
|
|
721
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
722
|
+
cancelDebouncedEvent(this.pdsComboboxSearch);
|
|
723
|
+
this.clearAsyncFetchState();
|
|
724
|
+
this.removeBodyPortal();
|
|
725
|
+
this.flyout.reset();
|
|
726
|
+
}
|
|
727
|
+
componentDidRender() {
|
|
728
|
+
var _a;
|
|
729
|
+
if (this.usesBodyPortal && this.isOpen) {
|
|
730
|
+
this.syncBodyPortal();
|
|
731
|
+
}
|
|
732
|
+
// Opening places the dropdown a tick later, which can run before the dropdown has rendered and
|
|
733
|
+
// then skips it, leaving it without its dropdown-width and max-height. Place a newly rendered
|
|
734
|
+
// dropdown here too.
|
|
735
|
+
if (this.isOpen && this.triggerEl && this.listboxEl && this.listboxEl !== this.placedListboxEl) {
|
|
736
|
+
this.placedListboxEl = this.listboxEl;
|
|
737
|
+
void this.positionDropdown();
|
|
738
|
+
}
|
|
739
|
+
this.glideDrillHeight();
|
|
740
|
+
const row = (_a = this.listboxEl) === null || _a === void 0 ? void 0 : _a.querySelector('.pds-combobox__group-row--open');
|
|
741
|
+
const flyoutEl = row === null || row === void 0 ? void 0 : row.querySelector('.pds-combobox__flyout');
|
|
742
|
+
if (this.isOpen && this.listboxEl && row && flyoutEl) {
|
|
743
|
+
this.flyout.position(row, this.listboxEl, flyoutEl);
|
|
744
|
+
}
|
|
745
|
+
else {
|
|
746
|
+
this.flyout.stopPositioning();
|
|
747
|
+
}
|
|
748
|
+
if (this.pendingOptionFocus) {
|
|
749
|
+
this.pendingOptionFocus = false;
|
|
750
|
+
this.updateOptionFocus();
|
|
751
|
+
}
|
|
752
|
+
// Panel search keeps focus in the search field, or in the list while a group hides the field.
|
|
753
|
+
const panelFocusEl = this.hidesPanelSearch ? this.panelTreeEl : this.panelSearchEl;
|
|
754
|
+
if (this.isOpen && this.usesPanelSearch && panelFocusEl && panelFocusEl !== this.panelFocusEl) {
|
|
755
|
+
this.focusPanel(panelFocusEl);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
// A `title` only while the text is cut, measured on hover. On the span, not the option or trigger,
|
|
759
|
+
// so it isn't read again as their description.
|
|
760
|
+
syncTitle(el, selector) {
|
|
761
|
+
const text = el.querySelector(selector);
|
|
762
|
+
if (!text)
|
|
763
|
+
return;
|
|
764
|
+
if (text.scrollWidth > text.clientWidth) {
|
|
765
|
+
text.title = text.textContent || '';
|
|
766
|
+
}
|
|
767
|
+
else {
|
|
768
|
+
text.removeAttribute('title');
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Scrolls just enough to show `el`, as `scrollIntoView({ block: 'nearest' })` does. In the drill-in
|
|
773
|
+
* panel it scrolls the list alone, and never sideways: while a drill-in slide offsets a row past
|
|
774
|
+
* the list's edge, `scrollIntoView` also scrolls the list horizontally to reach it, which eats most
|
|
775
|
+
* of the slide. It doesn't scroll the page or a scrolling ancestor.
|
|
776
|
+
*/
|
|
777
|
+
scrollIntoViewNearest(el, smooth) {
|
|
778
|
+
const behavior = smooth ? 'smooth' : 'auto';
|
|
779
|
+
if (!this.showsGroupedPanel || this.effectiveGroupDisplay !== 'drill-in') {
|
|
780
|
+
el.scrollIntoView({ block: 'nearest', behavior });
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
// The row back is the drilled-in header, above the scrolling options: always in view.
|
|
784
|
+
if (el.classList.contains('pds-combobox__group-back-trigger'))
|
|
785
|
+
return;
|
|
786
|
+
const list = this.scrollListEl;
|
|
787
|
+
if (!list)
|
|
788
|
+
return;
|
|
789
|
+
const offset = el.getBoundingClientRect().top - list.getBoundingClientRect().top - list.clientTop;
|
|
790
|
+
const top = list.scrollTop + offset;
|
|
791
|
+
const bottom = list.scrollTop + offset + el.offsetHeight - list.clientHeight;
|
|
792
|
+
const target = top < list.scrollTop ? top : bottom > list.scrollTop ? bottom : null;
|
|
793
|
+
if (target !== null)
|
|
794
|
+
list.scrollTo({ top: target, behavior });
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* The element that scrolls the panel's rows. Every layer is a header (the search field, or a
|
|
798
|
+
* drilled-in group's row back) above the rows that scroll: drilled in, the group's options;
|
|
799
|
+
* otherwise the list under the search field, or the panel itself.
|
|
800
|
+
*/
|
|
801
|
+
get scrollListEl() {
|
|
802
|
+
var _a;
|
|
803
|
+
const list = this.usesPanelSearch ? this.panelTreeEl : this.listboxEl;
|
|
804
|
+
return (_a = list === null || list === void 0 ? void 0 : list.querySelector('.pds-combobox__group-back > .pds-combobox__drill-in-options')) !== null && _a !== void 0 ? _a : list;
|
|
805
|
+
}
|
|
806
|
+
focusPanel(el) {
|
|
807
|
+
var _a, _b;
|
|
808
|
+
this.panelFocusEl = el;
|
|
809
|
+
// Before the dropdown is positioned it sits in the page's flow; don't scroll to it.
|
|
810
|
+
el.focus({ preventScroll: true });
|
|
811
|
+
// A search started by typing in the list carries its first character; type on after it.
|
|
812
|
+
if (el === this.panelSearchEl && this.panelQuery !== '') {
|
|
813
|
+
(_b = (_a = this.panelSearchEl).setSelectionRange) === null || _b === void 0 ? void 0 : _b.call(_a, this.panelQuery.length, this.panelQuery.length);
|
|
814
|
+
}
|
|
815
|
+
this.updateAriaActiveDescendant();
|
|
816
|
+
}
|
|
817
|
+
/** Switching display mode leaves no flyout or hover timer from the last one. */
|
|
818
|
+
groupDisplayChanged() {
|
|
819
|
+
this.flyout.reset();
|
|
820
|
+
this.openGroup = null;
|
|
821
|
+
// The reset isn't a drill-out, so it doesn't slide either.
|
|
822
|
+
this.drillDirection = null;
|
|
823
|
+
this.endHeightGlide();
|
|
824
|
+
}
|
|
825
|
+
openGroupChanged(next, previous) {
|
|
826
|
+
this.handPanelFocusToList();
|
|
827
|
+
this.revealedGroupLabel = null;
|
|
828
|
+
// Only moves between the drill-in panel's views slide; search results don't.
|
|
829
|
+
if (!this.isOpen || this.effectiveGroupDisplay !== 'drill-in' || !this.showsGroupedPanel)
|
|
830
|
+
return;
|
|
831
|
+
if (next !== null && previous === null)
|
|
832
|
+
this.drillDirection = 'in';
|
|
833
|
+
else if (next === null && previous !== null)
|
|
834
|
+
this.drillDirection = 'out';
|
|
835
|
+
else
|
|
836
|
+
return;
|
|
837
|
+
// The views differ in height; measured now, before the next one renders, so it can glide.
|
|
838
|
+
const panel = this.listboxEl;
|
|
839
|
+
if (!panel)
|
|
840
|
+
return;
|
|
841
|
+
const from = panel.getBoundingClientRect().height;
|
|
842
|
+
this.drillFromHeight = from;
|
|
843
|
+
// Pinned there until componentDidRender measures the new view, however late: a child component
|
|
844
|
+
// that renders late could otherwise let the browser paint the new view at its full height first.
|
|
845
|
+
panel.style.height = `${from}px`;
|
|
846
|
+
panel.classList.add('pds-combobox__listbox--height-hold');
|
|
847
|
+
this.syncPanelOverflow();
|
|
848
|
+
}
|
|
849
|
+
releaseHeightHold() {
|
|
850
|
+
const panel = this.listboxEl;
|
|
851
|
+
panel === null || panel === void 0 ? void 0 : panel.style.removeProperty('height');
|
|
852
|
+
panel === null || panel === void 0 ? void 0 : panel.classList.remove('pds-combobox__listbox--height-hold');
|
|
853
|
+
}
|
|
854
|
+
/**
|
|
855
|
+
* Hands the dropdown's height before and after a drill to the SCSS glide. Neither is known ahead,
|
|
856
|
+
* so they're measured: CSS can't animate to the height its content turns out to be.
|
|
857
|
+
*/
|
|
858
|
+
glideDrillHeight() {
|
|
859
|
+
const from = this.drillFromHeight;
|
|
860
|
+
this.drillFromHeight = undefined;
|
|
861
|
+
const panel = this.listboxEl;
|
|
862
|
+
if (from === undefined || !panel)
|
|
863
|
+
return;
|
|
864
|
+
// A drill back mid-glide starts from where the last one is now, then measures the real height.
|
|
865
|
+
this.releaseHeightHold();
|
|
866
|
+
panel.classList.remove('pds-combobox__listbox--height-glide');
|
|
867
|
+
this.syncPanelOverflow();
|
|
868
|
+
const to = panel.getBoundingClientRect().height;
|
|
869
|
+
if (Math.abs(to - from) < 1) {
|
|
870
|
+
this.endHeightGlide();
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
panel.style.setProperty('--pds-combobox-glide-from', `${from}px`);
|
|
874
|
+
panel.style.setProperty('--pds-combobox-glide-to', `${to}px`);
|
|
875
|
+
panel.classList.add('pds-combobox__listbox--height-glide');
|
|
876
|
+
this.syncPanelOverflow();
|
|
877
|
+
// A glide cut short without ending (the panel hidden mid-way) still cleans up. JSX has no
|
|
878
|
+
// `onAnimationCancel`; adding the same listener again is a no-op.
|
|
879
|
+
panel.addEventListener('animationcancel', this.onHeightGlideCancel);
|
|
880
|
+
}
|
|
881
|
+
/** Ends a glide, and a drill still waiting to glide, so nothing starts once it renders. */
|
|
882
|
+
endHeightGlide() {
|
|
883
|
+
this.drillFromHeight = undefined;
|
|
884
|
+
this.releaseHeightHold();
|
|
885
|
+
const panel = this.listboxEl;
|
|
886
|
+
panel === null || panel === void 0 ? void 0 : panel.classList.remove('pds-combobox__listbox--height-glide');
|
|
887
|
+
this.syncPanelOverflow();
|
|
888
|
+
panel === null || panel === void 0 ? void 0 : panel.style.removeProperty('--pds-combobox-glide-from');
|
|
889
|
+
panel === null || panel === void 0 ? void 0 : panel.style.removeProperty('--pds-combobox-glide-to');
|
|
890
|
+
panel === null || panel === void 0 ? void 0 : panel.removeEventListener('animationcancel', this.onHeightGlideCancel);
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* With `max-height`, the panel's own scroll, set inline so it outranks the stylesheet: hidden under a
|
|
894
|
+
* fixed search field, and while the height glides (so no scrollbar flashes), otherwise auto.
|
|
895
|
+
*/
|
|
896
|
+
syncPanelOverflow() {
|
|
897
|
+
var _a;
|
|
898
|
+
if (((_a = this.maxHeight) !== null && _a !== void 0 ? _a : '') === '' || !this.listboxEl)
|
|
899
|
+
return;
|
|
900
|
+
const gliding = this.listboxEl.classList.contains('pds-combobox__listbox--height-glide') ||
|
|
901
|
+
this.listboxEl.classList.contains('pds-combobox__listbox--height-hold');
|
|
902
|
+
this.listboxEl.style.overflowY = this.usesPanelSearch || gliding ? 'hidden' : 'auto';
|
|
903
|
+
}
|
|
904
|
+
/** A flyout with no room beside the dropdown drills in, which can hide the focused search field too. */
|
|
905
|
+
flyoutFallbackChanged() {
|
|
906
|
+
this.handPanelFocusToList();
|
|
907
|
+
}
|
|
908
|
+
/**
|
|
909
|
+
* Drilling into a group hides the search field, so focus moves to the list before the field
|
|
910
|
+
* unmounts: focus lost with it would leave the combobox and close the dropdown.
|
|
911
|
+
*/
|
|
912
|
+
handPanelFocusToList() {
|
|
913
|
+
if (this.isOpen && this.hidesPanelSearch && this.panelTreeEl)
|
|
914
|
+
this.focusPanel(this.panelTreeEl);
|
|
915
|
+
}
|
|
916
|
+
disabledChanged(disabled) {
|
|
917
|
+
var _a, _b, _c, _d, _e;
|
|
918
|
+
if (!disabled || !this.isOpen)
|
|
919
|
+
return;
|
|
920
|
+
const shadowActive = (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) !== null && _b !== void 0 ? _b : null;
|
|
921
|
+
const focusInDropdown = !!((_d = (_c = this.portalEl) === null || _c === void 0 ? void 0 : _c.shadowRoot) === null || _d === void 0 ? void 0 : _d.activeElement) || (!!shadowActive && !!((_e = this.listboxEl) === null || _e === void 0 ? void 0 : _e.contains(shadowActive)));
|
|
922
|
+
this.isOpen = false;
|
|
923
|
+
this.highlightedIndex = -1;
|
|
924
|
+
this.isArrowKeyNavigationMode = false;
|
|
925
|
+
this.clearExpandFilterList();
|
|
926
|
+
this.updateAriaActiveDescendant();
|
|
927
|
+
// Closing removes the search field or option that held focus. A button or chip trigger can still
|
|
928
|
+
// take it (aria-disabled), so focus doesn't fall to the page; a disabled input can't, as natively.
|
|
929
|
+
if (focusInDropdown && this.trigger !== 'input')
|
|
930
|
+
this.restoreFocusToTrigger();
|
|
931
|
+
}
|
|
932
|
+
isOpenChanged(isOpen) {
|
|
933
|
+
if (!isOpen) {
|
|
934
|
+
this.endHeightGlide();
|
|
935
|
+
this.revealedGroupLabel = null;
|
|
936
|
+
this.drillDirection = null;
|
|
937
|
+
this.openGroup = null;
|
|
938
|
+
this.highlightedGroup = null;
|
|
939
|
+
this.keyboardNavigating = false;
|
|
940
|
+
this.flyout.reset();
|
|
941
|
+
if (this.panelQuery !== '') {
|
|
942
|
+
// The field reopens empty, so tell consumers who filter `options` from this event.
|
|
943
|
+
this.panelQuery = '';
|
|
944
|
+
this.pdsComboboxSearch.emit({ query: '' });
|
|
945
|
+
}
|
|
946
|
+
// And with `async-url`, start loading the unsearched list now, so it's ready by the reopen.
|
|
947
|
+
if (this.usesPanelSearch && this.asyncUrl && this.lastFetchedQuery !== '') {
|
|
948
|
+
this.debouncedFetchAsyncOptions('', 1);
|
|
949
|
+
}
|
|
950
|
+
this.panelFocusEl = undefined;
|
|
951
|
+
this.flyoutRoomChecked = false;
|
|
952
|
+
this.flyoutFallback = false;
|
|
953
|
+
}
|
|
954
|
+
if (isOpen && this.deferredPortalTeardownId !== undefined) {
|
|
955
|
+
clearTimeout(this.deferredPortalTeardownId);
|
|
956
|
+
this.deferredPortalTeardownId = undefined;
|
|
957
|
+
}
|
|
958
|
+
if (isOpen && this.usesBodyPortal) {
|
|
959
|
+
// Rapid reopen can cancel deferred teardown while the portal still holds the previous
|
|
960
|
+
// listbox node; clear portal state before the next render attaches the new listbox, and
|
|
961
|
+
// reset Floating UI autoUpdate bookkeeping.
|
|
962
|
+
this.removeBodyPortal();
|
|
963
|
+
}
|
|
964
|
+
if (!isOpen && this.usesBodyPortal) {
|
|
965
|
+
if (this.deferredPortalTeardownId !== undefined) {
|
|
966
|
+
clearTimeout(this.deferredPortalTeardownId);
|
|
967
|
+
}
|
|
968
|
+
this.deferredPortalTeardownId = setTimeout(() => {
|
|
969
|
+
this.deferredPortalTeardownId = undefined;
|
|
970
|
+
if (!this.el.isConnected) {
|
|
971
|
+
return;
|
|
972
|
+
}
|
|
973
|
+
if (!this.isOpen) {
|
|
974
|
+
this.removeBodyPortal();
|
|
975
|
+
}
|
|
976
|
+
}, 0);
|
|
977
|
+
return;
|
|
978
|
+
}
|
|
979
|
+
if (!isOpen) {
|
|
980
|
+
this.removeBodyPortal();
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
get usesBodyPortal() {
|
|
984
|
+
return this.dropdownMount === 'body';
|
|
985
|
+
}
|
|
986
|
+
get labelId() {
|
|
987
|
+
return `${this.componentId}-label`;
|
|
988
|
+
}
|
|
989
|
+
/** One check for "the `<label>` is rendered", so the label and the reference to it can't disagree. */
|
|
990
|
+
get hasVisibleLabel() {
|
|
991
|
+
return Boolean(this.label) && !this.hideLabel;
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
994
|
+
* The button and chip triggers are `div`s, which `<label for>` can't name, so they point at the
|
|
995
|
+
* visible label instead. With `hide-label` there is no visible label and `aria-label` names them.
|
|
996
|
+
* With panel search the trigger is a button, which has no value, so its own text (the selection
|
|
997
|
+
* or placeholder) joins the label in its name.
|
|
998
|
+
*/
|
|
999
|
+
get triggerLabelledBy() {
|
|
1000
|
+
if (!this.hasVisibleLabel)
|
|
1001
|
+
return undefined;
|
|
1002
|
+
return this.usesPanelSearch ? `${this.labelId} ${this.componentId}` : this.labelId;
|
|
1003
|
+
}
|
|
1004
|
+
/** The div triggers' `aria-label` when the label is hidden; with panel search it names the selection too. */
|
|
1005
|
+
get triggerAriaLabel() {
|
|
1006
|
+
if (!this.hideLabel)
|
|
1007
|
+
return undefined;
|
|
1008
|
+
const shown = this.selectedLabel || this.placeholder;
|
|
1009
|
+
return this.usesPanelSearch && shown ? `${this.label}, ${shown}` : this.label;
|
|
1010
|
+
}
|
|
1011
|
+
get listboxId() {
|
|
1012
|
+
return `${this.componentId}-listbox`;
|
|
1013
|
+
}
|
|
1014
|
+
optionDomId(optionIndex) {
|
|
1015
|
+
return `${this.componentId}-option-${optionIndex}`;
|
|
1016
|
+
}
|
|
1017
|
+
groupDomId(optgroup) {
|
|
1018
|
+
let id = this.groupIds.get(optgroup);
|
|
1019
|
+
if (id === undefined) {
|
|
1020
|
+
id = `${this.componentId}-group-${this.groupIdCount++}`;
|
|
1021
|
+
this.groupIds.set(optgroup, id);
|
|
1022
|
+
}
|
|
1023
|
+
return id;
|
|
1024
|
+
}
|
|
1025
|
+
setupDebounce() {
|
|
1026
|
+
const { pdsComboboxSearch, debounce, originalSearchEmitter } = this;
|
|
1027
|
+
this.pdsComboboxSearch = debounce === undefined
|
|
1028
|
+
? originalSearchEmitter !== null && originalSearchEmitter !== void 0 ? originalSearchEmitter : pdsComboboxSearch
|
|
1029
|
+
: debounceEvent(pdsComboboxSearch, debounce);
|
|
1030
|
+
// After the swap, so an emit made while flushing goes to the new emitter, not the old one.
|
|
1031
|
+
flushDebouncedEvent(pdsComboboxSearch);
|
|
1032
|
+
}
|
|
1033
|
+
optionsChanged() {
|
|
1034
|
+
if (this.options) {
|
|
1035
|
+
this.internalOptions = [...this.options];
|
|
1036
|
+
this.updateOptionsFromAsync();
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
handleValueChange() {
|
|
1040
|
+
this.filterOptions();
|
|
1041
|
+
// Sync with form internals for form association
|
|
1042
|
+
this.updateFormValue(this.value);
|
|
1043
|
+
// Find and select option that matches the value (for external value changes)
|
|
1044
|
+
// Only do this if we're not already updating from a selection
|
|
1045
|
+
if (!this.isUpdatingFromSelection && this.value && this.optionEls.length > 0) {
|
|
1046
|
+
const currentSelectedValue = this.selectedOption ? this.selectedOption.value : null;
|
|
1047
|
+
// If the value doesn't match the currently selected option's value, we need to update
|
|
1048
|
+
if (this.value !== currentSelectedValue) {
|
|
1049
|
+
const matchingOption = this.optionEls.find(opt => opt.value === this.value);
|
|
1050
|
+
if (matchingOption) {
|
|
1051
|
+
this.isUpdatingFromSelection = true;
|
|
1052
|
+
this.setSelectedOption(matchingOption);
|
|
1053
|
+
// Update the display text to show the option's text content
|
|
1054
|
+
this.displayText = this.getOptionLabel(matchingOption);
|
|
1055
|
+
// Keep this.value as the actual option value (already correct)
|
|
1056
|
+
this.isUpdatingFromSelection = false;
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
handleSelectedOptionChange() {
|
|
1062
|
+
// Update the layout content when selected option changes
|
|
1063
|
+
this.selectedOptionLayoutContent = this.selectedOption && this.isOptionLayout(this.selectedOption)
|
|
1064
|
+
? this.getOptionLayoutContent(this.selectedOption)
|
|
1065
|
+
: '';
|
|
1066
|
+
// Update chip properties for automatic rendering when selected option changes
|
|
1067
|
+
this.selectedOptionChipProps = this.selectedOption && this.isOptionChip(this.selectedOption)
|
|
1068
|
+
? this.getOptionChipProps(this.selectedOption)
|
|
1069
|
+
: null;
|
|
1070
|
+
// Update display text when selected option changes
|
|
1071
|
+
if (this.selectedOption) {
|
|
1072
|
+
this.displayText = this.getOptionLabel(this.selectedOption);
|
|
1073
|
+
this.value = this.selectedOption.value;
|
|
1074
|
+
// Update form internals with the actual option value
|
|
1075
|
+
this.updateFormValue(this.selectedOption.value);
|
|
1076
|
+
}
|
|
1077
|
+
else {
|
|
1078
|
+
this.displayText = '';
|
|
1079
|
+
this.value = '';
|
|
1080
|
+
this.updateFormValue('');
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
updateFormValue(value) {
|
|
1084
|
+
if (isSpecTest())
|
|
1085
|
+
return;
|
|
1086
|
+
if (this.internals && this.internals.setFormValue) {
|
|
1087
|
+
this.internals.setFormValue(value);
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
clearAsyncFetchState() {
|
|
1091
|
+
var _a;
|
|
1092
|
+
if (this.fetchDebounceTimer !== undefined) {
|
|
1093
|
+
window.clearTimeout(this.fetchDebounceTimer);
|
|
1094
|
+
this.fetchDebounceTimer = undefined;
|
|
1095
|
+
}
|
|
1096
|
+
if (this.fetchTimeoutTimer !== undefined) {
|
|
1097
|
+
window.clearTimeout(this.fetchTimeoutTimer);
|
|
1098
|
+
this.fetchTimeoutTimer = undefined;
|
|
1099
|
+
}
|
|
1100
|
+
(_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
1101
|
+
this.abortController = undefined;
|
|
1102
|
+
}
|
|
1103
|
+
debouncedFetchAsyncOptions(query, page = 1) {
|
|
1104
|
+
var _a;
|
|
1105
|
+
if (!this.asyncUrl)
|
|
1106
|
+
return;
|
|
1107
|
+
if (this.fetchDebounceTimer !== undefined) {
|
|
1108
|
+
window.clearTimeout(this.fetchDebounceTimer);
|
|
1109
|
+
}
|
|
1110
|
+
const delay = Math.max(0, (_a = this.debounce) !== null && _a !== void 0 ? _a : 0);
|
|
1111
|
+
this.fetchDebounceTimer = window.setTimeout(() => {
|
|
1112
|
+
this.fetchDebounceTimer = undefined;
|
|
1113
|
+
this.fetchOptions(query, page);
|
|
1114
|
+
}, delay);
|
|
1115
|
+
}
|
|
1116
|
+
async fetchOptions(query, page = 1) {
|
|
1117
|
+
var _a;
|
|
1118
|
+
if (!this.asyncUrl)
|
|
1119
|
+
return;
|
|
1120
|
+
// Abort any pending request and clear existing timeout
|
|
1121
|
+
(_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
1122
|
+
if (this.fetchTimeoutTimer !== undefined) {
|
|
1123
|
+
window.clearTimeout(this.fetchTimeoutTimer);
|
|
1124
|
+
this.fetchTimeoutTimer = undefined;
|
|
1125
|
+
}
|
|
1126
|
+
this.abortController = new AbortController();
|
|
1127
|
+
this.loading = true;
|
|
1128
|
+
// Set up timeout for fetch request
|
|
1129
|
+
this.fetchTimeoutTimer = window.setTimeout(() => {
|
|
1130
|
+
var _a;
|
|
1131
|
+
(_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
1132
|
+
this.fetchTimeoutTimer = undefined;
|
|
1133
|
+
}, this.fetchTimeout);
|
|
1134
|
+
try {
|
|
1135
|
+
// Guard against malformed asyncUrl
|
|
1136
|
+
let url;
|
|
1137
|
+
try {
|
|
1138
|
+
url = new URL(this.asyncUrl, window.location.origin);
|
|
1139
|
+
}
|
|
1140
|
+
catch (urlError) {
|
|
1141
|
+
throw new TypeError(`Invalid asyncUrl: ${this.asyncUrl}`);
|
|
1142
|
+
}
|
|
1143
|
+
if (this.asyncMethod === 'GET') {
|
|
1144
|
+
url.searchParams.set('search', query);
|
|
1145
|
+
url.searchParams.set('page', String(page));
|
|
1146
|
+
}
|
|
1147
|
+
const response = await fetch(url.toString(), Object.assign({ method: this.asyncMethod, signal: this.abortController.signal, headers: {
|
|
1148
|
+
'Content-Type': 'application/json',
|
|
1149
|
+
'Accept': 'application/json',
|
|
1150
|
+
} }, (this.asyncMethod === 'POST' && {
|
|
1151
|
+
body: JSON.stringify({ search: query, page }),
|
|
1152
|
+
})));
|
|
1153
|
+
// Clear timeout on successful response
|
|
1154
|
+
if (this.fetchTimeoutTimer !== undefined) {
|
|
1155
|
+
window.clearTimeout(this.fetchTimeoutTimer);
|
|
1156
|
+
this.fetchTimeoutTimer = undefined;
|
|
1157
|
+
}
|
|
1158
|
+
if (!response.ok)
|
|
1159
|
+
throw new Error('Failed to fetch options');
|
|
1160
|
+
const data = await response.json();
|
|
1161
|
+
const formattedResults = data.results.map(item => {
|
|
1162
|
+
// If formatResult is provided, use it
|
|
1163
|
+
if (this.formatResult) {
|
|
1164
|
+
return this.formatResult(item);
|
|
1165
|
+
}
|
|
1166
|
+
// Defensive check: ensure item is an object before spreading
|
|
1167
|
+
if (typeof item === 'object' && item !== null) {
|
|
1168
|
+
return Object.assign({ id: item.id, text: item.text }, item);
|
|
1169
|
+
}
|
|
1170
|
+
// Handle primitives by converting to safe shape
|
|
1171
|
+
return {
|
|
1172
|
+
id: String(item),
|
|
1173
|
+
text: String(item),
|
|
1174
|
+
};
|
|
1175
|
+
});
|
|
1176
|
+
if (page === 1) {
|
|
1177
|
+
this.internalOptions = formattedResults;
|
|
1178
|
+
// Only once its results have loaded: a failed or aborted fetch leaves the last query's.
|
|
1179
|
+
this.lastFetchedQuery = query;
|
|
1180
|
+
}
|
|
1181
|
+
else {
|
|
1182
|
+
this.internalOptions = [...this.internalOptions, ...formattedResults];
|
|
1183
|
+
}
|
|
1184
|
+
this.hasMore = data.totalCount ? this.internalOptions.length < data.totalCount : false;
|
|
1185
|
+
this.currentPage = page;
|
|
1186
|
+
// Update DOM options from async data
|
|
1187
|
+
this.updateOptionsFromAsync();
|
|
1188
|
+
}
|
|
1189
|
+
catch (error) {
|
|
1190
|
+
// Clear timeout on error
|
|
1191
|
+
if (this.fetchTimeoutTimer !== undefined) {
|
|
1192
|
+
window.clearTimeout(this.fetchTimeoutTimer);
|
|
1193
|
+
this.fetchTimeoutTimer = undefined;
|
|
1194
|
+
}
|
|
1195
|
+
if (error.name !== 'AbortError') {
|
|
1196
|
+
console.error('PdsCombobox: Failed to fetch options', error);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
finally {
|
|
1200
|
+
this.loading = false;
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
updateOptionsFromAsync() {
|
|
1204
|
+
var _a;
|
|
1205
|
+
if (!this.asyncUrl && !this.options)
|
|
1206
|
+
return;
|
|
1207
|
+
// Clear existing slot-based options when using async
|
|
1208
|
+
this.optionEls = [];
|
|
1209
|
+
this.allItems = [];
|
|
1210
|
+
// Create option elements from async data. Grouped options are nested in an optgroup, as
|
|
1211
|
+
// slotted markup would be, so grouping, filtering and labels work the same either way. Each
|
|
1212
|
+
// group is listed where it first appears with all of its options, even when the data
|
|
1213
|
+
// interleaves groups, so an option never renders under another group's label. Ungrouped
|
|
1214
|
+
// options come first, so none reads as part of the group above it. The flyout and drill-in
|
|
1215
|
+
// panels draw groups as rows, where that can't happen, so they keep the data's order instead.
|
|
1216
|
+
const asyncOptions = this.options || this.internalOptions;
|
|
1217
|
+
const groups = new Map();
|
|
1218
|
+
const ungrouped = [];
|
|
1219
|
+
const groupEntries = [];
|
|
1220
|
+
this.panelPositions = new WeakMap();
|
|
1221
|
+
asyncOptions.forEach((opt, position) => {
|
|
1222
|
+
const optionEl = document.createElement('option');
|
|
1223
|
+
optionEl.value = String(opt.id);
|
|
1224
|
+
optionEl.textContent = opt.text;
|
|
1225
|
+
if (opt.disabled === true)
|
|
1226
|
+
optionEl.setAttribute('disabled', '');
|
|
1227
|
+
// Only strings group an option or name an icon; anything else from JS is ignored, not coerced.
|
|
1228
|
+
if (typeof opt.icon === 'string' && opt.icon !== '')
|
|
1229
|
+
optionEl.setAttribute('data-icon', opt.icon);
|
|
1230
|
+
this.setBadgeAttributes(optionEl, opt.badge);
|
|
1231
|
+
if (typeof opt.group !== 'string' || opt.group === '') {
|
|
1232
|
+
ungrouped.push(optionEl);
|
|
1233
|
+
this.panelPositions.set(optionEl, position);
|
|
1234
|
+
return;
|
|
1235
|
+
}
|
|
1236
|
+
let optgroup = groups.get(opt.group);
|
|
1237
|
+
if (!optgroup) {
|
|
1238
|
+
optgroup = document.createElement('optgroup');
|
|
1239
|
+
optgroup.label = opt.group;
|
|
1240
|
+
groups.set(opt.group, optgroup);
|
|
1241
|
+
groupEntries.push(optgroup);
|
|
1242
|
+
this.panelPositions.set(optgroup, position);
|
|
1243
|
+
}
|
|
1244
|
+
if (!optgroup.hasAttribute('data-icon') && typeof opt.groupIcon === 'string' && opt.groupIcon !== '') {
|
|
1245
|
+
optgroup.setAttribute('data-icon', opt.groupIcon);
|
|
1246
|
+
}
|
|
1247
|
+
if (!optgroup.hasAttribute('data-badge'))
|
|
1248
|
+
this.setBadgeAttributes(optgroup, opt.groupBadge);
|
|
1249
|
+
optgroup.appendChild(optionEl);
|
|
1250
|
+
});
|
|
1251
|
+
[...ungrouped, ...groupEntries].forEach(entry => {
|
|
1252
|
+
if (entry.tagName === 'OPTGROUP') {
|
|
1253
|
+
this.allItems.push(entry);
|
|
1254
|
+
Array.from(entry.children).forEach(child => {
|
|
1255
|
+
this.optionEls.push(child);
|
|
1256
|
+
this.allItems.push(child);
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
else {
|
|
1260
|
+
this.optionEls.push(entry);
|
|
1261
|
+
this.allItems.push(entry);
|
|
1262
|
+
}
|
|
1263
|
+
});
|
|
1264
|
+
// A rebuild replaces every optgroup. Follow the open group to its new element by label, so the
|
|
1265
|
+
// flyout stays open across reloads and pagination, or close it if the group is gone. The hover
|
|
1266
|
+
// timers still hold the old element, so they're cleared either way. filterOptions, below,
|
|
1267
|
+
// resets the highlight.
|
|
1268
|
+
if (this.openGroup !== null && !groupEntries.includes(this.openGroup)) {
|
|
1269
|
+
this.flyout.reset();
|
|
1270
|
+
this.openGroup = (_a = groups.get(this.openGroup.label)) !== null && _a !== void 0 ? _a : null;
|
|
1271
|
+
}
|
|
1272
|
+
// Re-apply the selection to the rebuilt options: when `value` is set before async options have
|
|
1273
|
+
// loaded, and after any rebuild, which detaches the previously selected option element.
|
|
1274
|
+
if (this.value && (!this.selectedOption || !this.optionEls.includes(this.selectedOption))) {
|
|
1275
|
+
const matchingOption = this.optionEls.find(opt => opt.value === this.value);
|
|
1276
|
+
if (matchingOption) {
|
|
1277
|
+
// Relinking a selection keeps the same value, so it keeps any text being typed too, which
|
|
1278
|
+
// the selectedOption watcher would otherwise reset to the label.
|
|
1279
|
+
const typed = this.selectedOption ? this.displayText : undefined;
|
|
1280
|
+
this.setSelectedOption(matchingOption);
|
|
1281
|
+
if (typed !== undefined)
|
|
1282
|
+
this.displayText = typed;
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
this.filterOptions();
|
|
1286
|
+
}
|
|
1287
|
+
updateOptions() {
|
|
1288
|
+
var _a;
|
|
1289
|
+
// Skip slot-based options if using async
|
|
1290
|
+
if (this.asyncUrl || this.options) {
|
|
1291
|
+
this.updateOptionsFromAsync();
|
|
1292
|
+
return;
|
|
1293
|
+
}
|
|
1294
|
+
// Get all elements from the slot. Before the first render there's no slot yet, so read the
|
|
1295
|
+
// host's own children that it will hold (through any slot passing options on): otherwise a
|
|
1296
|
+
// combobox created with a `value`, such as a form re-rendered after a pick, paints its
|
|
1297
|
+
// placeholder for a frame, until `slotchange` finds the selected option.
|
|
1298
|
+
const slot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot[name="option"], slot:not([name])');
|
|
1299
|
+
const allElements = slot
|
|
1300
|
+
? slot.assignedElements({ flatten: true })
|
|
1301
|
+
: Array.from(this.el.children)
|
|
1302
|
+
.filter(el => !el.getAttribute('slot'))
|
|
1303
|
+
.flatMap(el => (el.tagName === 'SLOT' ? el.assignedElements({ flatten: true }) : [el]));
|
|
1304
|
+
// Separate options from group labels and flatten optgroups
|
|
1305
|
+
this.allItems = [];
|
|
1306
|
+
this.optionEls = [];
|
|
1307
|
+
allElements.forEach(el => {
|
|
1308
|
+
if (el.tagName === 'OPTION') {
|
|
1309
|
+
this.optionEls.push(el);
|
|
1310
|
+
this.allItems.push(el);
|
|
1311
|
+
}
|
|
1312
|
+
else if (el.tagName === 'OPTGROUP') {
|
|
1313
|
+
const optgroup = el;
|
|
1314
|
+
this.allItems.push(optgroup);
|
|
1315
|
+
// Add optgroup children (options)
|
|
1316
|
+
Array.from(optgroup.children).forEach(child => {
|
|
1317
|
+
if (child.tagName === 'OPTION') {
|
|
1318
|
+
this.optionEls.push(child);
|
|
1319
|
+
this.allItems.push(child);
|
|
1320
|
+
}
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1323
|
+
else if (el.tagName === 'PDS-TEXT') {
|
|
1324
|
+
this.allItems.push(el);
|
|
1325
|
+
}
|
|
1326
|
+
});
|
|
1327
|
+
// Set initial selected option based on value property
|
|
1328
|
+
let initialSelected = null;
|
|
1329
|
+
// Check if value property matches any option
|
|
1330
|
+
if (this.value) {
|
|
1331
|
+
initialSelected = this.optionEls.find(opt => opt.value === this.value) || null;
|
|
1332
|
+
if (initialSelected) {
|
|
1333
|
+
// Update the display text to show the option's text content
|
|
1334
|
+
this.displayText = this.getOptionLabel(initialSelected);
|
|
1335
|
+
// Keep this.value as the actual option value (already correct)
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
// For chip triggers, ensure we always have a selected option
|
|
1339
|
+
const firstEnabled = this.optionEls.find(opt => !isOptionDisabled(opt));
|
|
1340
|
+
if (initialSelected === null && this.trigger === 'chip' && firstEnabled !== undefined) {
|
|
1341
|
+
initialSelected = firstEnabled;
|
|
1342
|
+
this.value = initialSelected.value;
|
|
1343
|
+
this.displayText = this.getOptionLabel(initialSelected);
|
|
1344
|
+
console.warn('PDS Combobox: Chip triggers should always have a selected option. Automatically selected the first enabled option.');
|
|
1345
|
+
}
|
|
1346
|
+
// Update selection if we found a different selected option or if we don't have one
|
|
1347
|
+
if (initialSelected && initialSelected !== this.selectedOption) {
|
|
1348
|
+
this.setSelectedOption(initialSelected);
|
|
1349
|
+
}
|
|
1350
|
+
else if (!this.selectedOption && initialSelected) {
|
|
1351
|
+
this.setSelectedOption(initialSelected);
|
|
1352
|
+
}
|
|
1353
|
+
this.filterOptions();
|
|
1354
|
+
}
|
|
1355
|
+
// Helper method to get option label, falling back to text content if no label attribute
|
|
1356
|
+
getOptionLabel(option) {
|
|
1357
|
+
return option.label || option.textContent || '';
|
|
1358
|
+
}
|
|
1359
|
+
// Helper method to get option layout content
|
|
1360
|
+
getOptionLayoutContent(option) {
|
|
1361
|
+
return this.sanitizeHtml(option.innerHTML || '');
|
|
1362
|
+
}
|
|
1363
|
+
// HTML sanitization using DOMPurify library to prevent XSS attacks
|
|
1364
|
+
sanitizeHtml(html) {
|
|
1365
|
+
// Configure DOMPurify to allow Pine Design System components while removing dangerous content
|
|
1366
|
+
const config = {
|
|
1367
|
+
// Allow all custom elements (including pds-* components)
|
|
1368
|
+
CUSTOM_ELEMENT_HANDLING: {
|
|
1369
|
+
tagNameCheck: (tagName) => {
|
|
1370
|
+
// Allow all pds-* tags and standard safe HTML tags
|
|
1371
|
+
return tagName.startsWith('pds-') || /^[a-z]+$/i.test(tagName);
|
|
1372
|
+
},
|
|
1373
|
+
attributeNameCheck: (attr) => {
|
|
1374
|
+
// Allow standard HTML attributes, data-* attributes, and Pine component attributes
|
|
1375
|
+
return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(attr) || attr.startsWith('data-') || attr.startsWith('aria-');
|
|
1376
|
+
},
|
|
1377
|
+
allowCustomizedBuiltInElements: false,
|
|
1378
|
+
},
|
|
1379
|
+
// Allow standard safe attributes
|
|
1380
|
+
ALLOW_DATA_ATTR: true,
|
|
1381
|
+
ALLOW_ARIA_ATTR: true,
|
|
1382
|
+
// Specifically forbid dangerous tags
|
|
1383
|
+
FORBID_TAGS: ['script', 'iframe', 'object', 'embed', 'form', 'input', 'textarea', 'select', 'button', 'style'],
|
|
1384
|
+
// Forbid all event handler attributes
|
|
1385
|
+
FORBID_ATTR: [
|
|
1386
|
+
'onerror', 'onload', 'onclick', 'onmouseover', 'onmouseout', 'onmousemove',
|
|
1387
|
+
'onfocus', 'onblur', 'onchange', 'onsubmit', 'onkeydown', 'onkeyup', 'onkeypress',
|
|
1388
|
+
'onmousedown', 'onmouseup', 'ondblclick', 'oncontextmenu', 'onscroll'
|
|
1389
|
+
],
|
|
1390
|
+
// Safe protocol whitelist
|
|
1391
|
+
ALLOWED_URI_REGEXP: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,
|
|
1392
|
+
};
|
|
1393
|
+
return DOMPurify.sanitize(html, config);
|
|
1394
|
+
}
|
|
1395
|
+
// Helper method to check if option should render as layout
|
|
1396
|
+
isOptionLayout(option) {
|
|
1397
|
+
return this.customOptionLayouts && option.hasAttribute('data-layout');
|
|
1398
|
+
}
|
|
1399
|
+
// Helper method to check if option has chip attributes (new automatic approach)
|
|
1400
|
+
isOptionChip(option) {
|
|
1401
|
+
return option.hasAttribute('chip-sentiment') ||
|
|
1402
|
+
option.hasAttribute('chip-large') ||
|
|
1403
|
+
option.hasAttribute('chip-icon') ||
|
|
1404
|
+
option.hasAttribute('chip-dot');
|
|
1405
|
+
}
|
|
1406
|
+
// Helper method to get chip properties from option attributes
|
|
1407
|
+
getOptionChipProps(option) {
|
|
1408
|
+
return {
|
|
1409
|
+
sentiment: option.getAttribute('chip-sentiment') || 'neutral',
|
|
1410
|
+
large: option.hasAttribute('chip-large'),
|
|
1411
|
+
icon: option.getAttribute('chip-icon') || undefined,
|
|
1412
|
+
dot: option.hasAttribute('chip-dot')
|
|
1413
|
+
};
|
|
1414
|
+
}
|
|
1415
|
+
// Helper method to check if option is selected (single source of truth)
|
|
1416
|
+
isOptionSelected(option) {
|
|
1417
|
+
return this.selectedOption === option;
|
|
1418
|
+
}
|
|
1419
|
+
// Helper method to set selected option (centralized state management)
|
|
1420
|
+
setSelectedOption(option) {
|
|
1421
|
+
this.selectedOption = option;
|
|
1422
|
+
// Immediately update chip properties for automatic rendering to ensure reactivity
|
|
1423
|
+
if (option && this.isOptionChip(option)) {
|
|
1424
|
+
this.selectedOptionChipProps = this.getOptionChipProps(option);
|
|
1425
|
+
}
|
|
1426
|
+
else {
|
|
1427
|
+
this.selectedOptionChipProps = null;
|
|
1428
|
+
}
|
|
1429
|
+
// Immediately update layout content too, the same way: the @Watch('selectedOption') below
|
|
1430
|
+
// isn't active yet the first time this runs, during componentWillLoad's initial selection,
|
|
1431
|
+
// so a preselected layout option would otherwise show its plain label until some later change
|
|
1432
|
+
// triggers the watcher.
|
|
1433
|
+
this.selectedOptionLayoutContent = option && this.isOptionLayout(option)
|
|
1434
|
+
? this.getOptionLayoutContent(option)
|
|
1435
|
+
: '';
|
|
1436
|
+
}
|
|
1437
|
+
filterOptions() {
|
|
1438
|
+
// A new list replaces the rows a slide or height glide was animating, so their end events may
|
|
1439
|
+
// never come.
|
|
1440
|
+
this.drillDirection = null;
|
|
1441
|
+
this.endHeightGlide();
|
|
1442
|
+
// Ensure allItems includes optionEls if not already populated (for edge cases)
|
|
1443
|
+
if (this.allItems.length === 0 && this.optionEls.length > 0) {
|
|
1444
|
+
this.allItems = [...this.optionEls];
|
|
1445
|
+
}
|
|
1446
|
+
const searchesPanel = this.usesPanelSearch;
|
|
1447
|
+
if ((this.mode === 'select-only' && !searchesPanel) || this.expandFilterListWhileOpen || (searchesPanel && this.panelQuery === '')) {
|
|
1448
|
+
this.filteredItems = [...this.allItems];
|
|
1449
|
+
}
|
|
1450
|
+
else {
|
|
1451
|
+
const val = (searchesPanel ? this.panelQuery : this.displayText).toLowerCase();
|
|
1452
|
+
const filteredOptions = this.optionEls.filter(option => {
|
|
1453
|
+
// Outside inline mode a group's label is part of what search matches, so "tag" finds
|
|
1454
|
+
// every option in the Tag group.
|
|
1455
|
+
if (this.groupDisplay !== 'inline') {
|
|
1456
|
+
const groupLabel = groupLabelOf(option);
|
|
1457
|
+
if (groupLabel !== null && groupLabel.toLowerCase().includes(val))
|
|
1458
|
+
return true;
|
|
1459
|
+
}
|
|
1460
|
+
// `data-search-text`, when set, is what search matches, so an option can be found by more
|
|
1461
|
+
// than its label without a custom layout. A layout option otherwise matches its text.
|
|
1462
|
+
const searchText = option.getAttribute('data-search-text');
|
|
1463
|
+
if (searchText)
|
|
1464
|
+
return searchText.toLowerCase().includes(val);
|
|
1465
|
+
if (this.isOptionLayout(option))
|
|
1466
|
+
return (option.textContent || '').toLowerCase().includes(val);
|
|
1467
|
+
return this.getOptionLabel(option).toLowerCase().includes(val);
|
|
1468
|
+
});
|
|
1469
|
+
// Rebuild filtered items maintaining group structure - simplified approach
|
|
1470
|
+
this.filteredItems = [];
|
|
1471
|
+
let currentGroupLabel = null;
|
|
1472
|
+
this.allItems.forEach(item => {
|
|
1473
|
+
if (item.tagName === 'OPTGROUP' || item.tagName === 'PDS-TEXT') {
|
|
1474
|
+
currentGroupLabel = item;
|
|
1475
|
+
}
|
|
1476
|
+
else if (item.tagName === 'OPTION' && filteredOptions.includes(item)) {
|
|
1477
|
+
const optionEl = item;
|
|
1478
|
+
const parent = optionEl.parentElement;
|
|
1479
|
+
let labelToUse = null;
|
|
1480
|
+
if (parent && parent.tagName === 'OPTGROUP') {
|
|
1481
|
+
// Only use the actual parent optgroup as label
|
|
1482
|
+
labelToUse = parent;
|
|
1483
|
+
}
|
|
1484
|
+
else if (currentGroupLabel && currentGroupLabel.tagName === 'PDS-TEXT') {
|
|
1485
|
+
// Allow pds-text to label subsequent top-level options until another label appears
|
|
1486
|
+
labelToUse = currentGroupLabel;
|
|
1487
|
+
}
|
|
1488
|
+
if (labelToUse && !this.filteredItems.includes(labelToUse)) {
|
|
1489
|
+
this.filteredItems.push(labelToUse);
|
|
1490
|
+
}
|
|
1491
|
+
this.filteredItems.push(optionEl);
|
|
1492
|
+
}
|
|
1493
|
+
});
|
|
1494
|
+
}
|
|
1495
|
+
this.highlightedIndex = -1;
|
|
1496
|
+
this.highlightedGroup = null;
|
|
1497
|
+
}
|
|
1498
|
+
clearExpandFilterList() {
|
|
1499
|
+
this.expandFilterListWhileOpen = false;
|
|
1500
|
+
}
|
|
1501
|
+
/**
|
|
1502
|
+
* When reopening the dropdown in filter mode with the input still showing the
|
|
1503
|
+
* committed selection label, show the full option list until the user edits the query.
|
|
1504
|
+
*/
|
|
1505
|
+
prepareExpandFilterListOnOpen() {
|
|
1506
|
+
if (this.mode === 'filter' &&
|
|
1507
|
+
this.selectedOption &&
|
|
1508
|
+
this.displayText === this.getOptionLabel(this.selectedOption)) {
|
|
1509
|
+
this.expandFilterListWhileOpen = true;
|
|
1510
|
+
}
|
|
1511
|
+
else {
|
|
1512
|
+
this.expandFilterListWhileOpen = false;
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
positionDropdown() {
|
|
1516
|
+
var _a;
|
|
1517
|
+
if (!this.triggerEl || !this.listboxEl) {
|
|
1518
|
+
return;
|
|
1519
|
+
}
|
|
1520
|
+
const strategy = this.usesBodyPortal ? 'fixed' : 'absolute';
|
|
1521
|
+
const zIndex = this.usesBodyPortal
|
|
1522
|
+
? 'var(--pine-z-index-priority)'
|
|
1523
|
+
: 'var(--pine-z-index-raised)';
|
|
1524
|
+
// Unset, the panel's own width applies, which differs with its padding (see the dropdown panel styles).
|
|
1525
|
+
this.listboxEl.style.width = (_a = this.dropdownWidth) !== null && _a !== void 0 ? _a : '';
|
|
1526
|
+
if (this.maxHeight) {
|
|
1527
|
+
this.listboxEl.style.maxHeight = this.maxHeight;
|
|
1528
|
+
// With panel search, the options list scrolls under a fixed search field.
|
|
1529
|
+
this.syncPanelOverflow();
|
|
1530
|
+
}
|
|
1531
|
+
this.listboxEl.offsetHeight;
|
|
1532
|
+
return computePosition(this.triggerEl, this.listboxEl, {
|
|
1533
|
+
placement: this.dropdownPlacement,
|
|
1534
|
+
strategy,
|
|
1535
|
+
middleware: [offset(8), flip(), shift({ padding: 5 })],
|
|
1536
|
+
}).then(({ x, y, placement }) => {
|
|
1537
|
+
if (!this.listboxEl) {
|
|
1538
|
+
return;
|
|
1539
|
+
}
|
|
1540
|
+
// Where it landed after flipping, so the opening motion moves away from the field.
|
|
1541
|
+
this.listboxEl.dataset.placement = placement;
|
|
1542
|
+
Object.assign(this.listboxEl.style, {
|
|
1543
|
+
left: `${x}px`,
|
|
1544
|
+
top: `${y}px`,
|
|
1545
|
+
position: strategy,
|
|
1546
|
+
zIndex,
|
|
1547
|
+
});
|
|
1548
|
+
this.checkFlyoutRoom();
|
|
1549
|
+
});
|
|
1550
|
+
}
|
|
1551
|
+
/**
|
|
1552
|
+
* Once per open, after the dropdown is placed: with no room for a flyout on either side of it,
|
|
1553
|
+
* `flyout` drills in instead. `flyout-min-width` is resolved through CSS, so any length works.
|
|
1554
|
+
*/
|
|
1555
|
+
checkFlyoutRoom() {
|
|
1556
|
+
if (!this.isOpen || this.groupDisplay !== 'flyout' || this.flyoutRoomChecked || !this.listboxEl)
|
|
1557
|
+
return;
|
|
1558
|
+
this.flyoutRoomChecked = true;
|
|
1559
|
+
const probe = document.createElement('div');
|
|
1560
|
+
// Fixed, like the flyout, so a percentage resolves against the viewport as the flyout's does.
|
|
1561
|
+
probe.style.cssText = 'position:fixed;visibility:hidden;width:0;';
|
|
1562
|
+
probe.style.minWidth = this.flyoutMinWidth;
|
|
1563
|
+
this.listboxEl.appendChild(probe);
|
|
1564
|
+
const needed = parseFloat(getComputedStyle(probe).minWidth);
|
|
1565
|
+
probe.remove();
|
|
1566
|
+
const rect = this.listboxEl.getBoundingClientRect();
|
|
1567
|
+
const room = Math.max(window.innerWidth - rect.right, rect.left);
|
|
1568
|
+
const fallback = Number.isFinite(needed) && needed > 0 && rect.width > 0 && room < needed;
|
|
1569
|
+
if (fallback !== this.flyoutFallback)
|
|
1570
|
+
this.flyoutFallback = fallback;
|
|
1571
|
+
}
|
|
1572
|
+
openDropdownPositioning() {
|
|
1573
|
+
if (!this.triggerEl || !this.listboxEl) {
|
|
1574
|
+
return;
|
|
1575
|
+
}
|
|
1576
|
+
void this.positionDropdown();
|
|
1577
|
+
}
|
|
1578
|
+
startBodyPortalAutoUpdate() {
|
|
1579
|
+
if (this.bodyPortalAutoUpdateActive || !this.triggerEl || !this.listboxEl) {
|
|
1580
|
+
return;
|
|
1581
|
+
}
|
|
1582
|
+
this.cleanupPositionAutoUpdate = autoUpdate(this.triggerEl, this.listboxEl, () => {
|
|
1583
|
+
void this.positionDropdown();
|
|
1584
|
+
});
|
|
1585
|
+
this.bodyPortalAutoUpdateActive = true;
|
|
1586
|
+
}
|
|
1587
|
+
stopBodyPortalAutoUpdate() {
|
|
1588
|
+
var _a;
|
|
1589
|
+
(_a = this.cleanupPositionAutoUpdate) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
1590
|
+
this.cleanupPositionAutoUpdate = undefined;
|
|
1591
|
+
this.bodyPortalAutoUpdateActive = false;
|
|
1592
|
+
}
|
|
1593
|
+
getPortalMountRoot() {
|
|
1594
|
+
var _a;
|
|
1595
|
+
return (_a = this.findNearestDialogForPortal(this.el)) !== null && _a !== void 0 ? _a : document.body;
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* Resolves the native `<dialog>` to host the portaled listbox so it stays in the same top layer
|
|
1599
|
+
* as `showModal()`. `Element.closest('dialog')` stops at shadow boundaries and can miss a
|
|
1600
|
+
* dialog that only wraps slotted content; this walks assigned slots and shadow hosts, and
|
|
1601
|
+
* falls back to `pds-modal`'s dialog when the combobox lives inside that subtree.
|
|
1602
|
+
*/
|
|
1603
|
+
findNearestDialogForPortal(from) {
|
|
1604
|
+
const seen = new Set();
|
|
1605
|
+
let current = from;
|
|
1606
|
+
while (current && !seen.has(current)) {
|
|
1607
|
+
seen.add(current);
|
|
1608
|
+
if (current.nodeType === Node.ELEMENT_NODE && current.localName === 'dialog') {
|
|
1609
|
+
return current;
|
|
1610
|
+
}
|
|
1611
|
+
if (current.nodeType === Node.ELEMENT_NODE) {
|
|
1612
|
+
const assigned = current.assignedSlot;
|
|
1613
|
+
if (assigned) {
|
|
1614
|
+
current = assigned;
|
|
1615
|
+
continue;
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
const parent = current.parentNode;
|
|
1619
|
+
if (parent) {
|
|
1620
|
+
current = parent instanceof ShadowRoot ? parent.host : parent;
|
|
1621
|
+
continue;
|
|
1622
|
+
}
|
|
1623
|
+
break;
|
|
1624
|
+
}
|
|
1625
|
+
const pineModal = from.closest('pds-modal');
|
|
1626
|
+
if (pineModal) {
|
|
1627
|
+
const pineDialog = pineModal.querySelector('dialog');
|
|
1628
|
+
if (pineDialog) {
|
|
1629
|
+
return pineDialog;
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
return null;
|
|
1633
|
+
}
|
|
1634
|
+
ensureBodyPortal() {
|
|
1635
|
+
if (this.portalEl !== null) {
|
|
1636
|
+
const target = this.getPortalMountRoot();
|
|
1637
|
+
if (this.portalEl.parentElement !== target) {
|
|
1638
|
+
target.appendChild(this.portalEl);
|
|
1639
|
+
// What differs from the new parent may not be what differed from the old one.
|
|
1640
|
+
this.copyPortalContext();
|
|
1641
|
+
}
|
|
1642
|
+
return this.portalEl;
|
|
1643
|
+
}
|
|
1644
|
+
this.portalEl = document.createElement('div');
|
|
1645
|
+
this.portalEl.className = 'pds-combobox-dropdown-portal';
|
|
1646
|
+
// The copied stylesheet's `:host` rules match this div too; keep it out of layout. It still
|
|
1647
|
+
// passes `dir` and the theme down.
|
|
1648
|
+
this.portalEl.style.display = 'contents';
|
|
1649
|
+
this.portalRoot = this.portalEl.attachShadow({ mode: 'open' });
|
|
1650
|
+
this.getPortalMountRoot().appendChild(this.portalEl);
|
|
1651
|
+
this.copyPortalContext();
|
|
1652
|
+
return this.portalEl;
|
|
1653
|
+
}
|
|
1654
|
+
/**
|
|
1655
|
+
* Gives the portal what the dropdown would otherwise get inside the combobox: its styles (so it
|
|
1656
|
+
* needs no global CSS), the reading direction and language, a theme set on an ancestor, and
|
|
1657
|
+
* custom properties set between the combobox and where the portal mounts. A snapshot: the portal
|
|
1658
|
+
* is rebuilt on every open, so a theme switched while it's open applies from the next open.
|
|
1659
|
+
*/
|
|
1660
|
+
copyPortalContext() {
|
|
1661
|
+
var _a, _b, _c;
|
|
1662
|
+
const portal = this.portalEl;
|
|
1663
|
+
const root = this.portalRoot;
|
|
1664
|
+
const source = this.el.shadowRoot;
|
|
1665
|
+
if (!portal || !root)
|
|
1666
|
+
return;
|
|
1667
|
+
if ((_a = source === null || source === void 0 ? void 0 : source.adoptedStyleSheets) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1668
|
+
root.adoptedStyleSheets = source.adoptedStyleSheets;
|
|
1669
|
+
}
|
|
1670
|
+
else if (source && !root.querySelector('style')) {
|
|
1671
|
+
source.querySelectorAll('style').forEach(style => root.appendChild(style.cloneNode(true)));
|
|
1672
|
+
}
|
|
1673
|
+
const computed = getComputedStyle(this.el);
|
|
1674
|
+
portal.dir = computed.direction || 'ltr';
|
|
1675
|
+
const lang = (_b = closest('[lang]', this.el)) === null || _b === void 0 ? void 0 : _b.getAttribute('lang');
|
|
1676
|
+
if (lang)
|
|
1677
|
+
portal.lang = lang;
|
|
1678
|
+
const theme = (_c = closest('[data-theme]', this.el)) === null || _c === void 0 ? void 0 : _c.getAttribute('data-theme');
|
|
1679
|
+
if (theme)
|
|
1680
|
+
portal.setAttribute('data-theme', theme);
|
|
1681
|
+
const outside = portal.parentElement ? getComputedStyle(portal.parentElement) : null;
|
|
1682
|
+
for (let i = 0; i < computed.length; i++) {
|
|
1683
|
+
const property = computed[i];
|
|
1684
|
+
if (!property.startsWith('--'))
|
|
1685
|
+
continue;
|
|
1686
|
+
const value = computed.getPropertyValue(property);
|
|
1687
|
+
if (outside && value === outside.getPropertyValue(property))
|
|
1688
|
+
continue;
|
|
1689
|
+
portal.style.setProperty(property, value.trim());
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
syncBodyPortal() {
|
|
1693
|
+
if (!this.listboxEl) {
|
|
1694
|
+
return;
|
|
1695
|
+
}
|
|
1696
|
+
this.ensureBodyPortal();
|
|
1697
|
+
const root = this.portalRoot;
|
|
1698
|
+
for (const stale of Array.from(root.children)) {
|
|
1699
|
+
if (stale !== this.listboxEl && stale.tagName !== 'STYLE') {
|
|
1700
|
+
stale.remove();
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
if (this.listboxEl.parentNode !== root) {
|
|
1704
|
+
root.appendChild(this.listboxEl);
|
|
1705
|
+
void this.positionDropdown();
|
|
1706
|
+
this.startBodyPortalAutoUpdate();
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
removeBodyPortal() {
|
|
1710
|
+
var _a;
|
|
1711
|
+
this.stopBodyPortalAutoUpdate();
|
|
1712
|
+
if ((_a = this.portalEl) === null || _a === void 0 ? void 0 : _a.parentNode) {
|
|
1713
|
+
this.portalEl.parentNode.removeChild(this.portalEl);
|
|
1714
|
+
}
|
|
1715
|
+
this.portalEl = null;
|
|
1716
|
+
this.portalRoot = null;
|
|
1717
|
+
if (this.listboxEl && !this.listboxEl.isConnected) {
|
|
1718
|
+
this.listboxEl = undefined;
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
/**
|
|
1722
|
+
* The tree keys in the grouped panel. Up, Down, Home, End, PageUp and PageDown move within one
|
|
1723
|
+
* level; Right, Enter or Space opens a group at its first option; Left, or Escape, closes the
|
|
1724
|
+
* open group back to its row. Returns false for keys the listbox handling covers, such as
|
|
1725
|
+
* Enter on an option.
|
|
1726
|
+
*/
|
|
1727
|
+
handleGroupedPanelKey(e) {
|
|
1728
|
+
if (!this.showsGroupedPanel)
|
|
1729
|
+
return false;
|
|
1730
|
+
const highlightShown = this.keyboardNavigating;
|
|
1731
|
+
this.keyboardNavigating = true;
|
|
1732
|
+
// In the input trigger, Left and Right still move the caret through typed text, and Space,
|
|
1733
|
+
// Home and End edit it, as they do in the panel's search field.
|
|
1734
|
+
if (this.trigger === 'input') {
|
|
1735
|
+
if ((e.key === 'ArrowLeft' || e.key === 'ArrowRight') && this.displayText !== '')
|
|
1736
|
+
return false;
|
|
1737
|
+
if (e.key === ' ' || e.key === 'Home' || e.key === 'End')
|
|
1738
|
+
return false;
|
|
1739
|
+
}
|
|
1740
|
+
const entries = this.panelEntries();
|
|
1741
|
+
const drilledIn = this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null;
|
|
1742
|
+
const current = this.currentPanelItem();
|
|
1743
|
+
const column = panelColumn(entries, this.openGroup, current, drilledIn);
|
|
1744
|
+
if (column.length === 0)
|
|
1745
|
+
return false;
|
|
1746
|
+
const position = current === null ? -1 : column.indexOf(current);
|
|
1747
|
+
// Drill-in doesn't shade a group row the pointer or a click-open highlighted, so the first Up or
|
|
1748
|
+
// Down shows that row rather than moving past one the user never saw.
|
|
1749
|
+
const unseenRow = !highlightShown && this.effectiveGroupDisplay === 'drill-in' && current !== null && typeof current !== 'number' && current !== this.openGroup;
|
|
1750
|
+
const moveTo = (to) => {
|
|
1751
|
+
e.preventDefault();
|
|
1752
|
+
this.highlightPanelItem(column[Math.max(0, Math.min(column.length - 1, to))]);
|
|
1753
|
+
this.revealedGroupLabel = null;
|
|
1754
|
+
return true;
|
|
1755
|
+
};
|
|
1756
|
+
const reveal = () => {
|
|
1757
|
+
e.preventDefault();
|
|
1758
|
+
// The row's name, badge and all, as the row itself is named.
|
|
1759
|
+
const optgroup = current;
|
|
1760
|
+
const badge = groupBadgeOf(optgroup);
|
|
1761
|
+
this.revealedGroupLabel = badge === null ? optgroup.label : `${optgroup.label}, ${badge.label}`;
|
|
1762
|
+
return true;
|
|
1763
|
+
};
|
|
1764
|
+
switch (e.key) {
|
|
1765
|
+
case 'ArrowDown':
|
|
1766
|
+
return unseenRow ? reveal() : moveTo(position < 0 ? 0 : position + 1);
|
|
1767
|
+
case 'ArrowUp':
|
|
1768
|
+
return unseenRow ? reveal() : moveTo(position < 0 ? column.length - 1 : position - 1);
|
|
1769
|
+
case 'Home':
|
|
1770
|
+
return moveTo(0);
|
|
1771
|
+
case 'End':
|
|
1772
|
+
return moveTo(column.length - 1);
|
|
1773
|
+
case 'PageDown':
|
|
1774
|
+
return moveTo(position < 0 ? 0 : position + 10);
|
|
1775
|
+
case 'PageUp':
|
|
1776
|
+
return moveTo(position < 0 ? column.length - 1 : position - 10);
|
|
1777
|
+
case 'ArrowRight':
|
|
1778
|
+
case 'Enter':
|
|
1779
|
+
case ' ': {
|
|
1780
|
+
if (current === null || typeof current === 'number')
|
|
1781
|
+
return false;
|
|
1782
|
+
e.preventDefault();
|
|
1783
|
+
if (!drilledIn || current !== this.openGroup) {
|
|
1784
|
+
this.expandGroup(entries, current);
|
|
1785
|
+
}
|
|
1786
|
+
else if (e.key === 'ArrowRight') {
|
|
1787
|
+
// On the row back of a drilled-in group: down into its options.
|
|
1788
|
+
if (column.length > 1)
|
|
1789
|
+
this.highlightPanelItem(column[1]);
|
|
1790
|
+
}
|
|
1791
|
+
else {
|
|
1792
|
+
this.leaveDrilledInGroup();
|
|
1793
|
+
}
|
|
1794
|
+
return true;
|
|
1795
|
+
}
|
|
1796
|
+
case 'ArrowLeft':
|
|
1797
|
+
case 'Escape': {
|
|
1798
|
+
// Escape with no group open closes the panel, through the listbox handling.
|
|
1799
|
+
if (this.openGroup === null)
|
|
1800
|
+
return false;
|
|
1801
|
+
e.preventDefault();
|
|
1802
|
+
this.collapseToGroup(this.openGroup);
|
|
1803
|
+
return true;
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
return false;
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* Where the keyboard is in the grouped panel. An option highlighted in a group that has since
|
|
1810
|
+
* closed (the pointer left its flyout) counts as its group's row, so the keys carry on from
|
|
1811
|
+
* what's showing rather than from an option that isn't.
|
|
1812
|
+
*/
|
|
1813
|
+
currentPanelItem() {
|
|
1814
|
+
if (this.highlightedIndex < 0)
|
|
1815
|
+
return this.highlightedGroup;
|
|
1816
|
+
const selectable = this.filteredItems.filter(item => item.tagName === 'OPTION');
|
|
1817
|
+
const group = parentOptgroupOf(selectable[this.highlightedIndex]);
|
|
1818
|
+
return group !== null && group !== this.openGroup ? group : this.highlightedIndex;
|
|
1819
|
+
}
|
|
1820
|
+
/**
|
|
1821
|
+
* Highlights the option at `index`, kept within the list. Disabled options can be highlighted,
|
|
1822
|
+
* so assistive tech announces them as unavailable, but not chosen.
|
|
1823
|
+
*/
|
|
1824
|
+
highlightOptionAt(options, index) {
|
|
1825
|
+
if (options.length === 0)
|
|
1826
|
+
return;
|
|
1827
|
+
// Only the keys move it, so it shows the keyboard's ring, as in the grouped panel.
|
|
1828
|
+
this.keyboardNavigating = true;
|
|
1829
|
+
this.highlightedIndex = Math.max(0, Math.min(options.length - 1, index));
|
|
1830
|
+
this.updateOptionFocus();
|
|
1831
|
+
}
|
|
1832
|
+
/** Highlights a group row or an option, opening or closing flyouts to match. */
|
|
1833
|
+
highlightPanelItem(item) {
|
|
1834
|
+
if (typeof item === 'number') {
|
|
1835
|
+
this.highlightedIndex = item;
|
|
1836
|
+
}
|
|
1837
|
+
else {
|
|
1838
|
+
this.highlightedIndex = -1;
|
|
1839
|
+
this.highlightedGroup = item;
|
|
1840
|
+
}
|
|
1841
|
+
this.updateOptionFocus();
|
|
1842
|
+
}
|
|
1843
|
+
expandGroup(entries, optgroup) {
|
|
1844
|
+
var _a;
|
|
1845
|
+
this.flyout.open(optgroup);
|
|
1846
|
+
const first = (_a = findGroup(entries, optgroup)) === null || _a === void 0 ? void 0 : _a.options[0];
|
|
1847
|
+
if (first !== undefined)
|
|
1848
|
+
this.highlightPanelItem(first.index);
|
|
1849
|
+
// Its options render after this change; scroll to the first one then.
|
|
1850
|
+
this.pendingOptionFocus = true;
|
|
1851
|
+
}
|
|
1852
|
+
/** Closes the open group and highlights its row, as a tree's Left does from a child. */
|
|
1853
|
+
collapseToGroup(optgroup) {
|
|
1854
|
+
this.flyout.reset();
|
|
1855
|
+
this.openGroup = null;
|
|
1856
|
+
this.highlightPanelItem(optgroup);
|
|
1857
|
+
// The row renders after this change (in drill-in it replaces the row back); scroll to it then.
|
|
1858
|
+
this.pendingOptionFocus = true;
|
|
1859
|
+
}
|
|
1860
|
+
/**
|
|
1861
|
+
* Sets focus on the native input element.
|
|
1862
|
+
*/
|
|
1863
|
+
async setFocus() {
|
|
1864
|
+
var _a;
|
|
1865
|
+
if (this.inputEl) {
|
|
1866
|
+
this.inputEl.focus();
|
|
1867
|
+
}
|
|
1868
|
+
else {
|
|
1869
|
+
(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
/**
|
|
1873
|
+
* Sets the initial highlighted index when dropdown opens. Highlights the selected option unless
|
|
1874
|
+
* it's disabled. Otherwise highlights the first enabled option, or, in the grouped panel, the
|
|
1875
|
+
* first row with something to choose, or nothing when every option is disabled.
|
|
1876
|
+
*/
|
|
1877
|
+
setInitialHighlightedIndex() {
|
|
1878
|
+
const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
|
|
1879
|
+
if (selectableOptions.length === 0) {
|
|
1880
|
+
this.highlightedIndex = -1;
|
|
1881
|
+
return;
|
|
1882
|
+
}
|
|
1883
|
+
// If there's a selected option, find its index in the filtered options. A disabled one can be
|
|
1884
|
+
// the value, as in a native select, but it isn't highlighted.
|
|
1885
|
+
if (this.selectedOption && !isOptionDisabled(this.selectedOption)) {
|
|
1886
|
+
const selectedIndex = selectableOptions.findIndex(option => option === this.selectedOption);
|
|
1887
|
+
if (selectedIndex >= 0) {
|
|
1888
|
+
this.highlightedIndex = selectedIndex;
|
|
1889
|
+
// In the grouped panel, open on the selection's group, however the dropdown was opened, and
|
|
1890
|
+
// scroll the selection into view once its group has rendered.
|
|
1891
|
+
if (this.showsGroupedPanel) {
|
|
1892
|
+
this.openGroup = parentOptgroupOf(this.selectedOption);
|
|
1893
|
+
// Opening on the selection isn't drilling in, so it doesn't slide.
|
|
1894
|
+
this.drillDirection = null;
|
|
1895
|
+
this.pendingOptionFocus = true;
|
|
1896
|
+
}
|
|
1897
|
+
return;
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
// In the grouped panel, the first row with something to choose: a group stays closed until
|
|
1901
|
+
// it's opened.
|
|
1902
|
+
if (this.showsGroupedPanel) {
|
|
1903
|
+
const first = this.panelEntries().find(entry => entry.kind === 'group' ? !isGroupDisabled(entry.group) : !isOptionDisabled(entry.option));
|
|
1904
|
+
this.highlightedIndex = (first === null || first === void 0 ? void 0 : first.kind) === 'option' ? first.index : -1;
|
|
1905
|
+
this.highlightedGroup = (first === null || first === void 0 ? void 0 : first.kind) === 'group' ? first.group.optgroup : null;
|
|
1906
|
+
return;
|
|
1907
|
+
}
|
|
1908
|
+
// No selected option or selected option not in filtered results, highlight the first enabled option
|
|
1909
|
+
this.highlightedIndex = selectableOptions.findIndex(option => !isOptionDisabled(option));
|
|
1910
|
+
}
|
|
1911
|
+
/**
|
|
1912
|
+
* Focus management helper - moves focus to the first option when dropdown opens
|
|
1913
|
+
*/
|
|
1914
|
+
focusFirstOption() {
|
|
1915
|
+
if (this.isOpen) {
|
|
1916
|
+
const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
|
|
1917
|
+
if (selectableOptions.length > 0) {
|
|
1918
|
+
this.setInitialHighlightedIndex();
|
|
1919
|
+
// DON'T focus the option elements - keep focus on trigger and use aria-activedescendant
|
|
1920
|
+
// This prevents the focusout event that was closing the dropdown
|
|
1921
|
+
// But still call updateOptionFocus for scrolling
|
|
1922
|
+
if (this.listboxEl) {
|
|
1923
|
+
this.updateOptionFocus();
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
/**
|
|
1929
|
+
* Focus management helper - actually focuses the first option when opened via arrow keys
|
|
1930
|
+
*/
|
|
1931
|
+
focusFirstOptionForArrowKeys() {
|
|
1932
|
+
if (!this.isOpen) {
|
|
1933
|
+
return;
|
|
1934
|
+
}
|
|
1935
|
+
// Body-mounted listboxes stay outside modal focus traps; keep focus on the trigger.
|
|
1936
|
+
if (this.usesBodyPortal) {
|
|
1937
|
+
this.isArrowKeyNavigationMode = true;
|
|
1938
|
+
this.focusFirstOption();
|
|
1939
|
+
return;
|
|
1940
|
+
}
|
|
1941
|
+
this.isArrowKeyNavigationMode = true;
|
|
1942
|
+
const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
|
|
1943
|
+
if (selectableOptions.length > 0) {
|
|
1944
|
+
this.setInitialHighlightedIndex();
|
|
1945
|
+
// By index, through the same path as arrowing: it opens the option's flyout group first
|
|
1946
|
+
// when it isn't rendered, and highlights it once it is.
|
|
1947
|
+
this.updateOptionFocus();
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
/**
|
|
1951
|
+
* Focus management helper - updates visual state and scrolling for the currently highlighted option
|
|
1952
|
+
* Note: We don't actually focus the option to prevent focusout events that close the dropdown
|
|
1953
|
+
*/
|
|
1954
|
+
updateOptionFocus() {
|
|
1955
|
+
var _a;
|
|
1956
|
+
if (this.listboxEl === undefined || this.listboxEl === null)
|
|
1957
|
+
return;
|
|
1958
|
+
// A row highlighted outright; an option highlighted in a closed group opens it below instead.
|
|
1959
|
+
const groupRow = this.showsGroupedPanel && this.highlightedIndex < 0 ? this.highlightedGroup : null;
|
|
1960
|
+
if (groupRow !== null) {
|
|
1961
|
+
// Arrowing onto another row closes a flyout that hover left open.
|
|
1962
|
+
if (this.effectiveGroupDisplay === 'flyout' && this.openGroup !== null && this.openGroup !== groupRow) {
|
|
1963
|
+
this.flyout.reset();
|
|
1964
|
+
this.openGroup = null;
|
|
1965
|
+
}
|
|
1966
|
+
// Matched by id, not a selector: componentId is consumer text and may not be selector-safe.
|
|
1967
|
+
const id = this.groupDomId(groupRow);
|
|
1968
|
+
const row = Array.from(this.listboxEl.querySelectorAll('[role="treeitem"]'))
|
|
1969
|
+
.find(item => item.id === id);
|
|
1970
|
+
// The row's trigger, not its item: the row back's item wraps the group's options, and showing
|
|
1971
|
+
// all of a group taller than the list would scroll the row back itself out of view.
|
|
1972
|
+
const trigger = Array.from((_a = row === null || row === void 0 ? void 0 : row.children) !== null && _a !== void 0 ? _a : []).find(child => child.classList.contains('pds-combobox__group-row-trigger'));
|
|
1973
|
+
if (trigger)
|
|
1974
|
+
this.scrollIntoViewNearest(trigger, false);
|
|
1975
|
+
this.updateAriaActiveDescendant();
|
|
1976
|
+
return;
|
|
1977
|
+
}
|
|
1978
|
+
if (this.highlightedIndex < 0)
|
|
1979
|
+
return;
|
|
1980
|
+
// In the flyout panel only the open group's options are rendered: open the highlighted
|
|
1981
|
+
// option's group, and finish once it has rendered. Through the controller, so a hover timer
|
|
1982
|
+
// left running by the pointer can't close or switch the group the keys just moved into.
|
|
1983
|
+
if (this.showsGroupedPanel) {
|
|
1984
|
+
const selectable = this.filteredItems.filter(item => item.tagName === 'OPTION');
|
|
1985
|
+
const group = parentOptgroupOf(selectable[this.highlightedIndex]);
|
|
1986
|
+
const changed = group !== this.openGroup;
|
|
1987
|
+
if (group !== null) {
|
|
1988
|
+
this.flyout.open(group);
|
|
1989
|
+
}
|
|
1990
|
+
else {
|
|
1991
|
+
this.flyout.reset();
|
|
1992
|
+
this.openGroup = null;
|
|
1993
|
+
}
|
|
1994
|
+
if (changed) {
|
|
1995
|
+
this.pendingOptionFocus = true;
|
|
1996
|
+
return;
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
const optionElements = this.listboxEl.querySelectorAll('[role="option"]');
|
|
2000
|
+
// By index, not position: the flyout panel renders only some options.
|
|
2001
|
+
const currentOption = this.listboxEl.querySelector(`[data-option-index="${this.highlightedIndex}"]`);
|
|
2002
|
+
if (currentOption) {
|
|
2003
|
+
// Check if any option currently has focus OR if we're in arrow-key navigation mode
|
|
2004
|
+
const hasOptionFocus = Array.from(optionElements).some(el => el === document.activeElement);
|
|
2005
|
+
// The panel's search field keeps focus and points at the option with aria-activedescendant,
|
|
2006
|
+
// and so does the trigger over the grouped panel, whose group rows can't take focus and
|
|
2007
|
+
// whose options are hidden while a flyout is placed.
|
|
2008
|
+
const shouldFocusOption = !this.usesBodyPortal &&
|
|
2009
|
+
!this.usesPanelSearch &&
|
|
2010
|
+
!this.showsGroupedPanel &&
|
|
2011
|
+
(hasOptionFocus || this.isArrowKeyNavigationMode);
|
|
2012
|
+
if (shouldFocusOption) {
|
|
2013
|
+
optionElements.forEach(option => {
|
|
2014
|
+
option.setAttribute('tabindex', '-1');
|
|
2015
|
+
});
|
|
2016
|
+
currentOption.setAttribute('tabindex', '0');
|
|
2017
|
+
currentOption.focus();
|
|
2018
|
+
}
|
|
2019
|
+
// Always scroll the option into view; in a flyout, by scrolling the flyout alone.
|
|
2020
|
+
const flyout = currentOption.closest('.pds-combobox__flyout');
|
|
2021
|
+
if (flyout) {
|
|
2022
|
+
this.flyout.reveal(flyout, currentOption);
|
|
2023
|
+
}
|
|
2024
|
+
else {
|
|
2025
|
+
this.scrollIntoViewNearest(currentOption, true);
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
// Always update aria-activedescendant on the trigger element
|
|
2029
|
+
this.updateAriaActiveDescendant();
|
|
2030
|
+
}
|
|
2031
|
+
/** The highlighted group row in the grouped panel, or null while an option is highlighted. */
|
|
2032
|
+
get highlightedGroupRow() {
|
|
2033
|
+
if (!this.showsGroupedPanel)
|
|
2034
|
+
return null;
|
|
2035
|
+
if (this.highlightedIndex < 0)
|
|
2036
|
+
return this.highlightedGroup;
|
|
2037
|
+
// An option left highlighted in a flyout that has since closed shows as its group's row.
|
|
2038
|
+
const current = this.currentPanelItem();
|
|
2039
|
+
return typeof current === 'number' ? null : current;
|
|
2040
|
+
}
|
|
2041
|
+
/**
|
|
2042
|
+
* The id of the highlighted option or group row, only while it's rendered. In the flyout panel
|
|
2043
|
+
* an option in a closed group isn't in the DOM, and drilled into a group the other groups' rows
|
|
2044
|
+
* aren't; `aria-activedescendant` must not point at a missing element.
|
|
2045
|
+
*/
|
|
2046
|
+
get activeDescendantId() {
|
|
2047
|
+
if (!this.isOpen)
|
|
2048
|
+
return undefined;
|
|
2049
|
+
const groupRow = this.highlightedGroupRow;
|
|
2050
|
+
if (groupRow !== null) {
|
|
2051
|
+
const drilledIntoAnother = this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null && this.openGroup !== groupRow;
|
|
2052
|
+
return drilledIntoAnother ? undefined : this.groupDomId(groupRow);
|
|
2053
|
+
}
|
|
2054
|
+
if (this.highlightedIndex < 0)
|
|
2055
|
+
return undefined;
|
|
2056
|
+
if (this.showsGroupedPanel) {
|
|
2057
|
+
const selectable = this.filteredItems.filter(item => item.tagName === 'OPTION');
|
|
2058
|
+
const group = parentOptgroupOf(selectable[this.highlightedIndex]);
|
|
2059
|
+
if (group !== null && group !== this.openGroup)
|
|
2060
|
+
return undefined;
|
|
2061
|
+
}
|
|
2062
|
+
return this.optionDomId(this.highlightedIndex);
|
|
2063
|
+
}
|
|
2064
|
+
/** Points the focused element's aria-activedescendant at the highlighted option, or clears it. */
|
|
2065
|
+
updateAriaActiveDescendant() {
|
|
2066
|
+
// With panel search, the element with focus owns it, not the trigger: the search field, or
|
|
2067
|
+
// the list while a drilled-in group hides the field.
|
|
2068
|
+
const target = this.usesPanelSearch ? (this.hidesPanelSearch ? this.panelTreeEl : this.panelSearchEl) : this.triggerEl;
|
|
2069
|
+
if (!target)
|
|
2070
|
+
return;
|
|
2071
|
+
const id = this.activeDescendantId;
|
|
2072
|
+
if (id !== undefined) {
|
|
2073
|
+
target.setAttribute('aria-activedescendant', id);
|
|
2074
|
+
}
|
|
2075
|
+
else {
|
|
2076
|
+
target.removeAttribute('aria-activedescendant');
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
/**
|
|
2080
|
+
* Focus management helper - restores focus to the trigger element
|
|
2081
|
+
*/
|
|
2082
|
+
restoreFocusToTrigger() {
|
|
2083
|
+
setTimeout(() => {
|
|
2084
|
+
if (this.inputEl) {
|
|
2085
|
+
this.inputEl.focus();
|
|
2086
|
+
}
|
|
2087
|
+
else if (this.triggerEl) {
|
|
2088
|
+
this.triggerEl.focus();
|
|
2089
|
+
}
|
|
2090
|
+
}, 0);
|
|
2091
|
+
}
|
|
2092
|
+
/**
|
|
2093
|
+
* Gets the value of the currently selected option.
|
|
2094
|
+
*/
|
|
2095
|
+
async getSelectedValue() {
|
|
2096
|
+
return this.selectedOption ? this.selectedOption.value : null;
|
|
2097
|
+
}
|
|
2098
|
+
/**
|
|
2099
|
+
* Clears the selected value and resets the component. Works while disabled too, as setting a
|
|
2100
|
+
* native control's value from script does.
|
|
2101
|
+
*/
|
|
2102
|
+
async clear() {
|
|
2103
|
+
const hadValue = this.value !== '' || this.displayText !== '';
|
|
2104
|
+
this.displayText = '';
|
|
2105
|
+
this.setSelectedOption(null);
|
|
2106
|
+
this.value = '';
|
|
2107
|
+
this.filterOptions();
|
|
2108
|
+
this.updateFormValue('');
|
|
2109
|
+
if (hadValue) {
|
|
2110
|
+
this.pdsComboboxChange.emit({ value: '' });
|
|
2111
|
+
}
|
|
2112
|
+
}
|
|
2113
|
+
// Group rows in the flyout panel carry their group's index, as options carry theirs.
|
|
2114
|
+
groupFromEvent(event) {
|
|
2115
|
+
var _a, _b;
|
|
2116
|
+
const index = Number(event.currentTarget.getAttribute('data-group-index'));
|
|
2117
|
+
return (_b = (_a = this.renderedGroups[index]) === null || _a === void 0 ? void 0 : _a.optgroup) !== null && _b !== void 0 ? _b : null;
|
|
2118
|
+
}
|
|
2119
|
+
highlightGroupRowByPointer(group) {
|
|
2120
|
+
this.highlightedIndex = -1;
|
|
2121
|
+
this.highlightedGroup = group;
|
|
2122
|
+
this.keyboardNavigating = false;
|
|
2123
|
+
// So revealing this row again later is announced again.
|
|
2124
|
+
this.revealedGroupLabel = null;
|
|
2125
|
+
}
|
|
2126
|
+
// Get the label of the selected option
|
|
2127
|
+
get selectedLabel() {
|
|
2128
|
+
return this.displayText || '';
|
|
2129
|
+
}
|
|
2130
|
+
// Get the layout content of the selected option for button trigger
|
|
2131
|
+
get selectedLayoutContent() {
|
|
2132
|
+
return this.selectedOptionLayoutContent;
|
|
2133
|
+
}
|
|
2134
|
+
// Check if selected option has layout
|
|
2135
|
+
get selectedHasLayout() {
|
|
2136
|
+
return this.selectedOption ? this.isOptionLayout(this.selectedOption) : false;
|
|
2137
|
+
}
|
|
2138
|
+
// Extract chip sentiment from selected option's attributes, layout content, or slotted trigger content
|
|
2139
|
+
get selectedChipSentiment() {
|
|
2140
|
+
// First priority: Check selected option's chip attributes (new automatic approach)
|
|
2141
|
+
if (this.selectedOption && this.isOptionChip(this.selectedOption)) {
|
|
2142
|
+
const sentiment = this.selectedOption.getAttribute('chip-sentiment');
|
|
2143
|
+
if (sentiment)
|
|
2144
|
+
return sentiment;
|
|
2145
|
+
}
|
|
2146
|
+
// Second priority: Check selected option's layout content (existing custom layout approach)
|
|
2147
|
+
if (this.selectedOption && this.isOptionLayout(this.selectedOption)) {
|
|
2148
|
+
const chipElement = this.selectedOption.querySelector('pds-chip');
|
|
2149
|
+
const sentiment = chipElement === null || chipElement === void 0 ? void 0 : chipElement.getAttribute('sentiment');
|
|
2150
|
+
if (sentiment)
|
|
2151
|
+
return sentiment;
|
|
2152
|
+
}
|
|
2153
|
+
// Third priority: Check if we have custom trigger content with a chip (initial state)
|
|
2154
|
+
if (this.customTriggerContent) {
|
|
2155
|
+
const slottedChip = this.el.querySelector('pds-chip[slot="trigger-content"]');
|
|
2156
|
+
if (slottedChip) {
|
|
2157
|
+
const sentiment = slottedChip.getAttribute('sentiment');
|
|
2158
|
+
if (sentiment)
|
|
2159
|
+
return sentiment;
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
// Fallback: Use component props
|
|
2163
|
+
return this.chipSentiment;
|
|
2164
|
+
}
|
|
2165
|
+
// Extract chip large from selected option's attributes, layout content, or slotted trigger content
|
|
2166
|
+
get selectedChipLarge() {
|
|
2167
|
+
// First priority: Check selected option's chip attributes (new automatic approach)
|
|
2168
|
+
if (this.selectedOption && this.isOptionChip(this.selectedOption)) {
|
|
2169
|
+
if (this.selectedOption.hasAttribute('chip-large'))
|
|
2170
|
+
return true;
|
|
2171
|
+
}
|
|
2172
|
+
// Second priority: Check selected option's layout content (existing custom layout approach)
|
|
2173
|
+
if (this.selectedOption && this.isOptionLayout(this.selectedOption)) {
|
|
2174
|
+
const chipElement = this.selectedOption.querySelector('pds-chip');
|
|
2175
|
+
if ((chipElement === null || chipElement === void 0 ? void 0 : chipElement.getAttribute('size')) === 'lg')
|
|
2176
|
+
return true;
|
|
2177
|
+
}
|
|
2178
|
+
// Third priority: Check if we have custom trigger content with a chip (initial state)
|
|
2179
|
+
if (this.customTriggerContent) {
|
|
2180
|
+
const slottedChip = this.el.querySelector('pds-chip[slot="trigger-content"]');
|
|
2181
|
+
if (slottedChip && slottedChip.getAttribute('size') === 'lg') {
|
|
2182
|
+
return true;
|
|
2183
|
+
}
|
|
2184
|
+
}
|
|
2185
|
+
// Fallback: Use component props
|
|
2186
|
+
return this.chipLarge;
|
|
2187
|
+
}
|
|
2188
|
+
// Extract chip icon from selected option's attributes, layout content, or slotted trigger content
|
|
2189
|
+
get selectedChipIcon() {
|
|
2190
|
+
// First priority: Check selected option's chip attributes (new automatic approach)
|
|
2191
|
+
if (this.selectedOption && this.isOptionChip(this.selectedOption)) {
|
|
2192
|
+
const icon = this.selectedOption.getAttribute('chip-icon');
|
|
2193
|
+
if (icon)
|
|
2194
|
+
return icon;
|
|
2195
|
+
}
|
|
2196
|
+
// Second priority: Check selected option's layout content (existing custom layout approach)
|
|
2197
|
+
if (this.selectedOption && this.isOptionLayout(this.selectedOption)) {
|
|
2198
|
+
const chipElement = this.selectedOption.querySelector('pds-chip');
|
|
2199
|
+
const icon = chipElement === null || chipElement === void 0 ? void 0 : chipElement.getAttribute('icon');
|
|
2200
|
+
if (icon)
|
|
2201
|
+
return icon;
|
|
2202
|
+
}
|
|
2203
|
+
// Third priority: Check if we have custom trigger content with a chip (initial state)
|
|
2204
|
+
if (this.customTriggerContent) {
|
|
2205
|
+
const slottedChip = this.el.querySelector('pds-chip[slot="trigger-content"]');
|
|
2206
|
+
if (slottedChip) {
|
|
2207
|
+
const icon = slottedChip.getAttribute('icon');
|
|
2208
|
+
if (icon)
|
|
2209
|
+
return icon;
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
// Fallback: Use component props
|
|
2213
|
+
return this.chipIcon;
|
|
2214
|
+
}
|
|
2215
|
+
// Extract chip dot from selected option's attributes, layout content, or slotted trigger content
|
|
2216
|
+
get selectedChipDot() {
|
|
2217
|
+
// First priority: Check selected option's chip attributes (new automatic approach)
|
|
2218
|
+
if (this.selectedOption && this.isOptionChip(this.selectedOption)) {
|
|
2219
|
+
if (this.selectedOption.hasAttribute('chip-dot'))
|
|
2220
|
+
return true;
|
|
2221
|
+
}
|
|
2222
|
+
// Second priority: Check selected option's layout content (existing custom layout approach)
|
|
2223
|
+
if (this.selectedOption && this.isOptionLayout(this.selectedOption)) {
|
|
2224
|
+
const chipElement = this.selectedOption.querySelector('pds-chip');
|
|
2225
|
+
if (chipElement === null || chipElement === void 0 ? void 0 : chipElement.hasAttribute('dot'))
|
|
2226
|
+
return true;
|
|
2227
|
+
}
|
|
2228
|
+
// Third priority: Check if we have custom trigger content with a chip (initial state)
|
|
2229
|
+
if (this.customTriggerContent) {
|
|
2230
|
+
const slottedChip = this.el.querySelector('pds-chip[slot="trigger-content"]');
|
|
2231
|
+
if (slottedChip && slottedChip.hasAttribute('dot')) {
|
|
2232
|
+
return true;
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
// Fallback: Use component props
|
|
2236
|
+
return this.chipDot;
|
|
2237
|
+
}
|
|
2238
|
+
/**
|
|
2239
|
+
* With `async-url`, fetches when the button trigger opens: the first page if nothing has loaded.
|
|
2240
|
+
* The panel's search field opens empty, so results left from the last search are refetched for
|
|
2241
|
+
* an empty query.
|
|
2242
|
+
*/
|
|
2243
|
+
fetchAsyncOptionsOnOpen() {
|
|
2244
|
+
if (!this.asyncUrl)
|
|
2245
|
+
return;
|
|
2246
|
+
if (this.usesPanelSearch && (this.internalOptions.length === 0 || this.lastFetchedQuery !== '')) {
|
|
2247
|
+
this.debouncedFetchAsyncOptions('', 1);
|
|
2248
|
+
}
|
|
2249
|
+
else if (this.internalOptions.length === 0) {
|
|
2250
|
+
this.debouncedFetchAsyncOptions(this.displayText, 1);
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
2253
|
+
handleOptionClick(option) {
|
|
2254
|
+
if (isOptionDisabled(option))
|
|
2255
|
+
return;
|
|
2256
|
+
if (this.selectedIcon === null)
|
|
2257
|
+
this.fadesValueIn = true;
|
|
2258
|
+
// Update reactive state - single source of truth
|
|
2259
|
+
// The @Watch('selectedOption') will handle displayText, value, and form internals
|
|
2260
|
+
this.setSelectedOption(option);
|
|
2261
|
+
this.isOpen = false;
|
|
2262
|
+
this.clearExpandFilterList();
|
|
2263
|
+
this.pdsComboboxChange.emit({ value: option.value });
|
|
2264
|
+
}
|
|
2265
|
+
/** The row shown while options load: at the top of the list, or of a drilled-in group's options. */
|
|
2266
|
+
renderLoadingRow() {
|
|
2267
|
+
if (!this.loading)
|
|
2268
|
+
return null;
|
|
2269
|
+
const hasSlottedLoading = !this.usesBodyPortal && !!this.el.querySelector('[slot="loading"]');
|
|
2270
|
+
return (h("li", { class: "pds-combobox__loading", role: "presentation" }, hasSlottedLoading ? h("slot", { name: "loading" }) : h("pds-loader", { size: "small" })));
|
|
2271
|
+
}
|
|
2272
|
+
/** The row after the last option while more can load, inside whatever scrolls them. */
|
|
2273
|
+
renderLoadMoreRow() {
|
|
2274
|
+
if (!this.hasMore || this.loading)
|
|
2275
|
+
return null;
|
|
2276
|
+
return (h("li", { class: "pds-combobox__load-more", role: "presentation" }, h("pds-loader", { size: "small" })));
|
|
2277
|
+
}
|
|
2278
|
+
/** Drilled into a group: the group and its place among the panel's entries; otherwise null. */
|
|
2279
|
+
drilledInEntry(entries) {
|
|
2280
|
+
if (this.effectiveGroupDisplay !== 'drill-in' || this.openGroup === null)
|
|
2281
|
+
return null;
|
|
2282
|
+
const position = entries.findIndex(entry => entry.kind === 'group' && entry.group.optgroup === this.openGroup);
|
|
2283
|
+
const open = entries[position];
|
|
2284
|
+
return (open === null || open === void 0 ? void 0 : open.kind) === 'group' ? { group: open.group, position } : null;
|
|
2285
|
+
}
|
|
2286
|
+
renderDropdown() {
|
|
2287
|
+
if (!this.isOpen) {
|
|
2288
|
+
return null;
|
|
2289
|
+
}
|
|
2290
|
+
const hasSlottedEmpty = !this.usesBodyPortal && !!this.el.querySelector('[slot="empty"]');
|
|
2291
|
+
// Drilled in, the group's options scroll under the row back, so their loading rows go with them.
|
|
2292
|
+
const drilledIn = this.showsGroupedPanel && this.drilledInEntry(this.panelEntries()) !== null;
|
|
2293
|
+
const selectableOptions = this.filteredItems.filter(item => item.tagName === 'OPTION');
|
|
2294
|
+
const withSearch = this.usesPanelSearch;
|
|
2295
|
+
// While a drilled-in group hides the search field, the list takes focus in its place.
|
|
2296
|
+
const listTakesFocus = this.hidesPanelSearch;
|
|
2297
|
+
const list = (h("ul", { key: "panel-list", class: {
|
|
2298
|
+
'pds-combobox__listbox': !withSearch,
|
|
2299
|
+
'pds-combobox__listbox-options': withSearch,
|
|
2300
|
+
'pds-combobox__listbox-options--drilled-in': listTakesFocus,
|
|
2301
|
+
'pds-combobox__listbox--grouped': this.groupDisplay !== 'inline',
|
|
2302
|
+
'pds-combobox__listbox--drill-in': this.drillDirection === 'in',
|
|
2303
|
+
'pds-combobox__listbox--drill-out': this.drillDirection === 'out',
|
|
2304
|
+
'pds-combobox__listbox--pointer-hover': this.pointerCanHover,
|
|
2305
|
+
'pds-combobox__listbox--truncate': this.truncate,
|
|
2306
|
+
}, onAnimationEnd: this.onDrillAnimationEnd, onPointerMove: this.onPanelPointer, onPointerDown: this.onPanelPointer, role: this.showsGroupedPanel ? 'tree' : 'listbox', id: this.listboxId, "aria-label": this.label || 'Options', "aria-multiselectable": "false",
|
|
2307
|
+
// Focusable but out of the tab order with panel search, so it can take focus when a
|
|
2308
|
+
// drilled-in group hides the field. Dropping it while focused would blur the list and close.
|
|
2309
|
+
tabIndex: withSearch ? -1 : undefined, "aria-activedescendant": listTakesFocus ? this.activeDescendantId : undefined, onKeyDown: withSearch ? this.onPanelTreeKeyDown : undefined, ref: el => {
|
|
2310
|
+
if (withSearch)
|
|
2311
|
+
this.panelTreeEl = el;
|
|
2312
|
+
else
|
|
2313
|
+
this.listboxEl = el;
|
|
2314
|
+
}, onScroll: this.handleScroll }, !drilledIn && this.renderLoadingRow(), !this.loading && this.filteredItems.length === 0 && (h("li", { class: "pds-combobox__empty", role: "presentation" }, hasSlottedEmpty ? (h("slot", { name: "empty" })) : (h("span", null, this.noOptionsFoundLabel)))), this.showsGroupedPanel ? this.renderGroupedPanel() : this.renderListboxItems(selectableOptions.length), !drilledIn && this.renderLoadMoreRow()));
|
|
2315
|
+
if (!withSearch)
|
|
2316
|
+
return list;
|
|
2317
|
+
// The search field sits above the list; the wrapper is what's positioned and portaled.
|
|
2318
|
+
return (h("div", { class: "pds-combobox__listbox pds-combobox__listbox--with-search", ref: el => (this.listboxEl = el), onAnimationEnd: this.onDrillAnimationEnd, onMouseDown: this.onPanelMouseDown,
|
|
2319
|
+
// Portaled, the panel sits outside .pds-combobox, so its focusout wouldn't reach that handler.
|
|
2320
|
+
onFocusout: this.usesBodyPortal ? this.onComboboxFocusOut : undefined }, !listTakesFocus && this.renderPanelSearch(), list));
|
|
2321
|
+
}
|
|
2322
|
+
/**
|
|
2323
|
+
* The listbox's items. Each optgroup's options sit in a `group` named for it, as in
|
|
2324
|
+
* `pds-multiselect`, so assistive tech announces the group on entering it; a `pds-text` label
|
|
2325
|
+
* stays a caption above the options that follow it.
|
|
2326
|
+
*/
|
|
2327
|
+
renderListboxItems(setSize) {
|
|
2328
|
+
const rendered = [];
|
|
2329
|
+
let optionIndex = 0;
|
|
2330
|
+
let group = null;
|
|
2331
|
+
const closeGroup = () => {
|
|
2332
|
+
if (group === null)
|
|
2333
|
+
return;
|
|
2334
|
+
const { optgroup, key, options, members } = group;
|
|
2335
|
+
const groupIcon = groupIconOf(optgroup);
|
|
2336
|
+
const badge = groupBadgeOf(optgroup);
|
|
2337
|
+
// As in the grouped displays: disabled when there's nothing left in it to choose.
|
|
2338
|
+
const disabled = members.length > 0 && members.every(member => isOptionDisabled(member));
|
|
2339
|
+
rendered.push(h("li", { key: key, class: { 'pds-combobox__group': true, 'pds-combobox__group--disabled': disabled }, role: "group", "aria-label": badge === null ? optgroup.label : `${optgroup.label}, ${badge.label}`, "aria-disabled": disabled ? 'true' : undefined }, h("div", { class: {
|
|
2340
|
+
'pds-combobox__group-label': true,
|
|
2341
|
+
'pds-combobox__group-label--with-icon': groupIcon !== null,
|
|
2342
|
+
'pds-combobox__group-label--with-badge': badge !== null,
|
|
2343
|
+
}, "aria-hidden": "true" }, groupIcon !== null && (
|
|
2344
|
+
// `name`, not `icon`: `icon` also loads URLs and data: SVGs, unsanitized.
|
|
2345
|
+
h("pds-icon", { name: groupIcon, size: "small", "aria-hidden": "true", class: "pds-combobox__group-icon" })), badge === null ? optgroup.label : h("span", { class: "pds-combobox__group-label-text" }, optgroup.label), this.renderBadge(badge, 'pds-combobox__group-badge')), h("ul", { class: "pds-combobox__group-list", role: "presentation" }, options)));
|
|
2346
|
+
group = null;
|
|
2347
|
+
};
|
|
2348
|
+
this.filteredItems.forEach((item, itemIdx) => {
|
|
2349
|
+
if (item.tagName === 'OPTGROUP') {
|
|
2350
|
+
closeGroup();
|
|
2351
|
+
group = { optgroup: item, key: `optgroup-${itemIdx}`, options: [], members: [] };
|
|
2352
|
+
}
|
|
2353
|
+
else if (item.tagName === 'PDS-TEXT') {
|
|
2354
|
+
closeGroup();
|
|
2355
|
+
rendered.push(h("li", { key: `pds-text-${itemIdx}`, class: "pds-combobox__group-label", role: "presentation" }, item.textContent));
|
|
2356
|
+
}
|
|
2357
|
+
else if (item.tagName === 'OPTION') {
|
|
2358
|
+
const option = item;
|
|
2359
|
+
if (group !== null && parentOptgroupOf(option) !== group.optgroup)
|
|
2360
|
+
closeGroup();
|
|
2361
|
+
const rendering = this.renderOption(option, optionIndex, { posinset: optionIndex + 1, setsize: setSize });
|
|
2362
|
+
optionIndex++;
|
|
2363
|
+
if (group !== null) {
|
|
2364
|
+
group.options.push(rendering);
|
|
2365
|
+
group.members.push(option);
|
|
2366
|
+
}
|
|
2367
|
+
else {
|
|
2368
|
+
rendered.push(rendering);
|
|
2369
|
+
}
|
|
2370
|
+
}
|
|
2371
|
+
});
|
|
2372
|
+
closeGroup();
|
|
2373
|
+
return rendered;
|
|
2374
|
+
}
|
|
2375
|
+
/** `panelSearch` applies to the triggers that can't be typed into. */
|
|
2376
|
+
get usesPanelSearch() {
|
|
2377
|
+
return this.panelSearch && this.trigger !== 'input';
|
|
2378
|
+
}
|
|
2379
|
+
/** `groupDisplay`, with `flyout` drilling in when there's no room beside the dropdown. */
|
|
2380
|
+
get effectiveGroupDisplay() {
|
|
2381
|
+
return this.groupDisplay === 'flyout' && this.flyoutFallback ? 'drill-in' : this.groupDisplay;
|
|
2382
|
+
}
|
|
2383
|
+
/**
|
|
2384
|
+
* The popup's role, for the triggers' `aria-haspopup`: a `tree` while the grouped panel shows
|
|
2385
|
+
* groups, and a `listbox` of options otherwise, search results included.
|
|
2386
|
+
*/
|
|
2387
|
+
get popupRole() {
|
|
2388
|
+
return this.showsGroupedPanel ? 'tree' : 'listbox';
|
|
2389
|
+
}
|
|
2390
|
+
/**
|
|
2391
|
+
* The input trigger's `aria-haspopup`. While closed it names what opening shows: the full list,
|
|
2392
|
+
* so the grouped panel in a grouped display, even though the input still holds the selection's
|
|
2393
|
+
* label.
|
|
2394
|
+
*/
|
|
2395
|
+
get inputPopupRole() {
|
|
2396
|
+
if (this.isOpen)
|
|
2397
|
+
return this.popupRole;
|
|
2398
|
+
return this.effectiveGroupDisplay === 'inline' ? 'listbox' : 'tree';
|
|
2399
|
+
}
|
|
2400
|
+
/**
|
|
2401
|
+
* The button and chip triggers' `aria-haspopup`. With panel search the trigger opens the panel,
|
|
2402
|
+
* which starts as a tree in a grouped display, so typing in the panel doesn't change it.
|
|
2403
|
+
*/
|
|
2404
|
+
get triggerPopupRole() {
|
|
2405
|
+
if (!this.usesPanelSearch)
|
|
2406
|
+
return this.popupRole;
|
|
2407
|
+
return this.groupDisplay === 'inline' ? 'listbox' : 'tree';
|
|
2408
|
+
}
|
|
2409
|
+
/**
|
|
2410
|
+
* Drilled into a group with panel search: the group's row back takes the search field's place,
|
|
2411
|
+
* since one group's options don't need searching. Typing searches the whole list again.
|
|
2412
|
+
*/
|
|
2413
|
+
get hidesPanelSearch() {
|
|
2414
|
+
return this.usesPanelSearch && this.showsGroupedPanel && this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null;
|
|
2415
|
+
}
|
|
2416
|
+
/** The grouped panel is showing groups rather than search results. */
|
|
2417
|
+
get showsGroupedPanel() {
|
|
2418
|
+
if (this.effectiveGroupDisplay === 'inline')
|
|
2419
|
+
return false;
|
|
2420
|
+
const searching = this.usesPanelSearch
|
|
2421
|
+
? this.panelQuery !== ''
|
|
2422
|
+
: this.mode === 'filter' && !this.expandFilterListWhileOpen && this.displayText !== '';
|
|
2423
|
+
return !searching;
|
|
2424
|
+
}
|
|
2425
|
+
setPanelQuery(query) {
|
|
2426
|
+
this.panelQuery = query;
|
|
2427
|
+
this.clearExpandFilterList();
|
|
2428
|
+
this.filterOptions();
|
|
2429
|
+
this.pdsComboboxSearch.emit({ query: this.panelQuery });
|
|
2430
|
+
if (this.asyncUrl !== undefined && this.asyncUrl !== '') {
|
|
2431
|
+
this.debouncedFetchAsyncOptions(this.panelQuery, 1);
|
|
2432
|
+
}
|
|
2433
|
+
// The list changes size, so place the dropdown again, as typing in the input trigger does.
|
|
2434
|
+
setTimeout(() => this.openDropdownPositioning(), 0);
|
|
2435
|
+
}
|
|
2436
|
+
/** What's being searched: the panel's field, or the input trigger's text. */
|
|
2437
|
+
get activeQuery() {
|
|
2438
|
+
return this.usesPanelSearch ? this.panelQuery : this.displayText;
|
|
2439
|
+
}
|
|
2440
|
+
// Tab closes the dropdown and lands on the trigger, as Escape does: the focused field or list is
|
|
2441
|
+
// about to unmount, so the browser can't tab on from it. The next Tab continues from the trigger.
|
|
2442
|
+
handlePanelTab(event) {
|
|
2443
|
+
if (event.key !== 'Tab')
|
|
2444
|
+
return false;
|
|
2445
|
+
event.preventDefault();
|
|
2446
|
+
this.handleKeyDown(event);
|
|
2447
|
+
this.restoreFocusToTrigger();
|
|
2448
|
+
return true;
|
|
2449
|
+
}
|
|
2450
|
+
/** Returns from a drilled-in group to the group list; false when not drilled in. */
|
|
2451
|
+
leaveDrilledInGroup() {
|
|
2452
|
+
if (!this.showsGroupedPanel || this.effectiveGroupDisplay !== 'drill-in' || this.openGroup === null)
|
|
2453
|
+
return false;
|
|
2454
|
+
this.collapseToGroup(this.openGroup);
|
|
2455
|
+
return true;
|
|
2456
|
+
}
|
|
2457
|
+
renderPanelSearch() {
|
|
2458
|
+
return (h("div", { key: "panel-search", class: {
|
|
2459
|
+
'pds-combobox__panel-search': true,
|
|
2460
|
+
// Coming back from a group, the search field slides in with the groups.
|
|
2461
|
+
'pds-combobox__panel-search--drill-out': this.drillDirection === 'out',
|
|
2462
|
+
} }, h("pds-icon", { name: "search", size: "regular", "aria-hidden": "true" }), h("input", { ref: el => (this.panelSearchEl = el), type: "text", class: "pds-combobox__panel-search-input", placeholder: this.searchPlaceholder, value: this.panelQuery, role: "combobox", "aria-label": this.searchOptionsLabel, "aria-haspopup": this.popupRole, "aria-controls": this.listboxId, "aria-autocomplete": "list", "aria-expanded": "true", "aria-activedescendant": this.activeDescendantId, autocomplete: "off", onInput: this.onPanelSearchInput, onKeyDown: this.onPanelSearchKeyDown })));
|
|
2463
|
+
}
|
|
2464
|
+
/**
|
|
2465
|
+
* An option, as a listbox `option` or, given a tree `level`, a `treeitem`. `posinset` and
|
|
2466
|
+
* `setsize` place it among its siblings.
|
|
2467
|
+
*/
|
|
2468
|
+
renderOption(option, index, { posinset, setsize, level }) {
|
|
2469
|
+
const isSelected = this.isOptionSelected(option);
|
|
2470
|
+
const isHighlighted = this.highlightedIndex === index;
|
|
2471
|
+
const isLayout = this.isOptionLayout(option);
|
|
2472
|
+
const isChip = this.isOptionChip(option);
|
|
2473
|
+
const isDisabled = isOptionDisabled(option);
|
|
2474
|
+
const tree = level !== undefined;
|
|
2475
|
+
const badge = isLayout || isChip ? null : optionBadgeOf(option);
|
|
2476
|
+
return (h("li", { key: option.value, id: this.optionDomId(index), role: tree ? 'treeitem' : 'option', "aria-selected": isSelected ? 'true' : tree ? undefined : 'false', "aria-disabled": isDisabled ? 'true' : undefined, "aria-level": level, "aria-setsize": setsize, "aria-posinset": posinset, "aria-label": isLayout || isChip
|
|
2477
|
+
? option.getAttribute('aria-label') || this.getOptionLabel(option)
|
|
2478
|
+
: badge && `${this.getOptionLabel(option)}, ${badge.label}`, tabindex: this.usesBodyPortal || this.usesPanelSearch || tree ? '-1' : isHighlighted ? '0' : '-1', class: {
|
|
2479
|
+
'pds-combobox__option': true,
|
|
2480
|
+
'pds-combobox__option--highlighted': isHighlighted,
|
|
2481
|
+
// The keyboard's place, as on the group rows (`--keyboard`).
|
|
2482
|
+
'pds-combobox__option--keyboard': isHighlighted && this.keyboardNavigating,
|
|
2483
|
+
'pds-combobox__option--layout': isLayout,
|
|
2484
|
+
'pds-combobox__option--chip': isChip,
|
|
2485
|
+
'pds-combobox__option--disabled': isDisabled,
|
|
2486
|
+
'pds-combobox__option--with-badge': badge !== null,
|
|
2487
|
+
}, "data-option-index": index, onMouseDown: this.onOptionMouseDown, onClick: this.onOptionClick, onMouseEnter: this.onOptionMouseEnter, onKeyDown: this.onOptionKeyDown }, isLayout ? (h("pds-box", { class: "pds-combobox__option-layout-wrapper", innerHTML: this.getOptionLayoutContent(option) })) : isChip ? (this.renderOptionChip(option)) : ([this.renderOptionLabel(option), this.renderOptionBadge(option)]), isSelected && h("pds-icon", { icon: "check", size: "regular", "aria-hidden": "true", class: "pds-combobox__option-check" })));
|
|
2488
|
+
}
|
|
2489
|
+
/** Copies an `options` badge to an option's or optgroup's `data-badge*` attributes; only strings count. */
|
|
2490
|
+
setBadgeAttributes(element, badge) {
|
|
2491
|
+
if (typeof badge !== 'object' || badge === null)
|
|
2492
|
+
return;
|
|
2493
|
+
const { label, sentiment, icon } = badge;
|
|
2494
|
+
if (typeof label !== 'string' || label.trim() === '')
|
|
2495
|
+
return;
|
|
2496
|
+
element.setAttribute('data-badge', label);
|
|
2497
|
+
if (typeof sentiment === 'string')
|
|
2498
|
+
element.setAttribute('data-badge-sentiment', sentiment);
|
|
2499
|
+
if (typeof icon === 'string')
|
|
2500
|
+
element.setAttribute('data-badge-icon', icon);
|
|
2501
|
+
}
|
|
2502
|
+
/** An option's badge, after its text. */
|
|
2503
|
+
renderOptionBadge(option) {
|
|
2504
|
+
return this.renderBadge(optionBadgeOf(option), 'pds-combobox__option-badge');
|
|
2505
|
+
}
|
|
2506
|
+
/** A badge as a `pds-chip`: after an option's text, or a group's label. */
|
|
2507
|
+
renderBadge(badge, className) {
|
|
2508
|
+
var _a;
|
|
2509
|
+
if (badge === null)
|
|
2510
|
+
return null;
|
|
2511
|
+
return (h("pds-chip", { size: "sm", sentiment: badge.sentiment,
|
|
2512
|
+
// A Pine icon name only, checked by optionBadgeOf; pds-chip's `icon` also loads URLs.
|
|
2513
|
+
icon: (_a = badge.icon) !== null && _a !== void 0 ? _a : undefined,
|
|
2514
|
+
// A long label, often a translated one, truncates rather than squeezing the option's text.
|
|
2515
|
+
maxWidth: "50%", class: className }, badge.label));
|
|
2516
|
+
}
|
|
2517
|
+
/**
|
|
2518
|
+
* An option's text, after its `data-icon` when it has one. Beside a badge the text is always
|
|
2519
|
+
* wrapped, so it can shrink and wrap rather than push the badge out of the row.
|
|
2520
|
+
*/
|
|
2521
|
+
renderOptionLabel(option) {
|
|
2522
|
+
const icon = optionIconOf(option);
|
|
2523
|
+
const label = this.truncate ? (h("span", { key: this.getOptionLabel(option), class: "pds-combobox__option-text" }, this.getOptionLabel(option))) : this.getOptionLabel(option);
|
|
2524
|
+
if (icon === null) {
|
|
2525
|
+
return optionBadgeOf(option) === null ? label : h("span", { class: "pds-combobox__option-label" }, label);
|
|
2526
|
+
}
|
|
2527
|
+
return (h("span", { class: "pds-combobox__option-label" }, h("pds-icon", { name: icon, size: "regular", "aria-hidden": "true", class: "pds-combobox__option-icon" }), label));
|
|
2528
|
+
}
|
|
2529
|
+
/** The grouped panel's rows, in the order the panel draws them and the keyboard moves through. */
|
|
2530
|
+
panelEntries() {
|
|
2531
|
+
// Slotted markup is already in order; only options from data record positions.
|
|
2532
|
+
if (this.options === undefined && !this.asyncUrl)
|
|
2533
|
+
return buildPanelEntries(this.filteredItems);
|
|
2534
|
+
return buildPanelEntries(this.filteredItems, element => this.panelPositions.get(element));
|
|
2535
|
+
}
|
|
2536
|
+
/**
|
|
2537
|
+
* `flyout`: one row per group, its options in a flyout beside it. `drill-in`: the same rows, and
|
|
2538
|
+
* an opened group replaces them with its row, drawn as a row back, above its options. Either way
|
|
2539
|
+
* it's a tree: the rows and ungrouped options are level 1, a group's options level 2.
|
|
2540
|
+
*/
|
|
2541
|
+
renderGroupedPanel() {
|
|
2542
|
+
const entries = this.panelEntries();
|
|
2543
|
+
const setsize = entries.length;
|
|
2544
|
+
const drilled = this.drilledInEntry(entries);
|
|
2545
|
+
if (drilled)
|
|
2546
|
+
return this.renderGroupBackRow(drilled.group, { posinset: drilled.position + 1, setsize });
|
|
2547
|
+
this.renderedGroups = [];
|
|
2548
|
+
return entries.map((entry, position) => {
|
|
2549
|
+
const placement = { posinset: position + 1, setsize };
|
|
2550
|
+
if (entry.kind === 'option')
|
|
2551
|
+
return this.renderOption(entry.option, entry.index, Object.assign(Object.assign({}, placement), { level: 1 }));
|
|
2552
|
+
this.renderedGroups.push(entry.group);
|
|
2553
|
+
return this.renderGroupRow(entry.group, this.renderedGroups.length - 1, placement);
|
|
2554
|
+
});
|
|
2555
|
+
}
|
|
2556
|
+
/** A group's options, as its children in the tree. */
|
|
2557
|
+
renderGroupOptions(group) {
|
|
2558
|
+
return group.options.map(({ option, index }, position) => this.renderOption(option, index, { posinset: position + 1, setsize: group.options.length, level: 2 }));
|
|
2559
|
+
}
|
|
2560
|
+
/**
|
|
2561
|
+
* Drilled into a group: its treeitem, expanded. Its row reads as a way back ("Back: Tag") and
|
|
2562
|
+
* leads its options. It leaves out the group's badge: the row is a way back, not a group to
|
|
2563
|
+
* choose, and the badge was on the row that opened it. An option's own badge still shows.
|
|
2564
|
+
*/
|
|
2565
|
+
renderGroupBackRow(group, { posinset, setsize }) {
|
|
2566
|
+
const id = this.groupDomId(group.optgroup);
|
|
2567
|
+
const disabled = isGroupDisabled(group);
|
|
2568
|
+
return (h("li", { key: "group-back", id: id, class: {
|
|
2569
|
+
'pds-combobox__group-back': true,
|
|
2570
|
+
'pds-combobox__group-back--disabled': disabled,
|
|
2571
|
+
// As the group rows: shaded for the keys, and by `:hover` for the pointer.
|
|
2572
|
+
'pds-combobox__group-back--highlighted': this.keyboardNavigating && this.highlightedGroupRow === group.optgroup,
|
|
2573
|
+
'pds-combobox__group-back--keyboard': this.keyboardNavigating && this.highlightedGroupRow === group.optgroup,
|
|
2574
|
+
}, role: "treeitem", "aria-expanded": "true", "aria-disabled": disabled ? 'true' : undefined, "aria-level": 1, "aria-posinset": posinset, "aria-setsize": setsize, "aria-labelledby": `${id}-label` }, h("div", { class: "pds-combobox__group-row-trigger pds-combobox__group-back-trigger", onMouseDown: this.onOptionMouseDown, onMouseEnter: this.onGroupBackMouseEnter, onClick: this.onGroupBackClick }, h("span", { class: "pds-combobox__group-row-label", id: `${id}-label` }, h("pds-icon", { name: "caret-left", size: "regular", "aria-hidden": "true", class: "pds-combobox__group-row-caret" }), h("span", { class: "visually-hidden" }, this.drillInBackLabel, ": "), group.label)), h("ul", { class: "pds-combobox__drill-in-options", role: "group", "aria-label": group.label, onScroll: this.handleScroll }, this.renderLoadingRow(), this.renderGroupOptions(group), this.renderLoadMoreRow())));
|
|
2575
|
+
}
|
|
2576
|
+
renderGroupRow(group, groupIndex, { posinset, setsize }) {
|
|
2577
|
+
const flyout = this.effectiveGroupDisplay === 'flyout';
|
|
2578
|
+
const isOpen = flyout && this.openGroup === group.optgroup;
|
|
2579
|
+
// `--has-selection` is a state hook only (tests read it), not styled. The fill follows
|
|
2580
|
+
// `--highlighted` (always in flyout, in drill-in only for the keys) and a flyout's `--open` row.
|
|
2581
|
+
const hasSelection = flyout && group.options.some(({ option }) => this.isOptionSelected(option));
|
|
2582
|
+
const isCurrent = this.highlightedGroupRow === group.optgroup;
|
|
2583
|
+
const disabled = isGroupDisabled(group);
|
|
2584
|
+
const id = this.groupDomId(group.optgroup);
|
|
2585
|
+
return (h("li", { key: `group-${groupIndex}`, id: id, class: {
|
|
2586
|
+
'pds-combobox__group-row': true,
|
|
2587
|
+
'pds-combobox__group-row--open': isOpen,
|
|
2588
|
+
'pds-combobox__group-row--has-selection': hasSelection,
|
|
2589
|
+
'pds-combobox__group-row--highlighted': isCurrent && (flyout || this.keyboardNavigating),
|
|
2590
|
+
'pds-combobox__group-row--keyboard': isCurrent && this.keyboardNavigating,
|
|
2591
|
+
'pds-combobox__group-row--disabled': disabled,
|
|
2592
|
+
}, role: "treeitem", "aria-expanded": isOpen ? 'true' : 'false', "aria-disabled": disabled ? 'true' : undefined, "aria-level": 1, "aria-posinset": posinset, "aria-setsize": setsize, "aria-labelledby": group.badge === null ? `${id}-label` : undefined, "aria-label": group.badge === null ? undefined : `${group.label}, ${group.badge.label}`, "data-group-index": groupIndex, onMouseEnter: flyout ? this.onGroupRowMouseEnter : undefined, onMouseLeave: flyout ? this.onGroupRowMouseLeave : undefined }, h("div", { class: "pds-combobox__group-row-trigger", "data-group-index": groupIndex, onMouseDown: this.onOptionMouseDown, onMouseEnter: this.onGroupRowTriggerMouseEnter, onClick: this.onGroupRowClick }, h("span", { class: "pds-combobox__group-row-label", id: `${id}-label` }, group.icon !== null && (
|
|
2593
|
+
// `name`, not `icon`: `icon` also loads URLs and data: SVGs, unsanitized.
|
|
2594
|
+
h("pds-icon", { name: group.icon, size: "regular", "aria-hidden": "true", class: "pds-combobox__group-icon" })), group.label), this.renderBadge(group.badge, 'pds-combobox__group-badge'), h("pds-icon", { name: "caret-right", size: "regular", "aria-hidden": "true", class: "pds-combobox__group-row-caret" })), isOpen && (h("ul", { class: "pds-combobox__flyout", role: "group", "aria-label": group.label, style: { minWidth: this.flyoutMinWidth, maxWidth: this.flyoutMaxWidth } }, this.renderGroupOptions(group)))));
|
|
2595
|
+
}
|
|
2596
|
+
// Helper method to render the caret icon
|
|
2597
|
+
renderCaretIcon() {
|
|
2598
|
+
return h("pds-icon", { icon: "caret-down", "aria-hidden": "true", class: "pds-combobox__button-trigger-chevron" });
|
|
2599
|
+
}
|
|
2600
|
+
// Helper method to render layout content
|
|
2601
|
+
renderLayoutContent() {
|
|
2602
|
+
return (h("div", { class: "pds-combobox__button-trigger-layout-wrapper", innerHTML: this.selectedLayoutContent }));
|
|
2603
|
+
}
|
|
2604
|
+
// Helper method to render default text content
|
|
2605
|
+
renderDefaultContent() {
|
|
2606
|
+
const icon = this.selectedIcon;
|
|
2607
|
+
return (h("span", { class: {
|
|
2608
|
+
'pds-combobox__button-trigger-label': true,
|
|
2609
|
+
'pds-combobox__button-trigger-label--placeholder': !this.selectedLabel,
|
|
2610
|
+
'pds-combobox__button-trigger-label--with-icon': icon !== null,
|
|
2611
|
+
'pds-combobox__button-trigger-label--value-in': icon !== null && this.fadesValueIn,
|
|
2612
|
+
} }, icon !== null && (
|
|
2613
|
+
// `name`, not `icon`: `icon` also loads URLs and data: SVGs, unsanitized.
|
|
2614
|
+
h("pds-icon", { name: icon, size: "regular", "aria-hidden": "true", class: "pds-combobox__button-trigger-icon" })), this.truncate ? (
|
|
2615
|
+
// Keyed so a new label drops a stale `title`.
|
|
2616
|
+
h("span", { key: this.selectedLabel || this.placeholder, class: "pds-combobox__button-trigger-text" }, this.selectedLabel || this.placeholder)) : (this.selectedLabel || this.placeholder)));
|
|
2617
|
+
}
|
|
2618
|
+
/** The selection's icon for the button trigger: the option's own, or else its group's. */
|
|
2619
|
+
get selectedIcon() {
|
|
2620
|
+
var _a;
|
|
2621
|
+
const option = this.selectedOption;
|
|
2622
|
+
if (!option)
|
|
2623
|
+
return null;
|
|
2624
|
+
const optgroup = parentOptgroupOf(option);
|
|
2625
|
+
return (_a = optionIconOf(option)) !== null && _a !== void 0 ? _a : (optgroup !== null ? groupIconOf(optgroup) : null);
|
|
2626
|
+
}
|
|
2627
|
+
// Helper method to check if we should show layout content
|
|
2628
|
+
shouldShowLayoutContent() {
|
|
2629
|
+
return this.selectedHasLayout && !!this.selectedLayoutContent;
|
|
2630
|
+
}
|
|
2631
|
+
// Helper method to build chip trigger CSS classes
|
|
2632
|
+
getChipTriggerClass() {
|
|
2633
|
+
const classes = ['pds-combobox__chip-trigger'];
|
|
2634
|
+
// Add sentiment class
|
|
2635
|
+
classes.push(`pds-combobox__chip-trigger--${this.selectedChipSentiment}`);
|
|
2636
|
+
// Always use dropdown variant for chip triggers
|
|
2637
|
+
classes.push('pds-combobox__chip-trigger--dropdown');
|
|
2638
|
+
// Add large class if needed
|
|
2639
|
+
if (this.selectedChipLarge) {
|
|
2640
|
+
classes.push('pds-combobox__chip-trigger--large');
|
|
2641
|
+
}
|
|
2642
|
+
// Add dot class if needed
|
|
2643
|
+
if (this.selectedChipDot) {
|
|
2644
|
+
classes.push('pds-combobox__chip-trigger--dot');
|
|
2645
|
+
}
|
|
2646
|
+
return classes.join(' ');
|
|
2647
|
+
}
|
|
2648
|
+
renderButtonTriggerContent() {
|
|
2649
|
+
// Case 1: Custom trigger content with layout priority
|
|
2650
|
+
if (this.customTriggerContent) {
|
|
2651
|
+
if (this.shouldShowLayoutContent()) {
|
|
2652
|
+
return [this.renderLayoutContent(), this.renderCaretIcon()];
|
|
2653
|
+
}
|
|
2654
|
+
// Fall back to slot content when no layout is available
|
|
2655
|
+
return h("slot", { name: "trigger-content" });
|
|
2656
|
+
}
|
|
2657
|
+
// Case 2: Standard mode with layout content
|
|
2658
|
+
if (this.shouldShowLayoutContent()) {
|
|
2659
|
+
return [this.renderLayoutContent(), this.renderCaretIcon()];
|
|
2660
|
+
}
|
|
2661
|
+
// Case 3: Standard mode with default text content
|
|
2662
|
+
return [this.renderDefaultContent(), this.renderCaretIcon()];
|
|
2663
|
+
}
|
|
2664
|
+
renderChipTriggerContent() {
|
|
2665
|
+
// Case 1: Custom trigger content with layout priority
|
|
2666
|
+
if (this.customTriggerContent) {
|
|
2667
|
+
if (this.shouldShowLayoutContent()) {
|
|
2668
|
+
// When using custom layouts, the chip handles its own dropdown arrow
|
|
2669
|
+
return this.renderChipTriggerLayoutContent();
|
|
2670
|
+
}
|
|
2671
|
+
// Fall back to slot content when no layout is available - chip handles its own dropdown arrow
|
|
2672
|
+
return h("slot", { name: "trigger-content" });
|
|
2673
|
+
}
|
|
2674
|
+
// Case 2: Standard mode with layout content
|
|
2675
|
+
if (this.shouldShowLayoutContent()) {
|
|
2676
|
+
// When using custom layouts, the chip handles its own dropdown arrow
|
|
2677
|
+
return this.renderChipTriggerLayoutContent();
|
|
2678
|
+
}
|
|
2679
|
+
// Case 3: Automatic chip mode - selected option has chip attributes
|
|
2680
|
+
if (this.selectedOption && this.selectedOptionChipProps) {
|
|
2681
|
+
// Render as chip automatically - chip handles its own dropdown arrow
|
|
2682
|
+
return this.renderSelectedOptionAsChip();
|
|
2683
|
+
}
|
|
2684
|
+
// Case 4: Standard mode with default text content
|
|
2685
|
+
return [
|
|
2686
|
+
this.renderChipTriggerDefaultContent(),
|
|
2687
|
+
this.renderCaretIcon()
|
|
2688
|
+
];
|
|
2689
|
+
}
|
|
2690
|
+
// Helper method to render selected option as chip for trigger (automatic approach)
|
|
2691
|
+
renderSelectedOptionAsChip() {
|
|
2692
|
+
if (!this.selectedOption || !this.selectedOptionChipProps)
|
|
2693
|
+
return null;
|
|
2694
|
+
return (h("pds-chip", { sentiment: this.selectedOptionChipProps.sentiment, variant: "dropdown" // Always use dropdown variant for triggers
|
|
2695
|
+
,
|
|
2696
|
+
size: this.selectedOptionChipProps.large ? 'lg' : undefined, icon: this.selectedOptionChipProps.icon, dot: this.selectedOptionChipProps.dot, class: "pds-combobox__chip-trigger-auto" }, this.getOptionLabel(this.selectedOption)));
|
|
2697
|
+
}
|
|
2698
|
+
// Helper method to render chip trigger layout content
|
|
2699
|
+
renderChipTriggerLayoutContent() {
|
|
2700
|
+
return (h("div", { class: "pds-combobox__chip-trigger-layout-wrapper", innerHTML: this.getModifiedLayoutContentForTrigger() }));
|
|
2701
|
+
}
|
|
2702
|
+
// Helper method to modify layout content for trigger use (ensure dropdown variant)
|
|
2703
|
+
getModifiedLayoutContentForTrigger() {
|
|
2704
|
+
let content = this.selectedLayoutContent;
|
|
2705
|
+
// If the content contains a pds-chip, ensure it has variant="dropdown"
|
|
2706
|
+
if (content.includes('<pds-chip')) {
|
|
2707
|
+
// Use a temporary div to parse and modify the HTML
|
|
2708
|
+
const tempDiv = document.createElement('div');
|
|
2709
|
+
tempDiv.innerHTML = content;
|
|
2710
|
+
const chipElement = tempDiv.querySelector('pds-chip');
|
|
2711
|
+
if (chipElement) {
|
|
2712
|
+
chipElement.setAttribute('variant', 'dropdown');
|
|
2713
|
+
content = tempDiv.innerHTML;
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
return content;
|
|
2717
|
+
}
|
|
2718
|
+
// Helper method to render chip trigger default content
|
|
2719
|
+
renderChipTriggerDefaultContent() {
|
|
2720
|
+
return (h("span", { class: "pds-combobox__chip-trigger-label" }, this.selectedChipIcon && h("pds-icon", { icon: this.selectedChipIcon, "aria-hidden": "true", class: "pds-combobox__chip-trigger-icon" }), this.selectedLabel || this.placeholder));
|
|
2721
|
+
}
|
|
2722
|
+
// Helper method to render option as chip (new automatic approach)
|
|
2723
|
+
renderOptionChip(option) {
|
|
2724
|
+
const chipProps = this.getOptionChipProps(option);
|
|
2725
|
+
return (h("pds-chip", { sentiment: chipProps.sentiment, variant: "text" // Dropdown options use text variant, not dropdown
|
|
2726
|
+
,
|
|
2727
|
+
size: chipProps.large ? 'lg' : undefined, icon: chipProps.icon, dot: chipProps.dot, class: "pds-combobox__option-chip" }, this.getOptionLabel(option)));
|
|
2728
|
+
}
|
|
2729
|
+
// Mirrors pds-multiselect and pds-select: an error message on its own puts the
|
|
2730
|
+
// field in an invalid state, so assistive tech agrees with the visual treatment.
|
|
2731
|
+
isInvalid() {
|
|
2732
|
+
return Boolean(this.invalid) || Boolean(this.errorMessage);
|
|
2733
|
+
}
|
|
2734
|
+
renderMessages() {
|
|
2735
|
+
const hasErrorMessage = Boolean(this.errorMessage);
|
|
2736
|
+
const showHelperMessage = Boolean(this.helperMessage) && !hasErrorMessage;
|
|
2737
|
+
return [
|
|
2738
|
+
showHelperMessage && (h("p", { class: "pds-combobox__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)),
|
|
2739
|
+
hasErrorMessage && (h("p", { class: "pds-combobox__error", id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { icon: "danger", size: "small", "aria-hidden": "true" }), this.errorMessage)),
|
|
2740
|
+
];
|
|
2741
|
+
}
|
|
2742
|
+
render() {
|
|
2743
|
+
var _a;
|
|
2744
|
+
const triggerClass = [
|
|
2745
|
+
'pds-combobox__button-trigger',
|
|
2746
|
+
`pds-combobox__button-trigger--${this.triggerVariant}`,
|
|
2747
|
+
this.triggerShape === 'input' && 'pds-combobox__button-trigger--input-shape',
|
|
2748
|
+
this.truncate && 'pds-combobox__button-trigger--truncate',
|
|
2749
|
+
]
|
|
2750
|
+
.filter(Boolean)
|
|
2751
|
+
.join(' ');
|
|
2752
|
+
return (h(Host, { key: '3a7f09752d2dff0fbf653852cd9ea474a44c61d5', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: '56d3bf86655abfd945228ee0bc3a556a6ad766b3', class: "pds-combobox", tabIndex: -1, onFocusout: this.onComboboxFocusOut, part: "combobox" }, this.hasVisibleLabel && (h("label", { key: 'a07f37d62bca1b15df3aa258d94c0df4609b93b3', htmlFor: this.trigger === 'input' ? this.componentId : undefined, id: this.labelId, class: "pds-combobox__label", onClick: this.onLabelClick }, this.label)), this.trigger === 'input' ? (h("div", { class: "pds-combobox__input-wrapper", style: { width: this.triggerWidth } }, h("input", { ref: el => {
|
|
2753
|
+
this.inputEl = el;
|
|
2754
|
+
this.triggerEl = el;
|
|
2755
|
+
}, class: {
|
|
2756
|
+
'pds-combobox__input': true,
|
|
2757
|
+
'pds-combobox__input--invalid': this.isInvalid(),
|
|
2758
|
+
}, type: "text", role: "combobox", "aria-autocomplete": "list", "aria-haspopup": this.inputPopupRole === 'tree' ? 'tree' : undefined, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.hideLabel ? this.label : undefined, id: this.componentId, value: this.displayText, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput, onClick: this.handleInputClick, onKeyDown: this.handleKeyDown, autocomplete: "off", part: "input" }), h("pds-icon", { icon: "enlarge", "aria-hidden": "true", class: "pds-combobox__input-icon" }))) : this.trigger === 'chip' ? (h("div", { class: this.getChipTriggerClass(), style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.triggerAriaLabel, "aria-labelledby": this.triggerLabelledBy, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "chip-trigger" }, this.renderChipTriggerContent())) : (h("div", { class: triggerClass, style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.triggerAriaLabel, "aria-labelledby": this.triggerLabelledBy, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, onMouseEnter: this.truncate ? this.onButtonTriggerMouseEnter : undefined, ref: el => (this.triggerEl = el), part: "button-trigger" }, this.renderButtonTriggerContent())), this.renderMessages(), h("div", { key: '0c0accd76b79aba9fa3072eb68800102d458d0a7', style: { display: 'none' } }, h("slot", { key: 'be9cc4c897788342bbc96321f033ed4fd97e80ff', onSlotchange: () => this.updateOptions() })), this.renderDropdown(), this.groupDisplay !== 'inline' && [
|
|
2759
|
+
h("span", { key: "drill-status", class: "visually-hidden", role: "status", "aria-live": "polite" }, this.isOpen && this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null ? this.openGroup.label : ''),
|
|
2760
|
+
// Its own region: sharing one, revealing a row then opening it would leave the text the
|
|
2761
|
+
// same, and opening the group would go unannounced.
|
|
2762
|
+
h("span", { key: "reveal-status", class: "visually-hidden", role: "status", "aria-live": "polite" }, this.isOpen ? (_a = this.revealedGroupLabel) !== null && _a !== void 0 ? _a : '' : ''),
|
|
2763
|
+
])));
|
|
2764
|
+
}
|
|
2765
|
+
static get is() { return "pds-combobox"; }
|
|
2766
|
+
static get encapsulation() { return "shadow"; }
|
|
2767
|
+
static get formAssociated() { return true; }
|
|
2768
|
+
static get originalStyleUrls() {
|
|
2769
|
+
return {
|
|
2770
|
+
"$": ["pds-combobox.scss"]
|
|
2771
|
+
};
|
|
2772
|
+
}
|
|
2773
|
+
static get styleUrls() {
|
|
2774
|
+
return {
|
|
2775
|
+
"$": ["pds-combobox.css"]
|
|
2776
|
+
};
|
|
2777
|
+
}
|
|
2778
|
+
static get properties() {
|
|
2779
|
+
return {
|
|
2780
|
+
"componentId": {
|
|
2781
|
+
"type": "string",
|
|
2782
|
+
"mutable": false,
|
|
2783
|
+
"complexType": {
|
|
2784
|
+
"original": "string",
|
|
2785
|
+
"resolved": "string",
|
|
2786
|
+
"references": {}
|
|
2787
|
+
},
|
|
2788
|
+
"required": true,
|
|
2789
|
+
"optional": false,
|
|
2790
|
+
"docs": {
|
|
2791
|
+
"tags": [],
|
|
2792
|
+
"text": "A unique identifier used for the underlying component `id` attribute."
|
|
2793
|
+
},
|
|
2794
|
+
"getter": false,
|
|
2795
|
+
"setter": false,
|
|
2796
|
+
"reflect": false,
|
|
2797
|
+
"attribute": "component-id"
|
|
2798
|
+
},
|
|
2799
|
+
"name": {
|
|
2800
|
+
"type": "string",
|
|
2801
|
+
"mutable": false,
|
|
2802
|
+
"complexType": {
|
|
2803
|
+
"original": "string",
|
|
2804
|
+
"resolved": "string",
|
|
2805
|
+
"references": {}
|
|
2806
|
+
},
|
|
2807
|
+
"required": false,
|
|
2808
|
+
"optional": true,
|
|
2809
|
+
"docs": {
|
|
2810
|
+
"tags": [],
|
|
2811
|
+
"text": "The name of the form control. Submitted with the form as part of a name/value pair."
|
|
2812
|
+
},
|
|
2813
|
+
"getter": false,
|
|
2814
|
+
"setter": false,
|
|
2815
|
+
"reflect": true,
|
|
2816
|
+
"attribute": "name"
|
|
2817
|
+
},
|
|
2818
|
+
"customOptionLayouts": {
|
|
2819
|
+
"type": "boolean",
|
|
2820
|
+
"mutable": false,
|
|
2821
|
+
"complexType": {
|
|
2822
|
+
"original": "boolean",
|
|
2823
|
+
"resolved": "boolean",
|
|
2824
|
+
"references": {}
|
|
2825
|
+
},
|
|
2826
|
+
"required": false,
|
|
2827
|
+
"optional": false,
|
|
2828
|
+
"docs": {
|
|
2829
|
+
"tags": [{
|
|
2830
|
+
"name": "default",
|
|
2831
|
+
"text": "false"
|
|
2832
|
+
}],
|
|
2833
|
+
"text": "Enable custom layout content for options. Options with data-layout attribute will render their HTML content.\n\u26A0\uFE0F Security Warning: Only use with trusted content. Basic XSS protection is applied, but avoid user-generated content."
|
|
2834
|
+
},
|
|
2835
|
+
"getter": false,
|
|
2836
|
+
"setter": false,
|
|
2837
|
+
"reflect": false,
|
|
2838
|
+
"attribute": "custom-option-layouts",
|
|
2839
|
+
"defaultValue": "false"
|
|
2840
|
+
},
|
|
2841
|
+
"customTriggerContent": {
|
|
2842
|
+
"type": "boolean",
|
|
2843
|
+
"mutable": false,
|
|
2844
|
+
"complexType": {
|
|
2845
|
+
"original": "boolean",
|
|
2846
|
+
"resolved": "boolean",
|
|
2847
|
+
"references": {}
|
|
2848
|
+
},
|
|
2849
|
+
"required": false,
|
|
2850
|
+
"optional": false,
|
|
2851
|
+
"docs": {
|
|
2852
|
+
"tags": [{
|
|
2853
|
+
"name": "default",
|
|
2854
|
+
"text": "false"
|
|
2855
|
+
}],
|
|
2856
|
+
"text": "Enable custom layout content for the button trigger via the trigger-content slot.\nWhen true, uses slot content for initial state but updates dynamically with selected option layout.\n\u26A0\uFE0F Security Warning: Only use with trusted content. Basic XSS protection is applied, but avoid user-generated content."
|
|
2857
|
+
},
|
|
2858
|
+
"getter": false,
|
|
2859
|
+
"setter": false,
|
|
2860
|
+
"reflect": false,
|
|
2861
|
+
"attribute": "custom-trigger-content",
|
|
2862
|
+
"defaultValue": "false"
|
|
2863
|
+
},
|
|
2864
|
+
"disabled": {
|
|
2865
|
+
"type": "boolean",
|
|
2866
|
+
"mutable": false,
|
|
2867
|
+
"complexType": {
|
|
2868
|
+
"original": "boolean",
|
|
2869
|
+
"resolved": "boolean",
|
|
2870
|
+
"references": {}
|
|
2871
|
+
},
|
|
2872
|
+
"required": false,
|
|
2873
|
+
"optional": false,
|
|
2874
|
+
"docs": {
|
|
2875
|
+
"tags": [],
|
|
2876
|
+
"text": "If true, the combobox is disabled."
|
|
2877
|
+
},
|
|
2878
|
+
"getter": false,
|
|
2879
|
+
"setter": false,
|
|
2880
|
+
"reflect": false,
|
|
2881
|
+
"attribute": "disabled",
|
|
2882
|
+
"defaultValue": "false"
|
|
2883
|
+
},
|
|
2884
|
+
"errorMessage": {
|
|
2885
|
+
"type": "string",
|
|
2886
|
+
"mutable": false,
|
|
2887
|
+
"complexType": {
|
|
2888
|
+
"original": "string",
|
|
2889
|
+
"resolved": "string",
|
|
2890
|
+
"references": {}
|
|
2891
|
+
},
|
|
2892
|
+
"required": false,
|
|
2893
|
+
"optional": true,
|
|
2894
|
+
"docs": {
|
|
2895
|
+
"tags": [],
|
|
2896
|
+
"text": "Error message to display."
|
|
2897
|
+
},
|
|
2898
|
+
"getter": false,
|
|
2899
|
+
"setter": false,
|
|
2900
|
+
"reflect": false,
|
|
2901
|
+
"attribute": "error-message"
|
|
2902
|
+
},
|
|
2903
|
+
"dropdownPlacement": {
|
|
2904
|
+
"type": "string",
|
|
2905
|
+
"mutable": false,
|
|
2906
|
+
"complexType": {
|
|
2907
|
+
"original": "'bottom-start' | 'bottom-end' | 'top-start' | 'top-end'",
|
|
2908
|
+
"resolved": "\"bottom-end\" | \"bottom-start\" | \"top-end\" | \"top-start\"",
|
|
2909
|
+
"references": {}
|
|
2910
|
+
},
|
|
2911
|
+
"required": false,
|
|
2912
|
+
"optional": false,
|
|
2913
|
+
"docs": {
|
|
2914
|
+
"tags": [{
|
|
2915
|
+
"name": "default",
|
|
2916
|
+
"text": "'bottom-start'"
|
|
2917
|
+
}],
|
|
2918
|
+
"text": "Placement of the dropdown relative to the trigger."
|
|
2919
|
+
},
|
|
2920
|
+
"getter": false,
|
|
2921
|
+
"setter": false,
|
|
2922
|
+
"reflect": false,
|
|
2923
|
+
"attribute": "dropdown-placement",
|
|
2924
|
+
"defaultValue": "'bottom-start'"
|
|
2925
|
+
},
|
|
2926
|
+
"dropdownWidth": {
|
|
2927
|
+
"type": "string",
|
|
2928
|
+
"mutable": false,
|
|
2929
|
+
"complexType": {
|
|
2930
|
+
"original": "string",
|
|
2931
|
+
"resolved": "string",
|
|
2932
|
+
"references": {}
|
|
2933
|
+
},
|
|
2934
|
+
"required": false,
|
|
2935
|
+
"optional": true,
|
|
2936
|
+
"docs": {
|
|
2937
|
+
"tags": [],
|
|
2938
|
+
"text": "Width of the dropdown, including its padding. Any valid CSS width value.\nWithout it, the dropdown is 252px wide, 244px with grouped options and 236px with a panel search."
|
|
2939
|
+
},
|
|
2940
|
+
"getter": false,
|
|
2941
|
+
"setter": false,
|
|
2942
|
+
"reflect": false,
|
|
2943
|
+
"attribute": "dropdown-width"
|
|
2944
|
+
},
|
|
2945
|
+
"dropdownMount": {
|
|
2946
|
+
"type": "string",
|
|
2947
|
+
"mutable": false,
|
|
2948
|
+
"complexType": {
|
|
2949
|
+
"original": "'host' | 'body'",
|
|
2950
|
+
"resolved": "\"body\" | \"host\"",
|
|
2951
|
+
"references": {}
|
|
2952
|
+
},
|
|
2953
|
+
"required": false,
|
|
2954
|
+
"optional": false,
|
|
2955
|
+
"docs": {
|
|
2956
|
+
"tags": [{
|
|
2957
|
+
"name": "default",
|
|
2958
|
+
"text": "'host'"
|
|
2959
|
+
}],
|
|
2960
|
+
"text": "Where to mount the dropdown listbox (`host` or `body`, sometimes called \u201Cappend to body\u201D).\nUse `body` inside scrollable containers (for example modals) so the list is not clipped by\n`overflow: hidden` ancestors. The portal is appended to the nearest `<dialog>` when present\n(including `pds-modal` / `showModal()`), using a composed ascent so shadow DOM and slot\nboundaries do not hide the dialog from discovery; otherwise it is appended to `document.body`.\nKeyboard focus stays on the trigger, or moves to the panel's own search field, so modal focus\ntraps keep working. The mounted dropdown renders in its own shadow root with the combobox's\nstyles, so it needs no global CSS and page CSS can't reach it: customize it with custom\nproperties on `pds-combobox`. Its reading direction, language, theme and custom properties are\ntaken from the combobox when it opens. Custom `empty` and `loading` slots are not supported when\n`body` is used; the default empty and loading content is shown instead."
|
|
2961
|
+
},
|
|
2962
|
+
"getter": false,
|
|
2963
|
+
"setter": false,
|
|
2964
|
+
"reflect": false,
|
|
2965
|
+
"attribute": "dropdown-mount",
|
|
2966
|
+
"defaultValue": "'host'"
|
|
2967
|
+
},
|
|
2968
|
+
"drillInBackLabel": {
|
|
2969
|
+
"type": "string",
|
|
2970
|
+
"mutable": false,
|
|
2971
|
+
"complexType": {
|
|
2972
|
+
"original": "string",
|
|
2973
|
+
"resolved": "string",
|
|
2974
|
+
"references": {}
|
|
2975
|
+
},
|
|
2976
|
+
"required": false,
|
|
2977
|
+
"optional": false,
|
|
2978
|
+
"docs": {
|
|
2979
|
+
"tags": [{
|
|
2980
|
+
"name": "defaultValue",
|
|
2981
|
+
"text": "'Back'"
|
|
2982
|
+
}],
|
|
2983
|
+
"text": "Accessible prefix for the row that returns to the group list when `group-display` is\n`drill-in`, read before the open group's label. Pass a translated string to localize it; defaults to English."
|
|
2984
|
+
},
|
|
2985
|
+
"getter": false,
|
|
2986
|
+
"setter": false,
|
|
2987
|
+
"reflect": false,
|
|
2988
|
+
"attribute": "drill-in-back-label",
|
|
2989
|
+
"defaultValue": "'Back'"
|
|
2990
|
+
},
|
|
2991
|
+
"noOptionsFoundLabel": {
|
|
2992
|
+
"type": "string",
|
|
2993
|
+
"mutable": false,
|
|
2994
|
+
"complexType": {
|
|
2995
|
+
"original": "string",
|
|
2996
|
+
"resolved": "string",
|
|
2997
|
+
"references": {}
|
|
2998
|
+
},
|
|
2999
|
+
"required": false,
|
|
3000
|
+
"optional": false,
|
|
3001
|
+
"docs": {
|
|
3002
|
+
"tags": [{
|
|
3003
|
+
"name": "defaultValue",
|
|
3004
|
+
"text": "'No options found'"
|
|
3005
|
+
}],
|
|
3006
|
+
"text": "Text shown when no options match the search. Pass a translated string to localize it; defaults to English."
|
|
3007
|
+
},
|
|
3008
|
+
"getter": false,
|
|
3009
|
+
"setter": false,
|
|
3010
|
+
"reflect": false,
|
|
3011
|
+
"attribute": "no-options-found-label",
|
|
3012
|
+
"defaultValue": "'No options found'"
|
|
3013
|
+
},
|
|
3014
|
+
"flyoutMaxWidth": {
|
|
3015
|
+
"type": "string",
|
|
3016
|
+
"mutable": false,
|
|
3017
|
+
"complexType": {
|
|
3018
|
+
"original": "string",
|
|
3019
|
+
"resolved": "string",
|
|
3020
|
+
"references": {}
|
|
3021
|
+
},
|
|
3022
|
+
"required": false,
|
|
3023
|
+
"optional": false,
|
|
3024
|
+
"docs": {
|
|
3025
|
+
"tags": [{
|
|
3026
|
+
"name": "default",
|
|
3027
|
+
"text": "'388px'"
|
|
3028
|
+
}],
|
|
3029
|
+
"text": "Maximum width of a group's flyout when `group-display` is `flyout`. Any valid CSS width\nvalue, including its padding."
|
|
3030
|
+
},
|
|
3031
|
+
"getter": false,
|
|
3032
|
+
"setter": false,
|
|
3033
|
+
"reflect": false,
|
|
3034
|
+
"attribute": "flyout-max-width",
|
|
3035
|
+
"defaultValue": "'388px'"
|
|
3036
|
+
},
|
|
3037
|
+
"flyoutMinWidth": {
|
|
3038
|
+
"type": "string",
|
|
3039
|
+
"mutable": false,
|
|
3040
|
+
"complexType": {
|
|
3041
|
+
"original": "string",
|
|
3042
|
+
"resolved": "string",
|
|
3043
|
+
"references": {}
|
|
3044
|
+
},
|
|
3045
|
+
"required": false,
|
|
3046
|
+
"optional": false,
|
|
3047
|
+
"docs": {
|
|
3048
|
+
"tags": [{
|
|
3049
|
+
"name": "default",
|
|
3050
|
+
"text": "'288px'"
|
|
3051
|
+
}],
|
|
3052
|
+
"text": "Minimum width of a group's flyout when `group-display` is `flyout`. Any valid CSS width\nvalue, including its padding. The flyout is as wide as its options, between this and\n`flyout-max-width`."
|
|
3053
|
+
},
|
|
3054
|
+
"getter": false,
|
|
3055
|
+
"setter": false,
|
|
3056
|
+
"reflect": false,
|
|
3057
|
+
"attribute": "flyout-min-width",
|
|
3058
|
+
"defaultValue": "'288px'"
|
|
3059
|
+
},
|
|
3060
|
+
"groupDisplay": {
|
|
3061
|
+
"type": "string",
|
|
3062
|
+
"mutable": false,
|
|
3063
|
+
"complexType": {
|
|
3064
|
+
"original": "'inline' | 'flyout' | 'drill-in'",
|
|
3065
|
+
"resolved": "\"drill-in\" | \"flyout\" | \"inline\"",
|
|
3066
|
+
"references": {}
|
|
3067
|
+
},
|
|
3068
|
+
"required": false,
|
|
3069
|
+
"optional": false,
|
|
3070
|
+
"docs": {
|
|
3071
|
+
"tags": [{
|
|
3072
|
+
"name": "default",
|
|
3073
|
+
"text": "'inline'"
|
|
3074
|
+
}],
|
|
3075
|
+
"text": "How option groups (`<optgroup>`, or the `group` field of `options`) are shown in the dropdown.\n`inline` lists each group's label above its options. `flyout` lists the groups, and opens a\ngroup's options in a panel beside it on hover or click; while searching, the matching options\nare listed under their group labels, and search also matches group labels. `flyout` groups\nby `<optgroup>` (or `group`) only: options under a `<pds-text>` heading are listed ungrouped.\n`drill-in` lists the groups too, but a click replaces the list with that group's options and a\nrow back to the groups; use it where nothing can open beside the dropdown, such as a side\npanel. `flyout` falls back to `drill-in` when there is no room for a flyout on either side."
|
|
3076
|
+
},
|
|
3077
|
+
"getter": false,
|
|
3078
|
+
"setter": false,
|
|
3079
|
+
"reflect": false,
|
|
3080
|
+
"attribute": "group-display",
|
|
3081
|
+
"defaultValue": "'inline'"
|
|
3082
|
+
},
|
|
3083
|
+
"helperMessage": {
|
|
3084
|
+
"type": "string",
|
|
3085
|
+
"mutable": false,
|
|
3086
|
+
"complexType": {
|
|
3087
|
+
"original": "string",
|
|
3088
|
+
"resolved": "string",
|
|
3089
|
+
"references": {}
|
|
3090
|
+
},
|
|
3091
|
+
"required": false,
|
|
3092
|
+
"optional": true,
|
|
3093
|
+
"docs": {
|
|
3094
|
+
"tags": [],
|
|
3095
|
+
"text": "Helper message to display below the combobox."
|
|
3096
|
+
},
|
|
3097
|
+
"getter": false,
|
|
3098
|
+
"setter": false,
|
|
3099
|
+
"reflect": false,
|
|
3100
|
+
"attribute": "helper-message"
|
|
3101
|
+
},
|
|
3102
|
+
"hideLabel": {
|
|
3103
|
+
"type": "boolean",
|
|
3104
|
+
"mutable": false,
|
|
3105
|
+
"complexType": {
|
|
3106
|
+
"original": "boolean",
|
|
3107
|
+
"resolved": "boolean",
|
|
3108
|
+
"references": {}
|
|
3109
|
+
},
|
|
3110
|
+
"required": false,
|
|
3111
|
+
"optional": false,
|
|
3112
|
+
"docs": {
|
|
3113
|
+
"tags": [],
|
|
3114
|
+
"text": "Visually hides the label text for instances where only the combobox should be displayed.\nThe visible `<label>` is omitted (same pattern as `pds-select`) so label spacing does not reserve layout;\nthe trigger uses `aria-label` so the name stays available to assistive technology."
|
|
3115
|
+
},
|
|
3116
|
+
"getter": false,
|
|
3117
|
+
"setter": false,
|
|
3118
|
+
"reflect": false,
|
|
3119
|
+
"attribute": "hide-label",
|
|
3120
|
+
"defaultValue": "false"
|
|
3121
|
+
},
|
|
3122
|
+
"invalid": {
|
|
3123
|
+
"type": "boolean",
|
|
3124
|
+
"mutable": false,
|
|
3125
|
+
"complexType": {
|
|
3126
|
+
"original": "boolean",
|
|
3127
|
+
"resolved": "boolean",
|
|
3128
|
+
"references": {}
|
|
3129
|
+
},
|
|
3130
|
+
"required": false,
|
|
3131
|
+
"optional": true,
|
|
3132
|
+
"docs": {
|
|
3133
|
+
"tags": [],
|
|
3134
|
+
"text": "If true, the combobox is in an invalid state."
|
|
3135
|
+
},
|
|
3136
|
+
"getter": false,
|
|
3137
|
+
"setter": false,
|
|
3138
|
+
"reflect": false,
|
|
3139
|
+
"attribute": "invalid"
|
|
3140
|
+
},
|
|
3141
|
+
"label": {
|
|
3142
|
+
"type": "string",
|
|
3143
|
+
"mutable": false,
|
|
3144
|
+
"complexType": {
|
|
3145
|
+
"original": "string",
|
|
3146
|
+
"resolved": "string",
|
|
3147
|
+
"references": {}
|
|
3148
|
+
},
|
|
3149
|
+
"required": false,
|
|
3150
|
+
"optional": true,
|
|
3151
|
+
"docs": {
|
|
3152
|
+
"tags": [],
|
|
3153
|
+
"text": "Text to be displayed as the combobox label."
|
|
3154
|
+
},
|
|
3155
|
+
"getter": false,
|
|
3156
|
+
"setter": false,
|
|
3157
|
+
"reflect": false,
|
|
3158
|
+
"attribute": "label"
|
|
3159
|
+
},
|
|
3160
|
+
"maxHeight": {
|
|
3161
|
+
"type": "string",
|
|
3162
|
+
"mutable": false,
|
|
3163
|
+
"complexType": {
|
|
3164
|
+
"original": "string",
|
|
3165
|
+
"resolved": "string",
|
|
3166
|
+
"references": {}
|
|
3167
|
+
},
|
|
3168
|
+
"required": false,
|
|
3169
|
+
"optional": true,
|
|
3170
|
+
"docs": {
|
|
3171
|
+
"tags": [],
|
|
3172
|
+
"text": "Maximum height of the dropdown. Can be any valid CSS height value (e.g., '200px', '10rem').\nWhen content exceeds this height, the dropdown will scroll."
|
|
3173
|
+
},
|
|
3174
|
+
"getter": false,
|
|
3175
|
+
"setter": false,
|
|
3176
|
+
"reflect": false,
|
|
3177
|
+
"attribute": "max-height"
|
|
3178
|
+
},
|
|
3179
|
+
"mode": {
|
|
3180
|
+
"type": "string",
|
|
3181
|
+
"mutable": false,
|
|
3182
|
+
"complexType": {
|
|
3183
|
+
"original": "'filter' | 'select-only'",
|
|
3184
|
+
"resolved": "\"filter\" | \"select-only\"",
|
|
3185
|
+
"references": {}
|
|
3186
|
+
},
|
|
3187
|
+
"required": false,
|
|
3188
|
+
"optional": false,
|
|
3189
|
+
"docs": {
|
|
3190
|
+
"tags": [{
|
|
3191
|
+
"name": "default",
|
|
3192
|
+
"text": "'filter'"
|
|
3193
|
+
}],
|
|
3194
|
+
"text": "Determines the combobox mode: 'filter' (filter options as you type) or 'select-only' (show all options).\nIn filter mode, reopening the menu while the input still shows the label of the selected option temporarily lists\nall options until you type (so you can switch to a different choice without clearing the field first)."
|
|
3195
|
+
},
|
|
3196
|
+
"getter": false,
|
|
3197
|
+
"setter": false,
|
|
3198
|
+
"reflect": false,
|
|
3199
|
+
"attribute": "mode",
|
|
3200
|
+
"defaultValue": "'filter'"
|
|
3201
|
+
},
|
|
3202
|
+
"panelSearch": {
|
|
3203
|
+
"type": "boolean",
|
|
3204
|
+
"mutable": false,
|
|
3205
|
+
"complexType": {
|
|
3206
|
+
"original": "boolean",
|
|
3207
|
+
"resolved": "boolean",
|
|
3208
|
+
"references": {}
|
|
3209
|
+
},
|
|
3210
|
+
"required": false,
|
|
3211
|
+
"optional": false,
|
|
3212
|
+
"docs": {
|
|
3213
|
+
"tags": [{
|
|
3214
|
+
"name": "default",
|
|
3215
|
+
"text": "false"
|
|
3216
|
+
}],
|
|
3217
|
+
"text": "Shows a search field at the top of the dropdown for the `button` and `chip` triggers, which\ncan't be typed into. Search filters the options the same way typing in the `input` trigger\ndoes; in a grouped display it also matches group labels."
|
|
3218
|
+
},
|
|
3219
|
+
"getter": false,
|
|
3220
|
+
"setter": false,
|
|
3221
|
+
"reflect": false,
|
|
3222
|
+
"attribute": "panel-search",
|
|
3223
|
+
"defaultValue": "false"
|
|
3224
|
+
},
|
|
3225
|
+
"placeholder": {
|
|
3226
|
+
"type": "string",
|
|
3227
|
+
"mutable": false,
|
|
3228
|
+
"complexType": {
|
|
3229
|
+
"original": "string",
|
|
3230
|
+
"resolved": "string",
|
|
3231
|
+
"references": {}
|
|
3232
|
+
},
|
|
3233
|
+
"required": false,
|
|
3234
|
+
"optional": true,
|
|
3235
|
+
"docs": {
|
|
3236
|
+
"tags": [],
|
|
3237
|
+
"text": "Placeholder text for the input field."
|
|
3238
|
+
},
|
|
3239
|
+
"getter": false,
|
|
3240
|
+
"setter": false,
|
|
3241
|
+
"reflect": false,
|
|
3242
|
+
"attribute": "placeholder"
|
|
3243
|
+
},
|
|
3244
|
+
"searchOptionsLabel": {
|
|
3245
|
+
"type": "string",
|
|
3246
|
+
"mutable": false,
|
|
3247
|
+
"complexType": {
|
|
3248
|
+
"original": "string",
|
|
3249
|
+
"resolved": "string",
|
|
3250
|
+
"references": {}
|
|
3251
|
+
},
|
|
3252
|
+
"required": false,
|
|
3253
|
+
"optional": false,
|
|
3254
|
+
"docs": {
|
|
3255
|
+
"tags": [{
|
|
3256
|
+
"name": "defaultValue",
|
|
3257
|
+
"text": "'Search options'"
|
|
3258
|
+
}],
|
|
3259
|
+
"text": "Accessible label for the search input inside the dropdown panel (`panel-search`). Pass a translated string to localize it; defaults to English."
|
|
3260
|
+
},
|
|
3261
|
+
"getter": false,
|
|
3262
|
+
"setter": false,
|
|
3263
|
+
"reflect": false,
|
|
3264
|
+
"attribute": "search-options-label",
|
|
3265
|
+
"defaultValue": "'Search options'"
|
|
3266
|
+
},
|
|
3267
|
+
"searchPlaceholder": {
|
|
3268
|
+
"type": "string",
|
|
3269
|
+
"mutable": false,
|
|
3270
|
+
"complexType": {
|
|
3271
|
+
"original": "string",
|
|
3272
|
+
"resolved": "string",
|
|
3273
|
+
"references": {}
|
|
3274
|
+
},
|
|
3275
|
+
"required": false,
|
|
3276
|
+
"optional": false,
|
|
3277
|
+
"docs": {
|
|
3278
|
+
"tags": [{
|
|
3279
|
+
"name": "defaultValue",
|
|
3280
|
+
"text": "'Find...'"
|
|
3281
|
+
}],
|
|
3282
|
+
"text": "Placeholder text for the search input inside the dropdown panel (`panel-search`). Pass a translated string to localize it; defaults to English."
|
|
3283
|
+
},
|
|
3284
|
+
"getter": false,
|
|
3285
|
+
"setter": false,
|
|
3286
|
+
"reflect": false,
|
|
3287
|
+
"attribute": "search-placeholder",
|
|
3288
|
+
"defaultValue": "'Find...'"
|
|
3289
|
+
},
|
|
3290
|
+
"trigger": {
|
|
3291
|
+
"type": "string",
|
|
3292
|
+
"mutable": false,
|
|
3293
|
+
"complexType": {
|
|
3294
|
+
"original": "'input' | 'button' | 'chip'",
|
|
3295
|
+
"resolved": "\"button\" | \"chip\" | \"input\"",
|
|
3296
|
+
"references": {}
|
|
3297
|
+
},
|
|
3298
|
+
"required": false,
|
|
3299
|
+
"optional": false,
|
|
3300
|
+
"docs": {
|
|
3301
|
+
"tags": [{
|
|
3302
|
+
"name": "default",
|
|
3303
|
+
"text": "'input'"
|
|
3304
|
+
}],
|
|
3305
|
+
"text": "Determines the combobox trigger: 'input' (editable input), 'button' (button-like, non-editable), or 'chip' (chip-like, non-editable)."
|
|
3306
|
+
},
|
|
3307
|
+
"getter": false,
|
|
3308
|
+
"setter": false,
|
|
3309
|
+
"reflect": false,
|
|
3310
|
+
"attribute": "trigger",
|
|
3311
|
+
"defaultValue": "'input'"
|
|
3312
|
+
},
|
|
3313
|
+
"triggerWidth": {
|
|
3314
|
+
"type": "string",
|
|
3315
|
+
"mutable": false,
|
|
3316
|
+
"complexType": {
|
|
3317
|
+
"original": "string",
|
|
3318
|
+
"resolved": "string",
|
|
3319
|
+
"references": {}
|
|
3320
|
+
},
|
|
3321
|
+
"required": false,
|
|
3322
|
+
"optional": false,
|
|
3323
|
+
"docs": {
|
|
3324
|
+
"tags": [{
|
|
3325
|
+
"name": "default",
|
|
3326
|
+
"text": "'fit-content'"
|
|
3327
|
+
}],
|
|
3328
|
+
"text": "Width of the trigger (button or input). Any valid CSS width value."
|
|
3329
|
+
},
|
|
3330
|
+
"getter": false,
|
|
3331
|
+
"setter": false,
|
|
3332
|
+
"reflect": false,
|
|
3333
|
+
"attribute": "trigger-width",
|
|
3334
|
+
"defaultValue": "'fit-content'"
|
|
3335
|
+
},
|
|
3336
|
+
"triggerVariant": {
|
|
3337
|
+
"type": "string",
|
|
3338
|
+
"mutable": false,
|
|
3339
|
+
"complexType": {
|
|
3340
|
+
"original": "'secondary' | 'primary' | 'accent' | 'destructive'",
|
|
3341
|
+
"resolved": "\"accent\" | \"destructive\" | \"primary\" | \"secondary\"",
|
|
3342
|
+
"references": {}
|
|
3343
|
+
},
|
|
3344
|
+
"required": false,
|
|
3345
|
+
"optional": false,
|
|
3346
|
+
"docs": {
|
|
3347
|
+
"tags": [{
|
|
3348
|
+
"name": "default",
|
|
3349
|
+
"text": "'secondary'"
|
|
3350
|
+
}],
|
|
3351
|
+
"text": "The visual variant for the button trigger. Matches Pine button variants."
|
|
3352
|
+
},
|
|
3353
|
+
"getter": false,
|
|
3354
|
+
"setter": false,
|
|
3355
|
+
"reflect": false,
|
|
3356
|
+
"attribute": "trigger-variant",
|
|
3357
|
+
"defaultValue": "'secondary'"
|
|
3358
|
+
},
|
|
3359
|
+
"triggerShape": {
|
|
3360
|
+
"type": "string",
|
|
3361
|
+
"mutable": false,
|
|
3362
|
+
"complexType": {
|
|
3363
|
+
"original": "'pill' | 'input'",
|
|
3364
|
+
"resolved": "\"input\" | \"pill\"",
|
|
3365
|
+
"references": {}
|
|
3366
|
+
},
|
|
3367
|
+
"required": false,
|
|
3368
|
+
"optional": false,
|
|
3369
|
+
"docs": {
|
|
3370
|
+
"tags": [{
|
|
3371
|
+
"name": "default",
|
|
3372
|
+
"text": "'pill'"
|
|
3373
|
+
}],
|
|
3374
|
+
"text": "The shape of the button trigger. Use 'input' to render the trigger with input-like styling\n(subtle border radius, input height) for use in form or filter rows alongside PdsSelect and PdsMultiselect."
|
|
3375
|
+
},
|
|
3376
|
+
"getter": false,
|
|
3377
|
+
"setter": false,
|
|
3378
|
+
"reflect": false,
|
|
3379
|
+
"attribute": "trigger-shape",
|
|
3380
|
+
"defaultValue": "'pill'"
|
|
3381
|
+
},
|
|
3382
|
+
"truncate": {
|
|
3383
|
+
"type": "boolean",
|
|
3384
|
+
"mutable": false,
|
|
3385
|
+
"complexType": {
|
|
3386
|
+
"original": "boolean",
|
|
3387
|
+
"resolved": "boolean",
|
|
3388
|
+
"references": {}
|
|
3389
|
+
},
|
|
3390
|
+
"required": false,
|
|
3391
|
+
"optional": false,
|
|
3392
|
+
"docs": {
|
|
3393
|
+
"tags": [{
|
|
3394
|
+
"name": "defaultValue",
|
|
3395
|
+
"text": "false"
|
|
3396
|
+
}],
|
|
3397
|
+
"text": "Determines whether the button trigger's label and the option labels should truncate and display with an ellipsis.\nWhen a label overflows, a `title` showing the full label will appear on hover.\nChip options, custom layouts and group rows aren't affected."
|
|
3398
|
+
},
|
|
3399
|
+
"getter": false,
|
|
3400
|
+
"setter": false,
|
|
3401
|
+
"reflect": true,
|
|
3402
|
+
"attribute": "truncate",
|
|
3403
|
+
"defaultValue": "false"
|
|
3404
|
+
},
|
|
3405
|
+
"chipSentiment": {
|
|
3406
|
+
"type": "string",
|
|
3407
|
+
"mutable": false,
|
|
3408
|
+
"complexType": {
|
|
3409
|
+
"original": "ChipSentimentType",
|
|
3410
|
+
"resolved": "\"accent\" | \"brand\" | \"danger\" | \"info\" | \"neutral\" | \"solid\" | \"subtle\" | \"success\" | \"warning\"",
|
|
3411
|
+
"references": {
|
|
3412
|
+
"ChipSentimentType": {
|
|
3413
|
+
"location": "import",
|
|
3414
|
+
"path": "@utils/types",
|
|
3415
|
+
"id": "src/utils/types.ts::ChipSentimentType",
|
|
3416
|
+
"referenceLocation": "ChipSentimentType"
|
|
3417
|
+
}
|
|
3418
|
+
}
|
|
3419
|
+
},
|
|
3420
|
+
"required": false,
|
|
3421
|
+
"optional": false,
|
|
3422
|
+
"docs": {
|
|
3423
|
+
"tags": [{
|
|
3424
|
+
"name": "default",
|
|
3425
|
+
"text": "'neutral'"
|
|
3426
|
+
}],
|
|
3427
|
+
"text": "The sentiment for the chip trigger. Matches Pine chip sentiments."
|
|
3428
|
+
},
|
|
3429
|
+
"getter": false,
|
|
3430
|
+
"setter": false,
|
|
3431
|
+
"reflect": false,
|
|
3432
|
+
"attribute": "chip-sentiment",
|
|
3433
|
+
"defaultValue": "'neutral'"
|
|
3434
|
+
},
|
|
3435
|
+
"chipLarge": {
|
|
3436
|
+
"type": "boolean",
|
|
3437
|
+
"mutable": false,
|
|
3438
|
+
"complexType": {
|
|
3439
|
+
"original": "boolean",
|
|
3440
|
+
"resolved": "boolean",
|
|
3441
|
+
"references": {}
|
|
3442
|
+
},
|
|
3443
|
+
"required": false,
|
|
3444
|
+
"optional": false,
|
|
3445
|
+
"docs": {
|
|
3446
|
+
"tags": [{
|
|
3447
|
+
"name": "default",
|
|
3448
|
+
"text": "false"
|
|
3449
|
+
}],
|
|
3450
|
+
"text": "Whether the chip trigger should be displayed in a larger size."
|
|
3451
|
+
},
|
|
3452
|
+
"getter": false,
|
|
3453
|
+
"setter": false,
|
|
3454
|
+
"reflect": false,
|
|
3455
|
+
"attribute": "chip-large",
|
|
3456
|
+
"defaultValue": "false"
|
|
3457
|
+
},
|
|
3458
|
+
"chipIcon": {
|
|
3459
|
+
"type": "string",
|
|
3460
|
+
"mutable": false,
|
|
3461
|
+
"complexType": {
|
|
3462
|
+
"original": "string",
|
|
3463
|
+
"resolved": "string",
|
|
3464
|
+
"references": {}
|
|
3465
|
+
},
|
|
3466
|
+
"required": false,
|
|
3467
|
+
"optional": true,
|
|
3468
|
+
"docs": {
|
|
3469
|
+
"tags": [],
|
|
3470
|
+
"text": "The name of the icon to display in the chip trigger."
|
|
3471
|
+
},
|
|
3472
|
+
"getter": false,
|
|
3473
|
+
"setter": false,
|
|
3474
|
+
"reflect": false,
|
|
3475
|
+
"attribute": "chip-icon"
|
|
3476
|
+
},
|
|
3477
|
+
"chipDot": {
|
|
3478
|
+
"type": "boolean",
|
|
3479
|
+
"mutable": false,
|
|
3480
|
+
"complexType": {
|
|
3481
|
+
"original": "boolean",
|
|
3482
|
+
"resolved": "boolean",
|
|
3483
|
+
"references": {}
|
|
3484
|
+
},
|
|
3485
|
+
"required": false,
|
|
3486
|
+
"optional": false,
|
|
3487
|
+
"docs": {
|
|
3488
|
+
"tags": [{
|
|
3489
|
+
"name": "default",
|
|
3490
|
+
"text": "false"
|
|
3491
|
+
}],
|
|
3492
|
+
"text": "Whether a dot should be displayed on the chip trigger."
|
|
3493
|
+
},
|
|
3494
|
+
"getter": false,
|
|
3495
|
+
"setter": false,
|
|
3496
|
+
"reflect": false,
|
|
3497
|
+
"attribute": "chip-dot",
|
|
3498
|
+
"defaultValue": "false"
|
|
3499
|
+
},
|
|
3500
|
+
"value": {
|
|
3501
|
+
"type": "string",
|
|
3502
|
+
"mutable": true,
|
|
3503
|
+
"complexType": {
|
|
3504
|
+
"original": "string",
|
|
3505
|
+
"resolved": "string",
|
|
3506
|
+
"references": {}
|
|
3507
|
+
},
|
|
3508
|
+
"required": false,
|
|
3509
|
+
"optional": false,
|
|
3510
|
+
"docs": {
|
|
3511
|
+
"tags": [],
|
|
3512
|
+
"text": "The `value` of the selected option."
|
|
3513
|
+
},
|
|
3514
|
+
"getter": false,
|
|
3515
|
+
"setter": false,
|
|
3516
|
+
"reflect": false,
|
|
3517
|
+
"attribute": "value",
|
|
3518
|
+
"defaultValue": "''"
|
|
3519
|
+
},
|
|
3520
|
+
"asyncUrl": {
|
|
3521
|
+
"type": "string",
|
|
3522
|
+
"mutable": false,
|
|
3523
|
+
"complexType": {
|
|
3524
|
+
"original": "string",
|
|
3525
|
+
"resolved": "string",
|
|
3526
|
+
"references": {}
|
|
3527
|
+
},
|
|
3528
|
+
"required": false,
|
|
3529
|
+
"optional": true,
|
|
3530
|
+
"docs": {
|
|
3531
|
+
"tags": [],
|
|
3532
|
+
"text": "URL endpoint for async data fetching."
|
|
3533
|
+
},
|
|
3534
|
+
"getter": false,
|
|
3535
|
+
"setter": false,
|
|
3536
|
+
"reflect": false,
|
|
3537
|
+
"attribute": "async-url"
|
|
3538
|
+
},
|
|
3539
|
+
"asyncMethod": {
|
|
3540
|
+
"type": "string",
|
|
3541
|
+
"mutable": false,
|
|
3542
|
+
"complexType": {
|
|
3543
|
+
"original": "'GET' | 'POST'",
|
|
3544
|
+
"resolved": "\"GET\" | \"POST\"",
|
|
3545
|
+
"references": {}
|
|
3546
|
+
},
|
|
3547
|
+
"required": false,
|
|
3548
|
+
"optional": false,
|
|
3549
|
+
"docs": {
|
|
3550
|
+
"tags": [],
|
|
3551
|
+
"text": "HTTP method for async requests."
|
|
3552
|
+
},
|
|
3553
|
+
"getter": false,
|
|
3554
|
+
"setter": false,
|
|
3555
|
+
"reflect": false,
|
|
3556
|
+
"attribute": "async-method",
|
|
3557
|
+
"defaultValue": "'GET'"
|
|
3558
|
+
},
|
|
3559
|
+
"debounce": {
|
|
3560
|
+
"type": "number",
|
|
3561
|
+
"mutable": false,
|
|
3562
|
+
"complexType": {
|
|
3563
|
+
"original": "number",
|
|
3564
|
+
"resolved": "number",
|
|
3565
|
+
"references": {}
|
|
3566
|
+
},
|
|
3567
|
+
"required": false,
|
|
3568
|
+
"optional": false,
|
|
3569
|
+
"docs": {
|
|
3570
|
+
"tags": [],
|
|
3571
|
+
"text": "Debounce delay in milliseconds for search/fetch."
|
|
3572
|
+
},
|
|
3573
|
+
"getter": false,
|
|
3574
|
+
"setter": false,
|
|
3575
|
+
"reflect": false,
|
|
3576
|
+
"attribute": "debounce",
|
|
3577
|
+
"defaultValue": "300"
|
|
3578
|
+
},
|
|
3579
|
+
"fetchTimeout": {
|
|
3580
|
+
"type": "number",
|
|
3581
|
+
"mutable": false,
|
|
3582
|
+
"complexType": {
|
|
3583
|
+
"original": "number",
|
|
3584
|
+
"resolved": "number",
|
|
3585
|
+
"references": {}
|
|
3586
|
+
},
|
|
3587
|
+
"required": false,
|
|
3588
|
+
"optional": false,
|
|
3589
|
+
"docs": {
|
|
3590
|
+
"tags": [],
|
|
3591
|
+
"text": "Timeout in milliseconds for async fetch requests."
|
|
3592
|
+
},
|
|
3593
|
+
"getter": false,
|
|
3594
|
+
"setter": false,
|
|
3595
|
+
"reflect": false,
|
|
3596
|
+
"attribute": "fetch-timeout",
|
|
3597
|
+
"defaultValue": "30000"
|
|
3598
|
+
},
|
|
3599
|
+
"loading": {
|
|
3600
|
+
"type": "boolean",
|
|
3601
|
+
"mutable": true,
|
|
3602
|
+
"complexType": {
|
|
3603
|
+
"original": "boolean",
|
|
3604
|
+
"resolved": "boolean",
|
|
3605
|
+
"references": {}
|
|
3606
|
+
},
|
|
3607
|
+
"required": false,
|
|
3608
|
+
"optional": false,
|
|
3609
|
+
"docs": {
|
|
3610
|
+
"tags": [],
|
|
3611
|
+
"text": "Whether the component is currently loading async options."
|
|
3612
|
+
},
|
|
3613
|
+
"getter": false,
|
|
3614
|
+
"setter": false,
|
|
3615
|
+
"reflect": false,
|
|
3616
|
+
"attribute": "loading",
|
|
3617
|
+
"defaultValue": "false"
|
|
3618
|
+
},
|
|
3619
|
+
"options": {
|
|
3620
|
+
"type": "unknown",
|
|
3621
|
+
"mutable": false,
|
|
3622
|
+
"complexType": {
|
|
3623
|
+
"original": "ComboboxOption[]",
|
|
3624
|
+
"resolved": "ComboboxOption[]",
|
|
3625
|
+
"references": {
|
|
3626
|
+
"ComboboxOption": {
|
|
3627
|
+
"location": "import",
|
|
3628
|
+
"path": "./combobox-interface",
|
|
3629
|
+
"id": "src/components/pds-combobox/combobox-interface.ts::ComboboxOption",
|
|
3630
|
+
"referenceLocation": "ComboboxOption"
|
|
3631
|
+
}
|
|
3632
|
+
}
|
|
3633
|
+
},
|
|
3634
|
+
"required": false,
|
|
3635
|
+
"optional": true,
|
|
3636
|
+
"docs": {
|
|
3637
|
+
"tags": [],
|
|
3638
|
+
"text": "Options provided externally (for consumer-managed async)."
|
|
3639
|
+
},
|
|
3640
|
+
"getter": false,
|
|
3641
|
+
"setter": false
|
|
3642
|
+
},
|
|
3643
|
+
"formatResult": {
|
|
3644
|
+
"type": "unknown",
|
|
3645
|
+
"mutable": false,
|
|
3646
|
+
"complexType": {
|
|
3647
|
+
"original": "(item: unknown) => ComboboxOption",
|
|
3648
|
+
"resolved": "(item: unknown) => ComboboxOption",
|
|
3649
|
+
"references": {
|
|
3650
|
+
"ComboboxOption": {
|
|
3651
|
+
"location": "import",
|
|
3652
|
+
"path": "./combobox-interface",
|
|
3653
|
+
"id": "src/components/pds-combobox/combobox-interface.ts::ComboboxOption",
|
|
3654
|
+
"referenceLocation": "ComboboxOption"
|
|
3655
|
+
}
|
|
3656
|
+
}
|
|
3657
|
+
},
|
|
3658
|
+
"required": false,
|
|
3659
|
+
"optional": true,
|
|
3660
|
+
"docs": {
|
|
3661
|
+
"tags": [],
|
|
3662
|
+
"text": "Function to format async results. Receives raw API response item."
|
|
3663
|
+
},
|
|
3664
|
+
"getter": false,
|
|
3665
|
+
"setter": false
|
|
3666
|
+
}
|
|
3667
|
+
};
|
|
3668
|
+
}
|
|
3669
|
+
static get states() {
|
|
3670
|
+
return {
|
|
3671
|
+
"displayText": {},
|
|
3672
|
+
"filteredItems": {},
|
|
3673
|
+
"highlightedIndex": {},
|
|
3674
|
+
"isOpen": {},
|
|
3675
|
+
"openGroup": {},
|
|
3676
|
+
"drillDirection": {},
|
|
3677
|
+
"highlightedGroup": {},
|
|
3678
|
+
"keyboardNavigating": {},
|
|
3679
|
+
"revealedGroupLabel": {},
|
|
3680
|
+
"pointerCanHover": {},
|
|
3681
|
+
"panelQuery": {},
|
|
3682
|
+
"flyoutFallback": {},
|
|
3683
|
+
"selectedOption": {},
|
|
3684
|
+
"selectedOptionLayoutContent": {},
|
|
3685
|
+
"selectedOptionChipProps": {},
|
|
3686
|
+
"internalOptions": {},
|
|
3687
|
+
"currentPage": {},
|
|
3688
|
+
"hasMore": {}
|
|
3689
|
+
};
|
|
3690
|
+
}
|
|
3691
|
+
static get events() {
|
|
3692
|
+
return [{
|
|
3693
|
+
"method": "pdsComboboxChange",
|
|
3694
|
+
"name": "pdsComboboxChange",
|
|
3695
|
+
"bubbles": true,
|
|
3696
|
+
"cancelable": true,
|
|
3697
|
+
"composed": true,
|
|
3698
|
+
"docs": {
|
|
3699
|
+
"tags": [],
|
|
3700
|
+
"text": "Emitted when the value changes."
|
|
3701
|
+
},
|
|
3702
|
+
"complexType": {
|
|
3703
|
+
"original": "{ value: string }",
|
|
3704
|
+
"resolved": "{ value: string; }",
|
|
3705
|
+
"references": {}
|
|
3706
|
+
}
|
|
3707
|
+
}, {
|
|
3708
|
+
"method": "pdsComboboxSearch",
|
|
3709
|
+
"name": "pdsComboboxSearch",
|
|
3710
|
+
"bubbles": true,
|
|
3711
|
+
"cancelable": true,
|
|
3712
|
+
"composed": true,
|
|
3713
|
+
"docs": {
|
|
3714
|
+
"tags": [],
|
|
3715
|
+
"text": "Emitted on search input (for consumer-managed async)."
|
|
3716
|
+
},
|
|
3717
|
+
"complexType": {
|
|
3718
|
+
"original": "ComboboxSearchEventDetail",
|
|
3719
|
+
"resolved": "ComboboxSearchEventDetail",
|
|
3720
|
+
"references": {
|
|
3721
|
+
"ComboboxSearchEventDetail": {
|
|
3722
|
+
"location": "import",
|
|
3723
|
+
"path": "./combobox-interface",
|
|
3724
|
+
"id": "src/components/pds-combobox/combobox-interface.ts::ComboboxSearchEventDetail",
|
|
3725
|
+
"referenceLocation": "ComboboxSearchEventDetail"
|
|
3726
|
+
}
|
|
3727
|
+
}
|
|
3728
|
+
}
|
|
3729
|
+
}, {
|
|
3730
|
+
"method": "pdsComboboxLoadOptions",
|
|
3731
|
+
"name": "pdsComboboxLoadOptions",
|
|
3732
|
+
"bubbles": true,
|
|
3733
|
+
"cancelable": true,
|
|
3734
|
+
"composed": true,
|
|
3735
|
+
"docs": {
|
|
3736
|
+
"tags": [],
|
|
3737
|
+
"text": "Emitted to request more options (pagination)."
|
|
3738
|
+
},
|
|
3739
|
+
"complexType": {
|
|
3740
|
+
"original": "ComboboxLoadOptionsEventDetail",
|
|
3741
|
+
"resolved": "ComboboxLoadOptionsEventDetail",
|
|
3742
|
+
"references": {
|
|
3743
|
+
"ComboboxLoadOptionsEventDetail": {
|
|
3744
|
+
"location": "import",
|
|
3745
|
+
"path": "./combobox-interface",
|
|
3746
|
+
"id": "src/components/pds-combobox/combobox-interface.ts::ComboboxLoadOptionsEventDetail",
|
|
3747
|
+
"referenceLocation": "ComboboxLoadOptionsEventDetail"
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
}
|
|
3751
|
+
}];
|
|
3752
|
+
}
|
|
3753
|
+
static get methods() {
|
|
3754
|
+
return {
|
|
3755
|
+
"setFocus": {
|
|
3756
|
+
"complexType": {
|
|
3757
|
+
"signature": "() => Promise<void>",
|
|
3758
|
+
"parameters": [],
|
|
3759
|
+
"references": {
|
|
3760
|
+
"Promise": {
|
|
3761
|
+
"location": "global",
|
|
3762
|
+
"id": "global::Promise"
|
|
3763
|
+
}
|
|
3764
|
+
},
|
|
3765
|
+
"return": "Promise<void>"
|
|
3766
|
+
},
|
|
3767
|
+
"docs": {
|
|
3768
|
+
"text": "Sets focus on the native input element.",
|
|
3769
|
+
"tags": []
|
|
3770
|
+
}
|
|
3771
|
+
},
|
|
3772
|
+
"getSelectedValue": {
|
|
3773
|
+
"complexType": {
|
|
3774
|
+
"signature": "() => Promise<string | null>",
|
|
3775
|
+
"parameters": [],
|
|
3776
|
+
"references": {
|
|
3777
|
+
"Promise": {
|
|
3778
|
+
"location": "global",
|
|
3779
|
+
"id": "global::Promise"
|
|
3780
|
+
}
|
|
3781
|
+
},
|
|
3782
|
+
"return": "Promise<string>"
|
|
3783
|
+
},
|
|
3784
|
+
"docs": {
|
|
3785
|
+
"text": "Gets the value of the currently selected option.",
|
|
3786
|
+
"tags": []
|
|
3787
|
+
}
|
|
3788
|
+
},
|
|
3789
|
+
"clear": {
|
|
3790
|
+
"complexType": {
|
|
3791
|
+
"signature": "() => Promise<void>",
|
|
3792
|
+
"parameters": [],
|
|
3793
|
+
"references": {
|
|
3794
|
+
"Promise": {
|
|
3795
|
+
"location": "global",
|
|
3796
|
+
"id": "global::Promise"
|
|
3797
|
+
}
|
|
3798
|
+
},
|
|
3799
|
+
"return": "Promise<void>"
|
|
3800
|
+
},
|
|
3801
|
+
"docs": {
|
|
3802
|
+
"text": "Clears the selected value and resets the component. Works while disabled too, as setting a\nnative control's value from script does.",
|
|
3803
|
+
"tags": []
|
|
3804
|
+
}
|
|
3805
|
+
}
|
|
3806
|
+
};
|
|
3807
|
+
}
|
|
3808
|
+
static get elementRef() { return "el"; }
|
|
3809
|
+
static get watchers() {
|
|
3810
|
+
return [{
|
|
3811
|
+
"propName": "groupDisplay",
|
|
3812
|
+
"methodName": "groupDisplayChanged"
|
|
3813
|
+
}, {
|
|
3814
|
+
"propName": "openGroup",
|
|
3815
|
+
"methodName": "openGroupChanged"
|
|
3816
|
+
}, {
|
|
3817
|
+
"propName": "flyoutFallback",
|
|
3818
|
+
"methodName": "flyoutFallbackChanged"
|
|
3819
|
+
}, {
|
|
3820
|
+
"propName": "disabled",
|
|
3821
|
+
"methodName": "disabledChanged"
|
|
3822
|
+
}, {
|
|
3823
|
+
"propName": "isOpen",
|
|
3824
|
+
"methodName": "isOpenChanged"
|
|
3825
|
+
}, {
|
|
3826
|
+
"propName": "debounce",
|
|
3827
|
+
"methodName": "setupDebounce"
|
|
3828
|
+
}, {
|
|
3829
|
+
"propName": "options",
|
|
3830
|
+
"methodName": "optionsChanged"
|
|
3831
|
+
}, {
|
|
3832
|
+
"propName": "value",
|
|
3833
|
+
"methodName": "handleValueChange"
|
|
3834
|
+
}, {
|
|
3835
|
+
"propName": "selectedOption",
|
|
3836
|
+
"methodName": "handleSelectedOptionChange"
|
|
3837
|
+
}];
|
|
3838
|
+
}
|
|
3839
|
+
}
|