@pine-ds/core 4.4.3 → 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 +14 -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-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-63422f56.entry.js +0 -2
- 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-8961d112.system.entry.js +0 -3
- 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-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,4 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-bLhIfh0N.js';
|
|
2
|
+
import { a as closest } from './closest-DHPzKMVS.js';
|
|
2
3
|
import { u as unwrapReconnectedContent } from './reconnected-content-RFpTWV6r.js';
|
|
3
4
|
|
|
4
5
|
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}`;
|
|
@@ -7,6 +8,89 @@ const PRESET_SIZES = ['sm', 'md', 'lg', 'fullscreen'];
|
|
|
7
8
|
const isCustomLength = (value) => /^[a-z0-9.%+\-*/(), ]+$/i.test(value) &&
|
|
8
9
|
/\d/.test(value) &&
|
|
9
10
|
(typeof CSS === 'undefined' || CSS.supports('max-width', value));
|
|
11
|
+
const TABBABLE = [
|
|
12
|
+
'a[href]',
|
|
13
|
+
'area[href]',
|
|
14
|
+
'button',
|
|
15
|
+
'input:not([type="hidden"])',
|
|
16
|
+
'select',
|
|
17
|
+
'textarea',
|
|
18
|
+
'iframe',
|
|
19
|
+
'summary',
|
|
20
|
+
'[contenteditable]:not([contenteditable="false"])',
|
|
21
|
+
'[tabindex]',
|
|
22
|
+
].join(',');
|
|
23
|
+
/**
|
|
24
|
+
* Collects the tabbable elements under `root` in focus order, walking into open shadow roots and
|
|
25
|
+
* following slots, so a component's own controls (the input inside pds-combobox or pds-textarea)
|
|
26
|
+
* count without being registered here by tag name. Positive tabindex values are not reordered,
|
|
27
|
+
* and a closed shadow root can't be seen into.
|
|
28
|
+
*/
|
|
29
|
+
function collectTabbable(root, found) {
|
|
30
|
+
for (const child of Array.from(root.children))
|
|
31
|
+
visitTabbable(child, found);
|
|
32
|
+
}
|
|
33
|
+
// An editing host reports tabIndex -1 but is still a Tab stop; editable content inside it is not.
|
|
34
|
+
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)); };
|
|
35
|
+
function visitTabbable(el, found) {
|
|
36
|
+
var _a, _b, _c, _d;
|
|
37
|
+
if (el.hasAttribute('inert'))
|
|
38
|
+
return;
|
|
39
|
+
if (el.localName === 'slot') {
|
|
40
|
+
const slot = el;
|
|
41
|
+
// Fallback content renders only when nothing at all is assigned, text included.
|
|
42
|
+
if (((_b = (_a = slot.assignedNodes) === null || _a === void 0 ? void 0 : _a.call(slot, { flatten: true })) !== null && _b !== void 0 ? _b : []).length === 0)
|
|
43
|
+
return collectTabbable(el, found);
|
|
44
|
+
for (const slotted of slot.assignedElements({ flatten: true }))
|
|
45
|
+
visitTabbable(slotted, found);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
// A delegatesFocus host passes focus to its first control, which the walk below finds.
|
|
49
|
+
const delegates = ((_c = el.shadowRoot) === null || _c === void 0 ? void 0 : _c.delegatesFocus) === true;
|
|
50
|
+
if (el instanceof HTMLElement && !delegates && isTabStop(el) && el.matches(TABBABLE) && !el.matches(':disabled')) {
|
|
51
|
+
found.push(el);
|
|
52
|
+
}
|
|
53
|
+
// A shadow host's light children render only through its slots, which the walk reaches.
|
|
54
|
+
collectTabbable((_d = el.shadowRoot) !== null && _d !== void 0 ? _d : el, found);
|
|
55
|
+
}
|
|
56
|
+
/** The element as a radio in a named group, or `null`. */
|
|
57
|
+
const groupedRadio = (el) => el instanceof HTMLInputElement && el.type === 'radio' && el.name !== '' ? el : null;
|
|
58
|
+
/**
|
|
59
|
+
* Keeps one radio per named group, as the browser does: the checked one, or the first. The others
|
|
60
|
+
* are reached with the arrow keys, so they can't be the first or last stop of the trap.
|
|
61
|
+
*/
|
|
62
|
+
function oneRadioPerGroup(elements) {
|
|
63
|
+
// Radios group by name and form within one tree, so each shadow root starts its own groups.
|
|
64
|
+
const groups = [];
|
|
65
|
+
for (const el of elements) {
|
|
66
|
+
const radio = groupedRadio(el);
|
|
67
|
+
if (radio === null)
|
|
68
|
+
continue;
|
|
69
|
+
const group = groups.find(([first]) => first.name === radio.name && first.form === radio.form && first.getRootNode() === radio.getRootNode());
|
|
70
|
+
if (group)
|
|
71
|
+
group.push(radio);
|
|
72
|
+
else
|
|
73
|
+
groups.push([radio]);
|
|
74
|
+
}
|
|
75
|
+
const stops = new Set(groups.map((radios) => { var _a; return (_a = radios.find((radio) => radio.checked)) !== null && _a !== void 0 ? _a : radios[0]; }));
|
|
76
|
+
return elements.filter((el) => groupedRadio(el) === null || stops.has(el));
|
|
77
|
+
}
|
|
78
|
+
/** Whether `node` is `ancestor` or inside it, crossing shadow roots, which `Node.contains` doesn't. */
|
|
79
|
+
function containsComposed(ancestor, node) {
|
|
80
|
+
for (let current = node; current; current = current instanceof ShadowRoot ? current.host : current.parentNode) {
|
|
81
|
+
if (current === ancestor)
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
/** The focused element, followed down through shadow roots to the control that has focus. */
|
|
87
|
+
function deepActiveElement() {
|
|
88
|
+
var _a;
|
|
89
|
+
let active = document.activeElement;
|
|
90
|
+
while ((_a = active === null || active === void 0 ? void 0 : active.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement)
|
|
91
|
+
active = active.shadowRoot.activeElement;
|
|
92
|
+
return active;
|
|
93
|
+
}
|
|
10
94
|
const PdsModal = class {
|
|
11
95
|
constructor(hostRef) {
|
|
12
96
|
registerInstance(this, hostRef);
|
|
@@ -126,6 +210,17 @@ const PdsModal = class {
|
|
|
126
210
|
// disableTopLayer), so do not trap Tab here.
|
|
127
211
|
if (this.disableTopLayer)
|
|
128
212
|
return;
|
|
213
|
+
// A control inside that handles Tab itself (a popup with its own trap) has already moved
|
|
214
|
+
// focus. This holds only when it listens on its own element, which runs before this
|
|
215
|
+
// document listener; one listening on document too would race it.
|
|
216
|
+
if (e.defaultPrevented)
|
|
217
|
+
return;
|
|
218
|
+
// Every open modal hears this keydown. When focus is in a modal dialog opened above this one,
|
|
219
|
+
// that dialog traps Tab: this modal's list also holds its controls, so it would wrap first. A
|
|
220
|
+
// non-modal dialog inside (a disableTopLayer modal) doesn't trap, so this one still does.
|
|
221
|
+
const activeElement = deepActiveElement();
|
|
222
|
+
if (!activeElement || this.modalDialogAbove(activeElement))
|
|
223
|
+
return;
|
|
129
224
|
// Content can change while the modal is open (rows fetched in, sections shown), so the
|
|
130
225
|
// first and last elements are read now rather than from the list taken on opening.
|
|
131
226
|
this.updateFocusableElements();
|
|
@@ -135,13 +230,13 @@ const PdsModal = class {
|
|
|
135
230
|
// Get the first and last focusable elements
|
|
136
231
|
const firstFocusableElement = this.focusableElements[0];
|
|
137
232
|
const lastFocusableElement = this.focusableElements[this.focusableElements.length - 1];
|
|
138
|
-
//
|
|
139
|
-
|
|
140
|
-
//
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
const
|
|
144
|
-
|
|
233
|
+
// activeElement is the control inside any shadow root, as the list holds, not the host
|
|
234
|
+
// document.activeElement reports. It's matched to its own stop first, so a stop inside a
|
|
235
|
+
// listed host isn't taken for that host; a focused node that isn't a stop counts as the
|
|
236
|
+
// innermost stop it sits in.
|
|
237
|
+
const stop = this.stopIndex(activeElement);
|
|
238
|
+
const isFirstElement = stop === 0;
|
|
239
|
+
const isLastElement = stop === this.focusableElements.length - 1;
|
|
145
240
|
// If shift + tab is pressed and focus is on the first element, move to the last element
|
|
146
241
|
if (e.shiftKey && isFirstElement) {
|
|
147
242
|
e.preventDefault();
|
|
@@ -198,23 +293,8 @@ const PdsModal = class {
|
|
|
198
293
|
updateFocusableElements() {
|
|
199
294
|
if (!this.modalRef)
|
|
200
295
|
return;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
'a[href]',
|
|
204
|
-
'button:not([disabled])',
|
|
205
|
-
'input:not([disabled])',
|
|
206
|
-
'select:not([disabled])',
|
|
207
|
-
'textarea:not([disabled])',
|
|
208
|
-
'[tabindex]:not([tabindex="-1"])',
|
|
209
|
-
'pds-button:not([disabled])',
|
|
210
|
-
'pds-link:not([disabled])',
|
|
211
|
-
'pds-input:not([disabled])',
|
|
212
|
-
'pds-checkbox:not([disabled])',
|
|
213
|
-
'pds-radio:not([disabled])',
|
|
214
|
-
'pds-switch:not([disabled])',
|
|
215
|
-
'pds-select:not([disabled])',
|
|
216
|
-
].join(',');
|
|
217
|
-
this.focusableElements = Array.from(this.modalRef.querySelectorAll(selector));
|
|
296
|
+
this.focusableElements = [];
|
|
297
|
+
collectTabbable(this.modalRef, this.focusableElements);
|
|
218
298
|
// checkVisibility() also drops an element inside a hidden ancestor, whose own computed
|
|
219
299
|
// display isn't none; such an element can't take focus, so it can't anchor the trap.
|
|
220
300
|
this.focusableElements = this.focusableElements.filter(el => {
|
|
@@ -223,6 +303,7 @@ const PdsModal = class {
|
|
|
223
303
|
const style = window.getComputedStyle(el);
|
|
224
304
|
return style.display !== 'none' && style.visibility !== 'hidden';
|
|
225
305
|
});
|
|
306
|
+
this.focusableElements = oneRadioPerGroup(this.focusableElements);
|
|
226
307
|
}
|
|
227
308
|
/**
|
|
228
309
|
* Sets focus to the first focusable element in the modal
|
|
@@ -236,30 +317,11 @@ const PdsModal = class {
|
|
|
236
317
|
this.focusElement(firstElement);
|
|
237
318
|
}
|
|
238
319
|
/**
|
|
239
|
-
*
|
|
320
|
+
* Focuses an element from the list. It holds the controls themselves, inside any shadow root,
|
|
321
|
+
* so they take focus directly.
|
|
240
322
|
*/
|
|
241
323
|
focusElement(element) {
|
|
242
|
-
|
|
243
|
-
return;
|
|
244
|
-
try {
|
|
245
|
-
// Try standard focus first
|
|
246
|
-
element.focus();
|
|
247
|
-
// Check if focus worked
|
|
248
|
-
setTimeout(() => {
|
|
249
|
-
if (document.activeElement !== element) {
|
|
250
|
-
// For web components, try to find a focusable element inside
|
|
251
|
-
if (element.shadowRoot) {
|
|
252
|
-
const focusableInShadow = element.shadowRoot.querySelector('button, [tabindex], input, a[href]');
|
|
253
|
-
if (focusableInShadow) {
|
|
254
|
-
focusableInShadow.focus();
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}, 0);
|
|
259
|
-
}
|
|
260
|
-
catch (error) {
|
|
261
|
-
console.error('Error focusing element:', error);
|
|
262
|
-
}
|
|
324
|
+
element === null || element === void 0 ? void 0 : element.focus();
|
|
263
325
|
}
|
|
264
326
|
/**
|
|
265
327
|
* Opens the modal
|
|
@@ -422,6 +484,30 @@ const PdsModal = class {
|
|
|
422
484
|
const thisZIndex = this.getBackdropZIndex(this.el);
|
|
423
485
|
return thisZIndex === maxZIndex;
|
|
424
486
|
}
|
|
487
|
+
/** Whether a modal dialog other than this one sits between the focused element and this modal. */
|
|
488
|
+
modalDialogAbove(active) {
|
|
489
|
+
var _a;
|
|
490
|
+
for (let dialog = closest('dialog[open]', active); dialog instanceof HTMLElement;) {
|
|
491
|
+
if (dialog === this.modalRef)
|
|
492
|
+
return false;
|
|
493
|
+
if (dialog.matches(':modal'))
|
|
494
|
+
return true;
|
|
495
|
+
// Up from this dialog, across a shadow root; past the document root, closest() gives nothing.
|
|
496
|
+
dialog = closest('dialog[open]', (_a = dialog.parentElement) !== null && _a !== void 0 ? _a : dialog.getRootNode().host);
|
|
497
|
+
}
|
|
498
|
+
return false;
|
|
499
|
+
}
|
|
500
|
+
/** The focused element's place in the list: its own stop, or the innermost stop it sits in. */
|
|
501
|
+
stopIndex(active) {
|
|
502
|
+
const own = this.focusableElements.indexOf(active);
|
|
503
|
+
if (own >= 0)
|
|
504
|
+
return own;
|
|
505
|
+
for (let i = this.focusableElements.length - 1; i >= 0; i--) {
|
|
506
|
+
if (containsComposed(this.focusableElements[i], active))
|
|
507
|
+
return i;
|
|
508
|
+
}
|
|
509
|
+
return -1;
|
|
510
|
+
}
|
|
425
511
|
resolveSize() {
|
|
426
512
|
var _a;
|
|
427
513
|
const size = ((_a = this.size) !== null && _a !== void 0 ? _a : '').trim() || 'md';
|
|
@@ -436,14 +522,14 @@ const PdsModal = class {
|
|
|
436
522
|
}
|
|
437
523
|
render() {
|
|
438
524
|
const [sizeClass = 'md', customSize] = this.resolveSize();
|
|
439
|
-
return (h("dialog", { key: '
|
|
525
|
+
return (h("dialog", { key: 'b6714c7e77d80bf2370f2170ffce029abe147d81', class: {
|
|
440
526
|
'pds-modal__backdrop': true,
|
|
441
527
|
'open': this.open
|
|
442
|
-
}, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, h("div", { key: '
|
|
528
|
+
}, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, h("div", { key: '8c3319f53dd8c79c9e952785277e9e82e28b651e', class: {
|
|
443
529
|
'pds-modal': true,
|
|
444
530
|
[`pds-modal--${sizeClass}`]: true,
|
|
445
531
|
'pds-modal--scrollable': this.scrollable
|
|
446
|
-
}, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, h("slot", { key: '
|
|
532
|
+
}, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, h("slot", { key: '8c6f9cc1a20b515659344ad041512de52761800d' }))));
|
|
447
533
|
}
|
|
448
534
|
get el() { return getElement(this); }
|
|
449
535
|
static get watchers() { return {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-bLhIfh0N.js';
|
|
2
2
|
import { c as containsComposed } from './closest-DHPzKMVS.js';
|
|
3
|
+
import { r as restoreReflectedDefault } from './reflected-attribute-default-t3idJwV0.js';
|
|
4
|
+
import { s as setAttributesIfChanged } from './attributes-myrJDwbR.js';
|
|
3
5
|
|
|
4
6
|
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}`;
|
|
5
7
|
|
|
@@ -17,10 +19,22 @@ const PdsPopover = class {
|
|
|
17
19
|
* Tracks if the component is still mounted to prevent memory leaks
|
|
18
20
|
*/
|
|
19
21
|
this.isComponentMounted = true;
|
|
22
|
+
/**
|
|
23
|
+
* Set once `componentDidLoad` has built the portal, so a later reconnect knows to rebuild it
|
|
24
|
+
*/
|
|
25
|
+
this.hasLoaded = false;
|
|
26
|
+
/**
|
|
27
|
+
* A popover without a componentId keeps one generated portal id, even when the portal is rebuilt
|
|
28
|
+
*/
|
|
29
|
+
this.generatedPortalId = null;
|
|
20
30
|
/**
|
|
21
31
|
* Reference to the trigger element
|
|
22
32
|
*/
|
|
23
33
|
this.triggerEl = null;
|
|
34
|
+
/**
|
|
35
|
+
* Puts the trigger's ARIA back when something else removes or changes it
|
|
36
|
+
*/
|
|
37
|
+
this.triggerObserver = null;
|
|
24
38
|
/**
|
|
25
39
|
* Portal element rendered in document.body
|
|
26
40
|
*/
|
|
@@ -82,6 +96,7 @@ const PdsPopover = class {
|
|
|
82
96
|
else {
|
|
83
97
|
this.triggerEl = null;
|
|
84
98
|
}
|
|
99
|
+
this.observeTrigger();
|
|
85
100
|
};
|
|
86
101
|
/**
|
|
87
102
|
* Handles changes to the default slot (popover content)
|
|
@@ -118,6 +133,9 @@ const PdsPopover = class {
|
|
|
118
133
|
}
|
|
119
134
|
};
|
|
120
135
|
}
|
|
136
|
+
restorePlacementDefault(newValue) {
|
|
137
|
+
this.placement = restoreReflectedDefault(this.el, 'placement', newValue, 'right');
|
|
138
|
+
}
|
|
121
139
|
componentDidLoad() {
|
|
122
140
|
var _a;
|
|
123
141
|
// Bind event handlers for cleanup
|
|
@@ -127,6 +145,7 @@ const PdsPopover = class {
|
|
|
127
145
|
this.boundResizeHandler = this.handleResize.bind(this);
|
|
128
146
|
// Create portal element
|
|
129
147
|
this.createPortal();
|
|
148
|
+
this.hasLoaded = true;
|
|
130
149
|
// Initialize trigger element by calling slot change handler
|
|
131
150
|
// This is a fallback for environments where slot change might not fire reliably
|
|
132
151
|
const triggerSlot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot[name="trigger"]');
|
|
@@ -141,20 +160,69 @@ const PdsPopover = class {
|
|
|
141
160
|
this.linkTriggerToPortal();
|
|
142
161
|
}
|
|
143
162
|
}
|
|
163
|
+
// The trigger is the consumer's element, so anything can rewrite its attributes (a Turbo morph
|
|
164
|
+
// matches it to server HTML that has no ARIA). Put Pine's values back when that happens.
|
|
165
|
+
observeTrigger() {
|
|
166
|
+
var _a;
|
|
167
|
+
(_a = this.triggerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
168
|
+
this.triggerObserver = null;
|
|
169
|
+
if (this.triggerEl == null || typeof MutationObserver === 'undefined')
|
|
170
|
+
return;
|
|
171
|
+
this.triggerObserver = new MutationObserver(() => this.linkTriggerToPortal());
|
|
172
|
+
this.triggerObserver.observe(this.triggerEl, {
|
|
173
|
+
attributes: true,
|
|
174
|
+
attributeFilter: ['aria-expanded', 'aria-controls'],
|
|
175
|
+
});
|
|
176
|
+
}
|
|
144
177
|
// Set ARIA attributes to establish relationship between trigger and popover
|
|
145
178
|
// This mirrors the native Popover API's accessibility behavior
|
|
146
179
|
linkTriggerToPortal() {
|
|
147
180
|
if (this.triggerEl == null || this.portalEl == null)
|
|
148
181
|
return;
|
|
149
|
-
|
|
150
|
-
this.triggerEl.
|
|
182
|
+
// Skips values already in place, so the trigger observer's own callback doesn't loop.
|
|
183
|
+
setAttributesIfChanged(this.triggerEl, { 'aria-expanded': String(this.active), 'aria-controls': this.portalEl.id });
|
|
184
|
+
}
|
|
185
|
+
// componentDidLoad doesn't run again when a popover comes back, so rebuild whatever
|
|
186
|
+
// disconnectedCallback tore down. Each step is a no-op when nothing was.
|
|
187
|
+
connectedCallback() {
|
|
188
|
+
var _a;
|
|
189
|
+
if (!this.hasLoaded)
|
|
190
|
+
return;
|
|
191
|
+
this.isComponentMounted = true;
|
|
192
|
+
this.createPortal();
|
|
193
|
+
(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.addEventListener('click', this.handleTriggerClick);
|
|
194
|
+
this.observeTrigger();
|
|
195
|
+
this.linkTriggerToPortal();
|
|
196
|
+
// Still open after a move: the trigger moved, so the portal follows it.
|
|
197
|
+
if (this.active) {
|
|
198
|
+
requestAnimationFrame(() => this.handlePopoverPositioning());
|
|
199
|
+
}
|
|
151
200
|
}
|
|
152
201
|
disconnectedCallback() {
|
|
202
|
+
var _a;
|
|
203
|
+
// Moved in one operation (a DOM morph, or a framework reparenting it), the popover is
|
|
204
|
+
// already back in the page. Its portal is in <body>, untouched, so it stays open, with focus
|
|
205
|
+
// where it was.
|
|
206
|
+
if (this.el.isConnected)
|
|
207
|
+
return;
|
|
153
208
|
this.isComponentMounted = false;
|
|
209
|
+
// Open, the content sits in the portal; put it back before the portal goes. Only listeners on
|
|
210
|
+
// the popover itself hear the close event now, but those are the ones mirroring its state.
|
|
211
|
+
if (this.active) {
|
|
212
|
+
this.restorePortalContent();
|
|
213
|
+
this.active = false;
|
|
214
|
+
this.linkTriggerToPortal();
|
|
215
|
+
this.pdsPopoverClose.emit({
|
|
216
|
+
componentId: this.componentId,
|
|
217
|
+
popoverType: this.popoverType,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
154
220
|
// Clean up trigger click event listener
|
|
155
221
|
if (this.triggerEl != null) {
|
|
156
222
|
this.triggerEl.removeEventListener('click', this.handleTriggerClick);
|
|
157
223
|
}
|
|
224
|
+
(_a = this.triggerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
225
|
+
this.triggerObserver = null;
|
|
158
226
|
// Clean up all event listeners
|
|
159
227
|
this.removeLightDismissListeners();
|
|
160
228
|
this.removeScrollAndResizeListeners();
|
|
@@ -177,6 +245,7 @@ const PdsPopover = class {
|
|
|
177
245
|
}
|
|
178
246
|
}
|
|
179
247
|
createPortal() {
|
|
248
|
+
var _a;
|
|
180
249
|
if (this.portalEl !== null)
|
|
181
250
|
return;
|
|
182
251
|
this.portalEl = document.createElement('div');
|
|
@@ -195,8 +264,8 @@ const PdsPopover = class {
|
|
|
195
264
|
this.portalEl.style.padding = 'var(--pine-dimension-md)';
|
|
196
265
|
// Generate unique ID
|
|
197
266
|
if (!this.componentId) {
|
|
198
|
-
|
|
199
|
-
this.portalEl.id =
|
|
267
|
+
(_a = this.generatedPortalId) !== null && _a !== void 0 ? _a : (this.generatedPortalId = `pds-popover-portal-${PdsPopover.instanceCounter++}`);
|
|
268
|
+
this.portalEl.id = this.generatedPortalId;
|
|
200
269
|
}
|
|
201
270
|
else {
|
|
202
271
|
this.portalEl.id = `${this.componentId}-portal`;
|
|
@@ -308,10 +377,7 @@ const PdsPopover = class {
|
|
|
308
377
|
this.active = true;
|
|
309
378
|
// Record open timestamp to prevent immediate close from opening click
|
|
310
379
|
this.openTimestamp = Date.now();
|
|
311
|
-
|
|
312
|
-
if (this.triggerEl) {
|
|
313
|
-
this.triggerEl.setAttribute('aria-expanded', 'true');
|
|
314
|
-
}
|
|
380
|
+
this.linkTriggerToPortal();
|
|
315
381
|
// Update portal content with latest slot content
|
|
316
382
|
this.updatePortalContent();
|
|
317
383
|
// Show portal
|
|
@@ -345,10 +411,7 @@ const PdsPopover = class {
|
|
|
345
411
|
this.active = false;
|
|
346
412
|
// Restoring the content drops its focus to the body, so check where focus is first.
|
|
347
413
|
const focusWasInside = this.portalEl.contains(document.activeElement);
|
|
348
|
-
|
|
349
|
-
if (this.triggerEl) {
|
|
350
|
-
this.triggerEl.setAttribute('aria-expanded', 'false');
|
|
351
|
-
}
|
|
414
|
+
this.linkTriggerToPortal();
|
|
352
415
|
// Restore content back to original slot positions
|
|
353
416
|
this.restorePortalContent();
|
|
354
417
|
// Hide portal
|
|
@@ -574,9 +637,14 @@ const PdsPopover = class {
|
|
|
574
637
|
}, 16); // ~1 frame at 60fps
|
|
575
638
|
}
|
|
576
639
|
render() {
|
|
577
|
-
return (h(Host, { key: '
|
|
640
|
+
return (h(Host, { key: '66347d4922274d25504e5be134b36f05a3f12fdc', id: this.componentId }, h("span", { key: '8f29d54d58cf0c66f86470c77c676716f1ab056f', class: "pds-popover__trigger-wrapper" }, h("slot", { key: '5c89b687cfc01e67d3c11835e77755de88f03584', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), h("div", { key: '0ca9aff3021720098d86ec29eb69cbf149ef79a9', class: "pds-popover__content-slot-wrapper" }, h("slot", { key: 'b73c3324d3322c41c68161e9ada51499c0e49cb0', onSlotchange: this.handleContentSlotChange }))));
|
|
578
641
|
}
|
|
579
642
|
get el() { return getElement(this); }
|
|
643
|
+
static get watchers() { return {
|
|
644
|
+
"placement": [{
|
|
645
|
+
"restorePlacementDefault": 0
|
|
646
|
+
}]
|
|
647
|
+
}; }
|
|
580
648
|
};
|
|
581
649
|
/**
|
|
582
650
|
* Instance counter for unique IDs
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-bLhIfh0N.js';
|
|
1
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-bLhIfh0N.js';
|
|
2
|
+
import { H as HostStylingKeeper } from './attributes-myrJDwbR.js';
|
|
2
3
|
import { n as normalizeColorValue } from './utils-OYK5-nwe.js';
|
|
3
4
|
|
|
4
5
|
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)}`;
|
|
@@ -6,6 +7,7 @@ const pdsProgressCss = () => `:host{--color-progress-fill:var(--pine-color-prima
|
|
|
6
7
|
const PdsProgress = class {
|
|
7
8
|
constructor(hostRef) {
|
|
8
9
|
registerInstance(this, hostRef);
|
|
10
|
+
this.hostKeeper = new HostStylingKeeper();
|
|
9
11
|
/**
|
|
10
12
|
* Determines whether or not progress is animated.
|
|
11
13
|
* @defaultValue false
|
|
@@ -22,10 +24,19 @@ const PdsProgress = class {
|
|
|
22
24
|
*/
|
|
23
25
|
this.showPercent = false;
|
|
24
26
|
}
|
|
27
|
+
connectedCallback() {
|
|
28
|
+
this.hostKeeper.connect(this.el);
|
|
29
|
+
}
|
|
30
|
+
disconnectedCallback() {
|
|
31
|
+
this.hostKeeper.disconnect();
|
|
32
|
+
}
|
|
25
33
|
render() {
|
|
26
34
|
const normalizedFillColor = normalizeColorValue(this.fillColor);
|
|
27
|
-
|
|
35
|
+
const hostClass = this.animated ? { 'is-animated': this.animated } : '';
|
|
36
|
+
this.hostKeeper.record(hostClass);
|
|
37
|
+
return (h(Host, { key: '5573a5c48eee2f7968835db92afdaebb73c1b85e', class: hostClass }, h("div", { key: 'bb5cf260495be798f4272673884336022c28441e', class: "pds-progress" }, h("label", { key: '017efa649ada73ec724b930e06bbf1ab19a18f61', class: "pds-progress__label", htmlFor: this.componentId }, this.label), h("progress", { key: 'e648d910b072b7b2ca1c4a92c0832bf6e2ef5406', id: this.componentId, max: "100", style: normalizedFillColor ? { '--color-progress-fill': normalizedFillColor } : {}, value: this.percent })), this.showPercent && h("div", { key: '1f9f1733ff2cd6e2ec81e9a46759ff451cf158f7', class: "pds-progress__percentage" }, this.percent, "%")));
|
|
28
38
|
}
|
|
39
|
+
get el() { return getElement(this); }
|
|
29
40
|
};
|
|
30
41
|
PdsProgress.style = pdsProgressCss();
|
|
31
42
|
|
|
@@ -162,13 +162,13 @@ const PdsRadioGroup = class {
|
|
|
162
162
|
render() {
|
|
163
163
|
const gapValue = this.getGapValue();
|
|
164
164
|
const ariaDescribedBy = this.getAriaDescribedBy();
|
|
165
|
-
return (h(Host, { key: '
|
|
165
|
+
return (h(Host, { key: '9dc78eb36bbc1b872f4320203dbbc64e43816ebf', class: this.classNames(), id: this._groupId, role: "group", "aria-describedby": ariaDescribedBy, style: {
|
|
166
166
|
'--pds-radio-group-gap': gapValue,
|
|
167
|
-
} }, this.groupLabel && (h("div", { key: '
|
|
167
|
+
} }, this.groupLabel && (h("div", { key: '7b6f95608dcf356b141ef5d590ff3070f83b5975', class: "pds-radio-group__label" }, this.groupLabel)), h("div", { key: '6e1a634c9b81ca3f3bbbe9c6590bcd4efc97e6ea', class: {
|
|
168
168
|
'pds-radio-group__radios': true,
|
|
169
169
|
'pds-radio-group__radios--row': this.direction === 'row',
|
|
170
170
|
'pds-radio-group__radios--column': this.direction === 'column',
|
|
171
|
-
} }, h("slot", { key: '
|
|
171
|
+
} }, h("slot", { key: 'b5b16148f3c77d425a50b7ada8a822e9919ef5c5', onSlotchange: () => this.updateChildRadios() })), this.helperMessage && (h("div", { key: 'ca6b98f926b8d7a53fda630170ac037c99f5ee85', class: "pds-radio-group__message", id: messageId(this._groupId, 'helper') }, this.helperMessage)), this.errorMessage && (h("div", { key: '37b57e2622370364e619ea090712a7b79fe79501', class: "pds-radio-group__message pds-radio-group__message--error", id: messageId(this._groupId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '6a362d048a67312b1b227f71cc4b8f821ae0817e', icon: danger, size: "small" }), this.errorMessage))));
|
|
172
172
|
}
|
|
173
173
|
get el() { return getElement(this); }
|
|
174
174
|
static get watchers() { return {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-bLhIfh0N.js';
|
|
2
|
+
import { H as HostStylingKeeper } from './attributes-myrJDwbR.js';
|
|
2
3
|
import { e as exposeTypeProperty, a as assignDescription, m as messageId } from './form-BuRbS7Hp.js';
|
|
3
4
|
import { b as danger } from './index-DxI-61GK.js';
|
|
4
5
|
|
|
@@ -11,6 +12,7 @@ const PdsRadio = class {
|
|
|
11
12
|
registerInstance(this, hostRef);
|
|
12
13
|
this.pdsRadioChange = createEvent(this, "pdsRadioChange");
|
|
13
14
|
this._type = 'radio';
|
|
15
|
+
this.hostKeeper = new HostStylingKeeper();
|
|
14
16
|
this._hasImage = false;
|
|
15
17
|
/**
|
|
16
18
|
* Determines whether or not the radio is checked.
|
|
@@ -78,9 +80,13 @@ const PdsRadio = class {
|
|
|
78
80
|
this._hasImage = this.hasImageSlot();
|
|
79
81
|
}
|
|
80
82
|
connectedCallback() {
|
|
83
|
+
this.hostKeeper.connect(this.el);
|
|
81
84
|
// Expose type property on the element instance to match native form element behavior
|
|
82
85
|
exposeTypeProperty(this.el, () => this._type);
|
|
83
86
|
}
|
|
87
|
+
disconnectedCallback() {
|
|
88
|
+
this.hostKeeper.disconnect();
|
|
89
|
+
}
|
|
84
90
|
// 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.
|
|
85
91
|
componentDidRender() {
|
|
86
92
|
const freshImageContainer = this.el.querySelector('.pds-radio__image-container:not([hidden])');
|
|
@@ -95,11 +101,13 @@ const PdsRadio = class {
|
|
|
95
101
|
}
|
|
96
102
|
render() {
|
|
97
103
|
const renderLabelAndMessages = () => [
|
|
98
|
-
h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, h("input", { key: '
|
|
104
|
+
h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, h("input", { key: 'add893cd82f79b9398589bd5c0a72d5ae4a90475', "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: 'b58eed8681d1932397d38ffe82515987e6486e08', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)),
|
|
99
105
|
this.helperMessage && (h("div", { key: `${this.componentId}-helper`, class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage)),
|
|
100
|
-
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: '
|
|
106
|
+
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: '7374924219e59eab46a7ced9e7062c3e674b4451', icon: danger, size: "small" }), this.errorMessage))
|
|
101
107
|
];
|
|
102
|
-
|
|
108
|
+
const hostClass = this.classNames();
|
|
109
|
+
this.hostKeeper.record(hostClass);
|
|
110
|
+
return (h(Host, { key: '24269923f168d1d39ebfc1994619736f0dc8087a', class: hostClass }, this.hasImage() && (h("div", { key: '74a72bef89aa012047cbf3a1744fcd33f13bb464', class: "pds-radio__image-container", part: "image-container" }, h("slot", { key: '99dbcfdac86cb7c012fd44eab607217e21304bab', name: "image", onSlotchange: () => (this._hasImage = this.hasImageSlot()) }))), this.hasImage() ? (h("div", { class: "pds-radio__content-wrapper" }, renderLabelAndMessages())) : (renderLabelAndMessages())));
|
|
103
111
|
}
|
|
104
112
|
get el() { return getElement(this); }
|
|
105
113
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-bLhIfh0N.js';
|
|
1
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-bLhIfh0N.js';
|
|
2
|
+
import { H as HostStylingKeeper } from './attributes-myrJDwbR.js';
|
|
2
3
|
|
|
3
4
|
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}`;
|
|
4
5
|
|
|
5
6
|
const PdsRow = class {
|
|
6
7
|
constructor(hostRef) {
|
|
7
8
|
registerInstance(this, hostRef);
|
|
9
|
+
this.hostKeeper = new HostStylingKeeper();
|
|
8
10
|
/**
|
|
9
11
|
* If `true`, the row will have a border.
|
|
10
12
|
*/
|
|
@@ -42,6 +44,12 @@ const PdsRow = class {
|
|
|
42
44
|
'800': 'var(--pine-dimension-800)'
|
|
43
45
|
};
|
|
44
46
|
}
|
|
47
|
+
connectedCallback() {
|
|
48
|
+
this.hostKeeper.connect(this.el);
|
|
49
|
+
}
|
|
50
|
+
disconnectedCallback() {
|
|
51
|
+
this.hostKeeper.disconnect();
|
|
52
|
+
}
|
|
45
53
|
render() {
|
|
46
54
|
const rowClasses = `
|
|
47
55
|
${this.alignItems !== undefined && this.alignItems.trim() !== '' ? `pds-align-items-${this.alignItems}` : ''}
|
|
@@ -59,8 +67,10 @@ const PdsRow = class {
|
|
|
59
67
|
})), (this.minHeight && {
|
|
60
68
|
'min-height': this.minHeight,
|
|
61
69
|
}));
|
|
62
|
-
|
|
70
|
+
this.hostKeeper.record(`pds-row ${rowClasses}`, rowInlineStyles);
|
|
71
|
+
return h(Host, { key: 'ee3a32ae1376919c7c2d1fcf186a1b7c272ee085', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
|
|
63
72
|
}
|
|
73
|
+
get el() { return getElement(this); }
|
|
64
74
|
};
|
|
65
75
|
PdsRow.style = pdsRowCss();
|
|
66
76
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-bLhIfh0N.js';
|
|
2
|
+
import { H as HostStylingKeeper } from './attributes-myrJDwbR.js';
|
|
2
3
|
import { e as exposeTypeProperty, m as messageId, i as isSpecTest, a as assignDescription } from './form-BuRbS7Hp.js';
|
|
3
4
|
import { b as danger, e as enlarge } from './index-DxI-61GK.js';
|
|
4
5
|
|
|
@@ -16,6 +17,7 @@ const PdsSelect = class {
|
|
|
16
17
|
this.pdsFocus = createEvent(this, "pdsFocus");
|
|
17
18
|
this.pdsKeyDown = createEvent(this, "pdsKeyDown");
|
|
18
19
|
this._type = 'select-one';
|
|
20
|
+
this.hostKeeper = new HostStylingKeeper();
|
|
19
21
|
/**
|
|
20
22
|
* Indicates whether or not the select field is disabled.
|
|
21
23
|
* @defaultValue false
|
|
@@ -97,6 +99,7 @@ const PdsSelect = class {
|
|
|
97
99
|
this._type = this.multiple ? 'select-multiple' : 'select-one';
|
|
98
100
|
}
|
|
99
101
|
connectedCallback() {
|
|
102
|
+
this.hostKeeper.connect(this.el);
|
|
100
103
|
// Initialize ElementInternals for form association (only once per element instance)
|
|
101
104
|
if (this.el.attachInternals && !this.internals) {
|
|
102
105
|
this.internals = this.el.attachInternals();
|
|
@@ -104,6 +107,9 @@ const PdsSelect = class {
|
|
|
104
107
|
// Expose type property on the element instance to match native form element behavior
|
|
105
108
|
exposeTypeProperty(this.el, () => this._type);
|
|
106
109
|
}
|
|
110
|
+
disconnectedCallback() {
|
|
111
|
+
this.hostKeeper.disconnect();
|
|
112
|
+
}
|
|
107
113
|
componentWillLoad() {
|
|
108
114
|
// Set initial type based on multiple prop
|
|
109
115
|
this.updateType();
|
|
@@ -236,7 +242,13 @@ const PdsSelect = class {
|
|
|
236
242
|
}
|
|
237
243
|
render() {
|
|
238
244
|
const hasAction = this.el.querySelector('[slot="action"]') !== null;
|
|
239
|
-
|
|
245
|
+
const hostClass = this.classNames();
|
|
246
|
+
const hostAttributes = {
|
|
247
|
+
'aria-disabled': this.disabled ? 'true' : null,
|
|
248
|
+
'has-action': hasAction && !this.hideLabel ? 'true' : null,
|
|
249
|
+
};
|
|
250
|
+
this.hostKeeper.record(hostClass, {}, hostAttributes);
|
|
251
|
+
return (h(Host, Object.assign({ key: 'c99bfc000ad351298e154554a8b22635b1abb718', class: hostClass }, hostAttributes), h("div", { key: '35374b150cbef745c6a6068ba5a2fde0803c0314', class: "pds-select" }, !this.hideLabel && (h("div", { key: 'a3b9bae451c5c384606790a29bf8ab5fc70427c0', class: "pds-select__label-wrapper" }, h("label", { key: '80d7740a05a6d3cce6d51224169eb6c2501c4896', htmlFor: this.componentId }, h("span", { key: 'a51c02d7c84f75bb168889dab50cae807271c63d', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), hasAction && this.renderAction())), h("select", { key: '11444dad795bd02c008252a60e701125861e4af0', "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: 'ce54fa1df287d96a7503bb19cd2ba6c74a6da638', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, h("slot", { key: '22c55e78999076a37d43fb708dabc7379dd4cee3', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && h("pds-icon", { key: '45628074fbcdb259b8bba42299082423309a6968', "aria-hidden": "true", class: "pds-select__select-icon", icon: enlarge }))));
|
|
240
252
|
}
|
|
241
253
|
static get formAssociated() { return true; }
|
|
242
254
|
get el() { return getElement(this); }
|