@pine-ds/core 4.4.2 → 4.4.4
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/closest.js +1 -1
- package/components/pds-avatar.js +1 -1
- package/components/pds-box2.js +1 -1
- package/components/pds-checkbox2.js +1 -1
- package/components/pds-chip2.js +1 -1
- package/components/pds-combobox.js +2 -2
- package/components/pds-copytext.js +1 -1
- package/components/pds-datepicker.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.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-popover.js +1 -1
- package/components/pds-progress.js +1 -1
- package/components/pds-radio-group.js +1 -1
- package/components/pds-radio.js +1 -1
- package/components/pds-row.js +1 -1
- package/components/pds-select.js +1 -1
- package/components/pds-sortable-item.js +1 -1
- package/components/pds-sortable.js +2 -2
- package/components/pds-switch.js +1 -1
- package/components/pds-table-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-tooltip.js +1 -1
- package/components/reflected-attribute-default.js +1 -0
- package/dist/cjs/attributes-DrQqSEv4.js +188 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pds-avatar.cjs.entry.js +17 -1
- package/dist/cjs/pds-box.cjs.entry.js +11 -1
- package/dist/cjs/pds-checkbox.cjs.entry.js +11 -4
- package/dist/cjs/pds-chip.cjs.entry.js +10 -1
- package/dist/cjs/pds-combobox.cjs.entry.js +11 -6
- package/dist/cjs/pds-copytext.cjs.entry.js +16 -1
- package/dist/cjs/pds-drawer-content.cjs.entry.js +1 -1
- package/dist/cjs/pds-drawer-footer.cjs.entry.js +1 -1
- package/dist/cjs/pds-drawer-header.cjs.entry.js +1 -1
- package/dist/cjs/pds-drawer.cjs.entry.js +2 -2
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +39 -9
- package/dist/cjs/pds-input.cjs.entry.js +1 -1
- package/dist/cjs/pds-loader.cjs.entry.js +27 -1
- package/dist/cjs/pds-modal-content.cjs.entry.js +2 -2
- package/dist/cjs/pds-modal-footer.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal-header.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal.cjs.entry.js +135 -49
- package/dist/cjs/pds-popover.cjs.entry.js +81 -13
- package/dist/cjs/pds-progress.cjs.entry.js +12 -1
- package/dist/cjs/pds-radio-group.cjs.entry.js +3 -3
- package/dist/cjs/pds-radio.cjs.entry.js +11 -3
- package/dist/cjs/pds-row.cjs.entry.js +11 -1
- package/dist/cjs/pds-select.cjs.entry.js +13 -1
- package/dist/cjs/pds-sortable-item.cjs.entry.js +10 -1
- package/dist/cjs/pds-sortable.cjs.entry.js +11 -1
- package/dist/cjs/pds-switch.cjs.entry.js +12 -4
- package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
- package/dist/cjs/pds-tabs.cjs.entry.js +13 -1
- package/dist/cjs/pds-textarea.cjs.entry.js +1 -1
- package/dist/cjs/pds-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/pine-core.cjs.js +1 -1
- package/dist/cjs/reflected-attribute-default-DVYHG6O1.js +44 -0
- package/dist/collection/components/pds-avatar/pds-avatar.js +20 -3
- package/dist/collection/components/pds-box/pds-box.js +14 -1
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +11 -4
- package/dist/collection/components/pds-chip/pds-chip.js +10 -1
- package/dist/collection/components/pds-combobox/pds-combobox.css +16 -2
- package/dist/collection/components/pds-combobox/pds-combobox.js +33 -5
- package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +41 -0
- package/dist/collection/components/pds-copytext/pds-copytext.js +17 -2
- package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +2 -1
- package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +4 -1
- package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +4 -1
- package/dist/collection/components/pds-drawer/pds-drawer.js +3 -2
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +39 -9
- package/dist/collection/components/pds-loader/pds-loader.js +29 -2
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +5 -2
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +4 -1
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +4 -1
- package/dist/collection/components/pds-modal/pds-modal.js +138 -49
- package/dist/collection/components/pds-popover/pds-popover.js +83 -14
- package/dist/collection/components/pds-progress/pds-progress.js +12 -1
- package/dist/collection/components/pds-radio/pds-radio.js +12 -3
- package/dist/collection/components/pds-radio-group/pds-radio-group.js +4 -3
- package/dist/collection/components/pds-row/pds-row.js +14 -1
- package/dist/collection/components/pds-select/pds-select.js +13 -1
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +11 -1
- package/dist/collection/components/pds-sortable/pds-sortable.js +14 -1
- package/dist/collection/components/pds-switch/pds-switch.js +12 -4
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +3 -0
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +4 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js +13 -1
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +3 -2
- package/dist/collection/utils/attributes.js +101 -0
- package/dist/collection/utils/reflected-attribute-default.js +40 -0
- package/dist/collection/utils/test/host-strip.js +50 -0
- package/dist/docs.json +129 -19
- package/dist/esm/attributes-myrJDwbR.js +183 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pds-avatar.entry.js +18 -2
- package/dist/esm/pds-box.entry.js +12 -2
- package/dist/esm/pds-checkbox.entry.js +11 -4
- package/dist/esm/pds-chip.entry.js +10 -1
- package/dist/esm/pds-combobox.entry.js +11 -6
- package/dist/esm/pds-copytext.entry.js +16 -1
- package/dist/esm/pds-drawer-content.entry.js +1 -1
- package/dist/esm/pds-drawer-footer.entry.js +1 -1
- package/dist/esm/pds-drawer-header.entry.js +1 -1
- package/dist/esm/pds-drawer.entry.js +2 -2
- package/dist/esm/pds-dropdown-menu.entry.js +39 -9
- package/dist/esm/pds-input.entry.js +1 -1
- package/dist/esm/pds-loader.entry.js +28 -2
- package/dist/esm/pds-modal-content.entry.js +2 -2
- package/dist/esm/pds-modal-footer.entry.js +1 -1
- package/dist/esm/pds-modal-header.entry.js +1 -1
- package/dist/esm/pds-modal.entry.js +135 -49
- package/dist/esm/pds-popover.entry.js +81 -13
- package/dist/esm/pds-progress.entry.js +13 -2
- package/dist/esm/pds-radio-group.entry.js +3 -3
- package/dist/esm/pds-radio.entry.js +11 -3
- package/dist/esm/pds-row.entry.js +12 -2
- package/dist/esm/pds-select.entry.js +13 -1
- package/dist/esm/pds-sortable-item.entry.js +10 -1
- package/dist/esm/pds-sortable.entry.js +11 -1
- package/dist/esm/pds-switch.entry.js +12 -4
- package/dist/esm/pds-tabpanel.entry.js +1 -1
- package/dist/esm/pds-tabs.entry.js +13 -1
- package/dist/esm/pds-textarea.entry.js +1 -1
- package/dist/esm/pds-tooltip.entry.js +2 -2
- package/dist/esm/pine-core.js +1 -1
- package/dist/esm/reflected-attribute-default-t3idJwV0.js +42 -0
- package/dist/esm-es5/attributes-myrJDwbR.js +1 -0
- package/dist/esm-es5/loader.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-checkbox.entry.js +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-combobox.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.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.entry.js +1 -1
- package/dist/esm-es5/pds-input.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-popover.entry.js +1 -1
- package/dist/esm-es5/pds-progress.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-tabpanel.entry.js +1 -1
- package/dist/esm-es5/pds-tabs.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/reflected-attribute-default-t3idJwV0.js +1 -0
- package/dist/pine-core/p-09d10e9e.entry.js +7 -0
- package/dist/pine-core/p-1feace6a.system.entry.js +1 -0
- package/dist/pine-core/p-21abd971.entry.js +1 -0
- package/dist/pine-core/p-2212224a.system.entry.js +1 -0
- package/dist/pine-core/p-2806fa55.system.entry.js +1 -0
- package/dist/pine-core/p-2dd3ab72.entry.js +1 -0
- package/dist/pine-core/p-30784d57.entry.js +1 -0
- package/dist/pine-core/p-3088cd66.entry.js +1 -0
- package/dist/pine-core/p-3e829372.system.entry.js +1 -0
- package/dist/pine-core/{p-67227922.entry.js → p-44cbdf94.system.entry.js} +1 -1
- package/dist/pine-core/p-4765f7f0.entry.js +1 -0
- package/dist/pine-core/{p-d00c5b9c.system.entry.js → p-48ab7da8.system.entry.js} +1 -1
- package/dist/pine-core/{p-c5c46b65.entry.js → p-4af5f936.entry.js} +1 -1
- package/dist/pine-core/{p-b823bde2.system.entry.js → p-5064f007.system.entry.js} +1 -1
- package/dist/pine-core/p-5081a96f.entry.js +1 -0
- package/dist/pine-core/p-51eb36f4.system.entry.js +3 -0
- package/dist/pine-core/p-5527e825.system.entry.js +1 -0
- package/dist/pine-core/{p-8d42f505.entry.js → p-5db91557.entry.js} +1 -1
- package/dist/pine-core/p-62377463.system.entry.js +1 -0
- package/dist/pine-core/{p-d11e4956.entry.js → p-63644dbd.entry.js} +1 -1
- package/dist/pine-core/p-6d6079f5.entry.js +1 -0
- package/dist/pine-core/p-7386bbdf.system.entry.js +1 -0
- package/dist/pine-core/p-74d93179.system.entry.js +1 -0
- package/dist/pine-core/p-7647b568.system.entry.js +1 -0
- package/dist/pine-core/{p-5e9396e2.system.entry.js → p-7698fcfa.system.entry.js} +1 -1
- package/dist/pine-core/{p-b802776b.system.entry.js → p-778a0228.system.entry.js} +1 -1
- package/dist/pine-core/{p-f5677949.system.entry.js → p-7a9c687d.system.entry.js} +1 -1
- package/dist/pine-core/{p-9b262a9d.entry.js → p-85d77b55.entry.js} +1 -1
- package/dist/pine-core/p-88728d46.system.entry.js +1 -0
- package/dist/pine-core/{p-6b25f349.system.entry.js → p-8d8512ae.system.entry.js} +1 -1
- package/dist/pine-core/p-93341083.system.entry.js +1 -0
- package/dist/pine-core/{p-871894e1.entry.js → p-95649e1c.entry.js} +1 -1
- package/dist/pine-core/p-97c04215.system.entry.js +1 -0
- package/dist/pine-core/p-9ca1b473.system.entry.js +1 -0
- package/dist/pine-core/p-Bkho_oFB.system.js +1 -0
- package/dist/pine-core/p-BwmzR47K.system.js +1 -0
- package/dist/pine-core/p-DO9XKAkv.system.js +1 -1
- package/dist/pine-core/p-a0f8a61a.entry.js +1 -0
- package/dist/pine-core/p-a232dc19.entry.js +1 -0
- package/dist/pine-core/p-a8884f2d.system.entry.js +1 -0
- package/dist/pine-core/{p-601b646c.system.entry.js → p-a8f23db0.system.entry.js} +1 -1
- package/dist/pine-core/p-a9ea3c9d.entry.js +1 -0
- package/dist/pine-core/{p-495f791c.entry.js → p-b15777a2.entry.js} +1 -1
- package/dist/pine-core/p-bc7ba7d3.system.entry.js +1 -0
- package/dist/pine-core/{p-7608e9b2.entry.js → p-c497d6c6.entry.js} +1 -1
- package/dist/pine-core/p-c971cdb3.entry.js +1 -0
- package/dist/pine-core/p-cdd21cbe.entry.js +1 -0
- package/dist/pine-core/p-ce74a47e.entry.js +2 -0
- package/dist/pine-core/p-cf4758a7.entry.js +1 -0
- package/dist/pine-core/{p-f2560935.entry.js → p-cfc9d4a8.entry.js} +1 -1
- package/dist/pine-core/p-d1b0b372.entry.js +1 -0
- package/dist/pine-core/p-d6002d5b.entry.js +1 -0
- package/dist/pine-core/{p-773f5771.system.entry.js → p-d8a6298c.system.entry.js} +1 -1
- package/dist/pine-core/p-d933227e.system.entry.js +1 -0
- package/dist/pine-core/p-d962fc84.entry.js +1 -0
- package/dist/pine-core/p-dafff7dd.system.entry.js +1 -0
- package/dist/pine-core/p-ed22da0c.system.entry.js +1 -0
- package/dist/pine-core/{p-de740b3e.system.entry.js → p-f0632690.system.entry.js} +1 -1
- package/dist/pine-core/p-f1c6b23a.entry.js +1 -0
- package/dist/pine-core/p-f3188c57.system.entry.js +8 -0
- package/dist/pine-core/p-f33d6417.entry.js +1 -0
- package/dist/pine-core/p-f832dcd9.entry.js +1 -0
- package/dist/pine-core/p-f83fe305.entry.js +1 -0
- package/dist/pine-core/p-myrJDwbR.js +1 -0
- package/dist/pine-core/p-t3idJwV0.js +1 -0
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/types/components/pds-avatar/pds-avatar.d.ts +3 -0
- package/dist/types/components/pds-box/pds-box.d.ts +7 -0
- package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +2 -0
- package/dist/types/components/pds-chip/pds-chip.d.ts +2 -0
- package/dist/types/components/pds-combobox/pds-combobox.d.ts +5 -0
- package/dist/types/components/pds-copytext/pds-copytext.d.ts +3 -0
- package/dist/types/components/pds-drawer/pds-drawer-content/pds-drawer-content.d.ts +1 -0
- package/dist/types/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.d.ts +3 -0
- package/dist/types/components/pds-drawer/pds-drawer-header/pds-drawer-header.d.ts +3 -0
- package/dist/types/components/pds-drawer/pds-drawer.d.ts +1 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +4 -0
- package/dist/types/components/pds-loader/pds-loader.d.ts +5 -0
- package/dist/types/components/pds-modal/pds-modal-content/pds-modal-content.d.ts +3 -0
- package/dist/types/components/pds-modal/pds-modal-footer/pds-modal-footer.d.ts +3 -0
- package/dist/types/components/pds-modal/pds-modal-header/pds-modal-header.d.ts +3 -0
- package/dist/types/components/pds-modal/pds-modal.d.ts +9 -1
- package/dist/types/components/pds-popover/pds-popover.d.ts +15 -0
- package/dist/types/components/pds-progress/pds-progress.d.ts +4 -0
- package/dist/types/components/pds-radio/pds-radio.d.ts +3 -0
- package/dist/types/components/pds-radio-group/pds-radio-group.d.ts +1 -0
- package/dist/types/components/pds-row/pds-row.d.ts +7 -0
- package/dist/types/components/pds-select/pds-select.d.ts +2 -0
- package/dist/types/components/pds-sortable/pds-sortable-item/pds-sortable-item.d.ts +4 -0
- package/dist/types/components/pds-sortable/pds-sortable.d.ts +6 -0
- package/dist/types/components/pds-switch/pds-switch.d.ts +2 -0
- package/dist/types/components/pds-tabs/pds-tab/pds-tab.d.ts +3 -0
- package/dist/types/components/pds-tabs/pds-tabpanel/pds-tabpanel.d.ts +3 -0
- package/dist/types/components/pds-tabs/pds-tabs.d.ts +3 -0
- package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +1 -0
- package/dist/types/components.d.ts +199 -0
- package/dist/types/utils/attributes.d.ts +38 -0
- package/dist/types/utils/reflected-attribute-default.d.ts +31 -0
- package/dist/types/utils/test/host-strip.d.ts +10 -0
- package/dist/vscode.html-data.json +7 -0
- package/hydrate/index.js +717 -201
- package/hydrate/index.mjs +717 -201
- package/package.json +2 -2
- package/dist/cjs/attributes-oNMnBEnP.js +0 -85
- package/dist/esm/attributes-C0M1gTKv.js +0 -82
- package/dist/esm-es5/attributes-C0M1gTKv.js +0 -1
- package/dist/pine-core/p-015d2ceb.entry.js +0 -1
- package/dist/pine-core/p-02a428af.system.entry.js +0 -1
- package/dist/pine-core/p-06534502.entry.js +0 -1
- package/dist/pine-core/p-0827c6a6.entry.js +0 -1
- package/dist/pine-core/p-0af4685d.entry.js +0 -1
- package/dist/pine-core/p-1747c005.system.entry.js +0 -1
- package/dist/pine-core/p-1ae0b503.entry.js +0 -2
- package/dist/pine-core/p-2a00844f.entry.js +0 -1
- package/dist/pine-core/p-3653fd52.system.entry.js +0 -1
- package/dist/pine-core/p-4a43fbd9.entry.js +0 -1
- package/dist/pine-core/p-517f9962.entry.js +0 -1
- package/dist/pine-core/p-569b07ed.system.entry.js +0 -1
- package/dist/pine-core/p-5986f3c9.entry.js +0 -1
- package/dist/pine-core/p-600be0e1.entry.js +0 -1
- package/dist/pine-core/p-62045f88.system.entry.js +0 -1
- package/dist/pine-core/p-62241978.entry.js +0 -1
- package/dist/pine-core/p-63930a06.system.entry.js +0 -1
- package/dist/pine-core/p-6516adf7.system.entry.js +0 -1
- package/dist/pine-core/p-6aaf945c.entry.js +0 -1
- package/dist/pine-core/p-715b8e6b.entry.js +0 -1
- package/dist/pine-core/p-77961987.system.entry.js +0 -1
- package/dist/pine-core/p-7a177548.system.entry.js +0 -1
- package/dist/pine-core/p-806f17de.system.entry.js +0 -1
- package/dist/pine-core/p-832cedb7.entry.js +0 -1
- package/dist/pine-core/p-847e5f00.system.entry.js +0 -1
- package/dist/pine-core/p-85981c5d.system.entry.js +0 -1
- package/dist/pine-core/p-9dbb8fe9.entry.js +0 -1
- package/dist/pine-core/p-BhQhw0S3.system.js +0 -1
- package/dist/pine-core/p-C0M1gTKv.js +0 -1
- package/dist/pine-core/p-b412473d.system.entry.js +0 -8
- package/dist/pine-core/p-b51cfa3b.entry.js +0 -1
- package/dist/pine-core/p-b62e08c2.system.entry.js +0 -1
- package/dist/pine-core/p-c53e560a.system.entry.js +0 -1
- package/dist/pine-core/p-cd7deae5.entry.js +0 -1
- package/dist/pine-core/p-cd86ee3e.system.entry.js +0 -1
- package/dist/pine-core/p-cf5a484e.system.entry.js +0 -1
- package/dist/pine-core/p-cf99f7d8.system.entry.js +0 -1
- package/dist/pine-core/p-cff7013e.system.entry.js +0 -1
- package/dist/pine-core/p-e1d541f7.entry.js +0 -1
- package/dist/pine-core/p-ea0e5253.entry.js +0 -7
- package/dist/pine-core/p-f22a5f9c.system.entry.js +0 -3
- package/dist/pine-core/p-f22abb4d.system.entry.js +0 -1
- package/dist/pine-core/p-f6943cbf.entry.js +0 -1
- package/dist/pine-core/p-f794f7ad.entry.js +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D8Gl0bIB.js');
|
|
4
|
+
var closest = require('./closest-D0qyYtJ3.js');
|
|
4
5
|
var reconnectedContent = require('./reconnected-content-CpnEQcTp.js');
|
|
5
6
|
|
|
6
7
|
const pdsModalCss = () => `.pds-modal__backdrop{-ms-flex-align:start;align-items:flex-start;background-color:rgba(0, 0, 0, 0.4);border:0;display:-ms-flexbox;display:flex;height:100%;inset:0;-ms-flex-pack:center;justify-content:center;margin:0;max-height:100%;max-width:100%;opacity:0;padding:0;position:fixed;-webkit-transition:opacity var(--pine-motion-duration-base) var(--pine-motion-easing-in), visibility var(--pine-motion-duration-base) var(--pine-motion-easing-in);transition:opacity var(--pine-motion-duration-base) var(--pine-motion-easing-in), visibility var(--pine-motion-duration-base) var(--pine-motion-easing-in);visibility:hidden;width:100%;z-index:var(--pine-z-index-modal)}@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))){.pds-modal__backdrop{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}}pds-modal .pds-modal__backdrop{z-index:var(--pine-z-index-priority)}.pds-modal__backdrop::-webkit-backdrop{background:transparent}.pds-modal__backdrop::-ms-backdrop{background:transparent}.pds-modal__backdrop::backdrop{background:transparent}.pds-modal__backdrop[aria-modal=false]{overflow:auto;-ms-scroll-chaining:none;overscroll-behavior:contain}@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))){.pds-modal__backdrop[aria-modal=false]{-webkit-backdrop-filter:none;backdrop-filter:none}.pds-modal__backdrop[aria-modal=false]::before{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);content:"";inset:0;position:fixed;z-index:-1}}.pds-modal__backdrop.open{opacity:1;-webkit-transition-timing-function:var(--pine-motion-easing-out);transition-timing-function:var(--pine-motion-easing-out);visibility:visible}.pds-modal{background:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-sm);-webkit-box-shadow:var(--pine-box-shadow-400);box-shadow:var(--pine-box-shadow-400);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:var(--pine-dimension-md);max-height:none;width:100%}.pds-modal.pds-modal--scrollable{max-height:calc(100vh - (5vh + 96px))}@supports (height: 100dvh){.pds-modal.pds-modal--scrollable{max-height:calc(100dvh - (5dvh + 96px))}}@media (min-width: 992px){.pds-modal{-webkit-margin-before:6vh;margin-block-start:6vh}@supports (height: 100dvh){.pds-modal{-webkit-margin-before:6dvh;margin-block-start:6dvh}}}@media (min-width: 1200px){.pds-modal{-webkit-margin-before:8vh;margin-block-start:8vh}@supports (height: 100dvh){.pds-modal{-webkit-margin-before:8dvh;margin-block-start:8dvh}}}.pds-modal--sm{max-width:520px}.pds-modal--md{max-width:700px}.pds-modal--lg{max-width:900px}.pds-modal--custom{max-width:var(--pds-modal-max-width, 700px)}.pds-modal--fullscreen{border-radius:0;height:100%;margin:0;max-height:100vh;max-width:100%}@supports (height: 100dvh){.pds-modal--fullscreen{max-height:100dvh}}.pds-modal--fullscreen.pds-modal--scrollable{max-height:100vh}@supports (height: 100dvh){.pds-modal--fullscreen.pds-modal--scrollable{max-height:100dvh}}.pds-modal--fullscreen .pds-modal-content{-ms-flex:1;flex:1}.pds-modal--scrollable pds-modal-content{-webkit-border-after:1px solid transparent;border-block-end:1px solid transparent;-webkit-border-before:1px solid transparent;border-block-start:1px solid transparent;overflow-y:auto}.pds-modal:not(.pds-modal--scrollable) pds-modal-content{overflow-y:visible}`;
|
|
@@ -9,6 +10,89 @@ const PRESET_SIZES = ['sm', 'md', 'lg', 'fullscreen'];
|
|
|
9
10
|
const isCustomLength = (value) => /^[a-z0-9.%+\-*/(), ]+$/i.test(value) &&
|
|
10
11
|
/\d/.test(value) &&
|
|
11
12
|
(typeof CSS === 'undefined' || CSS.supports('max-width', value));
|
|
13
|
+
const TABBABLE = [
|
|
14
|
+
'a[href]',
|
|
15
|
+
'area[href]',
|
|
16
|
+
'button',
|
|
17
|
+
'input:not([type="hidden"])',
|
|
18
|
+
'select',
|
|
19
|
+
'textarea',
|
|
20
|
+
'iframe',
|
|
21
|
+
'summary',
|
|
22
|
+
'[contenteditable]:not([contenteditable="false"])',
|
|
23
|
+
'[tabindex]',
|
|
24
|
+
].join(',');
|
|
25
|
+
/**
|
|
26
|
+
* Collects the tabbable elements under `root` in focus order, walking into open shadow roots and
|
|
27
|
+
* following slots, so a component's own controls (the input inside pds-combobox or pds-textarea)
|
|
28
|
+
* count without being registered here by tag name. Positive tabindex values are not reordered,
|
|
29
|
+
* and a closed shadow root can't be seen into.
|
|
30
|
+
*/
|
|
31
|
+
function collectTabbable(root, found) {
|
|
32
|
+
for (const child of Array.from(root.children))
|
|
33
|
+
visitTabbable(child, found);
|
|
34
|
+
}
|
|
35
|
+
// An editing host reports tabIndex -1 but is still a Tab stop; editable content inside it is not.
|
|
36
|
+
const isTabStop = (el) => { var _a; return el.tabIndex >= 0 || (el.isContentEditable && !el.hasAttribute('tabindex') && !((_a = el.parentElement) === null || _a === void 0 ? void 0 : _a.isContentEditable)); };
|
|
37
|
+
function visitTabbable(el, found) {
|
|
38
|
+
var _a, _b, _c, _d;
|
|
39
|
+
if (el.hasAttribute('inert'))
|
|
40
|
+
return;
|
|
41
|
+
if (el.localName === 'slot') {
|
|
42
|
+
const slot = el;
|
|
43
|
+
// Fallback content renders only when nothing at all is assigned, text included.
|
|
44
|
+
if (((_b = (_a = slot.assignedNodes) === null || _a === void 0 ? void 0 : _a.call(slot, { flatten: true })) !== null && _b !== void 0 ? _b : []).length === 0)
|
|
45
|
+
return collectTabbable(el, found);
|
|
46
|
+
for (const slotted of slot.assignedElements({ flatten: true }))
|
|
47
|
+
visitTabbable(slotted, found);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
// A delegatesFocus host passes focus to its first control, which the walk below finds.
|
|
51
|
+
const delegates = ((_c = el.shadowRoot) === null || _c === void 0 ? void 0 : _c.delegatesFocus) === true;
|
|
52
|
+
if (el instanceof HTMLElement && !delegates && isTabStop(el) && el.matches(TABBABLE) && !el.matches(':disabled')) {
|
|
53
|
+
found.push(el);
|
|
54
|
+
}
|
|
55
|
+
// A shadow host's light children render only through its slots, which the walk reaches.
|
|
56
|
+
collectTabbable((_d = el.shadowRoot) !== null && _d !== void 0 ? _d : el, found);
|
|
57
|
+
}
|
|
58
|
+
/** The element as a radio in a named group, or `null`. */
|
|
59
|
+
const groupedRadio = (el) => el instanceof HTMLInputElement && el.type === 'radio' && el.name !== '' ? el : null;
|
|
60
|
+
/**
|
|
61
|
+
* Keeps one radio per named group, as the browser does: the checked one, or the first. The others
|
|
62
|
+
* are reached with the arrow keys, so they can't be the first or last stop of the trap.
|
|
63
|
+
*/
|
|
64
|
+
function oneRadioPerGroup(elements) {
|
|
65
|
+
// Radios group by name and form within one tree, so each shadow root starts its own groups.
|
|
66
|
+
const groups = [];
|
|
67
|
+
for (const el of elements) {
|
|
68
|
+
const radio = groupedRadio(el);
|
|
69
|
+
if (radio === null)
|
|
70
|
+
continue;
|
|
71
|
+
const group = groups.find(([first]) => first.name === radio.name && first.form === radio.form && first.getRootNode() === radio.getRootNode());
|
|
72
|
+
if (group)
|
|
73
|
+
group.push(radio);
|
|
74
|
+
else
|
|
75
|
+
groups.push([radio]);
|
|
76
|
+
}
|
|
77
|
+
const stops = new Set(groups.map((radios) => { var _a; return (_a = radios.find((radio) => radio.checked)) !== null && _a !== void 0 ? _a : radios[0]; }));
|
|
78
|
+
return elements.filter((el) => groupedRadio(el) === null || stops.has(el));
|
|
79
|
+
}
|
|
80
|
+
/** Whether `node` is `ancestor` or inside it, crossing shadow roots, which `Node.contains` doesn't. */
|
|
81
|
+
function containsComposed(ancestor, node) {
|
|
82
|
+
for (let current = node; current; current = current instanceof ShadowRoot ? current.host : current.parentNode) {
|
|
83
|
+
if (current === ancestor)
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
/** The focused element, followed down through shadow roots to the control that has focus. */
|
|
89
|
+
function deepActiveElement() {
|
|
90
|
+
var _a;
|
|
91
|
+
let active = document.activeElement;
|
|
92
|
+
while ((_a = active === null || active === void 0 ? void 0 : active.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement)
|
|
93
|
+
active = active.shadowRoot.activeElement;
|
|
94
|
+
return active;
|
|
95
|
+
}
|
|
12
96
|
const PdsModal = class {
|
|
13
97
|
constructor(hostRef) {
|
|
14
98
|
index.registerInstance(this, hostRef);
|
|
@@ -128,6 +212,17 @@ const PdsModal = class {
|
|
|
128
212
|
// disableTopLayer), so do not trap Tab here.
|
|
129
213
|
if (this.disableTopLayer)
|
|
130
214
|
return;
|
|
215
|
+
// A control inside that handles Tab itself (a popup with its own trap) has already moved
|
|
216
|
+
// focus. This holds only when it listens on its own element, which runs before this
|
|
217
|
+
// document listener; one listening on document too would race it.
|
|
218
|
+
if (e.defaultPrevented)
|
|
219
|
+
return;
|
|
220
|
+
// Every open modal hears this keydown. When focus is in a modal dialog opened above this one,
|
|
221
|
+
// that dialog traps Tab: this modal's list also holds its controls, so it would wrap first. A
|
|
222
|
+
// non-modal dialog inside (a disableTopLayer modal) doesn't trap, so this one still does.
|
|
223
|
+
const activeElement = deepActiveElement();
|
|
224
|
+
if (!activeElement || this.modalDialogAbove(activeElement))
|
|
225
|
+
return;
|
|
131
226
|
// Content can change while the modal is open (rows fetched in, sections shown), so the
|
|
132
227
|
// first and last elements are read now rather than from the list taken on opening.
|
|
133
228
|
this.updateFocusableElements();
|
|
@@ -137,13 +232,13 @@ const PdsModal = class {
|
|
|
137
232
|
// Get the first and last focusable elements
|
|
138
233
|
const firstFocusableElement = this.focusableElements[0];
|
|
139
234
|
const lastFocusableElement = this.focusableElements[this.focusableElements.length - 1];
|
|
140
|
-
//
|
|
141
|
-
|
|
142
|
-
//
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
const
|
|
146
|
-
|
|
235
|
+
// activeElement is the control inside any shadow root, as the list holds, not the host
|
|
236
|
+
// document.activeElement reports. It's matched to its own stop first, so a stop inside a
|
|
237
|
+
// listed host isn't taken for that host; a focused node that isn't a stop counts as the
|
|
238
|
+
// innermost stop it sits in.
|
|
239
|
+
const stop = this.stopIndex(activeElement);
|
|
240
|
+
const isFirstElement = stop === 0;
|
|
241
|
+
const isLastElement = stop === this.focusableElements.length - 1;
|
|
147
242
|
// If shift + tab is pressed and focus is on the first element, move to the last element
|
|
148
243
|
if (e.shiftKey && isFirstElement) {
|
|
149
244
|
e.preventDefault();
|
|
@@ -200,23 +295,8 @@ const PdsModal = class {
|
|
|
200
295
|
updateFocusableElements() {
|
|
201
296
|
if (!this.modalRef)
|
|
202
297
|
return;
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
'a[href]',
|
|
206
|
-
'button:not([disabled])',
|
|
207
|
-
'input:not([disabled])',
|
|
208
|
-
'select:not([disabled])',
|
|
209
|
-
'textarea:not([disabled])',
|
|
210
|
-
'[tabindex]:not([tabindex="-1"])',
|
|
211
|
-
'pds-button:not([disabled])',
|
|
212
|
-
'pds-link:not([disabled])',
|
|
213
|
-
'pds-input:not([disabled])',
|
|
214
|
-
'pds-checkbox:not([disabled])',
|
|
215
|
-
'pds-radio:not([disabled])',
|
|
216
|
-
'pds-switch:not([disabled])',
|
|
217
|
-
'pds-select:not([disabled])',
|
|
218
|
-
].join(',');
|
|
219
|
-
this.focusableElements = Array.from(this.modalRef.querySelectorAll(selector));
|
|
298
|
+
this.focusableElements = [];
|
|
299
|
+
collectTabbable(this.modalRef, this.focusableElements);
|
|
220
300
|
// checkVisibility() also drops an element inside a hidden ancestor, whose own computed
|
|
221
301
|
// display isn't none; such an element can't take focus, so it can't anchor the trap.
|
|
222
302
|
this.focusableElements = this.focusableElements.filter(el => {
|
|
@@ -225,6 +305,7 @@ const PdsModal = class {
|
|
|
225
305
|
const style = window.getComputedStyle(el);
|
|
226
306
|
return style.display !== 'none' && style.visibility !== 'hidden';
|
|
227
307
|
});
|
|
308
|
+
this.focusableElements = oneRadioPerGroup(this.focusableElements);
|
|
228
309
|
}
|
|
229
310
|
/**
|
|
230
311
|
* Sets focus to the first focusable element in the modal
|
|
@@ -238,30 +319,11 @@ const PdsModal = class {
|
|
|
238
319
|
this.focusElement(firstElement);
|
|
239
320
|
}
|
|
240
321
|
/**
|
|
241
|
-
*
|
|
322
|
+
* Focuses an element from the list. It holds the controls themselves, inside any shadow root,
|
|
323
|
+
* so they take focus directly.
|
|
242
324
|
*/
|
|
243
325
|
focusElement(element) {
|
|
244
|
-
|
|
245
|
-
return;
|
|
246
|
-
try {
|
|
247
|
-
// Try standard focus first
|
|
248
|
-
element.focus();
|
|
249
|
-
// Check if focus worked
|
|
250
|
-
setTimeout(() => {
|
|
251
|
-
if (document.activeElement !== element) {
|
|
252
|
-
// For web components, try to find a focusable element inside
|
|
253
|
-
if (element.shadowRoot) {
|
|
254
|
-
const focusableInShadow = element.shadowRoot.querySelector('button, [tabindex], input, a[href]');
|
|
255
|
-
if (focusableInShadow) {
|
|
256
|
-
focusableInShadow.focus();
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}, 0);
|
|
261
|
-
}
|
|
262
|
-
catch (error) {
|
|
263
|
-
console.error('Error focusing element:', error);
|
|
264
|
-
}
|
|
326
|
+
element === null || element === void 0 ? void 0 : element.focus();
|
|
265
327
|
}
|
|
266
328
|
/**
|
|
267
329
|
* Opens the modal
|
|
@@ -424,6 +486,30 @@ const PdsModal = class {
|
|
|
424
486
|
const thisZIndex = this.getBackdropZIndex(this.el);
|
|
425
487
|
return thisZIndex === maxZIndex;
|
|
426
488
|
}
|
|
489
|
+
/** Whether a modal dialog other than this one sits between the focused element and this modal. */
|
|
490
|
+
modalDialogAbove(active) {
|
|
491
|
+
var _a;
|
|
492
|
+
for (let dialog = closest.closest('dialog[open]', active); dialog instanceof HTMLElement;) {
|
|
493
|
+
if (dialog === this.modalRef)
|
|
494
|
+
return false;
|
|
495
|
+
if (dialog.matches(':modal'))
|
|
496
|
+
return true;
|
|
497
|
+
// Up from this dialog, across a shadow root; past the document root, closest() gives nothing.
|
|
498
|
+
dialog = closest.closest('dialog[open]', (_a = dialog.parentElement) !== null && _a !== void 0 ? _a : dialog.getRootNode().host);
|
|
499
|
+
}
|
|
500
|
+
return false;
|
|
501
|
+
}
|
|
502
|
+
/** The focused element's place in the list: its own stop, or the innermost stop it sits in. */
|
|
503
|
+
stopIndex(active) {
|
|
504
|
+
const own = this.focusableElements.indexOf(active);
|
|
505
|
+
if (own >= 0)
|
|
506
|
+
return own;
|
|
507
|
+
for (let i = this.focusableElements.length - 1; i >= 0; i--) {
|
|
508
|
+
if (containsComposed(this.focusableElements[i], active))
|
|
509
|
+
return i;
|
|
510
|
+
}
|
|
511
|
+
return -1;
|
|
512
|
+
}
|
|
427
513
|
resolveSize() {
|
|
428
514
|
var _a;
|
|
429
515
|
const size = ((_a = this.size) !== null && _a !== void 0 ? _a : '').trim() || 'md';
|
|
@@ -438,14 +524,14 @@ const PdsModal = class {
|
|
|
438
524
|
}
|
|
439
525
|
render() {
|
|
440
526
|
const [sizeClass = 'md', customSize] = this.resolveSize();
|
|
441
|
-
return (index.h("dialog", { key: '
|
|
527
|
+
return (index.h("dialog", { key: 'b6714c7e77d80bf2370f2170ffce029abe147d81', class: {
|
|
442
528
|
'pds-modal__backdrop': true,
|
|
443
529
|
'open': this.open
|
|
444
|
-
}, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, index.h("div", { key: '
|
|
530
|
+
}, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, index.h("div", { key: '8c3319f53dd8c79c9e952785277e9e82e28b651e', class: {
|
|
445
531
|
'pds-modal': true,
|
|
446
532
|
[`pds-modal--${sizeClass}`]: true,
|
|
447
533
|
'pds-modal--scrollable': this.scrollable
|
|
448
|
-
}, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, index.h("slot", { key: '
|
|
534
|
+
}, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, index.h("slot", { key: '8c6f9cc1a20b515659344ad041512de52761800d' }))));
|
|
449
535
|
}
|
|
450
536
|
get el() { return index.getElement(this); }
|
|
451
537
|
static get watchers() { return {
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D8Gl0bIB.js');
|
|
4
4
|
var closest = require('./closest-D0qyYtJ3.js');
|
|
5
|
+
var reflectedAttributeDefault = require('./reflected-attribute-default-DVYHG6O1.js');
|
|
6
|
+
var attributes = require('./attributes-DrQqSEv4.js');
|
|
5
7
|
|
|
6
8
|
const pdsPopoverCss = () => `:host{--sizing-max-width-default:352px;display:inline-block}:host .pds-popover__trigger-wrapper{display:inline-block}:host .pds-popover__content-slot-wrapper{display:none}`;
|
|
7
9
|
|
|
@@ -19,10 +21,22 @@ const PdsPopover = class {
|
|
|
19
21
|
* Tracks if the component is still mounted to prevent memory leaks
|
|
20
22
|
*/
|
|
21
23
|
this.isComponentMounted = true;
|
|
24
|
+
/**
|
|
25
|
+
* Set once `componentDidLoad` has built the portal, so a later reconnect knows to rebuild it
|
|
26
|
+
*/
|
|
27
|
+
this.hasLoaded = false;
|
|
28
|
+
/**
|
|
29
|
+
* A popover without a componentId keeps one generated portal id, even when the portal is rebuilt
|
|
30
|
+
*/
|
|
31
|
+
this.generatedPortalId = null;
|
|
22
32
|
/**
|
|
23
33
|
* Reference to the trigger element
|
|
24
34
|
*/
|
|
25
35
|
this.triggerEl = null;
|
|
36
|
+
/**
|
|
37
|
+
* Puts the trigger's ARIA back when something else removes or changes it
|
|
38
|
+
*/
|
|
39
|
+
this.triggerObserver = null;
|
|
26
40
|
/**
|
|
27
41
|
* Portal element rendered in document.body
|
|
28
42
|
*/
|
|
@@ -84,6 +98,7 @@ const PdsPopover = class {
|
|
|
84
98
|
else {
|
|
85
99
|
this.triggerEl = null;
|
|
86
100
|
}
|
|
101
|
+
this.observeTrigger();
|
|
87
102
|
};
|
|
88
103
|
/**
|
|
89
104
|
* Handles changes to the default slot (popover content)
|
|
@@ -120,6 +135,9 @@ const PdsPopover = class {
|
|
|
120
135
|
}
|
|
121
136
|
};
|
|
122
137
|
}
|
|
138
|
+
restorePlacementDefault(newValue) {
|
|
139
|
+
this.placement = reflectedAttributeDefault.restoreReflectedDefault(this.el, 'placement', newValue, 'right');
|
|
140
|
+
}
|
|
123
141
|
componentDidLoad() {
|
|
124
142
|
var _a;
|
|
125
143
|
// Bind event handlers for cleanup
|
|
@@ -129,6 +147,7 @@ const PdsPopover = class {
|
|
|
129
147
|
this.boundResizeHandler = this.handleResize.bind(this);
|
|
130
148
|
// Create portal element
|
|
131
149
|
this.createPortal();
|
|
150
|
+
this.hasLoaded = true;
|
|
132
151
|
// Initialize trigger element by calling slot change handler
|
|
133
152
|
// This is a fallback for environments where slot change might not fire reliably
|
|
134
153
|
const triggerSlot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot[name="trigger"]');
|
|
@@ -143,20 +162,69 @@ const PdsPopover = class {
|
|
|
143
162
|
this.linkTriggerToPortal();
|
|
144
163
|
}
|
|
145
164
|
}
|
|
165
|
+
// The trigger is the consumer's element, so anything can rewrite its attributes (a Turbo morph
|
|
166
|
+
// matches it to server HTML that has no ARIA). Put Pine's values back when that happens.
|
|
167
|
+
observeTrigger() {
|
|
168
|
+
var _a;
|
|
169
|
+
(_a = this.triggerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
170
|
+
this.triggerObserver = null;
|
|
171
|
+
if (this.triggerEl == null || typeof MutationObserver === 'undefined')
|
|
172
|
+
return;
|
|
173
|
+
this.triggerObserver = new MutationObserver(() => this.linkTriggerToPortal());
|
|
174
|
+
this.triggerObserver.observe(this.triggerEl, {
|
|
175
|
+
attributes: true,
|
|
176
|
+
attributeFilter: ['aria-expanded', 'aria-controls'],
|
|
177
|
+
});
|
|
178
|
+
}
|
|
146
179
|
// Set ARIA attributes to establish relationship between trigger and popover
|
|
147
180
|
// This mirrors the native Popover API's accessibility behavior
|
|
148
181
|
linkTriggerToPortal() {
|
|
149
182
|
if (this.triggerEl == null || this.portalEl == null)
|
|
150
183
|
return;
|
|
151
|
-
|
|
152
|
-
this.triggerEl.
|
|
184
|
+
// Skips values already in place, so the trigger observer's own callback doesn't loop.
|
|
185
|
+
attributes.setAttributesIfChanged(this.triggerEl, { 'aria-expanded': String(this.active), 'aria-controls': this.portalEl.id });
|
|
186
|
+
}
|
|
187
|
+
// componentDidLoad doesn't run again when a popover comes back, so rebuild whatever
|
|
188
|
+
// disconnectedCallback tore down. Each step is a no-op when nothing was.
|
|
189
|
+
connectedCallback() {
|
|
190
|
+
var _a;
|
|
191
|
+
if (!this.hasLoaded)
|
|
192
|
+
return;
|
|
193
|
+
this.isComponentMounted = true;
|
|
194
|
+
this.createPortal();
|
|
195
|
+
(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.addEventListener('click', this.handleTriggerClick);
|
|
196
|
+
this.observeTrigger();
|
|
197
|
+
this.linkTriggerToPortal();
|
|
198
|
+
// Still open after a move: the trigger moved, so the portal follows it.
|
|
199
|
+
if (this.active) {
|
|
200
|
+
requestAnimationFrame(() => this.handlePopoverPositioning());
|
|
201
|
+
}
|
|
153
202
|
}
|
|
154
203
|
disconnectedCallback() {
|
|
204
|
+
var _a;
|
|
205
|
+
// Moved in one operation (a DOM morph, or a framework reparenting it), the popover is
|
|
206
|
+
// already back in the page. Its portal is in <body>, untouched, so it stays open, with focus
|
|
207
|
+
// where it was.
|
|
208
|
+
if (this.el.isConnected)
|
|
209
|
+
return;
|
|
155
210
|
this.isComponentMounted = false;
|
|
211
|
+
// Open, the content sits in the portal; put it back before the portal goes. Only listeners on
|
|
212
|
+
// the popover itself hear the close event now, but those are the ones mirroring its state.
|
|
213
|
+
if (this.active) {
|
|
214
|
+
this.restorePortalContent();
|
|
215
|
+
this.active = false;
|
|
216
|
+
this.linkTriggerToPortal();
|
|
217
|
+
this.pdsPopoverClose.emit({
|
|
218
|
+
componentId: this.componentId,
|
|
219
|
+
popoverType: this.popoverType,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
156
222
|
// Clean up trigger click event listener
|
|
157
223
|
if (this.triggerEl != null) {
|
|
158
224
|
this.triggerEl.removeEventListener('click', this.handleTriggerClick);
|
|
159
225
|
}
|
|
226
|
+
(_a = this.triggerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
227
|
+
this.triggerObserver = null;
|
|
160
228
|
// Clean up all event listeners
|
|
161
229
|
this.removeLightDismissListeners();
|
|
162
230
|
this.removeScrollAndResizeListeners();
|
|
@@ -179,6 +247,7 @@ const PdsPopover = class {
|
|
|
179
247
|
}
|
|
180
248
|
}
|
|
181
249
|
createPortal() {
|
|
250
|
+
var _a;
|
|
182
251
|
if (this.portalEl !== null)
|
|
183
252
|
return;
|
|
184
253
|
this.portalEl = document.createElement('div');
|
|
@@ -197,8 +266,8 @@ const PdsPopover = class {
|
|
|
197
266
|
this.portalEl.style.padding = 'var(--pine-dimension-md)';
|
|
198
267
|
// Generate unique ID
|
|
199
268
|
if (!this.componentId) {
|
|
200
|
-
|
|
201
|
-
this.portalEl.id =
|
|
269
|
+
(_a = this.generatedPortalId) !== null && _a !== void 0 ? _a : (this.generatedPortalId = `pds-popover-portal-${PdsPopover.instanceCounter++}`);
|
|
270
|
+
this.portalEl.id = this.generatedPortalId;
|
|
202
271
|
}
|
|
203
272
|
else {
|
|
204
273
|
this.portalEl.id = `${this.componentId}-portal`;
|
|
@@ -310,10 +379,7 @@ const PdsPopover = class {
|
|
|
310
379
|
this.active = true;
|
|
311
380
|
// Record open timestamp to prevent immediate close from opening click
|
|
312
381
|
this.openTimestamp = Date.now();
|
|
313
|
-
|
|
314
|
-
if (this.triggerEl) {
|
|
315
|
-
this.triggerEl.setAttribute('aria-expanded', 'true');
|
|
316
|
-
}
|
|
382
|
+
this.linkTriggerToPortal();
|
|
317
383
|
// Update portal content with latest slot content
|
|
318
384
|
this.updatePortalContent();
|
|
319
385
|
// Show portal
|
|
@@ -347,10 +413,7 @@ const PdsPopover = class {
|
|
|
347
413
|
this.active = false;
|
|
348
414
|
// Restoring the content drops its focus to the body, so check where focus is first.
|
|
349
415
|
const focusWasInside = this.portalEl.contains(document.activeElement);
|
|
350
|
-
|
|
351
|
-
if (this.triggerEl) {
|
|
352
|
-
this.triggerEl.setAttribute('aria-expanded', 'false');
|
|
353
|
-
}
|
|
416
|
+
this.linkTriggerToPortal();
|
|
354
417
|
// Restore content back to original slot positions
|
|
355
418
|
this.restorePortalContent();
|
|
356
419
|
// Hide portal
|
|
@@ -576,9 +639,14 @@ const PdsPopover = class {
|
|
|
576
639
|
}, 16); // ~1 frame at 60fps
|
|
577
640
|
}
|
|
578
641
|
render() {
|
|
579
|
-
return (index.h(index.Host, { key: '
|
|
642
|
+
return (index.h(index.Host, { key: '66347d4922274d25504e5be134b36f05a3f12fdc', id: this.componentId }, index.h("span", { key: '8f29d54d58cf0c66f86470c77c676716f1ab056f', class: "pds-popover__trigger-wrapper" }, index.h("slot", { key: '5c89b687cfc01e67d3c11835e77755de88f03584', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), index.h("div", { key: '0ca9aff3021720098d86ec29eb69cbf149ef79a9', class: "pds-popover__content-slot-wrapper" }, index.h("slot", { key: 'b73c3324d3322c41c68161e9ada51499c0e49cb0', onSlotchange: this.handleContentSlotChange }))));
|
|
580
643
|
}
|
|
581
644
|
get el() { return index.getElement(this); }
|
|
645
|
+
static get watchers() { return {
|
|
646
|
+
"placement": [{
|
|
647
|
+
"restorePlacementDefault": 0
|
|
648
|
+
}]
|
|
649
|
+
}; }
|
|
582
650
|
};
|
|
583
651
|
/**
|
|
584
652
|
* Instance counter for unique IDs
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D8Gl0bIB.js');
|
|
4
|
+
var attributes = require('./attributes-DrQqSEv4.js');
|
|
4
5
|
var utils = require('./utils-BhRmyxT8.js');
|
|
5
6
|
|
|
6
7
|
const pdsProgressCss = () => `:host{--color-progress-fill:var(--pine-color-primary);--sizing-progress-bar-width:100%;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:var(--sizing-progress-bar-width)}@-webkit-keyframes progressBar{0%{width:0}100%{width:var(--sizing-progress-bar-width)}}@keyframes progressBar{0%{width:0}100%{width:var(--sizing-progress-bar-width)}}.pds-progress{-ms-flex-align:center;align-items:center;background-color:var(--pine-color-background-muted);border-radius:var(--pine-dimension-2xs);display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:var(--pine-dimension-xs);position:relative;width:100%}:host(.is-animated) progress,:host(.is-animated) progress::-webkit-progress-bar{-webkit-animation:progressBar 3s ease;animation:progressBar 3s ease;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}progress,progress::-webkit-progress-bar{background-color:transparent;border:0;height:var(--pine-dimension-xs);width:100%}progress::-webkit-progress-value{background:var(--color-progress-fill, var(--pine-color-primary));border-radius:var(--pine-dimension-2xs)}progress::-moz-progress-bar{background:var(--color-progress-fill, var(--pine-color-primary));border-radius:var(--pine-dimension-2xs)}.pds-progress__label{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.pds-progress__percentage{font-weight:var(--pine-font-weight-medium);-webkit-margin-start:calc(var(--pine-dimension-md) / 2);margin-inline-start:calc(var(--pine-dimension-md) / 2)}`;
|
|
@@ -8,6 +9,7 @@ const pdsProgressCss = () => `:host{--color-progress-fill:var(--pine-color-prima
|
|
|
8
9
|
const PdsProgress = class {
|
|
9
10
|
constructor(hostRef) {
|
|
10
11
|
index.registerInstance(this, hostRef);
|
|
12
|
+
this.hostKeeper = new attributes.HostStylingKeeper();
|
|
11
13
|
/**
|
|
12
14
|
* Determines whether or not progress is animated.
|
|
13
15
|
* @defaultValue false
|
|
@@ -24,10 +26,19 @@ const PdsProgress = class {
|
|
|
24
26
|
*/
|
|
25
27
|
this.showPercent = false;
|
|
26
28
|
}
|
|
29
|
+
connectedCallback() {
|
|
30
|
+
this.hostKeeper.connect(this.el);
|
|
31
|
+
}
|
|
32
|
+
disconnectedCallback() {
|
|
33
|
+
this.hostKeeper.disconnect();
|
|
34
|
+
}
|
|
27
35
|
render() {
|
|
28
36
|
const normalizedFillColor = utils.normalizeColorValue(this.fillColor);
|
|
29
|
-
|
|
37
|
+
const hostClass = this.animated ? { 'is-animated': this.animated } : '';
|
|
38
|
+
this.hostKeeper.record(hostClass);
|
|
39
|
+
return (index.h(index.Host, { key: '5573a5c48eee2f7968835db92afdaebb73c1b85e', class: hostClass }, index.h("div", { key: 'bb5cf260495be798f4272673884336022c28441e', class: "pds-progress" }, index.h("label", { key: '017efa649ada73ec724b930e06bbf1ab19a18f61', class: "pds-progress__label", htmlFor: this.componentId }, this.label), index.h("progress", { key: 'e648d910b072b7b2ca1c4a92c0832bf6e2ef5406', id: this.componentId, max: "100", style: normalizedFillColor ? { '--color-progress-fill': normalizedFillColor } : {}, value: this.percent })), this.showPercent && index.h("div", { key: '1f9f1733ff2cd6e2ec81e9a46759ff451cf158f7', class: "pds-progress__percentage" }, this.percent, "%")));
|
|
30
40
|
}
|
|
41
|
+
get el() { return index.getElement(this); }
|
|
31
42
|
};
|
|
32
43
|
PdsProgress.style = pdsProgressCss();
|
|
33
44
|
|
|
@@ -164,13 +164,13 @@ const PdsRadioGroup = class {
|
|
|
164
164
|
render() {
|
|
165
165
|
const gapValue = this.getGapValue();
|
|
166
166
|
const ariaDescribedBy = this.getAriaDescribedBy();
|
|
167
|
-
return (index.h(index.Host, { key: '
|
|
167
|
+
return (index.h(index.Host, { key: '9dc78eb36bbc1b872f4320203dbbc64e43816ebf', class: this.classNames(), id: this._groupId, role: "group", "aria-describedby": ariaDescribedBy, style: {
|
|
168
168
|
'--pds-radio-group-gap': gapValue,
|
|
169
|
-
} }, this.groupLabel && (index.h("div", { key: '
|
|
169
|
+
} }, this.groupLabel && (index.h("div", { key: '7b6f95608dcf356b141ef5d590ff3070f83b5975', class: "pds-radio-group__label" }, this.groupLabel)), index.h("div", { key: '6e1a634c9b81ca3f3bbbe9c6590bcd4efc97e6ea', class: {
|
|
170
170
|
'pds-radio-group__radios': true,
|
|
171
171
|
'pds-radio-group__radios--row': this.direction === 'row',
|
|
172
172
|
'pds-radio-group__radios--column': this.direction === 'column',
|
|
173
|
-
} }, index.h("slot", { key: '
|
|
173
|
+
} }, index.h("slot", { key: 'b5b16148f3c77d425a50b7ada8a822e9919ef5c5', onSlotchange: () => this.updateChildRadios() })), this.helperMessage && (index.h("div", { key: 'ca6b98f926b8d7a53fda630170ac037c99f5ee85', class: "pds-radio-group__message", id: form.messageId(this._groupId, 'helper') }, this.helperMessage)), this.errorMessage && (index.h("div", { key: '37b57e2622370364e619ea090712a7b79fe79501', class: "pds-radio-group__message pds-radio-group__message--error", id: form.messageId(this._groupId, 'error'), "aria-live": "assertive" }, index.h("pds-icon", { key: '6a362d048a67312b1b227f71cc4b8f821ae0817e', icon: index$1.danger, size: "small" }), this.errorMessage))));
|
|
174
174
|
}
|
|
175
175
|
get el() { return index.getElement(this); }
|
|
176
176
|
static get watchers() { return {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D8Gl0bIB.js');
|
|
4
|
+
var attributes = require('./attributes-DrQqSEv4.js');
|
|
4
5
|
var form = require('./form-MhwfKTuo.js');
|
|
5
6
|
var index$1 = require('./index-D-QQKB0y.js');
|
|
6
7
|
|
|
@@ -13,6 +14,7 @@ const PdsRadio = class {
|
|
|
13
14
|
index.registerInstance(this, hostRef);
|
|
14
15
|
this.pdsRadioChange = index.createEvent(this, "pdsRadioChange");
|
|
15
16
|
this._type = 'radio';
|
|
17
|
+
this.hostKeeper = new attributes.HostStylingKeeper();
|
|
16
18
|
this._hasImage = false;
|
|
17
19
|
/**
|
|
18
20
|
* Determines whether or not the radio is checked.
|
|
@@ -80,9 +82,13 @@ const PdsRadio = class {
|
|
|
80
82
|
this._hasImage = this.hasImageSlot();
|
|
81
83
|
}
|
|
82
84
|
connectedCallback() {
|
|
85
|
+
this.hostKeeper.connect(this.el);
|
|
83
86
|
// Expose type property on the element instance to match native form element behavior
|
|
84
87
|
form.exposeTypeProperty(this.el, () => this._type);
|
|
85
88
|
}
|
|
89
|
+
disconnectedCallback() {
|
|
90
|
+
this.hostKeeper.disconnect();
|
|
91
|
+
}
|
|
86
92
|
// Discards stale hidden label/message/wrapper copies left by a page-cache (Turbo, bfcache) reconnect, rescuing real [slot="image"] content stranded inside a stale image-container first.
|
|
87
93
|
componentDidRender() {
|
|
88
94
|
const freshImageContainer = this.el.querySelector('.pds-radio__image-container:not([hidden])');
|
|
@@ -97,11 +103,13 @@ const PdsRadio = class {
|
|
|
97
103
|
}
|
|
98
104
|
render() {
|
|
99
105
|
const renderLabelAndMessages = () => [
|
|
100
|
-
index.h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, index.h("input", { key: '
|
|
106
|
+
index.h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, index.h("input", { key: 'add893cd82f79b9398589bd5c0a72d5ae4a90475', "aria-describedby": form.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' : '' }), index.h("span", { key: 'b58eed8681d1932397d38ffe82515987e6486e08', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)),
|
|
101
107
|
this.helperMessage && (index.h("div", { key: `${this.componentId}-helper`, class: 'pds-radio__message', id: form.messageId(this.componentId, 'helper') }, this.helperMessage)),
|
|
102
|
-
this.errorMessage && (index.h("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: form.messageId(this.componentId, 'error'), "aria-live": "assertive" }, index.h("pds-icon", { key: '
|
|
108
|
+
this.errorMessage && (index.h("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: form.messageId(this.componentId, 'error'), "aria-live": "assertive" }, index.h("pds-icon", { key: '7374924219e59eab46a7ced9e7062c3e674b4451', icon: index$1.danger, size: "small" }), this.errorMessage))
|
|
103
109
|
];
|
|
104
|
-
|
|
110
|
+
const hostClass = this.classNames();
|
|
111
|
+
this.hostKeeper.record(hostClass);
|
|
112
|
+
return (index.h(index.Host, { key: '24269923f168d1d39ebfc1994619736f0dc8087a', class: hostClass }, this.hasImage() && (index.h("div", { key: '74a72bef89aa012047cbf3a1744fcd33f13bb464', class: "pds-radio__image-container", part: "image-container" }, index.h("slot", { key: '99dbcfdac86cb7c012fd44eab607217e21304bab', name: "image", onSlotchange: () => (this._hasImage = this.hasImageSlot()) }))), this.hasImage() ? (index.h("div", { class: "pds-radio__content-wrapper" }, renderLabelAndMessages())) : (renderLabelAndMessages())));
|
|
105
113
|
}
|
|
106
114
|
get el() { return index.getElement(this); }
|
|
107
115
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D8Gl0bIB.js');
|
|
4
|
+
var attributes = require('./attributes-DrQqSEv4.js');
|
|
4
5
|
|
|
5
6
|
const pdsRowCss = () => `:host{--row-gap-y:var(--pine-dimension-125);--row-gap-x:var(--pine-dimension-125);display:block;-webkit-margin-after:calc(var(--row-gap-y) * -1);margin-block-end:calc(var(--row-gap-y) * -1);-webkit-margin-before:calc(var(--row-gap-y) * -1);margin-block-start:calc(var(--row-gap-y) * -1);-webkit-margin-end:calc(var(--row-gap-x) * -0.5);margin-inline-end:calc(var(--row-gap-x) * -0.5);-webkit-margin-start:calc(var(--row-gap-x) * -0.5);margin-inline-start:calc(var(--row-gap-x) * -0.5)}.pds-row{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-margin-after:calc(var(--row-gap-y) * -1);margin-block-end:calc(var(--row-gap-y) * -1);-webkit-margin-before:calc(var(--row-gap-y) * -1);margin-block-start:calc(var(--row-gap-y) * -1);-webkit-margin-end:calc(var(--row-gap-x) * -1);margin-inline-end:calc(var(--row-gap-x) * -1);-webkit-margin-start:calc(var(--row-gap-x) * -1);margin-inline-start:calc(var(--row-gap-x) * -1)}@layer layout{.pds-row>*{-webkit-padding-after:calc(var(--row-gap-y));padding-block-end:calc(var(--row-gap-y));-webkit-padding-before:calc(var(--row-gap-y));padding-block-start:calc(var(--row-gap-y));-webkit-padding-end:calc(var(--row-gap-x));padding-inline-end:calc(var(--row-gap-x));-webkit-padding-start:calc(var(--row-gap-x));padding-inline-start:calc(var(--row-gap-x))}}.pds-row--no-wrap{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.pds-row--border{border:var(--pine-border)}.pds-justify-content-start{-ms-flex-pack:start;justify-content:start}.pds-justify-content-center{-ms-flex-pack:center;justify-content:center}.pds-justify-content-end{-ms-flex-pack:end;justify-content:end}.pds-justify-content-space-between{-ms-flex-pack:justify;justify-content:space-between}.pds-justify-content-space-around{-ms-flex-pack:distribute;justify-content:space-around}.pds-justify-content-space-evenly{-ms-flex-pack:space-evenly;justify-content:space-evenly}.pds-align-items-start{-ms-flex-align:start;align-items:start}.pds-align-items-center{-ms-flex-align:center;align-items:center}.pds-align-items-end{-ms-flex-align:end;align-items:end}.pds-align-items-stretch{-ms-flex-align:stretch;align-items:stretch}.pds-align-items-baseline{-ms-flex-align:baseline;align-items:baseline}`;
|
|
6
7
|
|
|
7
8
|
const PdsRow = class {
|
|
8
9
|
constructor(hostRef) {
|
|
9
10
|
index.registerInstance(this, hostRef);
|
|
11
|
+
this.hostKeeper = new attributes.HostStylingKeeper();
|
|
10
12
|
/**
|
|
11
13
|
* If `true`, the row will have a border.
|
|
12
14
|
*/
|
|
@@ -44,6 +46,12 @@ const PdsRow = class {
|
|
|
44
46
|
'800': 'var(--pine-dimension-800)'
|
|
45
47
|
};
|
|
46
48
|
}
|
|
49
|
+
connectedCallback() {
|
|
50
|
+
this.hostKeeper.connect(this.el);
|
|
51
|
+
}
|
|
52
|
+
disconnectedCallback() {
|
|
53
|
+
this.hostKeeper.disconnect();
|
|
54
|
+
}
|
|
47
55
|
render() {
|
|
48
56
|
const rowClasses = `
|
|
49
57
|
${this.alignItems !== undefined && this.alignItems.trim() !== '' ? `pds-align-items-${this.alignItems}` : ''}
|
|
@@ -61,8 +69,10 @@ const PdsRow = class {
|
|
|
61
69
|
})), (this.minHeight && {
|
|
62
70
|
'min-height': this.minHeight,
|
|
63
71
|
}));
|
|
64
|
-
|
|
72
|
+
this.hostKeeper.record(`pds-row ${rowClasses}`, rowInlineStyles);
|
|
73
|
+
return index.h(index.Host, { key: 'ee3a32ae1376919c7c2d1fcf186a1b7c272ee085', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
|
|
65
74
|
}
|
|
75
|
+
get el() { return index.getElement(this); }
|
|
66
76
|
};
|
|
67
77
|
PdsRow.style = pdsRowCss();
|
|
68
78
|
|