@pine-ds/core 3.1.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/index.d.ts +20 -0
- package/components/index.js +10 -0
- package/components/index.js.map +1 -1
- package/components/index2.js +1 -1
- package/components/index2.js.map +1 -1
- package/components/mock-pds-modal.d.ts +11 -0
- package/components/mock-pds-modal.js +108 -0
- package/components/mock-pds-modal.js.map +1 -0
- package/components/pds-alert.d.ts +11 -0
- package/components/pds-alert.js +107 -0
- package/components/pds-alert.js.map +1 -0
- package/components/pds-avatar.js +1 -1
- package/components/pds-box.js +1 -110
- package/components/pds-box.js.map +1 -1
- package/components/pds-box2.js +115 -0
- package/components/pds-box2.js.map +1 -0
- package/components/pds-button2.js +1 -1
- package/components/pds-button2.js.map +1 -1
- package/components/pds-checkbox2.js +3 -3
- package/components/pds-chip.js +21 -6
- package/components/pds-chip.js.map +1 -1
- package/components/pds-copytext.js +1 -1
- package/components/pds-divider.js +1 -1
- package/components/pds-dropdown-menu-item.d.ts +11 -0
- package/components/pds-dropdown-menu-item.js +117 -0
- package/components/pds-dropdown-menu-item.js.map +1 -0
- package/components/pds-dropdown-menu-separator.d.ts +11 -0
- package/components/pds-dropdown-menu-separator.js +44 -0
- package/components/pds-dropdown-menu-separator.js.map +1 -0
- package/components/pds-dropdown-menu.d.ts +11 -0
- package/components/pds-dropdown-menu.js +1600 -0
- package/components/pds-dropdown-menu.js.map +1 -0
- package/components/pds-image.js +2 -2
- package/components/pds-input.js +98 -21
- package/components/pds-input.js.map +1 -1
- package/components/pds-link.js +1 -67
- package/components/pds-link.js.map +1 -1
- package/components/pds-link2.js +85 -0
- package/components/pds-link2.js.map +1 -0
- package/components/pds-loader2.js +1 -1
- package/components/pds-modal-content.d.ts +11 -0
- package/components/pds-modal-content.js +111 -0
- package/components/pds-modal-content.js.map +1 -0
- package/components/pds-modal-footer.d.ts +11 -0
- package/components/pds-modal-footer.js +35 -0
- package/components/pds-modal-footer.js.map +1 -0
- package/components/pds-modal-header.d.ts +11 -0
- package/components/pds-modal-header.js +35 -0
- package/components/pds-modal-header.js.map +1 -0
- package/components/pds-modal.d.ts +11 -0
- package/components/pds-modal.js +278 -0
- package/components/pds-modal.js.map +1 -0
- package/components/pds-popover.js +33 -1
- package/components/pds-popover.js.map +1 -1
- package/components/pds-progress.js +1 -1
- package/components/pds-radio.js +3 -3
- package/components/pds-row.js +1 -1
- package/components/pds-select.js +3 -3
- package/components/pds-select.js.map +1 -1
- package/components/pds-sortable-item.js +1 -1
- package/components/pds-sortable.js +1 -1
- package/components/pds-switch.js +3 -3
- package/components/pds-tab.js +3 -3
- 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-table.js +1 -1
- package/components/pds-tabpanel.js +1 -1
- package/components/pds-tabs.js +1 -1
- package/components/pds-text.js +1 -53
- package/components/pds-text.js.map +1 -1
- package/components/pds-text2.js +58 -0
- package/components/pds-text2.js.map +1 -0
- package/components/pds-textarea.js +4 -4
- package/components/pds-toast.d.ts +11 -0
- package/components/pds-toast.js +137 -0
- package/components/pds-toast.js.map +1 -0
- package/components/pds-tooltip.js +299 -81
- package/components/pds-tooltip.js.map +1 -1
- package/components/utils.js +3 -2
- package/components/utils.js.map +1 -1
- package/dist/cjs/{index-CG2Rr2io.js → index-B0qLG6KJ.js} +3 -3
- package/dist/cjs/index-B0qLG6KJ.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mock-pds-modal.cjs.entry.js +86 -0
- package/dist/cjs/mock-pds-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/mock-pds-modal.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-accordion.cjs.entry.js +1 -1
- package/dist/cjs/pds-alert.cjs.entry.js +66 -0
- package/dist/cjs/pds-alert.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-alert.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-avatar.cjs.entry.js +2 -2
- package/dist/cjs/pds-box.cjs.entry.js +2 -2
- 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 +3 -3
- 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 +4 -4
- package/dist/cjs/pds-chip.cjs.entry.js +21 -7
- package/dist/cjs/pds-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-chip.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 +82 -0
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-dropdown-menu-item.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +25 -0
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-dropdown-menu-separator.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +1574 -0
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-dropdown-menu.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-image.cjs.entry.js +2 -2
- package/dist/cjs/pds-input.cjs.entry.js +88 -21
- package/dist/cjs/pds-input.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-input.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-link.cjs.entry.js +16 -4
- package/dist/cjs/pds-link.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-link.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-loader.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal-content.cjs.entry.js +93 -0
- package/dist/cjs/pds-modal-content.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-modal-content.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-modal-footer.cjs.entry.js +20 -0
- package/dist/cjs/pds-modal-footer.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-modal-footer.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-modal-header.cjs.entry.js +20 -0
- package/dist/cjs/pds-modal-header.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-modal-header.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-modal.cjs.entry.js +253 -0
- package/dist/cjs/pds-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-modal.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-popover.cjs.entry.js +33 -1
- package/dist/cjs/pds-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-popover.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-progress.cjs.entry.js +1 -1
- package/dist/cjs/pds-radio.cjs.entry.js +4 -4
- package/dist/cjs/pds-row.cjs.entry.js +1 -1
- package/dist/cjs/pds-select.cjs.entry.js +3 -4
- package/dist/cjs/pds-select.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-select.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-sortable-item.cjs.entry.js +2 -2
- package/dist/cjs/pds-sortable.cjs.entry.js +1 -1
- package/dist/cjs/pds-switch.cjs.entry.js +4 -4
- package/dist/cjs/pds-tab.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-row.cjs.entry.js +1 -1
- package/dist/cjs/pds-table.cjs.entry.js +1 -1
- package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
- package/dist/cjs/pds-tabs.cjs.entry.js +1 -1
- package/dist/cjs/pds-text.cjs.entry.js +2 -2
- package/dist/cjs/pds-text.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-text.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-textarea.cjs.entry.js +6 -6
- package/dist/cjs/pds-toast.cjs.entry.js +104 -0
- package/dist/cjs/pds-toast.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-toast.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-tooltip.cjs.entry.js +297 -79
- package/dist/cjs/pds-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-tooltip.entry.cjs.js.map +1 -1
- package/dist/cjs/pine-core.cjs.js +1 -1
- package/dist/cjs/{utils-CQKIgzWg.js → utils-jWx-Mf12.js} +5 -4
- package/dist/cjs/utils-jWx-Mf12.js.map +1 -0
- package/dist/collection/collection-manifest.json +10 -0
- package/dist/collection/components/pds-alert/pds-alert.css +108 -0
- package/dist/collection/components/pds-alert/pds-alert.js +198 -0
- package/dist/collection/components/pds-alert/pds-alert.js.map +1 -0
- package/dist/collection/components/pds-alert/pds-alert.tokens.css +32 -0
- package/dist/collection/components/pds-alert/stories/pds-alert.stories.js +97 -0
- package/dist/collection/components/pds-avatar/pds-avatar.js +1 -1
- package/dist/collection/components/pds-box/pds-box.js +8 -8
- package/dist/collection/components/pds-box/pds-box.js.map +1 -1
- package/dist/collection/components/pds-button/pds-button.css +17 -5
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +3 -3
- package/dist/collection/components/pds-chip/pds-chip.css +48 -11
- package/dist/collection/components/pds-chip/pds-chip.js +42 -9
- package/dist/collection/components/pds-chip/pds-chip.js.map +1 -1
- package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +18 -1
- package/dist/collection/components/pds-copytext/pds-copytext.js +1 -1
- package/dist/collection/components/pds-divider/pds-divider.js +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +68 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +219 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js.map +1 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.css +4 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +72 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js.map +1 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +16 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +328 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js.map +1 -0
- package/dist/collection/components/pds-dropdown-menu/stories/pds-dropdown-menu.stories.js +44 -0
- package/dist/collection/components/pds-image/pds-image.js +2 -2
- package/dist/collection/components/pds-input/pds-input.css +167 -43
- package/dist/collection/components/pds-input/pds-input.js +212 -21
- package/dist/collection/components/pds-input/pds-input.js.map +1 -1
- package/dist/collection/components/pds-input/stories/pds-input.stories.js +84 -0
- package/dist/collection/components/pds-link/pds-link.css +20 -1
- package/dist/collection/components/pds-link/pds-link.js +33 -2
- package/dist/collection/components/pds-link/pds-link.js.map +1 -1
- package/dist/collection/components/pds-link/stories/pds-link.stories.js +15 -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 +27 -0
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +125 -0
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js.map +1 -0
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.css +8 -0
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +18 -0
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js.map +1 -0
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.css +8 -0
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +18 -0
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js.map +1 -0
- package/dist/collection/components/pds-modal/pds-modal.css +79 -0
- package/dist/collection/components/pds-modal/pds-modal.js +426 -0
- package/dist/collection/components/pds-modal/pds-modal.js.map +1 -0
- package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +415 -0
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +256 -0
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js.map +1 -0
- package/dist/collection/components/pds-popover/pds-popover.js +33 -1
- package/dist/collection/components/pds-popover/pds-popover.js.map +1 -1
- package/dist/collection/components/pds-progress/pds-progress.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.css +34 -4
- package/dist/collection/components/pds-select/pds-select.js +20 -2
- package/dist/collection/components/pds-select/pds-select.js.map +1 -1
- package/dist/collection/components/pds-select/stories/pds-select.stories.js +2 -0
- 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-table/pds-table.js +1 -1
- 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 +1 -1
- package/dist/collection/components/pds-text/pds-text.js +2 -2
- package/dist/collection/components/pds-text/pds-text.js.map +1 -1
- package/dist/collection/components/pds-textarea/pds-textarea.js +4 -4
- package/dist/collection/components/pds-toast/pds-toast.css +153 -0
- package/dist/collection/components/pds-toast/pds-toast.js +263 -0
- package/dist/collection/components/pds-toast/pds-toast.js.map +1 -0
- package/dist/collection/components/pds-toast/stories/pds-toast.stories.js +103 -0
- package/dist/collection/components/pds-tooltip/pds-tooltip.css +2 -12
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +227 -26
- package/dist/collection/components/pds-tooltip/pds-tooltip.js.map +1 -1
- package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +7 -3
- package/dist/collection/utils/interfaces.js +2 -0
- package/dist/collection/utils/interfaces.js.map +1 -0
- package/dist/collection/utils/overlay.js +66 -49
- package/dist/collection/utils/overlay.js.map +1 -1
- package/dist/collection/utils/utils.js +3 -2
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/docs.json +1816 -200
- package/dist/esm/{index-_4gljHh-.js → index-DpOSrebJ.js} +3 -3
- package/dist/esm/index-DpOSrebJ.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mock-pds-modal.entry.js +84 -0
- package/dist/esm/mock-pds-modal.entry.js.map +1 -0
- package/dist/esm/pds-accordion.entry.js +1 -1
- package/dist/esm/pds-alert.entry.js +64 -0
- package/dist/esm/pds-alert.entry.js.map +1 -0
- package/dist/esm/pds-avatar.entry.js +2 -2
- package/dist/esm/pds-box.entry.js +2 -2
- package/dist/esm/pds-box.entry.js.map +1 -1
- package/dist/esm/pds-button.entry.js +3 -3
- package/dist/esm/pds-button.entry.js.map +1 -1
- package/dist/esm/pds-checkbox.entry.js +4 -4
- package/dist/esm/pds-chip.entry.js +21 -7
- package/dist/esm/pds-chip.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 +80 -0
- package/dist/esm/pds-dropdown-menu-item.entry.js.map +1 -0
- package/dist/esm/pds-dropdown-menu-separator.entry.js +23 -0
- package/dist/esm/pds-dropdown-menu-separator.entry.js.map +1 -0
- package/dist/esm/pds-dropdown-menu.entry.js +1572 -0
- package/dist/esm/pds-dropdown-menu.entry.js.map +1 -0
- package/dist/esm/pds-image.entry.js +2 -2
- package/dist/esm/pds-input.entry.js +88 -21
- package/dist/esm/pds-input.entry.js.map +1 -1
- package/dist/esm/pds-link.entry.js +16 -4
- package/dist/esm/pds-link.entry.js.map +1 -1
- package/dist/esm/pds-loader.entry.js +1 -1
- package/dist/esm/pds-modal-content.entry.js +91 -0
- package/dist/esm/pds-modal-content.entry.js.map +1 -0
- package/dist/esm/pds-modal-footer.entry.js +18 -0
- package/dist/esm/pds-modal-footer.entry.js.map +1 -0
- package/dist/esm/pds-modal-header.entry.js +18 -0
- package/dist/esm/pds-modal-header.entry.js.map +1 -0
- package/dist/esm/pds-modal.entry.js +251 -0
- package/dist/esm/pds-modal.entry.js.map +1 -0
- package/dist/esm/pds-popover.entry.js +33 -1
- package/dist/esm/pds-popover.entry.js.map +1 -1
- package/dist/esm/pds-progress.entry.js +1 -1
- package/dist/esm/pds-radio.entry.js +4 -4
- package/dist/esm/pds-row.entry.js +1 -1
- package/dist/esm/pds-select.entry.js +3 -4
- package/dist/esm/pds-select.entry.js.map +1 -1
- package/dist/esm/pds-sortable-item.entry.js +2 -2
- package/dist/esm/pds-sortable.entry.js +1 -1
- package/dist/esm/pds-switch.entry.js +4 -4
- package/dist/esm/pds-tab.entry.js +3 -3
- package/dist/esm/pds-table-body.entry.js +1 -1
- package/dist/esm/pds-table-cell.entry.js +2 -2
- package/dist/esm/pds-table-head-cell.entry.js +3 -3
- package/dist/esm/pds-table-head.entry.js +1 -1
- package/dist/esm/pds-table-row.entry.js +1 -1
- package/dist/esm/pds-table.entry.js +1 -1
- package/dist/esm/pds-tabpanel.entry.js +1 -1
- package/dist/esm/pds-tabs.entry.js +1 -1
- package/dist/esm/pds-text.entry.js +2 -2
- package/dist/esm/pds-text.entry.js.map +1 -1
- package/dist/esm/pds-textarea.entry.js +6 -6
- package/dist/esm/pds-toast.entry.js +102 -0
- package/dist/esm/pds-toast.entry.js.map +1 -0
- package/dist/esm/pds-tooltip.entry.js +297 -79
- package/dist/esm/pds-tooltip.entry.js.map +1 -1
- package/dist/esm/pine-core.js +1 -1
- package/dist/esm/{utils-Dw9B1JDC.js → utils-DkabwBZT.js} +5 -4
- package/dist/esm/utils-DkabwBZT.js.map +1 -0
- package/dist/esm-es5/{index-_4gljHh-.js → index-DpOSrebJ.js} +1 -1
- package/dist/esm-es5/index-DpOSrebJ.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js +2 -0
- package/dist/esm-es5/mock-pds-modal.entry.js.map +1 -0
- package/dist/esm-es5/pds-accordion.entry.js +1 -1
- package/dist/esm-es5/pds-alert.entry.js +2 -0
- package/dist/esm-es5/pds-alert.entry.js.map +1 -0
- 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-chip.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 +2 -0
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js.map +1 -0
- package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +2 -0
- package/dist/esm-es5/pds-dropdown-menu-separator.entry.js.map +1 -0
- package/dist/esm-es5/pds-dropdown-menu.entry.js +2 -0
- package/dist/esm-es5/pds-dropdown-menu.entry.js.map +1 -0
- 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-input.entry.js.map +1 -1
- package/dist/esm-es5/pds-link.entry.js +1 -1
- package/dist/esm-es5/pds-link.entry.js.map +1 -1
- package/dist/esm-es5/pds-loader.entry.js +1 -1
- package/dist/esm-es5/pds-modal-content.entry.js +2 -0
- package/dist/esm-es5/pds-modal-content.entry.js.map +1 -0
- package/dist/esm-es5/pds-modal-footer.entry.js +2 -0
- package/dist/esm-es5/pds-modal-footer.entry.js.map +1 -0
- package/dist/esm-es5/pds-modal-header.entry.js +2 -0
- package/dist/esm-es5/pds-modal-header.entry.js.map +1 -0
- package/dist/esm-es5/pds-modal.entry.js +2 -0
- package/dist/esm-es5/pds-modal.entry.js.map +1 -0
- package/dist/esm-es5/pds-popover.entry.js +1 -1
- package/dist/esm-es5/pds-popover.entry.js.map +1 -1
- package/dist/esm-es5/pds-progress.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-select.entry.js.map +1 -1
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
- package/dist/esm-es5/pds-sortable.entry.js +1 -1
- package/dist/esm-es5/pds-switch.entry.js +1 -1
- package/dist/esm-es5/pds-tab.entry.js +1 -1
- package/dist/esm-es5/pds-table-body.entry.js +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head.entry.js +1 -1
- package/dist/esm-es5/pds-table-row.entry.js +1 -1
- package/dist/esm-es5/pds-table.entry.js +1 -1
- package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
- package/dist/esm-es5/pds-tabs.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js.map +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-toast.entry.js +2 -0
- package/dist/esm-es5/pds-toast.entry.js.map +1 -0
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js.map +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/utils-DkabwBZT.js +2 -0
- package/dist/esm-es5/utils-DkabwBZT.js.map +1 -0
- package/dist/pine-core/mock-pds-modal.entry.esm.js.map +1 -0
- package/dist/pine-core/{p-BjCOR1Nn.system.js.map → p--YvWqEjm.system.js.map} +1 -1
- package/dist/pine-core/p-00599bd8.entry.js +2 -0
- package/dist/pine-core/p-00599bd8.entry.js.map +1 -0
- package/dist/pine-core/{p-a14c8ab4.system.entry.js → p-03d8cb4c.system.entry.js} +2 -2
- package/dist/pine-core/{p-f94703c9.entry.js → p-04195bdb.entry.js} +2 -2
- package/dist/pine-core/p-065208a1.system.entry.js +2 -0
- package/dist/pine-core/p-065208a1.system.entry.js.map +1 -0
- package/dist/pine-core/p-07f45626.entry.js +2 -0
- package/dist/pine-core/p-07f45626.entry.js.map +1 -0
- package/dist/pine-core/{p-0486ad57.entry.js → p-0a11384e.entry.js} +2 -2
- package/dist/pine-core/p-0a87e2fc.system.entry.js +2 -0
- package/dist/pine-core/p-0a87e2fc.system.entry.js.map +1 -0
- package/dist/pine-core/p-0c30661b.system.entry.js +2 -0
- package/dist/pine-core/p-0c30661b.system.entry.js.map +1 -0
- package/dist/pine-core/{p-82e05dcf.entry.js → p-10e2feff.entry.js} +2 -2
- package/dist/pine-core/{p-d2110923.system.entry.js → p-111e7da2.system.entry.js} +2 -2
- package/dist/pine-core/{p-1178485a.system.entry.js → p-13481ef5.system.entry.js} +2 -2
- package/dist/pine-core/{p-1178485a.system.entry.js.map → p-13481ef5.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-68de979e.entry.js → p-19c01019.entry.js} +2 -2
- package/dist/pine-core/p-1d395d27.entry.js +2 -0
- package/dist/pine-core/p-1d395d27.entry.js.map +1 -0
- package/dist/pine-core/{p-4ff0838c.entry.js → p-2007a0b5.entry.js} +2 -2
- package/dist/pine-core/{p-fed4c0c0.system.entry.js → p-27c0ffda.system.entry.js} +2 -2
- package/dist/pine-core/p-35917a1a.entry.js +2 -0
- package/dist/pine-core/p-39a31730.system.entry.js +2 -0
- package/dist/pine-core/p-39a31730.system.entry.js.map +1 -0
- package/dist/pine-core/p-3D0orTx_.system.js.map +1 -0
- package/dist/pine-core/p-3ea415b0.entry.js +2 -0
- package/dist/pine-core/p-3ea415b0.entry.js.map +1 -0
- package/dist/pine-core/p-44f10d3c.entry.js +2 -0
- package/dist/pine-core/p-44f10d3c.entry.js.map +1 -0
- package/dist/pine-core/p-47a7a65b.entry.js +2 -0
- package/dist/pine-core/p-47a7a65b.entry.js.map +1 -0
- package/dist/pine-core/{p-ca09f86a.system.entry.js → p-4b2aab79.system.entry.js} +2 -2
- package/dist/pine-core/p-513c16c7.entry.js +2 -0
- package/dist/pine-core/p-513c16c7.entry.js.map +1 -0
- package/dist/pine-core/{p-950427b2.entry.js → p-51cc93b3.entry.js} +2 -2
- package/dist/pine-core/p-5367f477.system.entry.js +2 -0
- package/dist/pine-core/{p-ceb48b05.system.entry.js → p-593df966.system.entry.js} +2 -2
- package/dist/pine-core/p-5a437fcd.system.entry.js +2 -0
- package/dist/pine-core/p-5a437fcd.system.entry.js.map +1 -0
- package/dist/pine-core/p-5c4aceb7.entry.js +2 -0
- package/dist/pine-core/p-5c4aceb7.entry.js.map +1 -0
- package/dist/pine-core/{p-598ade79.entry.js → p-5e1e7762.entry.js} +2 -2
- package/dist/pine-core/{p-9cdd57de.entry.js → p-60fbeb1c.entry.js} +2 -2
- package/dist/pine-core/p-624db3d6.system.entry.js +2 -0
- package/dist/pine-core/p-624db3d6.system.entry.js.map +1 -0
- package/dist/pine-core/p-65a875f6.entry.js +2 -0
- package/dist/pine-core/p-65a875f6.entry.js.map +1 -0
- package/dist/pine-core/{p-c0f0b368.system.entry.js → p-6a7936e7.system.entry.js} +2 -2
- package/dist/pine-core/{p-a97952fc.system.entry.js → p-73412ca9.system.entry.js} +2 -2
- package/dist/pine-core/{p-a97952fc.system.entry.js.map → p-73412ca9.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-b390c427.entry.js → p-76e35041.entry.js} +2 -2
- package/dist/pine-core/{p-12bee2e5.entry.js → p-76f7cf21.entry.js} +2 -2
- package/dist/pine-core/{p-103b62a1.system.entry.js → p-78327c08.system.entry.js} +2 -2
- package/dist/pine-core/{p-792355e6.entry.js → p-78f29270.entry.js} +2 -2
- package/dist/pine-core/p-79cb7835.system.entry.js +2 -0
- package/dist/pine-core/p-79cb7835.system.entry.js.map +1 -0
- package/dist/pine-core/{p-fd9aa739.system.entry.js → p-7bb3a5d4.system.entry.js} +2 -2
- package/dist/pine-core/{p-e88d58f4.entry.js → p-80f36506.entry.js} +2 -2
- package/dist/pine-core/{p-eda0dc79.entry.js → p-8180b641.entry.js} +2 -2
- package/dist/pine-core/{p-85073252.system.entry.js → p-833b2170.system.entry.js} +2 -2
- package/dist/pine-core/p-86329612.entry.js +2 -0
- package/dist/pine-core/p-86329612.entry.js.map +1 -0
- package/dist/pine-core/p-8b6b0db7.entry.js +2 -0
- package/dist/pine-core/p-8b6b0db7.entry.js.map +1 -0
- package/dist/pine-core/p-8f06b020.entry.js +2 -0
- package/dist/pine-core/p-8f06b020.entry.js.map +1 -0
- package/dist/pine-core/p-942fa145.system.entry.js +2 -0
- package/dist/pine-core/p-942fa145.system.entry.js.map +1 -0
- package/dist/pine-core/{p-1d92261f.system.entry.js → p-959c8247.system.entry.js} +2 -2
- package/dist/pine-core/{p-5763df39.system.entry.js → p-96e9774e.system.entry.js} +2 -2
- package/dist/pine-core/{p-e281ac09.entry.js → p-99b5e1a5.entry.js} +2 -2
- package/dist/pine-core/p-9c01e81b.system.entry.js +2 -0
- package/dist/pine-core/p-9c01e81b.system.entry.js.map +1 -0
- package/dist/pine-core/p-9db1f179.entry.js +2 -0
- package/dist/pine-core/p-9db1f179.entry.js.map +1 -0
- package/dist/pine-core/p-A4_UN20E.system.js.map +1 -0
- package/dist/pine-core/p-B2gfQpwn.system.js.map +1 -0
- package/dist/pine-core/{p-CDhmuxC9.system.js.map → p-B5JFBYFw.system.js.map} +1 -1
- package/dist/pine-core/p-B5LBNcOw.system.js.map +1 -0
- package/dist/pine-core/{p-BJyPFOn0.system.js.map → p-BE1qV1Jc.system.js.map} +1 -1
- package/dist/pine-core/p-BEYGfY83.system.js.map +1 -0
- package/dist/pine-core/{p-B46WXJMn.system.js.map → p-BHZ6CSg4.system.js.map} +1 -1
- package/dist/pine-core/p-BHp2IZGP.system.js.map +1 -0
- package/dist/pine-core/{p-BSINexOf.system.js.map → p-BISuGf0f.system.js.map} +1 -1
- package/dist/pine-core/p-BPQAcMLl.system.js.map +1 -0
- package/dist/pine-core/{p-9niWVsdd.system.js.map → p-BaAcO8Mz.system.js.map} +1 -1
- package/dist/pine-core/p-BcuE4ZrB.system.js.map +1 -0
- package/dist/pine-core/{p-C94EgDFz.system.js → p-BhPuKJbQ.system.js} +2 -2
- package/dist/pine-core/p-BhPuKJbQ.system.js.map +1 -0
- package/dist/pine-core/p-BsL2GDnH.system.js +1 -1
- package/dist/pine-core/{p-DEsea81X.system.js.map → p-BwHnCFqU.system.js.map} +1 -1
- package/dist/pine-core/{p-DVVPJPOu.system.js.map → p-BxBtA60x.system.js.map} +1 -1
- package/dist/pine-core/{p-kMnJefdU.system.js.map → p-C0oRS1F9.system.js.map} +1 -1
- package/dist/pine-core/{p-eKz-xVcI.system.js.map → p-C2d75seA.system.js.map} +1 -1
- package/dist/pine-core/{p-BgcVBzVE.system.js.map → p-CGABEyvz.system.js.map} +1 -1
- package/dist/pine-core/{p-DkJgkLjR.system.js.map → p-CIc_XeAg.system.js.map} +1 -1
- package/dist/pine-core/p-CNYB6FL-.system.js.map +1 -0
- package/dist/pine-core/{p-BW-n3jjz.system.js.map → p-CNkajx9x.system.js.map} +1 -1
- package/dist/pine-core/{p-Dz6toWDZ.system.js.map → p-CS2nVL5p.system.js.map} +1 -1
- package/dist/pine-core/{p-BFPxUBwH.system.js.map → p-CTPMEWZT.system.js.map} +1 -1
- package/dist/pine-core/{p-Cg0JSYH5.system.js.map → p-CTWkFhWu.system.js.map} +1 -1
- package/dist/pine-core/{p-BoNavS-S.system.js.map → p-CcsZC7UR.system.js.map} +1 -1
- package/dist/pine-core/{p-D8WAvG2e.system.js.map → p-CdzfTGbZ.system.js.map} +1 -1
- package/dist/pine-core/p-CkoeYrxa.system.js.map +1 -0
- package/dist/pine-core/p-ClVQjta4.system.js.map +1 -0
- package/dist/pine-core/{p-C0cdB2AV.system.js.map → p-D2UtaGL2.system.js.map} +1 -1
- package/dist/pine-core/{p-YuC61pNM.system.js.map → p-DGyATOIf.system.js.map} +1 -1
- package/dist/pine-core/p-DMeT5CsE.system.js.map +1 -0
- package/dist/pine-core/p-DVhX1_nD.system.js.map +1 -0
- package/dist/pine-core/p-DeW-6a7f.system.js.map +1 -0
- package/dist/pine-core/{p-Cj21y714.system.js.map → p-DgTp_KeO.system.js.map} +1 -1
- package/dist/pine-core/p-DjXmy34u.system.js.map +1 -0
- package/dist/pine-core/p-DkabwBZT.js +2 -0
- package/dist/pine-core/p-DkabwBZT.js.map +1 -0
- package/dist/pine-core/{p-_4gljHh-.js → p-DpOSrebJ.js} +1 -1
- package/dist/pine-core/p-DpOSrebJ.js.map +1 -0
- package/dist/pine-core/{p-B4W0_y2p.system.js → p-DyDReOdO.system.js} +1 -1
- package/dist/pine-core/p-DyDReOdO.system.js.map +1 -0
- package/dist/pine-core/{p-IK9NvSRG.system.js.map → p-EqAbQY8l.system.js.map} +1 -1
- package/dist/pine-core/p-Ke8SGZqs.system.js.map +1 -0
- package/dist/pine-core/{p-CmTz2SvK.system.js.map → p-Mqxw-gWj.system.js.map} +1 -1
- package/dist/pine-core/{p-BVNW4NmT.system.js.map → p-PPIMiuZX.system.js.map} +1 -1
- package/dist/pine-core/p-PkSWq78_.system.js.map +1 -0
- package/dist/pine-core/{p-w3zTyPF1.system.js.map → p-UhZHDNH2.system.js.map} +1 -1
- package/dist/pine-core/p-a52b1413.entry.js +2 -0
- package/dist/pine-core/p-a52b1413.entry.js.map +1 -0
- package/dist/pine-core/{p-7b6b354a.system.entry.js → p-a556a328.system.entry.js} +2 -2
- package/dist/pine-core/{p-c7d4f436.system.entry.js → p-a98cda38.system.entry.js} +2 -2
- package/dist/pine-core/{p-c838b6ef.system.entry.js → p-ab7e4700.system.entry.js} +2 -2
- package/dist/pine-core/{p-6147b1ea.system.entry.js → p-aeaae417.system.entry.js} +2 -2
- package/dist/pine-core/{p-b902f535.entry.js → p-b2820acd.entry.js} +2 -2
- package/dist/pine-core/{p-f439922f.entry.js → p-bf699bad.entry.js} +2 -2
- package/dist/pine-core/{p-f439922f.entry.js.map → p-bf699bad.entry.js.map} +1 -1
- package/dist/pine-core/p-c1909a5d.system.entry.js +2 -0
- package/dist/pine-core/{p-9d0c1b2e.system.entry.js.map → p-c1909a5d.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-e045e337.system.entry.js → p-c551191a.system.entry.js} +2 -2
- package/dist/pine-core/p-c5e1ed09.system.entry.js +2 -0
- package/dist/pine-core/p-c5e1ed09.system.entry.js.map +1 -0
- package/dist/pine-core/{p-596e0292.system.entry.js → p-cc21ddcc.system.entry.js} +2 -2
- package/dist/pine-core/p-d0adaca0.system.entry.js +2 -0
- package/dist/pine-core/p-d0adaca0.system.entry.js.map +1 -0
- package/dist/pine-core/{p-6ad460a7.entry.js → p-d28768d1.entry.js} +2 -2
- package/dist/pine-core/{p-5c396e75.entry.js → p-d35b3494.entry.js} +2 -2
- package/dist/pine-core/{p-98181fa8.system.entry.js → p-d553e05c.system.entry.js} +2 -2
- package/dist/pine-core/{p-a952d40c.system.entry.js → p-d6d453d8.system.entry.js} +2 -2
- package/dist/pine-core/p-dcda4ff5.system.entry.js +2 -0
- package/dist/pine-core/p-dcda4ff5.system.entry.js.map +1 -0
- package/dist/pine-core/p-ddcc4932.entry.js +2 -0
- package/dist/pine-core/{p-ed8c3064.system.entry.js → p-de550d9e.system.entry.js} +2 -2
- package/dist/pine-core/p-dfd5a5b6.system.entry.js +2 -0
- package/dist/pine-core/p-dfd5a5b6.system.entry.js.map +1 -0
- package/dist/pine-core/p-e562ad73.system.entry.js +2 -0
- package/dist/pine-core/p-e562ad73.system.entry.js.map +1 -0
- package/dist/pine-core/p-e9f004c5.entry.js +2 -0
- package/dist/pine-core/p-e9f004c5.entry.js.map +1 -0
- package/dist/pine-core/p-ef9ed75a.system.entry.js +2 -0
- package/dist/pine-core/p-ef9ed75a.system.entry.js.map +1 -0
- package/dist/pine-core/{p-4b59cae8.entry.js → p-f256dd8a.entry.js} +2 -2
- package/dist/pine-core/{p-4b59cae8.entry.js.map → p-f256dd8a.entry.js.map} +1 -1
- package/dist/pine-core/{p-b68cb43d.system.entry.js → p-f46c4618.system.entry.js} +2 -2
- package/dist/pine-core/p-f4fff209.system.entry.js +2 -0
- package/dist/pine-core/p-f4fff209.system.entry.js.map +1 -0
- package/dist/pine-core/{p-3ce8eb9f.entry.js → p-f6b226df.entry.js} +2 -2
- package/dist/pine-core/{p-6a716bff.entry.js → p-f99c59a8.entry.js} +2 -2
- package/dist/pine-core/{p-1b81a8ec.entry.js → p-fb1eb0c4.entry.js} +2 -2
- package/dist/pine-core/{p-8305cd4d.entry.js → p-fb2fb435.entry.js} +2 -2
- package/dist/pine-core/p-fd1ef1e1.entry.js +2 -0
- package/dist/pine-core/p-fd1ef1e1.entry.js.map +1 -0
- package/dist/pine-core/p-fdf3a5ff.entry.js +2 -0
- package/dist/pine-core/{p-d5838288.entry.js.map → p-fdf3a5ff.entry.js.map} +1 -1
- package/dist/pine-core/p-fed5f55e.system.entry.js +2 -0
- package/dist/pine-core/pds-alert.entry.esm.js.map +1 -0
- 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-chip.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-dropdown-menu-item.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-dropdown-menu-separator.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-dropdown-menu.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-input.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-link.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-modal-content.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-modal-footer.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-modal-header.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-modal.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-popover.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-select.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-text.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-toast.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-tooltip.entry.esm.js.map +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/types/components/pds-alert/pds-alert.d.ts +39 -0
- package/dist/types/components/pds-box/pds-box.d.ts +6 -6
- package/dist/types/components/pds-chip/pds-chip.d.ts +9 -1
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +43 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.d.ts +13 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +33 -0
- package/dist/types/components/pds-input/pds-input.d.ts +57 -9
- package/dist/types/components/pds-link/pds-link.d.ts +5 -0
- package/dist/types/components/pds-modal/pds-modal-content/pds-modal-content.d.ts +25 -0
- package/dist/types/components/pds-modal/pds-modal-footer/pds-modal-footer.d.ts +3 -0
- package/dist/types/components/pds-modal/pds-modal-header/pds-modal-header.d.ts +3 -0
- package/dist/types/components/pds-modal/pds-modal.d.ts +72 -0
- package/dist/types/components/pds-modal/test/mock-pds-modal.d.ts +63 -0
- package/dist/types/components/pds-select/pds-select.d.ts +4 -0
- package/dist/types/components/pds-toast/pds-toast.d.ts +57 -0
- package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +31 -3
- package/dist/types/components.d.ts +609 -20
- package/dist/types/utils/interfaces.d.ts +6 -0
- package/dist/types/utils/overlay.d.ts +3 -3
- package/dist/types/utils/utils.d.ts +1 -1
- package/hydrate/index.js +3030 -280
- package/hydrate/index.mjs +3030 -280
- package/package.json +6 -2
- package/dist/cjs/index-CG2Rr2io.js.map +0 -1
- package/dist/cjs/utils-CQKIgzWg.js.map +0 -1
- package/dist/esm/index-_4gljHh-.js.map +0 -1
- package/dist/esm/utils-Dw9B1JDC.js.map +0 -1
- package/dist/esm-es5/index-_4gljHh-.js.map +0 -1
- package/dist/esm-es5/utils-Dw9B1JDC.js +0 -2
- package/dist/esm-es5/utils-Dw9B1JDC.js.map +0 -1
- package/dist/pine-core/p-13b9ed06.system.entry.js +0 -2
- package/dist/pine-core/p-1d690915.entry.js +0 -2
- package/dist/pine-core/p-294f9b1f.entry.js +0 -2
- package/dist/pine-core/p-38246e2f.entry.js +0 -2
- package/dist/pine-core/p-38246e2f.entry.js.map +0 -1
- package/dist/pine-core/p-38d2498e.system.entry.js +0 -2
- package/dist/pine-core/p-38d2498e.system.entry.js.map +0 -1
- package/dist/pine-core/p-433c6687.system.entry.js +0 -2
- package/dist/pine-core/p-433c6687.system.entry.js.map +0 -1
- package/dist/pine-core/p-4ccd2d5e.entry.js +0 -2
- package/dist/pine-core/p-4ccd2d5e.entry.js.map +0 -1
- package/dist/pine-core/p-4e7ca704.entry.js +0 -2
- package/dist/pine-core/p-4e7ca704.entry.js.map +0 -1
- package/dist/pine-core/p-6260135d.system.entry.js +0 -2
- package/dist/pine-core/p-6260135d.system.entry.js.map +0 -1
- package/dist/pine-core/p-82151ac5.entry.js +0 -2
- package/dist/pine-core/p-82151ac5.entry.js.map +0 -1
- package/dist/pine-core/p-8337c77c.entry.js +0 -2
- package/dist/pine-core/p-8337c77c.entry.js.map +0 -1
- package/dist/pine-core/p-953f619f.system.entry.js +0 -2
- package/dist/pine-core/p-9d0c1b2e.system.entry.js +0 -2
- package/dist/pine-core/p-B4W0_y2p.system.js.map +0 -1
- package/dist/pine-core/p-Bu94kuQa.system.js.map +0 -1
- package/dist/pine-core/p-C94EgDFz.system.js.map +0 -1
- package/dist/pine-core/p-CdkqpuKd.system.js.map +0 -1
- package/dist/pine-core/p-CnoLHUtr.system.js.map +0 -1
- package/dist/pine-core/p-Cz3zRtiB.system.js.map +0 -1
- package/dist/pine-core/p-DFmUOrRG.system.js.map +0 -1
- package/dist/pine-core/p-DhwO1z4v.system.js.map +0 -1
- package/dist/pine-core/p-Dv_jWtcr.system.js.map +0 -1
- package/dist/pine-core/p-Dw9B1JDC.js +0 -2
- package/dist/pine-core/p-Dw9B1JDC.js.map +0 -1
- package/dist/pine-core/p-_4gljHh-.js.map +0 -1
- package/dist/pine-core/p-d3ab594c.system.entry.js +0 -2
- package/dist/pine-core/p-d3ab594c.system.entry.js.map +0 -1
- package/dist/pine-core/p-d5838288.entry.js +0 -2
- package/dist/pine-core/p-d78bec50.system.entry.js +0 -2
- package/dist/pine-core/p-d78bec50.system.entry.js.map +0 -1
- package/dist/pine-core/p-d8e02aa9.system.entry.js +0 -2
- package/dist/pine-core/p-d8e02aa9.system.entry.js.map +0 -1
- package/dist/pine-core/p-f4898d4f.entry.js +0 -2
- package/dist/pine-core/p-f4898d4f.entry.js.map +0 -1
- /package/dist/pine-core/{p-a14c8ab4.system.entry.js.map → p-03d8cb4c.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f94703c9.entry.js.map → p-04195bdb.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0486ad57.entry.js.map → p-0a11384e.entry.js.map} +0 -0
- /package/dist/pine-core/{p-82e05dcf.entry.js.map → p-10e2feff.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d2110923.system.entry.js.map → p-111e7da2.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-68de979e.entry.js.map → p-19c01019.entry.js.map} +0 -0
- /package/dist/pine-core/{p-4ff0838c.entry.js.map → p-2007a0b5.entry.js.map} +0 -0
- /package/dist/pine-core/{p-fed4c0c0.system.entry.js.map → p-27c0ffda.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-294f9b1f.entry.js.map → p-35917a1a.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ca09f86a.system.entry.js.map → p-4b2aab79.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-950427b2.entry.js.map → p-51cc93b3.entry.js.map} +0 -0
- /package/dist/pine-core/{p-953f619f.system.entry.js.map → p-5367f477.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ceb48b05.system.entry.js.map → p-593df966.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-598ade79.entry.js.map → p-5e1e7762.entry.js.map} +0 -0
- /package/dist/pine-core/{p-9cdd57de.entry.js.map → p-60fbeb1c.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c0f0b368.system.entry.js.map → p-6a7936e7.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b390c427.entry.js.map → p-76e35041.entry.js.map} +0 -0
- /package/dist/pine-core/{p-12bee2e5.entry.js.map → p-76f7cf21.entry.js.map} +0 -0
- /package/dist/pine-core/{p-103b62a1.system.entry.js.map → p-78327c08.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-792355e6.entry.js.map → p-78f29270.entry.js.map} +0 -0
- /package/dist/pine-core/{p-fd9aa739.system.entry.js.map → p-7bb3a5d4.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e88d58f4.entry.js.map → p-80f36506.entry.js.map} +0 -0
- /package/dist/pine-core/{p-eda0dc79.entry.js.map → p-8180b641.entry.js.map} +0 -0
- /package/dist/pine-core/{p-85073252.system.entry.js.map → p-833b2170.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1d92261f.system.entry.js.map → p-959c8247.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5763df39.system.entry.js.map → p-96e9774e.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e281ac09.entry.js.map → p-99b5e1a5.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7b6b354a.system.entry.js.map → p-a556a328.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c7d4f436.system.entry.js.map → p-a98cda38.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c838b6ef.system.entry.js.map → p-ab7e4700.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-6147b1ea.system.entry.js.map → p-aeaae417.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b902f535.entry.js.map → p-b2820acd.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e045e337.system.entry.js.map → p-c551191a.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-596e0292.system.entry.js.map → p-cc21ddcc.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-6ad460a7.entry.js.map → p-d28768d1.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5c396e75.entry.js.map → p-d35b3494.entry.js.map} +0 -0
- /package/dist/pine-core/{p-98181fa8.system.entry.js.map → p-d553e05c.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a952d40c.system.entry.js.map → p-d6d453d8.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1d690915.entry.js.map → p-ddcc4932.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ed8c3064.system.entry.js.map → p-de550d9e.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b68cb43d.system.entry.js.map → p-f46c4618.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3ce8eb9f.entry.js.map → p-f6b226df.entry.js.map} +0 -0
- /package/dist/pine-core/{p-6a716bff.entry.js.map → p-f99c59a8.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1b81a8ec.entry.js.map → p-fb1eb0c4.entry.js.map} +0 -0
- /package/dist/pine-core/{p-8305cd4d.entry.js.map → p-fb2fb435.entry.js.map} +0 -0
- /package/dist/pine-core/{p-13b9ed06.system.entry.js.map → p-fed5f55e.system.entry.js.map} +0 -0
package/hydrate/index.mjs
CHANGED
|
@@ -3071,7 +3071,104 @@ var registerHost = (elm, cmpMeta) => {
|
|
|
3071
3071
|
};
|
|
3072
3072
|
var styles = /* @__PURE__ */ new Map();
|
|
3073
3073
|
|
|
3074
|
-
|
|
3074
|
+
const pdsModalCss$1 = ".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 - (6vh + 96px));width:100%}@media (min-width: 992px){.pds-modal{-webkit-margin-before:6vh;margin-block-start:6vh}}@media (min-width: 1200px){.pds-modal{-webkit-margin-before:8vh;margin-block-start:8vh}}.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%}.pds-modal--fullscreen .pds-modal-content{-ms-flex:1;flex:1}";
|
|
3075
|
+
|
|
3076
|
+
/**
|
|
3077
|
+
* Mock PdsModal component for testing purposes
|
|
3078
|
+
* This component mimics the real PdsModal but without using the Popover API
|
|
3079
|
+
*/
|
|
3080
|
+
class MockPdsModal {
|
|
3081
|
+
constructor(hostRef) {
|
|
3082
|
+
registerInstance(this, hostRef);
|
|
3083
|
+
this.pdsModalOpen = createEvent(this, "pdsModalOpen");
|
|
3084
|
+
this.pdsModalClose = createEvent(this, "pdsModalClose");
|
|
3085
|
+
this.pdsModalBackdropClick = createEvent(this, "pdsModalBackdropClick");
|
|
3086
|
+
/**
|
|
3087
|
+
* The size of the modal
|
|
3088
|
+
*/
|
|
3089
|
+
this.size = 'md';
|
|
3090
|
+
// Modal content is always scrollable by default
|
|
3091
|
+
/**
|
|
3092
|
+
* Whether the modal can be dismissed by clicking the backdrop
|
|
3093
|
+
*/
|
|
3094
|
+
this.backdropDismiss = true;
|
|
3095
|
+
// Native dialog element always closes on Escape key press, so no closeOnEsc property is needed
|
|
3096
|
+
/**
|
|
3097
|
+
* Whether the modal is open
|
|
3098
|
+
*/
|
|
3099
|
+
this.open = false;
|
|
3100
|
+
}
|
|
3101
|
+
/**
|
|
3102
|
+
* Shows the modal
|
|
3103
|
+
*/
|
|
3104
|
+
async showModal() {
|
|
3105
|
+
this.open = true;
|
|
3106
|
+
this.pdsModalOpen.emit();
|
|
3107
|
+
}
|
|
3108
|
+
/**
|
|
3109
|
+
* Hides the modal
|
|
3110
|
+
*/
|
|
3111
|
+
async hideModal() {
|
|
3112
|
+
this.open = false;
|
|
3113
|
+
this.pdsModalClose.emit();
|
|
3114
|
+
}
|
|
3115
|
+
/**
|
|
3116
|
+
* Listen for click events on the backdrop
|
|
3117
|
+
*/
|
|
3118
|
+
// Using direct method instead of @Listen to avoid ESLint warning
|
|
3119
|
+
handleBackdropClick(event) {
|
|
3120
|
+
const backdrop = this.el.querySelector('.pds-modal__backdrop');
|
|
3121
|
+
// Check if the click was directly on the backdrop (not on a child element)
|
|
3122
|
+
if (event.target === backdrop && this.backdropDismiss === true) {
|
|
3123
|
+
this.pdsModalBackdropClick.emit();
|
|
3124
|
+
this.hideModal();
|
|
3125
|
+
}
|
|
3126
|
+
}
|
|
3127
|
+
/**
|
|
3128
|
+
* Listen for keydown events to handle Escape key
|
|
3129
|
+
* Native dialog element always closes on Escape key press
|
|
3130
|
+
*/
|
|
3131
|
+
// Using direct method instead of @Listen to avoid ESLint warning
|
|
3132
|
+
handleKeyDown(event) {
|
|
3133
|
+
if (event.key === 'Escape' && this.open === true) {
|
|
3134
|
+
this.hideModal();
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
componentDidLoad() {
|
|
3138
|
+
// No need to do anything in componentDidLoad for the mock
|
|
3139
|
+
}
|
|
3140
|
+
render() {
|
|
3141
|
+
const modalClasses = {
|
|
3142
|
+
'pds-modal': true,
|
|
3143
|
+
[`pds-modal--${this.size}`]: true,
|
|
3144
|
+
'pds-modal--scrollable': true, // Always scrollable by default
|
|
3145
|
+
};
|
|
3146
|
+
const backdropClasses = {
|
|
3147
|
+
'pds-modal__backdrop': true,
|
|
3148
|
+
'open': this.open,
|
|
3149
|
+
};
|
|
3150
|
+
return (hAsync("div", { key: 'e61d355aaf75d5adc97a3e930f898e075f54d931', class: backdropClasses }, hAsync("div", { key: '059c930eb27b9420ca294b2a7c07e53b15ce1c91', class: modalClasses, role: "dialog", "aria-modal": "true", "aria-labelledby": this.componentId ? `${this.componentId}-heading` : null }, hAsync("div", { key: '9b2423c26eb6f015ee68f73805bd50965a32b5b0', class: "pds-modal__header" }, hAsync("slot", { key: '770d212b20667a1ea4dce88a345f4cbbed363e52', name: "header" })), hAsync("div", { key: '51821cd7d5323ae4543d354589ceabebf0c0ccb0', class: "pds-modal-content" }, hAsync("slot", { key: '475b5844c8f9ac44d7fc366b95ca282a908e0cbb' })), hAsync("div", { key: 'eb67b8e10942d51824296b82947025f8afee8a24', class: "pds-modal__footer" }, hAsync("slot", { key: 'b66c31cd4abfb8d30d5dc66735a367d99f149559', name: "footer" })))));
|
|
3151
|
+
}
|
|
3152
|
+
get el() { return getElement(this); }
|
|
3153
|
+
static get style() { return pdsModalCss$1; }
|
|
3154
|
+
static get cmpMeta() { return {
|
|
3155
|
+
"$flags$": 4,
|
|
3156
|
+
"$tagName$": "mock-pds-modal",
|
|
3157
|
+
"$members$": {
|
|
3158
|
+
"componentId": [1, "component-id"],
|
|
3159
|
+
"size": [1],
|
|
3160
|
+
"backdropDismiss": [4, "backdrop-dismiss"],
|
|
3161
|
+
"open": [1028],
|
|
3162
|
+
"showModal": [64],
|
|
3163
|
+
"hideModal": [64]
|
|
3164
|
+
},
|
|
3165
|
+
"$listeners$": undefined,
|
|
3166
|
+
"$lazyBundleId$": "-",
|
|
3167
|
+
"$attrsToReflect$": []
|
|
3168
|
+
}; }
|
|
3169
|
+
}
|
|
3170
|
+
|
|
3171
|
+
/* pds-icons v9.4.4, ES Modules */
|
|
3075
3172
|
|
|
3076
3173
|
const caretDown = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M5.293 8.293a1 1 0 0 1 1.414 0L12 13.586l5.293-5.293a1 1 0 1 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414'/></svg>";
|
|
3077
3174
|
const checkCircleFilled = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1m5.207 8.707a1 1 0 0 0-1.414-1.414L10.5 13.586l-2.293-2.293a1 1 0 0 0-1.414 1.414l3 3a1 1 0 0 0 1.414 0z'/></svg>";
|
|
@@ -3137,6 +3234,82 @@ class PdsAccordion {
|
|
|
3137
3234
|
}; }
|
|
3138
3235
|
}
|
|
3139
3236
|
|
|
3237
|
+
const pdsAlertTokensCss = ":host{--pine-alert-color-background:var(--pine-color-grey-150);--pine-alert-color-border:var(--pine-color-grey-300);--pine-alert-color-dismiss:var(--pine-color-grey-900);--pine-alert-color-dismiss-hover:var(--pine-color-grey-300);--pine-alert-color-icon:var(--pine-color-grey-700);--pine-alert-color-text:var(--pine-color-grey-950);--pine-alert-color-danger-background:var(--pine-color-red-150);--pine-alert-color-danger-border:var(--pine-color-red-300);--pine-alert-color-danger-dismiss:var(--pine-color-red-900);--pine-alert-color-danger-dismiss-hover:var(--pine-color-red-300);--pine-alert-color-danger-icon:var(--pine-color-red-700);--pine-alert-color-danger-text:var(--pine-color-red-950);--pine-alert-color-info-background:var(--pine-color-blue-150);--pine-alert-color-info-border:var(--pine-color-blue-300);--pine-alert-color-info-dismiss:var(--pine-color-blue-900);--pine-alert-color-info-dismiss-hover:var(--pine-color-blue-300);--pine-alert-color-info-icon:var(--pine-color-blue-700);--pine-alert-color-info-text:var(--pine-color-blue-950);--pine-alert-color-success-background:var(--pine-color-green-150);--pine-alert-color-success-border:var(--pine-color-green-300);--pine-alert-color-success-dismiss:var(--pine-color-green-900);--pine-alert-color-success-dismiss-hover:var(--pine-color-green-300);--pine-alert-color-success-icon:var(--pine-color-green-700);--pine-alert-color-success-text:var(--pine-color-green-950);--pine-alert-color-warning-background:var(--pine-color-yellow-150);--pine-alert-color-warning-border:var(--pine-color-yellow-300);--pine-alert-color-warning-dismiss:var(--pine-color-yellow-900);--pine-alert-color-warning-dismiss-hover:var(--pine-color-yellow-300);--pine-alert-color-warning-icon:var(--pine-color-yellow-700);--pine-alert-color-warning-text:var(--pine-color-yellow-950)}";
|
|
3238
|
+
|
|
3239
|
+
const pdsAlertCss = ":host{display:block;line-height:1;width:100%}.pds-alert__container{--pds-alert-icon-size:var(--pine-dimension-sm);--pds-alert-border-dismiss-outline:2px solid var(--pds-alert-color-dismiss);--pds-alert-background:var(--pine-alert-color-background);--pds-alert-border-color:var(--pine-alert-color-border);--pds-alert-color-icon:var(--pine-alert-color-icon);--pds-alert-color-text:var(--pine-alert-color-text);--pds-alert-color-dismiss:var(--pine-alert-color-dismiss);--pds-alert-background-dismiss-hover:var(--pine-alert-color-dismiss-hover)}.pds-alert__container--danger{--pds-alert-background:var(--pine-alert-color-danger-background);--pds-alert-border-color:var(--pine-alert-color-danger-border);--pds-alert-color-icon:var(--pine-alert-color-danger-icon);--pds-alert-color-text:var(--pine-alert-color-danger-text);--pds-alert-color-dismiss:var(--pine-alert-color-danger-dismiss);--pds-alert-background-dismiss-hover:var(--pine-alert-color-danger-dismiss-hover)}.pds-alert__container--info{--pds-alert-background:var(--pine-alert-color-info-background);--pds-alert-border-color:var(--pine-alert-color-info-border);--pds-alert-color-icon:var(--pine-alert-color-info-icon);--pds-alert-color-text:var(--pine-alert-color-info-text);--pds-alert-color-dismiss:var(--pine-alert-color-info-dismiss);--pds-alert-background-dismiss-hover:var(--pine-alert-color-info-dismiss-hover)}.pds-alert__container--success{--pds-alert-background:var(--pine-alert-color-success-background);--pds-alert-border-color:var(--pine-alert-color-success-border);--pds-alert-color-icon:var(--pine-alert-color-success-icon);--pds-alert-color-text:var(--pine-alert-color-success-text);--pds-alert-color-dismiss:var(--pine-alert-color-success-dismiss);--pds-alert-background-dismiss-hover:var(--pine-alert-color-success-dismiss-hover)}.pds-alert__container--warning{--pds-alert-background:var(--pine-alert-color-warning-background);--pds-alert-border-color:var(--pine-alert-color-warning-border);--pds-alert-color-icon:var(--pine-alert-color-warning-icon);--pds-alert-color-text:var(--pine-alert-color-warning-text);--pds-alert-color-dismiss:var(--pine-alert-color-warning-dismiss);--pds-alert-background-dismiss-hover:var(--pine-alert-color-warning-dismiss-hover)}.pds-alert__icon{-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-alert__icon--small{-webkit-margin-before:calc(var(--pine-dimension-2xs) / 2);margin-block-start:calc(var(--pine-dimension-2xs) / 2)}.pds-alert__content-wrapper{-ms-flex:1;flex:1;min-width:0;overflow:hidden;width:100%}.pds-alert__dismiss{-ms-flex-align:center;align-items:center;background:none;border:0;border-radius:var(--pine-border-radius-full);cursor:pointer;display:-ms-flexbox;display:flex;height:var(--pine-dimension-250);-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-xs);width:var(--pine-dimension-250)}.pds-alert__dismiss:hover{background:var(--pds-alert-background-dismiss-hover);opacity:0.8}.pds-alert__dismiss:focus-visible{outline:var(--pds-alert-border-dismiss-outline)}.pds-alert__description--small{-ms-flex:1 1 auto;flex:1 1 auto;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-alert__actions{-webkit-margin-before:var(--pine-dimension-sm);margin-block-start:var(--pine-dimension-sm)}.pds-alert__actions--small{-ms-flex-negative:0;flex-shrink:0;-webkit-margin-start:auto;margin-inline-start:auto;white-space:nowrap}";
|
|
3240
|
+
|
|
3241
|
+
/**
|
|
3242
|
+
* @slot actions - Slot for alert actions.
|
|
3243
|
+
*/
|
|
3244
|
+
class PdsAlert {
|
|
3245
|
+
constructor(hostRef) {
|
|
3246
|
+
registerInstance(this, hostRef);
|
|
3247
|
+
this.pdsAlertDismissClick = createEvent(this, "pdsAlertDismissClick");
|
|
3248
|
+
/**
|
|
3249
|
+
* If true, the alert is displayed in a smaller size and description text is truncated. Heading is not displayed.
|
|
3250
|
+
*/
|
|
3251
|
+
this.small = false;
|
|
3252
|
+
/**
|
|
3253
|
+
* If true, shows the dismiss button. If false, the dismiss button is hidden.
|
|
3254
|
+
* @defaultValue false
|
|
3255
|
+
*/
|
|
3256
|
+
this.dismissible = false;
|
|
3257
|
+
/**
|
|
3258
|
+
* Sets the style variant of the alert.
|
|
3259
|
+
* @defaultValue 'default'
|
|
3260
|
+
*/
|
|
3261
|
+
this.variant = 'default';
|
|
3262
|
+
this.hasActionsContent = false;
|
|
3263
|
+
this.handleCloseClick = () => {
|
|
3264
|
+
this.pdsAlertDismissClick.emit();
|
|
3265
|
+
};
|
|
3266
|
+
}
|
|
3267
|
+
componentWillRender() {
|
|
3268
|
+
// Check if the actions slot has any content.
|
|
3269
|
+
// If not, hide the actions container to prevent empty space.
|
|
3270
|
+
const actionsSlot = this.el.querySelector('[slot="actions"]');
|
|
3271
|
+
this.hasActionsContent = !!actionsSlot;
|
|
3272
|
+
}
|
|
3273
|
+
renderActions(isSmall) {
|
|
3274
|
+
return (hAsync("pds-box", { class: isSmall ? "pds-alert__actions--small" : "pds-alert__actions", gap: "sm", flex: isSmall ? "none" : undefined, "align-items": isSmall ? undefined : "center" }, hAsync("slot", { name: "actions" })));
|
|
3275
|
+
}
|
|
3276
|
+
renderContent() {
|
|
3277
|
+
if (this.small) {
|
|
3278
|
+
return (hAsync("pds-box", { display: "flex", gap: "md", "align-items": "center" }, hAsync("pds-text", { truncate: this.small, class: "pds-alert__description--small", color: "var(--pds-alert-color-text)", tag: "p" }, hAsync("slot", null)), this.hasActionsContent && this.renderActions(true)));
|
|
3279
|
+
}
|
|
3280
|
+
return (hAsync("div", null, hAsync("pds-text", { class: "pds-alert__description", color: "var(--pds-alert-color-text)", tag: "p" }, hAsync("slot", null)), this.hasActionsContent && this.renderActions(false)));
|
|
3281
|
+
}
|
|
3282
|
+
render() {
|
|
3283
|
+
const iconMap = {
|
|
3284
|
+
danger: 'warning-filled',
|
|
3285
|
+
default: 'info-circle-filled',
|
|
3286
|
+
info: 'info-circle-filled',
|
|
3287
|
+
success: 'check-circle-filled',
|
|
3288
|
+
warning: 'info-circle-filled',
|
|
3289
|
+
};
|
|
3290
|
+
// Get the icon name based on the current variant
|
|
3291
|
+
const iconName = iconMap[this.variant] || iconMap.default;
|
|
3292
|
+
return (hAsync(Host, { key: 'ccb4b954c20b4fedfe1336737a412753bf3c78a2', class: "pds-alert", id: this.componentId, variant: this.variant }, hAsync("pds-box", { key: '6feafdc553ab9854542cb53035486a0caa1f3348', class: `pds-alert__container pds-alert__container--${this.variant}`, "background-color": "var(--pds-alert-background)", "border-color": "var(--pds-alert-border-color)", "border-radius": "md", border: true, display: "block", padding: "md" }, hAsync("pds-box", { key: '86b160e97ac4724434b09cd832f7cdc61834a520', gap: "sm", display: "flex" }, hAsync("pds-icon", { key: 'c2f61f894b3f63915259e298dd9d973b719880c9', class: `pds-alert__icon ${this.small ? 'pds-alert__icon--small' : ''}`, color: "var(--pds-alert-color-icon)", icon: iconName, size: "var(--pds-alert-icon-size)" }), hAsync("pds-box", { key: '07926a4d7d6a1795edd2055ce9ae3d853982fe98', class: "pds-alert__content-wrapper", direction: "column", gap: "xs", flex: "grow" }, this.heading && !this.small && (hAsync("pds-text", { key: '2267241b05890cb4b955cd5418b26f30abd0503c', class: "pds-alert__heading", color: "var(--pds-alert-color-text)", size: "h5", tag: "h3", weight: "medium" }, this.heading)), this.renderContent()), this.dismissible && (hAsync("button", { key: 'bdc435db71e60d9233e97821ea10012f509cae26', class: "pds-alert__dismiss", type: "button", "aria-label": "Dismiss alert", onClick: this.handleCloseClick }, hAsync("pds-icon", { key: '22f013acfafafa6c32da9aa696bef8a8d3c633c0', icon: "remove", size: "var(--pds-alert-icon-size)", "aria-hidden": "true", color: "var(--pds-alert-color-dismiss)" })))))));
|
|
3293
|
+
}
|
|
3294
|
+
get el() { return getElement(this); }
|
|
3295
|
+
static get style() { return pdsAlertTokensCss + pdsAlertCss; }
|
|
3296
|
+
static get cmpMeta() { return {
|
|
3297
|
+
"$flags$": 9,
|
|
3298
|
+
"$tagName$": "pds-alert",
|
|
3299
|
+
"$members$": {
|
|
3300
|
+
"componentId": [1, "component-id"],
|
|
3301
|
+
"heading": [1],
|
|
3302
|
+
"small": [4],
|
|
3303
|
+
"dismissible": [4],
|
|
3304
|
+
"variant": [1],
|
|
3305
|
+
"hasActionsContent": [32]
|
|
3306
|
+
},
|
|
3307
|
+
"$listeners$": undefined,
|
|
3308
|
+
"$lazyBundleId$": "-",
|
|
3309
|
+
"$attrsToReflect$": []
|
|
3310
|
+
}; }
|
|
3311
|
+
}
|
|
3312
|
+
|
|
3140
3313
|
const pdsAvatarCss = ":host{display:inline-block}div{--color-background-container:var(--pine-color-mercury-050);-ms-flex-align:center;align-items:center;background-color:var(--color-background-container);border-radius:var(--border-radius-admin-round, var(--pine-border-radius-full));display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;position:relative}:host(.pds-avatar--admin) div{--border-radius-admin-round:var(--pine-dimension-150);border-radius:var(--border-radius-admin-round)}:host(.pds-avatar--has-image) div{background:transparent}@supports selector(:has){div:has(img){background-color:transparent}}.pds-avatar__button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:var(--pine-dimension-none);border-radius:var(--pine-border-radius-full);cursor:pointer;display:-ms-flexbox;display:flex;padding:var(--pine-dimension-none)}.pds-avatar__button:focus-visible{outline:var(--pine-outline-focus)}.pds-avatar__badge{background-color:var(--pine-color-background-container);border:var(--pine-border);border-color:var(--pine-color-secondary);border-radius:var(--pine-border-radius-round);inset-block-end:var(--pine-dimension-none);inset-inline-end:var(--pine-dimension-none);position:absolute}img{border-radius:var(--border-radius-admin-round, var(--pine-border-radius-full));height:100%;-o-object-fit:cover;object-fit:cover;width:100%}";
|
|
3141
3314
|
|
|
3142
3315
|
/**
|
|
@@ -3222,7 +3395,7 @@ class PdsAvatar {
|
|
|
3222
3395
|
}
|
|
3223
3396
|
}
|
|
3224
3397
|
render() {
|
|
3225
|
-
return (hAsync(Host, { key: '
|
|
3398
|
+
return (hAsync(Host, { key: 'c19584898e4613085f6e6b8e227e7181eb4c8f1b', id: this.componentId, class: Object.assign({}, this.classNames()) }, this.renderAvatar()));
|
|
3226
3399
|
}
|
|
3227
3400
|
static get style() { return pdsAvatarCss; }
|
|
3228
3401
|
static get cmpMeta() { return {
|
|
@@ -3294,8 +3467,8 @@ class PdsBox {
|
|
|
3294
3467
|
this.sizeLg == undefined &&
|
|
3295
3468
|
this.sizeXl == undefined ? 'pds-box' : ''}
|
|
3296
3469
|
`;
|
|
3297
|
-
const boxInlineStyles = Object.assign(Object.assign(Object.assign(Object.assign({}, (this.backgroundColor && { '--color-background-box': this.backgroundColor })), (this.borderColor && { '--color-border-box': this.borderColor })), (this.minHeight && { '--sizing-min-height-box': this.minHeight })), (this.minWidth && { '--sizing-min-
|
|
3298
|
-
return (hAsync(Host, { key: '
|
|
3470
|
+
const boxInlineStyles = Object.assign(Object.assign(Object.assign(Object.assign({}, (this.backgroundColor && { '--color-background-box': this.backgroundColor })), (this.borderColor && { '--color-border-box': this.borderColor })), (this.minHeight && { '--sizing-min-height-box': this.minHeight })), (this.minWidth && { '--sizing-min-width-box': this.minWidth }));
|
|
3471
|
+
return (hAsync(Host, { key: '5a16a73506e9322444b85626dc71dceacbfac263', class: boxClasses, style: boxInlineStyles }));
|
|
3299
3472
|
}
|
|
3300
3473
|
static get style() { return pdsBoxCss; }
|
|
3301
3474
|
static get cmpMeta() { return {
|
|
@@ -3363,11 +3536,11 @@ const debounce = (func, wait = 0) => {
|
|
|
3363
3536
|
timer = setTimeout(func, wait, ...args);
|
|
3364
3537
|
};
|
|
3365
3538
|
};
|
|
3366
|
-
const setColor = (color) => {
|
|
3539
|
+
const setColor = (color, customColors) => {
|
|
3367
3540
|
var _a;
|
|
3368
3541
|
if (!color)
|
|
3369
3542
|
return;
|
|
3370
|
-
const
|
|
3543
|
+
const defaultColors = {
|
|
3371
3544
|
primary: 'var(--pine-color-text-primary)',
|
|
3372
3545
|
secondary: 'var(--pine-color-text-secondary)',
|
|
3373
3546
|
neutral: 'var(--pine-color-text-neutral)',
|
|
@@ -3377,12 +3550,13 @@ const setColor = (color) => {
|
|
|
3377
3550
|
success: 'var(--pine-color-text-success)',
|
|
3378
3551
|
warning: 'var(--pine-color-text-warning)',
|
|
3379
3552
|
};
|
|
3553
|
+
const colors = customColors || defaultColors;
|
|
3380
3554
|
return {
|
|
3381
3555
|
'--color': (_a = colors[color]) !== null && _a !== void 0 ? _a : (color.startsWith('--') ? `var(${color})` : color)
|
|
3382
3556
|
};
|
|
3383
3557
|
};
|
|
3384
3558
|
|
|
3385
|
-
const pdsButtonCss = ":host{--button-
|
|
3559
|
+
const pdsButtonCss = ":host{--pds-button-background:var(--color-background-default);--pds-button-border:var(--pine-border);--pds-button-border-radius:var(--pine-border-radius-full);--pds-button-border-radius-start-end:var(--pine-border-radius-full);--pds-button-border-radius-start-start:var(--pine-border-radius-full);--pds-button-border-radius-end-end:var(--pine-border-radius-full);--pds-button-border-radius-end-start:var(--pine-border-radius-full);--pds-button-min-height:40px;--color-border-default:transparent;--color-border-disabled:transparent;--color-border-focus:transparent;--color-border-hover:transparent;--button-loader-color:var(--color-text-default);display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}:host([full-width=true]){display:-ms-flexbox;display:flex;width:100%}:host([full-width=true]) button{-ms-flex-pack:center;justify-content:center;width:100%}:host([full-width=true]) .pds-button__content{-ms-flex-pack:center;justify-content:center;text-align:center}:host([loading=true]){cursor:wait;pointer-events:none}:host([disabled=true]){pointer-events:none}.pds-button{--pds-loader-color:var(--color-text-default);-ms-flex-align:center;align-items:center;background-color:var(--pds-button-background, var(--color-background-default));border:var(--pds-button-border);border-color:var(--color-border-default);border-end-end-radius:var(--pds-button-border-radius-end-end, var(--pds-button-border-radius));border-end-start-radius:var(--pds-button-border-radius-end-start, var(--pds-button-border-radius));border-radius:var(--pds-button-border-radius);border-start-end-radius:var(--pds-button-border-radius-start-end, var(--pds-button-border-radius));border-start-start-radius:var(--pds-button-border-radius-start-start, var(--pds-button-border-radius));-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--color-text-default);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-brand-label);letter-spacing:var(--pine-letter-spacing);min-height:var(--pds-button-min-height);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);position:relative;text-decoration:none}.pds-button pds-icon{color:currentColor;fill:currentColor}.pds-button:hover{background-color:var(--color-background-hover);border-color:var(--color-border-hover)}.pds-button:focus-visible{border-color:var(--color-border-focus);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-button:disabled{background-color:var(--color-background-disabled);border-color:var(--color-border-disabled);color:var(--color-text-disabled);pointer-events:none}.pds-button--primary{--color-background-default:var(--pine-color-primary);--color-background-hover:var(--pine-color-primary-hover);--color-background-disabled:var(--pine-color-primary-disabled);--color-border-default:var(--pine-color-primary);--color-border-hover:var(--pine-color-primary-hover);--color-text-default:var(--pine-color-text-primary);--color-text-disabled:var(--pine-color-text-primary-disabled);--color-outline:var(--pine-color-focus-ring);--button-loader-color:var(--pine-color-text-primary)}.pds-button--accent{--color-background-default:var(--pine-color-accent);--color-background-hover:var(--pine-color-accent-hover);--color-background-disabled:var(--pine-color-accent-disabled);--color-border-default:var(--pine-color-accent);--color-border-hover:var(--pine-color-accent-hover);--color-text-default:var(--pine-color-text-primary);--color-text-disabled:var(--pine-color-text-accent-disabled);--color-outline:var(--pine-color-focus-ring);--button-loader-color:var(--pine-color-text-primary)}.pds-button--destructive{--color-background-default:var(--pine-color-danger);--color-background-hover:var(--pine-color-danger-hover);--color-background-disabled:var(--pine-color-danger-disabled);--color-border-default:var(--pine-color-danger);--color-border-hover:var(--pine-color-danger-hover);--color-text-default:var(--pine-color-text-primary);--color-text-disabled:var(--pine-color-text-danger-disabled);--color-outline:var(--pine-color-focus-ring-danger);--button-loader-color:var(--pine-color-text-primary)}.pds-button--destructive:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-button--secondary,.pds-button--disclosure{--color-background-default:var(--pine-color-secondary);--color-background-hover:var(--pine-color-secondary-hover);--color-background-disabled:var(--pine-color-secondary-disabled);--color-border-disabled:var(--pine-color-border-disabled);--color-border-focus:var(--pine-color-border);--color-border-hover:var(--pine-color-border-hover);--color-border-default:var(--pine-color-border);--color-text-default:var(--pine-color-text-secondary);--color-text-disabled:var(--pine-color-text-secondary-disabled);--color-outline:var(--pine-color-focus-ring);--button-loader-color:var(--pine-color-text-secondary)}.pds-button--secondary:hover,.pds-button--disclosure:hover{background-color:var(--pine-color-secondary-hover)}.pds-button--unstyled{--color-background-default:transparent;--color-background-hover:transparent;--color-background-disabled:transparent;--color-text-default:inherit;--button-loader-color:inherit;border-width:var(--pine-dimension-none);margin:var(--pine-dimension-none);min-height:auto;padding:var(--pine-dimension-none);width:inherit}.pds-button__content{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;gap:var(--pine-dimension-xs);position:relative;width:100%}.pds-button__icon{display:-ms-inline-flexbox;display:inline-flex}.pds-button__text{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex}.pds-button__icon--hidden,.pds-button__text--hidden{opacity:0}.pds-button__loader{height:var(--pine-dimension-250);left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);width:var(--pine-dimension-250)}.pds-button--loading{cursor:wait;pointer-events:none}.pds-button--loading .pds-button__loader pds-loader{--loader-color:var(--button-loader-color)}.pds-button--icon-only{-ms-flex-align:center;align-items:center;border-radius:var(--pine-border-radius-full);height:var(--button-dimension);-ms-flex-pack:center;justify-content:center;min-height:var(--button-dimension);min-width:var(--button-dimension);padding:var(--pine-dimension-xs);width:var(--button-dimension)}.pds-button--icon-only .pds-button__content{height:100%;-ms-flex-pack:center;justify-content:center;width:100%}.pds-button--icon-only .pds-button__text--hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";
|
|
3386
3560
|
|
|
3387
3561
|
/**
|
|
3388
3562
|
* @part button - Exposes the button element for styling.
|
|
@@ -3701,9 +3875,9 @@ class PdsCheckbox {
|
|
|
3701
3875
|
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
3702
3876
|
}
|
|
3703
3877
|
render() {
|
|
3704
|
-
return (hAsync(Host, { key: '
|
|
3705
|
-
hAsync("div", { key: '
|
|
3706
|
-
hAsync("div", { key: '
|
|
3878
|
+
return (hAsync(Host, { key: 'a60ffb7c96f1d15735f263cb55cd982fbfcbe729', class: this.classNames() }, hAsync("label", { key: '6ed2c8670cded5165761374362d9f1e9f386a4d2', htmlFor: this.componentId }, hAsync("input", Object.assign({ key: '0661b30a9af3bd8ee83b2f3ceb249810a78f19a5', type: "checkbox", "aria-describedby": assignDescription(this.componentId, this.invalid, this.errorMessage || this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, id: this.componentId, indeterminate: this.indeterminate, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleCheckboxChange, onInput: this.handleInput }, this.inheritedAttributes)), hAsync("span", { key: 'b16d78ead4da7ebdffb0f37127bdacf8b1538f86', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
|
|
3879
|
+
hAsync("div", { key: '78e88b11ba9e2759264e08ff0ce9e16c9cf67170', class: 'pds-checkbox__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
3880
|
+
hAsync("div", { key: '0ba7d2bd2b4f6c996eecdd103abe3fb6497e4376', class: `pds-checkbox__message pds-checkbox__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: '65a94316603638e5230de0644fc8ca60e9543b63', icon: danger, size: "small" }), this.errorMessage)));
|
|
3707
3881
|
}
|
|
3708
3882
|
get el() { return getElement(this); }
|
|
3709
3883
|
static get watchers() { return {
|
|
@@ -3735,7 +3909,7 @@ class PdsCheckbox {
|
|
|
3735
3909
|
|
|
3736
3910
|
const pdsChipTokensCss = ":host{--pine-chip-color-accent:var(--pine-color-purple-100);--pine-chip-color-accent-hover:var(--pine-color-purple-300);--pine-chip-color-accent-dot:var(--pine-color-purple-600);--pine-chip-color-danger:var(--pine-color-red-100);--pine-chip-color-danger-hover:var(--pine-color-red-300);--pine-chip-color-danger-dot:var(--pine-color-red-600);--pine-chip-color-info:var(--pine-color-blue-100);--pine-chip-color-info-hover:var(--pine-color-blue-300);--pine-chip-color-info-dot:var(--pine-color-blue-600);--pine-chip-color-neutral:var(--pine-color-grey-100);--pine-chip-color-neutral-hover:var(--pine-color-grey-300);--pine-chip-color-neutral-dot:var(--pine-color-grey-600);--pine-chip-color-success:var(--pine-color-green-100);--pine-chip-color-success-hover:var(--pine-color-green-300);--pine-chip-color-success-dot:var(--pine-color-green-600);--pine-chip-color-warning:var(--pine-color-yellow-100);--pine-chip-color-warning-hover:var(--pine-color-yellow-300);--pine-chip-color-warning-dot:var(--pine-color-yellow-600)}";
|
|
3737
3911
|
|
|
3738
|
-
const pdsChipCss = ":host{--sizing-close:var(--pine-dimension-125);-ms-flex-align:center;align-items:center;border-radius:var(--pine-dimension-sm);display:-ms-inline-flexbox;display:inline-flex;padding-block:var(--pine-dimension-
|
|
3912
|
+
const pdsChipCss = ":host{--sizing-close:var(--pine-dimension-125);-ms-flex-align:center;align-items:center;border-radius:var(--pine-dimension-sm);display:-ms-inline-flexbox;display:inline-flex;padding-block:var(--pine-dimension-025);padding-inline:var(--pine-dimension-150)}:host(.pds-chip--accent){background:var(--pine-chip-color-accent);border:var(--pine-border-width) solid var(--pine-chip-color-accent-hover)}:host(.pds-chip--accent) .pds-chip__dot{background:var(--pine-chip-color-accent-dot)}:host(.pds-chip--accent) .pds-chip__label,:host(.pds-chip--accent) .pds-chip__button,:host(.pds-chip--accent) .pds-chip__close{color:var(--pine-color-text-accent);font-weight:var(--pine-font-weight-medium)}:host(.pds-chip--accent) .pds-chip__close:hover{background:var(--pine-chip-color-accent-hover)}:host(.pds-chip--accent.pds-chip--dropdown:hover){background:var(--pine-chip-color-accent-hover)}:host(.pds-chip--danger){background:var(--pine-chip-color-danger);border:var(--pine-border-width) solid var(--pine-chip-color-danger-hover)}:host(.pds-chip--danger) .pds-chip__dot{background:var(--pine-chip-color-danger-dot)}:host(.pds-chip--danger) .pds-chip__label,:host(.pds-chip--danger) .pds-chip__button,:host(.pds-chip--danger) .pds-chip__close{color:var(--pine-color-text-danger);font-weight:var(--pine-font-weight-medium)}:host(.pds-chip--danger) .pds-chip__close:hover{background:var(--pine-chip-color-danger-hover)}:host(.pds-chip--danger.pds-chip--dropdown:hover){background:var(--pine-chip-color-danger-hover)}:host(.pds-chip--info){background:var(--pine-chip-color-info);border:var(--pine-border-width) solid var(--pine-chip-color-info-hover)}:host(.pds-chip--info) .pds-chip__dot{background:var(--pine-chip-color-info-dot)}:host(.pds-chip--info) .pds-chip__label,:host(.pds-chip--info) .pds-chip__button,:host(.pds-chip--info) .pds-chip__close{color:var(--pine-color-text-info);font-weight:var(--pine-font-weight-medium)}:host(.pds-chip--info) .pds-chip__close:hover{background:var(--pine-chip-color-info-hover)}:host(.pds-chip--info.pds-chip--dropdown:hover){background:var(--pine-chip-color-info-hover)}:host(.pds-chip--neutral){background:var(--pine-chip-color-neutral);border:var(--pine-border-width) solid var(--pine-chip-color-neutral-hover)}:host(.pds-chip--neutral) .pds-chip__dot{background:var(--pine-chip-color-neutral-dot)}:host(.pds-chip--neutral) .pds-chip__label,:host(.pds-chip--neutral) .pds-chip__button,:host(.pds-chip--neutral) .pds-chip__close{color:var(--pine-color-text-neutral);font-weight:var(--pine-font-weight-medium)}:host(.pds-chip--neutral) .pds-chip__close:hover{background:var(--pine-chip-color-neutral-hover)}:host(.pds-chip--neutral.pds-chip--dropdown:hover){background:var(--pine-chip-color-neutral-hover)}:host(.pds-chip--success){background:var(--pine-chip-color-success);border:var(--pine-border-width) solid var(--pine-chip-color-success-hover)}:host(.pds-chip--success) .pds-chip__dot{background:var(--pine-chip-color-success-dot)}:host(.pds-chip--success) .pds-chip__label,:host(.pds-chip--success) .pds-chip__button,:host(.pds-chip--success) .pds-chip__close{color:var(--pine-color-text-success);font-weight:var(--pine-font-weight-medium)}:host(.pds-chip--success) .pds-chip__close:hover{background:var(--pine-chip-color-success-hover)}:host(.pds-chip--success.pds-chip--dropdown:hover){background:var(--pine-chip-color-success-hover)}:host(.pds-chip--warning){background:var(--pine-chip-color-warning);border:var(--pine-border-width) solid var(--pine-chip-color-warning-hover)}:host(.pds-chip--warning) .pds-chip__dot{background:var(--pine-chip-color-warning-dot)}:host(.pds-chip--warning) .pds-chip__label,:host(.pds-chip--warning) .pds-chip__button,:host(.pds-chip--warning) .pds-chip__close{color:var(--pine-color-text-warning);font-weight:var(--pine-font-weight-medium)}:host(.pds-chip--warning) .pds-chip__close:hover{background:var(--pine-chip-color-warning-hover)}:host(.pds-chip--warning.pds-chip--dropdown:hover){background:var(--pine-chip-color-warning-hover)}.pds-chip__dot{border:var(--pine-border-width) solid transparent;border-radius:var(--pine-border-radius-full);display:inline-block;height:var(--pine-dimension-2xs);-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs);width:var(--pine-dimension-2xs)}.pds-chip__label{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}.pds-chip__label pds-icon{-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs)}.pds-chip__label,.pds-chip__button{font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}:host(.pds-chip--dropdown){padding:var(--pine-dimension-none)}.pds-chip__button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:var(--pine-dimension-none);border-radius:var(--pine-dimension-sm);cursor:pointer;display:-ms-flexbox;display:flex;padding:var(--pine-dimension-025) var(--pine-dimension-150)}.pds-chip__button:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-chip__button pds-icon:first-child{-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs)}.pds-chip__button pds-icon:last-child{-webkit-margin-end:calc(var(--pine-dimension-025) * -1);margin-inline-end:calc(var(--pine-dimension-025) * -1);-webkit-margin-start:var(--pine-dimension-2xs);margin-inline-start:var(--pine-dimension-2xs)}.pds-chip__close{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-border-radius-full);height:var(--sizing-close);-webkit-margin-end:calc(var(--pine-dimension-xs) * -1);margin-inline-end:calc(var(--pine-dimension-xs) * -1);-webkit-margin-start:var(--pine-dimension-2xs);margin-inline-start:var(--pine-dimension-2xs);padding:var(--sizing-close);position:relative;width:var(--sizing-close)}.pds-chip__close pds-icon{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.pds-chip__close:focus-visible{outline:var(--pine-outline-focus)}:host(.pds-chip--large){padding-block:var(--pine-dimension-025);padding-inline:var(--pine-dimension-150)}:host(.pds-chip--large) .pds-chip__label,:host(.pds-chip--large) .pds-chip__button{font-family:var(--pine-font-family-heading);font-size:var(--pine-font-size-heading-6);font-weight:var(--pine-font-weight-medium);letter-spacing:var(--pine-letter-spacing-heading-6)}:host(.pds-chip--large.pds-chip--dropdown){padding:var(--pine-dimension-none)}:host(.pds-chip--large.pds-chip--dropdown) .pds-chip__button{padding:var(--pine-dimension-025) var(--pine-dimension-150)}:host(.pds-chip--brand){background:-webkit-gradient(linear, left top, right top, from(#FF3E14), to(#6B62F2));background:linear-gradient(90deg, #FF3E14 0%, #6B62F2 100%);border:0;padding:1px;position:relative}:host(.pds-chip--brand) .pds-chip__label{background:rgba(255, 255, 255, 0.9);border-radius:calc(var(--pine-dimension-sm) - 1px);color:var(--pine-color-text-neutral);font-weight:var(--pine-font-weight-medium);padding:var(--pine-dimension-025) var(--pine-dimension-150);position:relative;z-index:1}:host(.pds-chip--brand) .pds-chip__label pds-icon{-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs)}:host(.pds-chip--brand) .pds-chip__button,:host(.pds-chip--brand) .pds-chip__close{color:var(--pine-color-text-neutral);font-weight:var(--pine-font-weight-medium);position:relative;z-index:1}:host(.pds-chip--brand) .pds-chip__button pds-icon:first-child{-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs)}:host(.pds-chip--brand) .pds-chip__close:hover{background:rgba(255, 255, 255, 0.8)}";
|
|
3739
3913
|
|
|
3740
3914
|
/**
|
|
3741
3915
|
* @slot (default) - The chip's label text.
|
|
@@ -3746,6 +3920,7 @@ class PdsChip {
|
|
|
3746
3920
|
this.pdsTagCloseClick = createEvent(this, "pdsTagCloseClick");
|
|
3747
3921
|
/**
|
|
3748
3922
|
* Determines whether a dot should be displayed on the chip.
|
|
3923
|
+
* Note: This prop is ignored when sentiment is 'brand'.
|
|
3749
3924
|
* @defaultValue false
|
|
3750
3925
|
*/
|
|
3751
3926
|
this.dot = false;
|
|
@@ -3761,6 +3936,7 @@ class PdsChip {
|
|
|
3761
3936
|
this.sentiment = 'neutral';
|
|
3762
3937
|
/**
|
|
3763
3938
|
* Sets the style variant of the chip.
|
|
3939
|
+
* Note: This prop is ignored when sentiment is 'brand'.
|
|
3764
3940
|
* @defaultValue 'text'
|
|
3765
3941
|
*/
|
|
3766
3942
|
this.variant = 'text';
|
|
@@ -3773,21 +3949,33 @@ class PdsChip {
|
|
|
3773
3949
|
if (this.large) {
|
|
3774
3950
|
classNames.push('pds-chip--large');
|
|
3775
3951
|
}
|
|
3776
|
-
|
|
3777
|
-
|
|
3952
|
+
// For brand sentiment, always use text variant
|
|
3953
|
+
const effectiveVariant = this.sentiment === 'brand' ? 'text' : this.variant;
|
|
3954
|
+
if (effectiveVariant) {
|
|
3955
|
+
classNames.push('pds-chip--' + effectiveVariant);
|
|
3778
3956
|
}
|
|
3779
3957
|
if (this.sentiment) {
|
|
3780
3958
|
classNames.push('pds-chip--' + this.sentiment);
|
|
3781
3959
|
}
|
|
3782
3960
|
return classNames.join(' ');
|
|
3783
3961
|
}
|
|
3962
|
+
get effectiveVariant() {
|
|
3963
|
+
// For brand sentiment, force text variant behavior
|
|
3964
|
+
return this.sentiment === 'brand' ? 'text' : this.variant;
|
|
3965
|
+
}
|
|
3966
|
+
get iconSize() {
|
|
3967
|
+
// Icon size based on large prop
|
|
3968
|
+
return this.large ? '14px' : '12px';
|
|
3969
|
+
}
|
|
3784
3970
|
setChipContent() {
|
|
3785
|
-
const isDropdown = this.
|
|
3786
|
-
|
|
3971
|
+
const isDropdown = this.effectiveVariant === 'dropdown';
|
|
3972
|
+
// For brand sentiment, ignore dot prop
|
|
3973
|
+
const showDot = this.sentiment === 'brand' ? false : this.dot;
|
|
3974
|
+
const chipContent = isDropdown ? (hAsync("button", { class: "pds-chip__button", type: "button" }, this.icon && hAsync("pds-icon", { icon: this.icon, size: this.iconSize, "aria-hidden": "true" }), showDot && hAsync("i", { class: "pds-chip__dot", "aria-hidden": "true" }), hAsync("slot", null), hAsync("pds-icon", { icon: downSmall, size: this.iconSize, "aria-hidden": "true" }))) : (hAsync("span", { class: "pds-chip__label" }, this.icon && hAsync("pds-icon", { icon: this.icon, size: this.iconSize, "aria-hidden": "true" }), showDot && hAsync("i", { class: "pds-chip__dot", "aria-hidden": "true" }), hAsync("slot", null)));
|
|
3787
3975
|
return chipContent;
|
|
3788
3976
|
}
|
|
3789
3977
|
render() {
|
|
3790
|
-
return (hAsync(Host, { key: '
|
|
3978
|
+
return (hAsync(Host, { key: '87b74bdc74dcf3d0a7e9818a9643abcaac6ed732', class: this.classNames(), id: this.componentId }, this.setChipContent(), this.effectiveVariant === 'tag' && (hAsync("button", { key: '98644f17a57514b541cd00be5c0972e589f7c44e', class: "pds-chip__close", type: "button", onClick: this.handleCloseClick, "aria-label": "Remove" }, hAsync("pds-icon", { key: '056913f77f7179db7e8f6f8b69df18c4bd98b891', icon: remove, size: this.iconSize })))));
|
|
3791
3979
|
}
|
|
3792
3980
|
static get style() { return pdsChipTokensCss + pdsChipCss; }
|
|
3793
3981
|
static get cmpMeta() { return {
|
|
@@ -3796,6 +3984,7 @@ class PdsChip {
|
|
|
3796
3984
|
"$members$": {
|
|
3797
3985
|
"componentId": [1, "component-id"],
|
|
3798
3986
|
"dot": [4],
|
|
3987
|
+
"icon": [1],
|
|
3799
3988
|
"large": [4],
|
|
3800
3989
|
"sentiment": [1],
|
|
3801
3990
|
"variant": [1]
|
|
@@ -3856,7 +4045,7 @@ class PdsCopytext {
|
|
|
3856
4045
|
return classNames.join(' ');
|
|
3857
4046
|
}
|
|
3858
4047
|
render() {
|
|
3859
|
-
return (hAsync(Host, { key: '
|
|
4048
|
+
return (hAsync(Host, { key: '46c38faeba9b70d2e510a4b6af08866577936478', class: this.classNames(), id: this.componentId }, hAsync("pds-button", { key: '6e28c11a9a7a57f4c256b0283b64ec655a897f65', type: "button", variant: "unstyled", onClick: this.handleClick }, hAsync("span", { key: '6818451171f85fd6ad63f07c69871082d3fcba4e' }, this.value), hAsync("pds-icon", { key: '05e683d7b28575d924d6af482e6ce4c3cfee3f05', icon: copy, size: "16px" }))));
|
|
3860
4049
|
}
|
|
3861
4050
|
static get style() { return pdsCopytextCss; }
|
|
3862
4051
|
static get cmpMeta() { return {
|
|
@@ -3898,7 +4087,7 @@ class PdsDivider {
|
|
|
3898
4087
|
return classNames.join(' ');
|
|
3899
4088
|
}
|
|
3900
4089
|
render() {
|
|
3901
|
-
return (hAsync(Host, { key: '
|
|
4090
|
+
return (hAsync(Host, { key: 'ee48ee45e0463abbd3cb7aa686f8d86928830ccb', id: this.componentId }, hAsync("hr", { key: '4af739f85e502a7d9bff1b3581c283cb6ee53a0e', class: this.classNames() })));
|
|
3902
4091
|
}
|
|
3903
4092
|
static get style() { return pdsDividerCss; }
|
|
3904
4093
|
static get cmpMeta() { return {
|
|
@@ -3915,94 +4104,1789 @@ class PdsDivider {
|
|
|
3915
4104
|
}; }
|
|
3916
4105
|
}
|
|
3917
4106
|
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
4107
|
+
/**
|
|
4108
|
+
* Custom positioning reference element.
|
|
4109
|
+
* @see https://floating-ui.com/docs/virtual-elements
|
|
4110
|
+
*/
|
|
4111
|
+
|
|
4112
|
+
const min = Math.min;
|
|
4113
|
+
const max = Math.max;
|
|
4114
|
+
const round = Math.round;
|
|
4115
|
+
const createCoords = v => ({
|
|
4116
|
+
x: v,
|
|
4117
|
+
y: v
|
|
4118
|
+
});
|
|
4119
|
+
const oppositeSideMap = {
|
|
4120
|
+
left: 'right',
|
|
4121
|
+
right: 'left',
|
|
4122
|
+
bottom: 'top',
|
|
4123
|
+
top: 'bottom'
|
|
3933
4124
|
};
|
|
4125
|
+
const oppositeAlignmentMap = {
|
|
4126
|
+
start: 'end',
|
|
4127
|
+
end: 'start'
|
|
4128
|
+
};
|
|
4129
|
+
function clamp(start, value, end) {
|
|
4130
|
+
return max(start, min(value, end));
|
|
4131
|
+
}
|
|
4132
|
+
function evaluate(value, param) {
|
|
4133
|
+
return typeof value === 'function' ? value(param) : value;
|
|
4134
|
+
}
|
|
4135
|
+
function getSide(placement) {
|
|
4136
|
+
return placement.split('-')[0];
|
|
4137
|
+
}
|
|
4138
|
+
function getAlignment(placement) {
|
|
4139
|
+
return placement.split('-')[1];
|
|
4140
|
+
}
|
|
4141
|
+
function getOppositeAxis(axis) {
|
|
4142
|
+
return axis === 'x' ? 'y' : 'x';
|
|
4143
|
+
}
|
|
4144
|
+
function getAxisLength(axis) {
|
|
4145
|
+
return axis === 'y' ? 'height' : 'width';
|
|
4146
|
+
}
|
|
4147
|
+
function getSideAxis(placement) {
|
|
4148
|
+
return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
|
|
4149
|
+
}
|
|
4150
|
+
function getAlignmentAxis(placement) {
|
|
4151
|
+
return getOppositeAxis(getSideAxis(placement));
|
|
4152
|
+
}
|
|
4153
|
+
function getAlignmentSides(placement, rects, rtl) {
|
|
4154
|
+
if (rtl === void 0) {
|
|
4155
|
+
rtl = false;
|
|
4156
|
+
}
|
|
4157
|
+
const alignment = getAlignment(placement);
|
|
4158
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
4159
|
+
const length = getAxisLength(alignmentAxis);
|
|
4160
|
+
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
4161
|
+
if (rects.reference[length] > rects.floating[length]) {
|
|
4162
|
+
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
4163
|
+
}
|
|
4164
|
+
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
4165
|
+
}
|
|
4166
|
+
function getExpandedPlacements(placement) {
|
|
4167
|
+
const oppositePlacement = getOppositePlacement(placement);
|
|
4168
|
+
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
4169
|
+
}
|
|
4170
|
+
function getOppositeAlignmentPlacement(placement) {
|
|
4171
|
+
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
4172
|
+
}
|
|
4173
|
+
function getSideList(side, isStart, rtl) {
|
|
4174
|
+
const lr = ['left', 'right'];
|
|
4175
|
+
const rl = ['right', 'left'];
|
|
4176
|
+
const tb = ['top', 'bottom'];
|
|
4177
|
+
const bt = ['bottom', 'top'];
|
|
4178
|
+
switch (side) {
|
|
4179
|
+
case 'top':
|
|
4180
|
+
case 'bottom':
|
|
4181
|
+
if (rtl) return isStart ? rl : lr;
|
|
4182
|
+
return isStart ? lr : rl;
|
|
4183
|
+
case 'left':
|
|
4184
|
+
case 'right':
|
|
4185
|
+
return isStart ? tb : bt;
|
|
4186
|
+
default:
|
|
4187
|
+
return [];
|
|
4188
|
+
}
|
|
4189
|
+
}
|
|
4190
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
4191
|
+
const alignment = getAlignment(placement);
|
|
4192
|
+
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
4193
|
+
if (alignment) {
|
|
4194
|
+
list = list.map(side => side + "-" + alignment);
|
|
4195
|
+
if (flipAlignment) {
|
|
4196
|
+
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
4197
|
+
}
|
|
4198
|
+
}
|
|
4199
|
+
return list;
|
|
4200
|
+
}
|
|
4201
|
+
function getOppositePlacement(placement) {
|
|
4202
|
+
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
|
4203
|
+
}
|
|
4204
|
+
function expandPaddingObject(padding) {
|
|
4205
|
+
return {
|
|
4206
|
+
top: 0,
|
|
4207
|
+
right: 0,
|
|
4208
|
+
bottom: 0,
|
|
4209
|
+
left: 0,
|
|
4210
|
+
...padding
|
|
4211
|
+
};
|
|
4212
|
+
}
|
|
4213
|
+
function getPaddingObject(padding) {
|
|
4214
|
+
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
4215
|
+
top: padding,
|
|
4216
|
+
right: padding,
|
|
4217
|
+
bottom: padding,
|
|
4218
|
+
left: padding
|
|
4219
|
+
};
|
|
4220
|
+
}
|
|
4221
|
+
function rectToClientRect(rect) {
|
|
4222
|
+
const {
|
|
4223
|
+
x,
|
|
4224
|
+
y,
|
|
4225
|
+
width,
|
|
4226
|
+
height
|
|
4227
|
+
} = rect;
|
|
4228
|
+
return {
|
|
4229
|
+
width,
|
|
4230
|
+
height,
|
|
4231
|
+
top: y,
|
|
4232
|
+
left: x,
|
|
4233
|
+
right: x + width,
|
|
4234
|
+
bottom: y + height,
|
|
4235
|
+
x,
|
|
4236
|
+
y
|
|
4237
|
+
};
|
|
4238
|
+
}
|
|
4239
|
+
|
|
4240
|
+
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
4241
|
+
let {
|
|
4242
|
+
reference,
|
|
4243
|
+
floating
|
|
4244
|
+
} = _ref;
|
|
4245
|
+
const sideAxis = getSideAxis(placement);
|
|
4246
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
4247
|
+
const alignLength = getAxisLength(alignmentAxis);
|
|
4248
|
+
const side = getSide(placement);
|
|
4249
|
+
const isVertical = sideAxis === 'y';
|
|
4250
|
+
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
4251
|
+
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
4252
|
+
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
4253
|
+
let coords;
|
|
4254
|
+
switch (side) {
|
|
4255
|
+
case 'top':
|
|
4256
|
+
coords = {
|
|
4257
|
+
x: commonX,
|
|
4258
|
+
y: reference.y - floating.height
|
|
4259
|
+
};
|
|
4260
|
+
break;
|
|
4261
|
+
case 'bottom':
|
|
4262
|
+
coords = {
|
|
4263
|
+
x: commonX,
|
|
4264
|
+
y: reference.y + reference.height
|
|
4265
|
+
};
|
|
4266
|
+
break;
|
|
4267
|
+
case 'right':
|
|
4268
|
+
coords = {
|
|
4269
|
+
x: reference.x + reference.width,
|
|
4270
|
+
y: commonY
|
|
4271
|
+
};
|
|
4272
|
+
break;
|
|
4273
|
+
case 'left':
|
|
4274
|
+
coords = {
|
|
4275
|
+
x: reference.x - floating.width,
|
|
4276
|
+
y: commonY
|
|
4277
|
+
};
|
|
4278
|
+
break;
|
|
4279
|
+
default:
|
|
4280
|
+
coords = {
|
|
4281
|
+
x: reference.x,
|
|
4282
|
+
y: reference.y
|
|
4283
|
+
};
|
|
4284
|
+
}
|
|
4285
|
+
switch (getAlignment(placement)) {
|
|
4286
|
+
case 'start':
|
|
4287
|
+
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
4288
|
+
break;
|
|
4289
|
+
case 'end':
|
|
4290
|
+
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
4291
|
+
break;
|
|
4292
|
+
}
|
|
4293
|
+
return coords;
|
|
4294
|
+
}
|
|
4295
|
+
|
|
3934
4296
|
/**
|
|
3935
|
-
*
|
|
3936
|
-
*
|
|
3937
|
-
*
|
|
4297
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
4298
|
+
* next to a given reference element.
|
|
4299
|
+
*
|
|
4300
|
+
* This export does not have any `platform` interface logic. You will need to
|
|
4301
|
+
* write one for the platform you are using Floating UI with.
|
|
3938
4302
|
*/
|
|
3939
|
-
const
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
4303
|
+
const computePosition$1 = async (reference, floating, config) => {
|
|
4304
|
+
const {
|
|
4305
|
+
placement = 'bottom',
|
|
4306
|
+
strategy = 'absolute',
|
|
4307
|
+
middleware = [],
|
|
4308
|
+
platform
|
|
4309
|
+
} = config;
|
|
4310
|
+
const validMiddleware = middleware.filter(Boolean);
|
|
4311
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
4312
|
+
let rects = await platform.getElementRects({
|
|
4313
|
+
reference,
|
|
4314
|
+
floating,
|
|
4315
|
+
strategy
|
|
4316
|
+
});
|
|
4317
|
+
let {
|
|
4318
|
+
x,
|
|
4319
|
+
y
|
|
4320
|
+
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
4321
|
+
let statefulPlacement = placement;
|
|
4322
|
+
let middlewareData = {};
|
|
4323
|
+
let resetCount = 0;
|
|
4324
|
+
for (let i = 0; i < validMiddleware.length; i++) {
|
|
4325
|
+
const {
|
|
4326
|
+
name,
|
|
4327
|
+
fn
|
|
4328
|
+
} = validMiddleware[i];
|
|
4329
|
+
const {
|
|
4330
|
+
x: nextX,
|
|
4331
|
+
y: nextY,
|
|
4332
|
+
data,
|
|
4333
|
+
reset
|
|
4334
|
+
} = await fn({
|
|
4335
|
+
x,
|
|
4336
|
+
y,
|
|
4337
|
+
initialPlacement: placement,
|
|
4338
|
+
placement: statefulPlacement,
|
|
4339
|
+
strategy,
|
|
4340
|
+
middlewareData,
|
|
4341
|
+
rects,
|
|
4342
|
+
platform,
|
|
4343
|
+
elements: {
|
|
4344
|
+
reference,
|
|
4345
|
+
floating
|
|
4346
|
+
}
|
|
4347
|
+
});
|
|
4348
|
+
x = nextX != null ? nextX : x;
|
|
4349
|
+
y = nextY != null ? nextY : y;
|
|
4350
|
+
middlewareData = {
|
|
4351
|
+
...middlewareData,
|
|
4352
|
+
[name]: {
|
|
4353
|
+
...middlewareData[name],
|
|
4354
|
+
...data
|
|
4355
|
+
}
|
|
4356
|
+
};
|
|
4357
|
+
if (reset && resetCount <= 50) {
|
|
4358
|
+
resetCount++;
|
|
4359
|
+
if (typeof reset === 'object') {
|
|
4360
|
+
if (reset.placement) {
|
|
4361
|
+
statefulPlacement = reset.placement;
|
|
3943
4362
|
}
|
|
4363
|
+
if (reset.rects) {
|
|
4364
|
+
rects = reset.rects === true ? await platform.getElementRects({
|
|
4365
|
+
reference,
|
|
4366
|
+
floating,
|
|
4367
|
+
strategy
|
|
4368
|
+
}) : reset.rects;
|
|
4369
|
+
}
|
|
4370
|
+
({
|
|
4371
|
+
x,
|
|
4372
|
+
y
|
|
4373
|
+
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
4374
|
+
}
|
|
4375
|
+
i = -1;
|
|
3944
4376
|
}
|
|
3945
|
-
|
|
4377
|
+
}
|
|
4378
|
+
return {
|
|
4379
|
+
x,
|
|
4380
|
+
y,
|
|
4381
|
+
placement: statefulPlacement,
|
|
4382
|
+
strategy,
|
|
4383
|
+
middlewareData
|
|
4384
|
+
};
|
|
3946
4385
|
};
|
|
3947
|
-
|
|
3948
|
-
const isStr = (val) => typeof val === 'string'; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
3949
|
-
const toLower = (val) => val.toLowerCase();
|
|
4386
|
+
|
|
3950
4387
|
/**
|
|
3951
|
-
*
|
|
3952
|
-
*
|
|
3953
|
-
*
|
|
3954
|
-
*
|
|
3955
|
-
*
|
|
3956
|
-
*
|
|
3957
|
-
* This does not need to be reactive as changing attributes on the host element
|
|
3958
|
-
* does not trigger a re-render.
|
|
4388
|
+
* Resolves with an object of overflow side offsets that determine how much the
|
|
4389
|
+
* element is overflowing a given clipping boundary on each side.
|
|
4390
|
+
* - positive = overflowing the boundary by that number of pixels
|
|
4391
|
+
* - negative = how many pixels left before it will overflow
|
|
4392
|
+
* - 0 = lies flush with the boundary
|
|
4393
|
+
* @see https://floating-ui.com/docs/detectOverflow
|
|
3959
4394
|
*/
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
4395
|
+
async function detectOverflow(state, options) {
|
|
4396
|
+
var _await$platform$isEle;
|
|
4397
|
+
if (options === void 0) {
|
|
4398
|
+
options = {};
|
|
4399
|
+
}
|
|
4400
|
+
const {
|
|
4401
|
+
x,
|
|
4402
|
+
y,
|
|
4403
|
+
platform,
|
|
4404
|
+
rects,
|
|
4405
|
+
elements,
|
|
4406
|
+
strategy
|
|
4407
|
+
} = state;
|
|
4408
|
+
const {
|
|
4409
|
+
boundary = 'clippingAncestors',
|
|
4410
|
+
rootBoundary = 'viewport',
|
|
4411
|
+
elementContext = 'floating',
|
|
4412
|
+
altBoundary = false,
|
|
4413
|
+
padding = 0
|
|
4414
|
+
} = evaluate(options, state);
|
|
4415
|
+
const paddingObject = getPaddingObject(padding);
|
|
4416
|
+
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
4417
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
|
4418
|
+
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
4419
|
+
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
|
|
4420
|
+
boundary,
|
|
4421
|
+
rootBoundary,
|
|
4422
|
+
strategy
|
|
4423
|
+
}));
|
|
4424
|
+
const rect = elementContext === 'floating' ? {
|
|
4425
|
+
x,
|
|
4426
|
+
y,
|
|
4427
|
+
width: rects.floating.width,
|
|
4428
|
+
height: rects.floating.height
|
|
4429
|
+
} : rects.reference;
|
|
4430
|
+
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
4431
|
+
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
4432
|
+
x: 1,
|
|
4433
|
+
y: 1
|
|
4434
|
+
} : {
|
|
4435
|
+
x: 1,
|
|
4436
|
+
y: 1
|
|
4437
|
+
};
|
|
4438
|
+
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
4439
|
+
elements,
|
|
4440
|
+
rect,
|
|
4441
|
+
offsetParent,
|
|
4442
|
+
strategy
|
|
4443
|
+
}) : rect);
|
|
4444
|
+
return {
|
|
4445
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
4446
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
4447
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
4448
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
4449
|
+
};
|
|
4450
|
+
}
|
|
4451
|
+
|
|
4452
|
+
/**
|
|
4453
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
4454
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
4455
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
4456
|
+
* @see https://floating-ui.com/docs/flip
|
|
4457
|
+
*/
|
|
4458
|
+
const flip$1 = function (options) {
|
|
4459
|
+
if (options === void 0) {
|
|
4460
|
+
options = {};
|
|
4461
|
+
}
|
|
4462
|
+
return {
|
|
4463
|
+
name: 'flip',
|
|
4464
|
+
options,
|
|
4465
|
+
async fn(state) {
|
|
4466
|
+
var _middlewareData$arrow, _middlewareData$flip;
|
|
4467
|
+
const {
|
|
4468
|
+
placement,
|
|
4469
|
+
middlewareData,
|
|
4470
|
+
rects,
|
|
4471
|
+
initialPlacement,
|
|
4472
|
+
platform,
|
|
4473
|
+
elements
|
|
4474
|
+
} = state;
|
|
4475
|
+
const {
|
|
4476
|
+
mainAxis: checkMainAxis = true,
|
|
4477
|
+
crossAxis: checkCrossAxis = true,
|
|
4478
|
+
fallbackPlacements: specifiedFallbackPlacements,
|
|
4479
|
+
fallbackStrategy = 'bestFit',
|
|
4480
|
+
fallbackAxisSideDirection = 'none',
|
|
4481
|
+
flipAlignment = true,
|
|
4482
|
+
...detectOverflowOptions
|
|
4483
|
+
} = evaluate(options, state);
|
|
4484
|
+
|
|
4485
|
+
// If a reset by the arrow was caused due to an alignment offset being
|
|
4486
|
+
// added, we should skip any logic now since `flip()` has already done its
|
|
4487
|
+
// work.
|
|
4488
|
+
// https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
|
|
4489
|
+
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
4490
|
+
return {};
|
|
4491
|
+
}
|
|
4492
|
+
const side = getSide(placement);
|
|
4493
|
+
const initialSideAxis = getSideAxis(initialPlacement);
|
|
4494
|
+
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
4495
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
4496
|
+
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
4497
|
+
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
4498
|
+
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
4499
|
+
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
4500
|
+
}
|
|
4501
|
+
const placements = [initialPlacement, ...fallbackPlacements];
|
|
4502
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
4503
|
+
const overflows = [];
|
|
4504
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
4505
|
+
if (checkMainAxis) {
|
|
4506
|
+
overflows.push(overflow[side]);
|
|
4507
|
+
}
|
|
4508
|
+
if (checkCrossAxis) {
|
|
4509
|
+
const sides = getAlignmentSides(placement, rects, rtl);
|
|
4510
|
+
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
4511
|
+
}
|
|
4512
|
+
overflowsData = [...overflowsData, {
|
|
4513
|
+
placement,
|
|
4514
|
+
overflows
|
|
4515
|
+
}];
|
|
4516
|
+
|
|
4517
|
+
// One or more sides is overflowing.
|
|
4518
|
+
if (!overflows.every(side => side <= 0)) {
|
|
4519
|
+
var _middlewareData$flip2, _overflowsData$filter;
|
|
4520
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
4521
|
+
const nextPlacement = placements[nextIndex];
|
|
4522
|
+
if (nextPlacement) {
|
|
4523
|
+
var _overflowsData$;
|
|
4524
|
+
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
4525
|
+
const hasInitialMainAxisOverflow = ((_overflowsData$ = overflowsData[0]) == null ? void 0 : _overflowsData$.overflows[0]) > 0;
|
|
4526
|
+
if (!ignoreCrossAxisOverflow || hasInitialMainAxisOverflow) {
|
|
4527
|
+
// Try next placement and re-run the lifecycle.
|
|
4528
|
+
return {
|
|
4529
|
+
data: {
|
|
4530
|
+
index: nextIndex,
|
|
4531
|
+
overflows: overflowsData
|
|
4532
|
+
},
|
|
4533
|
+
reset: {
|
|
4534
|
+
placement: nextPlacement
|
|
4535
|
+
}
|
|
4536
|
+
};
|
|
4537
|
+
}
|
|
4538
|
+
}
|
|
4539
|
+
|
|
4540
|
+
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
4541
|
+
// then find the placement that fits the best on the main crossAxis side.
|
|
4542
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
4543
|
+
|
|
4544
|
+
// Otherwise fallback.
|
|
4545
|
+
if (!resetPlacement) {
|
|
4546
|
+
switch (fallbackStrategy) {
|
|
4547
|
+
case 'bestFit':
|
|
4548
|
+
{
|
|
4549
|
+
var _overflowsData$filter2;
|
|
4550
|
+
const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
|
|
4551
|
+
if (hasFallbackAxisSideDirection) {
|
|
4552
|
+
const currentSideAxis = getSideAxis(d.placement);
|
|
4553
|
+
return currentSideAxis === initialSideAxis ||
|
|
4554
|
+
// Create a bias to the `y` side axis due to horizontal
|
|
4555
|
+
// reading directions favoring greater width.
|
|
4556
|
+
currentSideAxis === 'y';
|
|
4557
|
+
}
|
|
4558
|
+
return true;
|
|
4559
|
+
}).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
4560
|
+
if (placement) {
|
|
4561
|
+
resetPlacement = placement;
|
|
4562
|
+
}
|
|
4563
|
+
break;
|
|
4564
|
+
}
|
|
4565
|
+
case 'initialPlacement':
|
|
4566
|
+
resetPlacement = initialPlacement;
|
|
4567
|
+
break;
|
|
4568
|
+
}
|
|
4569
|
+
}
|
|
4570
|
+
if (placement !== resetPlacement) {
|
|
4571
|
+
return {
|
|
4572
|
+
reset: {
|
|
4573
|
+
placement: resetPlacement
|
|
3967
4574
|
}
|
|
3968
|
-
|
|
4575
|
+
};
|
|
3969
4576
|
}
|
|
3970
|
-
|
|
3971
|
-
|
|
4577
|
+
}
|
|
4578
|
+
return {};
|
|
4579
|
+
}
|
|
4580
|
+
};
|
|
3972
4581
|
};
|
|
4582
|
+
|
|
4583
|
+
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
4584
|
+
// Derivable.
|
|
4585
|
+
|
|
4586
|
+
async function convertValueToCoords(state, options) {
|
|
4587
|
+
const {
|
|
4588
|
+
placement,
|
|
4589
|
+
platform,
|
|
4590
|
+
elements
|
|
4591
|
+
} = state;
|
|
4592
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
4593
|
+
const side = getSide(placement);
|
|
4594
|
+
const alignment = getAlignment(placement);
|
|
4595
|
+
const isVertical = getSideAxis(placement) === 'y';
|
|
4596
|
+
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
4597
|
+
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
4598
|
+
const rawValue = evaluate(options, state);
|
|
4599
|
+
|
|
4600
|
+
// eslint-disable-next-line prefer-const
|
|
4601
|
+
let {
|
|
4602
|
+
mainAxis,
|
|
4603
|
+
crossAxis,
|
|
4604
|
+
alignmentAxis
|
|
4605
|
+
} = typeof rawValue === 'number' ? {
|
|
4606
|
+
mainAxis: rawValue,
|
|
4607
|
+
crossAxis: 0,
|
|
4608
|
+
alignmentAxis: null
|
|
4609
|
+
} : {
|
|
4610
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
4611
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
4612
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
4613
|
+
};
|
|
4614
|
+
if (alignment && typeof alignmentAxis === 'number') {
|
|
4615
|
+
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
4616
|
+
}
|
|
4617
|
+
return isVertical ? {
|
|
4618
|
+
x: crossAxis * crossAxisMulti,
|
|
4619
|
+
y: mainAxis * mainAxisMulti
|
|
4620
|
+
} : {
|
|
4621
|
+
x: mainAxis * mainAxisMulti,
|
|
4622
|
+
y: crossAxis * crossAxisMulti
|
|
4623
|
+
};
|
|
4624
|
+
}
|
|
4625
|
+
|
|
3973
4626
|
/**
|
|
3974
|
-
*
|
|
3975
|
-
*
|
|
3976
|
-
*
|
|
3977
|
-
*
|
|
4627
|
+
* Modifies the placement by translating the floating element along the
|
|
4628
|
+
* specified axes.
|
|
4629
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
4630
|
+
* object may be passed.
|
|
4631
|
+
* @see https://floating-ui.com/docs/offset
|
|
3978
4632
|
*/
|
|
3979
|
-
const
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
4633
|
+
const offset$1 = function (options) {
|
|
4634
|
+
if (options === void 0) {
|
|
4635
|
+
options = 0;
|
|
4636
|
+
}
|
|
4637
|
+
return {
|
|
4638
|
+
name: 'offset',
|
|
4639
|
+
options,
|
|
4640
|
+
async fn(state) {
|
|
4641
|
+
var _middlewareData$offse, _middlewareData$arrow;
|
|
4642
|
+
const {
|
|
4643
|
+
x,
|
|
4644
|
+
y,
|
|
4645
|
+
placement,
|
|
4646
|
+
middlewareData
|
|
4647
|
+
} = state;
|
|
4648
|
+
const diffCoords = await convertValueToCoords(state, options);
|
|
4649
|
+
|
|
4650
|
+
// If the placement is the same and the arrow caused an alignment offset
|
|
4651
|
+
// then we don't need to change the positioning coordinates.
|
|
4652
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
4653
|
+
return {};
|
|
4654
|
+
}
|
|
4655
|
+
return {
|
|
4656
|
+
x: x + diffCoords.x,
|
|
4657
|
+
y: y + diffCoords.y,
|
|
4658
|
+
data: {
|
|
4659
|
+
...diffCoords,
|
|
4660
|
+
placement
|
|
4661
|
+
}
|
|
4662
|
+
};
|
|
4663
|
+
}
|
|
4664
|
+
};
|
|
3984
4665
|
};
|
|
4666
|
+
|
|
3985
4667
|
/**
|
|
3986
|
-
*
|
|
4668
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
|
4669
|
+
* keep it in view when it will overflow the clipping boundary.
|
|
4670
|
+
* @see https://floating-ui.com/docs/shift
|
|
3987
4671
|
*/
|
|
3988
|
-
const
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
'
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4672
|
+
const shift$1 = function (options) {
|
|
4673
|
+
if (options === void 0) {
|
|
4674
|
+
options = {};
|
|
4675
|
+
}
|
|
4676
|
+
return {
|
|
4677
|
+
name: 'shift',
|
|
4678
|
+
options,
|
|
4679
|
+
async fn(state) {
|
|
4680
|
+
const {
|
|
4681
|
+
x,
|
|
4682
|
+
y,
|
|
4683
|
+
placement
|
|
4684
|
+
} = state;
|
|
4685
|
+
const {
|
|
4686
|
+
mainAxis: checkMainAxis = true,
|
|
4687
|
+
crossAxis: checkCrossAxis = false,
|
|
4688
|
+
limiter = {
|
|
4689
|
+
fn: _ref => {
|
|
4690
|
+
let {
|
|
4691
|
+
x,
|
|
4692
|
+
y
|
|
4693
|
+
} = _ref;
|
|
4694
|
+
return {
|
|
4695
|
+
x,
|
|
4696
|
+
y
|
|
4697
|
+
};
|
|
4698
|
+
}
|
|
4699
|
+
},
|
|
4700
|
+
...detectOverflowOptions
|
|
4701
|
+
} = evaluate(options, state);
|
|
4702
|
+
const coords = {
|
|
4703
|
+
x,
|
|
4704
|
+
y
|
|
4705
|
+
};
|
|
4706
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
4707
|
+
const crossAxis = getSideAxis(getSide(placement));
|
|
4708
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
4709
|
+
let mainAxisCoord = coords[mainAxis];
|
|
4710
|
+
let crossAxisCoord = coords[crossAxis];
|
|
4711
|
+
if (checkMainAxis) {
|
|
4712
|
+
const minSide = mainAxis === 'y' ? 'top' : 'left';
|
|
4713
|
+
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
4714
|
+
const min = mainAxisCoord + overflow[minSide];
|
|
4715
|
+
const max = mainAxisCoord - overflow[maxSide];
|
|
4716
|
+
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
4717
|
+
}
|
|
4718
|
+
if (checkCrossAxis) {
|
|
4719
|
+
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
|
4720
|
+
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
4721
|
+
const min = crossAxisCoord + overflow[minSide];
|
|
4722
|
+
const max = crossAxisCoord - overflow[maxSide];
|
|
4723
|
+
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
4724
|
+
}
|
|
4725
|
+
const limitedCoords = limiter.fn({
|
|
4726
|
+
...state,
|
|
4727
|
+
[mainAxis]: mainAxisCoord,
|
|
4728
|
+
[crossAxis]: crossAxisCoord
|
|
4729
|
+
});
|
|
4730
|
+
return {
|
|
4731
|
+
...limitedCoords,
|
|
4732
|
+
data: {
|
|
4733
|
+
x: limitedCoords.x - x,
|
|
4734
|
+
y: limitedCoords.y - y,
|
|
4735
|
+
enabled: {
|
|
4736
|
+
[mainAxis]: checkMainAxis,
|
|
4737
|
+
[crossAxis]: checkCrossAxis
|
|
4738
|
+
}
|
|
4739
|
+
}
|
|
4740
|
+
};
|
|
4741
|
+
}
|
|
4742
|
+
};
|
|
4743
|
+
};
|
|
4744
|
+
|
|
4745
|
+
function hasWindow() {
|
|
4746
|
+
return typeof window !== 'undefined';
|
|
4747
|
+
}
|
|
4748
|
+
function getNodeName(node) {
|
|
4749
|
+
if (isNode(node)) {
|
|
4750
|
+
return (node.nodeName || '').toLowerCase();
|
|
4751
|
+
}
|
|
4752
|
+
// Mocked nodes in testing environments may not be instances of Node. By
|
|
4753
|
+
// returning `#document` an infinite loop won't occur.
|
|
4754
|
+
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
4755
|
+
return '#document';
|
|
4756
|
+
}
|
|
4757
|
+
function getWindow(node) {
|
|
4758
|
+
var _node$ownerDocument;
|
|
4759
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
4760
|
+
}
|
|
4761
|
+
function getDocumentElement(node) {
|
|
4762
|
+
var _ref;
|
|
4763
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
4764
|
+
}
|
|
4765
|
+
function isNode(value) {
|
|
4766
|
+
if (!hasWindow()) {
|
|
4767
|
+
return false;
|
|
4768
|
+
}
|
|
4769
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
4770
|
+
}
|
|
4771
|
+
function isElement(value) {
|
|
4772
|
+
if (!hasWindow()) {
|
|
4773
|
+
return false;
|
|
4774
|
+
}
|
|
4775
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
4776
|
+
}
|
|
4777
|
+
function isHTMLElement(value) {
|
|
4778
|
+
if (!hasWindow()) {
|
|
4779
|
+
return false;
|
|
4780
|
+
}
|
|
4781
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
4782
|
+
}
|
|
4783
|
+
function isShadowRoot(value) {
|
|
4784
|
+
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
4785
|
+
return false;
|
|
4786
|
+
}
|
|
4787
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
4788
|
+
}
|
|
4789
|
+
function isOverflowElement(element) {
|
|
4790
|
+
const {
|
|
4791
|
+
overflow,
|
|
4792
|
+
overflowX,
|
|
4793
|
+
overflowY,
|
|
4794
|
+
display
|
|
4795
|
+
} = getComputedStyle$1(element);
|
|
4796
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
|
|
4797
|
+
}
|
|
4798
|
+
function isTableElement(element) {
|
|
4799
|
+
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
4800
|
+
}
|
|
4801
|
+
function isTopLayer(element) {
|
|
4802
|
+
return [':popover-open', ':modal'].some(selector => {
|
|
4803
|
+
try {
|
|
4804
|
+
return element.matches(selector);
|
|
4805
|
+
} catch (e) {
|
|
4806
|
+
return false;
|
|
4807
|
+
}
|
|
4808
|
+
});
|
|
4809
|
+
}
|
|
4810
|
+
function isContainingBlock(elementOrCss) {
|
|
4811
|
+
const webkit = isWebKit();
|
|
4812
|
+
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
4813
|
+
|
|
4814
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
4815
|
+
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
4816
|
+
return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
4817
|
+
}
|
|
4818
|
+
function getContainingBlock(element) {
|
|
4819
|
+
let currentNode = getParentNode(element);
|
|
4820
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
4821
|
+
if (isContainingBlock(currentNode)) {
|
|
4822
|
+
return currentNode;
|
|
4823
|
+
} else if (isTopLayer(currentNode)) {
|
|
4824
|
+
return null;
|
|
4825
|
+
}
|
|
4826
|
+
currentNode = getParentNode(currentNode);
|
|
4827
|
+
}
|
|
4828
|
+
return null;
|
|
4829
|
+
}
|
|
4830
|
+
function isWebKit() {
|
|
4831
|
+
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
4832
|
+
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
4833
|
+
}
|
|
4834
|
+
function isLastTraversableNode(node) {
|
|
4835
|
+
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
4836
|
+
}
|
|
4837
|
+
function getComputedStyle$1(element) {
|
|
4838
|
+
return getWindow(element).getComputedStyle(element);
|
|
4839
|
+
}
|
|
4840
|
+
function getNodeScroll(element) {
|
|
4841
|
+
if (isElement(element)) {
|
|
4842
|
+
return {
|
|
4843
|
+
scrollLeft: element.scrollLeft,
|
|
4844
|
+
scrollTop: element.scrollTop
|
|
4845
|
+
};
|
|
4846
|
+
}
|
|
4847
|
+
return {
|
|
4848
|
+
scrollLeft: element.scrollX,
|
|
4849
|
+
scrollTop: element.scrollY
|
|
4850
|
+
};
|
|
4851
|
+
}
|
|
4852
|
+
function getParentNode(node) {
|
|
4853
|
+
if (getNodeName(node) === 'html') {
|
|
4854
|
+
return node;
|
|
4855
|
+
}
|
|
4856
|
+
const result =
|
|
4857
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
4858
|
+
node.assignedSlot ||
|
|
4859
|
+
// DOM Element detected.
|
|
4860
|
+
node.parentNode ||
|
|
4861
|
+
// ShadowRoot detected.
|
|
4862
|
+
isShadowRoot(node) && node.host ||
|
|
4863
|
+
// Fallback.
|
|
4864
|
+
getDocumentElement(node);
|
|
4865
|
+
return isShadowRoot(result) ? result.host : result;
|
|
4866
|
+
}
|
|
4867
|
+
function getNearestOverflowAncestor(node) {
|
|
4868
|
+
const parentNode = getParentNode(node);
|
|
4869
|
+
if (isLastTraversableNode(parentNode)) {
|
|
4870
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
4871
|
+
}
|
|
4872
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
4873
|
+
return parentNode;
|
|
4874
|
+
}
|
|
4875
|
+
return getNearestOverflowAncestor(parentNode);
|
|
4876
|
+
}
|
|
4877
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
4878
|
+
var _node$ownerDocument2;
|
|
4879
|
+
if (list === void 0) {
|
|
4880
|
+
list = [];
|
|
4881
|
+
}
|
|
4882
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
4883
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
4884
|
+
const win = getWindow(scrollableAncestor);
|
|
4885
|
+
if (isBody) {
|
|
4886
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], []);
|
|
4887
|
+
}
|
|
4888
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, []));
|
|
4889
|
+
}
|
|
4890
|
+
function getFrameElement(win) {
|
|
4891
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
4892
|
+
}
|
|
4893
|
+
|
|
4894
|
+
function getCssDimensions(element) {
|
|
4895
|
+
const css = getComputedStyle$1(element);
|
|
4896
|
+
// In testing environments, the `width` and `height` properties are empty
|
|
4897
|
+
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
4898
|
+
let width = parseFloat(css.width) || 0;
|
|
4899
|
+
let height = parseFloat(css.height) || 0;
|
|
4900
|
+
const hasOffset = isHTMLElement(element);
|
|
4901
|
+
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
4902
|
+
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
4903
|
+
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
4904
|
+
if (shouldFallback) {
|
|
4905
|
+
width = offsetWidth;
|
|
4906
|
+
height = offsetHeight;
|
|
4907
|
+
}
|
|
4908
|
+
return {
|
|
4909
|
+
width,
|
|
4910
|
+
height,
|
|
4911
|
+
$: shouldFallback
|
|
4912
|
+
};
|
|
4913
|
+
}
|
|
4914
|
+
|
|
4915
|
+
function unwrapElement(element) {
|
|
4916
|
+
return !isElement(element) ? element.contextElement : element;
|
|
4917
|
+
}
|
|
4918
|
+
|
|
4919
|
+
function getScale(element) {
|
|
4920
|
+
const domElement = unwrapElement(element);
|
|
4921
|
+
if (!isHTMLElement(domElement)) {
|
|
4922
|
+
return createCoords(1);
|
|
4923
|
+
}
|
|
4924
|
+
const rect = domElement.getBoundingClientRect();
|
|
4925
|
+
const {
|
|
4926
|
+
width,
|
|
4927
|
+
height,
|
|
4928
|
+
$
|
|
4929
|
+
} = getCssDimensions(domElement);
|
|
4930
|
+
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
4931
|
+
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
4932
|
+
|
|
4933
|
+
// 0, NaN, or Infinity should always fallback to 1.
|
|
4934
|
+
|
|
4935
|
+
if (!x || !Number.isFinite(x)) {
|
|
4936
|
+
x = 1;
|
|
4937
|
+
}
|
|
4938
|
+
if (!y || !Number.isFinite(y)) {
|
|
4939
|
+
y = 1;
|
|
4940
|
+
}
|
|
4941
|
+
return {
|
|
4942
|
+
x,
|
|
4943
|
+
y
|
|
4944
|
+
};
|
|
4945
|
+
}
|
|
4946
|
+
|
|
4947
|
+
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
4948
|
+
function getVisualOffsets(element) {
|
|
4949
|
+
const win = getWindow(element);
|
|
4950
|
+
if (!isWebKit() || !win.visualViewport) {
|
|
4951
|
+
return noOffsets;
|
|
4952
|
+
}
|
|
4953
|
+
return {
|
|
4954
|
+
x: win.visualViewport.offsetLeft,
|
|
4955
|
+
y: win.visualViewport.offsetTop
|
|
4956
|
+
};
|
|
4957
|
+
}
|
|
4958
|
+
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
4959
|
+
if (isFixed === void 0) {
|
|
4960
|
+
isFixed = false;
|
|
4961
|
+
}
|
|
4962
|
+
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
4963
|
+
return false;
|
|
4964
|
+
}
|
|
4965
|
+
return isFixed;
|
|
4966
|
+
}
|
|
4967
|
+
|
|
4968
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
4969
|
+
if (includeScale === void 0) {
|
|
4970
|
+
includeScale = false;
|
|
4971
|
+
}
|
|
4972
|
+
if (isFixedStrategy === void 0) {
|
|
4973
|
+
isFixedStrategy = false;
|
|
4974
|
+
}
|
|
4975
|
+
const clientRect = element.getBoundingClientRect();
|
|
4976
|
+
const domElement = unwrapElement(element);
|
|
4977
|
+
let scale = createCoords(1);
|
|
4978
|
+
if (includeScale) {
|
|
4979
|
+
if (offsetParent) {
|
|
4980
|
+
if (isElement(offsetParent)) {
|
|
4981
|
+
scale = getScale(offsetParent);
|
|
4982
|
+
}
|
|
4983
|
+
} else {
|
|
4984
|
+
scale = getScale(element);
|
|
4985
|
+
}
|
|
4986
|
+
}
|
|
4987
|
+
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
4988
|
+
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
4989
|
+
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
4990
|
+
let width = clientRect.width / scale.x;
|
|
4991
|
+
let height = clientRect.height / scale.y;
|
|
4992
|
+
if (domElement) {
|
|
4993
|
+
const win = getWindow(domElement);
|
|
4994
|
+
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
4995
|
+
let currentWin = win;
|
|
4996
|
+
let currentIFrame = getFrameElement(currentWin);
|
|
4997
|
+
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
4998
|
+
const iframeScale = getScale(currentIFrame);
|
|
4999
|
+
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
5000
|
+
const css = getComputedStyle$1(currentIFrame);
|
|
5001
|
+
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
5002
|
+
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
5003
|
+
x *= iframeScale.x;
|
|
5004
|
+
y *= iframeScale.y;
|
|
5005
|
+
width *= iframeScale.x;
|
|
5006
|
+
height *= iframeScale.y;
|
|
5007
|
+
x += left;
|
|
5008
|
+
y += top;
|
|
5009
|
+
currentWin = getWindow(currentIFrame);
|
|
5010
|
+
currentIFrame = getFrameElement(currentWin);
|
|
5011
|
+
}
|
|
5012
|
+
}
|
|
5013
|
+
return rectToClientRect({
|
|
5014
|
+
width,
|
|
5015
|
+
height,
|
|
5016
|
+
x,
|
|
5017
|
+
y
|
|
5018
|
+
});
|
|
5019
|
+
}
|
|
5020
|
+
|
|
5021
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
|
5022
|
+
// incorrect for RTL.
|
|
5023
|
+
function getWindowScrollBarX(element, rect) {
|
|
5024
|
+
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
5025
|
+
if (!rect) {
|
|
5026
|
+
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
5027
|
+
}
|
|
5028
|
+
return rect.left + leftScroll;
|
|
5029
|
+
}
|
|
5030
|
+
|
|
5031
|
+
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
5032
|
+
if (ignoreScrollbarX === void 0) {
|
|
5033
|
+
ignoreScrollbarX = false;
|
|
5034
|
+
}
|
|
5035
|
+
const htmlRect = documentElement.getBoundingClientRect();
|
|
5036
|
+
const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
|
|
5037
|
+
// RTL <body> scrollbar.
|
|
5038
|
+
getWindowScrollBarX(documentElement, htmlRect));
|
|
5039
|
+
const y = htmlRect.top + scroll.scrollTop;
|
|
5040
|
+
return {
|
|
5041
|
+
x,
|
|
5042
|
+
y
|
|
5043
|
+
};
|
|
5044
|
+
}
|
|
5045
|
+
|
|
5046
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
5047
|
+
let {
|
|
5048
|
+
elements,
|
|
5049
|
+
rect,
|
|
5050
|
+
offsetParent,
|
|
5051
|
+
strategy
|
|
5052
|
+
} = _ref;
|
|
5053
|
+
const isFixed = strategy === 'fixed';
|
|
5054
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
5055
|
+
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
|
5056
|
+
if (offsetParent === documentElement || topLayer && isFixed) {
|
|
5057
|
+
return rect;
|
|
5058
|
+
}
|
|
5059
|
+
let scroll = {
|
|
5060
|
+
scrollLeft: 0,
|
|
5061
|
+
scrollTop: 0
|
|
5062
|
+
};
|
|
5063
|
+
let scale = createCoords(1);
|
|
5064
|
+
const offsets = createCoords(0);
|
|
5065
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
5066
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
5067
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
5068
|
+
scroll = getNodeScroll(offsetParent);
|
|
5069
|
+
}
|
|
5070
|
+
if (isHTMLElement(offsetParent)) {
|
|
5071
|
+
const offsetRect = getBoundingClientRect(offsetParent);
|
|
5072
|
+
scale = getScale(offsetParent);
|
|
5073
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
5074
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
5075
|
+
}
|
|
5076
|
+
}
|
|
5077
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
|
|
5078
|
+
return {
|
|
5079
|
+
width: rect.width * scale.x,
|
|
5080
|
+
height: rect.height * scale.y,
|
|
5081
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
5082
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
5083
|
+
};
|
|
5084
|
+
}
|
|
5085
|
+
|
|
5086
|
+
function getClientRects(element) {
|
|
5087
|
+
return Array.from(element.getClientRects());
|
|
5088
|
+
}
|
|
5089
|
+
|
|
5090
|
+
// Gets the entire size of the scrollable document area, even extending outside
|
|
5091
|
+
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
5092
|
+
function getDocumentRect(element) {
|
|
5093
|
+
const html = getDocumentElement(element);
|
|
5094
|
+
const scroll = getNodeScroll(element);
|
|
5095
|
+
const body = element.ownerDocument.body;
|
|
5096
|
+
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
5097
|
+
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
5098
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
5099
|
+
const y = -scroll.scrollTop;
|
|
5100
|
+
if (getComputedStyle$1(body).direction === 'rtl') {
|
|
5101
|
+
x += max(html.clientWidth, body.clientWidth) - width;
|
|
5102
|
+
}
|
|
5103
|
+
return {
|
|
5104
|
+
width,
|
|
5105
|
+
height,
|
|
5106
|
+
x,
|
|
5107
|
+
y
|
|
5108
|
+
};
|
|
5109
|
+
}
|
|
5110
|
+
|
|
5111
|
+
function getViewportRect(element, strategy) {
|
|
5112
|
+
const win = getWindow(element);
|
|
5113
|
+
const html = getDocumentElement(element);
|
|
5114
|
+
const visualViewport = win.visualViewport;
|
|
5115
|
+
let width = html.clientWidth;
|
|
5116
|
+
let height = html.clientHeight;
|
|
5117
|
+
let x = 0;
|
|
5118
|
+
let y = 0;
|
|
5119
|
+
if (visualViewport) {
|
|
5120
|
+
width = visualViewport.width;
|
|
5121
|
+
height = visualViewport.height;
|
|
5122
|
+
const visualViewportBased = isWebKit();
|
|
5123
|
+
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
|
|
5124
|
+
x = visualViewport.offsetLeft;
|
|
5125
|
+
y = visualViewport.offsetTop;
|
|
5126
|
+
}
|
|
5127
|
+
}
|
|
5128
|
+
return {
|
|
5129
|
+
width,
|
|
5130
|
+
height,
|
|
5131
|
+
x,
|
|
5132
|
+
y
|
|
5133
|
+
};
|
|
5134
|
+
}
|
|
5135
|
+
|
|
5136
|
+
// Returns the inner client rect, subtracting scrollbars if present.
|
|
5137
|
+
function getInnerBoundingClientRect(element, strategy) {
|
|
5138
|
+
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
5139
|
+
const top = clientRect.top + element.clientTop;
|
|
5140
|
+
const left = clientRect.left + element.clientLeft;
|
|
5141
|
+
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
5142
|
+
const width = element.clientWidth * scale.x;
|
|
5143
|
+
const height = element.clientHeight * scale.y;
|
|
5144
|
+
const x = left * scale.x;
|
|
5145
|
+
const y = top * scale.y;
|
|
5146
|
+
return {
|
|
5147
|
+
width,
|
|
5148
|
+
height,
|
|
5149
|
+
x,
|
|
5150
|
+
y
|
|
5151
|
+
};
|
|
5152
|
+
}
|
|
5153
|
+
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
5154
|
+
let rect;
|
|
5155
|
+
if (clippingAncestor === 'viewport') {
|
|
5156
|
+
rect = getViewportRect(element, strategy);
|
|
5157
|
+
} else if (clippingAncestor === 'document') {
|
|
5158
|
+
rect = getDocumentRect(getDocumentElement(element));
|
|
5159
|
+
} else if (isElement(clippingAncestor)) {
|
|
5160
|
+
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
5161
|
+
} else {
|
|
5162
|
+
const visualOffsets = getVisualOffsets(element);
|
|
5163
|
+
rect = {
|
|
5164
|
+
x: clippingAncestor.x - visualOffsets.x,
|
|
5165
|
+
y: clippingAncestor.y - visualOffsets.y,
|
|
5166
|
+
width: clippingAncestor.width,
|
|
5167
|
+
height: clippingAncestor.height
|
|
5168
|
+
};
|
|
5169
|
+
}
|
|
5170
|
+
return rectToClientRect(rect);
|
|
5171
|
+
}
|
|
5172
|
+
function hasFixedPositionAncestor(element, stopNode) {
|
|
5173
|
+
const parentNode = getParentNode(element);
|
|
5174
|
+
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
5175
|
+
return false;
|
|
5176
|
+
}
|
|
5177
|
+
return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
5178
|
+
}
|
|
5179
|
+
|
|
5180
|
+
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
5181
|
+
// clipping (or hiding) child elements. This returns all clipping ancestors
|
|
5182
|
+
// of the given element up the tree.
|
|
5183
|
+
function getClippingElementAncestors(element, cache) {
|
|
5184
|
+
const cachedResult = cache.get(element);
|
|
5185
|
+
if (cachedResult) {
|
|
5186
|
+
return cachedResult;
|
|
5187
|
+
}
|
|
5188
|
+
let result = getOverflowAncestors(element, []).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
5189
|
+
let currentContainingBlockComputedStyle = null;
|
|
5190
|
+
const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
|
|
5191
|
+
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
5192
|
+
|
|
5193
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
5194
|
+
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
5195
|
+
const computedStyle = getComputedStyle$1(currentNode);
|
|
5196
|
+
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
5197
|
+
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
5198
|
+
currentContainingBlockComputedStyle = null;
|
|
5199
|
+
}
|
|
5200
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
5201
|
+
if (shouldDropCurrentNode) {
|
|
5202
|
+
// Drop non-containing blocks.
|
|
5203
|
+
result = result.filter(ancestor => ancestor !== currentNode);
|
|
5204
|
+
} else {
|
|
5205
|
+
// Record last containing block for next iteration.
|
|
5206
|
+
currentContainingBlockComputedStyle = computedStyle;
|
|
5207
|
+
}
|
|
5208
|
+
currentNode = getParentNode(currentNode);
|
|
5209
|
+
}
|
|
5210
|
+
cache.set(element, result);
|
|
5211
|
+
return result;
|
|
5212
|
+
}
|
|
5213
|
+
|
|
5214
|
+
// Gets the maximum area that the element is visible in due to any number of
|
|
5215
|
+
// clipping ancestors.
|
|
5216
|
+
function getClippingRect(_ref) {
|
|
5217
|
+
let {
|
|
5218
|
+
element,
|
|
5219
|
+
boundary,
|
|
5220
|
+
rootBoundary,
|
|
5221
|
+
strategy
|
|
5222
|
+
} = _ref;
|
|
5223
|
+
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
5224
|
+
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
5225
|
+
const firstClippingAncestor = clippingAncestors[0];
|
|
5226
|
+
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
5227
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
5228
|
+
accRect.top = max(rect.top, accRect.top);
|
|
5229
|
+
accRect.right = min(rect.right, accRect.right);
|
|
5230
|
+
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
5231
|
+
accRect.left = max(rect.left, accRect.left);
|
|
5232
|
+
return accRect;
|
|
5233
|
+
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
5234
|
+
return {
|
|
5235
|
+
width: clippingRect.right - clippingRect.left,
|
|
5236
|
+
height: clippingRect.bottom - clippingRect.top,
|
|
5237
|
+
x: clippingRect.left,
|
|
5238
|
+
y: clippingRect.top
|
|
5239
|
+
};
|
|
5240
|
+
}
|
|
5241
|
+
|
|
5242
|
+
function getDimensions(element) {
|
|
5243
|
+
const {
|
|
5244
|
+
width,
|
|
5245
|
+
height
|
|
5246
|
+
} = getCssDimensions(element);
|
|
5247
|
+
return {
|
|
5248
|
+
width,
|
|
5249
|
+
height
|
|
5250
|
+
};
|
|
5251
|
+
}
|
|
5252
|
+
|
|
5253
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
5254
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
5255
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
5256
|
+
const isFixed = strategy === 'fixed';
|
|
5257
|
+
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
5258
|
+
let scroll = {
|
|
5259
|
+
scrollLeft: 0,
|
|
5260
|
+
scrollTop: 0
|
|
5261
|
+
};
|
|
5262
|
+
const offsets = createCoords(0);
|
|
5263
|
+
|
|
5264
|
+
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
5265
|
+
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
5266
|
+
function setLeftRTLScrollbarOffset() {
|
|
5267
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
5268
|
+
}
|
|
5269
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
5270
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
5271
|
+
scroll = getNodeScroll(offsetParent);
|
|
5272
|
+
}
|
|
5273
|
+
if (isOffsetParentAnElement) {
|
|
5274
|
+
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
5275
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
5276
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
5277
|
+
} else if (documentElement) {
|
|
5278
|
+
setLeftRTLScrollbarOffset();
|
|
5279
|
+
}
|
|
5280
|
+
}
|
|
5281
|
+
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
5282
|
+
setLeftRTLScrollbarOffset();
|
|
5283
|
+
}
|
|
5284
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
5285
|
+
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
5286
|
+
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
5287
|
+
return {
|
|
5288
|
+
x,
|
|
5289
|
+
y,
|
|
5290
|
+
width: rect.width,
|
|
5291
|
+
height: rect.height
|
|
5292
|
+
};
|
|
5293
|
+
}
|
|
5294
|
+
|
|
5295
|
+
function isStaticPositioned(element) {
|
|
5296
|
+
return getComputedStyle$1(element).position === 'static';
|
|
5297
|
+
}
|
|
5298
|
+
|
|
5299
|
+
function getTrueOffsetParent(element, polyfill) {
|
|
5300
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
|
|
5301
|
+
return null;
|
|
5302
|
+
}
|
|
5303
|
+
if (polyfill) {
|
|
5304
|
+
return polyfill(element);
|
|
5305
|
+
}
|
|
5306
|
+
let rawOffsetParent = element.offsetParent;
|
|
5307
|
+
|
|
5308
|
+
// Firefox returns the <html> element as the offsetParent if it's non-static,
|
|
5309
|
+
// while Chrome and Safari return the <body> element. The <body> element must
|
|
5310
|
+
// be used to perform the correct calculations even if the <html> element is
|
|
5311
|
+
// non-static.
|
|
5312
|
+
if (getDocumentElement(element) === rawOffsetParent) {
|
|
5313
|
+
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
5314
|
+
}
|
|
5315
|
+
return rawOffsetParent;
|
|
5316
|
+
}
|
|
5317
|
+
|
|
5318
|
+
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
5319
|
+
// such as table ancestors and cross browser bugs.
|
|
5320
|
+
function getOffsetParent(element, polyfill) {
|
|
5321
|
+
const win = getWindow(element);
|
|
5322
|
+
if (isTopLayer(element)) {
|
|
5323
|
+
return win;
|
|
5324
|
+
}
|
|
5325
|
+
if (!isHTMLElement(element)) {
|
|
5326
|
+
let svgOffsetParent = getParentNode(element);
|
|
5327
|
+
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
5328
|
+
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
|
5329
|
+
return svgOffsetParent;
|
|
5330
|
+
}
|
|
5331
|
+
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
5332
|
+
}
|
|
5333
|
+
return win;
|
|
5334
|
+
}
|
|
5335
|
+
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
5336
|
+
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
|
|
5337
|
+
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
5338
|
+
}
|
|
5339
|
+
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
|
|
5340
|
+
return win;
|
|
5341
|
+
}
|
|
5342
|
+
return offsetParent || getContainingBlock(element) || win;
|
|
5343
|
+
}
|
|
5344
|
+
|
|
5345
|
+
const getElementRects = async function (data) {
|
|
5346
|
+
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
5347
|
+
const getDimensionsFn = this.getDimensions;
|
|
5348
|
+
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
5349
|
+
return {
|
|
5350
|
+
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
5351
|
+
floating: {
|
|
5352
|
+
x: 0,
|
|
5353
|
+
y: 0,
|
|
5354
|
+
width: floatingDimensions.width,
|
|
5355
|
+
height: floatingDimensions.height
|
|
5356
|
+
}
|
|
5357
|
+
};
|
|
5358
|
+
};
|
|
5359
|
+
|
|
5360
|
+
function isRTL$1(element) {
|
|
5361
|
+
return getComputedStyle$1(element).direction === 'rtl';
|
|
5362
|
+
}
|
|
5363
|
+
|
|
5364
|
+
const platform = {
|
|
5365
|
+
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
5366
|
+
getDocumentElement,
|
|
5367
|
+
getClippingRect,
|
|
5368
|
+
getOffsetParent,
|
|
5369
|
+
getElementRects,
|
|
5370
|
+
getClientRects,
|
|
5371
|
+
getDimensions,
|
|
5372
|
+
getScale,
|
|
5373
|
+
isElement,
|
|
5374
|
+
isRTL: isRTL$1
|
|
5375
|
+
};
|
|
5376
|
+
|
|
5377
|
+
/**
|
|
5378
|
+
* Modifies the placement by translating the floating element along the
|
|
5379
|
+
* specified axes.
|
|
5380
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
5381
|
+
* object may be passed.
|
|
5382
|
+
* @see https://floating-ui.com/docs/offset
|
|
5383
|
+
*/
|
|
5384
|
+
const offset = offset$1;
|
|
5385
|
+
|
|
5386
|
+
/**
|
|
5387
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
|
5388
|
+
* keep it in view when it will overflow the clipping boundary.
|
|
5389
|
+
* @see https://floating-ui.com/docs/shift
|
|
5390
|
+
*/
|
|
5391
|
+
const shift = shift$1;
|
|
5392
|
+
|
|
5393
|
+
/**
|
|
5394
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
5395
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
5396
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
5397
|
+
* @see https://floating-ui.com/docs/flip
|
|
5398
|
+
*/
|
|
5399
|
+
const flip = flip$1;
|
|
5400
|
+
|
|
5401
|
+
/**
|
|
5402
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
5403
|
+
* next to a given reference element.
|
|
5404
|
+
*/
|
|
5405
|
+
const computePosition = (reference, floating, options) => {
|
|
5406
|
+
// This caches the expensive `getClippingElementAncestors` function so that
|
|
5407
|
+
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
5408
|
+
// single call. If other functions become expensive, we can add them as well.
|
|
5409
|
+
const cache = new Map();
|
|
5410
|
+
const mergedOptions = {
|
|
5411
|
+
platform,
|
|
5412
|
+
...options
|
|
5413
|
+
};
|
|
5414
|
+
const platformWithCache = {
|
|
5415
|
+
...mergedOptions.platform,
|
|
5416
|
+
_c: cache
|
|
5417
|
+
};
|
|
5418
|
+
return computePosition$1(reference, floating, {
|
|
5419
|
+
...mergedOptions,
|
|
5420
|
+
platform: platformWithCache
|
|
5421
|
+
});
|
|
5422
|
+
};
|
|
5423
|
+
|
|
5424
|
+
const pdsDropdownMenuCss = ":host{display:block}.is-hidden{display:none}.pds-dropdown-menu--panel{background-color:var(--pine-color-background-container);left:var(--pine-dimension-none);min-width:170px;padding:var(--pine-dimension-xs);position:absolute;z-index:9999}";
|
|
5425
|
+
|
|
5426
|
+
class PdsDropdownMenu {
|
|
5427
|
+
constructor(hostRef) {
|
|
5428
|
+
registerInstance(this, hostRef);
|
|
5429
|
+
this.isOpen = false;
|
|
5430
|
+
this.menuItems = [];
|
|
5431
|
+
this.currentFocusIndex = -1;
|
|
5432
|
+
/**
|
|
5433
|
+
* The placement of the dropdown panel relative to the trigger.
|
|
5434
|
+
*/
|
|
5435
|
+
this.placement = 'bottom-start';
|
|
5436
|
+
this.handleTriggerSlotChange = (event) => {
|
|
5437
|
+
this.slotEl = event.target;
|
|
5438
|
+
// Get all elements assigned to this slot
|
|
5439
|
+
const assignedElements = this.slotEl.assignedElements();
|
|
5440
|
+
this.triggerEl = assignedElements[0];
|
|
5441
|
+
this.triggerEl.onclick = this.handleClick;
|
|
5442
|
+
// Add accessibility attributes to trigger
|
|
5443
|
+
this.triggerEl.setAttribute('aria-haspopup', 'menu');
|
|
5444
|
+
this.triggerEl.setAttribute('aria-expanded', 'false');
|
|
5445
|
+
};
|
|
5446
|
+
this.handleSlotChange = (event) => {
|
|
5447
|
+
this.slotEl = event.target;
|
|
5448
|
+
// Get all elements assigned to this slot
|
|
5449
|
+
const assignedElements = this.slotEl.assignedElements();
|
|
5450
|
+
// ensure assignedElements only contains pds-dropdown-menu-item or pds-dropdown-menu-separator
|
|
5451
|
+
// if there are other elements, throw an error
|
|
5452
|
+
const invalidElements = assignedElements.filter(el => el.tagName.toLowerCase() !== 'pds-dropdown-menu-item' && el.tagName.toLowerCase() !== 'pds-dropdown-menu-separator');
|
|
5453
|
+
if (invalidElements.length > 0) {
|
|
5454
|
+
throw new Error(`pds-dropdown-menu only accepts pds-dropdown-menu-item and pds-dropdown-menu-separator elements`);
|
|
5455
|
+
}
|
|
5456
|
+
// Store all menu items for keyboard navigation
|
|
5457
|
+
this.menuItems = assignedElements.filter(el => el.tagName.toLowerCase() === 'pds-dropdown-menu-item');
|
|
5458
|
+
};
|
|
5459
|
+
// Toggle dropdown open/closed
|
|
5460
|
+
this.toggleDropdown = () => {
|
|
5461
|
+
this.isOpen = !this.isOpen;
|
|
5462
|
+
if (this.isOpen) {
|
|
5463
|
+
this.openDropdown();
|
|
5464
|
+
}
|
|
5465
|
+
else {
|
|
5466
|
+
this.closeDropdown();
|
|
5467
|
+
}
|
|
5468
|
+
};
|
|
5469
|
+
// Open the dropdown and position it
|
|
5470
|
+
this.openDropdown = () => {
|
|
5471
|
+
var _a;
|
|
5472
|
+
computePosition(this.triggerEl, this.panelEl, {
|
|
5473
|
+
placement: this.placement,
|
|
5474
|
+
middleware: [offset(6), flip(), shift({ padding: 5 })],
|
|
5475
|
+
}).then(({ x, y }) => {
|
|
5476
|
+
Object.assign(this.panelEl.style, {
|
|
5477
|
+
left: `${x}px`,
|
|
5478
|
+
top: `${y}px`,
|
|
5479
|
+
});
|
|
5480
|
+
});
|
|
5481
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-box').classList.remove('is-hidden');
|
|
5482
|
+
this.isOpen = true;
|
|
5483
|
+
// Update ARIA attributes
|
|
5484
|
+
this.triggerEl.setAttribute('aria-expanded', 'true');
|
|
5485
|
+
};
|
|
5486
|
+
// Close the dropdown
|
|
5487
|
+
this.closeDropdown = () => {
|
|
5488
|
+
var _a;
|
|
5489
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-box').classList.add('is-hidden');
|
|
5490
|
+
this.isOpen = false;
|
|
5491
|
+
// Update ARIA attributes
|
|
5492
|
+
this.triggerEl.setAttribute('aria-expanded', 'false');
|
|
5493
|
+
// Reset focus index
|
|
5494
|
+
this.currentFocusIndex = -1;
|
|
5495
|
+
// Return focus to trigger
|
|
5496
|
+
this.triggerEl.focus();
|
|
5497
|
+
};
|
|
5498
|
+
// Handle click on the trigger element
|
|
5499
|
+
this.handleClick = () => {
|
|
5500
|
+
this.toggleDropdown();
|
|
5501
|
+
};
|
|
5502
|
+
}
|
|
5503
|
+
componentDidRender() {
|
|
5504
|
+
var _a;
|
|
5505
|
+
this.panelEl = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-box');
|
|
5506
|
+
}
|
|
5507
|
+
// Get the index of the currently focused menu item
|
|
5508
|
+
getFocusedItemIndex() {
|
|
5509
|
+
const activeElement = document.activeElement;
|
|
5510
|
+
if (!activeElement)
|
|
5511
|
+
return -1;
|
|
5512
|
+
return this.menuItems.findIndex(item => item === activeElement);
|
|
5513
|
+
}
|
|
5514
|
+
// Focus a specific menu item by index
|
|
5515
|
+
focusItemByIndex(index) {
|
|
5516
|
+
var _a, _b, _c, _d;
|
|
5517
|
+
if (index >= 0 && index < this.menuItems.length) {
|
|
5518
|
+
this.currentFocusIndex = index;
|
|
5519
|
+
// Focus the inner button/link instead of the host element
|
|
5520
|
+
const menuItem = this.menuItems[index];
|
|
5521
|
+
const innerButton = (_a = menuItem.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('button');
|
|
5522
|
+
const innerLink = (_d = (_c = (_b = menuItem.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('pds-link')) === null || _c === void 0 ? void 0 : _c.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector('a');
|
|
5523
|
+
if (innerButton) {
|
|
5524
|
+
return innerButton.focus();
|
|
5525
|
+
}
|
|
5526
|
+
else if (innerLink) {
|
|
5527
|
+
return innerLink.focus();
|
|
5528
|
+
}
|
|
5529
|
+
else {
|
|
5530
|
+
// Fallback to focusing the host if we can't find the inner element
|
|
5531
|
+
menuItem.focus();
|
|
5532
|
+
}
|
|
5533
|
+
}
|
|
5534
|
+
}
|
|
5535
|
+
// Focus the next menu item
|
|
5536
|
+
focusNextItem() {
|
|
5537
|
+
let nextIndex = (this.currentFocusIndex + 1) % this.menuItems.length;
|
|
5538
|
+
// Skip disabled items
|
|
5539
|
+
let attempts = 0;
|
|
5540
|
+
const maxAttempts = this.menuItems.length;
|
|
5541
|
+
while (attempts < maxAttempts && this.menuItems[nextIndex].disabled) {
|
|
5542
|
+
nextIndex = (nextIndex + 1) % this.menuItems.length;
|
|
5543
|
+
attempts++;
|
|
5544
|
+
}
|
|
5545
|
+
// Only focus if we found a non-disabled item
|
|
5546
|
+
if (attempts < maxAttempts) {
|
|
5547
|
+
this.focusItemByIndex(nextIndex);
|
|
5548
|
+
}
|
|
5549
|
+
}
|
|
5550
|
+
// Focus the previous menu item
|
|
5551
|
+
focusPreviousItem() {
|
|
5552
|
+
let prevIndex = this.currentFocusIndex <= 0
|
|
5553
|
+
? this.menuItems.length - 1
|
|
5554
|
+
: this.currentFocusIndex - 1;
|
|
5555
|
+
// Skip disabled items
|
|
5556
|
+
let attempts = 0;
|
|
5557
|
+
const maxAttempts = this.menuItems.length;
|
|
5558
|
+
while (attempts < maxAttempts && this.menuItems[prevIndex].disabled) {
|
|
5559
|
+
prevIndex = prevIndex <= 0 ? this.menuItems.length - 1 : prevIndex - 1;
|
|
5560
|
+
attempts++;
|
|
5561
|
+
}
|
|
5562
|
+
// Only focus if we found a non-disabled item
|
|
5563
|
+
if (attempts < maxAttempts) {
|
|
5564
|
+
this.focusItemByIndex(prevIndex);
|
|
5565
|
+
}
|
|
5566
|
+
}
|
|
5567
|
+
// Handle keyboard events for the dropdown
|
|
5568
|
+
handleKeyDown(event) {
|
|
5569
|
+
if (!this.isOpen)
|
|
5570
|
+
return;
|
|
5571
|
+
switch (event.key) {
|
|
5572
|
+
case 'Escape':
|
|
5573
|
+
event.preventDefault();
|
|
5574
|
+
this.closeDropdown();
|
|
5575
|
+
break;
|
|
5576
|
+
case 'ArrowDown':
|
|
5577
|
+
event.preventDefault();
|
|
5578
|
+
this.focusNextItem();
|
|
5579
|
+
break;
|
|
5580
|
+
case 'ArrowUp':
|
|
5581
|
+
event.preventDefault();
|
|
5582
|
+
this.focusPreviousItem();
|
|
5583
|
+
break;
|
|
5584
|
+
case 'Home':
|
|
5585
|
+
event.preventDefault();
|
|
5586
|
+
if (this.menuItems.length > 0) {
|
|
5587
|
+
// Find first non-disabled item
|
|
5588
|
+
let firstIndex = 0;
|
|
5589
|
+
while (firstIndex < this.menuItems.length && this.menuItems[firstIndex].disabled) {
|
|
5590
|
+
firstIndex++;
|
|
5591
|
+
}
|
|
5592
|
+
if (firstIndex < this.menuItems.length) {
|
|
5593
|
+
this.focusItemByIndex(firstIndex);
|
|
5594
|
+
}
|
|
5595
|
+
}
|
|
5596
|
+
break;
|
|
5597
|
+
case 'End':
|
|
5598
|
+
event.preventDefault();
|
|
5599
|
+
if (this.menuItems.length > 0) {
|
|
5600
|
+
// Find last non-disabled item
|
|
5601
|
+
let lastIndex = this.menuItems.length - 1;
|
|
5602
|
+
while (lastIndex >= 0 && this.menuItems[lastIndex].disabled) {
|
|
5603
|
+
lastIndex--;
|
|
5604
|
+
}
|
|
5605
|
+
if (lastIndex >= 0) {
|
|
5606
|
+
this.focusItemByIndex(lastIndex);
|
|
5607
|
+
}
|
|
5608
|
+
}
|
|
5609
|
+
break;
|
|
5610
|
+
case 'Tab':
|
|
5611
|
+
if (event.shiftKey) {
|
|
5612
|
+
// Let Shift+Tab navigate naturally from first item to trigger
|
|
5613
|
+
// For all other items, move to previous item
|
|
5614
|
+
const currentIndex = this.getFocusedItemIndex();
|
|
5615
|
+
if (currentIndex > 0) {
|
|
5616
|
+
// If not on first item, prevent default and go to previous item
|
|
5617
|
+
event.preventDefault();
|
|
5618
|
+
this.focusPreviousItem(); // Use our method that skips disabled items
|
|
5619
|
+
}
|
|
5620
|
+
// If on first item or no item, let natural tab order move back to trigger
|
|
5621
|
+
}
|
|
5622
|
+
else {
|
|
5623
|
+
// Forward Tab navigation
|
|
5624
|
+
const activeElement = document.activeElement;
|
|
5625
|
+
const isTriggerFocused = activeElement === this.triggerEl;
|
|
5626
|
+
const currentIndex = this.getFocusedItemIndex();
|
|
5627
|
+
if (isTriggerFocused && this.menuItems.length > 0) {
|
|
5628
|
+
// If trigger is focused, move to first non-disabled menu item
|
|
5629
|
+
event.preventDefault();
|
|
5630
|
+
// Find the first non-disabled item
|
|
5631
|
+
let firstFocusableIndex = 0;
|
|
5632
|
+
while (firstFocusableIndex < this.menuItems.length && this.menuItems[firstFocusableIndex].disabled) {
|
|
5633
|
+
firstFocusableIndex++;
|
|
5634
|
+
}
|
|
5635
|
+
if (firstFocusableIndex < this.menuItems.length) {
|
|
5636
|
+
this.focusItemByIndex(firstFocusableIndex);
|
|
5637
|
+
}
|
|
5638
|
+
}
|
|
5639
|
+
else if (currentIndex === -1 && this.menuItems.length > 0) {
|
|
5640
|
+
// If no menu item is focused, focus the first non-disabled one
|
|
5641
|
+
event.preventDefault();
|
|
5642
|
+
// Find the first non-disabled item
|
|
5643
|
+
let firstFocusableIndex = 0;
|
|
5644
|
+
while (firstFocusableIndex < this.menuItems.length && this.menuItems[firstFocusableIndex].disabled) {
|
|
5645
|
+
firstFocusableIndex++;
|
|
5646
|
+
}
|
|
5647
|
+
if (firstFocusableIndex < this.menuItems.length) {
|
|
5648
|
+
this.focusItemByIndex(firstFocusableIndex);
|
|
5649
|
+
}
|
|
5650
|
+
}
|
|
5651
|
+
else if (currentIndex !== -1) {
|
|
5652
|
+
// Use our method that skips disabled items
|
|
5653
|
+
event.preventDefault();
|
|
5654
|
+
this.focusNextItem();
|
|
5655
|
+
}
|
|
5656
|
+
}
|
|
5657
|
+
break;
|
|
5658
|
+
}
|
|
5659
|
+
}
|
|
5660
|
+
// Handle clicks outside the dropdown to close it
|
|
5661
|
+
handleWindowClick(event) {
|
|
5662
|
+
if (this.isOpen && !this.host.contains(event.target) && event.target !== this.triggerEl) {
|
|
5663
|
+
this.closeDropdown();
|
|
5664
|
+
}
|
|
5665
|
+
}
|
|
5666
|
+
render() {
|
|
5667
|
+
return (hAsync(Host, { key: '492d6a2baba8c0cf5e05a6c34b774900f5da6886', id: this.componentId }, hAsync("slot", { key: '9d57ee287cff289693c941410bcc62bb9fb1da95', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), hAsync("pds-box", { key: '62ae569a3bf7f958c01cfe1a74d174e413763f72', "border-radius": "sm", display: "flex", direction: "column", class: "pds-dropdown-menu--panel is-hidden", shadow: "100", role: "menu", "aria-orientation": "vertical" }, hAsync("slot", { key: 'ea6d26124c06683e4fde23bc29f955cb04468d7a', onSlotchange: this.handleSlotChange }))));
|
|
5668
|
+
}
|
|
5669
|
+
get host() { return getElement(this); }
|
|
5670
|
+
static get style() { return pdsDropdownMenuCss; }
|
|
5671
|
+
static get cmpMeta() { return {
|
|
5672
|
+
"$flags$": 9,
|
|
5673
|
+
"$tagName$": "pds-dropdown-menu",
|
|
5674
|
+
"$members$": {
|
|
5675
|
+
"componentId": [1, "component-id"],
|
|
5676
|
+
"placement": [1],
|
|
5677
|
+
"currentFocusIndex": [32]
|
|
5678
|
+
},
|
|
5679
|
+
"$listeners$": [[8, "keydown", "handleKeyDown"], [8, "click", "handleWindowClick"]],
|
|
5680
|
+
"$lazyBundleId$": "-",
|
|
5681
|
+
"$attrsToReflect$": []
|
|
5682
|
+
}; }
|
|
5683
|
+
}
|
|
5684
|
+
|
|
5685
|
+
const pdsDropdownMenuItemCss = ":host{cursor:pointer;display:-ms-flexbox;display:flex;width:100%;}:host(.is-disabled){cursor:not-allowed !important;opacity:0.5 !important}:host(.is-disabled) .pds-dropdown-menu-item__content{cursor:not-allowed !important;pointer-events:none !important}.pds-dropdown-menu-item__content{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-dimension-xs);display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px);padding:var(--pine-dimension-xs);text-align:start;width:100%;}.pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-grey-150);color:var(--pine-color-text-hover)}.pds-dropdown-menu-item__content:focus,.pds-dropdown-menu-item__content:focus-visible,.pds-dropdown-menu-item__content.has-focus{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}:host(.destructive) .pds-dropdown-menu-item__content{-ms-flex-align:center;align-items:center;color:var(--pine-color-danger)}:host(.destructive) .pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-danger-disabled);color:var(--pine-color-danger-hover)}:host(.destructive) .pds-dropdown-menu-item__content:focus,:host(.destructive) .pds-dropdown-menu-item__content:focus-visible,:host(.destructive) .pds-dropdown-menu-item__content.has-focus{background-color:var(--pine-color-danger-disabled);outline:var(--pine-outline-focus-danger);outline-offset:var(--pine-border-width)}pds-link::part(link):focus,pds-link::part(link):focus-visible{-webkit-box-shadow:none;box-shadow:none;outline:none}pds-link::part(link){display:block;margin-inline:calc(var(--pine-dimension-xs) * -1);padding-inline:var(--pine-dimension-xs);width:100%}";
|
|
5686
|
+
|
|
5687
|
+
class PdsDropdownMenuItem {
|
|
5688
|
+
constructor(hostRef) {
|
|
5689
|
+
registerInstance(this, hostRef);
|
|
5690
|
+
this.pdsClick = createEvent(this, "pdsClick");
|
|
5691
|
+
/**
|
|
5692
|
+
* It determines whether or not the dropdown-item is destructive.
|
|
5693
|
+
* @defaultValue false
|
|
5694
|
+
*/
|
|
5695
|
+
this.destructive = false;
|
|
5696
|
+
/**
|
|
5697
|
+
* It determines whether or not the dropdown-item is disabled.
|
|
5698
|
+
* @defaultValue false
|
|
5699
|
+
*/
|
|
5700
|
+
this.disabled = false;
|
|
5701
|
+
this.hasFocus = false;
|
|
5702
|
+
this.handleFocus = () => {
|
|
5703
|
+
this.hasFocus = true;
|
|
5704
|
+
};
|
|
5705
|
+
this.handleBlur = () => {
|
|
5706
|
+
this.hasFocus = false;
|
|
5707
|
+
};
|
|
5708
|
+
this.handleKeyDown = (event) => {
|
|
5709
|
+
// Handle keyboard events
|
|
5710
|
+
if (!this.disabled && (event.key === 'Enter')) {
|
|
5711
|
+
// Only prevent default for button elements or Space key
|
|
5712
|
+
// For links with Enter key, we want the default navigation behavior
|
|
5713
|
+
if (!this.href) {
|
|
5714
|
+
event.preventDefault();
|
|
5715
|
+
}
|
|
5716
|
+
this.handleClick();
|
|
5717
|
+
}
|
|
5718
|
+
};
|
|
5719
|
+
}
|
|
5720
|
+
/**
|
|
5721
|
+
* Trigger the click event
|
|
5722
|
+
*/
|
|
5723
|
+
async clickItem() {
|
|
5724
|
+
this.handleClick();
|
|
5725
|
+
}
|
|
5726
|
+
;
|
|
5727
|
+
handleClick() {
|
|
5728
|
+
var _a;
|
|
5729
|
+
// Filter only pds-dropdown-menu-item elements and find the index of the current item
|
|
5730
|
+
const menuItems = Array.from(this.host.parentNode.children).filter((child) => child.tagName.toLowerCase() === 'pds-dropdown-menu-item');
|
|
5731
|
+
const itemIndex = menuItems.indexOf(this.host);
|
|
5732
|
+
// Get the text content from the slotted content
|
|
5733
|
+
const content = ((_a = this.host.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
5734
|
+
this.pdsClick.emit({
|
|
5735
|
+
itemIndex,
|
|
5736
|
+
item: this.host,
|
|
5737
|
+
content
|
|
5738
|
+
});
|
|
5739
|
+
}
|
|
5740
|
+
renderElement() {
|
|
5741
|
+
if (this.href !== undefined) {
|
|
5742
|
+
return (hAsync("pds-link", { href: this.disabled ? null : this.href, class: {
|
|
5743
|
+
'pds-dropdown-menu-item__content': true,
|
|
5744
|
+
'has-focus': this.hasFocus
|
|
5745
|
+
}, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, "aria-disabled": this.disabled ? 'true' : null }, hAsync("slot", null)));
|
|
5746
|
+
}
|
|
5747
|
+
return (hAsync("button", { class: {
|
|
5748
|
+
'pds-dropdown-menu-item__content': true,
|
|
5749
|
+
'has-focus': this.hasFocus
|
|
5750
|
+
}, tabIndex: this.disabled ? -1 : 0, type: "button", onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null }, hAsync("slot", null)));
|
|
5751
|
+
}
|
|
5752
|
+
render() {
|
|
5753
|
+
return (hAsync(Host, { key: 'b27f62c0f1cfe56e777b1a875b93954d4c9da00d', id: this.componentId, class: { 'is-disabled': this.disabled, 'destructive': !this.disabled && this.destructive }, onClick: () => !this.disabled && this.handleClick(), role: "none", tabIndex: -1, "aria-disabled": this.disabled ? 'true' : null }, this.renderElement()));
|
|
5754
|
+
}
|
|
5755
|
+
get host() { return getElement(this); }
|
|
5756
|
+
static get style() { return pdsDropdownMenuItemCss; }
|
|
5757
|
+
static get cmpMeta() { return {
|
|
5758
|
+
"$flags$": 9,
|
|
5759
|
+
"$tagName$": "pds-dropdown-menu-item",
|
|
5760
|
+
"$members$": {
|
|
5761
|
+
"componentId": [1, "component-id"],
|
|
5762
|
+
"destructive": [4],
|
|
5763
|
+
"disabled": [4],
|
|
5764
|
+
"href": [1],
|
|
5765
|
+
"hasFocus": [32],
|
|
5766
|
+
"clickItem": [64]
|
|
5767
|
+
},
|
|
5768
|
+
"$listeners$": undefined,
|
|
5769
|
+
"$lazyBundleId$": "-",
|
|
5770
|
+
"$attrsToReflect$": []
|
|
5771
|
+
}; }
|
|
5772
|
+
}
|
|
5773
|
+
|
|
5774
|
+
const pdsDropdownMenuSeparatorCss = ":host hr{border:1px solid var(--pine-color-border);margin-block:var(--pine-dimension-xs)}";
|
|
5775
|
+
|
|
5776
|
+
class PdsDropdownMenuSeparator {
|
|
5777
|
+
constructor(hostRef) {
|
|
5778
|
+
registerInstance(this, hostRef);
|
|
5779
|
+
/**
|
|
5780
|
+
* It determines whether or not the dropdown-item is disabled.
|
|
5781
|
+
* @defaultValue false
|
|
5782
|
+
*/
|
|
5783
|
+
this.disabled = false;
|
|
5784
|
+
}
|
|
5785
|
+
render() {
|
|
5786
|
+
return (hAsync(Host, { key: '71b19470921b7848e5f0c44ef82aa0d9f8ef2017', id: this.componentId }, hAsync("hr", { key: 'efc84b6b3f3f35421c0af863fb2d4636e542773e' })));
|
|
5787
|
+
}
|
|
5788
|
+
static get style() { return pdsDropdownMenuSeparatorCss; }
|
|
5789
|
+
static get cmpMeta() { return {
|
|
5790
|
+
"$flags$": 9,
|
|
5791
|
+
"$tagName$": "pds-dropdown-menu-separator",
|
|
5792
|
+
"$members$": {
|
|
5793
|
+
"componentId": [1, "component-id"],
|
|
5794
|
+
"disabled": [4]
|
|
5795
|
+
},
|
|
5796
|
+
"$listeners$": undefined,
|
|
5797
|
+
"$lazyBundleId$": "-",
|
|
5798
|
+
"$attrsToReflect$": []
|
|
5799
|
+
}; }
|
|
5800
|
+
}
|
|
5801
|
+
|
|
5802
|
+
const getName = (iconName, icon) => {
|
|
5803
|
+
if (!iconName && icon && !isSrc(icon)) {
|
|
5804
|
+
iconName = icon;
|
|
5805
|
+
}
|
|
5806
|
+
if (isStr(iconName)) {
|
|
5807
|
+
iconName = toLower(iconName);
|
|
5808
|
+
}
|
|
5809
|
+
if (!isStr(iconName) || iconName.trim() === '') {
|
|
5810
|
+
return null;
|
|
5811
|
+
}
|
|
5812
|
+
const invalidChars = iconName.replace(/[a-z]|-|\d/gi, '');
|
|
5813
|
+
if (invalidChars != '') {
|
|
5814
|
+
return null;
|
|
5815
|
+
}
|
|
5816
|
+
return iconName;
|
|
5817
|
+
};
|
|
5818
|
+
/**
|
|
5819
|
+
* Returns `true` if the document or host element
|
|
5820
|
+
* has a `dir` set to `rtl`. The host value will always
|
|
5821
|
+
* take priority over the root document value.
|
|
5822
|
+
*/
|
|
5823
|
+
const isRTL = (hostEl) => {
|
|
5824
|
+
if (hostEl) {
|
|
5825
|
+
if (hostEl.dir !== '') {
|
|
5826
|
+
return hostEl.dir.toLowerCase() === 'rtl';
|
|
5827
|
+
}
|
|
5828
|
+
}
|
|
5829
|
+
return (document === null || document === void 0 ? void 0 : document.dir.toLowerCase()) === 'rtl';
|
|
5830
|
+
};
|
|
5831
|
+
const isSrc = (str) => str.length > 0 && /(\/|\.)/.test(str);
|
|
5832
|
+
const isStr = (val) => typeof val === 'string'; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
5833
|
+
const toLower = (val) => val.toLowerCase();
|
|
5834
|
+
/**
|
|
5835
|
+
* Elements inside of web components sometimes need to inherit global attributes
|
|
5836
|
+
* set on the host. For example, the inner input in `pds-input` should inherit
|
|
5837
|
+
* the `title` attribute that developers set directly on `pds-input`. This
|
|
5838
|
+
* helper function should be called in componentWillLoad and assigned to a variable
|
|
5839
|
+
* that is later used in the render function.
|
|
5840
|
+
*
|
|
5841
|
+
* This does not need to be reactive as changing attributes on the host element
|
|
5842
|
+
* does not trigger a re-render.
|
|
5843
|
+
*/
|
|
5844
|
+
const inheritAttributes = (el, attributes = []) => {
|
|
5845
|
+
const attributeObject = {}; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
5846
|
+
attributes.forEach(attr => {
|
|
5847
|
+
if (el.hasAttribute(attr)) {
|
|
5848
|
+
const value = el.getAttribute(attr);
|
|
5849
|
+
if (value !== null) {
|
|
5850
|
+
attributeObject[attr] = el.getAttribute(attr);
|
|
5851
|
+
}
|
|
5852
|
+
el.removeAttribute(attr);
|
|
5853
|
+
}
|
|
5854
|
+
});
|
|
5855
|
+
return attributeObject;
|
|
5856
|
+
};
|
|
5857
|
+
/**
|
|
5858
|
+
* Determines if an icon should be flipped when RTL is enabled
|
|
5859
|
+
* @param iconName - The name of the icon to check
|
|
5860
|
+
* @param hostEl - Optional host element to check for RTL direction
|
|
5861
|
+
* @returns {boolean} - True if the icon should be flipped in RTL mode, false otherwise
|
|
5862
|
+
*/
|
|
5863
|
+
const shouldRtlFlipIcon = (iconName, hostEl) => {
|
|
5864
|
+
// First check if we're in RTL mode
|
|
5865
|
+
const rtlEnabled = isRTL(hostEl);
|
|
5866
|
+
// Only flip if we're in RTL mode and the icon is in the flip list
|
|
5867
|
+
return rtlEnabled && ICONS_TO_FLIP.includes(iconName);
|
|
5868
|
+
};
|
|
5869
|
+
/**
|
|
5870
|
+
* Array of available icon names
|
|
5871
|
+
*/
|
|
5872
|
+
const ICONS_TO_FLIP = [
|
|
5873
|
+
'align-horizontal-bottom',
|
|
5874
|
+
'align-horizontal-center',
|
|
5875
|
+
'align-horizontal-top',
|
|
5876
|
+
'align-left',
|
|
5877
|
+
'align-right',
|
|
5878
|
+
'align-vertical-left',
|
|
5879
|
+
'align-vertical-right',
|
|
5880
|
+
'arrow-corner',
|
|
5881
|
+
'arrow-left',
|
|
5882
|
+
'arrow-right',
|
|
5883
|
+
'calendar-schedule',
|
|
5884
|
+
'caret-left',
|
|
5885
|
+
'caret-right',
|
|
5886
|
+
'cart',
|
|
5887
|
+
'cart-add',
|
|
5888
|
+
'comment',
|
|
5889
|
+
'comment-no',
|
|
4006
5890
|
'conversation',
|
|
4007
5891
|
'copy',
|
|
4008
5892
|
'copy-07',
|
|
@@ -4190,9 +6074,9 @@ class PdsImage {
|
|
|
4190
6074
|
this.loading = 'eager';
|
|
4191
6075
|
}
|
|
4192
6076
|
render() {
|
|
4193
|
-
return (hAsync(Host, { key: '
|
|
6077
|
+
return (hAsync(Host, { key: 'a706be22398297ae7087239a3dc7474ae17ab358', class: {
|
|
4194
6078
|
'pds-image': true,
|
|
4195
|
-
}, id: this.componentId }, hAsync("img", { key: '
|
|
6079
|
+
}, id: this.componentId }, hAsync("img", { key: '37a465ed175ae298e174370246885fb6d7837112', alt: this.alt, height: this.height, loading: this.loading, sizes: this.sizes, src: this.src, srcset: this.srcset, width: this.width })));
|
|
4196
6080
|
}
|
|
4197
6081
|
static get style() { return pdsImageCss; }
|
|
4198
6082
|
static get cmpMeta() { return {
|
|
@@ -4218,8 +6102,14 @@ const pdsInputTokensCss$1 = ":host{--pine-input-color-background-danger:var(--pi
|
|
|
4218
6102
|
|
|
4219
6103
|
const labelCss$4 = ":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)}";
|
|
4220
6104
|
|
|
4221
|
-
const pdsInputCss = ":host{display:inline}:host([aria-readonly=true]) input{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.pds-input{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-input__label{-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-input__field{
|
|
6105
|
+
const pdsInputCss = ":host{--pds-input-background:var(--pine-color-background-container);--pds-input-border-color:var(--pine-color-border);--pds-input-border-color-hover:var(--pine-color-border-hover);--pds-input-border-color-disabled:var(--pine-color-border-disabled);--pds-input-border-radius:var(--pine-dimension-125);--pds-input-border-width:var(--pine-border-width-thin);--pds-input-padding-x:var(--pine-dimension-150);--pds-input-padding-y:var(--pine-dimension-xs);--pds-input-font:var(--pine-typography-body);--pds-input-text-color:var(--pine-color-text-active);--pds-input-placeholder-color:var(--pine-color-text-placeholder);--pds-input-icon-color:var(--pine-color-text-secondary);--pds-input-disabled-background:var(--pine-color-background-container-disabled);--pds-input-disabled-text-color:var(--pine-color-text-disabled);--pds-input-error-color:var(--pine-color-text-message-danger);--pds-input-error-background:var(--pine-input-color-background-danger);--pds-input-error-border:var(--pine-color-border-danger);--pds-input-error-border-hover:var(--pine-color-border-danger-hover);--pds-input-addon-background:var(--pine-color-background-subtle);--pds-input-addon-color:var(--pine-color-text-secondary);--pds-input-field-min-height:calc(var(--pine-dimension-450) + 2px);--box-shadow-focus:0 0 0 1px #ffffff, 0 0 0 3px var(--pine-color-focus-ring);--box-shadow-focus-error:0 0 0 1px #ffffff, 0 0 0 3px var(--pine-color-focus-ring-danger);display:inline}:host pds-select::part(select){background-color:var(--pds-input-error-background);border-color:var(--pds-input-error-border)}:host::part(prefix),:host::part(suffix){-ms-flex-align:center;align-items:center;color:var(--pine-color-text-label-readonly);display:-ms-flexbox;display:flex;height:100%;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);white-space:nowrap;z-index:1}:host::part(prefix){border-end-start-radius:var(--pds-input-border-radius);-webkit-border-end:var(--pine-border-width-none);border-inline-end:var(--pine-border-width-none);border-start-start-radius:var(--pds-input-border-radius);left:var(--pds-input-padding-x)}:host::part(suffix){border-end-end-radius:var(--pds-input-border-radius);-webkit-border-start:var(--pine-border-width-none);border-inline-start:var(--pine-border-width-none);border-start-end-radius:var(--pds-input-border-radius);right:var(--pds-input-padding-x)}:host::part(prepend),:host::part(append){-ms-flex-align:center;align-items:center;background-color:var(--pds-input-addon-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color);color:var(--pds-input-addon-color);display:-ms-flexbox;display:flex}:host::part(prepend){border-end-start-radius:var(--pds-input-border-radius);-webkit-border-end:var(--pine-border-width-none);border-inline-end:var(--pine-border-width-none);border-start-start-radius:var(--pds-input-border-radius)}:host::part(append){border-end-end-radius:var(--pds-input-border-radius);-webkit-border-start:var(--pine-border-width-none);border-inline-start:var(--pine-border-width-none);border-start-end-radius:var(--pds-input-border-radius)}:host([has-prepend]) ::slotted(pds-button[slot=prepend]){--pds-button-background:var(--pds-input-addon-background);--pds-button-border:var(--pine-border-width-none);--pds-button-border-radius-end-end:var(--pine-dimension-none);--pds-button-border-radius-start-end:var(--pine-dimension-none);--pds-button-min-height:var(--pine-dimension-450)}:host([has-append]) ::slotted(pds-button[slot=append]){--pds-button-background:var(--pds-input-addon-background);--pds-button-border:var(--pine-border-width-none);--pds-button-border-radius-end-start:var(--pine-dimension-none);--pds-button-border-radius-start-start:var(--pine-dimension-none);--pds-button-min-height:var(--pine-dimension-450)}:host([has-prepend]) ::slotted(pds-select[slot=prepend]){--pds-select-background:var(--pds-input-addon-background);--pds-select-border:var(--pine-border-width-none);--pds-select-border-radius-end-end:var(--pine-dimension-none);--pds-select-border-radius-start-end:var(--pine-dimension-none);--pds-select-min-height:var(--pine-dimension-450)}:host([has-append]) ::slotted(pds-select[slot=append]){--pds-select-background:var(--pds-input-addon-background);--pds-select-border:var(--pine-border-width-none);--pds-select-border-radius-end-start:var(--pine-dimension-none);--pds-select-border-radius-start-start:var(--pine-dimension-none);--pds-select-min-height:var(--pine-dimension-450)}:host([aria-readonly=true]) input{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([disabled=true])::part(prepend),:host([disabled=true])::part(append){background-color:var(--pds-input-disabled-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color-disabled)}:host([invalid=true])::part(prepend),:host([invalid=true])::part(append){background-color:var(--pds-input-error-background);border:var(--pds-input-border-width) solid var(--pds-input-error-border)}.pds-input{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pine-dimension-2xs)}.pds-input__label{color:var(--pine-color-text-active);font:var(--pine-typography-body-sm-medium);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-input__field-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;position:relative;width:100%}.pds-input__field-wrapper.has-prefix .pds-input__field{-webkit-padding-start:calc(2 * var(--pds-input-padding-x) + var(--prefix-width, 1em));padding-inline-start:calc(2 * var(--pds-input-padding-x) + var(--prefix-width, 1em))}.pds-input__field-wrapper.has-suffix .pds-input__field{-webkit-padding-end:calc(2 * var(--pds-input-padding-x) + var(--suffix-width, 1em));padding-inline-end:calc(2 * var(--pds-input-padding-x) + var(--suffix-width, 1em))}.pds-input__field-wrapper.has-prepend .pds-input__field{border-end-start-radius:var(--pine-dimension-none);border-start-start-radius:var(--pine-dimension-none)}.pds-input__field-wrapper.has-append .pds-input__field{border-end-end-radius:var(--pine-dimension-none);border-start-end-radius:var(--pine-dimension-none)}.pds-input__field{background:var(--pds-input-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color);border-radius:var(--pds-input-border-radius);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pds-input-text-color);-ms-flex:1;flex:1;font:var(--pds-input-font);letter-spacing:var(--pine-letter-spacing);min-height:var(--pds-input-field-min-height);min-width:var(--pine-dimension-none);padding:var(--pds-input-padding-y) var(--pds-input-padding-x);-webkit-transition:border-color 0.2s ease;transition:border-color 0.2s ease;width:100%}.pds-input__field:hover:not(:disabled){border-color:var(--pds-input-border-color-hover)}.pds-input__field:disabled{background:var(--pds-input-disabled-background);border-color:var(--pine-color-border-disabled);color:var(--pds-input-disabled-text-color);cursor:not-allowed}.pds-input__field:disabled::-webkit-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::-moz-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled:-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::placeholder{color:var(--pine-color-text-placeholder-disabled)}.has-error .pds-input__field:hover:not(:disabled){border-color:var(--pds-input-error-border-hover)}.pds-input__field:focus-visible:not(.has-error){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}:host([has-prepend]) .pds-input__field:focus-visible:not(.has-error),:host([has-append]) .pds-input__field:focus-visible:not(.has-error),:host([has-prefix]) .pds-input__field:focus-visible:not(.has-error),:host([has-suffix]) .pds-input__field:focus-visible:not(.has-error){outline-offset:var(--pine-dimension-none)}.pds-input__field::-webkit-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::-moz-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field:-ms-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::-ms-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::placeholder{color:var(--pds-input-placeholder-color)}.has-error .pds-input__field{background-color:var(--pds-input-error-background);border-color:var(--pds-input-error-border)}.has-error .pds-input__field:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-input__error-message,.pds-input__helper-message{font:var(--pine-typography-body-sm-medium);-webkit-margin-after:var(--pine-dimension-none);margin-block-end:var(--pine-dimension-none);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-input__error-message{-ms-flex-align:center;align-items:center;color:var(--pds-input-error-color);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}";
|
|
4222
6106
|
|
|
6107
|
+
/**
|
|
6108
|
+
* @slot append - Content to be displayed after the input field
|
|
6109
|
+
* @slot prefix - Content that is displayed visually within the input field before the input field
|
|
6110
|
+
* @slot prepend - Content to be displayed before the input field
|
|
6111
|
+
* @slot suffix - Content that is displayed visually within the input field after the input field
|
|
6112
|
+
*/
|
|
4223
6113
|
class PdsInput {
|
|
4224
6114
|
constructor(hostRef) {
|
|
4225
6115
|
registerInstance(this, hostRef);
|
|
@@ -4229,6 +6119,22 @@ class PdsInput {
|
|
|
4229
6119
|
this.pdsInput = createEvent(this, "pdsInput");
|
|
4230
6120
|
this.inheritedAttributes = {};
|
|
4231
6121
|
this.isComposing = false;
|
|
6122
|
+
/**
|
|
6123
|
+
* If true, the input has prefix content (non-focusable)
|
|
6124
|
+
*/
|
|
6125
|
+
this.hasPrefix = false;
|
|
6126
|
+
/**
|
|
6127
|
+
* If true, the input has suffix content (non-focusable)
|
|
6128
|
+
*/
|
|
6129
|
+
this.hasSuffix = false;
|
|
6130
|
+
/**
|
|
6131
|
+
* If true, the input has prepend content (focusable)
|
|
6132
|
+
*/
|
|
6133
|
+
this.hasPrepend = false;
|
|
6134
|
+
/**
|
|
6135
|
+
* If true, the input has append content (focusable)
|
|
6136
|
+
*/
|
|
6137
|
+
this.hasAppend = false;
|
|
4232
6138
|
/**
|
|
4233
6139
|
* Determines the type of control that will be displayed
|
|
4234
6140
|
* `'email'`, `'number'`, `'password'`, `'tel'`, `'text'`, `'url'`
|
|
@@ -4285,6 +6191,62 @@ class PdsInput {
|
|
|
4285
6191
|
this.nativeInput.focus();
|
|
4286
6192
|
}
|
|
4287
6193
|
}
|
|
6194
|
+
updateAddonWidths() {
|
|
6195
|
+
requestAnimationFrame(() => {
|
|
6196
|
+
if (this.prefixEl) {
|
|
6197
|
+
const prefixWidth = this.prefixEl.offsetWidth;
|
|
6198
|
+
this.el.style.setProperty('--prefix-width', `${prefixWidth}px`);
|
|
6199
|
+
}
|
|
6200
|
+
if (this.suffixEl) {
|
|
6201
|
+
const suffixWidth = this.suffixEl.offsetWidth;
|
|
6202
|
+
this.el.style.setProperty('--suffix-width', `${suffixWidth}px`);
|
|
6203
|
+
}
|
|
6204
|
+
});
|
|
6205
|
+
}
|
|
6206
|
+
renderPrefix() {
|
|
6207
|
+
const hasPrefix = this.el.querySelector('[slot="prefix"]') !== null;
|
|
6208
|
+
if (hasPrefix) {
|
|
6209
|
+
return (hAsync("div", { class: "pds-input__prefix", part: "prefix", ref: (el) => this.prefixEl = el }, hAsync("slot", { name: "prefix", onSlotchange: () => this.updateAddonWidths() })));
|
|
6210
|
+
}
|
|
6211
|
+
return null;
|
|
6212
|
+
}
|
|
6213
|
+
renderSuffix() {
|
|
6214
|
+
const hasSuffix = this.el.querySelector('[slot="suffix"]') !== null;
|
|
6215
|
+
if (hasSuffix) {
|
|
6216
|
+
return (hAsync("div", { class: "pds-input__suffix", part: "suffix", ref: (el) => this.suffixEl = el }, hAsync("slot", { name: "suffix", onSlotchange: () => this.updateAddonWidths() })));
|
|
6217
|
+
}
|
|
6218
|
+
return null;
|
|
6219
|
+
}
|
|
6220
|
+
renderPrepend() {
|
|
6221
|
+
const hasPrepend = this.el.querySelector('[slot="prepend"]') !== null;
|
|
6222
|
+
if (hasPrepend) {
|
|
6223
|
+
return (hAsync("div", { class: "pds-input__prepend", part: "prepend" }, hAsync("slot", { name: "prepend" })));
|
|
6224
|
+
}
|
|
6225
|
+
return null;
|
|
6226
|
+
}
|
|
6227
|
+
renderAppend() {
|
|
6228
|
+
const hasAppend = this.el.querySelector('[slot="append"]') !== null;
|
|
6229
|
+
if (hasAppend) {
|
|
6230
|
+
return (hAsync("div", { class: "pds-input__append", part: "append" }, hAsync("slot", { name: "append" })));
|
|
6231
|
+
}
|
|
6232
|
+
return null;
|
|
6233
|
+
}
|
|
6234
|
+
componentWillLoad() {
|
|
6235
|
+
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
6236
|
+
this.hasPrefix = this.el.querySelector('[slot="prefix"]') !== null;
|
|
6237
|
+
this.hasSuffix = this.el.querySelector('[slot="suffix"]') !== null;
|
|
6238
|
+
this.hasPrepend = this.el.querySelector('[slot="prepend"]') !== null;
|
|
6239
|
+
this.hasAppend = this.el.querySelector('[slot="append"]') !== null;
|
|
6240
|
+
// Store the original pdsInput event emitter
|
|
6241
|
+
this.originalPdsInput = this.pdsInput;
|
|
6242
|
+
}
|
|
6243
|
+
componentDidLoad() {
|
|
6244
|
+
this.debounceChanged();
|
|
6245
|
+
this.updateAddonWidths();
|
|
6246
|
+
}
|
|
6247
|
+
componentDidUpdate() {
|
|
6248
|
+
this.updateAddonWidths();
|
|
6249
|
+
}
|
|
4288
6250
|
debounceChanged() {
|
|
4289
6251
|
const { pdsInput, debounce, originalPdsInput } = this;
|
|
4290
6252
|
/**
|
|
@@ -4313,7 +6275,6 @@ class PdsInput {
|
|
|
4313
6275
|
this.pdsChange.emit({ value: newValue, event });
|
|
4314
6276
|
}
|
|
4315
6277
|
/**
|
|
4316
|
-
*
|
|
4317
6278
|
* Emits a `pdsInput` event
|
|
4318
6279
|
*/
|
|
4319
6280
|
emitInputChange(event) {
|
|
@@ -4322,24 +6283,20 @@ class PdsInput {
|
|
|
4322
6283
|
const newValue = value == null ? value : value.toString();
|
|
4323
6284
|
this.pdsInput.emit({ value: newValue, event });
|
|
4324
6285
|
}
|
|
4325
|
-
componentWillLoad() {
|
|
4326
|
-
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
4327
|
-
}
|
|
4328
|
-
componentDidLoad() {
|
|
4329
|
-
this.debounceChanged();
|
|
4330
|
-
}
|
|
4331
|
-
inputClassNames() {
|
|
4332
|
-
const classNames = ['pds-input__field'];
|
|
4333
|
-
if (this.invalid && this.invalid === true) {
|
|
4334
|
-
classNames.push('is-invalid');
|
|
4335
|
-
}
|
|
4336
|
-
return classNames.join(' ');
|
|
4337
|
-
}
|
|
4338
6286
|
render() {
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
6287
|
+
const { componentId, disabled, errorMessage, helperMessage, invalid = false, label, } = this;
|
|
6288
|
+
const value = this.getValue();
|
|
6289
|
+
const inputWrapperClasses = {
|
|
6290
|
+
'pds-input__field-wrapper': true,
|
|
6291
|
+
'has-focus': this.hasFocus,
|
|
6292
|
+
'has-error': invalid || !!errorMessage,
|
|
6293
|
+
'is-disabled': disabled,
|
|
6294
|
+
'has-prefix': this.hasPrefix,
|
|
6295
|
+
'has-suffix': this.hasSuffix,
|
|
6296
|
+
'has-prepend': this.hasPrepend,
|
|
6297
|
+
'has-append': this.hasAppend,
|
|
6298
|
+
};
|
|
6299
|
+
return (hAsync(Host, { key: '6ae7251aeee049e0e4f3a66c7d947a3ceb7d2b26', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-prefix": this.hasPrefix ? 'true' : null, "has-suffix": this.hasSuffix ? 'true' : null, "has-prepend": this.hasPrepend ? 'true' : null, "has-append": this.hasAppend ? 'true' : null }, hAsync("div", { key: 'f397d329cf587b9bdf699a0c80a3bdb9c1de0b53', class: "pds-input" }, label && (hAsync("label", { key: '7e5523268dd59acb3fbf2bd659f319cc458166c0', htmlFor: componentId, class: "pds-input__label" }, label, this.required && hAsync("span", { key: 'f197ce55768d8409c9c7832af56e0a6bdc27e90a', class: "pds-input__required-indicator" }, " *"))), hAsync("div", { key: 'ad92476c65ad280622a8aa8c731609aff8ec51a4', class: inputWrapperClasses }, this.renderPrepend(), this.renderPrefix(), hAsync("input", Object.assign({ key: '187ee16cc7458af1dc06a7f424ce6bc2ffede359', ref: (input) => (this.nativeInput = input), class: "pds-input__field", "aria-describedby": assignDescription(componentId, invalid, helperMessage), "aria-invalid": invalid ? "true" : undefined, autocomplete: this.autocomplete, disabled: disabled, id: componentId, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, step: this.step, type: this.type, value: value, onInput: this.onInputEvent, onChange: this.onChangeEvent, onBlur: this.onBlurEvent, onFocus: this.onFocusEvent, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd }, this.inheritedAttributes)), this.renderSuffix(), this.renderAppend()), helperMessage && (hAsync("p", { key: 'c11daa2e4ed085033d90a3e9185dd7beb259aa9e', class: "pds-input__helper-message", id: messageId(componentId, 'helper') }, helperMessage)), errorMessage && (hAsync("p", { key: 'd5adbb495bd7abd83655390e0d34cbdf527b656a', class: "pds-input__error-message", id: messageId(componentId, 'error') }, hAsync("pds-icon", { key: 'd1a80c2d7e6f8389488fe2c0bb6dd1923536588a', icon: danger, size: "small" }), errorMessage)))));
|
|
4343
6300
|
}
|
|
4344
6301
|
get el() { return getElement(this); }
|
|
4345
6302
|
static get watchers() { return {
|
|
@@ -4359,12 +6316,22 @@ class PdsInput {
|
|
|
4359
6316
|
"helperMessage": [1, "helper-message"],
|
|
4360
6317
|
"invalid": [4],
|
|
4361
6318
|
"label": [1],
|
|
6319
|
+
"max": [1],
|
|
6320
|
+
"maxlength": [1],
|
|
6321
|
+
"min": [1],
|
|
6322
|
+
"minlength": [1],
|
|
4362
6323
|
"name": [1],
|
|
6324
|
+
"pattern": [1],
|
|
4363
6325
|
"placeholder": [1],
|
|
4364
6326
|
"readonly": [4],
|
|
4365
6327
|
"required": [4],
|
|
6328
|
+
"step": [1],
|
|
4366
6329
|
"type": [1],
|
|
4367
6330
|
"value": [1032],
|
|
6331
|
+
"hasPrefix": [32],
|
|
6332
|
+
"hasSuffix": [32],
|
|
6333
|
+
"hasPrepend": [32],
|
|
6334
|
+
"hasAppend": [32],
|
|
4368
6335
|
"hasFocus": [32],
|
|
4369
6336
|
"setFocus": [64]
|
|
4370
6337
|
},
|
|
@@ -4374,7 +6341,7 @@ class PdsInput {
|
|
|
4374
6341
|
}; }
|
|
4375
6342
|
}
|
|
4376
6343
|
|
|
4377
|
-
const pdsLinkCss = ":host{display:inline}:host pds-icon{-webkit-margin-start:var(--pine-dimension-2xs);margin-inline-start:var(--pine-dimension-2xs)}.pds-link{-ms-flex-align:center;align-items:center;color:var(--pine-color-text);display:-ms-inline-flexbox;display:inline-flex;font-weight:var(--pine-font-weight-medium)}.pds-link:focus-visible{border-radius:var(--pine-dimension-2xs);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width-thick);position:relative}.pds-link:hover{text-decoration:none}.pds-link--sm{font-size:var(--pine-font-size-body-xs)}.pds-link--sm pds-icon{height:var(--pine-dimension-xs);width:var(--pine-dimension-xs)}.pds-link--md{font-size:var(--pine-font-size-body-sm)}.pds-link--md pds-icon{height:var(--pine-dimension-xs);width:var(--pine-dimension-xs)}.pds-link--lg{font-size:var(--pine-font-size-body-md)}.pds-link--lg pds-icon{height:var(--pine-dimension-sm);width:var(--pine-dimension-sm)}.pds-link--plain{text-decoration:none}.pds-link--plain:hover{color:var(--pine-color-text-hover);text-decoration:underline}";
|
|
6344
|
+
const pdsLinkCss = ":host{display:inline}:host pds-icon{-webkit-margin-start:var(--pine-dimension-2xs);margin-inline-start:var(--pine-dimension-2xs)}.pds-link{-ms-flex-align:center;align-items:center;color:var(--color, var(--pine-color-text));display:-ms-inline-flexbox;display:inline-flex;font-weight:var(--pine-font-weight-medium)}.pds-link:focus-visible{border-radius:var(--pine-dimension-2xs);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width-thick);position:relative}.pds-link:hover{color:var(--color, var(--pine-color-text-hover));text-decoration:none}:host([color=secondary]) .pds-link{color:var(--pine-color-text-primary)}:host([color=secondary]) .pds-link:hover{color:var(--pine-color-grey-150)}:host([color=accent]) .pds-link{color:var(--pine-color-accent)}:host([color=accent]) .pds-link:hover{color:var(--pine-color-accent-hover)}:host([color=danger]) .pds-link{color:var(--pine-color-danger)}:host([color=danger]) .pds-link:hover{color:var(--pine-color-danger-hover)}.pds-link--sm{font-size:var(--pine-font-size-body-xs)}.pds-link--sm pds-icon{height:var(--pine-dimension-xs);width:var(--pine-dimension-xs)}.pds-link--md{font-size:var(--pine-font-size-body-sm)}.pds-link--md pds-icon{height:var(--pine-dimension-xs);width:var(--pine-dimension-xs)}.pds-link--lg{font-size:var(--pine-font-size-body-md)}.pds-link--lg pds-icon{height:var(--pine-dimension-sm);width:var(--pine-dimension-sm)}.pds-link--plain{text-decoration:none}.pds-link--plain:hover{color:var(--pine-color-text-hover);text-decoration:underline}";
|
|
4378
6345
|
|
|
4379
6346
|
/**
|
|
4380
6347
|
* @part link - Link element styles.
|
|
@@ -4407,22 +6374,362 @@ class PdsLink {
|
|
|
4407
6374
|
if (this.variant) {
|
|
4408
6375
|
classNames.push('pds-link--' + this.variant);
|
|
4409
6376
|
}
|
|
4410
|
-
return classNames.join(' ');
|
|
6377
|
+
return classNames.join(' ');
|
|
6378
|
+
}
|
|
6379
|
+
setLinkStyles() {
|
|
6380
|
+
if (!this.color)
|
|
6381
|
+
return;
|
|
6382
|
+
const linkColors = {
|
|
6383
|
+
secondary: 'var(--pine-color-text-primary)',
|
|
6384
|
+
accent: 'var(--pine-color-accent)',
|
|
6385
|
+
danger: 'var(--pine-color-danger)',
|
|
6386
|
+
};
|
|
6387
|
+
const linkStyles = setColor(this.color, linkColors);
|
|
6388
|
+
return linkStyles;
|
|
6389
|
+
}
|
|
6390
|
+
render() {
|
|
6391
|
+
return (hAsync("a", { key: 'f2b3e7f26b833f7b187fce6f36c392415e2499df', class: this.classNames(), href: this.href, id: this.componentId, part: "link", target: this.external ? '_blank' : undefined, style: this.setLinkStyles() }, hAsync("slot", { key: 'c85c0add786ab8a90f7cb0d12b75d65a51b8e313' }, this.href), this.external &&
|
|
6392
|
+
hAsync("pds-icon", { key: '2ce9fa8d29168659546bc95b0633815978142bbb', icon: launch, size: this.fontSize })));
|
|
6393
|
+
}
|
|
6394
|
+
static get style() { return pdsLinkCss; }
|
|
6395
|
+
static get cmpMeta() { return {
|
|
6396
|
+
"$flags$": 9,
|
|
6397
|
+
"$tagName$": "pds-link",
|
|
6398
|
+
"$members$": {
|
|
6399
|
+
"color": [1],
|
|
6400
|
+
"componentId": [1, "component-id"],
|
|
6401
|
+
"external": [4],
|
|
6402
|
+
"variant": [1],
|
|
6403
|
+
"fontSize": [1, "font-size"],
|
|
6404
|
+
"href": [1]
|
|
6405
|
+
},
|
|
6406
|
+
"$listeners$": undefined,
|
|
6407
|
+
"$lazyBundleId$": "-",
|
|
6408
|
+
"$attrsToReflect$": []
|
|
6409
|
+
}; }
|
|
6410
|
+
}
|
|
6411
|
+
|
|
6412
|
+
const pdsLoaderCss = ":host{--loader-color:var(--pine-color-brand);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pine-dimension-xs)}:host(.pds-loader--hidden),.pds-loader--hidden{border-width:0;clip:rect(0, 0, 0, 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pds-loader--spinner svg{--number-spinner-timing:2s;--number-spinner-path-timing:1.5s;-webkit-animation:rotate var(--number-spinner-timing) linear infinite;animation:rotate var(--number-spinner-timing) linear infinite;color:var(--loader-color)}.pds-loader__spinner-path{stroke-width:8px}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.pds-loader--typing{--number-typing-timing:1s;--opacity-typing-dot-default:0.4;--opacity-typing-dot-active:1;-ms-flex-align:center;align-items:center;background-color:var(--pine-color-background-container-disabled);border-radius:var(--pine-dimension-sm);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);display:-ms-inline-flexbox;display:inline-flex;gap:var(--pine-dimension-2xs);margin-block:var(--pine-dimension-none);margin-inline:auto;padding-block:15px;padding-inline:20px;position:relative}.pds-loader--typing span{background-color:var(--pine-color-border-hover);block-size:6px;border-radius:var(--pine-border-radius-full);inline-size:6px;opacity:var(--opacity-typing-dot-default)}.pds-loader--typing span:nth-of-type(1){-webkit-animation:var(--number-typing-timing) typing infinite 0.3333s;animation:var(--number-typing-timing) typing infinite 0.3333s}.pds-loader--typing span:nth-of-type(2){-webkit-animation:var(--number-typing-timing) typing infinite 0.6666s;animation:var(--number-typing-timing) typing infinite 0.6666s}.pds-loader--typing span:nth-of-type(3){-webkit-animation:var(--number-typing-timing) typing infinite 0.9999s;animation:var(--number-typing-timing) typing infinite 0.9999s}@-webkit-keyframes typing{50%{opacity:var(--opacity-typing-dot-active);-webkit-transform:scale(1.25);transform:scale(1.25)}}@keyframes typing{50%{opacity:var(--opacity-typing-dot-active);-webkit-transform:scale(1.25);transform:scale(1.25)}}.pds-loader__label{--typography-label-default:var(--pine-font-weight-medium) var(--pine-font-size-body-md)/var(--pine-line-height-body) var(--pine-font-family-body);font:var(--typography-label-default)}";
|
|
6413
|
+
|
|
6414
|
+
/**
|
|
6415
|
+
* @slot label - Default slot for Loader label text.
|
|
6416
|
+
*/
|
|
6417
|
+
class PdsLoader {
|
|
6418
|
+
constructor(hostRef) {
|
|
6419
|
+
registerInstance(this, hostRef);
|
|
6420
|
+
/**
|
|
6421
|
+
* If false, the loader will be hidden.
|
|
6422
|
+
*/
|
|
6423
|
+
this.isLoading = true;
|
|
6424
|
+
/**
|
|
6425
|
+
* Determines whether the loader should display a label.
|
|
6426
|
+
*/
|
|
6427
|
+
this.showLabel = false;
|
|
6428
|
+
/**
|
|
6429
|
+
* Sets the size of the spinner loader. Value can be preset or custom.
|
|
6430
|
+
*/
|
|
6431
|
+
this.size = 'md';
|
|
6432
|
+
/**
|
|
6433
|
+
* Determines the type of loader.
|
|
6434
|
+
*/
|
|
6435
|
+
this.variant = 'spinner';
|
|
6436
|
+
this.style = () => {
|
|
6437
|
+
if (this.size !== undefined) {
|
|
6438
|
+
return {
|
|
6439
|
+
height: this.loaderSize(),
|
|
6440
|
+
width: this.loaderSize(),
|
|
6441
|
+
};
|
|
6442
|
+
}
|
|
6443
|
+
};
|
|
6444
|
+
}
|
|
6445
|
+
loaderSize() {
|
|
6446
|
+
const sizes = {
|
|
6447
|
+
xs: '24px',
|
|
6448
|
+
sm: '32px',
|
|
6449
|
+
md: '48px',
|
|
6450
|
+
lg: '64px',
|
|
6451
|
+
xl: '80px',
|
|
6452
|
+
};
|
|
6453
|
+
if (sizes[this.size]) {
|
|
6454
|
+
return sizes[this.size];
|
|
6455
|
+
}
|
|
6456
|
+
else {
|
|
6457
|
+
return this.size;
|
|
6458
|
+
}
|
|
6459
|
+
}
|
|
6460
|
+
render() {
|
|
6461
|
+
return (hAsync(Host, { key: '5f9677b6338e4b1d7df0ab3182c91ecae4c5c857', class: `pds-loader ${this.isLoading ? '' : 'pds-loader--hidden'}`, "aria-hidden": !this.isLoading, "aria-busy": this.isLoading, "aria-live": "polite" }, this.variant === 'spinner' && (hAsync("div", { key: '5083b0fd6d468439dd0faa4375107c2cddc49812', class: "pds-loader--spinner" }, hAsync("svg", { key: '689659c659901091215e3745e1778613dc8c64dc', style: this.style(), viewBox: "0 0 200 200", fill: "none" }, hAsync("defs", { key: '2f20b260a1155a966abb9f8d0541374d707d4c09' }, hAsync("linearGradient", { key: '2049a48645d6c02c3e5b4a659cb3767af297172a', id: "spinner-secondHalf" }, hAsync("stop", { key: '8a51fd7117b39505d6e40ded168c1a323f19d791', offset: "0%", "stop-opacity": "0", "stop-color": "currentColor" }), hAsync("stop", { key: '7a5273675a64eb794b8bbe513fa3fbfddb2b8b6b', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" })), hAsync("linearGradient", { key: '12ea88879ebbd8c207e9d5e5838505796c747fd6', id: "spinner-firstHalf" }, hAsync("stop", { key: '08a2198273017b0feeb16ec93a1a1daed34ada94', offset: "0%", "stop-opacity": "1", "stop-color": "currentColor" }), hAsync("stop", { key: '02ac704dd21ba49f579f0f305123b53333ae669e', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" }))), hAsync("g", { key: 'feb3d05f93da9f8d67181864d318678d2930b1dd', class: "pds-loader__spinner-path" }, hAsync("path", { key: 'dde73e34e0a78bdd87f33212eb21a25e0c212b4f', stroke: "url(#spinner-secondHalf)", d: "M 4 100 A 96 96 0 0 1 196 100" }), hAsync("path", { key: 'ce0c541df6294f6b08772d89cf791f0e6342ec0b', stroke: "url(#spinner-firstHalf)", d: "M 196 100 A 96 96 0 0 1 4 100" }), hAsync("path", { key: '25fae107003b2c9172131b54a97ecd9780ac4e42', stroke: "currentColor", "stroke-linecap": "round", d: "M 4 100 A 96 96 0 0 1 4 98" }))))), this.variant === 'typing' && (hAsync("div", { key: '7b467d87b5d4c0dbd96a277868bc587544259cff', class: "pds-loader--typing" }, hAsync("span", { key: '1e0833eec5fc48e990bbfa7ce4e724a1eee019ad' }), hAsync("span", { key: 'ef517f1aafca68e77fed199552a7a468ac8b37b2' }), hAsync("span", { key: 'b6379ba5b3e1fb88c5ce0478bb51bf4471bd6dd1' }))), hAsync("div", { key: '6148a67bddb3749b8778f5a97d381f01096fda23', class: `pds-loader__label ${this.showLabel ? '' : 'pds-loader--hidden'}` }, hAsync("slot", { key: '774fd7274d111b17afe9ef0740e64448c6fcd8d4', name: "label" }, "Loading..."))));
|
|
6462
|
+
}
|
|
6463
|
+
static get style() { return pdsLoaderCss; }
|
|
6464
|
+
static get cmpMeta() { return {
|
|
6465
|
+
"$flags$": 9,
|
|
6466
|
+
"$tagName$": "pds-loader",
|
|
6467
|
+
"$members$": {
|
|
6468
|
+
"isLoading": [4, "is-loading"],
|
|
6469
|
+
"showLabel": [4, "show-label"],
|
|
6470
|
+
"size": [513],
|
|
6471
|
+
"variant": [1]
|
|
6472
|
+
},
|
|
6473
|
+
"$listeners$": undefined,
|
|
6474
|
+
"$lazyBundleId$": "-",
|
|
6475
|
+
"$attrsToReflect$": [["size", "size"]]
|
|
6476
|
+
}; }
|
|
6477
|
+
}
|
|
6478
|
+
|
|
6479
|
+
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 - (6vh + 96px));width:100%}@media (min-width: 992px){.pds-modal{-webkit-margin-before:6vh;margin-block-start:6vh}}@media (min-width: 1200px){.pds-modal{-webkit-margin-before:8vh;margin-block-start:8vh}}.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%}.pds-modal--fullscreen .pds-modal-content{-ms-flex:1;flex:1}";
|
|
6480
|
+
|
|
6481
|
+
class PdsModal {
|
|
6482
|
+
constructor(hostRef) {
|
|
6483
|
+
registerInstance(this, hostRef);
|
|
6484
|
+
this.pdsModalOpen = createEvent(this, "pdsModalOpen");
|
|
6485
|
+
this.pdsModalClose = createEvent(this, "pdsModalClose");
|
|
6486
|
+
this.focusableElements = [];
|
|
6487
|
+
/**
|
|
6488
|
+
* Whether the modal can be dismissed by clicking the backdrop
|
|
6489
|
+
* @default true
|
|
6490
|
+
*/
|
|
6491
|
+
this.backdropDismiss = true;
|
|
6492
|
+
/**
|
|
6493
|
+
* Whether the modal is open
|
|
6494
|
+
* @default false
|
|
6495
|
+
*/
|
|
6496
|
+
this.open = false;
|
|
6497
|
+
/**
|
|
6498
|
+
* The size of the modal
|
|
6499
|
+
* @default 'md'
|
|
6500
|
+
*/
|
|
6501
|
+
this.size = 'md';
|
|
6502
|
+
/**
|
|
6503
|
+
* Stores the list of focusable elements in the modal
|
|
6504
|
+
*/
|
|
6505
|
+
this.focusableElementsArray = [];
|
|
6506
|
+
this.handleBackdropClick = (e) => {
|
|
6507
|
+
if (!this.backdropDismiss || !this.open)
|
|
6508
|
+
return;
|
|
6509
|
+
if (e.target.classList.contains('pds-modal__backdrop')) {
|
|
6510
|
+
e.stopPropagation();
|
|
6511
|
+
// Only close if this is the innermost modal
|
|
6512
|
+
if (this.isInnermostModal()) {
|
|
6513
|
+
this.hideModal();
|
|
6514
|
+
}
|
|
6515
|
+
}
|
|
6516
|
+
};
|
|
6517
|
+
this.handleKeyDown = (e) => {
|
|
6518
|
+
// If the modal is not open, don't handle any keyboard events
|
|
6519
|
+
if (!this.open)
|
|
6520
|
+
return;
|
|
6521
|
+
// Handle Escape key to close the modal
|
|
6522
|
+
if (e.key === 'Escape') {
|
|
6523
|
+
// Only close if this is the innermost modal
|
|
6524
|
+
if (this.isInnermostModal()) {
|
|
6525
|
+
e.preventDefault();
|
|
6526
|
+
this.hideModal();
|
|
6527
|
+
}
|
|
6528
|
+
return;
|
|
6529
|
+
}
|
|
6530
|
+
// Handle Tab key for focus trapping
|
|
6531
|
+
if (e.key === 'Tab') {
|
|
6532
|
+
// If there are no focusable elements, do nothing
|
|
6533
|
+
if (this.focusableElements.length === 0)
|
|
6534
|
+
return;
|
|
6535
|
+
// Get the first and last focusable elements
|
|
6536
|
+
const firstFocusableElement = this.focusableElements[0];
|
|
6537
|
+
const lastFocusableElement = this.focusableElements[this.focusableElements.length - 1];
|
|
6538
|
+
// Get the current active element
|
|
6539
|
+
const activeElement = document.activeElement;
|
|
6540
|
+
// Check if we need to wrap focus
|
|
6541
|
+
const isFirstElement = activeElement === firstFocusableElement ||
|
|
6542
|
+
firstFocusableElement.contains(activeElement);
|
|
6543
|
+
const isLastElement = activeElement === lastFocusableElement ||
|
|
6544
|
+
lastFocusableElement.contains(activeElement);
|
|
6545
|
+
// If shift + tab is pressed and focus is on the first element, move to the last element
|
|
6546
|
+
if (e.shiftKey && isFirstElement) {
|
|
6547
|
+
e.preventDefault();
|
|
6548
|
+
this.focusElement(lastFocusableElement);
|
|
6549
|
+
}
|
|
6550
|
+
// If tab is pressed and focus is on the last element, move to the first element
|
|
6551
|
+
else if (!e.shiftKey && isLastElement) {
|
|
6552
|
+
e.preventDefault();
|
|
6553
|
+
this.focusElement(firstFocusableElement);
|
|
6554
|
+
}
|
|
6555
|
+
}
|
|
6556
|
+
};
|
|
6557
|
+
}
|
|
6558
|
+
componentDidLoad() {
|
|
6559
|
+
this.modalRef = this.el.querySelector('.pds-modal__backdrop');
|
|
6560
|
+
// Add keyboard event listener
|
|
6561
|
+
document.addEventListener('keydown', this.handleKeyDown);
|
|
6562
|
+
}
|
|
6563
|
+
disconnectedCallback() {
|
|
6564
|
+
// Clean up event listener
|
|
6565
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
6566
|
+
}
|
|
6567
|
+
handleOpenChange(newValue) {
|
|
6568
|
+
if (newValue) {
|
|
6569
|
+
this.showModal();
|
|
6570
|
+
}
|
|
6571
|
+
else {
|
|
6572
|
+
this.hideModal();
|
|
6573
|
+
}
|
|
6574
|
+
}
|
|
6575
|
+
/**
|
|
6576
|
+
* Updates the list of focusable elements in the modal
|
|
6577
|
+
*/
|
|
6578
|
+
updateFocusableElements() {
|
|
6579
|
+
if (!this.modalRef)
|
|
6580
|
+
return;
|
|
6581
|
+
// Get all focusable elements within the modal
|
|
6582
|
+
const selector = [
|
|
6583
|
+
'a[href]',
|
|
6584
|
+
'button:not([disabled])',
|
|
6585
|
+
'input:not([disabled])',
|
|
6586
|
+
'select:not([disabled])',
|
|
6587
|
+
'textarea:not([disabled])',
|
|
6588
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
6589
|
+
'pds-button:not([disabled])',
|
|
6590
|
+
'pds-link:not([disabled])',
|
|
6591
|
+
'pds-input:not([disabled])',
|
|
6592
|
+
'pds-checkbox:not([disabled])',
|
|
6593
|
+
'pds-radio:not([disabled])',
|
|
6594
|
+
'pds-switch:not([disabled])',
|
|
6595
|
+
'pds-select:not([disabled])',
|
|
6596
|
+
].join(',');
|
|
6597
|
+
this.focusableElements = Array.from(this.modalRef.querySelectorAll(selector));
|
|
6598
|
+
// Filter out elements with display: none or visibility: hidden
|
|
6599
|
+
this.focusableElements = this.focusableElements.filter(el => {
|
|
6600
|
+
const style = window.getComputedStyle(el);
|
|
6601
|
+
return style.display !== 'none' && style.visibility !== 'hidden';
|
|
6602
|
+
});
|
|
6603
|
+
}
|
|
6604
|
+
/**
|
|
6605
|
+
* Sets focus to the first focusable element in the modal
|
|
6606
|
+
*/
|
|
6607
|
+
setInitialFocus() {
|
|
6608
|
+
if (this.focusableElements.length === 0)
|
|
6609
|
+
return;
|
|
6610
|
+
// Focus the first focusable element
|
|
6611
|
+
const firstElement = this.focusableElements[0];
|
|
6612
|
+
// For web components, we need to ensure they're properly focused
|
|
6613
|
+
this.focusElement(firstElement);
|
|
6614
|
+
}
|
|
6615
|
+
/**
|
|
6616
|
+
* Helper method to focus an element, with special handling for web components
|
|
6617
|
+
*/
|
|
6618
|
+
focusElement(element) {
|
|
6619
|
+
if (!element)
|
|
6620
|
+
return;
|
|
6621
|
+
try {
|
|
6622
|
+
// Try standard focus first
|
|
6623
|
+
element.focus();
|
|
6624
|
+
// Check if focus worked
|
|
6625
|
+
setTimeout(() => {
|
|
6626
|
+
if (document.activeElement !== element) {
|
|
6627
|
+
// For web components, try to find a focusable element inside
|
|
6628
|
+
if (element.shadowRoot) {
|
|
6629
|
+
const focusableInShadow = element.shadowRoot.querySelector('button, [tabindex], input, a[href]');
|
|
6630
|
+
if (focusableInShadow) {
|
|
6631
|
+
focusableInShadow.focus();
|
|
6632
|
+
}
|
|
6633
|
+
}
|
|
6634
|
+
}
|
|
6635
|
+
}, 0);
|
|
6636
|
+
}
|
|
6637
|
+
catch (error) {
|
|
6638
|
+
console.error('Error focusing element:', error);
|
|
6639
|
+
}
|
|
6640
|
+
}
|
|
6641
|
+
/**
|
|
6642
|
+
* Opens the modal
|
|
6643
|
+
*/
|
|
6644
|
+
async showModal() {
|
|
6645
|
+
if (this.modalRef) {
|
|
6646
|
+
try {
|
|
6647
|
+
// Store the currently focused element to restore focus when modal closes
|
|
6648
|
+
this.previousActiveElement = document.activeElement;
|
|
6649
|
+
// Use native dialog showModal method which makes the rest of the page inert
|
|
6650
|
+
this.modalRef.showModal();
|
|
6651
|
+
this.open = true;
|
|
6652
|
+
// Update focusable elements and set initial focus
|
|
6653
|
+
// Using a longer timeout to ensure all components are fully rendered
|
|
6654
|
+
setTimeout(() => {
|
|
6655
|
+
this.updateFocusableElements();
|
|
6656
|
+
this.setInitialFocus();
|
|
6657
|
+
this.pdsModalOpen.emit();
|
|
6658
|
+
}, 100);
|
|
6659
|
+
}
|
|
6660
|
+
catch (error) {
|
|
6661
|
+
console.error('Failed to show modal:', error);
|
|
6662
|
+
}
|
|
6663
|
+
}
|
|
6664
|
+
}
|
|
6665
|
+
/**
|
|
6666
|
+
* Closes the modal
|
|
6667
|
+
*/
|
|
6668
|
+
async hideModal() {
|
|
6669
|
+
if (this.modalRef) {
|
|
6670
|
+
try {
|
|
6671
|
+
this.modalRef.close();
|
|
6672
|
+
this.open = false;
|
|
6673
|
+
// Restore focus to the element that was focused before the modal was opened
|
|
6674
|
+
if (this.previousActiveElement && typeof this.previousActiveElement.focus === 'function') {
|
|
6675
|
+
this.previousActiveElement.focus();
|
|
6676
|
+
}
|
|
6677
|
+
this.pdsModalClose.emit();
|
|
6678
|
+
}
|
|
6679
|
+
catch (error) {
|
|
6680
|
+
console.error('Failed to hide modal:', error);
|
|
6681
|
+
}
|
|
6682
|
+
}
|
|
6683
|
+
}
|
|
6684
|
+
/**
|
|
6685
|
+
* Gets the z-index of a modal's backdrop element
|
|
6686
|
+
*/
|
|
6687
|
+
getBackdropZIndex(modal) {
|
|
6688
|
+
const backdrop = modal.querySelector('.pds-modal__backdrop');
|
|
6689
|
+
return backdrop ? parseInt(getComputedStyle(backdrop).zIndex, 10) : -1;
|
|
6690
|
+
}
|
|
6691
|
+
/**
|
|
6692
|
+
* Checks if this modal is the innermost (highest z-index) modal
|
|
6693
|
+
*/
|
|
6694
|
+
isInnermostModal() {
|
|
6695
|
+
// Find all open modals
|
|
6696
|
+
const openModals = Array.from(document.querySelectorAll('pds-modal')).filter(modal => modal.open);
|
|
6697
|
+
if (openModals.length === 0)
|
|
6698
|
+
return false;
|
|
6699
|
+
// Get this modal's backdrop element
|
|
6700
|
+
const thisBackdrop = this.el.querySelector('.pds-modal__backdrop');
|
|
6701
|
+
if (!thisBackdrop)
|
|
6702
|
+
return false;
|
|
6703
|
+
// Get computed z-index of all open modal backdrops
|
|
6704
|
+
const modalZIndexes = openModals.map(modal => this.getBackdropZIndex(modal));
|
|
6705
|
+
// Get the highest z-index
|
|
6706
|
+
const maxZIndex = Math.max(...modalZIndexes);
|
|
6707
|
+
// Check if this modal's backdrop has the highest z-index
|
|
6708
|
+
const thisZIndex = this.getBackdropZIndex(this.el);
|
|
6709
|
+
return thisZIndex === maxZIndex;
|
|
4411
6710
|
}
|
|
4412
6711
|
render() {
|
|
4413
|
-
return (hAsync("
|
|
4414
|
-
|
|
6712
|
+
return (hAsync("dialog", { key: '6ec691cfcf4865baeeba14f097d5e647a3201dba', class: {
|
|
6713
|
+
'pds-modal__backdrop': true,
|
|
6714
|
+
'open': this.open
|
|
6715
|
+
}, "aria-modal": "true", "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, hAsync("div", { key: 'b7c4681717bfc0d095653c7dcf1a0e42cf069e8b', class: `pds-modal pds-modal--${this.size} pds-modal--scrollable` }, hAsync("slot", { key: '9ca7f711579587c2f49fd19f81a488192d62ce72' }))));
|
|
4415
6716
|
}
|
|
4416
|
-
|
|
6717
|
+
get el() { return getElement(this); }
|
|
6718
|
+
static get watchers() { return {
|
|
6719
|
+
"open": ["handleOpenChange"]
|
|
6720
|
+
}; }
|
|
6721
|
+
static get style() { return pdsModalCss; }
|
|
4417
6722
|
static get cmpMeta() { return {
|
|
4418
|
-
"$flags$":
|
|
4419
|
-
"$tagName$": "pds-
|
|
6723
|
+
"$flags$": 4,
|
|
6724
|
+
"$tagName$": "pds-modal",
|
|
4420
6725
|
"$members$": {
|
|
6726
|
+
"backdropDismiss": [4, "backdrop-dismiss"],
|
|
4421
6727
|
"componentId": [1, "component-id"],
|
|
4422
|
-
"
|
|
4423
|
-
"
|
|
4424
|
-
"
|
|
4425
|
-
"
|
|
6728
|
+
"open": [1028],
|
|
6729
|
+
"size": [1],
|
|
6730
|
+
"focusableElementsArray": [32],
|
|
6731
|
+
"showModal": [64],
|
|
6732
|
+
"hideModal": [64]
|
|
4426
6733
|
},
|
|
4427
6734
|
"$listeners$": undefined,
|
|
4428
6735
|
"$lazyBundleId$": "-",
|
|
@@ -4430,70 +6737,139 @@ class PdsLink {
|
|
|
4430
6737
|
}; }
|
|
4431
6738
|
}
|
|
4432
6739
|
|
|
4433
|
-
const
|
|
6740
|
+
const pdsModalContentCss = "pds-modal-content{display:block;-ms-flex:1 1 auto;flex:1 1 auto;overflow-y:auto;width:100%}pds-modal-content:has(.pds-modal-content--border-none){border:0}pds-modal-content:has(.pds-modal-content--border-both){-webkit-border-after:1px solid var(--pine-color-grey-200);border-block-end:1px solid var(--pine-color-grey-200);-webkit-border-before:1px solid var(--pine-color-grey-200);border-block-start:1px solid var(--pine-color-grey-200)}pds-modal-content:has(.pds-modal-content--border-top){-webkit-border-before:1px solid var(--pine-color-grey-200);border-block-start:1px solid var(--pine-color-grey-200)}pds-modal-content:has(.pds-modal-content--border-bottom){-webkit-border-after:1px solid var(--pine-color-grey-200);border-block-end:1px solid var(--pine-color-grey-200)}.pds-modal-content{display:block;-ms-flex:1 1 auto;flex:1 1 auto;min-height:0;overflow-y:auto;width:100%}";
|
|
4434
6741
|
|
|
4435
|
-
|
|
4436
|
-
* @slot label - Default slot for Loader label text.
|
|
4437
|
-
*/
|
|
4438
|
-
class PdsLoader {
|
|
6742
|
+
class PdsModalContent {
|
|
4439
6743
|
constructor(hostRef) {
|
|
4440
6744
|
registerInstance(this, hostRef);
|
|
4441
6745
|
/**
|
|
4442
|
-
*
|
|
4443
|
-
|
|
4444
|
-
this.isLoading = true;
|
|
4445
|
-
/**
|
|
4446
|
-
* Determines whether the loader should display a label.
|
|
4447
|
-
*/
|
|
4448
|
-
this.showLabel = false;
|
|
4449
|
-
/**
|
|
4450
|
-
* Sets the size of the spinner loader. Value can be preset or custom.
|
|
4451
|
-
*/
|
|
4452
|
-
this.size = 'md';
|
|
4453
|
-
/**
|
|
4454
|
-
* Determines the type of loader.
|
|
6746
|
+
* The border style for the content area. Automatically set based on available space of the modal content.
|
|
6747
|
+
* @default 'none'
|
|
4455
6748
|
*/
|
|
4456
|
-
this.
|
|
4457
|
-
this.
|
|
4458
|
-
if (this.size !== undefined) {
|
|
4459
|
-
return {
|
|
4460
|
-
height: this.loaderSize(),
|
|
4461
|
-
width: this.loaderSize(),
|
|
4462
|
-
};
|
|
4463
|
-
}
|
|
4464
|
-
};
|
|
6749
|
+
this.border = 'none';
|
|
6750
|
+
this.contentMaxHeight = '60vh';
|
|
4465
6751
|
}
|
|
4466
|
-
|
|
4467
|
-
const
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
6752
|
+
componentDidLoad() {
|
|
6753
|
+
const slotContent = this.el.firstElementChild;
|
|
6754
|
+
const isScrollable = slotContent.scrollHeight > slotContent.clientHeight;
|
|
6755
|
+
this.border = isScrollable ? 'both' : 'none';
|
|
6756
|
+
this.calculateMaxHeight();
|
|
6757
|
+
window.addEventListener('resize', this.calculateMaxHeight.bind(this));
|
|
6758
|
+
}
|
|
6759
|
+
disconnectedCallback() {
|
|
6760
|
+
window.removeEventListener('resize', this.calculateMaxHeight.bind(this));
|
|
6761
|
+
if (this.mutationObserver) {
|
|
6762
|
+
this.mutationObserver.disconnect();
|
|
4476
6763
|
}
|
|
4477
|
-
|
|
4478
|
-
|
|
6764
|
+
}
|
|
6765
|
+
/**
|
|
6766
|
+
* Calculates the max-height based on header and footer heights
|
|
6767
|
+
*/
|
|
6768
|
+
calculateMaxHeight() {
|
|
6769
|
+
// Find the modal element (parent of this component)
|
|
6770
|
+
const modalElement = this.el.closest('pds-modal');
|
|
6771
|
+
if (!modalElement)
|
|
6772
|
+
return;
|
|
6773
|
+
setTimeout(() => {
|
|
6774
|
+
// Find header and footer elements
|
|
6775
|
+
const headerElement = modalElement.querySelector('pds-modal-header');
|
|
6776
|
+
const footerElement = modalElement.querySelector('pds-modal-footer');
|
|
6777
|
+
// Get header and footer heights
|
|
6778
|
+
const headerHeight = headerElement ? headerElement.offsetHeight : 0;
|
|
6779
|
+
const footerHeight = footerElement ? footerElement.offsetHeight : 0;
|
|
6780
|
+
// Set the max-height as a calculation
|
|
6781
|
+
if (headerHeight > 0 || footerHeight > 0) {
|
|
6782
|
+
// Calculate the available height by subtracting:
|
|
6783
|
+
// 1. Header and footer heights
|
|
6784
|
+
// 2. Modal padding (48px)
|
|
6785
|
+
// 3. Additional space for modal positioning (6vh)
|
|
6786
|
+
// 4. Extra adjustment for perfect fit (50px)
|
|
6787
|
+
const viewportAdjustment = Math.round(window.innerHeight * 0.06); // 6vh approximation
|
|
6788
|
+
const totalReduction = headerHeight + footerHeight + 48 + viewportAdjustment + 50;
|
|
6789
|
+
// Set the content max height
|
|
6790
|
+
this.contentMaxHeight = `calc(100vh - ${totalReduction}px)`;
|
|
6791
|
+
// Apply the style directly to ensure it takes effect
|
|
6792
|
+
const contentElement = this.el.querySelector('.pds-modal-content');
|
|
6793
|
+
if (contentElement) {
|
|
6794
|
+
contentElement.style.maxHeight = this.contentMaxHeight;
|
|
6795
|
+
}
|
|
6796
|
+
}
|
|
6797
|
+
else {
|
|
6798
|
+
this.contentMaxHeight = '60vh'; // Default fallback
|
|
6799
|
+
}
|
|
6800
|
+
}, 100); // Delay to ensure DOM is fully rendered
|
|
6801
|
+
// Set up mutation observer if not already done
|
|
6802
|
+
if (!this.mutationObserver && modalElement) {
|
|
6803
|
+
this.mutationObserver = new MutationObserver(() => {
|
|
6804
|
+
this.calculateMaxHeight();
|
|
6805
|
+
});
|
|
6806
|
+
// Observe changes to the modal's children
|
|
6807
|
+
this.mutationObserver.observe(modalElement, {
|
|
6808
|
+
childList: true,
|
|
6809
|
+
subtree: true,
|
|
6810
|
+
attributes: true,
|
|
6811
|
+
attributeFilter: ['style', 'class']
|
|
6812
|
+
});
|
|
4479
6813
|
}
|
|
4480
6814
|
}
|
|
4481
6815
|
render() {
|
|
4482
|
-
return (hAsync(Host, { key: '
|
|
6816
|
+
return (hAsync(Host, { key: '6b214e3462d8e1e1cb58d6c0075b3143e0db2d51' }, hAsync("div", { key: '2f6a2daeb09a99f096cd46230813fe1b9a6950e9', class: {
|
|
6817
|
+
'pds-modal-content': true,
|
|
6818
|
+
[`pds-modal-content--border-${this.border}`]: true
|
|
6819
|
+
}, style: { maxHeight: this.contentMaxHeight }, tabindex: "-1" }, hAsync("slot", { key: '8392cc48a2dba0f32d4a83e642bd3f295832251b' }))));
|
|
4483
6820
|
}
|
|
4484
|
-
|
|
6821
|
+
get el() { return getElement(this); }
|
|
6822
|
+
static get style() { return pdsModalContentCss; }
|
|
4485
6823
|
static get cmpMeta() { return {
|
|
4486
|
-
"$flags$":
|
|
4487
|
-
"$tagName$": "pds-
|
|
6824
|
+
"$flags$": 4,
|
|
6825
|
+
"$tagName$": "pds-modal-content",
|
|
4488
6826
|
"$members$": {
|
|
4489
|
-
"
|
|
4490
|
-
"
|
|
4491
|
-
"size": [513],
|
|
4492
|
-
"variant": [1]
|
|
6827
|
+
"border": [513],
|
|
6828
|
+
"contentMaxHeight": [32]
|
|
4493
6829
|
},
|
|
4494
6830
|
"$listeners$": undefined,
|
|
4495
6831
|
"$lazyBundleId$": "-",
|
|
4496
|
-
"$attrsToReflect$": [["
|
|
6832
|
+
"$attrsToReflect$": [["border", "border"]]
|
|
6833
|
+
}; }
|
|
6834
|
+
}
|
|
6835
|
+
|
|
6836
|
+
const pdsModalFooterCss = "pds-modal-footer{display:block;width:100%}.pds-modal__footer{width:100%}";
|
|
6837
|
+
|
|
6838
|
+
class PdsModalFooter {
|
|
6839
|
+
constructor(hostRef) {
|
|
6840
|
+
registerInstance(this, hostRef);
|
|
6841
|
+
}
|
|
6842
|
+
render() {
|
|
6843
|
+
return (hAsync("footer", { key: '63d1121b84d10ea99354d07b029b7625d52d9095', class: "pds-modal__footer" }, hAsync("slot", { key: 'dd08fc600f122e422ccd3161bc558f3b9cc075f9' })));
|
|
6844
|
+
}
|
|
6845
|
+
static get style() { return pdsModalFooterCss; }
|
|
6846
|
+
static get cmpMeta() { return {
|
|
6847
|
+
"$flags$": 4,
|
|
6848
|
+
"$tagName$": "pds-modal-footer",
|
|
6849
|
+
"$members$": undefined,
|
|
6850
|
+
"$listeners$": undefined,
|
|
6851
|
+
"$lazyBundleId$": "-",
|
|
6852
|
+
"$attrsToReflect$": []
|
|
6853
|
+
}; }
|
|
6854
|
+
}
|
|
6855
|
+
|
|
6856
|
+
const pdsModalHeaderCss = "pds-modal-header{display:block;width:100%}.pds-modal__header{width:100%}";
|
|
6857
|
+
|
|
6858
|
+
class PdsModalHeader {
|
|
6859
|
+
constructor(hostRef) {
|
|
6860
|
+
registerInstance(this, hostRef);
|
|
6861
|
+
}
|
|
6862
|
+
render() {
|
|
6863
|
+
return (hAsync("header", { key: 'c832013aee204170c29336e931d36f1eda667f11', class: "pds-modal__header" }, hAsync("slot", { key: '19a76b689a8d8bf116f7061fd7c32415da4299e1' })));
|
|
6864
|
+
}
|
|
6865
|
+
static get style() { return pdsModalHeaderCss; }
|
|
6866
|
+
static get cmpMeta() { return {
|
|
6867
|
+
"$flags$": 4,
|
|
6868
|
+
"$tagName$": "pds-modal-header",
|
|
6869
|
+
"$members$": undefined,
|
|
6870
|
+
"$listeners$": undefined,
|
|
6871
|
+
"$lazyBundleId$": "-",
|
|
6872
|
+
"$attrsToReflect$": []
|
|
4497
6873
|
}; }
|
|
4498
6874
|
}
|
|
4499
6875
|
|
|
@@ -4551,27 +6927,59 @@ class PdsPopover {
|
|
|
4551
6927
|
const offset = 8;
|
|
4552
6928
|
switch (this.placement) {
|
|
4553
6929
|
case 'top':
|
|
6930
|
+
top = triggerRect.top - popoverRect.height - offset;
|
|
6931
|
+
left = triggerRect.left + (triggerRect.width - popoverRect.width) / 2;
|
|
6932
|
+
break;
|
|
6933
|
+
case 'top-start':
|
|
4554
6934
|
top = triggerRect.top - popoverRect.height - offset;
|
|
4555
6935
|
left = triggerRect.left;
|
|
4556
6936
|
break;
|
|
6937
|
+
case 'top-end':
|
|
6938
|
+
top = triggerRect.top - popoverRect.height - offset;
|
|
6939
|
+
left = triggerRect.right - popoverRect.width;
|
|
6940
|
+
break;
|
|
4557
6941
|
case 'right':
|
|
6942
|
+
top = triggerRect.top + (triggerRect.height - popoverRect.height) / 2;
|
|
6943
|
+
left = triggerRect.right + offset;
|
|
6944
|
+
break;
|
|
6945
|
+
case 'right-start':
|
|
4558
6946
|
top = triggerRect.top;
|
|
4559
6947
|
left = triggerRect.right + offset;
|
|
4560
6948
|
break;
|
|
6949
|
+
case 'right-end':
|
|
6950
|
+
top = triggerRect.bottom - popoverRect.height;
|
|
6951
|
+
left = triggerRect.right + offset;
|
|
6952
|
+
break;
|
|
4561
6953
|
case 'bottom':
|
|
6954
|
+
top = triggerRect.bottom + offset;
|
|
6955
|
+
left = triggerRect.left + (triggerRect.width - popoverRect.width) / 2;
|
|
6956
|
+
break;
|
|
6957
|
+
case 'bottom-start':
|
|
4562
6958
|
top = triggerRect.bottom + offset;
|
|
4563
6959
|
left = triggerRect.left;
|
|
4564
6960
|
break;
|
|
6961
|
+
case 'bottom-end':
|
|
6962
|
+
top = triggerRect.bottom + offset;
|
|
6963
|
+
left = triggerRect.right - popoverRect.width;
|
|
6964
|
+
break;
|
|
4565
6965
|
case 'left':
|
|
6966
|
+
top = triggerRect.top + (triggerRect.height - popoverRect.height) / 2;
|
|
6967
|
+
left = triggerRect.left - popoverRect.width - offset;
|
|
6968
|
+
break;
|
|
6969
|
+
case 'left-start':
|
|
4566
6970
|
top = triggerRect.top;
|
|
4567
6971
|
left = triggerRect.left - popoverRect.width - offset;
|
|
4568
6972
|
break;
|
|
6973
|
+
case 'left-end':
|
|
6974
|
+
top = triggerRect.bottom - popoverRect.height;
|
|
6975
|
+
left = triggerRect.left - popoverRect.width - offset;
|
|
6976
|
+
break;
|
|
4569
6977
|
}
|
|
4570
6978
|
popoverEl.style.top = `${top}px`;
|
|
4571
6979
|
popoverEl.style.left = `${left}px`;
|
|
4572
6980
|
}
|
|
4573
6981
|
render() {
|
|
4574
|
-
return (hAsync(Host, { key: '
|
|
6982
|
+
return (hAsync(Host, { key: '35e5f4c21884f02b17dcb920e5c7ba73b8bed849' }, hAsync("button", { key: '586880a84a4ad659a00500206e5b3c6c5e7e1a37', class: "pds-popover__trigger", popoverTarget: this.componentId, popoverTargetAction: this.popoverTargetAction, onClick: this.handleClick }, this.text), hAsync("div", { key: 'fcb97e9b4033eef58bdca4915572b986dabde43c', class: `pds-popover ${this.active ? 'pds-popover--active' : ''}`, id: this.componentId, popover: this.popoverType, style: { maxWidth: `${this.maxWidth}px` } }, hAsync("slot", { key: '1ffb626c69e06f17379ebf4ff4d5498f030909e8' }))));
|
|
4575
6983
|
}
|
|
4576
6984
|
get el() { return getElement(this); }
|
|
4577
6985
|
static get style() { return pdsPopoverCss; }
|
|
@@ -4615,7 +7023,7 @@ class PdsProgress {
|
|
|
4615
7023
|
this.showPercent = false;
|
|
4616
7024
|
}
|
|
4617
7025
|
render() {
|
|
4618
|
-
return (hAsync(Host, { key: '
|
|
7026
|
+
return (hAsync(Host, { key: '2a7768cc769f62579bfee6d8f9e6109d10df0aaf', class: this.animated ? { 'is-animated': this.animated } : '' }, hAsync("div", { key: '1eef3758e8c6e470f8cdd170e8d6c49e25bf9aa3', class: "pds-progress" }, hAsync("label", { key: '5b75150a747a15379fdf0ee23b1be561e6d990e7', class: "pds-progress__label", htmlFor: this.componentId }, this.label), hAsync("progress", { key: 'e20ad7d705d97ac11173ae515332fc1620a96328', id: this.componentId, max: "100", style: this.fillColor ? { '--color-progress-fill': this.fillColor } : {}, value: this.percent })), this.showPercent && hAsync("div", { key: '8bafb39b5976149b80e720952e625f60f1e3c73c', class: "pds-progress__percentage" }, this.percent, "%")));
|
|
4619
7027
|
}
|
|
4620
7028
|
static get style() { return pdsProgressCss; }
|
|
4621
7029
|
static get cmpMeta() { return {
|
|
@@ -4683,9 +7091,9 @@ class PdsRadio {
|
|
|
4683
7091
|
return classNames.join(' ');
|
|
4684
7092
|
}
|
|
4685
7093
|
render() {
|
|
4686
|
-
return (hAsync(Host, { key: '
|
|
4687
|
-
hAsync("div", { key: '
|
|
4688
|
-
hAsync("div", { key: '
|
|
7094
|
+
return (hAsync(Host, { key: '8c215fa4193cf8bd246cd83edf97b8316685714e', class: this.classNames() }, hAsync("label", { key: '578530f26dd25f73ccbbb39c773290cd275920cf', htmlFor: this.componentId }, hAsync("input", { key: '9ab61a2683246fae862feb5e432a0872288b7a87', "aria-describedby": 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 }), hAsync("span", { key: 'f48c47ddb347bf0d7388359665dbbf3abf1b4859', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
|
|
7095
|
+
hAsync("div", { key: 'b8dbb34af90eed82f69621ceaadd8da668f0b3de', class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
7096
|
+
hAsync("div", { key: 'e777e4f2397ba833aefb7e8cd4ab9a32ea93685a', class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: '13bd73d91bb3d676757ac9f4dcfcef7d2a5fcc55', icon: danger, size: "small" }), this.errorMessage)));
|
|
4689
7097
|
}
|
|
4690
7098
|
static get style() { return labelCss$3 + pdsRadioCss; }
|
|
4691
7099
|
static get cmpMeta() { return {
|
|
@@ -4747,7 +7155,7 @@ class PdsRow {
|
|
|
4747
7155
|
})), (this.minHeight && {
|
|
4748
7156
|
'min-height': this.minHeight,
|
|
4749
7157
|
}));
|
|
4750
|
-
return hAsync(Host, { key: '
|
|
7158
|
+
return hAsync(Host, { key: '7641ed5798525661b1a100bfbce60ed271e76887', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
|
|
4751
7159
|
}
|
|
4752
7160
|
static get style() { return pdsRowCss; }
|
|
4753
7161
|
static get cmpMeta() { return {
|
|
@@ -4772,7 +7180,7 @@ const pdsSelectTokensCss = ":host{--pine-select-color-background-danger:var(--pi
|
|
|
4772
7180
|
|
|
4773
7181
|
const labelCss$2 = ":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)}";
|
|
4774
7182
|
|
|
4775
|
-
const pdsSelectCss = ":host .hidden,:host :host([hidden]){display:none}.pds-select{display:grid;-ms-flex-direction:column;flex-direction:column;grid-template-areas:\"label label\" \"field field\" \"message message\";grid-template-columns:1fr minmax(2rem, -webkit-min-content);grid-template-columns:1fr minmax(2rem, min-content);grid-template-rows:-webkit-min-content -webkit-min-content -webkit-min-content;grid-template-rows:min-content min-content min-content;position:relative;width:100%}label{grid-area:label;-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--
|
|
7183
|
+
const pdsSelectCss = ":host{--pds-select-background:var(--pine-color-background-container);--pds-select-border:var(--pine-border);--pds-select-border-radius:var(--pine-dimension-125);--pds-select-border-radius-start-end:var(--pine-dimension-125);--pds-select-border-radius-start-start:var(--pine-dimension-125);--pds-select-border-radius-end-end:var(--pine-dimension-125);--pds-select-border-radius-end-start:var(--pine-dimension-125);--pds-select-min-height:36px;--box-shadow-focus:0 0 0 1px #ffffff, 0 0 0 3px var(--pine-color-focus-ring);--box-shadow-focus-error:0 0 0 1px #ffffff, 0 0 0 3px var(--pine-color-focus-ring-danger)}:host .hidden,:host :host([hidden]){display:none}.pds-select{display:grid;-ms-flex-direction:column;flex-direction:column;grid-template-areas:\"label label\" \"field field\" \"message message\";grid-template-columns:1fr minmax(2rem, -webkit-min-content);grid-template-columns:1fr minmax(2rem, min-content);grid-template-rows:-webkit-min-content -webkit-min-content -webkit-min-content;grid-template-rows:min-content min-content min-content;position:relative;width:100%}label{grid-area:label;-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--pds-select-background);border:var(--pds-select-border);border-radius:var(--pds-select-border-radius);border-bottom-left-radius:var(--pds-select-border-radius-end-start, var(--pds-select-border-radius));border-bottom-right-radius:var(--pds-select-border-radius-end-end, var(--pds-select-border-radius));border-top-left-radius:var(--pds-select-border-radius-start-start, var(--pds-select-border-radius));border-top-right-radius:var(--pds-select-border-radius-start-end, var(--pds-select-border-radius));font:var(--pine-typography-body);grid-area:field;letter-spacing:var(--pine-letter-spacing);min-height:var(--pds-select-min-height);padding:var(--pine-dimension-xs) var(--pine-dimension-150);-webkit-padding-end:var(--pine-dimension-450);padding-inline-end:var(--pine-dimension-450);position:relative}select:hover{border-color:var(--pine-color-border-hover);cursor:pointer}select:focus-visible{border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}select:disabled{background-color:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}select:has(~.pds-select__message .pds-select__error-message){background-color:var(--pine-select-color-background-danger);border-color:var(--pine-color-border-danger)}select:has(~.pds-select__message .pds-select__error-message):focus-visible{outline-color:var(--pine-color-focus-ring-danger)}:host(.is-invalid) select{background-color:var(--pine-select-color-background-danger);border-color:var(--pine-color-border-danger)}:host(.is-invalid) select:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-select__error-message,.pds-select__helper-message{font:var(--pine-typography-body-sm-medium);-webkit-margin-after:0;margin-block-end:0;-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-select__error-message{-ms-flex-align:center;align-items:center;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-select__message{grid-area:message}.pds-select__select-icon{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;grid-column:-1/-2;grid-row:2/3;height:var(--pds-select-min-height);pointer-events:none;position:relative;z-index:1}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";
|
|
4776
7184
|
|
|
4777
7185
|
class PdsSelect {
|
|
4778
7186
|
constructor(hostRef) {
|
|
@@ -4888,8 +7296,7 @@ class PdsSelect {
|
|
|
4888
7296
|
return classNames.join(' ');
|
|
4889
7297
|
}
|
|
4890
7298
|
render() {
|
|
4891
|
-
return (hAsync(Host, { key: '
|
|
4892
|
-
hAsync("label", { key: '90dc521ef10b81a9f58a0f0a2cfa4bc685312119', htmlFor: this.componentId }, this.label), hAsync("select", { key: 'd6576d25601de6c41893568927b64e530bf9f266', autocomplete: this.autocomplete || undefined, class: "pds-select__field", disabled: this.disabled, id: this.componentId, multiple: this.multiple, name: this.name, onChange: this.onSelectUpdate, required: this.required, ref: (el) => (this.selectEl = el) }), hAsync("div", { key: '87c53bb7bf315e170f60e5b58afcbf623d1aa65c', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, hAsync("slot", { key: '8cafbc8cc8e23de0ab69b9d6b7d23c896df530b6', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && hAsync("pds-icon", { key: '48758d321edbd38ff6bd31ddd1902627202e196e', class: "pds-select__select-icon", icon: enlarge }))));
|
|
7299
|
+
return (hAsync(Host, { key: 'c0a0b391e6b5c35d5d3d7fce9d1f92583c582aa5', "aria-disabled": this.disabled ? 'true' : null, class: this.classNames() }, hAsync("div", { key: '4f91cfcfcc570cf79d8e6a2f86d741f471489591', class: "pds-select" }, !this.hideLabel && (hAsync("label", { key: '21fa83cfdad6a46be1efa22ebc4df696ca49b7b1', htmlFor: this.componentId }, hAsync("span", { key: '760e46f98327c3b8e9ceb48ee158202ce42b8bb6', class: this.hideLabel ? 'visually-hidden' : '' }, this.label))), hAsync("select", { key: '78d92779624d84df9ae73515bbda74d9d44a8919', "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) }), hAsync("div", { key: '9a75bf791747df08018d59de49855410c6dc2312', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, hAsync("slot", { key: '1a974b4e171971e922aa04e9a56d6e6f26635724', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && hAsync("pds-icon", { key: '9cbc569418617092229d660b34b2c17a2826c878', class: "pds-select__select-icon", icon: enlarge }))));
|
|
4893
7300
|
}
|
|
4894
7301
|
static get watchers() { return {
|
|
4895
7302
|
"value": ["valueChanged"]
|
|
@@ -4903,6 +7310,7 @@ class PdsSelect {
|
|
|
4903
7310
|
"componentId": [1, "component-id"],
|
|
4904
7311
|
"disabled": [4],
|
|
4905
7312
|
"errorMessage": [1, "error-message"],
|
|
7313
|
+
"hideLabel": [4, "hide-label"],
|
|
4906
7314
|
"helperMessage": [1, "helper-message"],
|
|
4907
7315
|
"invalid": [4],
|
|
4908
7316
|
"label": [1],
|
|
@@ -7628,7 +10036,7 @@ class PdsSortable {
|
|
|
7628
10036
|
Sortable.create(this.el, sortableOptions);
|
|
7629
10037
|
}
|
|
7630
10038
|
render() {
|
|
7631
|
-
return (hAsync(Host, { key: '
|
|
10039
|
+
return (hAsync(Host, { key: 'c5353036ad9b108f742e55b1a28ebb449cf556d0', class: this.classNames(), id: this.componentId }, hAsync("slot", { key: 'cb71736fb3388f5829476c5b4802d5aa5f811ac7' })));
|
|
7632
10040
|
}
|
|
7633
10041
|
get el() { return getElement(this); }
|
|
7634
10042
|
static get style() { return pdsSortableCss; }
|
|
@@ -7675,7 +10083,7 @@ class PdsSortableItem {
|
|
|
7675
10083
|
}
|
|
7676
10084
|
}
|
|
7677
10085
|
render() {
|
|
7678
|
-
return (hAsync(Host, { key: '
|
|
10086
|
+
return (hAsync(Host, { key: 'b7817592ed6329f84e09ff5c5e200bc4305275bc', class: "pds-sortable-item", id: this.componentId }, this.showHandle && (hAsync("div", { key: 'c31df5f0c81bd684ac60690044e2409d0cbc7831', class: "pds-sortable-item__handle" }, hAsync("pds-icon", { key: 'ff764a5ef70560c073474a7a51f45dd89df53190', icon: handle }))), hAsync("slot", { key: 'e1f33a5e56b37405b7e46bff24dc91e4ece71870' }), this.enableActions && (hAsync("div", { key: '569563f7c7d5b069888a8c3ee8e50fd3d626b1b2', class: "pds-sortable-item__actions" }, hAsync("slot", { key: '9ca544725723703ddac0de3f0bb9a4b0884d1571', name: "sortable-item-actions" })))));
|
|
7679
10087
|
}
|
|
7680
10088
|
get el() { return getElement(this); }
|
|
7681
10089
|
static get style() { return pdsSortableItemCss; }
|
|
@@ -7740,9 +10148,9 @@ class PdsSwitch {
|
|
|
7740
10148
|
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
7741
10149
|
}
|
|
7742
10150
|
render() {
|
|
7743
|
-
return (hAsync(Host, { key: '
|
|
7744
|
-
hAsync("div", { key: '
|
|
7745
|
-
hAsync("div", { key: '
|
|
10151
|
+
return (hAsync(Host, { key: 'c91cd6368fff2cbcc6b4974505d94139fa2722c5', class: this.switchClassNames(), "aria-disabled": this.disabled ? 'true' : null }, hAsync("label", { key: 'e46f5f6a8073236ec0d55b2bcc8087dc32ad5a68', htmlFor: this.componentId }, hAsync("input", Object.assign({ key: '9a2db3481c6c5e223819066df34bc220a139df03', "aria-describedby": 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)), hAsync("span", { key: 'c3b138eb7b6800d01e5676e94c17988c8a52d4b2', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
|
|
10152
|
+
hAsync("div", { key: 'fcaaa0ea30c8ad155a0b43004e77549abf888a57', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
10153
|
+
hAsync("div", { key: '045311e393d47bebd536d8fbe220260d112ceb3f', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, hAsync("pds-icon", { key: '035488794764ffaee3275edfa9a3e9fad2d11ddb', icon: danger, size: "small" }), this.errorMessage)));
|
|
7746
10154
|
}
|
|
7747
10155
|
get el() { return getElement(this); }
|
|
7748
10156
|
static get style() { return labelCss$1 + pdsSwitchCss; }
|
|
@@ -7784,9 +10192,9 @@ class PdsTab {
|
|
|
7784
10192
|
this.pdsTabClick.emit([index, parentComponentId]);
|
|
7785
10193
|
}
|
|
7786
10194
|
render() {
|
|
7787
|
-
const availabilityTabEdgeInlineStart = (hAsync("span", { key: '
|
|
7788
|
-
const availabilityTabEdgeInlineEnd = (hAsync("span", { key: '
|
|
7789
|
-
return (hAsync(Host, { key: '
|
|
10195
|
+
const availabilityTabEdgeInlineStart = (hAsync("span", { key: 'cdf38229fcb4548cf188e401d8949f0fdddd8160', class: "pds-tab-edge", role: "presentation" }));
|
|
10196
|
+
const availabilityTabEdgeInlineEnd = (hAsync("span", { key: 'ffd68b6f2c2a521560495411455185d426d41446', class: "pds-tab-edge pds-tab-edge--end", role: "presentation" }));
|
|
10197
|
+
return (hAsync(Host, { key: 'afc723cff632012e447cecf9e4a2d7258b846d48', variant: this.variant, slot: "tabs", index: this.index }, hAsync("button", { key: 'f7f814b9ef9ac505a741ce74abd91934116f975f', 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, hAsync("div", { key: '12fea0cfdf4a1e9acee497ff3e60cb276f6ae649', class: "pds-tab__content" }, hAsync("slot", { key: 'bf4455e277526a453111542ce7c80a0621135f18' })))));
|
|
7790
10198
|
}
|
|
7791
10199
|
get el() { return getElement(this); }
|
|
7792
10200
|
static get style() { return pdsTabCss; }
|
|
@@ -7895,7 +10303,7 @@ class PdsTable {
|
|
|
7895
10303
|
headerCheckbox.indeterminate = !allSelectedRows && !noneSelectedRows;
|
|
7896
10304
|
}
|
|
7897
10305
|
render() {
|
|
7898
|
-
return (hAsync(Host, { key: '
|
|
10306
|
+
return (hAsync(Host, { key: '8fbd30502d23962edf8977e9d23b8e990f043e23', class: this.classNames(), id: this.componentId, role: "grid", selectable: this.selectable, tabindex: "0" }, hAsync("slot", { key: '5041e5f588db255c747406c47bcfb3524cd58450' })));
|
|
7899
10307
|
}
|
|
7900
10308
|
get el() { return getElement(this); }
|
|
7901
10309
|
static get style() { return pdsTableCss; }
|
|
@@ -7924,7 +10332,7 @@ class PdsTableBody {
|
|
|
7924
10332
|
registerInstance(this, hostRef);
|
|
7925
10333
|
}
|
|
7926
10334
|
render() {
|
|
7927
|
-
return (hAsync(Host, { key: '
|
|
10335
|
+
return (hAsync(Host, { key: 'ac8d361f2d78eb929c17523843d2ca0ac53f6789', role: "rowgroup" }, hAsync("slot", { key: '132782ab9466a9dbd4350247aae762d731e7aa71' })));
|
|
7928
10336
|
}
|
|
7929
10337
|
static get style() { return pdsTableBodyCss; }
|
|
7930
10338
|
static get cmpMeta() { return {
|
|
@@ -7978,11 +10386,11 @@ class PdsTableCell {
|
|
|
7978
10386
|
return classNames.join(' ');
|
|
7979
10387
|
}
|
|
7980
10388
|
render() {
|
|
7981
|
-
return (hAsync(Host, { key: '
|
|
10389
|
+
return (hAsync(Host, { key: '801c1c1de26cb633280f308274861e8fd3629091', class: this.classNames(), role: "gridcell", style: this.tableRef &&
|
|
7982
10390
|
this.tableRef.fixedColumn &&
|
|
7983
10391
|
this.tableRef.selectable
|
|
7984
10392
|
? { '--fixed-cell-position': '40px' }
|
|
7985
|
-
: {} }, hAsync("slot", { key: '
|
|
10393
|
+
: {} }, hAsync("slot", { key: '0000fae3c9f199e3e80328afa7dd4347f429980b' })));
|
|
7986
10394
|
}
|
|
7987
10395
|
get hostElement() { return getElement(this); }
|
|
7988
10396
|
static get style() { return pdsTableCellCss; }
|
|
@@ -8043,7 +10451,7 @@ class PdsTableHead {
|
|
|
8043
10451
|
}
|
|
8044
10452
|
}
|
|
8045
10453
|
render() {
|
|
8046
|
-
return (hAsync(Host, { key: '
|
|
10454
|
+
return (hAsync(Host, { key: '38eaecd17a328791e5993d020a490f63f67cd9d5', role: "row" }, this.tableRef && this.tableRef.selectable && (hAsync("pds-table-head-cell", { key: '438086205f3e018f597c868e98f300d28c4f3384', part: this.tableRef.selectable ? 'checkbox-cell' : '' }, hAsync("pds-checkbox", { key: '835bbe3c1f3a0fcb217f62cf862b9ea80ddff38e', componentId: this.generateUniqueId(), indeterminate: this.indeterminate, onInput: this.handleInput, label: "Select All Rows", hideLabel: true, checked: this.isSelected }))), hAsync("slot", { key: 'aa5507016e20951eab86f62680720c54de5a5a86' })));
|
|
8047
10455
|
}
|
|
8048
10456
|
get hostElement() { return getElement(this); }
|
|
8049
10457
|
static get style() { return pdsTableHeadCss; }
|
|
@@ -8125,11 +10533,11 @@ class PdsTableHeadCell {
|
|
|
8125
10533
|
return classNames.join(' ');
|
|
8126
10534
|
}
|
|
8127
10535
|
render() {
|
|
8128
|
-
return (hAsync(Host, { key: '
|
|
10536
|
+
return (hAsync(Host, { key: '2e75e9b8d1254ec21c786fd7e8304aaf38b26377', class: this.classNames(), role: "columnheader", onClick: this.toggleSort, style: this.tableRef &&
|
|
8129
10537
|
this.tableRef.fixedColumn &&
|
|
8130
10538
|
this.tableRef.selectable
|
|
8131
10539
|
? { '--fixed-cell-position': '40px' }
|
|
8132
|
-
: {} }, hAsync("slot", { key: '
|
|
10540
|
+
: {} }, hAsync("slot", { key: 'f9c7aae07eb7907a18dcf1a59813a2810341f2e9' }), this.sortable && (hAsync("pds-icon", { key: 'd24a2f2c1db5bb15216ba64bc5a7299e18c23626', icon: this.sortingDirection === 'asc' ? upSmall : downSmall }))));
|
|
8133
10541
|
}
|
|
8134
10542
|
get hostElement() { return getElement(this); }
|
|
8135
10543
|
static get style() { return pdsTableHeadCellCss; }
|
|
@@ -8195,7 +10603,7 @@ class PdsTableRow {
|
|
|
8195
10603
|
}
|
|
8196
10604
|
}
|
|
8197
10605
|
render() {
|
|
8198
|
-
return (hAsync(Host, { key: '
|
|
10606
|
+
return (hAsync(Host, { key: '651138280f94fd837a77e172c7e0ae5181ce8357', class: this.classNames(), role: "row" }, this.tableRef && this.tableRef.selectable && (hAsync("pds-table-cell", { key: '739cd15863b52d60f9a00bffcf0d900b1ce1f545', part: this.tableRef.fixedColumn ? 'checkbox-cell' : '', class: this.tableRef.selectable ? 'has-checkbox' : '' }, hAsync("pds-checkbox", { key: '2b2000bc223fa72e2be0edea25e72e4d26a98fa1', componentId: this.generateUniqueId(), onClick: this.handleClick, indeterminate: this.indeterminate, label: "Select Row", hideLabel: true, checked: this.isSelected }))), hAsync("slot", { key: '9d3be777c57b1ba4be066cc4ffa5496289fbdc02' })));
|
|
8199
10607
|
}
|
|
8200
10608
|
get hostElement() { return getElement(this); }
|
|
8201
10609
|
static get style() { return pdsTableRowCss; }
|
|
@@ -8224,7 +10632,7 @@ class PdsTabpanel {
|
|
|
8224
10632
|
this.selected = false; // eslint-disable-line @stencil-community/strict-mutable
|
|
8225
10633
|
}
|
|
8226
10634
|
render() {
|
|
8227
|
-
return (hAsync(Host, { key: '
|
|
10635
|
+
return (hAsync(Host, { key: '021d0c1f2fd740087bdd88069ac82455b8b5ede1', slot: "tabpanels" }, hAsync("div", { key: '036aca9a0a29ba7cfc8aa0132eab027898a661f2', role: "tabpanel", id: this.parentComponentId + "__" + this.name + '-panel', tabindex: "0", "aria-labelledby": this.parentComponentId + "__" + this.name, class: this.selected ? "pds-tabpanel is-active" : "pds-tabpanel" }, hAsync("slot", { key: 'd6b61e7b8af79204dbb5d3e421028715236a7bb1' }))));
|
|
8228
10636
|
}
|
|
8229
10637
|
get el() { return getElement(this); }
|
|
8230
10638
|
static get style() { return pdsTabpanelCss; }
|
|
@@ -8325,7 +10733,7 @@ class PdsTabs {
|
|
|
8325
10733
|
this.passPropsToChildren();
|
|
8326
10734
|
}
|
|
8327
10735
|
render() {
|
|
8328
|
-
return (hAsync(Host, { key: '
|
|
10736
|
+
return (hAsync(Host, { key: 'ed163de5068114e7c7dd8314c7ed036859d0d0af', "active-tab-name": this.activeTabName, class: this.classNames(), id: this.componentId }, hAsync("div", { key: '4b0f2bce407b2ea5c7ceb1435f4f91531334557e', class: "pds-tabs__tablist", role: "tablist", "aria-label": this.tablistLabel }, hAsync("slot", { key: 'a61fb9bd35056f87233c1fec66dda175b201b265', name: "tabs" })), hAsync("slot", { key: 'd78cc498b17ddd84015174802e4eb18fc5053ec2', name: "tabpanels" })));
|
|
8329
10737
|
}
|
|
8330
10738
|
get el() { return getElement(this); }
|
|
8331
10739
|
static get style() { return pdsTabsCss; }
|
|
@@ -8365,7 +10773,7 @@ class PdsText {
|
|
|
8365
10773
|
${this.weight !== undefined && this.weight.trim() !== '' ? `pds-text--weight-${this.weight}` : ''}
|
|
8366
10774
|
${this.decoration !== undefined && this.decoration.trim() !== '' ? `pds-text--decoration-${this.decoration}` : ''}
|
|
8367
10775
|
`;
|
|
8368
|
-
return (hAsync(Tag, { key: '
|
|
10776
|
+
return (hAsync(Tag, { key: '327e3b37535dd5eb28cf3ea0430e544261e570c0', style: this.color && setColor(this.color), class: typeClasses }, hAsync("slot", { key: '97010a619baa6fd4a45e79ab9354097e99af0ae2' })));
|
|
8369
10777
|
}
|
|
8370
10778
|
get el() { return getElement(this); }
|
|
8371
10779
|
static get style() { return pdsTextCss; }
|
|
@@ -8381,11 +10789,11 @@ class PdsText {
|
|
|
8381
10789
|
"size": [1],
|
|
8382
10790
|
"weight": [1],
|
|
8383
10791
|
"tag": [1],
|
|
8384
|
-
"truncate": [
|
|
10792
|
+
"truncate": [516]
|
|
8385
10793
|
},
|
|
8386
10794
|
"$listeners$": undefined,
|
|
8387
10795
|
"$lazyBundleId$": "-",
|
|
8388
|
-
"$attrsToReflect$": []
|
|
10796
|
+
"$attrsToReflect$": [["truncate", "truncate"]]
|
|
8389
10797
|
}; }
|
|
8390
10798
|
}
|
|
8391
10799
|
|
|
@@ -8518,10 +10926,10 @@ class PdsTextarea {
|
|
|
8518
10926
|
}
|
|
8519
10927
|
render() {
|
|
8520
10928
|
const value = this.getValue();
|
|
8521
|
-
return (hAsync(Host, { key: '
|
|
8522
|
-
hAsync("label", { key: '
|
|
8523
|
-
hAsync("p", { key: '
|
|
8524
|
-
hAsync("p", { key: '
|
|
10929
|
+
return (hAsync(Host, { key: 'ebbf2c30176e11c92f04de02cad236496bc50a44', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null }, hAsync("div", { key: '687811120416068af1b6d23a5fa8af149674669b', class: "pds-textarea" }, this.label &&
|
|
10930
|
+
hAsync("label", { key: '40fa708e95ff63881f3d41646bf99841625631d6', htmlFor: this.componentId }, this.label), hAsync("textarea", Object.assign({ key: '543b7d6996b441b32f124f13025787c76340218d', ref: (el) => this.nativeTextarea = el, "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, autocomplete: this.autocomplete, class: this.textareaClassNames(), disabled: this.disabled, id: this.componentId, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, rows: this.rows, onBlur: this.onBlur, onChange: this.onTextareaChange, onFocus: this.onFocus, onInput: this.onInput }, this.inheritedAttributes), value), this.helperMessage &&
|
|
10931
|
+
hAsync("p", { key: '47cd46e8c8c5daaa3ff6fa830e5dde3624403575', class: "pds-textarea__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.invalid &&
|
|
10932
|
+
hAsync("p", { key: 'd84d1aece21db4ef596c154919fe689d66f4bd66', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, hAsync("pds-icon", { key: 'cb4627c36e25e14f6699ad0cfddd4bf8528755e0', icon: danger, size: "small" }), this.errorMessage))));
|
|
8525
10933
|
}
|
|
8526
10934
|
get el() { return getElement(this); }
|
|
8527
10935
|
static get watchers() { return {
|
|
@@ -8556,75 +10964,205 @@ class PdsTextarea {
|
|
|
8556
10964
|
}; }
|
|
8557
10965
|
}
|
|
8558
10966
|
|
|
10967
|
+
const pdsToastCss = ":host{--animation-duration:0.3s;--animation-timing:cubic-bezier(0.4, 0, 0.2, 1);--padding-inline:var(--pine-dimension-md);--padding-inline-desktop:var(--pine-dimension-2xl);--sizing-height-default:68px;--sizing-min-width:calc(var(--sizing-total-width) - (var(--padding-inline) * 2));--sizing-min-width-desktop:calc(var(--sizing-total-width) - (var(--padding-inline-desktop) * 2));--sizing-total-width:350px;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;font:var(--pine-typography-body-medium)}.pds-toast{-ms-flex-align:center;align-items:center;-webkit-animation:pds-toast-animate-in var(--animation-duration) var(--animation-timing);animation:pds-toast-animate-in var(--animation-duration) var(--animation-timing);background-color:var(--pine-color-primary);border-radius:var(--pine-dimension-xs);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);color:var(--pine-color-text-primary);display:-ms-flexbox;display:flex;height:var(--sizing-height-default);-ms-flex-pack:start;justify-content:flex-start;-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs);max-width:90vw;min-width:var(--sizing-min-width);padding:0 var(--padding-inline);position:relative;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}@media screen and (max-width: 767px){.pds-toast{height:36px;max-width:calc(100vw - var(--pine-dimension-2xs) * 2);min-width:auto;padding-inline:var(--pine-dimension-2xs)}}.pds-toast--danger{background-color:var(--pine-color-danger)}.pds-toast--loading .pds-toast__loader{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-webkit-margin-end:var(--pine-dimension-sm);margin-inline-end:var(--pine-dimension-sm);position:relative}.pds-toast--loading .pds-toast__loader-spinner{-webkit-animation:pds-toast-rotate 2s linear infinite;animation:pds-toast-rotate 2s linear infinite;height:20px;width:20px}.pds-toast--loading .pds-toast__loader-path{-webkit-animation:pds-toast-dash 1.5s ease-in-out infinite;animation:pds-toast-dash 1.5s ease-in-out infinite;stroke-dasharray:1, 200;stroke-dashoffset:0;stroke-linecap:round}.pds-toast__icon{color:var(--pine-color-text-primary);display:-ms-inline-flexbox;display:inline-flex;-webkit-margin-end:var(--pine-dimension-sm);margin-inline-end:var(--pine-dimension-sm)}.pds-toast__message{font:var(--pine-typography-body-sm-medium);-webkit-margin-end:auto;margin-inline-end:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-toast__message ::slotted(a){color:var(--pine-color-text-primary);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs);opacity:0.7;text-decoration:underline}.pds-toast__message ::slotted(a):hover,.pds-toast__message ::slotted(a):focus-visible{opacity:1}.pds-toast__message ::slotted(a):focus-visible{outline:2px solid var(--pine-color-text-primary);outline-offset:2px}.pds-toast__button{-ms-flex-align:center;align-items:center;background:none;border:0;border-radius:var(--pine-border-radius-full);color:inherit;cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-webkit-margin-start:var(--pine-dimension-md);margin-inline-start:var(--pine-dimension-md);opacity:0.7;padding:0;white-space:nowrap}.pds-toast__button:hover,.pds-toast__button:focus{opacity:1}.pds-toast__button:focus{outline:var(--pine-outline-focus);outline-offset:var(--pine-dimension-2xs)}@-webkit-keyframes pds-toast-animate-in{from{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes pds-toast-animate-in{from{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes pds-toast-animate-out{from{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes pds-toast-animate-out{from{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}@-webkit-keyframes pds-toast-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes pds-toast-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes pds-toast-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124}}@keyframes pds-toast-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124}}:host([hidden]) .pds-toast,.pds-toast--animating-out{-webkit-animation:pds-toast-animate-out var(--animation-duration) var(--animation-timing) forwards;animation:pds-toast-animate-out var(--animation-duration) var(--animation-timing) forwards;pointer-events:none;}";
|
|
10968
|
+
|
|
10969
|
+
class PdsToast {
|
|
10970
|
+
constructor(hostRef) {
|
|
10971
|
+
registerInstance(this, hostRef);
|
|
10972
|
+
this.pdsToastDismissed = createEvent(this, "pdsToastDismissed");
|
|
10973
|
+
/**
|
|
10974
|
+
* Whether the toast can be dismissed manually via the close button.
|
|
10975
|
+
* Note: This only controls manual dismissal. Auto-dismissal via duration still applies.
|
|
10976
|
+
* @default true
|
|
10977
|
+
*/
|
|
10978
|
+
this.dismissible = true;
|
|
10979
|
+
/**
|
|
10980
|
+
* The duration in milliseconds to show the toast before auto-dismissing.
|
|
10981
|
+
* Set to 0 to disable auto-dismiss.
|
|
10982
|
+
* @default 4500
|
|
10983
|
+
*/
|
|
10984
|
+
this.duration = 4500;
|
|
10985
|
+
/**
|
|
10986
|
+
* The type of toast to display.
|
|
10987
|
+
* - default: Grey background (default)
|
|
10988
|
+
* - danger: Red background
|
|
10989
|
+
* - loading: With spinner animation
|
|
10990
|
+
* @default 'default'
|
|
10991
|
+
*/
|
|
10992
|
+
this.type = 'default';
|
|
10993
|
+
/**
|
|
10994
|
+
* Whether the toast is currently visible.
|
|
10995
|
+
*/
|
|
10996
|
+
this.isVisible = true;
|
|
10997
|
+
/**
|
|
10998
|
+
* Whether the toast is animating out.
|
|
10999
|
+
*/
|
|
11000
|
+
this.isAnimatingOut = false;
|
|
11001
|
+
}
|
|
11002
|
+
componentDidLoad() {
|
|
11003
|
+
if (this.duration > 0) {
|
|
11004
|
+
this.startDismissTimer();
|
|
11005
|
+
}
|
|
11006
|
+
}
|
|
11007
|
+
disconnectedCallback() {
|
|
11008
|
+
this.cleanup();
|
|
11009
|
+
}
|
|
11010
|
+
handleDurationChange(newDuration) {
|
|
11011
|
+
if (this.dismissTimer) {
|
|
11012
|
+
window.clearTimeout(this.dismissTimer);
|
|
11013
|
+
this.dismissTimer = undefined;
|
|
11014
|
+
}
|
|
11015
|
+
if (newDuration > 0) {
|
|
11016
|
+
this.startDismissTimer();
|
|
11017
|
+
}
|
|
11018
|
+
}
|
|
11019
|
+
async dismiss() {
|
|
11020
|
+
// Start the animation out
|
|
11021
|
+
this.isAnimatingOut = true;
|
|
11022
|
+
// Wait for animation to complete before hiding and cleanup
|
|
11023
|
+
await new Promise((resolve) => setTimeout(resolve, 300)); // Match --animation-duration
|
|
11024
|
+
this.isVisible = false;
|
|
11025
|
+
this.cleanup();
|
|
11026
|
+
this.pdsToastDismissed.emit({ componentId: this.componentId });
|
|
11027
|
+
}
|
|
11028
|
+
// Private methods
|
|
11029
|
+
cleanup() {
|
|
11030
|
+
if (this.dismissTimer) {
|
|
11031
|
+
window.clearTimeout(this.dismissTimer);
|
|
11032
|
+
this.dismissTimer = undefined;
|
|
11033
|
+
}
|
|
11034
|
+
}
|
|
11035
|
+
startDismissTimer() {
|
|
11036
|
+
this.dismissTimer = window.setTimeout(() => {
|
|
11037
|
+
this.dismiss();
|
|
11038
|
+
}, this.duration);
|
|
11039
|
+
}
|
|
11040
|
+
renderIcon() {
|
|
11041
|
+
// Loading type takes priority
|
|
11042
|
+
if (this.type === 'loading') {
|
|
11043
|
+
return (hAsync("div", { class: "pds-toast__loader" }, hAsync("svg", { class: "pds-toast__loader-spinner", viewBox: "25 25 50 50", "aria-hidden": "true" }, hAsync("circle", { class: "pds-toast__loader-path", cx: "50", cy: "50", r: "20", fill: "none", stroke: "currentColor", "stroke-width": "4", "stroke-linecap": "round" }))));
|
|
11044
|
+
}
|
|
11045
|
+
// Return icon if provided, otherwise undefined (which renders as nothing)
|
|
11046
|
+
return this.icon && hAsync("pds-icon", { name: this.icon, class: "pds-toast__icon" });
|
|
11047
|
+
}
|
|
11048
|
+
render() {
|
|
11049
|
+
return (hAsync(Host, { key: 'dbb28e20be685c46f8c6cb2dd1a5f58f28e27589', hidden: !this.isVisible }, hAsync("div", { key: '471b6b387799754b92ad16baf70562e26c379616', class: {
|
|
11050
|
+
'pds-toast': true,
|
|
11051
|
+
[`pds-toast--${this.type}`]: this.type !== 'default',
|
|
11052
|
+
'pds-toast--animating-out': this.isAnimatingOut
|
|
11053
|
+
}, role: "alert", "aria-live": "polite" }, this.renderIcon(), hAsync("span", { key: '638faa5e37de1bae0e59c994de35e27960fc625b', class: "pds-toast__message" }, hAsync("slot", { key: 'e58c86bbe9a5467b6b362e0f67db4074b9cac0cb' })), this.dismissible && (hAsync("button", { key: '43bd64963222a78163b337b37e9d5ff888236b45', type: "button", class: "pds-toast__button", onClick: () => {
|
|
11054
|
+
this.dismiss();
|
|
11055
|
+
}, "aria-label": "Dismiss message" }, hAsync("pds-icon", { key: '0c924e96515a7934f51d80b4e57f97db5bfaed14', name: "remove" }))))));
|
|
11056
|
+
}
|
|
11057
|
+
static get watchers() { return {
|
|
11058
|
+
"duration": ["handleDurationChange"]
|
|
11059
|
+
}; }
|
|
11060
|
+
static get style() { return pdsToastCss; }
|
|
11061
|
+
static get cmpMeta() { return {
|
|
11062
|
+
"$flags$": 9,
|
|
11063
|
+
"$tagName$": "pds-toast",
|
|
11064
|
+
"$members$": {
|
|
11065
|
+
"componentId": [1, "component-id"],
|
|
11066
|
+
"dismissible": [4],
|
|
11067
|
+
"duration": [2],
|
|
11068
|
+
"icon": [1],
|
|
11069
|
+
"type": [1],
|
|
11070
|
+
"isVisible": [32],
|
|
11071
|
+
"isAnimatingOut": [32],
|
|
11072
|
+
"dismiss": [64]
|
|
11073
|
+
},
|
|
11074
|
+
"$listeners$": undefined,
|
|
11075
|
+
"$lazyBundleId$": "-",
|
|
11076
|
+
"$attrsToReflect$": []
|
|
11077
|
+
}; }
|
|
11078
|
+
}
|
|
11079
|
+
|
|
8559
11080
|
const positionTooltip = ({ elem, elemPlacement, overlay, offset = 8 }) => {
|
|
8560
|
-
if (elem
|
|
8561
|
-
return;
|
|
11081
|
+
if (elem === null || overlay === null)
|
|
11082
|
+
return false;
|
|
11083
|
+
if (typeof elemPlacement !== 'string' || elemPlacement.trim() === '') {
|
|
11084
|
+
return false;
|
|
11085
|
+
}
|
|
8562
11086
|
const rect = elem.getBoundingClientRect();
|
|
8563
11087
|
const contentRect = overlay.getBoundingClientRect();
|
|
8564
|
-
//
|
|
8565
|
-
|
|
8566
|
-
|
|
11088
|
+
// Reset styles
|
|
11089
|
+
overlay.style.top = '';
|
|
11090
|
+
overlay.style.left = '';
|
|
11091
|
+
overlay.style.right = '';
|
|
11092
|
+
overlay.style.bottom = '';
|
|
11093
|
+
overlay.style.transform = '';
|
|
11094
|
+
// Use fixed positioning for portal overlays
|
|
11095
|
+
overlay.style.position = 'fixed';
|
|
11096
|
+
// Detect if the trigger is a span with only text or a text node
|
|
11097
|
+
let isTextTrigger = false;
|
|
11098
|
+
if (elem.childNodes.length === 1 && elem.childNodes[0].nodeType === Node.TEXT_NODE) {
|
|
11099
|
+
isTextTrigger = true;
|
|
11100
|
+
}
|
|
11101
|
+
else if (elem.childNodes.length === 1 && elem.childNodes[0].nodeType === Node.ELEMENT_NODE) {
|
|
11102
|
+
const child = elem.childNodes[0];
|
|
11103
|
+
if (child.tagName === 'SPAN' && child.childNodes.length === 1 && child.childNodes[0].nodeType === Node.TEXT_NODE) {
|
|
11104
|
+
isTextTrigger = true;
|
|
11105
|
+
}
|
|
11106
|
+
}
|
|
8567
11107
|
switch (true) {
|
|
8568
|
-
case elemPlacement.includes(
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
overlay.style.
|
|
11108
|
+
case elemPlacement.includes('right'):
|
|
11109
|
+
if (isTextTrigger) {
|
|
11110
|
+
// Align to the bottom of the trigger for text triggers
|
|
11111
|
+
overlay.style.top = `${rect.bottom - contentRect.height / 2}px`;
|
|
11112
|
+
}
|
|
11113
|
+
else {
|
|
11114
|
+
overlay.style.top = `${rect.top + rect.height / 2 - contentRect.height / 2}px`;
|
|
11115
|
+
}
|
|
11116
|
+
overlay.style.left = `${rect.right + offset}px`;
|
|
11117
|
+
if (elemPlacement.includes('start')) {
|
|
11118
|
+
overlay.style.top = `${rect.top}px`;
|
|
8575
11119
|
}
|
|
8576
|
-
if (elemPlacement.includes(
|
|
8577
|
-
overlay.style.
|
|
8578
|
-
overlay.style.top = 'initial';
|
|
8579
|
-
overlay.style.transform = 'translateY(0)';
|
|
11120
|
+
if (elemPlacement.includes('end')) {
|
|
11121
|
+
overlay.style.top = `${rect.bottom - contentRect.height}px`;
|
|
8580
11122
|
}
|
|
8581
11123
|
break;
|
|
8582
|
-
case elemPlacement.includes(
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
overlay.style.transform = 'translateY(-50%)';
|
|
8586
|
-
if (elemPlacement.includes("start")) {
|
|
8587
|
-
overlay.style.top = '0';
|
|
8588
|
-
overlay.style.transform = 'translateY(0)';
|
|
11124
|
+
case elemPlacement.includes('left'):
|
|
11125
|
+
if (isTextTrigger) {
|
|
11126
|
+
overlay.style.top = `${rect.bottom - contentRect.height / 2}px`;
|
|
8589
11127
|
}
|
|
8590
|
-
|
|
8591
|
-
overlay.style.
|
|
8592
|
-
|
|
8593
|
-
|
|
11128
|
+
else {
|
|
11129
|
+
overlay.style.top = `${rect.top + rect.height / 2 - contentRect.height / 2}px`;
|
|
11130
|
+
}
|
|
11131
|
+
overlay.style.left = `${rect.left - contentRect.width - offset}px`;
|
|
11132
|
+
if (elemPlacement.includes('start')) {
|
|
11133
|
+
overlay.style.top = `${rect.top}px`;
|
|
11134
|
+
}
|
|
11135
|
+
if (elemPlacement.includes('end')) {
|
|
11136
|
+
overlay.style.top = `${rect.bottom - contentRect.height}px`;
|
|
8594
11137
|
}
|
|
8595
11138
|
break;
|
|
8596
|
-
case elemPlacement.includes(
|
|
8597
|
-
overlay.style.top =
|
|
8598
|
-
overlay.style.left =
|
|
8599
|
-
|
|
8600
|
-
|
|
8601
|
-
overlay.style.left = '0';
|
|
8602
|
-
overlay.style.transform = 'translateX(0)';
|
|
11139
|
+
case elemPlacement.includes('bottom'):
|
|
11140
|
+
overlay.style.top = `${rect.bottom + offset}px`;
|
|
11141
|
+
overlay.style.left = `${rect.left + rect.width / 2 - contentRect.width / 2}px`;
|
|
11142
|
+
if (elemPlacement.includes('start')) {
|
|
11143
|
+
overlay.style.left = `${rect.left}px`;
|
|
8603
11144
|
}
|
|
8604
|
-
if (elemPlacement.includes(
|
|
8605
|
-
overlay.style.left =
|
|
8606
|
-
overlay.style.right = '
|
|
8607
|
-
overlay.style.transform = 'translateX(0)';
|
|
11145
|
+
if (elemPlacement.includes('end')) {
|
|
11146
|
+
overlay.style.left = `${rect.right - contentRect.width}px`;
|
|
11147
|
+
overlay.style.right = 'initial';
|
|
8608
11148
|
}
|
|
8609
11149
|
break;
|
|
8610
|
-
case elemPlacement.includes(
|
|
8611
|
-
overlay.style.top =
|
|
8612
|
-
overlay.style.left =
|
|
8613
|
-
|
|
8614
|
-
|
|
8615
|
-
overlay.style.left = '0';
|
|
8616
|
-
overlay.style.transform = 'translateX(0)';
|
|
11150
|
+
case elemPlacement.includes('top'):
|
|
11151
|
+
overlay.style.top = `${rect.top - contentRect.height - offset}px`;
|
|
11152
|
+
overlay.style.left = `${rect.left + rect.width / 2 - contentRect.width / 2}px`;
|
|
11153
|
+
if (elemPlacement.includes('start')) {
|
|
11154
|
+
overlay.style.left = `${rect.left}px`;
|
|
8617
11155
|
}
|
|
8618
|
-
if (elemPlacement.includes(
|
|
8619
|
-
overlay.style.left =
|
|
8620
|
-
overlay.style.right = '
|
|
8621
|
-
overlay.style.transform = 'translateX(0)';
|
|
11156
|
+
if (elemPlacement.includes('end')) {
|
|
11157
|
+
overlay.style.left = `${rect.right - contentRect.width}px`;
|
|
11158
|
+
overlay.style.right = 'initial';
|
|
8622
11159
|
}
|
|
8623
11160
|
break;
|
|
8624
11161
|
}
|
|
11162
|
+
return true;
|
|
8625
11163
|
};
|
|
8626
11164
|
|
|
8627
|
-
const pdsTooltipCss = "
|
|
11165
|
+
const pdsTooltipCss = ".pds-tooltip{--tooltip-border-width-arrow-down:var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow) 0;--tooltip-border-width-arrow-left:var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow) 0;--tooltip-border-width-arrow-right:var(--tooltip-sizing-arrow) 0 var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow);--tooltip-border-width-arrow-up:0 var(--tooltip-sizing-arrow) var(--tooltip-sizing-arrow);--tooltip-sizing-arrow:6px;--tooltip-sizing-arrow-offset:14px;--tooltip-dimension-max-width:320px}.pds-tooltip__content{background-color:var(--pine-color-primary);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);color:var(--pine-color-text-primary);max-width:var(--tooltip-dimension-max-width);opacity:0;padding:var(--pine-dimension-xs) calc(var(--pine-dimension-md) / 2);position:absolute;visibility:hidden;width:-webkit-max-content;width:-moz-max-content;width:max-content}.pds-tooltip--is-open .pds-tooltip__content{opacity:1;visibility:visible;z-index:1}.pds-tooltip.pds-tooltip--has-html-content .pds-tooltip__content{width:auto}.pds-tooltip__content::after{border-color:transparent;border-right-color:transparent;border-style:solid;border-width:var(--tooltip-border-width-arrow-left);content:\"\";height:0;position:absolute;width:0}.pds-tooltip--right .pds-tooltip__content::after{border-inline-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-left);left:calc(var(--tooltip-sizing-arrow) * -1);top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pds-tooltip--right-end .pds-tooltip__content::after{border-inline-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-left);bottom:var(--tooltip-sizing-arrow-offset);left:calc(var(--tooltip-sizing-arrow) * -1);top:initial}.pds-tooltip--right-start .pds-tooltip__content::after{border-inline-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-left);left:calc(var(--tooltip-sizing-arrow) * -1);top:var(--tooltip-sizing-arrow-offset)}.pds-tooltip--top .pds-tooltip__content::after{border-block-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-down);bottom:calc(var(--tooltip-sizing-arrow) * -1);left:50%;top:initial;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.pds-tooltip--top-start .pds-tooltip__content::after{border-block-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-down);bottom:calc(var(--tooltip-sizing-arrow) * -1);left:var(--tooltip-sizing-arrow-offset);top:initial}.pds-tooltip--top-end .pds-tooltip__content::after{border-block-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-down);bottom:calc(var(--tooltip-sizing-arrow) * -1);left:initial;right:var(--tooltip-sizing-arrow-offset);top:initial}.pds-tooltip--left .pds-tooltip__content::after{border-inline-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-right);left:initial;right:calc(var(--tooltip-sizing-arrow) * -1);top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pds-tooltip--left-end .pds-tooltip__content::after{border-inline-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-right);bottom:var(--tooltip-sizing-arrow-offset);left:initial;right:calc(var(--tooltip-sizing-arrow) * -1);top:initial}.pds-tooltip--left-start .pds-tooltip__content::after{border-inline-start-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-right);left:initial;right:calc(var(--tooltip-sizing-arrow) * -1);top:var(--tooltip-sizing-arrow-offset)}.pds-tooltip--bottom .pds-tooltip__content::after{border-block-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-up);left:50%;top:calc(var(--tooltip-sizing-arrow) * -1);-webkit-transform:translateX(-50%);transform:translateX(-50%)}.pds-tooltip--bottom-end .pds-tooltip__content::after{border-block-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-up);left:initial;right:var(--tooltip-sizing-arrow-offset);top:calc(var(--tooltip-sizing-arrow) * -1)}.pds-tooltip--bottom-start .pds-tooltip__content::after{border-block-end-color:var(--pine-color-primary);border-width:var(--tooltip-border-width-arrow-up);left:var(--tooltip-sizing-arrow-offset);top:calc(var(--tooltip-sizing-arrow) * -1)}.pds-tooltip--no-arrow .pds-tooltip__content::after{border-width:0}";
|
|
8628
11166
|
|
|
8629
11167
|
/**
|
|
8630
11168
|
* @slot (default) - The tooltip's target element
|
|
@@ -8633,6 +11171,18 @@ const pdsTooltipCss = ":host{--tooltip-border-width-arrow-down:var(--tooltip-siz
|
|
|
8633
11171
|
class PdsTooltip {
|
|
8634
11172
|
constructor(hostRef) {
|
|
8635
11173
|
registerInstance(this, hostRef);
|
|
11174
|
+
/**
|
|
11175
|
+
* Internal state: true if the tooltip was opened by user interaction (hover/focus),
|
|
11176
|
+
* false if opened via the `opened` prop or currently closed.
|
|
11177
|
+
*/
|
|
11178
|
+
this._isInteractiveOpen = false;
|
|
11179
|
+
this.portalEl = null;
|
|
11180
|
+
this.triggerEl = null;
|
|
11181
|
+
this.contentDiv = null;
|
|
11182
|
+
this.slotMutationObserver = null;
|
|
11183
|
+
this.overlayResizeObserver = null;
|
|
11184
|
+
this.currentPathname = '';
|
|
11185
|
+
this.pathnameCheckInterval = null;
|
|
8636
11186
|
/**
|
|
8637
11187
|
* Determines when the tooltip is open
|
|
8638
11188
|
* @defaultValue false
|
|
@@ -8664,44 +11214,87 @@ class PdsTooltip {
|
|
|
8664
11214
|
*/
|
|
8665
11215
|
this.opened = false;
|
|
8666
11216
|
this.handleHide = () => {
|
|
11217
|
+
if (this.opened && !this._isInteractiveOpen) {
|
|
11218
|
+
return;
|
|
11219
|
+
}
|
|
8667
11220
|
this.hideTooltip();
|
|
11221
|
+
this._isInteractiveOpen = false;
|
|
8668
11222
|
};
|
|
8669
11223
|
this.handleShow = () => {
|
|
11224
|
+
if (this.opened && !this._isInteractiveOpen) {
|
|
11225
|
+
return;
|
|
11226
|
+
}
|
|
11227
|
+
this._isInteractiveOpen = true;
|
|
8670
11228
|
this.showTooltip();
|
|
8671
11229
|
};
|
|
8672
11230
|
this.handlePageShow = () => {
|
|
11231
|
+
if (this.opened && !this._isInteractiveOpen) {
|
|
11232
|
+
return;
|
|
11233
|
+
}
|
|
8673
11234
|
this.opened = false;
|
|
11235
|
+
this._isInteractiveOpen = false;
|
|
11236
|
+
};
|
|
11237
|
+
this.handleScroll = () => {
|
|
11238
|
+
if (this.opened) {
|
|
11239
|
+
if (!this._isInteractiveOpen) {
|
|
11240
|
+
this.repositionPortal();
|
|
11241
|
+
}
|
|
11242
|
+
else {
|
|
11243
|
+
this.hideTooltip();
|
|
11244
|
+
this._isInteractiveOpen = false;
|
|
11245
|
+
}
|
|
11246
|
+
}
|
|
11247
|
+
};
|
|
11248
|
+
this.handleSpaNavigation = () => {
|
|
11249
|
+
if (this.opened && !this._isInteractiveOpen) {
|
|
11250
|
+
return;
|
|
11251
|
+
}
|
|
11252
|
+
this.hideTooltip();
|
|
11253
|
+
this._isInteractiveOpen = false;
|
|
11254
|
+
};
|
|
11255
|
+
this.checkPathnameChange = () => {
|
|
11256
|
+
if (window.location.pathname !== this.currentPathname) {
|
|
11257
|
+
this.currentPathname = window.location.pathname;
|
|
11258
|
+
this.handleSpaNavigation();
|
|
11259
|
+
}
|
|
8674
11260
|
};
|
|
8675
11261
|
}
|
|
8676
|
-
handleOpenToggle() {
|
|
8677
|
-
if (
|
|
8678
|
-
this.
|
|
8679
|
-
}
|
|
8680
|
-
else {
|
|
8681
|
-
this.handleHide();
|
|
11262
|
+
handleOpenToggle(newValue, oldValue) {
|
|
11263
|
+
if (newValue === false && oldValue === true) {
|
|
11264
|
+
this._isInteractiveOpen = false;
|
|
8682
11265
|
}
|
|
8683
11266
|
}
|
|
8684
11267
|
componentWillLoad() {
|
|
8685
|
-
|
|
8686
|
-
this.showTooltip();
|
|
8687
|
-
}
|
|
8688
|
-
this.el.addEventListener('blur', this.handleHide, true);
|
|
8689
|
-
this.el.addEventListener('focus', this.handleShow, true);
|
|
11268
|
+
this._isInteractiveOpen = false;
|
|
8690
11269
|
}
|
|
8691
11270
|
componentDidLoad() {
|
|
8692
|
-
// fix for Safari iOS back button issue
|
|
8693
11271
|
window.addEventListener('pageshow', this.handlePageShow);
|
|
11272
|
+
this.currentPathname = window.location.pathname;
|
|
11273
|
+
this.triggerEl = this.el.querySelector('.pds-tooltip__trigger');
|
|
11274
|
+
const contentSlotWrapper = this.el.querySelector('.pds-tooltip__content-slot-wrapper');
|
|
11275
|
+
if (contentSlotWrapper !== null) {
|
|
11276
|
+
this.slotMutationObserver = new MutationObserver(() => {
|
|
11277
|
+
if (this.opened && this.portalEl !== null) {
|
|
11278
|
+
this.removePortal();
|
|
11279
|
+
this.createPortal();
|
|
11280
|
+
}
|
|
11281
|
+
});
|
|
11282
|
+
this.slotMutationObserver.observe(contentSlotWrapper, { childList: true, subtree: false });
|
|
11283
|
+
}
|
|
8694
11284
|
return () => {
|
|
8695
11285
|
window.removeEventListener('pageshow', this.handlePageShow);
|
|
11286
|
+
if (this.slotMutationObserver !== null) {
|
|
11287
|
+
this.slotMutationObserver.disconnect();
|
|
11288
|
+
}
|
|
8696
11289
|
};
|
|
8697
11290
|
}
|
|
8698
|
-
componentDidUpdate() {
|
|
8699
|
-
if (this.opened) {
|
|
8700
|
-
this.showTooltip();
|
|
8701
|
-
}
|
|
8702
|
-
}
|
|
8703
11291
|
componentDidRender() {
|
|
8704
|
-
|
|
11292
|
+
if (this.opened && this.portalEl === null) {
|
|
11293
|
+
this.createPortal();
|
|
11294
|
+
}
|
|
11295
|
+
else if (!this.opened && this.portalEl !== null) {
|
|
11296
|
+
this.removePortal();
|
|
11297
|
+
}
|
|
8705
11298
|
}
|
|
8706
11299
|
/**
|
|
8707
11300
|
* Shows the tooltip by enabling the opened property
|
|
@@ -8715,14 +11308,159 @@ class PdsTooltip {
|
|
|
8715
11308
|
async hideTooltip() {
|
|
8716
11309
|
this.opened = false;
|
|
8717
11310
|
}
|
|
11311
|
+
/**
|
|
11312
|
+
* Determines the most accurate HTML element to use as the anchor for positioning the tooltip.
|
|
11313
|
+
* If `htmlContent` is false, it attempts to find the actual element slotted as the trigger.
|
|
11314
|
+
* Otherwise, or if no specific element is found, it defaults to the span wrapper around the trigger slot.
|
|
11315
|
+
* This helps with precise alignment.
|
|
11316
|
+
*/
|
|
11317
|
+
determinePositioningAnchor() {
|
|
11318
|
+
let positioningAnchor = this.triggerEl;
|
|
11319
|
+
if (this.triggerEl !== null) {
|
|
11320
|
+
const children = this.triggerEl.childNodes;
|
|
11321
|
+
for (let i = 0; i < children.length; i++) {
|
|
11322
|
+
const childNode = children[i];
|
|
11323
|
+
if (childNode.nodeType === Node.ELEMENT_NODE) {
|
|
11324
|
+
positioningAnchor = childNode;
|
|
11325
|
+
break; // Found the first element, use it as the anchor
|
|
11326
|
+
}
|
|
11327
|
+
}
|
|
11328
|
+
}
|
|
11329
|
+
// If no ELEMENT_NODE is found within this.triggerEl (e.g., if trigger is just text),
|
|
11330
|
+
// positioningAnchor will correctly remain this.triggerEl (the span).
|
|
11331
|
+
return positioningAnchor;
|
|
11332
|
+
}
|
|
11333
|
+
/**
|
|
11334
|
+
* Centralized method to calculate and apply the tooltip's position.
|
|
11335
|
+
* Uses the determined anchor element and the current content dimensions.
|
|
11336
|
+
*/
|
|
11337
|
+
repositionPortal() {
|
|
11338
|
+
const anchor = this.determinePositioningAnchor();
|
|
11339
|
+
if (anchor !== null && this.contentDiv !== null) {
|
|
11340
|
+
positionTooltip({ elem: anchor, elemPlacement: this.placement, overlay: this.contentDiv });
|
|
11341
|
+
const placementParts = this.placement.split('-');
|
|
11342
|
+
const primaryPlacement = placementParts[0];
|
|
11343
|
+
const isCardinalCenterPlacement = placementParts.length === 1;
|
|
11344
|
+
if (isCardinalCenterPlacement) {
|
|
11345
|
+
const anchorRect = anchor.getBoundingClientRect();
|
|
11346
|
+
const overlayRect = this.contentDiv.getBoundingClientRect();
|
|
11347
|
+
if (primaryPlacement === 'left' || primaryPlacement === 'right') {
|
|
11348
|
+
const currentOverlayTop = parseFloat(this.contentDiv.style.top || '0');
|
|
11349
|
+
const anchorCenterY = anchorRect.top + (anchorRect.height / 2);
|
|
11350
|
+
const overlayCenterY = overlayRect.top + (overlayRect.height / 2);
|
|
11351
|
+
const adjustmentY = anchorCenterY - overlayCenterY;
|
|
11352
|
+
if (Math.abs(adjustmentY) > 0.5) {
|
|
11353
|
+
this.contentDiv.style.top = `${currentOverlayTop + adjustmentY}px`;
|
|
11354
|
+
}
|
|
11355
|
+
}
|
|
11356
|
+
else if (primaryPlacement === 'top' || primaryPlacement === 'bottom') {
|
|
11357
|
+
const currentOverlayLeft = parseFloat(this.contentDiv.style.left || '0');
|
|
11358
|
+
const anchorCenterX = anchorRect.left + (anchorRect.width / 2);
|
|
11359
|
+
const overlayCenterX = overlayRect.left + (overlayRect.width / 2);
|
|
11360
|
+
const adjustmentX = anchorCenterX - overlayCenterX;
|
|
11361
|
+
if (Math.abs(adjustmentX) > 0.5) {
|
|
11362
|
+
this.contentDiv.style.left = `${currentOverlayLeft + adjustmentX}px`;
|
|
11363
|
+
}
|
|
11364
|
+
}
|
|
11365
|
+
}
|
|
11366
|
+
}
|
|
11367
|
+
}
|
|
11368
|
+
createPortal() {
|
|
11369
|
+
if (this.portalEl !== null)
|
|
11370
|
+
return;
|
|
11371
|
+
this.portalEl = document.createElement('div');
|
|
11372
|
+
this.portalEl.className = `pds-tooltip pds-tooltip--${this.placement} ${this.htmlContent ? 'pds-tooltip--has-html-content' : ''} ${this.opened ? 'pds-tooltip--is-open' : ''} ${this.hasArrow ? '' : 'pds-tooltip--no-arrow'}`;
|
|
11373
|
+
this.portalEl.style.position = 'fixed';
|
|
11374
|
+
this.portalEl.style.zIndex = '9999';
|
|
11375
|
+
if (this.portalEl.id === '') {
|
|
11376
|
+
this.portalEl.id = this.componentId || this.el.id || `pds-tooltip-portal-${PdsTooltip.instanceCounter++}`;
|
|
11377
|
+
}
|
|
11378
|
+
if (this.portalEl.getAttribute('id') !== this.portalEl.id) {
|
|
11379
|
+
this.portalEl.setAttribute('id', this.portalEl.id);
|
|
11380
|
+
}
|
|
11381
|
+
this.portalEl.setAttribute('role', 'tooltip');
|
|
11382
|
+
this.portalEl.setAttribute('aria-hidden', this.opened ? 'false' : 'true');
|
|
11383
|
+
this.portalEl.setAttribute('aria-live', this.opened ? 'polite' : 'off');
|
|
11384
|
+
this.portalEl.style.maxWidth = this.maxWidth;
|
|
11385
|
+
this.contentDiv = document.createElement('div');
|
|
11386
|
+
this.contentDiv.className = 'pds-tooltip__content';
|
|
11387
|
+
this.contentDiv.setAttribute('aria-hidden', this.opened ? 'false' : 'true');
|
|
11388
|
+
this.contentDiv.setAttribute('aria-live', this.opened ? 'polite' : 'off');
|
|
11389
|
+
this.contentDiv.setAttribute('role', 'tooltip');
|
|
11390
|
+
this.contentDiv.style.maxWidth = this.maxWidth;
|
|
11391
|
+
const contentSlotWrapper = this.el.querySelector('.pds-tooltip__content-slot-wrapper');
|
|
11392
|
+
const slottedContentContainer = contentSlotWrapper === null || contentSlotWrapper === void 0 ? void 0 : contentSlotWrapper.querySelector('[slot="content"]');
|
|
11393
|
+
let hasSlottedContent = false;
|
|
11394
|
+
if (slottedContentContainer !== null) {
|
|
11395
|
+
const childrenToClone = Array.from(slottedContentContainer.childNodes);
|
|
11396
|
+
if (childrenToClone.length > 0) {
|
|
11397
|
+
const hasMeaningfulNode = childrenToClone.some(node => {
|
|
11398
|
+
var _a;
|
|
11399
|
+
return node.nodeType === Node.ELEMENT_NODE ||
|
|
11400
|
+
(node.nodeType === Node.TEXT_NODE && ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== '');
|
|
11401
|
+
});
|
|
11402
|
+
if (hasMeaningfulNode) {
|
|
11403
|
+
hasSlottedContent = true;
|
|
11404
|
+
childrenToClone.forEach((node /*, index*/) => {
|
|
11405
|
+
var _a;
|
|
11406
|
+
if (node.nodeType === Node.ELEMENT_NODE || (node.nodeType === Node.TEXT_NODE && ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== '')) {
|
|
11407
|
+
this.contentDiv.appendChild(node.cloneNode(true));
|
|
11408
|
+
}
|
|
11409
|
+
});
|
|
11410
|
+
}
|
|
11411
|
+
}
|
|
11412
|
+
}
|
|
11413
|
+
if (!hasSlottedContent) {
|
|
11414
|
+
if (this.content !== '') {
|
|
11415
|
+
this.contentDiv.textContent = this.content;
|
|
11416
|
+
}
|
|
11417
|
+
}
|
|
11418
|
+
this.portalEl.appendChild(this.contentDiv);
|
|
11419
|
+
document.body.appendChild(this.portalEl);
|
|
11420
|
+
this.repositionPortal();
|
|
11421
|
+
if (this.contentDiv !== null) {
|
|
11422
|
+
this.overlayResizeObserver = new ResizeObserver(() => {
|
|
11423
|
+
this.repositionPortal();
|
|
11424
|
+
});
|
|
11425
|
+
this.overlayResizeObserver.observe(this.contentDiv);
|
|
11426
|
+
}
|
|
11427
|
+
// Add global listeners when portal is created
|
|
11428
|
+
window.addEventListener('scroll', this.handleScroll, true);
|
|
11429
|
+
window.addEventListener('popstate', this.handleSpaNavigation, true);
|
|
11430
|
+
window.addEventListener('hashchange', this.handleSpaNavigation, true);
|
|
11431
|
+
// Start pathname change detection
|
|
11432
|
+
this.pathnameCheckInterval = setInterval(this.checkPathnameChange, 100);
|
|
11433
|
+
// Add ARIA attribute to trigger, now that portalEl and its ID are confirmed
|
|
11434
|
+
if (this.triggerEl !== null && this.portalEl.id !== '') {
|
|
11435
|
+
this.triggerEl.setAttribute('aria-describedby', this.portalEl.id);
|
|
11436
|
+
}
|
|
11437
|
+
}
|
|
11438
|
+
removePortal() {
|
|
11439
|
+
if (this.overlayResizeObserver !== null && this.contentDiv !== null) {
|
|
11440
|
+
this.overlayResizeObserver.unobserve(this.contentDiv);
|
|
11441
|
+
this.overlayResizeObserver = null;
|
|
11442
|
+
}
|
|
11443
|
+
// Stop pathname change detection
|
|
11444
|
+
if (this.pathnameCheckInterval !== null) {
|
|
11445
|
+
clearInterval(this.pathnameCheckInterval);
|
|
11446
|
+
this.pathnameCheckInterval = null;
|
|
11447
|
+
}
|
|
11448
|
+
if (this.portalEl !== null) {
|
|
11449
|
+
window.removeEventListener('scroll', this.handleScroll, true);
|
|
11450
|
+
window.removeEventListener('popstate', this.handleSpaNavigation, true);
|
|
11451
|
+
window.removeEventListener('hashchange', this.handleSpaNavigation, true);
|
|
11452
|
+
document.body.removeChild(this.portalEl);
|
|
11453
|
+
this.portalEl = null;
|
|
11454
|
+
}
|
|
11455
|
+
// Remove ARIA attribute from trigger
|
|
11456
|
+
if (this.triggerEl !== null) {
|
|
11457
|
+
this.triggerEl.removeAttribute('aria-describedby');
|
|
11458
|
+
}
|
|
11459
|
+
this.contentDiv = null;
|
|
11460
|
+
}
|
|
8718
11461
|
render() {
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
pds-tooltip--${this.placement}
|
|
8722
|
-
${this.htmlContent ? 'pds-tooltip--has-html-content' : ''}
|
|
8723
|
-
${this.opened ? 'pds-tooltip--is-open' : ''}
|
|
8724
|
-
${this.hasArrow ? '' : 'pds-tooltip--no-arrow'}
|
|
8725
|
-
` }, hAsync("span", { key: '33e96cb4f46ebc418f79971047a37fc5c3498e0d', "aria-describedby": this.componentId, class: "pds-tooltip__trigger" }, hAsync("slot", { key: 'cca7b5d50e2cbc0f839a46caa5a5dc8a79f1cb15' })), hAsync("div", { key: '22c666894f7835629e00e9c2c3964bcaf63000ae', class: "pds-tooltip__content", "aria-hidden": this.opened ? 'false' : 'true', "aria-live": this.opened ? 'polite' : 'off', id: this.componentId, ref: (el) => (this.contentEl = el), role: "tooltip", style: { maxWidth: this.maxWidth } }, hAsync("slot", { key: '83a805d9eef71ac261a03d56853ccc8ac7bfe818', name: "content" }), this.content))));
|
|
11462
|
+
const hostId = this.componentId || undefined;
|
|
11463
|
+
return (hAsync(Host, { key: '462d8c0b1b70de08c0a4f9fe0b3977fa3b4af461', id: hostId, class: { 'pds-tooltip--is-open': this.opened } }, hAsync("span", { key: 'dfb735da6e04d95701bc223bc054414d781c0f4a', class: "pds-tooltip__trigger", onMouseEnter: this.handleShow, onMouseLeave: this.handleHide, onFocus: this.handleShow, onBlur: this.handleHide, ref: el => this.triggerEl = el }, hAsync("slot", { key: 'f0e5970a1ba6d59045306b836468cd00a06b183f' })), hAsync("div", { key: '212ec606b29bd7a64a2ea3b1b4fae9746361a712', class: "pds-tooltip__content-slot-wrapper", style: { display: 'none' } }, hAsync("slot", { key: '035ea5b2dfec0ca7f1462c30053f8f455cb986f2', name: "content" }))));
|
|
8726
11464
|
}
|
|
8727
11465
|
get el() { return getElement(this); }
|
|
8728
11466
|
static get watchers() { return {
|
|
@@ -8730,7 +11468,7 @@ class PdsTooltip {
|
|
|
8730
11468
|
}; }
|
|
8731
11469
|
static get style() { return pdsTooltipCss; }
|
|
8732
11470
|
static get cmpMeta() { return {
|
|
8733
|
-
"$flags$":
|
|
11471
|
+
"$flags$": 4,
|
|
8734
11472
|
"$tagName$": "pds-tooltip",
|
|
8735
11473
|
"$members$": {
|
|
8736
11474
|
"content": [1],
|
|
@@ -8740,6 +11478,7 @@ class PdsTooltip {
|
|
|
8740
11478
|
"placement": [513],
|
|
8741
11479
|
"maxWidth": [1, "max-width"],
|
|
8742
11480
|
"opened": [1540],
|
|
11481
|
+
"_isInteractiveOpen": [32],
|
|
8743
11482
|
"isOpen": [32],
|
|
8744
11483
|
"showTooltip": [64],
|
|
8745
11484
|
"hideTooltip": [64]
|
|
@@ -8749,9 +11488,12 @@ class PdsTooltip {
|
|
|
8749
11488
|
"$attrsToReflect$": [["placement", "placement"], ["opened", "opened"]]
|
|
8750
11489
|
}; }
|
|
8751
11490
|
}
|
|
11491
|
+
PdsTooltip.instanceCounter = 0;
|
|
8752
11492
|
|
|
8753
11493
|
registerComponents([
|
|
11494
|
+
MockPdsModal,
|
|
8754
11495
|
PdsAccordion,
|
|
11496
|
+
PdsAlert,
|
|
8755
11497
|
PdsAvatar,
|
|
8756
11498
|
PdsBox,
|
|
8757
11499
|
PdsButton,
|
|
@@ -8759,11 +11501,18 @@ registerComponents([
|
|
|
8759
11501
|
PdsChip,
|
|
8760
11502
|
PdsCopytext,
|
|
8761
11503
|
PdsDivider,
|
|
11504
|
+
PdsDropdownMenu,
|
|
11505
|
+
PdsDropdownMenuItem,
|
|
11506
|
+
PdsDropdownMenuSeparator,
|
|
8762
11507
|
PdsIcon,
|
|
8763
11508
|
PdsImage,
|
|
8764
11509
|
PdsInput,
|
|
8765
11510
|
PdsLink,
|
|
8766
11511
|
PdsLoader,
|
|
11512
|
+
PdsModal,
|
|
11513
|
+
PdsModalContent,
|
|
11514
|
+
PdsModalFooter,
|
|
11515
|
+
PdsModalHeader,
|
|
8767
11516
|
PdsPopover,
|
|
8768
11517
|
PdsProgress,
|
|
8769
11518
|
PdsRadio,
|
|
@@ -8783,6 +11532,7 @@ registerComponents([
|
|
|
8783
11532
|
PdsTabs,
|
|
8784
11533
|
PdsText,
|
|
8785
11534
|
PdsTextarea,
|
|
11535
|
+
PdsToast,
|
|
8786
11536
|
PdsTooltip,
|
|
8787
11537
|
]);
|
|
8788
11538
|
|