@pine-ds/core 3.5.2 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/index.d.ts +4 -0
- package/components/index.js +2 -0
- package/components/index.js.map +1 -1
- package/components/index2.js +3 -1
- package/components/index2.js.map +1 -1
- package/components/mock-pds-modal.js +9 -4
- package/components/mock-pds-modal.js.map +1 -1
- package/components/pds-avatar.js +1 -1
- package/components/pds-box2.js +132 -2
- package/components/pds-box2.js.map +1 -1
- package/components/pds-button2.js +58 -6
- package/components/pds-button2.js.map +1 -1
- package/components/pds-checkbox2.js +1 -1
- package/components/pds-combobox.js +349 -39
- package/components/pds-combobox.js.map +1 -1
- package/components/pds-copytext.js +1 -1
- package/components/pds-dropdown-menu-separator.js +1 -1
- package/components/pds-dropdown-menu-separator.js.map +1 -1
- package/components/pds-filter.d.ts +11 -0
- package/components/pds-filter.js +518 -0
- package/components/pds-filter.js.map +1 -0
- package/components/pds-filters.d.ts +11 -0
- package/components/pds-filters.js +38 -0
- package/components/pds-filters.js.map +1 -0
- package/components/pds-image.js +2 -2
- package/components/pds-input.js +2 -2
- package/components/pds-link2.js +2 -2
- package/components/pds-loader2.js +1 -1
- package/components/pds-modal-content.js +128 -11
- package/components/pds-modal-content.js.map +1 -1
- package/components/pds-modal-footer.js +1 -1
- package/components/pds-modal-header.js +1 -1
- package/components/pds-modal.js +13 -3
- package/components/pds-modal.js.map +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.js +4 -4
- package/components/pds-row.js +1 -1
- package/components/pds-select.js +2 -2
- package/components/pds-sortable-item.js +1 -1
- package/components/pds-sortable.js +1 -1
- package/components/pds-switch.js +4 -4
- package/components/pds-tab.js +4 -4
- package/components/pds-tab.js.map +1 -1
- package/components/pds-table-body.js +1 -1
- package/components/pds-table-cell2.js +2 -2
- package/components/pds-table-head-cell2.js +2 -2
- 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-tabs.js.map +1 -1
- package/components/pds-text2.js +1 -1
- package/components/pds-textarea.js +112 -8
- package/components/pds-textarea.js.map +1 -1
- package/components/pds-toast.js +3 -3
- package/components/pds-tooltip.js +2 -2
- package/dist/cjs/{index-DVaLegMK.js → index-CTirFLR-.js} +6 -2
- package/dist/cjs/{index-DVaLegMK.js.map → index-CTirFLR-.js.map} +1 -1
- package/dist/cjs/{index-g-uSeICs.js → index-DDTyvZD7.js} +5 -2
- package/dist/cjs/index-DDTyvZD7.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mock-pds-modal.cjs.entry.js +9 -5
- package/dist/cjs/mock-pds-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/mock-pds-modal.entry.cjs.js.map +1 -1
- 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 +68 -3
- package/dist/cjs/pds-box.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-box.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-button.cjs.entry.js +58 -6
- package/dist/cjs/pds-button.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-button.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/pds-chip.cjs.entry.js +2 -2
- package/dist/cjs/pds-combobox.cjs.entry.js +349 -39
- package/dist/cjs/pds-combobox.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-combobox.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-copytext.cjs.entry.js +2 -2
- package/dist/cjs/pds-divider.cjs.entry.js +1 -1
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +2 -2
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-dropdown-menu-separator.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +1 -1
- package/dist/cjs/pds-filter.cjs.entry.js +488 -0
- package/dist/cjs/pds-filter.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-filter.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-filters.cjs.entry.js +20 -0
- package/dist/cjs/pds-filters.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-filters.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-icon.cjs.entry.js +1 -1
- package/dist/cjs/pds-image.cjs.entry.js +3 -3
- package/dist/cjs/pds-input.cjs.entry.js +3 -3
- package/dist/cjs/pds-link.cjs.entry.js +4 -4
- package/dist/cjs/pds-loader.cjs.entry.js +2 -2
- package/dist/cjs/pds-modal-content.cjs.entry.js +129 -12
- package/dist/cjs/pds-modal-content.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-modal-content.entry.cjs.js.map +1 -1
- 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 +13 -4
- package/dist/cjs/pds-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-popover.cjs.entry.js +2 -2
- package/dist/cjs/pds-progress.cjs.entry.js +2 -2
- package/dist/cjs/pds-property.cjs.entry.js +2 -2
- package/dist/cjs/pds-radio.cjs.entry.js +5 -5
- 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 +5 -5
- package/dist/cjs/pds-tab.cjs.entry.js +5 -5
- package/dist/cjs/pds-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-tab.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-table-body.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-cell.cjs.entry.js +3 -3
- 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-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-tabs.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-text.cjs.entry.js +2 -2
- package/dist/cjs/pds-textarea.cjs.entry.js +110 -8
- package/dist/cjs/pds-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-textarea.entry.cjs.js.map +1 -1
- 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/collection/collection-manifest.json +2 -0
- package/dist/collection/components/pds-box/pds-box.css +1325 -0
- package/dist/collection/components/pds-box/pds-box.js +1913 -148
- package/dist/collection/components/pds-box/pds-box.js.map +1 -1
- package/dist/collection/components/pds-button/pds-button.css +23 -0
- package/dist/collection/components/pds-button/pds-button.js +67 -6
- package/dist/collection/components/pds-button/pds-button.js.map +1 -1
- package/dist/collection/components/pds-button/stories/pds-button.stories.js +28 -1
- package/dist/collection/components/pds-combobox/pds-combobox.css +39 -1
- package/dist/collection/components/pds-combobox/pds-combobox.js +348 -38
- package/dist/collection/components/pds-combobox/pds-combobox.js.map +1 -1
- package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +103 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.css +4 -1
- package/dist/collection/components/pds-filters/pds-filter/filter-interface.js +2 -0
- package/dist/collection/components/pds-filters/pds-filter/filter-interface.js.map +1 -0
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.css +193 -0
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +732 -0
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.js.map +1 -0
- package/dist/collection/components/pds-filters/pds-filter/stories/pds-filter.stories.js +93 -0
- package/dist/collection/components/pds-filters/pds-filters.css +10 -0
- package/dist/collection/components/pds-filters/pds-filters.js +45 -0
- package/dist/collection/components/pds-filters/pds-filters.js.map +1 -0
- package/dist/collection/components/pds-filters/stories/pds-filters.stories.js +40 -0
- package/dist/collection/components/pds-image/pds-image.js +2 -2
- package/dist/collection/components/pds-input/pds-input.js +1 -1
- 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.css +4 -6
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +128 -11
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js.map +1 -1
- 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 +42 -1
- package/dist/collection/components/pds-modal/pds-modal.js +34 -2
- package/dist/collection/components/pds-modal/pds-modal.js.map +1 -1
- package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +245 -0
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +30 -3
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js.map +1 -1
- package/dist/collection/components/pds-popover/pds-popover.js +1 -1
- package/dist/collection/components/pds-progress/pds-progress.js +1 -1
- package/dist/collection/components/pds-property/pds-property.js +1 -1
- package/dist/collection/components/pds-radio/pds-radio.js +3 -3
- package/dist/collection/components/pds-row/pds-row.js +1 -1
- package/dist/collection/components/pds-select/pds-select.js +1 -1
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
- package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
- package/dist/collection/components/pds-switch/pds-switch.js +3 -3
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +2 -2
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.css +3 -0
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +3 -3
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js +2 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js.map +1 -1
- package/dist/collection/components/pds-text/pds-text.js +1 -1
- package/dist/collection/components/pds-textarea/pds-textarea.css +51 -11
- package/dist/collection/components/pds-textarea/pds-textarea.js +127 -4
- package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -1
- package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +13 -0
- package/dist/collection/components/pds-toast/pds-toast.js +3 -3
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
- package/dist/docs.json +4440 -415
- package/dist/esm/{index-BVCWKPy3.js → index-Bf1dou5H.js} +5 -2
- package/dist/esm/index-Bf1dou5H.js.map +1 -0
- package/dist/esm/{index-DrJ5r5Pu.js → index-D4MkIUXU.js} +5 -3
- package/dist/{esm-es5/index-DrJ5r5Pu.js.map → esm/index-D4MkIUXU.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mock-pds-modal.entry.js +9 -5
- package/dist/esm/mock-pds-modal.entry.js.map +1 -1
- 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 +68 -3
- package/dist/esm/pds-box.entry.js.map +1 -1
- package/dist/esm/pds-button.entry.js +58 -6
- package/dist/esm/pds-button.entry.js.map +1 -1
- package/dist/esm/pds-checkbox.entry.js +2 -2
- package/dist/esm/pds-chip.entry.js +2 -2
- package/dist/esm/pds-combobox.entry.js +349 -39
- package/dist/esm/pds-combobox.entry.js.map +1 -1
- package/dist/esm/pds-copytext.entry.js +2 -2
- package/dist/esm/pds-divider.entry.js +1 -1
- package/dist/esm/pds-dropdown-menu-item.entry.js +1 -1
- package/dist/esm/pds-dropdown-menu-separator.entry.js +2 -2
- package/dist/esm/pds-dropdown-menu-separator.entry.js.map +1 -1
- package/dist/esm/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm/pds-filter.entry.js +486 -0
- package/dist/esm/pds-filter.entry.js.map +1 -0
- package/dist/esm/pds-filters.entry.js +18 -0
- package/dist/esm/pds-filters.entry.js.map +1 -0
- package/dist/esm/pds-icon.entry.js +1 -1
- package/dist/esm/pds-image.entry.js +3 -3
- package/dist/esm/pds-input.entry.js +3 -3
- package/dist/esm/pds-link.entry.js +4 -4
- package/dist/esm/pds-loader.entry.js +2 -2
- package/dist/esm/pds-modal-content.entry.js +129 -12
- package/dist/esm/pds-modal-content.entry.js.map +1 -1
- 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 +13 -4
- package/dist/esm/pds-modal.entry.js.map +1 -1
- package/dist/esm/pds-popover.entry.js +2 -2
- package/dist/esm/pds-progress.entry.js +2 -2
- package/dist/esm/pds-property.entry.js +2 -2
- package/dist/esm/pds-radio.entry.js +5 -5
- 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 +5 -5
- package/dist/esm/pds-tab.entry.js +5 -5
- package/dist/esm/pds-tab.entry.js.map +1 -1
- package/dist/esm/pds-table-body.entry.js +2 -2
- package/dist/esm/pds-table-cell.entry.js +3 -3
- 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-tabs.entry.js.map +1 -1
- package/dist/esm/pds-text.entry.js +2 -2
- package/dist/esm/pds-textarea.entry.js +110 -8
- package/dist/esm/pds-textarea.entry.js.map +1 -1
- 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-es5/{index-BVCWKPy3.js → index-Bf1dou5H.js} +2 -2
- package/dist/esm-es5/index-Bf1dou5H.js.map +1 -0
- package/dist/esm-es5/index-D4MkIUXU.js +2 -0
- package/dist/{esm/index-DrJ5r5Pu.js.map → esm-es5/index-D4MkIUXU.js.map} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js.map +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-box.entry.js.map +1 -1
- package/dist/esm-es5/pds-button.entry.js +1 -1
- package/dist/esm-es5/pds-button.entry.js.map +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-combobox.entry.js.map +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-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-separator.entry.js.map +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm-es5/pds-filter.entry.js +2 -0
- package/dist/esm-es5/pds-filter.entry.js.map +1 -0
- package/dist/esm-es5/pds-filters.entry.js +2 -0
- package/dist/esm-es5/pds-filters.entry.js.map +1 -0
- 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-content.entry.js.map +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-modal.entry.js.map +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.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-tab.entry.js.map +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-tabs.entry.js.map +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-textarea.entry.js.map +1 -1
- package/dist/esm-es5/pds-toast.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/pine-core/index.esm.js +1 -1
- package/dist/pine-core/mock-pds-modal.entry.esm.js.map +1 -1
- package/dist/pine-core/{p-fd091234.system.entry.js → p-0075bbbe.system.entry.js} +2 -2
- package/dist/pine-core/p-07e129db.entry.js +2 -0
- package/dist/pine-core/{p-8999b63d.system.entry.js → p-0975b749.system.entry.js} +2 -2
- package/dist/pine-core/{p-02326ac3.entry.js → p-0befa8f0.entry.js} +2 -2
- package/dist/pine-core/p-0d18171c.system.entry.js +2 -0
- package/dist/pine-core/p-0d18171c.system.entry.js.map +1 -0
- package/dist/pine-core/p-1009009c.entry.js +2 -0
- package/dist/pine-core/p-1009009c.entry.js.map +1 -0
- package/dist/pine-core/{p-8722865f.system.entry.js → p-1773aeac.system.entry.js} +2 -2
- package/dist/pine-core/{p-e2887e78.entry.js → p-1b9d4482.entry.js} +2 -2
- package/dist/pine-core/p-1c32ffb3.entry.js +2 -0
- package/dist/pine-core/p-1c32ffb3.entry.js.map +1 -0
- package/dist/pine-core/{p-7a95a90f.system.entry.js → p-2597bc59.system.entry.js} +2 -2
- package/dist/pine-core/{p-5a709348.entry.js → p-25cb810d.entry.js} +2 -2
- package/dist/pine-core/{p-a1b51557.system.entry.js → p-25cf2860.system.entry.js} +2 -2
- package/dist/pine-core/{p-6f4a6d0b.entry.js → p-265372d3.entry.js} +2 -2
- package/dist/pine-core/p-29b2af94.entry.js +2 -0
- package/dist/pine-core/{p-44087d1c.entry.js.map → p-29b2af94.entry.js.map} +1 -1
- package/dist/pine-core/p-2b102034.system.entry.js +2 -0
- package/dist/pine-core/p-2b102034.system.entry.js.map +1 -0
- package/dist/pine-core/p-2b12bc55.system.entry.js +2 -0
- package/dist/pine-core/{p-297afc49.system.entry.js → p-2b452883.system.entry.js} +2 -2
- package/dist/pine-core/p-2efc646c.system.entry.js +2 -0
- package/dist/pine-core/{p-ecb9edf8.entry.js → p-2fb6f9d5.entry.js} +2 -2
- package/dist/pine-core/p-2fd7f74e.entry.js +2 -0
- package/dist/pine-core/{p-39488f2c.system.entry.js → p-302849cf.system.entry.js} +2 -2
- package/dist/pine-core/{p-51d83489.system.entry.js → p-307f415a.system.entry.js} +2 -2
- package/dist/pine-core/{p-651861ff.entry.js → p-30e8c3ea.entry.js} +2 -2
- package/dist/pine-core/p-30e8c3ea.entry.js.map +1 -0
- package/dist/pine-core/p-31f6fcc1.entry.js +2 -0
- package/dist/pine-core/p-31f6fcc1.entry.js.map +1 -0
- package/dist/pine-core/p-378df5eb.system.entry.js +2 -0
- package/dist/pine-core/p-39648ce2.entry.js +2 -0
- package/dist/pine-core/p-39648ce2.entry.js.map +1 -0
- package/dist/pine-core/p-3b20aa93.system.entry.js +2 -0
- package/dist/pine-core/p-3b20aa93.system.entry.js.map +1 -0
- package/dist/pine-core/{p-50c9e865.entry.js → p-3e7933bf.entry.js} +2 -2
- package/dist/pine-core/{p-11d4036e.entry.js → p-41e2fe3a.entry.js} +2 -2
- package/dist/pine-core/p-449ebe39.system.entry.js +2 -0
- package/dist/pine-core/{p-023d8b71.system.entry.js → p-4534e8cc.system.entry.js} +2 -2
- package/dist/pine-core/{p-52d37cc1.entry.js → p-46820152.entry.js} +2 -2
- package/dist/pine-core/{p-ba187a35.entry.js → p-4b3a8cab.entry.js} +2 -2
- package/dist/pine-core/{p-da367b5e.system.entry.js → p-4c8bebd8.system.entry.js} +2 -2
- package/dist/pine-core/{p-503cab1f.entry.js → p-4dda1edf.entry.js} +2 -2
- package/dist/pine-core/p-4e55730d.entry.js +2 -0
- package/dist/pine-core/p-4e55730d.entry.js.map +1 -0
- package/dist/pine-core/{p-5e8badb9.entry.js → p-559b4ebc.entry.js} +2 -2
- package/dist/pine-core/{p-c13ef6a7.system.entry.js → p-55d06d0a.system.entry.js} +3 -3
- package/dist/pine-core/{p-25190921.entry.js → p-56f6f106.entry.js} +2 -2
- package/dist/pine-core/{p-075eecf9.entry.js → p-5ac7af9e.entry.js} +2 -2
- package/dist/pine-core/p-5cc0244d.system.entry.js +2 -0
- package/dist/pine-core/p-5cc0244d.system.entry.js.map +1 -0
- package/dist/pine-core/{p-dfc5ab34.system.entry.js → p-72d87dc6.system.entry.js} +2 -2
- package/dist/pine-core/{p-b2b1b7a9.system.entry.js → p-73a2e028.system.entry.js} +2 -2
- package/dist/pine-core/{p-4bbf3e31.entry.js → p-74f03e75.entry.js} +2 -2
- package/dist/pine-core/p-786967e8.entry.js +2 -0
- package/dist/pine-core/{p-0de9f8da.system.entry.js → p-7b0517e5.system.entry.js} +2 -2
- package/dist/pine-core/p-7b66bc50.entry.js +3 -0
- package/dist/pine-core/p-7b66bc50.entry.js.map +1 -0
- package/dist/pine-core/p-7eb22880.entry.js +2 -0
- package/dist/pine-core/p-7eb22880.entry.js.map +1 -0
- package/dist/pine-core/{p-464dd476.entry.js → p-8501429f.entry.js} +2 -2
- package/dist/pine-core/p-875d5d5a.system.entry.js +2 -0
- package/dist/pine-core/{p-4deb7b8c.entry.js → p-896e2f1b.entry.js} +2 -2
- package/dist/pine-core/{p-72b05928.system.entry.js → p-8ded79aa.system.entry.js} +2 -2
- package/dist/pine-core/{p-e89cb1f2.system.entry.js → p-8f69dd71.system.entry.js} +2 -2
- package/dist/pine-core/{p-2e19f167.system.entry.js → p-94fe15b0.system.entry.js} +2 -2
- package/dist/pine-core/p-95aee0b1.entry.js +2 -0
- package/dist/pine-core/p-95aee0b1.entry.js.map +1 -0
- package/dist/pine-core/p-96c27dba.entry.js +2 -0
- package/dist/pine-core/p-96c27dba.entry.js.map +1 -0
- package/dist/pine-core/p-B02VgXkx.system.js.map +1 -0
- package/dist/pine-core/{p-Kj_j7PHx.system.js.map → p-B57Bybw-.system.js.map} +1 -1
- package/dist/pine-core/{p-B1fiSdbt.system.js.map → p-BEgEi4w5.system.js.map} +1 -1
- package/dist/pine-core/{p-CJT--ZXC.system.js.map → p-BFiM1S8V.system.js.map} +1 -1
- package/dist/pine-core/{p-_E9ZEzfO.system.js.map → p-BIjeWHX_.system.js.map} +1 -1
- package/dist/pine-core/{p-BVKCNX0X.system.js.map → p-BJhtHwq5.system.js.map} +1 -1
- package/dist/pine-core/{p-EYhpJx2s.system.js.map → p-BJjdD3yf.system.js.map} +1 -1
- package/dist/pine-core/p-BPjnTOEL.system.js +2 -0
- package/dist/pine-core/{p-De9tROL-.system.js.map → p-BPjnTOEL.system.js.map} +1 -1
- package/dist/pine-core/{p-CCQUgOoR.system.js.map → p-BQFgzIQT.system.js.map} +1 -1
- package/dist/pine-core/p-BSkbMuB5.system.js +2 -0
- package/dist/pine-core/{p-BEn3hirk.system.js.map → p-BSkbMuB5.system.js.map} +1 -1
- package/dist/pine-core/{p-BVCWKPy3.js → p-Bf1dou5H.js} +2 -2
- package/dist/pine-core/p-Bf1dou5H.js.map +1 -0
- package/dist/pine-core/p-BigOVPun.system.js.map +1 -0
- package/dist/pine-core/{p-CcXaBX2A.system.js.map → p-BmFGXXkm.system.js.map} +1 -1
- package/dist/pine-core/p-ByzULH8m.system.js.map +1 -0
- package/dist/pine-core/{p-CE6b_LzB.system.js.map → p-C3iAHQC6.system.js.map} +1 -1
- package/dist/pine-core/{p-ACQU83St.system.js.map → p-CCQd5PVN.system.js.map} +1 -1
- package/dist/pine-core/{p-ChslVme6.system.js.map → p-CG2PKUWT.system.js.map} +1 -1
- package/dist/pine-core/{p-CQ8f8GnD.system.js.map → p-CHVzHNgU.system.js.map} +1 -1
- package/dist/pine-core/{p-Dh7jcLgJ.system.js.map → p-COwpA8ab.system.js.map} +1 -1
- package/dist/pine-core/p-CV0Lw9gs.system.js.map +1 -0
- package/dist/pine-core/p-CZqgW7e3.system.js.map +1 -0
- package/dist/pine-core/{p-pQqXEKPh.system.js.map → p-Cc1q-FuD.system.js.map} +1 -1
- package/dist/pine-core/{p-CWdEolqa.system.js.map → p-Cl47ROcT.system.js.map} +1 -1
- package/dist/pine-core/{p-0KTU2Jt-.system.js.map → p-CnPN6prI.system.js.map} +1 -1
- package/dist/pine-core/{p-B1FQkx7R.system.js.map → p-Ctdx1tCG.system.js.map} +1 -1
- package/dist/pine-core/p-CwNRZQss.system.js.map +1 -0
- package/dist/pine-core/{p-B_C-mRjx.system.js → p-Cxvdulqq.system.js} +2 -2
- package/dist/pine-core/p-Cxvdulqq.system.js.map +1 -0
- package/dist/pine-core/p-D3SrjYeb.system.js.map +1 -0
- package/dist/pine-core/p-D4MkIUXU.js +2 -0
- package/dist/pine-core/{p-DrJ5r5Pu.js.map → p-D4MkIUXU.js.map} +1 -1
- package/dist/pine-core/{p-MBv7PsKc.system.js.map → p-D52TGCLt.system.js.map} +1 -1
- package/dist/pine-core/p-D7B3vOdC.system.js.map +1 -0
- package/dist/pine-core/{p-0TIvNV5c.system.js.map → p-D9veIL-g.system.js.map} +1 -1
- package/dist/pine-core/{p-D9_z2w3q.system.js.map → p-DGFR-x7P.system.js.map} +1 -1
- package/dist/pine-core/p-DeR0sSWy.system.js.map +1 -0
- package/dist/pine-core/{p-BRygGju8.system.js.map → p-Df597YUK.system.js.map} +1 -1
- package/dist/pine-core/{p-Df_3qA_L.system.js.map → p-DgE9ds9o.system.js.map} +1 -1
- package/dist/pine-core/{p-CLoi4eKt.system.js.map → p-DmWU0f_O.system.js.map} +1 -1
- package/dist/pine-core/{p-DYb5Y47j.system.js.map → p-Dq7Wu9rr.system.js.map} +1 -1
- package/dist/pine-core/p-Dw7zXw_6.system.js.map +1 -0
- package/dist/pine-core/{p-CpdNWpfd.system.js.map → p-Ek6vvXfI.system.js.map} +1 -1
- package/dist/pine-core/{p-C5Y492i0.system.js.map → p-M-zMP2QX.system.js.map} +1 -1
- package/dist/pine-core/{p-IhWWc2L_.system.js.map → p-WO5h6NYA.system.js.map} +1 -1
- package/dist/pine-core/p-WWWd_vEd.system.js +2 -0
- package/dist/pine-core/p-WWWd_vEd.system.js.map +1 -0
- package/dist/pine-core/{p-D05FrqXr.system.js.map → p-X5M4eshC.system.js.map} +1 -1
- package/dist/pine-core/{p-m6UZWRsP.system.js.map → p-Z5rOSkoA.system.js.map} +1 -1
- package/dist/pine-core/{p-72053224.entry.js → p-a2cb65df.entry.js} +3 -3
- package/dist/pine-core/{p-c8122bea.entry.js → p-a54d6a53.entry.js} +2 -2
- package/dist/pine-core/{p-a04556e4.system.entry.js → p-a5cf0088.system.entry.js} +2 -2
- package/dist/pine-core/p-a645818a.entry.js +2 -0
- package/dist/pine-core/{p-f583e5d4.entry.js → p-a9cfaa1f.entry.js} +2 -2
- package/dist/pine-core/{p-14a52961.system.entry.js → p-aa2782b9.system.entry.js} +2 -2
- package/dist/pine-core/{p-f55b9f90.system.entry.js → p-ab4307c7.system.entry.js} +2 -2
- package/dist/pine-core/{p-349a8869.entry.js → p-af56cb57.entry.js} +2 -2
- package/dist/pine-core/{p-8d7abc83.entry.js → p-b32d34d0.entry.js} +2 -2
- package/dist/pine-core/{p-00616fc9.entry.js → p-b378ca03.entry.js} +2 -2
- package/dist/pine-core/p-b669e1d9.entry.js +2 -0
- package/dist/pine-core/p-b699a14f.system.entry.js +2 -0
- package/dist/pine-core/p-b699a14f.system.entry.js.map +1 -0
- package/dist/pine-core/p-bc2fecd4.system.entry.js +2 -0
- package/dist/pine-core/p-bc2fecd4.system.entry.js.map +1 -0
- package/dist/pine-core/{p-e3fb0bc2.system.entry.js → p-bc637bed.system.entry.js} +2 -2
- package/dist/pine-core/{p-b6ea3332.entry.js → p-be5ef841.entry.js} +2 -2
- package/dist/pine-core/{p-54183d70.system.entry.js → p-c0601420.system.entry.js} +2 -2
- package/dist/pine-core/p-c2d2fe64.system.entry.js +2 -0
- package/dist/pine-core/p-c3f84df8.system.entry.js +2 -0
- package/dist/pine-core/p-c3f84df8.system.entry.js.map +1 -0
- package/dist/pine-core/p-c44d3551.entry.js +2 -0
- package/dist/pine-core/{p-e8d76117.entry.js → p-c55fc47e.entry.js} +2 -2
- package/dist/pine-core/{p-5da82e8c.system.entry.js → p-c63e7909.system.entry.js} +2 -2
- package/dist/pine-core/p-d325287b.entry.js +2 -0
- package/dist/pine-core/p-d325287b.entry.js.map +1 -0
- package/dist/pine-core/p-d52d96b5.system.entry.js +4 -0
- package/dist/pine-core/p-d52d96b5.system.entry.js.map +1 -0
- package/dist/pine-core/{p-884b9ae6.system.entry.js → p-d5c63517.system.entry.js} +2 -2
- package/dist/pine-core/p-d65d252d.entry.js +2 -0
- package/dist/pine-core/p-d65d252d.entry.js.map +1 -0
- package/dist/pine-core/p-db12273e.system.entry.js +2 -0
- package/dist/pine-core/{p-92c52409.system.entry.js → p-dbe41087.system.entry.js} +2 -2
- package/dist/pine-core/{p-deb8a499.system.entry.js → p-e03b7f4a.system.entry.js} +2 -2
- package/dist/pine-core/{p-6db1e029.system.entry.js → p-ee583234.system.entry.js} +2 -2
- package/dist/pine-core/{p-0066d249.entry.js → p-f5d78141.entry.js} +2 -2
- package/dist/pine-core/p-f61ee383.system.entry.js +2 -0
- package/dist/pine-core/p-f61ee383.system.entry.js.map +1 -0
- package/dist/pine-core/{p-98fe56d9.entry.js → p-f6b269ac.entry.js} +2 -2
- package/dist/pine-core/p-f70aef6e.system.entry.js +2 -0
- package/dist/pine-core/p-f70aef6e.system.entry.js.map +1 -0
- package/dist/pine-core/{p-52af1890.system.entry.js → p-f911dde3.system.entry.js} +2 -2
- package/dist/pine-core/{p-7cb4f0de.entry.js → p-fd3d548f.entry.js} +2 -2
- package/dist/pine-core/{p-ac37cf0d.entry.js → p-fddf82f8.entry.js} +2 -2
- package/dist/pine-core/p-fdf22be1.system.entry.js +2 -0
- package/dist/pine-core/p-fdf22be1.system.entry.js.map +1 -0
- package/dist/pine-core/p-fe7ece91.system.entry.js +2 -0
- package/dist/pine-core/p-fe7ece91.system.entry.js.map +1 -0
- package/dist/pine-core/{p-DHmJZxQk.system.js.map → p-iM8w34Dq.system.js.map} +1 -1
- package/dist/pine-core/{p-2kXtbFXu.system.js.map → p-iazk4jjL.system.js.map} +1 -1
- package/dist/pine-core/{p-CqzGa2j0.system.js.map → p-k9JOparb.system.js.map} +1 -1
- package/dist/pine-core/{p-CgyVIfOY.system.js.map → p-kbAzjMDU.system.js.map} +1 -1
- package/dist/pine-core/{p-B7S-9dbT.system.js.map → p-kcOuXqWo.system.js.map} +1 -1
- package/dist/pine-core/{p-IG5YumI3.system.js.map → p-nawkAoxk.system.js.map} +1 -1
- package/dist/pine-core/p-oDk-2Jyq.system.js.map +1 -0
- package/dist/pine-core/p-wlxYjeBe.system.js.map +1 -0
- package/dist/pine-core/{p-CqK-uhv8.system.js.map → p-yaM1kuaC.system.js.map} +1 -1
- package/dist/pine-core/pds-box.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-button.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-combobox.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-dropdown-menu-separator.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-filter.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-filters.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-modal-content.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-modal.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-tab.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-tabs.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-textarea.entry.esm.js.map +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-box/pds-box.d.ts +315 -0
- package/dist/types/components/pds-button/pds-button.d.ts +5 -1
- package/dist/types/components/pds-combobox/pds-combobox.d.ts +28 -3
- package/dist/types/components/pds-filters/pds-filter/filter-interface.d.ts +19 -0
- package/dist/types/components/pds-filters/pds-filter/pds-filter.d.ts +133 -0
- package/dist/types/components/pds-filters/pds-filters.d.ts +11 -0
- package/dist/types/components/pds-modal/pds-modal-content/pds-modal-content.d.ts +18 -1
- package/dist/types/components/pds-modal/pds-modal.d.ts +5 -0
- package/dist/types/components/pds-modal/test/mock-pds-modal.d.ts +5 -0
- package/dist/types/components/pds-tabs/pds-tabs.d.ts +1 -0
- package/dist/types/components/pds-textarea/pds-textarea.d.ts +20 -0
- package/dist/types/components.d.ts +793 -4
- package/hydrate/index.js +1381 -112
- package/hydrate/index.mjs +1381 -112
- package/package.json +2 -2
- package/dist/cjs/index-g-uSeICs.js.map +0 -1
- package/dist/esm/index-BVCWKPy3.js.map +0 -1
- package/dist/esm-es5/index-BVCWKPy3.js.map +0 -1
- package/dist/esm-es5/index-DrJ5r5Pu.js +0 -2
- package/dist/pine-core/p-007b61e9.system.entry.js +0 -2
- package/dist/pine-core/p-007b61e9.system.entry.js.map +0 -1
- package/dist/pine-core/p-0485aa93.system.entry.js +0 -2
- package/dist/pine-core/p-0485aa93.system.entry.js.map +0 -1
- package/dist/pine-core/p-051ff780.system.entry.js +0 -2
- package/dist/pine-core/p-051ff780.system.entry.js.map +0 -1
- package/dist/pine-core/p-2186e5d4.system.entry.js +0 -2
- package/dist/pine-core/p-2186e5d4.system.entry.js.map +0 -1
- package/dist/pine-core/p-232a2043.entry.js +0 -2
- package/dist/pine-core/p-44087d1c.entry.js +0 -2
- package/dist/pine-core/p-47670150.entry.js +0 -3
- package/dist/pine-core/p-47670150.entry.js.map +0 -1
- package/dist/pine-core/p-54061a33.entry.js +0 -2
- package/dist/pine-core/p-54061a33.entry.js.map +0 -1
- package/dist/pine-core/p-5708f95a.entry.js +0 -2
- package/dist/pine-core/p-651861ff.entry.js.map +0 -1
- package/dist/pine-core/p-66b10d29.entry.js +0 -2
- package/dist/pine-core/p-68b5665a.entry.js +0 -2
- package/dist/pine-core/p-68b5665a.entry.js.map +0 -1
- package/dist/pine-core/p-7004d1ea.system.entry.js +0 -2
- package/dist/pine-core/p-71169b66.system.entry.js +0 -2
- package/dist/pine-core/p-71169b66.system.entry.js.map +0 -1
- package/dist/pine-core/p-73158adf.system.entry.js +0 -2
- package/dist/pine-core/p-77336705.entry.js +0 -2
- package/dist/pine-core/p-77336705.entry.js.map +0 -1
- package/dist/pine-core/p-8ab7f0d7.system.entry.js +0 -4
- package/dist/pine-core/p-8ab7f0d7.system.entry.js.map +0 -1
- package/dist/pine-core/p-96a89cd5.system.entry.js +0 -2
- package/dist/pine-core/p-96a89cd5.system.entry.js.map +0 -1
- package/dist/pine-core/p-BEn3hirk.system.js +0 -2
- package/dist/pine-core/p-BGbUqsWH.system.js +0 -2
- package/dist/pine-core/p-BGbUqsWH.system.js.map +0 -1
- package/dist/pine-core/p-BKFboaI5.system.js.map +0 -1
- package/dist/pine-core/p-BVCWKPy3.js.map +0 -1
- package/dist/pine-core/p-B_C-mRjx.system.js.map +0 -1
- package/dist/pine-core/p-Bv5PJxD8.system.js.map +0 -1
- package/dist/pine-core/p-CD_nPb2F.system.js.map +0 -1
- package/dist/pine-core/p-Cmzqpibo.system.js.map +0 -1
- package/dist/pine-core/p-DJekRkSL.system.js.map +0 -1
- package/dist/pine-core/p-DNYl_6t_.system.js.map +0 -1
- package/dist/pine-core/p-DXuK7cEc.system.js.map +0 -1
- package/dist/pine-core/p-De9tROL-.system.js +0 -2
- package/dist/pine-core/p-DrJ5r5Pu.js +0 -2
- package/dist/pine-core/p-Dt10r3RZ.system.js.map +0 -1
- package/dist/pine-core/p-IIl2cTlj.system.js.map +0 -1
- package/dist/pine-core/p-UsEwlBJ0.system.js.map +0 -1
- package/dist/pine-core/p-a24c46e4.entry.js +0 -2
- package/dist/pine-core/p-a24c46e4.entry.js.map +0 -1
- package/dist/pine-core/p-a54f1d9e.entry.js +0 -2
- package/dist/pine-core/p-a54f1d9e.entry.js.map +0 -1
- package/dist/pine-core/p-aa645f28.system.entry.js +0 -2
- package/dist/pine-core/p-aa645f28.system.entry.js.map +0 -1
- package/dist/pine-core/p-bb8ef74a.system.entry.js +0 -2
- package/dist/pine-core/p-be939cb0.entry.js +0 -2
- package/dist/pine-core/p-c1099665.system.entry.js +0 -2
- package/dist/pine-core/p-c2ffb466.system.entry.js +0 -2
- package/dist/pine-core/p-c4d6fe50.system.entry.js +0 -2
- package/dist/pine-core/p-c4d6fe50.system.entry.js.map +0 -1
- package/dist/pine-core/p-c6badcf8.entry.js +0 -2
- package/dist/pine-core/p-c6badcf8.entry.js.map +0 -1
- package/dist/pine-core/p-cd785026.system.entry.js +0 -2
- package/dist/pine-core/p-d714f68f.system.entry.js +0 -2
- package/dist/pine-core/p-d714f68f.system.entry.js.map +0 -1
- package/dist/pine-core/p-e5ca5b8e.entry.js +0 -2
- package/dist/pine-core/p-e5ca5b8e.entry.js.map +0 -1
- package/dist/pine-core/p-e65a7d1c.system.entry.js +0 -2
- package/dist/pine-core/p-efa788ea.entry.js +0 -2
- package/dist/pine-core/p-f880adaa.entry.js +0 -2
- package/dist/pine-core/p-fb4058e6.entry.js +0 -2
- package/dist/pine-core/p-fb4058e6.entry.js.map +0 -1
- /package/dist/pine-core/{p-fd091234.system.entry.js.map → p-0075bbbe.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-66b10d29.entry.js.map → p-07e129db.entry.js.map} +0 -0
- /package/dist/pine-core/{p-8999b63d.system.entry.js.map → p-0975b749.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-02326ac3.entry.js.map → p-0befa8f0.entry.js.map} +0 -0
- /package/dist/pine-core/{p-8722865f.system.entry.js.map → p-1773aeac.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e2887e78.entry.js.map → p-1b9d4482.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7a95a90f.system.entry.js.map → p-2597bc59.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5a709348.entry.js.map → p-25cb810d.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a1b51557.system.entry.js.map → p-25cf2860.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-6f4a6d0b.entry.js.map → p-265372d3.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c2ffb466.system.entry.js.map → p-2b12bc55.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-297afc49.system.entry.js.map → p-2b452883.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-cd785026.system.entry.js.map → p-2efc646c.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ecb9edf8.entry.js.map → p-2fb6f9d5.entry.js.map} +0 -0
- /package/dist/pine-core/{p-efa788ea.entry.js.map → p-2fd7f74e.entry.js.map} +0 -0
- /package/dist/pine-core/{p-39488f2c.system.entry.js.map → p-302849cf.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-51d83489.system.entry.js.map → p-307f415a.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-bb8ef74a.system.entry.js.map → p-378df5eb.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-50c9e865.entry.js.map → p-3e7933bf.entry.js.map} +0 -0
- /package/dist/pine-core/{p-11d4036e.entry.js.map → p-41e2fe3a.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7004d1ea.system.entry.js.map → p-449ebe39.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-023d8b71.system.entry.js.map → p-4534e8cc.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-52d37cc1.entry.js.map → p-46820152.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ba187a35.entry.js.map → p-4b3a8cab.entry.js.map} +0 -0
- /package/dist/pine-core/{p-da367b5e.system.entry.js.map → p-4c8bebd8.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-503cab1f.entry.js.map → p-4dda1edf.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5e8badb9.entry.js.map → p-559b4ebc.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c13ef6a7.system.entry.js.map → p-55d06d0a.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-25190921.entry.js.map → p-56f6f106.entry.js.map} +0 -0
- /package/dist/pine-core/{p-075eecf9.entry.js.map → p-5ac7af9e.entry.js.map} +0 -0
- /package/dist/pine-core/{p-dfc5ab34.system.entry.js.map → p-72d87dc6.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b2b1b7a9.system.entry.js.map → p-73a2e028.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-4bbf3e31.entry.js.map → p-74f03e75.entry.js.map} +0 -0
- /package/dist/pine-core/{p-be939cb0.entry.js.map → p-786967e8.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0de9f8da.system.entry.js.map → p-7b0517e5.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-464dd476.entry.js.map → p-8501429f.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e65a7d1c.system.entry.js.map → p-875d5d5a.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-4deb7b8c.entry.js.map → p-896e2f1b.entry.js.map} +0 -0
- /package/dist/pine-core/{p-72b05928.system.entry.js.map → p-8ded79aa.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e89cb1f2.system.entry.js.map → p-8f69dd71.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-2e19f167.system.entry.js.map → p-94fe15b0.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-72053224.entry.js.map → p-a2cb65df.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c8122bea.entry.js.map → p-a54d6a53.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a04556e4.system.entry.js.map → p-a5cf0088.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f880adaa.entry.js.map → p-a645818a.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f583e5d4.entry.js.map → p-a9cfaa1f.entry.js.map} +0 -0
- /package/dist/pine-core/{p-14a52961.system.entry.js.map → p-aa2782b9.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f55b9f90.system.entry.js.map → p-ab4307c7.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-349a8869.entry.js.map → p-af56cb57.entry.js.map} +0 -0
- /package/dist/pine-core/{p-8d7abc83.entry.js.map → p-b32d34d0.entry.js.map} +0 -0
- /package/dist/pine-core/{p-00616fc9.entry.js.map → p-b378ca03.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5708f95a.entry.js.map → p-b669e1d9.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e3fb0bc2.system.entry.js.map → p-bc637bed.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b6ea3332.entry.js.map → p-be5ef841.entry.js.map} +0 -0
- /package/dist/pine-core/{p-54183d70.system.entry.js.map → p-c0601420.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-73158adf.system.entry.js.map → p-c2d2fe64.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-232a2043.entry.js.map → p-c44d3551.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e8d76117.entry.js.map → p-c55fc47e.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5da82e8c.system.entry.js.map → p-c63e7909.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-884b9ae6.system.entry.js.map → p-d5c63517.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c1099665.system.entry.js.map → p-db12273e.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-92c52409.system.entry.js.map → p-dbe41087.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-deb8a499.system.entry.js.map → p-e03b7f4a.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-6db1e029.system.entry.js.map → p-ee583234.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0066d249.entry.js.map → p-f5d78141.entry.js.map} +0 -0
- /package/dist/pine-core/{p-98fe56d9.entry.js.map → p-f6b269ac.entry.js.map} +0 -0
- /package/dist/pine-core/{p-52af1890.system.entry.js.map → p-f911dde3.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7cb4f0de.entry.js.map → p-fd3d548f.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ac37cf0d.entry.js.map → p-fddf82f8.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-modal-content.entry.cjs.js","sources":["src/components/pds-modal/pds-modal-content/pds-modal-content.scss?tag=pds-modal-content","src/components/pds-modal/pds-modal-content/pds-modal-content.tsx"],"sourcesContent":["pds-modal-content {\n display: block;\n flex: 1 1 auto;\n overflow-y: auto;\n width: 100%;\n\n &:has(.pds-modal-content--border-none) {\n border: 0;\n }\n\n &:has(.pds-modal-content--border-both) {\n border-block-end: 1px solid var(--pine-color-grey-200);\n border-block-start: 1px solid var(--pine-color-grey-200);\n }\n\n &:has(.pds-modal-content--border-top) {\n border-block-start: 1px solid var(--pine-color-grey-200);\n }\n\n &:has(.pds-modal-content--border-bottom) {\n border-block-end: 1px solid var(--pine-color-grey-200);\n }\n}\n\n.pds-modal-content {\n display: block;\n flex: 1 1 auto;\n // Max height is set via inline styles based on header and footer heights\n min-height: 0;\n overflow-y: auto;\n width: 100%;\n\n}\n","import { Component, h, Host, Prop, Element, State } from '@stencil/core';\n\ndeclare global {\n interface HTMLPdsModalContentElement extends HTMLElement {\n border: 'none' | 'both';\n }\n}\n\n@Component({\n tag: 'pds-modal-content',\n styleUrl: 'pds-modal-content.scss',\n})\nexport class PdsModalContent {\n\n @Element() el: HTMLPdsModalContentElement;\n\n /**\n * The border style for the content area. Automatically set based on available space of the modal content.\n * @default 'none'\n */\n @Prop({ reflect: true }) border: 'none' | 'both' | 'top' | 'bottom' = 'none';\n\n @State() contentMaxHeight: string = '60vh';\n\n componentDidLoad() {\n const slotContent = this.el.firstElementChild as HTMLElement;\n const isScrollable = slotContent.scrollHeight > slotContent.clientHeight;\n this.border = isScrollable ? 'both' : 'none';\n\n this.calculateMaxHeight();\n\n window.addEventListener('resize', this.calculateMaxHeight.bind(this));\n }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.calculateMaxHeight.bind(this));\n\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n }\n\n /**\n * Calculates the max-height based on header and footer heights\n */\n private mutationObserver: MutationObserver;\n\n /**\n * Calculates the max-height based on header and footer heights\n */\n private calculateMaxHeight() {\n // Find the modal element (parent of this component)\n const modalElement = this.el.closest('pds-modal');\n if (!modalElement) return;\n\n setTimeout(() => {\n // Find header and footer elements\n const headerElement = modalElement.querySelector('pds-modal-header');\n const footerElement = modalElement.querySelector('pds-modal-footer');\n\n // Get header and footer heights\n const headerHeight = headerElement ? headerElement.offsetHeight : 0;\n const footerHeight = footerElement ? footerElement.offsetHeight : 0;\n\n // Set the max-height as a calculation\n if (headerHeight > 0 || footerHeight > 0) {\n // Calculate the available height by subtracting:\n // 1. Header and footer heights\n // 2. Modal padding (48px)\n // 3. Additional space for modal positioning (6vh)\n // 4. Extra adjustment for perfect fit (50px)\n const viewportAdjustment = Math.round(window.innerHeight * 0.06); // 6vh approximation\n const totalReduction = headerHeight + footerHeight + 48 + viewportAdjustment + 50;\n\n // Set the content max height\n this.contentMaxHeight = `calc(100vh - ${totalReduction}px)`;\n\n // Apply the style directly to ensure it takes effect\n const contentElement = this.el.querySelector('.pds-modal-content') as HTMLElement;\n if (contentElement) {\n contentElement.style.maxHeight = this.contentMaxHeight;\n }\n } else {\n this.contentMaxHeight = '60vh'; // Default fallback\n }\n }, 100); // Delay to ensure DOM is fully rendered\n\n // Set up mutation observer if not already done\n if (!this.mutationObserver && modalElement) {\n this.mutationObserver = new MutationObserver(() => {\n this.calculateMaxHeight();\n });\n\n // Observe changes to the modal's children\n this.mutationObserver.observe(modalElement, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['style', 'class']\n });\n }\n }\n render() {\n return (\n <Host>\n <div\n class={{\n 'pds-modal-content': true,\n [`pds-modal-content--border-${this.border}`]: true\n }}\n style={{ maxHeight: this.contentMaxHeight }}\n tabindex=\"-1\"\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,kBAAkB,GAAG,k3BAAk3B;;MCYh4B,eAAe,GAAA,MAAA;AAJ5B,IAAA,WAAA,CAAA,OAAA,EAAA;;AAQE;;;AAGG;AACsB,QAAA,IAAM,CAAA,MAAA,GAAuC,MAAM;AAEnE,QAAA,IAAgB,CAAA,gBAAA,GAAW,MAAM;AAgG3C;IA9FC,gBAAgB,GAAA;AACd,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,iBAAgC;QAC5D,MAAM,YAAY,GAAG,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY;AACxE,QAAA,IAAI,CAAC,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,MAAM;QAE5C,IAAI,CAAC,kBAAkB,EAAE;AAEzB,QAAA,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;IAGvE,oBAAoB,GAAA;AAClB,QAAA,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAExE,QAAA,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACzB,YAAA,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE;;;AAStC;;AAEG;IACK,kBAAkB,GAAA;;QAExB,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;AACjD,QAAA,IAAI,CAAC,YAAY;YAAE;QAEnB,UAAU,CAAC,MAAK;;YAEd,MAAM,aAAa,GAAG,YA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,aAAA,CAAC;;;IAGN,MAAM,GAAA;QACJ,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,mBAAmB,EAAE,IAAI;AACzB,gBAAA,CAAC,6BAA6B,IAAI,CAAC,MAAM,CAAE,CAAA,GAAG;AAC/C,aAAA,EACD,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,EAC3C,QAAQ,EAAC,IAAI,EAAA,EAEbA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT,CACD;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"pds-modal-content.entry.cjs.js","sources":["src/components/pds-modal/pds-modal-content/pds-modal-content.scss?tag=pds-modal-content","src/components/pds-modal/pds-modal-content/pds-modal-content.tsx"],"sourcesContent":["pds-modal-content {\n display: block;\n flex: 1 1 auto;\n width: 100%;\n\n &:has(.pds-modal-content.pds-modal-content--border-none) {\n border: 0;\n }\n\n &:has(.pds-modal-content.pds-modal-content--border-both) {\n border-block-end: 1px solid var(--pine-color-grey-200);\n border-block-start: 1px solid var(--pine-color-grey-200);\n }\n\n &:has(.pds-modal-content.pds-modal-content--border-top) {\n border-block-start: 1px solid var(--pine-color-grey-200);\n }\n\n &:has(.pds-modal-content.pds-modal-content--border-bottom) {\n border-block-end: 1px solid var(--pine-color-grey-200);\n }\n}\n\n.pds-modal-content {\n display: block;\n flex: 1 1 auto;\n // Max height is set via inline styles based on header and footer heights\n min-height: 0;\n width: 100%;\n\n}\n","import { Component, h, Host, Prop, Element, State } from '@stencil/core';\n\ndeclare global {\n interface HTMLPdsModalContentElement extends HTMLElement {\n border: 'none' | 'both';\n }\n}\n\n@Component({\n tag: 'pds-modal-content',\n styleUrl: 'pds-modal-content.scss',\n})\nexport class PdsModalContent {\n\n @Element() el: HTMLPdsModalContentElement;\n\n /**\n * The border style for the content area. When not explicitly set, automatically determined based on scroll state.\n * @default 'none'\n */\n @Prop({ reflect: true }) border: 'none' | 'both' | 'top' | 'bottom' = 'none';\n\n @State() contentMaxHeight: string = 'none';\n\n /**\n * Tracks whether the border prop was explicitly set by the user\n */\n private userSetBorder = false;\n\n componentWillLoad() {\n // Check if border was explicitly set via attribute or property\n const borderAttr = this.el.getAttribute('border');\n const hasBorderAttribute = borderAttr !== null;\n\n // If border attribute exists or border prop is not the default, user set it\n this.userSetBorder = hasBorderAttribute || this.border !== 'none';\n }\n\n componentDidLoad() {\n this.calculateMaxHeight();\n\n // Set up resize listener\n window.addEventListener('resize', this.handleResize.bind(this));\n\n // Only set up scroll listener for border updates if borders are managed automatically\n if (!this.userSetBorder) {\n setTimeout(() => {\n // The scroll happens on the component element itself (this.el), not the inner div\n console.log('Setting up scroll listener on component element:', this.el);\n this.el.addEventListener('scroll', this.handleScroll.bind(this));\n // Initial border update after everything is set up\n setTimeout(() => this.updateBorders(), 100);\n }, 100);\n }\n }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.handleResize.bind(this));\n\n // Clean up scroll listener only if it was set up\n if (!this.userSetBorder) {\n this.el.removeEventListener('scroll', this.handleScroll.bind(this));\n }\n\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n }\n\n /**\n * Handle scroll events\n */\n private handleScroll() {\n console.log('Scroll event fired!');\n this.updateBorders();\n }\n\n /**\n * Handle resize events\n */\n private handleResize() {\n this.calculateMaxHeight();\n // Update borders after resize as content scrollability might change\n setTimeout(() => this.updateBorders(), 50);\n }\n\n /**\n * Calculates the max-height based on header and footer heights\n */\n private mutationObserver: MutationObserver;\n\n /**\n * Updates border visibility based on scroll state (only if not user-defined)\n */\n private updateBorders() {\n // If user explicitly set a border value, don't override it\n if (this.userSetBorder) {\n return;\n }\n\n // Find the modal element (parent of this component)\n const modalElement = this.el.closest('pds-modal');\n if (!modalElement) return;\n\n // Only apply border logic if modal is scrollable\n const isModalScrollable = modalElement.scrollable !== false;\n if (!isModalScrollable) {\n this.border = 'none';\n return;\n }\n\n // The scrollable element is the component itself (this.el), not the inner div\n const scrollableElement = this.el;\n\n // Check if content is actually scrollable\n const isContentScrollable = scrollableElement.scrollHeight > scrollableElement.clientHeight;\n\n if (!isContentScrollable) {\n this.border = 'none';\n return;\n }\n\n // Determine border position based on scroll position\n const { scrollTop, scrollHeight, clientHeight } = scrollableElement;\n const scrollBottom = scrollTop + clientHeight;\n\n // More generous tolerance for scroll detection (3px instead of 1px)\n const tolerance = 3;\n const isAtTop = scrollTop <= tolerance;\n const isAtBottom = scrollBottom >= scrollHeight - tolerance;\n\n // Debug logging (can be removed later)\n console.log('Border Debug:', {\n scrollTop,\n scrollHeight,\n clientHeight,\n scrollBottom,\n isAtTop,\n isAtBottom,\n currentBorder: this.border\n });\n\n if (isAtTop && isAtBottom) {\n // Content fits exactly, no borders needed\n this.border = 'none';\n console.log('Content fits exactly, no borders needed');\n } else if (isAtTop && !isAtBottom) {\n // At top, show bottom border only\n this.border = 'bottom';\n console.log('At top, show bottom border only');\n } else if (!isAtTop && isAtBottom) {\n // At bottom, show top border only\n this.border = 'top';\n console.log('At bottom, show top border only');\n } else {\n // In middle, show both borders\n this.border = 'both';\n console.log('In middle, show both borders');\n }\n }\n\n /**\n * Calculates the max-height based on header and footer heights\n */\n private calculateMaxHeight() {\n // Find the modal element (parent of this component)\n const modalElement = this.el.closest('pds-modal');\n if (!modalElement) return;\n\n // Check if the parent modal is scrollable\n const isScrollable = modalElement.scrollable !== false;\n\n setTimeout(() => {\n // If modal is not scrollable, don't apply max-height constraints\n if (!isScrollable) {\n this.contentMaxHeight = 'none';\n const contentElement = this.el.querySelector('.pds-modal-content') as HTMLElement;\n if (contentElement) {\n contentElement.style.maxHeight = 'none';\n }\n return;\n }\n\n // Find header and footer elements\n const headerElement = modalElement.querySelector('pds-modal-header');\n const footerElement = modalElement.querySelector('pds-modal-footer');\n\n // Get header and footer heights\n const headerHeight = headerElement ? headerElement.offsetHeight : 0;\n const footerHeight = footerElement ? footerElement.offsetHeight : 0;\n\n // Set the max-height as a calculation\n if (headerHeight > 0 || footerHeight > 0) {\n // Calculate the available height by subtracting:\n // 1. Header and footer heights\n // 2. Modal padding (48px)\n // 3. Additional space for modal positioning (6vh)\n // 4. Extra adjustment for perfect fit (50px)\n const viewportAdjustment = Math.round(window.innerHeight * 0.06); // 6vh approximation\n const totalReduction = headerHeight + footerHeight + 48 + viewportAdjustment + 50;\n\n // Set the content max height\n this.contentMaxHeight = `calc(100vh - ${totalReduction}px)`;\n\n // Apply the style directly to ensure it takes effect\n const contentElement = this.el.querySelector('.pds-modal-content') as HTMLElement;\n if (contentElement) {\n contentElement.style.maxHeight = this.contentMaxHeight;\n }\n } else {\n this.contentMaxHeight = 'none'; // Default fallback\n }\n\n // Update borders after height calculations with longer delay\n setTimeout(() => this.updateBorders(), 150);\n }, 100); // Delay to ensure DOM is fully rendered\n\n // Set up mutation observer if not already done\n if (!this.mutationObserver && modalElement) {\n this.mutationObserver = new MutationObserver(() => {\n this.calculateMaxHeight();\n });\n\n // Observe changes to the modal's children\n this.mutationObserver.observe(modalElement, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['style', 'class']\n });\n }\n }\n render() {\n // Only apply max-height style if it's not 'none'\n const styleObj = this.contentMaxHeight !== 'none' ? { maxHeight: this.contentMaxHeight } : {};\n\n return (\n <Host>\n <div\n class={{\n 'pds-modal-content': true,\n [`pds-modal-content--border-${this.border}`]: true\n }}\n style={styleObj}\n tabindex=\"-1\"\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,kBAAkB,GAAG,05BAA05B;;MCYx6B,eAAe,GAAA,MAAA;AAJ5B,IAAA,WAAA,CAAA,OAAA,EAAA;;AAQE;;;AAGG;AACsB,QAAA,IAAM,CAAA,MAAA,GAAuC,MAAM;AAEnE,QAAA,IAAgB,CAAA,gBAAA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AG,EAAE;QAE7F,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,mBAAmB,EAAE,IAAI;AACzB,gBAAA,CAAC,6BAA6B,IAAI,CAAC,MAAM,CAAE,CAAA,GAAG;aAC/C,EACD,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAC,IAAI,EAAA,EAEbA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT,CACD;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DDTyvZD7.js');
|
|
4
4
|
|
|
5
5
|
const pdsModalFooterCss = "pds-modal-footer{display:block;width:100%}.pds-modal__footer{width:100%}";
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ const PdsModalFooter = class {
|
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (index.h("footer", { key: '
|
|
12
|
+
return (index.h("footer", { key: '0fa58ce225ce31a1f40d6ce1d3276e716b36de8d', class: "pds-modal__footer" }, index.h("slot", { key: 'df0bbdb56c711c7eb34db7181f940de11d4449ef' })));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
PdsModalFooter.style = pdsModalFooterCss;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DDTyvZD7.js');
|
|
4
4
|
|
|
5
5
|
const pdsModalHeaderCss = "pds-modal-header{display:block;width:100%}.pds-modal__header{width:100%}";
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ const PdsModalHeader = class {
|
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (index.h("header", { key: '
|
|
12
|
+
return (index.h("header", { key: '1a471bd6dfa2b654f5a6ebdf8fb5baef728324b3', class: "pds-modal__header" }, index.h("slot", { key: '946a365ab3c2ca627d618188890d385c054b4c16' })));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
PdsModalHeader.style = pdsModalHeaderCss;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DDTyvZD7.js');
|
|
4
4
|
|
|
5
|
-
const pdsModalCss = ".pds-modal__backdrop{-ms-flex-align:start;align-items:flex-start;background-color:rgba(0, 0, 0, 0.4);border:0;display:-ms-flexbox;display:flex;height:100%;inset:0;-ms-flex-pack:center;justify-content:center;margin:0;max-height:100%;max-width:100%;opacity:0;padding:0;position:fixed;-webkit-transition:opacity 0.2s ease, visibility 0.2s ease;transition:opacity 0.2s ease, visibility 0.2s ease;visibility:hidden;width:100%;z-index:1000}@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))){.pds-modal__backdrop{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}}pds-modal .pds-modal__backdrop{z-index:1001}.pds-modal__backdrop::-webkit-backdrop{background:transparent}.pds-modal__backdrop::-ms-backdrop{background:transparent}.pds-modal__backdrop::backdrop{background:transparent}.pds-modal__backdrop.open{opacity:1;visibility:visible}.pds-modal{background:var(--pine-color-background-container);border-radius:var(--pine-dimension-sm);-webkit-box-shadow:var(--pine-box-shadow-400);box-shadow:var(--pine-box-shadow-400);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:var(--pine-dimension-md);max-height:calc(100vh - (5vh + 96px))
|
|
5
|
+
const pdsModalCss = ".pds-modal__backdrop{-ms-flex-align:start;align-items:flex-start;background-color:rgba(0, 0, 0, 0.4);border:0;display:-ms-flexbox;display:flex;height:100%;inset:0;-ms-flex-pack:center;justify-content:center;margin:0;max-height:100%;max-width:100%;opacity:0;padding:0;position:fixed;-webkit-transition:opacity 0.2s ease, visibility 0.2s ease;transition:opacity 0.2s ease, visibility 0.2s ease;visibility:hidden;width:100%;z-index:1000}@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))){.pds-modal__backdrop{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}}pds-modal .pds-modal__backdrop{z-index:1001}.pds-modal__backdrop::-webkit-backdrop{background:transparent}.pds-modal__backdrop::-ms-backdrop{background:transparent}.pds-modal__backdrop::backdrop{background:transparent}.pds-modal__backdrop.open{opacity:1;visibility:visible}.pds-modal{background:var(--pine-color-background-container);border-radius:var(--pine-dimension-sm);-webkit-box-shadow:var(--pine-box-shadow-400);box-shadow:var(--pine-box-shadow-400);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:var(--pine-dimension-md);max-height:none;width:100%}.pds-modal.pds-modal--scrollable{max-height:calc(100vh - (5vh + 96px))}@supports (height: 100dvh){.pds-modal.pds-modal--scrollable{max-height:calc(100dvh - (5dvh + 96px))}}@media (min-width: 992px){.pds-modal{-webkit-margin-before:6vh;margin-block-start:6vh}@supports (height: 100dvh){.pds-modal{-webkit-margin-before:6dvh;margin-block-start:6dvh}}}@media (min-width: 1200px){.pds-modal{-webkit-margin-before:8vh;margin-block-start:8vh}@supports (height: 100dvh){.pds-modal{-webkit-margin-before:8dvh;margin-block-start:8dvh}}}.pds-modal--sm{max-width:520px}.pds-modal--md{max-width:700px}.pds-modal--lg{max-width:900px}.pds-modal--fullscreen{border-radius:0;height:100%;margin:0;max-height:100vh;max-width:100%}@supports (height: 100dvh){.pds-modal--fullscreen{max-height:100dvh}}.pds-modal--fullscreen.pds-modal--scrollable{max-height:100vh}@supports (height: 100dvh){.pds-modal--fullscreen.pds-modal--scrollable{max-height:100dvh}}.pds-modal--fullscreen .pds-modal-content{-ms-flex:1;flex:1}.pds-modal--scrollable pds-modal-content{-webkit-border-after:1px solid transparent;border-block-end:1px solid transparent;-webkit-border-before:1px solid transparent;border-block-start:1px solid transparent;overflow-y:auto}.pds-modal:not(.pds-modal--scrollable) pds-modal-content{overflow-y:visible}";
|
|
6
6
|
|
|
7
7
|
const PdsModal = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -25,6 +25,11 @@ const PdsModal = class {
|
|
|
25
25
|
* @default 'md'
|
|
26
26
|
*/
|
|
27
27
|
this.size = 'md';
|
|
28
|
+
/**
|
|
29
|
+
* Whether the modal content should be scrollable
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
this.scrollable = true;
|
|
28
33
|
/**
|
|
29
34
|
* Stores the list of focusable elements in the modal
|
|
30
35
|
*/
|
|
@@ -235,10 +240,14 @@ const PdsModal = class {
|
|
|
235
240
|
return thisZIndex === maxZIndex;
|
|
236
241
|
}
|
|
237
242
|
render() {
|
|
238
|
-
return (index.h("dialog", { key: '
|
|
243
|
+
return (index.h("dialog", { key: 'ca1fe22c9f9aa26e74234e5195c007760cbbf818', class: {
|
|
239
244
|
'pds-modal__backdrop': true,
|
|
240
245
|
'open': this.open
|
|
241
|
-
}, "aria-modal": "true", "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, index.h("div", { key: '
|
|
246
|
+
}, "aria-modal": "true", "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, index.h("div", { key: 'd0f297574d53dc1718277a58c2ade00a5451f96b', class: {
|
|
247
|
+
'pds-modal': true,
|
|
248
|
+
[`pds-modal--${this.size}`]: true,
|
|
249
|
+
'pds-modal--scrollable': this.scrollable
|
|
250
|
+
} }, index.h("slot", { key: '37bb5abda88b4db9304884532951980ea8b9eaf8' }))));
|
|
242
251
|
}
|
|
243
252
|
get el() { return index.getElement(this); }
|
|
244
253
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pds-modal.entry.cjs.js","mappings":";;;;AAAA,MAAM,WAAW,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AAA,EAAA,CAAA,CACT,CACC;;;;;;;;;;;","names":["h"],"sources":["src/components/pds-modal/pds-modal.scss?tag=pds-modal","src/components/pds-modal/pds-modal.tsx"],"sourcesContent":[".pds-modal__backdrop {\n align-items: flex-start;\n background-color: rgba(0, 0, 0, 0.4);\n border: 0;\n display: flex;\n height: 100%;\n inset: 0;\n justify-content: center;\n margin: 0;\n max-height: 100%;\n max-width: 100%;\n opacity: 0;\n padding: 0;\n position: fixed;\n transition: opacity 0.2s ease, visibility 0.2s ease;\n visibility: hidden;\n width: 100%;\n z-index: 1000;\n\n @supports (backdrop-filter: blur(3px)) {\n backdrop-filter: blur(3px);\n }\n\n // Increase z-index for nested modals\n pds-modal & {\n z-index: 1001;\n }\n\n &::backdrop {\n background: transparent;\n }\n\n &.open {\n opacity: 1;\n visibility: visible;\n }\n}\n\n.pds-modal {\n background: var(--pine-color-background-container);\n border-radius: var(--pine-dimension-sm);\n box-shadow: var(--pine-box-shadow-400);\n display: flex;\n flex-direction: column;\n margin: var(--pine-dimension-md);\n max-height: calc(100vh - (calc(5vh + 96px)));\n width: 100%;\n\n @media (min-width: 992px) {\n margin-block-start: 6vh;\n }\n\n @media (min-width: 1200px) {\n margin-block-start: 8vh;\n }\n}\n\n.pds-modal--sm {\n max-width: 520px;\n}\n\n.pds-modal--md {\n max-width: 700px;\n}\n\n.pds-modal--lg {\n max-width: 900px;\n}\n\n.pds-modal--fullscreen {\n border-radius: 0;\n height: 100%;\n margin: 0;\n max-height: 100vh;\n max-width: 100%;\n}\n\n.pds-modal-content {\n .pds-modal--fullscreen & {\n flex: 1;\n }\n}\n\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'pds-modal',\n styleUrl: 'pds-modal.scss',\n shadow: false\n})\nexport class PdsModal {\n private modalRef: HTMLDialogElement;\n private previousActiveElement: HTMLElement;\n private focusableElements: HTMLElement[] = [];\n\n @Element() el: HTMLPdsModalElement;\n\n /**\n * Whether the modal can be dismissed by clicking the backdrop\n * @default true\n */\n @Prop() backdropDismiss = true;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Whether the modal is open\n * @default false\n */\n @Prop({ mutable: true }) open = false;\n\n /**\n * The size of the modal\n * @default 'md'\n */\n @Prop() size: 'sm' | 'md' | 'lg' | 'fullscreen' = 'md';\n\n // Modal content is always scrollable by default\n\n /**\n * Emitted when the modal is opened\n */\n @Event() pdsModalOpen: EventEmitter<void>;\n\n /**\n * Emitted when the modal is closed\n */\n @Event() pdsModalClose: EventEmitter<void>;\n\n /**\n * Stores the list of focusable elements in the modal\n */\n @State() focusableElementsArray: HTMLElement[] = [];\n\n componentDidLoad() {\n this.modalRef = this.el.querySelector('.pds-modal__backdrop') as HTMLDialogElement;\n // Add keyboard event listener\n document.addEventListener('keydown', this.handleKeyDown);\n }\n\n disconnectedCallback() {\n // Clean up event listener\n document.removeEventListener('keydown', this.handleKeyDown);\n }\n\n @Watch('open')\n handleOpenChange(newValue: boolean) {\n if (newValue) {\n this.showModal();\n } else {\n this.hideModal();\n }\n }\n\n /**\n * Updates the list of focusable elements in the modal\n */\n private updateFocusableElements() {\n if (!this.modalRef) return;\n\n // Get all focusable elements within the modal\n const selector = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n 'pds-button:not([disabled])',\n 'pds-link:not([disabled])',\n 'pds-input:not([disabled])',\n 'pds-checkbox:not([disabled])',\n 'pds-radio:not([disabled])',\n 'pds-switch:not([disabled])',\n 'pds-select:not([disabled])',\n ].join(',');\n\n this.focusableElements = Array.from(\n this.modalRef.querySelectorAll(selector)\n ) as HTMLElement[];\n\n // Filter out elements with display: none or visibility: hidden\n this.focusableElements = this.focusableElements.filter(el => {\n const style = window.getComputedStyle(el);\n return style.display !== 'none' && style.visibility !== 'hidden';\n });\n }\n\n /**\n * Sets focus to the first focusable element in the modal\n */\n private setInitialFocus() {\n if (this.focusableElements.length === 0) return;\n\n // Focus the first focusable element\n const firstElement = this.focusableElements[0];\n\n // For web components, we need to ensure they're properly focused\n this.focusElement(firstElement);\n }\n\n /**\n * Helper method to focus an element, with special handling for web components\n */\n private focusElement(element: HTMLElement) {\n if (!element) return;\n\n try {\n // Try standard focus first\n element.focus();\n\n // Check if focus worked\n setTimeout(() => {\n if (document.activeElement !== element) {\n // For web components, try to find a focusable element inside\n if (element.shadowRoot) {\n const focusableInShadow = element.shadowRoot.querySelector(\n 'button, [tabindex], input, a[href]'\n ) as HTMLElement;\n\n if (focusableInShadow) {\n focusableInShadow.focus();\n }\n }\n }\n }, 0);\n } catch (error) {\n console.error('Error focusing element:', error);\n }\n }\n\n /**\n * Opens the modal\n */\n @Method()\n async showModal() {\n if (this.modalRef) {\n try {\n // Store the currently focused element to restore focus when modal closes\n this.previousActiveElement = document.activeElement as HTMLElement;\n\n // Use native dialog showModal method which makes the rest of the page inert\n this.modalRef.showModal();\n this.open = true;\n\n // Update focusable elements and set initial focus\n // Using a longer timeout to ensure all components are fully rendered\n setTimeout(() => {\n this.updateFocusableElements();\n this.setInitialFocus();\n this.pdsModalOpen.emit();\n }, 100);\n } catch (error) {\n console.error('Failed to show modal:', error);\n }\n }\n }\n\n /**\n * Closes the modal\n */\n @Method()\n async hideModal() {\n if (this.modalRef) {\n try {\n this.modalRef.close();\n this.open = false;\n\n // Restore focus to the element that was focused before the modal was opened\n if (this.previousActiveElement && typeof this.previousActiveElement.focus === 'function') {\n this.previousActiveElement.focus();\n }\n\n this.pdsModalClose.emit();\n } catch (error) {\n console.error('Failed to hide modal:', error);\n }\n }\n }\n\n private handleBackdropClick = (e: MouseEvent) => {\n if (!this.backdropDismiss || !this.open) return;\n\n if ((e.target as HTMLElement).classList.contains('pds-modal__backdrop')) {\n e.stopPropagation();\n\n // Only close if this is the innermost modal\n if (this.isInnermostModal()) {\n this.hideModal();\n }\n }\n };\n\n /**\n * Gets the z-index of a modal's backdrop element\n */\n private getBackdropZIndex(modal: Element): number {\n const backdrop = modal.querySelector('.pds-modal__backdrop');\n return backdrop ? parseInt(getComputedStyle(backdrop).zIndex, 10) : -1;\n }\n\n /**\n * Checks if this modal is the innermost (highest z-index) modal\n */\n private isInnermostModal(): boolean {\n // Find all open modals\n const openModals = Array.from(document.querySelectorAll('pds-modal')).filter(\n modal => modal.open\n );\n\n if (openModals.length === 0) return false;\n\n // Get this modal's backdrop element\n const thisBackdrop = this.el.querySelector('.pds-modal__backdrop');\n if (!thisBackdrop) return false;\n\n // Get computed z-index of all open modal backdrops\n const modalZIndexes = openModals.map(modal => this.getBackdropZIndex(modal));\n\n // Get the highest z-index\n const maxZIndex = Math.max(...modalZIndexes);\n\n // Check if this modal's backdrop has the highest z-index\n const thisZIndex = this.getBackdropZIndex(this.el);\n return thisZIndex === maxZIndex;\n }\n\n private handleKeyDown = (e: KeyboardEvent) => {\n // If the modal is not open, don't handle any keyboard events\n if (!this.open) return;\n\n // Handle Escape key to close the modal\n if (e.key === 'Escape') {\n // Only close if this is the innermost modal\n if (this.isInnermostModal()) {\n e.preventDefault();\n this.hideModal();\n }\n return;\n }\n\n // Handle Tab key for focus trapping\n if (e.key === 'Tab') {\n // If there are no focusable elements, do nothing\n if (this.focusableElements.length === 0) return;\n\n // Get the first and last focusable elements\n const firstFocusableElement = this.focusableElements[0];\n const lastFocusableElement = this.focusableElements[this.focusableElements.length - 1];\n\n // Get the current active element\n const activeElement = document.activeElement;\n\n // Check if we need to wrap focus\n const isFirstElement = activeElement === firstFocusableElement ||\n firstFocusableElement.contains(activeElement as Node);\n\n const isLastElement = activeElement === lastFocusableElement ||\n lastFocusableElement.contains(activeElement as Node);\n\n // If shift + tab is pressed and focus is on the first element, move to the last element\n if (e.shiftKey && isFirstElement) {\n e.preventDefault();\n this.focusElement(lastFocusableElement);\n }\n // If tab is pressed and focus is on the last element, move to the first element\n else if (!e.shiftKey && isLastElement) {\n e.preventDefault();\n this.focusElement(firstFocusableElement);\n }\n }\n };\n\n render() {\n return (\n <dialog\n class={{\n 'pds-modal__backdrop': true,\n 'open': this.open\n }}\n aria-modal=\"true\"\n aria-labelledby={`${this.componentId}-heading`}\n onClick={this.handleBackdropClick}\n >\n <div\n class={`pds-modal pds-modal--${this.size} pds-modal--scrollable`}\n >\n <slot></slot>\n </div>\n </dialog>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"pds-modal.entry.cjs.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,07EAA07E;;MCOj8E,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;AAQU,QAAA,IAAiB,CAAA,iBAAA,GAAkB,EAAE;AAI7C;;;AAGG;AACK,QAAA,IAAe,CAAA,eAAA,GAAG,IAAI;AAO9B;;;AAGG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;AAErC;;;AAGG;AACK,QAAA,IAAI,CAAA,IAAA,GAAsC,IAAI;AAEtD;;;AAGG;AACK,QAAA,IAAU,CAAA,UAAA,GAAG,IAAI;AAYzB;;AAEG;AACM,QAAA,IAAsB,CAAA,sBAAA,GAAkB,EAAE;AAoJ3C,QAAA,IAAA,CAAA,mBAAmB,GAAG,CAAC,CAAa,KAAI;YAC9C,IAAI,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE;YAEzC,IAAK,CAAC,CAAC,MAAsB,CAAC,SAAS,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE;gBACvE,CAAC,CAAC,eAAe,EAAE;;AAGnB,gBAAA,IAAI,IAAI,CAAC,gBAAgB,EAAE,EAAE;oBAC3B,IAAI,CAAC,SAAS,EAAE;;;AAGtB,SAAC;AAoCO,QAAA,IAAA,CAAA,aAAa,GAAG,CAAC,CAAgB,KAAI;;YAE3C,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE;;AAGhB,YAAA,IAAI,CAAC,CAAC,GAAG,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AqB,EAAE,IAAI;gBAC3B,MAAM,EAAE,IAAI,CAAC;AACd,aAAA,EAAA,YAAA,EACU,MAAM,EAAA,iBAAA,EACA,CAAG,EAAA,IAAI,CAAC,WAAW,CAAU,QAAA,CAAA,EAC9C,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAA,EAEjCA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,WAAW,EAAE,IAAI;AACjB,gBAAA,CAAC,cAAc,IAAI,CAAC,IAAI,CAAE,CAAA,GAAG,IAAI;gBACjC,uBAAuB,EAAE,IAAI,CAAC;AAC/B,aAAA,EAAA,EAEDA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT,CACC;;;;;;;;;;;","names":["h"],"sources":["src/components/pds-modal/pds-modal.scss?tag=pds-modal","src/components/pds-modal/pds-modal.tsx"],"sourcesContent":[".pds-modal__backdrop {\n align-items: flex-start;\n background-color: rgba(0, 0, 0, 0.4);\n border: 0;\n display: flex;\n height: 100%;\n inset: 0;\n justify-content: center;\n margin: 0;\n max-height: 100%;\n max-width: 100%;\n opacity: 0;\n padding: 0;\n position: fixed;\n transition: opacity 0.2s ease, visibility 0.2s ease;\n visibility: hidden;\n width: 100%;\n z-index: 1000;\n\n @supports (backdrop-filter: blur(3px)) {\n backdrop-filter: blur(3px);\n }\n\n // Increase z-index for nested modals\n pds-modal & {\n z-index: 1001;\n }\n\n &::backdrop {\n background: transparent;\n }\n\n &.open {\n opacity: 1;\n visibility: visible;\n }\n}\n\n.pds-modal {\n background: var(--pine-color-background-container);\n border-radius: var(--pine-dimension-sm);\n box-shadow: var(--pine-box-shadow-400);\n display: flex;\n flex-direction: column;\n margin: var(--pine-dimension-md);\n max-height: none;\n width: 100%;\n\n &.pds-modal--scrollable {\n max-height: calc(100vh - (calc(5vh + 96px)));\n\n @supports (height: 100dvh) {\n max-height: calc(100dvh - (calc(5dvh + 96px)));\n }\n }\n\n @media (min-width: 992px) {\n margin-block-start: 6vh;\n\n @supports (height: 100dvh) {\n margin-block-start: 6dvh;\n }\n }\n\n @media (min-width: 1200px) {\n margin-block-start: 8vh;\n\n @supports (height: 100dvh) {\n margin-block-start: 8dvh;\n }\n }\n}\n\n.pds-modal--sm {\n max-width: 520px;\n}\n\n.pds-modal--md {\n max-width: 700px;\n}\n\n.pds-modal--lg {\n max-width: 900px;\n}\n\n.pds-modal--fullscreen {\n border-radius: 0;\n height: 100%;\n margin: 0;\n max-height: 100vh;\n max-width: 100%;\n\n @supports (height: 100dvh) {\n max-height: 100dvh;\n }\n\n &.pds-modal--scrollable {\n max-height: 100vh;\n\n @supports (height: 100dvh) {\n max-height: 100dvh;\n }\n }\n}\n\n.pds-modal-content {\n .pds-modal--fullscreen & {\n flex: 1;\n }\n}\n\n// Scrollable modal styles (default behavior)\n.pds-modal--scrollable {\n pds-modal-content {\n border-block-end: 1px solid transparent;\n border-block-start: 1px solid transparent;\n overflow-y: auto;\n }\n}\n\n// Non-scrollable modal styles\n.pds-modal:not(.pds-modal--scrollable) {\n pds-modal-content {\n overflow-y: visible;\n }\n}\n\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'pds-modal',\n styleUrl: 'pds-modal.scss',\n shadow: false\n})\nexport class PdsModal {\n private modalRef: HTMLDialogElement;\n private previousActiveElement: HTMLElement;\n private focusableElements: HTMLElement[] = [];\n\n @Element() el: HTMLPdsModalElement;\n\n /**\n * Whether the modal can be dismissed by clicking the backdrop\n * @default true\n */\n @Prop() backdropDismiss = true;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Whether the modal is open\n * @default false\n */\n @Prop({ mutable: true }) open = false;\n\n /**\n * The size of the modal\n * @default 'md'\n */\n @Prop() size: 'sm' | 'md' | 'lg' | 'fullscreen' = 'md';\n\n /**\n * Whether the modal content should be scrollable\n * @default true\n */\n @Prop() scrollable = true;\n\n /**\n * Emitted when the modal is opened\n */\n @Event() pdsModalOpen: EventEmitter<void>;\n\n /**\n * Emitted when the modal is closed\n */\n @Event() pdsModalClose: EventEmitter<void>;\n\n /**\n * Stores the list of focusable elements in the modal\n */\n @State() focusableElementsArray: HTMLElement[] = [];\n\n componentDidLoad() {\n this.modalRef = this.el.querySelector('.pds-modal__backdrop') as HTMLDialogElement;\n // Add keyboard event listener\n document.addEventListener('keydown', this.handleKeyDown);\n }\n\n disconnectedCallback() {\n // Clean up event listener\n document.removeEventListener('keydown', this.handleKeyDown);\n }\n\n @Watch('open')\n handleOpenChange(newValue: boolean) {\n if (newValue) {\n this.showModal();\n } else {\n this.hideModal();\n }\n }\n\n /**\n * Updates the list of focusable elements in the modal\n */\n private updateFocusableElements() {\n if (!this.modalRef) return;\n\n // Get all focusable elements within the modal\n const selector = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n 'pds-button:not([disabled])',\n 'pds-link:not([disabled])',\n 'pds-input:not([disabled])',\n 'pds-checkbox:not([disabled])',\n 'pds-radio:not([disabled])',\n 'pds-switch:not([disabled])',\n 'pds-select:not([disabled])',\n ].join(',');\n\n this.focusableElements = Array.from(\n this.modalRef.querySelectorAll(selector)\n ) as HTMLElement[];\n\n // Filter out elements with display: none or visibility: hidden\n this.focusableElements = this.focusableElements.filter(el => {\n const style = window.getComputedStyle(el);\n return style.display !== 'none' && style.visibility !== 'hidden';\n });\n }\n\n /**\n * Sets focus to the first focusable element in the modal\n */\n private setInitialFocus() {\n if (this.focusableElements.length === 0) return;\n\n // Focus the first focusable element\n const firstElement = this.focusableElements[0];\n\n // For web components, we need to ensure they're properly focused\n this.focusElement(firstElement);\n }\n\n /**\n * Helper method to focus an element, with special handling for web components\n */\n private focusElement(element: HTMLElement) {\n if (!element) return;\n\n try {\n // Try standard focus first\n element.focus();\n\n // Check if focus worked\n setTimeout(() => {\n if (document.activeElement !== element) {\n // For web components, try to find a focusable element inside\n if (element.shadowRoot) {\n const focusableInShadow = element.shadowRoot.querySelector(\n 'button, [tabindex], input, a[href]'\n ) as HTMLElement;\n\n if (focusableInShadow) {\n focusableInShadow.focus();\n }\n }\n }\n }, 0);\n } catch (error) {\n console.error('Error focusing element:', error);\n }\n }\n\n /**\n * Opens the modal\n */\n @Method()\n async showModal() {\n if (this.modalRef) {\n try {\n // Store the currently focused element to restore focus when modal closes\n this.previousActiveElement = document.activeElement as HTMLElement;\n\n // Use native dialog showModal method which makes the rest of the page inert\n this.modalRef.showModal();\n this.open = true;\n\n // Update focusable elements and set initial focus\n // Using a longer timeout to ensure all components are fully rendered\n setTimeout(() => {\n this.updateFocusableElements();\n this.setInitialFocus();\n this.pdsModalOpen.emit();\n }, 100);\n } catch (error) {\n console.error('Failed to show modal:', error);\n }\n }\n }\n\n /**\n * Closes the modal\n */\n @Method()\n async hideModal() {\n if (this.modalRef) {\n try {\n this.modalRef.close();\n this.open = false;\n\n // Restore focus to the element that was focused before the modal was opened\n if (this.previousActiveElement && typeof this.previousActiveElement.focus === 'function') {\n this.previousActiveElement.focus();\n }\n\n this.pdsModalClose.emit();\n } catch (error) {\n console.error('Failed to hide modal:', error);\n }\n }\n }\n\n private handleBackdropClick = (e: MouseEvent) => {\n if (!this.backdropDismiss || !this.open) return;\n\n if ((e.target as HTMLElement).classList.contains('pds-modal__backdrop')) {\n e.stopPropagation();\n\n // Only close if this is the innermost modal\n if (this.isInnermostModal()) {\n this.hideModal();\n }\n }\n };\n\n /**\n * Gets the z-index of a modal's backdrop element\n */\n private getBackdropZIndex(modal: Element): number {\n const backdrop = modal.querySelector('.pds-modal__backdrop');\n return backdrop ? parseInt(getComputedStyle(backdrop).zIndex, 10) : -1;\n }\n\n /**\n * Checks if this modal is the innermost (highest z-index) modal\n */\n private isInnermostModal(): boolean {\n // Find all open modals\n const openModals = Array.from(document.querySelectorAll('pds-modal')).filter(\n modal => modal.open\n );\n\n if (openModals.length === 0) return false;\n\n // Get this modal's backdrop element\n const thisBackdrop = this.el.querySelector('.pds-modal__backdrop');\n if (!thisBackdrop) return false;\n\n // Get computed z-index of all open modal backdrops\n const modalZIndexes = openModals.map(modal => this.getBackdropZIndex(modal));\n\n // Get the highest z-index\n const maxZIndex = Math.max(...modalZIndexes);\n\n // Check if this modal's backdrop has the highest z-index\n const thisZIndex = this.getBackdropZIndex(this.el);\n return thisZIndex === maxZIndex;\n }\n\n private handleKeyDown = (e: KeyboardEvent) => {\n // If the modal is not open, don't handle any keyboard events\n if (!this.open) return;\n\n // Handle Escape key to close the modal\n if (e.key === 'Escape') {\n // Only close if this is the innermost modal\n if (this.isInnermostModal()) {\n e.preventDefault();\n this.hideModal();\n }\n return;\n }\n\n // Handle Tab key for focus trapping\n if (e.key === 'Tab') {\n // If there are no focusable elements, do nothing\n if (this.focusableElements.length === 0) return;\n\n // Get the first and last focusable elements\n const firstFocusableElement = this.focusableElements[0];\n const lastFocusableElement = this.focusableElements[this.focusableElements.length - 1];\n\n // Get the current active element\n const activeElement = document.activeElement;\n\n // Check if we need to wrap focus\n const isFirstElement = activeElement === firstFocusableElement ||\n firstFocusableElement.contains(activeElement as Node);\n\n const isLastElement = activeElement === lastFocusableElement ||\n lastFocusableElement.contains(activeElement as Node);\n\n // If shift + tab is pressed and focus is on the first element, move to the last element\n if (e.shiftKey && isFirstElement) {\n e.preventDefault();\n this.focusElement(lastFocusableElement);\n }\n // If tab is pressed and focus is on the last element, move to the first element\n else if (!e.shiftKey && isLastElement) {\n e.preventDefault();\n this.focusElement(firstFocusableElement);\n }\n }\n };\n\n render() {\n return (\n <dialog\n class={{\n 'pds-modal__backdrop': true,\n 'open': this.open\n }}\n aria-modal=\"true\"\n aria-labelledby={`${this.componentId}-heading`}\n onClick={this.handleBackdropClick}\n >\n <div\n class={{\n 'pds-modal': true,\n [`pds-modal--${this.size}`]: true,\n 'pds-modal--scrollable': this.scrollable\n }}\n >\n <slot></slot>\n </div>\n </dialog>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-modal.entry.cjs.js","sources":["src/components/pds-modal/pds-modal.scss?tag=pds-modal","src/components/pds-modal/pds-modal.tsx"],"sourcesContent":[".pds-modal__backdrop {\n align-items: flex-start;\n background-color: rgba(0, 0, 0, 0.4);\n border: 0;\n display: flex;\n height: 100%;\n inset: 0;\n justify-content: center;\n margin: 0;\n max-height: 100%;\n max-width: 100%;\n opacity: 0;\n padding: 0;\n position: fixed;\n transition: opacity 0.2s ease, visibility 0.2s ease;\n visibility: hidden;\n width: 100%;\n z-index: 1000;\n\n @supports (backdrop-filter: blur(3px)) {\n backdrop-filter: blur(3px);\n }\n\n // Increase z-index for nested modals\n pds-modal & {\n z-index: 1001;\n }\n\n &::backdrop {\n background: transparent;\n }\n\n &.open {\n opacity: 1;\n visibility: visible;\n }\n}\n\n.pds-modal {\n background: var(--pine-color-background-container);\n border-radius: var(--pine-dimension-sm);\n box-shadow: var(--pine-box-shadow-400);\n display: flex;\n flex-direction: column;\n margin: var(--pine-dimension-md);\n max-height: calc(100vh - (calc(5vh + 96px)));\n width: 100%;\n\n @media (min-width: 992px) {\n margin-block-start: 6vh;\n }\n\n @media (min-width: 1200px) {\n margin-block-start: 8vh;\n }\n}\n\n.pds-modal--sm {\n max-width: 520px;\n}\n\n.pds-modal--md {\n max-width: 700px;\n}\n\n.pds-modal--lg {\n max-width: 900px;\n}\n\n.pds-modal--fullscreen {\n border-radius: 0;\n height: 100%;\n margin: 0;\n max-height: 100vh;\n max-width: 100%;\n}\n\n.pds-modal-content {\n .pds-modal--fullscreen & {\n flex: 1;\n }\n}\n\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'pds-modal',\n styleUrl: 'pds-modal.scss',\n shadow: false\n})\nexport class PdsModal {\n private modalRef: HTMLDialogElement;\n private previousActiveElement: HTMLElement;\n private focusableElements: HTMLElement[] = [];\n\n @Element() el: HTMLPdsModalElement;\n\n /**\n * Whether the modal can be dismissed by clicking the backdrop\n * @default true\n */\n @Prop() backdropDismiss = true;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Whether the modal is open\n * @default false\n */\n @Prop({ mutable: true }) open = false;\n\n /**\n * The size of the modal\n * @default 'md'\n */\n @Prop() size: 'sm' | 'md' | 'lg' | 'fullscreen' = 'md';\n\n // Modal content is always scrollable by default\n\n /**\n * Emitted when the modal is opened\n */\n @Event() pdsModalOpen: EventEmitter<void>;\n\n /**\n * Emitted when the modal is closed\n */\n @Event() pdsModalClose: EventEmitter<void>;\n\n /**\n * Stores the list of focusable elements in the modal\n */\n @State() focusableElementsArray: HTMLElement[] = [];\n\n componentDidLoad() {\n this.modalRef = this.el.querySelector('.pds-modal__backdrop') as HTMLDialogElement;\n // Add keyboard event listener\n document.addEventListener('keydown', this.handleKeyDown);\n }\n\n disconnectedCallback() {\n // Clean up event listener\n document.removeEventListener('keydown', this.handleKeyDown);\n }\n\n @Watch('open')\n handleOpenChange(newValue: boolean) {\n if (newValue) {\n this.showModal();\n } else {\n this.hideModal();\n }\n }\n\n /**\n * Updates the list of focusable elements in the modal\n */\n private updateFocusableElements() {\n if (!this.modalRef) return;\n\n // Get all focusable elements within the modal\n const selector = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n 'pds-button:not([disabled])',\n 'pds-link:not([disabled])',\n 'pds-input:not([disabled])',\n 'pds-checkbox:not([disabled])',\n 'pds-radio:not([disabled])',\n 'pds-switch:not([disabled])',\n 'pds-select:not([disabled])',\n ].join(',');\n\n this.focusableElements = Array.from(\n this.modalRef.querySelectorAll(selector)\n ) as HTMLElement[];\n\n // Filter out elements with display: none or visibility: hidden\n this.focusableElements = this.focusableElements.filter(el => {\n const style = window.getComputedStyle(el);\n return style.display !== 'none' && style.visibility !== 'hidden';\n });\n }\n\n /**\n * Sets focus to the first focusable element in the modal\n */\n private setInitialFocus() {\n if (this.focusableElements.length === 0) return;\n\n // Focus the first focusable element\n const firstElement = this.focusableElements[0];\n\n // For web components, we need to ensure they're properly focused\n this.focusElement(firstElement);\n }\n\n /**\n * Helper method to focus an element, with special handling for web components\n */\n private focusElement(element: HTMLElement) {\n if (!element) return;\n\n try {\n // Try standard focus first\n element.focus();\n\n // Check if focus worked\n setTimeout(() => {\n if (document.activeElement !== element) {\n // For web components, try to find a focusable element inside\n if (element.shadowRoot) {\n const focusableInShadow = element.shadowRoot.querySelector(\n 'button, [tabindex], input, a[href]'\n ) as HTMLElement;\n\n if (focusableInShadow) {\n focusableInShadow.focus();\n }\n }\n }\n }, 0);\n } catch (error) {\n console.error('Error focusing element:', error);\n }\n }\n\n /**\n * Opens the modal\n */\n @Method()\n async showModal() {\n if (this.modalRef) {\n try {\n // Store the currently focused element to restore focus when modal closes\n this.previousActiveElement = document.activeElement as HTMLElement;\n\n // Use native dialog showModal method which makes the rest of the page inert\n this.modalRef.showModal();\n this.open = true;\n\n // Update focusable elements and set initial focus\n // Using a longer timeout to ensure all components are fully rendered\n setTimeout(() => {\n this.updateFocusableElements();\n this.setInitialFocus();\n this.pdsModalOpen.emit();\n }, 100);\n } catch (error) {\n console.error('Failed to show modal:', error);\n }\n }\n }\n\n /**\n * Closes the modal\n */\n @Method()\n async hideModal() {\n if (this.modalRef) {\n try {\n this.modalRef.close();\n this.open = false;\n\n // Restore focus to the element that was focused before the modal was opened\n if (this.previousActiveElement && typeof this.previousActiveElement.focus === 'function') {\n this.previousActiveElement.focus();\n }\n\n this.pdsModalClose.emit();\n } catch (error) {\n console.error('Failed to hide modal:', error);\n }\n }\n }\n\n private handleBackdropClick = (e: MouseEvent) => {\n if (!this.backdropDismiss || !this.open) return;\n\n if ((e.target as HTMLElement).classList.contains('pds-modal__backdrop')) {\n e.stopPropagation();\n\n // Only close if this is the innermost modal\n if (this.isInnermostModal()) {\n this.hideModal();\n }\n }\n };\n\n /**\n * Gets the z-index of a modal's backdrop element\n */\n private getBackdropZIndex(modal: Element): number {\n const backdrop = modal.querySelector('.pds-modal__backdrop');\n return backdrop ? parseInt(getComputedStyle(backdrop).zIndex, 10) : -1;\n }\n\n /**\n * Checks if this modal is the innermost (highest z-index) modal\n */\n private isInnermostModal(): boolean {\n // Find all open modals\n const openModals = Array.from(document.querySelectorAll('pds-modal')).filter(\n modal => modal.open\n );\n\n if (openModals.length === 0) return false;\n\n // Get this modal's backdrop element\n const thisBackdrop = this.el.querySelector('.pds-modal__backdrop');\n if (!thisBackdrop) return false;\n\n // Get computed z-index of all open modal backdrops\n const modalZIndexes = openModals.map(modal => this.getBackdropZIndex(modal));\n\n // Get the highest z-index\n const maxZIndex = Math.max(...modalZIndexes);\n\n // Check if this modal's backdrop has the highest z-index\n const thisZIndex = this.getBackdropZIndex(this.el);\n return thisZIndex === maxZIndex;\n }\n\n private handleKeyDown = (e: KeyboardEvent) => {\n // If the modal is not open, don't handle any keyboard events\n if (!this.open) return;\n\n // Handle Escape key to close the modal\n if (e.key === 'Escape') {\n // Only close if this is the innermost modal\n if (this.isInnermostModal()) {\n e.preventDefault();\n this.hideModal();\n }\n return;\n }\n\n // Handle Tab key for focus trapping\n if (e.key === 'Tab') {\n // If there are no focusable elements, do nothing\n if (this.focusableElements.length === 0) return;\n\n // Get the first and last focusable elements\n const firstFocusableElement = this.focusableElements[0];\n const lastFocusableElement = this.focusableElements[this.focusableElements.length - 1];\n\n // Get the current active element\n const activeElement = document.activeElement;\n\n // Check if we need to wrap focus\n const isFirstElement = activeElement === firstFocusableElement ||\n firstFocusableElement.contains(activeElement as Node);\n\n const isLastElement = activeElement === lastFocusableElement ||\n lastFocusableElement.contains(activeElement as Node);\n\n // If shift + tab is pressed and focus is on the first element, move to the last element\n if (e.shiftKey && isFirstElement) {\n e.preventDefault();\n this.focusElement(lastFocusableElement);\n }\n // If tab is pressed and focus is on the last element, move to the first element\n else if (!e.shiftKey && isLastElement) {\n e.preventDefault();\n this.focusElement(firstFocusableElement);\n }\n }\n };\n\n render() {\n return (\n <dialog\n class={{\n 'pds-modal__backdrop': true,\n 'open': this.open\n }}\n aria-modal=\"true\"\n aria-labelledby={`${this.componentId}-heading`}\n onClick={this.handleBackdropClick}\n >\n <div\n class={`pds-modal pds-modal--${this.size} pds-modal--scrollable`}\n >\n <slot></slot>\n </div>\n </dialog>\n );\n }\n}\n"],"names":["h"],"mappings":";;;;AAAA,MAAM,WAAW,GAAG,smDAAsmD;;MCO7mD,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;AAQU,QAAA,IAAiB,CAAA,iBAAA,GAAkB,EAAE;AAI7C;;;AAGG;AACK,QAAA,IAAe,CAAA,eAAA,GAAG,IAAI;AAO9B;;;AAGG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;AAErC;;;AAGG;AACK,QAAA,IAAI,CAAA,IAAA,GAAsC,IAAI;AActD;;AAEG;AACM,QAAA,IAAsB,CAAA,sBAAA,GAAkB,EAAE;AAoJ3C,QAAA,IAAA,CAAA,mBAAmB,GAAG,CAAC,CAAa,KAAI;YAC9C,IAAI,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE;YAEzC,IAAK,CAAC,CAAC,MAAsB,CAAC,SAAS,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE;gBACvE,CAAC,CAAC,eAAe,EAAE;;AAGnB,gBAAA,IAAI,IAAI,CAAC,gBAAgB,EAAE,EAAE;oBAC3B,IAAI,CAAC,SAAS,EAAE;;;AAGtB,SAAC;AAoCO,QAAA,IAAA,CAAA,aAAa,GAAG,CAAC,CAAgB,KAAI;;YAE3C,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE;;AAGhB,YAAA,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ,EAAE;;AA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B,MAAM,EAAE,IAAI,CAAC;aACd,EAAA,YAAA,EACU,MAAM,EAAA,iBAAA,EACA,CAAA,EAAG,IAAI,CAAC,WAAW,CAAA,QAAA,CAAU,EAC9C,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAA,EAEjCA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,CAAA,qBAAA,EAAwB,IAAI,CAAC,IAAI,CAAwB,sBAAA,CAAA,EAAA,EAEhEA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT,CACC;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"pds-modal.entry.cjs.js","sources":["src/components/pds-modal/pds-modal.scss?tag=pds-modal","src/components/pds-modal/pds-modal.tsx"],"sourcesContent":[".pds-modal__backdrop {\n align-items: flex-start;\n background-color: rgba(0, 0, 0, 0.4);\n border: 0;\n display: flex;\n height: 100%;\n inset: 0;\n justify-content: center;\n margin: 0;\n max-height: 100%;\n max-width: 100%;\n opacity: 0;\n padding: 0;\n position: fixed;\n transition: opacity 0.2s ease, visibility 0.2s ease;\n visibility: hidden;\n width: 100%;\n z-index: 1000;\n\n @supports (backdrop-filter: blur(3px)) {\n backdrop-filter: blur(3px);\n }\n\n // Increase z-index for nested modals\n pds-modal & {\n z-index: 1001;\n }\n\n &::backdrop {\n background: transparent;\n }\n\n &.open {\n opacity: 1;\n visibility: visible;\n }\n}\n\n.pds-modal {\n background: var(--pine-color-background-container);\n border-radius: var(--pine-dimension-sm);\n box-shadow: var(--pine-box-shadow-400);\n display: flex;\n flex-direction: column;\n margin: var(--pine-dimension-md);\n max-height: none;\n width: 100%;\n\n &.pds-modal--scrollable {\n max-height: calc(100vh - (calc(5vh + 96px)));\n\n @supports (height: 100dvh) {\n max-height: calc(100dvh - (calc(5dvh + 96px)));\n }\n }\n\n @media (min-width: 992px) {\n margin-block-start: 6vh;\n\n @supports (height: 100dvh) {\n margin-block-start: 6dvh;\n }\n }\n\n @media (min-width: 1200px) {\n margin-block-start: 8vh;\n\n @supports (height: 100dvh) {\n margin-block-start: 8dvh;\n }\n }\n}\n\n.pds-modal--sm {\n max-width: 520px;\n}\n\n.pds-modal--md {\n max-width: 700px;\n}\n\n.pds-modal--lg {\n max-width: 900px;\n}\n\n.pds-modal--fullscreen {\n border-radius: 0;\n height: 100%;\n margin: 0;\n max-height: 100vh;\n max-width: 100%;\n\n @supports (height: 100dvh) {\n max-height: 100dvh;\n }\n\n &.pds-modal--scrollable {\n max-height: 100vh;\n\n @supports (height: 100dvh) {\n max-height: 100dvh;\n }\n }\n}\n\n.pds-modal-content {\n .pds-modal--fullscreen & {\n flex: 1;\n }\n}\n\n// Scrollable modal styles (default behavior)\n.pds-modal--scrollable {\n pds-modal-content {\n border-block-end: 1px solid transparent;\n border-block-start: 1px solid transparent;\n overflow-y: auto;\n }\n}\n\n// Non-scrollable modal styles\n.pds-modal:not(.pds-modal--scrollable) {\n pds-modal-content {\n overflow-y: visible;\n }\n}\n\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'pds-modal',\n styleUrl: 'pds-modal.scss',\n shadow: false\n})\nexport class PdsModal {\n private modalRef: HTMLDialogElement;\n private previousActiveElement: HTMLElement;\n private focusableElements: HTMLElement[] = [];\n\n @Element() el: HTMLPdsModalElement;\n\n /**\n * Whether the modal can be dismissed by clicking the backdrop\n * @default true\n */\n @Prop() backdropDismiss = true;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Whether the modal is open\n * @default false\n */\n @Prop({ mutable: true }) open = false;\n\n /**\n * The size of the modal\n * @default 'md'\n */\n @Prop() size: 'sm' | 'md' | 'lg' | 'fullscreen' = 'md';\n\n /**\n * Whether the modal content should be scrollable\n * @default true\n */\n @Prop() scrollable = true;\n\n /**\n * Emitted when the modal is opened\n */\n @Event() pdsModalOpen: EventEmitter<void>;\n\n /**\n * Emitted when the modal is closed\n */\n @Event() pdsModalClose: EventEmitter<void>;\n\n /**\n * Stores the list of focusable elements in the modal\n */\n @State() focusableElementsArray: HTMLElement[] = [];\n\n componentDidLoad() {\n this.modalRef = this.el.querySelector('.pds-modal__backdrop') as HTMLDialogElement;\n // Add keyboard event listener\n document.addEventListener('keydown', this.handleKeyDown);\n }\n\n disconnectedCallback() {\n // Clean up event listener\n document.removeEventListener('keydown', this.handleKeyDown);\n }\n\n @Watch('open')\n handleOpenChange(newValue: boolean) {\n if (newValue) {\n this.showModal();\n } else {\n this.hideModal();\n }\n }\n\n /**\n * Updates the list of focusable elements in the modal\n */\n private updateFocusableElements() {\n if (!this.modalRef) return;\n\n // Get all focusable elements within the modal\n const selector = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n 'pds-button:not([disabled])',\n 'pds-link:not([disabled])',\n 'pds-input:not([disabled])',\n 'pds-checkbox:not([disabled])',\n 'pds-radio:not([disabled])',\n 'pds-switch:not([disabled])',\n 'pds-select:not([disabled])',\n ].join(',');\n\n this.focusableElements = Array.from(\n this.modalRef.querySelectorAll(selector)\n ) as HTMLElement[];\n\n // Filter out elements with display: none or visibility: hidden\n this.focusableElements = this.focusableElements.filter(el => {\n const style = window.getComputedStyle(el);\n return style.display !== 'none' && style.visibility !== 'hidden';\n });\n }\n\n /**\n * Sets focus to the first focusable element in the modal\n */\n private setInitialFocus() {\n if (this.focusableElements.length === 0) return;\n\n // Focus the first focusable element\n const firstElement = this.focusableElements[0];\n\n // For web components, we need to ensure they're properly focused\n this.focusElement(firstElement);\n }\n\n /**\n * Helper method to focus an element, with special handling for web components\n */\n private focusElement(element: HTMLElement) {\n if (!element) return;\n\n try {\n // Try standard focus first\n element.focus();\n\n // Check if focus worked\n setTimeout(() => {\n if (document.activeElement !== element) {\n // For web components, try to find a focusable element inside\n if (element.shadowRoot) {\n const focusableInShadow = element.shadowRoot.querySelector(\n 'button, [tabindex], input, a[href]'\n ) as HTMLElement;\n\n if (focusableInShadow) {\n focusableInShadow.focus();\n }\n }\n }\n }, 0);\n } catch (error) {\n console.error('Error focusing element:', error);\n }\n }\n\n /**\n * Opens the modal\n */\n @Method()\n async showModal() {\n if (this.modalRef) {\n try {\n // Store the currently focused element to restore focus when modal closes\n this.previousActiveElement = document.activeElement as HTMLElement;\n\n // Use native dialog showModal method which makes the rest of the page inert\n this.modalRef.showModal();\n this.open = true;\n\n // Update focusable elements and set initial focus\n // Using a longer timeout to ensure all components are fully rendered\n setTimeout(() => {\n this.updateFocusableElements();\n this.setInitialFocus();\n this.pdsModalOpen.emit();\n }, 100);\n } catch (error) {\n console.error('Failed to show modal:', error);\n }\n }\n }\n\n /**\n * Closes the modal\n */\n @Method()\n async hideModal() {\n if (this.modalRef) {\n try {\n this.modalRef.close();\n this.open = false;\n\n // Restore focus to the element that was focused before the modal was opened\n if (this.previousActiveElement && typeof this.previousActiveElement.focus === 'function') {\n this.previousActiveElement.focus();\n }\n\n this.pdsModalClose.emit();\n } catch (error) {\n console.error('Failed to hide modal:', error);\n }\n }\n }\n\n private handleBackdropClick = (e: MouseEvent) => {\n if (!this.backdropDismiss || !this.open) return;\n\n if ((e.target as HTMLElement).classList.contains('pds-modal__backdrop')) {\n e.stopPropagation();\n\n // Only close if this is the innermost modal\n if (this.isInnermostModal()) {\n this.hideModal();\n }\n }\n };\n\n /**\n * Gets the z-index of a modal's backdrop element\n */\n private getBackdropZIndex(modal: Element): number {\n const backdrop = modal.querySelector('.pds-modal__backdrop');\n return backdrop ? parseInt(getComputedStyle(backdrop).zIndex, 10) : -1;\n }\n\n /**\n * Checks if this modal is the innermost (highest z-index) modal\n */\n private isInnermostModal(): boolean {\n // Find all open modals\n const openModals = Array.from(document.querySelectorAll('pds-modal')).filter(\n modal => modal.open\n );\n\n if (openModals.length === 0) return false;\n\n // Get this modal's backdrop element\n const thisBackdrop = this.el.querySelector('.pds-modal__backdrop');\n if (!thisBackdrop) return false;\n\n // Get computed z-index of all open modal backdrops\n const modalZIndexes = openModals.map(modal => this.getBackdropZIndex(modal));\n\n // Get the highest z-index\n const maxZIndex = Math.max(...modalZIndexes);\n\n // Check if this modal's backdrop has the highest z-index\n const thisZIndex = this.getBackdropZIndex(this.el);\n return thisZIndex === maxZIndex;\n }\n\n private handleKeyDown = (e: KeyboardEvent) => {\n // If the modal is not open, don't handle any keyboard events\n if (!this.open) return;\n\n // Handle Escape key to close the modal\n if (e.key === 'Escape') {\n // Only close if this is the innermost modal\n if (this.isInnermostModal()) {\n e.preventDefault();\n this.hideModal();\n }\n return;\n }\n\n // Handle Tab key for focus trapping\n if (e.key === 'Tab') {\n // If there are no focusable elements, do nothing\n if (this.focusableElements.length === 0) return;\n\n // Get the first and last focusable elements\n const firstFocusableElement = this.focusableElements[0];\n const lastFocusableElement = this.focusableElements[this.focusableElements.length - 1];\n\n // Get the current active element\n const activeElement = document.activeElement;\n\n // Check if we need to wrap focus\n const isFirstElement = activeElement === firstFocusableElement ||\n firstFocusableElement.contains(activeElement as Node);\n\n const isLastElement = activeElement === lastFocusableElement ||\n lastFocusableElement.contains(activeElement as Node);\n\n // If shift + tab is pressed and focus is on the first element, move to the last element\n if (e.shiftKey && isFirstElement) {\n e.preventDefault();\n this.focusElement(lastFocusableElement);\n }\n // If tab is pressed and focus is on the last element, move to the first element\n else if (!e.shiftKey && isLastElement) {\n e.preventDefault();\n this.focusElement(firstFocusableElement);\n }\n }\n };\n\n render() {\n return (\n <dialog\n class={{\n 'pds-modal__backdrop': true,\n 'open': this.open\n }}\n aria-modal=\"true\"\n aria-labelledby={`${this.componentId}-heading`}\n onClick={this.handleBackdropClick}\n >\n <div\n class={{\n 'pds-modal': true,\n [`pds-modal--${this.size}`]: true,\n 'pds-modal--scrollable': this.scrollable\n }}\n >\n <slot></slot>\n </div>\n </dialog>\n );\n }\n}\n"],"names":["h"],"mappings":";;;;AAAA,MAAM,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,cAAc,IAAI,CAAC,IAAI,CAAE,CAAA,GAAG,IAAI;gBACjC,uBAAuB,EAAE,IAAI,CAAC;AAC/B,aAAA,EAAA,EAEDA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT,CACC;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DDTyvZD7.js');
|
|
4
4
|
|
|
5
5
|
const pdsPopoverCss = ":host{--sizing-max-width-default:352px;display:inline-block}:host [popover]{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow-200);box-shadow:var(--pine-box-shadow-200);margin:var(--pine-dimension-none);max-width:var(--sizing-max-width-default);padding:var(--pine-dimension-md);position:fixed}:host button{-ms-flex-align:center;align-items:center;background-color:var(--pine-color-secondary);border:var(--pine-border);border-radius:var(--pine-border-radius-full);color:var(--pine-color-text-secondary);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);font-family:var(--pine-font-family-heading);letter-spacing:var(--pine-letter-spacing);min-height:40px;padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}:host button:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}:host button:hover{background-color:var(--pine-color-secondary-hover)}";
|
|
6
6
|
|
|
@@ -108,7 +108,7 @@ const PdsPopover = class {
|
|
|
108
108
|
popoverEl.style.left = `${left}px`;
|
|
109
109
|
}
|
|
110
110
|
render() {
|
|
111
|
-
return (index.h(index.Host, { key: '
|
|
111
|
+
return (index.h(index.Host, { key: 'f31ca22bbebb2df24412cfab4660e6953d35d65c' }, index.h("button", { key: '74e0c9b393df28138b7f4c11d15e7fc4c6b8de14', class: "pds-popover__trigger", popoverTarget: this.componentId, popoverTargetAction: this.popoverTargetAction, onClick: this.handleClick }, this.text), index.h("div", { key: '0f4d6e601cb4e9d2c890261a72ce92725fa62846', class: `pds-popover ${this.active ? 'pds-popover--active' : ''}`, id: this.componentId, popover: this.popoverType, style: { maxWidth: `${this.maxWidth}px` } }, index.h("slot", { key: '8ab8d2f7de3a175d73f3bfa7d42a84431a82bef1' }))));
|
|
112
112
|
}
|
|
113
113
|
get el() { return index.getElement(this); }
|
|
114
114
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DDTyvZD7.js');
|
|
4
4
|
|
|
5
5
|
const pdsProgressCss = ":host{--color-progress-fill:var(--pine-color-brand);--sizing-progress-bar-width:100%;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:var(--sizing-progress-bar-width)}@-webkit-keyframes progressBar{0%{width:0}100%{width:var(--sizing-progress-bar-width)}}@keyframes progressBar{0%{width:0}100%{width:var(--sizing-progress-bar-width)}}.pds-progress{-ms-flex-align:center;align-items:center;background-color:var(--pine-color-background-container-disabled);border-radius:var(--pine-dimension-2xs);display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:var(--pine-dimension-xs);position:relative;width:100%}:host(.is-animated) progress,:host(.is-animated) progress::-webkit-progress-bar{-webkit-animation:progressBar 3s ease;animation:progressBar 3s ease;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}progress,progress::-webkit-progress-bar{background-color:transparent;border:0;height:var(--pine-dimension-xs);width:100%}progress::-webkit-progress-value{background-color:var(--color-progress-fill, var(--pine-color-brand));border-radius:var(--pine-dimension-2xs)}progress::-moz-progress-bar{background-color:var(--color-progress-fill, var(--pine-color-brand));border-radius:var(--pine-dimension-2xs)}.pds-progress__label{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.pds-progress__percentage{font-weight:var(--pine-font-weight-medium);-webkit-margin-start:calc(var(--pine-dimension-md) / 2);margin-inline-start:calc(var(--pine-dimension-md) / 2)}";
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ const PdsProgress = class {
|
|
|
24
24
|
this.showPercent = false;
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
return (index.h(index.Host, { key: '
|
|
27
|
+
return (index.h(index.Host, { key: '4b85286ee1fcc7ae77f733b915a996bb82aecb5b', class: this.animated ? { 'is-animated': this.animated } : '' }, index.h("div", { key: 'ea3dfbafae2d416aac9903ec50dfade77c315e05', class: "pds-progress" }, index.h("label", { key: '3ece69ae8b90e968d7f86b986faee633d7802a0b', class: "pds-progress__label", htmlFor: this.componentId }, this.label), index.h("progress", { key: '68beb43763d001495159e253562b0934521072d9', id: this.componentId, max: "100", style: this.fillColor ? { '--color-progress-fill': this.fillColor } : {}, value: this.percent })), this.showPercent && index.h("div", { key: '8480b66191aec536b0c2c588e71e5c568f5d0eeb', class: "pds-progress__percentage" }, this.percent, "%")));
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
PdsProgress.style = pdsProgressCss;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DDTyvZD7.js');
|
|
4
4
|
|
|
5
5
|
const pdsPropertyCss = ":host{color:var(--pine-color-text-message);font:var(--pine-typography-body-medium)}";
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ const PdsProperty = class {
|
|
|
13
13
|
this.icon = 'star';
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (index.h(index.Host, { key: '
|
|
16
|
+
return (index.h(index.Host, { key: '4ff2ed5a1b7e551b6c4d86fb43fa64bc83b4e785', id: this.componentId }, index.h("pds-box", { key: '0420487b64550d42621b9548e67c3a79e14b4c91', "align-items": "center", gap: "xs" }, index.h("pds-icon", { key: 'dc8e675839b1f7a6fbce5c7fc10ece743f4a1905', icon: this.icon, size: "var(--pine-dimension-sm)", "aria-hidden": "true" }), index.h("slot", { key: '9b01e2e02d26f8e7629612c617405b9ce7e5397b' }))));
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
PdsProperty.style = pdsPropertyCss;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DDTyvZD7.js');
|
|
4
4
|
var form = require('./form-Bx4nzJBo.js');
|
|
5
|
-
var index$1 = require('./index-
|
|
5
|
+
var index$1 = require('./index-CTirFLR-.js');
|
|
6
6
|
|
|
7
7
|
const labelCss = ".sc-pds-radio-h{display:inline-block}[aria-disabled=true].sc-pds-radio-h label.sc-pds-radio{color:var(--pine-color-text-label-disabled)}[aria-readonly=true].sc-pds-radio-h label.sc-pds-radio{color:var(--pine-color-text-label-readonly)}label.sc-pds-radio{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}";
|
|
8
8
|
|
|
@@ -52,9 +52,9 @@ const PdsRadio = class {
|
|
|
52
52
|
return classNames.join(' ');
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
-
return (index.h(index.Host, { key: '
|
|
56
|
-
index.h("div", { key: '
|
|
57
|
-
index.h("div", { key: '
|
|
55
|
+
return (index.h(index.Host, { key: 'd898e84535e8280a1bec120b0e0b85e6aed57b26', class: this.classNames() }, index.h("label", { key: 'c5731c63d8a177258d6e68b63904e348ee063590', htmlFor: this.componentId }, index.h("input", { key: '30bc1cbdaba793c5e2dc85e662c21cb3cf1eded1', "aria-describedby": form.assignDescription(this.componentId, this.invalid, this.helperMessage), "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 }), index.h("span", { key: 'c349c5b2397acdf1e2d3cf665570c986e0ca0377', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
|
|
56
|
+
index.h("div", { key: '3348ae72477cc9ea7f202b458bbcc6e2cc6b2854', class: 'pds-radio__message', id: form.messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
57
|
+
index.h("div", { key: '1b698ac0ee37a89f4ced06f9fd5da4a40dbff5a2', class: `pds-radio__message pds-radio__message--error`, id: form.messageId(this.componentId, 'error'), "aria-live": "assertive" }, index.h("pds-icon", { key: '2b28cedb3277d98bc458b8fe7ac5e49efd28cf1e', icon: index$1.danger, size: "small" }), this.errorMessage)));
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
PdsRadio.style = labelCss + pdsRadioCss;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DDTyvZD7.js');
|
|
4
4
|
|
|
5
5
|
const pdsRowCss = ":host {\n --row-gap-y: var(--pine-dimension-125);\n --row-gap-x: var(--pine-dimension-125);\n display: block;\n -webkit-margin-after: calc(var(--row-gap-y) * -1);\n margin-block-end: calc(var(--row-gap-y) * -1);\n -webkit-margin-before: calc(var(--row-gap-y) * -1);\n margin-block-start: calc(var(--row-gap-y) * -1);\n -webkit-margin-end: calc(var(--row-gap-x) * -0.5);\n margin-inline-end: calc(var(--row-gap-x) * -0.5);\n -webkit-margin-start: calc(var(--row-gap-x) * -0.5);\n margin-inline-start: calc(var(--row-gap-x) * -0.5);\n}\n\n.pds-row {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-margin-after: calc(var(--row-gap-y) * -1);\n margin-block-end: calc(var(--row-gap-y) * -1);\n -webkit-margin-before: calc(var(--row-gap-y) * -1);\n margin-block-start: calc(var(--row-gap-y) * -1);\n -webkit-margin-end: calc(var(--row-gap-x) * -1);\n margin-inline-end: calc(var(--row-gap-x) * -1);\n -webkit-margin-start: calc(var(--row-gap-x) * -1);\n margin-inline-start: calc(var(--row-gap-x) * -1);\n}\n@layer layout {\n .pds-row > * {\n -webkit-padding-after: calc(var(--row-gap-y));\n padding-block-end: calc(var(--row-gap-y));\n -webkit-padding-before: calc(var(--row-gap-y));\n padding-block-start: calc(var(--row-gap-y));\n -webkit-padding-end: calc(var(--row-gap-x));\n padding-inline-end: calc(var(--row-gap-x));\n -webkit-padding-start: calc(var(--row-gap-x));\n padding-inline-start: calc(var(--row-gap-x));\n }\n}\n\n.pds-row--no-wrap {\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n}\n\n.pds-row--border {\n border: var(--pine-border);\n}\n\n.pds-justify-content-start {\n -ms-flex-pack: start;\n justify-content: start;\n}\n\n.pds-justify-content-center {\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.pds-justify-content-end {\n -ms-flex-pack: end;\n justify-content: end;\n}\n\n.pds-justify-content-space-between {\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n\n.pds-justify-content-space-around {\n -ms-flex-pack: distribute;\n justify-content: space-around;\n}\n\n.pds-justify-content-space-evenly {\n -ms-flex-pack: space-evenly;\n justify-content: space-evenly;\n}\n\n.pds-align-items-start {\n -ms-flex-align: start;\n align-items: start;\n}\n\n.pds-align-items-center {\n -ms-flex-align: center;\n align-items: center;\n}\n\n.pds-align-items-end {\n -ms-flex-align: end;\n align-items: end;\n}\n\n.pds-align-items-stretch {\n -ms-flex-align: stretch;\n align-items: stretch;\n}\n\n.pds-align-items-baseline {\n -ms-flex-align: baseline;\n align-items: baseline;\n}";
|
|
6
6
|
|
|
@@ -43,7 +43,7 @@ const PdsRow = class {
|
|
|
43
43
|
})), (this.minHeight && {
|
|
44
44
|
'min-height': this.minHeight,
|
|
45
45
|
}));
|
|
46
|
-
return index.h(index.Host, { key: '
|
|
46
|
+
return index.h(index.Host, { key: 'd9fd2087c959b16ca168ee2b011a3d4bd466c113', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
PdsRow.style = pdsRowCss;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DDTyvZD7.js');
|
|
4
4
|
var form = require('./form-Bx4nzJBo.js');
|
|
5
|
-
var index$1 = require('./index-
|
|
5
|
+
var index$1 = require('./index-CTirFLR-.js');
|
|
6
6
|
|
|
7
7
|
const pdsSelectTokensCss = ":host{--pine-select-color-background-danger:var(--pine-color-red-050)}";
|
|
8
8
|
|
|
@@ -205,7 +205,7 @@ const PdsSelect = class {
|
|
|
205
205
|
}
|
|
206
206
|
render() {
|
|
207
207
|
const hasAction = this.el.querySelector('[slot="action"]') !== null;
|
|
208
|
-
return (index.h(index.Host, { key: '
|
|
208
|
+
return (index.h(index.Host, { key: '7d2f9b013ba40e8feb4282099eaf2db32b94497b', "aria-disabled": this.disabled ? 'true' : null, class: this.classNames(), "has-action": hasAction && !this.hideLabel ? 'true' : null }, index.h("div", { key: 'fad19d788ff8f3b3b6ec9ef198c753ef4b4dc4c4', class: "pds-select" }, !this.hideLabel && (index.h("div", { key: '870c405e80fbeb3890116a53cd986056af7e4795', class: "pds-select__label-wrapper" }, index.h("label", { key: '6c7232f371f0bd95a94584fe8403eefc25862f5b', htmlFor: this.componentId }, index.h("span", { key: '7a6816bd7d51b05cd935f3e13e27f540cf09e1e1', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), hasAction && this.renderAction())), index.h("select", { key: 'a2bbae963ed55ed73eb614725258745ad20d9acb', "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, onChange: this.onSelectUpdate, part: "select", required: this.required, ref: (el) => (this.selectEl = el) }), index.h("div", { key: 'cd9ef83c08806ab2efc1c4b6851bc634168ede69', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, index.h("slot", { key: 'ae605bfc434bedf4b37e0e96a9124ea7b59d1ede', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && index.h("pds-icon", { key: '360b635e7b4aed8522f0176be553c9e3804dbb3a', class: "pds-select__select-icon", icon: index$1.enlarge }))));
|
|
209
209
|
}
|
|
210
210
|
static get formAssociated() { return true; }
|
|
211
211
|
get el() { return index.getElement(this); }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var index$1 = require('./index-
|
|
3
|
+
var index = require('./index-DDTyvZD7.js');
|
|
4
|
+
var index$1 = require('./index-CTirFLR-.js');
|
|
5
5
|
|
|
6
6
|
const pdsSortableItemCss = ".pds-sortable-item.sc-pds-sortable-item-h{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;padding-block:var(--pine-dimension-xs);padding-inline:var(--pine-dimension-md)}.pds-sortable-item.sc-pds-sortable-item-h .pds-sortable-item__actions.sc-pds-sortable-item{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-padding-start:var(--pine-dimension-md);padding-inline-start:var(--pine-dimension-md)}.pds-sortable-item.sc-pds-sortable-item-h .pds-sortable-item__handle.sc-pds-sortable-item{line-height:1;-webkit-margin-end:var(--pine-dimension-md);margin-inline-end:var(--pine-dimension-md)}.pds-sortable--bordered .pds-sortable-item.sc-pds-sortable-item-h:first-child{border-start-end-radius:calc(var(--pine-dimension-xs) * 1.25);border-start-start-radius:calc(var(--pine-dimension-xs) * 1.25)}.pds-sortable--bordered .pds-sortable-item.sc-pds-sortable-item-h:last-child{border-end-end-radius:calc(var(--pine-dimension-xs) * 1.25);border-end-start-radius:calc(var(--pine-dimension-xs) * 1.25)}.pds-sortable--divided .pds-sortable-item.sc-pds-sortable-item-h{-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border)}.pds-sortable--divided .pds-sortable-item.sc-pds-sortable-item-h:last-child{-webkit-border-after:0;border-block-end:0}.pds-sortable--handle-type-row .pds-sortable-item.sc-pds-sortable-item-h{cursor:-webkit-grab;cursor:grab}.pds-sortable--handle-type-handle .pds-sortable-item.sc-pds-sortable-item-h .pds-sortable-item__handle.sc-pds-sortable-item{cursor:-webkit-grab;cursor:grab}.pds-sortable-item.sc-pds-sortable-item-h:hover{background-color:var(--pine-color-background-container-hover)}.pds-sortable-item.sc-pds-sortable-item-h:hover pds-icon.sc-pds-sortable-item{color:var(--pine-color-info)}.pds-sortable-item--drag.sc-pds-sortable-item-h{background-color:var(--pine-color-background-container);border-radius:0;-webkit-box-shadow:var(--pine-box-shadow-400);box-shadow:var(--pine-box-shadow-400);opacity:1}.pds-sortable-item--ghost.sc-pds-sortable-item-h{background-color:var(--pine-color-background-container-hover);border-radius:0}";
|
|
7
7
|
|
|
@@ -28,7 +28,7 @@ const PdsSortableItem = class {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return (index.h(index.Host, { key: '
|
|
31
|
+
return (index.h(index.Host, { key: '5c5ada49c505d935bfe505997ab69e7eafc2f642', class: "pds-sortable-item", id: this.componentId }, this.showHandle && (index.h("div", { key: '3041977b792e192192fa9c101f113eb42e87ceea', class: "pds-sortable-item__handle" }, index.h("pds-icon", { key: '082a98c200abcc8023dc126ed83091167c59290e', icon: index$1.handle }))), index.h("slot", { key: '1e2b2154acee0c3ce09ec77b9949c761ff37181d' }), this.enableActions && (index.h("div", { key: '5b318f04eb9c74f660900163e17ba51e2c354538', class: "pds-sortable-item__actions" }, index.h("slot", { key: '2c6631a860af0da48b3a007daeff69b59cfaff59', name: "sortable-item-actions" })))));
|
|
32
32
|
}
|
|
33
33
|
get el() { return index.getElement(this); }
|
|
34
34
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index$1 = require('./index-
|
|
3
|
+
var index$1 = require('./index-DDTyvZD7.js');
|
|
4
4
|
|
|
5
5
|
/**!
|
|
6
6
|
* Sortable 1.15.6
|
|
@@ -2713,7 +2713,7 @@ const PdsSortable = class {
|
|
|
2713
2713
|
Sortable.create(this.el, sortableOptions);
|
|
2714
2714
|
}
|
|
2715
2715
|
render() {
|
|
2716
|
-
return (index$1.h(index$1.Host, { key: '
|
|
2716
|
+
return (index$1.h(index$1.Host, { key: '925de28efdf7d2f1b6f6f5b94da4dbb383c0421a', class: this.classNames(), id: this.componentId }, index$1.h("slot", { key: '3525abab4ff66a63c90f4db99e5bb090308afc9d' })));
|
|
2717
2717
|
}
|
|
2718
2718
|
get el() { return index$1.getElement(this); }
|
|
2719
2719
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DDTyvZD7.js');
|
|
4
4
|
var form = require('./form-Bx4nzJBo.js');
|
|
5
|
-
var index$1 = require('./index-
|
|
5
|
+
var index$1 = require('./index-CTirFLR-.js');
|
|
6
6
|
var attributes = require('./attributes-oNMnBEnP.js');
|
|
7
7
|
|
|
8
8
|
const labelCss = ":host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}";
|
|
@@ -89,9 +89,9 @@ const PdsSwitch = class {
|
|
|
89
89
|
this.inheritedAttributes = Object.assign({}, attributes.inheritAriaAttributes(this.el));
|
|
90
90
|
}
|
|
91
91
|
render() {
|
|
92
|
-
return (index.h(index.Host, { key: '
|
|
93
|
-
index.h("div", { key: '
|
|
94
|
-
index.h("div", { key: '
|
|
92
|
+
return (index.h(index.Host, { key: '9dc66ed3d7fa512dec9ab58a451a8c5533000f3b', class: this.switchClassNames(), "aria-disabled": this.disabled ? 'true' : null }, index.h("label", { key: '2f4f9284be0dafe15a78def82f4e2da71b632c11', htmlFor: this.componentId }, index.h("input", Object.assign({ key: '3c183f75fb5ca94ffe50a1f75d233d454374fb98', "aria-describedby": form.assignDescription(this.componentId, this.invalid, this.errorMessage || this.helperMessage), "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)), index.h("span", { key: 'b6cf2e5d68d540413fbebb65e5f942af9dddd718', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
|
|
93
|
+
index.h("div", { key: 'bb1c48c72dbce12e0ebf134d084648ed86125653', class: `pds-switch__message`, id: form.messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
94
|
+
index.h("div", { key: '771e1f08e84f8d37f647443e1835d9db3ea82a2f', class: `pds-switch__message pds-switch__message--error`, id: form.messageId(this.componentId, 'error'), "aria-live": "assertive" }, index.h("pds-icon", { key: 'd54e078c0ea22deedec1ff6b0d1c4881ed0befc1', icon: index$1.danger, size: "small" }), this.errorMessage)));
|
|
95
95
|
}
|
|
96
96
|
static get formAssociated() { return true; }
|
|
97
97
|
get el() { return index.getElement(this); }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DDTyvZD7.js');
|
|
4
4
|
|
|
5
|
-
const pdsTabCss = "pds-tab{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;position:relative}.pds-tabs--pill pds-tab{-ms-flex:1;flex:1}.pds-tab{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:var(--pine-border-width-none);-webkit-box-shadow:none;box-shadow:none;color:inherit;cursor:pointer;font-family:inherit;padding:var(--pine-dimension-none);-ms-flex-align:center;align-items:center;color:var(--pine-color-text-secondary);display:-ms-inline-flexbox;display:inline-flex;position:relative;text-decoration:none;white-space:nowrap}.pds-tab.is-active,.pds-tab[aria-selected=true]{color:var(--pine-color-text)}.pds-tab.is-active .pds-tab__content::after,.pds-tab[aria-selected=true] .pds-tab__content::after{opacity:1}.pds-tab:hover{color:var(--pine-color-text)}.pds-tab:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tab .pds-tab__content{font-family:var(--pine-font-family-body);font-size:var(--pine-font-size);font-weight:var(--pine-font-weight-medium);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);-webkit-padding-after:11px;padding-block-end:11px;position:relative}.pds-tab .pds-tab__content::after{background-color:var(--pine-color-brand);content:\"\";height:3px;inset-block-end:var(--pine-dimension-none);inset-inline-end:var(--pine-dimension-none);inset-inline-start:var(--pine-dimension-none);opacity:0;position:absolute}.pds-tab .pds-tab-edge{display:none}.pds-tabs--availability{--color-background-tab:transparent}.pds-tabs--availability .pds-tab{background-color:var(--color-background-tab);border-radius:calc(var(--pine-dimension-xs) * 1.25) calc(var(--pine-dimension-xs) * 1.25) var(--pine-dimension-none) var(--pine-dimension-none);padding:8px 16px 13px}.pds-tabs--availability .pds-tab.is-active,.pds-tabs--availability .pds-tab[aria-selected=true]{--color-background-tab:var(--pine-color-secondary)}.pds-tabs--availability .pds-tab.is-active .pds-tab__content::after,.pds-tabs--availability .pds-tab[aria-selected=true] .pds-tab__content::after{opacity:1}.pds-tabs--availability .pds-tab.is-active .pds-tab-edge,.pds-tabs--availability .pds-tab[aria-selected=true] .pds-tab-edge{z-index:1}.pds-tabs--availability .pds-tab:hover:not(.is-active,[aria-selected=true]){--color-background-tab:var(--pine-color-secondary-hover)}.pds-tabs--availability .pds-tab:focus-visible{color:var(--pine-color-text-secondary)}.pds-tabs--availability .pds-tab__content{-webkit-padding-after:7px;padding-block-end:7px}.pds-tabs--availability .pds-tab-edge{bottom:0;display:block;height:8px;inset-inline-end:100%;overflow:hidden;position:absolute;width:8px}.pds-tabs--availability .pds-tab-edge::before{border-radius:50%;bottom:0;-webkit-box-shadow:4px 4px 0 0 var(--color-background-tab);box-shadow:4px 4px 0 0 var(--color-background-tab);content:\"\";display:block;height:200%;inset-inline-end:0;position:absolute;width:200%}.pds-tabs--availability .pds-tab-edge--end{inset-inline-end:unset;inset-inline-start:100%}.pds-tabs--availability .pds-tab-edge--end::before{-webkit-box-shadow:-4px 4px 0 0 var(--color-background-tab);box-shadow:-4px 4px 0 0 var(--color-background-tab);inset-inline-end:unset;inset-inline-start:0}.pds-tabs--filter .pds-tab{background-color:var(--pine-color-background-container-disabled);border-radius:50px;color:var(--pine-color-text);padding:6px 15px}.pds-tabs--filter .pds-tab.is-active,.pds-tabs--filter .pds-tab[aria-selected=true]{background-color:var(--pine-color-primary);color:var(--pine-color-text-primary)}.pds-tabs--filter .pds-tab.is-active:hover,.pds-tabs--filter .pds-tab[aria-selected=true]:hover{background-color:var(--pine-color-primary-hover)}.pds-tabs--filter .pds-tab:hover:not(.is-active,[aria-selected=true]){background-color:var(--pine-color-border-disabled)}.pds-tabs--filter .pds-tab__content{-webkit-padding-after:var(--pine-dimension-none);padding-block-end:var(--pine-dimension-none)}.pds-tabs--filter .pds-tab__content::after{content:unset}.pds-tabs--pill{--color-background-tab:transparent}.pds-tabs--pill .pds-tab{background-color:var(--color-background-tab);border:var(--pine-border-width-thin) solid transparent;border-radius:var(--pine-dimension-xs);color:var(--pine-color-text-readonly);-ms-flex:1;flex:1;height:34px;-ms-flex-pack:center;justify-content:center}.pds-tabs--pill .pds-tab .pds-tab__content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-webkit-padding-after:0;padding-block-end:0}.pds-tabs--pill .pds-tab.is-active,.pds-tabs--pill .pds-tab[aria-selected=true]{--color-background-tab:var(--pine-color-white);border-color:var(--pine-color-border);-webkit-box-shadow:var(--pine-box-shadow-100);box-shadow:var(--pine-box-shadow-100);color:var(--pine-color-text-active);z-index:1;}.pds-tabs--pill .pds-tab.is-active:focus-visible,.pds-tabs--pill .pds-tab[aria-selected=true]:focus-visible{border-color:var(--color-border-focus);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tabs--pill .pds-tab.is-active .pds-tab__content::after,.pds-tabs--pill .pds-tab[aria-selected=true] .pds-tab__content::after{opacity:0}";
|
|
5
|
+
const pdsTabCss = "pds-tab{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;position:relative}.pds-tabs--pill pds-tab{-ms-flex:1;flex:1}.pds-tab{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:var(--pine-border-width-none);-webkit-box-shadow:none;box-shadow:none;color:inherit;cursor:pointer;font-family:inherit;padding:var(--pine-dimension-none);-ms-flex-align:center;align-items:center;color:var(--pine-color-text-secondary);display:-ms-inline-flexbox;display:inline-flex;position:relative;text-decoration:none;white-space:nowrap}.pds-tab.is-active,.pds-tab[aria-selected=true]{color:var(--pine-color-text)}.pds-tab.is-active .pds-tab__content::after,.pds-tab[aria-selected=true] .pds-tab__content::after{opacity:1}.pds-tab:hover{color:var(--pine-color-text)}.pds-tab:focus{outline:none}.pds-tab:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tab .pds-tab__content{font-family:var(--pine-font-family-body);font-size:var(--pine-font-size);font-weight:var(--pine-font-weight-medium);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);-webkit-padding-after:11px;padding-block-end:11px;position:relative}.pds-tab .pds-tab__content::after{background-color:var(--pine-color-brand);content:\"\";height:3px;inset-block-end:var(--pine-dimension-none);inset-inline-end:var(--pine-dimension-none);inset-inline-start:var(--pine-dimension-none);opacity:0;position:absolute}.pds-tab .pds-tab-edge{display:none}.pds-tabs--availability{--color-background-tab:transparent}.pds-tabs--availability .pds-tab{background-color:var(--color-background-tab);border-radius:calc(var(--pine-dimension-xs) * 1.25) calc(var(--pine-dimension-xs) * 1.25) var(--pine-dimension-none) var(--pine-dimension-none);padding:8px 16px 13px}.pds-tabs--availability .pds-tab.is-active,.pds-tabs--availability .pds-tab[aria-selected=true]{--color-background-tab:var(--pine-color-secondary)}.pds-tabs--availability .pds-tab.is-active .pds-tab__content::after,.pds-tabs--availability .pds-tab[aria-selected=true] .pds-tab__content::after{opacity:1}.pds-tabs--availability .pds-tab.is-active .pds-tab-edge,.pds-tabs--availability .pds-tab[aria-selected=true] .pds-tab-edge{z-index:1}.pds-tabs--availability .pds-tab:hover:not(.is-active,[aria-selected=true]){--color-background-tab:var(--pine-color-secondary-hover)}.pds-tabs--availability .pds-tab:focus-visible{color:var(--pine-color-text-secondary)}.pds-tabs--availability .pds-tab__content{-webkit-padding-after:7px;padding-block-end:7px}.pds-tabs--availability .pds-tab-edge{bottom:0;display:block;height:8px;inset-inline-end:100%;overflow:hidden;position:absolute;width:8px}.pds-tabs--availability .pds-tab-edge::before{border-radius:50%;bottom:0;-webkit-box-shadow:4px 4px 0 0 var(--color-background-tab);box-shadow:4px 4px 0 0 var(--color-background-tab);content:\"\";display:block;height:200%;inset-inline-end:0;position:absolute;width:200%}.pds-tabs--availability .pds-tab-edge--end{inset-inline-end:unset;inset-inline-start:100%}.pds-tabs--availability .pds-tab-edge--end::before{-webkit-box-shadow:-4px 4px 0 0 var(--color-background-tab);box-shadow:-4px 4px 0 0 var(--color-background-tab);inset-inline-end:unset;inset-inline-start:0}.pds-tabs--filter .pds-tab{background-color:var(--pine-color-background-container-disabled);border-radius:50px;color:var(--pine-color-text);padding:6px 15px}.pds-tabs--filter .pds-tab.is-active,.pds-tabs--filter .pds-tab[aria-selected=true]{background-color:var(--pine-color-primary);color:var(--pine-color-text-primary)}.pds-tabs--filter .pds-tab.is-active:hover,.pds-tabs--filter .pds-tab[aria-selected=true]:hover{background-color:var(--pine-color-primary-hover)}.pds-tabs--filter .pds-tab:hover:not(.is-active,[aria-selected=true]){background-color:var(--pine-color-border-disabled)}.pds-tabs--filter .pds-tab__content{-webkit-padding-after:var(--pine-dimension-none);padding-block-end:var(--pine-dimension-none)}.pds-tabs--filter .pds-tab__content::after{content:unset}.pds-tabs--pill{--color-background-tab:transparent}.pds-tabs--pill .pds-tab{background-color:var(--color-background-tab);border:var(--pine-border-width-thin) solid transparent;border-radius:var(--pine-dimension-xs);color:var(--pine-color-text-readonly);-ms-flex:1;flex:1;height:34px;-ms-flex-pack:center;justify-content:center}.pds-tabs--pill .pds-tab .pds-tab__content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-webkit-padding-after:0;padding-block-end:0}.pds-tabs--pill .pds-tab.is-active,.pds-tabs--pill .pds-tab[aria-selected=true]{--color-background-tab:var(--pine-color-white);border-color:var(--pine-color-border);-webkit-box-shadow:var(--pine-box-shadow-100);box-shadow:var(--pine-box-shadow-100);color:var(--pine-color-text-active);z-index:1;}.pds-tabs--pill .pds-tab.is-active:focus-visible,.pds-tabs--pill .pds-tab[aria-selected=true]:focus-visible{border-color:var(--color-border-focus);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tabs--pill .pds-tab.is-active .pds-tab__content::after,.pds-tabs--pill .pds-tab[aria-selected=true] .pds-tab__content::after{opacity:0}";
|
|
6
6
|
|
|
7
7
|
const PdsTab = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -18,9 +18,9 @@ const PdsTab = class {
|
|
|
18
18
|
this.pdsTabClick.emit([index, parentComponentId]);
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
const availabilityTabEdgeInlineStart = (index.h("span", { key: '
|
|
22
|
-
const availabilityTabEdgeInlineEnd = (index.h("span", { key: '
|
|
23
|
-
return (index.h(index.Host, { key: '
|
|
21
|
+
const availabilityTabEdgeInlineStart = (index.h("span", { key: '837cf57372db654f6ca411054446ebf0bc27b539', class: "pds-tab-edge", role: "presentation" }));
|
|
22
|
+
const availabilityTabEdgeInlineEnd = (index.h("span", { key: 'e15055442d56b50e6ac21bfb76fc0f599406a4fb', class: "pds-tab-edge pds-tab-edge--end", role: "presentation" }));
|
|
23
|
+
return (index.h(index.Host, { key: '1c02a1c8e5e562449ab954061a10acc3d54c3efc', variant: this.variant, slot: "tabs", index: this.index }, index.h("button", { key: '31b0e173dd738fa272dcaf4fc48a0581978f43b2', role: "tab", id: this.parentComponentId + "__" + this.name, "aria-controls": this.parentComponentId + "__" + this.name + "-panel", tabindex: this.selected ? "0" : "-1", "aria-selected": this.selected ? "true" : "false", class: this.selected ? "pds-tab is-active" : "pds-tab", onClick: this.onTabClick.bind(this, this.index, this.parentComponentId) }, this.variant === "availability" && availabilityTabEdgeInlineStart, this.variant === "availability" && availabilityTabEdgeInlineEnd, index.h("div", { key: '95b4f8d4c226e3b3a174d439816ec4d28cef0686', class: "pds-tab__content" }, index.h("slot", { key: '452a208775d54a290c0fcc6a69f6e546fde29afe' })))));
|
|
24
24
|
}
|
|
25
25
|
get el() { return index.getElement(this); }
|
|
26
26
|
};
|