@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
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
-
import { containsComposed } from "../../utils/closest";
|
|
2
|
+
import { closest, containsComposed } from "../../utils/closest";
|
|
3
3
|
import { restoreReflectedDefault } from "../../utils/reflected-attribute-default";
|
|
4
4
|
import { setAttributesIfChanged } from "../../utils/attributes";
|
|
5
|
+
import { cssEscape } from "../../utils/css";
|
|
6
|
+
import { limitRestores } from "../../utils/keep-hydrated";
|
|
7
|
+
/** Open auto popovers, in the order they opened: Escape goes to the last one it applies to. */
|
|
8
|
+
const openAutoPopovers = [];
|
|
9
|
+
/** The focused element, followed down through shadow roots to the control that has focus. */
|
|
10
|
+
function deepActiveElement() {
|
|
11
|
+
var _a;
|
|
12
|
+
let active = document.activeElement;
|
|
13
|
+
while ((_a = active === null || active === void 0 ? void 0 : active.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement)
|
|
14
|
+
active = active.shadowRoot.activeElement;
|
|
15
|
+
return active;
|
|
16
|
+
}
|
|
5
17
|
/**
|
|
6
18
|
* @slot trigger - The trigger element for the popover
|
|
7
19
|
* @slot (default) - The content to display inside the popover
|
|
@@ -34,7 +46,7 @@ export class PdsPopover {
|
|
|
34
46
|
*/
|
|
35
47
|
this.triggerObserver = null;
|
|
36
48
|
/**
|
|
37
|
-
* Portal element
|
|
49
|
+
* Portal element: in document.body, or in the open dialog the popover is in
|
|
38
50
|
*/
|
|
39
51
|
this.portalEl = null;
|
|
40
52
|
/**
|
|
@@ -130,6 +142,26 @@ export class PdsPopover {
|
|
|
130
142
|
break;
|
|
131
143
|
}
|
|
132
144
|
};
|
|
145
|
+
/** The focus style copied into a shadow root the panel opened in, which `document.head` can't reach. */
|
|
146
|
+
this.shadowFocusStyle = null;
|
|
147
|
+
/** The dialog the panel was opened in, closed along with it. */
|
|
148
|
+
this.watchedDialog = null;
|
|
149
|
+
this.onDialogClose = () => {
|
|
150
|
+
this.hide();
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Inside a dialog, the panel can sit in a form that wraps the dialog, which a body portal never
|
|
154
|
+
* did. A submit from the panel (a button in it, or Enter in a field in it) is stopped, so the
|
|
155
|
+
* panel behaves as it does in the body.
|
|
156
|
+
*/
|
|
157
|
+
this.handleSubmitFromPanel = (event) => {
|
|
158
|
+
if (!this.portalEl || !containsComposed(event.target, this.portalEl))
|
|
159
|
+
return;
|
|
160
|
+
if (containsComposed(this.portalEl, event.submitter) || containsComposed(this.portalEl, deepActiveElement())) {
|
|
161
|
+
event.preventDefault();
|
|
162
|
+
event.stopPropagation();
|
|
163
|
+
}
|
|
164
|
+
};
|
|
133
165
|
}
|
|
134
166
|
restorePlacementDefault(newValue) {
|
|
135
167
|
this.placement = restoreReflectedDefault(this.el, 'placement', newValue, 'right');
|
|
@@ -166,7 +198,8 @@ export class PdsPopover {
|
|
|
166
198
|
this.triggerObserver = null;
|
|
167
199
|
if (this.triggerEl == null || typeof MutationObserver === 'undefined')
|
|
168
200
|
return;
|
|
169
|
-
|
|
201
|
+
// Capped against a script that keeps undoing it; opening and closing still write it directly.
|
|
202
|
+
this.triggerObserver = new MutationObserver(limitRestores(() => this.linkTriggerToPortal(), 'pds-popover: stopped restoring its trigger ARIA, as another script keeps changing it. It may be wrong until the popover opens or closes.', this.triggerEl));
|
|
170
203
|
this.triggerObserver.observe(this.triggerEl, {
|
|
171
204
|
attributes: true,
|
|
172
205
|
attributeFilter: ['aria-expanded', 'aria-controls'],
|
|
@@ -176,9 +209,9 @@ export class PdsPopover {
|
|
|
176
209
|
// This mirrors the native Popover API's accessibility behavior
|
|
177
210
|
linkTriggerToPortal() {
|
|
178
211
|
if (this.triggerEl == null || this.portalEl == null)
|
|
179
|
-
return;
|
|
212
|
+
return false;
|
|
180
213
|
// Skips values already in place, so the trigger observer's own callback doesn't loop.
|
|
181
|
-
setAttributesIfChanged(this.triggerEl, { 'aria-expanded': String(this.active), 'aria-controls': this.portalEl.id });
|
|
214
|
+
return setAttributesIfChanged(this.triggerEl, { 'aria-expanded': String(this.active), 'aria-controls': this.portalEl.id });
|
|
182
215
|
}
|
|
183
216
|
// componentDidLoad doesn't run again when a popover comes back, so rebuild whatever
|
|
184
217
|
// disconnectedCallback tore down. Each step is a no-op when nothing was.
|
|
@@ -191,19 +224,23 @@ export class PdsPopover {
|
|
|
191
224
|
(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.addEventListener('click', this.handleTriggerClick);
|
|
192
225
|
this.observeTrigger();
|
|
193
226
|
this.linkTriggerToPortal();
|
|
194
|
-
// Still open after a move: the trigger moved, so the portal follows it
|
|
227
|
+
// Still open after a move: the trigger moved, so the portal follows it, into the dialog it
|
|
228
|
+
// is in now, if any.
|
|
195
229
|
if (this.active) {
|
|
230
|
+
this.placePortal();
|
|
196
231
|
requestAnimationFrame(() => this.handlePopoverPositioning());
|
|
197
232
|
}
|
|
198
233
|
}
|
|
199
234
|
disconnectedCallback() {
|
|
200
235
|
var _a;
|
|
201
236
|
// Moved in one operation (a DOM morph, or a framework reparenting it), the popover is
|
|
202
|
-
// already back in the page. Its portal is
|
|
203
|
-
// where it was.
|
|
237
|
+
// already back in the page. Its portal is outside the popover, so it stays open, with focus
|
|
238
|
+
// where it was; connectedCallback moves it to follow the popover.
|
|
204
239
|
if (this.el.isConnected)
|
|
205
240
|
return;
|
|
206
241
|
this.isComponentMounted = false;
|
|
242
|
+
this.unwatchDialogClose();
|
|
243
|
+
this.forgetOpen();
|
|
207
244
|
// Open, the content sits in the portal; put it back before the portal goes. Only listeners on
|
|
208
245
|
// the popover itself hear the close event now, but those are the ones mirroring its state.
|
|
209
246
|
if (this.active) {
|
|
@@ -224,6 +261,7 @@ export class PdsPopover {
|
|
|
224
261
|
// Clean up all event listeners
|
|
225
262
|
this.removeLightDismissListeners();
|
|
226
263
|
this.removeScrollAndResizeListeners();
|
|
264
|
+
document.removeEventListener('submit', this.handleSubmitFromPanel, true);
|
|
227
265
|
// Clear any pending debounce timers
|
|
228
266
|
this.clearDebounceTimers();
|
|
229
267
|
// Remove portal from DOM
|
|
@@ -268,9 +306,6 @@ export class PdsPopover {
|
|
|
268
306
|
else {
|
|
269
307
|
this.portalEl.id = `${this.componentId}-portal`;
|
|
270
308
|
}
|
|
271
|
-
// Add accessibility attributes for screen readers
|
|
272
|
-
// Note: Native Popover API doesn't add a specific role, keeping semantic HTML
|
|
273
|
-
this.portalEl.setAttribute('aria-modal', 'false'); // Not a modal, can interact with rest of page
|
|
274
309
|
// Append to body
|
|
275
310
|
document.body.appendChild(this.portalEl);
|
|
276
311
|
// Add global focus styles to match Pine design system
|
|
@@ -285,22 +320,25 @@ export class PdsPopover {
|
|
|
285
320
|
if (!this.portalEl)
|
|
286
321
|
return;
|
|
287
322
|
const portalId = this.portalEl.id;
|
|
323
|
+
// componentId comes from the consumer, so it can carry characters cssEscape needs to
|
|
324
|
+
// neutralize before the id is used as a selector or interpolated into stylesheet text.
|
|
325
|
+
const escapedPortalId = cssEscape(portalId);
|
|
288
326
|
// Check if style element already exists
|
|
289
|
-
const existingStyle = document.querySelector(`style[data-pds-popover-focus="${
|
|
327
|
+
const existingStyle = document.querySelector(`style[data-pds-popover-focus="${escapedPortalId}"]`);
|
|
290
328
|
if (existingStyle)
|
|
291
329
|
return;
|
|
292
330
|
// Create style element with Pine's focus ring styles and dark mode border
|
|
293
331
|
const styleEl = document.createElement('style');
|
|
294
332
|
styleEl.setAttribute('data-pds-popover-focus', portalId);
|
|
295
333
|
styleEl.textContent = `
|
|
296
|
-
#${
|
|
334
|
+
#${escapedPortalId}:focus {
|
|
297
335
|
outline: var(--pine-outline-focus, 2px solid var(--pine-color-focus-ring, #6366f1)) !important;
|
|
298
336
|
outline-offset: var(--pine-border-width, 1px);
|
|
299
337
|
}
|
|
300
|
-
#${
|
|
338
|
+
#${escapedPortalId}:focus:not(:focus-visible) {
|
|
301
339
|
outline: none;
|
|
302
340
|
}
|
|
303
|
-
[data-theme="dark"] #${
|
|
341
|
+
[data-theme="dark"] #${escapedPortalId} {
|
|
304
342
|
border: var(--pine-border);
|
|
305
343
|
}
|
|
306
344
|
`;
|
|
@@ -351,7 +389,27 @@ export class PdsPopover {
|
|
|
351
389
|
// Clear tracking array
|
|
352
390
|
this.movedNodes = [];
|
|
353
391
|
}
|
|
392
|
+
copyFocusStylesInto(root) {
|
|
393
|
+
var _a, _b, _c;
|
|
394
|
+
// Outside a shadow root the document's own style applies, so drop a copy left in one.
|
|
395
|
+
if (!(root instanceof ShadowRoot)) {
|
|
396
|
+
(_a = this.shadowFocusStyle) === null || _a === void 0 ? void 0 : _a.remove();
|
|
397
|
+
this.shadowFocusStyle = null;
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
if (((_b = this.shadowFocusStyle) === null || _b === void 0 ? void 0 : _b.parentNode) === root || !this.portalEl)
|
|
401
|
+
return;
|
|
402
|
+
const source = document.querySelector(`style[data-pds-popover-focus="${cssEscape(this.portalEl.id)}"]`);
|
|
403
|
+
if (!source)
|
|
404
|
+
return;
|
|
405
|
+
(_c = this.shadowFocusStyle) === null || _c === void 0 ? void 0 : _c.remove();
|
|
406
|
+
this.shadowFocusStyle = source.cloneNode(true);
|
|
407
|
+
root.appendChild(this.shadowFocusStyle);
|
|
408
|
+
}
|
|
354
409
|
removePortal() {
|
|
410
|
+
var _a;
|
|
411
|
+
(_a = this.shadowFocusStyle) === null || _a === void 0 ? void 0 : _a.remove();
|
|
412
|
+
this.shadowFocusStyle = null;
|
|
355
413
|
if (this.portalEl) {
|
|
356
414
|
// Remove the portal element from DOM
|
|
357
415
|
if (this.portalEl.parentNode) {
|
|
@@ -359,7 +417,7 @@ export class PdsPopover {
|
|
|
359
417
|
}
|
|
360
418
|
// Remove the associated focus style element
|
|
361
419
|
const portalId = this.portalEl.id;
|
|
362
|
-
const styleEl = document.querySelector(`style[data-pds-popover-focus="${portalId}"]`);
|
|
420
|
+
const styleEl = document.querySelector(`style[data-pds-popover-focus="${cssEscape(portalId)}"]`);
|
|
363
421
|
if (styleEl && styleEl.parentNode) {
|
|
364
422
|
styleEl.parentNode.removeChild(styleEl);
|
|
365
423
|
}
|
|
@@ -376,9 +434,13 @@ export class PdsPopover {
|
|
|
376
434
|
// Record open timestamp to prevent immediate close from opening click
|
|
377
435
|
this.openTimestamp = Date.now();
|
|
378
436
|
this.linkTriggerToPortal();
|
|
437
|
+
this.placePortal();
|
|
379
438
|
// Update portal content with latest slot content
|
|
380
439
|
this.updatePortalContent();
|
|
381
|
-
// Show portal
|
|
440
|
+
// Show portal. The attribute tells a modal around it that this popover takes Escape first; only
|
|
441
|
+
// an auto popover listens for Escape.
|
|
442
|
+
if (this.popoverType === 'auto')
|
|
443
|
+
this.portalEl.setAttribute('data-pds-popover-open', '');
|
|
382
444
|
this.portalEl.style.display = 'block';
|
|
383
445
|
this.portalEl.style.opacity = '1';
|
|
384
446
|
this.portalEl.style.visibility = 'visible';
|
|
@@ -390,8 +452,10 @@ export class PdsPopover {
|
|
|
390
452
|
});
|
|
391
453
|
// Add scroll and resize listeners for repositioning (always)
|
|
392
454
|
this.addScrollAndResizeListeners();
|
|
455
|
+
document.addEventListener('submit', this.handleSubmitFromPanel, true);
|
|
393
456
|
// Add document listeners for light dismiss and escape key (auto type only)
|
|
394
457
|
if (this.popoverType === 'auto') {
|
|
458
|
+
openAutoPopovers.push(this);
|
|
395
459
|
this.addLightDismissListeners();
|
|
396
460
|
}
|
|
397
461
|
// Emit open event
|
|
@@ -407,12 +471,16 @@ export class PdsPopover {
|
|
|
407
471
|
if (!this.active || !this.portalEl)
|
|
408
472
|
return;
|
|
409
473
|
this.active = false;
|
|
410
|
-
|
|
411
|
-
|
|
474
|
+
this.unwatchDialogClose();
|
|
475
|
+
// Restoring the content drops its focus to the body, so check where focus is first. In a
|
|
476
|
+
// shadow root, document.activeElement is only its host.
|
|
477
|
+
const focusWasInside = containsComposed(this.portalEl, deepActiveElement());
|
|
412
478
|
this.linkTriggerToPortal();
|
|
413
479
|
// Restore content back to original slot positions
|
|
414
480
|
this.restorePortalContent();
|
|
415
|
-
// Hide portal
|
|
481
|
+
// Hide portal. The dark-mode border set in a shadow root is worked out again on the next open.
|
|
482
|
+
this.portalEl.style.border = '';
|
|
483
|
+
this.portalEl.removeAttribute('data-pds-popover-open');
|
|
416
484
|
this.portalEl.style.display = 'none';
|
|
417
485
|
this.portalEl.style.opacity = '0';
|
|
418
486
|
this.portalEl.style.visibility = 'hidden';
|
|
@@ -422,8 +490,10 @@ export class PdsPopover {
|
|
|
422
490
|
this.returnFocusToTrigger();
|
|
423
491
|
}
|
|
424
492
|
// Remove all listeners
|
|
493
|
+
this.forgetOpen();
|
|
425
494
|
this.removeLightDismissListeners();
|
|
426
495
|
this.removeScrollAndResizeListeners();
|
|
496
|
+
document.removeEventListener('submit', this.handleSubmitFromPanel, true);
|
|
427
497
|
// Clear any pending timers
|
|
428
498
|
this.clearDebounceTimers();
|
|
429
499
|
// Emit close event
|
|
@@ -443,6 +513,59 @@ export class PdsPopover {
|
|
|
443
513
|
this.show();
|
|
444
514
|
}
|
|
445
515
|
}
|
|
516
|
+
/**
|
|
517
|
+
* Puts the panel where it shows above everything around the popover. In an open dialog, it goes
|
|
518
|
+
* inside it: a modal dialog sits in the top layer above the body and makes the rest of the page
|
|
519
|
+
* inert, and a non-modal one sits above it by z-index. Right after the popover, it's next in the
|
|
520
|
+
* Tab order. In another component's slot, though, it would have no slot to render in, and in a
|
|
521
|
+
* form its buttons would submit it, so there it goes at the end of the dialog.
|
|
522
|
+
*/
|
|
523
|
+
placePortal() {
|
|
524
|
+
var _a, _b;
|
|
525
|
+
if (!this.portalEl)
|
|
526
|
+
return;
|
|
527
|
+
const dialog = closest('dialog[open]', this.el);
|
|
528
|
+
if (!dialog) {
|
|
529
|
+
this.unwatchDialogClose();
|
|
530
|
+
this.portalEl.style.border = '';
|
|
531
|
+
if (this.portalEl.parentElement !== document.body)
|
|
532
|
+
document.body.appendChild(this.portalEl);
|
|
533
|
+
this.copyFocusStylesInto(document);
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
const form = closest('form', this.el);
|
|
537
|
+
const besidePopover = !((_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.shadowRoot) && !(form && containsComposed(dialog, form));
|
|
538
|
+
if (besidePopover) {
|
|
539
|
+
if (this.el.nextElementSibling !== this.portalEl)
|
|
540
|
+
(_b = this.el.parentNode) === null || _b === void 0 ? void 0 : _b.insertBefore(this.portalEl, this.el.nextSibling);
|
|
541
|
+
}
|
|
542
|
+
else if (this.portalEl.parentNode !== dialog) {
|
|
543
|
+
dialog.appendChild(this.portalEl);
|
|
544
|
+
}
|
|
545
|
+
this.watchDialogClose(dialog);
|
|
546
|
+
const root = this.portalEl.getRootNode();
|
|
547
|
+
this.copyFocusStylesInto(root);
|
|
548
|
+
// In a shadow root, the copied dark-mode rule can't see a [data-theme="dark"] on the page.
|
|
549
|
+
this.portalEl.style.border = root instanceof ShadowRoot && closest('[data-theme="dark"]', this.el) ? 'var(--pine-border)' : '';
|
|
550
|
+
}
|
|
551
|
+
forgetOpen() {
|
|
552
|
+
const index = openAutoPopovers.indexOf(this);
|
|
553
|
+
if (index >= 0)
|
|
554
|
+
openAutoPopovers.splice(index, 1);
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Whether an Escape is this popover's. One from a dialog the popover isn't in belongs to that
|
|
558
|
+
* dialog when it's above it: a top-layer dialog or a pds-modal. A plain non-modal dialog inside
|
|
559
|
+
* the popover's modal doesn't close on Escape, so the popover takes it.
|
|
560
|
+
*/
|
|
561
|
+
takesEscapeFrom(event) {
|
|
562
|
+
var _a, _b;
|
|
563
|
+
const origin = ((_b = (_a = event.composedPath) === null || _a === void 0 ? void 0 : _a.call(event)[0]) !== null && _b !== void 0 ? _b : event.target);
|
|
564
|
+
const dialog = closest('dialog[open]', origin);
|
|
565
|
+
if (!dialog || containsComposed(dialog, this.portalEl))
|
|
566
|
+
return true;
|
|
567
|
+
return !(dialog.classList.contains('pds-modal__backdrop') || dialog.matches(':modal'));
|
|
568
|
+
}
|
|
446
569
|
/**
|
|
447
570
|
* Adds light dismiss listeners (click outside and escape key)
|
|
448
571
|
*/
|
|
@@ -451,6 +574,19 @@ export class PdsPopover {
|
|
|
451
574
|
document.addEventListener('click', this.boundClickOutsideHandler, true);
|
|
452
575
|
document.addEventListener('keydown', this.boundEscapeKeyHandler);
|
|
453
576
|
}
|
|
577
|
+
/** Closes the popover when the dialog it opened in closes, so it isn't left open inside. */
|
|
578
|
+
watchDialogClose(dialog) {
|
|
579
|
+
if (this.watchedDialog === dialog)
|
|
580
|
+
return;
|
|
581
|
+
this.unwatchDialogClose();
|
|
582
|
+
this.watchedDialog = dialog;
|
|
583
|
+
dialog.addEventListener('close', this.onDialogClose);
|
|
584
|
+
}
|
|
585
|
+
unwatchDialogClose() {
|
|
586
|
+
var _a;
|
|
587
|
+
(_a = this.watchedDialog) === null || _a === void 0 ? void 0 : _a.removeEventListener('close', this.onDialogClose);
|
|
588
|
+
this.watchedDialog = null;
|
|
589
|
+
}
|
|
454
590
|
/**
|
|
455
591
|
* Removes light dismiss listeners
|
|
456
592
|
*/
|
|
@@ -476,7 +612,7 @@ export class PdsPopover {
|
|
|
476
612
|
* Handles clicks outside the popover for light dismiss (auto type only)
|
|
477
613
|
*/
|
|
478
614
|
handleClickOutside(event) {
|
|
479
|
-
var _a, _b
|
|
615
|
+
var _a, _b;
|
|
480
616
|
// Ignore events that occurred at or before the popover opened
|
|
481
617
|
// This prevents the opening click from immediately closing the popover
|
|
482
618
|
// Convert event.timeStamp (DOMHighResTimeStamp from performance.now()) to epoch time
|
|
@@ -487,16 +623,18 @@ export class PdsPopover {
|
|
|
487
623
|
if (eventTime <= this.openTimestamp) {
|
|
488
624
|
return;
|
|
489
625
|
}
|
|
490
|
-
|
|
626
|
+
// In a shadow root, event.target is only its host.
|
|
627
|
+
const target = ((_b = (_a = event.composedPath) === null || _a === void 0 ? void 0 : _a.call(event)[0]) !== null && _b !== void 0 ? _b : event.target);
|
|
491
628
|
// A datepicker's calendar is portaled to the body: a click in the calendar of a datepicker
|
|
492
|
-
// inside this popover, in its content or its trigger, isn't outside it.
|
|
493
|
-
|
|
629
|
+
// inside this popover, in its content or its trigger, isn't outside it. The target can be
|
|
630
|
+
// inside the calendar's shadow root, so look up across it.
|
|
631
|
+
const calendar = closest('.pds-datepicker-calendar-portal', target);
|
|
494
632
|
const owner = calendar === null || calendar === void 0 ? void 0 : calendar.pdsDatepicker;
|
|
495
633
|
if (owner && (containsComposed(this.portalEl, owner) || containsComposed(this.triggerEl, owner)))
|
|
496
634
|
return;
|
|
497
635
|
// Check if click is outside both the popover portal and the trigger
|
|
498
|
-
const clickedInsidePopover = (
|
|
499
|
-
const clickedInsideTrigger = (
|
|
636
|
+
const clickedInsidePopover = containsComposed(this.portalEl, target);
|
|
637
|
+
const clickedInsideTrigger = containsComposed(this.triggerEl, target);
|
|
500
638
|
if (!clickedInsidePopover && !clickedInsideTrigger) {
|
|
501
639
|
this.hide();
|
|
502
640
|
}
|
|
@@ -517,14 +655,19 @@ export class PdsPopover {
|
|
|
517
655
|
* Mirrors native Popover API: Escape closes and returns focus to trigger
|
|
518
656
|
*/
|
|
519
657
|
handleEscapeKey(event) {
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
658
|
+
// A control inside that closes on Escape (a datepicker, a combobox) has handled it already.
|
|
659
|
+
if (event.key !== 'Escape' || event.defaultPrevented)
|
|
660
|
+
return;
|
|
661
|
+
// Like the native Popover API, Escape closes only the top popover: the last one opened that
|
|
662
|
+
// it applies to. Every open popover hears it, so each checks whether it's that one.
|
|
663
|
+
const top = [...openAutoPopovers].reverse().find(popover => popover.takesEscapeFrom(event));
|
|
664
|
+
if (top !== this)
|
|
665
|
+
return;
|
|
666
|
+
// Take the key, so the dialog or modal around it doesn't close too.
|
|
667
|
+
event.preventDefault();
|
|
668
|
+
event.stopPropagation();
|
|
669
|
+
// Close popover and return focus to trigger
|
|
670
|
+
this.hide();
|
|
528
671
|
}
|
|
529
672
|
/**
|
|
530
673
|
* Handles scroll events to reposition the popover (debounced for performance)
|
|
@@ -629,13 +772,20 @@ export class PdsPopover {
|
|
|
629
772
|
}
|
|
630
773
|
this.portalEl.style.top = `${top}px`;
|
|
631
774
|
this.portalEl.style.left = `${left}px`;
|
|
775
|
+
// `position: fixed` measures from the viewport unless an ancestor becomes its containing block,
|
|
776
|
+
// as a modal dialog does with its backdrop filter. Shift by however far it landed from the spot.
|
|
777
|
+
const placed = this.portalEl.getBoundingClientRect();
|
|
778
|
+
if (Math.abs(placed.top - top) > 0.5 || Math.abs(placed.left - left) > 0.5) {
|
|
779
|
+
this.portalEl.style.top = `${2 * top - placed.top}px`;
|
|
780
|
+
this.portalEl.style.left = `${2 * left - placed.left}px`;
|
|
781
|
+
}
|
|
632
782
|
// Reset the repositioning guard after a short delay
|
|
633
783
|
setTimeout(() => {
|
|
634
784
|
this.isRepositioning = false;
|
|
635
785
|
}, 16); // ~1 frame at 60fps
|
|
636
786
|
}
|
|
637
787
|
render() {
|
|
638
|
-
return (h(Host, { key: '
|
|
788
|
+
return (h(Host, { key: 'da8a0c715df1199231b1265085f3f9ae0234032d', id: this.componentId }, h("span", { key: 'f35023492399420829cec2e88556462f5ac1663e', class: "pds-popover__trigger-wrapper" }, h("slot", { key: '38ebe92eebb87665467b3f92ff94dc8095450063', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), h("div", { key: '8917930f4520544d14bbd68b4c7936dd60af19e3', class: "pds-popover__content-slot-wrapper" }, h("slot", { key: '28d3f9112256edd95721a79a7072a9e35a3712bf', onSlotchange: this.handleContentSlotChange }))));
|
|
639
789
|
}
|
|
640
790
|
static get is() { return "pds-popover"; }
|
|
641
791
|
static get encapsulation() { return "shadow"; }
|
|
@@ -30,7 +30,7 @@ export class PdsProgress {
|
|
|
30
30
|
const normalizedFillColor = normalizeColorValue(this.fillColor);
|
|
31
31
|
const hostClass = this.animated ? { 'is-animated': this.animated } : '';
|
|
32
32
|
this.hostKeeper.record(hostClass);
|
|
33
|
-
return (h(Host, { key: '
|
|
33
|
+
return (h(Host, { key: 'a224e1e9bc50433553ab8bf4b0d772f01148ee76', class: hostClass }, h("div", { key: '261742044f3d68c204cbf640cc4447eb6d74df11', class: "pds-progress" }, h("label", { key: 'd686bdc6ab450bf8c14dd56077525a3139593f46', class: "pds-progress__label", htmlFor: this.componentId }, this.label), h("progress", { key: 'c716e977a952a628aec600fa680aa9c3b8d0e996', id: this.componentId, max: "100", style: normalizedFillColor ? { '--color-progress-fill': normalizedFillColor } : {}, value: this.percent })), this.showPercent && h("div", { key: '44176a580b435f69993be4a60ee2e888b87e10fb', class: "pds-progress__percentage" }, this.percent, "%")));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "pds-progress"; }
|
|
36
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class PdsProperty {
|
|
|
10
10
|
this.icon = 'star';
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: 'd599b62be4bacf1d89afcc26b14fc93bdc9bb3a4', id: this.componentId }, h("pds-box", { key: 'd7f80f6598615c761d672893c8acab09bd9ea33f', "align-items": "center", gap: "xs" }, h("pds-icon", { key: '15a6a6545c2cd2332bd830451106b7b08adc39ff', icon: this.icon, size: "var(--pine-dimension-sm)", "aria-hidden": "true" }), h("slot", { key: '4e5661563b99ec56189447faabcdd1ae631159b2' }))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "pds-property"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -99,13 +99,13 @@ export class PdsRadio {
|
|
|
99
99
|
}
|
|
100
100
|
render() {
|
|
101
101
|
const renderLabelAndMessages = () => [
|
|
102
|
-
h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, h("input", { key: '
|
|
102
|
+
h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, h("input", { key: 'ccd618855831bcee309e815f2cd2712fd4e8fe1f', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, type: "radio", id: this.componentId, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleRadioChange, class: this.hasImage() ? 'visually-hidden' : '' }), h("span", { key: '2e372a880c28f48fb804bac2518208082c141fad', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)),
|
|
103
103
|
this.helperMessage && (h("div", { key: `${this.componentId}-helper`, class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage)),
|
|
104
|
-
this.errorMessage && (h("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '
|
|
104
|
+
this.errorMessage && (h("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '889d502575f6a162f450b6b58d76a6f6f1c74e4b', icon: danger, size: "small" }), this.errorMessage))
|
|
105
105
|
];
|
|
106
106
|
const hostClass = this.classNames();
|
|
107
107
|
this.hostKeeper.record(hostClass);
|
|
108
|
-
return (h(Host, { key: '
|
|
108
|
+
return (h(Host, { key: '374003032b28407581a55f1fb0a304c49acf3c16', class: hostClass }, this.hasImage() && (h("div", { key: '7eeb516267de1afcfa85fc7567999db488c2f4f5', class: "pds-radio__image-container", part: "image-container" }, h("slot", { key: 'a312fea06f0c015bffab3bb392ff04d4913fd1c0', name: "image", onSlotchange: () => (this._hasImage = this.hasImageSlot()) }))), this.hasImage() ? (h("div", { class: "pds-radio__content-wrapper" }, renderLabelAndMessages())) : (renderLabelAndMessages())));
|
|
109
109
|
}
|
|
110
110
|
static get is() { return "pds-radio"; }
|
|
111
111
|
static get encapsulation() { return "scoped"; }
|
|
@@ -161,13 +161,13 @@ export class PdsRadioGroup {
|
|
|
161
161
|
render() {
|
|
162
162
|
const gapValue = this.getGapValue();
|
|
163
163
|
const ariaDescribedBy = this.getAriaDescribedBy();
|
|
164
|
-
return (h(Host, { key: '
|
|
164
|
+
return (h(Host, { key: 'bf8063c1a99e272bb3f6bc647998a6ef103f8a71', class: this.classNames(), id: this._groupId, role: "group", "aria-describedby": ariaDescribedBy, style: {
|
|
165
165
|
'--pds-radio-group-gap': gapValue,
|
|
166
|
-
} }, this.groupLabel && (h("div", { key: '
|
|
166
|
+
} }, this.groupLabel && (h("div", { key: '8564ed3f8f99cdc1a0e5b189aacc6960923eb5f7', class: "pds-radio-group__label" }, this.groupLabel)), h("div", { key: '2309c9373790182cde030c1dbda88fa3bdcaaf12', class: {
|
|
167
167
|
'pds-radio-group__radios': true,
|
|
168
168
|
'pds-radio-group__radios--row': this.direction === 'row',
|
|
169
169
|
'pds-radio-group__radios--column': this.direction === 'column',
|
|
170
|
-
} }, h("slot", { key: '
|
|
170
|
+
} }, h("slot", { key: 'd88dde3c631e25c01bc7b6d3ef5d517255fabd1a', onSlotchange: () => this.updateChildRadios() })), this.helperMessage && (h("div", { key: 'a229214ed01663b0fc34f35e27c7148b4eb412ab', class: "pds-radio-group__message", id: messageId(this._groupId, 'helper') }, this.helperMessage)), this.errorMessage && (h("div", { key: 'dc092f2e6dbef0cb369cf00a6eccf9a095a0313d', class: "pds-radio-group__message pds-radio-group__message--error", id: messageId(this._groupId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: 'd242da328731e55fa52d8e624fdfc750bfa6cce4', icon: danger, size: "small" }), this.errorMessage))));
|
|
171
171
|
}
|
|
172
172
|
static get is() { return "pds-radio-group"; }
|
|
173
173
|
static get encapsulation() { return "scoped"; }
|
|
@@ -67,7 +67,7 @@ export class PdsRow {
|
|
|
67
67
|
'min-height': this.minHeight,
|
|
68
68
|
}));
|
|
69
69
|
this.hostKeeper.record(`pds-row ${rowClasses}`, rowInlineStyles);
|
|
70
|
-
return h(Host, { key: '
|
|
70
|
+
return h(Host, { key: '78a505fef7132f9545916155d2485a6d2df8f4a5', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
|
|
71
71
|
}
|
|
72
72
|
static get is() { return "pds-row"; }
|
|
73
73
|
static get originalStyleUrls() {
|
|
@@ -240,7 +240,7 @@ export class PdsSelect {
|
|
|
240
240
|
'has-action': hasAction && !this.hideLabel ? 'true' : null,
|
|
241
241
|
};
|
|
242
242
|
this.hostKeeper.record(hostClass, {}, hostAttributes);
|
|
243
|
-
return (h(Host, Object.assign({ key: '
|
|
243
|
+
return (h(Host, Object.assign({ key: '343ed671e67dd1d6f9eb284b07e06d59877c64e9', class: hostClass }, hostAttributes), h("div", { key: '650aed0869b02f658feb16ee99f17e1cd22e5a8e', class: "pds-select" }, !this.hideLabel && (h("div", { key: '74739461acbea33c92279ec8ec9042d6af1773c1', class: "pds-select__label-wrapper" }, h("label", { key: '1ad96ffd243000358edfbd79054ee770e1ba97d3', htmlFor: this.componentId }, h("span", { key: 'b832868db4f9cd4fd2f8313054d2e96e106189ab', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), hasAction && this.renderAction())), h("select", { key: 'e83c1a1a0a5646fc8abf9e50bc374f52b56be773', "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-label": this.hideLabel ? this.label : undefined, autocomplete: this.autocomplete || undefined, class: "pds-select__field", disabled: this.disabled, id: this.componentId, multiple: this.multiple, name: this.name, onBlur: this.onBlur, onChange: this.onSelectUpdate, onFocus: this.onFocus, onKeyDown: this.onKeyDown, part: "select", required: this.required, ref: (el) => (this.selectEl = el) }), h("div", { key: 'a34880120b88124b5122350856d023368f96abf7', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, h("slot", { key: 'df6abaf6a630761a32b263813181ff3453757e0d', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && h("pds-icon", { key: 'f9197284ef9965d693242a652b583f48bc3d7097', "aria-hidden": "true", class: "pds-select__select-icon", icon: enlarge }))));
|
|
244
244
|
}
|
|
245
245
|
static get is() { return "pds-select"; }
|
|
246
246
|
static get encapsulation() { return "shadow"; }
|
|
@@ -48,7 +48,7 @@ export class PdsSortableItem {
|
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
50
|
this.hostKeeper.record('pds-sortable-item');
|
|
51
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: '2065ccb474ae4b7032edc3c37aa6855f3048909d', class: "pds-sortable-item", id: this.componentId }, this.showHandle && (h("div", { key: '32385cc94837a3d0bc1c496615135c79274afe35', class: "pds-sortable-item__handle" }, h("pds-icon", { key: 'ea94e28b2867aa20622ca073dc31d3b4a11eebbb', "aria-hidden": "true", icon: handleIcon }))), h("slot", { key: 'fb18aa90be0b8fa3832a5dd2b02a7b571205341f' }), this.enableActions && (h("div", { key: '4c6e59d77a7b2183552533a544f4a70ce0cc7011', class: "pds-sortable-item__actions" }, h("slot", { key: '497b1ff88436175d9365a28032e109b6fa118e44', name: "sortable-item-actions" })))));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "pds-sortable-item"; }
|
|
54
54
|
static get encapsulation() { return "scoped"; }
|
|
@@ -70,7 +70,7 @@ export class PdsSortable {
|
|
|
70
70
|
render() {
|
|
71
71
|
const classNames = this.classNames();
|
|
72
72
|
this.hostKeeper.record(classNames);
|
|
73
|
-
return (h(Host, { key: '
|
|
73
|
+
return (h(Host, { key: 'a0e532d31561748b4632a6be9163562f990af804', class: classNames, id: this.componentId }, h("slot", { key: 'd1b0defb683f841e6708374fff4bf62eb7fd5080' })));
|
|
74
74
|
}
|
|
75
75
|
static get is() { return "pds-sortable"; }
|
|
76
76
|
static get encapsulation() { return "scoped"; }
|
|
@@ -101,9 +101,9 @@ export class PdsSwitch {
|
|
|
101
101
|
const hostClass = this.switchClassNames();
|
|
102
102
|
const ariaDisabled = this.disabled ? 'true' : null;
|
|
103
103
|
this.hostKeeper.record(hostClass, {}, { 'aria-disabled': ariaDisabled });
|
|
104
|
-
return (h(Host, { key: '
|
|
105
|
-
h("div", { key: '
|
|
106
|
-
h("div", { key: '
|
|
104
|
+
return (h(Host, { key: 'ee8576e523348ff9eed1b6087626849bb0966608', class: hostClass, "aria-disabled": ariaDisabled }, h("label", { key: '09433b5356d718be65f4f2eb61f35fff1d000e10', htmlFor: this.componentId }, h("input", Object.assign({ key: 'f996a0fad56119674cfb7d95e1444bf411b64396', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, checked: this.checked, class: "pds-switch__input", disabled: this.disabled, id: this.componentId, name: this.name ? this.name : this.componentId, onChange: this.onSwitchUpdate, required: this.required, type: "checkbox", value: this.value }, this.inheritedAttributes)), h("span", { key: '4b23305d3cc0f5b37b23c6b79a14cfba57c16816', class: this.hideLabel ? 'visually-hidden' : '' }, h("slot", { key: '258b5ccf0d4b01518df3a37772d694cb37569ffa', name: "label", onSlotchange: this.updateHasLabelSlot }), !this.hasLabelSlot && this.label)), this.helperMessage &&
|
|
105
|
+
h("div", { key: 'c8196fa2ce832de3a8c6d987a78fd65d791c4c59', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
106
|
+
h("div", { key: '948894dd2e642689af6cad545a0b31f7c4711d87', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: 'd4b72b49bfd38a396b8f7c0686e1b2ef92d65491', icon: danger, size: "small" }), this.errorMessage)));
|
|
107
107
|
}
|
|
108
108
|
static get is() { return "pds-switch"; }
|
|
109
109
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class PdsTableBody {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: '817532e93c8f91ef64cd0f90aa6c4372c3b7d83f', role: "rowgroup", part: "body" }, h("slot", { key: '296ba876c6716e85252a06008bd55d59624223e3' })));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "pds-table-body"; }
|
|
7
7
|
static get encapsulation() { return "shadow"; }
|
|
@@ -123,11 +123,11 @@ export class PdsTableCell {
|
|
|
123
123
|
return classNames.join(' ');
|
|
124
124
|
}
|
|
125
125
|
render() {
|
|
126
|
-
return (h(Host, { key: '
|
|
126
|
+
return (h(Host, { key: 'bedaeeb5723299656f872a760ed1dd80c7fe8793', class: this.classNames(), role: "gridcell", part: "cell", style: this.tableRef &&
|
|
127
127
|
this.tableRef.fixedColumn &&
|
|
128
128
|
this.tableRef.selectable
|
|
129
129
|
? { '--fixed-cell-position': '40px' }
|
|
130
|
-
: {} }, h("slot", { key: '
|
|
130
|
+
: {} }, h("slot", { key: '45182ee3e004097660432f552780b3d27671bd46' })));
|
|
131
131
|
}
|
|
132
132
|
static get is() { return "pds-table-cell"; }
|
|
133
133
|
static get encapsulation() { return "shadow"; }
|
|
@@ -42,7 +42,7 @@ export class PdsTableHead {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: 'de3faae735e90f5fde1258b5acb826f5f9dbd170', role: "row", part: "head" }, this.tableRef && this.tableRef.selectable && (h("pds-table-head-cell", { key: 'e590e57c8b37ec0ad18e96077401c4692bbd45a4', part: this.tableRef.selectable ? 'checkbox-cell' : '' }, !this.tableRef.disableSelectAll && (h("pds-checkbox", { key: '44ca7eda63185672939909e121a86e6502080a7d', componentId: this.generateUniqueId(), indeterminate: this.indeterminate, onInput: this.handleInput, label: "Select All Rows", hideLabel: true, checked: this.isSelected, part: "select-all-checkbox" })))), h("slot", { key: '0671df85d7989cff7266bfd3d1b4d62b332d2e81' })));
|
|
46
46
|
}
|
|
47
47
|
static get is() { return "pds-table-head"; }
|
|
48
48
|
static get encapsulation() { return "shadow"; }
|
|
@@ -199,11 +199,11 @@ export class PdsTableHeadCell {
|
|
|
199
199
|
return classNames.join(' ');
|
|
200
200
|
}
|
|
201
201
|
render() {
|
|
202
|
-
return (h(Host, { key: '
|
|
202
|
+
return (h(Host, { key: '13de42d136c5b037cd1545cd5b789b4660e23b87', class: this.classNames(), role: "columnheader", onClick: this.toggleSort, part: "head-cell", style: this.tableRef &&
|
|
203
203
|
this.tableRef.fixedColumn &&
|
|
204
204
|
this.tableRef.selectable
|
|
205
205
|
? { '--fixed-cell-position': '40px' }
|
|
206
|
-
: {} }, h("slot", { key: '
|
|
206
|
+
: {} }, h("slot", { key: '96084d87a34d7b601a8e8325f344f1fe6601204e' }), this.sortable && this.isActive && (h("pds-icon", { key: 'cba838fa029b280561676c2b57af7f8f00055511', icon: this.sortingDirection === 'asc' ? upSmall : downSmall, part: "sort-icon" }))));
|
|
207
207
|
}
|
|
208
208
|
static get is() { return "pds-table-head-cell"; }
|
|
209
209
|
static get encapsulation() { return "shadow"; }
|
|
@@ -137,7 +137,7 @@ export class PdsTableRow {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
render() {
|
|
140
|
-
return (h(Host, { key: '
|
|
140
|
+
return (h(Host, { key: '5323521abc5c2464299cf77520fb38ec81297866', class: this.classNames(), role: "row", part: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-cell", { key: 'eb94dd282f885d3466b6177b2454cbcc4f932466', part: this.tableRef.fixedColumn ? 'checkbox-cell' : 'checkbox-cell', class: this.tableRef.selectable ? 'has-checkbox' : '' }, h("pds-checkbox", { key: '222eaaedd4bebddc18cebf01bf4da81004773a96', componentId: this.generateUniqueId(), onPdsCheckboxChange: this.handleCheckboxChange, indeterminate: this.indeterminate, label: "Select Row", hideLabel: true, checked: this.isSelected, part: "row-checkbox" }))), h("slot", { key: '010f222fa02b1809ff818f7a030c2a12fc3e3abb' })));
|
|
141
141
|
}
|
|
142
142
|
static get is() { return "pds-table-row"; }
|
|
143
143
|
static get encapsulation() { return "shadow"; }
|