@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,5 +1,9 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { closest } from "../../../utils/closest";
|
|
3
|
+
/**
|
|
4
|
+
* @part row - Set on the `pds-table-row` element itself, so `::part(row)` matches it only from a shadow root that contains it. Style `pds-table-row` directly instead.
|
|
5
|
+
* @part row-checkbox - Exposes the row's selection checkbox for styling. Appears only when the table is `selectable`.
|
|
6
|
+
*/
|
|
3
7
|
export class PdsTableRow {
|
|
4
8
|
constructor() {
|
|
5
9
|
this.observer = null;
|
|
@@ -137,7 +141,7 @@ export class PdsTableRow {
|
|
|
137
141
|
}
|
|
138
142
|
}
|
|
139
143
|
render() {
|
|
140
|
-
return (h(Host, { key: '
|
|
144
|
+
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' })));
|
|
141
145
|
}
|
|
142
146
|
static get is() { return "pds-table-row"; }
|
|
143
147
|
static get encapsulation() { return "shadow"; }
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
outline: var(--pine-outline-focus);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
:host(.is-fixed-layout) {
|
|
18
|
+
table-layout: fixed;
|
|
19
|
+
}
|
|
20
|
+
|
|
17
21
|
/*
|
|
18
22
|
* Responsive Table Architecture
|
|
19
23
|
*
|
|
@@ -67,6 +71,10 @@
|
|
|
67
71
|
width: 100% !important;
|
|
68
72
|
}
|
|
69
73
|
|
|
74
|
+
.pds-table-responsive-wrapper .pds-table.is-fixed-layout {
|
|
75
|
+
table-layout: fixed !important;
|
|
76
|
+
}
|
|
77
|
+
|
|
70
78
|
/* Shadows positioned relative to host (non-scrolling), covering container edges */
|
|
71
79
|
.scroll-shadow-left,
|
|
72
80
|
.scroll-shadow-right {
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
1
|
+
import { Host, h, forceUpdate } from "@stencil/core";
|
|
2
2
|
import { getScrollOffsetFromStart } from "../../utils/scroll";
|
|
3
|
+
// A column with no width of its own, under table-layout: fixed, otherwise shares whatever's left
|
|
4
|
+
// after the explicit-width columns -- which can go to nothing on a narrow viewport. Below this,
|
|
5
|
+
// it keeps this floor instead and the table grows wider, scrollable under `responsive` -- the
|
|
6
|
+
// only mode this applies in. Without `responsive` there's no container to measure that the floor
|
|
7
|
+
// itself can't grow (the table's own width would, chasing its tail) and no way to scroll the
|
|
8
|
+
// overflow it would create.
|
|
9
|
+
const AUTO_COLUMN_FLOOR_WIDTH_PX = 120;
|
|
10
|
+
/**
|
|
11
|
+
* @part responsive-container - Exposes the horizontal scroll container for styling. Appears only when `responsive` is set.
|
|
12
|
+
* @part responsive-table - Set on the `pds-table` element itself when `responsive` is set, so `::part(responsive-table)` matches it only from a shadow root that contains it. Style `pds-table` directly instead.
|
|
13
|
+
* @part responsive-wrapper - Exposes the wrapper inside the scroll container for styling. Appears only when `responsive` is set.
|
|
14
|
+
* @part scroll-shadow-left - Exposes the scroll shadow at the inline-start edge for styling. Appears only when `responsive` is set.
|
|
15
|
+
* @part scroll-shadow-right - Exposes the scroll shadow at the inline-end edge for styling. Appears only when `responsive` is set.
|
|
16
|
+
* @part table - Set on the `pds-table` element itself, so `::part(table)` matches it only from a shadow root that contains it. Style `pds-table` directly instead.
|
|
17
|
+
* @part table-inner - Exposes the inner table element around the slotted head and body for styling. Appears only when `responsive` is set.
|
|
18
|
+
*/
|
|
3
19
|
export class PdsTable {
|
|
4
20
|
constructor() {
|
|
5
21
|
this.scrollContainer = null;
|
|
@@ -7,6 +23,14 @@ export class PdsTable {
|
|
|
7
23
|
this._responsiveHandleResize = null;
|
|
8
24
|
this._responsiveResizeObserver = null;
|
|
9
25
|
this._teardownResponsive = null;
|
|
26
|
+
this._fixedLayoutResizeObserver = null;
|
|
27
|
+
this._fixedLayoutHandleResize = null;
|
|
28
|
+
this._fixedLayoutMutationObserver = null;
|
|
29
|
+
this._pendingColumnWidthsRecalc = false;
|
|
30
|
+
// componentDidLoad fires once; a later connectedCallback (the table was re-parented, reordered,
|
|
31
|
+
// or moved by a DOM morph) needs this to know it's a reconnect, not the first load, so it
|
|
32
|
+
// re-attaches what disconnectedCallback tore down.
|
|
33
|
+
this.hasLoaded = false;
|
|
10
34
|
/**
|
|
11
35
|
* Hides the select-all checkbox in the table header while keeping individual row checkboxes functional.
|
|
12
36
|
* Only applies when `selectable` is true.
|
|
@@ -18,6 +42,18 @@ export class PdsTable {
|
|
|
18
42
|
* @defaultValue false
|
|
19
43
|
*/
|
|
20
44
|
this.rowDividers = false;
|
|
45
|
+
/**
|
|
46
|
+
* Sets how the table sizes its columns. With `auto`, each column is sized from its content,
|
|
47
|
+
* so columns can change width when the rows change (for example after a sort). With `fixed`,
|
|
48
|
+
* columns take the `width` set on their `pds-table-head-cell` and ignore their content;
|
|
49
|
+
* columns without a `width` share the remaining space. Under `responsive`, that remaining
|
|
50
|
+
* share keeps a 120px floor on narrow viewports where the other columns' widths already fill
|
|
51
|
+
* it, growing the table instead (scrollable) -- without `responsive` there's no floor, since
|
|
52
|
+
* there would be nothing to scroll the overflow it would create. Content longer than its
|
|
53
|
+
* column overflows, so add `truncate` to cells whose content may not fit.
|
|
54
|
+
* @defaultValue 'auto'
|
|
55
|
+
*/
|
|
56
|
+
this.tableLayout = 'auto';
|
|
21
57
|
/**
|
|
22
58
|
* The direction to sort the default column on initial load.
|
|
23
59
|
* Only applies if `defaultSortColumn` is set.
|
|
@@ -34,11 +70,89 @@ export class PdsTable {
|
|
|
34
70
|
* @defaultValue 'asc'
|
|
35
71
|
*/
|
|
36
72
|
this.sortingDirection = 'asc';
|
|
73
|
+
/**
|
|
74
|
+
* `tableLayout` or `responsive` changing at runtime is handled here, deferred to
|
|
75
|
+
* `componentDidRender` rather than done directly -- a `@Watch` runs before this component's
|
|
76
|
+
* own re-render, and both the floor's measurement and the responsive scroll setup query
|
|
77
|
+
* `.pds-table-responsive-container`, which that re-render is what creates or removes. Reading
|
|
78
|
+
* it any earlier would still see the old tree.
|
|
79
|
+
*/
|
|
80
|
+
this._pendingFixedLayoutInputsSync = false;
|
|
81
|
+
/**
|
|
82
|
+
* Measures the explicit-width columns against the available space and gives the columns with
|
|
83
|
+
* no `width` of their own (which otherwise share whatever's left) a floor so none of them
|
|
84
|
+
* squeeze below `AUTO_COLUMN_FLOOR_WIDTH_PX`. Re-run on resize, since the responsive
|
|
85
|
+
* container's available width can change after load -- and only under `responsive`: that
|
|
86
|
+
* container is the one thing in this layout the floor's own growth can't also grow, which is
|
|
87
|
+
* what keeps this from measuring its own effect and oscillating.
|
|
88
|
+
* @private
|
|
89
|
+
*/
|
|
90
|
+
this.recalcAutoColumnWidths = () => {
|
|
91
|
+
var _a, _b, _c, _d, _e, _f;
|
|
92
|
+
if (this.tableLayout !== 'fixed' || !this.responsive)
|
|
93
|
+
return;
|
|
94
|
+
const headCells = Array.from(this.el.querySelectorAll('pds-table-head-cell'));
|
|
95
|
+
const autoCells = [];
|
|
96
|
+
let explicitWidthPx = 0;
|
|
97
|
+
for (const cell of headCells) {
|
|
98
|
+
if (!cell.getAttribute('width')) {
|
|
99
|
+
autoCells.push(cell);
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
// Measured from layout rather than parsed from the attribute, so any CSS length -- px,
|
|
103
|
+
// rem, %, a token -- counts correctly, the same as the select-all column below.
|
|
104
|
+
explicitWidthPx += cell.getBoundingClientRect().width;
|
|
105
|
+
}
|
|
106
|
+
if (autoCells.length === 0)
|
|
107
|
+
return;
|
|
108
|
+
// A selectable table's select-all column lives in pds-table-head's shadow root, out of reach
|
|
109
|
+
// of the query above, and its width is a token rather than a px value -- so measure it.
|
|
110
|
+
if (this.selectable) {
|
|
111
|
+
const selectAllCell = (_b = (_a = this.el
|
|
112
|
+
.querySelector('pds-table-head')) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('pds-table-head-cell');
|
|
113
|
+
explicitWidthPx += (_c = selectAllCell === null || selectAllCell === void 0 ? void 0 : selectAllCell.getBoundingClientRect().width) !== null && _c !== void 0 ? _c : 0;
|
|
114
|
+
}
|
|
115
|
+
const measureEl = (_d = this.el.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector('.pds-table-responsive-container');
|
|
116
|
+
const availableWidth = (_e = measureEl === null || measureEl === void 0 ? void 0 : measureEl.clientWidth) !== null && _e !== void 0 ? _e : 0;
|
|
117
|
+
const sharePerAutoColumn = (availableWidth - explicitWidthPx) / autoCells.length;
|
|
118
|
+
const needsFloor = sharePerAutoColumn < AUTO_COLUMN_FLOOR_WIDTH_PX;
|
|
119
|
+
autoCells.forEach((cell) => {
|
|
120
|
+
if (needsFloor) {
|
|
121
|
+
cell.style.setProperty('--pds-table-head-cell-auto-floor-width', `${AUTO_COLUMN_FLOOR_WIDTH_PX}px`);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
cell.style.removeProperty('--pds-table-head-cell-auto-floor-width');
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
// The floor can widen the table past its container on its own, with no scroll or
|
|
128
|
+
// container-resize event of its own to trigger the shadows' usual recompute -- reading
|
|
129
|
+
// `scrollWidth` just below forces the layout the style change above needs anyway.
|
|
130
|
+
(_f = this._responsiveHandleScroll) === null || _f === void 0 ? void 0 : _f.call(this);
|
|
131
|
+
};
|
|
132
|
+
// A `width` attribute change or a new head cell fires this in the same turn as that cell's
|
|
133
|
+
// own re-render, which is what applies `--pds-table-head-cell-width` -- measuring right away
|
|
134
|
+
// would still see the previous layout. Deferred one frame, by which point Stencil's own (also
|
|
135
|
+
// rAF-scheduled) write for that cell has flushed. Resize and window-resize don't need this:
|
|
136
|
+
// both fire only once layout has already settled.
|
|
137
|
+
this.scheduleColumnWidthsRecalc = () => {
|
|
138
|
+
if (this._pendingColumnWidthsRecalc)
|
|
139
|
+
return;
|
|
140
|
+
this._pendingColumnWidthsRecalc = true;
|
|
141
|
+
requestAnimationFrame(() => {
|
|
142
|
+
// A teardown in the meantime (disconnect, or the floor turning off) leaves this flag
|
|
143
|
+
// cleared but can't cancel an already-scheduled frame -- checked here so it's a no-op
|
|
144
|
+
// rather than measuring and writing styles on a table that's no longer set up for it.
|
|
145
|
+
if (!this._pendingColumnWidthsRecalc)
|
|
146
|
+
return;
|
|
147
|
+
this._pendingColumnWidthsRecalc = false;
|
|
148
|
+
if (this.el.isConnected)
|
|
149
|
+
this.recalcAutoColumnWidths();
|
|
150
|
+
});
|
|
151
|
+
};
|
|
37
152
|
}
|
|
38
153
|
componentDidLoad() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
154
|
+
this.hasLoaded = true;
|
|
155
|
+
this.attachLifecycleBoundSetup();
|
|
42
156
|
// Apply default sort if specified
|
|
43
157
|
// Use requestAnimationFrame to defer until child components are fully initialized
|
|
44
158
|
if (this.defaultSortColumn) {
|
|
@@ -74,11 +188,150 @@ export class PdsTable {
|
|
|
74
188
|
console.warn(`Default sort column "${this.defaultSortColumn}" not found.`);
|
|
75
189
|
}
|
|
76
190
|
}
|
|
191
|
+
/**
|
|
192
|
+
* Re-attaches the responsive scroll listeners and the fixed-layout width floor after the table
|
|
193
|
+
* reconnects (it was re-parented, reordered, or moved by a DOM morph) -- `disconnectedCallback`
|
|
194
|
+
* tears both down, and neither comes back on its own.
|
|
195
|
+
*/
|
|
196
|
+
connectedCallback() {
|
|
197
|
+
if (!this.hasLoaded)
|
|
198
|
+
return;
|
|
199
|
+
this.attachLifecycleBoundSetup();
|
|
200
|
+
}
|
|
201
|
+
attachLifecycleBoundSetup() {
|
|
202
|
+
if (this.responsive) {
|
|
203
|
+
this.setupResponsiveScrolling();
|
|
204
|
+
}
|
|
205
|
+
if (this.tableLayout === 'fixed' && this.responsive) {
|
|
206
|
+
this.setupFixedLayoutWidths();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
77
209
|
disconnectedCallback() {
|
|
78
210
|
if (this._teardownResponsive) {
|
|
79
211
|
this._teardownResponsive();
|
|
80
212
|
this._teardownResponsive = null;
|
|
81
213
|
}
|
|
214
|
+
this.teardownFixedLayoutWidths();
|
|
215
|
+
// A disconnect in the same turn as a pending tableLayout/responsive change could be the
|
|
216
|
+
// table being moved rather than removed for good -- there's no way to tell them apart yet
|
|
217
|
+
// here, and dropping the pending sync unconditionally would lose a change that's still
|
|
218
|
+
// coming once a same-turn reconnect's own render flushes. Checked on a microtask instead, by
|
|
219
|
+
// which point a same-turn reconnect has already happened; a disconnect that sticks still
|
|
220
|
+
// won't leave anything queued to leak a listener later.
|
|
221
|
+
if (this._pendingFixedLayoutInputsSync) {
|
|
222
|
+
queueMicrotask(() => {
|
|
223
|
+
if (!this.el.isConnected)
|
|
224
|
+
this._pendingFixedLayoutInputsSync = false;
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
handleFixedLayoutInputsChange() {
|
|
229
|
+
this._pendingFixedLayoutInputsSync = true;
|
|
230
|
+
}
|
|
231
|
+
componentDidRender() {
|
|
232
|
+
if (!this._pendingFixedLayoutInputsSync)
|
|
233
|
+
return;
|
|
234
|
+
this._pendingFixedLayoutInputsSync = false;
|
|
235
|
+
this.syncFixedLayoutInputs();
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* The floor only applies with `tableLayout="fixed"` and `responsive` both set, so either one
|
|
239
|
+
* changing at runtime can turn it on or off -- and `responsive` on its own also starts or stops
|
|
240
|
+
* the (separate) scroll listeners, same as it does on first load. A head cell only reads
|
|
241
|
+
* `tableLayout` during its own render, and the floor this sets lives in inline style, not a
|
|
242
|
+
* re-render -- so turning the floor off (including live, e.g. the Storybook control) needs
|
|
243
|
+
* both cleared explicitly, not just the observers torn down. The select-all column reads
|
|
244
|
+
* `tableLayout` the same way, one level up in `pds-table-head`'s own render, since it owns that
|
|
245
|
+
* cell rather than letting it through a `<slot>`. A `fixedColumn` cell's own sticky-shadow
|
|
246
|
+
* scroll listener is bound to this same container, cached on the cell itself -- it stays in
|
|
247
|
+
* light DOM across this change and never reconnects on its own, so it needs telling directly
|
|
248
|
+
* rather than finding out the container moved.
|
|
249
|
+
* @private
|
|
250
|
+
*/
|
|
251
|
+
syncFixedLayoutInputs() {
|
|
252
|
+
if (this._teardownResponsive) {
|
|
253
|
+
this._teardownResponsive();
|
|
254
|
+
this._teardownResponsive = null;
|
|
255
|
+
}
|
|
256
|
+
if (this.responsive)
|
|
257
|
+
this.setupResponsiveScrolling();
|
|
258
|
+
this.teardownFixedLayoutWidths();
|
|
259
|
+
const floorActive = this.tableLayout === 'fixed' && this.responsive;
|
|
260
|
+
if (floorActive)
|
|
261
|
+
this.setupFixedLayoutWidths();
|
|
262
|
+
this.allHeadCells().forEach((cell) => {
|
|
263
|
+
if (!floorActive)
|
|
264
|
+
cell.style.removeProperty('--pds-table-head-cell-auto-floor-width');
|
|
265
|
+
forceUpdate(cell);
|
|
266
|
+
void cell.rebindScrollListener();
|
|
267
|
+
});
|
|
268
|
+
this.allBodyCells().forEach((cell) => {
|
|
269
|
+
void cell.rebindScrollListener();
|
|
270
|
+
});
|
|
271
|
+
const head = this.el.querySelector('pds-table-head');
|
|
272
|
+
if (head)
|
|
273
|
+
forceUpdate(head);
|
|
274
|
+
// The select-all cell's `width` is applied by that `forceUpdate`, which hasn't flushed yet --
|
|
275
|
+
// the floor's own recalc above just ran against its previous (or absent) width. That cell
|
|
276
|
+
// sits in `pds-table-head`'s shadow root, out of reach of the mutation observer that would
|
|
277
|
+
// otherwise catch the change, so this needs scheduling directly rather than left to notice.
|
|
278
|
+
if (floorActive)
|
|
279
|
+
this.scheduleColumnWidthsRecalc();
|
|
280
|
+
}
|
|
281
|
+
// The select-all cell sits in `pds-table-head`'s own shadow root, and a selectable row's
|
|
282
|
+
// checkbox cell in its own, rather than coming through a `<slot>` like the rest -- a
|
|
283
|
+
// light-DOM-only `querySelectorAll` from here never reaches either one.
|
|
284
|
+
allHeadCells() {
|
|
285
|
+
var _a;
|
|
286
|
+
const slotted = Array.from(this.el.querySelectorAll('pds-table-head-cell'));
|
|
287
|
+
const head = this.el.querySelector('pds-table-head');
|
|
288
|
+
const ownCell = (_a = head === null || head === void 0 ? void 0 : head.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-table-head-cell');
|
|
289
|
+
return ownCell ? [...slotted, ownCell] : slotted;
|
|
290
|
+
}
|
|
291
|
+
allBodyCells() {
|
|
292
|
+
const slotted = Array.from(this.el.querySelectorAll('pds-table-cell'));
|
|
293
|
+
const rows = Array.from(this.el.querySelectorAll('pds-table-row'));
|
|
294
|
+
const ownCells = rows
|
|
295
|
+
.map((row) => { var _a; return (_a = row.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-table-cell'); })
|
|
296
|
+
.filter((cell) => cell !== null);
|
|
297
|
+
return [...slotted, ...ownCells];
|
|
298
|
+
}
|
|
299
|
+
setupFixedLayoutWidths() {
|
|
300
|
+
this.recalcAutoColumnWidths();
|
|
301
|
+
if (typeof window === 'undefined')
|
|
302
|
+
return;
|
|
303
|
+
this._fixedLayoutHandleResize = () => this.recalcAutoColumnWidths();
|
|
304
|
+
if (window.ResizeObserver) {
|
|
305
|
+
try {
|
|
306
|
+
this._fixedLayoutResizeObserver = new ResizeObserver(this._fixedLayoutHandleResize);
|
|
307
|
+
this._fixedLayoutResizeObserver.observe(this.el);
|
|
308
|
+
}
|
|
309
|
+
catch (error) {
|
|
310
|
+
// ResizeObserver not available in some environments (e.g., tests); window resize still covers it.
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
window.addEventListener('resize', this._fixedLayoutHandleResize);
|
|
314
|
+
// A column added, removed, or given a different `width` changes the floor calc's inputs,
|
|
315
|
+
// and none of that is a resize of anything this observes above.
|
|
316
|
+
if (typeof MutationObserver !== 'undefined') {
|
|
317
|
+
this._fixedLayoutMutationObserver = new MutationObserver(this.scheduleColumnWidthsRecalc);
|
|
318
|
+
this._fixedLayoutMutationObserver.observe(this.el, { childList: true, subtree: true, attributeFilter: ['width'] });
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
teardownFixedLayoutWidths() {
|
|
322
|
+
if (this._fixedLayoutResizeObserver) {
|
|
323
|
+
this._fixedLayoutResizeObserver.disconnect();
|
|
324
|
+
this._fixedLayoutResizeObserver = null;
|
|
325
|
+
}
|
|
326
|
+
if (this._fixedLayoutMutationObserver) {
|
|
327
|
+
this._fixedLayoutMutationObserver.disconnect();
|
|
328
|
+
this._fixedLayoutMutationObserver = null;
|
|
329
|
+
}
|
|
330
|
+
if (typeof window !== 'undefined' && this._fixedLayoutHandleResize) {
|
|
331
|
+
window.removeEventListener('resize', this._fixedLayoutHandleResize);
|
|
332
|
+
}
|
|
333
|
+
this._fixedLayoutHandleResize = null;
|
|
334
|
+
this._pendingColumnWidthsRecalc = false;
|
|
82
335
|
}
|
|
83
336
|
/**
|
|
84
337
|
* Sets up responsive scrolling behavior for the table.
|
|
@@ -172,6 +425,9 @@ export class PdsTable {
|
|
|
172
425
|
if (this.responsive) {
|
|
173
426
|
classNames.push('is-responsive');
|
|
174
427
|
}
|
|
428
|
+
if (this.tableLayout === 'fixed') {
|
|
429
|
+
classNames.push('is-fixed-layout');
|
|
430
|
+
}
|
|
175
431
|
return classNames.join(' ');
|
|
176
432
|
}
|
|
177
433
|
sortTable(column, direction) {
|
|
@@ -240,7 +496,7 @@ export class PdsTable {
|
|
|
240
496
|
}
|
|
241
497
|
render() {
|
|
242
498
|
if (this.responsive) {
|
|
243
|
-
return (h(Host, { class:
|
|
499
|
+
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))))));
|
|
244
500
|
}
|
|
245
501
|
return (h(Host, { class: this.classNames(), id: this.componentId, role: "grid", selectable: this.selectable, tabindex: "0", part: "table" }, h("slot", null)));
|
|
246
502
|
}
|
|
@@ -327,7 +583,7 @@ export class PdsTable {
|
|
|
327
583
|
"optional": false,
|
|
328
584
|
"docs": {
|
|
329
585
|
"tags": [],
|
|
330
|
-
"text": "Determines if the
|
|
586
|
+
"text": "Determines if the table displays a fixed first column."
|
|
331
587
|
},
|
|
332
588
|
"getter": false,
|
|
333
589
|
"setter": false,
|
|
@@ -399,6 +655,29 @@ export class PdsTable {
|
|
|
399
655
|
"attribute": "row-dividers",
|
|
400
656
|
"defaultValue": "false"
|
|
401
657
|
},
|
|
658
|
+
"tableLayout": {
|
|
659
|
+
"type": "string",
|
|
660
|
+
"mutable": false,
|
|
661
|
+
"complexType": {
|
|
662
|
+
"original": "'auto' | 'fixed'",
|
|
663
|
+
"resolved": "\"auto\" | \"fixed\"",
|
|
664
|
+
"references": {}
|
|
665
|
+
},
|
|
666
|
+
"required": false,
|
|
667
|
+
"optional": false,
|
|
668
|
+
"docs": {
|
|
669
|
+
"tags": [{
|
|
670
|
+
"name": "defaultValue",
|
|
671
|
+
"text": "'auto'"
|
|
672
|
+
}],
|
|
673
|
+
"text": "Sets how the table sizes its columns. With `auto`, each column is sized from its content,\nso columns can change width when the rows change (for example after a sort). With `fixed`,\ncolumns take the `width` set on their `pds-table-head-cell` and ignore their content;\ncolumns without a `width` share the remaining space. Under `responsive`, that remaining\nshare keeps a 120px floor on narrow viewports where the other columns' widths already fill\nit, growing the table instead (scrollable) -- without `responsive` there's no floor, since\nthere would be nothing to scroll the overflow it would create. Content longer than its\ncolumn overflows, so add `truncate` to cells whose content may not fit."
|
|
674
|
+
},
|
|
675
|
+
"getter": false,
|
|
676
|
+
"setter": false,
|
|
677
|
+
"reflect": false,
|
|
678
|
+
"attribute": "table-layout",
|
|
679
|
+
"defaultValue": "'auto'"
|
|
680
|
+
},
|
|
402
681
|
"defaultSortColumn": {
|
|
403
682
|
"type": "string",
|
|
404
683
|
"mutable": false,
|
|
@@ -458,7 +737,7 @@ export class PdsTable {
|
|
|
458
737
|
"composed": true,
|
|
459
738
|
"docs": {
|
|
460
739
|
"tags": [],
|
|
461
|
-
"text": "Event that is emitted when the select all checkbox is clicked, carrying the selected value."
|
|
740
|
+
"text": "Event that is emitted by `pds-table-head` when the select all checkbox is clicked, carrying the selected value.\nIt bubbles through the table; the table doesn't emit it itself."
|
|
462
741
|
},
|
|
463
742
|
"complexType": {
|
|
464
743
|
"original": "{ isSelected: boolean }",
|
|
@@ -468,6 +747,15 @@ export class PdsTable {
|
|
|
468
747
|
}];
|
|
469
748
|
}
|
|
470
749
|
static get elementRef() { return "el"; }
|
|
750
|
+
static get watchers() {
|
|
751
|
+
return [{
|
|
752
|
+
"propName": "tableLayout",
|
|
753
|
+
"methodName": "handleFixedLayoutInputsChange"
|
|
754
|
+
}, {
|
|
755
|
+
"propName": "responsive",
|
|
756
|
+
"methodName": "handleFixedLayoutInputsChange"
|
|
757
|
+
}];
|
|
758
|
+
}
|
|
471
759
|
static get listeners() {
|
|
472
760
|
return [{
|
|
473
761
|
"name": "pdsTableSort",
|
|
@@ -65,17 +65,17 @@ const BaseTemplate = (args) => html`
|
|
|
65
65
|
<pds-table-head-cell>Column Title</pds-table-head-cell>
|
|
66
66
|
</pds-table-head>
|
|
67
67
|
<pds-table-body>
|
|
68
|
-
<pds-table-row
|
|
68
|
+
<pds-table-row>
|
|
69
69
|
<pds-table-cell>Row Item Alpha</pds-table-cell>
|
|
70
70
|
<pds-table-cell>Row Item Alpha</pds-table-cell>
|
|
71
71
|
<pds-table-cell>Row Item Alpha</pds-table-cell>
|
|
72
72
|
</pds-table-row>
|
|
73
|
-
<pds-table-row
|
|
73
|
+
<pds-table-row>
|
|
74
74
|
<pds-table-cell>Row Item Bravo</pds-table-cell>
|
|
75
75
|
<pds-table-cell>Row Item Bravo</pds-table-cell>
|
|
76
76
|
<pds-table-cell>Row Item Bravo</pds-table-cell>
|
|
77
77
|
</pds-table-row>
|
|
78
|
-
<pds-table-row
|
|
78
|
+
<pds-table-row>
|
|
79
79
|
<pds-table-cell>Row Item Charlie</pds-table-cell>
|
|
80
80
|
<pds-table-cell>Row Item Charlie</pds-table-cell>
|
|
81
81
|
<pds-table-cell>Row Item Charlie</pds-table-cell>
|
|
@@ -150,7 +150,7 @@ const ResponsiveTemplate = (args) => html`
|
|
|
150
150
|
<pds-table-head-cell>Actions</pds-table-head-cell>
|
|
151
151
|
</pds-table-head>
|
|
152
152
|
<pds-table-body>
|
|
153
|
-
<pds-table-row
|
|
153
|
+
<pds-table-row>
|
|
154
154
|
<pds-table-cell>Row Item Alpha</pds-table-cell>
|
|
155
155
|
<pds-table-cell>Row Item Beta</pds-table-cell>
|
|
156
156
|
<pds-table-cell>Row Item Charlie</pds-table-cell>
|
|
@@ -172,7 +172,7 @@ const ResponsiveTemplate = (args) => html`
|
|
|
172
172
|
</pds-dropdown-menu>
|
|
173
173
|
</pds-table-cell>
|
|
174
174
|
</pds-table-row>
|
|
175
|
-
<pds-table-row
|
|
175
|
+
<pds-table-row>
|
|
176
176
|
<pds-table-cell>Row Item Alpha</pds-table-cell>
|
|
177
177
|
<pds-table-cell>Row Item Beta</pds-table-cell>
|
|
178
178
|
<pds-table-cell>Row Item Charlie</pds-table-cell>
|
|
@@ -194,7 +194,7 @@ const ResponsiveTemplate = (args) => html`
|
|
|
194
194
|
</pds-dropdown-menu>
|
|
195
195
|
</pds-table-cell>
|
|
196
196
|
</pds-table-row>
|
|
197
|
-
<pds-table-row
|
|
197
|
+
<pds-table-row>
|
|
198
198
|
<pds-table-cell>Row Item Alpha</pds-table-cell>
|
|
199
199
|
<pds-table-cell>Row Item Beta</pds-table-cell>
|
|
200
200
|
<pds-table-cell>Row Item Charlie</pds-table-cell>
|
|
@@ -495,3 +495,128 @@ Truncate.args = {
|
|
|
495
495
|
border: true,
|
|
496
496
|
rowDividers: true,
|
|
497
497
|
};
|
|
498
|
+
|
|
499
|
+
const ColumnWidthsTemplate = (args) => html`
|
|
500
|
+
<pds-table
|
|
501
|
+
component-id="column-widths"
|
|
502
|
+
table-layout="${args.tableLayout}"
|
|
503
|
+
?responsive=${args.responsive}
|
|
504
|
+
?row-dividers=${args.rowDividers}
|
|
505
|
+
>
|
|
506
|
+
<pds-table-head ?border=${args.border}>
|
|
507
|
+
<pds-table-head-cell sortable>Name</pds-table-head-cell>
|
|
508
|
+
<pds-table-head-cell sortable width="148px">Lifetime value</pds-table-head-cell>
|
|
509
|
+
<pds-table-head-cell sortable width="134px">Added</pds-table-head-cell>
|
|
510
|
+
<pds-table-head-cell sortable width="216px">Email marketing</pds-table-head-cell>
|
|
511
|
+
</pds-table-head>
|
|
512
|
+
<pds-table-body>
|
|
513
|
+
<pds-table-row>
|
|
514
|
+
<pds-table-cell truncate>Alexandra Christina Rodriguez-Fitzgerald</pds-table-cell>
|
|
515
|
+
<pds-table-cell>$12,480.00</pds-table-cell>
|
|
516
|
+
<pds-table-cell>Mar 4, 2024</pds-table-cell>
|
|
517
|
+
<pds-table-cell>Unsubscribed manually</pds-table-cell>
|
|
518
|
+
</pds-table-row>
|
|
519
|
+
<pds-table-row>
|
|
520
|
+
<pds-table-cell truncate>Bo Li</pds-table-cell>
|
|
521
|
+
<pds-table-cell>$0.00</pds-table-cell>
|
|
522
|
+
<pds-table-cell>Jan 12, 2026</pds-table-cell>
|
|
523
|
+
<pds-table-cell>Subscribed</pds-table-cell>
|
|
524
|
+
</pds-table-row>
|
|
525
|
+
<pds-table-row>
|
|
526
|
+
<pds-table-cell truncate>Jonathan Alexander Bartholomew III</pds-table-cell>
|
|
527
|
+
<pds-table-cell>$1,250,300.00</pds-table-cell>
|
|
528
|
+
<pds-table-cell>Sep 30, 2025</pds-table-cell>
|
|
529
|
+
<pds-table-cell>Not subscribed</pds-table-cell>
|
|
530
|
+
</pds-table-row>
|
|
531
|
+
<pds-table-row>
|
|
532
|
+
<pds-table-cell truncate>Mia Chen</pds-table-cell>
|
|
533
|
+
<pds-table-cell>$75.00</pds-table-cell>
|
|
534
|
+
<pds-table-cell>Jul 1, 2025</pds-table-cell>
|
|
535
|
+
<pds-table-cell>Subscribed</pds-table-cell>
|
|
536
|
+
</pds-table-row>
|
|
537
|
+
</pds-table-body>
|
|
538
|
+
</pds-table>
|
|
539
|
+
<pds-text tag="p" size="xs" color="secondary" gutter="sm">Sort any column: with a fixed table layout, the columns keep their widths whichever rows come first. Set the table layout to auto to compare.</pds-text>`;
|
|
540
|
+
|
|
541
|
+
export const ColumnWidths = ColumnWidthsTemplate.bind();
|
|
542
|
+
ColumnWidths.args = {
|
|
543
|
+
border: true,
|
|
544
|
+
responsive: false,
|
|
545
|
+
rowDividers: true,
|
|
546
|
+
tableLayout: 'fixed',
|
|
547
|
+
};
|
|
548
|
+
ColumnWidths.argTypes = {
|
|
549
|
+
tableLayout: {
|
|
550
|
+
control: { type: 'select' },
|
|
551
|
+
options: ['auto', 'fixed'],
|
|
552
|
+
description: 'Sets how the table sizes its columns. With `fixed`, columns take the `width` set on their `pds-table-head-cell` and ignore their content.',
|
|
553
|
+
},
|
|
554
|
+
};
|
|
555
|
+
|
|
556
|
+
const ColumnWidthsResponsiveTemplate = (args) => html`
|
|
557
|
+
<pds-table
|
|
558
|
+
component-id="column-widths-responsive"
|
|
559
|
+
table-layout="${args.tableLayout}"
|
|
560
|
+
?fixed-column=${args.fixedColumn}
|
|
561
|
+
?responsive=${args.responsive}
|
|
562
|
+
?row-dividers=${args.rowDividers}
|
|
563
|
+
>
|
|
564
|
+
<pds-table-head ?border=${args.border}>
|
|
565
|
+
<pds-table-head-cell sortable>Name</pds-table-head-cell>
|
|
566
|
+
<pds-table-head-cell sortable width="148px">Lifetime value</pds-table-head-cell>
|
|
567
|
+
<pds-table-head-cell sortable width="134px">Added</pds-table-head-cell>
|
|
568
|
+
<pds-table-head-cell sortable width="216px">Email marketing</pds-table-head-cell>
|
|
569
|
+
<pds-table-head-cell sortable width="240px">Tags</pds-table-head-cell>
|
|
570
|
+
<pds-table-head-cell sortable width="180px">Last activity</pds-table-head-cell>
|
|
571
|
+
<pds-table-head-cell sortable width="160px">Source</pds-table-head-cell>
|
|
572
|
+
</pds-table-head>
|
|
573
|
+
<pds-table-body>
|
|
574
|
+
<pds-table-row>
|
|
575
|
+
<pds-table-cell truncate>Alexandra Christina Rodriguez-Fitzgerald</pds-table-cell>
|
|
576
|
+
<pds-table-cell>$12,480.00</pds-table-cell>
|
|
577
|
+
<pds-table-cell>Mar 4, 2024</pds-table-cell>
|
|
578
|
+
<pds-table-cell>Unsubscribed manually</pds-table-cell>
|
|
579
|
+
<pds-table-cell truncate>Customer, Webinar 2024</pds-table-cell>
|
|
580
|
+
<pds-table-cell>Opened an email</pds-table-cell>
|
|
581
|
+
<pds-table-cell>Checkout</pds-table-cell>
|
|
582
|
+
</pds-table-row>
|
|
583
|
+
<pds-table-row>
|
|
584
|
+
<pds-table-cell truncate>Bo Li</pds-table-cell>
|
|
585
|
+
<pds-table-cell>$0.00</pds-table-cell>
|
|
586
|
+
<pds-table-cell>Jan 12, 2026</pds-table-cell>
|
|
587
|
+
<pds-table-cell>Subscribed</pds-table-cell>
|
|
588
|
+
<pds-table-cell truncate>Lead</pds-table-cell>
|
|
589
|
+
<pds-table-cell>Signed up</pds-table-cell>
|
|
590
|
+
<pds-table-cell>Opt-in form</pds-table-cell>
|
|
591
|
+
</pds-table-row>
|
|
592
|
+
<pds-table-row>
|
|
593
|
+
<pds-table-cell truncate>Jonathan Alexander Bartholomew III</pds-table-cell>
|
|
594
|
+
<pds-table-cell>$1,250,300.00</pds-table-cell>
|
|
595
|
+
<pds-table-cell>Sep 30, 2025</pds-table-cell>
|
|
596
|
+
<pds-table-cell>Not subscribed</pds-table-cell>
|
|
597
|
+
<pds-table-cell truncate>Customer, VIP, Coaching</pds-table-cell>
|
|
598
|
+
<pds-table-cell>Bought an offer</pds-table-cell>
|
|
599
|
+
<pds-table-cell>Import</pds-table-cell>
|
|
600
|
+
</pds-table-row>
|
|
601
|
+
<pds-table-row>
|
|
602
|
+
<pds-table-cell truncate>Mia Chen</pds-table-cell>
|
|
603
|
+
<pds-table-cell>$75.00</pds-table-cell>
|
|
604
|
+
<pds-table-cell>Jul 1, 2025</pds-table-cell>
|
|
605
|
+
<pds-table-cell>Subscribed</pds-table-cell>
|
|
606
|
+
<pds-table-cell truncate>Customer</pds-table-cell>
|
|
607
|
+
<pds-table-cell>Completed a lesson</pds-table-cell>
|
|
608
|
+
<pds-table-cell>Landing page</pds-table-cell>
|
|
609
|
+
</pds-table-row>
|
|
610
|
+
</pds-table-body>
|
|
611
|
+
</pds-table>
|
|
612
|
+
<pds-text tag="p" size="xs" color="secondary" gutter="sm">The column widths add up to more than the container, so the table scrolls horizontally. Name has no width and keeps a 120px minimum.</pds-text>`;
|
|
613
|
+
|
|
614
|
+
export const ColumnWidthsResponsive = ColumnWidthsResponsiveTemplate.bind();
|
|
615
|
+
ColumnWidthsResponsive.args = {
|
|
616
|
+
border: true,
|
|
617
|
+
fixedColumn: false,
|
|
618
|
+
responsive: true,
|
|
619
|
+
rowDividers: true,
|
|
620
|
+
tableLayout: 'fixed',
|
|
621
|
+
};
|
|
622
|
+
ColumnWidthsResponsive.argTypes = ColumnWidths.argTypes;
|
|
@@ -43,7 +43,7 @@ export class PdsTabs {
|
|
|
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 @@ export class PdsTabs {
|
|
|
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
|
static get is() { return "pds-tabs"; }
|
|
282
282
|
static get encapsulation() { return "shadow"; }
|
|
@@ -387,7 +387,7 @@ export class PdsTabs {
|
|
|
387
387
|
"name": "defaultValue",
|
|
388
388
|
"text": "false"
|
|
389
389
|
}],
|
|
390
|
-
"text": "Stretches the component
|
|
390
|
+
"text": "Stretches the component to fill its container's height. The active tab panel keeps the height of its content.\nRequires the component to have a constrained height (e.g. a flex parent)."
|
|
391
391
|
},
|
|
392
392
|
"getter": false,
|
|
393
393
|
"setter": false,
|
|
@@ -42,7 +42,7 @@ Pill.args = {
|
|
|
42
42
|
variant: 'pill',
|
|
43
43
|
}
|
|
44
44
|
const AvailabilityTemplate = (args) => html`
|
|
45
|
-
<div style="background-color:
|
|
45
|
+
<div style="background-color: var(--pine-color-background-inset-emphasized); padding: var(--pine-dimension-md);">
|
|
46
46
|
<pds-tabs active-tab-name=${args.activeTabName} variant=${args.variant} component-id=${args.componentId} tablist-label=${args.tablistLabel}>
|
|
47
47
|
<pds-tab name="monday">Monday</pds-tab>
|
|
48
48
|
<pds-tab name="tuesday">Tuesday</pds-tab>
|