@pine-ds/core 4.4.3 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/attributes.js +1 -1
- package/components/closest.js +1 -1
- package/components/index.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-DXvaSETR.js +178 -0
- package/dist/cjs/{index-D8Gl0bIB.js → index-BQjWfQXw.js} +10 -1
- package/dist/cjs/index.cjs.js +3 -0
- package/dist/cjs/keep-hydrated-iLS88j1Z.js +67 -0
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/mock-pds-modal.cjs.entry.js +2 -1
- package/dist/cjs/pds-accordion.cjs.entry.js +2 -1
- package/dist/cjs/pds-alert.cjs.entry.js +2 -1
- package/dist/cjs/pds-avatar.cjs.entry.js +19 -2
- package/dist/cjs/pds-box.cjs.entry.js +13 -2
- package/dist/cjs/pds-button.cjs.entry.js +2 -1
- package/dist/cjs/pds-checkbox.cjs.entry.js +13 -5
- package/dist/cjs/pds-chip.cjs.entry.js +12 -2
- package/dist/cjs/pds-combobox.cjs.entry.js +13 -7
- package/dist/cjs/pds-container.cjs.entry.js +2 -1
- package/dist/cjs/pds-copytext.cjs.entry.js +18 -2
- package/dist/cjs/pds-datepicker.cjs.entry.js +3 -2
- package/dist/cjs/pds-divider.cjs.entry.js +2 -1
- package/dist/cjs/pds-drawer-content.cjs.entry.js +3 -2
- package/dist/cjs/pds-drawer-footer.cjs.entry.js +3 -2
- package/dist/cjs/pds-drawer-header.cjs.entry.js +3 -2
- package/dist/cjs/pds-drawer.cjs.entry.js +4 -3
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +2 -1
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +2 -1
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +41 -10
- package/dist/cjs/pds-filter.cjs.entry.js +2 -1
- package/dist/cjs/pds-filters.cjs.entry.js +2 -1
- package/dist/cjs/pds-icon.cjs.entry.js +2 -1
- package/dist/cjs/pds-image.cjs.entry.js +2 -1
- package/dist/cjs/pds-input.cjs.entry.js +3 -2
- package/dist/cjs/pds-link.cjs.entry.js +2 -1
- package/dist/cjs/pds-loader.cjs.entry.js +29 -2
- package/dist/cjs/pds-modal-content.cjs.entry.js +4 -3
- package/dist/cjs/pds-modal-footer.cjs.entry.js +3 -2
- package/dist/cjs/pds-modal-header.cjs.entry.js +3 -2
- package/dist/cjs/pds-modal.cjs.entry.js +137 -50
- package/dist/cjs/pds-multiselect.cjs.entry.js +2 -1
- package/dist/cjs/pds-popover.cjs.entry.js +83 -14
- package/dist/cjs/pds-progress.cjs.entry.js +14 -2
- package/dist/cjs/pds-property.cjs.entry.js +2 -1
- package/dist/cjs/pds-radio-group.cjs.entry.js +5 -4
- package/dist/cjs/pds-radio.cjs.entry.js +13 -4
- package/dist/cjs/pds-row.cjs.entry.js +13 -2
- package/dist/cjs/pds-select.cjs.entry.js +15 -2
- package/dist/cjs/pds-sortable-item.cjs.entry.js +12 -2
- package/dist/cjs/pds-sortable.cjs.entry.js +13 -2
- package/dist/cjs/pds-switch.cjs.entry.js +14 -5
- package/dist/cjs/pds-tab.cjs.entry.js +2 -1
- package/dist/cjs/pds-table-body.cjs.entry.js +2 -1
- package/dist/cjs/pds-table-cell.cjs.entry.js +2 -1
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +2 -1
- package/dist/cjs/pds-table-head.cjs.entry.js +2 -1
- package/dist/cjs/pds-table-row.cjs.entry.js +2 -1
- package/dist/cjs/pds-table.cjs.entry.js +2 -1
- package/dist/cjs/pds-tabpanel.cjs.entry.js +3 -2
- package/dist/cjs/pds-tabs.cjs.entry.js +15 -2
- package/dist/cjs/pds-text.cjs.entry.js +2 -1
- package/dist/cjs/pds-textarea.cjs.entry.js +3 -2
- package/dist/cjs/pds-toast.cjs.entry.js +2 -1
- package/dist/cjs/pds-tooltip.cjs.entry.js +4 -3
- package/dist/cjs/pine-core.cjs.js +3 -2
- package/dist/cjs/reflected-attribute-default-DVYHG6O1.js +44 -0
- package/dist/collection/collection-manifest.json +2 -1
- 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-datepicker/pds-datepicker.css +4 -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/global/pine-global.js +6 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/attributes.js +90 -0
- package/dist/collection/utils/keep-hydrated.js +61 -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-CF5K2pxn.js +173 -0
- package/dist/esm/{index-bLhIfh0N.js → index-2HMD-zUO.js} +10 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/keep-hydrated-Dv7ssOTc.js +63 -0
- package/dist/esm/loader.js +4 -3
- package/dist/esm/mock-pds-modal.entry.js +2 -1
- package/dist/esm/pds-accordion.entry.js +2 -1
- package/dist/esm/pds-alert.entry.js +2 -1
- package/dist/esm/pds-avatar.entry.js +19 -2
- package/dist/esm/pds-box.entry.js +13 -2
- package/dist/esm/pds-button.entry.js +2 -1
- package/dist/esm/pds-checkbox.entry.js +13 -5
- package/dist/esm/pds-chip.entry.js +12 -2
- package/dist/esm/pds-combobox.entry.js +13 -7
- package/dist/esm/pds-container.entry.js +2 -1
- package/dist/esm/pds-copytext.entry.js +18 -2
- package/dist/esm/pds-datepicker.entry.js +3 -2
- package/dist/esm/pds-divider.entry.js +2 -1
- package/dist/esm/pds-drawer-content.entry.js +3 -2
- package/dist/esm/pds-drawer-footer.entry.js +3 -2
- package/dist/esm/pds-drawer-header.entry.js +3 -2
- package/dist/esm/pds-drawer.entry.js +4 -3
- package/dist/esm/pds-dropdown-menu-item.entry.js +2 -1
- package/dist/esm/pds-dropdown-menu-separator.entry.js +2 -1
- package/dist/esm/pds-dropdown-menu.entry.js +41 -10
- package/dist/esm/pds-filter.entry.js +2 -1
- package/dist/esm/pds-filters.entry.js +2 -1
- package/dist/esm/pds-icon.entry.js +2 -1
- package/dist/esm/pds-image.entry.js +2 -1
- package/dist/esm/pds-input.entry.js +3 -2
- package/dist/esm/pds-link.entry.js +2 -1
- package/dist/esm/pds-loader.entry.js +29 -2
- package/dist/esm/pds-modal-content.entry.js +4 -3
- package/dist/esm/pds-modal-footer.entry.js +3 -2
- package/dist/esm/pds-modal-header.entry.js +3 -2
- package/dist/esm/pds-modal.entry.js +137 -50
- package/dist/esm/pds-multiselect.entry.js +2 -1
- package/dist/esm/pds-popover.entry.js +83 -14
- package/dist/esm/pds-progress.entry.js +14 -2
- package/dist/esm/pds-property.entry.js +2 -1
- package/dist/esm/pds-radio-group.entry.js +5 -4
- package/dist/esm/pds-radio.entry.js +13 -4
- package/dist/esm/pds-row.entry.js +13 -2
- package/dist/esm/pds-select.entry.js +15 -2
- package/dist/esm/pds-sortable-item.entry.js +12 -2
- package/dist/esm/pds-sortable.entry.js +13 -2
- package/dist/esm/pds-switch.entry.js +14 -5
- package/dist/esm/pds-tab.entry.js +2 -1
- package/dist/esm/pds-table-body.entry.js +2 -1
- package/dist/esm/pds-table-cell.entry.js +2 -1
- package/dist/esm/pds-table-head-cell.entry.js +2 -1
- package/dist/esm/pds-table-head.entry.js +2 -1
- package/dist/esm/pds-table-row.entry.js +2 -1
- package/dist/esm/pds-table.entry.js +2 -1
- package/dist/esm/pds-tabpanel.entry.js +3 -2
- package/dist/esm/pds-tabs.entry.js +15 -2
- package/dist/esm/pds-text.entry.js +2 -1
- package/dist/esm/pds-textarea.entry.js +3 -2
- package/dist/esm/pds-toast.entry.js +2 -1
- package/dist/esm/pds-tooltip.entry.js +4 -3
- package/dist/esm/pine-core.js +4 -3
- package/dist/esm/reflected-attribute-default-t3idJwV0.js +42 -0
- package/dist/esm-es5/attributes-CF5K2pxn.js +1 -0
- package/dist/esm-es5/{index-bLhIfh0N.js → index-2HMD-zUO.js} +2 -2
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/keep-hydrated-Dv7ssOTc.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-accordion.entry.js +1 -1
- package/dist/esm-es5/pds-alert.entry.js +1 -1
- package/dist/esm-es5/pds-avatar.entry.js +1 -1
- package/dist/esm-es5/pds-box.entry.js +1 -1
- package/dist/esm-es5/pds-button.entry.js +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-combobox.entry.js +2 -2
- package/dist/esm-es5/pds-container.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-datepicker.entry.js +1 -1
- package/dist/esm-es5/pds-divider.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-content.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-footer.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-header.entry.js +1 -1
- package/dist/esm-es5/pds-drawer.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm-es5/pds-filter.entry.js +1 -1
- package/dist/esm-es5/pds-filters.entry.js +1 -1
- package/dist/esm-es5/pds-icon.entry.js +1 -1
- package/dist/esm-es5/pds-image.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-link.entry.js +1 -1
- package/dist/esm-es5/pds-loader.entry.js +1 -1
- package/dist/esm-es5/pds-modal-content.entry.js +1 -1
- package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
- package/dist/esm-es5/pds-modal-header.entry.js +1 -1
- package/dist/esm-es5/pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-multiselect.entry.js +1 -1
- package/dist/esm-es5/pds-popover.entry.js +1 -1
- package/dist/esm-es5/pds-progress.entry.js +1 -1
- package/dist/esm-es5/pds-property.entry.js +1 -1
- package/dist/esm-es5/pds-radio-group.entry.js +1 -1
- package/dist/esm-es5/pds-radio.entry.js +1 -1
- package/dist/esm-es5/pds-row.entry.js +1 -1
- package/dist/esm-es5/pds-select.entry.js +1 -1
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
- package/dist/esm-es5/pds-sortable.entry.js +2 -2
- package/dist/esm-es5/pds-switch.entry.js +1 -1
- package/dist/esm-es5/pds-tab.entry.js +1 -1
- package/dist/esm-es5/pds-table-body.entry.js +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head.entry.js +1 -1
- package/dist/esm-es5/pds-table-row.entry.js +1 -1
- package/dist/esm-es5/pds-table.entry.js +1 -1
- package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
- package/dist/esm-es5/pds-tabs.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-toast.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/reflected-attribute-default-t3idJwV0.js +1 -0
- package/dist/pine-core/index.esm.js +1 -1
- package/dist/pine-core/p-0166c620.entry.js +1 -0
- package/dist/pine-core/p-02857936.entry.js +1 -0
- package/dist/pine-core/{p-5986f3c9.entry.js → p-04fe5da7.system.entry.js} +1 -1
- package/dist/pine-core/p-0de74105.entry.js +1 -0
- package/dist/pine-core/p-152245fa.system.entry.js +1 -0
- package/dist/pine-core/p-16c2aa63.entry.js +1 -0
- package/dist/pine-core/p-1b13f69c.system.entry.js +1 -0
- package/dist/pine-core/p-1cd0acf0.system.entry.js +1 -0
- package/dist/pine-core/p-1cf1fced.entry.js +1 -0
- package/dist/pine-core/p-1d75a9b1.system.entry.js +1 -0
- package/dist/pine-core/p-1e464117.entry.js +1 -0
- package/dist/pine-core/p-1ec4eeaf.system.entry.js +1 -0
- package/dist/pine-core/p-1f263c0b.system.entry.js +1 -0
- package/dist/pine-core/p-1f2e5958.entry.js +1 -0
- package/dist/pine-core/p-207c94da.entry.js +1 -0
- package/dist/pine-core/p-21115986.system.entry.js +1 -0
- package/dist/pine-core/p-22f041ee.system.entry.js +1 -0
- package/dist/pine-core/p-2357758d.system.entry.js +1 -0
- package/dist/pine-core/p-238e5171.system.entry.js +1 -0
- package/dist/pine-core/p-281efc69.entry.js +1 -0
- package/dist/pine-core/p-2ac9e90a.system.entry.js +1 -0
- package/dist/pine-core/p-2cb02706.entry.js +1 -0
- package/dist/pine-core/p-2f539379.system.entry.js +3 -0
- package/dist/pine-core/p-343546b1.system.entry.js +1 -0
- package/dist/pine-core/p-347ae53c.system.entry.js +1 -0
- package/dist/pine-core/p-34b575b6.entry.js +2 -0
- package/dist/pine-core/p-37d73369.system.entry.js +1 -0
- package/dist/pine-core/p-37d95be9.entry.js +1 -0
- package/dist/pine-core/p-3b1d8fae.entry.js +1 -0
- package/dist/pine-core/p-419f57c9.entry.js +1 -0
- package/dist/pine-core/p-4414d442.system.entry.js +1 -0
- package/dist/pine-core/p-45fcc5b7.entry.js +1 -0
- package/dist/pine-core/p-4c9cccdb.system.entry.js +8 -0
- package/dist/pine-core/p-4e05a4f0.entry.js +1 -0
- package/dist/pine-core/p-4e67e68e.entry.js +1 -0
- package/dist/pine-core/p-506d3e80.entry.js +1 -0
- package/dist/pine-core/p-5132b8a1.entry.js +1 -0
- package/dist/pine-core/p-51dff046.system.entry.js +1 -0
- package/dist/pine-core/p-539ef98c.entry.js +1 -0
- package/dist/pine-core/p-56576b6e.entry.js +1 -0
- package/dist/pine-core/p-5737182f.entry.js +1 -0
- package/dist/pine-core/p-585832b1.entry.js +1 -0
- package/dist/pine-core/p-59491f98.entry.js +1 -0
- package/dist/pine-core/p-5ac84b2f.entry.js +1 -0
- package/dist/pine-core/p-5b7f7760.entry.js +1 -0
- package/dist/pine-core/p-5bc670be.system.entry.js +1 -0
- package/dist/pine-core/p-5d014059.entry.js +1 -0
- package/dist/pine-core/p-5decd81f.entry.js +1 -0
- package/dist/pine-core/p-5e8d73d4.entry.js +1 -0
- package/dist/pine-core/p-622e91e3.entry.js +7 -0
- package/dist/pine-core/{p-d00c5b9c.system.entry.js → p-63119d23.entry.js} +1 -1
- package/dist/pine-core/p-63854c10.system.entry.js +1 -0
- package/dist/pine-core/p-650ccffb.entry.js +1 -0
- package/dist/pine-core/p-65e30a4c.entry.js +1 -0
- package/dist/pine-core/p-66cfef6d.system.entry.js +1 -0
- package/dist/pine-core/p-6d83ad2d.system.entry.js +1 -0
- package/dist/pine-core/p-70c6f0ed.system.entry.js +1 -0
- package/dist/pine-core/p-71e3a89e.system.entry.js +1 -0
- package/dist/pine-core/p-721297b5.system.entry.js +1 -0
- package/dist/pine-core/p-73bc6e9f.system.entry.js +1 -0
- package/dist/pine-core/p-798839f7.system.entry.js +1 -0
- package/dist/pine-core/p-7bbfb965.system.entry.js +1 -0
- package/dist/pine-core/p-7d01e719.entry.js +1 -0
- package/dist/pine-core/p-7e115d33.system.entry.js +1 -0
- package/dist/pine-core/p-8027db25.entry.js +1 -0
- package/dist/pine-core/p-834c678e.system.entry.js +1 -0
- package/dist/pine-core/p-87f91e02.system.entry.js +1 -0
- package/dist/pine-core/p-8b0fbeb3.entry.js +1 -0
- package/dist/pine-core/p-8b9d8fb5.system.entry.js +1 -0
- package/dist/pine-core/p-912487fa.entry.js +1 -0
- package/dist/pine-core/p-91f712f4.system.entry.js +1 -0
- package/dist/pine-core/p-93877d4a.entry.js +1 -0
- package/dist/pine-core/p-969488f5.system.entry.js +1 -0
- package/dist/pine-core/p-9835c74b.entry.js +1 -0
- package/dist/pine-core/p-99317375.system.entry.js +1 -0
- package/dist/pine-core/p-9a7ee7cb.system.entry.js +1 -0
- package/dist/pine-core/p-9b9f66b7.entry.js +1 -0
- package/dist/pine-core/p-9bcdfac2.entry.js +1 -0
- package/dist/pine-core/p-9d33bb05.entry.js +1 -0
- package/dist/pine-core/p-BJlg6wq7.system.js +2 -0
- package/dist/pine-core/p-BMFBF3sJ.system.js +1 -0
- package/dist/pine-core/p-Bkho_oFB.system.js +1 -0
- package/dist/pine-core/p-D2MUS7JO.js +1 -0
- package/dist/pine-core/p-D2yHYrxQ.system.js +1 -0
- package/dist/pine-core/p-DeIDZHrg.js +2 -0
- package/dist/pine-core/p-Dv7ssOTc.js +1 -0
- package/dist/pine-core/p-TyevV8iv.system.js +1 -0
- package/dist/pine-core/p-YQa3CeL9.system.js +1 -0
- package/dist/pine-core/p-a22091c4.system.entry.js +1 -0
- package/dist/pine-core/p-a6d09102.system.entry.js +1 -0
- package/dist/pine-core/p-a83a6618.system.entry.js +1 -0
- package/dist/pine-core/p-afd5e2d7.entry.js +1 -0
- package/dist/pine-core/p-b5838211.system.entry.js +1 -0
- package/dist/pine-core/p-ba1b79c7.system.entry.js +1 -0
- package/dist/pine-core/p-bd7da23e.system.entry.js +1 -0
- package/dist/pine-core/p-bde53290.system.entry.js +1 -0
- package/dist/pine-core/p-bdf68e53.system.entry.js +1 -0
- package/dist/pine-core/p-bef04e15.system.entry.js +1 -0
- package/dist/pine-core/p-bf1aea9f.system.entry.js +1 -0
- package/dist/pine-core/p-c00e46a5.system.entry.js +1 -0
- package/dist/pine-core/p-c8e89b61.system.entry.js +1 -0
- package/dist/pine-core/p-c9395f43.system.entry.js +1 -0
- package/dist/pine-core/p-d576e542.system.entry.js +1 -0
- package/dist/pine-core/p-d5dd5599.entry.js +1 -0
- package/dist/pine-core/p-d69cfaa4.entry.js +1 -0
- package/dist/pine-core/p-db4319fd.entry.js +1 -0
- package/dist/pine-core/p-dc81ffff.entry.js +1 -0
- package/dist/pine-core/p-e337f32c.system.entry.js +1 -0
- package/dist/pine-core/p-e46f7541.system.entry.js +1 -0
- package/dist/pine-core/p-e7ba30dd.system.entry.js +1 -0
- package/dist/pine-core/p-ed3dd3d2.entry.js +1 -0
- package/dist/pine-core/p-eee4f146.entry.js +1 -0
- package/dist/pine-core/p-f01e35e2.entry.js +1 -0
- package/dist/pine-core/p-f06ca8df.entry.js +1 -0
- package/dist/pine-core/p-f2e0da9a.entry.js +1 -0
- package/dist/pine-core/p-f30d6192.system.entry.js +1 -0
- package/dist/pine-core/p-fbea5703.entry.js +1 -0
- package/dist/pine-core/p-fc6ac917.entry.js +1 -0
- package/dist/pine-core/p-ffe276ef.entry.js +1 -0
- package/dist/pine-core/p-t3idJwV0.js +1 -0
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/pine-core/pine-core.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/global/pine-global.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/attributes.d.ts +34 -0
- package/dist/types/utils/keep-hydrated.d.ts +29 -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 +778 -202
- package/hydrate/index.mjs +778 -202
- 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-085c92aa.system.entry.js +0 -1
- package/dist/pine-core/p-0af4685d.entry.js +0 -1
- package/dist/pine-core/p-0bfe152a.entry.js +0 -1
- package/dist/pine-core/p-0ce3bcf2.system.entry.js +0 -1
- package/dist/pine-core/p-1747c005.system.entry.js +0 -1
- package/dist/pine-core/p-1dd395d8.system.entry.js +0 -1
- package/dist/pine-core/p-2126b4e4.system.entry.js +0 -1
- package/dist/pine-core/p-23044953.system.entry.js +0 -1
- package/dist/pine-core/p-26d8c4f7.system.entry.js +0 -1
- package/dist/pine-core/p-28abc253.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-3add97f7.system.entry.js +0 -1
- package/dist/pine-core/p-40928521.system.entry.js +0 -1
- package/dist/pine-core/p-40ebfe59.system.entry.js +0 -1
- package/dist/pine-core/p-468f0dab.system.entry.js +0 -1
- package/dist/pine-core/p-478e69d1.entry.js +0 -1
- package/dist/pine-core/p-495f791c.entry.js +0 -1
- package/dist/pine-core/p-4a43fbd9.entry.js +0 -1
- package/dist/pine-core/p-4d3f5098.system.entry.js +0 -1
- package/dist/pine-core/p-517e04f6.entry.js +0 -1
- package/dist/pine-core/p-517f9962.entry.js +0 -1
- package/dist/pine-core/p-563ba784.entry.js +0 -1
- package/dist/pine-core/p-569b07ed.system.entry.js +0 -1
- package/dist/pine-core/p-5bf397ca.entry.js +0 -1
- package/dist/pine-core/p-5c7c2ffa.entry.js +0 -1
- package/dist/pine-core/p-5e9396e2.system.entry.js +0 -1
- package/dist/pine-core/p-600be0e1.entry.js +0 -1
- package/dist/pine-core/p-601b646c.system.entry.js +0 -1
- package/dist/pine-core/p-60393d52.entry.js +0 -1
- package/dist/pine-core/p-60a15bf7.system.entry.js +0 -1
- package/dist/pine-core/p-60e687ac.entry.js +0 -1
- package/dist/pine-core/p-61ae5a4b.system.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-62974869.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-67227922.entry.js +0 -1
- package/dist/pine-core/p-686b526d.entry.js +0 -1
- package/dist/pine-core/p-69f60432.system.entry.js +0 -1
- package/dist/pine-core/p-6aaf945c.entry.js +0 -1
- package/dist/pine-core/p-6b25f349.system.entry.js +0 -1
- package/dist/pine-core/p-6eb2070a.entry.js +0 -1
- package/dist/pine-core/p-715b8e6b.entry.js +0 -1
- package/dist/pine-core/p-74b1b841.entry.js +0 -1
- package/dist/pine-core/p-7608e9b2.entry.js +0 -1
- package/dist/pine-core/p-773f5771.system.entry.js +0 -1
- package/dist/pine-core/p-77961987.system.entry.js +0 -1
- package/dist/pine-core/p-77e12080.system.entry.js +0 -1
- package/dist/pine-core/p-7a177548.system.entry.js +0 -1
- package/dist/pine-core/p-7fbb7037.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-86978a51.entry.js +0 -1
- package/dist/pine-core/p-871894e1.entry.js +0 -1
- package/dist/pine-core/p-893b02b7.entry.js +0 -1
- package/dist/pine-core/p-8961d112.system.entry.js +0 -3
- package/dist/pine-core/p-8d42f505.entry.js +0 -1
- package/dist/pine-core/p-9452adc4.entry.js +0 -1
- package/dist/pine-core/p-977db8b2.entry.js +0 -1
- package/dist/pine-core/p-9903eb37.system.entry.js +0 -1
- package/dist/pine-core/p-9b18314c.entry.js +0 -1
- package/dist/pine-core/p-9b262a9d.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-CrXTJmBd.system.js +0 -2
- package/dist/pine-core/p-DO9XKAkv.system.js +0 -1
- package/dist/pine-core/p-G3CPPJEt.system.js +0 -1
- package/dist/pine-core/p-a44316ad.entry.js +0 -1
- package/dist/pine-core/p-ae125139.entry.js +0 -1
- package/dist/pine-core/p-af9bce53.entry.js +0 -1
- package/dist/pine-core/p-b2901e60.system.entry.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-b802776b.system.entry.js +0 -1
- package/dist/pine-core/p-b823bde2.system.entry.js +0 -1
- package/dist/pine-core/p-b82a0693.entry.js +0 -1
- package/dist/pine-core/p-b852c82b.system.entry.js +0 -1
- package/dist/pine-core/p-b979105e.entry.js +0 -1
- package/dist/pine-core/p-bLhIfh0N.js +0 -2
- package/dist/pine-core/p-bb9d158c.system.entry.js +0 -1
- package/dist/pine-core/p-bd1bdb07.system.entry.js +0 -1
- package/dist/pine-core/p-c53e560a.system.entry.js +0 -1
- package/dist/pine-core/p-c5c46b65.entry.js +0 -1
- package/dist/pine-core/p-cbae27a4.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-d11e4956.entry.js +0 -1
- package/dist/pine-core/p-da7a7cca.entry.js +0 -1
- package/dist/pine-core/p-daaf653f.system.entry.js +0 -1
- package/dist/pine-core/p-de740b3e.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-ea9468fb.entry.js +0 -1
- package/dist/pine-core/p-f22abb4d.system.entry.js +0 -1
- package/dist/pine-core/p-f2560935.entry.js +0 -1
- package/dist/pine-core/p-f279f435.system.entry.js +0 -1
- package/dist/pine-core/p-f5677949.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
- package/dist/pine-core/p-fe09b6fb.system.entry.js +0 -1
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { unwrapReconnectedContent } from "../../../utils/reconnected-content";
|
|
3
|
+
/**
|
|
4
|
+
* @lightDom renders-markup
|
|
5
|
+
*/
|
|
3
6
|
export class PdsModalFooter {
|
|
4
7
|
// Unwraps a nested .pds-modal__footer left by a page-cache (Turbo, bfcache) reconnect.
|
|
5
8
|
componentDidRender() {
|
|
6
9
|
unwrapReconnectedContent(this.el.querySelector('.pds-modal__footer'), '.pds-modal__footer');
|
|
7
10
|
}
|
|
8
11
|
render() {
|
|
9
|
-
return (h("footer", { key: '
|
|
12
|
+
return (h("footer", { key: '1148892c2d6b9a461f6c04a670fceda76c1be53a', class: "pds-modal__footer" }, h("slot", { key: 'ccd754674c82c415f8c056c9dda6327df35dbd03' })));
|
|
10
13
|
}
|
|
11
14
|
static get is() { return "pds-modal-footer"; }
|
|
12
15
|
static get originalStyleUrls() {
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { unwrapReconnectedContent } from "../../../utils/reconnected-content";
|
|
3
|
+
/**
|
|
4
|
+
* @lightDom renders-markup
|
|
5
|
+
*/
|
|
3
6
|
export class PdsModalHeader {
|
|
4
7
|
// Unwraps a nested .pds-modal__header left by a page-cache (Turbo, bfcache) reconnect.
|
|
5
8
|
componentDidRender() {
|
|
6
9
|
unwrapReconnectedContent(this.el.querySelector('.pds-modal__header'), '.pds-modal__header');
|
|
7
10
|
}
|
|
8
11
|
render() {
|
|
9
|
-
return (h("header", { key: '
|
|
12
|
+
return (h("header", { key: '030153b84f1ea1cb133c9ccec3ad86583995974f', class: "pds-modal__header" }, h("slot", { key: '3a479e7047f3e845a65c37d60539648c8ff78602' })));
|
|
10
13
|
}
|
|
11
14
|
static get is() { return "pds-modal-header"; }
|
|
12
15
|
static get originalStyleUrls() {
|
|
@@ -1,9 +1,96 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { closest } from "../../utils/closest";
|
|
2
3
|
import { unwrapReconnectedContent } from "../../utils/reconnected-content";
|
|
3
4
|
const PRESET_SIZES = ['sm', 'md', 'lg', 'fullscreen'];
|
|
4
5
|
const isCustomLength = (value) => /^[a-z0-9.%+\-*/(), ]+$/i.test(value) &&
|
|
5
6
|
/\d/.test(value) &&
|
|
6
7
|
(typeof CSS === 'undefined' || CSS.supports('max-width', value));
|
|
8
|
+
const TABBABLE = [
|
|
9
|
+
'a[href]',
|
|
10
|
+
'area[href]',
|
|
11
|
+
'button',
|
|
12
|
+
'input:not([type="hidden"])',
|
|
13
|
+
'select',
|
|
14
|
+
'textarea',
|
|
15
|
+
'iframe',
|
|
16
|
+
'summary',
|
|
17
|
+
'[contenteditable]:not([contenteditable="false"])',
|
|
18
|
+
'[tabindex]',
|
|
19
|
+
].join(',');
|
|
20
|
+
/**
|
|
21
|
+
* Collects the tabbable elements under `root` in focus order, walking into open shadow roots and
|
|
22
|
+
* following slots, so a component's own controls (the input inside pds-combobox or pds-textarea)
|
|
23
|
+
* count without being registered here by tag name. Positive tabindex values are not reordered,
|
|
24
|
+
* and a closed shadow root can't be seen into.
|
|
25
|
+
*/
|
|
26
|
+
function collectTabbable(root, found) {
|
|
27
|
+
for (const child of Array.from(root.children))
|
|
28
|
+
visitTabbable(child, found);
|
|
29
|
+
}
|
|
30
|
+
// An editing host reports tabIndex -1 but is still a Tab stop; editable content inside it is not.
|
|
31
|
+
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)); };
|
|
32
|
+
function visitTabbable(el, found) {
|
|
33
|
+
var _a, _b, _c, _d;
|
|
34
|
+
if (el.hasAttribute('inert'))
|
|
35
|
+
return;
|
|
36
|
+
if (el.localName === 'slot') {
|
|
37
|
+
const slot = el;
|
|
38
|
+
// Fallback content renders only when nothing at all is assigned, text included.
|
|
39
|
+
if (((_b = (_a = slot.assignedNodes) === null || _a === void 0 ? void 0 : _a.call(slot, { flatten: true })) !== null && _b !== void 0 ? _b : []).length === 0)
|
|
40
|
+
return collectTabbable(el, found);
|
|
41
|
+
for (const slotted of slot.assignedElements({ flatten: true }))
|
|
42
|
+
visitTabbable(slotted, found);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
// A delegatesFocus host passes focus to its first control, which the walk below finds.
|
|
46
|
+
const delegates = ((_c = el.shadowRoot) === null || _c === void 0 ? void 0 : _c.delegatesFocus) === true;
|
|
47
|
+
if (el instanceof HTMLElement && !delegates && isTabStop(el) && el.matches(TABBABLE) && !el.matches(':disabled')) {
|
|
48
|
+
found.push(el);
|
|
49
|
+
}
|
|
50
|
+
// A shadow host's light children render only through its slots, which the walk reaches.
|
|
51
|
+
collectTabbable((_d = el.shadowRoot) !== null && _d !== void 0 ? _d : el, found);
|
|
52
|
+
}
|
|
53
|
+
/** The element as a radio in a named group, or `null`. */
|
|
54
|
+
const groupedRadio = (el) => el instanceof HTMLInputElement && el.type === 'radio' && el.name !== '' ? el : null;
|
|
55
|
+
/**
|
|
56
|
+
* Keeps one radio per named group, as the browser does: the checked one, or the first. The others
|
|
57
|
+
* are reached with the arrow keys, so they can't be the first or last stop of the trap.
|
|
58
|
+
*/
|
|
59
|
+
function oneRadioPerGroup(elements) {
|
|
60
|
+
// Radios group by name and form within one tree, so each shadow root starts its own groups.
|
|
61
|
+
const groups = [];
|
|
62
|
+
for (const el of elements) {
|
|
63
|
+
const radio = groupedRadio(el);
|
|
64
|
+
if (radio === null)
|
|
65
|
+
continue;
|
|
66
|
+
const group = groups.find(([first]) => first.name === radio.name && first.form === radio.form && first.getRootNode() === radio.getRootNode());
|
|
67
|
+
if (group)
|
|
68
|
+
group.push(radio);
|
|
69
|
+
else
|
|
70
|
+
groups.push([radio]);
|
|
71
|
+
}
|
|
72
|
+
const stops = new Set(groups.map((radios) => { var _a; return (_a = radios.find((radio) => radio.checked)) !== null && _a !== void 0 ? _a : radios[0]; }));
|
|
73
|
+
return elements.filter((el) => groupedRadio(el) === null || stops.has(el));
|
|
74
|
+
}
|
|
75
|
+
/** Whether `node` is `ancestor` or inside it, crossing shadow roots, which `Node.contains` doesn't. */
|
|
76
|
+
function containsComposed(ancestor, node) {
|
|
77
|
+
for (let current = node; current; current = current instanceof ShadowRoot ? current.host : current.parentNode) {
|
|
78
|
+
if (current === ancestor)
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
/** The focused element, followed down through shadow roots to the control that has focus. */
|
|
84
|
+
function deepActiveElement() {
|
|
85
|
+
var _a;
|
|
86
|
+
let active = document.activeElement;
|
|
87
|
+
while ((_a = active === null || active === void 0 ? void 0 : active.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement)
|
|
88
|
+
active = active.shadowRoot.activeElement;
|
|
89
|
+
return active;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* @lightDom renders-markup
|
|
93
|
+
*/
|
|
7
94
|
export class PdsModal {
|
|
8
95
|
constructor() {
|
|
9
96
|
this.focusableElements = [];
|
|
@@ -120,6 +207,17 @@ export class PdsModal {
|
|
|
120
207
|
// disableTopLayer), so do not trap Tab here.
|
|
121
208
|
if (this.disableTopLayer)
|
|
122
209
|
return;
|
|
210
|
+
// A control inside that handles Tab itself (a popup with its own trap) has already moved
|
|
211
|
+
// focus. This holds only when it listens on its own element, which runs before this
|
|
212
|
+
// document listener; one listening on document too would race it.
|
|
213
|
+
if (e.defaultPrevented)
|
|
214
|
+
return;
|
|
215
|
+
// Every open modal hears this keydown. When focus is in a modal dialog opened above this one,
|
|
216
|
+
// that dialog traps Tab: this modal's list also holds its controls, so it would wrap first. A
|
|
217
|
+
// non-modal dialog inside (a disableTopLayer modal) doesn't trap, so this one still does.
|
|
218
|
+
const activeElement = deepActiveElement();
|
|
219
|
+
if (!activeElement || this.modalDialogAbove(activeElement))
|
|
220
|
+
return;
|
|
123
221
|
// Content can change while the modal is open (rows fetched in, sections shown), so the
|
|
124
222
|
// first and last elements are read now rather than from the list taken on opening.
|
|
125
223
|
this.updateFocusableElements();
|
|
@@ -129,13 +227,13 @@ export class PdsModal {
|
|
|
129
227
|
// Get the first and last focusable elements
|
|
130
228
|
const firstFocusableElement = this.focusableElements[0];
|
|
131
229
|
const lastFocusableElement = this.focusableElements[this.focusableElements.length - 1];
|
|
132
|
-
//
|
|
133
|
-
|
|
134
|
-
//
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
-
|
|
230
|
+
// activeElement is the control inside any shadow root, as the list holds, not the host
|
|
231
|
+
// document.activeElement reports. It's matched to its own stop first, so a stop inside a
|
|
232
|
+
// listed host isn't taken for that host; a focused node that isn't a stop counts as the
|
|
233
|
+
// innermost stop it sits in.
|
|
234
|
+
const stop = this.stopIndex(activeElement);
|
|
235
|
+
const isFirstElement = stop === 0;
|
|
236
|
+
const isLastElement = stop === this.focusableElements.length - 1;
|
|
139
237
|
// If shift + tab is pressed and focus is on the first element, move to the last element
|
|
140
238
|
if (e.shiftKey && isFirstElement) {
|
|
141
239
|
e.preventDefault();
|
|
@@ -192,23 +290,8 @@ export class PdsModal {
|
|
|
192
290
|
updateFocusableElements() {
|
|
193
291
|
if (!this.modalRef)
|
|
194
292
|
return;
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
'a[href]',
|
|
198
|
-
'button:not([disabled])',
|
|
199
|
-
'input:not([disabled])',
|
|
200
|
-
'select:not([disabled])',
|
|
201
|
-
'textarea:not([disabled])',
|
|
202
|
-
'[tabindex]:not([tabindex="-1"])',
|
|
203
|
-
'pds-button:not([disabled])',
|
|
204
|
-
'pds-link:not([disabled])',
|
|
205
|
-
'pds-input:not([disabled])',
|
|
206
|
-
'pds-checkbox:not([disabled])',
|
|
207
|
-
'pds-radio:not([disabled])',
|
|
208
|
-
'pds-switch:not([disabled])',
|
|
209
|
-
'pds-select:not([disabled])',
|
|
210
|
-
].join(',');
|
|
211
|
-
this.focusableElements = Array.from(this.modalRef.querySelectorAll(selector));
|
|
293
|
+
this.focusableElements = [];
|
|
294
|
+
collectTabbable(this.modalRef, this.focusableElements);
|
|
212
295
|
// checkVisibility() also drops an element inside a hidden ancestor, whose own computed
|
|
213
296
|
// display isn't none; such an element can't take focus, so it can't anchor the trap.
|
|
214
297
|
this.focusableElements = this.focusableElements.filter(el => {
|
|
@@ -217,6 +300,7 @@ export class PdsModal {
|
|
|
217
300
|
const style = window.getComputedStyle(el);
|
|
218
301
|
return style.display !== 'none' && style.visibility !== 'hidden';
|
|
219
302
|
});
|
|
303
|
+
this.focusableElements = oneRadioPerGroup(this.focusableElements);
|
|
220
304
|
}
|
|
221
305
|
/**
|
|
222
306
|
* Sets focus to the first focusable element in the modal
|
|
@@ -230,30 +314,11 @@ export class PdsModal {
|
|
|
230
314
|
this.focusElement(firstElement);
|
|
231
315
|
}
|
|
232
316
|
/**
|
|
233
|
-
*
|
|
317
|
+
* Focuses an element from the list. It holds the controls themselves, inside any shadow root,
|
|
318
|
+
* so they take focus directly.
|
|
234
319
|
*/
|
|
235
320
|
focusElement(element) {
|
|
236
|
-
|
|
237
|
-
return;
|
|
238
|
-
try {
|
|
239
|
-
// Try standard focus first
|
|
240
|
-
element.focus();
|
|
241
|
-
// Check if focus worked
|
|
242
|
-
setTimeout(() => {
|
|
243
|
-
if (document.activeElement !== element) {
|
|
244
|
-
// For web components, try to find a focusable element inside
|
|
245
|
-
if (element.shadowRoot) {
|
|
246
|
-
const focusableInShadow = element.shadowRoot.querySelector('button, [tabindex], input, a[href]');
|
|
247
|
-
if (focusableInShadow) {
|
|
248
|
-
focusableInShadow.focus();
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}, 0);
|
|
253
|
-
}
|
|
254
|
-
catch (error) {
|
|
255
|
-
console.error('Error focusing element:', error);
|
|
256
|
-
}
|
|
321
|
+
element === null || element === void 0 ? void 0 : element.focus();
|
|
257
322
|
}
|
|
258
323
|
/**
|
|
259
324
|
* Opens the modal
|
|
@@ -416,6 +481,30 @@ export class PdsModal {
|
|
|
416
481
|
const thisZIndex = this.getBackdropZIndex(this.el);
|
|
417
482
|
return thisZIndex === maxZIndex;
|
|
418
483
|
}
|
|
484
|
+
/** Whether a modal dialog other than this one sits between the focused element and this modal. */
|
|
485
|
+
modalDialogAbove(active) {
|
|
486
|
+
var _a;
|
|
487
|
+
for (let dialog = closest('dialog[open]', active); dialog instanceof HTMLElement;) {
|
|
488
|
+
if (dialog === this.modalRef)
|
|
489
|
+
return false;
|
|
490
|
+
if (dialog.matches(':modal'))
|
|
491
|
+
return true;
|
|
492
|
+
// Up from this dialog, across a shadow root; past the document root, closest() gives nothing.
|
|
493
|
+
dialog = closest('dialog[open]', (_a = dialog.parentElement) !== null && _a !== void 0 ? _a : dialog.getRootNode().host);
|
|
494
|
+
}
|
|
495
|
+
return false;
|
|
496
|
+
}
|
|
497
|
+
/** The focused element's place in the list: its own stop, or the innermost stop it sits in. */
|
|
498
|
+
stopIndex(active) {
|
|
499
|
+
const own = this.focusableElements.indexOf(active);
|
|
500
|
+
if (own >= 0)
|
|
501
|
+
return own;
|
|
502
|
+
for (let i = this.focusableElements.length - 1; i >= 0; i--) {
|
|
503
|
+
if (containsComposed(this.focusableElements[i], active))
|
|
504
|
+
return i;
|
|
505
|
+
}
|
|
506
|
+
return -1;
|
|
507
|
+
}
|
|
419
508
|
resolveSize() {
|
|
420
509
|
var _a;
|
|
421
510
|
const size = ((_a = this.size) !== null && _a !== void 0 ? _a : '').trim() || 'md';
|
|
@@ -430,14 +519,14 @@ export class PdsModal {
|
|
|
430
519
|
}
|
|
431
520
|
render() {
|
|
432
521
|
const [sizeClass = 'md', customSize] = this.resolveSize();
|
|
433
|
-
return (h("dialog", { key: '
|
|
522
|
+
return (h("dialog", { key: 'b6714c7e77d80bf2370f2170ffce029abe147d81', class: {
|
|
434
523
|
'pds-modal__backdrop': true,
|
|
435
524
|
'open': this.open
|
|
436
|
-
}, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, h("div", { key: '
|
|
525
|
+
}, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, h("div", { key: '8c3319f53dd8c79c9e952785277e9e82e28b651e', class: {
|
|
437
526
|
'pds-modal': true,
|
|
438
527
|
[`pds-modal--${sizeClass}`]: true,
|
|
439
528
|
'pds-modal--scrollable': this.scrollable
|
|
440
|
-
}, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, h("slot", { key: '
|
|
529
|
+
}, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, h("slot", { key: '8c6f9cc1a20b515659344ad041512de52761800d' }))));
|
|
441
530
|
}
|
|
442
531
|
static get is() { return "pds-modal"; }
|
|
443
532
|
static get originalStyleUrls() {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { containsComposed } from "../../utils/closest";
|
|
3
|
+
import { restoreReflectedDefault } from "../../utils/reflected-attribute-default";
|
|
4
|
+
import { setAttributesIfChanged } from "../../utils/attributes";
|
|
3
5
|
/**
|
|
4
6
|
* @slot trigger - The trigger element for the popover
|
|
5
7
|
* @slot (default) - The content to display inside the popover
|
|
@@ -15,10 +17,22 @@ export class PdsPopover {
|
|
|
15
17
|
* Tracks if the component is still mounted to prevent memory leaks
|
|
16
18
|
*/
|
|
17
19
|
this.isComponentMounted = true;
|
|
20
|
+
/**
|
|
21
|
+
* Set once `componentDidLoad` has built the portal, so a later reconnect knows to rebuild it
|
|
22
|
+
*/
|
|
23
|
+
this.hasLoaded = false;
|
|
24
|
+
/**
|
|
25
|
+
* A popover without a componentId keeps one generated portal id, even when the portal is rebuilt
|
|
26
|
+
*/
|
|
27
|
+
this.generatedPortalId = null;
|
|
18
28
|
/**
|
|
19
29
|
* Reference to the trigger element
|
|
20
30
|
*/
|
|
21
31
|
this.triggerEl = null;
|
|
32
|
+
/**
|
|
33
|
+
* Puts the trigger's ARIA back when something else removes or changes it
|
|
34
|
+
*/
|
|
35
|
+
this.triggerObserver = null;
|
|
22
36
|
/**
|
|
23
37
|
* Portal element rendered in document.body
|
|
24
38
|
*/
|
|
@@ -80,6 +94,7 @@ export class PdsPopover {
|
|
|
80
94
|
else {
|
|
81
95
|
this.triggerEl = null;
|
|
82
96
|
}
|
|
97
|
+
this.observeTrigger();
|
|
83
98
|
};
|
|
84
99
|
/**
|
|
85
100
|
* Handles changes to the default slot (popover content)
|
|
@@ -116,6 +131,9 @@ export class PdsPopover {
|
|
|
116
131
|
}
|
|
117
132
|
};
|
|
118
133
|
}
|
|
134
|
+
restorePlacementDefault(newValue) {
|
|
135
|
+
this.placement = restoreReflectedDefault(this.el, 'placement', newValue, 'right');
|
|
136
|
+
}
|
|
119
137
|
componentDidLoad() {
|
|
120
138
|
var _a;
|
|
121
139
|
// Bind event handlers for cleanup
|
|
@@ -125,6 +143,7 @@ export class PdsPopover {
|
|
|
125
143
|
this.boundResizeHandler = this.handleResize.bind(this);
|
|
126
144
|
// Create portal element
|
|
127
145
|
this.createPortal();
|
|
146
|
+
this.hasLoaded = true;
|
|
128
147
|
// Initialize trigger element by calling slot change handler
|
|
129
148
|
// This is a fallback for environments where slot change might not fire reliably
|
|
130
149
|
const triggerSlot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot[name="trigger"]');
|
|
@@ -139,20 +158,69 @@ export class PdsPopover {
|
|
|
139
158
|
this.linkTriggerToPortal();
|
|
140
159
|
}
|
|
141
160
|
}
|
|
161
|
+
// The trigger is the consumer's element, so anything can rewrite its attributes (a Turbo morph
|
|
162
|
+
// matches it to server HTML that has no ARIA). Put Pine's values back when that happens.
|
|
163
|
+
observeTrigger() {
|
|
164
|
+
var _a;
|
|
165
|
+
(_a = this.triggerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
166
|
+
this.triggerObserver = null;
|
|
167
|
+
if (this.triggerEl == null || typeof MutationObserver === 'undefined')
|
|
168
|
+
return;
|
|
169
|
+
this.triggerObserver = new MutationObserver(() => this.linkTriggerToPortal());
|
|
170
|
+
this.triggerObserver.observe(this.triggerEl, {
|
|
171
|
+
attributes: true,
|
|
172
|
+
attributeFilter: ['aria-expanded', 'aria-controls'],
|
|
173
|
+
});
|
|
174
|
+
}
|
|
142
175
|
// Set ARIA attributes to establish relationship between trigger and popover
|
|
143
176
|
// This mirrors the native Popover API's accessibility behavior
|
|
144
177
|
linkTriggerToPortal() {
|
|
145
178
|
if (this.triggerEl == null || this.portalEl == null)
|
|
146
179
|
return;
|
|
147
|
-
|
|
148
|
-
this.triggerEl.
|
|
180
|
+
// Skips values already in place, so the trigger observer's own callback doesn't loop.
|
|
181
|
+
setAttributesIfChanged(this.triggerEl, { 'aria-expanded': String(this.active), 'aria-controls': this.portalEl.id });
|
|
182
|
+
}
|
|
183
|
+
// componentDidLoad doesn't run again when a popover comes back, so rebuild whatever
|
|
184
|
+
// disconnectedCallback tore down. Each step is a no-op when nothing was.
|
|
185
|
+
connectedCallback() {
|
|
186
|
+
var _a;
|
|
187
|
+
if (!this.hasLoaded)
|
|
188
|
+
return;
|
|
189
|
+
this.isComponentMounted = true;
|
|
190
|
+
this.createPortal();
|
|
191
|
+
(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.addEventListener('click', this.handleTriggerClick);
|
|
192
|
+
this.observeTrigger();
|
|
193
|
+
this.linkTriggerToPortal();
|
|
194
|
+
// Still open after a move: the trigger moved, so the portal follows it.
|
|
195
|
+
if (this.active) {
|
|
196
|
+
requestAnimationFrame(() => this.handlePopoverPositioning());
|
|
197
|
+
}
|
|
149
198
|
}
|
|
150
199
|
disconnectedCallback() {
|
|
200
|
+
var _a;
|
|
201
|
+
// Moved in one operation (a DOM morph, or a framework reparenting it), the popover is
|
|
202
|
+
// already back in the page. Its portal is in <body>, untouched, so it stays open, with focus
|
|
203
|
+
// where it was.
|
|
204
|
+
if (this.el.isConnected)
|
|
205
|
+
return;
|
|
151
206
|
this.isComponentMounted = false;
|
|
207
|
+
// Open, the content sits in the portal; put it back before the portal goes. Only listeners on
|
|
208
|
+
// the popover itself hear the close event now, but those are the ones mirroring its state.
|
|
209
|
+
if (this.active) {
|
|
210
|
+
this.restorePortalContent();
|
|
211
|
+
this.active = false;
|
|
212
|
+
this.linkTriggerToPortal();
|
|
213
|
+
this.pdsPopoverClose.emit({
|
|
214
|
+
componentId: this.componentId,
|
|
215
|
+
popoverType: this.popoverType,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
152
218
|
// Clean up trigger click event listener
|
|
153
219
|
if (this.triggerEl != null) {
|
|
154
220
|
this.triggerEl.removeEventListener('click', this.handleTriggerClick);
|
|
155
221
|
}
|
|
222
|
+
(_a = this.triggerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
223
|
+
this.triggerObserver = null;
|
|
156
224
|
// Clean up all event listeners
|
|
157
225
|
this.removeLightDismissListeners();
|
|
158
226
|
this.removeScrollAndResizeListeners();
|
|
@@ -175,6 +243,7 @@ export class PdsPopover {
|
|
|
175
243
|
}
|
|
176
244
|
}
|
|
177
245
|
createPortal() {
|
|
246
|
+
var _a;
|
|
178
247
|
if (this.portalEl !== null)
|
|
179
248
|
return;
|
|
180
249
|
this.portalEl = document.createElement('div');
|
|
@@ -193,8 +262,8 @@ export class PdsPopover {
|
|
|
193
262
|
this.portalEl.style.padding = 'var(--pine-dimension-md)';
|
|
194
263
|
// Generate unique ID
|
|
195
264
|
if (!this.componentId) {
|
|
196
|
-
|
|
197
|
-
this.portalEl.id =
|
|
265
|
+
(_a = this.generatedPortalId) !== null && _a !== void 0 ? _a : (this.generatedPortalId = `pds-popover-portal-${PdsPopover.instanceCounter++}`);
|
|
266
|
+
this.portalEl.id = this.generatedPortalId;
|
|
198
267
|
}
|
|
199
268
|
else {
|
|
200
269
|
this.portalEl.id = `${this.componentId}-portal`;
|
|
@@ -306,10 +375,7 @@ export class PdsPopover {
|
|
|
306
375
|
this.active = true;
|
|
307
376
|
// Record open timestamp to prevent immediate close from opening click
|
|
308
377
|
this.openTimestamp = Date.now();
|
|
309
|
-
|
|
310
|
-
if (this.triggerEl) {
|
|
311
|
-
this.triggerEl.setAttribute('aria-expanded', 'true');
|
|
312
|
-
}
|
|
378
|
+
this.linkTriggerToPortal();
|
|
313
379
|
// Update portal content with latest slot content
|
|
314
380
|
this.updatePortalContent();
|
|
315
381
|
// Show portal
|
|
@@ -343,10 +409,7 @@ export class PdsPopover {
|
|
|
343
409
|
this.active = false;
|
|
344
410
|
// Restoring the content drops its focus to the body, so check where focus is first.
|
|
345
411
|
const focusWasInside = this.portalEl.contains(document.activeElement);
|
|
346
|
-
|
|
347
|
-
if (this.triggerEl) {
|
|
348
|
-
this.triggerEl.setAttribute('aria-expanded', 'false');
|
|
349
|
-
}
|
|
412
|
+
this.linkTriggerToPortal();
|
|
350
413
|
// Restore content back to original slot positions
|
|
351
414
|
this.restorePortalContent();
|
|
352
415
|
// Hide portal
|
|
@@ -572,7 +635,7 @@ export class PdsPopover {
|
|
|
572
635
|
}, 16); // ~1 frame at 60fps
|
|
573
636
|
}
|
|
574
637
|
render() {
|
|
575
|
-
return (h(Host, { key: '
|
|
638
|
+
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 }))));
|
|
576
639
|
}
|
|
577
640
|
static get is() { return "pds-popover"; }
|
|
578
641
|
static get encapsulation() { return "shadow"; }
|
|
@@ -675,7 +738,7 @@ export class PdsPopover {
|
|
|
675
738
|
},
|
|
676
739
|
"placement": {
|
|
677
740
|
"type": "string",
|
|
678
|
-
"mutable":
|
|
741
|
+
"mutable": true,
|
|
679
742
|
"complexType": {
|
|
680
743
|
"original": "PlacementType",
|
|
681
744
|
"resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
@@ -813,6 +876,12 @@ export class PdsPopover {
|
|
|
813
876
|
};
|
|
814
877
|
}
|
|
815
878
|
static get elementRef() { return "el"; }
|
|
879
|
+
static get watchers() {
|
|
880
|
+
return [{
|
|
881
|
+
"propName": "placement",
|
|
882
|
+
"methodName": "restorePlacementDefault"
|
|
883
|
+
}];
|
|
884
|
+
}
|
|
816
885
|
}
|
|
817
886
|
/**
|
|
818
887
|
* Instance counter for unique IDs
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { HostStylingKeeper } from "../../utils/attributes";
|
|
2
3
|
import { normalizeColorValue } from "../../utils/utils";
|
|
3
4
|
export class PdsProgress {
|
|
4
5
|
constructor() {
|
|
6
|
+
this.hostKeeper = new HostStylingKeeper();
|
|
5
7
|
/**
|
|
6
8
|
* Determines whether or not progress is animated.
|
|
7
9
|
* @defaultValue false
|
|
@@ -18,9 +20,17 @@ export class PdsProgress {
|
|
|
18
20
|
*/
|
|
19
21
|
this.showPercent = false;
|
|
20
22
|
}
|
|
23
|
+
connectedCallback() {
|
|
24
|
+
this.hostKeeper.connect(this.el);
|
|
25
|
+
}
|
|
26
|
+
disconnectedCallback() {
|
|
27
|
+
this.hostKeeper.disconnect();
|
|
28
|
+
}
|
|
21
29
|
render() {
|
|
22
30
|
const normalizedFillColor = normalizeColorValue(this.fillColor);
|
|
23
|
-
|
|
31
|
+
const hostClass = this.animated ? { 'is-animated': this.animated } : '';
|
|
32
|
+
this.hostKeeper.record(hostClass);
|
|
33
|
+
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, "%")));
|
|
24
34
|
}
|
|
25
35
|
static get is() { return "pds-progress"; }
|
|
26
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -167,4 +177,5 @@ export class PdsProgress {
|
|
|
167
177
|
}
|
|
168
178
|
};
|
|
169
179
|
}
|
|
180
|
+
static get elementRef() { return "el"; }
|
|
170
181
|
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { HostStylingKeeper } from "../../utils/attributes";
|
|
2
3
|
import { assignDescription, messageId, exposeTypeProperty } from "../../utils/form";
|
|
3
4
|
import { danger } from "@pine-ds/icons/icons";
|
|
4
5
|
/**
|
|
5
6
|
* @slot image - Custom image content to display instead of the default radio input
|
|
6
7
|
* @part image-container - The container for the image
|
|
8
|
+
* @lightDom renders-markup
|
|
7
9
|
*/
|
|
8
10
|
export class PdsRadio {
|
|
9
11
|
constructor() {
|
|
10
12
|
this._type = 'radio';
|
|
13
|
+
this.hostKeeper = new HostStylingKeeper();
|
|
11
14
|
this._hasImage = false;
|
|
12
15
|
/**
|
|
13
16
|
* Determines whether or not the radio is checked.
|
|
@@ -75,9 +78,13 @@ export class PdsRadio {
|
|
|
75
78
|
this._hasImage = this.hasImageSlot();
|
|
76
79
|
}
|
|
77
80
|
connectedCallback() {
|
|
81
|
+
this.hostKeeper.connect(this.el);
|
|
78
82
|
// Expose type property on the element instance to match native form element behavior
|
|
79
83
|
exposeTypeProperty(this.el, () => this._type);
|
|
80
84
|
}
|
|
85
|
+
disconnectedCallback() {
|
|
86
|
+
this.hostKeeper.disconnect();
|
|
87
|
+
}
|
|
81
88
|
// 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.
|
|
82
89
|
componentDidRender() {
|
|
83
90
|
const freshImageContainer = this.el.querySelector('.pds-radio__image-container:not([hidden])');
|
|
@@ -92,11 +99,13 @@ export class PdsRadio {
|
|
|
92
99
|
}
|
|
93
100
|
render() {
|
|
94
101
|
const renderLabelAndMessages = () => [
|
|
95
|
-
h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, h("input", { key: '
|
|
102
|
+
h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, h("input", { key: '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)),
|
|
96
103
|
this.helperMessage && (h("div", { key: `${this.componentId}-helper`, class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage)),
|
|
97
|
-
this.errorMessage && (h("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '
|
|
104
|
+
this.errorMessage && (h("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '7374924219e59eab46a7ced9e7062c3e674b4451', icon: danger, size: "small" }), this.errorMessage))
|
|
98
105
|
];
|
|
99
|
-
|
|
106
|
+
const hostClass = this.classNames();
|
|
107
|
+
this.hostKeeper.record(hostClass);
|
|
108
|
+
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())));
|
|
100
109
|
}
|
|
101
110
|
static get is() { return "pds-radio"; }
|
|
102
111
|
static get encapsulation() { return "scoped"; }
|
|
@@ -3,6 +3,7 @@ import { messageId } from "../../utils/form";
|
|
|
3
3
|
import { danger } from "@pine-ds/icons/icons";
|
|
4
4
|
/**
|
|
5
5
|
* @slot (default) - Child pds-radio components
|
|
6
|
+
* @lightDom renders-markup
|
|
6
7
|
*/
|
|
7
8
|
export class PdsRadioGroup {
|
|
8
9
|
constructor() {
|
|
@@ -160,13 +161,13 @@ export class PdsRadioGroup {
|
|
|
160
161
|
render() {
|
|
161
162
|
const gapValue = this.getGapValue();
|
|
162
163
|
const ariaDescribedBy = this.getAriaDescribedBy();
|
|
163
|
-
return (h(Host, { key: '
|
|
164
|
+
return (h(Host, { key: '9dc78eb36bbc1b872f4320203dbbc64e43816ebf', class: this.classNames(), id: this._groupId, role: "group", "aria-describedby": ariaDescribedBy, style: {
|
|
164
165
|
'--pds-radio-group-gap': gapValue,
|
|
165
|
-
} }, this.groupLabel && (h("div", { key: '
|
|
166
|
+
} }, this.groupLabel && (h("div", { key: '7b6f95608dcf356b141ef5d590ff3070f83b5975', class: "pds-radio-group__label" }, this.groupLabel)), h("div", { key: '6e1a634c9b81ca3f3bbbe9c6590bcd4efc97e6ea', class: {
|
|
166
167
|
'pds-radio-group__radios': true,
|
|
167
168
|
'pds-radio-group__radios--row': this.direction === 'row',
|
|
168
169
|
'pds-radio-group__radios--column': this.direction === 'column',
|
|
169
|
-
} }, h("slot", { key: '
|
|
170
|
+
} }, 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))));
|
|
170
171
|
}
|
|
171
172
|
static get is() { return "pds-radio-group"; }
|
|
172
173
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { HostStylingKeeper } from "../../utils/attributes";
|
|
3
|
+
/**
|
|
4
|
+
* @lightDom host-only
|
|
5
|
+
*/
|
|
2
6
|
export class PdsRow {
|
|
3
7
|
constructor() {
|
|
8
|
+
this.hostKeeper = new HostStylingKeeper();
|
|
4
9
|
/**
|
|
5
10
|
* If `true`, the row will have a border.
|
|
6
11
|
*/
|
|
@@ -38,6 +43,12 @@ export class PdsRow {
|
|
|
38
43
|
'800': 'var(--pine-dimension-800)'
|
|
39
44
|
};
|
|
40
45
|
}
|
|
46
|
+
connectedCallback() {
|
|
47
|
+
this.hostKeeper.connect(this.el);
|
|
48
|
+
}
|
|
49
|
+
disconnectedCallback() {
|
|
50
|
+
this.hostKeeper.disconnect();
|
|
51
|
+
}
|
|
41
52
|
render() {
|
|
42
53
|
const rowClasses = `
|
|
43
54
|
${this.alignItems !== undefined && this.alignItems.trim() !== '' ? `pds-align-items-${this.alignItems}` : ''}
|
|
@@ -55,7 +66,8 @@ export class PdsRow {
|
|
|
55
66
|
})), (this.minHeight && {
|
|
56
67
|
'min-height': this.minHeight,
|
|
57
68
|
}));
|
|
58
|
-
|
|
69
|
+
this.hostKeeper.record(`pds-row ${rowClasses}`, rowInlineStyles);
|
|
70
|
+
return h(Host, { key: 'ee3a32ae1376919c7c2d1fcf186a1b7c272ee085', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
|
|
59
71
|
}
|
|
60
72
|
static get is() { return "pds-row"; }
|
|
61
73
|
static get originalStyleUrls() {
|
|
@@ -272,4 +284,5 @@ export class PdsRow {
|
|
|
272
284
|
}
|
|
273
285
|
};
|
|
274
286
|
}
|
|
287
|
+
static get elementRef() { return "el"; }
|
|
275
288
|
}
|