@pine-ds/core 4.2.0 → 4.4.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/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-icon2.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-CuQil7H0.js → index-Bl5KnQay.js} +4 -1
- package/dist/cjs/{index-Bu3NXpbK.js → index-D-QQKB0y.js} +9 -1
- 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 +54 -5
- package/dist/cjs/pds-checkbox.cjs.entry.js +14 -6
- package/dist/cjs/pds-chip.cjs.entry.js +34 -9
- 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 +2 -2
- 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 +42 -8
- 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 +4 -2
- 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 +6 -6
- 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-7jx8T2mW.js → utils-BhRmyxT8.js} +51 -6
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/pds-button/pds-button.css +1 -2
- package/dist/collection/components/pds-button/pds-button.js +53 -2
- package/dist/collection/components/pds-checkbox/pds-checkbox.css +13 -4
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +19 -3
- package/dist/collection/components/pds-chip/pds-chip.css +60 -6
- package/dist/collection/components/pds-chip/pds-chip.js +69 -4
- package/dist/collection/components/pds-chip/pds-chip.tokens.css +16 -0
- package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +39 -1
- package/dist/collection/components/pds-combobox/grouped-options-panel.js +262 -0
- package/dist/collection/components/pds-combobox/pds-combobox.css +243 -15
- package/dist/collection/components/pds-combobox/pds-combobox.js +1129 -115
- 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 +20 -0
- package/dist/collection/components/pds-modal/pds-modal.js +55 -10
- package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +14 -0
- 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 +3 -1
- package/dist/collection/components/pds-property/pds-property.js +1 -1
- package/dist/collection/components/pds-radio/pds-radio.css +1 -2
- 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 +49 -6
- package/dist/docs.json +2055 -84
- 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-CTLu1TM4.js → index-CB8Yh0Nt.js} +4 -1
- package/dist/esm/{index-DdPaBxPo.js → index-DxI-61GK.js} +6 -2
- 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 +54 -5
- package/dist/esm/pds-checkbox.entry.js +14 -6
- package/dist/esm/pds-chip.entry.js +34 -9
- 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 +2 -2
- 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 +42 -8
- 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 +4 -2
- 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 +6 -6
- 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-tJa4KYNO.js → utils-OYK5-nwe.js} +50 -7
- 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-0414092a.system.entry.js +1 -0
- package/dist/pine-core/p-04807201.entry.js +1 -0
- package/dist/pine-core/{p-56b34569.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-15d3a4bc.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-4d388957.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-3464b456.system.entry.js → p-1057b8c3.system.entry.js} +1 -1
- package/dist/pine-core/{p-bf3afa16.system.entry.js → p-108c910a.system.entry.js} +1 -1
- package/dist/pine-core/{p-53a4852e.system.entry.js → p-166f61a6.system.entry.js} +1 -1
- package/dist/pine-core/{p-31e1722e.entry.js → p-16c8f5e3.entry.js} +1 -1
- package/dist/pine-core/p-16e258d1.entry.js +1 -0
- package/dist/pine-core/{p-591fbff5.entry.js → p-1be33c95.entry.js} +1 -1
- package/dist/pine-core/p-1e3a31da.entry.js +1 -0
- package/dist/pine-core/p-1f228db9.entry.js +1 -0
- 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-31aee437.entry.js +1 -0
- package/dist/pine-core/p-330a76f6.system.entry.js +1 -0
- package/dist/pine-core/{p-3c4236a8.system.entry.js → p-33c63be6.system.entry.js} +1 -1
- package/dist/pine-core/{p-d46adf7d.entry.js → p-344609f9.entry.js} +2 -2
- package/dist/pine-core/{p-049681fc.entry.js → p-3a1711c1.entry.js} +1 -1
- package/dist/pine-core/p-3a9c58bd.system.entry.js +1 -0
- package/dist/pine-core/{p-e3a7d2db.entry.js → p-3ebd543f.entry.js} +1 -1
- package/dist/pine-core/p-3fbcb0c8.system.entry.js +1 -0
- package/dist/pine-core/{p-b923a70b.entry.js → p-427b4aeb.entry.js} +1 -1
- package/dist/pine-core/{p-5772f260.system.entry.js → p-42bd87ea.system.entry.js} +1 -1
- package/dist/pine-core/{p-1e2a9b5d.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-4b8cf04a.system.entry.js +1 -0
- package/dist/pine-core/p-4d6f471c.entry.js +1 -0
- package/dist/pine-core/{p-3e0c6384.entry.js → p-4e7580c4.entry.js} +1 -1
- package/dist/pine-core/{p-0ab735aa.system.entry.js → p-4f4a2d2a.system.entry.js} +1 -1
- package/dist/pine-core/{p-7e2b934d.entry.js → p-5211aba7.entry.js} +1 -1
- package/dist/pine-core/{p-376f8286.entry.js → p-524b7d3f.entry.js} +1 -1
- package/dist/pine-core/{p-3f12afb1.entry.js → p-5613c64c.entry.js} +1 -1
- package/dist/pine-core/p-5bb24cb4.entry.js +1 -0
- package/dist/pine-core/{p-d7865297.entry.js → p-5bb80b3c.entry.js} +1 -1
- package/dist/pine-core/{p-e3cd4627.system.entry.js → p-5c6e0a26.system.entry.js} +1 -1
- package/dist/pine-core/{p-51dff5af.system.entry.js → p-5db57551.system.entry.js} +1 -1
- package/dist/pine-core/{p-f94667b5.entry.js → p-5eb00ba5.entry.js} +1 -1
- package/dist/pine-core/p-61756414.system.entry.js +1 -0
- package/dist/pine-core/{p-e5bbe8cc.entry.js → p-682e9e8f.entry.js} +1 -1
- package/dist/pine-core/p-6965db1d.entry.js +1 -0
- package/dist/pine-core/{p-5aea1082.entry.js → p-6b180ee2.entry.js} +1 -1
- package/dist/pine-core/{p-d21739eb.entry.js → p-6c53962f.entry.js} +1 -1
- package/dist/pine-core/p-6da6520b.system.entry.js +3 -0
- package/dist/pine-core/p-6e3bf862.system.entry.js +1 -0
- package/dist/pine-core/{p-053b0898.system.entry.js → p-71c9f866.system.entry.js} +1 -1
- package/dist/pine-core/{p-78fd593d.system.entry.js → p-7265b94c.system.entry.js} +1 -1
- package/dist/pine-core/{p-9187c26c.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-e1653d75.system.entry.js → p-79aa5f43.system.entry.js} +1 -1
- package/dist/pine-core/p-7bbcda0f.system.entry.js +1 -0
- 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-81292c03.system.entry.js +1 -0
- package/dist/pine-core/p-81300046.system.entry.js +1 -0
- package/dist/pine-core/{p-a11a9c40.system.entry.js → p-8252cd84.system.entry.js} +1 -1
- package/dist/pine-core/{p-d0d2a886.system.entry.js → p-84ba0e6a.system.entry.js} +1 -1
- package/dist/pine-core/{p-c1f8a187.entry.js → p-86fc0bfa.entry.js} +1 -1
- package/dist/pine-core/p-90692bb6.entry.js +1 -0
- package/dist/pine-core/{p-2eb8d697.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-714bfdbd.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-a85535a4.system.entry.js +1 -0
- 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-f7a5062f.entry.js → p-b0526f98.entry.js} +1 -1
- package/dist/pine-core/p-b130b716.entry.js +1 -0
- package/dist/pine-core/{p-09413b07.entry.js → p-b195d345.entry.js} +1 -1
- package/dist/pine-core/{p-e3600c53.entry.js → p-b4923acf.entry.js} +1 -1
- package/dist/pine-core/{p-e410b0d8.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-e95225cf.entry.js → p-b8ada1eb.entry.js} +1 -1
- package/dist/pine-core/{p-1614c000.system.entry.js → p-bb85bbb5.system.entry.js} +1 -1
- package/dist/pine-core/{p-fec298bb.system.entry.js → p-bbc539bc.system.entry.js} +2 -2
- package/dist/pine-core/{p-f21aea90.system.entry.js → p-bf833976.system.entry.js} +1 -1
- package/dist/pine-core/{p-c5ce6dea.entry.js → p-c23097af.entry.js} +1 -1
- package/dist/pine-core/p-c2dd84bd.system.entry.js +1 -0
- package/dist/pine-core/{p-869ed1c0.system.entry.js → p-c4520b04.system.entry.js} +1 -1
- package/dist/pine-core/{p-3605a5f5.entry.js → p-c4f68dfc.entry.js} +1 -1
- package/dist/pine-core/{p-d9ffb2d9.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-86bc2a0c.entry.js → p-d0d7d1d4.entry.js} +1 -1
- package/dist/pine-core/{p-b109de2e.entry.js → p-d1112c8a.entry.js} +1 -1
- package/dist/pine-core/p-d4e91ad9.system.entry.js +1 -0
- package/dist/pine-core/{p-7b1e3e91.entry.js → p-da018dcb.entry.js} +1 -1
- package/dist/pine-core/{p-c09dab1a.system.entry.js → p-dc27abe6.system.entry.js} +1 -1
- package/dist/pine-core/{p-3eca0b00.entry.js → p-dc343b6d.entry.js} +1 -1
- package/dist/pine-core/p-dde753e7.system.entry.js +1 -0
- package/dist/pine-core/{p-f35596cd.entry.js → p-dea3a582.entry.js} +1 -1
- package/dist/pine-core/p-df29fd41.entry.js +1 -0
- package/dist/pine-core/{p-1f307e59.system.entry.js → p-e4e2eae2.system.entry.js} +1 -1
- package/dist/pine-core/{p-51b8490d.entry.js → p-e8668178.entry.js} +1 -1
- package/dist/pine-core/{p-5dd393cd.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-8eef80d5.entry.js → p-ed63873c.entry.js} +1 -1
- package/dist/pine-core/{p-12182cab.entry.js → p-f4f6dc36.entry.js} +1 -1
- package/dist/pine-core/{p-be819bff.system.entry.js → p-f67a0ca8.system.entry.js} +1 -1
- package/dist/pine-core/p-fc455968.entry.js +1 -0
- package/dist/pine-core/{p-92ef1608.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-chip/pds-chip.d.ts +12 -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-modal/pds-modal.d.ts +9 -2
- 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 +702 -11
- package/dist/types/utils/closest.d.ts +2 -0
- package/dist/types/utils/types.d.ts +2 -1
- package/dist/types/utils/utils.d.ts +25 -2
- package/dist/vscode.html-data.json +497 -7
- package/hydrate/index.js +4059 -377
- package/hydrate/index.mjs +4059 -377
- 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-CTLu1TM4.js +0 -2
- package/dist/esm-es5/index-DdPaBxPo.js +0 -1
- package/dist/esm-es5/utils-tJa4KYNO.js +0 -1
- package/dist/pine-core/p--Llh7wKm.system.js +0 -1
- package/dist/pine-core/p-02a47ebb.entry.js +0 -1
- package/dist/pine-core/p-12ec8186.system.entry.js +0 -1
- package/dist/pine-core/p-17dc3f87.entry.js +0 -1
- package/dist/pine-core/p-18a59cdd.system.entry.js +0 -1
- package/dist/pine-core/p-2016c878.entry.js +0 -1
- package/dist/pine-core/p-222ff58e.system.entry.js +0 -1
- package/dist/pine-core/p-324a7ae4.system.entry.js +0 -1
- package/dist/pine-core/p-32f10aa9.entry.js +0 -1
- package/dist/pine-core/p-33c0f3c9.system.entry.js +0 -1
- package/dist/pine-core/p-34e38037.system.entry.js +0 -1
- package/dist/pine-core/p-3873f55b.entry.js +0 -1
- package/dist/pine-core/p-3aec9079.entry.js +0 -1
- package/dist/pine-core/p-3c229a00.system.entry.js +0 -1
- package/dist/pine-core/p-43338f77.system.entry.js +0 -1
- package/dist/pine-core/p-4661259e.system.entry.js +0 -1
- package/dist/pine-core/p-585ad368.system.entry.js +0 -1
- package/dist/pine-core/p-5d585aa8.entry.js +0 -1
- package/dist/pine-core/p-613a64f1.entry.js +0 -1
- package/dist/pine-core/p-630f33d6.system.entry.js +0 -1
- package/dist/pine-core/p-63686e2a.system.entry.js +0 -1
- package/dist/pine-core/p-6f7a7d55.entry.js +0 -1
- package/dist/pine-core/p-6fd863e5.system.entry.js +0 -1
- package/dist/pine-core/p-76286a68.system.entry.js +0 -1
- package/dist/pine-core/p-7691a875.system.entry.js +0 -3
- package/dist/pine-core/p-7e44106e.entry.js +0 -1
- package/dist/pine-core/p-84ade640.entry.js +0 -1
- package/dist/pine-core/p-8be301b6.entry.js +0 -1
- package/dist/pine-core/p-8cc270f0.system.entry.js +0 -1
- package/dist/pine-core/p-8cea0d7a.system.entry.js +0 -1
- package/dist/pine-core/p-957dbb0c.entry.js +0 -1
- package/dist/pine-core/p-BG6uGRQj.system.js +0 -1
- package/dist/pine-core/p-BKsJZTyn.js +0 -1
- package/dist/pine-core/p-BrLs99ML.system.js +0 -1
- package/dist/pine-core/p-CTLu1TM4.js +0 -2
- package/dist/pine-core/p-Cr7-rJtJ.system.js +0 -1
- package/dist/pine-core/p-DAIsVNlL.system.js +0 -2
- package/dist/pine-core/p-DDtwbwIl.js +0 -1
- package/dist/pine-core/p-DdPaBxPo.js +0 -1
- package/dist/pine-core/p-DnUJodVd.js +0 -1
- package/dist/pine-core/p-Dr-FzkdE.system.js +0 -1
- package/dist/pine-core/p-a4a58477.entry.js +0 -1
- package/dist/pine-core/p-a98bf89f.system.entry.js +0 -1
- package/dist/pine-core/p-ac0098fd.entry.js +0 -1
- package/dist/pine-core/p-b32e3174.system.entry.js +0 -1
- package/dist/pine-core/p-be4a6cc2.entry.js +0 -1
- package/dist/pine-core/p-c0b3f2c1.system.entry.js +0 -1
- package/dist/pine-core/p-c8bffb08.system.entry.js +0 -1
- package/dist/pine-core/p-cf24ed1e.system.entry.js +0 -1
- package/dist/pine-core/p-d12ef40d.entry.js +0 -1
- package/dist/pine-core/p-d280741f.entry.js +0 -1
- package/dist/pine-core/p-d415bb01.entry.js +0 -2
- package/dist/pine-core/p-d43db3ba.entry.js +0 -1
- package/dist/pine-core/p-db5703f2.entry.js +0 -1
- package/dist/pine-core/p-dd6d9807.system.entry.js +0 -1
- package/dist/pine-core/p-e0da17aa.system.entry.js +0 -1
- package/dist/pine-core/p-ed297f3e.entry.js +0 -1
- package/dist/pine-core/p-fbf5f315.entry.js +0 -1
- package/dist/pine-core/p-kYMYDfJY.system.js +0 -1
- package/dist/pine-core/p-tJa4KYNO.js +0 -1
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { autoUpdate, computePosition, flip, hide, offset, shift, size } from "@floating-ui/dom";
|
|
2
|
+
/** The optgroup an option sits in, or null for an ungrouped option. */
|
|
3
|
+
export function parentOptgroupOf(option) {
|
|
4
|
+
const parent = option === null || option === void 0 ? void 0 : option.parentElement;
|
|
5
|
+
return parent !== null && parent !== undefined && parent.tagName === 'OPTGROUP' ? parent : null;
|
|
6
|
+
}
|
|
7
|
+
/** A Pine icon name: letters, digits and hyphens, such as `hashtag`. Never a URL or file path. */
|
|
8
|
+
const PINE_ICON_NAME = /^[a-z0-9-]+$/i;
|
|
9
|
+
/**
|
|
10
|
+
* An optgroup's `data-icon` when it's a Pine icon name, or null. One definition of a usable group
|
|
11
|
+
* icon for every mode, checked here rather than trusting `pds-icon` to reject anything else; it is
|
|
12
|
+
* only ever passed to `pds-icon` as `name`.
|
|
13
|
+
*/
|
|
14
|
+
export function groupIconOf(optgroup) {
|
|
15
|
+
const icon = optgroup.getAttribute('data-icon');
|
|
16
|
+
return icon !== null && PINE_ICON_NAME.test(icon) ? icon : null;
|
|
17
|
+
}
|
|
18
|
+
/** An option is disabled by its own `disabled` or its optgroup's, as in a native select. */
|
|
19
|
+
export function isOptionDisabled(option) {
|
|
20
|
+
var _a;
|
|
21
|
+
if (option === null || option === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
return option.hasAttribute('disabled') || ((_a = parentOptgroupOf(option)) === null || _a === void 0 ? void 0 : _a.hasAttribute('disabled')) === true;
|
|
24
|
+
}
|
|
25
|
+
/** A group with no option left to choose. It still opens, so its options can be seen. */
|
|
26
|
+
export function isGroupDisabled(group) {
|
|
27
|
+
return group.options.every(({ option }) => isOptionDisabled(option));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Groups the combobox's filtered items for the panel: each optgroup becomes one entry holding its
|
|
31
|
+
* options, and ungrouped options stay where they are. Indexes count options in list order, the
|
|
32
|
+
* same as the inline listbox, so `data-option-index` means the same thing in every mode.
|
|
33
|
+
*/
|
|
34
|
+
export function buildPanelEntries(items) {
|
|
35
|
+
const entries = [];
|
|
36
|
+
const groups = new Map();
|
|
37
|
+
let index = 0;
|
|
38
|
+
items.forEach(item => {
|
|
39
|
+
if (item.tagName !== 'OPTION')
|
|
40
|
+
return;
|
|
41
|
+
const option = item;
|
|
42
|
+
const optgroup = parentOptgroupOf(option);
|
|
43
|
+
if (optgroup !== null) {
|
|
44
|
+
let group = groups.get(optgroup);
|
|
45
|
+
if (!group) {
|
|
46
|
+
group = { optgroup, label: optgroup.label, icon: groupIconOf(optgroup), options: [] };
|
|
47
|
+
groups.set(optgroup, group);
|
|
48
|
+
entries.push({ kind: 'group', group });
|
|
49
|
+
}
|
|
50
|
+
group.options.push({ option, index: index++ });
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
entries.push({ kind: 'option', option, index: index++ });
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return entries;
|
|
57
|
+
}
|
|
58
|
+
/** The label of the optgroup an option sits in, or null for an ungrouped option. */
|
|
59
|
+
export function groupLabelOf(option) {
|
|
60
|
+
var _a, _b;
|
|
61
|
+
return (_b = (_a = parentOptgroupOf(option)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : null;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The items Up and Down move through from `current`, one tree level at a time: the panel's rows
|
|
65
|
+
* (groups and ungrouped options), or the open group's options. Drilled into a group, its row
|
|
66
|
+
* (drawn as the row back) comes first, above its options, as a tree draws a parent above its children.
|
|
67
|
+
* Disabled options and groups stay in it, as the APG listbox and tree patterns advise, so they're
|
|
68
|
+
* announced as unavailable rather than hidden from the keyboard.
|
|
69
|
+
*/
|
|
70
|
+
export function panelColumn(entries, openGroup, current, drilledIn) {
|
|
71
|
+
const open = openGroup === null ? undefined : findGroup(entries, openGroup);
|
|
72
|
+
if (open !== undefined) {
|
|
73
|
+
const options = open.options.map(({ index }) => index);
|
|
74
|
+
if (drilledIn)
|
|
75
|
+
return [open.optgroup, ...options];
|
|
76
|
+
if (typeof current === 'number' && options.includes(current))
|
|
77
|
+
return options;
|
|
78
|
+
}
|
|
79
|
+
return entries.map(entry => (entry.kind === 'group' ? entry.group.optgroup : entry.index));
|
|
80
|
+
}
|
|
81
|
+
/** The panel's group for an optgroup, if it's showing. */
|
|
82
|
+
export function findGroup(entries, optgroup) {
|
|
83
|
+
for (const entry of entries) {
|
|
84
|
+
if (entry.kind === 'group' && entry.group.optgroup === optgroup)
|
|
85
|
+
return entry.group;
|
|
86
|
+
}
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
/** Moving from one group row to another waits this long, so a diagonal trip into the flyout doesn't switch groups. */
|
|
90
|
+
const SWITCH_DELAY_MS = 120;
|
|
91
|
+
/** Leaving a group (into the gap beside its flyout, say) waits this long before closing it. */
|
|
92
|
+
const CLOSE_DELAY_MS = 200;
|
|
93
|
+
/** Space between the panel's edge and the flyout: --pine-dimension-050 (4px), per the Figma frames. */
|
|
94
|
+
const FLYOUT_GAP_PX = 4;
|
|
95
|
+
/** How close the flyout may come to the viewport edge: --pine-dimension-100 (8px). */
|
|
96
|
+
const VIEWPORT_PADDING_PX = 8;
|
|
97
|
+
/** A flyout never shrinks below roughly three rows, even when little space is left. */
|
|
98
|
+
const MIN_FLYOUT_HEIGHT_PX = 120;
|
|
99
|
+
/**
|
|
100
|
+
* Opens and closes a group's flyout with hover intent, and keeps the open flyout positioned beside
|
|
101
|
+
* its group row. The flyout renders inside the row, so moving the pointer into it never leaves
|
|
102
|
+
* the row; the delays cover the gap between panel and flyout and diagonal moves across rows.
|
|
103
|
+
*/
|
|
104
|
+
/**
|
|
105
|
+
* Scrolls `el` into view inside `container` only. A flyout option needs this: the flyout is `fixed`
|
|
106
|
+
* beside the panel but sits inside it in the DOM, so `scrollIntoView` would also scroll the panel
|
|
107
|
+
* and the page, moving the flyout's row out from under it.
|
|
108
|
+
*/
|
|
109
|
+
export function scrollIntoViewWithin(container, el) {
|
|
110
|
+
const bounds = container.getBoundingClientRect();
|
|
111
|
+
const rect = el.getBoundingClientRect();
|
|
112
|
+
if (rect.top < bounds.top) {
|
|
113
|
+
container.scrollTop -= bounds.top - rect.top;
|
|
114
|
+
}
|
|
115
|
+
else if (rect.bottom > bounds.bottom) {
|
|
116
|
+
container.scrollTop += rect.bottom - bounds.bottom;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export class FlyoutController {
|
|
120
|
+
constructor(getOpenGroup, setOpenGroup) {
|
|
121
|
+
this.getOpenGroup = getOpenGroup;
|
|
122
|
+
this.setOpenGroup = setOpenGroup;
|
|
123
|
+
}
|
|
124
|
+
/** Pointer entered a group row (or its flyout, which sits inside it). */
|
|
125
|
+
enter(label) {
|
|
126
|
+
this.clearClose();
|
|
127
|
+
const open = this.getOpenGroup();
|
|
128
|
+
if (open === label) {
|
|
129
|
+
this.clearSwitch();
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (open === null) {
|
|
133
|
+
this.setOpenGroup(label);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
this.clearSwitch();
|
|
137
|
+
this.switchTimer = setTimeout(() => {
|
|
138
|
+
this.switchTimer = undefined;
|
|
139
|
+
this.setOpenGroup(label);
|
|
140
|
+
}, SWITCH_DELAY_MS);
|
|
141
|
+
}
|
|
142
|
+
/** Pointer left a group row and its flyout. */
|
|
143
|
+
leave(label) {
|
|
144
|
+
this.clearSwitch();
|
|
145
|
+
if (this.getOpenGroup() !== label)
|
|
146
|
+
return;
|
|
147
|
+
this.clearClose();
|
|
148
|
+
this.closeTimer = setTimeout(() => {
|
|
149
|
+
this.closeTimer = undefined;
|
|
150
|
+
if (this.getOpenGroup() === label)
|
|
151
|
+
this.setOpenGroup(null);
|
|
152
|
+
}, CLOSE_DELAY_MS);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* A click or tap on a group row opens it. It never closes it: on desktop the hover that preceded
|
|
156
|
+
* the click has already opened it, and touch browsers fire an emulated mouseenter and then click
|
|
157
|
+
* in the same tap. Closing happens on leaving the row or closing the panel.
|
|
158
|
+
*/
|
|
159
|
+
open(label) {
|
|
160
|
+
this.clearTimers();
|
|
161
|
+
this.setOpenGroup(label);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Keeps `flyout` beside `row`: horizontally against the panel's edge, vertically so its first
|
|
165
|
+
* option lines up with the row. `fixed` positioning so the panel's scrolling can't clip it,
|
|
166
|
+
* including when the panel is portaled into a dialog.
|
|
167
|
+
*/
|
|
168
|
+
position(row, panel, flyout) {
|
|
169
|
+
if (this.positionedFlyout === flyout && this.stopAutoUpdate)
|
|
170
|
+
return;
|
|
171
|
+
this.stopPositioning();
|
|
172
|
+
this.positionedFlyout = flyout;
|
|
173
|
+
const reference = {
|
|
174
|
+
getBoundingClientRect: () => {
|
|
175
|
+
const panelRect = panel.getBoundingClientRect();
|
|
176
|
+
const rowRect = row.getBoundingClientRect();
|
|
177
|
+
return {
|
|
178
|
+
x: panelRect.x,
|
|
179
|
+
y: rowRect.y,
|
|
180
|
+
left: panelRect.left,
|
|
181
|
+
right: panelRect.right,
|
|
182
|
+
top: rowRect.top,
|
|
183
|
+
bottom: rowRect.bottom,
|
|
184
|
+
width: panelRect.width,
|
|
185
|
+
height: rowRect.height,
|
|
186
|
+
};
|
|
187
|
+
},
|
|
188
|
+
contextElement: row,
|
|
189
|
+
};
|
|
190
|
+
// The flyout's own top padding, so its first option, not its edge, lines up with the row.
|
|
191
|
+
const flyoutPaddingTop = parseFloat(getComputedStyle(flyout).paddingTop) || 0;
|
|
192
|
+
const update = () => computePosition(reference, flyout, {
|
|
193
|
+
placement: 'right-start',
|
|
194
|
+
strategy: 'fixed',
|
|
195
|
+
middleware: [
|
|
196
|
+
offset({ mainAxis: FLYOUT_GAP_PX, crossAxis: -flyoutPaddingTop }),
|
|
197
|
+
flip({ fallbackPlacements: ['left-start'] }),
|
|
198
|
+
shift({ padding: VIEWPORT_PADDING_PX }),
|
|
199
|
+
// A long group scrolls inside the flyout instead of running off the viewport.
|
|
200
|
+
size({
|
|
201
|
+
padding: VIEWPORT_PADDING_PX,
|
|
202
|
+
apply({ availableHeight }) {
|
|
203
|
+
flyout.style.maxHeight = `${Math.max(availableHeight, MIN_FLYOUT_HEIGHT_PX)}px`;
|
|
204
|
+
},
|
|
205
|
+
}),
|
|
206
|
+
// Hidden with its row when the panel scrolls the row out of view.
|
|
207
|
+
hide({ strategy: 'referenceHidden' }),
|
|
208
|
+
],
|
|
209
|
+
}).then(({ x, y, middlewareData }) => {
|
|
210
|
+
var _a;
|
|
211
|
+
// It starts hidden (see the stylesheet) so it never flashes in the row before it's placed.
|
|
212
|
+
Object.assign(flyout.style, {
|
|
213
|
+
position: 'fixed',
|
|
214
|
+
left: `${x}px`,
|
|
215
|
+
top: `${y}px`,
|
|
216
|
+
visibility: ((_a = middlewareData.hide) === null || _a === void 0 ? void 0 : _a.referenceHidden) === true ? 'hidden' : 'visible',
|
|
217
|
+
});
|
|
218
|
+
const reveal = this.pendingReveal;
|
|
219
|
+
this.pendingReveal = undefined;
|
|
220
|
+
if (reveal !== undefined && flyout.contains(reveal))
|
|
221
|
+
scrollIntoViewWithin(flyout, reveal);
|
|
222
|
+
});
|
|
223
|
+
this.stopAutoUpdate = autoUpdate(reference, flyout, () => {
|
|
224
|
+
void update();
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Scrolls `option` into view inside its flyout. Before the flyout's first placement its height
|
|
229
|
+
* isn't capped yet, so the option looks visible; it's revealed again once the placement lands.
|
|
230
|
+
*/
|
|
231
|
+
reveal(flyout, option) {
|
|
232
|
+
scrollIntoViewWithin(flyout, option);
|
|
233
|
+
if (flyout.style.maxHeight === '')
|
|
234
|
+
this.pendingReveal = option;
|
|
235
|
+
}
|
|
236
|
+
stopPositioning() {
|
|
237
|
+
var _a;
|
|
238
|
+
(_a = this.stopAutoUpdate) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
239
|
+
this.stopAutoUpdate = undefined;
|
|
240
|
+
this.positionedFlyout = undefined;
|
|
241
|
+
this.pendingReveal = undefined;
|
|
242
|
+
}
|
|
243
|
+
/** The panel closed or the component left the page. */
|
|
244
|
+
reset() {
|
|
245
|
+
this.clearTimers();
|
|
246
|
+
this.stopPositioning();
|
|
247
|
+
}
|
|
248
|
+
clearTimers() {
|
|
249
|
+
this.clearSwitch();
|
|
250
|
+
this.clearClose();
|
|
251
|
+
}
|
|
252
|
+
clearSwitch() {
|
|
253
|
+
if (this.switchTimer !== undefined)
|
|
254
|
+
clearTimeout(this.switchTimer);
|
|
255
|
+
this.switchTimer = undefined;
|
|
256
|
+
}
|
|
257
|
+
clearClose() {
|
|
258
|
+
if (this.closeTimer !== undefined)
|
|
259
|
+
clearTimeout(this.closeTimer);
|
|
260
|
+
this.closeTimer = undefined;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
@@ -156,6 +156,22 @@
|
|
|
156
156
|
background: var(--pine-color-background-muted);
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
.pds-combobox__option--disabled,
|
|
160
|
+
.pds-combobox__group-row--disabled > .pds-combobox__group-row-trigger,
|
|
161
|
+
.pds-combobox__group-back--disabled > .pds-combobox__group-back-trigger,
|
|
162
|
+
.pds-combobox__group--disabled > .pds-combobox__group-label {
|
|
163
|
+
color: var(--pine-color-text-disabled);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.pds-combobox__option--disabled {
|
|
167
|
+
cursor: not-allowed;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.pds-combobox__option--disabled .pds-combobox__option-chip,
|
|
171
|
+
.pds-combobox__option--disabled .pds-combobox__option-layout-wrapper {
|
|
172
|
+
opacity: 0.5;
|
|
173
|
+
}
|
|
174
|
+
|
|
159
175
|
.pds-combobox__option-check {
|
|
160
176
|
color: currentColor;
|
|
161
177
|
font-size: var(--pine-dimension-150);
|
|
@@ -175,6 +191,232 @@
|
|
|
175
191
|
margin-block-start: 0;
|
|
176
192
|
}
|
|
177
193
|
|
|
194
|
+
.pds-combobox__group {
|
|
195
|
+
list-style: none;
|
|
196
|
+
margin-block-start: var(--pine-dimension-150);
|
|
197
|
+
}
|
|
198
|
+
.pds-combobox__group:first-child {
|
|
199
|
+
margin-block-start: 0;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.pds-combobox__group-list {
|
|
203
|
+
list-style: none;
|
|
204
|
+
margin: 0;
|
|
205
|
+
padding: 0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.pds-combobox__listbox--grouped .pds-combobox__group-list {
|
|
209
|
+
display: flex;
|
|
210
|
+
flex-direction: column;
|
|
211
|
+
gap: var(--pine-dimension-2xs);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.pds-combobox__group-label--with-icon {
|
|
215
|
+
align-items: center;
|
|
216
|
+
display: flex;
|
|
217
|
+
gap: var(--pine-dimension-xs);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.pds-combobox__group-icon {
|
|
221
|
+
flex-shrink: 0;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.pds-combobox__group-row {
|
|
225
|
+
list-style: none;
|
|
226
|
+
position: relative;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.pds-combobox__group-row-trigger {
|
|
230
|
+
align-items: center;
|
|
231
|
+
border-radius: var(--pine-dimension-125);
|
|
232
|
+
color: var(--pine-color-text-secondary);
|
|
233
|
+
cursor: pointer;
|
|
234
|
+
display: flex;
|
|
235
|
+
font: var(--pine-typography-body-medium);
|
|
236
|
+
gap: var(--pine-dimension-xs);
|
|
237
|
+
justify-content: space-between;
|
|
238
|
+
padding: var(--pine-dimension-xs) var(--pine-dimension-sm);
|
|
239
|
+
/* stylelint-disable-next-line pine-design-system/no-hardcoded-motion -- matches .pds-combobox__option's 0.15s micro-transition */
|
|
240
|
+
transition: background 0.15s;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.pds-combobox__group-row--open > .pds-combobox__group-row-trigger,
|
|
244
|
+
.pds-combobox__group-row--has-selection > .pds-combobox__group-row-trigger,
|
|
245
|
+
.pds-combobox__group-row--highlighted > .pds-combobox__group-row-trigger,
|
|
246
|
+
.pds-combobox__group-back--highlighted > .pds-combobox__group-row-trigger,
|
|
247
|
+
.pds-combobox__group-row-trigger:hover {
|
|
248
|
+
background: var(--pine-color-background-muted);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.pds-combobox__listbox--drill-in,
|
|
252
|
+
.pds-combobox__listbox--drill-out {
|
|
253
|
+
overflow-x: hidden;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.pds-combobox__listbox--drill-in > .pds-combobox__group-back {
|
|
257
|
+
animation: pds-combobox-drill-from-end var(--pine-motion-duration-base) var(--pine-motion-easing-out);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.pds-combobox__listbox--drill-out > li {
|
|
261
|
+
animation: pds-combobox-drill-from-start var(--pine-motion-duration-base) var(--pine-motion-easing-out);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
@keyframes pds-combobox-drill-from-end {
|
|
265
|
+
from {
|
|
266
|
+
opacity: 0;
|
|
267
|
+
transform: translateX(var(--pine-dimension-sm));
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
@keyframes pds-combobox-drill-from-start {
|
|
271
|
+
from {
|
|
272
|
+
opacity: 0;
|
|
273
|
+
transform: translateX(calc(var(--pine-dimension-sm) * -1));
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
.pds-combobox__group-row--keyboard > .pds-combobox__group-row-trigger,
|
|
277
|
+
.pds-combobox__group-back--keyboard > .pds-combobox__group-row-trigger {
|
|
278
|
+
outline: var(--pine-outline-focus);
|
|
279
|
+
outline-offset: calc(var(--pine-border-width) * -2);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.pds-combobox__group-row-label {
|
|
283
|
+
align-items: center;
|
|
284
|
+
display: flex;
|
|
285
|
+
gap: var(--pine-dimension-xs);
|
|
286
|
+
min-width: 0;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.pds-combobox__group-row-caret {
|
|
290
|
+
flex-shrink: 0;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.pds-combobox__listbox--grouped,
|
|
294
|
+
.pds-combobox__flyout {
|
|
295
|
+
display: flex;
|
|
296
|
+
flex-direction: column;
|
|
297
|
+
gap: var(--pine-dimension-2xs);
|
|
298
|
+
padding: var(--pine-dimension-2xs);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.pds-combobox__flyout {
|
|
302
|
+
background: var(--pine-color-background-overlay);
|
|
303
|
+
border-radius: var(--pine-dimension-125);
|
|
304
|
+
box-shadow: var(--pine-box-shadow);
|
|
305
|
+
list-style: none;
|
|
306
|
+
margin: 0;
|
|
307
|
+
overflow-y: auto;
|
|
308
|
+
position: fixed;
|
|
309
|
+
visibility: hidden;
|
|
310
|
+
width: max-content;
|
|
311
|
+
z-index: 1;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.pds-combobox__listbox--with-search {
|
|
315
|
+
display: flex;
|
|
316
|
+
flex-direction: column;
|
|
317
|
+
overflow: hidden;
|
|
318
|
+
padding: 0;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.pds-combobox__listbox-options {
|
|
322
|
+
flex: 1;
|
|
323
|
+
list-style: none;
|
|
324
|
+
margin: 0;
|
|
325
|
+
min-height: 0;
|
|
326
|
+
overflow-y: auto;
|
|
327
|
+
padding: var(--pine-dimension-xs);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.pds-combobox__listbox-options.pds-combobox__listbox--grouped {
|
|
331
|
+
padding: var(--pine-dimension-2xs);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.pds-combobox__panel-search {
|
|
335
|
+
align-items: center;
|
|
336
|
+
border-block-end: var(--pine-border);
|
|
337
|
+
border-block-end-color: var(--pine-color-border-subtle);
|
|
338
|
+
display: flex;
|
|
339
|
+
flex-shrink: 0;
|
|
340
|
+
gap: var(--pine-dimension-xs);
|
|
341
|
+
padding: var(--pine-dimension-xs) var(--pine-dimension-sm);
|
|
342
|
+
}
|
|
343
|
+
.pds-combobox__panel-search pds-icon {
|
|
344
|
+
color: var(--pine-color-text-muted);
|
|
345
|
+
flex-shrink: 0;
|
|
346
|
+
}
|
|
347
|
+
.pds-combobox__panel-search:focus-within {
|
|
348
|
+
border-block-end-color: var(--pine-color-border-active);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.pds-combobox__panel-search-input {
|
|
352
|
+
background: transparent;
|
|
353
|
+
border: 0;
|
|
354
|
+
color: var(--pine-color-text-strong);
|
|
355
|
+
flex: 1;
|
|
356
|
+
font: var(--pine-typography-body);
|
|
357
|
+
letter-spacing: var(--pine-letter-spacing);
|
|
358
|
+
min-width: 0;
|
|
359
|
+
outline: none;
|
|
360
|
+
}
|
|
361
|
+
.pds-combobox__panel-search-input::placeholder {
|
|
362
|
+
color: var(--pine-color-text-placeholder);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.pds-combobox__group-back {
|
|
366
|
+
display: flex;
|
|
367
|
+
flex-direction: column;
|
|
368
|
+
gap: var(--pine-dimension-2xs);
|
|
369
|
+
list-style: none;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.pds-combobox__group-back-trigger {
|
|
373
|
+
justify-content: flex-start;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.pds-combobox__listbox-options--drilled-in.pds-combobox__listbox--grouped {
|
|
377
|
+
padding-block-start: 0;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.pds-combobox__listbox-options--drilled-in:focus {
|
|
381
|
+
outline: none;
|
|
382
|
+
}
|
|
383
|
+
.pds-combobox__listbox-options--drilled-in:focus .pds-combobox__group-back-trigger {
|
|
384
|
+
border-block-end-color: var(--pine-color-border-active);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
:where(.pds-combobox__listbox-options--drilled-in) .pds-combobox__group-back-trigger {
|
|
388
|
+
background-color: var(--pine-color-background-overlay);
|
|
389
|
+
border-block-end: var(--pine-border);
|
|
390
|
+
border-block-end-color: var(--pine-color-border-subtle);
|
|
391
|
+
border-radius: 0;
|
|
392
|
+
inset-block-start: 0;
|
|
393
|
+
margin-inline: calc(var(--pine-dimension-2xs) * -1);
|
|
394
|
+
position: sticky;
|
|
395
|
+
z-index: 1;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.pds-combobox__drill-in-options {
|
|
399
|
+
display: flex;
|
|
400
|
+
flex-direction: column;
|
|
401
|
+
gap: var(--pine-dimension-2xs);
|
|
402
|
+
list-style: none;
|
|
403
|
+
margin: 0;
|
|
404
|
+
padding: 0;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.visually-hidden {
|
|
408
|
+
border: 0;
|
|
409
|
+
clip: rect(0 0 0 0);
|
|
410
|
+
clip-path: polygon(0 0, 0 0, 0 0);
|
|
411
|
+
height: 1px;
|
|
412
|
+
margin: -1px;
|
|
413
|
+
overflow: hidden;
|
|
414
|
+
padding: 0;
|
|
415
|
+
position: absolute;
|
|
416
|
+
white-space: nowrap;
|
|
417
|
+
width: 1px;
|
|
418
|
+
}
|
|
419
|
+
|
|
178
420
|
.pds-combobox__loading {
|
|
179
421
|
align-items: center;
|
|
180
422
|
display: flex;
|
|
@@ -279,8 +521,7 @@
|
|
|
279
521
|
--color-border-hover: var(--pine-color-accent-hover);
|
|
280
522
|
--color-border-disabled: var(--pine-color-accent-disabled);
|
|
281
523
|
--color-border-focus: var(--pine-color-accent);
|
|
282
|
-
|
|
283
|
-
--color-text-default: var(--pine-color-white);
|
|
524
|
+
--color-text-default: var(--pine-color-text-primary);
|
|
284
525
|
--color-text-disabled: var(--pine-color-text-accent-disabled);
|
|
285
526
|
--color-outline: var(--pine-color-focus-ring);
|
|
286
527
|
}
|
|
@@ -312,19 +553,6 @@
|
|
|
312
553
|
--color-outline: var(--pine-color-focus-ring-danger);
|
|
313
554
|
}
|
|
314
555
|
|
|
315
|
-
.visually-hidden {
|
|
316
|
-
border: 0;
|
|
317
|
-
clip: rect(0 0 0 0);
|
|
318
|
-
clip-path: polygon(0 0, 0 0, 0 0);
|
|
319
|
-
height: 1px;
|
|
320
|
-
margin: -1px;
|
|
321
|
-
overflow: hidden;
|
|
322
|
-
padding: 0;
|
|
323
|
-
position: absolute;
|
|
324
|
-
white-space: nowrap;
|
|
325
|
-
width: 1px;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
556
|
[data-layout] {
|
|
329
557
|
border-radius: var(--pine-dimension-125);
|
|
330
558
|
padding-block: var(--pine-dimension-xs);
|