@pine-ds/core 4.5.0 → 4.6.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/attributes.js +1 -1
- package/components/mock-pds-modal.js +1 -1
- package/components/pds-combobox.js +1 -1
- package/components/pds-container.js +1 -1
- package/components/pds-copytext.js +1 -1
- package/components/pds-datepicker.js +1 -1
- 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-input2.js +1 -1
- 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 +1 -1
- package/components/pds-switch.js +1 -1
- package/components/pds-tab.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/dist/cjs/{attributes-DXvaSETR.js → attributes-BJ7KBHql.js} +18 -11
- package/dist/cjs/{index-D-QQKB0y.js → index-5Azb8EQG.js} +1 -1
- package/dist/cjs/{index-BQjWfQXw.js → index-jl_Q819j.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/keep-hydrated-CiXgkEYd.js +196 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/mock-pds-modal.cjs.entry.js +3 -3
- package/dist/cjs/pds-accordion.cjs.entry.js +3 -3
- package/dist/cjs/pds-alert.cjs.entry.js +2 -2
- package/dist/cjs/pds-avatar.cjs.entry.js +3 -3
- package/dist/cjs/pds-box.cjs.entry.js +3 -3
- package/dist/cjs/pds-button.cjs.entry.js +3 -3
- package/dist/cjs/pds-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/pds-chip.cjs.entry.js +4 -4
- package/dist/cjs/pds-combobox.cjs.entry.js +156 -27
- package/dist/cjs/pds-container.cjs.entry.js +3 -3
- package/dist/cjs/pds-copytext.cjs.entry.js +5 -5
- package/dist/cjs/pds-datepicker.cjs.entry.js +5 -5
- package/dist/cjs/pds-divider.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer-content.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer-footer.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer-header.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer.cjs.entry.js +4 -4
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +3 -3
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +3 -3
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +16 -8
- package/dist/cjs/pds-filter.cjs.entry.js +4 -4
- package/dist/cjs/pds-filters.cjs.entry.js +3 -3
- package/dist/cjs/pds-icon.cjs.entry.js +27 -4
- package/dist/cjs/pds-image.cjs.entry.js +4 -4
- package/dist/cjs/pds-input.cjs.entry.js +6 -6
- package/dist/cjs/pds-link.cjs.entry.js +5 -5
- package/dist/cjs/pds-loader.cjs.entry.js +4 -4
- package/dist/cjs/pds-modal-content.cjs.entry.js +4 -4
- package/dist/cjs/pds-modal-footer.cjs.entry.js +3 -3
- package/dist/cjs/pds-modal-header.cjs.entry.js +3 -3
- package/dist/cjs/pds-modal.cjs.entry.js +5 -5
- package/dist/cjs/pds-multiselect.cjs.entry.js +6 -6
- package/dist/cjs/pds-popover.cjs.entry.js +58 -12
- package/dist/cjs/pds-progress.cjs.entry.js +4 -4
- package/dist/cjs/pds-property.cjs.entry.js +3 -3
- package/dist/cjs/pds-radio-group.cjs.entry.js +6 -6
- package/dist/cjs/pds-radio.cjs.entry.js +7 -7
- package/dist/cjs/pds-row.cjs.entry.js +4 -4
- package/dist/cjs/pds-select.cjs.entry.js +5 -5
- package/dist/cjs/pds-sortable-item.cjs.entry.js +5 -5
- package/dist/cjs/pds-sortable.cjs.entry.js +4 -4
- package/dist/cjs/pds-switch.cjs.entry.js +7 -7
- package/dist/cjs/pds-tab.cjs.entry.js +13 -2
- package/dist/cjs/pds-table-body.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-cell.cjs.entry.js +4 -4
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +5 -5
- 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 +2 -2
- package/dist/cjs/pds-tabpanel.cjs.entry.js +15 -3
- package/dist/cjs/pds-tabs.cjs.entry.js +111 -7
- package/dist/cjs/pds-text.cjs.entry.js +3 -3
- package/dist/cjs/pds-textarea.cjs.entry.js +8 -8
- package/dist/cjs/pds-toast.cjs.entry.js +5 -5
- package/dist/cjs/pds-tooltip.cjs.entry.js +4 -4
- package/dist/cjs/pine-core.cjs.js +3 -3
- package/dist/collection/components/pds-combobox/grouped-options-panel.js +21 -3
- package/dist/collection/components/pds-combobox/pds-combobox.css +42 -13
- package/dist/collection/components/pds-combobox/pds-combobox.js +135 -22
- package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +45 -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/pds-datepicker.js +2 -2
- 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.js +2 -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.css +19 -5
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +16 -5
- 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 +2 -2
- 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.js +3 -3
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +3 -3
- package/dist/collection/components/pds-popover/pds-popover.js +15 -9
- 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.js +3 -3
- 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-tab/pds-tab.js +11 -0
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +13 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js +111 -7
- package/dist/collection/components/pds-text/pds-text.js +1 -1
- package/dist/collection/components/pds-textarea/pds-textarea.js +4 -4
- 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/attributes.js +18 -11
- package/dist/collection/utils/css.js +41 -0
- package/dist/collection/utils/keep-hydrated.js +133 -6
- package/dist/docs.json +15 -6
- package/dist/esm/{attributes-CF5K2pxn.js → attributes-WXw_I_uJ.js} +18 -11
- package/dist/esm/{index-DxI-61GK.js → index-BJXk71tO.js} +1 -1
- package/dist/esm/{index-2HMD-zUO.js → index-Cw9J31qd.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/keep-hydrated-BLG6RDBt.js +190 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/mock-pds-modal.entry.js +3 -3
- package/dist/esm/pds-accordion.entry.js +3 -3
- package/dist/esm/pds-alert.entry.js +2 -2
- package/dist/esm/pds-avatar.entry.js +3 -3
- package/dist/esm/pds-box.entry.js +3 -3
- package/dist/esm/pds-button.entry.js +3 -3
- package/dist/esm/pds-checkbox.entry.js +4 -4
- package/dist/esm/pds-chip.entry.js +4 -4
- package/dist/esm/pds-combobox.entry.js +156 -27
- package/dist/esm/pds-container.entry.js +3 -3
- package/dist/esm/pds-copytext.entry.js +5 -5
- package/dist/esm/pds-datepicker.entry.js +5 -5
- package/dist/esm/pds-divider.entry.js +3 -3
- package/dist/esm/pds-drawer-content.entry.js +3 -3
- package/dist/esm/pds-drawer-footer.entry.js +3 -3
- package/dist/esm/pds-drawer-header.entry.js +3 -3
- package/dist/esm/pds-drawer.entry.js +4 -4
- package/dist/esm/pds-dropdown-menu-item.entry.js +3 -3
- package/dist/esm/pds-dropdown-menu-separator.entry.js +3 -3
- package/dist/esm/pds-dropdown-menu.entry.js +16 -8
- package/dist/esm/pds-filter.entry.js +4 -4
- package/dist/esm/pds-filters.entry.js +3 -3
- package/dist/esm/pds-icon.entry.js +27 -4
- package/dist/esm/pds-image.entry.js +4 -4
- package/dist/esm/pds-input.entry.js +6 -6
- package/dist/esm/pds-link.entry.js +5 -5
- package/dist/esm/pds-loader.entry.js +4 -4
- package/dist/esm/pds-modal-content.entry.js +4 -4
- package/dist/esm/pds-modal-footer.entry.js +3 -3
- package/dist/esm/pds-modal-header.entry.js +3 -3
- package/dist/esm/pds-modal.entry.js +5 -5
- package/dist/esm/pds-multiselect.entry.js +6 -6
- package/dist/esm/pds-popover.entry.js +58 -12
- package/dist/esm/pds-progress.entry.js +4 -4
- package/dist/esm/pds-property.entry.js +3 -3
- package/dist/esm/pds-radio-group.entry.js +6 -6
- package/dist/esm/pds-radio.entry.js +7 -7
- package/dist/esm/pds-row.entry.js +4 -4
- package/dist/esm/pds-select.entry.js +5 -5
- package/dist/esm/pds-sortable-item.entry.js +5 -5
- package/dist/esm/pds-sortable.entry.js +4 -4
- package/dist/esm/pds-switch.entry.js +7 -7
- package/dist/esm/pds-tab.entry.js +13 -2
- package/dist/esm/pds-table-body.entry.js +3 -3
- package/dist/esm/pds-table-cell.entry.js +4 -4
- package/dist/esm/pds-table-head-cell.entry.js +5 -5
- 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 +2 -2
- package/dist/esm/pds-tabpanel.entry.js +15 -3
- package/dist/esm/pds-tabs.entry.js +111 -7
- package/dist/esm/pds-text.entry.js +3 -3
- package/dist/esm/pds-textarea.entry.js +8 -8
- package/dist/esm/pds-toast.entry.js +5 -5
- package/dist/esm/pds-tooltip.entry.js +4 -4
- package/dist/esm/pine-core.js +4 -4
- package/dist/esm-es5/attributes-WXw_I_uJ.js +1 -0
- package/dist/esm-es5/{index-2HMD-zUO.js → index-Cw9J31qd.js} +2 -2
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/keep-hydrated-BLG6RDBt.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 -1
- 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/pine-core/index.esm.js +1 -1
- package/dist/pine-core/{p-9a7ee7cb.system.entry.js → p-0092444c.system.entry.js} +1 -1
- package/dist/pine-core/{p-d576e542.system.entry.js → p-01aa382c.system.entry.js} +1 -1
- package/dist/pine-core/p-01c9b8f3.entry.js +1 -0
- package/dist/pine-core/{p-d69cfaa4.entry.js → p-02088776.entry.js} +1 -1
- package/dist/pine-core/p-049f126a.entry.js +1 -0
- package/dist/pine-core/{p-8b9d8fb5.system.entry.js → p-080cb087.system.entry.js} +1 -1
- package/dist/pine-core/{p-99317375.system.entry.js → p-0913f696.system.entry.js} +1 -1
- package/dist/pine-core/{p-5737182f.entry.js → p-0a84d220.entry.js} +1 -1
- package/dist/pine-core/{p-4c9cccdb.system.entry.js → p-0b71ecb6.system.entry.js} +2 -2
- package/dist/pine-core/{p-37d73369.system.entry.js → p-1437585e.system.entry.js} +1 -1
- package/dist/pine-core/{p-22f041ee.system.entry.js → p-1ee86d87.system.entry.js} +1 -1
- package/dist/pine-core/{p-5decd81f.entry.js → p-208c7dbf.entry.js} +1 -1
- package/dist/pine-core/{p-51dff046.system.entry.js → p-258770cf.system.entry.js} +1 -1
- package/dist/pine-core/{p-1f2e5958.entry.js → p-258d5e83.entry.js} +1 -1
- package/dist/pine-core/{p-4e05a4f0.entry.js → p-26642718.entry.js} +1 -1
- package/dist/pine-core/{p-1b13f69c.system.entry.js → p-2ac2457b.system.entry.js} +1 -1
- package/dist/pine-core/p-2cb5483a.system.entry.js +1 -0
- package/dist/pine-core/{p-1f263c0b.system.entry.js → p-341c38f1.system.entry.js} +1 -1
- package/dist/pine-core/{p-bd7da23e.system.entry.js → p-3a959459.system.entry.js} +1 -1
- package/dist/pine-core/p-3c27088f.system.entry.js +1 -0
- package/dist/pine-core/{p-1e464117.entry.js → p-432d5ec7.entry.js} +1 -1
- package/dist/pine-core/{p-0de74105.entry.js → p-4849fda7.entry.js} +1 -1
- package/dist/pine-core/{p-f30d6192.system.entry.js → p-4d03d1e2.system.entry.js} +1 -1
- package/dist/pine-core/{p-2cb02706.entry.js → p-4de8f333.entry.js} +1 -1
- package/dist/pine-core/{p-152245fa.system.entry.js → p-4f94b4f1.system.entry.js} +1 -1
- package/dist/pine-core/{p-66cfef6d.system.entry.js → p-4fa63723.system.entry.js} +1 -1
- package/dist/pine-core/p-4fd454f6.entry.js +1 -0
- package/dist/pine-core/{p-70c6f0ed.system.entry.js → p-5442d983.system.entry.js} +1 -1
- package/dist/pine-core/{p-8027db25.entry.js → p-550c2fd3.entry.js} +1 -1
- package/dist/pine-core/{p-7d01e719.entry.js → p-55224683.entry.js} +1 -1
- package/dist/pine-core/{p-65e30a4c.entry.js → p-57a2f927.entry.js} +1 -1
- package/dist/pine-core/{p-721297b5.system.entry.js → p-5870b092.system.entry.js} +1 -1
- package/dist/pine-core/{p-6d83ad2d.system.entry.js → p-5c90091e.system.entry.js} +1 -1
- package/dist/pine-core/p-602c197f.entry.js +1 -0
- package/dist/pine-core/p-646afbca.system.entry.js +1 -0
- package/dist/pine-core/{p-45fcc5b7.entry.js → p-6bf853c9.entry.js} +1 -1
- package/dist/pine-core/{p-5d014059.entry.js → p-6d3610f9.entry.js} +1 -1
- package/dist/pine-core/{p-343546b1.system.entry.js → p-6eec23a7.system.entry.js} +1 -1
- package/dist/pine-core/{p-5132b8a1.entry.js → p-72865997.entry.js} +1 -1
- package/dist/pine-core/{p-9d33bb05.entry.js → p-73eb47fa.entry.js} +1 -1
- package/dist/pine-core/p-75ee0403.entry.js +1 -0
- package/dist/pine-core/p-77395d62.system.entry.js +1 -0
- package/dist/pine-core/p-7a287635.system.entry.js +1 -0
- package/dist/pine-core/p-7a5b21d2.system.entry.js +1 -0
- package/dist/pine-core/{p-a83a6618.system.entry.js → p-7bf6563a.system.entry.js} +1 -1
- package/dist/pine-core/{p-347ae53c.system.entry.js → p-7f367db4.system.entry.js} +1 -1
- package/dist/pine-core/{p-71e3a89e.system.entry.js → p-8191498f.system.entry.js} +1 -1
- package/dist/pine-core/{p-0166c620.entry.js → p-82cf4ec6.entry.js} +1 -1
- package/dist/pine-core/{p-16c2aa63.entry.js → p-84e9b7da.entry.js} +1 -1
- package/dist/pine-core/{p-bdf68e53.system.entry.js → p-86040cac.system.entry.js} +1 -1
- package/dist/pine-core/p-875b0436.system.entry.js +1 -0
- package/dist/pine-core/{p-87f91e02.system.entry.js → p-8c8cc079.system.entry.js} +1 -1
- package/dist/pine-core/{p-ba1b79c7.system.entry.js → p-8cc302aa.system.entry.js} +1 -1
- package/dist/pine-core/{p-5b7f7760.entry.js → p-8d292b48.entry.js} +1 -1
- package/dist/pine-core/{p-650ccffb.entry.js → p-8f531063.entry.js} +1 -1
- package/dist/pine-core/p-9109b90a.entry.js +1 -0
- package/dist/pine-core/p-94593f20.system.entry.js +1 -0
- package/dist/pine-core/{p-04fe5da7.system.entry.js → p-9880d251.system.entry.js} +1 -1
- package/dist/pine-core/p-99459e27.entry.js +1 -0
- package/dist/pine-core/{p-4414d442.system.entry.js → p-9a0083dd.system.entry.js} +1 -1
- package/dist/pine-core/{p-9835c74b.entry.js → p-9ab95438.entry.js} +1 -1
- package/dist/pine-core/{p-a6d09102.system.entry.js → p-9af131d6.system.entry.js} +1 -1
- package/dist/pine-core/{p-59491f98.entry.js → p-9dcd2cdb.entry.js} +1 -1
- package/dist/pine-core/{p-c00e46a5.system.entry.js → p-9e0f920a.system.entry.js} +1 -1
- package/dist/pine-core/p-BGLP3keB.js +1 -0
- package/dist/pine-core/p-BLG6RDBt.js +1 -0
- package/dist/pine-core/p-BR5nujVX.system.js +1 -0
- package/dist/pine-core/{p-BJlg6wq7.system.js → p-CGRdQc49.system.js} +2 -2
- package/dist/pine-core/{p-DeIDZHrg.js → p-CmSJytt1.js} +2 -2
- package/dist/pine-core/p-CuSNnuFu.system.js +1 -0
- package/dist/pine-core/{p-YQa3CeL9.system.js → p-Cy8cvR7I.system.js} +1 -1
- package/dist/pine-core/p-XW4H0W6i.system.js +1 -0
- package/dist/pine-core/p-a0960b3d.system.entry.js +1 -0
- package/dist/pine-core/p-a1230a74.system.entry.js +1 -0
- package/dist/pine-core/{p-fbea5703.entry.js → p-a19cd59c.entry.js} +1 -1
- package/dist/pine-core/p-a3735199.entry.js +1 -0
- package/dist/pine-core/p-a826f290.entry.js +1 -0
- package/dist/pine-core/{p-1ec4eeaf.system.entry.js → p-a85a6ab9.system.entry.js} +1 -1
- package/dist/pine-core/p-acce8eb2.entry.js +1 -0
- package/dist/pine-core/p-b1548a20.entry.js +1 -0
- package/dist/pine-core/{p-93877d4a.entry.js → p-b69f04b7.entry.js} +1 -1
- package/dist/pine-core/p-b75b0d09.system.entry.js +1 -0
- package/dist/pine-core/{p-02857936.entry.js → p-b8e8a4ce.entry.js} +1 -1
- package/dist/pine-core/{p-622e91e3.entry.js → p-b914dde8.entry.js} +2 -2
- package/dist/pine-core/{p-5bc670be.system.entry.js → p-ba1f65c2.system.entry.js} +1 -1
- package/dist/pine-core/p-bb68431a.entry.js +1 -0
- package/dist/pine-core/{p-c8e89b61.system.entry.js → p-bd67156b.system.entry.js} +1 -1
- package/dist/pine-core/{p-db4319fd.entry.js → p-beb23781.entry.js} +1 -1
- package/dist/pine-core/p-bf30dec0.entry.js +1 -0
- package/dist/pine-core/{p-91f712f4.system.entry.js → p-bf7ee3b7.system.entry.js} +1 -1
- package/dist/pine-core/{p-b5838211.system.entry.js → p-c5c9ed36.system.entry.js} +1 -1
- package/dist/pine-core/{p-21115986.system.entry.js → p-cb6a3e4c.system.entry.js} +1 -1
- package/dist/pine-core/{p-1cf1fced.entry.js → p-cde8eb81.entry.js} +1 -1
- package/dist/pine-core/{p-1d75a9b1.system.entry.js → p-cf08a6dd.system.entry.js} +1 -1
- package/dist/pine-core/p-cfd012d4.entry.js +1 -0
- package/dist/pine-core/{p-5e8d73d4.entry.js → p-d2c91e7a.entry.js} +1 -1
- package/dist/pine-core/{p-7e115d33.system.entry.js → p-da103a54.system.entry.js} +1 -1
- package/dist/pine-core/{p-7bbfb965.system.entry.js → p-db17c626.system.entry.js} +1 -1
- package/dist/pine-core/p-df539c42.system.entry.js +3 -0
- package/dist/pine-core/p-e0917a26.entry.js +1 -0
- package/dist/pine-core/p-e5420660.entry.js +1 -0
- package/dist/pine-core/{p-585832b1.entry.js → p-e800a2b1.entry.js} +1 -1
- package/dist/pine-core/{p-8b0fbeb3.entry.js → p-e836a041.entry.js} +1 -1
- package/dist/pine-core/{p-506d3e80.entry.js → p-e8cb76e8.entry.js} +1 -1
- package/dist/pine-core/p-ea4d4741.system.entry.js +1 -0
- package/dist/pine-core/{p-419f57c9.entry.js → p-eb5465ce.entry.js} +1 -1
- package/dist/pine-core/{p-63119d23.entry.js → p-ebd0bff2.entry.js} +1 -1
- package/dist/pine-core/p-ec5428fb.entry.js +1 -0
- package/dist/pine-core/{p-4e67e68e.entry.js → p-ed4b979e.entry.js} +1 -1
- package/dist/pine-core/p-f029b7da.system.entry.js +1 -0
- package/dist/pine-core/{p-e337f32c.system.entry.js → p-f0d24298.system.entry.js} +1 -1
- package/dist/pine-core/{p-9b9f66b7.entry.js → p-f1702281.entry.js} +1 -1
- package/dist/pine-core/p-f1f17940.entry.js +2 -0
- package/dist/pine-core/{p-238e5171.system.entry.js → p-f25e4731.system.entry.js} +1 -1
- package/dist/pine-core/{p-37d95be9.entry.js → p-f2c253d8.entry.js} +1 -1
- package/dist/pine-core/{p-a22091c4.system.entry.js → p-f77905aa.system.entry.js} +1 -1
- package/dist/pine-core/{p-bef04e15.system.entry.js → p-fc25b956.system.entry.js} +1 -1
- package/dist/pine-core/{p-f06ca8df.entry.js → p-ff3de72e.entry.js} +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-combobox/combobox-interface.d.ts +8 -1
- package/dist/types/components/pds-combobox/grouped-options-panel.d.ts +7 -1
- package/dist/types/components/pds-combobox/pds-combobox.d.ts +31 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +4 -0
- package/dist/types/components/pds-tabs/pds-tab/pds-tab.d.ts +3 -0
- package/dist/types/components/pds-tabs/pds-tabpanel/pds-tabpanel.d.ts +3 -0
- package/dist/types/components/pds-tabs/pds-tabs.d.ts +14 -2
- package/dist/types/components.d.ts +5 -5
- package/dist/types/utils/attributes.d.ts +2 -2
- package/dist/types/utils/css.d.ts +7 -0
- package/dist/types/utils/keep-hydrated.d.ts +29 -2
- package/dist/vscode.html-data.json +2 -2
- package/hydrate/index.js +604 -135
- package/hydrate/index.mjs +604 -135
- package/package.json +2 -2
- package/dist/cjs/keep-hydrated-iLS88j1Z.js +0 -67
- package/dist/esm/keep-hydrated-Dv7ssOTc.js +0 -63
- package/dist/esm-es5/attributes-CF5K2pxn.js +0 -1
- package/dist/esm-es5/keep-hydrated-Dv7ssOTc.js +0 -1
- package/dist/pine-core/p-1cd0acf0.system.entry.js +0 -1
- package/dist/pine-core/p-207c94da.entry.js +0 -1
- package/dist/pine-core/p-2357758d.system.entry.js +0 -1
- package/dist/pine-core/p-281efc69.entry.js +0 -1
- package/dist/pine-core/p-2ac9e90a.system.entry.js +0 -1
- package/dist/pine-core/p-2f539379.system.entry.js +0 -3
- package/dist/pine-core/p-34b575b6.entry.js +0 -2
- package/dist/pine-core/p-3b1d8fae.entry.js +0 -1
- package/dist/pine-core/p-539ef98c.entry.js +0 -1
- package/dist/pine-core/p-56576b6e.entry.js +0 -1
- package/dist/pine-core/p-5ac84b2f.entry.js +0 -1
- package/dist/pine-core/p-63854c10.system.entry.js +0 -1
- package/dist/pine-core/p-73bc6e9f.system.entry.js +0 -1
- package/dist/pine-core/p-798839f7.system.entry.js +0 -1
- package/dist/pine-core/p-834c678e.system.entry.js +0 -1
- package/dist/pine-core/p-912487fa.entry.js +0 -1
- package/dist/pine-core/p-969488f5.system.entry.js +0 -1
- package/dist/pine-core/p-9bcdfac2.entry.js +0 -1
- package/dist/pine-core/p-BMFBF3sJ.system.js +0 -1
- package/dist/pine-core/p-D2MUS7JO.js +0 -1
- package/dist/pine-core/p-D2yHYrxQ.system.js +0 -1
- package/dist/pine-core/p-Dv7ssOTc.js +0 -1
- package/dist/pine-core/p-TyevV8iv.system.js +0 -1
- package/dist/pine-core/p-afd5e2d7.entry.js +0 -1
- package/dist/pine-core/p-bde53290.system.entry.js +0 -1
- package/dist/pine-core/p-bf1aea9f.system.entry.js +0 -1
- package/dist/pine-core/p-c9395f43.system.entry.js +0 -1
- package/dist/pine-core/p-d5dd5599.entry.js +0 -1
- package/dist/pine-core/p-dc81ffff.entry.js +0 -1
- package/dist/pine-core/p-e46f7541.system.entry.js +0 -1
- package/dist/pine-core/p-e7ba30dd.system.entry.js +0 -1
- package/dist/pine-core/p-ed3dd3d2.entry.js +0 -1
- package/dist/pine-core/p-eee4f146.entry.js +0 -1
- package/dist/pine-core/p-f01e35e2.entry.js +0 -1
- package/dist/pine-core/p-f2e0da9a.entry.js +0 -1
- package/dist/pine-core/p-fc6ac917.entry.js +0 -1
- package/dist/pine-core/p-ffe276ef.entry.js +0 -1
- /package/dist/esm-es5/{index-DxI-61GK.js → index-BJXk71tO.js} +0 -0
- /package/dist/pine-core/{p-DxI-61GK.js → p-BJXk71tO.js} +0 -0
- /package/dist/pine-core/{p-CnO10OxH.system.js → p-n3_ytl_p.system.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as o,h as s,Host as n,transformTag as i}from"@stencil/core/internal/client";import{H as d}from"./attributes.js";import{f as p}from"./index2.js";import{r}from"./reflected-attribute-default.js";import{s as a}from"./truncation-tooltip.js";import{d as c}from"./pds-button2.js";import{d as h}from"./pds-icon2.js";import{d as l}from"./pds-loader2.js";const u=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.pdsCopyTextClick=o(this,"pdsCopyTextClick",7),this.hostKeeper=new d,this.truncationCleanup=null,this.border=!0,this.fullWidth=!1,this.truncate=!1,this.copyToClipboard=async t=>{try{void 0!==navigator.clipboard&&(await navigator.clipboard.writeText(t),this.pdsCopyTextClick.emit("Copied to clipboard"))}catch(t){this.pdsCopyTextClick.emit("Error writing text to clipboard: "+t)}},this.handleClick=()=>{this.copyToClipboard(this.value)}}connectedCallback(){this.hostKeeper.connect(this.el)}restoreBorderDefault(t){this.border=r(this.el,"border",t,!0)}handleTruncateChange(t){t?this.initTruncationTooltip():this.destroyTruncationTooltip()}handleValueChange(){this.truncate&&this.initTruncationTooltip()}componentDidLoad(){this.truncate&&this.initTruncationTooltip()}disconnectedCallback(){this.hostKeeper.disconnect(),this.destroyTruncationTooltip()}initTruncationTooltip(){this.destroyTruncationTooltip(),this.valueSpanEl&&(this.truncationCleanup=a({hostEl:this.el,contentEl:this.valueSpanEl,getTooltipText:()=>this.value||"",manageTabIndex:!1}))}destroyTruncationTooltip(){this.truncationCleanup&&(this.truncationCleanup(),this.truncationCleanup=null)}classNames(){const t=["pds-copytext"];return this.border&&t.push("pds-copytext--bordered"),this.fullWidth&&t.push("pds-copytext--full-width"),this.truncate&&t.push("pds-copytext--truncated"),t.join(" ")}render(){const t=this.classNames();return this.hostKeeper.record(t),s(n,{key:"
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as o,h as s,Host as n,transformTag as i}from"@stencil/core/internal/client";import{H as d}from"./attributes.js";import{f as p}from"./index2.js";import{r}from"./reflected-attribute-default.js";import{s as a}from"./truncation-tooltip.js";import{d as c}from"./pds-button2.js";import{d as h}from"./pds-icon2.js";import{d as l}from"./pds-loader2.js";const u=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.pdsCopyTextClick=o(this,"pdsCopyTextClick",7),this.hostKeeper=new d,this.truncationCleanup=null,this.border=!0,this.fullWidth=!1,this.truncate=!1,this.copyToClipboard=async t=>{try{void 0!==navigator.clipboard&&(await navigator.clipboard.writeText(t),this.pdsCopyTextClick.emit("Copied to clipboard"))}catch(t){this.pdsCopyTextClick.emit("Error writing text to clipboard: "+t)}},this.handleClick=()=>{this.copyToClipboard(this.value)}}connectedCallback(){this.hostKeeper.connect(this.el)}restoreBorderDefault(t){this.border=r(this.el,"border",t,!0)}handleTruncateChange(t){t?this.initTruncationTooltip():this.destroyTruncationTooltip()}handleValueChange(){this.truncate&&this.initTruncationTooltip()}componentDidLoad(){this.truncate&&this.initTruncationTooltip()}disconnectedCallback(){this.hostKeeper.disconnect(),this.destroyTruncationTooltip()}initTruncationTooltip(){this.destroyTruncationTooltip(),this.valueSpanEl&&(this.truncationCleanup=a({hostEl:this.el,contentEl:this.valueSpanEl,getTooltipText:()=>this.value||"",manageTabIndex:!1}))}destroyTruncationTooltip(){this.truncationCleanup&&(this.truncationCleanup(),this.truncationCleanup=null)}classNames(){const t=["pds-copytext"];return this.border&&t.push("pds-copytext--bordered"),this.fullWidth&&t.push("pds-copytext--full-width"),this.truncate&&t.push("pds-copytext--truncated"),t.join(" ")}render(){const t=this.classNames();return this.hostKeeper.record(t),s(n,{key:"d9bd40af6e435d606841cb551341eab33c5983b7",class:t,id:this.componentId},s("pds-button",{key:"7a42b32678fccb2cbe0d7a68a5da6d5fe5276a4a",type:"button",variant:"unstyled",onClick:this.handleClick},s("span",{key:"732db283b8075ebad8e1daff70692bac2978aade",ref:t=>this.valueSpanEl=t},this.value),s("pds-icon",{key:"ebfd34b9b5a47b78783302ce97d752af09e3f3e3","aria-hidden":"true",icon:p,size:"16px"})))}get el(){return this}static get watchers(){return{border:[{restoreBorderDefault:0}],truncate:[{handleTruncateChange:0}],value:[{handleValueChange:0}]}}static get style(){return":host(.pds-copytext){--copytext-color-background-hover:var(--pine-color-background-inset)}:host(.pds-copytext) pds-button{-ms-flex-align:center;align-items:center;border-radius:var(--pine-border-radius-full);border-width:var(--pine-dimension-none);display:-ms-inline-flexbox;display:inline-flex;font-family:var(--pine-font-family-heading);font-size:var(--pine-font-size-body-md);font-weight:var(--pine-font-weight-body-medium);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);max-width:100%}:host(.pds-copytext) pds-button::part(button){padding-block:var(--pine-dimension-2xs);padding-inline:var(--pine-dimension-xs)}:host(.pds-copytext) pds-button::part(button):hover{background-color:var(--copytext-color-background-hover);color:var(--pine-color-text-secondary-hover)}:host(.pds-copytext) pds-button span{font-weight:var(--pine-font-weight-medium);-webkit-margin-end:var(--pine-dimension-xs);margin-inline-end:var(--pine-dimension-xs);white-space:nowrap}:host(.pds-copytext) pds-button :nth-child(2){-ms-flex-negative:0;flex-shrink:0}:host(.pds-copytext):host(.pds-copytext--bordered){border-width:var(--pine-dimension-none);padding:var(--pine-dimension-none)}:host(.pds-copytext):host(.pds-copytext--bordered) pds-button{padding:var(--pine-dimension-none)}:host(.pds-copytext):host(.pds-copytext--bordered) pds-button::part(button){padding:var(--pine-dimension-none)}:host(.pds-copytext):host(.pds-copytext--bordered) pds-button::part(button):hover{background-color:transparent}:host(.pds-copytext):host(.pds-copytext--bordered) span{background:var(--pine-color-secondary);border:var(--pine-border);border-radius:var(--pine-border-radius-full);-webkit-margin-end:var(--pine-dimension-sm);margin-inline-end:var(--pine-dimension-sm);padding-block:var(--pine-dimension-xs);padding-inline:var(--pine-dimension-sm)}:host(.pds-copytext):host(.pds-copytext--bordered) :hover span{border:var(--pine-border-hover)}:host(.pds-copytext):host(.pds-copytext--full-width) pds-button,:host(.pds-copytext):host(.pds-copytext--truncated) pds-button{display:-ms-inline-flexbox;display:inline-flex;min-width:auto;width:100%}:host(.pds-copytext):host(.pds-copytext--full-width) pds-button::part(button-content),:host(.pds-copytext):host(.pds-copytext--full-width) pds-button::part(button-text),:host(.pds-copytext):host(.pds-copytext--truncated) pds-button::part(button-content),:host(.pds-copytext):host(.pds-copytext--truncated) pds-button::part(button-text){-ms-flex-negative:1;flex-shrink:1;width:100%}:host(.pds-copytext):host(.pds-copytext--full-width) pds-button span,:host(.pds-copytext):host(.pds-copytext--truncated) pds-button span{text-align:start;width:100%}:host(.pds-copytext):host(.pds-copytext--full-width) pds-button{-ms-flex-pack:justify;justify-content:space-between}:host(.pds-copytext):host(.pds-copytext--truncated) pds-button span{overflow:hidden;text-overflow:ellipsis}"}},[1,"pds-copytext",{border:[1540],componentId:[1,"component-id"],fullWidth:[4,"full-width"],truncate:[4],value:[1]},void 0,{border:[{restoreBorderDefault:0}],truncate:[{handleTruncateChange:0}],value:[{handleValueChange:0}]}]),b=u,x=function(){"undefined"!=typeof customElements&&["pds-copytext","pds-button","pds-icon","pds-loader"].forEach((t=>{switch(t){case"pds-copytext":customElements.get(i(t))||customElements.define(i(t),u);break;case"pds-button":customElements.get(i(t))||c();break;case"pds-icon":customElements.get(i(t))||h();break;case"pds-loader":customElements.get(i(t))||l()}}))};export{b as PdsCopytext,x as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as s,Host as r,transformTag as n}from"@stencil/core/internal/client";import{a,c as o,o as d,f as l,b as c,s as h,h as p}from"./floating-ui.dom.js";import{c as u,j as v,k as m,m as b,r as f,n as g}from"./index2.js";import{i as k}from"./form.js";import{r as _,f as y}from"./i18n-format.js";import{c as x}from"./closest.js";import{d as w}from"./pds-icon2.js";import{d as D}from"./pds-input2.js";const M=/^(\d{4})-(\d{2})-(\d{2})$/;function C(e){const t=M.exec((null!=e?e:"").trim());if(!t)return null;const[,i,s,r]=t.map(Number),n=new Date(Date.UTC(i,s-1,r));return n.getUTCFullYear()===i&&n.getUTCMonth()===s-1&&n.getUTCDate()===r?n:null}function $(e){return e.toISOString().slice(0,10)}function A(){const e=new Date;return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))}function T(e,t){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()+t))}function L(e,t){const i=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1)),s=j(i.getUTCFullYear(),i.getUTCMonth());return new Date(Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),Math.min(e.getUTCDate(),s)))}function j(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function P(e,t){return!!e&&!!t&&e.getTime()===t.getTime()}function H(e,t,i){return t&&e<t?t:i&&e>i?i:e}function Y(e,t,i){return!!t&&e<t||!!i&&e>i}function E(e,t){return(e.getUTCDay()-t+7)%7}function z(e,t){return new Intl.DateTimeFormat(e,Object.assign(Object.assign({},t),{timeZone:"UTC",calendar:"gregory"}))}function S(e,t,i){return z(t,i).format(e)}class N{constructor(e){this.datepicker=e,this.copiedProperties=[],this.host=document.createElement("div"),this.host.className=N.className,this.host.pdsDatepicker=e,this.host.style.display="contents",this.root=this.host.attachShadow({mode:"open"})}mount(e,t){this.host.isConnected?t!==this.locale&&this.copyContext(t):(function(e){const t=new Set;let i=e;for(;i&&!t.has(i);){if(t.add(i),i.nodeType===Node.ELEMENT_NODE&&F(i))return i;const e=i.nodeType===Node.ELEMENT_NODE?i.assignedSlot:null;if(e){i=e;continue}const s=i.parentNode;i=s instanceof ShadowRoot?s.host:s}return document.body}(this.datepicker).appendChild(this.host),this.copyContext(t)),e.parentNode!==this.root&&this.root.appendChild(e)}remove(){this.host.remove()}contains(e){return!!e&&(e===this.host||this.root.contains(e))}copyContext(e){var t,i;this.locale=e;const s=this.datepicker.shadowRoot;s&&((null===(t=s.adoptedStyleSheets)||void 0===t?void 0:t.length)?this.root.adoptedStyleSheets=s.adoptedStyleSheets:this.root.querySelector("style")||s.querySelectorAll("style").forEach((e=>this.root.appendChild(e.cloneNode(!0)))));const r=getComputedStyle(this.datepicker);this.host.dir=r.direction||"ltr",this.host.lang=e,this.copyCustomProperties(r);const n=null===(i=x("[data-theme]",this.datepicker)||null)||void 0===i?void 0:i.getAttribute("data-theme");n?this.host.setAttribute("data-theme",n):this.host.removeAttribute("data-theme")}copyCustomProperties(e){for(const e of this.copiedProperties)this.host.style.removeProperty(e);this.copiedProperties=[];const t=this.host.parentElement,i=t?getComputedStyle(t):null;for(let t=0;t<e.length;t++){const s=e[t];if(!s.startsWith("--"))continue;const r=e.getPropertyValue(s);i&&r===i.getPropertyValue(s)||(this.host.style.setProperty(s,r.trim()),this.copiedProperties.push(s))}}}function F(e){if("dialog"===e.localName)return e.open;if(!e.hasAttribute("popover"))return!1;try{return e.matches(":popover-open")}catch(e){return!1}}N.className="pds-datepicker-calendar-portal";const U={today:"Today",yesterday:"Yesterday","last-7-days":"Last 7 days","last-30-days":"Last 30 days","last-90-days":"Last 90 days","this-month":"This month","last-month":"Last month","this-quarter":"This quarter","last-quarter":"Last quarter","this-year":"This year","last-year":"Last year","year-to-date":"Year to date","last-12-months":"Last 12 months"},O=(e,t,i)=>new Date(Date.UTC(e,t,i));function q(e,t){const i=t.getUTCFullYear(),s=t.getUTCMonth(),r=s-s%3;switch(e){case"today":return[t,t];case"yesterday":return[T(t,-1),T(t,-1)];case"last-7-days":return[T(t,-6),t];case"last-30-days":return[T(t,-29),t];case"last-90-days":return[T(t,-89),t];case"this-month":return[O(i,s,1),O(i,s+1,0)];case"last-month":return[O(i,s-1,1),O(i,s,0)];case"this-quarter":return[O(i,r,1),O(i,r+3,0)];case"last-quarter":return[O(i,r-3,1),O(i,r,0)];case"this-year":return[O(i,0,1),O(i,11,31)];case"last-year":return[O(i-1,0,1),O(i-1,11,31)];case"year-to-date":return[O(i,0,1),t];case"last-12-months":return[L(t,-12),t];default:return null}}function I(e,t,i){if(t&&i)return e.find((e=>e.start.getTime()===t.getTime()&&e.end.getTime()===i.getTime()))}function R(e,t,i){return!Y(e.start,t,i)&&!Y(e.end,t,i)}const W=/^(\d{4}-\d{2}-\d{2})(?:[T ](\d{2}):(\d{2}))?$/;function K(e){const t=W.exec((null!=e?e:"").trim());if(!t)return null;const i=C(t[1]);return i?void 0===t[2]?{date:i,time:null}:Number(t[2])<24&&Number(t[3])<60?{date:i,time:`${t[2]}:${t[3]}`}:null:null}const V="YYYY-MM-DD",X=/\[([^\]]*)\]|YYYY|MMMM|MMM|MM|M|DD|D|HH|H|hh|h|mm|A|a/g,Z=/HH|H|hh|h/,B=/hh|h/,G=/A|a/;function J(e,t,i=!1){const s=(null==e?void 0:e.trim())||V,r=(e=>e.replace(/\[[^\]]*\]/g,""))(s);return B.test(r)&&!G.test(r)?s+" A":!t||Z.test(r)?s:`${s} ${i?"h:mm A":"HH:mm"}`}const Q=(e,t=2)=>(e+"").padStart(t,"0"),ee=new Map;function te(e){let t=ee.get(e);if(!t){const i=t=>{const i=new Intl.DateTimeFormat(e,{month:t,timeZone:"UTC",calendar:"gregory"});return Array.from({length:12},((e,t)=>i.format(new Date(Date.UTC(2023,t,1)))))},s=ue(e);t={months:i("long"),shortMonths:i("short"),am:s.am,pm:s.pm},ee.set(e,t)}return t}const ie=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),se=e=>ie(e).replace(/\s+/g,"\\s*"),re=e=>`(${e.map(ie).join("|")})`;function ne(e,t=V,i="en-US"){var s;return null!==(s=function(e,t,i="en-US"){var s,r,n,a,o,d,l,c,h,p;const u=te(i),v=te("en-US"),m=[u.am,u.pm,v.am,v.pm],b={YYYY:"(\\d{4})",MMMM:re([...u.months,...v.months]),MMM:re([...u.shortMonths,...v.shortMonths]),MM:"(\\d{1,2})",M:"(\\d{1,2})",DD:"(\\d{1,2})",D:"(\\d{1,2})",HH:"(\\d{1,2})",H:"(\\d{1,2})",hh:"(\\d{1,2})",h:"(\\d{1,2})",mm:"(\\d{2})",A:re(m),a:re(m)},f=[],g=()=>{f.length=0;let e="",i=0;return t.replace(X,((s,r,n)=>(e+=se(t.slice(i,n)),void 0!==r?e+=se(r):(e+=b[s],f.push(s)),i=n+s.length,s))),RegExp(`^\\s*${e}${se(t.slice(i))}\\s*$`,"i")};let k=g().exec(null!=e?e:"");if(k||(b.mm="(\\d{1,2})",k=g().exec(null!=e?e:"")),!k)return null;const _=k,y={};f.forEach(((e,t)=>y[e]=_[t+1]));const x=(e,t)=>{if(void 0===e)return;const i=t?[u.months,v.months]:[u.shortMonths,v.shortMonths];for(const t of i){const i=t.findIndex((t=>t.toLowerCase()===e.toLowerCase()));if(i>=0)return i+1}},w=Number(y.YYYY),D=null!==(r=null!==(s=x(y.MMMM,!0))&&void 0!==s?s:x(y.MMM,!1))&&void 0!==r?r:Number(null!==(n=y.MM)&&void 0!==n?n:y.M),M=Number(null!==(a=y.DD)&&void 0!==a?a:y.D);if(!y.YYYY||!D||!M)return null;const $=C(`${Q(w,4)}-${Q(D)}-${Q(M)}`);if(!$)return null;const A=null!==(l=null!==(d=null!==(o=y.HH)&&void 0!==o?o:y.H)&&void 0!==d?d:y.hh)&&void 0!==l?l:y.h;if(void 0===A)return{date:$,time:null};let T=Number(A);const L=Number(null!==(c=y.mm)&&void 0!==c?c:0),j=null===(p=null!==(h=y.A)&&void 0!==h?h:y.a)||void 0===p?void 0:p.toLowerCase();if(void 0!==y.hh||void 0!==y.h){if(T<1||T>12)return null;T=T%12+(j===u.pm.toLowerCase()||j===v.pm.toLowerCase()?12:0)}return T<24&&L<60?{date:$,time:pe(T,L)}:null}(e,t,i))&&void 0!==s?s:K(e)}function ae(e,t=V,i="en-US"){const s=(null!=e?e:"").trim(),r=RegExp(`${ie(ce)}|\\s+(?:–|—|-|to)\\s+${t.includes("/")?"":"|\\s*/\\s*"}`,"gi");let n;for(;null!==(n=r.exec(s));){const e=ne(s.slice(0,n.index),t,i),r=ne(s.slice(n.index+n[0].length),t,i);if(e&&r)return oe(e,r)<=0?[e,r]:null}return null}function oe(e,t){var i,s;const r=e.date.getTime()-t.date.getTime();return 0!==r?r:(null!==(i=e.time)&&void 0!==i?i:"00:00").localeCompare(null!==(s=t.time)&&void 0!==s?s:"00:00")}function de(e){return e.time?`${$(e.date)}T${e.time}`:$(e.date)}function le(e,t,i="en-US"){return function(e,t,i="en-US"){var s;const r=te(i),[n,a]=he(null!==(s=e.time)&&void 0!==s?s:"00:00"),o=n%12||12,d=e.date.getUTCMonth(),l=n<12?r.am:r.pm,c={YYYY:Q(e.date.getUTCFullYear(),4),MMMM:r.months[d],MMM:r.shortMonths[d],MM:Q(d+1),M:d+1+"",DD:Q(e.date.getUTCDate()),D:e.date.getUTCDate()+"",HH:Q(n),H:n+"",hh:Q(o),h:o+"",mm:Q(a),A:l,a:l.toLowerCase()};return t.replace(X,((e,t)=>null!=t?t:c[e]))}(e,null!=t?t:J(V,!!e.time),i)}const ce=" – ";function he(e){const[t,i]=e.split(":").map(Number);return[t||0,i||0]}function pe(e,t){return`${(e+"").padStart(2,"0")}:${(t+"").padStart(2,"0")}`}function ue(e){var t,i;const s=new Intl.DateTimeFormat(e,{hour:"numeric",timeZone:"UTC"}),r=e=>{var t;return null===(t=s.formatToParts(new Date(Date.UTC(2023,0,1,e))).find((e=>"dayPeriod"===e.type)))||void 0===t?void 0:t.value};return{hour12:!!s.resolvedOptions().hour12,am:null!==(t=r(1))&&void 0!==t?t:"AM",pm:null!==(i=r(13))&&void 0!==i?i:"PM"}}const ve={weekday:"long",year:"numeric",month:"long",day:"numeric"},me="00:00",be="23:59";let fe=0;const ge=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),ke=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsDatepickerChange=i(this,"pdsDatepickerChange",7),this.pdsBlur=i(this,"pdsBlur",7),this.pdsFocus=i(this,"pdsFocus",7),this.focusActiveDay=!1,this.fallbackId="pds-datepicker-"+ ++fe,this.skipForwardedClick=!1,this.presetByArrow=!1,this.valueAtOpen="",this.committing=!1,this.hasFocus=!1,this.applyLabel="Apply",this.autoApply=!1,this.cancelLabel="Cancel",this.clearable=!1,this.clearLabel="Clear",this.customRangeLabel="Custom range",this.endTimeLabel="End time",this.format="YYYY-MM-DD",this.hourLabel="Hour",this.invalidDateMessage="Enter a date in the format shown.",this.maxDateMessage="Choose {date} or earlier.",this.minDateMessage="Choose {date} or later.",this.minuteIncrement=1,this.minuteLabel="Minute",this.monthLabel="Month",this.nextMonthLabel="Next month",this.periodLabel="AM or PM",this.placement="bottom-start",this.presetsLabel="Presets",this.previousMonthLabel="Previous month",this.range=!1,this.showDropdowns=!1,this.startTimeLabel="Start time",this.timePicker=!1,this.timeLabel="Time",this.triggerLabel="Choose date",this.value="",this.yearLabel="Year",this.isOpen=!1,this.text="",this.textError="",this.activeDate="",this.viewMonth="",this.draftStart="",this.draftEnd="",this.startTime=me,this.endTime=be,this.previewDate="",this.onApply=()=>{const e=this.draftParts();e&&(this.commitParts(e),this.closeCalendar(!0))},this.onCancel=()=>{this.clearable?this.commitValue(""):this.restoreValueAtOpen(),this.closeCalendar(!0)},this.onPresetClick=(e,t)=>{this.draftStart=$(t.start),this.draftEnd=$(t.end),this.previewDate="",!this.appliesOnPick||this.presetByArrow?(this.showDate(t.end,!0),e.currentTarget.focus()):this.onApply()},this.onPresetsKeyDown=e=>{const t={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1}[e.key],i={Home:"first",End:"last"}[e.key];if(!t&&!i)return;const s=Array.from(e.currentTarget.querySelectorAll('[role="radio"]:not([disabled])')),r=s.indexOf(e.target),n="first"===i?s[0]:"last"===i?s[s.length-1]:s[(r+t+s.length)%s.length];n&&(e.preventDefault(),n.focus(),n.classList.contains("pds-datepicker__preset")&&n!==s[s.length-1]&&(this.presetByArrow=!0,n.click(),this.presetByArrow=!1))},this.onClearMouseDown=e=>{e.preventDefault()},this.onClearClick=()=>{var e;this.commitValue(""),this.closeCalendar(!1),null===(e=this.inputEl)||void 0===e||e.setFocus()},this.onCustomRangeClick=()=>{var e,t;null===(t=null===(e=this.dialogEl)||void 0===e?void 0:e.querySelector('[data-date][tabindex="0"]'))||void 0===t||t.focus()},this.onDocumentPointerDown=e=>{var t;const i=e.composedPath();i.includes(this.el)||this.portal&&i.includes(this.portal.host)||(this.closeCalendar(!1),"dialog"===(null===(t=i[0])||void 0===t?void 0:t.localName)&&function(){const e=e=>{e.stopPropagation(),e.preventDefault()};document.addEventListener("click",e,{capture:!0,once:!0}),window.setTimeout((()=>document.removeEventListener("click",e,{capture:!0})),500)}())},this.onHostFocusIn=e=>{this.focusEntered(e)},this.onCalendarFocusIn=e=>{var t,i;this.focusEntered(e),null===(t=this.dialogEl)||void 0===t||t.setAttribute("aria-modal","true"),e.target===this.dialogEl&&(null===(i=this.dialogEl.querySelector(`[data-date="${this.activeDate}"]`))||void 0===i||i.focus({preventScroll:!0}))},this.onCalendarFocusOut=e=>{var t,i;const s=e.relatedTarget;s&&(null===(t=this.dialogEl)||void 0===t?void 0:t.contains(s))||null===(i=this.dialogEl)||void 0===i||i.removeAttribute("aria-modal"),this.checkFocusLeft(e,null!==s)},this.onHostFocusOut=e=>{const t=e.relatedTarget;t&&this.isInside(t)||this.checkFocusLeft(e,null!==t)},this.stopInnerEvent=e=>e.stopPropagation(),this.onFieldClick=e=>{var t,i;const s=e.composedPath();if(this.triggerEl&&s.includes(this.triggerEl)||this.clearEl&&s.includes(this.clearEl))return;const r=null===(i=null===(t=this.inputEl)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("label");if(r&&s.includes(r))return this.skipForwardedClick=!0,void window.setTimeout((()=>this.skipForwardedClick=!1));if(this.skipForwardedClick)return void(this.skipForwardedClick=!1);const n=this.fieldReference();n&&n!==this.inputEl&&!s.includes(n)||this.openCalendar(!1)},this.onTextInput=e=>{var t,i;if(e.stopPropagation(),this.text=(null!==(t=e.detail.value)&&void 0!==t?t:"")+"",!this.isOpen)return;const s=this.parseText(this.text);if(!s)return;const[r,n]=[this.startTime,this.endTime];if(null!==(i=this.timesBeforeTyping)&&void 0!==i||(this.timesBeforeTyping=[r,n]),this.loadDraft(s),this.timePicker){const e=this.resolvedFormat,t=this.resolvedLocale,i=this.range?ae(this.text,e,t):[ne(this.text,e,t)],s=this.parsedValue(),a=e=>{var t,r,n;return!(null===(t=null==i?void 0:i[e])||void 0===t?void 0:t.time)||(null===(r=i[e])||void 0===r?void 0:r.time)===(null===(n=null==s?void 0:s[e])||void 0===n?void 0:n.time)};a(0)&&(this.startTime=r),this.range&&a(1)&&(this.endTime=n)}this.showDate(s[s.length-1].date)},this.onTextChange=e=>{e.stopPropagation(),this.isOpen&&this.hasFooter?window.setTimeout((()=>{var e;this.isOpen&&(this.el.matches(":focus-within")||(null===(e=this.portal)||void 0===e?void 0:e.host.matches(":focus-within")))||this.commitPendingText()})):this.commitText()},this.onTextKeyDown=e=>{e.stopPropagation();const t=e.detail;if(t.altKey&&"ArrowDown"===t.key)t.preventDefault(),this.isOpen?(this.focusActiveDay=!0,this.flushActiveDayFocus()):this.openCalendar(!0);else if("Enter"===t.key&&this.isOpen){if(!this.hasFooter||this.text!==this.fieldText()&&!this.parseText(this.text))this.commitText();else{const e=this.draftParts();e&&this.commitParts(e)}this.textError||this.closeCalendar(!1)}else"Escape"===t.key&&this.isOpen&&(t.preventDefault(),t.stopPropagation(),this.restoreValueAtOpen(),this.closeCalendar(!1))},this.onTriggerKeyDown=e=>{var t;if(this.isOpen)return"Escape"===e.key?(e.preventDefault(),e.stopPropagation(),this.restoreValueAtOpen(),void this.closeCalendar(!1)):void("Tab"!==e.key||e.shiftKey||"visible"!==(null===(t=this.dialogEl)||void 0===t?void 0:t.style.visibility)||(e.preventDefault(),this.focusActiveDay=!0,this.flushActiveDayFocus()))},this.onTriggerClick=()=>{this.isOpen?this.closeCalendar(!0):this.openCalendar(!0)},this.onDialogKeyDown=e=>{"Escape"===e.key?(e.preventDefault(),e.stopPropagation(),this.restoreValueAtOpen(),this.closeCalendar(!0)):"Tab"===e.key&&this.trapTab(e)},this.onGridKeyDown=e=>{const t=C(this.activeDate);if(!t)return;const i="rtl"===getComputedStyle(this.el).direction,s=E(t,this.weekStart);let r=null;switch(e.key){case"ArrowLeft":r=T(t,i?1:-1);break;case"ArrowRight":r=T(t,i?-1:1);break;case"ArrowUp":r=T(t,-7);break;case"ArrowDown":r=T(t,7);break;case"Home":r=T(t,-s);break;case"End":r=T(t,6-s);break;case"PageUp":r=L(t,e.shiftKey?-12:-1);break;case"PageDown":r=L(t,e.shiftKey?12:1);break;case"Enter":case" ":return e.preventDefault(),this.pickDate(t),void(this.hasFooter&&(this.focusActiveDay=!0));default:return}e.preventDefault();const n=H(r,this.minDate,this.maxDate);this.showDate(n),this.range&&(this.previewDate=$(n)),this.focusActiveDay=!0},this.onGridClick=e=>{const t=this.dayFromEvent(e);t&&this.pickDate(t)},this.onGridPointerOver=e=>{if(!this.range||!this.draftStart||this.draftEnd)return;const t=this.dayFromEvent(e),i=t&&$(t);i&&i!==this.previewDate&&(this.previewDate=i)}}async open(){this.openCalendar(!0)}async close(){this.closeCalendar(!1)}async setFocus(){var e;await(null===(e=this.inputEl)||void 0===e?void 0:e.setFocus())}valueChanged(){var e;this.committing||(this.valueAtOpen=null!==(e=this.value)&&void 0!==e?e:""),this.refreshFromValue()}contextChanged(){this.refreshFromValue()}placementChanged(){this.stopPositioning()}refreshFromValue(){var e;if(this.text=this.fieldText(),this.textError="",this.updateFormValue(),!this.isOpen)return;const t=this.parsedValue();this.loadDraft(t);const i=null!==(e=t&&t[t.length-1].date)&&void 0!==e?e:A();this.showDate(H(i,this.minDate,this.maxDate),!0)}requiredChanged(){this.updateFormValue()}componentWillLoad(){this.text=this.fieldText()}connectedCallback(){this.el.attachInternals&&!this.internals&&(this.internals=this.el.attachInternals())}componentDidLoad(){this.updateFormValue()}disconnectedCallback(){var e;this.closeCalendar(!1),null===(e=this.portal)||void 0===e||e.remove()}componentDidRender(){var e,t;this.isOpen&&this.dialogEl?(null!==(t=this.portal)&&void 0!==t||(this.portal=new N(this.el)),this.portal.mount(this.dialogEl,this.resolvedLocale),this.cleanupAutoUpdate||this.startPositioning(),this.flushActiveDayFocus()):null===(e=this.portal)||void 0===e||e.remove()}flushActiveDayFocus(){var e,t;this.focusActiveDay&&"visible"===(null===(e=this.dialogEl)||void 0===e?void 0:e.style.visibility)&&(this.focusActiveDay=!1,null===(t=this.dialogEl.querySelector(`[data-date="${this.activeDate}"]`))||void 0===t||t.focus())}get baseId(){return this.componentId||this.fallbackId}get resolvedLocale(){return function(e){var t;try{return null!==(t=Intl.DateTimeFormat.supportedLocalesOf(e)[0])&&void 0!==t?t:"en-US"}catch(e){return"en-US"}}(this.locale||_(this.el))}get weekStart(){const e=this.firstDayOfWeek;return"number"==typeof e&&Number.isInteger(e)&&e>=0&&e<=6?e:function(e){var t,i,s;const r=Intl.Locale;if(!r)return 0;try{const n=new r(e),a=null!==(i=null===(t=n.getWeekInfo)||void 0===t?void 0:t.call(n).firstDay)&&void 0!==i?i:null===(s=n.weekInfo)||void 0===s?void 0:s.firstDay;return"number"==typeof a?a%7:0}catch(e){return 0}}(this.resolvedLocale)}get minDate(){return C(this.min)}get maxDate(){return C(this.max)}get isInteractive(){return!this.disabled&&!this.readonly}get monthCount(){const e="undefined"!=typeof window&&window.innerWidth<640;return this.range&&!e?2:1}get appliesOnPick(){return this.range&&this.autoApply&&!this.timePicker}get hasFooter(){return(this.range||this.timePicker)&&!this.appliesOnPick}get resolvedPresets(){return this.range?function(e,t){const i="string"==typeof e?e.split(",").map((e=>e.trim())).filter(Boolean).map((e=>({key:e}))):Array.isArray(e)?e:[],s=[];for(const e of i){if(!e||"string"!=typeof e.key)continue;const i="string"==typeof e.start?C(e.start):null,r="string"==typeof e.end?C(e.end):null,n=i&&r&&i<=r?[i,r]:q(e.key,t),a="string"==typeof e.label?e.label:U[e.key];n&&a&&s.push({key:e.key,label:a,start:n[0],end:n[1]})}return s}(this.presets,A()):[]}parsedValue(e=this.value){if(this.range){const[t,i,s]=(null!=e?e:"").split("/"),r=K(t),n=K(i);return void 0===s&&r&&n&&oe(r,n)<=0?[r,n]:null}const t=K(e);return t?[t]:null}get resolvedFormat(){return J(this.format,this.timePicker,this.timePicker&&ue(this.resolvedLocale).hour12)}fieldText(){var e;const t=this.parsedValue();return t?t.map((e=>le(this.withTimePicker(e),this.resolvedFormat,this.resolvedLocale))).join(ce):null!==(e=this.value)&&void 0!==e?e:""}withTimePicker(e,t=me){var i;return{date:e.date,time:this.timePicker?null!==(i=e.time)&&void 0!==i?i:t:null}}get fieldPlaceholder(){if(this.placeholder)return this.placeholder;const e=this.resolvedFormat;return this.range?`${e}${ce}${e}`:e}loadDraft(e){var t,i;const[s,r]=null!=e?e:[];this.draftStart=s?$(s.date):"",this.draftEnd=this.range&&r?$(r.date):"",this.startTime=null!==(t=null==s?void 0:s.time)&&void 0!==t?t:me,this.endTime=null!==(i=null==r?void 0:r.time)&&void 0!==i?i:be,this.previewDate=""}openCalendar(e){var t,i;if(!this.isInteractive||this.isOpen)return;const s=this.parsedValue();this.loadDraft(s),this.valueAtOpen=null!==(t=this.value)&&void 0!==t?t:"";const r=null!==(i=s&&s[s.length-1].date)&&void 0!==i?i:A();this.showDate(H(r,this.minDate,this.maxDate),!0),this.focusActiveDay=e,this.isOpen=!0,document.addEventListener("pointerdown",this.onDocumentPointerDown,!0)}closeCalendar(e){var t;this.isOpen&&(this.commitPendingText(),this.timesBeforeTyping=void 0,this.isOpen=!1,this.stopPositioning(),document.removeEventListener("pointerdown",this.onDocumentPointerDown,!0),e&&(null===(t=this.triggerEl)||void 0===t||t.focus()))}showDate(e,t=!1){const i=ge(e),s=C(this.viewMonth),r=s&&L(s,this.monthCount-1);t||!s||i<s?this.viewMonth=$(t?L(i,1-this.monthCount):i):r&&i>r&&(this.viewMonth=$(L(i,1-this.monthCount))),this.activeDate=$(e)}pickDate(e){Y(e,this.minDate,this.maxDate)||(this.dropTypedText(),this.range?this.pickRangeDay(e):this.timePicker?(this.draftStart=$(e),this.activeDate=this.draftStart):(this.commitValue($(e)),this.closeCalendar(!0)))}pickRangeDay(e){const t=C(this.draftStart),i=$(e);!t||this.draftEnd?(this.draftStart=i,this.draftEnd=""):e<t?this.draftStart=i:this.draftEnd=i,this.previewDate="",this.activeDate=i,this.draftEnd&&this.appliesOnPick&&this.onApply()}commitValue(e,t={}){var i;const s=e!==(null!==(i=this.value)&&void 0!==i?i:"");this.timesBeforeTyping=void 0,this.committing=!0,this.value=e,this.committing=!1,this.text=this.fieldText(),this.textError="",this.updateFormValue(),s&&this.pdsDatepickerChange.emit(Object.assign({value:e},t))}commitParts(e){if(!this.range)return void this.commitValue(de(e[0]));const[t,i]=e,s=I(this.resolvedPresets,t.date,i.date);this.commitValue(`${de(t)}/${de(i)}`,Object.assign({start:de(t),end:de(i)},s?{preset:s.key}:{}))}draftParts(){var e;const t=C(this.draftStart);if(!t)return null;const i=this.withTimePicker({date:t,time:this.startTime});if(!this.range)return[i];const s=this.withTimePicker({date:null!==(e=C(this.draftEnd))&&void 0!==e?e:t,time:this.endTime});return[i,oe(s,i)<0?Object.assign(Object.assign({},s),{time:i.time}):s]}restoreValueAtOpen(){var e;if(this.valueAtOpen===(null!==(e=this.value)&&void 0!==e?e:""))return void this.dropTypedText();const t=this.parsedValue(this.valueAtOpen);t?this.commitParts(t):this.commitValue(this.valueAtOpen)}isInside(e){var t,i;return!!e&&(e===this.el||this.el.contains(e)||!!(null===(t=this.el.shadowRoot)||void 0===t?void 0:t.contains(e))||!!(null===(i=this.portal)||void 0===i?void 0:i.contains(e)))}focusEntered(e){this.hasFocus||(this.hasFocus=!0,this.pdsFocus.emit(e))}checkFocusLeft(e,t){window.setTimeout((()=>{var i;this.el.matches(":focus-within")||(null===(i=this.portal)||void 0===i?void 0:i.host.matches(":focus-within"))||(t&&this.closeCalendar(!1),this.hasFocus&&(this.hasFocus=!1,this.pdsBlur.emit(e)))}))}startPositioning(){const e=this.fieldReference(),t=this.dialogEl;e&&t&&(this.cleanupAutoUpdate=a(e,t,(()=>{o(e,t,{placement:this.placement,strategy:"fixed",middleware:[d(4),l({padding:8}),c({padding:8,apply({availableWidth:e,availableHeight:t,elements:i}){const s=window.innerHeight-16;Object.assign(i.floating.style,{maxHeight:Math.max(0,Math.max(t,Math.min(s,480)))+"px",maxWidth:Math.max(0,e)+"px"})}}),h({padding:8,crossAxis:!0}),p()]}).then((({x:e,y:i,middlewareData:s})=>{var r;const n=!!(null===(r=s.hide)||void 0===r?void 0:r.referenceHidden);Object.assign(t.style,{left:e+"px",top:i+"px",visibility:n?"hidden":"visible"}),this.flushActiveDayFocus()}))})))}stopPositioning(){var e;null===(e=this.cleanupAutoUpdate)||void 0===e||e.call(this),this.cleanupAutoUpdate=void 0}fieldReference(){var e,t,i;return null!==(i=null===(t=null===(e=this.inputEl)||void 0===e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".pds-input__field-wrapper"))&&void 0!==i?i:this.inputEl}commitPendingText(){if(this.text===this.fieldText())return;const e=this.parseText(this.text)?this.draftParts():null;e?this.commitParts(e):this.commitText()}readText(e){const t=this.resolvedFormat,i=this.resolvedLocale,s=this.range?ae(e,t,i):[ne(e,t,i)];return!s||s.some((e=>!e))?null:s.map(((e,t)=>this.withTimePicker(e,1===t?be:me)))}parseText(e){const t=this.readText(e);return t&&!this.rangeError(t)?t:null}rangeError(e){return this.minDate&&e.some((e=>e.date<this.minDate))?"min":this.maxDate&&e.some((e=>e.date>this.maxDate))?"max":""}valueError(){if(!this.value)return"";const e=this.parsedValue();return e?this.rangeError(e):"format"}commitText(){const e=this.text.trim();if(""===e)return void this.commitValue("");const t=this.readText(e),i=t?this.rangeError(t):"format";t&&!i?this.commitParts(t):(this.textError=i,this.updateFormValue())}canShowMonth(e){var t;const i=null!==(t=C(this.viewMonth))&&void 0!==t?t:A();return e<0?!this.minDate||T(i,-1)>=this.minDate:!this.maxDate||L(i,this.monthCount)<=this.maxDate}showMonth(e,t){var i,s;const r=null!==(i=C(this.viewMonth))&&void 0!==i?i:A(),n=null!==(s=C(this.activeDate))&&void 0!==s?s:A();this.viewMonth=$(L(r,t)),this.activeDate=$(H(L(n,t),this.minDate,this.maxDate)),this.canShowMonth(t)?e.currentTarget.focus():this.focusActiveDay=!0}jumpTo(e,t,i){var s;const r=H(new Date(Date.UTC(t,i,1)),this.minDate,this.maxDate);this.viewMonth=$(L(ge(r),-e));const n=null!==(s=C(this.activeDate))&&void 0!==s?s:r,a=Math.min(n.getUTCDate(),new Date(Date.UTC(t,i+1,0)).getUTCDate());this.activeDate=$(H(new Date(Date.UTC(t,i,a)),this.minDate,this.maxDate))}dropTypedText(){this.timesBeforeTyping&&([this.startTime,this.endTime]=this.timesBeforeTyping),this.timesBeforeTyping=void 0,(this.text!==this.fieldText()||this.textError)&&(this.text=this.fieldText(),this.inputEl&&(this.inputEl.value=this.text),this.textError="",this.updateFormValue())}trapTab(e){var t,i,s,r;const n=Array.from(null!==(i=null===(t=this.dialogEl)||void 0===t?void 0:t.querySelectorAll('button:not([disabled]):not([tabindex="-1"]), select:not([disabled]), [data-date][tabindex="0"]'))&&void 0!==i?i:[]);if(0===n.length)return;const a=null===(r=null===(s=this.dialogEl)||void 0===s?void 0:s.getRootNode())||void 0===r?void 0:r.activeElement,o=n[0],d=n[n.length-1];e.shiftKey&&a===o?(e.preventDefault(),d.focus()):e.shiftKey||a!==d||(e.preventDefault(),o.focus())}dayFromEvent(e){var t,i;const s=null===(i=null===(t=e.target)||void 0===t?void 0:t.closest)||void 0===i?void 0:i.call(t,"[data-date]");return C(null==s?void 0:s.dataset.date)}updateFormValue(){var e,t,i,s;if(k()||!(null===(e=this.internals)||void 0===e?void 0:e.setFormValue))return;if(this.internals.setFormValue(this.value||null),!this.internals.setValidity)return;const r=null!==(s=null===(i=null===(t=this.inputEl)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("input"))&&void 0!==s?s:void 0,n=this.textError||this.valueError();"format"===n?this.internals.setValidity({badInput:!0},this.invalidDateMessage,r):"min"===n?this.internals.setValidity({rangeUnderflow:!0},this.boundMessage(this.minDateMessage,this.minDate),r):"max"===n?this.internals.setValidity({rangeOverflow:!0},this.boundMessage(this.maxDateMessage,this.maxDate),r):this.required&&!this.value?this.internals.setValidity({valueMissing:!0},(null==r?void 0:r.validationMessage)||this.invalidDateMessage,r):this.internals.setValidity({})}boundMessage(e,t){const i=t?le({date:t,time:null},this.format||void 0,this.resolvedLocale):"";return y(e,{date:i})}formResetCallback(){this.value="",this.text="",this.textError="",this.closeCalendar(!1),this.updateFormValue()}interactivityChanged(){this.isInteractive||this.closeCalendar(!1)}formDisabledCallback(e){this.disabled=e,e&&this.closeCalendar(!1)}formStateRestoreCallback(e){"string"==typeof e&&(this.value=e)}triggerAccessibleName(e){const t=this.parsedValue();if(!t)return this.triggerLabel;const i=t.map((t=>S(t.date,e,ve)));return`${this.triggerLabel}, ${i.join(ce)}`}highlightedRange(){const e=C(this.draftStart),t=C(this.draftEnd);if(!e||t)return[e,t];const i=C(this.previewDate);return[e,i&&i>e?i:null]}selectedDay(){return this.range?null:C(this.draftStart)}renderMonthHeading(e,t,i,r){const n=S(e,i,{month:"long",year:"numeric"}),a=0===t?"polite":null;if(!this.showDropdowns)return s("div",{class:"pds-datepicker__heading",id:r,"aria-live":a},n);const o=e.getUTCFullYear(),d=e.getUTCMonth(),l=this.minDate,c=this.maxDate,h=A().getUTCFullYear(),p=l?l.getUTCFullYear():h-100,v=c?c.getUTCFullYear():h+100,m=z(i,{month:"long"}),b=z(i,{year:"numeric"});return s("div",{class:"pds-datepicker__dropdowns"},s("span",{class:"visually-hidden",id:r,"aria-live":a},n),s("span",{class:"pds-datepicker__select-wrap"},s("select",{class:"pds-datepicker__heading-select","aria-label":this.monthLabel,onChange:e=>this.jumpTo(t,o,Number(e.target.value))},Array.from({length:12},((e,t)=>{const i=!!l&&new Date(Date.UTC(o,t+1,0))<l||!!c&&new Date(Date.UTC(o,t,1))>c;return s("option",{value:t+"",selected:t===d,disabled:i},m.format(new Date(Date.UTC(o,t,1))))}))),s("pds-icon",{class:"pds-datepicker__select-caret",icon:u,size:"small","aria-hidden":"true"})),s("span",{class:"pds-datepicker__select-wrap"},s("select",{class:"pds-datepicker__heading-select","aria-label":this.yearLabel,onChange:e=>this.jumpTo(t,Number(e.target.value),d)},Array.from({length:Math.max(v,o)-Math.min(p,o)+1},((e,t)=>{const i=Math.min(p,o)+t;return s("option",{value:i+"",selected:i===o},b.format(new Date(Date.UTC(i,0,1))))}))),s("pds-icon",{class:"pds-datepicker__select-caret",icon:u,size:"small","aria-hidden":"true"})))}renderMonth(e,t,i){const r=e.getUTCFullYear(),n=e.getUTCMonth(),a=this.minDate,o=this.maxDate,d=this.selectedDay(),[l,c]=this.range?this.highlightedRange():[null,null],h=A(),p=z(i,ve),u=z(i,{day:"numeric"}),b=`${this.baseId}-calendar-heading-${t}`,f=t===this.monthCount-1;return s("div",{class:"pds-datepicker__month"},s("div",{class:"pds-datepicker__header"},0===t?s("button",{type:"button",class:"pds-datepicker__nav pds-datepicker__nav--previous","aria-label":this.previousMonthLabel,disabled:!this.canShowMonth(-1),onClick:e=>this.showMonth(e,-1)},s("pds-icon",{icon:v,"aria-hidden":"true"})):s("span",{class:"pds-datepicker__nav-spacer"}),this.renderMonthHeading(e,t,i,b),f?s("button",{type:"button",class:"pds-datepicker__nav pds-datepicker__nav--next","aria-label":this.nextMonthLabel,disabled:!this.canShowMonth(1),onClick:e=>this.showMonth(e,1)},s("pds-icon",{icon:m,"aria-hidden":"true"})):s("span",{class:"pds-datepicker__nav-spacer"})),s("table",{class:"pds-datepicker__grid",role:"grid","aria-labelledby":b,"aria-multiselectable":this.range?"true":null,onKeyDown:this.onGridKeyDown,onClick:this.onGridClick,onPointerOver:this.onGridPointerOver},s("thead",null,s("tr",null,function(e,t){const i=z(e,{weekday:"short"}),s=z(e,{weekday:"long"}),r=Array.from({length:7},((e,i)=>new Date(Date.UTC(2023,0,1+(t+i)%7)))),n=r.map((e=>i.format(e).replace(/\.$/,""))),a=n.every((e=>/^[A-Za-z\u00C0-\u024F]+$/.test(e))),o=n.map((e=>e.slice(0,2))),d=a&&7===new Set(o.map((e=>e.toLowerCase()))).size;return r.map(((e,t)=>({short:d?o[t]:i.format(e),long:s.format(e)})))}(i,this.weekStart).map((e=>s("th",{scope:"col",class:"pds-datepicker__weekday"},s("span",{"aria-hidden":"true"},e.short),s("span",{class:"visually-hidden"},e.long)))))),s("tbody",null,function(e,t,i){const s=new Date(Date.UTC(e,t,1)),r=Array(E(s,i)).fill(null);for(let i=1;i<=j(e,t);i++)r.push(new Date(Date.UTC(e,t,i)));for(;r.length%7!=0;)r.push(null);const n=[];for(let e=0;e<r.length;e+=7)n.push(r.slice(e,e+7));return n}(r,n,this.weekStart).map((e=>s("tr",null,e.map(((e,t)=>{if(!e)return s("td",{class:"pds-datepicker__day pds-datepicker__day--empty"});const i=$(e),r=Y(e,a,o),n=P(e,l)||P(e,c),v=!!l&&!!c&&!P(l,c),m=!!l&&!!c&&e>=l&&e<=c,b=P(e,d)||n||m,f=P(e,h);return s("td",{class:{"pds-datepicker__day":!0,"pds-datepicker__day--selected":P(e,d)||n,"pds-datepicker__day--in-range":m&&!n,"pds-datepicker__day--range-start":v&&P(e,l),"pds-datepicker__day--range-end":v&&P(e,c),"pds-datepicker__day--row-start":m&&0===t,"pds-datepicker__day--row-end":m&&6===t,"pds-datepicker__day--today":f,"pds-datepicker__day--disabled":r},"data-date":i,tabindex:i===this.activeDate?"0":"-1","aria-label":p.format(e),"aria-selected":b?"true":null,"aria-current":f?"date":null,"aria-disabled":r?"true":null},((e,t)=>{var i,s;return null!==(s=null===(i=e.formatToParts(t).find((e=>"day"===e.type)))||void 0===i?void 0:i.value)&&void 0!==s?s:e.format(t)})(u,e))}))))))),this.timePicker&&this.timesUnderMonth(t).map((e=>this.renderTime(e,i))))}timesUnderMonth(e){return this.range?1===this.monthCount?["start","end"]:[0===e?"start":"end"]:["start"]}renderTime(e,t){var i,r,n;const a="start"===e?this.startTime:null!==(n=null===(r=null===(i=this.draftParts())||void 0===i?void 0:i[1])||void 0===r?void 0:r.time)&&void 0!==n?n:this.endTime,[o,d]=he(a),l=ue(t),c=Math.max(1,Math.min(60,Math.floor(this.minuteIncrement)||1)),h=(t,i)=>{const s=pe(t,i);"start"===e?this.startTime=s:this.endTime=s,this.timesBeforeTyping&&(this.timesBeforeTyping["start"===e?0:1]=s)},p=this.range?"start"===e?this.startTimeLabel:this.endTimeLabel:this.timeLabel,u=o>=12,v=l.hour12?Array.from({length:12},((e,t)=>t+1)):Array.from({length:24},((e,t)=>t)),m=l.hour12?o%12||12:o,b=Array.from({length:Math.ceil(60/c)},((e,t)=>t*c));b.includes(d)||b.push(d),b.sort(((e,t)=>e-t));const f=`${this.baseId}-time-${e}`;return s("div",{class:"pds-datepicker__time",role:"group","aria-labelledby":f},s("span",{class:"pds-datepicker__time-label",id:f},p),s("span",{class:"pds-datepicker__time-field"},s("select",{class:"pds-datepicker__time-select","aria-label":this.hourLabel,onChange:e=>{const t=Number(e.target.value);h(l.hour12?t%12+(u?12:0):t,d)}},v.map((e=>s("option",{value:e+"",selected:e===m},l.hour12?e+"":(e+"").padStart(2,"0"))))),s("span",{class:"pds-datepicker__time-separator","aria-hidden":"true"},":"),s("select",{class:"pds-datepicker__time-select","aria-label":this.minuteLabel,onChange:e=>h(o,Number(e.target.value))},b.map((e=>s("option",{value:e+"",selected:e===d},(e+"").padStart(2,"0"))))),l.hour12&&s("select",{class:"pds-datepicker__time-select pds-datepicker__time-select--period","aria-label":this.periodLabel,onChange:e=>{h(o%12+("pm"===e.target.value?12:0),d)}},s("option",{value:"am",selected:!u},l.am),s("option",{value:"pm",selected:u},l.pm))))}renderPresets(){var e;const t=this.resolvedPresets;if(0===t.length)return null;const i=I(t,C(this.draftStart),C(this.draftEnd)),r=!i&&!!this.draftStart,n=e=>R(e,this.minDate,this.maxDate),a=i&&n(i)?i:r?"custom":null!==(e=t.find(n))&&void 0!==e?e:"custom";return s("div",{class:"pds-datepicker__presets-column"},s("ul",{class:"pds-datepicker__presets",part:"presets",role:"radiogroup","aria-label":this.presetsLabel,onKeyDown:this.onPresetsKeyDown},t.map((e=>{const t=e===i;return s("li",{role:"none"},s("button",{type:"button",role:"radio",class:{"pds-datepicker__preset":!0,"pds-datepicker__preset--selected":t},"aria-checked":t?"true":"false",tabindex:e===a?"0":"-1",disabled:!R(e,this.minDate,this.maxDate),onClick:t=>this.onPresetClick(t,e)},s("span",null,e.label),t&&s("pds-icon",{icon:b,"aria-hidden":"true"})))})),s("li",{role:"none"},s("button",{type:"button",role:"radio",class:{"pds-datepicker__preset":!0,"pds-datepicker__preset--selected":r},"aria-checked":r?"true":"false",tabindex:"custom"===a?"0":"-1",onClick:this.onCustomRangeClick},s("span",null,this.customRangeLabel),r&&s("pds-icon",{icon:b,"aria-hidden":"true"})))))}selectionText(){const e=this.draftParts();if(!e)return"";const t=this.resolvedFormat,i=this.resolvedLocale;return this.range&&!this.draftEnd?`${le(e[0],t,i)}${ce}`:e.map((e=>le(e,t,i))).join(ce)}renderFooter(){const e=this.draftParts(),t=this.selectionText();return s("div",{class:"pds-datepicker__footer"},s("span",{class:"pds-datepicker__selection","aria-live":"polite"},t),s("button",{type:"button",class:"pds-datepicker__action",onClick:this.onCancel},this.clearable?this.clearLabel:this.cancelLabel),s("button",{type:"button",class:"pds-datepicker__action pds-datepicker__action--primary",disabled:!e,onClick:this.onApply},this.applyLabel))}renderCalendar(e){var t;const i=null!==(t=C(this.viewMonth))&&void 0!==t?t:A(),r=Array.from({length:this.monthCount},((e,t)=>L(i,t)));return s("div",{class:{"pds-datepicker__dialog":!0,"pds-datepicker__dialog--range":this.range},id:this.baseId+"-calendar",role:"dialog",tabindex:"-1","aria-labelledby":this.range?null:this.baseId+"-calendar-heading-0","aria-label":this.range?this.label||this.triggerLabel:null,part:"calendar",ref:e=>this.dialogEl=e,onKeyDown:this.onDialogKeyDown,onFocusin:this.onCalendarFocusIn,onFocusout:this.onCalendarFocusOut},this.range&&this.renderPresets(),s("div",{class:"pds-datepicker__panel"},s("div",{class:"pds-datepicker__months"},r.map(((t,i)=>this.renderMonth(t,i,e)))),this.hasFooter&&this.renderFooter(),this.appliesOnPick&&s("span",{class:"visually-hidden","aria-live":"polite"},this.selectionText())))}render(){const e=this.resolvedLocale;return s(r,{key:"a761f0ca6eeedcac3e4bd90760aa9781cd37dcdc",class:{"pds-datepicker--range":this.range,"pds-datepicker--time":this.timePicker},"full-width":this.fullWidth?"true":null,onFocusin:this.onHostFocusIn,onFocusout:this.onHostFocusOut},s("pds-input",{key:"2eb04f9fd4e2f7a2437145d250c629c2cc8a0bf6",ref:e=>this.inputEl=e,componentId:this.baseId,label:this.label,hideLabel:this.hideLabel,helperMessage:this.helperMessage,errorMessage:this.errorMessage,invalid:this.invalid||!!this.textError||!!this.valueError(),disabled:this.disabled,readonly:this.readonly,required:this.required,placeholder:this.fieldPlaceholder,fullWidth:this.fullWidth,autocomplete:"off",value:this.text,onClick:this.onFieldClick,onPdsInput:this.onTextInput,onPdsChange:this.onTextChange,onPdsKeyDown:this.onTextKeyDown,onPdsFocus:this.stopInnerEvent,onPdsBlur:this.stopInnerEvent},this.clearable&&!!this.value&&this.isInteractive&&s("button",{key:"clear",slot:"suffix",type:"button",class:"pds-datepicker__clear",ref:e=>this.clearEl=e,"aria-label":this.label?`${this.clearLabel} ${this.label}`:this.clearLabel,tabindex:"-1",onMouseDown:this.onClearMouseDown,onClick:this.onClearClick},s("pds-icon",{key:"98c325fbba8ea78b2d409bc77099db3206738508",icon:f,"aria-hidden":"true"})),s("button",{key:"trigger",slot:"suffix",type:"button",class:"pds-datepicker__trigger",ref:e=>this.triggerEl=e,"aria-label":this.triggerAccessibleName(e),"aria-haspopup":"dialog","aria-expanded":this.isOpen?"true":"false",disabled:!this.isInteractive,onClick:this.onTriggerClick,onKeyDown:this.onTriggerKeyDown},s("pds-icon",{key:"cb8483febe1b485058b7bb4271b749981a7747a1",icon:g,"aria-hidden":"true"}))),this.isOpen&&this.renderCalendar(e))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{value:[{valueChanged:0}],format:[{contextChanged:0}],locale:[{contextChanged:0}],timePicker:[{contextChanged:0}],range:[{contextChanged:0}],min:[{contextChanged:0}],max:[{contextChanged:0}],placement:[{placementChanged:0}],required:[{requiredChanged:0}],disabled:[{interactivityChanged:0}],readonly:[{interactivityChanged:0}]}}static get style(){return':host{--pds-datepicker-day-size:var(--pine-dimension-500);--pds-datepicker-presets-width:200px;display:inline-block}:host([full-width]){display:block}pds-input{display:block}:host(.pds-datepicker--time) pds-input{min-width:220px}:host(.pds-datepicker--range) pds-input{min-width:260px}:host(.pds-datepicker--range.pds-datepicker--time) pds-input{min-width:min(380px, 100%)}.pds-datepicker__trigger,.pds-datepicker__clear{-ms-flex-align:center;align-items:center;background:transparent;border:0;border-radius:var(--pine-border-radius-sm);color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-2xs)}.pds-datepicker__trigger:hover:not(:disabled),.pds-datepicker__clear:hover:not(:disabled){background:var(--pine-color-background-muted);color:var(--pine-color-text-strong)}.pds-datepicker__trigger:focus-visible,.pds-datepicker__clear:focus-visible{outline:var(--pine-outline-focus)}.pds-datepicker__trigger:disabled,.pds-datepicker__clear:disabled{color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-datepicker__clear{-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs)}.pds-datepicker__nav{-ms-flex-align:center;align-items:center;background:var(--pine-color-secondary);border:var(--pine-border);border-radius:var(--pine-border-radius-full);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;height:var(--pine-dimension-400);-ms-flex-pack:center;justify-content:center;padding:0;width:var(--pine-dimension-400)}.pds-datepicker__nav:hover:not(:disabled){background:var(--pine-color-secondary-hover);border-color:var(--pine-color-border-hover)}.pds-datepicker__nav:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-datepicker__nav:disabled{border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-secondary-disabled);cursor:not-allowed}.pds-datepicker__nav:dir(rtl) pds-icon{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.pds-datepicker__dialog:focus{outline:none}.pds-datepicker__dialog{background:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-150);-webkit-box-shadow:var(--pine-box-shadow-200);box-shadow:var(--pine-box-shadow-200);-webkit-box-sizing:border-box;box-sizing:border-box;left:0;max-height:calc(100vh - var(--pine-dimension-sm));max-height:calc(100dvh - var(--pine-dimension-sm));max-width:calc(100vw - var(--pine-dimension-sm));overflow:auto;-ms-scroll-chaining:none;overscroll-behavior:contain;padding:var(--pine-dimension-sm);pointer-events:auto;position:fixed;top:0;visibility:hidden;z-index:var(--pine-z-index-priority)}:host-context([data-theme=dark]) .pds-datepicker__dialog{border:var(--pine-border)}.pds-datepicker__header{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-webkit-margin-after:var(--pine-dimension-sm);margin-block-end:var(--pine-dimension-sm)}.pds-datepicker__nav-spacer{-ms-flex:none;flex:none;width:var(--pine-dimension-400)}.pds-datepicker__heading{color:var(--pine-color-text);font:var(--pine-typography-heading-5);font-weight:var(--pine-font-weight-semi-bold)}.pds-datepicker__grid{border-collapse:collapse;border-spacing:0}.pds-datepicker__weekday{color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm);height:var(--pds-datepicker-day-size);padding:0;text-align:center;width:var(--pds-datepicker-day-size)}.pds-datepicker__day{border-radius:var(--pine-border-radius-full);color:var(--pine-color-text-secondary);cursor:pointer;font:var(--pine-typography-body);height:var(--pds-datepicker-day-size);padding:0;position:relative;text-align:center;-webkit-transition:background var(--pine-motion-duration-fast) var(--pine-motion-easing-in);transition:background var(--pine-motion-duration-fast) var(--pine-motion-easing-in);width:var(--pds-datepicker-day-size)}.pds-datepicker__day:hover{background:var(--pine-color-background-muted)}.pds-datepicker__day:focus-visible{outline:var(--pine-outline-focus);outline-offset:calc(var(--pine-border-width-thick) * -1)}.pds-datepicker__day--empty{cursor:default;pointer-events:none}.pds-datepicker__day--today::after{background:var(--pine-color-primary);border-radius:var(--pine-border-radius-full);content:"";height:var(--pine-dimension-050);inset-block-end:var(--pine-dimension-050);inset-inline-start:50%;position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pine-dimension-050)}.pds-datepicker__day--selected,.pds-datepicker__day--selected:hover{background:var(--pine-color-primary);color:var(--pine-color-text-primary)}.pds-datepicker__day--selected:focus-visible{outline-offset:var(--pine-border-width)}.pds-datepicker__day--range-start{border-end-end-radius:0;border-start-end-radius:0}.pds-datepicker__day--range-end{border-end-start-radius:0;border-start-start-radius:0}.pds-datepicker__day--range-start.pds-datepicker__day--row-end{border-end-end-radius:var(--pine-border-radius-full);border-start-end-radius:var(--pine-border-radius-full)}.pds-datepicker__day--range-end.pds-datepicker__day--row-start{border-end-start-radius:var(--pine-border-radius-full);border-start-start-radius:var(--pine-border-radius-full)}.pds-datepicker__day--selected.pds-datepicker__day--today::after{background:var(--pine-color-text-primary)}.pds-datepicker__day--in-range{border-radius:0}.pds-datepicker__day--in-range,.pds-datepicker__day--in-range:hover{background:var(--pine-color-background-muted);color:var(--pine-color-text-secondary)}.pds-datepicker__day--row-start{border-end-start-radius:var(--pine-border-radius-full);border-start-start-radius:var(--pine-border-radius-full)}.pds-datepicker__day--row-end{border-end-end-radius:var(--pine-border-radius-full);border-start-end-radius:var(--pine-border-radius-full)}.pds-datepicker__day--disabled,.pds-datepicker__day--disabled:hover{background:transparent;color:var(--pine-color-text-disabled);cursor:not-allowed;text-decoration:line-through}.pds-datepicker__day--in-range:hover{background:var(--pine-color-background-inset)}.pds-datepicker__dialog--range{display:-ms-flexbox;display:flex;padding:0}.pds-datepicker__panel{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0}.pds-datepicker__dialog--range .pds-datepicker__panel{padding:var(--pine-dimension-sm)}.pds-datepicker__months{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-lg)}.pds-datepicker__presets-column{-webkit-border-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-inline-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-ms-flex:none;flex:none;position:relative;width:var(--pds-datepicker-presets-width)}.pds-datepicker__presets{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pine-dimension-2xs);inset:0;list-style:none;margin:0;overflow-y:auto;padding:var(--pine-dimension-150);position:absolute}.pds-datepicker__preset{-ms-flex-align:center;align-items:center;background:transparent;border:0;border-radius:var(--pine-border-radius-md);color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body);gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;padding:var(--pine-dimension-xs) var(--pine-dimension-sm);text-align:start;-webkit-transition:background var(--pine-motion-duration-fast) var(--pine-motion-easing-in);transition:background var(--pine-motion-duration-fast) var(--pine-motion-easing-in);width:100%}.pds-datepicker__preset:hover:not(:disabled){background:var(--pine-color-background-muted)}.pds-datepicker__preset:focus-visible{outline:var(--pine-outline-focus)}.pds-datepicker__preset:disabled{color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-datepicker__preset--selected{background:var(--pine-color-background-muted);color:var(--pine-color-text-active)}.pds-datepicker__footer{-ms-flex-align:center;align-items:center;background:var(--pine-color-background-overlay);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-xs);inset-block-end:calc(var(--pine-dimension-sm) * -1);-ms-flex-pack:end;justify-content:flex-end;margin-block:var(--pine-dimension-sm) calc(var(--pine-dimension-sm) * -1);padding-block:var(--pine-dimension-sm);position:-webkit-sticky;position:sticky}.pds-datepicker__selection{color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);-webkit-margin-end:auto;margin-inline-end:auto}.pds-datepicker__dropdowns{display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-datepicker__select-wrap{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;position:relative}.pds-datepicker__heading-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-border-radius-md);color:var(--pine-color-text);cursor:pointer;field-sizing:content;font:var(--pine-typography-heading-5);font-weight:var(--pine-font-weight-semi-bold);padding-block:var(--pine-dimension-2xs);padding-inline:var(--pine-dimension-xs) calc(var(--pine-dimension-xs) + var(--pine-dimension-sm))}.pds-datepicker__heading-select:hover{background:var(--pine-color-background-muted)}.pds-datepicker__heading-select:focus-visible{outline:var(--pine-outline-focus)}.pds-datepicker__select-caret{color:var(--pine-color-text-secondary);inset-inline-end:var(--pine-dimension-xs);pointer-events:none;position:absolute}.pds-datepicker__time{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;-webkit-margin-before:var(--pine-dimension-sm);margin-block-start:var(--pine-dimension-sm);padding-inline:var(--pine-dimension-xs)}.pds-datepicker__time-label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium)}.pds-datepicker__time-field{-ms-flex-align:center;align-items:center;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-border-radius-md);display:-ms-inline-flexbox;display:inline-flex;min-height:var(--pine-dimension-400);padding-inline:var(--pine-dimension-2xs)}.pds-datepicker__time-field:hover{border-color:var(--pine-color-border-hover)}.pds-datepicker__time-field:focus-within{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-datepicker__time-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-border-radius-sm);color:var(--pine-color-text-strong);cursor:pointer;font:var(--pine-typography-body);font-variant-numeric:tabular-nums;padding:var(--pine-dimension-2xs);text-align:center}.pds-datepicker__time-select:focus-visible{background:var(--pine-color-background-muted);outline:none}.pds-datepicker__time-select--period{-webkit-margin-start:var(--pine-dimension-2xs);margin-inline-start:var(--pine-dimension-2xs)}.pds-datepicker__time-separator{color:var(--pine-color-text-secondary)}:host-context([data-theme=dark]) select{color-scheme:dark}.pds-datepicker__action{background:var(--pine-color-secondary);border:var(--pine-border);border-radius:var(--pine-border-radius-full);color:var(--pine-color-text-secondary);cursor:pointer;font:var(--pine-typography-body-medium);padding:calc(var(--pine-dimension-xs) - var(--pine-border-width)) var(--pine-dimension-sm)}.pds-datepicker__action:hover:not(:disabled){background:var(--pine-color-secondary-hover);border-color:var(--pine-color-border-hover)}.pds-datepicker__action:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-datepicker__action:disabled{background:var(--pine-color-secondary-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-secondary-disabled);cursor:not-allowed}.pds-datepicker__action--primary{background:var(--pine-color-primary);border-color:var(--pine-color-primary);color:var(--pine-color-text-primary)}.pds-datepicker__action--primary:hover:not(:disabled){background:var(--pine-color-primary-hover);border-color:var(--pine-color-primary-hover)}.pds-datepicker__action--primary:disabled{background:var(--pine-color-primary-disabled);border-color:var(--pine-color-primary-disabled);color:var(--pine-color-text-primary-disabled)}@media (max-width: 600px){.pds-datepicker__dialog--range{-ms-flex-direction:column;flex-direction:column}.pds-datepicker__presets-column{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-webkit-border-end:0;border-inline-end:0;width:auto}.pds-datepicker__presets{-ms-flex-direction:row;flex-direction:row;overflow-x:auto;position:static}.pds-datepicker__preset{white-space:nowrap}.pds-datepicker__selection{-ms-flex-preferred-size:100%;flex-basis:100%}}.pds-datepicker__trigger,.pds-datepicker__clear,.pds-datepicker__nav,.pds-datepicker__weekday,.pds-datepicker__day,.pds-datepicker__preset,.pds-datepicker__action{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (forced-colors: active){.pds-datepicker__day--selected,.pds-datepicker__day--selected:hover{background:Highlight;color:HighlightText;forced-color-adjust:none}.pds-datepicker__day--in-range,.pds-datepicker__day--in-range:hover{border-block:var(--pine-border-width-thin) solid Highlight}.pds-datepicker__day--today::after{background:CanvasText;forced-color-adjust:none}.pds-datepicker__day--selected.pds-datepicker__day--today::after{background:HighlightText}.pds-datepicker__day--disabled{color:GrayText}}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}'}},[65,"pds-datepicker",{applyLabel:[1,"apply-label"],autoApply:[4,"auto-apply"],cancelLabel:[1,"cancel-label"],clearable:[4],clearLabel:[1,"clear-label"],componentId:[1,"component-id"],customRangeLabel:[1,"custom-range-label"],disabled:[4],endTimeLabel:[1,"end-time-label"],errorMessage:[1,"error-message"],firstDayOfWeek:[2,"first-day-of-week"],format:[1],fullWidth:[4,"full-width"],helperMessage:[1,"helper-message"],hideLabel:[4,"hide-label"],hourLabel:[1,"hour-label"],invalid:[4],invalidDateMessage:[1,"invalid-date-message"],maxDateMessage:[1,"max-date-message"],minDateMessage:[1,"min-date-message"],label:[1],locale:[1],max:[1],min:[1],minuteIncrement:[2,"minute-increment"],minuteLabel:[1,"minute-label"],monthLabel:[1,"month-label"],name:[1],nextMonthLabel:[1,"next-month-label"],periodLabel:[1,"period-label"],placeholder:[1],placement:[1],presets:[1],presetsLabel:[1,"presets-label"],previousMonthLabel:[1,"previous-month-label"],range:[4],readonly:[4],required:[4],showDropdowns:[4,"show-dropdowns"],startTimeLabel:[1,"start-time-label"],timePicker:[4,"time-picker"],timeLabel:[1,"time-label"],triggerLabel:[1,"trigger-label"],value:[1025],yearLabel:[1,"year-label"],isOpen:[32],text:[32],textError:[32],activeDate:[32],viewMonth:[32],draftStart:[32],draftEnd:[32],startTime:[32],endTime:[32],previewDate:[32],open:[64],close:[64],setFocus:[64]},void 0,{value:[{valueChanged:0}],format:[{contextChanged:0}],locale:[{contextChanged:0}],timePicker:[{contextChanged:0}],range:[{contextChanged:0}],min:[{contextChanged:0}],max:[{contextChanged:0}],placement:[{placementChanged:0}],required:[{requiredChanged:0}],disabled:[{interactivityChanged:0}],readonly:[{interactivityChanged:0}]}]),_e=ke,ye=function(){"undefined"!=typeof customElements&&["pds-datepicker","pds-icon","pds-input"].forEach((e=>{switch(e){case"pds-datepicker":customElements.get(n(e))||customElements.define(n(e),ke);break;case"pds-icon":customElements.get(n(e))||w();break;case"pds-input":customElements.get(n(e))||D()}}))};export{_e as PdsDatepicker,ye as defineCustomElement}
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as s,Host as r,transformTag as n}from"@stencil/core/internal/client";import{a,c as o,o as d,f as l,b as c,s as h,h as p}from"./floating-ui.dom.js";import{c as u,j as v,k as m,m as b,r as f,n as g}from"./index2.js";import{i as k}from"./form.js";import{r as _,f as y}from"./i18n-format.js";import{c as x}from"./closest.js";import{d as w}from"./pds-icon2.js";import{d as D}from"./pds-input2.js";const M=/^(\d{4})-(\d{2})-(\d{2})$/;function C(e){const t=M.exec((null!=e?e:"").trim());if(!t)return null;const[,i,s,r]=t.map(Number),n=new Date(Date.UTC(i,s-1,r));return n.getUTCFullYear()===i&&n.getUTCMonth()===s-1&&n.getUTCDate()===r?n:null}function $(e){return e.toISOString().slice(0,10)}function A(){const e=new Date;return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))}function T(e,t){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()+t))}function L(e,t){const i=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1)),s=j(i.getUTCFullYear(),i.getUTCMonth());return new Date(Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),Math.min(e.getUTCDate(),s)))}function j(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function P(e,t){return!!e&&!!t&&e.getTime()===t.getTime()}function H(e,t,i){return t&&e<t?t:i&&e>i?i:e}function Y(e,t,i){return!!t&&e<t||!!i&&e>i}function E(e,t){return(e.getUTCDay()-t+7)%7}function z(e,t){return new Intl.DateTimeFormat(e,Object.assign(Object.assign({},t),{timeZone:"UTC",calendar:"gregory"}))}function S(e,t,i){return z(t,i).format(e)}class N{constructor(e){this.datepicker=e,this.copiedProperties=[],this.host=document.createElement("div"),this.host.className=N.className,this.host.pdsDatepicker=e,this.host.style.display="contents",this.root=this.host.attachShadow({mode:"open"})}mount(e,t){this.host.isConnected?t!==this.locale&&this.copyContext(t):(function(e){const t=new Set;let i=e;for(;i&&!t.has(i);){if(t.add(i),i.nodeType===Node.ELEMENT_NODE&&F(i))return i;const e=i.nodeType===Node.ELEMENT_NODE?i.assignedSlot:null;if(e){i=e;continue}const s=i.parentNode;i=s instanceof ShadowRoot?s.host:s}return document.body}(this.datepicker).appendChild(this.host),this.copyContext(t)),e.parentNode!==this.root&&this.root.appendChild(e)}remove(){this.host.remove()}contains(e){return!!e&&(e===this.host||this.root.contains(e))}copyContext(e){var t,i;this.locale=e;const s=this.datepicker.shadowRoot;s&&((null===(t=s.adoptedStyleSheets)||void 0===t?void 0:t.length)?this.root.adoptedStyleSheets=s.adoptedStyleSheets:this.root.querySelector("style")||s.querySelectorAll("style").forEach((e=>this.root.appendChild(e.cloneNode(!0)))));const r=getComputedStyle(this.datepicker);this.host.dir=r.direction||"ltr",this.host.lang=e,this.copyCustomProperties(r);const n=null===(i=x("[data-theme]",this.datepicker)||null)||void 0===i?void 0:i.getAttribute("data-theme");n?this.host.setAttribute("data-theme",n):this.host.removeAttribute("data-theme")}copyCustomProperties(e){for(const e of this.copiedProperties)this.host.style.removeProperty(e);this.copiedProperties=[];const t=this.host.parentElement,i=t?getComputedStyle(t):null;for(let t=0;t<e.length;t++){const s=e[t];if(!s.startsWith("--"))continue;const r=e.getPropertyValue(s);i&&r===i.getPropertyValue(s)||(this.host.style.setProperty(s,r.trim()),this.copiedProperties.push(s))}}}function F(e){if("dialog"===e.localName)return e.open;if(!e.hasAttribute("popover"))return!1;try{return e.matches(":popover-open")}catch(e){return!1}}N.className="pds-datepicker-calendar-portal";const U={today:"Today",yesterday:"Yesterday","last-7-days":"Last 7 days","last-30-days":"Last 30 days","last-90-days":"Last 90 days","this-month":"This month","last-month":"Last month","this-quarter":"This quarter","last-quarter":"Last quarter","this-year":"This year","last-year":"Last year","year-to-date":"Year to date","last-12-months":"Last 12 months"},O=(e,t,i)=>new Date(Date.UTC(e,t,i));function q(e,t){const i=t.getUTCFullYear(),s=t.getUTCMonth(),r=s-s%3;switch(e){case"today":return[t,t];case"yesterday":return[T(t,-1),T(t,-1)];case"last-7-days":return[T(t,-6),t];case"last-30-days":return[T(t,-29),t];case"last-90-days":return[T(t,-89),t];case"this-month":return[O(i,s,1),O(i,s+1,0)];case"last-month":return[O(i,s-1,1),O(i,s,0)];case"this-quarter":return[O(i,r,1),O(i,r+3,0)];case"last-quarter":return[O(i,r-3,1),O(i,r,0)];case"this-year":return[O(i,0,1),O(i,11,31)];case"last-year":return[O(i-1,0,1),O(i-1,11,31)];case"year-to-date":return[O(i,0,1),t];case"last-12-months":return[L(t,-12),t];default:return null}}function I(e,t,i){if(t&&i)return e.find((e=>e.start.getTime()===t.getTime()&&e.end.getTime()===i.getTime()))}function R(e,t,i){return!Y(e.start,t,i)&&!Y(e.end,t,i)}const W=/^(\d{4}-\d{2}-\d{2})(?:[T ](\d{2}):(\d{2}))?$/;function K(e){const t=W.exec((null!=e?e:"").trim());if(!t)return null;const i=C(t[1]);return i?void 0===t[2]?{date:i,time:null}:Number(t[2])<24&&Number(t[3])<60?{date:i,time:`${t[2]}:${t[3]}`}:null:null}const V="YYYY-MM-DD",X=/\[([^\]]*)\]|YYYY|MMMM|MMM|MM|M|DD|D|HH|H|hh|h|mm|A|a/g,Z=/HH|H|hh|h/,B=/hh|h/,G=/A|a/;function J(e,t,i=!1){const s=(null==e?void 0:e.trim())||V,r=(e=>e.replace(/\[[^\]]*\]/g,""))(s);return B.test(r)&&!G.test(r)?s+" A":!t||Z.test(r)?s:`${s} ${i?"h:mm A":"HH:mm"}`}const Q=(e,t=2)=>(e+"").padStart(t,"0"),ee=new Map;function te(e){let t=ee.get(e);if(!t){const i=t=>{const i=new Intl.DateTimeFormat(e,{month:t,timeZone:"UTC",calendar:"gregory"});return Array.from({length:12},((e,t)=>i.format(new Date(Date.UTC(2023,t,1)))))},s=ue(e);t={months:i("long"),shortMonths:i("short"),am:s.am,pm:s.pm},ee.set(e,t)}return t}const ie=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),se=e=>ie(e).replace(/\s+/g,"\\s*"),re=e=>`(${e.map(ie).join("|")})`;function ne(e,t=V,i="en-US"){var s;return null!==(s=function(e,t,i="en-US"){var s,r,n,a,o,d,l,c,h,p;const u=te(i),v=te("en-US"),m=[u.am,u.pm,v.am,v.pm],b={YYYY:"(\\d{4})",MMMM:re([...u.months,...v.months]),MMM:re([...u.shortMonths,...v.shortMonths]),MM:"(\\d{1,2})",M:"(\\d{1,2})",DD:"(\\d{1,2})",D:"(\\d{1,2})",HH:"(\\d{1,2})",H:"(\\d{1,2})",hh:"(\\d{1,2})",h:"(\\d{1,2})",mm:"(\\d{2})",A:re(m),a:re(m)},f=[],g=()=>{f.length=0;let e="",i=0;return t.replace(X,((s,r,n)=>(e+=se(t.slice(i,n)),void 0!==r?e+=se(r):(e+=b[s],f.push(s)),i=n+s.length,s))),RegExp(`^\\s*${e}${se(t.slice(i))}\\s*$`,"i")};let k=g().exec(null!=e?e:"");if(k||(b.mm="(\\d{1,2})",k=g().exec(null!=e?e:"")),!k)return null;const _=k,y={};f.forEach(((e,t)=>y[e]=_[t+1]));const x=(e,t)=>{if(void 0===e)return;const i=t?[u.months,v.months]:[u.shortMonths,v.shortMonths];for(const t of i){const i=t.findIndex((t=>t.toLowerCase()===e.toLowerCase()));if(i>=0)return i+1}},w=Number(y.YYYY),D=null!==(r=null!==(s=x(y.MMMM,!0))&&void 0!==s?s:x(y.MMM,!1))&&void 0!==r?r:Number(null!==(n=y.MM)&&void 0!==n?n:y.M),M=Number(null!==(a=y.DD)&&void 0!==a?a:y.D);if(!y.YYYY||!D||!M)return null;const $=C(`${Q(w,4)}-${Q(D)}-${Q(M)}`);if(!$)return null;const A=null!==(l=null!==(d=null!==(o=y.HH)&&void 0!==o?o:y.H)&&void 0!==d?d:y.hh)&&void 0!==l?l:y.h;if(void 0===A)return{date:$,time:null};let T=Number(A);const L=Number(null!==(c=y.mm)&&void 0!==c?c:0),j=null===(p=null!==(h=y.A)&&void 0!==h?h:y.a)||void 0===p?void 0:p.toLowerCase();if(void 0!==y.hh||void 0!==y.h){if(T<1||T>12)return null;T=T%12+(j===u.pm.toLowerCase()||j===v.pm.toLowerCase()?12:0)}return T<24&&L<60?{date:$,time:pe(T,L)}:null}(e,t,i))&&void 0!==s?s:K(e)}function ae(e,t=V,i="en-US"){const s=(null!=e?e:"").trim(),r=RegExp(`${ie(ce)}|\\s+(?:–|—|-|to)\\s+${t.includes("/")?"":"|\\s*/\\s*"}`,"gi");let n;for(;null!==(n=r.exec(s));){const e=ne(s.slice(0,n.index),t,i),r=ne(s.slice(n.index+n[0].length),t,i);if(e&&r)return oe(e,r)<=0?[e,r]:null}return null}function oe(e,t){var i,s;const r=e.date.getTime()-t.date.getTime();return 0!==r?r:(null!==(i=e.time)&&void 0!==i?i:"00:00").localeCompare(null!==(s=t.time)&&void 0!==s?s:"00:00")}function de(e){return e.time?`${$(e.date)}T${e.time}`:$(e.date)}function le(e,t,i="en-US"){return function(e,t,i="en-US"){var s;const r=te(i),[n,a]=he(null!==(s=e.time)&&void 0!==s?s:"00:00"),o=n%12||12,d=e.date.getUTCMonth(),l=n<12?r.am:r.pm,c={YYYY:Q(e.date.getUTCFullYear(),4),MMMM:r.months[d],MMM:r.shortMonths[d],MM:Q(d+1),M:d+1+"",DD:Q(e.date.getUTCDate()),D:e.date.getUTCDate()+"",HH:Q(n),H:n+"",hh:Q(o),h:o+"",mm:Q(a),A:l,a:l.toLowerCase()};return t.replace(X,((e,t)=>null!=t?t:c[e]))}(e,null!=t?t:J(V,!!e.time),i)}const ce=" – ";function he(e){const[t,i]=e.split(":").map(Number);return[t||0,i||0]}function pe(e,t){return`${(e+"").padStart(2,"0")}:${(t+"").padStart(2,"0")}`}function ue(e){var t,i;const s=new Intl.DateTimeFormat(e,{hour:"numeric",timeZone:"UTC"}),r=e=>{var t;return null===(t=s.formatToParts(new Date(Date.UTC(2023,0,1,e))).find((e=>"dayPeriod"===e.type)))||void 0===t?void 0:t.value};return{hour12:!!s.resolvedOptions().hour12,am:null!==(t=r(1))&&void 0!==t?t:"AM",pm:null!==(i=r(13))&&void 0!==i?i:"PM"}}const ve={weekday:"long",year:"numeric",month:"long",day:"numeric"},me="00:00",be="23:59";let fe=0;const ge=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),ke=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsDatepickerChange=i(this,"pdsDatepickerChange",7),this.pdsBlur=i(this,"pdsBlur",7),this.pdsFocus=i(this,"pdsFocus",7),this.focusActiveDay=!1,this.fallbackId="pds-datepicker-"+ ++fe,this.skipForwardedClick=!1,this.presetByArrow=!1,this.valueAtOpen="",this.committing=!1,this.hasFocus=!1,this.applyLabel="Apply",this.autoApply=!1,this.cancelLabel="Cancel",this.clearable=!1,this.clearLabel="Clear",this.customRangeLabel="Custom range",this.endTimeLabel="End time",this.format="YYYY-MM-DD",this.hourLabel="Hour",this.invalidDateMessage="Enter a date in the format shown.",this.maxDateMessage="Choose {date} or earlier.",this.minDateMessage="Choose {date} or later.",this.minuteIncrement=1,this.minuteLabel="Minute",this.monthLabel="Month",this.nextMonthLabel="Next month",this.periodLabel="AM or PM",this.placement="bottom-start",this.presetsLabel="Presets",this.previousMonthLabel="Previous month",this.range=!1,this.showDropdowns=!1,this.startTimeLabel="Start time",this.timePicker=!1,this.timeLabel="Time",this.triggerLabel="Choose date",this.value="",this.yearLabel="Year",this.isOpen=!1,this.text="",this.textError="",this.activeDate="",this.viewMonth="",this.draftStart="",this.draftEnd="",this.startTime=me,this.endTime=be,this.previewDate="",this.onApply=()=>{const e=this.draftParts();e&&(this.commitParts(e),this.closeCalendar(!0))},this.onCancel=()=>{this.clearable?this.commitValue(""):this.restoreValueAtOpen(),this.closeCalendar(!0)},this.onPresetClick=(e,t)=>{this.draftStart=$(t.start),this.draftEnd=$(t.end),this.previewDate="",!this.appliesOnPick||this.presetByArrow?(this.showDate(t.end,!0),e.currentTarget.focus()):this.onApply()},this.onPresetsKeyDown=e=>{const t={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1}[e.key],i={Home:"first",End:"last"}[e.key];if(!t&&!i)return;const s=Array.from(e.currentTarget.querySelectorAll('[role="radio"]:not([disabled])')),r=s.indexOf(e.target),n="first"===i?s[0]:"last"===i?s[s.length-1]:s[(r+t+s.length)%s.length];n&&(e.preventDefault(),n.focus(),n.classList.contains("pds-datepicker__preset")&&n!==s[s.length-1]&&(this.presetByArrow=!0,n.click(),this.presetByArrow=!1))},this.onClearMouseDown=e=>{e.preventDefault()},this.onClearClick=()=>{var e;this.commitValue(""),this.closeCalendar(!1),null===(e=this.inputEl)||void 0===e||e.setFocus()},this.onCustomRangeClick=()=>{var e,t;null===(t=null===(e=this.dialogEl)||void 0===e?void 0:e.querySelector('[data-date][tabindex="0"]'))||void 0===t||t.focus()},this.onDocumentPointerDown=e=>{var t;const i=e.composedPath();i.includes(this.el)||this.portal&&i.includes(this.portal.host)||(this.closeCalendar(!1),"dialog"===(null===(t=i[0])||void 0===t?void 0:t.localName)&&function(){const e=e=>{e.stopPropagation(),e.preventDefault()};document.addEventListener("click",e,{capture:!0,once:!0}),window.setTimeout((()=>document.removeEventListener("click",e,{capture:!0})),500)}())},this.onHostFocusIn=e=>{this.focusEntered(e)},this.onCalendarFocusIn=e=>{var t,i;this.focusEntered(e),null===(t=this.dialogEl)||void 0===t||t.setAttribute("aria-modal","true"),e.target===this.dialogEl&&(null===(i=this.dialogEl.querySelector(`[data-date="${this.activeDate}"]`))||void 0===i||i.focus({preventScroll:!0}))},this.onCalendarFocusOut=e=>{var t,i;const s=e.relatedTarget;s&&(null===(t=this.dialogEl)||void 0===t?void 0:t.contains(s))||null===(i=this.dialogEl)||void 0===i||i.removeAttribute("aria-modal"),this.checkFocusLeft(e,null!==s)},this.onHostFocusOut=e=>{const t=e.relatedTarget;t&&this.isInside(t)||this.checkFocusLeft(e,null!==t)},this.stopInnerEvent=e=>e.stopPropagation(),this.onFieldClick=e=>{var t,i;const s=e.composedPath();if(this.triggerEl&&s.includes(this.triggerEl)||this.clearEl&&s.includes(this.clearEl))return;const r=null===(i=null===(t=this.inputEl)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("label");if(r&&s.includes(r))return this.skipForwardedClick=!0,void window.setTimeout((()=>this.skipForwardedClick=!1));if(this.skipForwardedClick)return void(this.skipForwardedClick=!1);const n=this.fieldReference();n&&n!==this.inputEl&&!s.includes(n)||this.openCalendar(!1)},this.onTextInput=e=>{var t,i;if(e.stopPropagation(),this.text=(null!==(t=e.detail.value)&&void 0!==t?t:"")+"",!this.isOpen)return;const s=this.parseText(this.text);if(!s)return;const[r,n]=[this.startTime,this.endTime];if(null!==(i=this.timesBeforeTyping)&&void 0!==i||(this.timesBeforeTyping=[r,n]),this.loadDraft(s),this.timePicker){const e=this.resolvedFormat,t=this.resolvedLocale,i=this.range?ae(this.text,e,t):[ne(this.text,e,t)],s=this.parsedValue(),a=e=>{var t,r,n;return!(null===(t=null==i?void 0:i[e])||void 0===t?void 0:t.time)||(null===(r=i[e])||void 0===r?void 0:r.time)===(null===(n=null==s?void 0:s[e])||void 0===n?void 0:n.time)};a(0)&&(this.startTime=r),this.range&&a(1)&&(this.endTime=n)}this.showDate(s[s.length-1].date)},this.onTextChange=e=>{e.stopPropagation(),this.isOpen&&this.hasFooter?window.setTimeout((()=>{var e;this.isOpen&&(this.el.matches(":focus-within")||(null===(e=this.portal)||void 0===e?void 0:e.host.matches(":focus-within")))||this.commitPendingText()})):this.commitText()},this.onTextKeyDown=e=>{e.stopPropagation();const t=e.detail;if(t.altKey&&"ArrowDown"===t.key)t.preventDefault(),this.isOpen?(this.focusActiveDay=!0,this.flushActiveDayFocus()):this.openCalendar(!0);else if("Enter"===t.key&&this.isOpen){if(!this.hasFooter||this.text!==this.fieldText()&&!this.parseText(this.text))this.commitText();else{const e=this.draftParts();e&&this.commitParts(e)}this.textError||this.closeCalendar(!1)}else"Escape"===t.key&&this.isOpen&&(t.preventDefault(),t.stopPropagation(),this.restoreValueAtOpen(),this.closeCalendar(!1))},this.onTriggerKeyDown=e=>{var t;if(this.isOpen)return"Escape"===e.key?(e.preventDefault(),e.stopPropagation(),this.restoreValueAtOpen(),void this.closeCalendar(!1)):void("Tab"!==e.key||e.shiftKey||"visible"!==(null===(t=this.dialogEl)||void 0===t?void 0:t.style.visibility)||(e.preventDefault(),this.focusActiveDay=!0,this.flushActiveDayFocus()))},this.onTriggerClick=()=>{this.isOpen?this.closeCalendar(!0):this.openCalendar(!0)},this.onDialogKeyDown=e=>{"Escape"===e.key?(e.preventDefault(),e.stopPropagation(),this.restoreValueAtOpen(),this.closeCalendar(!0)):"Tab"===e.key&&this.trapTab(e)},this.onGridKeyDown=e=>{const t=C(this.activeDate);if(!t)return;const i="rtl"===getComputedStyle(this.el).direction,s=E(t,this.weekStart);let r=null;switch(e.key){case"ArrowLeft":r=T(t,i?1:-1);break;case"ArrowRight":r=T(t,i?-1:1);break;case"ArrowUp":r=T(t,-7);break;case"ArrowDown":r=T(t,7);break;case"Home":r=T(t,-s);break;case"End":r=T(t,6-s);break;case"PageUp":r=L(t,e.shiftKey?-12:-1);break;case"PageDown":r=L(t,e.shiftKey?12:1);break;case"Enter":case" ":return e.preventDefault(),this.pickDate(t),void(this.hasFooter&&(this.focusActiveDay=!0));default:return}e.preventDefault();const n=H(r,this.minDate,this.maxDate);this.showDate(n),this.range&&(this.previewDate=$(n)),this.focusActiveDay=!0},this.onGridClick=e=>{const t=this.dayFromEvent(e);t&&this.pickDate(t)},this.onGridPointerOver=e=>{if(!this.range||!this.draftStart||this.draftEnd)return;const t=this.dayFromEvent(e),i=t&&$(t);i&&i!==this.previewDate&&(this.previewDate=i)}}async open(){this.openCalendar(!0)}async close(){this.closeCalendar(!1)}async setFocus(){var e;await(null===(e=this.inputEl)||void 0===e?void 0:e.setFocus())}valueChanged(){var e;this.committing||(this.valueAtOpen=null!==(e=this.value)&&void 0!==e?e:""),this.refreshFromValue()}contextChanged(){this.refreshFromValue()}placementChanged(){this.stopPositioning()}refreshFromValue(){var e;if(this.text=this.fieldText(),this.textError="",this.updateFormValue(),!this.isOpen)return;const t=this.parsedValue();this.loadDraft(t);const i=null!==(e=t&&t[t.length-1].date)&&void 0!==e?e:A();this.showDate(H(i,this.minDate,this.maxDate),!0)}requiredChanged(){this.updateFormValue()}componentWillLoad(){this.text=this.fieldText()}connectedCallback(){this.el.attachInternals&&!this.internals&&(this.internals=this.el.attachInternals())}componentDidLoad(){this.updateFormValue()}disconnectedCallback(){var e;this.closeCalendar(!1),null===(e=this.portal)||void 0===e||e.remove()}componentDidRender(){var e,t;this.isOpen&&this.dialogEl?(null!==(t=this.portal)&&void 0!==t||(this.portal=new N(this.el)),this.portal.mount(this.dialogEl,this.resolvedLocale),this.cleanupAutoUpdate||this.startPositioning(),this.flushActiveDayFocus()):null===(e=this.portal)||void 0===e||e.remove()}flushActiveDayFocus(){var e,t;this.focusActiveDay&&"visible"===(null===(e=this.dialogEl)||void 0===e?void 0:e.style.visibility)&&(this.focusActiveDay=!1,null===(t=this.dialogEl.querySelector(`[data-date="${this.activeDate}"]`))||void 0===t||t.focus())}get baseId(){return this.componentId||this.fallbackId}get resolvedLocale(){return function(e){var t;try{return null!==(t=Intl.DateTimeFormat.supportedLocalesOf(e)[0])&&void 0!==t?t:"en-US"}catch(e){return"en-US"}}(this.locale||_(this.el))}get weekStart(){const e=this.firstDayOfWeek;return"number"==typeof e&&Number.isInteger(e)&&e>=0&&e<=6?e:function(e){var t,i,s;const r=Intl.Locale;if(!r)return 0;try{const n=new r(e),a=null!==(i=null===(t=n.getWeekInfo)||void 0===t?void 0:t.call(n).firstDay)&&void 0!==i?i:null===(s=n.weekInfo)||void 0===s?void 0:s.firstDay;return"number"==typeof a?a%7:0}catch(e){return 0}}(this.resolvedLocale)}get minDate(){return C(this.min)}get maxDate(){return C(this.max)}get isInteractive(){return!this.disabled&&!this.readonly}get monthCount(){const e="undefined"!=typeof window&&window.innerWidth<640;return this.range&&!e?2:1}get appliesOnPick(){return this.range&&this.autoApply&&!this.timePicker}get hasFooter(){return(this.range||this.timePicker)&&!this.appliesOnPick}get resolvedPresets(){return this.range?function(e,t){const i="string"==typeof e?e.split(",").map((e=>e.trim())).filter(Boolean).map((e=>({key:e}))):Array.isArray(e)?e:[],s=[];for(const e of i){if(!e||"string"!=typeof e.key)continue;const i="string"==typeof e.start?C(e.start):null,r="string"==typeof e.end?C(e.end):null,n=i&&r&&i<=r?[i,r]:q(e.key,t),a="string"==typeof e.label?e.label:U[e.key];n&&a&&s.push({key:e.key,label:a,start:n[0],end:n[1]})}return s}(this.presets,A()):[]}parsedValue(e=this.value){if(this.range){const[t,i,s]=(null!=e?e:"").split("/"),r=K(t),n=K(i);return void 0===s&&r&&n&&oe(r,n)<=0?[r,n]:null}const t=K(e);return t?[t]:null}get resolvedFormat(){return J(this.format,this.timePicker,this.timePicker&&ue(this.resolvedLocale).hour12)}fieldText(){var e;const t=this.parsedValue();return t?t.map((e=>le(this.withTimePicker(e),this.resolvedFormat,this.resolvedLocale))).join(ce):null!==(e=this.value)&&void 0!==e?e:""}withTimePicker(e,t=me){var i;return{date:e.date,time:this.timePicker?null!==(i=e.time)&&void 0!==i?i:t:null}}get fieldPlaceholder(){if(this.placeholder)return this.placeholder;const e=this.resolvedFormat;return this.range?`${e}${ce}${e}`:e}loadDraft(e){var t,i;const[s,r]=null!=e?e:[];this.draftStart=s?$(s.date):"",this.draftEnd=this.range&&r?$(r.date):"",this.startTime=null!==(t=null==s?void 0:s.time)&&void 0!==t?t:me,this.endTime=null!==(i=null==r?void 0:r.time)&&void 0!==i?i:be,this.previewDate=""}openCalendar(e){var t,i;if(!this.isInteractive||this.isOpen)return;const s=this.parsedValue();this.loadDraft(s),this.valueAtOpen=null!==(t=this.value)&&void 0!==t?t:"";const r=null!==(i=s&&s[s.length-1].date)&&void 0!==i?i:A();this.showDate(H(r,this.minDate,this.maxDate),!0),this.focusActiveDay=e,this.isOpen=!0,document.addEventListener("pointerdown",this.onDocumentPointerDown,!0)}closeCalendar(e){var t;this.isOpen&&(this.commitPendingText(),this.timesBeforeTyping=void 0,this.isOpen=!1,this.stopPositioning(),document.removeEventListener("pointerdown",this.onDocumentPointerDown,!0),e&&(null===(t=this.triggerEl)||void 0===t||t.focus()))}showDate(e,t=!1){const i=ge(e),s=C(this.viewMonth),r=s&&L(s,this.monthCount-1);t||!s||i<s?this.viewMonth=$(t?L(i,1-this.monthCount):i):r&&i>r&&(this.viewMonth=$(L(i,1-this.monthCount))),this.activeDate=$(e)}pickDate(e){Y(e,this.minDate,this.maxDate)||(this.dropTypedText(),this.range?this.pickRangeDay(e):this.timePicker?(this.draftStart=$(e),this.activeDate=this.draftStart):(this.commitValue($(e)),this.closeCalendar(!0)))}pickRangeDay(e){const t=C(this.draftStart),i=$(e);!t||this.draftEnd?(this.draftStart=i,this.draftEnd=""):e<t?this.draftStart=i:this.draftEnd=i,this.previewDate="",this.activeDate=i,this.draftEnd&&this.appliesOnPick&&this.onApply()}commitValue(e,t={}){var i;const s=e!==(null!==(i=this.value)&&void 0!==i?i:"");this.timesBeforeTyping=void 0,this.committing=!0,this.value=e,this.committing=!1,this.text=this.fieldText(),this.textError="",this.updateFormValue(),s&&this.pdsDatepickerChange.emit(Object.assign({value:e},t))}commitParts(e){if(!this.range)return void this.commitValue(de(e[0]));const[t,i]=e,s=I(this.resolvedPresets,t.date,i.date);this.commitValue(`${de(t)}/${de(i)}`,Object.assign({start:de(t),end:de(i)},s?{preset:s.key}:{}))}draftParts(){var e;const t=C(this.draftStart);if(!t)return null;const i=this.withTimePicker({date:t,time:this.startTime});if(!this.range)return[i];const s=this.withTimePicker({date:null!==(e=C(this.draftEnd))&&void 0!==e?e:t,time:this.endTime});return[i,oe(s,i)<0?Object.assign(Object.assign({},s),{time:i.time}):s]}restoreValueAtOpen(){var e;if(this.valueAtOpen===(null!==(e=this.value)&&void 0!==e?e:""))return void this.dropTypedText();const t=this.parsedValue(this.valueAtOpen);t?this.commitParts(t):this.commitValue(this.valueAtOpen)}isInside(e){var t,i;return!!e&&(e===this.el||this.el.contains(e)||!!(null===(t=this.el.shadowRoot)||void 0===t?void 0:t.contains(e))||!!(null===(i=this.portal)||void 0===i?void 0:i.contains(e)))}focusEntered(e){this.hasFocus||(this.hasFocus=!0,this.pdsFocus.emit(e))}checkFocusLeft(e,t){window.setTimeout((()=>{var i;this.el.matches(":focus-within")||(null===(i=this.portal)||void 0===i?void 0:i.host.matches(":focus-within"))||(t&&this.closeCalendar(!1),this.hasFocus&&(this.hasFocus=!1,this.pdsBlur.emit(e)))}))}startPositioning(){const e=this.fieldReference(),t=this.dialogEl;e&&t&&(this.cleanupAutoUpdate=a(e,t,(()=>{o(e,t,{placement:this.placement,strategy:"fixed",middleware:[d(4),l({padding:8}),c({padding:8,apply({availableWidth:e,availableHeight:t,elements:i}){const s=window.innerHeight-16;Object.assign(i.floating.style,{maxHeight:Math.max(0,Math.max(t,Math.min(s,480)))+"px",maxWidth:Math.max(0,e)+"px"})}}),h({padding:8,crossAxis:!0}),p()]}).then((({x:e,y:i,middlewareData:s})=>{var r;const n=!!(null===(r=s.hide)||void 0===r?void 0:r.referenceHidden);Object.assign(t.style,{left:e+"px",top:i+"px",visibility:n?"hidden":"visible"}),this.flushActiveDayFocus()}))})))}stopPositioning(){var e;null===(e=this.cleanupAutoUpdate)||void 0===e||e.call(this),this.cleanupAutoUpdate=void 0}fieldReference(){var e,t,i;return null!==(i=null===(t=null===(e=this.inputEl)||void 0===e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".pds-input__field-wrapper"))&&void 0!==i?i:this.inputEl}commitPendingText(){if(this.text===this.fieldText())return;const e=this.parseText(this.text)?this.draftParts():null;e?this.commitParts(e):this.commitText()}readText(e){const t=this.resolvedFormat,i=this.resolvedLocale,s=this.range?ae(e,t,i):[ne(e,t,i)];return!s||s.some((e=>!e))?null:s.map(((e,t)=>this.withTimePicker(e,1===t?be:me)))}parseText(e){const t=this.readText(e);return t&&!this.rangeError(t)?t:null}rangeError(e){return this.minDate&&e.some((e=>e.date<this.minDate))?"min":this.maxDate&&e.some((e=>e.date>this.maxDate))?"max":""}valueError(){if(!this.value)return"";const e=this.parsedValue();return e?this.rangeError(e):"format"}commitText(){const e=this.text.trim();if(""===e)return void this.commitValue("");const t=this.readText(e),i=t?this.rangeError(t):"format";t&&!i?this.commitParts(t):(this.textError=i,this.updateFormValue())}canShowMonth(e){var t;const i=null!==(t=C(this.viewMonth))&&void 0!==t?t:A();return e<0?!this.minDate||T(i,-1)>=this.minDate:!this.maxDate||L(i,this.monthCount)<=this.maxDate}showMonth(e,t){var i,s;const r=null!==(i=C(this.viewMonth))&&void 0!==i?i:A(),n=null!==(s=C(this.activeDate))&&void 0!==s?s:A();this.viewMonth=$(L(r,t)),this.activeDate=$(H(L(n,t),this.minDate,this.maxDate)),this.canShowMonth(t)?e.currentTarget.focus():this.focusActiveDay=!0}jumpTo(e,t,i){var s;const r=H(new Date(Date.UTC(t,i,1)),this.minDate,this.maxDate);this.viewMonth=$(L(ge(r),-e));const n=null!==(s=C(this.activeDate))&&void 0!==s?s:r,a=Math.min(n.getUTCDate(),new Date(Date.UTC(t,i+1,0)).getUTCDate());this.activeDate=$(H(new Date(Date.UTC(t,i,a)),this.minDate,this.maxDate))}dropTypedText(){this.timesBeforeTyping&&([this.startTime,this.endTime]=this.timesBeforeTyping),this.timesBeforeTyping=void 0,(this.text!==this.fieldText()||this.textError)&&(this.text=this.fieldText(),this.inputEl&&(this.inputEl.value=this.text),this.textError="",this.updateFormValue())}trapTab(e){var t,i,s,r;const n=Array.from(null!==(i=null===(t=this.dialogEl)||void 0===t?void 0:t.querySelectorAll('button:not([disabled]):not([tabindex="-1"]), select:not([disabled]), [data-date][tabindex="0"]'))&&void 0!==i?i:[]);if(0===n.length)return;const a=null===(r=null===(s=this.dialogEl)||void 0===s?void 0:s.getRootNode())||void 0===r?void 0:r.activeElement,o=n[0],d=n[n.length-1];e.shiftKey&&a===o?(e.preventDefault(),d.focus()):e.shiftKey||a!==d||(e.preventDefault(),o.focus())}dayFromEvent(e){var t,i;const s=null===(i=null===(t=e.target)||void 0===t?void 0:t.closest)||void 0===i?void 0:i.call(t,"[data-date]");return C(null==s?void 0:s.dataset.date)}updateFormValue(){var e,t,i,s;if(k()||!(null===(e=this.internals)||void 0===e?void 0:e.setFormValue))return;if(this.internals.setFormValue(this.value||null),!this.internals.setValidity)return;const r=null!==(s=null===(i=null===(t=this.inputEl)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("input"))&&void 0!==s?s:void 0,n=this.textError||this.valueError();"format"===n?this.internals.setValidity({badInput:!0},this.invalidDateMessage,r):"min"===n?this.internals.setValidity({rangeUnderflow:!0},this.boundMessage(this.minDateMessage,this.minDate),r):"max"===n?this.internals.setValidity({rangeOverflow:!0},this.boundMessage(this.maxDateMessage,this.maxDate),r):this.required&&!this.value?this.internals.setValidity({valueMissing:!0},(null==r?void 0:r.validationMessage)||this.invalidDateMessage,r):this.internals.setValidity({})}boundMessage(e,t){const i=t?le({date:t,time:null},this.format||void 0,this.resolvedLocale):"";return y(e,{date:i})}formResetCallback(){this.value="",this.text="",this.textError="",this.closeCalendar(!1),this.updateFormValue()}interactivityChanged(){this.isInteractive||this.closeCalendar(!1)}formDisabledCallback(e){this.disabled=e,e&&this.closeCalendar(!1)}formStateRestoreCallback(e){"string"==typeof e&&(this.value=e)}triggerAccessibleName(e){const t=this.parsedValue();if(!t)return this.triggerLabel;const i=t.map((t=>S(t.date,e,ve)));return`${this.triggerLabel}, ${i.join(ce)}`}highlightedRange(){const e=C(this.draftStart),t=C(this.draftEnd);if(!e||t)return[e,t];const i=C(this.previewDate);return[e,i&&i>e?i:null]}selectedDay(){return this.range?null:C(this.draftStart)}renderMonthHeading(e,t,i,r){const n=S(e,i,{month:"long",year:"numeric"}),a=0===t?"polite":null;if(!this.showDropdowns)return s("div",{class:"pds-datepicker__heading",id:r,"aria-live":a},n);const o=e.getUTCFullYear(),d=e.getUTCMonth(),l=this.minDate,c=this.maxDate,h=A().getUTCFullYear(),p=l?l.getUTCFullYear():h-100,v=c?c.getUTCFullYear():h+100,m=z(i,{month:"long"}),b=z(i,{year:"numeric"});return s("div",{class:"pds-datepicker__dropdowns"},s("span",{class:"visually-hidden",id:r,"aria-live":a},n),s("span",{class:"pds-datepicker__select-wrap"},s("select",{class:"pds-datepicker__heading-select","aria-label":this.monthLabel,onChange:e=>this.jumpTo(t,o,Number(e.target.value))},Array.from({length:12},((e,t)=>{const i=!!l&&new Date(Date.UTC(o,t+1,0))<l||!!c&&new Date(Date.UTC(o,t,1))>c;return s("option",{value:t+"",selected:t===d,disabled:i},m.format(new Date(Date.UTC(o,t,1))))}))),s("pds-icon",{class:"pds-datepicker__select-caret",icon:u,size:"small","aria-hidden":"true"})),s("span",{class:"pds-datepicker__select-wrap"},s("select",{class:"pds-datepicker__heading-select","aria-label":this.yearLabel,onChange:e=>this.jumpTo(t,Number(e.target.value),d)},Array.from({length:Math.max(v,o)-Math.min(p,o)+1},((e,t)=>{const i=Math.min(p,o)+t;return s("option",{value:i+"",selected:i===o},b.format(new Date(Date.UTC(i,0,1))))}))),s("pds-icon",{class:"pds-datepicker__select-caret",icon:u,size:"small","aria-hidden":"true"})))}renderMonth(e,t,i){const r=e.getUTCFullYear(),n=e.getUTCMonth(),a=this.minDate,o=this.maxDate,d=this.selectedDay(),[l,c]=this.range?this.highlightedRange():[null,null],h=A(),p=z(i,ve),u=z(i,{day:"numeric"}),b=`${this.baseId}-calendar-heading-${t}`,f=t===this.monthCount-1;return s("div",{class:"pds-datepicker__month"},s("div",{class:"pds-datepicker__header"},0===t?s("button",{type:"button",class:"pds-datepicker__nav pds-datepicker__nav--previous","aria-label":this.previousMonthLabel,disabled:!this.canShowMonth(-1),onClick:e=>this.showMonth(e,-1)},s("pds-icon",{icon:v,"aria-hidden":"true"})):s("span",{class:"pds-datepicker__nav-spacer"}),this.renderMonthHeading(e,t,i,b),f?s("button",{type:"button",class:"pds-datepicker__nav pds-datepicker__nav--next","aria-label":this.nextMonthLabel,disabled:!this.canShowMonth(1),onClick:e=>this.showMonth(e,1)},s("pds-icon",{icon:m,"aria-hidden":"true"})):s("span",{class:"pds-datepicker__nav-spacer"})),s("table",{class:"pds-datepicker__grid",role:"grid","aria-labelledby":b,"aria-multiselectable":this.range?"true":null,onKeyDown:this.onGridKeyDown,onClick:this.onGridClick,onPointerOver:this.onGridPointerOver},s("thead",null,s("tr",null,function(e,t){const i=z(e,{weekday:"short"}),s=z(e,{weekday:"long"}),r=Array.from({length:7},((e,i)=>new Date(Date.UTC(2023,0,1+(t+i)%7)))),n=r.map((e=>i.format(e).replace(/\.$/,""))),a=n.every((e=>/^[A-Za-z\u00C0-\u024F]+$/.test(e))),o=n.map((e=>e.slice(0,2))),d=a&&7===new Set(o.map((e=>e.toLowerCase()))).size;return r.map(((e,t)=>({short:d?o[t]:i.format(e),long:s.format(e)})))}(i,this.weekStart).map((e=>s("th",{scope:"col",class:"pds-datepicker__weekday"},s("span",{"aria-hidden":"true"},e.short),s("span",{class:"visually-hidden"},e.long)))))),s("tbody",null,function(e,t,i){const s=new Date(Date.UTC(e,t,1)),r=Array(E(s,i)).fill(null);for(let i=1;i<=j(e,t);i++)r.push(new Date(Date.UTC(e,t,i)));for(;r.length%7!=0;)r.push(null);const n=[];for(let e=0;e<r.length;e+=7)n.push(r.slice(e,e+7));return n}(r,n,this.weekStart).map((e=>s("tr",null,e.map(((e,t)=>{if(!e)return s("td",{class:"pds-datepicker__day pds-datepicker__day--empty"});const i=$(e),r=Y(e,a,o),n=P(e,l)||P(e,c),v=!!l&&!!c&&!P(l,c),m=!!l&&!!c&&e>=l&&e<=c,b=P(e,d)||n||m,f=P(e,h);return s("td",{class:{"pds-datepicker__day":!0,"pds-datepicker__day--selected":P(e,d)||n,"pds-datepicker__day--in-range":m&&!n,"pds-datepicker__day--range-start":v&&P(e,l),"pds-datepicker__day--range-end":v&&P(e,c),"pds-datepicker__day--row-start":m&&0===t,"pds-datepicker__day--row-end":m&&6===t,"pds-datepicker__day--today":f,"pds-datepicker__day--disabled":r},"data-date":i,tabindex:i===this.activeDate?"0":"-1","aria-label":p.format(e),"aria-selected":b?"true":null,"aria-current":f?"date":null,"aria-disabled":r?"true":null},((e,t)=>{var i,s;return null!==(s=null===(i=e.formatToParts(t).find((e=>"day"===e.type)))||void 0===i?void 0:i.value)&&void 0!==s?s:e.format(t)})(u,e))}))))))),this.timePicker&&this.timesUnderMonth(t).map((e=>this.renderTime(e,i))))}timesUnderMonth(e){return this.range?1===this.monthCount?["start","end"]:[0===e?"start":"end"]:["start"]}renderTime(e,t){var i,r,n;const a="start"===e?this.startTime:null!==(n=null===(r=null===(i=this.draftParts())||void 0===i?void 0:i[1])||void 0===r?void 0:r.time)&&void 0!==n?n:this.endTime,[o,d]=he(a),l=ue(t),c=Math.max(1,Math.min(60,Math.floor(this.minuteIncrement)||1)),h=(t,i)=>{const s=pe(t,i);"start"===e?this.startTime=s:this.endTime=s,this.timesBeforeTyping&&(this.timesBeforeTyping["start"===e?0:1]=s)},p=this.range?"start"===e?this.startTimeLabel:this.endTimeLabel:this.timeLabel,u=o>=12,v=l.hour12?Array.from({length:12},((e,t)=>t+1)):Array.from({length:24},((e,t)=>t)),m=l.hour12?o%12||12:o,b=Array.from({length:Math.ceil(60/c)},((e,t)=>t*c));b.includes(d)||b.push(d),b.sort(((e,t)=>e-t));const f=`${this.baseId}-time-${e}`;return s("div",{class:"pds-datepicker__time",role:"group","aria-labelledby":f},s("span",{class:"pds-datepicker__time-label",id:f},p),s("span",{class:"pds-datepicker__time-field"},s("select",{class:"pds-datepicker__time-select","aria-label":this.hourLabel,onChange:e=>{const t=Number(e.target.value);h(l.hour12?t%12+(u?12:0):t,d)}},v.map((e=>s("option",{value:e+"",selected:e===m},l.hour12?e+"":(e+"").padStart(2,"0"))))),s("span",{class:"pds-datepicker__time-separator","aria-hidden":"true"},":"),s("select",{class:"pds-datepicker__time-select","aria-label":this.minuteLabel,onChange:e=>h(o,Number(e.target.value))},b.map((e=>s("option",{value:e+"",selected:e===d},(e+"").padStart(2,"0"))))),l.hour12&&s("select",{class:"pds-datepicker__time-select pds-datepicker__time-select--period","aria-label":this.periodLabel,onChange:e=>{h(o%12+("pm"===e.target.value?12:0),d)}},s("option",{value:"am",selected:!u},l.am),s("option",{value:"pm",selected:u},l.pm))))}renderPresets(){var e;const t=this.resolvedPresets;if(0===t.length)return null;const i=I(t,C(this.draftStart),C(this.draftEnd)),r=!i&&!!this.draftStart,n=e=>R(e,this.minDate,this.maxDate),a=i&&n(i)?i:r?"custom":null!==(e=t.find(n))&&void 0!==e?e:"custom";return s("div",{class:"pds-datepicker__presets-column"},s("ul",{class:"pds-datepicker__presets",part:"presets",role:"radiogroup","aria-label":this.presetsLabel,onKeyDown:this.onPresetsKeyDown},t.map((e=>{const t=e===i;return s("li",{role:"none"},s("button",{type:"button",role:"radio",class:{"pds-datepicker__preset":!0,"pds-datepicker__preset--selected":t},"aria-checked":t?"true":"false",tabindex:e===a?"0":"-1",disabled:!R(e,this.minDate,this.maxDate),onClick:t=>this.onPresetClick(t,e)},s("span",null,e.label),t&&s("pds-icon",{icon:b,"aria-hidden":"true"})))})),s("li",{role:"none"},s("button",{type:"button",role:"radio",class:{"pds-datepicker__preset":!0,"pds-datepicker__preset--selected":r},"aria-checked":r?"true":"false",tabindex:"custom"===a?"0":"-1",onClick:this.onCustomRangeClick},s("span",null,this.customRangeLabel),r&&s("pds-icon",{icon:b,"aria-hidden":"true"})))))}selectionText(){const e=this.draftParts();if(!e)return"";const t=this.resolvedFormat,i=this.resolvedLocale;return this.range&&!this.draftEnd?`${le(e[0],t,i)}${ce}`:e.map((e=>le(e,t,i))).join(ce)}renderFooter(){const e=this.draftParts(),t=this.selectionText();return s("div",{class:"pds-datepicker__footer"},s("span",{class:"pds-datepicker__selection","aria-live":"polite"},t),s("button",{type:"button",class:"pds-datepicker__action",onClick:this.onCancel},this.clearable?this.clearLabel:this.cancelLabel),s("button",{type:"button",class:"pds-datepicker__action pds-datepicker__action--primary",disabled:!e,onClick:this.onApply},this.applyLabel))}renderCalendar(e){var t;const i=null!==(t=C(this.viewMonth))&&void 0!==t?t:A(),r=Array.from({length:this.monthCount},((e,t)=>L(i,t)));return s("div",{class:{"pds-datepicker__dialog":!0,"pds-datepicker__dialog--range":this.range},id:this.baseId+"-calendar",role:"dialog",tabindex:"-1","aria-labelledby":this.range?null:this.baseId+"-calendar-heading-0","aria-label":this.range?this.label||this.triggerLabel:null,part:"calendar",ref:e=>this.dialogEl=e,onKeyDown:this.onDialogKeyDown,onFocusin:this.onCalendarFocusIn,onFocusout:this.onCalendarFocusOut},this.range&&this.renderPresets(),s("div",{class:"pds-datepicker__panel"},s("div",{class:"pds-datepicker__months"},r.map(((t,i)=>this.renderMonth(t,i,e)))),this.hasFooter&&this.renderFooter(),this.appliesOnPick&&s("span",{class:"visually-hidden","aria-live":"polite"},this.selectionText())))}render(){const e=this.resolvedLocale;return s(r,{key:"82ffd88b7741a90edc28b66a7384178eb2a9a86c",class:{"pds-datepicker--range":this.range,"pds-datepicker--time":this.timePicker},"full-width":this.fullWidth?"true":null,onFocusin:this.onHostFocusIn,onFocusout:this.onHostFocusOut},s("pds-input",{key:"f2b9aad64d1fe8d94327cc3d4f87cd6904eb3076",ref:e=>this.inputEl=e,componentId:this.baseId,label:this.label,hideLabel:this.hideLabel,helperMessage:this.helperMessage,errorMessage:this.errorMessage,invalid:this.invalid||!!this.textError||!!this.valueError(),disabled:this.disabled,readonly:this.readonly,required:this.required,placeholder:this.fieldPlaceholder,fullWidth:this.fullWidth,autocomplete:"off",value:this.text,onClick:this.onFieldClick,onPdsInput:this.onTextInput,onPdsChange:this.onTextChange,onPdsKeyDown:this.onTextKeyDown,onPdsFocus:this.stopInnerEvent,onPdsBlur:this.stopInnerEvent},this.clearable&&!!this.value&&this.isInteractive&&s("button",{key:"clear",slot:"suffix",type:"button",class:"pds-datepicker__clear",ref:e=>this.clearEl=e,"aria-label":this.label?`${this.clearLabel} ${this.label}`:this.clearLabel,tabindex:"-1",onMouseDown:this.onClearMouseDown,onClick:this.onClearClick},s("pds-icon",{key:"f2c784e9d6577d4900b7641ee58aa43f5922fc75",icon:f,"aria-hidden":"true"})),s("button",{key:"trigger",slot:"suffix",type:"button",class:"pds-datepicker__trigger",ref:e=>this.triggerEl=e,"aria-label":this.triggerAccessibleName(e),"aria-haspopup":"dialog","aria-expanded":this.isOpen?"true":"false",disabled:!this.isInteractive,onClick:this.onTriggerClick,onKeyDown:this.onTriggerKeyDown},s("pds-icon",{key:"98b2e773240c8ea2bbd5a1acfa3c9ba74cb7917b",icon:g,"aria-hidden":"true"}))),this.isOpen&&this.renderCalendar(e))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{value:[{valueChanged:0}],format:[{contextChanged:0}],locale:[{contextChanged:0}],timePicker:[{contextChanged:0}],range:[{contextChanged:0}],min:[{contextChanged:0}],max:[{contextChanged:0}],placement:[{placementChanged:0}],required:[{requiredChanged:0}],disabled:[{interactivityChanged:0}],readonly:[{interactivityChanged:0}]}}static get style(){return':host{--pds-datepicker-day-size:var(--pine-dimension-500);--pds-datepicker-presets-width:200px;display:inline-block}:host([full-width]){display:block}pds-input{display:block}:host(.pds-datepicker--time) pds-input{min-width:220px}:host(.pds-datepicker--range) pds-input{min-width:260px}:host(.pds-datepicker--range.pds-datepicker--time) pds-input{min-width:min(380px, 100%)}.pds-datepicker__trigger,.pds-datepicker__clear{-ms-flex-align:center;align-items:center;background:transparent;border:0;border-radius:var(--pine-border-radius-sm);color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-2xs)}.pds-datepicker__trigger:hover:not(:disabled),.pds-datepicker__clear:hover:not(:disabled){background:var(--pine-color-background-muted);color:var(--pine-color-text-strong)}.pds-datepicker__trigger:focus-visible,.pds-datepicker__clear:focus-visible{outline:var(--pine-outline-focus)}.pds-datepicker__trigger:disabled,.pds-datepicker__clear:disabled{color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-datepicker__clear{-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs)}.pds-datepicker__nav{-ms-flex-align:center;align-items:center;background:var(--pine-color-secondary);border:var(--pine-border);border-radius:var(--pine-border-radius-full);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;height:var(--pine-dimension-400);-ms-flex-pack:center;justify-content:center;padding:0;width:var(--pine-dimension-400)}.pds-datepicker__nav:hover:not(:disabled){background:var(--pine-color-secondary-hover);border-color:var(--pine-color-border-hover)}.pds-datepicker__nav:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-datepicker__nav:disabled{border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-secondary-disabled);cursor:not-allowed}.pds-datepicker__nav:dir(rtl) pds-icon{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.pds-datepicker__dialog:focus{outline:none}.pds-datepicker__dialog{background:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-150);-webkit-box-shadow:var(--pine-box-shadow-200);box-shadow:var(--pine-box-shadow-200);-webkit-box-sizing:border-box;box-sizing:border-box;left:0;max-height:calc(100vh - var(--pine-dimension-sm));max-height:calc(100dvh - var(--pine-dimension-sm));max-width:calc(100vw - var(--pine-dimension-sm));overflow:auto;-ms-scroll-chaining:none;overscroll-behavior:contain;padding:var(--pine-dimension-sm);pointer-events:auto;position:fixed;top:0;visibility:hidden;z-index:var(--pine-z-index-priority)}:host-context([data-theme=dark]) .pds-datepicker__dialog{border:var(--pine-border)}.pds-datepicker__header{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-webkit-margin-after:var(--pine-dimension-sm);margin-block-end:var(--pine-dimension-sm)}.pds-datepicker__nav-spacer{-ms-flex:none;flex:none;width:var(--pine-dimension-400)}.pds-datepicker__heading{color:var(--pine-color-text);font:var(--pine-typography-heading-5);font-weight:var(--pine-font-weight-semi-bold)}.pds-datepicker__grid{border-collapse:collapse;border-spacing:0}.pds-datepicker__weekday{color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm);height:var(--pds-datepicker-day-size);padding:0;text-align:center;width:var(--pds-datepicker-day-size)}.pds-datepicker__day{border-radius:var(--pine-border-radius-full);color:var(--pine-color-text-secondary);cursor:pointer;font:var(--pine-typography-body);height:var(--pds-datepicker-day-size);padding:0;position:relative;text-align:center;-webkit-transition:background var(--pine-motion-duration-fast) var(--pine-motion-easing-in);transition:background var(--pine-motion-duration-fast) var(--pine-motion-easing-in);width:var(--pds-datepicker-day-size)}.pds-datepicker__day:hover{background:var(--pine-color-background-muted)}.pds-datepicker__day:focus-visible{outline:var(--pine-outline-focus);outline-offset:calc(var(--pine-border-width-thick) * -1)}.pds-datepicker__day--empty{cursor:default;pointer-events:none}.pds-datepicker__day--today::after{background:var(--pine-color-primary);border-radius:var(--pine-border-radius-full);content:"";height:var(--pine-dimension-050);inset-block-end:var(--pine-dimension-050);inset-inline-start:50%;position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pine-dimension-050)}.pds-datepicker__day--selected,.pds-datepicker__day--selected:hover{background:var(--pine-color-primary);color:var(--pine-color-text-primary)}.pds-datepicker__day--selected:focus-visible{outline-offset:var(--pine-border-width)}.pds-datepicker__day--range-start{border-end-end-radius:0;border-start-end-radius:0}.pds-datepicker__day--range-end{border-end-start-radius:0;border-start-start-radius:0}.pds-datepicker__day--range-start.pds-datepicker__day--row-end{border-end-end-radius:var(--pine-border-radius-full);border-start-end-radius:var(--pine-border-radius-full)}.pds-datepicker__day--range-end.pds-datepicker__day--row-start{border-end-start-radius:var(--pine-border-radius-full);border-start-start-radius:var(--pine-border-radius-full)}.pds-datepicker__day--selected.pds-datepicker__day--today::after{background:var(--pine-color-text-primary)}.pds-datepicker__day--in-range{border-radius:0}.pds-datepicker__day--in-range,.pds-datepicker__day--in-range:hover{background:var(--pine-color-background-muted);color:var(--pine-color-text-secondary)}.pds-datepicker__day--row-start{border-end-start-radius:var(--pine-border-radius-full);border-start-start-radius:var(--pine-border-radius-full)}.pds-datepicker__day--row-end{border-end-end-radius:var(--pine-border-radius-full);border-start-end-radius:var(--pine-border-radius-full)}.pds-datepicker__day--disabled,.pds-datepicker__day--disabled:hover{background:transparent;color:var(--pine-color-text-disabled);cursor:not-allowed;text-decoration:line-through}.pds-datepicker__day--in-range:hover{background:var(--pine-color-background-inset)}.pds-datepicker__dialog--range{display:-ms-flexbox;display:flex;padding:0}.pds-datepicker__panel{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0}.pds-datepicker__dialog--range .pds-datepicker__panel{padding:var(--pine-dimension-sm)}.pds-datepicker__months{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-lg)}.pds-datepicker__presets-column{-webkit-border-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-inline-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-ms-flex:none;flex:none;position:relative;width:var(--pds-datepicker-presets-width)}.pds-datepicker__presets{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pine-dimension-2xs);inset:0;list-style:none;margin:0;overflow-y:auto;padding:var(--pine-dimension-150);position:absolute}.pds-datepicker__preset{-ms-flex-align:center;align-items:center;background:transparent;border:0;border-radius:var(--pine-border-radius-md);color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body);gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;padding:var(--pine-dimension-xs) var(--pine-dimension-sm);text-align:start;-webkit-transition:background var(--pine-motion-duration-fast) var(--pine-motion-easing-in);transition:background var(--pine-motion-duration-fast) var(--pine-motion-easing-in);width:100%}.pds-datepicker__preset:hover:not(:disabled){background:var(--pine-color-background-muted)}.pds-datepicker__preset:focus-visible{outline:var(--pine-outline-focus)}.pds-datepicker__preset:disabled{color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-datepicker__preset--selected{background:var(--pine-color-background-muted);color:var(--pine-color-text-active)}.pds-datepicker__footer{-ms-flex-align:center;align-items:center;background:var(--pine-color-background-overlay);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-xs);inset-block-end:calc(var(--pine-dimension-sm) * -1);-ms-flex-pack:end;justify-content:flex-end;margin-block:var(--pine-dimension-sm) calc(var(--pine-dimension-sm) * -1);padding-block:var(--pine-dimension-sm);position:-webkit-sticky;position:sticky}.pds-datepicker__selection{color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);-webkit-margin-end:auto;margin-inline-end:auto}.pds-datepicker__dropdowns{display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-datepicker__select-wrap{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;position:relative}.pds-datepicker__heading-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-border-radius-md);color:var(--pine-color-text);cursor:pointer;field-sizing:content;font:var(--pine-typography-heading-5);font-weight:var(--pine-font-weight-semi-bold);padding-block:var(--pine-dimension-2xs);padding-inline:var(--pine-dimension-xs) calc(var(--pine-dimension-xs) + var(--pine-dimension-sm))}.pds-datepicker__heading-select:hover{background:var(--pine-color-background-muted)}.pds-datepicker__heading-select:focus-visible{outline:var(--pine-outline-focus)}.pds-datepicker__select-caret{color:var(--pine-color-text-secondary);inset-inline-end:var(--pine-dimension-xs);pointer-events:none;position:absolute}.pds-datepicker__time{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;-webkit-margin-before:var(--pine-dimension-sm);margin-block-start:var(--pine-dimension-sm);padding-inline:var(--pine-dimension-xs)}.pds-datepicker__time-label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium)}.pds-datepicker__time-field{-ms-flex-align:center;align-items:center;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-border-radius-md);display:-ms-inline-flexbox;display:inline-flex;min-height:var(--pine-dimension-400);padding-inline:var(--pine-dimension-2xs)}.pds-datepicker__time-field:hover{border-color:var(--pine-color-border-hover)}.pds-datepicker__time-field:focus-within{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-datepicker__time-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-border-radius-sm);color:var(--pine-color-text-strong);cursor:pointer;font:var(--pine-typography-body);font-variant-numeric:tabular-nums;padding:var(--pine-dimension-2xs);text-align:center}.pds-datepicker__time-select:focus-visible{background:var(--pine-color-background-muted);outline:none}.pds-datepicker__time-select--period{-webkit-margin-start:var(--pine-dimension-2xs);margin-inline-start:var(--pine-dimension-2xs)}.pds-datepicker__time-separator{color:var(--pine-color-text-secondary)}:host-context([data-theme=dark]) select{color-scheme:dark}.pds-datepicker__action{background:var(--pine-color-secondary);border:var(--pine-border);border-radius:var(--pine-border-radius-full);color:var(--pine-color-text-secondary);cursor:pointer;font:var(--pine-typography-body-medium);padding:calc(var(--pine-dimension-xs) - var(--pine-border-width)) var(--pine-dimension-sm)}.pds-datepicker__action:hover:not(:disabled){background:var(--pine-color-secondary-hover);border-color:var(--pine-color-border-hover)}.pds-datepicker__action:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-datepicker__action:disabled{background:var(--pine-color-secondary-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-secondary-disabled);cursor:not-allowed}.pds-datepicker__action--primary{background:var(--pine-color-primary);border-color:var(--pine-color-primary);color:var(--pine-color-text-primary)}.pds-datepicker__action--primary:hover:not(:disabled){background:var(--pine-color-primary-hover);border-color:var(--pine-color-primary-hover)}.pds-datepicker__action--primary:disabled{background:var(--pine-color-primary-disabled);border-color:var(--pine-color-primary-disabled);color:var(--pine-color-text-primary-disabled)}@media (max-width: 600px){.pds-datepicker__dialog--range{-ms-flex-direction:column;flex-direction:column}.pds-datepicker__presets-column{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-webkit-border-end:0;border-inline-end:0;width:auto}.pds-datepicker__presets{-ms-flex-direction:row;flex-direction:row;overflow-x:auto;position:static}.pds-datepicker__preset{white-space:nowrap}.pds-datepicker__selection{-ms-flex-preferred-size:100%;flex-basis:100%}}.pds-datepicker__trigger,.pds-datepicker__clear,.pds-datepicker__nav,.pds-datepicker__weekday,.pds-datepicker__day,.pds-datepicker__preset,.pds-datepicker__action{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (forced-colors: active){.pds-datepicker__day--selected,.pds-datepicker__day--selected:hover{background:Highlight;color:HighlightText;forced-color-adjust:none}.pds-datepicker__day--in-range,.pds-datepicker__day--in-range:hover{border-block:var(--pine-border-width-thin) solid Highlight}.pds-datepicker__day--today::after{background:CanvasText;forced-color-adjust:none}.pds-datepicker__day--selected.pds-datepicker__day--today::after{background:HighlightText}.pds-datepicker__day--disabled{color:GrayText}}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}'}},[65,"pds-datepicker",{applyLabel:[1,"apply-label"],autoApply:[4,"auto-apply"],cancelLabel:[1,"cancel-label"],clearable:[4],clearLabel:[1,"clear-label"],componentId:[1,"component-id"],customRangeLabel:[1,"custom-range-label"],disabled:[4],endTimeLabel:[1,"end-time-label"],errorMessage:[1,"error-message"],firstDayOfWeek:[2,"first-day-of-week"],format:[1],fullWidth:[4,"full-width"],helperMessage:[1,"helper-message"],hideLabel:[4,"hide-label"],hourLabel:[1,"hour-label"],invalid:[4],invalidDateMessage:[1,"invalid-date-message"],maxDateMessage:[1,"max-date-message"],minDateMessage:[1,"min-date-message"],label:[1],locale:[1],max:[1],min:[1],minuteIncrement:[2,"minute-increment"],minuteLabel:[1,"minute-label"],monthLabel:[1,"month-label"],name:[1],nextMonthLabel:[1,"next-month-label"],periodLabel:[1,"period-label"],placeholder:[1],placement:[1],presets:[1],presetsLabel:[1,"presets-label"],previousMonthLabel:[1,"previous-month-label"],range:[4],readonly:[4],required:[4],showDropdowns:[4,"show-dropdowns"],startTimeLabel:[1,"start-time-label"],timePicker:[4,"time-picker"],timeLabel:[1,"time-label"],triggerLabel:[1,"trigger-label"],value:[1025],yearLabel:[1,"year-label"],isOpen:[32],text:[32],textError:[32],activeDate:[32],viewMonth:[32],draftStart:[32],draftEnd:[32],startTime:[32],endTime:[32],previewDate:[32],open:[64],close:[64],setFocus:[64]},void 0,{value:[{valueChanged:0}],format:[{contextChanged:0}],locale:[{contextChanged:0}],timePicker:[{contextChanged:0}],range:[{contextChanged:0}],min:[{contextChanged:0}],max:[{contextChanged:0}],placement:[{placementChanged:0}],required:[{requiredChanged:0}],disabled:[{interactivityChanged:0}],readonly:[{interactivityChanged:0}]}]),_e=ke,ye=function(){"undefined"!=typeof customElements&&["pds-datepicker","pds-icon","pds-input"].forEach((e=>{switch(e){case"pds-datepicker":customElements.get(n(e))||customElements.define(n(e),ke);break;case"pds-icon":customElements.get(n(e))||w();break;case"pds-input":customElements.get(n(e))||D()}}))};export{_e as PdsDatepicker,ye as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as i,HTMLElement as d,h as e,Host as s,transformTag as n}from"@stencil/core/internal/client";const r=i(class extends d{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.vertical=!1}get hasLabel(){var i;return!!(null===(i=this.label)||void 0===i?void 0:i.trim())&&!this.vertical}classNames(){const i=["pds-divider"];return this.vertical&&i.push("pds-divider--vertical"),this.hasLabel&&i.push("pds-divider--labeled"),this.offset&&i.push("pds-divider--offset-"+this.offset),i.join(" ")}render(){return e(s,{key:"
|
|
1
|
+
import{proxyCustomElement as i,HTMLElement as d,h as e,Host as s,transformTag as n}from"@stencil/core/internal/client";const r=i(class extends d{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.vertical=!1}get hasLabel(){var i;return!!(null===(i=this.label)||void 0===i?void 0:i.trim())&&!this.vertical}classNames(){const i=["pds-divider"];return this.vertical&&i.push("pds-divider--vertical"),this.hasLabel&&i.push("pds-divider--labeled"),this.offset&&i.push("pds-divider--offset-"+this.offset),i.join(" ")}render(){return e(s,{key:"ef2a5ee85e8f37036be5b8df490683636ffb66f0",id:this.componentId},this.hasLabel?e("div",{class:this.classNames(),role:"separator","aria-label":this.label},e("span",{class:"pds-divider__label",part:"label","aria-hidden":"true"},this.label)):e("hr",{class:this.classNames()}))}static get style(){return'.pds-divider{background:var(--pine-color-border);border:0;display:-ms-flexbox;display:flex;height:var(--pine-border-width);margin:0;width:100%}.pds-divider--vertical{height:100%;width:1px}.pds-divider--labeled{-ms-flex-align:center;align-items:center;background:none;color:var(--pine-color-text);font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-sm);height:auto;width:auto}.pds-divider--labeled::before,.pds-divider--labeled::after{background:var(--pine-color-border);content:"";-ms-flex:1;flex:1;height:var(--pine-border-width)}.pds-divider__label{text-align:center}.pds-divider--offset-xxs{margin:0 calc(var(--pine-dimension-2xs) * -1);padding:0 var(--pine-dimension-2xs)}.pds-divider--offset-xxs.pds-divider--vertical{margin:calc(var(--pine-dimension-2xs) * -1) 0;padding:var(--pine-dimension-2xs) 0}.pds-divider--offset-xxs.pds-divider--labeled{padding:0}.pds-divider--offset-xs{margin:0 calc(var(--pine-dimension-xs) * -1);padding:0 var(--pine-dimension-xs)}.pds-divider--offset-xs.pds-divider--vertical{margin:calc(var(--pine-dimension-xs) * -1) 0;padding:var(--pine-dimension-xs) 0}.pds-divider--offset-xs.pds-divider--labeled{padding:0}.pds-divider--offset-sm{margin:0 calc(var(--pine-dimension-sm) * -1);padding:0 var(--pine-dimension-sm)}.pds-divider--offset-sm.pds-divider--vertical{margin:calc(var(--pine-dimension-sm) * -1) 0;padding:var(--pine-dimension-sm) 0}.pds-divider--offset-sm.pds-divider--labeled{padding:0}.pds-divider--offset-md{margin:0 calc(var(--pine-dimension-md) * -1);padding:0 var(--pine-dimension-md)}.pds-divider--offset-md.pds-divider--vertical{margin:calc(var(--pine-dimension-md) * -1) 0;padding:var(--pine-dimension-md) 0}.pds-divider--offset-md.pds-divider--labeled{padding:0}.pds-divider--offset-lg{margin:0 calc(var(--pine-dimension-lg) * -1);padding:0 var(--pine-dimension-lg)}.pds-divider--offset-lg.pds-divider--vertical{margin:calc(var(--pine-dimension-lg) * -1) 0;padding:var(--pine-dimension-lg) 0}.pds-divider--offset-lg.pds-divider--labeled{padding:0}.pds-divider--offset-xl{margin:0 calc(var(--pine-dimension-xl) * -1);padding:0 var(--pine-dimension-xl)}.pds-divider--offset-xl.pds-divider--vertical{margin:calc(var(--pine-dimension-xl) * -1) 0;padding:var(--pine-dimension-xl) 0}.pds-divider--offset-xl.pds-divider--labeled{padding:0}.pds-divider--offset-xxl{margin:0 calc(var(--pine-dimension-2xl) * -1);padding:0 var(--pine-dimension-2xl)}.pds-divider--offset-xxl.pds-divider--vertical{margin:calc(var(--pine-dimension-2xl) * -1) 0;padding:var(--pine-dimension-2xl) 0}.pds-divider--offset-xxl.pds-divider--labeled{padding:0}@media (max-width: 767px){.pds-divider--vertical{display:none}}'}},[1,"pds-divider",{componentId:[1,"component-id"],label:[1],offset:[1],vertical:[4]}]),a=r,p=function(){"undefined"!=typeof customElements&&["pds-divider"].forEach((i=>{"pds-divider"===i&&(customElements.get(n(i))||customElements.define(n(i),r))}))};export{a as PdsDivider,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,h as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,h as d,transformTag as n}from"@stencil/core/internal/client";import{u as o}from"./reconnected-content.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}componentDidRender(){o(this.el.querySelector(".pds-drawer-content"),".pds-drawer-content")}render(){return d("div",{key:"f307939ab0a94f6a0d8a3675c658def0ded68b98",class:"pds-drawer-content"},d("slot",{key:"dadac08ac15bb8ded98ea982511e2d57bea9bdca"}))}get el(){return this}static get style(){return"pds-drawer-content{display:block;-ms-flex:1 1 auto;flex:1 1 auto;min-height:0;width:100%}.pds-drawer-content{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;height:100%;padding:var(--pine-dimension-md);width:100%}.pds-modal--scrollable pds-drawer-content{overflow-y:auto}.pds-modal:not(.pds-modal--scrollable) pds-drawer-content{overflow-y:visible}"}},[260,"pds-drawer-content"]),s=r,a=function(){"undefined"!=typeof customElements&&["pds-drawer-content"].forEach((e=>{"pds-drawer-content"===e&&(customElements.get(n(e))||customElements.define(n(e),r))}))};export{s as PdsDrawerContent,a as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as r,h as o,transformTag as t}from"@stencil/core/internal/client";import{u as d}from"./reconnected-content.js";const s=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}componentDidRender(){d(this.el.querySelector(".pds-drawer__footer"),".pds-drawer__footer")}render(){return o("footer",{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as r,h as o,transformTag as t}from"@stencil/core/internal/client";import{u as d}from"./reconnected-content.js";const s=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}componentDidRender(){d(this.el.querySelector(".pds-drawer__footer"),".pds-drawer__footer")}render(){return o("footer",{key:"b58c68d88b467e8baa3682d16f97076d06ea2414",class:"pds-drawer__footer"},o("slot",{key:"ff2306202c14029b397d40b5bb3d672a8aa571c0"}))}get el(){return this}static get style(){return"pds-drawer-footer{display:block;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.pds-drawer__footer{-webkit-border-before:1px solid var(--pine-color-border-subtle);border-block-start:1px solid var(--pine-color-border-subtle);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-sm);-ms-flex-pack:end;justify-content:flex-end;padding:var(--pine-dimension-md);width:100%}"}},[260,"pds-drawer-footer"]),n=s,i=function(){"undefined"!=typeof customElements&&["pds-drawer-footer"].forEach((e=>{"pds-drawer-footer"===e&&(customElements.get(t(e))||customElements.define(t(e),s))}))};export{n as PdsDrawerFooter,i as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as r,h as d,transformTag as t}from"@stencil/core/internal/client";import{u as s}from"./reconnected-content.js";const o=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}componentDidRender(){s(this.el.querySelector(".pds-drawer__header"),".pds-drawer__header")}render(){return d("header",{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as r,h as d,transformTag as t}from"@stencil/core/internal/client";import{u as s}from"./reconnected-content.js";const o=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}componentDidRender(){s(this.el.querySelector(".pds-drawer__header"),".pds-drawer__header")}render(){return d("header",{key:"280e6ca734317d5733e4c595431c8070eff13d58",class:"pds-drawer__header"},d("slot",{key:"cc6af6084600c4dc60d7bd99e040376abdf5ffe3"}))}get el(){return this}static get style(){return"pds-drawer-header{display:block;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.pds-drawer__header{-ms-flex-align:center;align-items:center;-webkit-border-after:1px solid var(--pine-color-border-subtle);border-block-end:1px solid var(--pine-color-border-subtle);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:var(--pine-dimension-md);width:100%}"}},[260,"pds-drawer-header"]),n=o,a=function(){"undefined"!=typeof customElements&&["pds-drawer-header"].forEach((e=>{"pds-drawer-header"===e&&(customElements.get(t(e))||customElements.define(t(e),o))}))};export{n as PdsDrawerHeader,a as defineCustomElement}
|
package/components/pds-drawer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as d,HTMLElement as s,createEvent as e,h as r,Host as t,transformTag as a}from"@stencil/core/internal/client";import{a as o,c as p}from"./closest.js";import{u as i}from"./reconnected-content.js";import{d as n}from"./pds-modal2.js";const l=".pds-popover, .pds-tooltip, .pds-combobox-dropdown-portal",c=d(class extends s{constructor(d){super(),!1!==d&&this.__registerHost(),this.pdsDrawerOpen=e(this,"pdsDrawerOpen",7),this.pdsDrawerClose=e(this,"pdsDrawerClose",7),this.open=!1,this.side="end",this.size="md",this.scrollable=!0,this.lightDismiss=!0,this.initialFocus="auto"}componentDidRender(){i(this.el.querySelector("pds-modal.pds-drawer__modal .pds-modal"),"pds-modal.pds-drawer__modal",".pds-modal")}handleModalClose(d){d.target===this.modalEl&&(this.open=!1,this.pdsDrawerClose.emit())}handleModalOpen(d){d.target===this.modalEl&&this.pdsDrawerOpen.emit()}handleOutsidePointerDown(d){if(!this.lightDismiss||!this.open)return;const s=d.target;if(!s)return;if(this.el.contains(s))return;if(s.closest(l))return;const e=s.closest(".pds-datepicker-calendar-portal"),r=null==e?void 0:e.pdsDatepicker;r&&(o(this.el,r)||p(l,r))||s.closest("pds-modal")||(this.open=!1)}render(){return r(t,{key:"
|
|
1
|
+
import{proxyCustomElement as d,HTMLElement as s,createEvent as e,h as r,Host as t,transformTag as a}from"@stencil/core/internal/client";import{a as o,c as p}from"./closest.js";import{u as i}from"./reconnected-content.js";import{d as n}from"./pds-modal2.js";const l=".pds-popover, .pds-tooltip, .pds-combobox-dropdown-portal",c=d(class extends s{constructor(d){super(),!1!==d&&this.__registerHost(),this.pdsDrawerOpen=e(this,"pdsDrawerOpen",7),this.pdsDrawerClose=e(this,"pdsDrawerClose",7),this.open=!1,this.side="end",this.size="md",this.scrollable=!0,this.lightDismiss=!0,this.initialFocus="auto"}componentDidRender(){i(this.el.querySelector("pds-modal.pds-drawer__modal .pds-modal"),"pds-modal.pds-drawer__modal",".pds-modal")}handleModalClose(d){d.target===this.modalEl&&(this.open=!1,this.pdsDrawerClose.emit())}handleModalOpen(d){d.target===this.modalEl&&this.pdsDrawerOpen.emit()}handleOutsidePointerDown(d){if(!this.lightDismiss||!this.open)return;const s=d.target;if(!s)return;if(this.el.contains(s))return;if(s.closest(l))return;const e=s.closest(".pds-datepicker-calendar-portal"),r=null==e?void 0:e.pdsDatepicker;r&&(o(this.el,r)||p(l,r))||s.closest("pds-modal")||(this.open=!1)}render(){return r(t,{key:"ae7e67ed196ef95a39c2b729e859712ce5c41144",class:{"pds-drawer":!0,["pds-drawer--"+this.side]:!0,["pds-drawer--"+this.size]:!0}},r("pds-modal",{key:"9b35ce377c84612a844a561d5540e98b08c0e499",class:"pds-drawer__modal",ref:d=>this.modalEl=d,componentId:this.componentId,open:this.open,scrollable:this.scrollable,disableTopLayer:!0,backdropDismiss:this.lightDismiss,disableInitialFocus:"none"===this.initialFocus},r("slot",{key:"dda01aa40dc41b3d17073238a8cad8d816571e18"})))}get el(){return this}static get style(){return".pds-drawer__modal>.pds-modal__backdrop{-ms-flex-align:stretch;align-items:stretch;background-color:transparent;pointer-events:none}@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))){.pds-drawer__modal>.pds-modal__backdrop{-webkit-backdrop-filter:none;backdrop-filter:none}}.pds-drawer__modal>.pds-modal__backdrop[aria-modal]::before{content:none}.pds-drawer__modal>.pds-modal__backdrop>.pds-modal{border-radius:0;height:100%;margin:0;max-height:100%;max-width:100%;pointer-events:auto;width:var(--pds-drawer-width, 500px)}.pds-drawer{display:contents}.pds-drawer.pds-drawer--end .pds-drawer__modal>.pds-modal__backdrop{-ms-flex-pack:end;justify-content:flex-end}.pds-drawer.pds-drawer--start .pds-drawer__modal>.pds-modal__backdrop{-ms-flex-pack:start;justify-content:flex-start}.pds-drawer.pds-drawer--sm{--pds-drawer-width:360px}.pds-drawer.pds-drawer--md{--pds-drawer-width:500px}"}},[260,"pds-drawer",{componentId:[1,"component-id"],open:[1028],side:[1],size:[1],scrollable:[4],lightDismiss:[4,"light-dismiss"],initialFocus:[1,"initial-focus"]},[[0,"pdsModalClose","handleModalClose"],[0,"pdsModalOpen","handleModalOpen"],[5,"pointerdown","handleOutsidePointerDown"]]]),m=c,h=function(){"undefined"!=typeof customElements&&["pds-drawer","pds-modal"].forEach((d=>{switch(d){case"pds-drawer":customElements.get(a(d))||customElements.define(a(d),c);break;case"pds-modal":customElements.get(a(d))||n()}}))};export{m as PdsDrawer,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as n,h as o,Host as i,transformTag as s}from"@stencil/core/internal/client";import{d as r}from"./pds-icon2.js";import{d}from"./pds-link2.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsClick=n(this,"pdsClick",7),this.destructive=!1,this.disabled=!1,this.external=!1,this.hasFocus=!1,this.handleFocus=()=>{this.hasFocus=!0},this.handleBlur=()=>{this.hasFocus=!1},this.handleKeyDown=e=>{this.disabled||"Enter"!==e.key||(this.href||e.preventDefault(),this.handleClick())}}async clickItem(){this.handleClick()}handleClick(){var e;const t=Array.from(this.host.parentNode.children).filter((e=>"pds-dropdown-menu-item"===e.tagName.toLowerCase())).indexOf(this.host),n=(null===(e=this.host.textContent)||void 0===e?void 0:e.trim())||"";this.pdsClick.emit({itemIndex:t,item:this.host,content:n})}renderElement(){return void 0!==this.href?o("pds-link",{download:this.download,href:this.disabled?null:this.href,external:this.external,target:this.target,class:{"pds-dropdown-menu-item__content":!0,"has-focus":this.hasFocus},tabIndex:this.disabled?-1:0,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,"aria-disabled":this.disabled?"true":null},o("slot",null)):o("button",{class:{"pds-dropdown-menu-item__content":!0,"has-focus":this.hasFocus},tabIndex:this.disabled?-1:0,type:"button",part:"button",onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,disabled:this.disabled,"aria-disabled":this.disabled?"true":null},o("slot",null))}render(){return o(i,{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as n,h as o,Host as i,transformTag as s}from"@stencil/core/internal/client";import{d as r}from"./pds-icon2.js";import{d}from"./pds-link2.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsClick=n(this,"pdsClick",7),this.destructive=!1,this.disabled=!1,this.external=!1,this.hasFocus=!1,this.handleFocus=()=>{this.hasFocus=!0},this.handleBlur=()=>{this.hasFocus=!1},this.handleKeyDown=e=>{this.disabled||"Enter"!==e.key||(this.href||e.preventDefault(),this.handleClick())}}async clickItem(){this.handleClick()}handleClick(){var e;const t=Array.from(this.host.parentNode.children).filter((e=>"pds-dropdown-menu-item"===e.tagName.toLowerCase())).indexOf(this.host),n=(null===(e=this.host.textContent)||void 0===e?void 0:e.trim())||"";this.pdsClick.emit({itemIndex:t,item:this.host,content:n})}renderElement(){return void 0!==this.href?o("pds-link",{download:this.download,href:this.disabled?null:this.href,external:this.external,target:this.target,class:{"pds-dropdown-menu-item__content":!0,"has-focus":this.hasFocus},tabIndex:this.disabled?-1:0,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,"aria-disabled":this.disabled?"true":null},o("slot",null)):o("button",{class:{"pds-dropdown-menu-item__content":!0,"has-focus":this.hasFocus},tabIndex:this.disabled?-1:0,type:"button",part:"button",onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,disabled:this.disabled,"aria-disabled":this.disabled?"true":null},o("slot",null))}render(){return o(i,{key:"33bd645d7c9547e3fd07429cf795302e6a482296",id:this.componentId,class:{"is-disabled":this.disabled,destructive:!this.disabled&&this.destructive},onClick:()=>!this.disabled&&this.handleClick(),role:"none",tabIndex:-1,"aria-disabled":this.disabled?"true":null},this.renderElement())}get host(){return this}static get style(){return":host{cursor:pointer;display:-ms-flexbox;display:flex;width:100%;}:host(.is-disabled){cursor:not-allowed !important;opacity:0.5 !important}:host(.is-disabled) .pds-dropdown-menu-item__content{cursor:not-allowed !important;pointer-events:none !important}.pds-dropdown-menu-item__content{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-dimension-xs);color:var(--pine-color-text);display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px);padding:var(--pine-dimension-xs);text-align:start;width:100%;}.pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-background-muted);color:var(--pine-color-text-hover)}.pds-dropdown-menu-item__content{}.pds-dropdown-menu-item__content:focus,.pds-dropdown-menu-item__content:focus-visible,.pds-dropdown-menu-item__content.has-focus{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}:host(.destructive) .pds-dropdown-menu-item__content{--pds-context-link-color:var(--pine-color-danger);--pds-context-link-color-hover:var(--pine-color-danger-hover);-ms-flex-align:center;align-items:center;color:var(--pine-color-danger)}:host(.destructive) .pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-danger-disabled);color:var(--pine-color-danger-hover)}:host(.destructive) .pds-dropdown-menu-item__content:focus,:host(.destructive) .pds-dropdown-menu-item__content:focus-visible,:host(.destructive) .pds-dropdown-menu-item__content.has-focus{background-color:var(--pine-color-danger-disabled);outline:var(--pine-outline-focus-danger);outline-offset:var(--pine-border-width)}pds-link::part(link):focus,pds-link::part(link):focus-visible{-webkit-box-shadow:none;box-shadow:none;outline:none}pds-link::part(link){-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);margin:calc(var(--pine-dimension-xs) * -1);padding:var(--pine-dimension-xs);text-decoration:none;width:calc(100% + var(--pine-dimension-xs) * 2)}"}},[257,"pds-dropdown-menu-item",{componentId:[1,"component-id"],destructive:[4],disabled:[516],download:[1],href:[1],external:[516],target:[513],hasFocus:[32],clickItem:[64]}]),l=a,c=function(){"undefined"!=typeof customElements&&["pds-dropdown-menu-item","pds-icon","pds-link"].forEach((e=>{switch(e){case"pds-dropdown-menu-item":customElements.get(s(e))||customElements.define(s(e),a);break;case"pds-icon":customElements.get(s(e))||r();break;case"pds-link":customElements.get(s(e))||d()}}))};export{l as PdsDropdownMenuItem,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as n,h as r,Host as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as n,h as r,Host as o,transformTag as t}from"@stencil/core/internal/client";const s=e(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.disabled=!1}render(){return r(o,{key:"60407a2edc8b4667d39cbd1ba9a859d09b0b8ff1",id:this.componentId},r("hr",{key:"8485d1c8508c5fe5e3635505f25e278f45f45b82"}))}static get style(){return":host hr{border:0;border-top:var(--pine-border-width-thin) solid var(--pine-color-border);height:0;margin-block:var(--pine-dimension-xs);margin-inline:calc(var(--pine-dimension-xs) * -1)}"}},[1,"pds-dropdown-menu-separator",{componentId:[1,"component-id"],disabled:[4]}]),d=s,i=function(){"undefined"!=typeof customElements&&["pds-dropdown-menu-separator"].forEach((e=>{"pds-dropdown-menu-separator"===e&&(customElements.get(t(e))||customElements.define(t(e),s))}))};export{d as PdsDropdownMenuSeparator,i as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as i,h as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as i,h as e,Host as s,transformTag as n}from"@stencil/core/internal/client";import{s as o,l as d}from"./attributes.js";import{a as r,c as a,o as h,f as l,s as p}from"./floating-ui.dom.js";import{d as c}from"./pds-box2.js";const m=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.isOpen=!1,this.menuItems=[],this.cleanupAutoUpdate=null,this.triggerObserver=null,this.currentFocusIndex=-1,this.hasHeader=!1,this.placement="bottom-start",this.handleTriggerSlotChange=t=>{this.slotEl=t.target;const i=this.slotEl.assignedElements();this.triggerEl=i[0],this.triggerEl&&(this.triggerEl.onclick=this.handleClick,this.syncTriggerAria()),this.observeTrigger()},this.syncTriggerAria=()=>!!this.triggerEl&&o(this.triggerEl,{"aria-haspopup":"menu","aria-expanded":this.isOpen+""}),this.handleHeaderSlotChange=t=>{this.hasHeader=t.target.assignedElements().length>0},this.handleSlotChange=t=>{this.slotEl=t.target;const i=this.slotEl.assignedElements(),e=["pds-dropdown-menu-item","pds-dropdown-menu-separator","a","button"],s=i.filter((t=>!e.includes(t.tagName.toLowerCase())));if(s.length>0){const t=s.map((t=>t.tagName.toLowerCase())).join(", ");console.warn(`pds-dropdown-menu: Unexpected element(s) found: ${t}. Expected: `+e.join(", "))}this.menuItems=i.filter((t=>{const i=t.tagName.toLowerCase();return"pds-dropdown-menu-item"===i||"a"===i||"button"===i}))},this.toggleDropdown=()=>{this.isOpen=!this.isOpen,this.isOpen?this.openDropdown():this.closeDropdown()},this.openDropdown=()=>{var t;const i=()=>{a(this.triggerEl,this.panelEl,{placement:this.placement,strategy:"fixed",middleware:[h(6),l(),p({padding:5})]}).then((({x:t,y:i})=>{Object.assign(this.panelEl.style,{left:t+"px",top:i+"px"})}))};i(),this.cleanupAutoUpdate=r(this.triggerEl,this.panelEl,i),null===(t=this.host.shadowRoot)||void 0===t||t.querySelector("pds-box").classList.remove("is-hidden"),this.isOpen=!0,this.syncTriggerAria()},this.closeDropdown=()=>{var t;null===(t=this.host.shadowRoot)||void 0===t||t.querySelector("pds-box").classList.add("is-hidden"),this.isOpen=!1,this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this.syncTriggerAria(),this.currentFocusIndex=-1,this.isFocusInMenu()&&this.triggerEl.focus()},this.handleClick=()=>{this.toggleDropdown()}}componentWillLoad(){this.hasHeader=Array.from(this.host.children).some((t=>"header"===t.getAttribute("slot")))}componentDidRender(){var t;this.panelEl=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("pds-box")}connectedCallback(){this.observeTrigger(),this.syncTriggerAria()}disconnectedCallback(){var t;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),null===(t=this.triggerObserver)||void 0===t||t.disconnect(),this.triggerObserver=null}observeTrigger(){var t;null===(t=this.triggerObserver)||void 0===t||t.disconnect(),this.triggerObserver=null,this.triggerEl&&"undefined"!=typeof MutationObserver&&(this.triggerObserver=new MutationObserver(d(this.syncTriggerAria,"pds-dropdown-menu: stopped restoring its trigger ARIA, as another script keeps changing it. It may be wrong until the menu opens or closes.",this.triggerEl)),this.triggerObserver.observe(this.triggerEl,{attributes:!0,attributeFilter:["aria-haspopup","aria-expanded"]}))}isFocusInMenu(){const t=this.host.getRootNode().activeElement;return null!=t&&this.host.contains(t)}isItemDisabled(t){const i=t.tagName.toLowerCase();return"pds-dropdown-menu-item"===i||"button"===i?t.disabled:"a"===i&&"true"===t.getAttribute("aria-disabled")}getFocusedItemIndex(){const t=document.activeElement;return t?this.menuItems.findIndex((i=>{if(i===t)return!0;if("pds-dropdown-menu-item"===i.tagName.toLowerCase()){const e=i.shadowRoot;if(null==e?void 0:e.contains(t))return!0}return!1})):-1}focusItemByIndex(t){var i,e,s,n,o;if(t>=0&&t<this.menuItems.length){this.currentFocusIndex=t;const d=this.menuItems[t];if("pds-dropdown-menu-item"===d.tagName.toLowerCase()){const t=d,r=null===(i=t.shadowRoot)||void 0===i?void 0:i.querySelector("button"),a=(null===(n=null===(s=null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("pds-link"))||void 0===s?void 0:s.shadowRoot)||void 0===n?void 0:n.querySelector("a"))||(null===(o=t.shadowRoot)||void 0===o?void 0:o.querySelector("a"));r?r.focus():a?a.focus():t.focus()}else d.focus()}}focusNextItem(){let t=(this.currentFocusIndex+1)%this.menuItems.length,i=0;const e=this.menuItems.length;for(;i<e&&this.isItemDisabled(this.menuItems[t]);)t=(t+1)%this.menuItems.length,i++;i<e&&this.focusItemByIndex(t)}focusPreviousItem(){let t=this.currentFocusIndex<=0?this.menuItems.length-1:this.currentFocusIndex-1,i=0;const e=this.menuItems.length;for(;i<e&&this.isItemDisabled(this.menuItems[t]);)t=t<=0?this.menuItems.length-1:t-1,i++;i<e&&this.focusItemByIndex(t)}handleKeyDown(t){if(this.isOpen)switch(t.key){case"Escape":t.preventDefault(),this.closeDropdown();break;case"ArrowDown":t.preventDefault(),this.focusNextItem();break;case"ArrowUp":t.preventDefault(),this.focusPreviousItem();break;case"Home":if(t.preventDefault(),this.menuItems.length>0){let t=0;for(;t<this.menuItems.length&&this.isItemDisabled(this.menuItems[t]);)t++;t<this.menuItems.length&&this.focusItemByIndex(t)}break;case"End":if(t.preventDefault(),this.menuItems.length>0){let t=this.menuItems.length-1;for(;t>=0&&this.isItemDisabled(this.menuItems[t]);)t--;t>=0&&this.focusItemByIndex(t)}break;case"Tab":if(t.shiftKey)this.getFocusedItemIndex()>0&&(t.preventDefault(),this.focusPreviousItem());else{const i=document.activeElement===this.triggerEl,e=this.getFocusedItemIndex();if(i&&this.menuItems.length>0){t.preventDefault();let i=0;for(;i<this.menuItems.length&&this.isItemDisabled(this.menuItems[i]);)i++;i<this.menuItems.length&&this.focusItemByIndex(i)}else if(-1===e&&this.menuItems.length>0){t.preventDefault();let i=0;for(;i<this.menuItems.length&&this.isItemDisabled(this.menuItems[i]);)i++;i<this.menuItems.length&&this.focusItemByIndex(i)}else-1!==e&&(t.preventDefault(),this.focusNextItem())}}}handleWindowClick(t){this.isOpen&&!this.host.contains(t.target)&&t.target!==this.triggerEl&&this.closeDropdown()}render(){return e(s,{key:"0dd585168e8fa86378c4812ce54fd09108861d5b",id:this.componentId},e("slot",{key:"c7144f8d6aaebe37b585c6c6230102c013230a9e",name:"trigger",onSlotchange:this.handleTriggerSlotChange}),e("pds-box",{key:"82292e051337141bc9fd83b90292b188b0bb3489","border-radius":"sm",display:"flex",direction:"column",class:"pds-dropdown-menu--panel is-hidden",shadow:"100",part:"menu-panel"},e("div",{key:"c0f49dca14df0ba3885865c51562c380155bf8a8",class:{"pds-dropdown-menu__header":!0,"is-hidden":!this.hasHeader}},e("slot",{key:"dc80c97a8dbb79ab4563524b3dea68d144e8570c",name:"header",onSlotchange:this.handleHeaderSlotChange})),e("div",{key:"29cb56bdf28a0438296f33e0fa86c9da7b51902c",class:"pds-dropdown-menu__items",role:"menu","aria-orientation":"vertical"},e("slot",{key:"8f91ceeb1eedc4acc79f09032dedc69a2ba1f99a",onSlotchange:this.handleSlotChange}))))}get host(){return this}static get style(){return":host{display:block}.is-hidden{display:none}.pds-dropdown-menu--panel{background-color:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-xs);left:var(--pine-dimension-none);min-width:170px;padding:var(--pine-dimension-xs);position:fixed;z-index:var(--pine-z-index-overlay)}:host-context([data-theme=dark]) .pds-dropdown-menu--panel{border:var(--pine-border)}.pds-dropdown-menu__header{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border);-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs);margin-inline:calc(var(--pine-dimension-xs) * -1);-webkit-padding-after:var(--pine-dimension-xs);padding-block-end:var(--pine-dimension-xs);padding-inline:calc(var(--pine-dimension-xs) * 2 + var(--pine-border-width) + 2px);text-align:start}.pds-dropdown-menu__items{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}::slotted(a:not([slot=header])),::slotted(button:not([slot=header])){-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-dimension-xs) !important;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text) !important;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium) !important;gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px) !important;padding:var(--pine-dimension-xs) !important;text-align:start;text-decoration:none !important;width:calc(100% - (var(--pine-border-width) + 2px) * 2)}::slotted(.destructive:not([slot=header])){color:var(--pine-color-danger) !important}::slotted([aria-disabled=true]:not([slot=header])),::slotted([disabled]:not([disabled=false]):not([slot=header])){cursor:not-allowed;opacity:0.5;pointer-events:none}"}},[257,"pds-dropdown-menu",{componentId:[1,"component-id"],placement:[1],currentFocusIndex:[32],hasHeader:[32]},[[8,"keydown","handleKeyDown"],[8,"click","handleWindowClick"]]]),u=m,b=function(){"undefined"!=typeof customElements&&["pds-dropdown-menu","pds-box"].forEach((t=>{switch(t){case"pds-dropdown-menu":customElements.get(n(t))||customElements.define(n(t),m);break;case"pds-box":customElements.get(n(t))||c()}}))};export{u as PdsDropdownMenu,b as defineCustomElement}
|
package/components/pds-filter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as r,Host as o,transformTag as n}from"@stencil/core/internal/client";import{a as s}from"./scroll.js";import{t as l,g as a}from"./index2.js";import{d as p}from"./pds-icon2.js";const c=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsFilterOpen=t(this,"pdsFilterOpen",7),this.pdsFilterClose=t(this,"pdsFilterClose",7),this.pdsFilterClear=t(this,"pdsFilterClear",7),this.scrollRAF=null,this.lastScrollTime=0,this.variant="default",this.isOpen=!1,this.handleNativePopoverToggle=e=>{const i=e.target;if(i&&i.id===this.componentId+"-popover"){let e=!1;try{e=i.matches(":popover-open")}catch(t){e="block"===i.style.display}this.isOpen=e,this.isOpen?(setTimeout((()=>this.adjustPopoverPosition()),0),this.pdsFilterOpen.emit({componentId:this.componentId,variant:this.variant,text:this.text})):this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text})}},this.handleKeyDown=e=>{"clear"!==this.variant||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())},this.handleClick=e=>{"clear"!==this.variant?(this.closeOtherPopovers(),i.prototype.showPopover&&!navigator.userAgent.includes("Firefox")||(e&&e.preventDefault(),setTimeout((()=>{null!=this.popoverEl&&(this.isOpen=!this.isOpen,this.isOpen?(this.popoverEl.style.display="block",this.popoverEl.classList.add("is-open"),this.adjustPopoverPosition(),this.pdsFilterOpen.emit({componentId:this.componentId,variant:this.variant,text:this.text})):(this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open"),this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text})))}),0))):this.pdsFilterClear.emit({componentId:this.componentId,text:this.text})}}disconnectedCallback(){if(this.scrollRAF&&(cancelAnimationFrame(this.scrollRAF),this.scrollRAF=null),this.lastScrollTime=0,this.popoverEl&&i.prototype.showPopover&&!navigator.userAgent.includes("Firefox")&&this.popoverEl.removeEventListener("toggle",this.handleNativePopoverToggle),this.isOpen&&this.popoverEl)try{this.popoverEl.hidePopover()}catch(e){this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")}}componentDidRender(){this.popoverEl&&i.prototype.showPopover&&!navigator.userAgent.includes("Firefox")&&(this.popoverEl.removeEventListener("toggle",this.handleNativePopoverToggle),this.popoverEl.addEventListener("toggle",this.handleNativePopoverToggle))}handleWindowResize(){this.isOpen&&setTimeout((()=>this.adjustPopoverPosition()),16)}handleWindowScroll(){if(this.isOpen){const e="anchorName"in document.documentElement.style,i=performance.now();if(i-this.lastScrollTime<(e?66:33))return;this.lastScrollTime=i,this.scrollRAF&&cancelAnimationFrame(this.scrollRAF),this.scrollRAF=requestAnimationFrame((()=>{this.isOpen&&this.popoverEl&&this.el.isConnected&&this.adjustPopoverPosition(),this.scrollRAF=null}))}}closeOtherPopovers(){document.querySelectorAll("pds-filter").forEach((e=>{var i;if(e===this.el)return;const t=null===(i=e.shadowRoot)||void 0===i?void 0:i.querySelector(".pds-filter__popover");if(t){let e=!1;try{e=t.matches(":popover-open")}catch(i){e="block"===t.style.display}if(e)try{t.hidePopover()}catch(e){t.style.display="none",t.classList.remove("is-open")}}}))}adjustPopoverPosition(){var e;if(!this.popoverEl||"clear"===this.variant)return;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".pds-filter__trigger");if(!i)return;const t=i.getBoundingClientRect(),r=window.innerWidth,o=window.innerHeight,n="anchorName"in document.documentElement.style,l=228,a=this.popoverEl.getBoundingClientRect().height||200,p=s(this.el),c=p?t.right-l-20<0:t.left+l+20>r,d=t.bottom+8+a+20>o;if(n)this.popoverEl.classList.remove("popover-flip-horizontal","popover-flip-vertical"),c&&this.popoverEl.classList.add("popover-flip-horizontal"),d&&this.popoverEl.classList.add("popover-flip-vertical");else{let e=p?t.right-l:t.left,i=t.bottom+8,r=p?"top right":"top left";if(c){const i=this.popoverEl.getBoundingClientRect().width||l;e=p?t.left:t.right-i,r=p?"top left":"top right"}d&&(i=t.top-a-8,r=r.replace("top","bottom")),this.popoverEl.style.cssText=`\n position: fixed;\n left: ${e}px;\n top: ${i}px;\n z-index: var(--pine-z-index-overlay);\n transform-origin: ${r};\n `}}async showFilter(){if("clear"!==this.variant){if(null!=this.popoverEl)try{this.popoverEl.showPopover()}catch(e){this.popoverEl.style.display="block",this.popoverEl.classList.add("is-open")}}else console.warn("Clear variant does not support showFilter method")}async hideFilter(){if("clear"!==this.variant){if(null!=this.popoverEl)try{this.popoverEl.hidePopover()}catch(e){this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")}}else console.warn("Clear variant does not support hideFilter method")}handlePopoverToggle(e){const t=e.target;if((!i.prototype.showPopover||navigator.userAgent.includes("Firefox"))&&t&&t.id===this.componentId+"-popover"){let e=!1;try{e=t.matches(":popover-open")}catch(i){e="block"===t.style.display}this.isOpen=e,this.isOpen?(setTimeout((()=>this.adjustPopoverPosition()),0),this.pdsFilterOpen.emit({componentId:this.componentId,variant:this.variant,text:this.text})):this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text})}}handleDocumentClick(e){!this.el.contains(e.target)&&this.isOpen&&"clear"!==this.variant&&setTimeout((()=>{if(this.popoverEl&&this.isOpen){const e=i.prototype.showPopover&&!navigator.userAgent.includes("Firefox");let t=!1;if(e)try{t=!this.popoverEl.matches(":popover-open")}catch(e){t="block"!==this.popoverEl.style.display}else t=!0;t&&(this.isOpen=!1,e||(this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")),this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text}))}}),0)}handleEscapeKey(e){"Escape"===e.key&&this.isOpen&&"clear"!==this.variant&&setTimeout((()=>{if(this.popoverEl&&this.isOpen){const e=i.prototype.showPopover&&!navigator.userAgent.includes("Firefox");let t=!1;if(e)try{t=!this.popoverEl.matches(":popover-open")}catch(e){t="block"!==this.popoverEl.style.display}else t=!0;t&&(this.isOpen=!1,e||(this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")),this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text}))}}),0)}getIcon(){return"clear"===this.variant?l:this.icon}getTriggerClasses(){const e=["pds-filter__trigger"];return e.push("pds-filter__trigger--"+this.variant),this.isOpen&&"clear"!==this.variant&&e.push("pds-filter__trigger--open"),e.join(" ")}renderIcon(){const e=this.getIcon();return null==e||""===e?null:r("pds-icon",{icon:e,size:"var(--pine-font-size-100)","aria-hidden":"true",part:"icon"})}renderDropdownIcon(){return"selected"===this.variant?r("pds-icon",{icon:a,size:"var(--pine-dimension-200)","aria-hidden":"true",class:"pds-filter__dropdown-icon",part:"icon"}):null}render(){return r(o,{key:"4abb55453c9ab4cd49b21a23047aa5ee4ab70056",id:this.componentId},r("button",{key:"e6b6bd81ca3f9d23f490219cf8e81f0bdf511798",class:this.getTriggerClasses(),type:"button",popoverTarget:"clear"!==this.variant?this.componentId+"-popover":void 0,popoverTargetAction:"clear"!==this.variant?"toggle":void 0,onKeyDown:"clear"===this.variant?this.handleKeyDown:void 0,onClick:e=>this.handleClick(e),part:"button","aria-expanded":this.isOpen?"true":"false","aria-haspopup":"clear"!==this.variant?"true":void 0,"aria-controls":"clear"!==this.variant?this.componentId+"-popover":void 0},r("span",{key:"4cea081451f50508cef36e90d4c88cbd94933287",class:"pds-filter__button-content",part:"button-content"},this.renderIcon(),this.text&&r("span",{key:"479f84087e7969fa555475b240f5e70ce5bcf136",class:"pds-filter__button-text",part:"button-text"},this.text),this.renderDropdownIcon())),"clear"!==this.variant&&r("div",{key:"85aec3d5d7b33a0cfb3602412238830929902eb1",ref:e=>this.popoverEl=e,id:this.componentId+"-popover",class:"pds-filter__popover",popover:"auto",part:"popover"},r("slot",{key:"ede4c3866bfdce974e0d21c6e6a3ae22aee47d2c"})))}get el(){return this}static get style(){return":host{--box-shadow-focus:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring);display:inline-block;position:relative}.pds-filter__trigger{-ms-flex-align:center;align-items:center;anchor-name:--filter-trigger;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-100);-webkit-box-shadow:var(--pine-box-shadow-050);box-shadow:var(--pine-box-shadow-050);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-tertiary);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;font-family:var(--pine-font-family-inter);font-size:var(--pine-font-size-100);font-weight:var(--pine-font-weight-400);gap:var(--pine-dimension-050);letter-spacing:var(--pine-letter-spacing-114);line-height:var(--pine-line-height-150);padding:var(--pine-dimension-025) var(--pine-dimension-125);position:relative;-webkit-transition:all var(--pine-motion-duration-base) ease;transition:all var(--pine-motion-duration-base) ease}.pds-filter__trigger pds-icon{block-size:var(--pine-font-size-100);color:var(--pine-color-text-secondary);-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-font-size-100)}.pds-filter__trigger:hover,.pds-filter__trigger.pds-filter__trigger--open{background-color:var(--pine-color-background-subtle);border-color:var(--pine-color-border-hover);color:var(--pine-color-text-hover)}.pds-filter__trigger:hover pds-icon,.pds-filter__trigger.pds-filter__trigger--open pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger:disabled{cursor:not-allowed;opacity:0.5}.pds-filter__trigger--selected{background-color:var(--pine-color-purple-050);border-color:var(--pine-color-purple-500);color:var(--pine-color-purple-600)}.pds-filter__trigger--selected pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:hover,.pds-filter__trigger--selected.pds-filter__trigger--open{background-color:var(--pine-color-purple-100);border-color:var(--pine-color-purple-500);color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:hover pds-icon,.pds-filter__trigger--selected.pds-filter__trigger--open pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger--more{background-color:var(--pine-color-background-container-hover);border:var(--pine-border-width-thin) dashed var(--pine-color-border);color:var(--pine-color-text-tertiary)}.pds-filter__trigger--more pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger--more:hover,.pds-filter__trigger--more.pds-filter__trigger--open{background-color:var(--pine-color-background-subtle);border-color:var(--pine-color-border-hover);color:var(--pine-color-text-hover)}.pds-filter__trigger--more:hover pds-icon,.pds-filter__trigger--more.pds-filter__trigger--open pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger--more:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger--clear{background:transparent;border:var(--pine-border-width-thin) solid transparent;border-radius:var(--pine-dimension-100);-webkit-box-shadow:none;box-shadow:none;color:var(--pine-color-purple-600)}.pds-filter__trigger--clear pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:hover{background-color:var(--pine-color-purple-100);border-color:var(--pine-color-purple-100);color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:hover pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__button-content{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;gap:var(--pine-dimension-050);max-inline-size:148px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-filter__button-text{line-height:var(--pine-line-height-150);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-filter__dropdown-icon{block-size:var(--pine-dimension-200);-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-dimension-200)}.pds-filter__popover{background-color:var(--pine-color-background-overlay);border:0;border-radius:var(--pine-dimension-100);-webkit-box-shadow:var(--pine-box-shadow-100);box-shadow:var(--pine-box-shadow-100);display:none;inline-size:228px;inset:unset;padding:var(--pine-dimension-100);z-index:var(--pine-z-index-overlay);}.pds-filter__popover:popover-open,.pds-filter__popover.is-open{display:block}.pds-filter__popover{}@supports (anchor-name: --test){.pds-filter__popover{inset-block-start:calc(anchor(--filter-trigger bottom) + var(--pine-dimension-100));inset-inline-start:anchor(--filter-trigger start);position:fixed;position-anchor:--filter-trigger;}.pds-filter__popover.popover-flip-horizontal{inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto}.pds-filter__popover.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover.popover-flip-horizontal.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto;-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover{}.pds-filter__popover.is-open.popover-flip-horizontal{inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto}.pds-filter__popover.is-open.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover.is-open.popover-flip-horizontal.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto;-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}}"}},[257,"pds-filter",{componentId:[1,"component-id"],variant:[1],icon:[1],text:[1],isOpen:[32],showFilter:[64],hideFilter:[64]},[[9,"resize","handleWindowResize"],[9,"scroll","handleWindowScroll"],[4,"toggle","handlePopoverToggle"],[4,"click","handleDocumentClick"],[4,"keydown","handleEscapeKey"]]]),d=c,h=function(){"undefined"!=typeof customElements&&["pds-filter","pds-icon"].forEach((e=>{switch(e){case"pds-filter":customElements.get(n(e))||customElements.define(n(e),c);break;case"pds-icon":customElements.get(n(e))||p()}}))};export{d as PdsFilter,h as defineCustomElement}
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as r,Host as o,transformTag as n}from"@stencil/core/internal/client";import{a as s}from"./scroll.js";import{t as a,g as l}from"./index2.js";import{d as p}from"./pds-icon2.js";const c=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsFilterOpen=t(this,"pdsFilterOpen",7),this.pdsFilterClose=t(this,"pdsFilterClose",7),this.pdsFilterClear=t(this,"pdsFilterClear",7),this.scrollRAF=null,this.lastScrollTime=0,this.variant="default",this.isOpen=!1,this.handleNativePopoverToggle=e=>{const i=e.target;if(i&&i.id===this.componentId+"-popover"){let e=!1;try{e=i.matches(":popover-open")}catch(t){e="block"===i.style.display}this.isOpen=e,this.isOpen?(setTimeout((()=>this.adjustPopoverPosition()),0),this.pdsFilterOpen.emit({componentId:this.componentId,variant:this.variant,text:this.text})):this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text})}},this.handleKeyDown=e=>{"clear"!==this.variant||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())},this.handleClick=e=>{"clear"!==this.variant?(this.closeOtherPopovers(),i.prototype.showPopover&&!navigator.userAgent.includes("Firefox")||(e&&e.preventDefault(),setTimeout((()=>{null!=this.popoverEl&&(this.isOpen=!this.isOpen,this.isOpen?(this.popoverEl.style.display="block",this.popoverEl.classList.add("is-open"),this.adjustPopoverPosition(),this.pdsFilterOpen.emit({componentId:this.componentId,variant:this.variant,text:this.text})):(this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open"),this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text})))}),0))):this.pdsFilterClear.emit({componentId:this.componentId,text:this.text})}}disconnectedCallback(){if(this.scrollRAF&&(cancelAnimationFrame(this.scrollRAF),this.scrollRAF=null),this.lastScrollTime=0,this.popoverEl&&i.prototype.showPopover&&!navigator.userAgent.includes("Firefox")&&this.popoverEl.removeEventListener("toggle",this.handleNativePopoverToggle),this.isOpen&&this.popoverEl)try{this.popoverEl.hidePopover()}catch(e){this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")}}componentDidRender(){this.popoverEl&&i.prototype.showPopover&&!navigator.userAgent.includes("Firefox")&&(this.popoverEl.removeEventListener("toggle",this.handleNativePopoverToggle),this.popoverEl.addEventListener("toggle",this.handleNativePopoverToggle))}handleWindowResize(){this.isOpen&&setTimeout((()=>this.adjustPopoverPosition()),16)}handleWindowScroll(){if(this.isOpen){const e="anchorName"in document.documentElement.style,i=performance.now();if(i-this.lastScrollTime<(e?66:33))return;this.lastScrollTime=i,this.scrollRAF&&cancelAnimationFrame(this.scrollRAF),this.scrollRAF=requestAnimationFrame((()=>{this.isOpen&&this.popoverEl&&this.el.isConnected&&this.adjustPopoverPosition(),this.scrollRAF=null}))}}closeOtherPopovers(){document.querySelectorAll("pds-filter").forEach((e=>{var i;if(e===this.el)return;const t=null===(i=e.shadowRoot)||void 0===i?void 0:i.querySelector(".pds-filter__popover");if(t){let e=!1;try{e=t.matches(":popover-open")}catch(i){e="block"===t.style.display}if(e)try{t.hidePopover()}catch(e){t.style.display="none",t.classList.remove("is-open")}}}))}adjustPopoverPosition(){var e;if(!this.popoverEl||"clear"===this.variant)return;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".pds-filter__trigger");if(!i)return;const t=i.getBoundingClientRect(),r=window.innerWidth,o=window.innerHeight,n="anchorName"in document.documentElement.style,a=228,l=this.popoverEl.getBoundingClientRect().height||200,p=s(this.el),c=p?t.right-a-20<0:t.left+a+20>r,d=t.bottom+8+l+20>o;if(n)this.popoverEl.classList.remove("popover-flip-horizontal","popover-flip-vertical"),c&&this.popoverEl.classList.add("popover-flip-horizontal"),d&&this.popoverEl.classList.add("popover-flip-vertical");else{let e=p?t.right-a:t.left,i=t.bottom+8,r=p?"top right":"top left";if(c){const i=this.popoverEl.getBoundingClientRect().width||a;e=p?t.left:t.right-i,r=p?"top left":"top right"}d&&(i=t.top-l-8,r=r.replace("top","bottom")),this.popoverEl.style.cssText=`\n position: fixed;\n left: ${e}px;\n top: ${i}px;\n z-index: var(--pine-z-index-overlay);\n transform-origin: ${r};\n `}}async showFilter(){if("clear"!==this.variant){if(null!=this.popoverEl)try{this.popoverEl.showPopover()}catch(e){this.popoverEl.style.display="block",this.popoverEl.classList.add("is-open")}}else console.warn("Clear variant does not support showFilter method")}async hideFilter(){if("clear"!==this.variant){if(null!=this.popoverEl)try{this.popoverEl.hidePopover()}catch(e){this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")}}else console.warn("Clear variant does not support hideFilter method")}handlePopoverToggle(e){const t=e.target;if((!i.prototype.showPopover||navigator.userAgent.includes("Firefox"))&&t&&t.id===this.componentId+"-popover"){let e=!1;try{e=t.matches(":popover-open")}catch(i){e="block"===t.style.display}this.isOpen=e,this.isOpen?(setTimeout((()=>this.adjustPopoverPosition()),0),this.pdsFilterOpen.emit({componentId:this.componentId,variant:this.variant,text:this.text})):this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text})}}handleDocumentClick(e){!this.el.contains(e.target)&&this.isOpen&&"clear"!==this.variant&&setTimeout((()=>{if(this.popoverEl&&this.isOpen){const e=i.prototype.showPopover&&!navigator.userAgent.includes("Firefox");let t=!1;if(e)try{t=!this.popoverEl.matches(":popover-open")}catch(e){t="block"!==this.popoverEl.style.display}else t=!0;t&&(this.isOpen=!1,e||(this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")),this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text}))}}),0)}handleEscapeKey(e){"Escape"===e.key&&this.isOpen&&"clear"!==this.variant&&setTimeout((()=>{if(this.popoverEl&&this.isOpen){const e=i.prototype.showPopover&&!navigator.userAgent.includes("Firefox");let t=!1;if(e)try{t=!this.popoverEl.matches(":popover-open")}catch(e){t="block"!==this.popoverEl.style.display}else t=!0;t&&(this.isOpen=!1,e||(this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")),this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text}))}}),0)}getIcon(){return"clear"===this.variant?a:this.icon}getTriggerClasses(){const e=["pds-filter__trigger"];return e.push("pds-filter__trigger--"+this.variant),this.isOpen&&"clear"!==this.variant&&e.push("pds-filter__trigger--open"),e.join(" ")}renderIcon(){const e=this.getIcon();return null==e||""===e?null:r("pds-icon",{icon:e,size:"var(--pine-font-size-100)","aria-hidden":"true",part:"icon"})}renderDropdownIcon(){return"selected"===this.variant?r("pds-icon",{icon:l,size:"var(--pine-dimension-200)","aria-hidden":"true",class:"pds-filter__dropdown-icon",part:"icon"}):null}render(){return r(o,{key:"3cae951aee1f9c75f3e207cf6c68633a23f8f6dc",id:this.componentId},r("button",{key:"f4c644710dc936248995be9a49cef8ad13031d61",class:this.getTriggerClasses(),type:"button",popoverTarget:"clear"!==this.variant?this.componentId+"-popover":void 0,popoverTargetAction:"clear"!==this.variant?"toggle":void 0,onKeyDown:"clear"===this.variant?this.handleKeyDown:void 0,onClick:e=>this.handleClick(e),part:"button","aria-expanded":this.isOpen?"true":"false","aria-haspopup":"clear"!==this.variant?"true":void 0,"aria-controls":"clear"!==this.variant?this.componentId+"-popover":void 0},r("span",{key:"2dd87e53f363118becc762051ea1be664258b8b6",class:"pds-filter__button-content",part:"button-content"},this.renderIcon(),this.text&&r("span",{key:"733ceb5e07198e844fbdc1af294d2046c4c571d8",class:"pds-filter__button-text",part:"button-text"},this.text),this.renderDropdownIcon())),"clear"!==this.variant&&r("div",{key:"beb65a21192c6f5c16703aec7ab9a92ea378ef3c",ref:e=>this.popoverEl=e,id:this.componentId+"-popover",class:"pds-filter__popover",popover:"auto",part:"popover"},r("slot",{key:"5a481cc6b143b059a5fc33d377abe5ab79aefb4e"})))}get el(){return this}static get style(){return":host{--box-shadow-focus:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring);display:inline-block;position:relative}.pds-filter__trigger{-ms-flex-align:center;align-items:center;anchor-name:--filter-trigger;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-100);-webkit-box-shadow:var(--pine-box-shadow-050);box-shadow:var(--pine-box-shadow-050);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-tertiary);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;font-family:var(--pine-font-family-inter);font-size:var(--pine-font-size-100);font-weight:var(--pine-font-weight-400);gap:var(--pine-dimension-050);letter-spacing:var(--pine-letter-spacing-114);line-height:var(--pine-line-height-150);padding:var(--pine-dimension-025) var(--pine-dimension-125);position:relative;-webkit-transition:all var(--pine-motion-duration-base) ease;transition:all var(--pine-motion-duration-base) ease}.pds-filter__trigger pds-icon{block-size:var(--pine-font-size-100);color:var(--pine-color-text-secondary);-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-font-size-100)}.pds-filter__trigger:hover,.pds-filter__trigger.pds-filter__trigger--open{background-color:var(--pine-color-background-subtle);border-color:var(--pine-color-border-hover);color:var(--pine-color-text-hover)}.pds-filter__trigger:hover pds-icon,.pds-filter__trigger.pds-filter__trigger--open pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger:disabled{cursor:not-allowed;opacity:0.5}.pds-filter__trigger--selected{background-color:var(--pine-color-purple-050);border-color:var(--pine-color-purple-500);color:var(--pine-color-purple-600)}.pds-filter__trigger--selected pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:hover,.pds-filter__trigger--selected.pds-filter__trigger--open{background-color:var(--pine-color-purple-100);border-color:var(--pine-color-purple-500);color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:hover pds-icon,.pds-filter__trigger--selected.pds-filter__trigger--open pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger--more{background-color:var(--pine-color-background-container-hover);border:var(--pine-border-width-thin) dashed var(--pine-color-border);color:var(--pine-color-text-tertiary)}.pds-filter__trigger--more pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger--more:hover,.pds-filter__trigger--more.pds-filter__trigger--open{background-color:var(--pine-color-background-subtle);border-color:var(--pine-color-border-hover);color:var(--pine-color-text-hover)}.pds-filter__trigger--more:hover pds-icon,.pds-filter__trigger--more.pds-filter__trigger--open pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger--more:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger--clear{background:transparent;border:var(--pine-border-width-thin) solid transparent;border-radius:var(--pine-dimension-100);-webkit-box-shadow:none;box-shadow:none;color:var(--pine-color-purple-600)}.pds-filter__trigger--clear pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:hover{background-color:var(--pine-color-purple-100);border-color:var(--pine-color-purple-100);color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:hover pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__button-content{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;gap:var(--pine-dimension-050);max-inline-size:148px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-filter__button-text{line-height:var(--pine-line-height-150);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-filter__dropdown-icon{block-size:var(--pine-dimension-200);-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-dimension-200)}.pds-filter__popover{background-color:var(--pine-color-background-overlay);border:0;border-radius:var(--pine-dimension-100);-webkit-box-shadow:var(--pine-box-shadow-100);box-shadow:var(--pine-box-shadow-100);display:none;inline-size:228px;inset:unset;padding:var(--pine-dimension-100);z-index:var(--pine-z-index-overlay);}.pds-filter__popover:popover-open,.pds-filter__popover.is-open{display:block}.pds-filter__popover{}@supports (anchor-name: --test){.pds-filter__popover{inset-block-start:calc(anchor(--filter-trigger bottom) + var(--pine-dimension-100));inset-inline-start:anchor(--filter-trigger start);position:fixed;position-anchor:--filter-trigger;}.pds-filter__popover.popover-flip-horizontal{inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto}.pds-filter__popover.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover.popover-flip-horizontal.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto;-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover{}.pds-filter__popover.is-open.popover-flip-horizontal{inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto}.pds-filter__popover.is-open.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover.is-open.popover-flip-horizontal.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto;-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}}"}},[257,"pds-filter",{componentId:[1,"component-id"],variant:[1],icon:[1],text:[1],isOpen:[32],showFilter:[64],hideFilter:[64]},[[9,"resize","handleWindowResize"],[9,"scroll","handleWindowScroll"],[4,"toggle","handlePopoverToggle"],[4,"click","handleDocumentClick"],[4,"keydown","handleEscapeKey"]]]),d=c,h=function(){"undefined"!=typeof customElements&&["pds-filter","pds-icon"].forEach((e=>{switch(e){case"pds-filter":customElements.get(n(e))||customElements.define(n(e),c);break;case"pds-icon":customElements.get(n(e))||p()}}))};export{d as PdsFilter,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as s,h as t,Host as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as s,h as t,Host as i,transformTag as l}from"@stencil/core/internal/client";const n=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return t(i,{key:"8688235fe7cdea1b4fc540156ff21bb9711b41b6",id:this.componentId},t("div",{key:"e51a37977df8c31f99b28d8c7e4bedb0d63e53c6",class:"pds-filters"},t("slot",{key:"8ce936da4d3f0213408090bc3eeb011920f9aa6c"})))}static get style(){return":host{display:block}.pds-filters{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-100)}"}},[257,"pds-filters",{componentId:[1,"component-id"]}]),r=n,c=function(){"undefined"!=typeof customElements&&["pds-filters"].forEach((e=>{"pds-filters"===e&&(customElements.get(l(e))||customElements.define(l(e),n))}))};export{r as PdsFilters,c as defineCustomElement}
|