@pine-ds/core 4.3.0 → 4.4.1
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/closest.js +1 -1
- package/components/floating-ui.dom.js +1 -1
- package/components/i18n-format.js +1 -1
- package/components/index.d.ts +2 -0
- package/components/index.js +1 -1
- package/components/index2.js +1 -1
- package/components/mock-pds-modal.js +1 -1
- package/components/pds-button2.js +1 -1
- package/components/pds-checkbox2.js +1 -1
- package/components/pds-chip2.js +1 -1
- package/components/pds-combobox.js +2 -2
- package/components/pds-container.js +1 -1
- package/components/pds-copytext.js +1 -1
- package/components/pds-datepicker.d.ts +11 -0
- package/components/pds-datepicker.js +1 -0
- package/components/pds-divider.js +1 -1
- package/components/pds-drawer-content.js +1 -1
- package/components/pds-drawer-footer.js +1 -1
- package/components/pds-drawer-header.js +1 -1
- package/components/pds-drawer.js +1 -1
- package/components/pds-dropdown-menu-item.js +1 -1
- package/components/pds-dropdown-menu-separator.js +1 -1
- package/components/pds-dropdown-menu.js +1 -1
- package/components/pds-filter.js +1 -1
- package/components/pds-filters.js +1 -1
- package/components/pds-image.js +1 -1
- package/components/pds-input.js +1 -1
- package/components/pds-input2.js +1 -0
- package/components/pds-link2.js +1 -1
- package/components/pds-loader2.js +1 -1
- package/components/pds-modal-content.js +1 -1
- package/components/pds-modal-footer.js +1 -1
- package/components/pds-modal-header.js +1 -1
- package/components/pds-modal2.js +1 -1
- package/components/pds-multiselect.js +1 -1
- package/components/pds-popover.js +1 -1
- package/components/pds-progress.js +1 -1
- package/components/pds-property.js +1 -1
- package/components/pds-radio-group.js +1 -1
- package/components/pds-radio.js +1 -1
- package/components/pds-row.js +1 -1
- package/components/pds-select.js +1 -1
- package/components/pds-sortable-item.js +1 -1
- package/components/pds-sortable.js +2 -2
- package/components/pds-switch.js +1 -1
- package/components/pds-table-body.js +1 -1
- package/components/pds-table-cell2.js +1 -1
- package/components/pds-table-head-cell2.js +1 -1
- package/components/pds-table-head.js +1 -1
- package/components/pds-table-row.js +1 -1
- package/components/pds-tabpanel.js +1 -1
- package/components/pds-tabs.js +1 -1
- package/components/pds-text2.js +1 -1
- package/components/pds-textarea.js +1 -1
- package/components/pds-toast.js +1 -1
- package/components/pds-tooltip.js +1 -1
- package/components/utils.js +1 -1
- package/dist/cjs/closest-D0qyYtJ3.js +20 -0
- package/dist/cjs/{floating-ui.dom-BZk7Blsu.js → floating-ui.dom-Dc8Anyel.js} +79 -0
- package/dist/cjs/{i18n-format-CrpIhahc.js → i18n-format-BD0PmYzT.js} +1 -0
- package/dist/cjs/{index-CaLa1zy9.js → index-Bl5KnQay.js} +4 -1
- package/dist/cjs/{index-DYvijwA6.js → index-D-QQKB0y.js} +8 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mock-pds-modal.cjs.entry.js +3 -3
- package/dist/cjs/pds-accordion.cjs.entry.js +2 -2
- package/dist/cjs/pds-alert.cjs.entry.js +1 -1
- package/dist/cjs/pds-avatar.cjs.entry.js +2 -2
- package/dist/cjs/pds-box.cjs.entry.js +2 -2
- package/dist/cjs/pds-button.cjs.entry.js +53 -4
- package/dist/cjs/pds-checkbox.cjs.entry.js +14 -6
- package/dist/cjs/pds-chip.cjs.entry.js +6 -6
- package/dist/cjs/pds-combobox.cjs.entry.js +1225 -117
- package/dist/cjs/pds-container.cjs.entry.js +2 -2
- package/dist/cjs/pds-copytext.cjs.entry.js +5 -5
- package/dist/cjs/pds-datepicker.cjs.entry.js +1962 -0
- package/dist/cjs/pds-divider.cjs.entry.js +2 -2
- package/dist/cjs/pds-drawer-content.cjs.entry.js +2 -2
- package/dist/cjs/pds-drawer-footer.cjs.entry.js +2 -2
- package/dist/cjs/pds-drawer-header.cjs.entry.js +2 -2
- package/dist/cjs/pds-drawer.cjs.entry.js +11 -4
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +2 -2
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +11 -4
- package/dist/cjs/pds-filter.cjs.entry.js +3 -3
- package/dist/cjs/pds-filters.cjs.entry.js +2 -2
- package/dist/cjs/pds-icon.cjs.entry.js +1 -1
- package/dist/cjs/pds-image.cjs.entry.js +3 -3
- package/dist/cjs/pds-input.cjs.entry.js +8 -5
- package/dist/cjs/pds-link.cjs.entry.js +5 -5
- package/dist/cjs/pds-loader.cjs.entry.js +2 -2
- package/dist/cjs/pds-modal-content.cjs.entry.js +3 -3
- package/dist/cjs/pds-modal-footer.cjs.entry.js +2 -2
- package/dist/cjs/pds-modal-header.cjs.entry.js +2 -2
- package/dist/cjs/pds-modal.cjs.entry.js +12 -6
- package/dist/cjs/pds-multiselect.cjs.entry.js +264 -51
- package/dist/cjs/pds-popover.cjs.entry.js +30 -12
- package/dist/cjs/pds-progress.cjs.entry.js +3 -3
- package/dist/cjs/pds-property.cjs.entry.js +2 -2
- package/dist/cjs/pds-radio-group.cjs.entry.js +5 -5
- package/dist/cjs/pds-radio.cjs.entry.js +5 -5
- package/dist/cjs/pds-row.cjs.entry.js +2 -2
- package/dist/cjs/pds-select.cjs.entry.js +3 -3
- package/dist/cjs/pds-sortable-item.cjs.entry.js +3 -3
- package/dist/cjs/pds-sortable.cjs.entry.js +2 -2
- package/dist/cjs/pds-switch.cjs.entry.js +14 -6
- package/dist/cjs/pds-tab.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-body.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-cell.cjs.entry.js +5 -5
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +4 -4
- package/dist/cjs/pds-table-head.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-row.cjs.entry.js +3 -3
- package/dist/cjs/pds-table.cjs.entry.js +1 -1
- package/dist/cjs/pds-tabpanel.cjs.entry.js +2 -2
- package/dist/cjs/pds-tabs.cjs.entry.js +2 -2
- package/dist/cjs/pds-text.cjs.entry.js +5 -5
- package/dist/cjs/pds-textarea.cjs.entry.js +14 -9
- package/dist/cjs/pds-toast.cjs.entry.js +4 -4
- package/dist/cjs/pds-tooltip.cjs.entry.js +4 -4
- package/dist/cjs/pine-core.cjs.js +2 -2
- package/dist/cjs/{truncation-tooltip-Bps7_rUy.js → truncation-tooltip-CYgQfBLt.js} +1 -1
- package/dist/cjs/{utils-KWALOgy9.js → utils-BhRmyxT8.js} +35 -4
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/pds-button/pds-button.js +53 -2
- package/dist/collection/components/pds-checkbox/pds-checkbox.css +7 -0
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +19 -3
- package/dist/collection/components/pds-chip/pds-chip.js +1 -1
- package/dist/collection/components/pds-combobox/grouped-options-panel.js +262 -0
- package/dist/collection/components/pds-combobox/pds-combobox.css +242 -13
- package/dist/collection/components/pds-combobox/pds-combobox.js +1128 -114
- package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +240 -0
- package/dist/collection/components/pds-container/pds-container.js +1 -1
- package/dist/collection/components/pds-copytext/pds-copytext.js +1 -1
- package/dist/collection/components/pds-datepicker/calendar-portal.js +136 -0
- package/dist/collection/components/pds-datepicker/date-utils.js +132 -0
- package/dist/collection/components/pds-datepicker/datepicker-interface.js +1 -0
- package/dist/collection/components/pds-datepicker/pds-datepicker.css +545 -0
- package/dist/collection/components/pds-datepicker/pds-datepicker.js +2406 -0
- package/dist/collection/components/pds-datepicker/presets.js +96 -0
- package/dist/collection/components/pds-datepicker/stories/pds-datepicker.stories.js +195 -0
- package/dist/collection/components/pds-datepicker/value.js +238 -0
- package/dist/collection/components/pds-divider/pds-divider.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer.css +4 -0
- package/dist/collection/components/pds-drawer/pds-drawer.js +9 -2
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +9 -2
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +1 -1
- package/dist/collection/components/pds-filters/pds-filters.js +1 -1
- package/dist/collection/components/pds-image/pds-image.js +2 -2
- package/dist/collection/components/pds-input/pds-input.js +6 -3
- package/dist/collection/components/pds-link/pds-link.js +2 -2
- package/dist/collection/components/pds-loader/pds-loader.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +2 -2
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal.css +16 -0
- package/dist/collection/components/pds-modal/pds-modal.js +10 -4
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
- package/dist/collection/components/pds-multiselect/pds-multiselect.css +19 -1
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +390 -47
- package/dist/collection/components/pds-multiselect/stories/pds-multiselect.stories.js +136 -1
- package/dist/collection/components/pds-popover/pds-popover.js +29 -11
- package/dist/collection/components/pds-progress/pds-progress.js +1 -1
- package/dist/collection/components/pds-property/pds-property.js +1 -1
- package/dist/collection/components/pds-radio/pds-radio.js +3 -3
- package/dist/collection/components/pds-radio-group/pds-radio-group.js +3 -3
- package/dist/collection/components/pds-row/pds-row.js +1 -1
- package/dist/collection/components/pds-select/pds-select.js +1 -1
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
- package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
- package/dist/collection/components/pds-switch/pds-switch.css +3 -0
- package/dist/collection/components/pds-switch/pds-switch.js +20 -4
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +2 -2
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
- package/dist/collection/components/pds-text/pds-text.js +1 -1
- package/dist/collection/components/pds-textarea/pds-textarea.js +11 -6
- package/dist/collection/components/pds-toast/pds-toast.js +3 -3
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
- package/dist/collection/utils/closest.js +8 -0
- package/dist/collection/utils/utils.js +33 -4
- package/dist/docs.json +1933 -59
- package/dist/esm/closest-DHPzKMVS.js +17 -0
- package/dist/esm/{floating-ui.dom-DDtwbwIl.js → floating-ui.dom-BPqJgIq6.js} +79 -1
- package/dist/esm/{i18n-format-BKsJZTyn.js → i18n-format-BJgZHCWe.js} +1 -1
- package/dist/esm/{index-DcT8--Dn.js → index-CB8Yh0Nt.js} +4 -1
- package/dist/esm/{index-BU1hN5Vy.js → index-DxI-61GK.js} +5 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mock-pds-modal.entry.js +3 -3
- package/dist/esm/pds-accordion.entry.js +2 -2
- package/dist/esm/pds-alert.entry.js +1 -1
- package/dist/esm/pds-avatar.entry.js +2 -2
- package/dist/esm/pds-box.entry.js +2 -2
- package/dist/esm/pds-button.entry.js +53 -4
- package/dist/esm/pds-checkbox.entry.js +14 -6
- package/dist/esm/pds-chip.entry.js +6 -6
- package/dist/esm/pds-combobox.entry.js +1225 -117
- package/dist/esm/pds-container.entry.js +2 -2
- package/dist/esm/pds-copytext.entry.js +5 -5
- package/dist/esm/pds-datepicker.entry.js +1960 -0
- package/dist/esm/pds-divider.entry.js +2 -2
- package/dist/esm/pds-drawer-content.entry.js +2 -2
- package/dist/esm/pds-drawer-footer.entry.js +2 -2
- package/dist/esm/pds-drawer-header.entry.js +2 -2
- package/dist/esm/pds-drawer.entry.js +11 -4
- package/dist/esm/pds-dropdown-menu-item.entry.js +2 -2
- package/dist/esm/pds-dropdown-menu-separator.entry.js +2 -2
- package/dist/esm/pds-dropdown-menu.entry.js +11 -4
- package/dist/esm/pds-filter.entry.js +3 -3
- package/dist/esm/pds-filters.entry.js +2 -2
- package/dist/esm/pds-icon.entry.js +1 -1
- package/dist/esm/pds-image.entry.js +3 -3
- package/dist/esm/pds-input.entry.js +8 -5
- package/dist/esm/pds-link.entry.js +5 -5
- package/dist/esm/pds-loader.entry.js +2 -2
- package/dist/esm/pds-modal-content.entry.js +3 -3
- package/dist/esm/pds-modal-footer.entry.js +2 -2
- package/dist/esm/pds-modal-header.entry.js +2 -2
- package/dist/esm/pds-modal.entry.js +12 -6
- package/dist/esm/pds-multiselect.entry.js +264 -51
- package/dist/esm/pds-popover.entry.js +30 -12
- package/dist/esm/pds-progress.entry.js +3 -3
- package/dist/esm/pds-property.entry.js +2 -2
- package/dist/esm/pds-radio-group.entry.js +5 -5
- package/dist/esm/pds-radio.entry.js +5 -5
- package/dist/esm/pds-row.entry.js +2 -2
- package/dist/esm/pds-select.entry.js +3 -3
- package/dist/esm/pds-sortable-item.entry.js +3 -3
- package/dist/esm/pds-sortable.entry.js +2 -2
- package/dist/esm/pds-switch.entry.js +14 -6
- package/dist/esm/pds-tab.entry.js +1 -1
- package/dist/esm/pds-table-body.entry.js +2 -2
- package/dist/esm/pds-table-cell.entry.js +5 -5
- package/dist/esm/pds-table-head-cell.entry.js +4 -4
- package/dist/esm/pds-table-head.entry.js +3 -3
- package/dist/esm/pds-table-row.entry.js +3 -3
- package/dist/esm/pds-table.entry.js +1 -1
- package/dist/esm/pds-tabpanel.entry.js +2 -2
- package/dist/esm/pds-tabs.entry.js +2 -2
- package/dist/esm/pds-text.entry.js +5 -5
- package/dist/esm/pds-textarea.entry.js +14 -9
- package/dist/esm/pds-toast.entry.js +4 -4
- package/dist/esm/pds-tooltip.entry.js +4 -4
- package/dist/esm/pine-core.js +3 -3
- package/dist/esm/{truncation-tooltip-CdtEBn_5.js → truncation-tooltip-_902ENWC.js} +1 -1
- package/dist/esm/{utils-u_0lxWnH.js → utils-OYK5-nwe.js} +34 -5
- package/dist/esm-es5/closest-DHPzKMVS.js +1 -0
- package/dist/esm-es5/floating-ui.dom-BPqJgIq6.js +1 -0
- package/dist/esm-es5/{i18n-format-BKsJZTyn.js → i18n-format-BJgZHCWe.js} +1 -1
- package/dist/esm-es5/index-CB8Yh0Nt.js +2 -0
- package/dist/esm-es5/index-DxI-61GK.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-accordion.entry.js +1 -1
- package/dist/esm-es5/pds-alert.entry.js +1 -1
- package/dist/esm-es5/pds-avatar.entry.js +1 -1
- package/dist/esm-es5/pds-box.entry.js +1 -1
- package/dist/esm-es5/pds-button.entry.js +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-combobox.entry.js +2 -2
- package/dist/esm-es5/pds-container.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-datepicker.entry.js +1 -0
- package/dist/esm-es5/pds-divider.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-content.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-footer.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-header.entry.js +1 -1
- package/dist/esm-es5/pds-drawer.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm-es5/pds-filter.entry.js +1 -1
- package/dist/esm-es5/pds-filters.entry.js +1 -1
- package/dist/esm-es5/pds-icon.entry.js +1 -1
- package/dist/esm-es5/pds-image.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-link.entry.js +1 -1
- package/dist/esm-es5/pds-loader.entry.js +1 -1
- package/dist/esm-es5/pds-modal-content.entry.js +1 -1
- package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
- package/dist/esm-es5/pds-modal-header.entry.js +1 -1
- package/dist/esm-es5/pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-multiselect.entry.js +1 -1
- package/dist/esm-es5/pds-popover.entry.js +1 -1
- package/dist/esm-es5/pds-progress.entry.js +1 -1
- package/dist/esm-es5/pds-property.entry.js +1 -1
- package/dist/esm-es5/pds-radio-group.entry.js +1 -1
- package/dist/esm-es5/pds-radio.entry.js +1 -1
- package/dist/esm-es5/pds-row.entry.js +1 -1
- package/dist/esm-es5/pds-select.entry.js +1 -1
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
- package/dist/esm-es5/pds-sortable.entry.js +2 -2
- package/dist/esm-es5/pds-switch.entry.js +1 -1
- package/dist/esm-es5/pds-tab.entry.js +1 -1
- package/dist/esm-es5/pds-table-body.entry.js +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head.entry.js +1 -1
- package/dist/esm-es5/pds-table-row.entry.js +1 -1
- package/dist/esm-es5/pds-table.entry.js +1 -1
- package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
- package/dist/esm-es5/pds-tabs.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-toast.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/{truncation-tooltip-CdtEBn_5.js → truncation-tooltip-_902ENWC.js} +1 -1
- package/dist/esm-es5/utils-OYK5-nwe.js +1 -0
- package/dist/pine-core/p-039369b4.system.entry.js +1 -0
- package/dist/pine-core/p-0414092a.system.entry.js +1 -0
- package/dist/pine-core/p-04807201.entry.js +1 -0
- package/dist/pine-core/{p-cfcb89d1.system.entry.js → p-07f0d168.system.entry.js} +1 -1
- package/dist/pine-core/p-08f5d19c.entry.js +1 -0
- package/dist/pine-core/{p-d70aa0c7.system.entry.js → p-0aaf8faa.system.entry.js} +1 -1
- package/dist/pine-core/p-0bad5955.entry.js +1 -0
- package/dist/pine-core/{p-99f300ef.system.entry.js → p-0c3bf377.system.entry.js} +1 -1
- package/dist/pine-core/p-0ce79cd0.entry.js +1 -0
- package/dist/pine-core/{p-f682f08a.system.entry.js → p-1057b8c3.system.entry.js} +1 -1
- package/dist/pine-core/{p-089606b8.system.entry.js → p-108c910a.system.entry.js} +1 -1
- package/dist/pine-core/{p-ea986474.system.entry.js → p-166f61a6.system.entry.js} +1 -1
- package/dist/pine-core/{p-95defb53.entry.js → p-16c8f5e3.entry.js} +1 -1
- package/dist/pine-core/p-16e258d1.entry.js +1 -0
- package/dist/pine-core/p-19dbd9f6.entry.js +1 -0
- package/dist/pine-core/{p-a8f1a48d.entry.js → p-1be33c95.entry.js} +1 -1
- package/dist/pine-core/{p-70fb83d4.entry.js → p-1e3a31da.entry.js} +1 -1
- package/dist/pine-core/p-1ea45d33.system.entry.js +1 -0
- package/dist/pine-core/{p-12941e0d.entry.js → p-1f228db9.entry.js} +1 -1
- package/dist/pine-core/p-257c6ef9.entry.js +1 -0
- package/dist/pine-core/p-26415245.system.entry.js +1 -0
- package/dist/pine-core/p-26e1e5bb.entry.js +1 -0
- package/dist/pine-core/p-27c06bf8.entry.js +2 -0
- package/dist/pine-core/p-330a76f6.system.entry.js +1 -0
- package/dist/pine-core/{p-4ebdb90b.system.entry.js → p-33c63be6.system.entry.js} +1 -1
- package/dist/pine-core/{p-c5b6b545.entry.js → p-344609f9.entry.js} +2 -2
- package/dist/pine-core/{p-2dbc90ba.entry.js → p-3a1711c1.entry.js} +1 -1
- package/dist/pine-core/p-3a9c58bd.system.entry.js +1 -0
- package/dist/pine-core/{p-32fc82c2.entry.js → p-3ebd543f.entry.js} +1 -1
- package/dist/pine-core/p-3fbcb0c8.system.entry.js +1 -0
- package/dist/pine-core/{p-e08e4ca7.entry.js → p-427b4aeb.entry.js} +1 -1
- package/dist/pine-core/{p-f5cf98be.system.entry.js → p-42bd87ea.system.entry.js} +1 -1
- package/dist/pine-core/{p-8d1e7b3c.system.entry.js → p-43c691bf.system.entry.js} +1 -1
- package/dist/pine-core/p-4566d659.system.entry.js +1 -0
- package/dist/pine-core/{p-b9a857fc.system.entry.js → p-4b8cf04a.system.entry.js} +1 -1
- package/dist/pine-core/p-4d6f471c.entry.js +1 -0
- package/dist/pine-core/{p-ec04d4c3.entry.js → p-4e7580c4.entry.js} +1 -1
- package/dist/pine-core/{p-fbb72e66.system.entry.js → p-4f4a2d2a.system.entry.js} +1 -1
- package/dist/pine-core/{p-b8a5597d.entry.js → p-5211aba7.entry.js} +1 -1
- package/dist/pine-core/{p-7e4729e0.entry.js → p-524b7d3f.entry.js} +1 -1
- package/dist/pine-core/{p-c08b1697.entry.js → p-5613c64c.entry.js} +1 -1
- package/dist/pine-core/{p-5a8345e2.entry.js → p-5bb24cb4.entry.js} +1 -1
- package/dist/pine-core/{p-73c3a73f.entry.js → p-5bb80b3c.entry.js} +1 -1
- package/dist/pine-core/{p-e039ebb6.system.entry.js → p-5c6e0a26.system.entry.js} +1 -1
- package/dist/pine-core/{p-b53d9620.system.entry.js → p-5db57551.system.entry.js} +1 -1
- package/dist/pine-core/{p-6b260a97.entry.js → p-5eb00ba5.entry.js} +1 -1
- package/dist/pine-core/p-61756414.system.entry.js +1 -0
- package/dist/pine-core/{p-08196d6c.entry.js → p-682e9e8f.entry.js} +1 -1
- package/dist/pine-core/p-6965db1d.entry.js +1 -0
- package/dist/pine-core/{p-317337e4.entry.js → p-6b180ee2.entry.js} +1 -1
- package/dist/pine-core/{p-d33d65f6.entry.js → p-6c53962f.entry.js} +1 -1
- package/dist/pine-core/p-6da6520b.system.entry.js +3 -0
- package/dist/pine-core/{p-bd9b2931.system.entry.js → p-6e3bf862.system.entry.js} +1 -1
- package/dist/pine-core/{p-9d77f2f8.system.entry.js → p-71c9f866.system.entry.js} +1 -1
- package/dist/pine-core/{p-a616385b.system.entry.js → p-7265b94c.system.entry.js} +1 -1
- package/dist/pine-core/{p-55532d56.system.entry.js → p-74229b5e.system.entry.js} +1 -1
- package/dist/pine-core/p-7512c2d4.system.entry.js +1 -0
- package/dist/pine-core/p-76db406d.system.entry.js +1 -0
- package/dist/pine-core/{p-3b555f06.system.entry.js → p-79aa5f43.system.entry.js} +1 -1
- package/dist/pine-core/{p-77082557.system.entry.js → p-7bbcda0f.system.entry.js} +1 -1
- package/dist/pine-core/p-7c8946e6.entry.js +1 -0
- package/dist/pine-core/p-7c98c90a.system.entry.js +1 -0
- package/dist/pine-core/{p-93c52e2b.system.entry.js → p-8252cd84.system.entry.js} +1 -1
- package/dist/pine-core/p-8469cf3e.entry.js +1 -0
- package/dist/pine-core/p-84ba0e6a.system.entry.js +1 -0
- package/dist/pine-core/{p-45d55983.entry.js → p-86fc0bfa.entry.js} +1 -1
- package/dist/pine-core/{p-67fc26e5.system.entry.js → p-90ea812c.system.entry.js} +1 -1
- package/dist/pine-core/p-948826db.entry.js +1 -0
- package/dist/pine-core/{p-35edd8b0.entry.js → p-9b66642d.entry.js} +1 -1
- package/dist/pine-core/p-BJgZHCWe.js +1 -0
- package/dist/pine-core/p-BPqJgIq6.js +1 -0
- package/dist/pine-core/p-BSRFZB4I.system.js +1 -0
- package/dist/pine-core/p-BZsj6eAn.system.js +1 -0
- package/dist/pine-core/p-CB8Yh0Nt.js +2 -0
- package/dist/pine-core/{p-B2qvvB3q.system.js → p-CBu9UrXr.system.js} +1 -1
- package/dist/pine-core/p-COtCa1Md.system.js +1 -0
- package/dist/pine-core/p-CTQZ2fkv.system.js +1 -0
- package/dist/pine-core/{p-B2nn1gSd.js → p-CnM3cCof.js} +1 -1
- package/dist/pine-core/p-CnO10OxH.system.js +1 -0
- package/dist/pine-core/p-D-akEPIU.system.js +2 -0
- package/dist/pine-core/p-DHPzKMVS.js +1 -0
- package/dist/pine-core/p-Dx8tEj0U.system.js +1 -0
- package/dist/pine-core/p-DxI-61GK.js +1 -0
- package/dist/pine-core/p-OYK5-nwe.js +1 -0
- package/dist/pine-core/p-a10af84b.system.entry.js +1 -0
- package/dist/pine-core/p-a21b530a.system.entry.js +1 -0
- package/dist/pine-core/{p-b0becff3.system.entry.js → p-a85535a4.system.entry.js} +1 -1
- package/dist/pine-core/p-abc0fe2f.system.entry.js +1 -0
- package/dist/pine-core/p-ac6a5bf0.entry.js +1 -0
- package/dist/pine-core/{p-5f5339ab.entry.js → p-b0526f98.entry.js} +1 -1
- package/dist/pine-core/p-b130b716.entry.js +1 -0
- package/dist/pine-core/{p-4cbb691f.entry.js → p-b195d345.entry.js} +1 -1
- package/dist/pine-core/{p-5c5bd609.entry.js → p-b4923acf.entry.js} +1 -1
- package/dist/pine-core/{p-15a0fa0a.system.entry.js → p-b4e440e3.system.entry.js} +1 -1
- package/dist/pine-core/p-b8693a87.entry.js +1 -0
- package/dist/pine-core/{p-bf025e38.entry.js → p-b8ada1eb.entry.js} +1 -1
- package/dist/pine-core/{p-a6a269da.system.entry.js → p-bb85bbb5.system.entry.js} +1 -1
- package/dist/pine-core/{p-fa8d3155.system.entry.js → p-bbc539bc.system.entry.js} +2 -2
- package/dist/pine-core/{p-f26dcbc2.system.entry.js → p-bf833976.system.entry.js} +1 -1
- package/dist/pine-core/{p-e055c543.entry.js → p-c23097af.entry.js} +1 -1
- package/dist/pine-core/p-c2dd84bd.system.entry.js +1 -0
- package/dist/pine-core/{p-441682f4.system.entry.js → p-c4520b04.system.entry.js} +1 -1
- package/dist/pine-core/{p-f1365550.entry.js → p-c4f68dfc.entry.js} +1 -1
- package/dist/pine-core/{p-fa2a786d.system.entry.js → p-c6fa6744.system.entry.js} +1 -1
- package/dist/pine-core/p-c7dba815.entry.js +1 -0
- package/dist/pine-core/p-cb6f55ff.entry.js +1 -0
- package/dist/pine-core/p-cfb8fa7c.system.entry.js +1 -0
- package/dist/pine-core/{p-2bb101c2.entry.js → p-d0d7d1d4.entry.js} +1 -1
- package/dist/pine-core/{p-4f5aacd9.entry.js → p-d1112c8a.entry.js} +1 -1
- package/dist/pine-core/{p-5f3d0c86.system.entry.js → p-d4e91ad9.system.entry.js} +1 -1
- package/dist/pine-core/{p-44222439.entry.js → p-da018dcb.entry.js} +1 -1
- package/dist/pine-core/{p-57784f2f.system.entry.js → p-dc27abe6.system.entry.js} +1 -1
- package/dist/pine-core/{p-f9f7101e.entry.js → p-dc343b6d.entry.js} +1 -1
- package/dist/pine-core/{p-fb774f89.system.entry.js → p-dde753e7.system.entry.js} +1 -1
- package/dist/pine-core/{p-558ac401.entry.js → p-dea3a582.entry.js} +1 -1
- package/dist/pine-core/p-df29fd41.entry.js +1 -0
- package/dist/pine-core/{p-c6426e16.system.entry.js → p-e4e2eae2.system.entry.js} +1 -1
- package/dist/pine-core/{p-1abae35f.entry.js → p-e8668178.entry.js} +1 -1
- package/dist/pine-core/{p-20753e42.system.entry.js → p-eb28d21d.system.entry.js} +1 -1
- package/dist/pine-core/p-eb71a82d.system.entry.js +1 -0
- package/dist/pine-core/{p-13bb89ff.entry.js → p-ed63873c.entry.js} +1 -1
- package/dist/pine-core/{p-5d2f95bd.entry.js → p-f4f6dc36.entry.js} +1 -1
- package/dist/pine-core/{p-6b3d8c2b.system.entry.js → p-f67a0ca8.system.entry.js} +1 -1
- package/dist/pine-core/{p-003df3b3.entry.js → p-fc455968.entry.js} +1 -1
- package/dist/pine-core/{p-02452806.system.entry.js → p-fe3e2ebd.system.entry.js} +1 -1
- package/dist/pine-core/pine-core.css +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/pine-core/pine-core.js +1 -1
- package/dist/types/components/pds-button/pds-button.d.ts +10 -0
- package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +5 -0
- package/dist/types/components/pds-combobox/combobox-interface.d.ts +17 -0
- package/dist/types/components/pds-combobox/grouped-options-panel.d.ts +105 -0
- package/dist/types/components/pds-combobox/pds-combobox.d.ts +235 -3
- package/dist/types/components/pds-datepicker/calendar-portal.d.ts +43 -0
- package/dist/types/components/pds-datepicker/date-utils.d.ts +48 -0
- package/dist/types/components/pds-datepicker/datepicker-interface.d.ts +30 -0
- package/dist/types/components/pds-datepicker/pds-datepicker.d.ts +489 -0
- package/dist/types/components/pds-datepicker/presets.d.ts +23 -0
- package/dist/types/components/pds-datepicker/value.d.ts +47 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +1 -0
- package/dist/types/components/pds-multiselect/multiselect-interface.d.ts +19 -0
- package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +56 -1
- package/dist/types/components/pds-popover/pds-popover.d.ts +1 -0
- package/dist/types/components/pds-switch/pds-switch.d.ts +5 -0
- package/dist/types/components.d.ts +677 -4
- package/dist/types/utils/closest.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +9 -1
- package/dist/vscode.html-data.json +467 -3
- package/hydrate/index.js +3973 -362
- package/hydrate/index.mjs +3973 -362
- package/package.json +2 -2
- package/dist/cjs/closest-BZXvuB_Y.js +0 -11
- package/dist/esm/closest-DnUJodVd.js +0 -9
- package/dist/esm-es5/closest-DnUJodVd.js +0 -1
- package/dist/esm-es5/floating-ui.dom-DDtwbwIl.js +0 -1
- package/dist/esm-es5/index-BU1hN5Vy.js +0 -1
- package/dist/esm-es5/index-DcT8--Dn.js +0 -2
- package/dist/esm-es5/utils-u_0lxWnH.js +0 -1
- package/dist/pine-core/p-026ee6de.entry.js +0 -1
- package/dist/pine-core/p-03f3fc92.system.entry.js +0 -1
- package/dist/pine-core/p-06375326.system.entry.js +0 -1
- package/dist/pine-core/p-1df5e088.entry.js +0 -1
- package/dist/pine-core/p-24214ab9.system.entry.js +0 -1
- package/dist/pine-core/p-250011ba.entry.js +0 -1
- package/dist/pine-core/p-2b420257.entry.js +0 -1
- package/dist/pine-core/p-375eb7f4.entry.js +0 -1
- package/dist/pine-core/p-3b796898.entry.js +0 -1
- package/dist/pine-core/p-3c5489ce.entry.js +0 -1
- package/dist/pine-core/p-3e868906.system.entry.js +0 -1
- package/dist/pine-core/p-464f23e6.entry.js +0 -1
- package/dist/pine-core/p-49c6112a.entry.js +0 -1
- package/dist/pine-core/p-4bd57896.system.entry.js +0 -1
- package/dist/pine-core/p-6a6a767b.system.entry.js +0 -1
- package/dist/pine-core/p-6dabeebc.system.entry.js +0 -3
- package/dist/pine-core/p-70891202.entry.js +0 -1
- package/dist/pine-core/p-73fa955a.system.entry.js +0 -1
- package/dist/pine-core/p-755e0b3c.system.entry.js +0 -1
- package/dist/pine-core/p-8b051229.entry.js +0 -1
- package/dist/pine-core/p-8d8a8550.system.entry.js +0 -1
- package/dist/pine-core/p-93486f2e.entry.js +0 -1
- package/dist/pine-core/p-93ae562d.entry.js +0 -1
- package/dist/pine-core/p-95b8bece.system.entry.js +0 -1
- package/dist/pine-core/p-9d902000.system.entry.js +0 -1
- package/dist/pine-core/p-9ef355b7.entry.js +0 -1
- package/dist/pine-core/p-BI7Ml0VF.system.js +0 -1
- package/dist/pine-core/p-BKsJZTyn.js +0 -1
- package/dist/pine-core/p-BU1hN5Vy.js +0 -1
- package/dist/pine-core/p-BrLs99ML.system.js +0 -1
- package/dist/pine-core/p-CJ8t3EBJ.system.js +0 -2
- package/dist/pine-core/p-Cr7-rJtJ.system.js +0 -1
- package/dist/pine-core/p-DDtwbwIl.js +0 -1
- package/dist/pine-core/p-D_I-k33A.system.js +0 -1
- package/dist/pine-core/p-DcT8--Dn.js +0 -2
- package/dist/pine-core/p-DnUJodVd.js +0 -1
- package/dist/pine-core/p-a009ab10.system.entry.js +0 -1
- package/dist/pine-core/p-a8cd2ab5.entry.js +0 -1
- package/dist/pine-core/p-b45b8f8b.system.entry.js +0 -1
- package/dist/pine-core/p-b85bb61d.system.entry.js +0 -1
- package/dist/pine-core/p-bdded57a.system.entry.js +0 -1
- package/dist/pine-core/p-c1a65082.entry.js +0 -1
- package/dist/pine-core/p-c1d1befb.system.entry.js +0 -1
- package/dist/pine-core/p-ctdGub9B.system.js +0 -1
- package/dist/pine-core/p-d9c1ee36.system.entry.js +0 -1
- package/dist/pine-core/p-df285ece.system.entry.js +0 -1
- package/dist/pine-core/p-ee114aef.entry.js +0 -1
- package/dist/pine-core/p-ee997fbf.entry.js +0 -2
- package/dist/pine-core/p-f89197c9.entry.js +0 -1
- package/dist/pine-core/p-kYMYDfJY.system.js +0 -1
- package/dist/pine-core/p-u_0lxWnH.js +0 -1
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var floatingUi_dom = require('./floating-ui.dom-
|
|
5
|
-
var utils = require('./utils-
|
|
3
|
+
var index = require('./index-Bl5KnQay.js');
|
|
4
|
+
var floatingUi_dom = require('./floating-ui.dom-Dc8Anyel.js');
|
|
5
|
+
var utils = require('./utils-BhRmyxT8.js');
|
|
6
6
|
var form = require('./form-MhwfKTuo.js');
|
|
7
|
-
var index$1 = require('./index-
|
|
8
|
-
var i18nFormat = require('./i18n-format-
|
|
7
|
+
var index$1 = require('./index-D-QQKB0y.js');
|
|
8
|
+
var i18nFormat = require('./i18n-format-BD0PmYzT.js');
|
|
9
9
|
|
|
10
|
-
const pdsMultiselectCss = () => `:host{display:block}:host([aria-disabled=true]) .pds-multiselect__trigger{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}:host([aria-disabled=true]) .pds-multiselect__icon{color:var(--pine-color-text-disabled)}.pds-multiselect{position:relative}.pds-multiselect__label{color:var(--pine-color-text-label);display:block;font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-multiselect__wrapper{position:relative}.pds-multiselect__trigger{-ms-flex-align:center;align-items:center;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;letter-spacing:var(--pine-letter-spacing);min-height:var(--pine-dimension-450);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);position:relative;text-align:start;-webkit-transition:border-color var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, box-shadow var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;width:100%}.pds-multiselect__trigger:hover:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-hover)}.pds-multiselect__trigger:focus:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-multiselect__trigger.pds-multiselect__trigger--open{border-color:var(--pine-color-border-active)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid{background-color:var(--pine-color-red-050);border-color:var(--pine-color-border-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid:focus{outline-color:var(--pine-color-focus-ring-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-multiselect__trigger-text{color:var(--pine-color-text-strong);-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__trigger-text.pds-multiselect__trigger-text--placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__trigger--disabled .pds-multiselect__trigger-text{color:var(--pine-color-text-disabled)}.pds-multiselect__icon{color:var(--pine-color-icon);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__pill-list{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-2xs)}.pds-multiselect__pill-list--inline{-ms-flex:1;flex:1;min-width:0}.pds-multiselect__pill-list--below{-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-multiselect__pill-overflow{color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);white-space:nowrap}.pds-multiselect__trigger--pill-inline{-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-2xs);min-height:var(--pine-dimension-450);padding:var(--pine-dimension-2xs) var(--pine-dimension-sm)}.pds-multiselect__trigger--pill-inline.pds-multiselect__trigger--open{border-color:var(--pine-color-border-active)}.pds-multiselect__trigger--pill-inline:focus-within:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-multiselect__trigger--pill-inline.pds-multiselect__trigger--invalid:focus-within{outline-color:var(--pine-color-focus-ring-danger)}.pds-multiselect__pill-toggle{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border-width:0;cursor:pointer;display:-ms-flexbox;display:flex;padding:0}.pds-multiselect__pill-toggle:focus{outline:3px solid transparent}.pds-multiselect__trigger--disabled .pds-multiselect__pill-toggle{cursor:not-allowed;pointer-events:none}.pds-multiselect__panel{background:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute;z-index:var(--pine-z-index-raised)}.pds-multiselect__search{-ms-flex-align:center;align-items:center;-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.pds-multiselect__search pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__search-input{background:transparent;border:var(--pine-dimension-none);color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-width:var(--pine-dimension-none);outline:none}.pds-multiselect__search-input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__selected-section{-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);padding:var(--pine-dimension-xs)}.pds-multiselect__selected-list{list-style:none;margin:var(--pine-dimension-none);padding:var(--pine-dimension-none)}.pds-multiselect__selected-item{color:var(--pine-color-text-strong);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);overflow:hidden;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__listbox{background:transparent;border:var(--pine-dimension-none);-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;margin:var(--pine-dimension-none);overflow-y:auto;padding:var(--pine-dimension-xs)}.pds-multiselect__group-header{color:var(--pine-color-text-muted);display:block;font:var(--pine-typography-body-sm-medium);letter-spacing:var(--pine-letter-spacing);padding:var(--pine-dimension-sm) var(--pine-dimension-xs) var(--pine-dimension-2xs);text-transform:uppercase}.pds-multiselect__listbox>li:first-child>.pds-multiselect__group-header{-webkit-padding-before:var(--pine-dimension-xs);padding-block-start:var(--pine-dimension-xs)}.pds-multiselect__group-list{list-style:none;margin:var(--pine-dimension-none);padding:var(--pine-dimension-none)}.pds-multiselect__option{-ms-flex-align:center;align-items:center;background:transparent;border-radius:var(--pine-dimension-xs);cursor:pointer;display:-ms-flexbox;display:flex;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);-webkit-transition:background 0.15s;transition:background 0.15s}.pds-multiselect__option pds-checkbox{pointer-events:none;width:100%}.pds-multiselect__option:hover:not(.pds-multiselect__option--disabled),.pds-multiselect__option.pds-multiselect__option--highlighted:not(.pds-multiselect__option--disabled){background:var(--pine-color-background-muted)}.pds-multiselect__option.pds-multiselect__option--disabled{cursor:not-allowed;opacity:0.5}.pds-multiselect__option:focus-visible{outline:var(--pine-dimension-none)}.pds-multiselect__create-option{color:var(--pine-color-text-strong);width:100%}.pds-multiselect__create-option pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__empty,.pds-multiselect__loading{-ms-flex-align:center;align-items:center;color:var(--pine-color-text-muted);display:-ms-flexbox;display:flex;font:var(--pine-typography-body);-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-sm)}.pds-multiselect__load-more{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-xs)}.pds-multiselect__helper{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error{-ms-flex-align:start;align-items:flex-start;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error pds-icon{-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none);-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.visually-hidden{border:var(--pine-dimension-none);clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:var(--pine-dimension-none);position:absolute;white-space:nowrap;width:1px}`;
|
|
10
|
+
const pdsMultiselectCss = () => `:host{display:block}:host([aria-disabled=true]) .pds-multiselect__trigger{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}:host([aria-disabled=true]) .pds-multiselect__icon{color:var(--pine-color-text-disabled)}.pds-multiselect{position:relative}.pds-multiselect__label{color:var(--pine-color-text-label);display:block;font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-multiselect__wrapper{position:relative}.pds-multiselect__trigger{-ms-flex-align:center;align-items:center;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;letter-spacing:var(--pine-letter-spacing);min-height:var(--pine-dimension-450);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);position:relative;text-align:start;-webkit-transition:border-color var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, box-shadow var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease, box-shadow var(--pine-motion-duration-base) ease, -webkit-box-shadow var(--pine-motion-duration-base) ease;width:100%}.pds-multiselect__trigger:hover:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-hover)}.pds-multiselect__trigger:focus:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-multiselect__trigger.pds-multiselect__trigger--open{border-color:var(--pine-color-border-active)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid{background-color:var(--pine-color-red-050);border-color:var(--pine-color-border-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid:focus{outline-color:var(--pine-color-focus-ring-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-multiselect__trigger-text{color:var(--pine-color-text-strong);-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__trigger-text.pds-multiselect__trigger-text--placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__trigger--disabled .pds-multiselect__trigger-text{color:var(--pine-color-text-disabled)}.pds-multiselect__icon{color:var(--pine-color-icon);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__pill-list{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-2xs)}.pds-multiselect__pill-list--inline{-ms-flex:1;flex:1;min-width:0}.pds-multiselect__pill-list--below{-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-multiselect__pill-overflow{color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);white-space:nowrap}.pds-multiselect__trigger--pill-inline{-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-2xs);min-height:var(--pine-dimension-450);padding:var(--pine-dimension-2xs) var(--pine-dimension-sm)}.pds-multiselect__trigger--pill-inline.pds-multiselect__trigger--open{border-color:var(--pine-color-border-active)}.pds-multiselect__trigger--pill-inline:focus-within:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-multiselect__trigger--pill-inline.pds-multiselect__trigger--invalid:focus-within{outline-color:var(--pine-color-focus-ring-danger)}.pds-multiselect__pill-toggle{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border-width:0;cursor:pointer;display:-ms-flexbox;display:flex;padding:0}.pds-multiselect__pill-toggle:focus{outline:3px solid transparent}.pds-multiselect__trigger--disabled .pds-multiselect__pill-toggle{cursor:not-allowed;pointer-events:none}.pds-multiselect__panel{background:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:fixed;z-index:var(--pine-z-index-raised)}.pds-multiselect__search{-ms-flex-align:center;align-items:center;-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.pds-multiselect__search pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__search-input{background:transparent;border:var(--pine-dimension-none);color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-width:var(--pine-dimension-none);outline:none}.pds-multiselect__search-input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__selected-section{-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);padding:var(--pine-dimension-xs)}.pds-multiselect__selected-list{list-style:none;margin:var(--pine-dimension-none);padding:var(--pine-dimension-none)}.pds-multiselect__selected-item{color:var(--pine-color-text-strong);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);overflow:hidden;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__listbox{background:transparent;border:var(--pine-dimension-none);-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;margin:var(--pine-dimension-none);overflow-y:auto;padding:var(--pine-dimension-xs)}.pds-multiselect__group-header{color:var(--pine-color-text-muted);display:block;font:var(--pine-typography-body-sm-medium);letter-spacing:var(--pine-letter-spacing);padding:var(--pine-dimension-sm) var(--pine-dimension-xs) var(--pine-dimension-2xs);text-transform:uppercase}.pds-multiselect__listbox>li:first-child>.pds-multiselect__group-header{-webkit-padding-before:var(--pine-dimension-xs);padding-block-start:var(--pine-dimension-xs)}.pds-multiselect__group-list{list-style:none;margin:var(--pine-dimension-none);padding:var(--pine-dimension-none)}.pds-multiselect__option{-ms-flex-align:center;align-items:center;background:transparent;border-radius:var(--pine-dimension-xs);cursor:pointer;display:-ms-flexbox;display:flex;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);-webkit-transition:background 0.15s;transition:background 0.15s}.pds-multiselect__option pds-checkbox{pointer-events:none;width:100%}.pds-multiselect__option:hover:not(.pds-multiselect__option--disabled),.pds-multiselect__option.pds-multiselect__option--highlighted:not(.pds-multiselect__option--disabled){background:var(--pine-color-background-muted)}.pds-multiselect__option.pds-multiselect__option--disabled{cursor:not-allowed;opacity:0.5}.pds-multiselect__option:focus-visible{outline:var(--pine-dimension-none)}.pds-multiselect__option-action{-ms-flex-align:center;align-items:center;block-size:var(--pine-dimension-md);color:var(--pine-color-icon);cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-dimension-md);-ms-flex-pack:center;justify-content:center;-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}.pds-multiselect__create-option{color:var(--pine-color-text-strong);width:100%}.pds-multiselect__create-option pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__empty,.pds-multiselect__loading{-ms-flex-align:center;align-items:center;color:var(--pine-color-text-muted);display:-ms-flexbox;display:flex;font:var(--pine-typography-body);-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-sm)}.pds-multiselect__load-more{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-xs)}.pds-multiselect__footer{-webkit-border-before:var(--pine-border);border-block-start:var(--pine-border);border-block-start-color:var(--pine-color-border-subtle);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.pds-multiselect__helper{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error{-ms-flex-align:start;align-items:flex-start;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error pds-icon{-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none);-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.visually-hidden{border:var(--pine-dimension-none);clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:var(--pine-dimension-none);position:absolute;white-space:nowrap;width:1px}`;
|
|
11
11
|
|
|
12
|
+
// Names only: pds-icon's `icon` prop also fetches URLs and data: SVGs, unsanitized.
|
|
13
|
+
const PINE_ICON_NAME = /^[a-z0-9-]+$/i;
|
|
14
|
+
const TABBABLE_SELECTOR = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
12
15
|
const PdsMultiselect = class {
|
|
13
16
|
constructor(hostRef) {
|
|
14
17
|
index.registerInstance(this, hostRef);
|
|
@@ -17,6 +20,8 @@ const PdsMultiselect = class {
|
|
|
17
20
|
this.pdsMultiselectLoadOptions = index.createEvent(this, "pdsMultiselectLoadOptions");
|
|
18
21
|
this.pdsMultiselectCreate = index.createEvent(this, "pdsMultiselectCreate");
|
|
19
22
|
this.pdsMultiselectDismiss = index.createEvent(this, "pdsMultiselectDismiss");
|
|
23
|
+
this.pdsMultiselectOptionAction = index.createEvent(this, "pdsMultiselectOptionAction");
|
|
24
|
+
this.hasDisabledSlottedTrigger = false;
|
|
20
25
|
/**
|
|
21
26
|
* Placeholder text for the input field. Pass a translated string to localize it; defaults to English.
|
|
22
27
|
* @defaultValue 'Select...'
|
|
@@ -142,6 +147,13 @@ const PdsMultiselect = class {
|
|
|
142
147
|
* @default 3
|
|
143
148
|
*/
|
|
144
149
|
this.maxInlinePills = 3;
|
|
150
|
+
/**
|
|
151
|
+
* Display mode for options in the dropdown panel.
|
|
152
|
+
* `'text'` shows each option's text (default). `'chip'` shows each option as a
|
|
153
|
+
* pds-chip, with a dot when the option has a `dotColor`.
|
|
154
|
+
* @defaultValue 'text'
|
|
155
|
+
*/
|
|
156
|
+
this.optionDisplay = 'text';
|
|
145
157
|
/**
|
|
146
158
|
* If true, the multiselect is required.
|
|
147
159
|
*/
|
|
@@ -154,6 +166,21 @@ const PdsMultiselect = class {
|
|
|
154
166
|
* CSRF header name for authenticated requests. Defaults to `X-CSRF-Token`.
|
|
155
167
|
*/
|
|
156
168
|
this.csrfHeaderName = 'X-CSRF-Token';
|
|
169
|
+
/**
|
|
170
|
+
* Shows an action icon on each option that has an `actionIcon`, such as an edit pencil.
|
|
171
|
+
* The icon shows on the hovered or highlighted option; clicking it, or pressing Right Arrow on the highlighted option, emits `pdsMultiselectOptionAction`.
|
|
172
|
+
*/
|
|
173
|
+
this.optionActions = false;
|
|
174
|
+
/**
|
|
175
|
+
* Tooltip for an option's action icon when the option has no `actionLabel`. Pass a translated string to localize it; `{text}` is interpolated.
|
|
176
|
+
* @defaultValue 'Edit {text}'
|
|
177
|
+
*/
|
|
178
|
+
this.optionActionLabel = 'Edit {text}';
|
|
179
|
+
/**
|
|
180
|
+
* Screen-reader hint on each option that has an action, naming the key that runs it. Pass a translated string to localize it; `{action}` is interpolated with the option's action label.
|
|
181
|
+
* @defaultValue 'Press Right Arrow to {action}'
|
|
182
|
+
*/
|
|
183
|
+
this.optionActionDescription = 'Press Right Arrow to {action}';
|
|
157
184
|
// Internal state
|
|
158
185
|
this.isOpen = false;
|
|
159
186
|
this.searchQuery = '';
|
|
@@ -177,7 +204,7 @@ const PdsMultiselect = class {
|
|
|
177
204
|
return;
|
|
178
205
|
// In inline-pill mode, ignore clicks that originated inside a pds-chip.
|
|
179
206
|
// Chip close-button clicks are handled by handlePillRemove; chip body clicks should not toggle the panel.
|
|
180
|
-
if (e && this.selectedDisplay === 'pill' && this.pillPosition === 'inline') {
|
|
207
|
+
if (e && !this.slottedTriggerEl && this.selectedDisplay === 'pill' && this.pillPosition === 'inline') {
|
|
181
208
|
const fromChip = e.composedPath().some(el => { var _a; return ((_a = el.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'pds-chip'; });
|
|
182
209
|
if (fromChip)
|
|
183
210
|
return;
|
|
@@ -190,9 +217,11 @@ const PdsMultiselect = class {
|
|
|
190
217
|
}
|
|
191
218
|
};
|
|
192
219
|
this.handleTriggerKeyDown = (e) => {
|
|
220
|
+
if (this.disabled)
|
|
221
|
+
return;
|
|
193
222
|
// Ignore keydown events that bubbled from child elements (e.g. chip close buttons).
|
|
194
223
|
// Only handle keys when the trigger itself is the event target.
|
|
195
|
-
if (e.target !== this.
|
|
224
|
+
if (e.target !== this.activeTriggerEl)
|
|
196
225
|
return;
|
|
197
226
|
switch (e.key) {
|
|
198
227
|
case 'ArrowDown':
|
|
@@ -256,10 +285,43 @@ const PdsMultiselect = class {
|
|
|
256
285
|
}
|
|
257
286
|
}
|
|
258
287
|
break;
|
|
288
|
+
// Right Arrow still moves the caret through typed text; a plain Right Arrow at the end runs the action.
|
|
289
|
+
case 'ArrowRight': {
|
|
290
|
+
const option = filteredOptions[this.highlightedIndex];
|
|
291
|
+
const isPlainKey = !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.isComposing;
|
|
292
|
+
if (isPlainKey && option && this.hasOptionAction(option) && this.isCaretAtEndOfSearch()) {
|
|
293
|
+
e.preventDefault();
|
|
294
|
+
this.runOptionAction(option);
|
|
295
|
+
}
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
259
298
|
// Escape is handled by the global @Listen('keydown') handler
|
|
260
|
-
case 'Tab':
|
|
261
|
-
this.
|
|
299
|
+
case 'Tab': {
|
|
300
|
+
const firstFooterTabbable = e.shiftKey ? undefined : this.getFooterTabbables()[0];
|
|
301
|
+
firstFooterTabbable === null || firstFooterTabbable === void 0 ? void 0 : firstFooterTabbable.focus();
|
|
302
|
+
if (firstFooterTabbable === null || firstFooterTabbable === void 0 ? void 0 : firstFooterTabbable.matches(':focus')) {
|
|
303
|
+
// Each option's checkbox is a tab stop, so jump past them to the footer.
|
|
304
|
+
e.preventDefault();
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
this.closeDropdown();
|
|
308
|
+
}
|
|
262
309
|
break;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
this.handleFooterKeyDown = (e) => {
|
|
314
|
+
var _a;
|
|
315
|
+
if (e.key !== 'Tab')
|
|
316
|
+
return;
|
|
317
|
+
const tabbables = this.getFooterTabbables();
|
|
318
|
+
const focused = e.composedPath()[0];
|
|
319
|
+
if (e.shiftKey && focused === tabbables[0]) {
|
|
320
|
+
e.preventDefault();
|
|
321
|
+
(_a = this.searchInputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
322
|
+
}
|
|
323
|
+
else if (!e.shiftKey && focused === tabbables[tabbables.length - 1]) {
|
|
324
|
+
this.closeDropdown();
|
|
263
325
|
}
|
|
264
326
|
};
|
|
265
327
|
this.handleContainerFocusOut = () => {
|
|
@@ -274,9 +336,9 @@ const PdsMultiselect = class {
|
|
|
274
336
|
const activeElement = document.activeElement;
|
|
275
337
|
// Check if focus is within our component's shadow root
|
|
276
338
|
const isInShadowRoot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(activeElement);
|
|
277
|
-
// Also check
|
|
278
|
-
const
|
|
279
|
-
if (!isInShadowRoot && !
|
|
339
|
+
// Also check the host itself and its light DOM, where slotted trigger and footer content live
|
|
340
|
+
const isInHost = this.el.contains(activeElement);
|
|
341
|
+
if (!isInShadowRoot && !isInHost) {
|
|
280
342
|
this.pdsMultiselectDismiss.emit();
|
|
281
343
|
this.closeDropdown();
|
|
282
344
|
}
|
|
@@ -291,6 +353,18 @@ const PdsMultiselect = class {
|
|
|
291
353
|
return;
|
|
292
354
|
this.highlightedIndex = index;
|
|
293
355
|
};
|
|
356
|
+
this.handleOptionActionMouseDown = (e) => {
|
|
357
|
+
// Stops the row's mousedown from toggling the option, and keeps focus in the search input.
|
|
358
|
+
e.preventDefault();
|
|
359
|
+
e.stopPropagation();
|
|
360
|
+
};
|
|
361
|
+
this.handleOptionActionClick = (option) => () => {
|
|
362
|
+
this.runOptionAction(option);
|
|
363
|
+
};
|
|
364
|
+
// Keeps focus in the search input so the panel stays open until the footer's click lands.
|
|
365
|
+
this.handleFooterMouseDown = (e) => {
|
|
366
|
+
e.preventDefault();
|
|
367
|
+
};
|
|
294
368
|
this.handleScroll = (e) => {
|
|
295
369
|
if (!this.asyncUrl || !this.hasMore || this.loading)
|
|
296
370
|
return;
|
|
@@ -312,7 +386,7 @@ const PdsMultiselect = class {
|
|
|
312
386
|
const optionId = String(item.id);
|
|
313
387
|
this.value = this.value.filter(v => v !== optionId);
|
|
314
388
|
this.syncSelectedItems();
|
|
315
|
-
this.
|
|
389
|
+
this.emitChange({ removed: [optionId] });
|
|
316
390
|
// Clear first so screen readers re-announce even when the same item is removed twice
|
|
317
391
|
this.removalAnnouncement = '';
|
|
318
392
|
queueMicrotask(() => { this.removalAnnouncement = i18nFormat.formatMessage(this.itemRemovedLabel, { item: item.text }); });
|
|
@@ -321,7 +395,7 @@ const PdsMultiselect = class {
|
|
|
321
395
|
(_a = this.searchInputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
322
396
|
}
|
|
323
397
|
else {
|
|
324
|
-
(_b = this.
|
|
398
|
+
(_b = this.activeTriggerEl) === null || _b === void 0 ? void 0 : _b.focus();
|
|
325
399
|
}
|
|
326
400
|
setTimeout(() => { this.isClosingViaSelection = false; }, 0);
|
|
327
401
|
};
|
|
@@ -335,6 +409,7 @@ const PdsMultiselect = class {
|
|
|
335
409
|
componentWillLoad() {
|
|
336
410
|
this.originalSearchEmitter = this.pdsMultiselectSearch;
|
|
337
411
|
this.syncSelectedItems();
|
|
412
|
+
this.syncSlottedTrigger();
|
|
338
413
|
}
|
|
339
414
|
componentDidLoad() {
|
|
340
415
|
this.setupDebounce();
|
|
@@ -368,6 +443,7 @@ const PdsMultiselect = class {
|
|
|
368
443
|
}
|
|
369
444
|
disconnectedCallback() {
|
|
370
445
|
var _a, _b;
|
|
446
|
+
utils.cancelDebouncedEvent(this.pdsMultiselectSearch);
|
|
371
447
|
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
372
448
|
(_b = this.cleanupAutoUpdate) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
373
449
|
this.clearAsyncFetchState();
|
|
@@ -377,6 +453,8 @@ const PdsMultiselect = class {
|
|
|
377
453
|
this.pdsMultiselectSearch = debounce === undefined
|
|
378
454
|
? originalSearchEmitter !== null && originalSearchEmitter !== void 0 ? originalSearchEmitter : pdsMultiselectSearch
|
|
379
455
|
: utils.debounceEvent(pdsMultiselectSearch, debounce);
|
|
456
|
+
// After the swap, so an emit made while flushing goes to the new emitter, not the old one.
|
|
457
|
+
utils.flushDebouncedEvent(pdsMultiselectSearch);
|
|
380
458
|
}
|
|
381
459
|
valueChanged(newValue) {
|
|
382
460
|
// Handle JSON string values (from HTML attributes)
|
|
@@ -422,26 +500,42 @@ const PdsMultiselect = class {
|
|
|
422
500
|
// This handles the case where value is set before options are loaded (e.g., from slot)
|
|
423
501
|
this.syncSelectedItems();
|
|
424
502
|
}
|
|
503
|
+
isOpenChanged() {
|
|
504
|
+
var _a;
|
|
505
|
+
(_a = this.slottedTriggerEl) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-expanded', String(this.isOpen));
|
|
506
|
+
}
|
|
507
|
+
disabledChanged() {
|
|
508
|
+
this.syncSlottedTrigger();
|
|
509
|
+
}
|
|
425
510
|
/**
|
|
426
511
|
* Sets focus on the trigger button.
|
|
427
512
|
*/
|
|
428
513
|
async setFocus() {
|
|
429
514
|
var _a;
|
|
430
|
-
(_a = this.
|
|
515
|
+
(_a = this.activeTriggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
431
516
|
}
|
|
432
517
|
/**
|
|
433
518
|
* Clears all selected values and resets the component.
|
|
434
519
|
*/
|
|
435
520
|
async clear() {
|
|
436
521
|
const hadValues = this.value.length > 0 || this.searchQuery !== '';
|
|
522
|
+
const removed = this.ensureValueArray();
|
|
437
523
|
this.value = [];
|
|
438
524
|
this.searchQuery = '';
|
|
439
525
|
this.syncSelectedItems();
|
|
440
526
|
this.updateFormValue();
|
|
441
527
|
if (hadValues) {
|
|
442
|
-
this.
|
|
528
|
+
this.emitChange({ removed });
|
|
443
529
|
}
|
|
444
530
|
}
|
|
531
|
+
/**
|
|
532
|
+
* Refetches the first page of options from `asyncUrl` for the current search, such as after an option is renamed
|
|
533
|
+
* or recolored elsewhere. Selected items in that page pick up the new text and dot color without emitting a change;
|
|
534
|
+
* other selected items keep the text and dot color they were last loaded with. Does nothing without `asyncUrl`.
|
|
535
|
+
*/
|
|
536
|
+
async refreshOptions() {
|
|
537
|
+
await this.fetchOptions(this.searchQuery, 1);
|
|
538
|
+
}
|
|
445
539
|
/**
|
|
446
540
|
* Handle global keyboard events for accessibility.
|
|
447
541
|
* Closes dropdown on Escape key press regardless of focus location.
|
|
@@ -454,12 +548,70 @@ const PdsMultiselect = class {
|
|
|
454
548
|
event.preventDefault();
|
|
455
549
|
this.pdsMultiselectDismiss.emit();
|
|
456
550
|
this.closeDropdown();
|
|
457
|
-
(_a = this.
|
|
551
|
+
(_a = this.activeTriggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
get activeTriggerEl() {
|
|
555
|
+
var _a;
|
|
556
|
+
return (_a = this.slottedTriggerEl) !== null && _a !== void 0 ? _a : this.triggerEl;
|
|
557
|
+
}
|
|
558
|
+
syncSlottedTrigger() {
|
|
559
|
+
const trigger = Array.from(this.el.children).find(child => child.getAttribute('slot') === 'trigger');
|
|
560
|
+
if (trigger !== this.slottedTriggerEl) {
|
|
561
|
+
const previous = this.slottedTriggerEl;
|
|
562
|
+
if (previous) {
|
|
563
|
+
previous.removeEventListener('click', this.handleTriggerClick);
|
|
564
|
+
previous.removeEventListener('keydown', this.handleTriggerKeyDown);
|
|
565
|
+
previous.removeAttribute('aria-expanded');
|
|
566
|
+
previous.removeAttribute('aria-haspopup');
|
|
567
|
+
previous.removeAttribute('aria-disabled');
|
|
568
|
+
this.setSlottedTriggerDisabled(previous, false);
|
|
569
|
+
}
|
|
570
|
+
trigger === null || trigger === void 0 ? void 0 : trigger.addEventListener('click', this.handleTriggerClick);
|
|
571
|
+
trigger === null || trigger === void 0 ? void 0 : trigger.addEventListener('keydown', this.handleTriggerKeyDown);
|
|
572
|
+
this.slottedTriggerEl = trigger;
|
|
573
|
+
}
|
|
574
|
+
if (!trigger)
|
|
575
|
+
return;
|
|
576
|
+
trigger.setAttribute('aria-haspopup', 'listbox');
|
|
577
|
+
trigger.setAttribute('aria-expanded', String(this.isOpen));
|
|
578
|
+
if (this.disabled) {
|
|
579
|
+
trigger.setAttribute('aria-disabled', 'true');
|
|
580
|
+
}
|
|
581
|
+
else {
|
|
582
|
+
trigger.removeAttribute('aria-disabled');
|
|
583
|
+
}
|
|
584
|
+
this.setSlottedTriggerDisabled(trigger, this.disabled);
|
|
585
|
+
}
|
|
586
|
+
setSlottedTriggerDisabled(trigger, disabled) {
|
|
587
|
+
if (!('disabled' in trigger)) {
|
|
588
|
+
// A custom element gets its `disabled` property once it's defined, which can be after the multiselect loads.
|
|
589
|
+
if (disabled && trigger.localName.includes('-') && customElements.get(trigger.localName) === undefined) {
|
|
590
|
+
customElements.whenDefined(trigger.localName).then(() => this.syncSlottedTrigger());
|
|
591
|
+
}
|
|
592
|
+
return;
|
|
593
|
+
}
|
|
594
|
+
const control = trigger;
|
|
595
|
+
// Only re-enable a trigger the multiselect disabled, so one the consumer disabled stays disabled.
|
|
596
|
+
if (disabled && !control.disabled) {
|
|
597
|
+
control.disabled = true;
|
|
598
|
+
this.hasDisabledSlottedTrigger = true;
|
|
599
|
+
}
|
|
600
|
+
else if (!disabled && this.hasDisabledSlottedTrigger) {
|
|
601
|
+
control.disabled = false;
|
|
602
|
+
this.hasDisabledSlottedTrigger = false;
|
|
458
603
|
}
|
|
459
604
|
}
|
|
460
605
|
setupMutationObserver() {
|
|
461
|
-
this.observer = new MutationObserver(
|
|
462
|
-
this.
|
|
606
|
+
this.observer = new MutationObserver(records => {
|
|
607
|
+
if (records.some(record => record.target === this.el)) {
|
|
608
|
+
this.syncSlottedTrigger();
|
|
609
|
+
}
|
|
610
|
+
// Changes inside the slotted trigger, like re-rendered chips, can't change the options.
|
|
611
|
+
const trigger = this.slottedTriggerEl;
|
|
612
|
+
if (!trigger || records.some(record => !trigger.contains(record.target))) {
|
|
613
|
+
this.updateOptionsFromSlot();
|
|
614
|
+
}
|
|
463
615
|
});
|
|
464
616
|
this.observer.observe(this.el, {
|
|
465
617
|
childList: true,
|
|
@@ -473,18 +625,12 @@ const PdsMultiselect = class {
|
|
|
473
625
|
return;
|
|
474
626
|
const options = [];
|
|
475
627
|
slot.assignedElements({ flatten: true }).forEach(el => {
|
|
476
|
-
var _a;
|
|
477
628
|
if (el.tagName === 'OPTGROUP') {
|
|
478
629
|
const optgroup = el;
|
|
479
630
|
const groupLabel = optgroup.label;
|
|
480
631
|
const groupDisabled = optgroup.disabled;
|
|
481
632
|
optgroup.querySelectorAll('option').forEach((opt) => {
|
|
482
|
-
|
|
483
|
-
const option = {
|
|
484
|
-
id: opt.value,
|
|
485
|
-
text: ((_a = opt.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || opt.value,
|
|
486
|
-
disabled: opt.disabled || groupDisabled || undefined,
|
|
487
|
-
};
|
|
633
|
+
const option = this.parseSlottedOption(opt, groupDisabled);
|
|
488
634
|
if (groupLabel) {
|
|
489
635
|
option.group = groupLabel;
|
|
490
636
|
}
|
|
@@ -492,12 +638,7 @@ const PdsMultiselect = class {
|
|
|
492
638
|
});
|
|
493
639
|
}
|
|
494
640
|
else if (el.tagName === 'OPTION') {
|
|
495
|
-
|
|
496
|
-
options.push({
|
|
497
|
-
id: opt.value,
|
|
498
|
-
text: ((_a = opt.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || opt.value,
|
|
499
|
-
disabled: opt.disabled || undefined,
|
|
500
|
-
});
|
|
641
|
+
options.push(this.parseSlottedOption(el, false));
|
|
501
642
|
}
|
|
502
643
|
});
|
|
503
644
|
// Only update if we actually found options AND we're not using async/external options
|
|
@@ -506,6 +647,27 @@ const PdsMultiselect = class {
|
|
|
506
647
|
this.internalOptions = options;
|
|
507
648
|
}
|
|
508
649
|
}
|
|
650
|
+
parseSlottedOption(opt, groupDisabled) {
|
|
651
|
+
var _a;
|
|
652
|
+
const option = {
|
|
653
|
+
id: opt.value,
|
|
654
|
+
text: ((_a = opt.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || opt.value,
|
|
655
|
+
disabled: opt.disabled || groupDisabled || undefined,
|
|
656
|
+
};
|
|
657
|
+
const dotColor = opt.getAttribute('data-dot-color');
|
|
658
|
+
if (dotColor) {
|
|
659
|
+
option.dotColor = dotColor;
|
|
660
|
+
}
|
|
661
|
+
const actionIcon = opt.getAttribute('data-action-icon');
|
|
662
|
+
if (actionIcon) {
|
|
663
|
+
option.actionIcon = actionIcon;
|
|
664
|
+
}
|
|
665
|
+
const actionLabel = opt.getAttribute('data-action-label');
|
|
666
|
+
if (actionLabel) {
|
|
667
|
+
option.actionLabel = actionLabel;
|
|
668
|
+
}
|
|
669
|
+
return option;
|
|
670
|
+
}
|
|
509
671
|
clearAsyncFetchState() {
|
|
510
672
|
var _a;
|
|
511
673
|
if (this.fetchDebounceTimer !== undefined) {
|
|
@@ -615,7 +777,7 @@ const PdsMultiselect = class {
|
|
|
615
777
|
this.internals.setFormValue(formData);
|
|
616
778
|
// Update validity state for required validation
|
|
617
779
|
if (this.required && valueArray.length === 0) {
|
|
618
|
-
this.internals.setValidity({ valueMissing: true }, 'Please select at least one option.', this.
|
|
780
|
+
this.internals.setValidity({ valueMissing: true }, 'Please select at least one option.', this.activeTriggerEl);
|
|
619
781
|
}
|
|
620
782
|
else {
|
|
621
783
|
this.internals.setValidity({});
|
|
@@ -768,10 +930,7 @@ const PdsMultiselect = class {
|
|
|
768
930
|
newOption,
|
|
769
931
|
});
|
|
770
932
|
// Emit change event with synced items
|
|
771
|
-
this.
|
|
772
|
-
values: this.value,
|
|
773
|
-
items: this.selectedItems,
|
|
774
|
-
});
|
|
933
|
+
this.emitChange({ added: [String(newOption.id)] });
|
|
775
934
|
// Clear search and keep dropdown open
|
|
776
935
|
this.searchQuery = '';
|
|
777
936
|
this.highlightedIndex = -1;
|
|
@@ -788,6 +947,44 @@ const PdsMultiselect = class {
|
|
|
788
947
|
this.creating = false;
|
|
789
948
|
}
|
|
790
949
|
}
|
|
950
|
+
getFooterTabbables() {
|
|
951
|
+
const candidates = [];
|
|
952
|
+
Array.from(this.el.children)
|
|
953
|
+
.filter(child => child.getAttribute('slot') === 'footer')
|
|
954
|
+
.forEach(content => candidates.push(content, ...Array.from(content.querySelectorAll('*'))));
|
|
955
|
+
// Browsers without checkVisibility (Safari before 17.4) count every control as visible.
|
|
956
|
+
return candidates
|
|
957
|
+
.map(el => { var _a; return (el.matches(TABBABLE_SELECTOR) ? el : (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(TABBABLE_SELECTOR)); })
|
|
958
|
+
.filter((el) => { var _a, _b; return !!el && ((_b = (_a = el.checkVisibility) === null || _a === void 0 ? void 0 : _a.call(el)) !== null && _b !== void 0 ? _b : true); });
|
|
959
|
+
}
|
|
960
|
+
isCaretAtEndOfSearch() {
|
|
961
|
+
var _a, _b;
|
|
962
|
+
const input = this.searchInputEl;
|
|
963
|
+
if (!input)
|
|
964
|
+
return true;
|
|
965
|
+
const end = input.value.length;
|
|
966
|
+
return ((_a = input.selectionStart) !== null && _a !== void 0 ? _a : end) === end && ((_b = input.selectionEnd) !== null && _b !== void 0 ? _b : end) === end;
|
|
967
|
+
}
|
|
968
|
+
hasOptionAction(option) {
|
|
969
|
+
return (this.optionActions &&
|
|
970
|
+
typeof option.actionIcon === 'string' &&
|
|
971
|
+
PINE_ICON_NAME.test(option.actionIcon) &&
|
|
972
|
+
!option.isCreateOption &&
|
|
973
|
+
!option.disabled);
|
|
974
|
+
}
|
|
975
|
+
// Without hover, revealing the icon would take a tap that also toggles the option, so touch shows every icon.
|
|
976
|
+
get isHoverless() {
|
|
977
|
+
var _a, _b, _c;
|
|
978
|
+
(_a = this.hoverlessQuery) !== null && _a !== void 0 ? _a : (this.hoverlessQuery = (_b = window.matchMedia) === null || _b === void 0 ? void 0 : _b.call(window, '(hover: none)'));
|
|
979
|
+
return !!((_c = this.hoverlessQuery) === null || _c === void 0 ? void 0 : _c.matches);
|
|
980
|
+
}
|
|
981
|
+
runOptionAction(option) {
|
|
982
|
+
var _a;
|
|
983
|
+
this.isClosingViaSelection = true;
|
|
984
|
+
this.closeDropdown();
|
|
985
|
+
(_a = this.activeTriggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
986
|
+
this.pdsMultiselectOptionAction.emit({ option });
|
|
987
|
+
}
|
|
791
988
|
openDropdown() {
|
|
792
989
|
if (this.disabled)
|
|
793
990
|
return;
|
|
@@ -832,12 +1029,12 @@ const PdsMultiselect = class {
|
|
|
832
1029
|
return;
|
|
833
1030
|
// In inline pill mode, triggerEl is the small chevron button — use the full-width
|
|
834
1031
|
// wrapper div as the Floating UI reference so the panel aligns with the whole trigger.
|
|
835
|
-
const referenceEl = this.pillInlineTriggerEl || this.triggerEl || this.containerEl;
|
|
1032
|
+
const referenceEl = this.slottedTriggerEl || this.pillInlineTriggerEl || this.triggerEl || this.containerEl;
|
|
836
1033
|
const { minWidth, panelWidth } = this;
|
|
837
1034
|
const updatePosition = () => {
|
|
838
1035
|
floatingUi_dom.computePosition(referenceEl, this.panelEl, {
|
|
839
1036
|
placement: 'bottom-start',
|
|
840
|
-
strategy: '
|
|
1037
|
+
strategy: 'fixed',
|
|
841
1038
|
middleware: [
|
|
842
1039
|
floatingUi_dom.offset(12),
|
|
843
1040
|
floatingUi_dom.flip(),
|
|
@@ -874,6 +1071,9 @@ const PdsMultiselect = class {
|
|
|
874
1071
|
highlighted === null || highlighted === void 0 ? void 0 : highlighted.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
|
|
875
1072
|
});
|
|
876
1073
|
}
|
|
1074
|
+
emitChange({ added = [], removed = [] }) {
|
|
1075
|
+
this.pdsMultiselectChange.emit({ values: this.value, items: this.selectedItems, added, removed });
|
|
1076
|
+
}
|
|
877
1077
|
toggleOption(option) {
|
|
878
1078
|
var _a, _b;
|
|
879
1079
|
if (option.disabled)
|
|
@@ -902,14 +1102,11 @@ const PdsMultiselect = class {
|
|
|
902
1102
|
// Sync selected items to ensure no duplicates and accurate state
|
|
903
1103
|
this.syncSelectedItems();
|
|
904
1104
|
// Emit change event with synced items
|
|
905
|
-
this.
|
|
906
|
-
values: this.value,
|
|
907
|
-
items: this.selectedItems,
|
|
908
|
-
});
|
|
1105
|
+
this.emitChange(isSelected ? { removed: [optionId] } : { added: [optionId] });
|
|
909
1106
|
if (this.closePanelOnSelect) {
|
|
910
1107
|
this.isClosingViaSelection = true;
|
|
911
1108
|
this.closeDropdown();
|
|
912
|
-
(_a = this.
|
|
1109
|
+
(_a = this.activeTriggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
913
1110
|
}
|
|
914
1111
|
else {
|
|
915
1112
|
// Keep focus on search input, don't close dropdown
|
|
@@ -946,13 +1143,22 @@ const PdsMultiselect = class {
|
|
|
946
1143
|
const isHighlighted = index$1 === this.highlightedIndex && !isCreateOption;
|
|
947
1144
|
const optionId = `${this.componentId}-option-${index$1}`;
|
|
948
1145
|
const isCreateDisabled = isCreateOption && this.creating;
|
|
1146
|
+
const hasAction = this.hasOptionAction(option);
|
|
949
1147
|
return (index.h("li", { key: String(option.id), id: optionId, class: {
|
|
950
1148
|
'pds-multiselect__option': true,
|
|
951
1149
|
'pds-multiselect__option--highlighted': isHighlighted,
|
|
952
1150
|
'pds-multiselect__option--selected': isSelected,
|
|
953
1151
|
'pds-multiselect__option--create': isCreateOption,
|
|
954
1152
|
'pds-multiselect__option--disabled': isDisabled || isCreateDisabled,
|
|
955
|
-
}, role: "option", "aria-selected": isSelected ? 'true' : 'false', "aria-disabled": isDisabled || isCreateDisabled ? 'true' : undefined, "aria-label": isCreateOption ? i18nFormat.formatMessage(this.createOptionAriaLabel, { text: option.text }) : undefined, "data-index": index$1, onMouseDown: this.handleOptionMouseDown(option), onMouseEnter: this.handleOptionMouseEnter(index$1, option) }, isCreateOption ? (index.h("pds-box", { class: "pds-multiselect__create-option", "align-items": "center", gap: "xs" }, index.h("pds-icon", { name: "add", size: "small" }), index.h("pds-text", null, i18nFormat.formatMessage(this.createOptionLabel, { text: option.text })))) : (index.h("pds-checkbox", { componentId: `${this.componentId}-checkbox-${index$1}`, checked: isSelected, label: option.text, disabled: isDisabled, style: { pointerEvents: 'none' } }))));
|
|
1153
|
+
}, role: "option", "aria-selected": isSelected ? 'true' : 'false', "aria-disabled": isDisabled || isCreateDisabled ? 'true' : undefined, "aria-label": isCreateOption ? i18nFormat.formatMessage(this.createOptionAriaLabel, { text: option.text }) : undefined, "aria-describedby": hasAction ? `${optionId}-action-description` : undefined, "data-index": index$1, onMouseDown: this.handleOptionMouseDown(option), onMouseEnter: this.handleOptionMouseEnter(index$1, option) }, isCreateOption ? (index.h("pds-box", { class: "pds-multiselect__create-option", "align-items": "center", gap: "xs" }, index.h("pds-icon", { name: "add", size: "small" }), index.h("pds-text", null, i18nFormat.formatMessage(this.createOptionLabel, { text: option.text })))) : (index.h("pds-checkbox", { componentId: `${this.componentId}-checkbox-${index$1}`, checked: isSelected, label: option.text, disabled: isDisabled, style: { pointerEvents: 'none' } }, this.optionDisplay === 'chip' && (index.h("pds-chip", { slot: "label", sentiment: "subtle", dot: !!option.dotColor, "dot-color": option.dotColor }, option.text)))), hasAction && this.renderOptionAction(option, optionId, isHighlighted)));
|
|
1154
|
+
}
|
|
1155
|
+
renderOptionAction(option, optionId, isHighlighted) {
|
|
1156
|
+
var _a;
|
|
1157
|
+
const label = i18nFormat.formatMessage((_a = option.actionLabel) !== null && _a !== void 0 ? _a : this.optionActionLabel, { text: option.text });
|
|
1158
|
+
return [
|
|
1159
|
+
index.h("span", { class: "pds-multiselect__option-action", title: label, "aria-hidden": "true", onMouseDown: this.handleOptionActionMouseDown, onClick: this.handleOptionActionClick(option) }, (isHighlighted || this.isHoverless) && index.h("pds-icon", { name: option.actionIcon })),
|
|
1160
|
+
index.h("span", { id: `${optionId}-action-description`, hidden: true }, i18nFormat.formatMessage(this.optionActionDescription, { action: label })),
|
|
1161
|
+
];
|
|
956
1162
|
}
|
|
957
1163
|
renderSelectedItemsList() {
|
|
958
1164
|
if (this.hideSelectedItems || this.selectedItems.length === 0)
|
|
@@ -966,12 +1172,13 @@ const PdsMultiselect = class {
|
|
|
966
1172
|
const valueArray = this.ensureValueArray();
|
|
967
1173
|
const hasSlottedEmpty = !!this.el.querySelector('[slot="empty"]');
|
|
968
1174
|
const hasSlottedLoading = !!this.el.querySelector('[slot="loading"]');
|
|
1175
|
+
const hasSlottedFooter = !!this.el.querySelector('[slot="footer"]');
|
|
969
1176
|
return (index.h("div", { class: "pds-multiselect__panel", ref: el => (this.panelEl = el), style: { minWidth: this.minWidth } }, index.h("div", { class: "pds-multiselect__search" }, index.h("pds-icon", { name: "search", size: "small" }), index.h("input", { ref: el => (this.searchInputEl = el), type: "text", class: "pds-multiselect__search-input", placeholder: this.searchPlaceholder, value: this.searchQuery, "aria-label": this.searchOptionsLabel, "aria-controls": `${this.componentId}-listbox`, "aria-activedescendant": this.highlightedIndex >= 0 ? `${this.componentId}-option-${this.highlightedIndex}` : undefined, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": "true", "aria-autocomplete": "list", autocomplete: "off", onInput: this.handleSearchInputChange, onKeyDown: this.handleSearchInputKeyDown })), this.renderSelectedItemsList(), index.h("ul", { class: "pds-multiselect__listbox", role: "listbox", "aria-multiselectable": "true", "aria-label": this.label || this.optionsLabel, id: `${this.componentId}-listbox`, ref: el => (this.listboxEl = el), style: { maxHeight: this.maxHeight }, onScroll: this.handleScroll }, this.loading && (index.h("li", { class: "pds-multiselect__loading", role: "presentation" }, hasSlottedLoading ? (index.h("slot", { name: "loading" })) : (index.h("pds-loader", { size: "small" })))), !this.loading && filteredOptions.length === 0 && (index.h("li", { class: "pds-multiselect__empty", role: "presentation" }, hasSlottedEmpty ? (index.h("slot", { name: "empty" })) : (index.h("span", null, this.noOptionsFoundLabel)))), this.getGroupedRenderItems(filteredOptions).map((item, itemIndex) => {
|
|
970
1177
|
if (item.type === 'group') {
|
|
971
1178
|
return (index.h("li", { key: `group-${itemIndex}`, role: "group", "aria-label": item.group, class: "pds-multiselect__group" }, index.h("span", { class: "pds-multiselect__group-header", "aria-hidden": "true" }, item.group), index.h("ul", { class: "pds-multiselect__group-list", role: "presentation" }, item.options.map(({ option, index }) => this.renderOption(option, index, valueArray)))));
|
|
972
1179
|
}
|
|
973
1180
|
return this.renderOption(item.option, item.index, valueArray);
|
|
974
|
-
}), this.hasMore && !this.loading && (index.h("li", { class: "pds-multiselect__load-more", role: "presentation" }, index.h("pds-loader", { size: "small" }))))));
|
|
1181
|
+
}), this.hasMore && !this.loading && (index.h("li", { class: "pds-multiselect__load-more", role: "presentation" }, index.h("pds-loader", { size: "small" })))), hasSlottedFooter && (index.h("div", { class: "pds-multiselect__footer", onMouseDown: this.handleFooterMouseDown, onKeyDown: this.handleFooterKeyDown }, index.h("slot", { name: "footer" })))));
|
|
975
1182
|
}
|
|
976
1183
|
renderInlinePills() {
|
|
977
1184
|
const hasSelections = this.selectedItems.length > 0;
|
|
@@ -1025,17 +1232,17 @@ const PdsMultiselect = class {
|
|
|
1025
1232
|
}
|
|
1026
1233
|
render() {
|
|
1027
1234
|
const hasSelections = this.selectedItems.length > 0;
|
|
1028
|
-
return (index.h(index.Host, { key: '
|
|
1235
|
+
return (index.h(index.Host, { key: '295354c218d03a512ee87a9f19d2267a59731eb1', "aria-disabled": this.disabled ? 'true' : null }, index.h("div", { key: '8696c02fad869239fa85dcec7f92a3efb402c963', class: "pds-multiselect", onFocusout: this.handleContainerFocusOut }, this.label && (index.h("label", { key: '2a9cc565c5dbcf78305eb65e94d795669fb0f93b', id: `${this.componentId}-label`, htmlFor: this.componentId, class: {
|
|
1029
1236
|
'pds-multiselect__label': true,
|
|
1030
1237
|
'visually-hidden': this.hideLabel,
|
|
1031
|
-
} }, this.label)), index.h("div", { key: '
|
|
1238
|
+
} }, this.label)), index.h("div", { key: '9358ebffb50e74fe4ceb9ca1c13cf819cc3e96e6', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), style: { width: this.triggerWidth } }, this.slottedTriggerEl ? (index.h("slot", { name: "trigger" })) : this.selectedDisplay === 'pill' && this.pillPosition === 'inline' ? (index.h("div", { ref: el => (this.pillInlineTriggerEl = el || undefined), part: "trigger", class: {
|
|
1032
1239
|
'pds-multiselect__trigger': true,
|
|
1033
1240
|
'pds-multiselect__trigger--open': this.isOpen,
|
|
1034
1241
|
'pds-multiselect__trigger--disabled': this.disabled,
|
|
1035
1242
|
'pds-multiselect__trigger--invalid': this.invalid || !!this.errorMessage,
|
|
1036
1243
|
'pds-multiselect__trigger--has-value': hasSelections,
|
|
1037
1244
|
'pds-multiselect__trigger--pill-inline': true,
|
|
1038
|
-
}, onClick: this.handleTriggerClick }, this.renderInlinePills(), index.h("button", { ref: el => (this.triggerEl = el), type: "button", id: this.componentId, part: "pill-toggle", class: "pds-multiselect__pill-toggle", disabled: this.disabled, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-labelledby": this.label ? `${this.componentId}-label` : undefined, "aria-required": this.required ? 'true' : undefined, "aria-describedby": form.assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onKeyDown: this.handleTriggerKeyDown }, index.h("pds-icon", { class: "pds-multiselect__icon", icon: index$1.enlarge })))) : (index.h("button", { ref: el => (this.triggerEl = el), type: "button", part: "trigger", class: {
|
|
1245
|
+
}, onClick: this.handleTriggerClick }, this.renderInlinePills(), index.h("button", { ref: el => (this.triggerEl = el), type: "button", id: this.componentId, part: "pill-toggle", class: "pds-multiselect__pill-toggle", disabled: this.disabled, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-labelledby": this.label ? `${this.componentId}-label` : undefined, "aria-required": this.required ? 'true' : undefined, "aria-describedby": form.assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onKeyDown: this.handleTriggerKeyDown }, index.h("pds-icon", { "aria-hidden": "true", class: "pds-multiselect__icon", icon: index$1.enlarge })))) : (index.h("button", { ref: el => (this.triggerEl = el), type: "button", part: "trigger", class: {
|
|
1039
1246
|
'pds-multiselect__trigger': true,
|
|
1040
1247
|
'pds-multiselect__trigger--open': this.isOpen,
|
|
1041
1248
|
'pds-multiselect__trigger--disabled': this.disabled,
|
|
@@ -1044,7 +1251,7 @@ const PdsMultiselect = class {
|
|
|
1044
1251
|
}, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": form.assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, index.h("span", { class: {
|
|
1045
1252
|
'pds-multiselect__trigger-text': true,
|
|
1046
1253
|
'pds-multiselect__trigger-text--placeholder': !hasSelections || (this.selectedDisplay === 'pill' && this.pillPosition === 'below'),
|
|
1047
|
-
} }, this.getTriggerText()), index.h("pds-icon", { class: "pds-multiselect__icon", icon: index$1.enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), index.h("span", { key: '
|
|
1254
|
+
} }, this.getTriggerText()), index.h("pds-icon", { "aria-hidden": "true", class: "pds-multiselect__icon", icon: index$1.enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), index.h("span", { key: '722da251199792366dc72b6c7f016e24ae807b30', class: "visually-hidden", "aria-live": "polite", "aria-atomic": "true" }, this.removalAnnouncement), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (index.h("p", { key: '7b4da9b2e04f53f3e8f245c119135f3b664897ec', class: "pds-multiselect__helper", id: form.messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (index.h("p", { key: '95a152f6a350eee2f67dbab2930f19e583ca3b85', class: "pds-multiselect__error", id: form.messageId(this.componentId, 'error') }, index.h("pds-icon", { key: '7b9cded907054757a6f054d0d325811a2199e496', icon: index$1.danger, size: "small" }), this.errorMessage)), index.h("div", { key: '8b07974c8e2d838d76c17c3a52ba4282fb101968', style: { display: 'none' } }, index.h("slot", { key: '0a34d582bc4dd780072f00ac13bfdce7e297191e' })))));
|
|
1048
1255
|
}
|
|
1049
1256
|
static get formAssociated() { return true; }
|
|
1050
1257
|
get el() { return index.getElement(this); }
|
|
@@ -1060,6 +1267,12 @@ const PdsMultiselect = class {
|
|
|
1060
1267
|
}],
|
|
1061
1268
|
"internalOptions": [{
|
|
1062
1269
|
"internalOptionsChanged": 0
|
|
1270
|
+
}],
|
|
1271
|
+
"isOpen": [{
|
|
1272
|
+
"isOpenChanged": 0
|
|
1273
|
+
}],
|
|
1274
|
+
"disabled": [{
|
|
1275
|
+
"disabledChanged": 0
|
|
1063
1276
|
}]
|
|
1064
1277
|
}; }
|
|
1065
1278
|
};
|