@pine-ds/core 4.5.0 → 4.7.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 +187 -28
- 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 +25 -12
- 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 +24 -12
- 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 +118 -33
- package/dist/cjs/pds-multiselect.cjs.entry.js +9 -8
- package/dist/cjs/pds-popover.cjs.entry.js +227 -37
- 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 +166 -23
- 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.css +4 -1
- package/dist/collection/components/pds-drawer/pds-drawer.js +54 -17
- package/dist/collection/components/pds-drawer/stories/pds-drawer.stories.js +6 -1
- 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 +30 -9
- 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 +117 -32
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +8 -7
- package/dist/collection/components/pds-popover/pds-popover.js +185 -35
- 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 +56 -12
- 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 +187 -28
- 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 +25 -12
- 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 +24 -12
- 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 +118 -33
- package/dist/esm/pds-multiselect.entry.js +9 -8
- package/dist/esm/pds-popover.entry.js +228 -38
- 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-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-153ba77b.entry.js +1 -0
- 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-21fe6ee1.system.entry.js +1 -0
- package/dist/pine-core/p-24fbbb74.system.entry.js +1 -0
- 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-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-5a10784e.system.entry.js +3 -0
- 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-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-74a05bcc.entry.js +1 -0
- 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-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-92ae6082.entry.js +1 -0
- package/dist/pine-core/p-94593f20.system.entry.js +1 -0
- package/dist/pine-core/p-945fb0b1.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-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-a0344e30.entry.js +2 -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-a787b34a.system.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-b60ac7eb.system.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-bf5887e8.system.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-7bbfb965.system.entry.js → p-db17c626.system.entry.js} +1 -1
- package/dist/pine-core/p-e0917a26.entry.js +1 -0
- package/dist/pine-core/p-e21ff692.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-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-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 +32 -0
- package/dist/types/components/pds-drawer/pds-drawer.d.ts +21 -9
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +5 -0
- package/dist/types/components/pds-modal/pds-modal.d.ts +10 -3
- package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +2 -1
- package/dist/types/components/pds-popover/pds-popover.d.ts +31 -1
- 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 +50 -35
- 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 +13 -6
- package/hydrate/index.js +961 -213
- package/hydrate/index.mjs +961 -213
- 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-347ae53c.system.entry.js +0 -1
- 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-4414d442.system.entry.js +0 -1
- package/dist/pine-core/p-4e67e68e.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-7e115d33.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-9d33bb05.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
|
@@ -80,6 +80,34 @@ function containsComposed(ancestor, node) {
|
|
|
80
80
|
}
|
|
81
81
|
return false;
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Every open modal, with the order it opened in, which ranks top-layer modals and the modals
|
|
85
|
+
* inside them. Kept here rather than queried from the document, which can't see a modal inside
|
|
86
|
+
* another component's shadow root.
|
|
87
|
+
*/
|
|
88
|
+
const openModals = new Map();
|
|
89
|
+
let openSequence = 0;
|
|
90
|
+
/** Whether an open auto popover's panel sits in `root`, including inside shadow roots under it. */
|
|
91
|
+
function hasOpenPopover(root) {
|
|
92
|
+
if (root.querySelector('[data-pds-popover-open]'))
|
|
93
|
+
return true;
|
|
94
|
+
return Array.from(root.querySelectorAll('*')).some(el => !!el.shadowRoot && hasOpenPopover(el.shadowRoot));
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Whether `a` comes before `b` in the page. `compareDocumentPosition` is arbitrary across a shadow
|
|
98
|
+
* boundary, so each side climbs to its host until both are in the same tree.
|
|
99
|
+
*/
|
|
100
|
+
function precedesComposed(a, b) {
|
|
101
|
+
// A document has no host, which ends each climb.
|
|
102
|
+
for (let x = a; x; x = x.getRootNode().host) {
|
|
103
|
+
for (let y = b; y; y = y.getRootNode().host) {
|
|
104
|
+
if (x.getRootNode() === y.getRootNode()) {
|
|
105
|
+
return !!(x.compareDocumentPosition(y) & Node.DOCUMENT_POSITION_FOLLOWING);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
83
111
|
/** The focused element, followed down through shadow roots to the control that has focus. */
|
|
84
112
|
function deepActiveElement() {
|
|
85
113
|
var _a;
|
|
@@ -95,7 +123,8 @@ export class PdsModal {
|
|
|
95
123
|
constructor() {
|
|
96
124
|
this.focusableElements = [];
|
|
97
125
|
/**
|
|
98
|
-
* Whether the modal can be dismissed by clicking the backdrop
|
|
126
|
+
* Whether the modal can be dismissed by clicking the backdrop, pressing Escape, or the browser's
|
|
127
|
+
* own close request (such as a back gesture)
|
|
99
128
|
* @default true
|
|
100
129
|
*/
|
|
101
130
|
this.backdropDismiss = true;
|
|
@@ -143,19 +172,33 @@ export class PdsModal {
|
|
|
143
172
|
* Stores the list of focusable elements in the modal
|
|
144
173
|
*/
|
|
145
174
|
this.focusableElementsArray = [];
|
|
175
|
+
// The browser's own close request (an Escape nothing prevented, a back gesture) would close the
|
|
176
|
+
// dialog without updating `open`, so close it through hideModal() instead, or not at all.
|
|
177
|
+
this.handleCancel = (e) => {
|
|
178
|
+
e.preventDefault();
|
|
179
|
+
if (!this.open)
|
|
180
|
+
return;
|
|
181
|
+
// The request reaches the top-layer dialog even when a disableTopLayer modal inside it is on
|
|
182
|
+
// top; that one closes first, as it would on Escape.
|
|
183
|
+
const top = this.innermostOpenModal();
|
|
184
|
+
const target = (top && containsComposed(this.el, top) ? top : this.el);
|
|
185
|
+
if (target.backdropDismiss)
|
|
186
|
+
target.hideModal();
|
|
187
|
+
};
|
|
146
188
|
this.handleBackdropClick = (e) => {
|
|
147
189
|
if (!this.backdropDismiss || !this.open)
|
|
148
190
|
return;
|
|
149
|
-
|
|
191
|
+
// This modal's own backdrop; a nested modal's backdrop handles its own clicks.
|
|
192
|
+
if (e.target === this.modalRef) {
|
|
150
193
|
e.stopPropagation();
|
|
151
194
|
// Only close if this is the innermost modal
|
|
152
|
-
if (this.
|
|
195
|
+
if (this.innermostOpenModal() === this.el) {
|
|
153
196
|
this.hideModal();
|
|
154
197
|
}
|
|
155
198
|
}
|
|
156
199
|
};
|
|
157
200
|
this.handleKeyDown = (e) => {
|
|
158
|
-
var _a, _b, _c;
|
|
201
|
+
var _a, _b, _c, _d;
|
|
159
202
|
// If the modal is not open, don't handle any keyboard events
|
|
160
203
|
if (!this.open)
|
|
161
204
|
return;
|
|
@@ -178,24 +221,39 @@ export class PdsModal {
|
|
|
178
221
|
if (!('__pdsActiveElementAtEscape' in eventSnapshot)) {
|
|
179
222
|
const activeAtDispatch = document.activeElement;
|
|
180
223
|
eventSnapshot.__pdsActiveElementAtEscape = activeAtDispatch;
|
|
224
|
+
// Followed into shadow roots: for a modal inside one, document.activeElement is only the host.
|
|
225
|
+
eventSnapshot.__pdsDeepActiveElementAtEscape = deepActiveElement();
|
|
181
226
|
const topLayerDialog = (_a = activeAtDispatch === null || activeAtDispatch === void 0 ? void 0 : activeAtDispatch.closest('dialog')) !== null && _a !== void 0 ? _a : null;
|
|
182
227
|
eventSnapshot.__pdsTopLayerDialogAtEscape = topLayerDialog;
|
|
183
228
|
eventSnapshot.__pdsTopLayerDialogWasModalAtEscape = !!(topLayerDialog && topLayerDialog.matches(':modal'));
|
|
229
|
+
// A control that closed on this Escape (a combobox on its own element, a dropdown menu or
|
|
230
|
+
// multiselect in document's capture phase) has prevented it before this bubble listener.
|
|
231
|
+
// Read before any modal prevents it below.
|
|
232
|
+
eventSnapshot.__pdsEscapeHandledInside = e.defaultPrevented;
|
|
233
|
+
// Which modal is innermost is read once too: the inner one closing first would make its
|
|
234
|
+
// outer modal the innermost by the time that modal's listener runs.
|
|
235
|
+
eventSnapshot.__pdsInnermostModalAtEscape = this.innermostOpenModal();
|
|
184
236
|
}
|
|
237
|
+
if (eventSnapshot.__pdsEscapeHandledInside)
|
|
238
|
+
return;
|
|
185
239
|
// Leave Escape to a genuinely stacked-above overlay (disableTopLayer's
|
|
186
240
|
// reason for existing) — not just to anything outside this modal.
|
|
187
241
|
const active = eventSnapshot.__pdsActiveElementAtEscape;
|
|
188
242
|
if (this.disableTopLayer &&
|
|
189
243
|
active &&
|
|
190
244
|
active !== document.body &&
|
|
191
|
-
!this.el.
|
|
192
|
-
this.isStackedAboveOverlay(active, (
|
|
245
|
+
!containsComposed(this.el, (_b = eventSnapshot.__pdsDeepActiveElementAtEscape) !== null && _b !== void 0 ? _b : active) &&
|
|
246
|
+
this.isStackedAboveOverlay(active, (_c = eventSnapshot.__pdsTopLayerDialogAtEscape) !== null && _c !== void 0 ? _c : null, (_d = eventSnapshot.__pdsTopLayerDialogWasModalAtEscape) !== null && _d !== void 0 ? _d : false)) {
|
|
193
247
|
return;
|
|
194
248
|
}
|
|
249
|
+
// An open popover inside takes Escape from its own document listener, which runs after this
|
|
250
|
+
// one, so leave the key for it. Its preventDefault() keeps the native dialog open.
|
|
251
|
+
if (this.modalRef && hasOpenPopover(this.modalRef))
|
|
252
|
+
return;
|
|
195
253
|
// Always prevent native dialog close behavior
|
|
196
254
|
e.preventDefault();
|
|
197
255
|
// Only close if backdropDismiss is enabled and this is the innermost modal
|
|
198
|
-
if (this.backdropDismiss && this.
|
|
256
|
+
if (this.backdropDismiss && eventSnapshot.__pdsInnermostModalAtEscape === this.el) {
|
|
199
257
|
this.hideModal();
|
|
200
258
|
}
|
|
201
259
|
return;
|
|
@@ -255,8 +313,6 @@ export class PdsModal {
|
|
|
255
313
|
}
|
|
256
314
|
componentDidLoad() {
|
|
257
315
|
this.modalRef = this.el.querySelector('.pds-modal__backdrop');
|
|
258
|
-
// Add keyboard event listener
|
|
259
|
-
document.addEventListener('keydown', this.handleKeyDown);
|
|
260
316
|
// @Watch('open') only fires on a later change, not the prop's initial
|
|
261
317
|
// value — a modal mounted with `open` already true (static markup, or a
|
|
262
318
|
// framework passing it on first render) would otherwise never call
|
|
@@ -272,9 +328,18 @@ export class PdsModal {
|
|
|
272
328
|
componentDidRender() {
|
|
273
329
|
unwrapReconnectedContent(this.el.querySelector('.pds-modal'), 'dialog.pds-modal__backdrop', '.pds-modal');
|
|
274
330
|
}
|
|
331
|
+
// Here rather than in componentDidLoad, which runs once: a modal taken out of the page and put
|
|
332
|
+
// back (a morph or a framework moving it) gets its keyboard handling, and its place among the
|
|
333
|
+
// open modals, back too. Adding the same listener twice is a no-op.
|
|
334
|
+
connectedCallback() {
|
|
335
|
+
document.addEventListener('keydown', this.handleKeyDown);
|
|
336
|
+
if (this.open && !openModals.has(this.el))
|
|
337
|
+
openModals.set(this.el, ++openSequence);
|
|
338
|
+
}
|
|
275
339
|
disconnectedCallback() {
|
|
276
340
|
// Clean up event listener
|
|
277
341
|
document.removeEventListener('keydown', this.handleKeyDown);
|
|
342
|
+
openModals.delete(this.el);
|
|
278
343
|
}
|
|
279
344
|
handleOpenChange(newValue) {
|
|
280
345
|
if (newValue) {
|
|
@@ -339,6 +404,9 @@ export class PdsModal {
|
|
|
339
404
|
this.modalRef.showModal();
|
|
340
405
|
}
|
|
341
406
|
this.open = true;
|
|
407
|
+
// Showing an open modal again doesn't move it above one opened after it.
|
|
408
|
+
if (!openModals.has(this.el))
|
|
409
|
+
openModals.set(this.el, ++openSequence);
|
|
342
410
|
// Update focusable elements and set initial focus
|
|
343
411
|
// Using a longer timeout to ensure all components are fully rendered
|
|
344
412
|
setTimeout(() => {
|
|
@@ -401,6 +469,7 @@ export class PdsModal {
|
|
|
401
469
|
const focusAlreadyMovedElsewhere = activeElement !== null && activeElement !== document.body && !this.modalRef.contains(activeElement);
|
|
402
470
|
this.modalRef.close();
|
|
403
471
|
this.open = false;
|
|
472
|
+
openModals.delete(this.el);
|
|
404
473
|
// Restore focus to the element that was focused before the modal was opened
|
|
405
474
|
if (!focusAlreadyMovedElsewhere &&
|
|
406
475
|
this.previousActiveElement &&
|
|
@@ -419,7 +488,9 @@ export class PdsModal {
|
|
|
419
488
|
*/
|
|
420
489
|
getBackdropZIndex(modal) {
|
|
421
490
|
const backdrop = modal.querySelector('.pds-modal__backdrop');
|
|
422
|
-
|
|
491
|
+
// `auto` (no z-index token loaded) parses to NaN, which no comparison can rank.
|
|
492
|
+
const zIndex = backdrop ? parseInt(getComputedStyle(backdrop).zIndex, 10) : -1;
|
|
493
|
+
return Number.isNaN(zIndex) ? 0 : zIndex;
|
|
423
494
|
}
|
|
424
495
|
/**
|
|
425
496
|
* Whether `active` sits inside a surface actually stacked above this modal.
|
|
@@ -446,7 +517,8 @@ export class PdsModal {
|
|
|
446
517
|
* lose that evidence depending on listener order.
|
|
447
518
|
*/
|
|
448
519
|
isStackedAboveOverlay(active, topLayerDialog, topLayerDialogWasModal) {
|
|
449
|
-
|
|
520
|
+
// A top-layer dialog this modal sits inside is underneath it, not an overlay above.
|
|
521
|
+
if (topLayerDialog && topLayerDialog !== this.modalRef && topLayerDialogWasModal && !containsComposed(topLayerDialog, this.el)) {
|
|
450
522
|
return true;
|
|
451
523
|
}
|
|
452
524
|
const ownZIndex = this.getBackdropZIndex(this.el);
|
|
@@ -462,24 +534,37 @@ export class PdsModal {
|
|
|
462
534
|
return false;
|
|
463
535
|
}
|
|
464
536
|
/**
|
|
465
|
-
*
|
|
537
|
+
* The open modal that takes Escape or a backdrop click, among those with no other open modal
|
|
538
|
+
* inside them (a nested modal's backdrop can share its outer modal's z-index). A top-layer dialog
|
|
539
|
+
* (or a modal inside one) paints above anything outside it, and within the top layer the last
|
|
540
|
+
* opened is on top. Modals in the same layer (the page, or one top-layer dialog) then rank by
|
|
541
|
+
* the highest backdrop, then the one later in the page.
|
|
466
542
|
*/
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
const
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
//
|
|
473
|
-
const
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
543
|
+
innermostOpenModal() {
|
|
544
|
+
const open = Array.from(openModals.keys()).filter(modal => modal.isConnected);
|
|
545
|
+
const innermost = open.filter(modal => !open.some(other => other !== modal && containsComposed(modal, other)));
|
|
546
|
+
const byDocumentOrder = [...innermost].sort((a, b) => (precedesComposed(a, b) ? -1 : 1));
|
|
547
|
+
// A modal inside a top-layer dialog paints in that dialog's place in the top layer, even when it
|
|
548
|
+
// isn't in the top layer itself (disableTopLayer), so that dialog's open order ranks it first.
|
|
549
|
+
const rank = (modal) => {
|
|
550
|
+
var _a;
|
|
551
|
+
const backdrop = modal.querySelector('.pds-modal__backdrop');
|
|
552
|
+
const topLayerDialog = backdrop ? closest('dialog:modal', backdrop) : null;
|
|
553
|
+
const topLayerModal = topLayerDialog === null || topLayerDialog === void 0 ? void 0 : topLayerDialog.closest('pds-modal');
|
|
554
|
+
const layer = topLayerDialog ? ((_a = (topLayerModal && openModals.get(topLayerModal))) !== null && _a !== void 0 ? _a : 0) : 0;
|
|
555
|
+
return [topLayerDialog ? 1 : 0, layer, this.getBackdropZIndex(modal), byDocumentOrder.indexOf(modal)];
|
|
556
|
+
};
|
|
557
|
+
let top = null;
|
|
558
|
+
let topRank = [-1, -1, -1, -1];
|
|
559
|
+
for (const modal of innermost) {
|
|
560
|
+
const modalRank = rank(modal);
|
|
561
|
+
const above = modalRank.findIndex((value, i) => value !== topRank[i]);
|
|
562
|
+
if (above >= 0 && modalRank[above] > topRank[above]) {
|
|
563
|
+
top = modal;
|
|
564
|
+
topRank = modalRank;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
return top;
|
|
483
568
|
}
|
|
484
569
|
/** Whether a modal dialog other than this one sits between the focused element and this modal. */
|
|
485
570
|
modalDialogAbove(active) {
|
|
@@ -519,14 +604,14 @@ export class PdsModal {
|
|
|
519
604
|
}
|
|
520
605
|
render() {
|
|
521
606
|
const [sizeClass = 'md', customSize] = this.resolveSize();
|
|
522
|
-
return (h("dialog", { key: '
|
|
607
|
+
return (h("dialog", { key: '0633d4e8a7cb81f2f9280e754564960a00a4d60b', class: {
|
|
523
608
|
'pds-modal__backdrop': true,
|
|
524
609
|
'open': this.open
|
|
525
|
-
}, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, h("div", { key: '
|
|
610
|
+
}, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick, onCancel: this.handleCancel }, h("div", { key: '466f8a3476cf066817554f47ec7d3a0e3ab10b89', class: {
|
|
526
611
|
'pds-modal': true,
|
|
527
612
|
[`pds-modal--${sizeClass}`]: true,
|
|
528
613
|
'pds-modal--scrollable': this.scrollable
|
|
529
|
-
}, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, h("slot", { key: '
|
|
614
|
+
}, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, h("slot", { key: '01ca45c96540416216a1082bad52b137720f0f4d' }))));
|
|
530
615
|
}
|
|
531
616
|
static get is() { return "pds-modal"; }
|
|
532
617
|
static get originalStyleUrls() {
|
|
@@ -556,7 +641,7 @@ export class PdsModal {
|
|
|
556
641
|
"name": "default",
|
|
557
642
|
"text": "true"
|
|
558
643
|
}],
|
|
559
|
-
"text": "Whether the modal can be dismissed by clicking the backdrop"
|
|
644
|
+
"text": "Whether the modal can be dismissed by clicking the backdrop, pressing Escape, or the browser's\nown close request (such as a back gesture)"
|
|
560
645
|
},
|
|
561
646
|
"getter": false,
|
|
562
647
|
"setter": false,
|
|
@@ -77,7 +77,7 @@ export class MockPdsModal {
|
|
|
77
77
|
'pds-modal__backdrop': true,
|
|
78
78
|
'open': this.open,
|
|
79
79
|
};
|
|
80
|
-
return (h("div", { key: '
|
|
80
|
+
return (h("div", { key: '3a526f6883d7e7df35985a145962f656621535c1', class: backdropClasses }, h("div", { key: '3af0487dc8c8831903cd7c22ffbf3e708b067ad7', class: modalClasses, role: "dialog", "aria-modal": "true", "aria-labelledby": this.componentId ? `${this.componentId}-heading` : null, part: "modal" }, h("div", { key: '94e6205042ee91dac0823901cc97b79e93a515f2', class: "pds-modal__header" }, h("slot", { key: 'ca04b575ccceabd431e3f5c57189f17f9aae6089', name: "header" })), h("div", { key: 'f8327a261e70b622add1dd4ee21b5f8e8d91e603', class: "pds-modal-content" }, h("slot", { key: 'a1a9c30d0f5479b0004ace4544e3d96ae87465be' })), h("div", { key: 'af5fa59922047eeec7cbf0a0e1ee4b472b16079c', class: "pds-modal__footer" }, h("slot", { key: '3c469bf94bb3a26dfd8046a5eda481f9d55edca1', name: "footer" })))));
|
|
81
81
|
}
|
|
82
82
|
static get is() { return "mock-pds-modal"; }
|
|
83
83
|
static get originalStyleUrls() {
|
|
@@ -535,11 +535,12 @@ export class PdsMultiselect {
|
|
|
535
535
|
}
|
|
536
536
|
/**
|
|
537
537
|
* Handle global keyboard events for accessibility.
|
|
538
|
-
* Closes dropdown on Escape key press regardless of focus location.
|
|
538
|
+
* Closes dropdown on Escape key press regardless of focus location. Taken in document's capture
|
|
539
|
+
* phase, before a modal around the multiselect hears it on document and closes too.
|
|
539
540
|
*/
|
|
540
541
|
handleWindowKeyDown(event) {
|
|
541
542
|
var _a;
|
|
542
|
-
if (!this.isOpen)
|
|
543
|
+
if (!this.isOpen || event.defaultPrevented)
|
|
543
544
|
return;
|
|
544
545
|
if (event.key === 'Escape') {
|
|
545
546
|
event.preventDefault();
|
|
@@ -1229,10 +1230,10 @@ export class PdsMultiselect {
|
|
|
1229
1230
|
}
|
|
1230
1231
|
render() {
|
|
1231
1232
|
const hasSelections = this.selectedItems.length > 0;
|
|
1232
|
-
return (h(Host, { key: '
|
|
1233
|
+
return (h(Host, { key: 'fcc35a82c16d5cf35a49ce997f19618104f9cc45', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: '72d1fdf759d9173f54bac80ec50aff651fd2b357', class: "pds-multiselect", onFocusout: this.handleContainerFocusOut }, this.label && (h("label", { key: 'e28f02c2beb23dc2c0deefadbd0645b20d938d91', id: `${this.componentId}-label`, htmlFor: this.componentId, class: {
|
|
1233
1234
|
'pds-multiselect__label': true,
|
|
1234
1235
|
'visually-hidden': this.hideLabel,
|
|
1235
|
-
} }, this.label)), h("div", { key: '
|
|
1236
|
+
} }, this.label)), h("div", { key: '06539bf2c4b8da2889505a9f042d5cd6721b1853', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), style: { width: this.triggerWidth } }, this.slottedTriggerEl ? (h("slot", { name: "trigger" })) : this.selectedDisplay === 'pill' && this.pillPosition === 'inline' ? (h("div", { ref: el => (this.pillInlineTriggerEl = el || undefined), part: "trigger", class: {
|
|
1236
1237
|
'pds-multiselect__trigger': true,
|
|
1237
1238
|
'pds-multiselect__trigger--open': this.isOpen,
|
|
1238
1239
|
'pds-multiselect__trigger--disabled': this.disabled,
|
|
@@ -1248,7 +1249,7 @@ export class PdsMultiselect {
|
|
|
1248
1249
|
}, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, h("span", { class: {
|
|
1249
1250
|
'pds-multiselect__trigger-text': true,
|
|
1250
1251
|
'pds-multiselect__trigger-text--placeholder': !hasSelections || (this.selectedDisplay === 'pill' && this.pillPosition === 'below'),
|
|
1251
|
-
} }, this.getTriggerText()), h("pds-icon", { "aria-hidden": "true", class: "pds-multiselect__icon", icon: enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), h("span", { key: '
|
|
1252
|
+
} }, this.getTriggerText()), h("pds-icon", { "aria-hidden": "true", class: "pds-multiselect__icon", icon: enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), h("span", { key: '3364fc00bc744fcd599436a9cb6dc563564d89d9', class: "visually-hidden", "aria-live": "polite", "aria-atomic": "true" }, this.removalAnnouncement), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (h("p", { key: 'bf712c65b9acb66e2998a43686fed408fc1ff48a', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (h("p", { key: 'b485db6c2c3ae312cce2b90db60e850ad6dfdcf5', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: '20daf861cf9584f33f5a9574e9581acc487e7dfe', icon: danger, size: "small" }), this.errorMessage)), h("div", { key: '018d333254771695a8c191f1cea40af6e78427a2', style: { display: 'none' } }, h("slot", { key: '2ef4a01fbe5d294a9ead5cc1183c28341834539b' })))));
|
|
1252
1253
|
}
|
|
1253
1254
|
static get is() { return "pds-multiselect"; }
|
|
1254
1255
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2488,8 +2489,8 @@ export class PdsMultiselect {
|
|
|
2488
2489
|
return [{
|
|
2489
2490
|
"name": "keydown",
|
|
2490
2491
|
"method": "handleWindowKeyDown",
|
|
2491
|
-
"target": "
|
|
2492
|
-
"capture":
|
|
2492
|
+
"target": "document",
|
|
2493
|
+
"capture": true,
|
|
2493
2494
|
"passive": false
|
|
2494
2495
|
}];
|
|
2495
2496
|
}
|