@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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-4_RRPJTO.js';
|
|
2
|
+
import { a as closest } from './closest-DHPzKMVS.js';
|
|
2
3
|
import { a as isScrolledFromInlineStart } from './scroll-DtgUQhjl.js';
|
|
3
|
-
import { s as setupTruncationTooltip } from './truncation-tooltip-
|
|
4
|
+
import { s as setupTruncationTooltip } from './truncation-tooltip-CkIWm6Z-.js';
|
|
4
5
|
import './keep-hydrated-BgNaWLoS.js';
|
|
5
6
|
import './floating-ui.dom-Cuc0DYlm.js';
|
|
6
7
|
import './portal-target-CKRzRKdO.js';
|
|
@@ -37,14 +38,16 @@ const PdsTableCell = class {
|
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
componentWillRender() {
|
|
40
|
-
|
|
41
|
+
// The shadow-crossing `closest` util, not the native one -- a selectable row's checkbox
|
|
42
|
+
// cell lives inside pds-table-row's own shadow root, which native `closest` can't see past.
|
|
43
|
+
this.tableRef = closest('pds-table', this.hostElement);
|
|
41
44
|
}
|
|
42
45
|
// Fires again each time the cell is moved (a sort re-appends every row), unlike componentDidLoad,
|
|
43
46
|
// so it re-binds what disconnectedCallback tore down. The tooltip binds to the host, which exists before load.
|
|
44
47
|
connectedCallback() {
|
|
45
48
|
if (!this.hasLoaded)
|
|
46
49
|
return;
|
|
47
|
-
this.tableRef =
|
|
50
|
+
this.tableRef = closest('pds-table', this.hostElement);
|
|
48
51
|
this.cleanupScrollListener();
|
|
49
52
|
if (this.needsScrollShadow) {
|
|
50
53
|
this.setupScrollListener();
|
|
@@ -110,6 +113,22 @@ const PdsTableCell = class {
|
|
|
110
113
|
this.setupTimer = undefined;
|
|
111
114
|
}
|
|
112
115
|
this.setupRetries = 0; // Reset retry counter
|
|
116
|
+
// Without a listener there's no way to know the scroll position any more, so the shadow
|
|
117
|
+
// this drove shouldn't linger -- matters when a rebind tears this down without setting it
|
|
118
|
+
// back up (responsive turned off while scrolled), not just on disconnect.
|
|
119
|
+
this.tableScrolling = false;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Re-binds the scroll listener to the table's current responsive container. Called by
|
|
123
|
+
* `pds-table` after a live `responsive` toggle: the cell stays in light DOM across that change,
|
|
124
|
+
* so it never reconnects on its own and would otherwise keep listening to a container the
|
|
125
|
+
* table already replaced or removed.
|
|
126
|
+
*/
|
|
127
|
+
async rebindScrollListener() {
|
|
128
|
+
this.cleanupScrollListener();
|
|
129
|
+
if (this.needsScrollShadow) {
|
|
130
|
+
this.setupScrollListener();
|
|
131
|
+
}
|
|
113
132
|
}
|
|
114
133
|
handleTruncateChange(newValue) {
|
|
115
134
|
if (newValue) {
|
|
@@ -150,11 +169,11 @@ const PdsTableCell = class {
|
|
|
150
169
|
return classNames.join(' ');
|
|
151
170
|
}
|
|
152
171
|
render() {
|
|
153
|
-
return (h(Host, { key: '
|
|
172
|
+
return (h(Host, { key: 'bc40b70bcb8f1df7307df6c00e3b73427c8d5ff2', class: this.classNames(), role: "gridcell", part: "cell", style: this.tableRef &&
|
|
154
173
|
this.tableRef.fixedColumn &&
|
|
155
174
|
this.tableRef.selectable
|
|
156
175
|
? { '--fixed-cell-position': '40px' }
|
|
157
|
-
: {} }, h("slot", { key: '
|
|
176
|
+
: {} }, h("slot", { key: '418219bf8b870557f5f39ae6553db78fe7037389' })));
|
|
158
177
|
}
|
|
159
178
|
get hostElement() { return getElement(this); }
|
|
160
179
|
static get watchers() { return {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-4_RRPJTO.js';
|
|
2
|
-
import {
|
|
2
|
+
import { i as upSmall, d as downSmall } from './index-B0DXTeeV.js';
|
|
3
|
+
import { a as closest } from './closest-DHPzKMVS.js';
|
|
3
4
|
import { a as isScrolledFromInlineStart } from './scroll-DtgUQhjl.js';
|
|
4
5
|
import './keep-hydrated-BgNaWLoS.js';
|
|
5
6
|
|
|
6
|
-
const pdsTableHeadCellCss = () => `:host{--border-head-cell-default:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);--box-shadow-default:3px 3px 6px -2px rgba(0, 0, 0, 0.1);-webkit-border-after:var(--border-head-cell-default);border-block-end:var(--border-head-cell-default);color:var(--pine-color-text);display:table-cell;font-family:var(--pine-font-family-body);font-size:var(--pine-font-size);font-weight:var(--pine-font-weight-regular);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);padding:var(--pine-dimension-sm);position:relative;text-align:start;vertical-align:inherit}:host(.is-compact){padding-block:var(--pine-dimension-2xs)}:host(.is-fixed){background:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host(.is-fixed.has-head-background){background-color:var(--pine-color-background-subtle)}:host(.has-head-border){-webkit-border-before:var(--border-head-cell-default);border-block-start:var(--border-head-cell-default)}:host-context([dir=rtl]){--box-shadow-default:-3px 3px 6px -2px rgba(0, 0, 0, 0.1)}:host(.has-scrolled.is-fixed){-webkit-box-shadow:var(--box-shadow-default);box-shadow:var(--box-shadow-default)}:host(.is-sortable){cursor:pointer}:host(.is-sortable) pds-icon{-webkit-margin-start:var(--pine-dimension-2xs);margin-inline-start:var(--pine-dimension-2xs);-webkit-padding-before:2px;padding-block-start:2px;position:absolute}:host(.is-sortable:hover),:host(.is-active){color:var(--pine-color-text-strong)}:host(.pds-table-head-cell--align-start){text-align:start}:host(.pds-table-head-cell--align-center){text-align:center}:host(.pds-table-head-cell--align-end){text-align:end}:host(.pds-table-head-cell--align-justify){text-align:justify}`;
|
|
7
|
+
const pdsTableHeadCellCss = () => `:host{--border-head-cell-default:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);--box-shadow-default:3px 3px 6px -2px rgba(0, 0, 0, 0.1);-webkit-border-after:var(--border-head-cell-default);border-block-end:var(--border-head-cell-default);color:var(--pine-color-text);display:table-cell;font-family:var(--pine-font-family-body);font-size:var(--pine-font-size);font-weight:var(--pine-font-weight-regular);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);padding:var(--pine-dimension-sm);position:relative;text-align:start;vertical-align:inherit}:host(.has-width){-webkit-box-sizing:border-box;box-sizing:border-box;min-width:var(--pds-table-head-cell-width);width:var(--pds-table-head-cell-width)}:host(.has-auto-width){-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--pds-table-head-cell-auto-floor-width, auto)}:host(.is-compact){padding-block:var(--pine-dimension-2xs)}:host(.is-fixed){background:var(--pine-color-background-container);inset-inline-start:var(--pine-dimension-none);position:-webkit-sticky;position:sticky;z-index:var(--pine-z-index-raised)}:host(.is-fixed.has-head-background){background-color:var(--pine-color-background-subtle)}:host(.has-head-border){-webkit-border-before:var(--border-head-cell-default);border-block-start:var(--border-head-cell-default)}:host-context([dir=rtl]){--box-shadow-default:-3px 3px 6px -2px rgba(0, 0, 0, 0.1)}:host(.has-scrolled.is-fixed){-webkit-box-shadow:var(--box-shadow-default);box-shadow:var(--box-shadow-default)}:host(.is-sortable){cursor:pointer}:host(.is-sortable) pds-icon{-webkit-margin-start:var(--pine-dimension-2xs);margin-inline-start:var(--pine-dimension-2xs);-webkit-padding-before:2px;padding-block-start:2px;position:absolute}:host(.is-sortable:hover),:host(.is-active){color:var(--pine-color-text-strong)}:host(.pds-table-head-cell--align-start){text-align:start}:host(.pds-table-head-cell--align-center){text-align:center}:host(.pds-table-head-cell--align-end){text-align:end}:host(.pds-table-head-cell--align-justify){text-align:justify}`;
|
|
7
8
|
|
|
8
9
|
const PdsTableHeadCell = class {
|
|
9
10
|
constructor(hostRef) {
|
|
@@ -11,6 +12,7 @@ const PdsTableHeadCell = class {
|
|
|
11
12
|
this.pdsTableSort = createEvent(this, "pdsTableSort");
|
|
12
13
|
this.scrollContainer = null;
|
|
13
14
|
this.setupRetries = 0;
|
|
15
|
+
this.hasLoaded = false;
|
|
14
16
|
/**
|
|
15
17
|
* The direction of sorting.
|
|
16
18
|
*/
|
|
@@ -102,22 +104,39 @@ const PdsTableHeadCell = class {
|
|
|
102
104
|
this.hostElement.classList.remove('is-active');
|
|
103
105
|
}
|
|
104
106
|
componentWillLoad() {
|
|
105
|
-
// Set initial references and state before first render
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
// Set initial references and state before first render. The shadow-crossing `closest`
|
|
108
|
+
// util, not the native one -- the select-all cell lives inside pds-table-head's own shadow
|
|
109
|
+
// root, which native `closest` can't see past.
|
|
110
|
+
this.tableRef = closest('pds-table', this.hostElement);
|
|
111
|
+
const tableHead = closest('pds-table-head', this.hostElement);
|
|
108
112
|
if (tableHead) {
|
|
109
113
|
this.hasHeadBorder = tableHead.hasAttribute('border');
|
|
110
114
|
this.hasHeadBackground = tableHead.hasAttribute('background');
|
|
111
115
|
}
|
|
112
116
|
}
|
|
117
|
+
// Fires again each time the cell is moved (such as a reparent or DOM morph), unlike
|
|
118
|
+
// componentDidLoad, so it re-binds what disconnectedCallback tore down.
|
|
119
|
+
connectedCallback() {
|
|
120
|
+
if (!this.hasLoaded)
|
|
121
|
+
return;
|
|
122
|
+
this.tableRef = closest('pds-table', this.hostElement);
|
|
123
|
+
if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {
|
|
124
|
+
this.setupScrollListener();
|
|
125
|
+
}
|
|
126
|
+
this.setupHeadObserver();
|
|
127
|
+
}
|
|
113
128
|
componentDidLoad() {
|
|
129
|
+
this.hasLoaded = true;
|
|
114
130
|
if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {
|
|
115
131
|
// For responsive tables with fixed columns, set up scroll detection
|
|
116
132
|
// This enables the first column header to show a shadow when the table is scrolled horizontally
|
|
117
133
|
this.setupScrollListener();
|
|
118
134
|
}
|
|
119
|
-
|
|
120
|
-
|
|
135
|
+
this.setupHeadObserver();
|
|
136
|
+
}
|
|
137
|
+
// Watches the parent table-head's border and background attributes.
|
|
138
|
+
setupHeadObserver() {
|
|
139
|
+
const tableHead = closest('pds-table-head', this.hostElement);
|
|
121
140
|
if (tableHead && typeof MutationObserver !== 'undefined') {
|
|
122
141
|
// Defensive guard: disconnect existing observer before creating a new one
|
|
123
142
|
if (this.headObserver) {
|
|
@@ -178,6 +197,22 @@ const PdsTableHeadCell = class {
|
|
|
178
197
|
this.setupTimer = undefined;
|
|
179
198
|
}
|
|
180
199
|
this.setupRetries = 0; // Reset retry counter
|
|
200
|
+
// Without a listener there's no way to know the scroll position any more, so the shadow
|
|
201
|
+
// this drove shouldn't linger -- matters when a rebind tears this down without setting it
|
|
202
|
+
// back up (responsive turned off while scrolled), not just on disconnect.
|
|
203
|
+
this.tableScrolling = false;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Re-binds the scroll listener to the table's current responsive container. Called by
|
|
207
|
+
* `pds-table` after a live `responsive` toggle: the cell stays in light DOM across that
|
|
208
|
+
* change, so it never reconnects on its own and would otherwise keep listening to a container
|
|
209
|
+
* the table already replaced or removed.
|
|
210
|
+
*/
|
|
211
|
+
async rebindScrollListener() {
|
|
212
|
+
this.cleanupScrollListener();
|
|
213
|
+
if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {
|
|
214
|
+
this.setupScrollListener();
|
|
215
|
+
}
|
|
181
216
|
}
|
|
182
217
|
classNames() {
|
|
183
218
|
const classNames = [];
|
|
@@ -202,14 +237,27 @@ const PdsTableHeadCell = class {
|
|
|
202
237
|
if (this.hasHeadBorder) {
|
|
203
238
|
classNames.push('has-head-border');
|
|
204
239
|
}
|
|
240
|
+
if (this.width) {
|
|
241
|
+
classNames.push('has-width');
|
|
242
|
+
}
|
|
243
|
+
else if (this.tableRef && this.tableRef.tableLayout === 'fixed') {
|
|
244
|
+
classNames.push('has-auto-width');
|
|
245
|
+
}
|
|
205
246
|
return classNames.join(' ');
|
|
206
247
|
}
|
|
248
|
+
hostStyles() {
|
|
249
|
+
const styles = {};
|
|
250
|
+
if (this.tableRef && this.tableRef.fixedColumn && this.tableRef.selectable) {
|
|
251
|
+
styles['--fixed-cell-position'] = '40px';
|
|
252
|
+
}
|
|
253
|
+
// Hand the width to the stylesheet as a custom property rather than an inline width.
|
|
254
|
+
if (this.width) {
|
|
255
|
+
styles['--pds-table-head-cell-width'] = this.width;
|
|
256
|
+
}
|
|
257
|
+
return styles;
|
|
258
|
+
}
|
|
207
259
|
render() {
|
|
208
|
-
return (h(Host, { key: '
|
|
209
|
-
this.tableRef.fixedColumn &&
|
|
210
|
-
this.tableRef.selectable
|
|
211
|
-
? { '--fixed-cell-position': '40px' }
|
|
212
|
-
: {} }, h("slot", { key: '7aff5994fe4c5250ce83516960183dbd9ffa9c69' }), this.sortable && this.isActive && (h("pds-icon", { key: '0a7b99ab2c56ea0cfb3aa6f810bf802422a29bef', icon: this.sortingDirection === 'asc' ? upSmall : downSmall, part: "sort-icon", "aria-hidden": "true" }))));
|
|
260
|
+
return (h(Host, { key: '353a05a4026064d05a4b924bec3fa2f17f1902ce', class: this.classNames(), role: "columnheader", onClick: this.toggleSort, part: "head-cell", style: this.hostStyles() }, h("slot", { key: '51ead68fc052805d60bbfc6e626f6aedcc5671fc' }), this.sortable && this.isActive && (h("pds-icon", { key: '9a5c27232f06a15dc8329c329f01b08cb6d836b8', icon: this.sortingDirection === 'asc' ? upSmall : downSmall, part: "sort-icon", "aria-hidden": "true" }))));
|
|
213
261
|
}
|
|
214
262
|
get hostElement() { return getElement(this); }
|
|
215
263
|
};
|
|
@@ -48,7 +48,7 @@ const PdsTableHead = class {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: 'ba81f3a9655b49cf01311c697a8aae3e69de0e81', role: "row", part: "head" }, this.tableRef && this.tableRef.selectable && (h("pds-table-head-cell", { key: '4f182b3053469afbaff81c4918bf66376fc7ade4', part: this.tableRef.selectable ? 'checkbox-cell' : '', width: this.tableRef.tableLayout === 'fixed' ? 'var(--pine-dimension-2xl)' : undefined }, !this.tableRef.disableSelectAll && (h("pds-checkbox", { key: 'b26c7e8c26b3cc837f180431dc53a17ae0d84f1f', componentId: this.generateUniqueId(), indeterminate: this.indeterminate, onInput: this.handleInput, label: "Select All Rows", hideLabel: true, checked: this.isSelected, part: "select-all-checkbox" })))), h("slot", { key: 'e9eef43af95340fcce2d9f2f60800d897ee423f1' })));
|
|
52
52
|
}
|
|
53
53
|
get hostElement() { return getElement(this); }
|
|
54
54
|
};
|
|
@@ -143,7 +143,7 @@ const PdsTableRow = class {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
render() {
|
|
146
|
-
return (h(Host, { key: '
|
|
146
|
+
return (h(Host, { key: '3bf8a5bf5f0ccb4a933a756d3ba52aaa2e35d4f0', class: this.classNames(), role: "row", part: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-cell", { key: '5dfb53c4c7c550abbe445753828aa5a40cf53a7f', part: this.tableRef.fixedColumn ? 'checkbox-cell' : 'checkbox-cell', class: this.tableRef.selectable ? 'has-checkbox' : '' }, h("pds-checkbox", { key: 'a53b603e4e9a09705263341ecacd3b77d96fd75f', componentId: this.generateUniqueId(), onPdsCheckboxChange: this.handleCheckboxChange, indeterminate: this.indeterminate, label: "Select Row", hideLabel: true, checked: this.isSelected, part: "row-checkbox" }))), h("slot", { key: '4ae4007c867694a25b2ca0df6d69635bc0fa7cd0' })));
|
|
147
147
|
}
|
|
148
148
|
get hostElement() { return getElement(this); }
|
|
149
149
|
};
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-4_RRPJTO.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, a as getElement } from './index-4_RRPJTO.js';
|
|
2
2
|
import { g as getScrollOffsetFromStart } from './scroll-DtgUQhjl.js';
|
|
3
3
|
import './keep-hydrated-BgNaWLoS.js';
|
|
4
4
|
|
|
5
|
-
const pdsTableCss = () => `@charset "UTF-8";:host{--color-background-default:var(--pine-color-background-container);background:var(--color-background-default);border-collapse:separate;border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:table;isolation:isolate;width:100%}:host(:focus-visible){outline:var(--pine-outline-focus)}:host(.pds-table-responsive-host){border-radius:inherit;-webkit-box-sizing:border-box !important;box-sizing:border-box !important;display:block !important;max-width:100% !important;overflow:hidden !important;position:relative !important;width:100% !important}.pds-table-responsive-container{border-radius:inherit;-webkit-box-sizing:border-box !important;box-sizing:border-box !important;overflow-x:auto !important;overflow-y:visible !important;position:relative !important;width:100% !important}.pds-table-responsive-wrapper{border-radius:inherit;-webkit-box-sizing:border-box !important;box-sizing:border-box !important;display:block !important;position:relative !important;width:100% !important}.pds-table-responsive-wrapper .pds-table{display:table !important;min-width:-webkit-max-content !important;min-width:-moz-max-content !important;min-width:max-content !important;table-layout:auto !important;white-space:nowrap !important;width:100% !important}.scroll-shadow-left,.scroll-shadow-right{height:100%;opacity:0;pointer-events:none;position:absolute;top:0;-webkit-transition:opacity 0.1s ease;transition:opacity 0.1s ease;width:4px;z-index:var(--pine-z-index)}.scroll-shadow-left{background:-webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.1)), to(transparent));background:linear-gradient(to right, rgba(0, 0, 0, 0.1), transparent);border-end-start-radius:inherit;border-start-start-radius:inherit;inset-inline-start:0}:host-context([dir=rtl]) .scroll-shadow-left{background:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.1)), to(transparent));background:linear-gradient(to left, rgba(0, 0, 0, 0.1), transparent)}.scroll-shadow-right{background:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.1)), to(transparent));background:linear-gradient(to left, rgba(0, 0, 0, 0.1), transparent);border-end-end-radius:inherit;border-start-end-radius:inherit;inset-inline-end:0}:host-context([dir=rtl]) .scroll-shadow-right{background:-webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.1)), to(transparent));background:linear-gradient(to right, rgba(0, 0, 0, 0.1), transparent)}`;
|
|
5
|
+
const pdsTableCss = () => `@charset "UTF-8";:host{--color-background-default:var(--pine-color-background-container);background:var(--color-background-default);border-collapse:separate;border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:table;isolation:isolate;width:100%}:host(:focus-visible){outline:var(--pine-outline-focus)}:host(.is-fixed-layout){table-layout:fixed}:host(.pds-table-responsive-host){border-radius:inherit;-webkit-box-sizing:border-box !important;box-sizing:border-box !important;display:block !important;max-width:100% !important;overflow:hidden !important;position:relative !important;width:100% !important}.pds-table-responsive-container{border-radius:inherit;-webkit-box-sizing:border-box !important;box-sizing:border-box !important;overflow-x:auto !important;overflow-y:visible !important;position:relative !important;width:100% !important}.pds-table-responsive-wrapper{border-radius:inherit;-webkit-box-sizing:border-box !important;box-sizing:border-box !important;display:block !important;position:relative !important;width:100% !important}.pds-table-responsive-wrapper .pds-table{display:table !important;min-width:-webkit-max-content !important;min-width:-moz-max-content !important;min-width:max-content !important;table-layout:auto !important;white-space:nowrap !important;width:100% !important}.pds-table-responsive-wrapper .pds-table.is-fixed-layout{table-layout:fixed !important}.scroll-shadow-left,.scroll-shadow-right{height:100%;opacity:0;pointer-events:none;position:absolute;top:0;-webkit-transition:opacity 0.1s ease;transition:opacity 0.1s ease;width:4px;z-index:var(--pine-z-index)}.scroll-shadow-left{background:-webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.1)), to(transparent));background:linear-gradient(to right, rgba(0, 0, 0, 0.1), transparent);border-end-start-radius:inherit;border-start-start-radius:inherit;inset-inline-start:0}:host-context([dir=rtl]) .scroll-shadow-left{background:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.1)), to(transparent));background:linear-gradient(to left, rgba(0, 0, 0, 0.1), transparent)}.scroll-shadow-right{background:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.1)), to(transparent));background:linear-gradient(to left, rgba(0, 0, 0, 0.1), transparent);border-end-end-radius:inherit;border-start-end-radius:inherit;inset-inline-end:0}:host-context([dir=rtl]) .scroll-shadow-right{background:-webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.1)), to(transparent));background:linear-gradient(to right, rgba(0, 0, 0, 0.1), transparent)}`;
|
|
6
6
|
|
|
7
|
+
// A column with no width of its own, under table-layout: fixed, otherwise shares whatever's left
|
|
8
|
+
// after the explicit-width columns -- which can go to nothing on a narrow viewport. Below this,
|
|
9
|
+
// it keeps this floor instead and the table grows wider, scrollable under `responsive` -- the
|
|
10
|
+
// only mode this applies in. Without `responsive` there's no container to measure that the floor
|
|
11
|
+
// itself can't grow (the table's own width would, chasing its tail) and no way to scroll the
|
|
12
|
+
// overflow it would create.
|
|
13
|
+
const AUTO_COLUMN_FLOOR_WIDTH_PX = 120;
|
|
7
14
|
const PdsTable = class {
|
|
8
15
|
constructor(hostRef) {
|
|
9
16
|
registerInstance(this, hostRef);
|
|
@@ -13,6 +20,14 @@ const PdsTable = class {
|
|
|
13
20
|
this._responsiveHandleResize = null;
|
|
14
21
|
this._responsiveResizeObserver = null;
|
|
15
22
|
this._teardownResponsive = null;
|
|
23
|
+
this._fixedLayoutResizeObserver = null;
|
|
24
|
+
this._fixedLayoutHandleResize = null;
|
|
25
|
+
this._fixedLayoutMutationObserver = null;
|
|
26
|
+
this._pendingColumnWidthsRecalc = false;
|
|
27
|
+
// componentDidLoad fires once; a later connectedCallback (the table was re-parented, reordered,
|
|
28
|
+
// or moved by a DOM morph) needs this to know it's a reconnect, not the first load, so it
|
|
29
|
+
// re-attaches what disconnectedCallback tore down.
|
|
30
|
+
this.hasLoaded = false;
|
|
16
31
|
/**
|
|
17
32
|
* Hides the select-all checkbox in the table header while keeping individual row checkboxes functional.
|
|
18
33
|
* Only applies when `selectable` is true.
|
|
@@ -24,6 +39,18 @@ const PdsTable = class {
|
|
|
24
39
|
* @defaultValue false
|
|
25
40
|
*/
|
|
26
41
|
this.rowDividers = false;
|
|
42
|
+
/**
|
|
43
|
+
* Sets how the table sizes its columns. With `auto`, each column is sized from its content,
|
|
44
|
+
* so columns can change width when the rows change (for example after a sort). With `fixed`,
|
|
45
|
+
* columns take the `width` set on their `pds-table-head-cell` and ignore their content;
|
|
46
|
+
* columns without a `width` share the remaining space. Under `responsive`, that remaining
|
|
47
|
+
* share keeps a 120px floor on narrow viewports where the other columns' widths already fill
|
|
48
|
+
* it, growing the table instead (scrollable) -- without `responsive` there's no floor, since
|
|
49
|
+
* there would be nothing to scroll the overflow it would create. Content longer than its
|
|
50
|
+
* column overflows, so add `truncate` to cells whose content may not fit.
|
|
51
|
+
* @defaultValue 'auto'
|
|
52
|
+
*/
|
|
53
|
+
this.tableLayout = 'auto';
|
|
27
54
|
/**
|
|
28
55
|
* The direction to sort the default column on initial load.
|
|
29
56
|
* Only applies if `defaultSortColumn` is set.
|
|
@@ -40,11 +67,89 @@ const PdsTable = class {
|
|
|
40
67
|
* @defaultValue 'asc'
|
|
41
68
|
*/
|
|
42
69
|
this.sortingDirection = 'asc';
|
|
70
|
+
/**
|
|
71
|
+
* `tableLayout` or `responsive` changing at runtime is handled here, deferred to
|
|
72
|
+
* `componentDidRender` rather than done directly -- a `@Watch` runs before this component's
|
|
73
|
+
* own re-render, and both the floor's measurement and the responsive scroll setup query
|
|
74
|
+
* `.pds-table-responsive-container`, which that re-render is what creates or removes. Reading
|
|
75
|
+
* it any earlier would still see the old tree.
|
|
76
|
+
*/
|
|
77
|
+
this._pendingFixedLayoutInputsSync = false;
|
|
78
|
+
/**
|
|
79
|
+
* Measures the explicit-width columns against the available space and gives the columns with
|
|
80
|
+
* no `width` of their own (which otherwise share whatever's left) a floor so none of them
|
|
81
|
+
* squeeze below `AUTO_COLUMN_FLOOR_WIDTH_PX`. Re-run on resize, since the responsive
|
|
82
|
+
* container's available width can change after load -- and only under `responsive`: that
|
|
83
|
+
* container is the one thing in this layout the floor's own growth can't also grow, which is
|
|
84
|
+
* what keeps this from measuring its own effect and oscillating.
|
|
85
|
+
* @private
|
|
86
|
+
*/
|
|
87
|
+
this.recalcAutoColumnWidths = () => {
|
|
88
|
+
var _a, _b, _c, _d, _e, _f;
|
|
89
|
+
if (this.tableLayout !== 'fixed' || !this.responsive)
|
|
90
|
+
return;
|
|
91
|
+
const headCells = Array.from(this.el.querySelectorAll('pds-table-head-cell'));
|
|
92
|
+
const autoCells = [];
|
|
93
|
+
let explicitWidthPx = 0;
|
|
94
|
+
for (const cell of headCells) {
|
|
95
|
+
if (!cell.getAttribute('width')) {
|
|
96
|
+
autoCells.push(cell);
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
// Measured from layout rather than parsed from the attribute, so any CSS length -- px,
|
|
100
|
+
// rem, %, a token -- counts correctly, the same as the select-all column below.
|
|
101
|
+
explicitWidthPx += cell.getBoundingClientRect().width;
|
|
102
|
+
}
|
|
103
|
+
if (autoCells.length === 0)
|
|
104
|
+
return;
|
|
105
|
+
// A selectable table's select-all column lives in pds-table-head's shadow root, out of reach
|
|
106
|
+
// of the query above, and its width is a token rather than a px value -- so measure it.
|
|
107
|
+
if (this.selectable) {
|
|
108
|
+
const selectAllCell = (_b = (_a = this.el
|
|
109
|
+
.querySelector('pds-table-head')) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('pds-table-head-cell');
|
|
110
|
+
explicitWidthPx += (_c = selectAllCell === null || selectAllCell === void 0 ? void 0 : selectAllCell.getBoundingClientRect().width) !== null && _c !== void 0 ? _c : 0;
|
|
111
|
+
}
|
|
112
|
+
const measureEl = (_d = this.el.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector('.pds-table-responsive-container');
|
|
113
|
+
const availableWidth = (_e = measureEl === null || measureEl === void 0 ? void 0 : measureEl.clientWidth) !== null && _e !== void 0 ? _e : 0;
|
|
114
|
+
const sharePerAutoColumn = (availableWidth - explicitWidthPx) / autoCells.length;
|
|
115
|
+
const needsFloor = sharePerAutoColumn < AUTO_COLUMN_FLOOR_WIDTH_PX;
|
|
116
|
+
autoCells.forEach((cell) => {
|
|
117
|
+
if (needsFloor) {
|
|
118
|
+
cell.style.setProperty('--pds-table-head-cell-auto-floor-width', `${AUTO_COLUMN_FLOOR_WIDTH_PX}px`);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
cell.style.removeProperty('--pds-table-head-cell-auto-floor-width');
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
// The floor can widen the table past its container on its own, with no scroll or
|
|
125
|
+
// container-resize event of its own to trigger the shadows' usual recompute -- reading
|
|
126
|
+
// `scrollWidth` just below forces the layout the style change above needs anyway.
|
|
127
|
+
(_f = this._responsiveHandleScroll) === null || _f === void 0 ? void 0 : _f.call(this);
|
|
128
|
+
};
|
|
129
|
+
// A `width` attribute change or a new head cell fires this in the same turn as that cell's
|
|
130
|
+
// own re-render, which is what applies `--pds-table-head-cell-width` -- measuring right away
|
|
131
|
+
// would still see the previous layout. Deferred one frame, by which point Stencil's own (also
|
|
132
|
+
// rAF-scheduled) write for that cell has flushed. Resize and window-resize don't need this:
|
|
133
|
+
// both fire only once layout has already settled.
|
|
134
|
+
this.scheduleColumnWidthsRecalc = () => {
|
|
135
|
+
if (this._pendingColumnWidthsRecalc)
|
|
136
|
+
return;
|
|
137
|
+
this._pendingColumnWidthsRecalc = true;
|
|
138
|
+
requestAnimationFrame(() => {
|
|
139
|
+
// A teardown in the meantime (disconnect, or the floor turning off) leaves this flag
|
|
140
|
+
// cleared but can't cancel an already-scheduled frame -- checked here so it's a no-op
|
|
141
|
+
// rather than measuring and writing styles on a table that's no longer set up for it.
|
|
142
|
+
if (!this._pendingColumnWidthsRecalc)
|
|
143
|
+
return;
|
|
144
|
+
this._pendingColumnWidthsRecalc = false;
|
|
145
|
+
if (this.el.isConnected)
|
|
146
|
+
this.recalcAutoColumnWidths();
|
|
147
|
+
});
|
|
148
|
+
};
|
|
43
149
|
}
|
|
44
150
|
componentDidLoad() {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
151
|
+
this.hasLoaded = true;
|
|
152
|
+
this.attachLifecycleBoundSetup();
|
|
48
153
|
// Apply default sort if specified
|
|
49
154
|
// Use requestAnimationFrame to defer until child components are fully initialized
|
|
50
155
|
if (this.defaultSortColumn) {
|
|
@@ -80,11 +185,150 @@ const PdsTable = class {
|
|
|
80
185
|
console.warn(`Default sort column "${this.defaultSortColumn}" not found.`);
|
|
81
186
|
}
|
|
82
187
|
}
|
|
188
|
+
/**
|
|
189
|
+
* Re-attaches the responsive scroll listeners and the fixed-layout width floor after the table
|
|
190
|
+
* reconnects (it was re-parented, reordered, or moved by a DOM morph) -- `disconnectedCallback`
|
|
191
|
+
* tears both down, and neither comes back on its own.
|
|
192
|
+
*/
|
|
193
|
+
connectedCallback() {
|
|
194
|
+
if (!this.hasLoaded)
|
|
195
|
+
return;
|
|
196
|
+
this.attachLifecycleBoundSetup();
|
|
197
|
+
}
|
|
198
|
+
attachLifecycleBoundSetup() {
|
|
199
|
+
if (this.responsive) {
|
|
200
|
+
this.setupResponsiveScrolling();
|
|
201
|
+
}
|
|
202
|
+
if (this.tableLayout === 'fixed' && this.responsive) {
|
|
203
|
+
this.setupFixedLayoutWidths();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
83
206
|
disconnectedCallback() {
|
|
84
207
|
if (this._teardownResponsive) {
|
|
85
208
|
this._teardownResponsive();
|
|
86
209
|
this._teardownResponsive = null;
|
|
87
210
|
}
|
|
211
|
+
this.teardownFixedLayoutWidths();
|
|
212
|
+
// A disconnect in the same turn as a pending tableLayout/responsive change could be the
|
|
213
|
+
// table being moved rather than removed for good -- there's no way to tell them apart yet
|
|
214
|
+
// here, and dropping the pending sync unconditionally would lose a change that's still
|
|
215
|
+
// coming once a same-turn reconnect's own render flushes. Checked on a microtask instead, by
|
|
216
|
+
// which point a same-turn reconnect has already happened; a disconnect that sticks still
|
|
217
|
+
// won't leave anything queued to leak a listener later.
|
|
218
|
+
if (this._pendingFixedLayoutInputsSync) {
|
|
219
|
+
queueMicrotask(() => {
|
|
220
|
+
if (!this.el.isConnected)
|
|
221
|
+
this._pendingFixedLayoutInputsSync = false;
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
handleFixedLayoutInputsChange() {
|
|
226
|
+
this._pendingFixedLayoutInputsSync = true;
|
|
227
|
+
}
|
|
228
|
+
componentDidRender() {
|
|
229
|
+
if (!this._pendingFixedLayoutInputsSync)
|
|
230
|
+
return;
|
|
231
|
+
this._pendingFixedLayoutInputsSync = false;
|
|
232
|
+
this.syncFixedLayoutInputs();
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* The floor only applies with `tableLayout="fixed"` and `responsive` both set, so either one
|
|
236
|
+
* changing at runtime can turn it on or off -- and `responsive` on its own also starts or stops
|
|
237
|
+
* the (separate) scroll listeners, same as it does on first load. A head cell only reads
|
|
238
|
+
* `tableLayout` during its own render, and the floor this sets lives in inline style, not a
|
|
239
|
+
* re-render -- so turning the floor off (including live, e.g. the Storybook control) needs
|
|
240
|
+
* both cleared explicitly, not just the observers torn down. The select-all column reads
|
|
241
|
+
* `tableLayout` the same way, one level up in `pds-table-head`'s own render, since it owns that
|
|
242
|
+
* cell rather than letting it through a `<slot>`. A `fixedColumn` cell's own sticky-shadow
|
|
243
|
+
* scroll listener is bound to this same container, cached on the cell itself -- it stays in
|
|
244
|
+
* light DOM across this change and never reconnects on its own, so it needs telling directly
|
|
245
|
+
* rather than finding out the container moved.
|
|
246
|
+
* @private
|
|
247
|
+
*/
|
|
248
|
+
syncFixedLayoutInputs() {
|
|
249
|
+
if (this._teardownResponsive) {
|
|
250
|
+
this._teardownResponsive();
|
|
251
|
+
this._teardownResponsive = null;
|
|
252
|
+
}
|
|
253
|
+
if (this.responsive)
|
|
254
|
+
this.setupResponsiveScrolling();
|
|
255
|
+
this.teardownFixedLayoutWidths();
|
|
256
|
+
const floorActive = this.tableLayout === 'fixed' && this.responsive;
|
|
257
|
+
if (floorActive)
|
|
258
|
+
this.setupFixedLayoutWidths();
|
|
259
|
+
this.allHeadCells().forEach((cell) => {
|
|
260
|
+
if (!floorActive)
|
|
261
|
+
cell.style.removeProperty('--pds-table-head-cell-auto-floor-width');
|
|
262
|
+
forceUpdate(cell);
|
|
263
|
+
void cell.rebindScrollListener();
|
|
264
|
+
});
|
|
265
|
+
this.allBodyCells().forEach((cell) => {
|
|
266
|
+
void cell.rebindScrollListener();
|
|
267
|
+
});
|
|
268
|
+
const head = this.el.querySelector('pds-table-head');
|
|
269
|
+
if (head)
|
|
270
|
+
forceUpdate(head);
|
|
271
|
+
// The select-all cell's `width` is applied by that `forceUpdate`, which hasn't flushed yet --
|
|
272
|
+
// the floor's own recalc above just ran against its previous (or absent) width. That cell
|
|
273
|
+
// sits in `pds-table-head`'s shadow root, out of reach of the mutation observer that would
|
|
274
|
+
// otherwise catch the change, so this needs scheduling directly rather than left to notice.
|
|
275
|
+
if (floorActive)
|
|
276
|
+
this.scheduleColumnWidthsRecalc();
|
|
277
|
+
}
|
|
278
|
+
// The select-all cell sits in `pds-table-head`'s own shadow root, and a selectable row's
|
|
279
|
+
// checkbox cell in its own, rather than coming through a `<slot>` like the rest -- a
|
|
280
|
+
// light-DOM-only `querySelectorAll` from here never reaches either one.
|
|
281
|
+
allHeadCells() {
|
|
282
|
+
var _a;
|
|
283
|
+
const slotted = Array.from(this.el.querySelectorAll('pds-table-head-cell'));
|
|
284
|
+
const head = this.el.querySelector('pds-table-head');
|
|
285
|
+
const ownCell = (_a = head === null || head === void 0 ? void 0 : head.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-table-head-cell');
|
|
286
|
+
return ownCell ? [...slotted, ownCell] : slotted;
|
|
287
|
+
}
|
|
288
|
+
allBodyCells() {
|
|
289
|
+
const slotted = Array.from(this.el.querySelectorAll('pds-table-cell'));
|
|
290
|
+
const rows = Array.from(this.el.querySelectorAll('pds-table-row'));
|
|
291
|
+
const ownCells = rows
|
|
292
|
+
.map((row) => { var _a; return (_a = row.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-table-cell'); })
|
|
293
|
+
.filter((cell) => cell !== null);
|
|
294
|
+
return [...slotted, ...ownCells];
|
|
295
|
+
}
|
|
296
|
+
setupFixedLayoutWidths() {
|
|
297
|
+
this.recalcAutoColumnWidths();
|
|
298
|
+
if (typeof window === 'undefined')
|
|
299
|
+
return;
|
|
300
|
+
this._fixedLayoutHandleResize = () => this.recalcAutoColumnWidths();
|
|
301
|
+
if (window.ResizeObserver) {
|
|
302
|
+
try {
|
|
303
|
+
this._fixedLayoutResizeObserver = new ResizeObserver(this._fixedLayoutHandleResize);
|
|
304
|
+
this._fixedLayoutResizeObserver.observe(this.el);
|
|
305
|
+
}
|
|
306
|
+
catch (error) {
|
|
307
|
+
// ResizeObserver not available in some environments (e.g., tests); window resize still covers it.
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
window.addEventListener('resize', this._fixedLayoutHandleResize);
|
|
311
|
+
// A column added, removed, or given a different `width` changes the floor calc's inputs,
|
|
312
|
+
// and none of that is a resize of anything this observes above.
|
|
313
|
+
if (typeof MutationObserver !== 'undefined') {
|
|
314
|
+
this._fixedLayoutMutationObserver = new MutationObserver(this.scheduleColumnWidthsRecalc);
|
|
315
|
+
this._fixedLayoutMutationObserver.observe(this.el, { childList: true, subtree: true, attributeFilter: ['width'] });
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
teardownFixedLayoutWidths() {
|
|
319
|
+
if (this._fixedLayoutResizeObserver) {
|
|
320
|
+
this._fixedLayoutResizeObserver.disconnect();
|
|
321
|
+
this._fixedLayoutResizeObserver = null;
|
|
322
|
+
}
|
|
323
|
+
if (this._fixedLayoutMutationObserver) {
|
|
324
|
+
this._fixedLayoutMutationObserver.disconnect();
|
|
325
|
+
this._fixedLayoutMutationObserver = null;
|
|
326
|
+
}
|
|
327
|
+
if (typeof window !== 'undefined' && this._fixedLayoutHandleResize) {
|
|
328
|
+
window.removeEventListener('resize', this._fixedLayoutHandleResize);
|
|
329
|
+
}
|
|
330
|
+
this._fixedLayoutHandleResize = null;
|
|
331
|
+
this._pendingColumnWidthsRecalc = false;
|
|
88
332
|
}
|
|
89
333
|
/**
|
|
90
334
|
* Sets up responsive scrolling behavior for the table.
|
|
@@ -178,6 +422,9 @@ const PdsTable = class {
|
|
|
178
422
|
if (this.responsive) {
|
|
179
423
|
classNames.push('is-responsive');
|
|
180
424
|
}
|
|
425
|
+
if (this.tableLayout === 'fixed') {
|
|
426
|
+
classNames.push('is-fixed-layout');
|
|
427
|
+
}
|
|
181
428
|
return classNames.join(' ');
|
|
182
429
|
}
|
|
183
430
|
sortTable(column, direction) {
|
|
@@ -246,11 +493,19 @@ const PdsTable = class {
|
|
|
246
493
|
}
|
|
247
494
|
render() {
|
|
248
495
|
if (this.responsive) {
|
|
249
|
-
return (h(Host, { class:
|
|
496
|
+
return (h(Host, { class: `${this.classNames()} pds-table-responsive-host`, id: this.componentId, role: "grid", selectable: this.selectable, tabindex: "0", part: "table responsive-table" }, h("div", { class: "scroll-shadow-left", part: "scroll-shadow-left" }), h("div", { class: "scroll-shadow-right", part: "scroll-shadow-right" }), h("div", { class: "pds-table-responsive-container", part: "responsive-container" }, h("div", { class: "pds-table-responsive-wrapper", part: "responsive-wrapper" }, h("div", { class: this.classNames(), part: "table-inner" }, h("slot", null))))));
|
|
250
497
|
}
|
|
251
498
|
return (h(Host, { class: this.classNames(), id: this.componentId, role: "grid", selectable: this.selectable, tabindex: "0", part: "table" }, h("slot", null)));
|
|
252
499
|
}
|
|
253
500
|
get el() { return getElement(this); }
|
|
501
|
+
static get watchers() { return {
|
|
502
|
+
"tableLayout": [{
|
|
503
|
+
"handleFixedLayoutInputsChange": 0
|
|
504
|
+
}],
|
|
505
|
+
"responsive": [{
|
|
506
|
+
"handleFixedLayoutInputsChange": 0
|
|
507
|
+
}]
|
|
508
|
+
}; }
|
|
254
509
|
};
|
|
255
510
|
PdsTable.style = pdsTableCss();
|
|
256
511
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-4_RRPJTO.js';
|
|
2
|
-
import { H as HostStylingKeeper } from './attributes-
|
|
2
|
+
import { H as HostStylingKeeper } from './attributes-CD8knu3a.js';
|
|
3
3
|
import { u as unwrapReconnectedContent } from './reconnected-content-RFpTWV6r.js';
|
|
4
4
|
import './keep-hydrated-BgNaWLoS.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-4_RRPJTO.js';
|
|
2
|
-
import { H as HostStylingKeeper } from './attributes-
|
|
2
|
+
import { H as HostStylingKeeper } from './attributes-CD8knu3a.js';
|
|
3
3
|
import './keep-hydrated-BgNaWLoS.js';
|
|
4
4
|
|
|
5
5
|
const pdsTabsCss = () => `:host{--tabs-dimension-panel-margin-top:var(--pine-dimension-none);--tabs-dimension-panel-padding:0;display:block}.pds-tabs__tablist{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-md)}:host(.pds-tabs--divider) .pds-tabs__tablist{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host(.pds-tabs--stretch){block-size:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host(.pds-tabs--stretch) .pds-tabs__tablist{-ms-flex:0 0 auto;flex:0 0 auto}:host(.pds-tabs--availability) .pds-tabs__tablist{gap:var(--pine-dimension-xs)}:host(.pds-tabs--filter) .pds-tabs__tablist{gap:var(--pine-dimension-sm)}:host(.pds-tabs--pill) .pds-tabs__tablist{background-color:var(--pine-color-background-app);border:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-radius:var(--pine-dimension-100);display:-ms-inline-flexbox;display:inline-flex;display:-ms-flexbox;display:flex;gap:0;height:var(--pine-dimension-450)}`;
|
|
@@ -43,7 +43,7 @@ const PdsTabs = class {
|
|
|
43
43
|
*/
|
|
44
44
|
this.divider = false;
|
|
45
45
|
/**
|
|
46
|
-
* Stretches the component
|
|
46
|
+
* Stretches the component to fill its container's height. The active tab panel keeps the height of its content.
|
|
47
47
|
* Requires the component to have a constrained height (e.g. a flex parent).
|
|
48
48
|
* @defaultValue false
|
|
49
49
|
*/
|
|
@@ -276,7 +276,7 @@ const PdsTabs = class {
|
|
|
276
276
|
// Only the classes: `active-tab-name` backs the mutable activeTabName prop, so a morph that drops
|
|
277
277
|
// it is a prop change, not a strip.
|
|
278
278
|
this.hostKeeper.record(hostClass);
|
|
279
|
-
return (h(Host, { key: '
|
|
279
|
+
return (h(Host, { key: '69985d6800ac879a8655d52a6b4f72c5b6a20c61', "active-tab-name": this.activeTabName, class: hostClass, id: this.componentId }, tabList, h("slot", { key: '0fb1b2521b15c77a50d81431cc1f0f6a40360cfa', name: "tabpanels" })));
|
|
280
280
|
}
|
|
281
281
|
get el() { return getElement(this); }
|
|
282
282
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as getElement } from './index-4_RRPJTO.js';
|
|
2
2
|
import { s as setColor } from './utils-OYK5-nwe.js';
|
|
3
|
-
import { F as FOCUSABLE_WRAPPER, s as setupTruncationTooltip } from './truncation-tooltip-
|
|
3
|
+
import { F as FOCUSABLE_WRAPPER, s as setupTruncationTooltip, f as flattenedText } from './truncation-tooltip-CkIWm6Z-.js';
|
|
4
4
|
import { TEXT_SIZES } from './index.js';
|
|
5
5
|
import './keep-hydrated-BgNaWLoS.js';
|
|
6
6
|
import './floating-ui.dom-Cuc0DYlm.js';
|
|
@@ -84,7 +84,9 @@ const PdsText = class {
|
|
|
84
84
|
this.truncationCleanup = setupTruncationTooltip({
|
|
85
85
|
hostEl: this.el,
|
|
86
86
|
contentEl: this.contentEl,
|
|
87
|
-
|
|
87
|
+
// Not `textContent`: a consumer that wraps its own slot in this text, as `pds-alert` does, holds a
|
|
88
|
+
// `<slot>` here, which counts as empty and would leave the tooltip with nothing to show.
|
|
89
|
+
getTooltipText: () => flattenedText(this.el),
|
|
88
90
|
// A wrapping link or button already takes focus, so its focus reveals the text instead of a nested tab stop.
|
|
89
91
|
manageTabIndex: !usesWrapper,
|
|
90
92
|
focusEl: usesWrapper ? wrapper : this.el,
|
|
@@ -120,7 +122,7 @@ const PdsText = class {
|
|
|
120
122
|
? `pds-text--decoration-${this.decoration}`
|
|
121
123
|
: ''}
|
|
122
124
|
`;
|
|
123
|
-
return (h(Tag, { key: '
|
|
125
|
+
return (h(Tag, { key: '3b9efbad7872410a7e07438801ec17382282ab16', ref: (el) => (this.contentEl = el), style: this.color && setColor(this.color), class: typeClasses, part: "content" }, h("slot", { key: '0784e6aee6ce23f93f0e3c077da5fa3ca944aebb' })));
|
|
124
126
|
}
|
|
125
127
|
get el() { return getElement(this); }
|
|
126
128
|
static get watchers() { return {
|