@pine-ds/core 4.8.0 → 4.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/attributes.js +1 -1
- package/components/floating-ui.dom.js +1 -1
- package/components/index.js +1 -1
- package/components/index2.js +1 -1
- package/components/keep-hydrated.js +1 -0
- package/components/mock-pds-modal.js +1 -1
- package/components/pds-alert.js +1 -1
- package/components/pds-avatar.js +1 -1
- package/components/pds-box2.js +1 -1
- package/components/pds-button2.js +1 -1
- package/components/pds-checkbox2.js +1 -1
- package/components/pds-chip2.js +1 -1
- package/components/pds-combobox.js +1 -1
- package/components/pds-container.js +1 -1
- package/components/pds-copytext.js +1 -1
- package/components/pds-datepicker.js +1 -1
- package/components/pds-divider.js +1 -1
- package/components/pds-drawer-content.js +1 -1
- package/components/pds-drawer-footer.js +1 -1
- package/components/pds-drawer-header.js +1 -1
- package/components/pds-drawer.js +1 -1
- package/components/pds-dropdown-menu-item.js +1 -1
- package/components/pds-dropdown-menu-separator.js +1 -1
- package/components/pds-dropdown-menu.js +1 -1
- package/components/pds-filter.js +1 -1
- package/components/pds-filters.js +1 -1
- package/components/pds-icon2.js +1 -1
- package/components/pds-image.js +1 -1
- package/components/pds-input2.js +1 -1
- package/components/pds-link2.js +1 -1
- package/components/pds-loader2.js +1 -1
- package/components/pds-modal-content.js +1 -1
- package/components/pds-modal-footer.js +1 -1
- package/components/pds-modal-header.js +1 -1
- package/components/pds-modal2.js +1 -1
- package/components/pds-multiselect.js +1 -1
- package/components/pds-popover.js +1 -1
- package/components/pds-progress.js +1 -1
- package/components/pds-property.js +1 -1
- package/components/pds-radio-group.js +1 -1
- package/components/pds-radio.js +1 -1
- package/components/pds-row.js +1 -1
- package/components/pds-select.js +1 -1
- package/components/pds-sortable-item.js +1 -1
- package/components/pds-sortable.js +2 -2
- package/components/pds-switch.js +1 -1
- package/components/pds-table-body.js +1 -1
- package/components/pds-table-cell2.js +1 -1
- package/components/pds-table-head-cell2.js +1 -1
- package/components/pds-table-head.js +1 -1
- package/components/pds-table-row.js +1 -1
- package/components/pds-tabpanel.js +1 -1
- package/components/pds-tabs.js +1 -1
- package/components/pds-text2.js +1 -1
- package/components/pds-textarea.js +1 -1
- package/components/pds-toast.js +1 -1
- package/components/pds-tooltip.js +1 -1
- package/components/portal-target.js +1 -0
- package/components/tabbable.js +1 -0
- package/components/truncation-tooltip.js +1 -1
- package/dist/cjs/{attributes-BJ7KBHql.js → attributes-CW49XqaL.js} +1 -1
- package/dist/cjs/{floating-ui.dom-Dc8Anyel.js → floating-ui.dom-Dw41zbyY.js} +1 -0
- package/dist/cjs/{index-Do70atou.js → index-BDnbr0DK.js} +1 -1
- package/dist/cjs/{index-jl_Q819j.js → index-D9iJuJCP.js} +13 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{keep-hydrated-CiXgkEYd.js → keep-hydrated-AKoh0DG4.js} +1 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/mock-pds-modal.cjs.entry.js +4 -4
- package/dist/cjs/pds-accordion.cjs.entry.js +3 -3
- package/dist/cjs/pds-alert.cjs.entry.js +17 -4
- package/dist/cjs/pds-avatar.cjs.entry.js +22 -12
- package/dist/cjs/pds-box.cjs.entry.js +4 -4
- package/dist/cjs/pds-button.cjs.entry.js +58 -26
- package/dist/cjs/pds-checkbox.cjs.entry.js +16 -8
- package/dist/cjs/pds-chip.cjs.entry.js +9 -11
- package/dist/cjs/pds-combobox.cjs.entry.js +41 -11
- package/dist/cjs/pds-container.cjs.entry.js +3 -3
- package/dist/cjs/pds-copytext.cjs.entry.js +8 -7
- package/dist/cjs/pds-datepicker.cjs.entry.js +8 -45
- package/dist/cjs/pds-divider.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer-content.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer-footer.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer-header.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer.cjs.entry.js +4 -4
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +4 -4
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +3 -3
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +5 -5
- package/dist/cjs/pds-filter.cjs.entry.js +4 -4
- package/dist/cjs/pds-filters.cjs.entry.js +3 -3
- package/dist/cjs/pds-icon.cjs.entry.js +55 -22
- package/dist/cjs/pds-image.cjs.entry.js +4 -4
- package/dist/cjs/pds-input.cjs.entry.js +6 -6
- package/dist/cjs/pds-link.cjs.entry.js +16 -7
- package/dist/cjs/pds-loader.cjs.entry.js +4 -4
- package/dist/cjs/pds-modal-content.cjs.entry.js +4 -4
- package/dist/cjs/pds-modal-footer.cjs.entry.js +3 -3
- package/dist/cjs/pds-modal-header.cjs.entry.js +3 -3
- package/dist/cjs/pds-modal.cjs.entry.js +9 -89
- package/dist/cjs/pds-multiselect.cjs.entry.js +13 -7
- package/dist/cjs/pds-popover.cjs.entry.js +230 -153
- package/dist/cjs/pds-progress.cjs.entry.js +4 -4
- package/dist/cjs/pds-property.cjs.entry.js +3 -3
- package/dist/cjs/pds-radio-group.cjs.entry.js +67 -6
- package/dist/cjs/pds-radio.cjs.entry.js +24 -11
- package/dist/cjs/pds-row.cjs.entry.js +4 -4
- package/dist/cjs/pds-select.cjs.entry.js +132 -21
- package/dist/cjs/pds-sortable-item.cjs.entry.js +5 -5
- package/dist/cjs/pds-sortable.cjs.entry.js +4 -4
- package/dist/cjs/pds-switch.cjs.entry.js +7 -7
- package/dist/cjs/pds-tab.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-body.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-cell.cjs.entry.js +7 -6
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +5 -5
- package/dist/cjs/pds-table-head.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-row.cjs.entry.js +3 -3
- package/dist/cjs/pds-table.cjs.entry.js +2 -2
- package/dist/cjs/pds-tabpanel.cjs.entry.js +4 -4
- package/dist/cjs/pds-tabs.cjs.entry.js +4 -4
- package/dist/cjs/pds-text.cjs.entry.js +31 -5
- package/dist/cjs/pds-textarea.cjs.entry.js +8 -8
- package/dist/cjs/pds-toast.cjs.entry.js +14 -8
- package/dist/cjs/pds-tooltip.cjs.entry.js +128 -46
- package/dist/cjs/pine-core.cjs.js +3 -3
- package/dist/cjs/portal-target-e8WQ6dLx.js +70 -0
- package/dist/cjs/tabbable-BrrrGvdG.js +86 -0
- package/dist/cjs/{truncation-tooltip-BtuiXLV0.js → truncation-tooltip-DdB78RIe.js} +44 -4
- package/dist/collection/components/pds-alert/pds-alert.css +13 -0
- package/dist/collection/components/pds-alert/pds-alert.js +36 -1
- package/dist/collection/components/pds-alert/stories/pds-alert.stories.js +4 -0
- package/dist/collection/components/pds-avatar/pds-avatar.js +41 -9
- package/dist/collection/components/pds-avatar/stories/pds-avatar.stories.js +2 -0
- package/dist/collection/components/pds-box/pds-box.js +1 -1
- package/dist/collection/components/pds-button/pds-button.js +13 -23
- package/dist/collection/components/pds-checkbox/pds-checkbox.css +79 -0
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +36 -5
- package/dist/collection/components/pds-checkbox/stories/pds-checkbox.stories.js +38 -0
- package/dist/collection/components/pds-chip/pds-chip.js +2 -5
- package/dist/collection/components/pds-combobox/pds-combobox.css +33 -0
- package/dist/collection/components/pds-combobox/pds-combobox.js +60 -7
- package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +44 -0
- package/dist/collection/components/pds-container/pds-container.js +1 -1
- package/dist/collection/components/pds-copytext/pds-copytext.js +1 -1
- package/dist/collection/components/pds-datepicker/calendar-portal.js +1 -38
- package/dist/collection/components/pds-datepicker/pds-datepicker.js +2 -2
- package/dist/collection/components/pds-divider/pds-divider.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer.js +2 -2
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +24 -2
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +1 -1
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +1 -1
- package/dist/collection/components/pds-filters/pds-filters.js +1 -1
- package/dist/collection/components/pds-image/pds-image.js +2 -2
- package/dist/collection/components/pds-input/pds-input.js +2 -2
- package/dist/collection/components/pds-input/stories/pds-input.stories.js +6 -6
- package/dist/collection/components/pds-link/pds-link.css +1 -1
- package/dist/collection/components/pds-link/pds-link.js +34 -3
- package/dist/collection/components/pds-link/stories/pds-link.stories.js +51 -2
- package/dist/collection/components/pds-loader/pds-loader.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +2 -2
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal.css +1 -1
- package/dist/collection/components/pds-modal/pds-modal.js +4 -84
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +9 -3
- package/dist/collection/components/pds-popover/pds-popover.css +6 -0
- package/dist/collection/components/pds-popover/pds-popover.js +226 -149
- package/dist/collection/components/pds-progress/pds-progress.js +1 -1
- package/dist/collection/components/pds-property/pds-property.js +1 -1
- package/dist/collection/components/pds-radio/pds-radio.css +57 -0
- package/dist/collection/components/pds-radio/pds-radio.js +45 -9
- package/dist/collection/components/pds-radio/stories/pds-radio.stories.js +15 -0
- package/dist/collection/components/pds-radio-group/pds-radio-group.js +65 -4
- package/dist/collection/components/pds-radio-group/stories/pds-radio-group.stories.js +45 -0
- package/dist/collection/components/pds-row/pds-row.js +1 -1
- package/dist/collection/components/pds-select/pds-select.js +128 -17
- package/dist/collection/components/pds-select/stories/pds-select.stories.js +2 -2
- 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/stories/pds-table.stories.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 +28 -3
- package/dist/collection/components/pds-text/stories/pds-text.stories.js +16 -0
- package/dist/collection/components/pds-textarea/pds-textarea.js +4 -4
- package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +2 -2
- package/dist/collection/components/pds-toast/pds-toast.css +13 -0
- package/dist/collection/components/pds-toast/pds-toast.js +33 -5
- package/dist/collection/components/pds-toast/stories/pds-toast.stories.js +4 -1
- package/dist/collection/components/pds-tooltip/pds-tooltip.css +11 -0
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +125 -42
- package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +30 -0
- package/dist/collection/utils/aria-references.js +42 -0
- package/dist/collection/utils/portal-target.js +64 -0
- package/dist/collection/utils/tabbable.js +82 -0
- package/dist/collection/utils/truncation-tooltip.js +42 -3
- package/dist/docs.json +245 -8
- package/dist/esm/{attributes-WXw_I_uJ.js → attributes-DkeVeN0g.js} +1 -1
- package/dist/esm/{floating-ui.dom-BPqJgIq6.js → floating-ui.dom-Cuc0DYlm.js} +1 -1
- package/dist/esm/{index-Cw9J31qd.js → index-4_RRPJTO.js} +13 -2
- package/dist/esm/{index-BWDu62Mo.js → index-DvN3tyZp.js} +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/{keep-hydrated-BLG6RDBt.js → keep-hydrated-BgNaWLoS.js} +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/esm/mock-pds-modal.entry.js +4 -4
- package/dist/esm/pds-accordion.entry.js +3 -3
- package/dist/esm/pds-alert.entry.js +17 -4
- package/dist/esm/pds-avatar.entry.js +22 -12
- package/dist/esm/pds-box.entry.js +4 -4
- package/dist/esm/pds-button.entry.js +58 -26
- package/dist/esm/pds-checkbox.entry.js +16 -8
- package/dist/esm/pds-chip.entry.js +8 -10
- package/dist/esm/pds-combobox.entry.js +41 -11
- package/dist/esm/pds-container.entry.js +3 -3
- package/dist/esm/pds-copytext.entry.js +8 -7
- package/dist/esm/pds-datepicker.entry.js +7 -44
- package/dist/esm/pds-divider.entry.js +3 -3
- package/dist/esm/pds-drawer-content.entry.js +3 -3
- package/dist/esm/pds-drawer-footer.entry.js +3 -3
- package/dist/esm/pds-drawer-header.entry.js +3 -3
- package/dist/esm/pds-drawer.entry.js +4 -4
- package/dist/esm/pds-dropdown-menu-item.entry.js +4 -4
- package/dist/esm/pds-dropdown-menu-separator.entry.js +3 -3
- package/dist/esm/pds-dropdown-menu.entry.js +5 -5
- package/dist/esm/pds-filter.entry.js +4 -4
- package/dist/esm/pds-filters.entry.js +3 -3
- package/dist/esm/pds-icon.entry.js +55 -22
- package/dist/esm/pds-image.entry.js +4 -4
- package/dist/esm/pds-input.entry.js +6 -6
- package/dist/esm/pds-link.entry.js +16 -7
- package/dist/esm/pds-loader.entry.js +4 -4
- package/dist/esm/pds-modal-content.entry.js +4 -4
- package/dist/esm/pds-modal-footer.entry.js +3 -3
- package/dist/esm/pds-modal-header.entry.js +3 -3
- package/dist/esm/pds-modal.entry.js +7 -87
- package/dist/esm/pds-multiselect.entry.js +13 -7
- package/dist/esm/pds-popover.entry.js +230 -153
- package/dist/esm/pds-progress.entry.js +4 -4
- package/dist/esm/pds-property.entry.js +3 -3
- package/dist/esm/pds-radio-group.entry.js +67 -6
- package/dist/esm/pds-radio.entry.js +24 -11
- package/dist/esm/pds-row.entry.js +4 -4
- package/dist/esm/pds-select.entry.js +132 -21
- package/dist/esm/pds-sortable-item.entry.js +5 -5
- package/dist/esm/pds-sortable.entry.js +4 -4
- package/dist/esm/pds-switch.entry.js +7 -7
- package/dist/esm/pds-tab.entry.js +3 -3
- package/dist/esm/pds-table-body.entry.js +3 -3
- package/dist/esm/pds-table-cell.entry.js +7 -6
- package/dist/esm/pds-table-head-cell.entry.js +5 -5
- package/dist/esm/pds-table-head.entry.js +3 -3
- package/dist/esm/pds-table-row.entry.js +3 -3
- package/dist/esm/pds-table.entry.js +2 -2
- package/dist/esm/pds-tabpanel.entry.js +4 -4
- package/dist/esm/pds-tabs.entry.js +4 -4
- package/dist/esm/pds-text.entry.js +31 -5
- package/dist/esm/pds-textarea.entry.js +8 -8
- package/dist/esm/pds-toast.entry.js +14 -8
- package/dist/esm/pds-tooltip.entry.js +128 -46
- package/dist/esm/pine-core.js +4 -4
- package/dist/esm/portal-target-CKRzRKdO.js +66 -0
- package/dist/esm/tabbable-C6ZWpp3v.js +84 -0
- package/dist/esm/{truncation-tooltip-FaW67DiY.js → truncation-tooltip-CRSdYzpA.js} +44 -5
- package/dist/esm-es5/{attributes-WXw_I_uJ.js → attributes-DkeVeN0g.js} +1 -1
- package/dist/esm-es5/{floating-ui.dom-BPqJgIq6.js → floating-ui.dom-Cuc0DYlm.js} +1 -1
- package/dist/esm-es5/{index-Cw9J31qd.js → index-4_RRPJTO.js} +2 -2
- package/dist/esm-es5/{index-BWDu62Mo.js → index-DvN3tyZp.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{keep-hydrated-BLG6RDBt.js → keep-hydrated-BgNaWLoS.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-accordion.entry.js +1 -1
- package/dist/esm-es5/pds-alert.entry.js +1 -1
- package/dist/esm-es5/pds-avatar.entry.js +1 -1
- package/dist/esm-es5/pds-box.entry.js +1 -1
- package/dist/esm-es5/pds-button.entry.js +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-combobox.entry.js +2 -2
- package/dist/esm-es5/pds-container.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-datepicker.entry.js +1 -1
- package/dist/esm-es5/pds-divider.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-content.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-footer.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-header.entry.js +1 -1
- package/dist/esm-es5/pds-drawer.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm-es5/pds-filter.entry.js +1 -1
- package/dist/esm-es5/pds-filters.entry.js +1 -1
- package/dist/esm-es5/pds-icon.entry.js +1 -1
- package/dist/esm-es5/pds-image.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-link.entry.js +1 -1
- package/dist/esm-es5/pds-loader.entry.js +1 -1
- package/dist/esm-es5/pds-modal-content.entry.js +1 -1
- package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
- package/dist/esm-es5/pds-modal-header.entry.js +1 -1
- package/dist/esm-es5/pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-multiselect.entry.js +1 -1
- package/dist/esm-es5/pds-popover.entry.js +1 -1
- package/dist/esm-es5/pds-progress.entry.js +1 -1
- package/dist/esm-es5/pds-property.entry.js +1 -1
- package/dist/esm-es5/pds-radio-group.entry.js +1 -1
- package/dist/esm-es5/pds-radio.entry.js +1 -1
- package/dist/esm-es5/pds-row.entry.js +1 -1
- package/dist/esm-es5/pds-select.entry.js +1 -1
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
- package/dist/esm-es5/pds-sortable.entry.js +2 -2
- package/dist/esm-es5/pds-switch.entry.js +1 -1
- package/dist/esm-es5/pds-tab.entry.js +1 -1
- package/dist/esm-es5/pds-table-body.entry.js +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head.entry.js +1 -1
- package/dist/esm-es5/pds-table-row.entry.js +1 -1
- package/dist/esm-es5/pds-table.entry.js +1 -1
- package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
- package/dist/esm-es5/pds-tabs.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-toast.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/portal-target-CKRzRKdO.js +1 -0
- package/dist/esm-es5/tabbable-C6ZWpp3v.js +1 -0
- package/dist/esm-es5/truncation-tooltip-CRSdYzpA.js +1 -0
- package/dist/pine-core/index.esm.js +1 -1
- package/dist/pine-core/{p-9880d251.system.entry.js → p-01f1cdaf.system.entry.js} +1 -1
- package/dist/pine-core/{p-138b278b.entry.js → p-07323107.entry.js} +1 -1
- package/dist/pine-core/p-08b8e941.entry.js +1 -0
- package/dist/pine-core/p-0d5f0ab5.system.entry.js +1 -0
- package/dist/pine-core/{p-8c8cc079.system.entry.js → p-1415c988.system.entry.js} +1 -1
- package/dist/pine-core/{p-9109b90a.entry.js → p-143b33a6.entry.js} +1 -1
- package/dist/pine-core/{p-b9d145f8.system.entry.js → p-14dedf01.system.entry.js} +1 -1
- package/dist/pine-core/{p-80e6f3a0.system.entry.js → p-19cf1d91.system.entry.js} +1 -1
- package/dist/pine-core/p-1ca8d183.entry.js +1 -0
- package/dist/pine-core/p-1cc39908.system.entry.js +1 -0
- package/dist/pine-core/p-1e3ef425.entry.js +1 -0
- package/dist/pine-core/{p-b914dde8.entry.js → p-1f62bb71.entry.js} +2 -2
- package/dist/pine-core/p-20079552.system.entry.js +1 -0
- package/dist/pine-core/p-2a18852f.entry.js +1 -0
- package/dist/pine-core/{p-ca4ee736.system.entry.js → p-2b9622c1.system.entry.js} +1 -1
- package/dist/pine-core/p-2dd30d12.entry.js +1 -0
- package/dist/pine-core/{p-cccfe60f.system.entry.js → p-3306dc5a.system.entry.js} +1 -1
- package/dist/pine-core/{p-BGLP3keB.js → p-35s7h-dk.js} +1 -1
- package/dist/pine-core/{p-8c588ca0.entry.js → p-3610cb3b.entry.js} +1 -1
- package/dist/pine-core/p-37718637.entry.js +1 -0
- package/dist/pine-core/p-383d84f4.entry.js +2 -0
- package/dist/pine-core/p-39276663.entry.js +1 -0
- package/dist/pine-core/{p-62433f32.entry.js → p-39e57657.entry.js} +1 -1
- package/dist/pine-core/p-3c229091.entry.js +1 -0
- package/dist/pine-core/p-3d34b967.system.entry.js +1 -0
- package/dist/pine-core/p-3e30a761.entry.js +1 -0
- package/dist/pine-core/{p-7a5b21d2.system.entry.js → p-3f8bd3fb.system.entry.js} +1 -1
- package/dist/pine-core/p-42d43c3f.system.entry.js +1 -0
- package/dist/pine-core/{p-f029b7da.system.entry.js → p-42f70f93.system.entry.js} +1 -1
- package/dist/pine-core/{p-d3d69ca4.system.entry.js → p-4a90b9c8.system.entry.js} +1 -1
- package/dist/pine-core/{p-ca0a8f5c.entry.js → p-4cfe922b.entry.js} +1 -1
- package/dist/pine-core/p-4d1a8803.entry.js +1 -0
- package/dist/pine-core/p-4d47023c.system.entry.js +1 -0
- package/dist/pine-core/p-4d98bc0c.system.entry.js +1 -0
- package/dist/pine-core/{p-c97bfac9.entry.js → p-50ddadbf.entry.js} +1 -1
- package/dist/pine-core/{p-0913f696.system.entry.js → p-548bce53.system.entry.js} +1 -1
- package/dist/pine-core/p-54f1e86f.system.entry.js +1 -0
- package/dist/pine-core/{p-631f5bcc.entry.js → p-590df41a.entry.js} +1 -1
- package/dist/pine-core/p-5946203c.entry.js +1 -0
- package/dist/pine-core/{p-11d98408.system.entry.js → p-5f181694.system.entry.js} +1 -1
- package/dist/pine-core/p-60a30975.system.entry.js +1 -0
- package/dist/pine-core/{p-9ab95438.entry.js → p-61cfdbb2.entry.js} +1 -1
- package/dist/pine-core/p-62aa6a78.system.entry.js +1 -0
- package/dist/pine-core/{p-ecc7a531.system.entry.js → p-63f85859.system.entry.js} +1 -1
- package/dist/pine-core/p-64bcb378.entry.js +1 -0
- package/dist/pine-core/{p-bdac8f2b.entry.js → p-67999353.entry.js} +1 -1
- package/dist/pine-core/{p-cb6a3e4c.system.entry.js → p-67f795d5.system.entry.js} +1 -1
- package/dist/pine-core/p-6a1aa8d3.entry.js +1 -0
- package/dist/pine-core/p-6f4ab1ea.system.entry.js +1 -0
- package/dist/pine-core/{p-acca5f7b.system.entry.js → p-724baba3.system.entry.js} +1 -1
- package/dist/pine-core/p-72659a0e.system.entry.js +1 -0
- package/dist/pine-core/{p-4bfc8b3e.system.entry.js → p-73efb1ed.system.entry.js} +1 -1
- package/dist/pine-core/p-7a51f15e.entry.js +1 -0
- package/dist/pine-core/p-7b978fff.system.entry.js +1 -0
- package/dist/pine-core/p-8436cbfb.entry.js +1 -0
- package/dist/pine-core/p-849ec281.system.entry.js +1 -0
- package/dist/pine-core/p-87a32ded.system.entry.js +1 -0
- package/dist/pine-core/p-89d38a82.system.entry.js +1 -0
- package/dist/pine-core/p-8ade17ce.entry.js +1 -0
- package/dist/pine-core/{p-4d03d1e2.system.entry.js → p-8afd5f5b.system.entry.js} +1 -1
- package/dist/pine-core/p-8e7f75e6.entry.js +1 -0
- package/dist/pine-core/{p-8f531063.entry.js → p-8fb520df.entry.js} +1 -1
- package/dist/pine-core/{p-9df5e204.entry.js → p-92115e88.entry.js} +1 -1
- package/dist/pine-core/p-93fd7dd8.system.entry.js +1 -0
- package/dist/pine-core/p-947582e1.entry.js +1 -0
- package/dist/pine-core/{p-2ac2457b.system.entry.js → p-94c9b7d1.system.entry.js} +1 -1
- package/dist/pine-core/p-973c3ac0.entry.js +1 -0
- package/dist/pine-core/p-97653e60.entry.js +1 -0
- package/dist/pine-core/{p-55224683.entry.js → p-97b73359.entry.js} +1 -1
- package/dist/pine-core/{p-b1548a20.entry.js → p-99530cb5.entry.js} +1 -1
- package/dist/pine-core/p-9a776443.entry.js +1 -0
- package/dist/pine-core/p-9b32727a.system.entry.js +1 -0
- package/dist/pine-core/{p-CGRdQc49.system.js → p-BK1sLRfg.system.js} +2 -2
- package/dist/pine-core/{p-COtCa1Md.system.js → p-BNTlHhoO.system.js} +1 -1
- package/dist/pine-core/p-BZ1l3LGl.system.js +1 -0
- package/dist/pine-core/p-BgNaWLoS.js +1 -0
- package/dist/pine-core/p-C6ZWpp3v.js +1 -0
- package/dist/pine-core/{p-Cy8cvR7I.system.js → p-CANeE7Ss.system.js} +1 -1
- package/dist/pine-core/p-CKRzRKdO.js +1 -0
- package/dist/pine-core/{p-XW4H0W6i.system.js → p-CNXspDYs.system.js} +1 -1
- package/dist/pine-core/{p-BPqJgIq6.js → p-Cuc0DYlm.js} +1 -1
- package/dist/pine-core/p-DQyF6v9Q.system.js +1 -0
- package/dist/pine-core/{p-BWDu62Mo.js → p-DvN3tyZp.js} +1 -1
- package/dist/pine-core/p-DwQ5Tjis.js +1 -0
- package/dist/pine-core/{p-CmSJytt1.js → p-M31tvpDN.js} +2 -2
- package/dist/pine-core/p-XK45dzWR.system.js +1 -0
- package/dist/pine-core/{p-1dc5a7e0.system.entry.js → p-a09c9c5e.system.entry.js} +1 -1
- package/dist/pine-core/p-a4ce12ef.entry.js +1 -0
- package/dist/pine-core/{p-57a2f927.entry.js → p-a594c41f.entry.js} +1 -1
- package/dist/pine-core/p-a9d96e22.entry.js +1 -0
- package/dist/pine-core/{p-047433a4.system.entry.js → p-ad5208a4.system.entry.js} +1 -1
- package/dist/pine-core/p-b3d4f97a.system.entry.js +3 -0
- package/dist/pine-core/{p-0b71ecb6.system.entry.js → p-bcc378ba.system.entry.js} +2 -2
- package/dist/pine-core/p-bd7dc317.system.entry.js +1 -0
- package/dist/pine-core/p-beb7a430.entry.js +1 -0
- package/dist/pine-core/p-bfa34194.entry.js +1 -0
- package/dist/pine-core/{p-5870b092.system.entry.js → p-c2afe4f3.system.entry.js} +1 -1
- package/dist/pine-core/p-c5e1eb3c.system.entry.js +1 -0
- package/dist/pine-core/p-c7a53c4f.entry.js +1 -0
- package/dist/pine-core/{p-5cfd4d41.system.entry.js → p-c8a0b562.system.entry.js} +1 -1
- package/dist/pine-core/{p-f1702281.entry.js → p-c9ae7964.entry.js} +1 -1
- package/dist/pine-core/{p-db17c626.system.entry.js → p-cb9baf78.system.entry.js} +1 -1
- package/dist/pine-core/{p-e5420660.entry.js → p-ce9fa14b.entry.js} +1 -1
- package/dist/pine-core/{p-332590c7.system.entry.js → p-d018dc60.system.entry.js} +1 -1
- package/dist/pine-core/p-d47b2a6a.system.entry.js +1 -0
- package/dist/pine-core/{p-b75b0d09.system.entry.js → p-d48fe5a0.system.entry.js} +1 -1
- package/dist/pine-core/p-d6f338e0.entry.js +1 -0
- package/dist/pine-core/{p-8191498f.system.entry.js → p-d920d759.system.entry.js} +1 -1
- package/dist/pine-core/{p-26642718.entry.js → p-d9719e37.entry.js} +1 -1
- package/dist/pine-core/{p-c483997a.entry.js → p-db7fb5a3.entry.js} +1 -1
- package/dist/pine-core/{p-9713fb36.entry.js → p-e1d1b5d8.entry.js} +1 -1
- package/dist/pine-core/p-e3de6a1d.entry.js +1 -0
- package/dist/pine-core/{p-d2c91e7a.entry.js → p-e7002cee.entry.js} +1 -1
- package/dist/pine-core/{p-86040cac.system.entry.js → p-e82f758f.system.entry.js} +1 -1
- package/dist/pine-core/p-e84fa9ed.entry.js +1 -0
- package/dist/pine-core/{p-ee0e30bf.system.entry.js → p-eb4f0daa.system.entry.js} +1 -1
- package/dist/pine-core/p-eeYeEogd.system.js +1 -0
- package/dist/pine-core/{p-0af0d752.system.entry.js → p-eecd9ad8.system.entry.js} +1 -1
- package/dist/pine-core/p-ef0eba9b.system.entry.js +1 -0
- package/dist/pine-core/p-ef3a855f.system.entry.js +1 -0
- package/dist/pine-core/{p-717323e4.entry.js → p-f018af99.entry.js} +1 -1
- package/dist/pine-core/{p-121612a7.system.entry.js → p-f11cce27.system.entry.js} +1 -1
- package/dist/pine-core/{p-4fd454f6.entry.js → p-f6f4fd42.entry.js} +1 -1
- package/dist/pine-core/{p-a939b471.entry.js → p-f71d71ca.entry.js} +1 -1
- package/dist/pine-core/p-f9063262.system.entry.js +1 -0
- package/dist/pine-core/p-f99bd77f.entry.js +1 -0
- package/dist/pine-core/{p-ClDiSG97.system.js → p-vFsJv75D.system.js} +1 -1
- package/dist/pine-core/p-wB2y8gR7.system.js +1 -0
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/pine-core/pine-core.js +1 -1
- package/dist/types/components/pds-alert/pds-alert.d.ts +10 -0
- package/dist/types/components/pds-avatar/pds-avatar.d.ts +8 -0
- package/dist/types/components/pds-button/pds-button.d.ts +2 -2
- package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +7 -1
- package/dist/types/components/pds-combobox/pds-combobox.d.ts +9 -0
- package/dist/types/components/pds-datepicker/calendar-portal.d.ts +0 -7
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +7 -0
- package/dist/types/components/pds-link/pds-link.d.ts +8 -0
- package/dist/types/components/pds-popover/pds-popover.d.ts +44 -20
- package/dist/types/components/pds-radio/pds-radio.d.ts +9 -3
- package/dist/types/components/pds-radio-group/pds-radio-group.d.ts +8 -0
- package/dist/types/components/pds-select/pds-select.d.ts +32 -4
- package/dist/types/components/pds-text/pds-text.d.ts +4 -0
- package/dist/types/components/pds-toast/pds-toast.d.ts +9 -0
- package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +32 -0
- package/dist/types/components.d.ts +98 -10
- package/dist/types/utils/aria-references.d.ts +24 -0
- package/dist/types/utils/portal-target.d.ts +17 -0
- package/dist/types/utils/tabbable.d.ts +2 -0
- package/dist/types/utils/truncation-tooltip.d.ts +5 -2
- package/dist/vscode.html-data.json +82 -10
- package/hydrate/index.js +971 -408
- package/hydrate/index.mjs +971 -408
- package/package.json +2 -2
- package/dist/esm-es5/truncation-tooltip-FaW67DiY.js +0 -1
- package/dist/pine-core/p-0092444c.system.entry.js +0 -1
- package/dist/pine-core/p-00a50de5.system.entry.js +0 -3
- package/dist/pine-core/p-049f126a.entry.js +0 -1
- package/dist/pine-core/p-089c3e60.entry.js +0 -1
- package/dist/pine-core/p-158b2f51.entry.js +0 -1
- package/dist/pine-core/p-17f97f1a.entry.js +0 -1
- package/dist/pine-core/p-19ba2788.system.entry.js +0 -1
- package/dist/pine-core/p-208c7dbf.entry.js +0 -1
- package/dist/pine-core/p-25ea48d1.entry.js +0 -1
- package/dist/pine-core/p-295f64ea.entry.js +0 -1
- package/dist/pine-core/p-29cd4113.system.entry.js +0 -1
- package/dist/pine-core/p-2cb5483a.system.entry.js +0 -1
- package/dist/pine-core/p-36cb4bf6.entry.js +0 -1
- package/dist/pine-core/p-3c977d8d.system.entry.js +0 -1
- package/dist/pine-core/p-3d51891a.entry.js +0 -1
- package/dist/pine-core/p-432d5ec7.entry.js +0 -1
- package/dist/pine-core/p-44f546ae.entry.js +0 -1
- package/dist/pine-core/p-5442d983.system.entry.js +0 -1
- package/dist/pine-core/p-5833a072.system.entry.js +0 -1
- package/dist/pine-core/p-602c197f.entry.js +0 -1
- package/dist/pine-core/p-719542e1.system.entry.js +0 -1
- package/dist/pine-core/p-73f931a1.entry.js +0 -1
- package/dist/pine-core/p-75ee0403.entry.js +0 -1
- package/dist/pine-core/p-77395d62.system.entry.js +0 -1
- package/dist/pine-core/p-7a287635.system.entry.js +0 -1
- package/dist/pine-core/p-875b0436.system.entry.js +0 -1
- package/dist/pine-core/p-884cb31d.system.entry.js +0 -1
- package/dist/pine-core/p-8987fd45.system.entry.js +0 -1
- package/dist/pine-core/p-8cc302aa.system.entry.js +0 -1
- package/dist/pine-core/p-8e3ff75d.entry.js +0 -1
- package/dist/pine-core/p-90d5edc6.entry.js +0 -1
- package/dist/pine-core/p-91f60173.entry.js +0 -1
- package/dist/pine-core/p-9265497e.system.entry.js +0 -1
- package/dist/pine-core/p-94593f20.system.entry.js +0 -1
- package/dist/pine-core/p-99459e27.entry.js +0 -1
- package/dist/pine-core/p-99fdf70f.entry.js +0 -1
- package/dist/pine-core/p-9aaedded.entry.js +0 -1
- package/dist/pine-core/p-9dcd2cdb.entry.js +0 -1
- package/dist/pine-core/p-BLG6RDBt.js +0 -1
- package/dist/pine-core/p-BR5nujVX.system.js +0 -1
- package/dist/pine-core/p-CuSNnuFu.system.js +0 -1
- package/dist/pine-core/p-D04W0cAO.system.js +0 -1
- package/dist/pine-core/p-a0960b3d.system.entry.js +0 -1
- package/dist/pine-core/p-a1230a74.system.entry.js +0 -1
- package/dist/pine-core/p-a826f290.entry.js +0 -1
- package/dist/pine-core/p-acce8eb2.entry.js +0 -1
- package/dist/pine-core/p-aff411d0.entry.js +0 -1
- package/dist/pine-core/p-b182f806.entry.js +0 -2
- package/dist/pine-core/p-bb68431a.entry.js +0 -1
- package/dist/pine-core/p-be9b6e63.system.entry.js +0 -1
- package/dist/pine-core/p-bf30dec0.entry.js +0 -1
- package/dist/pine-core/p-c4e12f0a.entry.js +0 -1
- package/dist/pine-core/p-e0917a26.entry.js +0 -1
- package/dist/pine-core/p-e836a041.entry.js +0 -1
- package/dist/pine-core/p-ea340c55.system.entry.js +0 -1
- package/dist/pine-core/p-ea4d4741.system.entry.js +0 -1
- package/dist/pine-core/p-ea8f5d29.entry.js +0 -1
- package/dist/pine-core/p-eaf85be6.system.entry.js +0 -1
- package/dist/pine-core/p-ef13f665.system.entry.js +0 -1
- package/dist/pine-core/p-f3067d90.system.entry.js +0 -1
- package/dist/pine-core/p-jrkGLEPe.js +0 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-4_RRPJTO.js';
|
|
2
|
+
import { p as platform, a as autoUpdate, c as computePosition, o as offset, f as flip, s as shift } from './floating-ui.dom-Cuc0DYlm.js';
|
|
2
3
|
import { c as containsComposed, a as closest } from './closest-DHPzKMVS.js';
|
|
3
4
|
import { r as restoreReflectedDefault } from './reflected-attribute-default-t3idJwV0.js';
|
|
4
|
-
import { s as setAttributesIfChanged } from './attributes-
|
|
5
|
-
import { l as limitRestores } from './keep-hydrated-
|
|
5
|
+
import { s as setAttributesIfChanged } from './attributes-DkeVeN0g.js';
|
|
6
|
+
import { l as limitRestores } from './keep-hydrated-BgNaWLoS.js';
|
|
7
|
+
import { t as tabbableIn } from './tabbable-C6ZWpp3v.js';
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* Escapes a string so it's safe to interpolate into a CSS identifier (an id selector like `#${id}`)
|
|
@@ -46,7 +48,7 @@ const cssEscape = (value) => {
|
|
|
46
48
|
return result;
|
|
47
49
|
};
|
|
48
50
|
|
|
49
|
-
const pdsPopoverCss = () => `:host{--sizing-max-width-default:352px;display:inline-block}:host .pds-popover__trigger-wrapper{display:inline-block}:host .pds-popover__content-slot-wrapper{display:none}`;
|
|
51
|
+
const pdsPopoverCss = () => `:host{--sizing-max-width-default:352px;display:inline-block}:host .pds-popover__trigger-wrapper{display:inline-block}:host .pds-popover__tab-guard{opacity:0;outline:none;pointer-events:none;position:fixed}:host .pds-popover__content-slot-wrapper{display:none}`;
|
|
50
52
|
|
|
51
53
|
/** Open popovers that close on Escape, in the order they opened: Escape goes to the last one it applies to. */
|
|
52
54
|
const popoversTakingEscape = [];
|
|
@@ -54,6 +56,24 @@ const popoversTakingEscape = [];
|
|
|
54
56
|
const HOVER_OPEN_DELAY_MS = 120;
|
|
55
57
|
/** Leaving the trigger and panel waits this long before closing, which covers the gap between them. */
|
|
56
58
|
const HOVER_CLOSE_DELAY_MS = 200;
|
|
59
|
+
/**
|
|
60
|
+
* floating-ui reporting viewport coordinates, as `position: fixed` uses without a containing block. Its own
|
|
61
|
+
* containing-block check misses a backdrop filter in WebKit, so handlePopoverPositioning corrects for one itself.
|
|
62
|
+
*/
|
|
63
|
+
const viewportPlatform = Object.assign(Object.assign({}, platform), { getOffsetParent: () => window });
|
|
64
|
+
/**
|
|
65
|
+
* Where `top: 0; left: 0` puts a fixed element beside the given one. An empty probe is measured instead of the
|
|
66
|
+
* element, whose own transforms, such as an entrance animation, would otherwise read as part of the offset.
|
|
67
|
+
*/
|
|
68
|
+
const containingBlockOrigin = (element) => {
|
|
69
|
+
var _a;
|
|
70
|
+
const probe = document.createElement('div');
|
|
71
|
+
probe.style.cssText = 'all: initial; position: fixed; top: 0; left: 0;';
|
|
72
|
+
(_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(probe, element);
|
|
73
|
+
const { top, left } = probe.getBoundingClientRect();
|
|
74
|
+
probe.remove();
|
|
75
|
+
return { top, left };
|
|
76
|
+
};
|
|
57
77
|
/** The focused element, followed down through shadow roots to the control that has focus. */
|
|
58
78
|
function deepActiveElement() {
|
|
59
79
|
var _a;
|
|
@@ -62,6 +82,27 @@ function deepActiveElement() {
|
|
|
62
82
|
active = active.shadowRoot.activeElement;
|
|
63
83
|
return active;
|
|
64
84
|
}
|
|
85
|
+
/** `node`, or the shadow host it sits in, lifted until it shares a tree with `other` or reaches the document. */
|
|
86
|
+
function liftToTreeOf(node, other) {
|
|
87
|
+
let current = node;
|
|
88
|
+
while (current.getRootNode() !== other.getRootNode() && current.getRootNode() instanceof ShadowRoot) {
|
|
89
|
+
current = current.getRootNode().host;
|
|
90
|
+
}
|
|
91
|
+
return current;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Where `node` sits relative to `ref`, as `compareDocumentPosition` reports it. Whichever of the two
|
|
95
|
+
* is inside a shadow root is lifted to its host first, so a control inside a component compares too.
|
|
96
|
+
*/
|
|
97
|
+
function positionAcrossTrees(ref, node) {
|
|
98
|
+
const lifted = liftToTreeOf(node, ref);
|
|
99
|
+
return liftToTreeOf(ref, lifted).compareDocumentPosition(lifted);
|
|
100
|
+
}
|
|
101
|
+
const isPosition = (position, flag) => (position & Node.DOCUMENT_POSITION_DISCONNECTED) === 0 && (position & flag) !== 0;
|
|
102
|
+
/** The popover each panel belongs to, so a popover inside another one's panel can find it. */
|
|
103
|
+
const panelOwners = new WeakMap();
|
|
104
|
+
/** Floating layers Pine components put at the end of the page or of a dialog, as a popover does its panel. */
|
|
105
|
+
const FLOATING_LAYERS = '.pds-popover, .pds-datepicker-calendar-portal, .pds-combobox-dropdown-portal';
|
|
65
106
|
const PdsPopover = class {
|
|
66
107
|
constructor(hostRef) {
|
|
67
108
|
registerInstance(this, hostRef);
|
|
@@ -97,14 +138,21 @@ const PdsPopover = class {
|
|
|
97
138
|
*/
|
|
98
139
|
this.portalEl = null;
|
|
99
140
|
/**
|
|
100
|
-
*
|
|
141
|
+
* Stops floating-ui's autoUpdate, which repositions the open panel as its trigger or the page moves or resizes
|
|
101
142
|
*/
|
|
102
|
-
this.
|
|
143
|
+
this.stopAutoUpdate = null;
|
|
103
144
|
/**
|
|
104
|
-
*
|
|
145
|
+
* Counts positioning runs, so a run that resolves after a newer one started is dropped
|
|
105
146
|
*/
|
|
106
|
-
this.
|
|
107
|
-
|
|
147
|
+
this.positioningRun = 0;
|
|
148
|
+
/**
|
|
149
|
+
* The latest positioning run, which pdsPopoverOpen waits for so the panel's side is set when it fires
|
|
150
|
+
*/
|
|
151
|
+
this.positioning = Promise.resolve();
|
|
152
|
+
/**
|
|
153
|
+
* Set while show() waits to emit pdsPopoverOpen, so a hide() in the meantime emits it first
|
|
154
|
+
*/
|
|
155
|
+
this.openEventPending = false;
|
|
108
156
|
/**
|
|
109
157
|
* Track moved nodes and their placeholders for restoration
|
|
110
158
|
*/
|
|
@@ -125,6 +173,18 @@ const PdsPopover = class {
|
|
|
125
173
|
* How far the pointer was from the panel at its last move after leaving the trigger
|
|
126
174
|
*/
|
|
127
175
|
this.panelDistance = Infinity;
|
|
176
|
+
/**
|
|
177
|
+
* Stands in for the panel in the Tab order, right after the trigger, while the popover is open
|
|
178
|
+
*/
|
|
179
|
+
this.tabGuardEl = null;
|
|
180
|
+
/**
|
|
181
|
+
* Set while focus passes through the guard on its way out of the panel
|
|
182
|
+
*/
|
|
183
|
+
this.leavingPanel = false;
|
|
184
|
+
/**
|
|
185
|
+
* The direction of the Tab key being handled, until its default action has run
|
|
186
|
+
*/
|
|
187
|
+
this.tabDirection = null;
|
|
128
188
|
/**
|
|
129
189
|
* Determines the action that triggers the popover. For manual popovers, the consumer is responsible for toggling this value.
|
|
130
190
|
* @defaultValue "show"
|
|
@@ -178,6 +238,9 @@ const PdsPopover = class {
|
|
|
178
238
|
else {
|
|
179
239
|
this.triggerEl = null;
|
|
180
240
|
}
|
|
241
|
+
// autoUpdate watches the trigger it started with, so an open popover starts it again on the new one.
|
|
242
|
+
if (this.active)
|
|
243
|
+
this.addScrollAndResizeListeners();
|
|
181
244
|
this.observeTrigger();
|
|
182
245
|
};
|
|
183
246
|
/**
|
|
@@ -295,6 +358,59 @@ const PdsPopover = class {
|
|
|
295
358
|
event.stopPropagation();
|
|
296
359
|
}
|
|
297
360
|
};
|
|
361
|
+
// At the end of the body or of a dialog, the panel would come last in the Tab order. The guard
|
|
362
|
+
// after the trigger takes its place there, while the panel has a control for it to lead to.
|
|
363
|
+
this.syncTabGuard = (event) => {
|
|
364
|
+
if (event.key !== 'Tab')
|
|
365
|
+
return;
|
|
366
|
+
this.releasePanel();
|
|
367
|
+
this.tabDirection = event.shiftKey ? 'backward' : 'forward';
|
|
368
|
+
setTimeout(this.endTabKey);
|
|
369
|
+
// Read on each Tab, as the panel's content can arrive after it opens.
|
|
370
|
+
const guarding = this.guardedTabbables().length > 0;
|
|
371
|
+
if (this.tabGuardEl != null)
|
|
372
|
+
this.tabGuardEl.tabIndex = guarding ? 0 : -1;
|
|
373
|
+
// Inert for this key press, the panel is reached only through the guard, either way round. A
|
|
374
|
+
// control in another floating layer, such as a nested popover's panel, may move focus back into it.
|
|
375
|
+
const focused = deepActiveElement();
|
|
376
|
+
if (guarding && !containsComposed(this.portalEl, focused) && !closest(FLOATING_LAYERS, focused !== null && focused !== void 0 ? focused : document)) {
|
|
377
|
+
this.portalEl.inert = true;
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
this.endTabKey = () => {
|
|
381
|
+
this.tabDirection = null;
|
|
382
|
+
this.releasePanel();
|
|
383
|
+
};
|
|
384
|
+
this.handleTabGuardFocus = (event) => {
|
|
385
|
+
if (this.leavingPanel)
|
|
386
|
+
return;
|
|
387
|
+
// An inert panel's controls aren't tabbable, so the guard would find none to send focus to.
|
|
388
|
+
this.releasePanel();
|
|
389
|
+
const tabbables = this.guardedTabbables();
|
|
390
|
+
// A Tab press says which end of the panel focus comes in at; without one, where it came from does.
|
|
391
|
+
const from = event.relatedTarget;
|
|
392
|
+
const backward = this.tabDirection != null ? this.tabDirection === 'backward' : from != null && this.isAfterPopover(from);
|
|
393
|
+
const target = backward ? tabbables[tabbables.length - 1] : tabbables[0];
|
|
394
|
+
// Focus can reach the guard without a Tab keydown here (from a frame, or assistive tech) after
|
|
395
|
+
// the panel's controls are gone. The trigger is the nearest visible place for it.
|
|
396
|
+
if (target == null)
|
|
397
|
+
this.returnFocusToTrigger();
|
|
398
|
+
else
|
|
399
|
+
target.focus();
|
|
400
|
+
};
|
|
401
|
+
this.handleTabFromPanel = (event) => {
|
|
402
|
+
if (event.key !== 'Tab' || event.defaultPrevented || this.tabGuardEl == null)
|
|
403
|
+
return;
|
|
404
|
+
const tabbables = this.guardedTabbables();
|
|
405
|
+
const edge = event.shiftKey ? tabbables[0] : tabbables[tabbables.length - 1];
|
|
406
|
+
if (edge == null || deepActiveElement() !== edge)
|
|
407
|
+
return;
|
|
408
|
+
this.leavePanel(edge, event.shiftKey);
|
|
409
|
+
};
|
|
410
|
+
this.releasePanel = () => {
|
|
411
|
+
if (this.portalEl != null)
|
|
412
|
+
this.portalEl.inert = false;
|
|
413
|
+
};
|
|
298
414
|
}
|
|
299
415
|
openOnChanged() {
|
|
300
416
|
this.pin();
|
|
@@ -330,8 +446,6 @@ const PdsPopover = class {
|
|
|
330
446
|
// Bind event handlers for cleanup
|
|
331
447
|
this.boundClickOutsideHandler = this.handleClickOutside.bind(this);
|
|
332
448
|
this.boundEscapeKeyHandler = this.handleEscapeKey.bind(this);
|
|
333
|
-
this.boundScrollHandler = this.handleScroll.bind(this);
|
|
334
|
-
this.boundResizeHandler = this.handleResize.bind(this);
|
|
335
449
|
// Create portal element
|
|
336
450
|
this.createPortal();
|
|
337
451
|
this.hasLoaded = true;
|
|
@@ -430,11 +544,12 @@ const PdsPopover = class {
|
|
|
430
544
|
// is in now, if any.
|
|
431
545
|
if (this.active) {
|
|
432
546
|
this.placePortal();
|
|
433
|
-
|
|
547
|
+
// autoUpdate listens to the scroll containers around where the trigger was, so it starts again.
|
|
548
|
+
this.addScrollAndResizeListeners();
|
|
434
549
|
}
|
|
435
550
|
}
|
|
436
551
|
disconnectedCallback() {
|
|
437
|
-
var _a;
|
|
552
|
+
var _a, _b;
|
|
438
553
|
// Moved in one operation (a DOM morph, or a framework reparenting it), the popover is
|
|
439
554
|
// already back in the page. Its portal is outside the popover, so it stays open, with focus
|
|
440
555
|
// where it was; connectedCallback moves it to follow the popover.
|
|
@@ -449,6 +564,7 @@ const PdsPopover = class {
|
|
|
449
564
|
this.restorePortalContent();
|
|
450
565
|
this.active = false;
|
|
451
566
|
this.linkTriggerToPortal();
|
|
567
|
+
this.emitOpenEvent();
|
|
452
568
|
this.pdsPopoverClose.emit({
|
|
453
569
|
componentId: this.componentId,
|
|
454
570
|
popoverType: this.popoverType,
|
|
@@ -465,32 +581,20 @@ const PdsPopover = class {
|
|
|
465
581
|
this.removeLightDismissListeners();
|
|
466
582
|
this.removeScrollAndResizeListeners();
|
|
467
583
|
document.removeEventListener('submit', this.handleSubmitFromPanel, true);
|
|
468
|
-
|
|
469
|
-
this.
|
|
584
|
+
document.removeEventListener('keydown', this.syncTabGuard, true);
|
|
585
|
+
(_b = this.tabGuardEl) === null || _b === void 0 ? void 0 : _b.removeAttribute('tabindex');
|
|
470
586
|
this.clearHoverTimers();
|
|
471
587
|
this.hoverOpened = false;
|
|
472
588
|
// Remove portal from DOM
|
|
473
589
|
this.removePortal();
|
|
474
590
|
}
|
|
475
|
-
/**
|
|
476
|
-
* Clears any pending debounce timers
|
|
477
|
-
*/
|
|
478
|
-
clearDebounceTimers() {
|
|
479
|
-
if (this.scrollDebounceTimer !== null) {
|
|
480
|
-
clearTimeout(this.scrollDebounceTimer);
|
|
481
|
-
this.scrollDebounceTimer = null;
|
|
482
|
-
}
|
|
483
|
-
if (this.resizeDebounceTimer !== null) {
|
|
484
|
-
clearTimeout(this.resizeDebounceTimer);
|
|
485
|
-
this.resizeDebounceTimer = null;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
591
|
createPortal() {
|
|
489
592
|
var _a;
|
|
490
593
|
if (this.portalEl !== null)
|
|
491
594
|
return;
|
|
492
595
|
this.portalEl = document.createElement('div');
|
|
493
596
|
this.portalEl.className = 'pds-popover';
|
|
597
|
+
panelOwners.set(this.portalEl, this);
|
|
494
598
|
// Apply all styles inline since portal is outside shadow DOM
|
|
495
599
|
this.portalEl.style.position = 'fixed';
|
|
496
600
|
this.portalEl.style.zIndex = 'var(--pine-z-index-raised)';
|
|
@@ -517,6 +621,7 @@ const PdsPopover = class {
|
|
|
517
621
|
// This is done after appending to ensure it's part of the document and can access CSS variables
|
|
518
622
|
this.addPortalFocusStyles();
|
|
519
623
|
this.listenForHover(this.portalEl);
|
|
624
|
+
this.portalEl.addEventListener('keydown', this.handleTabFromPanel);
|
|
520
625
|
}
|
|
521
626
|
/**
|
|
522
627
|
* Adds Pine design system focus styles and dark mode border to the portal element
|
|
@@ -650,15 +755,10 @@ const PdsPopover = class {
|
|
|
650
755
|
this.portalEl.style.display = 'block';
|
|
651
756
|
this.portalEl.style.opacity = '1';
|
|
652
757
|
this.portalEl.style.visibility = 'visible';
|
|
653
|
-
// Position the popover
|
|
654
|
-
requestAnimationFrame(() => {
|
|
655
|
-
if (!this.isComponentMounted)
|
|
656
|
-
return;
|
|
657
|
-
this.handlePopoverPositioning();
|
|
658
|
-
});
|
|
659
|
-
// Add scroll and resize listeners for repositioning (always)
|
|
758
|
+
// Position the popover now, and again whenever its trigger or the page moves or resizes
|
|
660
759
|
this.addScrollAndResizeListeners();
|
|
661
760
|
document.addEventListener('submit', this.handleSubmitFromPanel, true);
|
|
761
|
+
document.addEventListener('keydown', this.syncTabGuard, true);
|
|
662
762
|
// Add document listeners for light dismiss and escape key (auto type only), or for the escape
|
|
663
763
|
// key alone while hover holds a manual popover open
|
|
664
764
|
if (this.popoverType === 'auto') {
|
|
@@ -669,7 +769,20 @@ const PdsPopover = class {
|
|
|
669
769
|
popoversTakingEscape.push(this);
|
|
670
770
|
document.addEventListener('keydown', this.boundEscapeKeyHandler);
|
|
671
771
|
}
|
|
672
|
-
// Emit open event
|
|
772
|
+
// Emit open event once the panel is positioned, with the side it took already on it. A reconnect, a
|
|
773
|
+
// trigger swap or another show() can start a newer run meanwhile, which drops this one, so wait for the latest.
|
|
774
|
+
this.openEventPending = true;
|
|
775
|
+
let positioning;
|
|
776
|
+
do {
|
|
777
|
+
positioning = this.positioning;
|
|
778
|
+
await positioning;
|
|
779
|
+
} while (positioning !== this.positioning);
|
|
780
|
+
this.emitOpenEvent();
|
|
781
|
+
}
|
|
782
|
+
emitOpenEvent() {
|
|
783
|
+
if (!this.openEventPending)
|
|
784
|
+
return;
|
|
785
|
+
this.openEventPending = false;
|
|
673
786
|
this.pdsPopoverOpen.emit({
|
|
674
787
|
componentId: this.componentId,
|
|
675
788
|
popoverType: this.popoverType,
|
|
@@ -679,6 +792,7 @@ const PdsPopover = class {
|
|
|
679
792
|
* Closes the popover programmatically
|
|
680
793
|
*/
|
|
681
794
|
async hide() {
|
|
795
|
+
var _a;
|
|
682
796
|
this.clearHoverTimers();
|
|
683
797
|
if (!this.active || !this.portalEl)
|
|
684
798
|
return;
|
|
@@ -694,6 +808,7 @@ const PdsPopover = class {
|
|
|
694
808
|
// Hide portal. The dark-mode border set in a shadow root is worked out again on the next open.
|
|
695
809
|
this.portalEl.style.border = '';
|
|
696
810
|
this.portalEl.removeAttribute('data-pds-popover-open');
|
|
811
|
+
this.portalEl.removeAttribute('data-pds-popover-placement');
|
|
697
812
|
this.portalEl.style.display = 'none';
|
|
698
813
|
this.portalEl.style.opacity = '0';
|
|
699
814
|
this.portalEl.style.visibility = 'hidden';
|
|
@@ -707,8 +822,11 @@ const PdsPopover = class {
|
|
|
707
822
|
this.removeLightDismissListeners();
|
|
708
823
|
this.removeScrollAndResizeListeners();
|
|
709
824
|
document.removeEventListener('submit', this.handleSubmitFromPanel, true);
|
|
710
|
-
|
|
711
|
-
this.
|
|
825
|
+
document.removeEventListener('keydown', this.syncTabGuard, true);
|
|
826
|
+
(_a = this.tabGuardEl) === null || _a === void 0 ? void 0 : _a.removeAttribute('tabindex');
|
|
827
|
+
this.releasePanel();
|
|
828
|
+
// Closed before its first position resolved, it still announces the open before the close.
|
|
829
|
+
this.emitOpenEvent();
|
|
712
830
|
// Emit close event
|
|
713
831
|
this.pdsPopoverClose.emit({
|
|
714
832
|
componentId: this.componentId,
|
|
@@ -720,10 +838,10 @@ const PdsPopover = class {
|
|
|
720
838
|
*/
|
|
721
839
|
async toggle() {
|
|
722
840
|
if (this.active) {
|
|
723
|
-
this.hide();
|
|
841
|
+
await this.hide();
|
|
724
842
|
}
|
|
725
843
|
else {
|
|
726
|
-
this.show();
|
|
844
|
+
await this.show();
|
|
727
845
|
}
|
|
728
846
|
}
|
|
729
847
|
/**
|
|
@@ -807,19 +925,62 @@ const PdsPopover = class {
|
|
|
807
925
|
document.removeEventListener('click', this.boundClickOutsideHandler, true);
|
|
808
926
|
document.removeEventListener('keydown', this.boundEscapeKeyHandler);
|
|
809
927
|
}
|
|
928
|
+
/**
|
|
929
|
+
* The panel's controls that Tab reaches through the guard. None when the panel sits right after
|
|
930
|
+
* the popover, in a dialog, where it's already next in the Tab order.
|
|
931
|
+
*/
|
|
932
|
+
guardedTabbables() {
|
|
933
|
+
if (this.portalEl == null || this.el.nextElementSibling === this.portalEl)
|
|
934
|
+
return [];
|
|
935
|
+
return tabbableIn(this.portalEl);
|
|
936
|
+
}
|
|
937
|
+
isAfterPopover(node) {
|
|
938
|
+
if (containsComposed(this.el, node))
|
|
939
|
+
return false;
|
|
940
|
+
return isPosition(positionAcrossTrees(this.el, node), Node.DOCUMENT_POSITION_FOLLOWING);
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* Moves focus to the guard without preventing the Tab, so the browser's Tab carries on from there.
|
|
944
|
+
* Inert until then, the panel can't be where it lands.
|
|
945
|
+
*/
|
|
946
|
+
leavePanel(edge, backward) {
|
|
947
|
+
var _a, _b;
|
|
948
|
+
this.leavingPanel = true;
|
|
949
|
+
(_a = this.tabGuardEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
950
|
+
this.leavingPanel = false;
|
|
951
|
+
this.portalEl.inert = true;
|
|
952
|
+
setTimeout(() => this.finishLeavingPanel(edge));
|
|
953
|
+
// Last in another popover's panel, the guard hands the Tab on to that popover's own guard.
|
|
954
|
+
const outer = panelOwners.get(closest('.pds-popover', this.el));
|
|
955
|
+
const outerTabbables = (_b = outer === null || outer === void 0 ? void 0 : outer.guardedTabbables()) !== null && _b !== void 0 ? _b : [];
|
|
956
|
+
if (!backward && outerTabbables[outerTabbables.length - 1] === this.tabGuardEl)
|
|
957
|
+
outer.leavePanel(edge, false);
|
|
958
|
+
}
|
|
959
|
+
// With nowhere for the browser's Tab to go, focus would stay on the invisible guard.
|
|
960
|
+
finishLeavingPanel(edge) {
|
|
961
|
+
var _a;
|
|
962
|
+
this.releasePanel();
|
|
963
|
+
if (this.active && ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) === this.tabGuardEl)
|
|
964
|
+
edge.focus();
|
|
965
|
+
}
|
|
810
966
|
/**
|
|
811
967
|
* Adds scroll and resize listeners for repositioning
|
|
812
968
|
*/
|
|
813
969
|
addScrollAndResizeListeners() {
|
|
814
|
-
|
|
815
|
-
|
|
970
|
+
this.removeScrollAndResizeListeners();
|
|
971
|
+
if (this.triggerEl == null || this.portalEl == null)
|
|
972
|
+
return;
|
|
973
|
+
this.stopAutoUpdate = autoUpdate(this.triggerEl, this.portalEl, () => {
|
|
974
|
+
this.positioning = this.handlePopoverPositioning().catch(error => console.warn('pds-popover: failed to position the panel', error));
|
|
975
|
+
});
|
|
816
976
|
}
|
|
817
977
|
/**
|
|
818
978
|
* Removes scroll and resize listeners
|
|
819
979
|
*/
|
|
820
980
|
removeScrollAndResizeListeners() {
|
|
821
|
-
|
|
822
|
-
|
|
981
|
+
var _a;
|
|
982
|
+
(_a = this.stopAutoUpdate) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
983
|
+
this.stopAutoUpdate = null;
|
|
823
984
|
}
|
|
824
985
|
/**
|
|
825
986
|
* Handles clicks outside the popover for light dismiss (auto type only)
|
|
@@ -883,122 +1044,38 @@ const PdsPopover = class {
|
|
|
883
1044
|
this.hide();
|
|
884
1045
|
}
|
|
885
1046
|
/**
|
|
886
|
-
*
|
|
1047
|
+
* Positions the popover relative to its trigger element, flipping to the opposite side when only that side has
|
|
1048
|
+
* room and shifting to stay 8px inside the viewport. The side it takes goes on the panel's `data-pds-popover-placement`.
|
|
887
1049
|
*/
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
if (this.
|
|
892
|
-
clearTimeout(this.scrollDebounceTimer);
|
|
893
|
-
}
|
|
894
|
-
this.scrollDebounceTimer = setTimeout(() => {
|
|
895
|
-
this.handlePopoverPositioning();
|
|
896
|
-
this.scrollDebounceTimer = null;
|
|
897
|
-
}, 10); // 10ms debounce for smooth repositioning
|
|
898
|
-
}
|
|
899
|
-
/**
|
|
900
|
-
* Handles resize events to reposition the popover (debounced for performance)
|
|
901
|
-
*/
|
|
902
|
-
handleResize() {
|
|
903
|
-
if (!this.active)
|
|
904
|
-
return;
|
|
905
|
-
if (this.resizeDebounceTimer !== null) {
|
|
906
|
-
clearTimeout(this.resizeDebounceTimer);
|
|
907
|
-
}
|
|
908
|
-
this.resizeDebounceTimer = setTimeout(() => {
|
|
909
|
-
this.handlePopoverPositioning();
|
|
910
|
-
this.resizeDebounceTimer = null;
|
|
911
|
-
}, 100); // 100ms debounce for resize
|
|
912
|
-
}
|
|
913
|
-
/**
|
|
914
|
-
* Positions the popover relative to its trigger element
|
|
915
|
-
*/
|
|
916
|
-
handlePopoverPositioning() {
|
|
917
|
-
// Prevent repositioning loops
|
|
918
|
-
if (this.isRepositioning) {
|
|
919
|
-
return;
|
|
920
|
-
}
|
|
921
|
-
this.isRepositioning = true;
|
|
922
|
-
if (this.triggerEl == null || this.portalEl == null) {
|
|
923
|
-
this.isRepositioning = false;
|
|
1050
|
+
async handlePopoverPositioning() {
|
|
1051
|
+
// Counted before the guards, so a run still in flight is dropped even when this one can't position.
|
|
1052
|
+
const run = ++this.positioningRun;
|
|
1053
|
+
if (this.triggerEl == null || this.portalEl == null)
|
|
924
1054
|
return;
|
|
925
|
-
}
|
|
926
|
-
const triggerRect = this.triggerEl.getBoundingClientRect();
|
|
927
|
-
const popoverRect = this.portalEl.getBoundingClientRect();
|
|
928
1055
|
// Safety check: ensure trigger has valid dimensions (is rendered and visible)
|
|
929
|
-
|
|
930
|
-
|
|
1056
|
+
const triggerRect = this.triggerEl.getBoundingClientRect();
|
|
1057
|
+
if (triggerRect.width === 0 || triggerRect.height === 0)
|
|
931
1058
|
return;
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
break;
|
|
945
|
-
case 'top-end':
|
|
946
|
-
top = triggerRect.top - popoverRect.height - offset;
|
|
947
|
-
left = triggerRect.right - popoverRect.width;
|
|
948
|
-
break;
|
|
949
|
-
case 'right':
|
|
950
|
-
top = triggerRect.top + (triggerRect.height - popoverRect.height) / 2;
|
|
951
|
-
left = triggerRect.right + offset;
|
|
952
|
-
break;
|
|
953
|
-
case 'right-start':
|
|
954
|
-
top = triggerRect.top;
|
|
955
|
-
left = triggerRect.right + offset;
|
|
956
|
-
break;
|
|
957
|
-
case 'right-end':
|
|
958
|
-
top = triggerRect.bottom - popoverRect.height;
|
|
959
|
-
left = triggerRect.right + offset;
|
|
960
|
-
break;
|
|
961
|
-
case 'bottom':
|
|
962
|
-
top = triggerRect.bottom + offset;
|
|
963
|
-
left = triggerRect.left + (triggerRect.width - popoverRect.width) / 2;
|
|
964
|
-
break;
|
|
965
|
-
case 'bottom-start':
|
|
966
|
-
top = triggerRect.bottom + offset;
|
|
967
|
-
left = triggerRect.left;
|
|
968
|
-
break;
|
|
969
|
-
case 'bottom-end':
|
|
970
|
-
top = triggerRect.bottom + offset;
|
|
971
|
-
left = triggerRect.right - popoverRect.width;
|
|
972
|
-
break;
|
|
973
|
-
case 'left':
|
|
974
|
-
top = triggerRect.top + (triggerRect.height - popoverRect.height) / 2;
|
|
975
|
-
left = triggerRect.left - popoverRect.width - offset;
|
|
976
|
-
break;
|
|
977
|
-
case 'left-start':
|
|
978
|
-
top = triggerRect.top;
|
|
979
|
-
left = triggerRect.left - popoverRect.width - offset;
|
|
980
|
-
break;
|
|
981
|
-
case 'left-end':
|
|
982
|
-
top = triggerRect.bottom - popoverRect.height;
|
|
983
|
-
left = triggerRect.left - popoverRect.width - offset;
|
|
984
|
-
break;
|
|
985
|
-
}
|
|
986
|
-
this.portalEl.style.top = `${top}px`;
|
|
987
|
-
this.portalEl.style.left = `${left}px`;
|
|
1059
|
+
const portal = this.portalEl;
|
|
1060
|
+
const { x: left, y: top, placement } = await computePosition(this.triggerEl, portal, {
|
|
1061
|
+
placement: this.placement,
|
|
1062
|
+
strategy: 'fixed',
|
|
1063
|
+
// With no room on either side, stay on the preferred side: the side that overflows less can still push
|
|
1064
|
+
// a tall panel's start above the viewport.
|
|
1065
|
+
middleware: [offset(8), flip({ fallbackStrategy: 'initialPlacement' }), shift({ padding: 8 })],
|
|
1066
|
+
platform: viewportPlatform,
|
|
1067
|
+
});
|
|
1068
|
+
if (!this.active || run !== this.positioningRun || portal !== this.portalEl)
|
|
1069
|
+
return;
|
|
1070
|
+
portal.setAttribute('data-pds-popover-placement', placement);
|
|
988
1071
|
// `position: fixed` measures from the viewport unless an ancestor becomes its containing block,
|
|
989
|
-
// as a modal dialog does with its backdrop filter.
|
|
990
|
-
const
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
this.portalEl.style.left = `${2 * left - placed.left}px`;
|
|
994
|
-
}
|
|
995
|
-
// Reset the repositioning guard after a short delay
|
|
996
|
-
setTimeout(() => {
|
|
997
|
-
this.isRepositioning = false;
|
|
998
|
-
}, 16); // ~1 frame at 60fps
|
|
1072
|
+
// as a modal dialog does with its backdrop filter. Offset by however far that block's corner is from the viewport's.
|
|
1073
|
+
const origin = containingBlockOrigin(portal);
|
|
1074
|
+
portal.style.top = `${top - origin.top}px`;
|
|
1075
|
+
portal.style.left = `${left - origin.left}px`;
|
|
999
1076
|
}
|
|
1000
1077
|
render() {
|
|
1001
|
-
return (h(Host, { key: '
|
|
1078
|
+
return (h(Host, { key: '85422eb7544a4795ce78b51684b7224a5d856a4e', id: this.componentId }, h("span", { key: '6fe9c827ed4d46ca723d6013f296faf80ba31366', class: "pds-popover__trigger-wrapper" }, h("slot", { key: '970d1974d2be1451e670a36e7d2ccdc5979595bb', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), h("span", { key: '0c76f76286a30d8e6e948bd0abab3317b3673aa6', class: "pds-popover__tab-guard", ref: (el) => (this.tabGuardEl = el !== null && el !== void 0 ? el : null), onFocus: this.handleTabGuardFocus }), h("div", { key: '692c45e93899e74a3d5970f3a3625f6115ab63b0', class: "pds-popover__content-slot-wrapper" }, h("slot", { key: 'f1566e0eb1eb08626f2a8285447702ce96b09f4d', onSlotchange: this.handleContentSlotChange }))));
|
|
1002
1079
|
}
|
|
1003
1080
|
get el() { return getElement(this); }
|
|
1004
1081
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
2
|
-
import { H as HostStylingKeeper } from './attributes-
|
|
1
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-4_RRPJTO.js';
|
|
2
|
+
import { H as HostStylingKeeper } from './attributes-DkeVeN0g.js';
|
|
3
3
|
import { n as normalizeColorValue } from './utils-OYK5-nwe.js';
|
|
4
|
-
import './keep-hydrated-
|
|
4
|
+
import './keep-hydrated-BgNaWLoS.js';
|
|
5
5
|
|
|
6
6
|
const pdsProgressCss = () => `:host{--color-progress-fill:var(--pine-color-primary);--sizing-progress-bar-width:100%;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:var(--sizing-progress-bar-width)}@-webkit-keyframes progressBar{0%{width:0}100%{width:var(--sizing-progress-bar-width)}}@keyframes progressBar{0%{width:0}100%{width:var(--sizing-progress-bar-width)}}.pds-progress{-ms-flex-align:center;align-items:center;background-color:var(--pine-color-background-muted);border-radius:var(--pine-dimension-2xs);display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:var(--pine-dimension-xs);position:relative;width:100%}:host(.is-animated) progress,:host(.is-animated) progress::-webkit-progress-bar{-webkit-animation:progressBar 3s ease;animation:progressBar 3s ease;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}progress,progress::-webkit-progress-bar{background-color:transparent;border:0;height:var(--pine-dimension-xs);width:100%}progress::-webkit-progress-value{background:var(--color-progress-fill, var(--pine-color-primary));border-radius:var(--pine-dimension-2xs)}progress::-moz-progress-bar{background:var(--color-progress-fill, var(--pine-color-primary));border-radius:var(--pine-dimension-2xs)}.pds-progress__label{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.pds-progress__percentage{font-weight:var(--pine-font-weight-medium);-webkit-margin-start:calc(var(--pine-dimension-md) / 2);margin-inline-start:calc(var(--pine-dimension-md) / 2)}`;
|
|
7
7
|
|
|
@@ -35,7 +35,7 @@ const PdsProgress = class {
|
|
|
35
35
|
const normalizedFillColor = normalizeColorValue(this.fillColor);
|
|
36
36
|
const hostClass = this.animated ? { 'is-animated': this.animated } : '';
|
|
37
37
|
this.hostKeeper.record(hostClass);
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: '6d2151cdd1f65b33a7478e5ac12df711d8252d1f', class: hostClass }, h("div", { key: '4a902c6c7d51fe8e8a778e1fa24bdbf95d625b1f', class: "pds-progress" }, h("label", { key: 'c50955234a7eee05cdf47531e25b4413f206e416', class: "pds-progress__label", htmlFor: this.componentId }, this.label), h("progress", { key: 'c54ad90f7b3fcf3368afca4c5618949f1a370114', id: this.componentId, max: "100", style: normalizedFillColor ? { '--color-progress-fill': normalizedFillColor } : {}, value: this.percent })), this.showPercent && h("div", { key: '6b3e3f42f04a516ef7992d1f8bc967be432f55bb', class: "pds-progress__percentage" }, this.percent, "%")));
|
|
39
39
|
}
|
|
40
40
|
get el() { return getElement(this); }
|
|
41
41
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
2
|
-
import './keep-hydrated-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-4_RRPJTO.js';
|
|
2
|
+
import './keep-hydrated-BgNaWLoS.js';
|
|
3
3
|
|
|
4
4
|
const pdsPropertyCss = () => `:host{color:var(--pine-color-text-message);font:var(--pine-typography-body-medium)}`;
|
|
5
5
|
|
|
@@ -12,7 +12,7 @@ const PdsProperty = class {
|
|
|
12
12
|
this.icon = 'star';
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: '198ffd747b7a84a6f58a1b072890fc8bd3ed93aa', id: this.componentId }, h("pds-box", { key: 'be71f3d96efea0a45f357d888f71dbe5ad8b68d6', "align-items": "center", gap: "xs" }, h("pds-icon", { key: '1a52407e00b158d5e6a515ad4b07ed3407d31f75', icon: this.icon, size: "var(--pine-dimension-sm)", "aria-hidden": "true" }), h("slot", { key: '46ac5019b27bdd079c7853abeef8f7c240d19c2c' }))));
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
PdsProperty.style = pdsPropertyCss();
|