@pine-ds/core 4.10.0 → 4.12.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/aria-references.js +1 -0
- package/components/attributes.js +1 -1
- package/components/index2.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 +2 -2
- package/components/pds-copytext.js +1 -1
- package/components/pds-datepicker.js +1 -1
- package/components/pds-drawer-content.js +1 -1
- package/components/pds-drawer-footer.js +1 -1
- package/components/pds-drawer-header.js +1 -1
- package/components/pds-drawer.js +1 -1
- package/components/pds-dropdown-menu-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-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-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-radio-group.js +1 -1
- package/components/pds-radio.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-table.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/sortable-label.js +1 -0
- package/components/truncation-tooltip.js +1 -1
- package/dist/cjs/aria-references-CUmqibnO.js +54 -0
- package/dist/cjs/{attributes-CW49XqaL.js → attributes-Cgbkw6gO.js} +3 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pds-alert.cjs.entry.js +2 -2
- package/dist/cjs/pds-avatar.cjs.entry.js +3 -2
- package/dist/cjs/pds-box.cjs.entry.js +4 -3
- package/dist/cjs/pds-button.cjs.entry.js +25 -45
- package/dist/cjs/pds-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/pds-chip.cjs.entry.js +3 -3
- package/dist/cjs/pds-combobox.cjs.entry.js +246 -106
- package/dist/cjs/pds-copytext.cjs.entry.js +3 -3
- package/dist/cjs/pds-datepicker.cjs.entry.js +295 -82
- package/dist/cjs/pds-drawer-content.cjs.entry.js +1 -1
- package/dist/cjs/pds-drawer-footer.cjs.entry.js +1 -1
- package/dist/cjs/pds-drawer-header.cjs.entry.js +1 -1
- package/dist/cjs/pds-drawer.cjs.entry.js +5 -7
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +85 -49
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +2 -2
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +83 -10
- package/dist/cjs/pds-filter.cjs.entry.js +24 -2
- package/dist/cjs/pds-image.cjs.entry.js +148 -6
- package/dist/cjs/pds-input.cjs.entry.js +4 -4
- package/dist/cjs/pds-link.cjs.entry.js +4 -5
- package/dist/cjs/pds-loader.cjs.entry.js +4 -3
- package/dist/cjs/pds-modal-footer.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal-header.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal.cjs.entry.js +9 -12
- package/dist/cjs/pds-multiselect.cjs.entry.js +64 -18
- package/dist/cjs/pds-popover.cjs.entry.js +8 -6
- package/dist/cjs/pds-progress.cjs.entry.js +3 -3
- package/dist/cjs/pds-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/pds-radio.cjs.entry.js +6 -6
- package/dist/cjs/pds-row.cjs.entry.js +1 -1
- package/dist/cjs/pds-select.cjs.entry.js +2 -2
- package/dist/cjs/pds-sortable-item.cjs.entry.js +28 -5
- package/dist/cjs/pds-sortable.cjs.entry.js +356 -4
- package/dist/cjs/pds-switch.cjs.entry.js +92 -15
- package/dist/cjs/pds-tab.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-cell.cjs.entry.js +24 -5
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +59 -11
- 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 +260 -5
- package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
- package/dist/cjs/pds-tabs.cjs.entry.js +3 -3
- package/dist/cjs/pds-text.cjs.entry.js +5 -3
- package/dist/cjs/pds-textarea.cjs.entry.js +8 -7
- package/dist/cjs/pds-toast.cjs.entry.js +8 -4
- package/dist/cjs/pds-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/pine-core.cjs.js +1 -1
- package/dist/cjs/sortable-label-DOcJrHvA.js +37 -0
- package/dist/cjs/{truncation-tooltip-Bikp7n9I.js → truncation-tooltip-CM5HgRHh.js} +69 -0
- package/dist/collection/components/pds-alert/pds-alert.css +0 -3
- package/dist/collection/components/pds-alert/pds-alert.js +3 -2
- package/dist/collection/components/pds-avatar/pds-avatar.js +7 -6
- package/dist/collection/components/pds-avatar/stories/pds-avatar.stories.js +1 -1
- package/dist/collection/components/pds-box/pds-box.css +1273 -1189
- package/dist/collection/components/pds-box/pds-box.js +180 -156
- package/dist/collection/components/pds-box/stories/pds-box.stories.js +79 -37
- package/dist/collection/components/pds-button/pds-button.js +26 -4
- package/dist/collection/components/pds-button/stories/pds-button.stories.js +25 -11
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +10 -10
- package/dist/collection/components/pds-chip/pds-chip.js +3 -3
- package/dist/collection/components/pds-combobox/pds-combobox.css +162 -53
- package/dist/collection/components/pds-combobox/pds-combobox.js +261 -121
- package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +35 -4
- package/dist/collection/components/pds-copytext/pds-copytext.js +2 -2
- package/dist/collection/components/pds-datepicker/date-utils.js +42 -0
- package/dist/collection/components/pds-datepicker/pds-datepicker.js +164 -65
- package/dist/collection/components/pds-datepicker/presets.js +42 -7
- package/dist/collection/components/pds-datepicker/stories/pds-datepicker.stories.js +11 -0
- package/dist/collection/components/pds-datepicker/value.js +76 -18
- package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +2 -5
- package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +2 -1
- package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +2 -1
- package/dist/collection/components/pds-drawer/pds-drawer.js +8 -10
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +17 -8
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +95 -62
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +3 -3
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +2 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +84 -9
- package/dist/collection/components/pds-dropdown-menu/stories/pds-dropdown-menu.stories.js +24 -1
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.css +2 -1
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +24 -7
- package/dist/collection/components/pds-image/image-interface.js +1 -0
- package/dist/collection/components/pds-image/pds-image.css +11 -0
- package/dist/collection/components/pds-image/pds-image.js +249 -8
- package/dist/collection/components/pds-image/stories/pds-image.stories.js +117 -1
- package/dist/collection/components/pds-input/pds-input.js +14 -9
- package/dist/collection/components/pds-link/pds-link.js +10 -14
- package/dist/collection/components/pds-link/stories/pds-link.stories.js +6 -2
- package/dist/collection/components/pds-loader/pds-loader.js +5 -4
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +2 -1
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +2 -1
- package/dist/collection/components/pds-modal/pds-modal.js +11 -13
- package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +7 -7
- package/dist/collection/components/pds-multiselect/pds-multiselect.css +2 -2
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +63 -18
- package/dist/collection/components/pds-popover/pds-popover.css +1 -1
- package/dist/collection/components/pds-popover/pds-popover.js +9 -7
- package/dist/collection/components/pds-progress/pds-progress.js +4 -4
- package/dist/collection/components/pds-radio/pds-radio.css +5 -1
- package/dist/collection/components/pds-radio/pds-radio.js +9 -9
- package/dist/collection/components/pds-radio/stories/pds-radio.stories.js +9 -9
- package/dist/collection/components/pds-radio-group/pds-radio-group.js +7 -7
- package/dist/collection/components/pds-radio-group/stories/pds-radio-group.stories.js +3 -3
- package/dist/collection/components/pds-row/stories/pds-row.stories.js +15 -14
- package/dist/collection/components/pds-select/pds-select.js +7 -4
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.css +38 -0
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +47 -5
- package/dist/collection/components/pds-sortable/pds-sortable.js +481 -5
- package/dist/collection/components/pds-sortable/sortable-label.js +33 -0
- package/dist/collection/components/pds-sortable/stories/pds-sortable.stories.js +27 -0
- package/dist/collection/components/pds-switch/pds-switch.js +114 -17
- package/dist/collection/components/pds-switch/stories/pds-switch.stories.js +79 -0
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +4 -1
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +47 -4
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +6 -2
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.css +11 -0
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +98 -10
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +5 -1
- package/dist/collection/components/pds-table/pds-table.css +8 -0
- package/dist/collection/components/pds-table/pds-table.js +295 -7
- package/dist/collection/components/pds-table/stories/pds-table.stories.js +131 -6
- package/dist/collection/components/pds-tabs/pds-tabs.js +3 -3
- package/dist/collection/components/pds-tabs/stories/pds-tabs.stories.js +1 -1
- package/dist/collection/components/pds-text/pds-text.js +5 -3
- package/dist/collection/components/pds-textarea/pds-textarea.js +16 -14
- package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +2 -13
- package/dist/collection/components/pds-toast/pds-toast.css +4 -3
- package/dist/collection/components/pds-toast/pds-toast.js +9 -5
- package/dist/collection/components/pds-toast/stories/pds-toast.stories.js +2 -2
- package/dist/collection/components/pds-tooltip/pds-tooltip.css +2 -1
- package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +17 -17
- package/dist/collection/utils/aria-references.js +9 -3
- package/dist/collection/utils/truncation-tooltip.js +67 -0
- package/dist/docs.json +1150 -371
- package/dist/esm/aria-references-CNn1lObg.js +50 -0
- package/dist/esm/{attributes-DkeVeN0g.js → attributes-CD8knu3a.js} +3 -0
- package/dist/esm/{index-DvN3tyZp.js → index-B0DXTeeV.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pds-accordion.entry.js +1 -1
- package/dist/esm/pds-alert.entry.js +2 -2
- package/dist/esm/pds-avatar.entry.js +4 -3
- package/dist/esm/pds-box.entry.js +4 -3
- package/dist/esm/pds-button.entry.js +24 -44
- package/dist/esm/pds-checkbox.entry.js +5 -5
- package/dist/esm/pds-chip.entry.js +4 -4
- package/dist/esm/pds-combobox.entry.js +246 -106
- package/dist/esm/pds-copytext.entry.js +4 -4
- package/dist/esm/pds-datepicker.entry.js +296 -83
- package/dist/esm/pds-drawer-content.entry.js +1 -1
- package/dist/esm/pds-drawer-footer.entry.js +1 -1
- package/dist/esm/pds-drawer-header.entry.js +1 -1
- package/dist/esm/pds-drawer.entry.js +5 -7
- package/dist/esm/pds-dropdown-menu-item.entry.js +85 -49
- package/dist/esm/pds-dropdown-menu-separator.entry.js +2 -2
- package/dist/esm/pds-dropdown-menu.entry.js +84 -11
- package/dist/esm/pds-filter.entry.js +25 -3
- package/dist/esm/pds-image.entry.js +149 -7
- package/dist/esm/pds-input.entry.js +5 -5
- package/dist/esm/pds-link.entry.js +5 -6
- package/dist/esm/pds-loader.entry.js +4 -3
- package/dist/esm/pds-modal-footer.entry.js +1 -1
- package/dist/esm/pds-modal-header.entry.js +1 -1
- package/dist/esm/pds-modal.entry.js +9 -12
- package/dist/esm/pds-multiselect.entry.js +65 -19
- package/dist/esm/pds-popover.entry.js +8 -6
- package/dist/esm/pds-progress.entry.js +3 -3
- package/dist/esm/pds-radio-group.entry.js +5 -5
- package/dist/esm/pds-radio.entry.js +7 -7
- package/dist/esm/pds-row.entry.js +1 -1
- package/dist/esm/pds-select.entry.js +3 -3
- package/dist/esm/pds-sortable-item.entry.js +29 -6
- package/dist/esm/pds-sortable.entry.js +357 -5
- package/dist/esm/pds-switch.entry.js +94 -17
- package/dist/esm/pds-tab.entry.js +1 -1
- package/dist/esm/pds-table-body.entry.js +1 -1
- package/dist/esm/pds-table-cell.entry.js +24 -5
- package/dist/esm/pds-table-head-cell.entry.js +60 -12
- 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 +261 -6
- package/dist/esm/pds-tabpanel.entry.js +1 -1
- package/dist/esm/pds-tabs.entry.js +3 -3
- package/dist/esm/pds-text.entry.js +5 -3
- package/dist/esm/pds-textarea.entry.js +9 -8
- package/dist/esm/pds-toast.entry.js +8 -4
- package/dist/esm/pds-tooltip.entry.js +1 -1
- package/dist/esm/pine-core.js +1 -1
- package/dist/esm/sortable-label-PItnzVVR.js +35 -0
- package/dist/esm/{truncation-tooltip-DBcPipr9.js → truncation-tooltip-CkIWm6Z-.js} +68 -1
- package/dist/esm-es5/aria-references-CNn1lObg.js +1 -0
- package/dist/esm-es5/{attributes-DkeVeN0g.js → attributes-CD8knu3a.js} +1 -1
- package/dist/esm-es5/{index-DvN3tyZp.js → index-B0DXTeeV.js} +1 -1
- package/dist/esm-es5/loader.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 +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-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-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-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-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/sortable-label-PItnzVVR.js +1 -0
- package/dist/esm-es5/truncation-tooltip-CkIWm6Z-.js +1 -0
- package/dist/pine-core/{p-f834cb07.system.entry.js → p-00891b8d.system.entry.js} +1 -1
- package/dist/pine-core/{p-3f8bd3fb.system.entry.js → p-053ff8eb.system.entry.js} +1 -1
- package/dist/pine-core/p-08b9e3ad.entry.js +1 -0
- package/dist/pine-core/{p-4d98bc0c.system.entry.js → p-0a7570dd.system.entry.js} +1 -1
- package/dist/pine-core/{p-d018dc60.system.entry.js → p-0ac4262e.system.entry.js} +1 -1
- package/dist/pine-core/{p-89d38a82.system.entry.js → p-0e1b8bd1.system.entry.js} +1 -1
- package/dist/pine-core/{p-e1d1b5d8.entry.js → p-12fdc65f.entry.js} +1 -1
- package/dist/pine-core/{p-d48fe5a0.system.entry.js → p-16fceef6.system.entry.js} +1 -1
- package/dist/pine-core/p-1765a41b.system.entry.js +1 -0
- package/dist/pine-core/{p-a594c41f.entry.js → p-18524c25.entry.js} +1 -1
- package/dist/pine-core/p-1a013a5c.system.entry.js +1 -0
- package/dist/pine-core/{p-2b9622c1.system.entry.js → p-1ab52531.system.entry.js} +1 -1
- package/dist/pine-core/p-1c584a20.entry.js +1 -0
- package/dist/pine-core/p-1edef412.entry.js +1 -0
- package/dist/pine-core/{p-5946203c.entry.js → p-1f998e3e.entry.js} +1 -1
- package/dist/pine-core/{p-39e57657.entry.js → p-1fb1ca3d.entry.js} +1 -1
- package/dist/pine-core/p-2b6becc2.entry.js +1 -0
- package/dist/pine-core/p-2cc7c682.entry.js +1 -0
- package/dist/pine-core/{p-639acef8.system.entry.js → p-2ddcd845.system.entry.js} +1 -1
- package/dist/pine-core/{p-6a1aa8d3.entry.js → p-2f15e85f.entry.js} +1 -1
- package/dist/pine-core/{p-67f795d5.system.entry.js → p-33da254f.system.entry.js} +1 -1
- package/dist/pine-core/{p-c6a9e62c.system.entry.js → p-3fc9ef80.system.entry.js} +1 -1
- package/dist/pine-core/p-4125a4a6.system.entry.js +1 -0
- package/dist/pine-core/p-47df9e9f.system.entry.js +3 -0
- package/dist/pine-core/p-51680c9c.system.entry.js +1 -0
- package/dist/pine-core/p-55535481.system.entry.js +1 -0
- package/dist/pine-core/p-55a4659a.system.entry.js +1 -0
- package/dist/pine-core/{p-c5e1eb3c.system.entry.js → p-57af5c29.system.entry.js} +1 -1
- package/dist/pine-core/p-57edd301.system.entry.js +1 -0
- package/dist/pine-core/{p-bfa34194.entry.js → p-5d582798.entry.js} +1 -1
- package/dist/pine-core/p-5db87fda.system.entry.js +1 -0
- package/dist/pine-core/{p-19cf1d91.system.entry.js → p-5eb0c78c.system.entry.js} +1 -1
- package/dist/pine-core/{p-42f70f93.system.entry.js → p-6017afb5.system.entry.js} +1 -1
- package/dist/pine-core/{p-63f85859.system.entry.js → p-60e65fe0.system.entry.js} +1 -1
- package/dist/pine-core/{p-973c3ac0.entry.js → p-627a94da.entry.js} +1 -1
- package/dist/pine-core/{p-a9d96e22.entry.js → p-68328afc.entry.js} +1 -1
- package/dist/pine-core/{p-bd7dc317.system.entry.js → p-72668673.system.entry.js} +1 -1
- package/dist/pine-core/p-72ff5ad2.system.entry.js +1 -0
- package/dist/pine-core/p-736ea7dd.entry.js +7 -0
- package/dist/pine-core/p-765f4207.entry.js +1 -0
- package/dist/pine-core/{p-2a18852f.entry.js → p-77530cf2.entry.js} +1 -1
- package/dist/pine-core/p-77a22399.entry.js +1 -0
- package/dist/pine-core/p-783127bf.entry.js +1 -0
- package/dist/pine-core/{p-d9719e37.entry.js → p-82f7eed1.entry.js} +1 -1
- package/dist/pine-core/{p-124a0a24.entry.js → p-84d4ae26.entry.js} +1 -1
- package/dist/pine-core/p-8deeda07.entry.js +1 -0
- package/dist/pine-core/{p-849ec281.system.entry.js → p-8e17a6d8.system.entry.js} +1 -1
- package/dist/pine-core/p-8e7e7bba.entry.js +1 -0
- package/dist/pine-core/{p-e82f758f.system.entry.js → p-907c69e9.system.entry.js} +1 -1
- package/dist/pine-core/{p-1415c988.system.entry.js → p-90f83a5b.system.entry.js} +1 -1
- package/dist/pine-core/p-97145eee.system.entry.js +1 -0
- package/dist/pine-core/{p-a09c9c5e.system.entry.js → p-9d983e09.system.entry.js} +1 -1
- package/dist/pine-core/{p-1e3ef425.entry.js → p-9e005996.entry.js} +1 -1
- package/dist/pine-core/{p-DvN3tyZp.js → p-B0DXTeeV.js} +1 -1
- package/dist/pine-core/{p-CNXspDYs.system.js → p-BlJQebvG.system.js} +1 -1
- package/dist/pine-core/p-C35-349-.system.js +1 -0
- package/dist/pine-core/{p-vFsJv75D.system.js → p-CIe1DGXa.system.js} +1 -1
- package/dist/pine-core/p-CNn1lObg.js +1 -0
- package/dist/pine-core/p-CQJ44c6o.system.js +1 -0
- package/dist/pine-core/p-Dv9QBmIF.js +1 -0
- package/dist/pine-core/p-PItnzVVR.js +1 -0
- package/dist/pine-core/p-VPGVqK3P.system.js +1 -0
- package/dist/pine-core/p-XK45dzWR.system.js +1 -1
- package/dist/pine-core/p-a149af29.entry.js +1 -0
- package/dist/pine-core/p-a20d9eca.system.entry.js +1 -0
- package/dist/pine-core/{p-f6f4fd42.entry.js → p-a5782d99.entry.js} +1 -1
- package/dist/pine-core/p-a5e9c583.entry.js +1 -0
- package/dist/pine-core/{p-4d47023c.system.entry.js → p-a9eaf160.system.entry.js} +1 -1
- package/dist/pine-core/{p-143b33a6.entry.js → p-b00b07e3.entry.js} +1 -1
- package/dist/pine-core/{p-c7a53c4f.entry.js → p-b7b29392.entry.js} +1 -1
- package/dist/pine-core/p-b96bdff6.entry.js +1 -0
- package/dist/pine-core/{p-f71d71ca.entry.js → p-bbd9ab75.entry.js} +1 -1
- package/dist/pine-core/p-bdab6c9f.entry.js +1 -0
- package/dist/pine-core/p-biShcgLI.js +1 -0
- package/dist/pine-core/{p-548bce53.system.entry.js → p-c12b5cd7.system.entry.js} +1 -1
- package/dist/pine-core/p-c1dc7692.entry.js +1 -0
- package/dist/pine-core/p-c76d8b9e.system.entry.js +1 -0
- package/dist/pine-core/{p-590df41a.entry.js → p-c89ea2d3.entry.js} +1 -1
- package/dist/pine-core/{p-d920d759.system.entry.js → p-c9630934.system.entry.js} +1 -1
- package/dist/pine-core/{p-6f4ab1ea.system.entry.js → p-cb9227f6.system.entry.js} +1 -1
- package/dist/pine-core/p-ceef0eb1.entry.js +1 -0
- package/dist/pine-core/p-d1283e8d.entry.js +1 -0
- package/dist/pine-core/p-d676926d.system.entry.js +1 -0
- package/dist/pine-core/{p-61cfdbb2.entry.js → p-d7d7a4e1.entry.js} +1 -1
- package/dist/pine-core/p-d85d50cb.entry.js +1 -0
- package/dist/pine-core/p-daa802f1.entry.js +2 -0
- package/dist/pine-core/p-ddf4b9b5.system.entry.js +1 -0
- package/dist/pine-core/p-de3b319e.system.entry.js +8 -0
- package/dist/pine-core/{p-cb9baf78.system.entry.js → p-e00777da.system.entry.js} +1 -1
- package/dist/pine-core/p-e2541eeb.entry.js +1 -0
- package/dist/pine-core/{p-01f1cdaf.system.entry.js → p-e2a1a49a.system.entry.js} +1 -1
- package/dist/pine-core/p-e4ebea88.system.entry.js +1 -0
- package/dist/pine-core/{p-947582e1.entry.js → p-e554bd64.entry.js} +1 -1
- package/dist/pine-core/{p-dd7ded84.entry.js → p-e6427c87.entry.js} +1 -1
- package/dist/pine-core/{p-50ddadbf.entry.js → p-e72e8b8f.entry.js} +1 -1
- package/dist/pine-core/p-e92d0f0f.system.entry.js +1 -0
- package/dist/pine-core/{p-9b32727a.system.entry.js → p-eab165b9.system.entry.js} +1 -1
- package/dist/pine-core/p-eabc4bd8.entry.js +1 -0
- package/dist/pine-core/p-ef9f84f2.system.entry.js +1 -0
- package/dist/pine-core/{p-c9ae7964.entry.js → p-f026af73.entry.js} +1 -1
- package/dist/pine-core/{p-99530cb5.entry.js → p-f0509c8e.entry.js} +1 -1
- package/dist/pine-core/p-f1252e72.system.entry.js +1 -0
- package/dist/pine-core/p-f3496fd1.entry.js +1 -0
- package/dist/pine-core/{p-eecd9ad8.system.entry.js → p-f90f4be7.system.entry.js} +1 -1
- package/dist/pine-core/p-f9bdaadd.system.entry.js +1 -0
- package/dist/pine-core/{p-128c04e7.entry.js → p-fda791df.entry.js} +1 -1
- package/dist/pine-core/p-fea4296d.entry.js +1 -0
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/types/components/pds-alert/pds-alert.d.ts +2 -1
- package/dist/types/components/pds-avatar/pds-avatar.d.ts +5 -4
- package/dist/types/components/pds-box/pds-box.d.ts +68 -57
- package/dist/types/components/pds-button/pds-button.d.ts +14 -3
- package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +15 -8
- package/dist/types/components/pds-chip/pds-chip.d.ts +2 -2
- package/dist/types/components/pds-combobox/pds-combobox.d.ts +48 -11
- package/dist/types/components/pds-copytext/pds-copytext.d.ts +3 -1
- package/dist/types/components/pds-datepicker/date-utils.d.ts +19 -0
- package/dist/types/components/pds-datepicker/datepicker-interface.d.ts +22 -5
- package/dist/types/components/pds-datepicker/pds-datepicker.d.ts +33 -7
- package/dist/types/components/pds-datepicker/presets.d.ts +3 -2
- package/dist/types/components/pds-datepicker/value.d.ts +14 -2
- package/dist/types/components/pds-drawer/pds-drawer-content/pds-drawer-content.d.ts +1 -4
- package/dist/types/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.d.ts +1 -0
- package/dist/types/components/pds-drawer/pds-drawer-header/pds-drawer-header.d.ts +1 -0
- package/dist/types/components/pds-drawer/pds-drawer.d.ts +4 -6
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +20 -16
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.d.ts +1 -1
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +7 -0
- package/dist/types/components/pds-filters/pds-filter/pds-filter.d.ts +6 -5
- package/dist/types/components/pds-image/image-interface.d.ts +12 -0
- package/dist/types/components/pds-image/pds-image.d.ts +69 -9
- package/dist/types/components/pds-input/pds-input.d.ts +17 -7
- package/dist/types/components/pds-link/pds-link.d.ts +8 -8
- package/dist/types/components/pds-loader/pds-loader.d.ts +3 -2
- package/dist/types/components/pds-modal/pds-modal-footer/pds-modal-footer.d.ts +1 -0
- package/dist/types/components/pds-modal/pds-modal-header/pds-modal-header.d.ts +1 -0
- package/dist/types/components/pds-modal/pds-modal.d.ts +7 -9
- package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +14 -8
- package/dist/types/components/pds-popover/pds-popover.d.ts +2 -2
- package/dist/types/components/pds-progress/pds-progress.d.ts +2 -2
- package/dist/types/components/pds-radio/pds-radio.d.ts +6 -5
- package/dist/types/components/pds-radio-group/pds-radio-group.d.ts +5 -4
- package/dist/types/components/pds-select/pds-select.d.ts +9 -3
- package/dist/types/components/pds-sortable/pds-sortable-item/pds-sortable-item.d.ts +8 -2
- package/dist/types/components/pds-sortable/pds-sortable.d.ts +82 -1
- package/dist/types/components/pds-sortable/sortable-label.d.ts +7 -0
- package/dist/types/components/pds-switch/pds-switch.d.ts +17 -2
- package/dist/types/components/pds-table/pds-table-body/pds-table-body.d.ts +3 -0
- package/dist/types/components/pds-table/pds-table-cell/pds-table-cell.d.ts +10 -0
- package/dist/types/components/pds-table/pds-table-head/pds-table-head.d.ts +5 -1
- package/dist/types/components/pds-table/pds-table-head-cell/pds-table-head-cell.d.ts +21 -0
- package/dist/types/components/pds-table/pds-table-row/pds-table-row.d.ts +4 -0
- package/dist/types/components/pds-table/pds-table.d.ts +76 -2
- package/dist/types/components/pds-tabs/pds-tabs.d.ts +1 -1
- package/dist/types/components/pds-textarea/pds-textarea.d.ts +15 -13
- package/dist/types/components/pds-toast/pds-toast.d.ts +5 -1
- package/dist/types/components.d.ts +505 -335
- package/dist/types/utils/aria-references.d.ts +4 -0
- package/dist/types/utils/truncation-tooltip.d.ts +39 -0
- package/dist/types/utils/types.d.ts +3 -0
- package/dist/vscode.html-data.json +350 -137
- package/hydrate/index.js +2054 -427
- package/hydrate/index.mjs +2054 -427
- package/package.json +3 -3
- package/readme.md +26 -55
- package/dist/esm-es5/truncation-tooltip-DBcPipr9.js +0 -1
- package/dist/pine-core/p-07323107.entry.js +0 -1
- package/dist/pine-core/p-08b8e941.entry.js +0 -1
- package/dist/pine-core/p-0b7b3fc2.system.entry.js +0 -3
- package/dist/pine-core/p-0d5f0ab5.system.entry.js +0 -1
- package/dist/pine-core/p-14dedf01.system.entry.js +0 -1
- package/dist/pine-core/p-1ca8d183.entry.js +0 -1
- package/dist/pine-core/p-1f62bb71.entry.js +0 -7
- package/dist/pine-core/p-2dd30d12.entry.js +0 -1
- package/dist/pine-core/p-35s7h-dk.js +0 -1
- package/dist/pine-core/p-3610cb3b.entry.js +0 -1
- package/dist/pine-core/p-39276663.entry.js +0 -1
- package/dist/pine-core/p-3a1dc752.system.entry.js +0 -1
- package/dist/pine-core/p-42d43c3f.system.entry.js +0 -1
- package/dist/pine-core/p-4a90b9c8.system.entry.js +0 -1
- package/dist/pine-core/p-4cfe922b.entry.js +0 -1
- package/dist/pine-core/p-5f181694.system.entry.js +0 -1
- package/dist/pine-core/p-60a30975.system.entry.js +0 -1
- package/dist/pine-core/p-62aa6a78.system.entry.js +0 -1
- package/dist/pine-core/p-64bcb378.entry.js +0 -1
- package/dist/pine-core/p-724baba3.system.entry.js +0 -1
- package/dist/pine-core/p-72659a0e.system.entry.js +0 -1
- package/dist/pine-core/p-8436cbfb.entry.js +0 -1
- package/dist/pine-core/p-8ade17ce.entry.js +0 -1
- package/dist/pine-core/p-8e7f75e6.entry.js +0 -1
- package/dist/pine-core/p-8fb520df.entry.js +0 -1
- package/dist/pine-core/p-92115e88.entry.js +0 -1
- package/dist/pine-core/p-94c9b7d1.system.entry.js +0 -1
- package/dist/pine-core/p-97356d4b.entry.js +0 -1
- package/dist/pine-core/p-97653e60.entry.js +0 -1
- package/dist/pine-core/p-97b73359.entry.js +0 -1
- package/dist/pine-core/p-BZVUD2on.js +0 -1
- package/dist/pine-core/p-Dj-z_ugg.system.js +0 -1
- package/dist/pine-core/p-ad5208a4.system.entry.js +0 -1
- package/dist/pine-core/p-afc2f165.entry.js +0 -1
- package/dist/pine-core/p-bcc378ba.system.entry.js +0 -8
- package/dist/pine-core/p-c8a0b562.system.entry.js +0 -1
- package/dist/pine-core/p-d47b2a6a.system.entry.js +0 -1
- package/dist/pine-core/p-d6f338e0.entry.js +0 -1
- package/dist/pine-core/p-da8b864a.entry.js +0 -2
- package/dist/pine-core/p-db7fb5a3.entry.js +0 -1
- package/dist/pine-core/p-de455073.system.entry.js +0 -1
- package/dist/pine-core/p-e3de6a1d.entry.js +0 -1
- package/dist/pine-core/p-e84fa9ed.entry.js +0 -1
- package/dist/pine-core/p-eb4f0daa.system.entry.js +0 -1
- package/dist/pine-core/p-eb56af4a.system.entry.js +0 -1
- package/dist/pine-core/p-ef0eba9b.system.entry.js +0 -1
- package/dist/pine-core/p-f11cce27.system.entry.js +0 -1
- package/dist/pine-core/p-f354dbac.entry.js +0 -1
|
@@ -15,7 +15,7 @@ const PdsDrawerContent = class {
|
|
|
15
15
|
reconnectedContent.unwrapReconnectedContent(this.el.querySelector('.pds-drawer-content'), '.pds-drawer-content');
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (index.h("div", { key: '
|
|
18
|
+
return (index.h("div", { key: '0d59724de849bc2364d88c4460f70f8b1efa5d1b', class: "pds-drawer-content" }, index.h("slot", { key: '83782b9b4ad99f8075809c9e63d8351fa6109b11' })));
|
|
19
19
|
}
|
|
20
20
|
get el() { return index.getElement(this); }
|
|
21
21
|
};
|
|
@@ -15,7 +15,7 @@ const PdsDrawerFooter = class {
|
|
|
15
15
|
reconnectedContent.unwrapReconnectedContent(this.el.querySelector('.pds-drawer__footer'), '.pds-drawer__footer');
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (index.h("footer", { key: '
|
|
18
|
+
return (index.h("footer", { key: '1345b87580b1931d7c541fac71c0dff33b6cfbf9', class: "pds-drawer__footer" }, index.h("slot", { key: '638fa6bd14d28e814e0e40b02efb1b74f89f51dd' })));
|
|
19
19
|
}
|
|
20
20
|
get el() { return index.getElement(this); }
|
|
21
21
|
};
|
|
@@ -15,7 +15,7 @@ const PdsDrawerHeader = class {
|
|
|
15
15
|
reconnectedContent.unwrapReconnectedContent(this.el.querySelector('.pds-drawer__header'), '.pds-drawer__header');
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (index.h("header", { key: '
|
|
18
|
+
return (index.h("header", { key: '6354f36d59e608a85c3cb75d1e5cf04c48dd7045', class: "pds-drawer__header" }, index.h("slot", { key: '2c9d8a405c8850588377553f3d9a19790828cba7' })));
|
|
19
19
|
}
|
|
20
20
|
get el() { return index.getElement(this); }
|
|
21
21
|
};
|
|
@@ -25,8 +25,8 @@ const PdsDrawer = class {
|
|
|
25
25
|
*/
|
|
26
26
|
this.open = false;
|
|
27
27
|
/**
|
|
28
|
-
* Which edge of the viewport the drawer is docked to. Logical
|
|
29
|
-
*
|
|
28
|
+
* Which edge of the viewport the drawer is docked to. Logical: `end` is the
|
|
29
|
+
* inline-end edge, so an `end` drawer docks on the left in right-to-left layouts.
|
|
30
30
|
* @default 'end'
|
|
31
31
|
*/
|
|
32
32
|
this.side = 'end';
|
|
@@ -52,9 +52,7 @@ const PdsDrawer = class {
|
|
|
52
52
|
/**
|
|
53
53
|
* Whether the drawer can be dismissed with a pointerdown outside it (in a
|
|
54
54
|
* `modal` drawer, a click on its backdrop).
|
|
55
|
-
*
|
|
56
|
-
* This also gates Escape, matching how `backdropDismiss` gates Escape on
|
|
57
|
-
* `pds-modal` today: setting this to `false` means the close button is the
|
|
55
|
+
* Setting it to `false` also turns off Escape, so the close button is the
|
|
58
56
|
* only way out.
|
|
59
57
|
*
|
|
60
58
|
* A trigger outside the drawer should only ever set `open` to `true` and
|
|
@@ -145,11 +143,11 @@ const PdsDrawer = class {
|
|
|
145
143
|
this.open = false;
|
|
146
144
|
}
|
|
147
145
|
render() {
|
|
148
|
-
return (index.h(index.Host, { key: '
|
|
146
|
+
return (index.h(index.Host, { key: 'dda3f1dc3013f28a3fc8d1894609dd4b14d227ee', class: {
|
|
149
147
|
'pds-drawer': true,
|
|
150
148
|
[`pds-drawer--${this.side}`]: true,
|
|
151
149
|
[`pds-drawer--${this.size}`]: true,
|
|
152
|
-
} }, index.h("pds-modal", { key: '
|
|
150
|
+
} }, index.h("pds-modal", { key: '3188b99ffb9b3ecb3eeb42fd3ba808d71c652b4f', class: { 'pds-drawer__modal': true, 'pds-drawer__modal--modal': this.modal }, ref: (el) => (this.modalEl = el), componentId: this.componentId, open: this.open, scrollable: this.scrollable, disableTopLayer: !this.modal, backdropDismiss: this.lightDismiss, disableInitialFocus: !this.modal && this.initialFocus === 'none' }, index.h("slot", { key: 'ca4cd34297b4580d554edb45bfbec5b44d7d1fb0' }))));
|
|
153
151
|
}
|
|
154
152
|
get el() { return index.getElement(this); }
|
|
155
153
|
};
|
|
@@ -3,42 +3,72 @@
|
|
|
3
3
|
var index = require('./index-D9iJuJCP.js');
|
|
4
4
|
require('./keep-hydrated-AKoh0DG4.js');
|
|
5
5
|
|
|
6
|
-
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);color:var(--pine-color-text);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-background-muted);color:var(--pine-color-text-hover)}.pds-dropdown-menu-item__content
|
|
6
|
+
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);color:var(--pine-color-text);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-background-muted);color:var(--pine-color-text-hover)}.pds-dropdown-menu-item__content:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-dropdown-menu-item__start{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-negative:0;flex-shrink:0}.pds-dropdown-menu-item__start--empty{display:none}:host(.is-informational){cursor:default}:host(.is-informational) .pds-dropdown-menu-item__content:hover{background-color:transparent;color:var(--pine-color-text)}:host(.destructive) .pds-dropdown-menu-item__content{--pds-context-link-color:var(--pine-color-danger);--pds-context-link-color-hover:var(--pine-color-danger-hover);-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-visible{background-color:var(--pine-color-danger-disabled);outline:var(--pine-outline-focus-danger);outline-offset:var(--pine-border-width)}:host(.destructive) pds-link::part(link):focus-visible{background-color:var(--pine-color-danger-disabled);outline:var(--pine-outline-focus-danger)}pds-link::part(link):focus-visible{border-radius:var(--pine-dimension-xs);-webkit-box-shadow:none;box-shadow:none;outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}pds-link::part(link){-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);margin:calc(var(--pine-dimension-xs) * -1);padding:var(--pine-dimension-xs);text-decoration:none;width:calc(100% + var(--pine-dimension-xs) * 2)}`;
|
|
7
7
|
|
|
8
8
|
const PdsDropdownMenuItem = class {
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
index.registerInstance(this, hostRef);
|
|
11
11
|
this.pdsClick = index.createEvent(this, "pdsClick");
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Determines whether or not the dropdown menu item is destructive.
|
|
14
14
|
* @defaultValue false
|
|
15
15
|
*/
|
|
16
16
|
this.destructive = false;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Determines whether or not the dropdown menu item is disabled.
|
|
19
19
|
* @defaultValue false
|
|
20
20
|
*/
|
|
21
21
|
this.disabled = false;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Determines whether or not the dropdown menu item is informational: text that the arrow keys
|
|
24
24
|
* reach but that can't be activated. Takes precedence over `href` and `destructive`.
|
|
25
25
|
* Screen readers announce it as dimmed or unavailable, the same way as a disabled item.
|
|
26
26
|
* @defaultValue false
|
|
27
27
|
*/
|
|
28
28
|
this.informational = false;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* Ignored when `informational` is set.
|
|
30
|
+
* Shows the external-link (launch) icon. Opens in a new tab unless `target` says otherwise.
|
|
31
|
+
* Only applies when href is set. Ignored when `informational` is set.
|
|
33
32
|
* @defaultValue false
|
|
34
33
|
*/
|
|
35
34
|
this.external = false;
|
|
36
|
-
this.
|
|
37
|
-
|
|
38
|
-
this.
|
|
35
|
+
this.handleClick = () => {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
if (this.disabled || this.informational)
|
|
38
|
+
return;
|
|
39
|
+
// Filter only pds-dropdown-menu-item elements and find the index of the current item
|
|
40
|
+
const menuItems = Array.from((_b = (_a = this.host.parentElement) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : []).filter((child) => child.tagName.toLowerCase() === 'pds-dropdown-menu-item');
|
|
41
|
+
const itemIndex = menuItems.indexOf(this.host);
|
|
42
|
+
// The label's text: default-slot content only, so start-slot content stays out of it
|
|
43
|
+
const content = Array.from(this.host.childNodes)
|
|
44
|
+
.filter((node) => node.nodeType === Node.TEXT_NODE ||
|
|
45
|
+
(node.nodeType === Node.ELEMENT_NODE && !node.getAttribute('slot')))
|
|
46
|
+
.map((node) => node.textContent)
|
|
47
|
+
.join('')
|
|
48
|
+
.trim();
|
|
49
|
+
this.pdsClick.emit({
|
|
50
|
+
itemIndex,
|
|
51
|
+
item: this.host,
|
|
52
|
+
content
|
|
53
|
+
});
|
|
39
54
|
};
|
|
40
|
-
|
|
41
|
-
|
|
55
|
+
// Checked directly against the light DOM rather than kept in @State: Stencil's JSX doesn't
|
|
56
|
+
// type a `class` prop for `<slot>`, and a ref callback only fires once, on creation, so it
|
|
57
|
+
// can't push a later @State change back onto the element either way. Called once up front
|
|
58
|
+
// (from the ref, since nothing's assigned at componentWillLoad's point) and again on every
|
|
59
|
+
// native slotchange after that, both calling classList directly. add/remove, not the two-argument
|
|
60
|
+
// form of toggle(): Stencil's mock-doc (used by spec tests) implements toggle() as a plain flip
|
|
61
|
+
// and silently ignores a force argument, so a toggle() call that'd be correct against a real
|
|
62
|
+
// DOM can still fail there.
|
|
63
|
+
this.updateStartSlotEmpty = () => {
|
|
64
|
+
var _a, _b;
|
|
65
|
+
const hasContent = Array.from(this.host.children).some((child) => child.getAttribute('slot') === 'start');
|
|
66
|
+
if (hasContent) {
|
|
67
|
+
(_a = this.startSlotEl) === null || _a === void 0 ? void 0 : _a.classList.remove('pds-dropdown-menu-item__start--empty');
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
(_b = this.startSlotEl) === null || _b === void 0 ? void 0 : _b.classList.add('pds-dropdown-menu-item__start--empty');
|
|
71
|
+
}
|
|
42
72
|
};
|
|
43
73
|
// Space would otherwise scroll the page, since nothing in the item takes the key.
|
|
44
74
|
this.handleInformationalKeyDown = (event) => {
|
|
@@ -47,63 +77,69 @@ const PdsDropdownMenuItem = class {
|
|
|
47
77
|
}
|
|
48
78
|
};
|
|
49
79
|
this.handleKeyDown = (event) => {
|
|
50
|
-
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
80
|
+
var _a;
|
|
81
|
+
if (this.disabled || event.key !== 'Enter')
|
|
82
|
+
return;
|
|
83
|
+
if (this.href != null) {
|
|
84
|
+
// Enter on the inner <a> itself follows the link, and its native click reaches the host's
|
|
85
|
+
// click handler below, which emits pdsClick -- returning early here leaves that alone.
|
|
86
|
+
// Safari leaves focus on the pds-link host after a mouse click, not its inner <a>, where
|
|
87
|
+
// Enter would otherwise do nothing: an anchor only activates on Enter when it is itself the
|
|
88
|
+
// focused element, not an ancestor of it. Forwarding the click to the real anchor instead
|
|
89
|
+
// runs the browser's own navigation (hash, download, target), and still reaches the same
|
|
90
|
+
// host click handler, so pdsClick still isn't emitted twice.
|
|
91
|
+
if (event.composedPath()[0] !== this.innerAnchor())
|
|
92
|
+
(_a = this.innerAnchor()) === null || _a === void 0 ? void 0 : _a.click();
|
|
93
|
+
return;
|
|
58
94
|
}
|
|
95
|
+
event.preventDefault();
|
|
96
|
+
this.handleClick();
|
|
59
97
|
};
|
|
60
98
|
}
|
|
61
99
|
/**
|
|
62
|
-
* Trigger the click event
|
|
100
|
+
* Trigger the click event. Does nothing when the item is disabled or informational.
|
|
63
101
|
*/
|
|
64
102
|
async clickItem() {
|
|
65
103
|
this.handleClick();
|
|
66
104
|
}
|
|
67
105
|
;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
106
|
+
// Always render the start slot so slotted content is projected reliably, with nothing wrapping
|
|
107
|
+
// it: a wrapper would sit between the slotted content and this host, leaving it without an
|
|
108
|
+
// assignedSlot, which breaks a click-target walk that follows assignedSlot up to find a link
|
|
109
|
+
// (Turbo's link lookup works this way). The --empty class hides it when nothing is slotted, so
|
|
110
|
+
// it adds no gap.
|
|
111
|
+
renderContent() {
|
|
112
|
+
return [
|
|
113
|
+
index.h("slot", { name: "start", onSlotchange: this.updateStartSlotEmpty, ref: (el) => {
|
|
114
|
+
this.startSlotEl = el;
|
|
115
|
+
if (el) {
|
|
116
|
+
el.classList.add('pds-dropdown-menu-item__start');
|
|
117
|
+
this.updateStartSlotEmpty();
|
|
118
|
+
}
|
|
119
|
+
} }),
|
|
120
|
+
index.h("slot", null)
|
|
121
|
+
];
|
|
82
122
|
}
|
|
83
123
|
renderElement() {
|
|
84
124
|
if (this.informational) {
|
|
85
|
-
return (index.h("div", { class:
|
|
86
|
-
'pds-dropdown-menu-item__content': true,
|
|
87
|
-
'has-focus': this.hasFocus
|
|
88
|
-
}, role: "menuitem", "aria-disabled": "true", part: "button", tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleInformationalKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }, index.h("slot", null)));
|
|
125
|
+
return (index.h("div", { class: "pds-dropdown-menu-item__content", role: "menuitem", "aria-disabled": "true", part: "button", tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleInformationalKeyDown }, this.renderContent()));
|
|
89
126
|
}
|
|
90
127
|
if (this.href != null) {
|
|
91
|
-
return (index.h("pds-link", { download: this.download, href: this.disabled ? null : this.href, external: this.external, externalLabel: this.externalLabel, target: this.target, class:
|
|
92
|
-
'pds-dropdown-menu-item__content': true,
|
|
93
|
-
'has-focus': this.hasFocus
|
|
94
|
-
}, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, "aria-disabled": this.disabled ? 'true' : null }, index.h("slot", null)));
|
|
128
|
+
return (index.h("pds-link", { download: this.download, href: this.disabled ? null : this.href, external: this.external, externalLabel: this.externalLabel, target: this.target, class: "pds-dropdown-menu-item__content", tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, "aria-disabled": this.disabled ? 'true' : null }, this.renderContent()));
|
|
95
129
|
}
|
|
96
|
-
return (index.h("button", { class:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
130
|
+
return (index.h("button", { class: "pds-dropdown-menu-item__content", tabIndex: this.disabled ? -1 : 0, type: "button", part: "button", onKeyDown: this.handleKeyDown, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null }, this.renderContent()));
|
|
131
|
+
}
|
|
132
|
+
// pds-link's own shadow root, one level in from its host.
|
|
133
|
+
innerAnchor() {
|
|
134
|
+
var _a, _b, _c, _d;
|
|
135
|
+
return (_d = (_c = (_b = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-link')) === null || _b === void 0 ? void 0 : _b.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('a')) !== null && _d !== void 0 ? _d : null;
|
|
100
136
|
}
|
|
101
137
|
render() {
|
|
102
|
-
return (index.h(index.Host, { key: '
|
|
138
|
+
return (index.h(index.Host, { key: '139943faad1c0047bb0363e0eaa0cde9efb2f957', id: this.componentId, class: {
|
|
103
139
|
'is-disabled': this.disabled,
|
|
104
140
|
'is-informational': this.informational,
|
|
105
141
|
'destructive': !this.disabled && !this.informational && this.destructive
|
|
106
|
-
}, onClick:
|
|
142
|
+
}, onClick: this.handleClick, role: "none",
|
|
107
143
|
// ARIA ignores role="none" on focusable elements, so a focusable host would sit between
|
|
108
144
|
// the menu and the informational menuitem as an unexpected child.
|
|
109
145
|
tabIndex: this.informational ? null : -1, "aria-disabled": this.disabled && !this.informational ? 'true' : null }, this.renderElement()));
|
|
@@ -9,13 +9,13 @@ const PdsDropdownMenuSeparator = class {
|
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
index.registerInstance(this, hostRef);
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Has no effect. A separator can't be focused or activated.
|
|
13
13
|
* @defaultValue false
|
|
14
14
|
*/
|
|
15
15
|
this.disabled = false;
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (index.h(index.Host, { key: '
|
|
18
|
+
return (index.h(index.Host, { key: '74a214d61042d5759af5aef9d6410ed1a267083c', id: this.componentId }, index.h("hr", { key: 'c521eda51523fce09bd408af2586645fc9a9cd03' })));
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
PdsDropdownMenuSeparator.style = pdsDropdownMenuSeparatorCss();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D9iJuJCP.js');
|
|
4
|
-
var attributes = require('./attributes-
|
|
4
|
+
var attributes = require('./attributes-Cgbkw6gO.js');
|
|
5
5
|
var keepHydrated = require('./keep-hydrated-AKoh0DG4.js');
|
|
6
6
|
var floatingUi_dom = require('./floating-ui.dom-Dw41zbyY.js');
|
|
7
7
|
|
|
8
|
-
const pdsDropdownMenuCss = () => `:host{display:block}.is-hidden{display:none}.pds-dropdown-menu--panel{background-color:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-xs);left:var(--pine-dimension-none);min-width:170px;padding:var(--pine-dimension-xs);position:fixed;z-index:var(--pine-z-index-overlay)}:host-context([data-theme=dark]) .pds-dropdown-menu--panel{border:var(--pine-border)}.pds-dropdown-menu__header{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border);-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs);margin-inline:calc(var(--pine-dimension-xs) * -1);-webkit-padding-after:var(--pine-dimension-xs);padding-block-end:var(--pine-dimension-xs);padding-inline:calc(var(--pine-dimension-xs) * 2 + var(--pine-border-width) + 2px);text-align:start}.pds-dropdown-menu__items{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}::slotted(a:not([slot=header])),::slotted(button:not([slot=header])){-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) !important;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text) !important;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium) !important;gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px) !important;padding:var(--pine-dimension-xs) !important;text-align:start;text-decoration:none !important;width:calc(100% - (var(--pine-border-width) + 2px) * 2)}::slotted(.destructive:not([slot=header])){color:var(--pine-color-danger) !important}::slotted([aria-disabled=true]:not([slot=header])),::slotted([disabled]:not([disabled=false]):not([slot=header])){cursor:not-allowed;opacity:0.5;pointer-events:none}`;
|
|
8
|
+
const pdsDropdownMenuCss = () => `:host{display:block}.is-hidden{display:none}.pds-dropdown-menu--panel{background-color:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-xs);left:var(--pine-dimension-none);min-width:170px;overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain;padding:var(--pine-dimension-xs);position:fixed;z-index:var(--pine-z-index-overlay)}:host-context([data-theme=dark]) .pds-dropdown-menu--panel{border:var(--pine-border)}.pds-dropdown-menu__header{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border);-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs);margin-inline:calc(var(--pine-dimension-xs) * -1);-webkit-padding-after:var(--pine-dimension-xs);padding-block-end:var(--pine-dimension-xs);padding-inline:calc(var(--pine-dimension-xs) * 2 + var(--pine-border-width) + 2px);text-align:start}.pds-dropdown-menu__items{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}::slotted(a:not([slot=header])),::slotted(button:not([slot=header])){-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) !important;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text) !important;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium) !important;gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px) !important;padding:var(--pine-dimension-xs) !important;text-align:start;text-decoration:none !important;width:calc(100% - (var(--pine-border-width) + 2px) * 2)}::slotted(.destructive:not([slot=header])){color:var(--pine-color-danger) !important}::slotted([aria-disabled=true]:not([slot=header])),::slotted([disabled]:not([disabled=false]):not([slot=header])){cursor:not-allowed;opacity:0.5;pointer-events:none}`;
|
|
9
9
|
|
|
10
10
|
const PdsDropdownMenu = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -13,7 +13,10 @@ const PdsDropdownMenu = class {
|
|
|
13
13
|
this.isOpen = false;
|
|
14
14
|
this.menuItems = [];
|
|
15
15
|
this.cleanupAutoUpdate = null;
|
|
16
|
+
// Counts each opening, so a position worked out for an earlier opening is ignored.
|
|
17
|
+
this.openCount = 0;
|
|
16
18
|
this.triggerObserver = null;
|
|
19
|
+
this.triggerVisibility = null;
|
|
17
20
|
this.currentFocusIndex = -1;
|
|
18
21
|
this.hasHeader = false;
|
|
19
22
|
/**
|
|
@@ -74,12 +77,20 @@ const PdsDropdownMenu = class {
|
|
|
74
77
|
// Open the dropdown and position it
|
|
75
78
|
this.openDropdown = () => {
|
|
76
79
|
var _a;
|
|
80
|
+
const opening = ++this.openCount;
|
|
77
81
|
const updatePosition = () => {
|
|
78
82
|
floatingUi_dom.computePosition(this.triggerEl, this.panelEl, {
|
|
79
83
|
placement: this.placement,
|
|
80
84
|
strategy: 'fixed',
|
|
81
|
-
middleware: [
|
|
85
|
+
middleware: [
|
|
86
|
+
floatingUi_dom.offset(6),
|
|
87
|
+
floatingUi_dom.flip(),
|
|
88
|
+
floatingUi_dom.shift({ padding: 5 }),
|
|
89
|
+
floatingUi_dom.size({ padding: 5, apply: ({ availableHeight, elements }) => this.capPanelHeight(elements.floating, availableHeight) }),
|
|
90
|
+
],
|
|
82
91
|
}).then(({ x, y }) => {
|
|
92
|
+
if (!this.isOpen || opening !== this.openCount)
|
|
93
|
+
return;
|
|
83
94
|
Object.assign(this.panelEl.style, {
|
|
84
95
|
left: `${x}px`,
|
|
85
96
|
top: `${y}px`,
|
|
@@ -90,12 +101,15 @@ const PdsDropdownMenu = class {
|
|
|
90
101
|
updatePosition();
|
|
91
102
|
// Set up auto-update for window resize and scroll
|
|
92
103
|
this.cleanupAutoUpdate = floatingUi_dom.autoUpdate(this.triggerEl, this.panelEl, updatePosition);
|
|
104
|
+
this.watchTriggerVisibility();
|
|
93
105
|
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-box').classList.remove('is-hidden');
|
|
94
106
|
this.isOpen = true;
|
|
95
107
|
this.syncTriggerAria();
|
|
96
108
|
};
|
|
97
|
-
// Close the dropdown
|
|
98
|
-
|
|
109
|
+
// Close the dropdown. Closed because its trigger left the view, focus from the menu still goes back
|
|
110
|
+
// to the trigger, so it isn't lost, but without scrolling the trigger back into view. The next Tab
|
|
111
|
+
// carries on from there.
|
|
112
|
+
this.closeDropdown = ({ preventScroll = false } = {}) => {
|
|
99
113
|
var _a;
|
|
100
114
|
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-box').classList.add('is-hidden');
|
|
101
115
|
this.isOpen = false;
|
|
@@ -104,12 +118,13 @@ const PdsDropdownMenu = class {
|
|
|
104
118
|
this.cleanupAutoUpdate();
|
|
105
119
|
this.cleanupAutoUpdate = null;
|
|
106
120
|
}
|
|
121
|
+
this.stopWatchingTriggerVisibility();
|
|
107
122
|
this.syncTriggerAria();
|
|
108
123
|
// Reset focus index
|
|
109
124
|
this.currentFocusIndex = -1;
|
|
110
125
|
// Return focus to trigger
|
|
111
126
|
if (this.isFocusInMenu()) {
|
|
112
|
-
this.focusTrigger();
|
|
127
|
+
this.focusTrigger(preventScroll);
|
|
113
128
|
}
|
|
114
129
|
};
|
|
115
130
|
// Handle click on the trigger element
|
|
@@ -139,6 +154,10 @@ const PdsDropdownMenu = class {
|
|
|
139
154
|
}
|
|
140
155
|
(_a = this.triggerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
141
156
|
this.triggerObserver = null;
|
|
157
|
+
this.stopWatchingTriggerVisibility();
|
|
158
|
+
// The menu was detached, so a position still being worked out for it is dropped. The menu
|
|
159
|
+
// itself stays open.
|
|
160
|
+
this.openCount++;
|
|
142
161
|
}
|
|
143
162
|
// The trigger is the consumer's element, so anything can rewrite its attributes (a Turbo morph
|
|
144
163
|
// matches it to server HTML that has no ARIA). Put Pine's values back when that happens.
|
|
@@ -155,18 +174,72 @@ const PdsDropdownMenu = class {
|
|
|
155
174
|
attributeFilter: ['aria-haspopup', 'aria-expanded'],
|
|
156
175
|
});
|
|
157
176
|
}
|
|
177
|
+
// The panel is fixed, so a menu taller than the room beside its trigger would run off the window
|
|
178
|
+
// with no way to reach its last items. It's capped to that room and scrolls inside itself. A
|
|
179
|
+
// smaller max-height set through the menu-panel part is kept. The cap is important, as a
|
|
180
|
+
// ::part() rule outside the shadow root otherwise beats the panel's own inline style.
|
|
181
|
+
//
|
|
182
|
+
// Removing `max-height` lifts the panel's own scroll constraint, so a layout read in between
|
|
183
|
+
// (`getComputedStyle`) can commit a frame with nothing left to scroll, and the browser resets
|
|
184
|
+
// `scrollTop` to 0. This runs on every `autoUpdate` pass, including a small ancestor scroll that
|
|
185
|
+
// leaves the trigger in view, so a menu scrolled partway down would otherwise jump back to the
|
|
186
|
+
// top on its own. Restoring `scrollTop` afterward keeps the user's place; the browser clamps it
|
|
187
|
+
// automatically if the new max-height is shorter than before.
|
|
188
|
+
capPanelHeight(panel, availableHeight) {
|
|
189
|
+
const { scrollTop } = panel;
|
|
190
|
+
panel.style.removeProperty('max-height');
|
|
191
|
+
const partMaxHeight = getComputedStyle(panel).maxHeight;
|
|
192
|
+
const room = `${Math.max(0, availableHeight)}px`;
|
|
193
|
+
panel.style.setProperty('max-height', partMaxHeight === 'none' ? room : `min(${partMaxHeight}, ${room})`, 'important');
|
|
194
|
+
panel.scrollTop = scrollTop;
|
|
195
|
+
}
|
|
196
|
+
// Once the trigger is fully out of view, scrolled or clipped by any container or the window, the
|
|
197
|
+
// menu closes rather than float away from it, much as a native select's list does. An
|
|
198
|
+
// IntersectionObserver measures against the layout viewport, so panning a pinch-zoomed page
|
|
199
|
+
// doesn't close it, as Floating UI's hide() would.
|
|
200
|
+
watchTriggerVisibility() {
|
|
201
|
+
this.stopWatchingTriggerVisibility();
|
|
202
|
+
if (typeof IntersectionObserver === 'undefined')
|
|
203
|
+
return;
|
|
204
|
+
// Only a trigger seen in view this opening closes the menu when it leaves.
|
|
205
|
+
let triggerSeen = false;
|
|
206
|
+
let broughtIntoView = false;
|
|
207
|
+
this.triggerVisibility = new IntersectionObserver((entries) => {
|
|
208
|
+
if (!this.isOpen)
|
|
209
|
+
return;
|
|
210
|
+
if (entries[entries.length - 1].isIntersecting) {
|
|
211
|
+
triggerSeen = true;
|
|
212
|
+
}
|
|
213
|
+
else if (triggerSeen) {
|
|
214
|
+
this.closeDropdown({ preventScroll: true });
|
|
215
|
+
}
|
|
216
|
+
else if (!broughtIntoView) {
|
|
217
|
+
// Opened with its trigger out of view, from the keyboard after an earlier close or from a
|
|
218
|
+
// script, the trigger is scrolled into view so the menu opens beside it. A trigger that
|
|
219
|
+
// still can't be seen leaves the menu open.
|
|
220
|
+
broughtIntoView = true;
|
|
221
|
+
this.triggerEl.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
this.triggerVisibility.observe(this.triggerEl);
|
|
225
|
+
}
|
|
226
|
+
stopWatchingTriggerVisibility() {
|
|
227
|
+
var _a;
|
|
228
|
+
(_a = this.triggerVisibility) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
229
|
+
this.triggerVisibility = null;
|
|
230
|
+
}
|
|
158
231
|
// Outside clicks and scripted closes leave focus where it is; only focus in the menu or on its trigger returns.
|
|
159
232
|
isFocusInMenu() {
|
|
160
233
|
const focused = this.host.getRootNode().activeElement;
|
|
161
234
|
return focused != null && this.host.contains(focused);
|
|
162
235
|
}
|
|
163
236
|
// A trigger whose host can't take focus itself, such as pds-chip, passes it to the control inside.
|
|
164
|
-
focusTrigger() {
|
|
237
|
+
focusTrigger(preventScroll = false) {
|
|
165
238
|
var _a, _b;
|
|
166
|
-
this.triggerEl.focus();
|
|
239
|
+
this.triggerEl.focus({ preventScroll });
|
|
167
240
|
if (this.host.getRootNode().activeElement === this.triggerEl)
|
|
168
241
|
return;
|
|
169
|
-
(_b = (_a = this.triggerEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('button, [href], [tabindex]:not([tabindex="-1"])')) === null || _b === void 0 ? void 0 : _b.focus();
|
|
242
|
+
(_b = (_a = this.triggerEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('button, [href], [tabindex]:not([tabindex="-1"])')) === null || _b === void 0 ? void 0 : _b.focus({ preventScroll });
|
|
170
243
|
}
|
|
171
244
|
// Check if a menu item is disabled (handles both component and raw elements)
|
|
172
245
|
isItemDisabled(item) {
|
|
@@ -371,7 +444,7 @@ const PdsDropdownMenu = class {
|
|
|
371
444
|
}
|
|
372
445
|
}
|
|
373
446
|
render() {
|
|
374
|
-
return (index.h(index.Host, { key: '
|
|
447
|
+
return (index.h(index.Host, { key: '1776921b263178df0de2cdf07a9fb81c668381b6', id: this.componentId }, index.h("slot", { key: '952fdc2b6bb3f1fca5a17dc1962af0e4c38f92e2', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), index.h("pds-box", { key: 'f5f95cebdcf4a4d78d0e4bc47b99c681045f8d38', "border-radius": "sm", display: "flex", direction: "column", class: "pds-dropdown-menu--panel is-hidden", shadow: "100", part: "menu-panel" }, index.h("div", { key: '8bff8a8dd06fe1f433bc512bc0ac9030fc9714e7', class: { 'pds-dropdown-menu__header': true, 'is-hidden': !this.hasHeader } }, index.h("slot", { key: '1c248f137414dd00037d333b1e07c6b04a7b079d', name: "header", onSlotchange: this.handleHeaderSlotChange })), index.h("div", { key: 'db9954f26762a65e762f8c7b3dfd60e363ff8573', class: "pds-dropdown-menu__items", role: "menu", "aria-orientation": "vertical" }, index.h("slot", { key: 'd5cb929db03966d673b23de150970744936cf26d', onSlotchange: this.handleSlotChange })))));
|
|
375
448
|
}
|
|
376
449
|
get host() { return index.getElement(this); }
|
|
377
450
|
};
|
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
var index = require('./index-D9iJuJCP.js');
|
|
4
4
|
var scroll = require('./scroll-2XcoE_6Q.js');
|
|
5
5
|
var index$1 = require('./index-BDnbr0DK.js');
|
|
6
|
+
var truncationTooltip = require('./truncation-tooltip-CM5HgRHh.js');
|
|
6
7
|
require('./keep-hydrated-AKoh0DG4.js');
|
|
8
|
+
require('./floating-ui.dom-Dw41zbyY.js');
|
|
9
|
+
require('./portal-target-e8WQ6dLx.js');
|
|
7
10
|
|
|
8
|
-
const pdsFilterCss = () => `:host{--box-shadow-focus:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring);display:inline-block;position:relative}.pds-filter__trigger{-ms-flex-align:center;align-items:center;anchor-name:--filter-trigger;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-100);-webkit-box-shadow:var(--pine-box-shadow-050);box-shadow:var(--pine-box-shadow-050);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-tertiary);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;font-family:var(--pine-font-family-inter);font-size:var(--pine-font-size-100);font-weight:var(--pine-font-weight-400);gap:var(--pine-dimension-050);letter-spacing:var(--pine-letter-spacing-114);line-height:var(--pine-line-height-150);padding:var(--pine-dimension-025) var(--pine-dimension-125);position:relative;-webkit-transition:all var(--pine-motion-duration-base) ease;transition:all var(--pine-motion-duration-base) ease}.pds-filter__trigger pds-icon{block-size:var(--pine-font-size-100);color:var(--pine-color-text-secondary);-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-font-size-100)}.pds-filter__trigger:hover,.pds-filter__trigger.pds-filter__trigger--open{background-color:var(--pine-color-background-subtle);border-color:var(--pine-color-border-hover);color:var(--pine-color-text-hover)}.pds-filter__trigger:hover pds-icon,.pds-filter__trigger.pds-filter__trigger--open pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger:disabled{cursor:not-allowed;opacity:0.5}.pds-filter__trigger--selected{background-color:var(--pine-color-purple-050);border-color:var(--pine-color-purple-500);color:var(--pine-color-purple-600)}.pds-filter__trigger--selected pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:hover,.pds-filter__trigger--selected.pds-filter__trigger--open{background-color:var(--pine-color-purple-100);border-color:var(--pine-color-purple-500);color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:hover pds-icon,.pds-filter__trigger--selected.pds-filter__trigger--open pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger--more{background-color:var(--pine-color-background-container-hover);border:var(--pine-border-width-thin) dashed var(--pine-color-border);color:var(--pine-color-text-tertiary)}.pds-filter__trigger--more pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger--more:hover,.pds-filter__trigger--more.pds-filter__trigger--open{background-color:var(--pine-color-background-subtle);border-color:var(--pine-color-border-hover);color:var(--pine-color-text-hover)}.pds-filter__trigger--more:hover pds-icon,.pds-filter__trigger--more.pds-filter__trigger--open pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger--more:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger--clear{background:transparent;border:var(--pine-border-width-thin) solid transparent;border-radius:var(--pine-dimension-100);-webkit-box-shadow:none;box-shadow:none;color:var(--pine-color-purple-600)}.pds-filter__trigger--clear pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:hover{background-color:var(--pine-color-purple-100);border-color:var(--pine-color-purple-100);color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:hover pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__button-content{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;gap:var(--pine-dimension-050);max-inline-size:148px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-filter__button-text{line-height:var(--pine-line-height-150);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-filter__dropdown-icon{block-size:var(--pine-dimension-200);-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-dimension-200)}.pds-filter__popover{background-color:var(--pine-color-background-overlay);border:0;border-radius:var(--pine-dimension-100);-webkit-box-shadow:var(--pine-box-shadow-100);box-shadow:var(--pine-box-shadow-100);display:none;inline-size:
|
|
11
|
+
const pdsFilterCss = () => `:host{--box-shadow-focus:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring);display:inline-block;position:relative}.pds-filter__trigger{-ms-flex-align:center;align-items:center;anchor-name:--filter-trigger;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-100);-webkit-box-shadow:var(--pine-box-shadow-050);box-shadow:var(--pine-box-shadow-050);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-tertiary);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;font-family:var(--pine-font-family-inter);font-size:var(--pine-font-size-100);font-weight:var(--pine-font-weight-400);gap:var(--pine-dimension-050);letter-spacing:var(--pine-letter-spacing-114);line-height:var(--pine-line-height-150);padding:var(--pine-dimension-025) var(--pine-dimension-125);position:relative;-webkit-transition:all var(--pine-motion-duration-base) ease;transition:all var(--pine-motion-duration-base) ease}.pds-filter__trigger pds-icon{block-size:var(--pine-font-size-100);color:var(--pine-color-text-secondary);-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-font-size-100)}.pds-filter__trigger:hover,.pds-filter__trigger.pds-filter__trigger--open{background-color:var(--pine-color-background-subtle);border-color:var(--pine-color-border-hover);color:var(--pine-color-text-hover)}.pds-filter__trigger:hover pds-icon,.pds-filter__trigger.pds-filter__trigger--open pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger:disabled{cursor:not-allowed;opacity:0.5}.pds-filter__trigger--selected{background-color:var(--pine-color-purple-050);border-color:var(--pine-color-purple-500);color:var(--pine-color-purple-600)}.pds-filter__trigger--selected pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:hover,.pds-filter__trigger--selected.pds-filter__trigger--open{background-color:var(--pine-color-purple-100);border-color:var(--pine-color-purple-500);color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:hover pds-icon,.pds-filter__trigger--selected.pds-filter__trigger--open pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger--more{background-color:var(--pine-color-background-container-hover);border:var(--pine-border-width-thin) dashed var(--pine-color-border);color:var(--pine-color-text-tertiary)}.pds-filter__trigger--more pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger--more:hover,.pds-filter__trigger--more.pds-filter__trigger--open{background-color:var(--pine-color-background-subtle);border-color:var(--pine-color-border-hover);color:var(--pine-color-text-hover)}.pds-filter__trigger--more:hover pds-icon,.pds-filter__trigger--more.pds-filter__trigger--open pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger--more:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger--clear{background:transparent;border:var(--pine-border-width-thin) solid transparent;border-radius:var(--pine-dimension-100);-webkit-box-shadow:none;box-shadow:none;color:var(--pine-color-purple-600)}.pds-filter__trigger--clear pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:hover{background-color:var(--pine-color-purple-100);border-color:var(--pine-color-purple-100);color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:hover pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__button-content{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;gap:var(--pine-dimension-050);max-inline-size:148px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-filter__button-text{line-height:var(--pine-line-height-150);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-filter__dropdown-icon{block-size:var(--pine-dimension-200);-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-dimension-200)}.pds-filter__popover{background-color:var(--pine-color-background-overlay);border:0;border-radius:var(--pine-dimension-100);-webkit-box-shadow:var(--pine-box-shadow-100);box-shadow:var(--pine-box-shadow-100);-webkit-box-sizing:border-box;box-sizing:border-box;display:none;inline-size:244px;inset:unset;padding:var(--pine-dimension-100);z-index:var(--pine-z-index-overlay);}.pds-filter__popover:popover-open,.pds-filter__popover.is-open{display:block}.pds-filter__popover{}@supports (anchor-name: --test){.pds-filter__popover{inset-block-start:calc(anchor(--filter-trigger bottom) + var(--pine-dimension-100));inset-inline-start:anchor(--filter-trigger start);position:fixed;position-anchor:--filter-trigger;}.pds-filter__popover.popover-flip-horizontal{inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto}.pds-filter__popover.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover.popover-flip-horizontal.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto;-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover{}.pds-filter__popover.is-open.popover-flip-horizontal{inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto}.pds-filter__popover.is-open.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover.is-open.popover-flip-horizontal.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto;-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}}`;
|
|
9
12
|
|
|
10
13
|
const PdsFilter = class {
|
|
11
14
|
constructor(hostRef) {
|
|
@@ -15,6 +18,16 @@ const PdsFilter = class {
|
|
|
15
18
|
this.pdsFilterClear = index.createEvent(this, "pdsFilterClear");
|
|
16
19
|
this.scrollRAF = null;
|
|
17
20
|
this.lastScrollTime = 0;
|
|
21
|
+
this.truncationTooltip = truncationTooltip.bindTruncationTooltips((textEl) => {
|
|
22
|
+
var _a;
|
|
23
|
+
return ({
|
|
24
|
+
// The trigger, not the host, whose child the popover is; `__button-content` holds the max width, so the text overflows.
|
|
25
|
+
hostEl: (_a = textEl.closest('button')) !== null && _a !== void 0 ? _a : textEl,
|
|
26
|
+
contentEl: textEl,
|
|
27
|
+
getTooltipText: () => { var _a; return (_a = this.text) !== null && _a !== void 0 ? _a : ''; },
|
|
28
|
+
manageTabIndex: false,
|
|
29
|
+
});
|
|
30
|
+
});
|
|
18
31
|
/**
|
|
19
32
|
* The variant style of the filter trigger.
|
|
20
33
|
* @defaultValue 'default'
|
|
@@ -118,11 +131,15 @@ const PdsFilter = class {
|
|
|
118
131
|
// The toggle event listener will capture the state change and emit events
|
|
119
132
|
};
|
|
120
133
|
}
|
|
134
|
+
connectedCallback() {
|
|
135
|
+
this.syncTruncationTooltip();
|
|
136
|
+
}
|
|
121
137
|
/**
|
|
122
138
|
* Component lifecycle: Clean up when disconnected from DOM.
|
|
123
139
|
* Prevents memory leaks by canceling pending operations and closing popovers.
|
|
124
140
|
*/
|
|
125
141
|
disconnectedCallback() {
|
|
142
|
+
this.truncationTooltip.destroy();
|
|
126
143
|
// Cancel pending animation frames
|
|
127
144
|
if (this.scrollRAF) {
|
|
128
145
|
cancelAnimationFrame(this.scrollRAF);
|
|
@@ -148,6 +165,7 @@ const PdsFilter = class {
|
|
|
148
165
|
}
|
|
149
166
|
}
|
|
150
167
|
componentDidRender() {
|
|
168
|
+
this.syncTruncationTooltip();
|
|
151
169
|
// Note: popoverEl is set via ref callback in render method
|
|
152
170
|
// For browsers with native popover API, we need direct element listeners
|
|
153
171
|
// since the document listener may not capture native popover toggle events
|
|
@@ -161,6 +179,10 @@ const PdsFilter = class {
|
|
|
161
179
|
}
|
|
162
180
|
}
|
|
163
181
|
}
|
|
182
|
+
syncTruncationTooltip() {
|
|
183
|
+
var _a;
|
|
184
|
+
this.truncationTooltip.sync([(_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.pds-filter__button-text')]);
|
|
185
|
+
}
|
|
164
186
|
/**
|
|
165
187
|
* Reposition popovers on window resize.
|
|
166
188
|
*/
|
|
@@ -481,7 +503,7 @@ const PdsFilter = class {
|
|
|
481
503
|
return null;
|
|
482
504
|
}
|
|
483
505
|
render() {
|
|
484
|
-
return (index.h(index.Host, { key: '
|
|
506
|
+
return (index.h(index.Host, { key: '0876855dacf0172f83a6e1afcc8b9b1b6acf1251', id: this.componentId }, index.h("button", { key: 'e20b93644a520ed3351fb5802d1e6f0cb2465248', class: this.getTriggerClasses(), type: "button", popoverTarget: this.variant !== 'clear' ? `${this.componentId}-popover` : undefined, popoverTargetAction: this.variant !== 'clear' ? 'toggle' : undefined, onKeyDown: this.variant === 'clear' ? this.handleKeyDown : undefined, onClick: (event) => this.handleClick(event), part: "button", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": this.variant !== 'clear' ? 'true' : undefined, "aria-controls": this.variant !== 'clear' ? `${this.componentId}-popover` : undefined }, index.h("span", { key: '075e2f221d297ede0a52185853acbd3e74b99339', class: "pds-filter__button-content", part: "button-content" }, this.renderIcon(), this.text && (index.h("span", { key: 'cd1d3a15e0969c3d960786a7fd7fd7b3195dd4de', class: "pds-filter__button-text", part: "button-text" }, this.text)), this.renderDropdownIcon())), this.variant !== 'clear' && (index.h("div", { key: '6524cb11b96f03ef5c528325a950c9f80f5ae9fa', ref: el => this.popoverEl = el, id: `${this.componentId}-popover`, class: "pds-filter__popover", popover: "auto", part: "popover" }, index.h("slot", { key: '06cc2ca22068ccedbddf3ff69ce4a352fd01d142' })))));
|
|
485
507
|
}
|
|
486
508
|
get el() { return index.getElement(this); }
|
|
487
509
|
};
|