@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,489 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import type { PlacementType } from "../../utils/types";
|
|
3
|
+
import type { DatepickerChangeEventDetail, DatepickerPreset } from './datepicker-interface';
|
|
4
|
+
type DateError = '' | 'format' | 'min' | 'max';
|
|
5
|
+
/**
|
|
6
|
+
* A field for one date, or in range mode a start and end date, with a calendar to pick from.
|
|
7
|
+
* The value is `YYYY-MM-DD`, or `YYYY-MM-DD/YYYY-MM-DD` for a range; with the time picker, each
|
|
8
|
+
* date carries a time, as `YYYY-MM-DDTHH:mm`.
|
|
9
|
+
*
|
|
10
|
+
* @part calendar - The open calendar. It's portaled out of the datepicker, so style it with `.pds-datepicker-calendar-portal::part(calendar)`.
|
|
11
|
+
* @part presets - The list of preset ranges in the calendar, styled with `.pds-datepicker-calendar-portal::part(presets)`.
|
|
12
|
+
*/
|
|
13
|
+
export declare class PdsDatepicker {
|
|
14
|
+
private inputEl?;
|
|
15
|
+
private triggerEl?;
|
|
16
|
+
private clearEl?;
|
|
17
|
+
private dialogEl?;
|
|
18
|
+
/** Where the open calendar lives, outside the datepicker so no ancestor clips or misplaces it. */
|
|
19
|
+
private portal?;
|
|
20
|
+
private internals?;
|
|
21
|
+
private cleanupAutoUpdate?;
|
|
22
|
+
/** Set when the active day should take focus on the next render. */
|
|
23
|
+
private focusActiveDay;
|
|
24
|
+
private readonly fallbackId;
|
|
25
|
+
/** Set by a click on the label, whose forwarded click on the input shouldn't open the calendar. */
|
|
26
|
+
private skipForwardedClick;
|
|
27
|
+
/** Set while an arrow key selects a preset, which auto-apply doesn't apply. */
|
|
28
|
+
private presetByArrow;
|
|
29
|
+
/** The value when the calendar opened, or as last set from outside, which Cancel (without `clearable`) and Escape go back to. */
|
|
30
|
+
private valueAtOpen;
|
|
31
|
+
/** The draft's start and end times from before text typed in the field changed them. */
|
|
32
|
+
private timesBeforeTyping?;
|
|
33
|
+
/** Set while the datepicker commits a value itself, as opposed to one set from outside. */
|
|
34
|
+
private committing;
|
|
35
|
+
/** Whether focus is in the datepicker or its calendar, for pdsFocus and pdsBlur. */
|
|
36
|
+
private hasFocus;
|
|
37
|
+
el: HTMLPdsDatepickerElement;
|
|
38
|
+
/**
|
|
39
|
+
* Accessible label for the button that applies the chosen dates.
|
|
40
|
+
*/
|
|
41
|
+
applyLabel: string;
|
|
42
|
+
/**
|
|
43
|
+
* In range mode, applies the range as soon as its end or a preset is picked, without the Apply and
|
|
44
|
+
* Cancel buttons. Has no effect with the time picker, whose times still need Apply.
|
|
45
|
+
*/
|
|
46
|
+
autoApply: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Accessible label for the button that closes the calendar without changing the dates.
|
|
49
|
+
*/
|
|
50
|
+
cancelLabel: string;
|
|
51
|
+
/**
|
|
52
|
+
* Adds a button in the field that empties it, shown while there's a value. Where Apply and Cancel
|
|
53
|
+
* buttons show, Clear also takes the place of Cancel.
|
|
54
|
+
*/
|
|
55
|
+
clearable: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Accessible label for the button that empties the field, when `clearable` is set.
|
|
58
|
+
*/
|
|
59
|
+
clearLabel: string;
|
|
60
|
+
/**
|
|
61
|
+
* A unique identifier used for the underlying component `id` attribute.
|
|
62
|
+
*/
|
|
63
|
+
componentId: string;
|
|
64
|
+
/**
|
|
65
|
+
* The label of the presets entry that stands for a range of your own. Range mode with presets only.
|
|
66
|
+
*/
|
|
67
|
+
customRangeLabel: string;
|
|
68
|
+
/**
|
|
69
|
+
* Determines whether or not the datepicker is disabled.
|
|
70
|
+
*/
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Accessible label for the end time, in range mode with the time picker.
|
|
74
|
+
*/
|
|
75
|
+
endTimeLabel: string;
|
|
76
|
+
/**
|
|
77
|
+
* Specifies the error message and provides an error-themed treatment to the field.
|
|
78
|
+
*/
|
|
79
|
+
errorMessage?: string;
|
|
80
|
+
/**
|
|
81
|
+
* The first day of the week in the calendar, from `0` (Sunday) to `6` (Saturday). Defaults to the
|
|
82
|
+
* locale's first day where the browser reports it, otherwise Sunday.
|
|
83
|
+
*/
|
|
84
|
+
firstDayOfWeek?: number;
|
|
85
|
+
/**
|
|
86
|
+
* How the field shows dates and reads typed ones, as tokens: `YYYY`, `MMMM` or `MMM` (month name,
|
|
87
|
+
* in the locale), `MM` or `M` (month), `DD` or `D` (day), and with the time picker `HH` or `H`
|
|
88
|
+
* (24-hour), `hh` or `h` (12-hour), `mm` and `A` (AM/PM, in the locale), as `MM/DD/YYYY`,
|
|
89
|
+
* `MMM D, YYYY` or `D.M.YYYY h:mm A`. Put literal text in brackets, as `[Due] D/M/YYYY`. The value
|
|
90
|
+
* and the change event stay ISO (`YYYY-MM-DD`), whatever the format. Typed ISO dates are always
|
|
91
|
+
* accepted too.
|
|
92
|
+
*/
|
|
93
|
+
format: string;
|
|
94
|
+
/**
|
|
95
|
+
* Determines whether or not the datepicker takes full width of its container.
|
|
96
|
+
*/
|
|
97
|
+
fullWidth?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Displays a message or hint below the field.
|
|
100
|
+
*/
|
|
101
|
+
helperMessage?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Visually hides the label text for instances where only the field should be displayed. Label remains accessible to assistive technology such as screen readers.
|
|
104
|
+
*/
|
|
105
|
+
hideLabel: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Accessible label for the hour in the time picker.
|
|
108
|
+
*/
|
|
109
|
+
hourLabel: string;
|
|
110
|
+
/**
|
|
111
|
+
* Determines whether or not the datepicker is invalid or throws an error.
|
|
112
|
+
*/
|
|
113
|
+
invalid?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* The validation message the form reports when the typed text isn't a date that can be picked.
|
|
116
|
+
*/
|
|
117
|
+
invalidDateMessage: string;
|
|
118
|
+
/**
|
|
119
|
+
* The validation message the form reports for a date after `max`. `{date}` is replaced by the
|
|
120
|
+
* latest date, in the field's format.
|
|
121
|
+
*/
|
|
122
|
+
maxDateMessage: string;
|
|
123
|
+
/**
|
|
124
|
+
* The validation message the form reports for a date before `min`. `{date}` is replaced by the
|
|
125
|
+
* earliest date, in the field's format.
|
|
126
|
+
*/
|
|
127
|
+
minDateMessage: string;
|
|
128
|
+
/**
|
|
129
|
+
* Text to be displayed as the datepicker label.
|
|
130
|
+
*/
|
|
131
|
+
label?: string;
|
|
132
|
+
/**
|
|
133
|
+
* The locale used for month and weekday names, as a BCP 47 language tag such as `en-US` or `fr`.
|
|
134
|
+
* Defaults to the nearest `lang` attribute, then the page's `<html lang>`, then `en`.
|
|
135
|
+
*/
|
|
136
|
+
locale?: string;
|
|
137
|
+
/**
|
|
138
|
+
* The latest date that can be picked, as `YYYY-MM-DD`.
|
|
139
|
+
*/
|
|
140
|
+
max?: string;
|
|
141
|
+
/**
|
|
142
|
+
* The earliest date that can be picked, as `YYYY-MM-DD`.
|
|
143
|
+
*/
|
|
144
|
+
min?: string;
|
|
145
|
+
/**
|
|
146
|
+
* The minutes the time picker steps by, such as `15` or `30`.
|
|
147
|
+
*/
|
|
148
|
+
minuteIncrement: number;
|
|
149
|
+
/**
|
|
150
|
+
* Accessible label for the minute in the time picker.
|
|
151
|
+
*/
|
|
152
|
+
minuteLabel: string;
|
|
153
|
+
/**
|
|
154
|
+
* Accessible label for the month dropdown, when `show-dropdowns` is set.
|
|
155
|
+
*/
|
|
156
|
+
monthLabel: string;
|
|
157
|
+
/**
|
|
158
|
+
* Specifies the name. Submitted with the form name/value pair.
|
|
159
|
+
*/
|
|
160
|
+
name?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Accessible label for the button that shows the next month.
|
|
163
|
+
*/
|
|
164
|
+
nextMonthLabel: string;
|
|
165
|
+
/**
|
|
166
|
+
* Accessible label for the AM or PM choice in the time picker, in locales with a 12-hour clock.
|
|
167
|
+
*/
|
|
168
|
+
periodLabel: string;
|
|
169
|
+
/**
|
|
170
|
+
* Specifies a short hint that describes the expected value of the field. Defaults to the format
|
|
171
|
+
* the field takes, such as `YYYY-MM-DD`.
|
|
172
|
+
*/
|
|
173
|
+
placeholder?: string;
|
|
174
|
+
/**
|
|
175
|
+
* The placement of the calendar relative to the field.
|
|
176
|
+
*/
|
|
177
|
+
placement: PlacementType;
|
|
178
|
+
/**
|
|
179
|
+
* Ranges listed beside the calendar in range mode. A comma-separated list of built-in keys
|
|
180
|
+
* (`today`, `yesterday`, `last-7-days`, `last-30-days`, `last-90-days`, `this-month`,
|
|
181
|
+
* `last-month`, `this-quarter`, `last-quarter`, `this-year`, `last-year`, `year-to-date`,
|
|
182
|
+
* `last-12-months`), or an array of `{ key, label?, start?, end? }` to relabel built-ins or add
|
|
183
|
+
* your own.
|
|
184
|
+
*/
|
|
185
|
+
presets?: string | DatepickerPreset[];
|
|
186
|
+
/**
|
|
187
|
+
* Accessible label for the list of presets, in range mode.
|
|
188
|
+
*/
|
|
189
|
+
presetsLabel: string;
|
|
190
|
+
/**
|
|
191
|
+
* Accessible label for the button that shows the previous month.
|
|
192
|
+
*/
|
|
193
|
+
previousMonthLabel: string;
|
|
194
|
+
/**
|
|
195
|
+
* Picks a range: a start and an end date, from two months side by side, applied with the Apply
|
|
196
|
+
* button. The value is `YYYY-MM-DD/YYYY-MM-DD`.
|
|
197
|
+
*/
|
|
198
|
+
range: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Determines whether or not the datepicker is readonly.
|
|
201
|
+
*/
|
|
202
|
+
readonly?: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Determines whether or not the datepicker is required.
|
|
205
|
+
*/
|
|
206
|
+
required?: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Shows month and year dropdowns in place of the month heading, for jumping far, as to a birth year.
|
|
209
|
+
*/
|
|
210
|
+
showDropdowns: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Accessible label for the start time, in range mode with the time picker.
|
|
213
|
+
*/
|
|
214
|
+
startTimeLabel: string;
|
|
215
|
+
/**
|
|
216
|
+
* Adds hour and minute pickers below the calendar, and the value carries the time as
|
|
217
|
+
* `YYYY-MM-DDTHH:mm`. The dates are applied with the Apply button.
|
|
218
|
+
*/
|
|
219
|
+
timePicker: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Accessible label for the time, with the time picker and a single date.
|
|
222
|
+
*/
|
|
223
|
+
timeLabel: string;
|
|
224
|
+
/**
|
|
225
|
+
* Accessible label for the button that opens the calendar. The selected date is added to it.
|
|
226
|
+
*/
|
|
227
|
+
triggerLabel: string;
|
|
228
|
+
/**
|
|
229
|
+
* The selected date as `YYYY-MM-DD`, or in range mode the range as `YYYY-MM-DD/YYYY-MM-DD`; with
|
|
230
|
+
* the time picker, each date as `YYYY-MM-DDTHH:mm`. An empty string when nothing is selected.
|
|
231
|
+
*/
|
|
232
|
+
value?: string;
|
|
233
|
+
/**
|
|
234
|
+
* Accessible label for the year dropdown, when `show-dropdowns` is set.
|
|
235
|
+
*/
|
|
236
|
+
yearLabel: string;
|
|
237
|
+
/**
|
|
238
|
+
* Emitted when the value changes.
|
|
239
|
+
*
|
|
240
|
+
* This event will not emit when programmatically setting the `value` property.
|
|
241
|
+
*/
|
|
242
|
+
pdsDatepickerChange: EventEmitter<DatepickerChangeEventDetail>;
|
|
243
|
+
/**
|
|
244
|
+
* Emitted when the datepicker loses focus: when focus leaves the field and the calendar.
|
|
245
|
+
*/
|
|
246
|
+
pdsBlur: EventEmitter<FocusEvent>;
|
|
247
|
+
/**
|
|
248
|
+
* Emitted when the datepicker gains focus: when focus moves into the field or the calendar from outside.
|
|
249
|
+
*/
|
|
250
|
+
pdsFocus: EventEmitter<FocusEvent>;
|
|
251
|
+
isOpen: boolean;
|
|
252
|
+
/** The text in the field, which may not be a valid date yet. */
|
|
253
|
+
text: string;
|
|
254
|
+
/** Why the typed text wasn't committed: it isn't a date, or it's before `min` or after `max`. */
|
|
255
|
+
textError: DateError;
|
|
256
|
+
/** The day the keyboard is on in the calendar, as `YYYY-MM-DD`. */
|
|
257
|
+
activeDate: string;
|
|
258
|
+
/** The first month on view, as the first of the month, `YYYY-MM-DD`. */
|
|
259
|
+
viewMonth: string;
|
|
260
|
+
/**
|
|
261
|
+
* The dates being chosen, before Apply: range mode's start and end, or the time picker's date.
|
|
262
|
+
* The end is empty while it's being picked.
|
|
263
|
+
*/
|
|
264
|
+
draftStart: string;
|
|
265
|
+
draftEnd: string;
|
|
266
|
+
/** The time picker's times, as `HH:mm`. */
|
|
267
|
+
startTime: string;
|
|
268
|
+
endTime: string;
|
|
269
|
+
/** Range mode: the day under the pointer or keyboard, previewing the end of the range. */
|
|
270
|
+
previewDate: string;
|
|
271
|
+
/**
|
|
272
|
+
* Opens the calendar and moves focus to the selected day, or today.
|
|
273
|
+
*/
|
|
274
|
+
open(): Promise<void>;
|
|
275
|
+
/**
|
|
276
|
+
* Closes the calendar.
|
|
277
|
+
*/
|
|
278
|
+
close(): Promise<void>;
|
|
279
|
+
/**
|
|
280
|
+
* Sets focus on the datepicker's text field.
|
|
281
|
+
*/
|
|
282
|
+
setFocus(): Promise<void>;
|
|
283
|
+
protected valueChanged(): void;
|
|
284
|
+
/**
|
|
285
|
+
* Props that change how the value reads or what can be picked: refresh the field, and an open
|
|
286
|
+
* calendar, as when a framework sets them after the datepicker loads.
|
|
287
|
+
*/
|
|
288
|
+
protected contextChanged(): void;
|
|
289
|
+
protected placementChanged(): void;
|
|
290
|
+
private refreshFromValue;
|
|
291
|
+
protected requiredChanged(): void;
|
|
292
|
+
componentWillLoad(): void;
|
|
293
|
+
connectedCallback(): void;
|
|
294
|
+
componentDidLoad(): void;
|
|
295
|
+
disconnectedCallback(): void;
|
|
296
|
+
componentDidRender(): void;
|
|
297
|
+
/** Focuses the active day once the calendar is placed: a hidden calendar can't take focus. */
|
|
298
|
+
private flushActiveDayFocus;
|
|
299
|
+
/** The id the datepicker's parts are named from: `component-id`, or a generated one. */
|
|
300
|
+
private get baseId();
|
|
301
|
+
private get resolvedLocale();
|
|
302
|
+
private get weekStart();
|
|
303
|
+
private get minDate();
|
|
304
|
+
private get maxDate();
|
|
305
|
+
private get isInteractive();
|
|
306
|
+
/** How many months the calendar shows side by side. */
|
|
307
|
+
private get monthCount();
|
|
308
|
+
/** Whether picks apply at once, without the footer: `auto-apply` in range mode, without times. */
|
|
309
|
+
private get appliesOnPick();
|
|
310
|
+
/** Whether picks wait for Apply: for a range, unless it auto-applies, and for a date with a time. */
|
|
311
|
+
private get hasFooter();
|
|
312
|
+
private get resolvedPresets();
|
|
313
|
+
/** The committed value, parsed: one date, or a range's start and end. */
|
|
314
|
+
private parsedValue;
|
|
315
|
+
/** The format the field shows and reads, with a time when the time picker is on. */
|
|
316
|
+
private get resolvedFormat();
|
|
317
|
+
/** What the field shows for the committed value. */
|
|
318
|
+
private fieldText;
|
|
319
|
+
/** Drops a time the time picker doesn't show, or adds the default one it does. */
|
|
320
|
+
private withTimePicker;
|
|
321
|
+
private get fieldPlaceholder();
|
|
322
|
+
/** Loads the committed value into the draft the calendar edits. */
|
|
323
|
+
private loadDraft;
|
|
324
|
+
/**
|
|
325
|
+
* Opens the calendar. From the button or the keyboard, focus moves to the active day; from a
|
|
326
|
+
* click in the field, it stays there so typing keeps working.
|
|
327
|
+
*/
|
|
328
|
+
private openCalendar;
|
|
329
|
+
private closeCalendar;
|
|
330
|
+
/**
|
|
331
|
+
* Makes a day the active one and brings it into view. With two months, a day already on view
|
|
332
|
+
* doesn't move the view; `reset` lines the view up so the day is in the last month shown.
|
|
333
|
+
*/
|
|
334
|
+
private showDate;
|
|
335
|
+
private pickDate;
|
|
336
|
+
/**
|
|
337
|
+
* The first pick starts a range and the second ends it. A day before the start moves the start,
|
|
338
|
+
* and a pick after a finished range starts a new one.
|
|
339
|
+
*/
|
|
340
|
+
private pickRangeDay;
|
|
341
|
+
/** Sets the value from the user, emitting the change event when it differs. */
|
|
342
|
+
private commitValue;
|
|
343
|
+
/** Commits one date, or a range with its start, end and matching preset. */
|
|
344
|
+
private commitParts;
|
|
345
|
+
/** The draft as values, or `null` before a start is picked. A lone start is a one-day range. */
|
|
346
|
+
private draftParts;
|
|
347
|
+
private onApply;
|
|
348
|
+
/** Cancel empties the field with `clearable`, and otherwise leaves the dates as they were. */
|
|
349
|
+
private onCancel;
|
|
350
|
+
/**
|
|
351
|
+
* Goes back to the value from when the calendar opened, as Cancel and Escape do, and drops any
|
|
352
|
+
* typed text still pending. With Apply showing, typed text isn't committed while focus stays in
|
|
353
|
+
* the datepicker, so usually there's only text to drop; without a footer, text typed in the
|
|
354
|
+
* field is committed when it loses focus, so that commit is undone here.
|
|
355
|
+
*/
|
|
356
|
+
private restoreValueAtOpen;
|
|
357
|
+
private onPresetClick;
|
|
358
|
+
/** Arrow keys move between the presets, picking each, as in a radio group. Custom range only takes focus. */
|
|
359
|
+
private onPresetsKeyDown;
|
|
360
|
+
/**
|
|
361
|
+
* Keeps a press on the clear button, by mouse or touch, from blurring the field, so the text
|
|
362
|
+
* typed in it isn't committed before the click empties it.
|
|
363
|
+
*/
|
|
364
|
+
private onClearMouseDown;
|
|
365
|
+
/** The field's clear button: empties the field and returns focus to it. */
|
|
366
|
+
private onClearClick;
|
|
367
|
+
/** "Custom range" points to the calendar, where a range of your own is picked. */
|
|
368
|
+
private onCustomRangeClick;
|
|
369
|
+
private onDocumentPointerDown;
|
|
370
|
+
/** Whether a node is the datepicker, inside it, or in its portaled calendar. */
|
|
371
|
+
private isInside;
|
|
372
|
+
/**
|
|
373
|
+
* Reports focus arriving from outside. Focus moving within the datepicker never reaches the host:
|
|
374
|
+
* once retargeted, its target and related target are both the host, so the browser skips it.
|
|
375
|
+
*/
|
|
376
|
+
private onHostFocusIn;
|
|
377
|
+
/**
|
|
378
|
+
* Focus arriving in the datepicker or its portaled calendar from outside emits pdsFocus, once.
|
|
379
|
+
* Tracked with a flag rather than `relatedTarget`, which is null or retargeted once the calendar
|
|
380
|
+
* is portaled out of the datepicker.
|
|
381
|
+
*/
|
|
382
|
+
private focusEntered;
|
|
383
|
+
/**
|
|
384
|
+
* Once focus settles, whether it left both the datepicker and its calendar: then pdsBlur, once,
|
|
385
|
+
* and the calendar closes if focus went to another control. Focus that fell to the page, as on a
|
|
386
|
+
* click on a blank area or when a focused control is disabled, leaves the calendar open.
|
|
387
|
+
*/
|
|
388
|
+
private checkFocusLeft;
|
|
389
|
+
/**
|
|
390
|
+
* The calendar is a modal dialog while focus is in it. Opened by a click in the field, focus stays
|
|
391
|
+
* in the field and the calendar is a plain popup beside it. Set on the element rather than through
|
|
392
|
+
* state: focus often moves in from `componentDidRender`, where a state change doesn't re-render.
|
|
393
|
+
*/
|
|
394
|
+
private onCalendarFocusIn;
|
|
395
|
+
/**
|
|
396
|
+
* The portaled calendar is outside the datepicker, so the host never hears focus leave it: close
|
|
397
|
+
* and report blur from here when focus goes from the calendar to the rest of the page. Checked
|
|
398
|
+
* once focus has settled, with `:focus-within`, rather than from `relatedTarget`, which is
|
|
399
|
+
* retargeted past the datepicker when it sits in another component's shadow root.
|
|
400
|
+
*/
|
|
401
|
+
private onCalendarFocusOut;
|
|
402
|
+
/** Closes the calendar and reports blur when focus leaves the datepicker, as when tabbing out. */
|
|
403
|
+
private onHostFocusOut;
|
|
404
|
+
private startPositioning;
|
|
405
|
+
private stopPositioning;
|
|
406
|
+
/** The field's box, so the calendar lines up with it rather than with the label or messages. */
|
|
407
|
+
private fieldReference;
|
|
408
|
+
private stopInnerEvent;
|
|
409
|
+
/** A click in the field opens the calendar beside it; the button inside toggles it on its own. */
|
|
410
|
+
private onFieldClick;
|
|
411
|
+
/** Typing a date or range the calendar can show moves the open calendar to it. */
|
|
412
|
+
private onTextInput;
|
|
413
|
+
private onTextChange;
|
|
414
|
+
/**
|
|
415
|
+
* Commits text typed while the calendar was open, when it closes without Apply or Cancel. A
|
|
416
|
+
* valid date or range commits the draft, which also holds a time picked in the calendar; text
|
|
417
|
+
* that isn't one is read as typed, so the field shows its error.
|
|
418
|
+
*/
|
|
419
|
+
private commitPendingText;
|
|
420
|
+
/** The typed text as a date or range, or `null` if it isn't one; it may be outside `min` and `max`. */
|
|
421
|
+
private readText;
|
|
422
|
+
/** The typed text as a date or range that can be picked, or `null`. */
|
|
423
|
+
private parseText;
|
|
424
|
+
/** Whether any of these dates is before `min` or after `max`. */
|
|
425
|
+
private rangeError;
|
|
426
|
+
/** What's wrong with the committed value, as one set in code: not a date, or out of range. */
|
|
427
|
+
private valueError;
|
|
428
|
+
private commitText;
|
|
429
|
+
private onTextKeyDown;
|
|
430
|
+
/**
|
|
431
|
+
* The calendar button's keys. Escape closes an open calendar, as in the field and the calendar,
|
|
432
|
+
* and is stopped there, so a modal or popover around the datepicker stays open. Tab goes into a
|
|
433
|
+
* calendar a click in the field opened: it's portaled to the end of the page, so Tab would
|
|
434
|
+
* otherwise skip past it.
|
|
435
|
+
*/
|
|
436
|
+
private onTriggerKeyDown;
|
|
437
|
+
private onTriggerClick;
|
|
438
|
+
/** Whether the month before (`-1`) or after (`1`) the ones on view has a day in range. */
|
|
439
|
+
private canShowMonth;
|
|
440
|
+
private showMonth;
|
|
441
|
+
/** Shows the chosen month in the calendar at `index`, from the month or year dropdown. */
|
|
442
|
+
private jumpTo;
|
|
443
|
+
/**
|
|
444
|
+
* Drops text typed in the field and not committed, showing the committed value again. pds-input
|
|
445
|
+
* is set directly: when typing and this land in one frame, the rendered text never changed.
|
|
446
|
+
*/
|
|
447
|
+
private dropTypedText;
|
|
448
|
+
private onDialogKeyDown;
|
|
449
|
+
/** Keeps Tab within the calendar while it's open, as in a modal dialog. */
|
|
450
|
+
private trapTab;
|
|
451
|
+
private onGridKeyDown;
|
|
452
|
+
/** The day under an event in a grid, from its cell. */
|
|
453
|
+
private dayFromEvent;
|
|
454
|
+
private onGridClick;
|
|
455
|
+
private onGridPointerOver;
|
|
456
|
+
/**
|
|
457
|
+
* Submits the value and reports validity to the form, as pds-input does: `required` with no
|
|
458
|
+
* value, or typed text that isn't a date, blocks submission.
|
|
459
|
+
*/
|
|
460
|
+
private updateFormValue;
|
|
461
|
+
/** A min or max message with its date, in the field's format. */
|
|
462
|
+
private boundMessage;
|
|
463
|
+
formResetCallback(): void;
|
|
464
|
+
/** Disabling the datepicker, or making it read-only, while the calendar is open closes it. */
|
|
465
|
+
protected interactivityChanged(): void;
|
|
466
|
+
formDisabledCallback(disabled: boolean): void;
|
|
467
|
+
formStateRestoreCallback(state: string | FormData | null): void;
|
|
468
|
+
private triggerAccessibleName;
|
|
469
|
+
/** The range to highlight: the chosen one, or the start to the previewed day while picking the end. */
|
|
470
|
+
private highlightedRange;
|
|
471
|
+
/** The day shown as selected: the draft, which opens as the committed day and follows typing. */
|
|
472
|
+
private selectedDay;
|
|
473
|
+
private renderMonthHeading;
|
|
474
|
+
private renderMonth;
|
|
475
|
+
/**
|
|
476
|
+
* The time pickers under a month: the start time under the first and the end time under the
|
|
477
|
+
* second, or both under the one month a narrow range shows.
|
|
478
|
+
*/
|
|
479
|
+
private timesUnderMonth;
|
|
480
|
+
/** Hour, minute and (on a 12-hour clock) AM/PM pickers for the start or end time. */
|
|
481
|
+
private renderTime;
|
|
482
|
+
private renderPresets;
|
|
483
|
+
/** What Apply would set, in the field's format: shown in the footer, and announced as it changes. */
|
|
484
|
+
private selectionText;
|
|
485
|
+
private renderFooter;
|
|
486
|
+
private renderCalendar;
|
|
487
|
+
render(): any;
|
|
488
|
+
}
|
|
489
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { DatepickerPreset } from './datepicker-interface';
|
|
2
|
+
/** A preset resolved against today: what the panel lists and matches the range against. */
|
|
3
|
+
export interface ResolvedPreset {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
start: Date;
|
|
7
|
+
end: Date;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The range a built-in preset covers on the given day, or `null` for an unknown key. "Last N days"
|
|
11
|
+
* is N days ending today; "this" and "last" periods are whole periods; "to date" ends today.
|
|
12
|
+
*/
|
|
13
|
+
export declare function builtInPresetRange(key: string, now: Date): [Date, Date] | null;
|
|
14
|
+
/**
|
|
15
|
+
* Normalizes the `presets` prop: a comma-separated list of built-in keys, or an array of presets
|
|
16
|
+
* that may relabel a built-in (for translation) or give their own `start` and `end`. Entries that
|
|
17
|
+
* resolve to no range are dropped.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolvePresets(presets: string | DatepickerPreset[] | undefined, now: Date): ResolvedPreset[];
|
|
20
|
+
/** The first preset covering exactly this range. */
|
|
21
|
+
export declare function matchPreset(presets: ResolvedPreset[], start: Date | null, end: Date | null): ResolvedPreset | undefined;
|
|
22
|
+
/** Whether a preset's whole range can be picked within `min` and `max`. */
|
|
23
|
+
export declare function presetInRange(preset: ResolvedPreset, min: Date | null, max: Date | null): boolean;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** A day, with a wall-clock time when the time picker is on. No time zone, so it never shifts. */
|
|
2
|
+
export interface DateTimeValue {
|
|
3
|
+
date: Date;
|
|
4
|
+
/** `HH:mm`, 24-hour, or `null` without a time. */
|
|
5
|
+
time: string | null;
|
|
6
|
+
}
|
|
7
|
+
/** Parses `YYYY-MM-DD`, `YYYY-MM-DDTHH:mm` or `YYYY-MM-DD HH:mm`. */
|
|
8
|
+
export declare function parseDateTime(text: string | null | undefined): DateTimeValue | null;
|
|
9
|
+
export declare const DEFAULT_FORMAT = "YYYY-MM-DD";
|
|
10
|
+
/**
|
|
11
|
+
* The field's format: the date format, with a time added when the time picker is on and it has
|
|
12
|
+
* none, on the same clock as the time picker. A 12-hour format gets AM/PM if it has none, as
|
|
13
|
+
* `1:30` alone can't say which.
|
|
14
|
+
*/
|
|
15
|
+
export declare function fieldFormat(format: string | null | undefined, timePicker: boolean, hour12?: boolean): string;
|
|
16
|
+
/** Writes a date in a format of tokens (see `FORMAT_PARTS`), with month names and AM/PM in the locale. */
|
|
17
|
+
export declare function formatWith(value: DateTimeValue, format: string, locale?: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Reads typed text in a format of tokens, as written by `formatWith`. Leading zeros are optional,
|
|
20
|
+
* spaces are loose, and month names and AM/PM are matched without regard to case, in the locale or
|
|
21
|
+
* in English. Returns `null` for anything that isn't a real date and time in that format.
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseWith(text: string | null | undefined, format: string, locale?: string): DateTimeValue | null;
|
|
24
|
+
/** Reads one typed date in the format, falling back to ISO, which is always accepted. */
|
|
25
|
+
export declare function parseFieldText(text: string | null | undefined, format?: string, locale?: string): DateTimeValue | null;
|
|
26
|
+
/**
|
|
27
|
+
* Parses a typed range: two dates (with times, optionally) joined by a dash or `to` with spaces
|
|
28
|
+
* around it, as `2026-09-13 – 2026-10-13`, or by `/` when the format doesn't use slashes. The
|
|
29
|
+
* split is tried at each separator until both halves read as dates, so a format that itself has a
|
|
30
|
+
* spaced dash, as `D - M - YYYY`, still works.
|
|
31
|
+
*/
|
|
32
|
+
export declare function parseRangeText(text: string | null | undefined, format?: string, locale?: string): [DateTimeValue, DateTimeValue] | null;
|
|
33
|
+
export declare function compareDateTime(a: DateTimeValue, b: DateTimeValue): number;
|
|
34
|
+
/** The value form: `YYYY-MM-DD`, or `YYYY-MM-DDTHH:mm` with a time. */
|
|
35
|
+
export declare function toValueString(value: DateTimeValue): string;
|
|
36
|
+
/** The field form in a format, or by default `YYYY-MM-DD`, with ` HH:mm` when it has a time. */
|
|
37
|
+
export declare function toFieldText(value: DateTimeValue, format?: string, locale?: string): string;
|
|
38
|
+
export declare const RANGE_SEPARATOR = " \u2013 ";
|
|
39
|
+
/** Hour and minute numbers from `HH:mm`. */
|
|
40
|
+
export declare function splitTime(time: string): [number, number];
|
|
41
|
+
export declare function joinTime(hours: number, minutes: number): string;
|
|
42
|
+
/** Whether the locale writes times on a 12-hour clock, and its AM and PM words. */
|
|
43
|
+
export declare function clockFor(locale: string): {
|
|
44
|
+
hour12: boolean;
|
|
45
|
+
am: string;
|
|
46
|
+
pm: string;
|
|
47
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import type { ModalSizeType } from "../../utils/types";
|
|
2
3
|
export declare class PdsModal {
|
|
3
4
|
private modalRef;
|
|
4
5
|
private previousActiveElement;
|
|
@@ -19,10 +20,12 @@ export declare class PdsModal {
|
|
|
19
20
|
*/
|
|
20
21
|
open: boolean;
|
|
21
22
|
/**
|
|
22
|
-
* The size of the modal
|
|
23
|
+
* The size of the modal. Can be a predefined value ('sm', 'md', 'lg', 'fullscreen') or a custom
|
|
24
|
+
* max-width as a CSS length (e.g., '1250px', '80vw'). A custom width stays fluid below that size.
|
|
25
|
+
* A value that is neither falls back to 'md'.
|
|
23
26
|
* @default 'md'
|
|
24
27
|
*/
|
|
25
|
-
size:
|
|
28
|
+
size: ModalSizeType | (string & Record<never, never>);
|
|
26
29
|
/**
|
|
27
30
|
* Whether the modal content should be scrollable
|
|
28
31
|
* @default true
|
|
@@ -63,6 +66,8 @@ export declare class PdsModal {
|
|
|
63
66
|
* Stores the list of focusable elements in the modal
|
|
64
67
|
*/
|
|
65
68
|
focusableElementsArray: HTMLElement[];
|
|
69
|
+
componentWillLoad(): void;
|
|
70
|
+
sizeChanged(): void;
|
|
66
71
|
componentDidLoad(): void;
|
|
67
72
|
componentDidRender(): void;
|
|
68
73
|
disconnectedCallback(): void;
|
|
@@ -122,5 +127,7 @@ export declare class PdsModal {
|
|
|
122
127
|
*/
|
|
123
128
|
private isInnermostModal;
|
|
124
129
|
private handleKeyDown;
|
|
130
|
+
private resolveSize;
|
|
131
|
+
private warnOnInvalidSize;
|
|
125
132
|
render(): any;
|
|
126
133
|
}
|
|
@@ -9,12 +9,28 @@ export interface MultiselectOption {
|
|
|
9
9
|
* rows with the same label produce separate headers (mirrors native `<optgroup>`).
|
|
10
10
|
*/
|
|
11
11
|
group?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Sets the dot color of the option's chip when the multiselect's `optionDisplay` is `'chip'`. Accepts a sentiment
|
|
14
|
+
* name other than `brand` (e.g. `success`), a color token, or a [valid color value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).
|
|
15
|
+
*/
|
|
16
|
+
dotColor?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The name of the icon for this option's action, such as `pen`; URLs and file paths are not accepted. Shown when the
|
|
19
|
+
* multiselect has `optionActions`; options without a valid icon name have no action.
|
|
20
|
+
*/
|
|
21
|
+
actionIcon?: string;
|
|
22
|
+
/** Overrides the multiselect's `optionActionLabel` for this option; `{text}` is interpolated. */
|
|
23
|
+
actionLabel?: string;
|
|
12
24
|
isCreateOption?: boolean;
|
|
13
25
|
[key: string]: unknown;
|
|
14
26
|
}
|
|
15
27
|
export interface MultiselectChangeEventDetail {
|
|
16
28
|
values: string[];
|
|
17
29
|
items: MultiselectOption[];
|
|
30
|
+
/** Values selected by this change. Always present on emitted events. */
|
|
31
|
+
added?: string[];
|
|
32
|
+
/** Values deselected by this change. Always present on emitted events. */
|
|
33
|
+
removed?: string[];
|
|
18
34
|
}
|
|
19
35
|
export interface MultiselectSearchEventDetail {
|
|
20
36
|
query: string;
|
|
@@ -27,6 +43,9 @@ export interface MultiselectCreateEventDetail {
|
|
|
27
43
|
query: string;
|
|
28
44
|
newOption: MultiselectOption;
|
|
29
45
|
}
|
|
46
|
+
export interface MultiselectOptionActionEventDetail {
|
|
47
|
+
option: MultiselectOption;
|
|
48
|
+
}
|
|
30
49
|
export interface AsyncResponse {
|
|
31
50
|
results: Array<{
|
|
32
51
|
id: string | number;
|