@pine-ds/core 4.1.0 → 4.3.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/index.d.ts +8 -0
- package/components/index.js +1 -1
- package/components/mock-pds-modal.js +1 -1
- package/components/pds-button2.js +1 -1
- package/components/pds-checkbox2.js +1 -1
- package/components/pds-chip2.js +1 -1
- package/components/pds-combobox.js +1 -1
- package/components/pds-copytext.js +1 -1
- package/components/pds-drawer-content.d.ts +11 -0
- package/components/pds-drawer-content.js +1 -0
- package/components/pds-drawer-footer.d.ts +11 -0
- package/components/pds-drawer-footer.js +1 -0
- package/components/pds-drawer-header.d.ts +11 -0
- package/components/pds-drawer-header.js +1 -0
- package/components/pds-drawer.d.ts +11 -0
- package/components/pds-drawer.js +1 -0
- package/components/pds-dropdown-menu-item.js +1 -1
- package/components/pds-dropdown-menu-separator.js +1 -1
- package/components/pds-dropdown-menu.js +1 -1
- package/components/pds-filter.js +1 -1
- package/components/pds-filters.js +1 -1
- package/components/pds-icon2.js +1 -1
- package/components/pds-image.js +1 -1
- package/components/pds-input.js +1 -1
- package/components/pds-link2.js +1 -1
- package/components/pds-loader2.js +1 -1
- package/components/pds-modal-content.js +1 -1
- package/components/pds-modal-footer.js +1 -1
- package/components/pds-modal-header.js +1 -1
- package/components/pds-modal.js +1 -1
- package/components/pds-modal2.js +1 -0
- package/components/pds-multiselect.js +1 -1
- package/components/pds-popover.js +1 -1
- package/components/pds-progress.js +1 -1
- package/components/pds-property.js +1 -1
- package/components/pds-radio-group.js +1 -1
- package/components/pds-radio.js +1 -1
- package/components/pds-row.js +1 -1
- package/components/pds-select.js +1 -1
- package/components/pds-sortable-item.js +1 -1
- package/components/pds-sortable.js +2 -2
- package/components/pds-switch.js +1 -1
- package/components/pds-table-body.js +1 -1
- package/components/pds-table-cell2.js +1 -1
- package/components/pds-table-head-cell2.js +1 -1
- package/components/pds-table-head.js +1 -1
- package/components/pds-table-row.js +1 -1
- package/components/pds-tabpanel.js +1 -1
- package/components/pds-tabs.js +1 -1
- package/components/pds-text2.js +1 -1
- package/components/pds-textarea.js +1 -1
- package/components/pds-toast.js +1 -1
- package/components/pds-tooltip.js +1 -1
- package/components/truncation-tooltip.js +1 -1
- package/dist/cjs/{index-CuQil7H0.js → index-CaLa1zy9.js} +1 -1
- package/dist/cjs/{index-BMV0nzMk.js → index-DYvijwA6.js} +1 -1
- package/dist/cjs/index.cjs.js +20 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mock-pds-modal.cjs.entry.js +3 -3
- package/dist/cjs/pds-accordion.cjs.entry.js +2 -2
- package/dist/cjs/pds-alert.cjs.entry.js +1 -1
- package/dist/cjs/pds-avatar.cjs.entry.js +2 -2
- package/dist/cjs/pds-box.cjs.entry.js +2 -2
- package/dist/cjs/pds-button.cjs.entry.js +4 -4
- package/dist/cjs/pds-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/pds-chip.cjs.entry.js +46 -12
- package/dist/cjs/pds-combobox.cjs.entry.js +3 -3
- package/dist/cjs/pds-container.cjs.entry.js +1 -1
- package/dist/cjs/pds-copytext.cjs.entry.js +8 -4
- package/dist/cjs/pds-divider.cjs.entry.js +1 -1
- package/dist/cjs/pds-drawer-content.cjs.entry.js +23 -0
- package/dist/cjs/pds-drawer-footer.cjs.entry.js +23 -0
- package/dist/cjs/pds-drawer-header.cjs.entry.js +23 -0
- package/dist/cjs/pds-drawer.cjs.entry.js +137 -0
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +2 -2
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +2 -2
- package/dist/cjs/pds-filter.cjs.entry.js +3 -3
- package/dist/cjs/pds-filters.cjs.entry.js +2 -2
- package/dist/cjs/pds-icon.cjs.entry.js +2 -2
- package/dist/cjs/pds-image.cjs.entry.js +3 -3
- package/dist/cjs/pds-input.cjs.entry.js +5 -5
- package/dist/cjs/pds-link.cjs.entry.js +5 -5
- package/dist/cjs/pds-loader.cjs.entry.js +2 -2
- package/dist/cjs/pds-modal-content.cjs.entry.js +3 -3
- package/dist/cjs/pds-modal-footer.cjs.entry.js +2 -2
- package/dist/cjs/pds-modal-header.cjs.entry.js +2 -2
- package/dist/cjs/pds-modal.cjs.entry.js +173 -14
- package/dist/cjs/pds-multiselect.cjs.entry.js +6 -6
- package/dist/cjs/pds-popover.cjs.entry.js +2 -2
- package/dist/cjs/pds-progress.cjs.entry.js +4 -2
- package/dist/cjs/pds-property.cjs.entry.js +2 -2
- package/dist/cjs/pds-radio-group.cjs.entry.js +5 -5
- package/dist/cjs/pds-radio.cjs.entry.js +6 -6
- package/dist/cjs/pds-row.cjs.entry.js +2 -2
- package/dist/cjs/pds-select.cjs.entry.js +3 -3
- package/dist/cjs/pds-sortable-item.cjs.entry.js +3 -3
- package/dist/cjs/pds-sortable.cjs.entry.js +2 -2
- package/dist/cjs/pds-switch.cjs.entry.js +6 -6
- package/dist/cjs/pds-tab.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-body.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-cell.cjs.entry.js +4 -4
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +4 -4
- package/dist/cjs/pds-table-head.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-row.cjs.entry.js +2 -2
- package/dist/cjs/pds-table.cjs.entry.js +1 -1
- package/dist/cjs/pds-tabpanel.cjs.entry.js +2 -2
- package/dist/cjs/pds-tabs.cjs.entry.js +2 -2
- package/dist/cjs/pds-text.cjs.entry.js +7 -25
- package/dist/cjs/pds-textarea.cjs.entry.js +7 -7
- package/dist/cjs/pds-toast.cjs.entry.js +4 -4
- package/dist/cjs/pds-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/pine-core.cjs.js +2 -2
- package/dist/cjs/{truncation-tooltip-CVzAha5B.js → truncation-tooltip-Bps7_rUy.js} +51 -1
- package/dist/cjs/{utils-7jx8T2mW.js → utils-KWALOgy9.js} +16 -2
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/pds-button/pds-button.css +1 -2
- package/dist/collection/components/pds-checkbox/pds-checkbox.css +6 -4
- package/dist/collection/components/pds-chip/pds-chip.css +60 -6
- package/dist/collection/components/pds-chip/pds-chip.js +82 -8
- package/dist/collection/components/pds-chip/pds-chip.tokens.css +16 -0
- package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +39 -1
- package/dist/collection/components/pds-combobox/pds-combobox.css +1 -2
- package/dist/collection/components/pds-combobox/pds-combobox.js +1 -1
- package/dist/collection/components/pds-copytext/pds-copytext.js +5 -1
- package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.css +22 -0
- package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +29 -0
- package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.css +15 -0
- package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +23 -0
- package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.css +15 -0
- package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +23 -0
- package/dist/collection/components/pds-drawer/pds-drawer.css +36 -0
- package/dist/collection/components/pds-drawer/pds-drawer.js +362 -0
- package/dist/collection/components/pds-drawer/stories/pds-drawer.stories.js +72 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +1 -1
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +1 -1
- package/dist/collection/components/pds-filters/pds-filters.js +1 -1
- package/dist/collection/components/pds-image/pds-image.js +2 -2
- package/dist/collection/components/pds-input/pds-input.js +2 -2
- package/dist/collection/components/pds-link/pds-link.js +2 -2
- package/dist/collection/components/pds-loader/pds-loader.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +2 -2
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal.css +4 -0
- package/dist/collection/components/pds-modal/pds-modal.js +209 -16
- package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +14 -0
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +3 -3
- package/dist/collection/components/pds-popover/pds-popover.js +1 -1
- package/dist/collection/components/pds-progress/pds-progress.js +3 -1
- package/dist/collection/components/pds-property/pds-property.js +1 -1
- package/dist/collection/components/pds-radio/pds-radio.css +1 -2
- package/dist/collection/components/pds-radio/pds-radio.js +3 -3
- package/dist/collection/components/pds-radio-group/pds-radio-group.js +3 -3
- package/dist/collection/components/pds-row/pds-row.js +1 -1
- package/dist/collection/components/pds-select/pds-select.js +1 -1
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
- package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
- package/dist/collection/components/pds-switch/pds-switch.css +1 -1
- package/dist/collection/components/pds-switch/pds-switch.js +3 -3
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +3 -3
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +2 -2
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
- package/dist/collection/components/pds-text/pds-text.js +2 -2
- package/dist/collection/components/pds-textarea/pds-textarea.js +4 -4
- package/dist/collection/components/pds-toast/pds-toast.js +3 -3
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/test/reduced-motion.js +78 -0
- package/dist/collection/utils/truncation-tooltip.js +51 -1
- package/dist/collection/utils/utils.js +16 -2
- package/dist/docs.json +492 -15
- package/dist/esm/{index-Bu9gFIxM.js → index-BU1hN5Vy.js} +1 -1
- package/dist/esm/{index-CTLu1TM4.js → index-DcT8--Dn.js} +1 -1
- package/dist/esm/index.js +19 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mock-pds-modal.entry.js +3 -3
- package/dist/esm/pds-accordion.entry.js +2 -2
- package/dist/esm/pds-alert.entry.js +1 -1
- package/dist/esm/pds-avatar.entry.js +2 -2
- package/dist/esm/pds-box.entry.js +2 -2
- package/dist/esm/pds-button.entry.js +4 -4
- package/dist/esm/pds-checkbox.entry.js +3 -3
- package/dist/esm/pds-chip.entry.js +46 -12
- package/dist/esm/pds-combobox.entry.js +3 -3
- package/dist/esm/pds-container.entry.js +1 -1
- package/dist/esm/pds-copytext.entry.js +8 -4
- package/dist/esm/pds-divider.entry.js +1 -1
- package/dist/esm/pds-drawer-content.entry.js +21 -0
- package/dist/esm/pds-drawer-footer.entry.js +21 -0
- package/dist/esm/pds-drawer-header.entry.js +21 -0
- package/dist/esm/pds-drawer.entry.js +135 -0
- package/dist/esm/pds-dropdown-menu-item.entry.js +2 -2
- package/dist/esm/pds-dropdown-menu-separator.entry.js +2 -2
- package/dist/esm/pds-dropdown-menu.entry.js +2 -2
- package/dist/esm/pds-filter.entry.js +3 -3
- package/dist/esm/pds-filters.entry.js +2 -2
- package/dist/esm/pds-icon.entry.js +2 -2
- package/dist/esm/pds-image.entry.js +3 -3
- package/dist/esm/pds-input.entry.js +5 -5
- package/dist/esm/pds-link.entry.js +5 -5
- package/dist/esm/pds-loader.entry.js +2 -2
- package/dist/esm/pds-modal-content.entry.js +3 -3
- package/dist/esm/pds-modal-footer.entry.js +2 -2
- package/dist/esm/pds-modal-header.entry.js +2 -2
- package/dist/esm/pds-modal.entry.js +173 -14
- package/dist/esm/pds-multiselect.entry.js +6 -6
- package/dist/esm/pds-popover.entry.js +2 -2
- package/dist/esm/pds-progress.entry.js +4 -2
- package/dist/esm/pds-property.entry.js +2 -2
- package/dist/esm/pds-radio-group.entry.js +5 -5
- package/dist/esm/pds-radio.entry.js +6 -6
- package/dist/esm/pds-row.entry.js +2 -2
- package/dist/esm/pds-select.entry.js +3 -3
- package/dist/esm/pds-sortable-item.entry.js +3 -3
- package/dist/esm/pds-sortable.entry.js +2 -2
- package/dist/esm/pds-switch.entry.js +6 -6
- package/dist/esm/pds-tab.entry.js +1 -1
- package/dist/esm/pds-table-body.entry.js +2 -2
- package/dist/esm/pds-table-cell.entry.js +4 -4
- package/dist/esm/pds-table-head-cell.entry.js +4 -4
- package/dist/esm/pds-table-head.entry.js +2 -2
- package/dist/esm/pds-table-row.entry.js +2 -2
- package/dist/esm/pds-table.entry.js +1 -1
- package/dist/esm/pds-tabpanel.entry.js +2 -2
- package/dist/esm/pds-tabs.entry.js +2 -2
- package/dist/esm/pds-text.entry.js +5 -23
- package/dist/esm/pds-textarea.entry.js +7 -7
- package/dist/esm/pds-toast.entry.js +4 -4
- package/dist/esm/pds-tooltip.entry.js +3 -3
- package/dist/esm/pine-core.js +3 -3
- package/dist/esm/{truncation-tooltip-Blk4GigP.js → truncation-tooltip-CdtEBn_5.js} +51 -1
- package/dist/esm/{utils-tJa4KYNO.js → utils-u_0lxWnH.js} +16 -2
- package/dist/esm-es5/{index-CTLu1TM4.js → index-DcT8--Dn.js} +2 -2
- package/dist/esm-es5/index.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-divider.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-content.entry.js +1 -0
- package/dist/esm-es5/pds-drawer-footer.entry.js +1 -0
- package/dist/esm-es5/pds-drawer-header.entry.js +1 -0
- package/dist/esm-es5/pds-drawer.entry.js +1 -0
- 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/truncation-tooltip-CdtEBn_5.js +1 -0
- package/dist/pine-core/index.esm.js +1 -0
- package/dist/pine-core/p-003df3b3.entry.js +1 -0
- package/dist/pine-core/{p-92ef1608.system.entry.js → p-02452806.system.entry.js} +1 -1
- package/dist/pine-core/{p-5d585aa8.entry.js → p-026ee6de.entry.js} +1 -1
- package/dist/pine-core/{p-463eb0e6.system.entry.js → p-03f3fc92.system.entry.js} +1 -1
- package/dist/pine-core/p-06375326.system.entry.js +1 -0
- package/dist/pine-core/p-08196d6c.entry.js +1 -0
- package/dist/pine-core/{p-bf3afa16.system.entry.js → p-089606b8.system.entry.js} +1 -1
- package/dist/pine-core/p-12941e0d.entry.js +1 -0
- package/dist/pine-core/{p-3b9e77b3.entry.js → p-13bb89ff.entry.js} +1 -1
- package/dist/pine-core/{p-1649dd61.system.entry.js → p-15a0fa0a.system.entry.js} +1 -1
- package/dist/pine-core/{p-3050c66f.entry.js → p-1abae35f.entry.js} +1 -1
- package/dist/pine-core/p-1df5e088.entry.js +1 -0
- package/dist/pine-core/{p-460aa66f.system.entry.js → p-20753e42.system.entry.js} +1 -1
- package/dist/pine-core/{p-12ec8186.system.entry.js → p-24214ab9.system.entry.js} +1 -1
- package/dist/pine-core/p-250011ba.entry.js +1 -0
- package/dist/pine-core/{p-9b68669f.entry.js → p-2b420257.entry.js} +1 -1
- package/dist/pine-core/{p-86bc2a0c.entry.js → p-2bb101c2.entry.js} +1 -1
- package/dist/pine-core/{p-6089d811.entry.js → p-2dbc90ba.entry.js} +1 -1
- package/dist/pine-core/{p-2fd71a0c.entry.js → p-317337e4.entry.js} +1 -1
- package/dist/pine-core/{p-a9e54964.entry.js → p-32fc82c2.entry.js} +1 -1
- package/dist/pine-core/{p-714bfdbd.entry.js → p-35edd8b0.entry.js} +1 -1
- package/dist/pine-core/p-375eb7f4.entry.js +1 -0
- package/dist/pine-core/{p-e1653d75.system.entry.js → p-3b555f06.system.entry.js} +1 -1
- package/dist/pine-core/p-3b796898.entry.js +1 -0
- package/dist/pine-core/{p-c0753d9f.entry.js → p-3c5489ce.entry.js} +1 -1
- package/dist/pine-core/{p-8702635d.system.entry.js → p-3e868906.system.entry.js} +1 -1
- package/dist/pine-core/{p-eb4058ed.system.entry.js → p-441682f4.system.entry.js} +1 -1
- package/dist/pine-core/{p-7b1e3e91.entry.js → p-44222439.entry.js} +1 -1
- package/dist/pine-core/p-45d55983.entry.js +1 -0
- package/dist/pine-core/{p-544ccf67.entry.js → p-464f23e6.entry.js} +1 -1
- package/dist/pine-core/{p-aecaff12.entry.js → p-49c6112a.entry.js} +1 -1
- package/dist/pine-core/p-4bd57896.system.entry.js +1 -0
- package/dist/pine-core/{p-b0531455.entry.js → p-4cbb691f.entry.js} +1 -1
- package/dist/pine-core/{p-46f0dda5.system.entry.js → p-4ebdb90b.system.entry.js} +1 -1
- package/dist/pine-core/{p-b109de2e.entry.js → p-4f5aacd9.entry.js} +1 -1
- package/dist/pine-core/{p-9187c26c.system.entry.js → p-55532d56.system.entry.js} +1 -1
- package/dist/pine-core/{p-f35596cd.entry.js → p-558ac401.entry.js} +1 -1
- package/dist/pine-core/{p-c09dab1a.system.entry.js → p-57784f2f.system.entry.js} +1 -1
- package/dist/pine-core/p-5a8345e2.entry.js +1 -0
- package/dist/pine-core/{p-4923a3fe.entry.js → p-5c5bd609.entry.js} +1 -1
- package/dist/pine-core/p-5d2f95bd.entry.js +1 -0
- package/dist/pine-core/p-5f3d0c86.system.entry.js +1 -0
- package/dist/pine-core/{p-a3c4c0ee.entry.js → p-5f5339ab.entry.js} +1 -1
- package/dist/pine-core/{p-bfa640f4.system.entry.js → p-67fc26e5.system.entry.js} +1 -1
- package/dist/pine-core/p-6a6a767b.system.entry.js +1 -0
- package/dist/pine-core/p-6b260a97.entry.js +1 -0
- package/dist/pine-core/{p-d804d37b.system.entry.js → p-6b3d8c2b.system.entry.js} +1 -1
- package/dist/pine-core/p-6dabeebc.system.entry.js +3 -0
- package/dist/pine-core/{p-d157a33a.entry.js → p-70891202.entry.js} +1 -1
- package/dist/pine-core/p-70fb83d4.entry.js +1 -0
- package/dist/pine-core/{p-7a1971ec.entry.js → p-73c3a73f.entry.js} +1 -1
- package/dist/pine-core/p-73fa955a.system.entry.js +1 -0
- package/dist/pine-core/p-755e0b3c.system.entry.js +1 -0
- package/dist/pine-core/p-77082557.system.entry.js +1 -0
- package/dist/pine-core/{p-65557500.entry.js → p-7e4729e0.entry.js} +1 -1
- package/dist/pine-core/p-8b051229.entry.js +1 -0
- package/dist/pine-core/{p-c713ffc6.system.entry.js → p-8d1e7b3c.system.entry.js} +1 -1
- package/dist/pine-core/{p-63f5f66f.system.entry.js → p-8d8a8550.system.entry.js} +1 -1
- package/dist/pine-core/{p-2d4b9253.entry.js → p-93486f2e.entry.js} +1 -1
- package/dist/pine-core/{p-b255d3b7.entry.js → p-93ae562d.entry.js} +1 -1
- package/dist/pine-core/{p-ce79321b.system.entry.js → p-93c52e2b.system.entry.js} +1 -1
- package/dist/pine-core/{p-08151143.system.entry.js → p-95b8bece.system.entry.js} +1 -1
- package/dist/pine-core/{p-af4a24d9.entry.js → p-95defb53.entry.js} +1 -1
- package/dist/pine-core/{p-92c79ed4.system.entry.js → p-99f300ef.system.entry.js} +1 -1
- package/dist/pine-core/p-9d77f2f8.system.entry.js +1 -0
- package/dist/pine-core/p-9d902000.system.entry.js +1 -0
- package/dist/pine-core/p-9ef355b7.entry.js +1 -0
- package/dist/pine-core/p-B2nn1gSd.js +1 -0
- package/dist/pine-core/{p-CRCxGYgw.system.js → p-B2qvvB3q.system.js} +1 -1
- package/dist/pine-core/p-BI7Ml0VF.system.js +1 -0
- package/dist/pine-core/p-CJ8t3EBJ.system.js +2 -0
- package/dist/pine-core/p-DcT8--Dn.js +2 -0
- package/dist/pine-core/p-G3CPPJEt.system.js +1 -0
- package/dist/pine-core/p-a009ab10.system.entry.js +1 -0
- package/dist/pine-core/p-a616385b.system.entry.js +1 -0
- package/dist/pine-core/{p-bba759f8.system.entry.js → p-a6a269da.system.entry.js} +1 -1
- package/dist/pine-core/p-a8cd2ab5.entry.js +1 -0
- package/dist/pine-core/p-a8f1a48d.entry.js +1 -0
- package/dist/pine-core/p-b0becff3.system.entry.js +1 -0
- package/dist/pine-core/p-b45b8f8b.system.entry.js +1 -0
- package/dist/pine-core/{p-e16dfb32.system.entry.js → p-b53d9620.system.entry.js} +1 -1
- package/dist/pine-core/p-b85bb61d.system.entry.js +1 -0
- package/dist/pine-core/{p-ae296598.entry.js → p-b8a5597d.entry.js} +1 -1
- package/dist/pine-core/p-b9a857fc.system.entry.js +1 -0
- package/dist/pine-core/p-bd9b2931.system.entry.js +1 -0
- package/dist/pine-core/p-bdded57a.system.entry.js +1 -0
- package/dist/pine-core/{p-4dad0878.entry.js → p-bf025e38.entry.js} +1 -1
- package/dist/pine-core/{p-0fcda1ec.entry.js → p-c08b1697.entry.js} +1 -1
- package/dist/pine-core/p-c1a65082.entry.js +1 -0
- package/dist/pine-core/p-c1d1befb.system.entry.js +1 -0
- package/dist/pine-core/{p-1e952dbb.entry.js → p-c5b6b545.entry.js} +2 -2
- package/dist/pine-core/{p-ce63f726.system.entry.js → p-c6426e16.system.entry.js} +1 -1
- package/dist/pine-core/{p-d54af26c.system.entry.js → p-cfcb89d1.system.entry.js} +1 -1
- package/dist/pine-core/{p-aa208514.entry.js → p-d33d65f6.entry.js} +1 -1
- package/dist/pine-core/p-d70aa0c7.system.entry.js +1 -0
- package/dist/pine-core/{p-902b3e8b.system.entry.js → p-d9c1ee36.system.entry.js} +1 -1
- package/dist/pine-core/{p-e450eb27.system.entry.js → p-df285ece.system.entry.js} +1 -1
- package/dist/pine-core/{p-04a30a2d.system.entry.js → p-e039ebb6.system.entry.js} +1 -1
- package/dist/pine-core/{p-4d6944aa.entry.js → p-e055c543.entry.js} +1 -1
- package/dist/pine-core/{p-2af19aa7.entry.js → p-e08e4ca7.entry.js} +1 -1
- package/dist/pine-core/p-ea986474.system.entry.js +1 -0
- package/dist/pine-core/{p-afd07d5b.entry.js → p-ec04d4c3.entry.js} +1 -1
- package/dist/pine-core/p-ee114aef.entry.js +1 -0
- package/dist/pine-core/{p-d415bb01.entry.js → p-ee997fbf.entry.js} +2 -2
- package/dist/pine-core/{p-8e6a8a8e.entry.js → p-f1365550.entry.js} +1 -1
- package/dist/pine-core/{p-fcf91f14.system.entry.js → p-f26dcbc2.system.entry.js} +1 -1
- package/dist/pine-core/{p-cf72e9b1.system.entry.js → p-f5cf98be.system.entry.js} +1 -1
- package/dist/pine-core/{p-b17fa86a.system.entry.js → p-f682f08a.system.entry.js} +1 -1
- package/dist/pine-core/p-f89197c9.entry.js +1 -0
- package/dist/pine-core/p-f9f7101e.entry.js +1 -0
- package/dist/pine-core/{p-226232a7.system.entry.js → p-fa2a786d.system.entry.js} +1 -1
- package/dist/pine-core/{p-7c18e9e8.system.entry.js → p-fa8d3155.system.entry.js} +2 -2
- package/dist/pine-core/p-fb774f89.system.entry.js +1 -0
- package/dist/pine-core/{p-ba8bd9dc.system.entry.js → p-fbb72e66.system.entry.js} +1 -1
- package/dist/pine-core/pine-core.css +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/pine-core/pine-core.js +1 -1
- package/dist/types/components/pds-chip/pds-chip.d.ts +12 -0
- package/dist/types/components/pds-drawer/pds-drawer-content/pds-drawer-content.d.ts +11 -0
- package/dist/types/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.d.ts +5 -0
- package/dist/types/components/pds-drawer/pds-drawer-header/pds-drawer-header.d.ts +5 -0
- package/dist/types/components/pds-drawer/pds-drawer.d.ts +78 -0
- package/dist/types/components/pds-modal/pds-modal.d.ts +47 -2
- package/dist/types/components/pds-table/pds-table-cell/pds-table-cell.d.ts +2 -1
- package/dist/types/components/pds-text/pds-text.d.ts +2 -1
- package/dist/types/components.d.ts +253 -11
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/test/reduced-motion.d.ts +30 -0
- package/dist/types/utils/truncation-tooltip.d.ts +12 -0
- package/dist/types/utils/types.d.ts +2 -1
- package/dist/types/utils/utils.d.ts +16 -1
- package/dist/vscode.html-data.json +169 -6
- package/hydrate/index.js +623 -115
- package/hydrate/index.mjs +623 -115
- package/package.json +7 -3
- package/dist/esm-es5/truncation-tooltip-Blk4GigP.js +0 -1
- package/dist/pine-core/p-056667f0.entry.js +0 -1
- package/dist/pine-core/p-0d73d473.entry.js +0 -1
- package/dist/pine-core/p-0e89a189.entry.js +0 -1
- package/dist/pine-core/p-1ba361cb.entry.js +0 -1
- package/dist/pine-core/p-210f0994.system.entry.js +0 -1
- package/dist/pine-core/p-222ff58e.system.entry.js +0 -1
- package/dist/pine-core/p-228a9068.system.entry.js +0 -1
- package/dist/pine-core/p-2e214db6.entry.js +0 -1
- package/dist/pine-core/p-33de0eb7.system.entry.js +0 -1
- package/dist/pine-core/p-3aec9079.entry.js +0 -1
- package/dist/pine-core/p-3cdc1a5b.entry.js +0 -1
- package/dist/pine-core/p-4faff617.entry.js +0 -1
- package/dist/pine-core/p-50e0f726.system.entry.js +0 -1
- package/dist/pine-core/p-520f7a5b.entry.js +0 -1
- package/dist/pine-core/p-53999cd6.system.entry.js +0 -1
- package/dist/pine-core/p-5c239f0a.entry.js +0 -1
- package/dist/pine-core/p-611f68b7.system.entry.js +0 -1
- package/dist/pine-core/p-7691a875.system.entry.js +0 -3
- package/dist/pine-core/p-85434de8.system.entry.js +0 -1
- package/dist/pine-core/p-897fe88c.entry.js +0 -1
- package/dist/pine-core/p-9487ff20.system.entry.js +0 -1
- package/dist/pine-core/p-9507eb49.system.entry.js +0 -1
- package/dist/pine-core/p-97198cb6.system.entry.js +0 -1
- package/dist/pine-core/p-9a7294e7.system.entry.js +0 -1
- package/dist/pine-core/p-9fd1e8f4.system.entry.js +0 -1
- package/dist/pine-core/p-BNSGedhN.js +0 -1
- package/dist/pine-core/p-CTLu1TM4.js +0 -2
- package/dist/pine-core/p-DAIsVNlL.system.js +0 -2
- package/dist/pine-core/p-Dr-FzkdE.system.js +0 -1
- package/dist/pine-core/p-YWpyar7R.system.js +0 -1
- package/dist/pine-core/p-a53222f7.entry.js +0 -1
- package/dist/pine-core/p-a7eabc0c.system.entry.js +0 -1
- package/dist/pine-core/p-a8ab4d9b.entry.js +0 -1
- package/dist/pine-core/p-b52deffb.entry.js +0 -1
- package/dist/pine-core/p-b6c2090f.system.entry.js +0 -1
- package/dist/pine-core/p-d27ef352.system.entry.js +0 -1
- package/dist/pine-core/p-e11795db.system.entry.js +0 -1
- package/dist/pine-core/p-f09ce49e.entry.js +0 -1
- package/dist/pine-core/p-f3683be8.entry.js +0 -1
- /package/dist/esm-es5/{index-Bu9gFIxM.js → index-BU1hN5Vy.js} +0 -0
- /package/dist/esm-es5/{utils-tJa4KYNO.js → utils-u_0lxWnH.js} +0 -0
- /package/dist/pine-core/{p-Bu9gFIxM.js → p-BU1hN5Vy.js} +0 -0
- /package/dist/pine-core/{p-BG6uGRQj.system.js → p-D_I-k33A.system.js} +0 -0
- /package/dist/pine-core/{p-Bjc6fc_Y.system.js → p-ctdGub9B.system.js} +0 -0
- /package/dist/pine-core/{p-tJa4KYNO.js → p-u_0lxWnH.js} +0 -0
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { unwrapReconnectedContent } from "../../utils/reconnected-content";
|
|
3
|
+
const PRESET_SIZES = ['sm', 'md', 'lg', 'fullscreen'];
|
|
4
|
+
const isCustomLength = (value) => /^[a-z0-9.%+\-*/(), ]+$/i.test(value) &&
|
|
5
|
+
/\d/.test(value) &&
|
|
6
|
+
(typeof CSS === 'undefined' || CSS.supports('max-width', value));
|
|
3
7
|
export class PdsModal {
|
|
4
8
|
constructor() {
|
|
5
9
|
this.focusableElements = [];
|
|
@@ -14,7 +18,9 @@ export class PdsModal {
|
|
|
14
18
|
*/
|
|
15
19
|
this.open = false;
|
|
16
20
|
/**
|
|
17
|
-
* The size of the modal
|
|
21
|
+
* The size of the modal. Can be a predefined value ('sm', 'md', 'lg', 'fullscreen') or a custom
|
|
22
|
+
* max-width as a CSS length (e.g., '1250px', '80vw'). A custom width stays fluid below that size.
|
|
23
|
+
* A value that is neither falls back to 'md'.
|
|
18
24
|
* @default 'md'
|
|
19
25
|
*/
|
|
20
26
|
this.size = 'md';
|
|
@@ -33,6 +39,19 @@ export class PdsModal {
|
|
|
33
39
|
* @default false
|
|
34
40
|
*/
|
|
35
41
|
this.disableTopLayer = false;
|
|
42
|
+
/**
|
|
43
|
+
* Whether to skip moving focus into the modal when it opens — both our own
|
|
44
|
+
* `setInitialFocus()` and the browser's native "dialog focusing steps",
|
|
45
|
+
* which move focus into the dialog as soon as `show()`/`showModal()` is
|
|
46
|
+
* called regardless of application code. Focus return on close is
|
|
47
|
+
* unaffected either way. For a modal opened by something other than a
|
|
48
|
+
* direct user click — a redirect, a deep link, a background event —
|
|
49
|
+
* stealing focus on open can interrupt whatever the user was already
|
|
50
|
+
* doing. Default `false` preserves today's behavior for every existing
|
|
51
|
+
* consumer.
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
this.disableInitialFocus = false;
|
|
36
55
|
/**
|
|
37
56
|
* Stores the list of focusable elements in the modal
|
|
38
57
|
*/
|
|
@@ -49,16 +68,41 @@ export class PdsModal {
|
|
|
49
68
|
}
|
|
50
69
|
};
|
|
51
70
|
this.handleKeyDown = (e) => {
|
|
71
|
+
var _a, _b, _c;
|
|
52
72
|
// If the modal is not open, don't handle any keyboard events
|
|
53
73
|
if (!this.open)
|
|
54
74
|
return;
|
|
55
75
|
// Handle Escape key to close the modal
|
|
56
76
|
if (e.key === 'Escape') {
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
|
|
77
|
+
// Every open pds-modal shares this document-level listener for the
|
|
78
|
+
// same keydown event. Whichever one runs first can synchronously move
|
|
79
|
+
// focus (hideModal() restores it), which would make a later instance's
|
|
80
|
+
// own read of document.activeElement reflect that side effect instead
|
|
81
|
+
// of where focus actually was when the key was pressed — stacking two
|
|
82
|
+
// sibling modals closing on one Escape instead of just the top one.
|
|
83
|
+
// That alone isn't enough, though: isStackedAboveOverlay's `:modal`
|
|
84
|
+
// check reads LIVE top-layer state, and hideModal()'s close() clears it
|
|
85
|
+
// synchronously — so whichever sibling's listener runs first (DOM
|
|
86
|
+
// order, not z-index) can close itself and erase the very evidence a
|
|
87
|
+
// later listener needs to recognize it was stacked above. Snapshot that
|
|
88
|
+
// determination too, in the same first-listener-wins block, before any
|
|
89
|
+
// instance has had a chance to act on this keypress.
|
|
90
|
+
const eventSnapshot = e;
|
|
91
|
+
if (!('__pdsActiveElementAtEscape' in eventSnapshot)) {
|
|
92
|
+
const activeAtDispatch = document.activeElement;
|
|
93
|
+
eventSnapshot.__pdsActiveElementAtEscape = activeAtDispatch;
|
|
94
|
+
const topLayerDialog = (_a = activeAtDispatch === null || activeAtDispatch === void 0 ? void 0 : activeAtDispatch.closest('dialog')) !== null && _a !== void 0 ? _a : null;
|
|
95
|
+
eventSnapshot.__pdsTopLayerDialogAtEscape = topLayerDialog;
|
|
96
|
+
eventSnapshot.__pdsTopLayerDialogWasModalAtEscape = !!(topLayerDialog && topLayerDialog.matches(':modal'));
|
|
97
|
+
}
|
|
98
|
+
// Leave Escape to a genuinely stacked-above overlay (disableTopLayer's
|
|
99
|
+
// reason for existing) — not just to anything outside this modal.
|
|
100
|
+
const active = eventSnapshot.__pdsActiveElementAtEscape;
|
|
101
|
+
if (this.disableTopLayer &&
|
|
102
|
+
active &&
|
|
103
|
+
active !== document.body &&
|
|
104
|
+
!this.el.contains(active) &&
|
|
105
|
+
this.isStackedAboveOverlay(active, (_b = eventSnapshot.__pdsTopLayerDialogAtEscape) !== null && _b !== void 0 ? _b : null, (_c = eventSnapshot.__pdsTopLayerDialogWasModalAtEscape) !== null && _c !== void 0 ? _c : false)) {
|
|
62
106
|
return;
|
|
63
107
|
}
|
|
64
108
|
// Always prevent native dialog close behavior
|
|
@@ -102,10 +146,26 @@ export class PdsModal {
|
|
|
102
146
|
}
|
|
103
147
|
};
|
|
104
148
|
}
|
|
149
|
+
componentWillLoad() {
|
|
150
|
+
this.warnOnInvalidSize();
|
|
151
|
+
}
|
|
152
|
+
sizeChanged() {
|
|
153
|
+
this.warnOnInvalidSize();
|
|
154
|
+
}
|
|
105
155
|
componentDidLoad() {
|
|
106
156
|
this.modalRef = this.el.querySelector('.pds-modal__backdrop');
|
|
107
157
|
// Add keyboard event listener
|
|
108
158
|
document.addEventListener('keydown', this.handleKeyDown);
|
|
159
|
+
// @Watch('open') only fires on a later change, not the prop's initial
|
|
160
|
+
// value — a modal mounted with `open` already true (static markup, or a
|
|
161
|
+
// framework passing it on first render) would otherwise never call
|
|
162
|
+
// show()/showModal(): the panel still appears, since that's driven by the
|
|
163
|
+
// `open` CSS class, but the native <dialog> itself was never opened, so
|
|
164
|
+
// there's no top-layer promotion, no dialog focusing steps, and no
|
|
165
|
+
// focusable-elements list or previousActiveElement captured.
|
|
166
|
+
if (this.open) {
|
|
167
|
+
this.showModal();
|
|
168
|
+
}
|
|
109
169
|
}
|
|
110
170
|
// Unwraps a nested dialog.pds-modal__backdrop left by a page-cache (Turbo, bfcache) reconnect.
|
|
111
171
|
componentDidRender() {
|
|
@@ -211,8 +271,39 @@ export class PdsModal {
|
|
|
211
271
|
// Update focusable elements and set initial focus
|
|
212
272
|
// Using a longer timeout to ensure all components are fully rendered
|
|
213
273
|
setTimeout(() => {
|
|
274
|
+
var _a, _b;
|
|
214
275
|
this.updateFocusableElements();
|
|
215
|
-
this.
|
|
276
|
+
if (this.disableInitialFocus) {
|
|
277
|
+
// show()/showModal() also move focus into the dialog natively (the
|
|
278
|
+
// HTML spec's "dialog focusing steps") — that native step isn't
|
|
279
|
+
// necessarily done by the time this task runs either, so counter it
|
|
280
|
+
// here, in the same deferred slot setInitialFocus() below uses for
|
|
281
|
+
// the same reason, rather than racing it synchronously above.
|
|
282
|
+
//
|
|
283
|
+
// disableInitialFocus exists for a drawer that can open in the
|
|
284
|
+
// background while the user is mid-task elsewhere — by the time
|
|
285
|
+
// this runs, they may have already clicked into something of
|
|
286
|
+
// their own outside the dialog. Only act if focus is still where
|
|
287
|
+
// the native steps (or nothing) left it, so that isn't stolen.
|
|
288
|
+
const activeElement = document.activeElement;
|
|
289
|
+
const focusAlreadyClaimedElsewhere = activeElement !== null && activeElement !== document.body && !((_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.contains(activeElement));
|
|
290
|
+
if (!focusAlreadyClaimedElsewhere) {
|
|
291
|
+
if (this.previousActiveElement !== document.body && typeof ((_b = this.previousActiveElement) === null || _b === void 0 ? void 0 : _b.focus) === 'function') {
|
|
292
|
+
this.previousActiveElement.focus();
|
|
293
|
+
}
|
|
294
|
+
else if (activeElement instanceof HTMLElement) {
|
|
295
|
+
// Nothing was focused before opening (previousActiveElement is
|
|
296
|
+
// body), so there's nothing to restore focus to — body.focus()
|
|
297
|
+
// would be a no-op and leave focus wherever the native focusing
|
|
298
|
+
// steps put it, inside the dialog. Blur that instead so focus
|
|
299
|
+
// ends up nowhere, matching the state before opening.
|
|
300
|
+
activeElement.blur();
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
this.setInitialFocus();
|
|
306
|
+
}
|
|
216
307
|
this.pdsModalOpen.emit();
|
|
217
308
|
}, 100);
|
|
218
309
|
}
|
|
@@ -227,10 +318,22 @@ export class PdsModal {
|
|
|
227
318
|
async hideModal() {
|
|
228
319
|
if (this.modalRef) {
|
|
229
320
|
try {
|
|
321
|
+
// Capture before close(): with the async task queue, a prop change
|
|
322
|
+
// that triggers hideModal() (e.g. light dismiss setting `open` false
|
|
323
|
+
// on a pointerdown elsewhere) doesn't run until the next frame — by
|
|
324
|
+
// then the browser has already moved focus to whatever the user's
|
|
325
|
+
// click actually landed on. Restoring previousActiveElement in that
|
|
326
|
+
// case would steal focus back from a real new destination; only
|
|
327
|
+
// restore it when focus is still inside the modal (or nowhere, i.e.
|
|
328
|
+
// document.body), meaning nothing else has claimed it since.
|
|
329
|
+
const activeElement = document.activeElement;
|
|
330
|
+
const focusAlreadyMovedElsewhere = activeElement !== null && activeElement !== document.body && !this.modalRef.contains(activeElement);
|
|
230
331
|
this.modalRef.close();
|
|
231
332
|
this.open = false;
|
|
232
333
|
// Restore focus to the element that was focused before the modal was opened
|
|
233
|
-
if (
|
|
334
|
+
if (!focusAlreadyMovedElsewhere &&
|
|
335
|
+
this.previousActiveElement &&
|
|
336
|
+
typeof this.previousActiveElement.focus === 'function') {
|
|
234
337
|
this.previousActiveElement.focus();
|
|
235
338
|
}
|
|
236
339
|
this.pdsModalClose.emit();
|
|
@@ -247,6 +350,46 @@ export class PdsModal {
|
|
|
247
350
|
const backdrop = modal.querySelector('.pds-modal__backdrop');
|
|
248
351
|
return backdrop ? parseInt(getComputedStyle(backdrop).zIndex, 10) : -1;
|
|
249
352
|
}
|
|
353
|
+
/**
|
|
354
|
+
* Whether `active` sits inside a surface actually stacked above this modal.
|
|
355
|
+
*
|
|
356
|
+
* Used to decide whether an Escape keypress belongs to that surface instead
|
|
357
|
+
* of this modal. Focus being merely *outside* this modal is not enough on
|
|
358
|
+
* its own: in `disableTopLayer` mode the page stays interactive (that's the
|
|
359
|
+
* point of a non-modal usage like a drawer), so focus will routinely be on
|
|
360
|
+
* ordinary page content while the modal is open, and that must not be
|
|
361
|
+
* mistaken for "an overlay owns Escape."
|
|
362
|
+
*
|
|
363
|
+
* Two ways a surface can be above: it is itself promoted to the browser's
|
|
364
|
+
* top layer (a regular `showModal()` dialog, which paints above everything
|
|
365
|
+
* outside the top layer regardless of z-index — a sibling pds-modal opened
|
|
366
|
+
* over a `disableTopLayer` drawer typically shares the exact same z-index
|
|
367
|
+
* token, so a numeric comparison alone would miss it), or it has a higher
|
|
368
|
+
* z-index than this modal's own backdrop (a `disableTopLayer` overlay, or
|
|
369
|
+
* anything else deliberately raised above it).
|
|
370
|
+
*
|
|
371
|
+
* `topLayerDialog` / `topLayerDialogWasModal` come pre-snapshotted from the
|
|
372
|
+
* keydown event (see handleKeyDown) rather than being re-derived here: by
|
|
373
|
+
* the time a later sibling modal's listener runs, an earlier one may have
|
|
374
|
+
* already closed itself, which clears `:modal` — reading it live here would
|
|
375
|
+
* lose that evidence depending on listener order.
|
|
376
|
+
*/
|
|
377
|
+
isStackedAboveOverlay(active, topLayerDialog, topLayerDialogWasModal) {
|
|
378
|
+
if (topLayerDialog && topLayerDialog !== this.modalRef && topLayerDialogWasModal) {
|
|
379
|
+
return true;
|
|
380
|
+
}
|
|
381
|
+
const ownZIndex = this.getBackdropZIndex(this.el);
|
|
382
|
+
let node = active;
|
|
383
|
+
while (node && node !== document.body) {
|
|
384
|
+
const style = getComputedStyle(node);
|
|
385
|
+
const zIndex = parseInt(style.zIndex, 10);
|
|
386
|
+
if (style.position !== 'static' && !isNaN(zIndex) && zIndex > ownZIndex) {
|
|
387
|
+
return true;
|
|
388
|
+
}
|
|
389
|
+
node = node.parentElement;
|
|
390
|
+
}
|
|
391
|
+
return false;
|
|
392
|
+
}
|
|
250
393
|
/**
|
|
251
394
|
* Checks if this modal is the innermost (highest z-index) modal
|
|
252
395
|
*/
|
|
@@ -267,15 +410,28 @@ export class PdsModal {
|
|
|
267
410
|
const thisZIndex = this.getBackdropZIndex(this.el);
|
|
268
411
|
return thisZIndex === maxZIndex;
|
|
269
412
|
}
|
|
413
|
+
resolveSize() {
|
|
414
|
+
var _a;
|
|
415
|
+
const size = ((_a = this.size) !== null && _a !== void 0 ? _a : '').trim() || 'md';
|
|
416
|
+
if (PRESET_SIZES.includes(size))
|
|
417
|
+
return [size];
|
|
418
|
+
return isCustomLength(size) ? ['custom', size] : [undefined];
|
|
419
|
+
}
|
|
420
|
+
warnOnInvalidSize() {
|
|
421
|
+
if (this.resolveSize()[0] !== undefined)
|
|
422
|
+
return;
|
|
423
|
+
console.warn(`pds-modal: invalid size "${String(this.size).slice(0, 50)}", using md`);
|
|
424
|
+
}
|
|
270
425
|
render() {
|
|
271
|
-
|
|
426
|
+
const [sizeClass = 'md', customSize] = this.resolveSize();
|
|
427
|
+
return (h("dialog", { key: 'bbc56f2aaf3fe861ae309eb1930d51a588b4c727', class: {
|
|
272
428
|
'pds-modal__backdrop': true,
|
|
273
429
|
'open': this.open
|
|
274
|
-
}, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, h("div", { key: '
|
|
430
|
+
}, "aria-modal": this.disableTopLayer ? 'false' : 'true', "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, h("div", { key: 'b3d6f9c2a7854845ebe94c05ee507000c38a1326', class: {
|
|
275
431
|
'pds-modal': true,
|
|
276
|
-
[`pds-modal--${
|
|
432
|
+
[`pds-modal--${sizeClass}`]: true,
|
|
277
433
|
'pds-modal--scrollable': this.scrollable
|
|
278
|
-
}, part: "modal" }, h("slot", { key: '
|
|
434
|
+
}, style: customSize !== undefined ? { '--pds-modal-max-width': customSize } : undefined, part: "modal" }, h("slot", { key: '42ff9ae5e427bc69141c58e0824aad677f5c7756' }))));
|
|
279
435
|
}
|
|
280
436
|
static get is() { return "pds-modal"; }
|
|
281
437
|
static get originalStyleUrls() {
|
|
@@ -359,9 +515,20 @@ export class PdsModal {
|
|
|
359
515
|
"type": "string",
|
|
360
516
|
"mutable": false,
|
|
361
517
|
"complexType": {
|
|
362
|
-
"original": "
|
|
363
|
-
"resolved": "\"fullscreen\" | \"lg\" | \"md\" | \"sm\"",
|
|
364
|
-
"references": {
|
|
518
|
+
"original": "ModalSizeType | (string & Record<never, never>)",
|
|
519
|
+
"resolved": "\"fullscreen\" | \"lg\" | \"md\" | \"sm\" | string & Record<never, never>",
|
|
520
|
+
"references": {
|
|
521
|
+
"ModalSizeType": {
|
|
522
|
+
"location": "import",
|
|
523
|
+
"path": "@utils/types",
|
|
524
|
+
"id": "src/utils/types.ts::ModalSizeType",
|
|
525
|
+
"referenceLocation": "ModalSizeType"
|
|
526
|
+
},
|
|
527
|
+
"Record": {
|
|
528
|
+
"location": "global",
|
|
529
|
+
"id": "global::Record"
|
|
530
|
+
}
|
|
531
|
+
}
|
|
365
532
|
},
|
|
366
533
|
"required": false,
|
|
367
534
|
"optional": false,
|
|
@@ -370,7 +537,7 @@ export class PdsModal {
|
|
|
370
537
|
"name": "default",
|
|
371
538
|
"text": "'md'"
|
|
372
539
|
}],
|
|
373
|
-
"text": "The size of the modal"
|
|
540
|
+
"text": "The size of the modal. Can be a predefined value ('sm', 'md', 'lg', 'fullscreen') or a custom\nmax-width as a CSS length (e.g., '1250px', '80vw'). A custom width stays fluid below that size.\nA value that is neither falls back to 'md'."
|
|
374
541
|
},
|
|
375
542
|
"getter": false,
|
|
376
543
|
"setter": false,
|
|
@@ -423,6 +590,29 @@ export class PdsModal {
|
|
|
423
590
|
"reflect": false,
|
|
424
591
|
"attribute": "disable-top-layer",
|
|
425
592
|
"defaultValue": "false"
|
|
593
|
+
},
|
|
594
|
+
"disableInitialFocus": {
|
|
595
|
+
"type": "boolean",
|
|
596
|
+
"mutable": false,
|
|
597
|
+
"complexType": {
|
|
598
|
+
"original": "boolean",
|
|
599
|
+
"resolved": "boolean",
|
|
600
|
+
"references": {}
|
|
601
|
+
},
|
|
602
|
+
"required": false,
|
|
603
|
+
"optional": false,
|
|
604
|
+
"docs": {
|
|
605
|
+
"tags": [{
|
|
606
|
+
"name": "default",
|
|
607
|
+
"text": "false"
|
|
608
|
+
}],
|
|
609
|
+
"text": "Whether to skip moving focus into the modal when it opens \u2014 both our own\n`setInitialFocus()` and the browser's native \"dialog focusing steps\",\nwhich move focus into the dialog as soon as `show()`/`showModal()` is\ncalled regardless of application code. Focus return on close is\nunaffected either way. For a modal opened by something other than a\ndirect user click \u2014 a redirect, a deep link, a background event \u2014\nstealing focus on open can interrupt whatever the user was already\ndoing. Default `false` preserves today's behavior for every existing\nconsumer."
|
|
610
|
+
},
|
|
611
|
+
"getter": false,
|
|
612
|
+
"setter": false,
|
|
613
|
+
"reflect": false,
|
|
614
|
+
"attribute": "disable-initial-focus",
|
|
615
|
+
"defaultValue": "false"
|
|
426
616
|
}
|
|
427
617
|
};
|
|
428
618
|
}
|
|
@@ -509,6 +699,9 @@ export class PdsModal {
|
|
|
509
699
|
static get elementRef() { return "el"; }
|
|
510
700
|
static get watchers() {
|
|
511
701
|
return [{
|
|
702
|
+
"propName": "size",
|
|
703
|
+
"methodName": "sizeChanged"
|
|
704
|
+
}, {
|
|
512
705
|
"propName": "open",
|
|
513
706
|
"methodName": "handleOpenChange"
|
|
514
707
|
}];
|
|
@@ -13,6 +13,12 @@ export default {
|
|
|
13
13
|
scrollable: true,
|
|
14
14
|
size: 'md',
|
|
15
15
|
},
|
|
16
|
+
argTypes: {
|
|
17
|
+
size: {
|
|
18
|
+
control: 'text',
|
|
19
|
+
description: "A preset ('sm', 'md', 'lg', 'fullscreen') or a CSS length such as '1100px'.",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
16
22
|
parameters: {}
|
|
17
23
|
}
|
|
18
24
|
|
|
@@ -89,6 +95,14 @@ Default.args = {
|
|
|
89
95
|
open: false,
|
|
90
96
|
};
|
|
91
97
|
|
|
98
|
+
// Any CSS length works as a size; it becomes the modal's max-width.
|
|
99
|
+
export const CustomSize = BaseTemplate.bind({});
|
|
100
|
+
CustomSize.args = {
|
|
101
|
+
componentId: 'custom-size-modal',
|
|
102
|
+
size: '1100px',
|
|
103
|
+
open: false,
|
|
104
|
+
};
|
|
105
|
+
|
|
92
106
|
const DestructiveTemplate = (args) => html`
|
|
93
107
|
<div>
|
|
94
108
|
<pds-button id="show-modal" onClick="document.querySelector('#${args.componentId}').open = true">
|
|
@@ -77,7 +77,7 @@ export class MockPdsModal {
|
|
|
77
77
|
'pds-modal__backdrop': true,
|
|
78
78
|
'open': this.open,
|
|
79
79
|
};
|
|
80
|
-
return (h("div", { key: '
|
|
80
|
+
return (h("div", { key: '1207382ec39e45f95449791cd9fbf3ad54a17564', class: backdropClasses }, h("div", { key: '865cff8feaf031750e6763d60580f9060dfc0c91', class: modalClasses, role: "dialog", "aria-modal": "true", "aria-labelledby": this.componentId ? `${this.componentId}-heading` : null, part: "modal" }, h("div", { key: 'b49ba7c717999b53578056ad35c4ec270dbdfd01', class: "pds-modal__header" }, h("slot", { key: '2c06b0f0c4692f1991eb389a73b751d38796c1cf', name: "header" })), h("div", { key: 'ca0e6f324db12de5bd0c21b53bf888ab44c0d34c', class: "pds-modal-content" }, h("slot", { key: 'cef74e83f58195b574f9a290f748cecb2561668e' })), h("div", { key: '65518e197e80fa0cd8ea8cbbd9bb10a064e251ca', class: "pds-modal__footer" }, h("slot", { key: '8cd72b932b7c4d31cf9ecb8f0c37d9a5b5ca7594', name: "footer" })))));
|
|
81
81
|
}
|
|
82
82
|
static get is() { return "mock-pds-modal"; }
|
|
83
83
|
static get originalStyleUrls() {
|
|
@@ -1021,10 +1021,10 @@ export class PdsMultiselect {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
render() {
|
|
1023
1023
|
const hasSelections = this.selectedItems.length > 0;
|
|
1024
|
-
return (h(Host, { key: '
|
|
1024
|
+
return (h(Host, { key: '5d4de9ca729d5bfb63a8a73f8f40328b9ab48f57', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: '2b5e1e01caaa4a6540a67e2638a20072e9f706cb', class: "pds-multiselect", onFocusout: this.handleContainerFocusOut }, this.label && (h("label", { key: 'f23b840feb4e243d90b3a9913dab1b238e7c497d', id: `${this.componentId}-label`, htmlFor: this.componentId, class: {
|
|
1025
1025
|
'pds-multiselect__label': true,
|
|
1026
1026
|
'visually-hidden': this.hideLabel,
|
|
1027
|
-
} }, this.label)), h("div", { key: '
|
|
1027
|
+
} }, this.label)), h("div", { key: '2e1f89d6f06332e957858c0eea34fca1a9629921', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), style: { width: this.triggerWidth } }, this.selectedDisplay === 'pill' && this.pillPosition === 'inline' ? (h("div", { ref: el => (this.pillInlineTriggerEl = el || undefined), part: "trigger", class: {
|
|
1028
1028
|
'pds-multiselect__trigger': true,
|
|
1029
1029
|
'pds-multiselect__trigger--open': this.isOpen,
|
|
1030
1030
|
'pds-multiselect__trigger--disabled': this.disabled,
|
|
@@ -1040,7 +1040,7 @@ export class PdsMultiselect {
|
|
|
1040
1040
|
}, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, h("span", { class: {
|
|
1041
1041
|
'pds-multiselect__trigger-text': true,
|
|
1042
1042
|
'pds-multiselect__trigger-text--placeholder': !hasSelections || (this.selectedDisplay === 'pill' && this.pillPosition === 'below'),
|
|
1043
|
-
} }, this.getTriggerText()), h("pds-icon", { class: "pds-multiselect__icon", icon: enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), h("span", { key: '
|
|
1043
|
+
} }, this.getTriggerText()), h("pds-icon", { class: "pds-multiselect__icon", icon: enlarge }))), this.renderDropdown()), this.selectedDisplay === 'pill' && this.pillPosition === 'below' && this.renderBelowPills(), h("span", { key: '3d2e201157ce16abbcd12fa9254ced7f2b562a8f', class: "visually-hidden", "aria-live": "polite", "aria-atomic": "true" }, this.removalAnnouncement), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (h("p", { key: '3bbf405df2e72ae730529f28273b003b3332e980', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (h("p", { key: 'ef4a27162b00b14c3c9dfcb695f311961f2f56e5', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: '99fb12375e2d660018276091bf8014b9bc9a672e', icon: danger, size: "small" }), this.errorMessage)), h("div", { key: '8fc6369015e8d04d1dec582007733eb5db6776f5', style: { display: 'none' } }, h("slot", { key: 'a808ecb0f4b2c00fca478cda5c0054c6aba29a8d' })))));
|
|
1044
1044
|
}
|
|
1045
1045
|
static get is() { return "pds-multiselect"; }
|
|
1046
1046
|
static get encapsulation() { return "shadow"; }
|
|
@@ -554,7 +554,7 @@ export class PdsPopover {
|
|
|
554
554
|
}, 16); // ~1 frame at 60fps
|
|
555
555
|
}
|
|
556
556
|
render() {
|
|
557
|
-
return (h(Host, { key: '
|
|
557
|
+
return (h(Host, { key: '760428c178ed92dfc35293181b7cef8fac3b4e26', id: this.componentId }, h("span", { key: 'd12a6a33dcf0fe6f3b61972ae8e5ac604263b2ac', class: "pds-popover__trigger-wrapper" }, h("slot", { key: 'd975e355a3acb9bc6d95202ec177f631bddb43bf', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), h("div", { key: 'f99ae2d97c75ed8ec63fbd0a859f8b7b9f78f0d2', class: "pds-popover__content-slot-wrapper" }, h("slot", { key: 'd1620c57d993496045fc3c47b55cdd0c1d07b36c', onSlotchange: this.handleContentSlotChange }))));
|
|
558
558
|
}
|
|
559
559
|
static get is() { return "pds-popover"; }
|
|
560
560
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { normalizeColorValue } from "../../utils/utils";
|
|
2
3
|
export class PdsProgress {
|
|
3
4
|
constructor() {
|
|
4
5
|
/**
|
|
@@ -18,7 +19,8 @@ export class PdsProgress {
|
|
|
18
19
|
this.showPercent = false;
|
|
19
20
|
}
|
|
20
21
|
render() {
|
|
21
|
-
|
|
22
|
+
const normalizedFillColor = normalizeColorValue(this.fillColor);
|
|
23
|
+
return (h(Host, { key: 'acca17890c316c056c61e4fad2917f0279126c39', class: this.animated ? { 'is-animated': this.animated } : '' }, h("div", { key: 'f8140ac930335bd67e3576a0f3739092d492d884', class: "pds-progress" }, h("label", { key: '66416d0472024ae14a6413e4e533f08970cbc857', class: "pds-progress__label", htmlFor: this.componentId }, this.label), h("progress", { key: '2bbbe4e1e3d186c2895401ac4b68dabac60a1df9', id: this.componentId, max: "100", style: normalizedFillColor ? { '--color-progress-fill': normalizedFillColor } : {}, value: this.percent })), this.showPercent && h("div", { key: '672956684adf944ea1de8769dbaba615c82a85b6', class: "pds-progress__percentage" }, this.percent, "%")));
|
|
22
24
|
}
|
|
23
25
|
static get is() { return "pds-progress"; }
|
|
24
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class PdsProperty {
|
|
|
10
10
|
this.icon = 'star';
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: '1ce4509363c6c40c76d7d6c17335721b348abf04', id: this.componentId }, h("pds-box", { key: '8c6f5dd171e0383640aa550ccbe1b20e74de5b07', "align-items": "center", gap: "xs" }, h("pds-icon", { key: '31c19e7ff0c466f2fe54ad2d2366929311f01364', icon: this.icon, size: "var(--pine-dimension-sm)", "aria-hidden": "true" }), h("slot", { key: 'b5ddb877ef6f3239992a892c7990bbd4fcfa77ae' }))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "pds-property"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -104,8 +104,7 @@ input:checked:hover {
|
|
|
104
104
|
border-color: var(--pine-color-accent-hover);
|
|
105
105
|
}
|
|
106
106
|
input:checked::after {
|
|
107
|
-
|
|
108
|
-
background: var(--pine-color-white);
|
|
107
|
+
background: var(--pine-color-text-primary);
|
|
109
108
|
border-radius: var(--pine-border-radius-full);
|
|
110
109
|
content: "";
|
|
111
110
|
display: block;
|
|
@@ -92,11 +92,11 @@ export class PdsRadio {
|
|
|
92
92
|
}
|
|
93
93
|
render() {
|
|
94
94
|
const renderLabelAndMessages = () => [
|
|
95
|
-
h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, h("input", { key: '
|
|
95
|
+
h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, h("input", { key: 'faa2d815e03f6b05108af0e7934101b2d5f71c59', "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: '22df3067667a7815e03dca45e4ef49d0e1caadcc', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)),
|
|
96
96
|
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: '
|
|
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: '6dac17ccd12d558d3b25ffb77c55d160a619d6ab', icon: danger, size: "small" }), this.errorMessage))
|
|
98
98
|
];
|
|
99
|
-
return (h(Host, { key: '
|
|
99
|
+
return (h(Host, { key: 'b464057b9e8d5de710183803c7d5e825316b3c3b', class: this.classNames() }, this.hasImage() && (h("div", { key: '692b2681221596cdf4bf6a21574edb2373d5127b', class: "pds-radio__image-container", part: "image-container" }, h("slot", { key: 'd68951b5b671863d582ad1a98543a51832966b36', name: "image", onSlotchange: () => (this._hasImage = this.hasImageSlot()) }))), this.hasImage() ? (h("div", { class: "pds-radio__content-wrapper" }, renderLabelAndMessages())) : (renderLabelAndMessages())));
|
|
100
100
|
}
|
|
101
101
|
static get is() { return "pds-radio"; }
|
|
102
102
|
static get encapsulation() { return "scoped"; }
|
|
@@ -160,13 +160,13 @@ export class PdsRadioGroup {
|
|
|
160
160
|
render() {
|
|
161
161
|
const gapValue = this.getGapValue();
|
|
162
162
|
const ariaDescribedBy = this.getAriaDescribedBy();
|
|
163
|
-
return (h(Host, { key: '
|
|
163
|
+
return (h(Host, { key: '048d4676df7c31a9ab08e4d4fc2b93866c1241fd', class: this.classNames(), id: this._groupId, role: "group", "aria-describedby": ariaDescribedBy, style: {
|
|
164
164
|
'--pds-radio-group-gap': gapValue,
|
|
165
|
-
} }, this.groupLabel && (h("div", { key: '
|
|
165
|
+
} }, this.groupLabel && (h("div", { key: '414363733d6053517bb63888fb9813af6554d4df', class: "pds-radio-group__label" }, this.groupLabel)), h("div", { key: 'd368dc474bf76f5cf7d633e59f929060fbf60b83', class: {
|
|
166
166
|
'pds-radio-group__radios': true,
|
|
167
167
|
'pds-radio-group__radios--row': this.direction === 'row',
|
|
168
168
|
'pds-radio-group__radios--column': this.direction === 'column',
|
|
169
|
-
} }, h("slot", { key: '
|
|
169
|
+
} }, h("slot", { key: '210e1ba8d276c2832017ea7bf3d03348aa46106a', onSlotchange: () => this.updateChildRadios() })), this.helperMessage && (h("div", { key: '06015935856640afdcddfcd8833a3a0659c58698', class: "pds-radio-group__message", id: messageId(this._groupId, 'helper') }, this.helperMessage)), this.errorMessage && (h("div", { key: '44256d9a050feda9651f90093a298a12d9e97250', class: "pds-radio-group__message pds-radio-group__message--error", id: messageId(this._groupId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '2b3aa1ffaa0f6a3ad0ce83d2becfcfdcc2f56fbc', icon: danger, size: "small" }), this.errorMessage))));
|
|
170
170
|
}
|
|
171
171
|
static get is() { return "pds-radio-group"; }
|
|
172
172
|
static get encapsulation() { return "scoped"; }
|
|
@@ -55,7 +55,7 @@ export class PdsRow {
|
|
|
55
55
|
})), (this.minHeight && {
|
|
56
56
|
'min-height': this.minHeight,
|
|
57
57
|
}));
|
|
58
|
-
return h(Host, { key: '
|
|
58
|
+
return h(Host, { key: '556bb00908d60df442b1fae17e28e54353f85f20', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
|
|
59
59
|
}
|
|
60
60
|
static get is() { return "pds-row"; }
|
|
61
61
|
static get originalStyleUrls() {
|
|
@@ -228,7 +228,7 @@ export class PdsSelect {
|
|
|
228
228
|
}
|
|
229
229
|
render() {
|
|
230
230
|
const hasAction = this.el.querySelector('[slot="action"]') !== null;
|
|
231
|
-
return (h(Host, { key: '
|
|
231
|
+
return (h(Host, { key: '6b240f3f91bcbdc52f019b0b6c57afda91abcbc9', "aria-disabled": this.disabled ? 'true' : null, class: this.classNames(), "has-action": hasAction && !this.hideLabel ? 'true' : null }, h("div", { key: '5bcacb3b861b69d4b2a16b917bad3d7c356eab13', class: "pds-select" }, !this.hideLabel && (h("div", { key: '4707b7b50a9e3144316f6c3e8b78767aee56553e', class: "pds-select__label-wrapper" }, h("label", { key: '89992c65158f26fef606b4f613baf139e9fe17c8', htmlFor: this.componentId }, h("span", { key: '8f05323646aca793a80310515b1cc6e0e8597736', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), hasAction && this.renderAction())), h("select", { key: '8381fe48cce4c6ec32ae2c0dd16bc3e188fbfda0', "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: 'c05f059e3c4e21d304ac1da08613d2b2d84aa342', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, h("slot", { key: 'b52f06405693803c0d2309e97f2611598cac7b70', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && h("pds-icon", { key: 'e1e7af5249a928402a3c5dfe418f695b4e1fa7d4', "aria-hidden": "true", class: "pds-select__select-icon", icon: enlarge }))));
|
|
232
232
|
}
|
|
233
233
|
static get is() { return "pds-select"; }
|
|
234
234
|
static get encapsulation() { return "shadow"; }
|
|
@@ -38,7 +38,7 @@ export class PdsSortableItem {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: '07dcd36e87b8fcfae7ff5f33a7bd8d44322fcbb3', class: "pds-sortable-item", id: this.componentId }, this.showHandle && (h("div", { key: 'cb2de083316c50beb63d700288c9091d01a99240', class: "pds-sortable-item__handle" }, h("pds-icon", { key: '90906fe69419f1a240aa976e7024872577d00bd3', "aria-hidden": "true", icon: handleIcon }))), h("slot", { key: 'a6969eb7d575919db12f98e3fc5d82708128be8e' }), this.enableActions && (h("div", { key: '5688ea0ead3c2adba9e21a7fa327adc6fdbc71b1', class: "pds-sortable-item__actions" }, h("slot", { key: 'f62b4ecf0c92edae854e9b3ca5e9da6a5051f77d', name: "sortable-item-actions" })))));
|
|
42
42
|
}
|
|
43
43
|
static get is() { return "pds-sortable-item"; }
|
|
44
44
|
static get encapsulation() { return "scoped"; }
|
|
@@ -57,7 +57,7 @@ export class PdsSortable {
|
|
|
57
57
|
this.sortableInstance = Sortable.create(this.el, sortableOptions);
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
|
-
return (h(Host, { key: '
|
|
60
|
+
return (h(Host, { key: '235879c63aa8e55ea819fd3bcdb30ef56dd2c0b3', class: this.classNames(), id: this.componentId }, h("slot", { key: '28cb6ef1a3b1f7de15f1f2728ffa625c879890dc' })));
|
|
61
61
|
}
|
|
62
62
|
static get is() { return "pds-sortable"; }
|
|
63
63
|
static get encapsulation() { return "scoped"; }
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
--sizing-input-toggle-size: calc(var(--pine-dimension-250) - (var(--pine-dimension-025) * 2));
|
|
3
3
|
--pine-dimension-025: 2px;
|
|
4
4
|
--spacing-message-inline: calc(var(--pine-dimension-450) + var(--pine-dimension-150));
|
|
5
|
-
--number-transition-timing:
|
|
5
|
+
--number-transition-timing: var(--pine-motion-duration-fast) ease-out;
|
|
6
6
|
align-items: flex-start;
|
|
7
7
|
color: var(--pine-color-text);
|
|
8
8
|
display: inline-flex;
|
|
@@ -82,9 +82,9 @@ export class PdsSwitch {
|
|
|
82
82
|
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
83
83
|
}
|
|
84
84
|
render() {
|
|
85
|
-
return (h(Host, { key: '
|
|
86
|
-
h("div", { key: '
|
|
87
|
-
h("div", { key: '
|
|
85
|
+
return (h(Host, { key: '0f7a97cc04485d5ead92f1d9e1deff176bef7859', class: this.switchClassNames(), "aria-disabled": this.disabled ? 'true' : null }, h("label", { key: 'bb8d0849e8ac5fd63d83f30d892bb195c7ed984c', htmlFor: this.componentId }, h("input", Object.assign({ key: 'd4f1c469ed61e5511fb4fef2b587b7320b7b8d10', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, checked: this.checked, class: "pds-switch__input", disabled: this.disabled, id: this.componentId, name: this.name ? this.name : this.componentId, onChange: this.onSwitchUpdate, required: this.required, type: "checkbox", value: this.value }, this.inheritedAttributes)), h("span", { key: 'a902c71c77d143e5930f18ab3f37d3442d9190e3', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
|
|
86
|
+
h("div", { key: '3802a9cc1068caa4955634be3c728f283dedab16', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
87
|
+
h("div", { key: 'be0d4094af7f9c59be32faf42aed585ec92fd730', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: 'f0f342b703fc5db7a4b03891ed5101e0ebcde47e', icon: danger, size: "small" }), this.errorMessage)));
|
|
88
88
|
}
|
|
89
89
|
static get is() { return "pds-switch"; }
|
|
90
90
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class PdsTableBody {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: '38b6b6121a4652e5b98f2ff22721e687ae401437', role: "rowgroup", part: "body" }, h("slot", { key: '7ce84ac64307b9e19a8b4b72efe3e8eab34f99bf' })));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "pds-table-body"; }
|
|
7
7
|
static get encapsulation() { return "shadow"; }
|
|
@@ -123,11 +123,11 @@ export class PdsTableCell {
|
|
|
123
123
|
return classNames.join(' ');
|
|
124
124
|
}
|
|
125
125
|
render() {
|
|
126
|
-
return (h(Host, { key: '
|
|
126
|
+
return (h(Host, { key: '1c37f341c8171d322d60647b25bfa92fdd9ea339', class: this.classNames(), role: "gridcell", part: "cell", style: this.tableRef &&
|
|
127
127
|
this.tableRef.fixedColumn &&
|
|
128
128
|
this.tableRef.selectable
|
|
129
129
|
? { '--fixed-cell-position': '40px' }
|
|
130
|
-
: {} }, h("slot", { key: '
|
|
130
|
+
: {} }, h("slot", { key: '339b2217df131c58d76258f581a53c0bd46cbd03' })));
|
|
131
131
|
}
|
|
132
132
|
static get is() { return "pds-table-cell"; }
|
|
133
133
|
static get encapsulation() { return "shadow"; }
|
|
@@ -174,7 +174,7 @@ export class PdsTableCell {
|
|
|
174
174
|
"optional": false,
|
|
175
175
|
"docs": {
|
|
176
176
|
"tags": [],
|
|
177
|
-
"text": "Truncates content to a max width and adds an ellipsis.\nWhen text overflows, a tooltip showing the full text will appear on hover/focus.\nNote:
|
|
177
|
+
"text": "Truncates content to a max width and adds an ellipsis.\nWhen text overflows, a tooltip showing the full text will appear on hover/focus.\nNote: While the content is overflowing, the cell receives tabindex=\"0\" so the\ntooltip can be reached by keyboard. Content that fits is left out of the tab order."
|
|
178
178
|
},
|
|
179
179
|
"getter": false,
|
|
180
180
|
"setter": false,
|