@pine-ds/core 4.3.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-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-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-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-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-31aee437.entry.js +1 -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-81292c03.system.entry.js +1 -0
- package/dist/pine-core/p-81300046.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-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-90692bb6.entry.js +1 -0
- 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
|
@@ -115,7 +115,7 @@ DOMTokenList
|
|
|
115
115
|
var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
|
|
116
116
|
var start = function() {
|
|
117
117
|
// if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
|
|
118
|
-
var url = new URL('./p-
|
|
118
|
+
var url = new URL('./p-CTQZ2fkv.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
|
|
119
119
|
System.import(url.href);
|
|
120
120
|
};
|
|
121
121
|
|
|
@@ -84,11 +84,21 @@ export declare class PdsButton {
|
|
|
84
84
|
variant: 'primary' | 'secondary' | 'tertiary' | 'accent' | 'disclosure' | 'destructive' | 'unstyled' | 'filter';
|
|
85
85
|
hasStartContent: boolean;
|
|
86
86
|
hasEndContent: boolean;
|
|
87
|
+
triggerExpanded: string | null;
|
|
88
|
+
triggerHasPopup: string | null;
|
|
89
|
+
private contentEl?;
|
|
90
|
+
private triggerAriaObserver?;
|
|
87
91
|
pdsClick: EventEmitter<Event>;
|
|
92
|
+
connectedCallback(): void;
|
|
93
|
+
disconnectedCallback(): void;
|
|
94
|
+
componentDidRender(): void;
|
|
88
95
|
/**
|
|
89
96
|
* Listen for Enter key presses on form inputs to trigger submit
|
|
90
97
|
*/
|
|
91
98
|
handleFormKeyDown(event: KeyboardEvent): void;
|
|
99
|
+
private syncTriggerAria;
|
|
100
|
+
private forwardAriaControls;
|
|
101
|
+
private findInAncestorRoots;
|
|
92
102
|
private handleStartSlotChange;
|
|
93
103
|
private handleEndSlotChange;
|
|
94
104
|
private handleClick;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { CheckboxChangeEventDetail } from './checkbox-interface';
|
|
3
|
+
/**
|
|
4
|
+
* @slot label - Content displayed as the checkbox label in place of the `label` text. Clicking it toggles the checkbox.
|
|
5
|
+
*/
|
|
3
6
|
export declare class PdsCheckbox {
|
|
4
7
|
private inheritedAttributes;
|
|
5
8
|
private internals?;
|
|
6
9
|
private readonly _type;
|
|
7
10
|
el: HTMLPdsCheckboxElement;
|
|
11
|
+
private hasLabelSlot;
|
|
8
12
|
/**
|
|
9
13
|
* It determines whether or not the checkbox is checked.
|
|
10
14
|
*/
|
|
@@ -69,5 +73,6 @@ export declare class PdsCheckbox {
|
|
|
69
73
|
private updateFormValue;
|
|
70
74
|
formStateRestoreCallback(state: string | FormData | null): void;
|
|
71
75
|
componentWillLoad(): void;
|
|
76
|
+
private updateHasLabelSlot;
|
|
72
77
|
render(): any;
|
|
73
78
|
}
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
export interface ComboboxOption {
|
|
2
2
|
id: string | number;
|
|
3
3
|
text: string;
|
|
4
|
+
/**
|
|
5
|
+
* Label of the group this option belongs to. Options sharing a group are rendered together
|
|
6
|
+
* under one group label, where the group first appears, the same as slotted `<optgroup>`
|
|
7
|
+
* markup. Options without a group are listed before every group.
|
|
8
|
+
*/
|
|
9
|
+
group?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Pine icon name shown beside the group's label (letters, digits and hyphens, for example
|
|
12
|
+
* `hashtag`); URLs and file paths are not accepted. The first option in the group that sets
|
|
13
|
+
* one wins, the same as `data-icon` on a slotted `<optgroup>`.
|
|
14
|
+
*/
|
|
15
|
+
groupIcon?: string;
|
|
16
|
+
/**
|
|
17
|
+
* When `true`, the option stays reachable by the arrow keys and the pointer, so assistive tech
|
|
18
|
+
* announces it as unavailable, but it cannot be selected.
|
|
19
|
+
*/
|
|
20
|
+
disabled?: boolean;
|
|
4
21
|
[key: string]: unknown;
|
|
5
22
|
}
|
|
6
23
|
export interface ComboboxChangeEventDetail {
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal to Pine: the grouped panel behind `pds-combobox`'s `group-display` modes. It owns the
|
|
3
|
+
* group model, hover intent and flyout positioning; the combobox owns rendering and selection,
|
|
4
|
+
* so options keep the indexes its click, hover and keyboard handlers already use.
|
|
5
|
+
*/
|
|
6
|
+
/** An option in the panel, with its index among the combobox's selectable options. */
|
|
7
|
+
export interface PanelOption {
|
|
8
|
+
option: HTMLOptionElement;
|
|
9
|
+
index: number;
|
|
10
|
+
}
|
|
11
|
+
export interface PanelGroup {
|
|
12
|
+
/** The group's identity: two optgroups may share a label. */
|
|
13
|
+
optgroup: HTMLOptGroupElement;
|
|
14
|
+
label: string;
|
|
15
|
+
/** Pine icon name from the optgroup's `data-icon`, or null. */
|
|
16
|
+
icon: string | null;
|
|
17
|
+
options: PanelOption[];
|
|
18
|
+
}
|
|
19
|
+
export type PanelEntry = {
|
|
20
|
+
kind: 'group';
|
|
21
|
+
group: PanelGroup;
|
|
22
|
+
} | ({
|
|
23
|
+
kind: 'option';
|
|
24
|
+
} & PanelOption);
|
|
25
|
+
/** The optgroup an option sits in, or null for an ungrouped option. */
|
|
26
|
+
export declare function parentOptgroupOf(option: HTMLOptionElement | null | undefined): HTMLOptGroupElement | null;
|
|
27
|
+
/**
|
|
28
|
+
* An optgroup's `data-icon` when it's a Pine icon name, or null. One definition of a usable group
|
|
29
|
+
* icon for every mode, checked here rather than trusting `pds-icon` to reject anything else; it is
|
|
30
|
+
* only ever passed to `pds-icon` as `name`.
|
|
31
|
+
*/
|
|
32
|
+
export declare function groupIconOf(optgroup: HTMLOptGroupElement): string | null;
|
|
33
|
+
/** An option is disabled by its own `disabled` or its optgroup's, as in a native select. */
|
|
34
|
+
export declare function isOptionDisabled(option: HTMLOptionElement | null | undefined): boolean;
|
|
35
|
+
/** A group with no option left to choose. It still opens, so its options can be seen. */
|
|
36
|
+
export declare function isGroupDisabled(group: PanelGroup): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Groups the combobox's filtered items for the panel: each optgroup becomes one entry holding its
|
|
39
|
+
* options, and ungrouped options stay where they are. Indexes count options in list order, the
|
|
40
|
+
* same as the inline listbox, so `data-option-index` means the same thing in every mode.
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildPanelEntries(items: Element[]): PanelEntry[];
|
|
43
|
+
/** The label of the optgroup an option sits in, or null for an ungrouped option. */
|
|
44
|
+
export declare function groupLabelOf(option: HTMLOptionElement | null | undefined): string | null;
|
|
45
|
+
/** Where the keyboard is in the grouped panel: a group's row, or an option by its index. */
|
|
46
|
+
export type PanelItem = HTMLOptGroupElement | number;
|
|
47
|
+
/**
|
|
48
|
+
* The items Up and Down move through from `current`, one tree level at a time: the panel's rows
|
|
49
|
+
* (groups and ungrouped options), or the open group's options. Drilled into a group, its row
|
|
50
|
+
* (drawn as the row back) comes first, above its options, as a tree draws a parent above its children.
|
|
51
|
+
* Disabled options and groups stay in it, as the APG listbox and tree patterns advise, so they're
|
|
52
|
+
* announced as unavailable rather than hidden from the keyboard.
|
|
53
|
+
*/
|
|
54
|
+
export declare function panelColumn(entries: PanelEntry[], openGroup: HTMLOptGroupElement | null, current: PanelItem | null, drilledIn: boolean): PanelItem[];
|
|
55
|
+
/** The panel's group for an optgroup, if it's showing. */
|
|
56
|
+
export declare function findGroup(entries: PanelEntry[], optgroup: HTMLOptGroupElement): PanelGroup | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Opens and closes a group's flyout with hover intent, and keeps the open flyout positioned beside
|
|
59
|
+
* its group row. The flyout renders inside the row, so moving the pointer into it never leaves
|
|
60
|
+
* the row; the delays cover the gap between panel and flyout and diagonal moves across rows.
|
|
61
|
+
*/
|
|
62
|
+
/**
|
|
63
|
+
* Scrolls `el` into view inside `container` only. A flyout option needs this: the flyout is `fixed`
|
|
64
|
+
* beside the panel but sits inside it in the DOM, so `scrollIntoView` would also scroll the panel
|
|
65
|
+
* and the page, moving the flyout's row out from under it.
|
|
66
|
+
*/
|
|
67
|
+
export declare function scrollIntoViewWithin(container: HTMLElement, el: HTMLElement): void;
|
|
68
|
+
export declare class FlyoutController<T> {
|
|
69
|
+
private readonly getOpenGroup;
|
|
70
|
+
private readonly setOpenGroup;
|
|
71
|
+
private switchTimer?;
|
|
72
|
+
private closeTimer?;
|
|
73
|
+
private stopAutoUpdate?;
|
|
74
|
+
private positionedFlyout?;
|
|
75
|
+
/** An option to scroll into view once the flyout is placed and its height capped. */
|
|
76
|
+
private pendingReveal?;
|
|
77
|
+
constructor(getOpenGroup: () => T | null, setOpenGroup: (group: T | null) => void);
|
|
78
|
+
/** Pointer entered a group row (or its flyout, which sits inside it). */
|
|
79
|
+
enter(label: T): void;
|
|
80
|
+
/** Pointer left a group row and its flyout. */
|
|
81
|
+
leave(label: T): void;
|
|
82
|
+
/**
|
|
83
|
+
* A click or tap on a group row opens it. It never closes it: on desktop the hover that preceded
|
|
84
|
+
* the click has already opened it, and touch browsers fire an emulated mouseenter and then click
|
|
85
|
+
* in the same tap. Closing happens on leaving the row or closing the panel.
|
|
86
|
+
*/
|
|
87
|
+
open(label: T): void;
|
|
88
|
+
/**
|
|
89
|
+
* Keeps `flyout` beside `row`: horizontally against the panel's edge, vertically so its first
|
|
90
|
+
* option lines up with the row. `fixed` positioning so the panel's scrolling can't clip it,
|
|
91
|
+
* including when the panel is portaled into a dialog.
|
|
92
|
+
*/
|
|
93
|
+
position(row: HTMLElement, panel: HTMLElement, flyout: HTMLElement): void;
|
|
94
|
+
/**
|
|
95
|
+
* Scrolls `option` into view inside its flyout. Before the flyout's first placement its height
|
|
96
|
+
* isn't capped yet, so the option looks visible; it's revealed again once the placement lands.
|
|
97
|
+
*/
|
|
98
|
+
reveal(flyout: HTMLElement, option: HTMLElement): void;
|
|
99
|
+
stopPositioning(): void;
|
|
100
|
+
/** The panel closed or the component left the page. */
|
|
101
|
+
reset(): void;
|
|
102
|
+
private clearTimers;
|
|
103
|
+
private clearSwitch;
|
|
104
|
+
private clearClose;
|
|
105
|
+
}
|
|
@@ -62,6 +62,35 @@ export declare class PdsCombobox implements BasePdsProps {
|
|
|
62
62
|
* @default 'host'
|
|
63
63
|
*/
|
|
64
64
|
dropdownMount: 'host' | 'body';
|
|
65
|
+
/**
|
|
66
|
+
* Accessible prefix for the row that returns to the group list when `group-display` is
|
|
67
|
+
* `drill-in`, read before the open group's label. Pass a translated string to localize it; defaults to English.
|
|
68
|
+
* @defaultValue 'Back'
|
|
69
|
+
*/
|
|
70
|
+
drillInBackLabel: string;
|
|
71
|
+
/**
|
|
72
|
+
* Maximum width of a group's flyout when `group-display` is `flyout`. Any valid CSS width value.
|
|
73
|
+
* @default '380px'
|
|
74
|
+
*/
|
|
75
|
+
flyoutMaxWidth: string;
|
|
76
|
+
/**
|
|
77
|
+
* Minimum width of a group's flyout when `group-display` is `flyout`. Any valid CSS width value.
|
|
78
|
+
* The flyout is as wide as its options, between this and `flyout-max-width`.
|
|
79
|
+
* @default '280px'
|
|
80
|
+
*/
|
|
81
|
+
flyoutMinWidth: string;
|
|
82
|
+
/**
|
|
83
|
+
* How option groups (`<optgroup>`, or the `group` field of `options`) are shown in the dropdown.
|
|
84
|
+
* `inline` lists each group's label above its options. `flyout` lists the groups, and opens a
|
|
85
|
+
* group's options in a panel beside it on hover or click; while searching, the matching options
|
|
86
|
+
* are listed under their group labels, and search also matches group labels. `flyout` groups
|
|
87
|
+
* by `<optgroup>` (or `group`) only: options under a `<pds-text>` heading are listed ungrouped.
|
|
88
|
+
* `drill-in` lists the groups too, but a click replaces the list with that group's options and a
|
|
89
|
+
* row back to the groups; use it where nothing can open beside the dropdown, such as a side
|
|
90
|
+
* panel. `flyout` falls back to `drill-in` when there is no room for a flyout on either side.
|
|
91
|
+
* @default 'inline'
|
|
92
|
+
*/
|
|
93
|
+
groupDisplay: 'inline' | 'flyout' | 'drill-in';
|
|
65
94
|
/**
|
|
66
95
|
* Helper message to display below the combobox.
|
|
67
96
|
*/
|
|
@@ -92,10 +121,27 @@ export declare class PdsCombobox implements BasePdsProps {
|
|
|
92
121
|
* @default 'filter'
|
|
93
122
|
*/
|
|
94
123
|
mode: 'filter' | 'select-only';
|
|
124
|
+
/**
|
|
125
|
+
* Shows a search field at the top of the dropdown for the `button` and `chip` triggers, which
|
|
126
|
+
* can't be typed into. Search filters the options the same way typing in the `input` trigger
|
|
127
|
+
* does; in a grouped display it also matches group labels.
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
panelSearch: boolean;
|
|
95
131
|
/**
|
|
96
132
|
* Placeholder text for the input field.
|
|
97
133
|
*/
|
|
98
134
|
placeholder?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Accessible label for the search input inside the dropdown panel (`panel-search`). Pass a translated string to localize it; defaults to English.
|
|
137
|
+
* @defaultValue 'Search options'
|
|
138
|
+
*/
|
|
139
|
+
searchOptionsLabel: string;
|
|
140
|
+
/**
|
|
141
|
+
* Placeholder text for the search input inside the dropdown panel (`panel-search`). Pass a translated string to localize it; defaults to English.
|
|
142
|
+
* @defaultValue 'Find...'
|
|
143
|
+
*/
|
|
144
|
+
searchPlaceholder: string;
|
|
99
145
|
/**
|
|
100
146
|
* Determines the combobox trigger: 'input' (editable input), 'button' (button-like, non-editable), or 'chip' (chip-like, non-editable).
|
|
101
147
|
* @default 'input'
|
|
@@ -198,6 +244,30 @@ export declare class PdsCombobox implements BasePdsProps {
|
|
|
198
244
|
* Internal state for dropdown open/close
|
|
199
245
|
*/
|
|
200
246
|
isOpen: boolean;
|
|
247
|
+
/**
|
|
248
|
+
* The optgroup whose flyout is open, when `groupDisplay` is `flyout`.
|
|
249
|
+
*/
|
|
250
|
+
openGroup: HTMLOptGroupElement | null;
|
|
251
|
+
/**
|
|
252
|
+
* Which way drill-in just moved, so the list slides that way: `in` to a group, `out` back to the
|
|
253
|
+
* groups. Cleared once the slide ends, so later renders don't animate.
|
|
254
|
+
*/
|
|
255
|
+
drillDirection: 'in' | 'out' | null;
|
|
256
|
+
/**
|
|
257
|
+
* The group row highlighted in the grouped panel. It counts only while no option is
|
|
258
|
+
* highlighted (`highlightedIndex` is -1); see `highlightedGroupRow`.
|
|
259
|
+
*/
|
|
260
|
+
highlightedGroup: HTMLOptGroupElement | null;
|
|
261
|
+
/** The keys, not the pointer, moved the highlight last; the focus ring shows only then. */
|
|
262
|
+
keyboardNavigating: boolean;
|
|
263
|
+
/**
|
|
264
|
+
* What's typed in the dropdown's own search field (`panelSearch`).
|
|
265
|
+
*/
|
|
266
|
+
panelQuery: string;
|
|
267
|
+
/**
|
|
268
|
+
* `groupDisplay` is `flyout` but there's no room beside the dropdown, so groups drill in instead.
|
|
269
|
+
*/
|
|
270
|
+
flyoutFallback: boolean;
|
|
201
271
|
/**
|
|
202
272
|
* Internal state for the currently selected option
|
|
203
273
|
*/
|
|
@@ -239,6 +309,21 @@ export declare class PdsCombobox implements BasePdsProps {
|
|
|
239
309
|
private fetchTimeoutTimer?;
|
|
240
310
|
private observer?;
|
|
241
311
|
private originalSearchEmitter?;
|
|
312
|
+
private flyout;
|
|
313
|
+
/** The groups in the flyout panel's last render, so a row's index finds its optgroup. */
|
|
314
|
+
private renderedGroups;
|
|
315
|
+
private panelSearchEl?;
|
|
316
|
+
/** With panel search, the options' list, which takes focus while a group is drilled into. */
|
|
317
|
+
private panelTreeEl?;
|
|
318
|
+
/** What panel search last focused this open: the search field, or the list while drilled in. */
|
|
319
|
+
private panelFocusEl?;
|
|
320
|
+
/** Room for a flyout was checked for this open. */
|
|
321
|
+
private flyoutRoomChecked;
|
|
322
|
+
/** The highlighted option sits in a flyout that hasn't rendered yet; focus it after the next render. */
|
|
323
|
+
private pendingOptionFocus;
|
|
324
|
+
/** Group rows' DOM ids, stable across renders so `aria-activedescendant` can point at a row. */
|
|
325
|
+
private groupIds;
|
|
326
|
+
private groupIdCount;
|
|
242
327
|
/**
|
|
243
328
|
* In filter mode, after choosing an option the input still shows the label and would
|
|
244
329
|
* otherwise filter the list to matching substrings only. While this flag is true,
|
|
@@ -250,16 +335,45 @@ export declare class PdsCombobox implements BasePdsProps {
|
|
|
250
335
|
componentDidLoad(): void;
|
|
251
336
|
disconnectedCallback(): void;
|
|
252
337
|
componentDidRender(): void;
|
|
338
|
+
private focusPanel;
|
|
339
|
+
/** Switching display mode leaves no flyout or hover timer from the last one. */
|
|
340
|
+
protected groupDisplayChanged(): void;
|
|
341
|
+
protected openGroupChanged(next: HTMLOptGroupElement | null, previous: HTMLOptGroupElement | null): void;
|
|
342
|
+
/** A flyout with no room beside the dropdown drills in, which can hide the focused search field too. */
|
|
343
|
+
protected flyoutFallbackChanged(): void;
|
|
344
|
+
/**
|
|
345
|
+
* Drilling into a group hides the search field, so focus moves to the list before the field
|
|
346
|
+
* unmounts: focus lost with it would leave the combobox and close the dropdown.
|
|
347
|
+
*/
|
|
348
|
+
private handPanelFocusToList;
|
|
349
|
+
private onDrillAnimationEnd;
|
|
253
350
|
protected isOpenChanged(isOpen: boolean): void;
|
|
254
351
|
private get usesBodyPortal();
|
|
352
|
+
private get labelId();
|
|
353
|
+
/** One check for "the `<label>` is rendered", so the label and the reference to it can't disagree. */
|
|
354
|
+
private get hasVisibleLabel();
|
|
355
|
+
/**
|
|
356
|
+
* The button and chip triggers are `div`s, which `<label for>` can't name, so they point at the
|
|
357
|
+
* visible label instead. With `hide-label` there is no visible label and `aria-label` names them.
|
|
358
|
+
* With panel search the trigger is a button, which has no value, so its own text (the selection
|
|
359
|
+
* or placeholder) joins the label in its name.
|
|
360
|
+
*/
|
|
361
|
+
private get triggerLabelledBy();
|
|
362
|
+
/** The div triggers' `aria-label` when the label is hidden; with panel search it names the selection too. */
|
|
363
|
+
private get triggerAriaLabel();
|
|
364
|
+
/** `<label for>` only works on the input trigger; for a div trigger a click on the label focuses it. */
|
|
365
|
+
private onLabelClick;
|
|
255
366
|
private get listboxId();
|
|
256
367
|
private optionDomId;
|
|
368
|
+
private groupDomId;
|
|
257
369
|
protected setupDebounce(): void;
|
|
258
370
|
protected optionsChanged(): void;
|
|
259
371
|
handleValueChange(): void;
|
|
260
372
|
handleSelectedOptionChange(): void;
|
|
261
373
|
private updateFormValue;
|
|
262
374
|
private clearAsyncFetchState;
|
|
375
|
+
/** The query behind the options loaded from `async-url`. */
|
|
376
|
+
private lastFetchedQuery;
|
|
263
377
|
private debouncedFetchAsyncOptions;
|
|
264
378
|
private fetchOptions;
|
|
265
379
|
private updateOptionsFromAsync;
|
|
@@ -280,6 +394,11 @@ export declare class PdsCombobox implements BasePdsProps {
|
|
|
280
394
|
*/
|
|
281
395
|
private prepareExpandFilterListOnOpen;
|
|
282
396
|
private positionDropdown;
|
|
397
|
+
/**
|
|
398
|
+
* Once per open, after the dropdown is placed: with no room for a flyout on either side of it,
|
|
399
|
+
* `flyout` drills in instead. `flyout-min-width` is resolved through CSS, so any length works.
|
|
400
|
+
*/
|
|
401
|
+
private checkFlyoutRoom;
|
|
283
402
|
private openDropdownPositioning;
|
|
284
403
|
private startBodyPortalAutoUpdate;
|
|
285
404
|
private stopBodyPortalAutoUpdate;
|
|
@@ -297,13 +416,37 @@ export declare class PdsCombobox implements BasePdsProps {
|
|
|
297
416
|
private handleInput;
|
|
298
417
|
private handleInputClick;
|
|
299
418
|
private handleKeyDown;
|
|
419
|
+
/**
|
|
420
|
+
* The tree keys in the grouped panel. Up, Down, Home, End, PageUp and PageDown move within one
|
|
421
|
+
* level; Right, Enter or Space opens a group at its first option; Left, or Escape, closes the
|
|
422
|
+
* open group back to its row. Returns false for keys the listbox handling covers, such as
|
|
423
|
+
* Enter on an option.
|
|
424
|
+
*/
|
|
425
|
+
private handleGroupedPanelKey;
|
|
426
|
+
/**
|
|
427
|
+
* Where the keyboard is in the grouped panel. An option highlighted in a group that has since
|
|
428
|
+
* closed (the pointer left its flyout) counts as its group's row, so the keys carry on from
|
|
429
|
+
* what's showing rather than from an option that isn't.
|
|
430
|
+
*/
|
|
431
|
+
private currentPanelItem;
|
|
432
|
+
/**
|
|
433
|
+
* Highlights the option at `index`, kept within the list. Disabled options can be highlighted,
|
|
434
|
+
* so assistive tech announces them as unavailable, but not chosen.
|
|
435
|
+
*/
|
|
436
|
+
private highlightOptionAt;
|
|
437
|
+
/** Highlights a group row or an option, opening or closing flyouts to match. */
|
|
438
|
+
private highlightPanelItem;
|
|
439
|
+
private expandGroup;
|
|
440
|
+
/** Closes the open group and highlights its row, as a tree's Left does from a child. */
|
|
441
|
+
private collapseToGroup;
|
|
300
442
|
/**
|
|
301
443
|
* Sets focus on the native input element.
|
|
302
444
|
*/
|
|
303
445
|
setFocus(): Promise<void>;
|
|
304
446
|
/**
|
|
305
|
-
* Sets the initial highlighted index when dropdown opens.
|
|
306
|
-
*
|
|
447
|
+
* Sets the initial highlighted index when dropdown opens. Highlights the selected option unless
|
|
448
|
+
* it's disabled. Otherwise highlights the first enabled option, or, in the grouped panel, the
|
|
449
|
+
* first row with something to choose, or nothing when every option is disabled.
|
|
307
450
|
*/
|
|
308
451
|
private setInitialHighlightedIndex;
|
|
309
452
|
/**
|
|
@@ -320,9 +463,15 @@ export declare class PdsCombobox implements BasePdsProps {
|
|
|
320
463
|
* Note: We don't actually focus the option to prevent focusout events that close the dropdown
|
|
321
464
|
*/
|
|
322
465
|
private updateOptionFocus;
|
|
466
|
+
/** The highlighted group row in the grouped panel, or null while an option is highlighted. */
|
|
467
|
+
private get highlightedGroupRow();
|
|
323
468
|
/**
|
|
324
|
-
*
|
|
469
|
+
* The id of the highlighted option or group row, only while it's rendered. In the flyout panel
|
|
470
|
+
* an option in a closed group isn't in the DOM, and drilled into a group the other groups' rows
|
|
471
|
+
* aren't; `aria-activedescendant` must not point at a missing element.
|
|
325
472
|
*/
|
|
473
|
+
private get activeDescendantId();
|
|
474
|
+
/** Points the focused element's aria-activedescendant at the highlighted option, or clears it. */
|
|
326
475
|
private updateAriaActiveDescendant;
|
|
327
476
|
/**
|
|
328
477
|
* Focus management helper - restores focus to the trigger element
|
|
@@ -338,6 +487,13 @@ export declare class PdsCombobox implements BasePdsProps {
|
|
|
338
487
|
clear(): Promise<void>;
|
|
339
488
|
private onOptionClick;
|
|
340
489
|
private onOptionMouseEnter;
|
|
490
|
+
private groupFromEvent;
|
|
491
|
+
private onGroupRowMouseEnter;
|
|
492
|
+
private onGroupRowMouseLeave;
|
|
493
|
+
private onGroupRowTriggerMouseEnter;
|
|
494
|
+
private onGroupBackMouseEnter;
|
|
495
|
+
private highlightGroupRowByPointer;
|
|
496
|
+
private onGroupRowClick;
|
|
341
497
|
private onOptionMouseDown;
|
|
342
498
|
private onOptionKeyDown;
|
|
343
499
|
private get selectedLabel();
|
|
@@ -348,12 +504,88 @@ export declare class PdsCombobox implements BasePdsProps {
|
|
|
348
504
|
private get selectedChipIcon();
|
|
349
505
|
private get selectedChipDot();
|
|
350
506
|
private onButtonTriggerClick;
|
|
507
|
+
/**
|
|
508
|
+
* With `async-url`, fetches when the button trigger opens: the first page if nothing has loaded.
|
|
509
|
+
* The panel's search field opens empty, so results left from the last search are refetched for
|
|
510
|
+
* an empty query.
|
|
511
|
+
*/
|
|
512
|
+
private fetchAsyncOptionsOnOpen;
|
|
351
513
|
private onButtonTriggerKeyDown;
|
|
352
514
|
private onButtonTriggerKeyUp;
|
|
353
515
|
private onComboboxFocusOut;
|
|
354
516
|
private handleOptionClick;
|
|
355
517
|
private handleScroll;
|
|
356
518
|
private renderDropdown;
|
|
519
|
+
private onPanelMouseDown;
|
|
520
|
+
/**
|
|
521
|
+
* The listbox's items. Each optgroup's options sit in a `group` named for it, as in
|
|
522
|
+
* `pds-multiselect`, so assistive tech announces the group on entering it; a `pds-text` label
|
|
523
|
+
* stays a caption above the options that follow it.
|
|
524
|
+
*/
|
|
525
|
+
private renderListboxItems;
|
|
526
|
+
/** `panelSearch` applies to the triggers that can't be typed into. */
|
|
527
|
+
private get usesPanelSearch();
|
|
528
|
+
/** `groupDisplay`, with `flyout` drilling in when there's no room beside the dropdown. */
|
|
529
|
+
private get effectiveGroupDisplay();
|
|
530
|
+
/**
|
|
531
|
+
* The popup's role, for the triggers' `aria-haspopup`: a `tree` while the grouped panel shows
|
|
532
|
+
* groups, and a `listbox` of options otherwise, search results included.
|
|
533
|
+
*/
|
|
534
|
+
private get popupRole();
|
|
535
|
+
/**
|
|
536
|
+
* The input trigger's `aria-haspopup`. While closed it names what opening shows: the full list,
|
|
537
|
+
* so the grouped panel in a grouped display, even though the input still holds the selection's
|
|
538
|
+
* label.
|
|
539
|
+
*/
|
|
540
|
+
private get inputPopupRole();
|
|
541
|
+
/**
|
|
542
|
+
* The button and chip triggers' `aria-haspopup`. With panel search the trigger opens the panel,
|
|
543
|
+
* which starts as a tree in a grouped display, so typing in the panel doesn't change it.
|
|
544
|
+
*/
|
|
545
|
+
private get triggerPopupRole();
|
|
546
|
+
/**
|
|
547
|
+
* Drilled into a group with panel search: the group's row back takes the search field's place,
|
|
548
|
+
* since one group's options don't need searching. Typing searches the whole list again.
|
|
549
|
+
*/
|
|
550
|
+
private get hidesPanelSearch();
|
|
551
|
+
/** The grouped panel is showing groups rather than search results. */
|
|
552
|
+
private get showsGroupedPanel();
|
|
553
|
+
private onPanelSearchInput;
|
|
554
|
+
private setPanelQuery;
|
|
555
|
+
/** What's being searched: the panel's field, or the input trigger's text. */
|
|
556
|
+
private get activeQuery();
|
|
557
|
+
private onPanelSearchKeyDown;
|
|
558
|
+
/**
|
|
559
|
+
* Keys in the list while a drilled-in group hides the search field. Backspace, like ArrowLeft,
|
|
560
|
+
* steps back to the groups; a character starts a search of the whole list. Characters typed
|
|
561
|
+
* before the search field renders and takes focus still land on the list, so they add to the
|
|
562
|
+
* query rather than starting it again.
|
|
563
|
+
*/
|
|
564
|
+
private onPanelTreeKeyDown;
|
|
565
|
+
private handlePanelTab;
|
|
566
|
+
/** Returns from a drilled-in group to the group list; false when not drilled in. */
|
|
567
|
+
private leaveDrilledInGroup;
|
|
568
|
+
private onGroupBackClick;
|
|
569
|
+
private renderPanelSearch;
|
|
570
|
+
/**
|
|
571
|
+
* An option, as a listbox `option` or, given a tree `level`, a `treeitem`. `posinset` and
|
|
572
|
+
* `setsize` place it among its siblings.
|
|
573
|
+
*/
|
|
574
|
+
private renderOption;
|
|
575
|
+
/**
|
|
576
|
+
* `flyout`: one row per group, its options in a flyout beside it. `drill-in`: the same rows, and
|
|
577
|
+
* an opened group replaces them with its row, drawn as a row back, above its options. Either way
|
|
578
|
+
* it's a tree: the rows and ungrouped options are level 1, a group's options level 2.
|
|
579
|
+
*/
|
|
580
|
+
private renderGroupedPanel;
|
|
581
|
+
/** A group's options, as its children in the tree. */
|
|
582
|
+
private renderGroupOptions;
|
|
583
|
+
/**
|
|
584
|
+
* Drilled into a group: its treeitem, expanded. Its row reads as a way back ("Back: Tag") and
|
|
585
|
+
* leads its options.
|
|
586
|
+
*/
|
|
587
|
+
private renderGroupBackRow;
|
|
588
|
+
private renderGroupRow;
|
|
357
589
|
private renderCaretIcon;
|
|
358
590
|
private renderLayoutContent;
|
|
359
591
|
private renderDefaultContent;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the open calendar lives: a `div` in `document.body`, or in the nearest `<dialog>` so it
|
|
3
|
+
* shares a modal's top layer, outside any `overflow: hidden` or transformed ancestor that would
|
|
4
|
+
* clip or misplace a fixed-position popup. The portal has its own shadow root carrying the
|
|
5
|
+
* datepicker's styles, so the calendar looks the same there without any global CSS.
|
|
6
|
+
*/
|
|
7
|
+
export declare class CalendarPortal {
|
|
8
|
+
private readonly datepicker;
|
|
9
|
+
static readonly className = "pds-datepicker-calendar-portal";
|
|
10
|
+
readonly host: HTMLElement;
|
|
11
|
+
private readonly root;
|
|
12
|
+
private locale?;
|
|
13
|
+
/** The custom properties copyContext set on the host, cleared before it copies again. */
|
|
14
|
+
private copiedProperties;
|
|
15
|
+
constructor(datepicker: HTMLElement);
|
|
16
|
+
/**
|
|
17
|
+
* Moves the calendar into the portal, mounting the portal first. Context is copied when the portal
|
|
18
|
+
* is attached or the locale changes, not on every render while it's open (in range mode, every
|
|
19
|
+
* hovered day). A theme set on an ancestor while the calendar is open applies when it next opens.
|
|
20
|
+
*/
|
|
21
|
+
mount(calendar: HTMLElement, locale: string): void;
|
|
22
|
+
remove(): void;
|
|
23
|
+
/** Whether a node is the portal or inside it, as a focus or pointer target. */
|
|
24
|
+
contains(node: Node | null): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Carries over what the calendar would otherwise inherit from the datepicker: its styles, the
|
|
27
|
+
* reading direction and language, a theme set on an ancestor, and size overrides.
|
|
28
|
+
*/
|
|
29
|
+
private copyContext;
|
|
30
|
+
/**
|
|
31
|
+
* Custom properties set on an ancestor of the datepicker that isn't an ancestor of the portal,
|
|
32
|
+
* as a token override on a card or panel, or the datepicker's own size properties: each one whose
|
|
33
|
+
* value at the datepicker differs from where the portal mounts is set on the portal host.
|
|
34
|
+
*/
|
|
35
|
+
private copyCustomProperties;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The native `<dialog>` or open `popover` (as pds-filter's) the datepicker sits in, so the
|
|
39
|
+
* calendar shares its top layer and a click in it isn't outside it; otherwise `document.body`.
|
|
40
|
+
* `closest()` stops at shadow boundaries and misses one that only wraps slotted content, so this
|
|
41
|
+
* walks assigned slots and shadow hosts, as pds-combobox does.
|
|
42
|
+
*/
|
|
43
|
+
export declare function findPortalTarget(from: HTMLElement): HTMLElement;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Date-only helpers for pds-datepicker. Dates are `YYYY-MM-DD` strings and all arithmetic runs in
|
|
3
|
+
* UTC, so a date never shifts by a day with the viewer's time zone or a daylight-saving change.
|
|
4
|
+
*/
|
|
5
|
+
/** Parses a `YYYY-MM-DD` string to a UTC `Date`, or `null` when it isn't a real calendar date. */
|
|
6
|
+
export declare function parseIsoDate(value: string | null | undefined): Date | null;
|
|
7
|
+
export declare function toIsoDate(date: Date): string;
|
|
8
|
+
/** Today in the viewer's time zone, as a UTC date. */
|
|
9
|
+
export declare function today(): Date;
|
|
10
|
+
export declare function addDays(date: Date, days: number): Date;
|
|
11
|
+
/** Moves by whole months, keeping the day where it exists (Jan 31 + 1 month is Feb 28 or 29). */
|
|
12
|
+
export declare function addMonths(date: Date, months: number): Date;
|
|
13
|
+
export declare function daysInMonth(year: number, month: number): number;
|
|
14
|
+
export declare function isSameDay(a: Date | null, b: Date | null): boolean;
|
|
15
|
+
/** Clamps a date into the `[min, max]` range; either bound may be missing. */
|
|
16
|
+
export declare function clampDate(date: Date, min: Date | null, max: Date | null): Date;
|
|
17
|
+
export declare function isOutOfRange(date: Date, min: Date | null, max: Date | null): boolean;
|
|
18
|
+
/** The column (0–6) a date falls in, for a week starting on `firstDayOfWeek` (0 = Sunday). */
|
|
19
|
+
export declare function weekdayColumn(date: Date, firstDayOfWeek: number): number;
|
|
20
|
+
/**
|
|
21
|
+
* The month's weeks, each seven cells long. Days from the neighbouring months are `null`, so the
|
|
22
|
+
* grid only offers dates in the month on view.
|
|
23
|
+
*/
|
|
24
|
+
export declare function monthWeeks(year: number, month: number, firstDayOfWeek: number): (Date | null)[][];
|
|
25
|
+
/**
|
|
26
|
+
* The locale's first day of the week (0 = Sunday), from `Intl.Locale` week info where the browser
|
|
27
|
+
* has it. Falls back to Sunday.
|
|
28
|
+
*/
|
|
29
|
+
export declare function localeFirstDayOfWeek(locale: string): number;
|
|
30
|
+
/**
|
|
31
|
+
* Weekday names, starting from `firstDayOfWeek`: a short form for the column heading and the long
|
|
32
|
+
* form for assistive tech. Latin-script names shorten to two letters (Su Mo, lu ma, Mo Di), as the
|
|
33
|
+
* admin date picker does, while the seven stay distinct; other scripts keep the locale's short form,
|
|
34
|
+
* which is already compact.
|
|
35
|
+
*/
|
|
36
|
+
export declare function weekdayNames(locale: string, firstDayOfWeek: number): {
|
|
37
|
+
short: string;
|
|
38
|
+
long: string;
|
|
39
|
+
}[];
|
|
40
|
+
/** The locale if the browser supports it, otherwise `en-US`, so a bad tag never throws while rendering. */
|
|
41
|
+
export declare function supportedLocale(locale: string | null | undefined): string;
|
|
42
|
+
/**
|
|
43
|
+
* A formatter for the UTC dates these helpers return. Build it once per render, not per day.
|
|
44
|
+
* Always on the Gregorian calendar the grid is laid out in, while keeping the locale's language and
|
|
45
|
+
* digits: some locales default to another calendar (Persian for `fa`, Buddhist for `th`).
|
|
46
|
+
*/
|
|
47
|
+
export declare function dateFormatter(locale: string, options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat;
|
|
48
|
+
export declare function formatDate(date: Date, locale: string, options: Intl.DateTimeFormatOptions): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface DatepickerChangeEventDetail {
|
|
2
|
+
/**
|
|
3
|
+
* The selected date as `YYYY-MM-DD`, or in range mode the range as `YYYY-MM-DD/YYYY-MM-DD`; with
|
|
4
|
+
* the time picker, each date as `YYYY-MM-DDTHH:mm`. An empty string when cleared.
|
|
5
|
+
*/
|
|
6
|
+
value: string;
|
|
7
|
+
/** Range mode: the first day of the range, `YYYY-MM-DD`, or `YYYY-MM-DDTHH:mm` with the time picker. */
|
|
8
|
+
start?: string;
|
|
9
|
+
/** Range mode: the last day of the range, `YYYY-MM-DD`, or `YYYY-MM-DDTHH:mm` with the time picker. */
|
|
10
|
+
end?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Range mode: the key of the preset the range matches, such as `last-30-days`, so a filter can
|
|
13
|
+
* keep the range relative to today.
|
|
14
|
+
*/
|
|
15
|
+
preset?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface DatepickerPreset {
|
|
18
|
+
/**
|
|
19
|
+
* A built-in key (`today`, `yesterday`, `last-7-days`, `last-30-days`, `last-90-days`,
|
|
20
|
+
* `this-month`, `last-month`, `this-quarter`, `last-quarter`, `this-year`, `last-year`,
|
|
21
|
+
* `year-to-date`, `last-12-months`), or your own key when `start` and `end` are set.
|
|
22
|
+
*/
|
|
23
|
+
key: string;
|
|
24
|
+
/** The text shown in the list. Built-in keys have English defaults; set it to translate them. */
|
|
25
|
+
label?: string;
|
|
26
|
+
/** For a preset of your own: its first day, `YYYY-MM-DD`. */
|
|
27
|
+
start?: string;
|
|
28
|
+
/** For a preset of your own: its last day, `YYYY-MM-DD`. */
|
|
29
|
+
end?: string;
|
|
30
|
+
}
|