@pine-ds/core 3.12.1 → 3.14.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/mock-pds-modal.js +9 -5
- package/components/mock-pds-modal.js.map +1 -1
- package/components/pds-alert.js +1 -1
- package/components/pds-alert.js.map +1 -1
- package/components/pds-avatar.js +18 -5
- package/components/pds-avatar.js.map +1 -1
- package/components/pds-button2.js.map +1 -1
- package/components/pds-checkbox2.js.map +1 -1
- package/components/pds-chip2.js.map +1 -1
- package/components/pds-combobox.js +1 -1
- package/components/pds-combobox.js.map +1 -1
- package/components/pds-dropdown-menu-item.js +1 -1
- package/components/pds-dropdown-menu-item.js.map +1 -1
- package/components/pds-filter.js +1 -1
- package/components/pds-filter.js.map +1 -1
- package/components/pds-input.js +6 -2
- package/components/pds-input.js.map +1 -1
- package/components/pds-link2.js +1 -1
- package/components/pds-link2.js.map +1 -1
- package/components/pds-modal.js +7 -6
- package/components/pds-modal.js.map +1 -1
- package/components/pds-radio-group.js +1 -1
- package/components/pds-radio-group.js.map +1 -1
- package/components/pds-radio.js +1 -1
- package/components/pds-radio.js.map +1 -1
- package/components/pds-select.js +14 -2
- package/components/pds-select.js.map +1 -1
- package/components/pds-tab.js +20 -4
- package/components/pds-tab.js.map +1 -1
- package/components/pds-table-cell2.js.map +1 -1
- package/components/pds-table-head-cell2.js +61 -5
- package/components/pds-table-head-cell2.js.map +1 -1
- package/components/pds-table-head.js +15 -3
- package/components/pds-table-head.js.map +1 -1
- package/components/pds-table-row.js +100 -4
- package/components/pds-table-row.js.map +1 -1
- package/components/pds-table.js +50 -3
- package/components/pds-table.js.map +1 -1
- package/components/pds-textarea.js +9 -5
- package/components/pds-textarea.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mock-pds-modal.cjs.entry.js +9 -5
- package/dist/cjs/mock-pds-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-alert.cjs.entry.js +1 -1
- package/dist/cjs/pds-alert.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-avatar.cjs.entry.js +17 -5
- package/dist/cjs/pds-avatar.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-button.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-chip.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-combobox.cjs.entry.js +1 -1
- package/dist/cjs/pds-combobox.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/pds-dropdown-menu-item.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-filter.cjs.entry.js +1 -1
- package/dist/cjs/pds-filter.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-input.cjs.entry.js +6 -2
- package/dist/cjs/pds-input.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-link.cjs.entry.js +1 -1
- package/dist/cjs/pds-link.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-modal.cjs.entry.js +7 -6
- package/dist/cjs/pds-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/pds-radio-group.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-radio.cjs.entry.js +1 -1
- package/dist/cjs/pds-radio.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-select.cjs.entry.js +14 -2
- package/dist/cjs/pds-select.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-tab.cjs.entry.js +19 -4
- package/dist/cjs/pds-tab.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-table-cell.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +57 -4
- package/dist/cjs/pds-table-head-cell.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-table-head.cjs.entry.js +12 -2
- package/dist/cjs/pds-table-head.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-table-row.cjs.entry.js +97 -3
- package/dist/cjs/pds-table-row.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-table.cjs.entry.js +47 -3
- package/dist/cjs/pds-table.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-textarea.cjs.entry.js +9 -5
- package/dist/cjs/pds-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/pine-core.cjs.js +1 -1
- package/dist/collection/components/pds-alert/pds-alert.css +22 -0
- package/dist/collection/components/pds-avatar/pds-avatar.css +14 -1
- package/dist/collection/components/pds-avatar/pds-avatar.js +39 -4
- package/dist/collection/components/pds-avatar/pds-avatar.js.map +1 -1
- package/dist/collection/components/pds-avatar/stories/pds-avatar.stories.js +15 -0
- package/dist/collection/components/pds-button/pds-button.css +3 -0
- package/dist/collection/components/pds-checkbox/pds-checkbox.css +2 -0
- package/dist/collection/components/pds-chip/pds-chip.css +7 -0
- package/dist/collection/components/pds-combobox/pds-combobox.css +6 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +4 -3
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.css +1 -1
- package/dist/collection/components/pds-input/pds-input.css +5 -3
- package/dist/collection/components/pds-input/pds-input.js +24 -1
- package/dist/collection/components/pds-input/pds-input.js.map +1 -1
- package/dist/collection/components/pds-link/pds-link.css +3 -3
- package/dist/collection/components/pds-modal/pds-modal.css +1 -0
- package/dist/collection/components/pds-modal/pds-modal.js +7 -6
- package/dist/collection/components/pds-modal/pds-modal.js.map +1 -1
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +10 -6
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js.map +1 -1
- package/dist/collection/components/pds-radio/pds-radio.css +4 -1
- package/dist/collection/components/pds-radio-group/pds-radio-group.css +3 -1
- package/dist/collection/components/pds-select/pds-select.css +5 -3
- package/dist/collection/components/pds-select/pds-select.js +71 -2
- package/dist/collection/components/pds-select/pds-select.js.map +1 -1
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.css +1 -0
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.css +18 -0
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +57 -1
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js.map +1 -1
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.css +12 -2
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +87 -4
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js.map +1 -1
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.css +10 -0
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +102 -2
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js.map +1 -1
- package/dist/collection/components/pds-table/pds-table.css +2 -0
- package/dist/collection/components/pds-table/pds-table.js +112 -3
- package/dist/collection/components/pds-table/pds-table.js.map +1 -1
- package/dist/collection/components/pds-table/stories/pds-table.stories.js +150 -5
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.css +23 -4
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +41 -3
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js.map +1 -1
- package/dist/collection/components/pds-textarea/pds-textarea.css +3 -1
- package/dist/collection/components/pds-textarea/pds-textarea.js +27 -4
- package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -1
- package/dist/docs.json +341 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mock-pds-modal.entry.js +9 -5
- package/dist/esm/mock-pds-modal.entry.js.map +1 -1
- package/dist/esm/pds-alert.entry.js +1 -1
- package/dist/esm/pds-alert.entry.js.map +1 -1
- package/dist/esm/pds-avatar.entry.js +17 -5
- package/dist/esm/pds-avatar.entry.js.map +1 -1
- package/dist/esm/pds-button.entry.js.map +1 -1
- package/dist/esm/pds-checkbox.entry.js.map +1 -1
- package/dist/esm/pds-chip.entry.js.map +1 -1
- package/dist/esm/pds-combobox.entry.js +1 -1
- package/dist/esm/pds-combobox.entry.js.map +1 -1
- package/dist/esm/pds-dropdown-menu-item.entry.js +1 -1
- package/dist/esm/pds-dropdown-menu-item.entry.js.map +1 -1
- package/dist/esm/pds-filter.entry.js +1 -1
- package/dist/esm/pds-filter.entry.js.map +1 -1
- package/dist/esm/pds-input.entry.js +6 -2
- package/dist/esm/pds-input.entry.js.map +1 -1
- package/dist/esm/pds-link.entry.js +1 -1
- package/dist/esm/pds-link.entry.js.map +1 -1
- package/dist/esm/pds-modal.entry.js +7 -6
- package/dist/esm/pds-modal.entry.js.map +1 -1
- package/dist/esm/pds-radio-group.entry.js +1 -1
- package/dist/esm/pds-radio-group.entry.js.map +1 -1
- package/dist/esm/pds-radio.entry.js +1 -1
- package/dist/esm/pds-radio.entry.js.map +1 -1
- package/dist/esm/pds-select.entry.js +14 -2
- package/dist/esm/pds-select.entry.js.map +1 -1
- package/dist/esm/pds-tab.entry.js +19 -4
- package/dist/esm/pds-tab.entry.js.map +1 -1
- package/dist/esm/pds-table-cell.entry.js.map +1 -1
- package/dist/esm/pds-table-head-cell.entry.js +57 -4
- package/dist/esm/pds-table-head-cell.entry.js.map +1 -1
- package/dist/esm/pds-table-head.entry.js +12 -2
- package/dist/esm/pds-table-head.entry.js.map +1 -1
- package/dist/esm/pds-table-row.entry.js +97 -3
- package/dist/esm/pds-table-row.entry.js.map +1 -1
- package/dist/esm/pds-table.entry.js +47 -3
- package/dist/esm/pds-table.entry.js.map +1 -1
- package/dist/esm/pds-textarea.entry.js +9 -5
- package/dist/esm/pds-textarea.entry.js.map +1 -1
- package/dist/esm/pine-core.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js.map +1 -1
- package/dist/esm-es5/pds-alert.entry.js +1 -1
- package/dist/esm-es5/pds-alert.entry.js.map +1 -1
- package/dist/esm-es5/pds-avatar.entry.js +1 -1
- package/dist/esm-es5/pds-avatar.entry.js.map +1 -1
- package/dist/esm-es5/pds-button.entry.js.map +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js.map +1 -1
- package/dist/esm-es5/pds-chip.entry.js.map +1 -1
- package/dist/esm-es5/pds-combobox.entry.js +1 -1
- package/dist/esm-es5/pds-combobox.entry.js.map +1 -1
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js.map +1 -1
- package/dist/esm-es5/pds-filter.entry.js +1 -1
- package/dist/esm-es5/pds-filter.entry.js.map +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js.map +1 -1
- package/dist/esm-es5/pds-link.entry.js +1 -1
- package/dist/esm-es5/pds-link.entry.js.map +1 -1
- package/dist/esm-es5/pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-modal.entry.js.map +1 -1
- package/dist/esm-es5/pds-radio-group.entry.js +1 -1
- package/dist/esm-es5/pds-radio-group.entry.js.map +1 -1
- package/dist/esm-es5/pds-radio.entry.js +1 -1
- package/dist/esm-es5/pds-radio.entry.js.map +1 -1
- package/dist/esm-es5/pds-select.entry.js +1 -1
- package/dist/esm-es5/pds-select.entry.js.map +1 -1
- package/dist/esm-es5/pds-tab.entry.js +1 -1
- package/dist/esm-es5/pds-tab.entry.js.map +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js.map +1 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js.map +1 -1
- package/dist/esm-es5/pds-table-head.entry.js +1 -1
- package/dist/esm-es5/pds-table-head.entry.js.map +1 -1
- package/dist/esm-es5/pds-table-row.entry.js +1 -1
- package/dist/esm-es5/pds-table-row.entry.js.map +1 -1
- package/dist/esm-es5/pds-table.entry.js +1 -1
- package/dist/esm-es5/pds-table.entry.js.map +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js.map +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/pine-core/mock-pds-modal.entry.esm.js.map +1 -1
- package/dist/pine-core/p--gPqixhD.system.js.map +1 -1
- package/dist/pine-core/p-002fe322.system.entry.js +2 -0
- package/dist/pine-core/p-002fe322.system.entry.js.map +1 -0
- package/dist/pine-core/p-098cbcd7.system.entry.js +2 -0
- package/dist/pine-core/p-098cbcd7.system.entry.js.map +1 -0
- package/dist/pine-core/p-35f644cf.system.entry.js +2 -0
- package/dist/pine-core/{p-36ad78b5.system.entry.js.map → p-35f644cf.system.entry.js.map} +1 -1
- package/dist/pine-core/p-41d89f20.entry.js +2 -0
- package/dist/pine-core/p-41d89f20.entry.js.map +1 -0
- package/dist/pine-core/p-478d1107.entry.js +2 -0
- package/dist/pine-core/{p-41cc9270.entry.js.map → p-478d1107.entry.js.map} +1 -1
- package/dist/pine-core/p-4SEjggIC.system.js.map +1 -0
- package/dist/pine-core/p-4d25449c.entry.js +2 -0
- package/dist/pine-core/p-4d25449c.entry.js.map +1 -0
- package/dist/pine-core/p-534e44cb.system.entry.js +4 -0
- package/dist/pine-core/{p-bee8d4b8.system.entry.js.map → p-534e44cb.system.entry.js.map} +1 -1
- package/dist/pine-core/p-54a56826.entry.js +3 -0
- package/dist/pine-core/{p-66160018.entry.js.map → p-54a56826.entry.js.map} +1 -1
- package/dist/pine-core/p-5b7ab891.entry.js +2 -0
- package/dist/pine-core/{p-233a6680.entry.js.map → p-5b7ab891.entry.js.map} +1 -1
- package/dist/pine-core/p-646ac76d.entry.js +2 -0
- package/dist/pine-core/p-646ac76d.entry.js.map +1 -0
- package/dist/pine-core/p-6bc7d67f.system.entry.js +2 -0
- package/dist/pine-core/{p-c03e2c5d.system.entry.js.map → p-6bc7d67f.system.entry.js.map} +1 -1
- package/dist/pine-core/p-6fcac53b.entry.js +2 -0
- package/dist/pine-core/{p-96be2d57.entry.js.map → p-6fcac53b.entry.js.map} +1 -1
- package/dist/pine-core/{p-2d3da08b.system.entry.js → p-8f2a5a4c.system.entry.js} +2 -2
- package/dist/pine-core/p-8f2a5a4c.system.entry.js.map +1 -0
- package/dist/pine-core/{p-43f1eead.entry.js → p-9b3794cd.entry.js} +2 -2
- package/dist/pine-core/p-9b3794cd.entry.js.map +1 -0
- package/dist/pine-core/p-9bfaed7e.system.entry.js +2 -0
- package/dist/pine-core/p-9bfaed7e.system.entry.js.map +1 -0
- package/dist/pine-core/p-9c0ec80a.entry.js +2 -0
- package/dist/pine-core/p-9c0ec80a.entry.js.map +1 -0
- package/dist/pine-core/{p-3f8a5f3d.system.entry.js → p-9d6b6ff3.system.entry.js} +2 -2
- package/dist/pine-core/p-9d6b6ff3.system.entry.js.map +1 -0
- package/dist/pine-core/p-9e62c418.system.entry.js +2 -0
- package/dist/pine-core/p-9e62c418.system.entry.js.map +1 -0
- package/dist/pine-core/p-B4EMeCRH.system.js.map +1 -0
- package/dist/pine-core/p-BCKPcTKX.system.js.map +1 -0
- package/dist/pine-core/p-B_Co5NfG.system.js.map +1 -0
- package/dist/pine-core/p-Bjj4Pcbb.system.js.map +1 -0
- package/dist/pine-core/p-Bnp3zJ0T.system.js.map +1 -0
- package/dist/pine-core/p-C48G0LPH.system.js.map +1 -0
- package/dist/pine-core/p-CCgKUhC7.system.js.map +1 -0
- package/dist/pine-core/p-CTfQ_9yC.system.js.map +1 -0
- package/dist/pine-core/p-CXGuX44q.system.js.map +1 -1
- package/dist/pine-core/p-DAvCgWA9.system.js.map +1 -0
- package/dist/pine-core/p-DSwKfctG.system.js.map +1 -0
- package/dist/pine-core/p-DfCCzxYg.system.js.map +1 -0
- package/dist/pine-core/p-DpeOrUYB.system.js.map +1 -1
- package/dist/pine-core/p-DyrNlfLT.system.js.map +1 -0
- package/dist/pine-core/p-JAVnELnm.system.js +1 -1
- package/dist/pine-core/p-LEkjdrKv.system.js.map +1 -0
- package/dist/pine-core/p-PMNjgK0C.system.js.map +1 -0
- package/dist/pine-core/p-WhfStK1C.system.js.map +1 -1
- package/dist/pine-core/p-XCTiWii8.system.js.map +1 -0
- package/dist/pine-core/p-a737df90.entry.js +2 -0
- package/dist/pine-core/{p-d5731a05.entry.js.map → p-a737df90.entry.js.map} +1 -1
- package/dist/pine-core/p-a847fad3.entry.js +2 -0
- package/dist/pine-core/p-a847fad3.entry.js.map +1 -0
- package/dist/pine-core/p-ac2f9463.entry.js +2 -0
- package/dist/pine-core/p-ac2f9463.entry.js.map +1 -0
- package/dist/pine-core/p-b30424e3.system.entry.js +2 -0
- package/dist/pine-core/{p-a4d094da.system.entry.js.map → p-b30424e3.system.entry.js.map} +1 -1
- package/dist/pine-core/p-bbc349b3.system.entry.js +2 -0
- package/dist/pine-core/p-bbc349b3.system.entry.js.map +1 -0
- package/dist/pine-core/p-cb6c279a.system.entry.js +2 -0
- package/dist/pine-core/{p-6bc81a5b.system.entry.js.map → p-cb6c279a.system.entry.js.map} +1 -1
- package/dist/pine-core/p-cf2e1c07.system.entry.js +2 -0
- package/dist/pine-core/{p-e31ea2ae.system.entry.js.map → p-cf2e1c07.system.entry.js.map} +1 -1
- package/dist/pine-core/p-d98310b9.system.entry.js +2 -0
- package/dist/pine-core/p-d98310b9.system.entry.js.map +1 -0
- package/dist/pine-core/{p-b8047816.system.entry.js → p-dcc6ad67.system.entry.js} +2 -2
- package/dist/pine-core/{p-b8047816.system.entry.js.map → p-dcc6ad67.system.entry.js.map} +1 -1
- package/dist/pine-core/p-e011d7e5.entry.js +2 -0
- package/dist/pine-core/p-e011d7e5.entry.js.map +1 -0
- package/dist/pine-core/p-e2104c31.entry.js +2 -0
- package/dist/pine-core/{p-66597ea5.entry.js.map → p-e2104c31.entry.js.map} +1 -1
- package/dist/pine-core/p-e3d76aa3.system.entry.js +2 -0
- package/dist/pine-core/p-e3d76aa3.system.entry.js.map +1 -0
- package/dist/pine-core/p-e8aad8dc.entry.js +2 -0
- package/dist/pine-core/p-e8aad8dc.entry.js.map +1 -0
- package/dist/pine-core/p-f69d3fd6.entry.js +2 -0
- package/dist/pine-core/p-f69d3fd6.entry.js.map +1 -0
- package/dist/pine-core/p-f79f6f08.system.entry.js +2 -0
- package/dist/pine-core/p-f79f6f08.system.entry.js.map +1 -0
- package/dist/pine-core/p-f82b464c.entry.js +2 -0
- package/dist/pine-core/{p-4c0797f2.entry.js.map → p-f82b464c.entry.js.map} +1 -1
- package/dist/pine-core/p-fc0ee6da.entry.js +2 -0
- package/dist/pine-core/p-fc0ee6da.entry.js.map +1 -0
- package/dist/pine-core/p-fe28b975.system.entry.js +2 -0
- package/dist/pine-core/p-fe28b975.system.entry.js.map +1 -0
- package/dist/pine-core/p-jBhqNO5u.system.js.map +1 -0
- package/dist/pine-core/p-r_cS5LMw.system.js.map +1 -0
- package/dist/pine-core/pds-alert.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-avatar.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-button.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-checkbox.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-chip.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-combobox.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-dropdown-menu-item.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-filter.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-input.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-link.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-modal.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-radio-group.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-radio.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-select.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-tab.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-table-cell.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-table-head-cell.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-table-head.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-table-row.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-table.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-textarea.entry.esm.js.map +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/types/components/pds-avatar/pds-avatar.d.ts +5 -0
- package/dist/types/components/pds-input/pds-input.d.ts +5 -0
- package/dist/types/components/pds-modal/test/mock-pds-modal.d.ts +2 -2
- package/dist/types/components/pds-select/pds-select.d.ts +16 -1
- package/dist/types/components/pds-table/pds-table-head/pds-table-head.d.ts +10 -0
- package/dist/types/components/pds-table/pds-table-head-cell/pds-table-head-cell.d.ts +18 -1
- package/dist/types/components/pds-table/pds-table-row/pds-table-row.d.ts +19 -0
- package/dist/types/components/pds-table/pds-table.d.ts +22 -1
- package/dist/types/components/pds-tabs/pds-tab/pds-tab.d.ts +6 -0
- package/dist/types/components/pds-textarea/pds-textarea.d.ts +5 -0
- package/dist/types/components.d.ts +101 -3
- package/dist/vscode.html-data.json +63 -6
- package/hydrate/index.js +318 -53
- package/hydrate/index.mjs +318 -53
- package/package.json +5 -5
- package/dist/pine-core/p-04f92b5a.system.entry.js +0 -2
- package/dist/pine-core/p-04f92b5a.system.entry.js.map +0 -1
- package/dist/pine-core/p-11d69ad5.system.entry.js +0 -2
- package/dist/pine-core/p-11d69ad5.system.entry.js.map +0 -1
- package/dist/pine-core/p-1282026f.entry.js +0 -2
- package/dist/pine-core/p-1282026f.entry.js.map +0 -1
- package/dist/pine-core/p-233a6680.entry.js +0 -2
- package/dist/pine-core/p-2d3da08b.system.entry.js.map +0 -1
- package/dist/pine-core/p-36ad78b5.system.entry.js +0 -2
- package/dist/pine-core/p-372a6081.entry.js +0 -2
- package/dist/pine-core/p-372a6081.entry.js.map +0 -1
- package/dist/pine-core/p-3f8a5f3d.system.entry.js.map +0 -1
- package/dist/pine-core/p-3fd0f8a9.system.entry.js +0 -2
- package/dist/pine-core/p-3fd0f8a9.system.entry.js.map +0 -1
- package/dist/pine-core/p-41cc9270.entry.js +0 -2
- package/dist/pine-core/p-43f1eead.entry.js.map +0 -1
- package/dist/pine-core/p-46e5a568.entry.js +0 -2
- package/dist/pine-core/p-46e5a568.entry.js.map +0 -1
- package/dist/pine-core/p-4c0797f2.entry.js +0 -2
- package/dist/pine-core/p-5d7c4fbb.entry.js +0 -2
- package/dist/pine-core/p-5d7c4fbb.entry.js.map +0 -1
- package/dist/pine-core/p-6150fb43.system.entry.js +0 -2
- package/dist/pine-core/p-6150fb43.system.entry.js.map +0 -1
- package/dist/pine-core/p-65c566a2.system.entry.js +0 -2
- package/dist/pine-core/p-65c566a2.system.entry.js.map +0 -1
- package/dist/pine-core/p-66160018.entry.js +0 -3
- package/dist/pine-core/p-66597ea5.entry.js +0 -2
- package/dist/pine-core/p-6bc81a5b.system.entry.js +0 -2
- package/dist/pine-core/p-6c3299f9.system.entry.js +0 -2
- package/dist/pine-core/p-6c3299f9.system.entry.js.map +0 -1
- package/dist/pine-core/p-6de73f62.entry.js +0 -2
- package/dist/pine-core/p-6de73f62.entry.js.map +0 -1
- package/dist/pine-core/p-8d6fa6f7.entry.js +0 -2
- package/dist/pine-core/p-8d6fa6f7.entry.js.map +0 -1
- package/dist/pine-core/p-96be2d57.entry.js +0 -2
- package/dist/pine-core/p-9ddf4f1f.entry.js +0 -2
- package/dist/pine-core/p-9ddf4f1f.entry.js.map +0 -1
- package/dist/pine-core/p-B81sAPMq.system.js.map +0 -1
- package/dist/pine-core/p-BUwuPP5j.system.js.map +0 -1
- package/dist/pine-core/p-BVjyFx0r.system.js.map +0 -1
- package/dist/pine-core/p-C9T6sYau.system.js.map +0 -1
- package/dist/pine-core/p-CWaidsBR.system.js.map +0 -1
- package/dist/pine-core/p-Ch7MRoFE.system.js.map +0 -1
- package/dist/pine-core/p-CiqRCskL.system.js.map +0 -1
- package/dist/pine-core/p-CoF_9_BM.system.js.map +0 -1
- package/dist/pine-core/p-CrzS8Mmy.system.js.map +0 -1
- package/dist/pine-core/p-Cwz8YTwo.system.js.map +0 -1
- package/dist/pine-core/p-DaQV83Gx.system.js.map +0 -1
- package/dist/pine-core/p-GKNvlYGa.system.js.map +0 -1
- package/dist/pine-core/p-Ma8AuMzD.system.js.map +0 -1
- package/dist/pine-core/p-RO-Y2DRT.system.js.map +0 -1
- package/dist/pine-core/p-a4d094da.system.entry.js +0 -2
- package/dist/pine-core/p-ac050f83.entry.js +0 -2
- package/dist/pine-core/p-ac050f83.entry.js.map +0 -1
- package/dist/pine-core/p-b59ac781.entry.js +0 -2
- package/dist/pine-core/p-b59ac781.entry.js.map +0 -1
- package/dist/pine-core/p-b6a503cc.system.entry.js +0 -2
- package/dist/pine-core/p-b6a503cc.system.entry.js.map +0 -1
- package/dist/pine-core/p-b9a14564.system.entry.js +0 -2
- package/dist/pine-core/p-b9a14564.system.entry.js.map +0 -1
- package/dist/pine-core/p-bee8d4b8.system.entry.js +0 -4
- package/dist/pine-core/p-c03e2c5d.system.entry.js +0 -2
- package/dist/pine-core/p-c2d17093.system.entry.js +0 -2
- package/dist/pine-core/p-c2d17093.system.entry.js.map +0 -1
- package/dist/pine-core/p-cf4df489.entry.js +0 -2
- package/dist/pine-core/p-cf4df489.entry.js.map +0 -1
- package/dist/pine-core/p-d5731a05.entry.js +0 -2
- package/dist/pine-core/p-e31ea2ae.system.entry.js +0 -2
- package/dist/pine-core/p-eHySdsWM.system.js.map +0 -1
- package/dist/pine-core/p-qkIMFuAW.system.js.map +0 -1
- package/dist/pine-core/p-s-tFgs4I.system.js.map +0 -1
- package/dist/pine-core/p-uv97KtT8.system.js.map +0 -1
package/components/pds-tab.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const pdsTabCss = "pds-tab{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;position:relative}.pds-tabs--pill pds-tab{-ms-flex:1;flex:1}.pds-tab{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:var(--pine-border-width-none);-webkit-box-shadow:none;box-shadow:none;color:inherit;cursor:pointer;font-family:inherit;padding:var(--pine-dimension-none);-ms-flex-align:center;align-items:center;color:var(--pine-color-text-secondary);display:-ms-inline-flexbox;display:inline-flex;position:relative;text-decoration:none;white-space:nowrap}.pds-tab.is-active,.pds-tab[aria-selected=true]{color:var(--pine-color-text)}.pds-tab.is-active .pds-tab__content::after,.pds-tab[aria-selected=true] .pds-tab__content::after{opacity:1}.pds-tab:hover{color:var(--pine-color-text)}.pds-tab:focus{outline:none}.pds-tab:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tab .pds-tab__content{font-family:var(--pine-font-family-body);font-size:var(--pine-font-size);font-weight:var(--pine-font-weight-medium);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);-webkit-padding-after:11px;padding-block-end:11px;position:relative}.pds-tab .pds-tab__content::after{background-color:var(--pine-color-brand);content:\"\";height:3px;inset-block-end:var(--pine-dimension-none);inset-inline-end:var(--pine-dimension-none);inset-inline-start:var(--pine-dimension-none);opacity:0;position:absolute}.pds-tab .pds-tab-edge{display:none}.pds-tabs--availability{--color-background-tab:transparent}.pds-tabs--availability .pds-tab{background-color:var(--color-background-tab);border-radius:calc(var(--pine-dimension-xs) * 1.25) calc(var(--pine-dimension-xs) * 1.25) var(--pine-dimension-none) var(--pine-dimension-none);color:var(--pine-color-text-secondary);padding:8px 16px 13px}.pds-tabs--availability .pds-tab.is-active,.pds-tabs--availability .pds-tab[aria-selected=true]{--color-background-tab:var(--pine-color-secondary);color:var(--pine-color-text)}.pds-tabs--availability .pds-tab.is-active .pds-tab__content::after,.pds-tabs--availability .pds-tab[aria-selected=true] .pds-tab__content::after{opacity:1}.pds-tabs--availability .pds-tab.is-active .pds-tab-edge,.pds-tabs--availability .pds-tab[aria-selected=true] .pds-tab-edge{z-index:var(--pine-z-index-raised)}.pds-tabs--availability .pds-tab:hover:not(.is-active,[aria-selected=true]){--color-background-tab:var(--pine-color-secondary-hover);color:var(--pine-color-text)}.pds-tabs--availability .pds-tab:focus-visible{color:var(--pine-color-text-secondary)}.pds-tabs--availability .pds-tab__content{-webkit-padding-after:7px;padding-block-end:7px}.pds-tabs--availability .pds-tab-edge{bottom:0;display:block;height:8px;inset-inline-end:100%;overflow:hidden;position:absolute;width:8px}.pds-tabs--availability .pds-tab-edge::before{border-radius:50%;bottom:0;-webkit-box-shadow:4px 4px 0 0 var(--color-background-tab);box-shadow:4px 4px 0 0 var(--color-background-tab);content:\"\";display:block;height:200%;inset-inline-end:0;position:absolute;width:200%}.pds-tabs--availability .pds-tab-edge--end{inset-inline-end:unset;inset-inline-start:100%}.pds-tabs--availability .pds-tab-edge--end::before{-webkit-box-shadow:-4px 4px 0 0 var(--color-background-tab);box-shadow:-4px 4px 0 0 var(--color-background-tab);inset-inline-end:unset;inset-inline-start:0}.pds-tabs--filter .pds-tab{background-color:var(--pine-color-background-muted);border-radius:50px;color:var(--pine-color-text);padding:6px 15px}.pds-tabs--filter .pds-tab.is-active,.pds-tabs--filter .pds-tab[aria-selected=true]{background-color:var(--pine-color-primary);color:var(--pine-color-text-primary)}.pds-tabs--filter .pds-tab.is-active:hover,.pds-tabs--filter .pds-tab[aria-selected=true]:hover{background-color:var(--pine-color-primary-hover)}.pds-tabs--filter .pds-tab:hover:not(.is-active,[aria-selected=true]){background-color:var(--pine-color-border-disabled)}.pds-tabs--filter .pds-tab__content{-webkit-padding-after:var(--pine-dimension-none);padding-block-end:var(--pine-dimension-none)}.pds-tabs--filter .pds-tab__content::after{content:unset}.pds-tabs--pill{--color-background-tab:transparent}.pds-tabs--pill .pds-tab{background-color:var(--color-background-tab);border:var(--pine-border-width-thin) solid transparent;border-radius:var(--pine-dimension-xs);color:var(--pine-color-text-muted);-ms-flex:1;flex:1;height:34px;-ms-flex-pack:center;justify-content:center}.pds-tabs--pill .pds-tab .pds-tab__content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-webkit-padding-after:0;padding-block-end:0}.pds-tabs--pill .pds-tab.is-active,.pds-tabs--pill .pds-tab[aria-selected=true]{--color-background-tab:var(--pine-color-background-container);border-color:var(--pine-color-border);-webkit-box-shadow:var(--pine-box-shadow-100);box-shadow:var(--pine-box-shadow-100);color:var(--pine-color-text-active);}.pds-tabs--pill .pds-tab.is-active:focus-visible,.pds-tabs--pill .pds-tab[aria-selected=true]:focus-visible{border-color:var(--color-border-focus);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tabs--pill .pds-tab.is-active .pds-tab__content::after,.pds-tabs--pill .pds-tab[aria-selected=true] .pds-tab__content::after{opacity:0}";
|
|
3
|
+
const pdsTabCss = "pds-tab{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;position:relative}.pds-tabs--pill pds-tab{-ms-flex:1;flex:1}.pds-tab{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:var(--pine-border-width-none);-webkit-box-shadow:none;box-shadow:none;color:inherit;cursor:pointer;font-family:inherit;padding:var(--pine-dimension-none);-ms-flex-align:center;align-items:center;color:var(--pine-color-text-secondary);display:-ms-inline-flexbox;display:inline-flex;position:relative;text-decoration:none;white-space:nowrap}.pds-tab.is-active,.pds-tab[aria-selected=true]{color:var(--pine-color-text)}.pds-tab.is-active .pds-tab__content::after,.pds-tab[aria-selected=true] .pds-tab__content::after{opacity:1}.pds-tab:hover:not(:disabled){color:var(--pine-color-text)}.pds-tab:focus{outline:none}.pds-tab:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tab:disabled,.pds-tab.is-disabled{color:var(--pine-color-text-disabled);cursor:not-allowed;pointer-events:none}.pds-tab .pds-tab__content{font-family:var(--pine-font-family-body);font-size:var(--pine-font-size);font-weight:var(--pine-font-weight-medium);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);-webkit-padding-after:11px;padding-block-end:11px;position:relative}.pds-tab .pds-tab__content::after{background-color:var(--pine-color-brand);content:\"\";height:3px;inset-block-end:var(--pine-dimension-none);inset-inline-end:var(--pine-dimension-none);inset-inline-start:var(--pine-dimension-none);opacity:0;position:absolute}.pds-tab .pds-tab-edge{display:none}.pds-tabs--availability{--color-background-tab:transparent}.pds-tabs--availability .pds-tab{background-color:var(--color-background-tab);border-radius:calc(var(--pine-dimension-xs) * 1.25) calc(var(--pine-dimension-xs) * 1.25) var(--pine-dimension-none) var(--pine-dimension-none);color:var(--pine-color-text-secondary);padding:8px 16px 13px}.pds-tabs--availability .pds-tab.is-active,.pds-tabs--availability .pds-tab[aria-selected=true]{--color-background-tab:var(--pine-color-secondary);color:var(--pine-color-text)}.pds-tabs--availability .pds-tab.is-active .pds-tab__content::after,.pds-tabs--availability .pds-tab[aria-selected=true] .pds-tab__content::after{opacity:1}.pds-tabs--availability .pds-tab.is-active .pds-tab-edge,.pds-tabs--availability .pds-tab[aria-selected=true] .pds-tab-edge{z-index:var(--pine-z-index-raised)}.pds-tabs--availability .pds-tab:hover:not(.is-active,[aria-selected=true],:disabled){--color-background-tab:var(--pine-color-secondary-hover);color:var(--pine-color-text)}.pds-tabs--availability .pds-tab:focus-visible{color:var(--pine-color-text-secondary)}.pds-tabs--availability .pds-tab:disabled,.pds-tabs--availability .pds-tab.is-disabled{--color-background-tab:transparent;color:var(--pine-color-text-disabled)}.pds-tabs--availability .pds-tab__content{-webkit-padding-after:7px;padding-block-end:7px}.pds-tabs--availability .pds-tab-edge{bottom:0;display:block;height:8px;inset-inline-end:100%;overflow:hidden;position:absolute;width:8px}.pds-tabs--availability .pds-tab-edge::before{border-radius:50%;bottom:0;-webkit-box-shadow:4px 4px 0 0 var(--color-background-tab);box-shadow:4px 4px 0 0 var(--color-background-tab);content:\"\";display:block;height:200%;inset-inline-end:0;position:absolute;width:200%}.pds-tabs--availability .pds-tab-edge--end{inset-inline-end:unset;inset-inline-start:100%}.pds-tabs--availability .pds-tab-edge--end::before{-webkit-box-shadow:-4px 4px 0 0 var(--color-background-tab);box-shadow:-4px 4px 0 0 var(--color-background-tab);inset-inline-end:unset;inset-inline-start:0}.pds-tabs--filter .pds-tab{background-color:var(--pine-color-background-muted);border-radius:50px;color:var(--pine-color-text);padding:6px 15px}.pds-tabs--filter .pds-tab.is-active,.pds-tabs--filter .pds-tab[aria-selected=true]{background-color:var(--pine-color-primary);color:var(--pine-color-text-primary)}.pds-tabs--filter .pds-tab.is-active:hover:not(:disabled),.pds-tabs--filter .pds-tab[aria-selected=true]:hover:not(:disabled){background-color:var(--pine-color-primary-hover)}.pds-tabs--filter .pds-tab:hover:not(.is-active,[aria-selected=true],:disabled){background-color:var(--pine-color-border-disabled)}.pds-tabs--filter .pds-tab:disabled,.pds-tabs--filter .pds-tab.is-disabled{background-color:transparent;color:var(--pine-color-text-disabled)}.pds-tabs--filter .pds-tab:disabled.is-active,.pds-tabs--filter .pds-tab:disabled[aria-selected=true],.pds-tabs--filter .pds-tab.is-disabled.is-active,.pds-tabs--filter .pds-tab.is-disabled[aria-selected=true]{background-color:var(--pine-color-primary-disabled)}.pds-tabs--filter .pds-tab__content{-webkit-padding-after:var(--pine-dimension-none);padding-block-end:var(--pine-dimension-none)}.pds-tabs--filter .pds-tab__content::after{content:unset}.pds-tabs--pill{--color-background-tab:transparent}.pds-tabs--pill .pds-tab{background-color:var(--color-background-tab);border:var(--pine-border-width-thin) solid transparent;border-radius:var(--pine-dimension-xs);color:var(--pine-color-text-muted);-ms-flex:1;flex:1;height:34px;-ms-flex-pack:center;justify-content:center}.pds-tabs--pill .pds-tab .pds-tab__content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-webkit-padding-after:0;padding-block-end:0}.pds-tabs--pill .pds-tab.is-active,.pds-tabs--pill .pds-tab[aria-selected=true]{--color-background-tab:var(--pine-color-background-container);border-color:var(--pine-color-border);-webkit-box-shadow:var(--pine-box-shadow-100);box-shadow:var(--pine-box-shadow-100);color:var(--pine-color-text-active);}.pds-tabs--pill .pds-tab.is-active:focus-visible,.pds-tabs--pill .pds-tab[aria-selected=true]:focus-visible{border-color:var(--color-border-focus);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-tabs--pill .pds-tab.is-active .pds-tab__content::after,.pds-tabs--pill .pds-tab[aria-selected=true] .pds-tab__content::after{opacity:0}.pds-tabs--pill .pds-tab:disabled,.pds-tabs--pill .pds-tab.is-disabled{color:var(--pine-color-text-disabled)}";
|
|
4
4
|
|
|
5
5
|
const PdsTab$1 = /*@__PURE__*/ proxyCustomElement(class PdsTab extends HTMLElement {
|
|
6
6
|
constructor(registerHost) {
|
|
@@ -9,6 +9,11 @@ const PdsTab$1 = /*@__PURE__*/ proxyCustomElement(class PdsTab extends HTMLEleme
|
|
|
9
9
|
this.__registerHost();
|
|
10
10
|
}
|
|
11
11
|
this.pdsTabClick = createEvent(this, "pdsTabClick", 7);
|
|
12
|
+
/**
|
|
13
|
+
* Determines the tab's disabled state.
|
|
14
|
+
* @defaultValue false
|
|
15
|
+
*/
|
|
16
|
+
this.disabled = false;
|
|
12
17
|
/**
|
|
13
18
|
* Keeps track of the tabpanel selected state, this property is passed by parent component
|
|
14
19
|
*/
|
|
@@ -16,16 +21,27 @@ const PdsTab$1 = /*@__PURE__*/ proxyCustomElement(class PdsTab extends HTMLEleme
|
|
|
16
21
|
this.selected = false;
|
|
17
22
|
}
|
|
18
23
|
onTabClick(index, parentComponentId) {
|
|
24
|
+
if (this.disabled)
|
|
25
|
+
return;
|
|
19
26
|
this.pdsTabClick.emit([index, parentComponentId]);
|
|
20
27
|
}
|
|
28
|
+
classNames() {
|
|
29
|
+
const classes = [
|
|
30
|
+
'pds-tab',
|
|
31
|
+
this.selected && 'is-active',
|
|
32
|
+
this.disabled && 'is-disabled',
|
|
33
|
+
];
|
|
34
|
+
return classes.filter(Boolean).join(' ');
|
|
35
|
+
}
|
|
21
36
|
render() {
|
|
22
|
-
const availabilityTabEdgeInlineStart = (h("span", { key: '
|
|
23
|
-
const availabilityTabEdgeInlineEnd = (h("span", { key: '
|
|
24
|
-
return (h(Host, { key: '
|
|
37
|
+
const availabilityTabEdgeInlineStart = (h("span", { key: '7a70cf5b681ec05215920417c4ba590fed238f63', class: "pds-tab-edge", role: "presentation" }));
|
|
38
|
+
const availabilityTabEdgeInlineEnd = (h("span", { key: '21a1422bb00a6221f7db1b0e77abcd024eec60cd', class: "pds-tab-edge pds-tab-edge--end", role: "presentation" }));
|
|
39
|
+
return (h(Host, { key: 'bcf73da727080cdb5b9ec7356768dd2cefab44ae', variant: this.variant, slot: "tabs", index: this.index }, h("button", { key: '25e140fc63a8ddaa44d08198f14d568bca83f16a', role: "tab", id: this.parentComponentId + "__" + this.name, "aria-controls": this.parentComponentId + "__" + this.name + "-panel", tabindex: this.disabled ? "-1" : (this.selected ? "0" : "-1"), "aria-selected": this.selected ? "true" : "false", "aria-disabled": this.disabled ? "true" : null, disabled: this.disabled, class: this.classNames(), onClick: this.onTabClick.bind(this, this.index, this.parentComponentId) }, this.variant === "availability" && availabilityTabEdgeInlineStart, this.variant === "availability" && availabilityTabEdgeInlineEnd, h("div", { key: '002252b89b74bf2ab26bb33331f4296a22a4cf70', class: "pds-tab__content" }, h("slot", { key: '1f67182b80504391a87509567cb68ca8ff6f9b22' })))));
|
|
25
40
|
}
|
|
26
41
|
get el() { return this; }
|
|
27
42
|
static get style() { return pdsTabCss; }
|
|
28
43
|
}, [260, "pds-tab", {
|
|
44
|
+
"disabled": [4],
|
|
29
45
|
"name": [1],
|
|
30
46
|
"parentComponentId": [1, "parent-component-id"],
|
|
31
47
|
"variant": [1],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pds-tab.js","mappings":";;AAAA,MAAM,SAAS,GAAG,+vKAA+vK;;MCOpwKA,QAAM,iBAAAC,kBAAA,CAAA,MAAA,MAAA,SAAA,WAAA,CAAA;AALnB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;AA+BE;;AAEG;;AAEK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAsCzB;IA/BS,UAAU,CAAC,KAAK,EAAE,iBAAi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AAA,0CAAA,EAAA,KAAK,EAAC,kBAAkB,EAAA,EAAC,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAO,CAAM,CACpC,CACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["PdsTab","__stencil_proxyCustomElement"],"sources":["src/components/pds-tabs/pds-tab/pds-tab.scss?tag=pds-tab","src/components/pds-tabs/pds-tab/pds-tab.tsx"],"sourcesContent":["pds-tab {\n align-items: center;\n display: inline-flex;\n position: relative;\n\n .pds-tabs--pill & {\n flex: 1;\n }\n}\n\n///\n/// Resets base button styles\n///\n@mixin pds-button-style-reset {\n appearance: none;\n background-color: transparent;\n border: var(--pine-border-width-none);\n box-shadow: none;\n color: inherit;\n cursor: pointer;\n font-family: inherit;\n padding: var(--pine-dimension-none);\n}\n\n.pds-tab {\n @include pds-button-style-reset();\n\n align-items: center;\n color: var(--pine-color-text-secondary);\n display: inline-flex;\n position: relative;\n text-decoration: none;\n white-space: nowrap;\n\n &.is-active,\n &[aria-selected='true'] {\n color: var(--pine-color-text);\n\n .pds-tab__content::after {\n opacity: 1;\n }\n }\n\n &:hover {\n color: var(--pine-color-text);\n }\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: var(--pine-outline-focus);\n outline-offset: var(--pine-border-width);\n }\n\n .pds-tab__content {\n font-family: var(--pine-font-family-body);\n font-size: var(--pine-font-size);\n font-weight: var(--pine-font-weight-medium);\n letter-spacing: var(--pine-letter-spacing);\n line-height: var(--pine-line-height-body);\n padding-block-end: 11px;\n position: relative;\n\n &::after {\n background-color: var(--pine-color-brand);\n content: '';\n height: 3px;\n inset-block-end: var(--pine-dimension-none);\n inset-inline-end: var(--pine-dimension-none);\n inset-inline-start: var(--pine-dimension-none);\n opacity: 0;\n position: absolute;\n }\n }\n\n .pds-tab-edge {\n display: none;\n }\n}\n\n.pds-tabs--availability {\n --color-background-tab: transparent;\n\n .pds-tab {\n background-color: var(--color-background-tab);\n border-radius: calc(var(--pine-dimension-xs) * 1.25) calc(var(--pine-dimension-xs) * 1.25) var(--pine-dimension-none) var(--pine-dimension-none);\n color: var(--pine-color-text-secondary);\n padding: 8px 16px 13px;\n\n &.is-active,\n &[aria-selected='true'] {\n --color-background-tab: var(--pine-color-secondary);\n color: var(--pine-color-text);\n\n .pds-tab__content::after {\n opacity: 1;\n }\n\n .pds-tab-edge {\n z-index: var(--pine-z-index-raised);\n }\n }\n\n &:hover:not(.is-active, [aria-selected='true']) {\n --color-background-tab: var(--pine-color-secondary-hover);\n color: var(--pine-color-text);\n }\n\n &:focus-visible {\n color: var(--pine-color-text-secondary);\n }\n }\n\n .pds-tab__content {\n padding-block-end: 7px;\n }\n\n .pds-tab-edge {\n bottom: 0;\n display: block;\n height: 8px;\n inset-inline-end: 100%;\n overflow: hidden;\n position: absolute;\n width: 8px;\n\n &::before {\n border-radius: 50%;\n bottom: 0;\n box-shadow: 4px 4px 0 0 var(--color-background-tab);\n content: '';\n display: block;\n height: 200%;\n inset-inline-end: 0;\n position: absolute;\n width: 200%;\n }\n }\n\n .pds-tab-edge--end {\n inset-inline-end: unset;\n inset-inline-start: 100%;\n\n &::before {\n box-shadow: -4px 4px 0 0 var(--color-background-tab);\n inset-inline-end: unset;\n inset-inline-start: 0;\n }\n }\n}\n\n.pds-tabs--filter {\n .pds-tab {\n background-color: var(--pine-color-background-muted);\n border-radius: 50px;\n color: var(--pine-color-text);\n padding: 6px 15px;\n\n &.is-active,\n &[aria-selected='true'] {\n background-color: var(--pine-color-primary);\n color: var(--pine-color-text-primary);\n }\n\n &.is-active:hover,\n &[aria-selected='true']:hover {\n background-color: var(--pine-color-primary-hover);\n }\n\n &:hover:not(.is-active, [aria-selected='true']) {\n background-color: var(--pine-color-border-disabled);\n }\n }\n\n .pds-tab__content {\n padding-block-end: var(--pine-dimension-none);\n\n &::after {\n content: unset;\n }\n }\n}\n\n.pds-tabs--pill {\n --color-background-tab: transparent;\n\n .pds-tab {\n background-color: var(--color-background-tab);\n border: var(--pine-border-width-thin) solid transparent;\n border-radius: var(--pine-dimension-xs);\n color: var(--pine-color-text-muted);\n flex: 1;\n height: 34px;\n justify-content: center;\n\n .pds-tab__content {\n align-items: center;\n display: flex;\n justify-content: center;\n padding-block-end: 0;\n }\n\n &.is-active,\n &[aria-selected='true'] {\n --color-background-tab: var(--pine-color-background-container);\n border-color: var(--pine-color-border);\n box-shadow: var(--pine-box-shadow-100);\n color: var(--pine-color-text-active);\n\n &:focus-visible {\n border-color: var(--color-border-focus);\n outline: var(--pine-outline-focus);\n outline-offset: var(--pine-border-width);\n }\n\n /* stylelint-disable max-nesting-depth */\n .pds-tab__content {\n &::after {\n opacity: 0;\n }\n }\n /* stylelint-enable max-nesting-depth */\n }\n }\n}\n","import { Component, Element, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'pds-tab',\n styleUrl: 'pds-tab.scss',\n shadow: false,\n})\nexport class PdsTab {\n @Element() el: HTMLPdsTabElement;\n\n /**\n * Sets the related tab name, this name must match a `pds-tabpanel`'s tab name property\n */\n @Prop() name!: string;\n\n /**\n * Keeps track of the parentComponentId unique id, this property is passed by parent component\n */\n /** @internal */\n @Prop() parentComponentId: string;\n\n /**\n * Keeps track of if the expected tab variant, this property is passed by parent component\n */\n /** @internal */\n @Prop() variant: string;\n\n /**\n * Keeps track of if the tab index number, this property is passed by parent component\n */\n /** @internal */\n @Prop() index: number;\n\n /**\n * Keeps track of the tabpanel selected state, this property is passed by parent component\n */\n /** @internal */\n @Prop() selected = false;\n\n /**\n * Emits an event upon tab click for `pds-tab` and `pds-tabpanel` to listen for\n */\n /** @internal */\n @Event() pdsTabClick: EventEmitter<object>;\n private onTabClick(index, parentComponentId) {\n this.pdsTabClick.emit([index, parentComponentId]);\n }\n\n render() {\n const availabilityTabEdgeInlineStart = (\n <span class=\"pds-tab-edge\" role=\"presentation\"></span>\n )\n\n const availabilityTabEdgeInlineEnd = (\n <span class=\"pds-tab-edge pds-tab-edge--end\" role=\"presentation\"></span>\n )\n\n return (\n <Host variant={this.variant} slot=\"tabs\" index={this.index}>\n <button\n role=\"tab\"\n id={this.parentComponentId + \"__\" + this.name}\n aria-controls={this.parentComponentId + \"__\" + this.name + \"-panel\"}\n tabindex={this.selected ? \"0\" : \"-1\"}\n aria-selected={this.selected ? \"true\" : \"false\"}\n class={this.selected ? \"pds-tab is-active\" : \"pds-tab\"}\n onClick={this.onTabClick.bind(this, this.index, this.parentComponentId)}\n >\n {this.variant === \"availability\" && availabilityTabEdgeInlineStart}\n {this.variant === \"availability\" && availabilityTabEdgeInlineEnd}\n <div class=\"pds-tab__content\"><slot/></div>\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"pds-tab.js","mappings":";;AAAA,MAAM,SAAS,GAAG,qlMAAqlM;;MCO1lMA,QAAM,iBAAAC,kBAAA,CAAA,MAAA,MAAA,SAAA,WAAA,CAAA;AALnB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;AAQE;;;AAGG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAI,KAAK;AAyBzB;;AAEG;;AAEK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAkDzB;IA3CS,UAAU,CAAC,KAAK,EAAE,iBAAiB,EAAA;QACzC,IAAI,IAAI,CAAC,QAAQ;YAAE;QACnB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;;IAG3C,UAAU,GAAA;AAChB,QAAA,MAAM,OAAO,GAAG;YACd,SAAS;YACT,IAAI,CAAC,QAAQ,IAAI,WAAW;YAC5B,IAAI,CAAC,QAAQ,IAAI,aAAa;SAC/B;QACD,OAAO,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;;IAG1C,MAAM,GAAA;QACJ,MAAM,8BAA8B,IAClC,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAA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A,GAAA,EAAA,0CAAA,EAAA,CAAO,CAAM,CACpC,CACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["PdsTab","__stencil_proxyCustomElement"],"sources":["src/components/pds-tabs/pds-tab/pds-tab.scss?tag=pds-tab","src/components/pds-tabs/pds-tab/pds-tab.tsx"],"sourcesContent":["pds-tab {\n align-items: center;\n display: inline-flex;\n position: relative;\n\n .pds-tabs--pill & {\n flex: 1;\n }\n}\n\n///\n/// Resets base button styles\n///\n@mixin pds-button-style-reset {\n appearance: none;\n background-color: transparent;\n border: var(--pine-border-width-none);\n box-shadow: none;\n color: inherit;\n cursor: pointer;\n font-family: inherit;\n padding: var(--pine-dimension-none);\n}\n\n.pds-tab {\n @include pds-button-style-reset();\n\n align-items: center;\n color: var(--pine-color-text-secondary);\n display: inline-flex;\n position: relative;\n text-decoration: none;\n white-space: nowrap;\n\n &.is-active,\n &[aria-selected='true'] {\n color: var(--pine-color-text);\n\n .pds-tab__content::after {\n opacity: 1;\n }\n }\n\n &:hover:not(:disabled) {\n color: var(--pine-color-text);\n }\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: var(--pine-outline-focus);\n outline-offset: var(--pine-border-width);\n }\n\n &:disabled,\n &.is-disabled {\n color: var(--pine-color-text-disabled);\n cursor: not-allowed;\n pointer-events: none;\n }\n\n .pds-tab__content {\n font-family: var(--pine-font-family-body);\n font-size: var(--pine-font-size);\n font-weight: var(--pine-font-weight-medium);\n letter-spacing: var(--pine-letter-spacing);\n line-height: var(--pine-line-height-body);\n padding-block-end: 11px;\n position: relative;\n\n &::after {\n background-color: var(--pine-color-brand);\n content: '';\n height: 3px;\n inset-block-end: var(--pine-dimension-none);\n inset-inline-end: var(--pine-dimension-none);\n inset-inline-start: var(--pine-dimension-none);\n opacity: 0;\n position: absolute;\n }\n }\n\n .pds-tab-edge {\n display: none;\n }\n}\n\n.pds-tabs--availability {\n --color-background-tab: transparent;\n\n .pds-tab {\n background-color: var(--color-background-tab);\n border-radius: calc(var(--pine-dimension-xs) * 1.25) calc(var(--pine-dimension-xs) * 1.25) var(--pine-dimension-none) var(--pine-dimension-none);\n color: var(--pine-color-text-secondary);\n padding: 8px 16px 13px;\n\n &.is-active,\n &[aria-selected='true'] {\n --color-background-tab: var(--pine-color-secondary);\n color: var(--pine-color-text);\n\n .pds-tab__content::after {\n opacity: 1;\n }\n\n .pds-tab-edge {\n z-index: var(--pine-z-index-raised);\n }\n }\n\n &:hover:not(.is-active, [aria-selected='true'], :disabled) {\n --color-background-tab: var(--pine-color-secondary-hover);\n color: var(--pine-color-text);\n }\n\n &:focus-visible {\n color: var(--pine-color-text-secondary);\n }\n\n &:disabled,\n &.is-disabled {\n --color-background-tab: transparent;\n color: var(--pine-color-text-disabled);\n }\n }\n\n .pds-tab__content {\n padding-block-end: 7px;\n }\n\n .pds-tab-edge {\n bottom: 0;\n display: block;\n height: 8px;\n inset-inline-end: 100%;\n overflow: hidden;\n position: absolute;\n width: 8px;\n\n &::before {\n border-radius: 50%;\n bottom: 0;\n box-shadow: 4px 4px 0 0 var(--color-background-tab);\n content: '';\n display: block;\n height: 200%;\n inset-inline-end: 0;\n position: absolute;\n width: 200%;\n }\n }\n\n .pds-tab-edge--end {\n inset-inline-end: unset;\n inset-inline-start: 100%;\n\n &::before {\n box-shadow: -4px 4px 0 0 var(--color-background-tab);\n inset-inline-end: unset;\n inset-inline-start: 0;\n }\n }\n}\n\n.pds-tabs--filter {\n .pds-tab {\n background-color: var(--pine-color-background-muted);\n border-radius: 50px;\n color: var(--pine-color-text);\n padding: 6px 15px;\n\n &.is-active,\n &[aria-selected='true'] {\n background-color: var(--pine-color-primary);\n color: var(--pine-color-text-primary);\n }\n\n &.is-active:hover:not(:disabled),\n &[aria-selected='true']:hover:not(:disabled) {\n background-color: var(--pine-color-primary-hover);\n }\n\n &:hover:not(.is-active, [aria-selected='true'], :disabled) {\n background-color: var(--pine-color-border-disabled);\n }\n\n &:disabled,\n &.is-disabled {\n background-color: transparent;\n color: var(--pine-color-text-disabled);\n\n &.is-active,\n &[aria-selected='true'] {\n background-color: var(--pine-color-primary-disabled);\n }\n }\n }\n\n .pds-tab__content {\n padding-block-end: var(--pine-dimension-none);\n\n &::after {\n content: unset;\n }\n }\n}\n\n.pds-tabs--pill {\n --color-background-tab: transparent;\n\n .pds-tab {\n background-color: var(--color-background-tab);\n border: var(--pine-border-width-thin) solid transparent;\n border-radius: var(--pine-dimension-xs);\n color: var(--pine-color-text-muted);\n flex: 1;\n height: 34px;\n justify-content: center;\n\n .pds-tab__content {\n align-items: center;\n display: flex;\n justify-content: center;\n padding-block-end: 0;\n }\n\n &.is-active,\n &[aria-selected='true'] {\n --color-background-tab: var(--pine-color-background-container);\n border-color: var(--pine-color-border);\n box-shadow: var(--pine-box-shadow-100);\n color: var(--pine-color-text-active);\n\n &:focus-visible {\n border-color: var(--color-border-focus);\n outline: var(--pine-outline-focus);\n outline-offset: var(--pine-border-width);\n }\n\n /* stylelint-disable max-nesting-depth */\n .pds-tab__content {\n &::after {\n opacity: 0;\n }\n }\n /* stylelint-enable max-nesting-depth */\n }\n\n &:disabled,\n &.is-disabled {\n color: var(--pine-color-text-disabled);\n }\n }\n}\n","import { Component, Element, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'pds-tab',\n styleUrl: 'pds-tab.scss',\n shadow: false,\n})\nexport class PdsTab {\n @Element() el: HTMLPdsTabElement;\n\n /**\n * Determines the tab's disabled state.\n * @defaultValue false\n */\n @Prop() disabled? = false;\n\n /**\n * Sets the related tab name, this name must match a `pds-tabpanel`'s tab name property\n */\n @Prop() name!: string;\n\n /**\n * Keeps track of the parentComponentId unique id, this property is passed by parent component\n */\n /** @internal */\n @Prop() parentComponentId: string;\n\n /**\n * Keeps track of if the expected tab variant, this property is passed by parent component\n */\n /** @internal */\n @Prop() variant: string;\n\n /**\n * Keeps track of if the tab index number, this property is passed by parent component\n */\n /** @internal */\n @Prop() index: number;\n\n /**\n * Keeps track of the tabpanel selected state, this property is passed by parent component\n */\n /** @internal */\n @Prop() selected = false;\n\n /**\n * Emits an event upon tab click for `pds-tab` and `pds-tabpanel` to listen for\n */\n /** @internal */\n @Event() pdsTabClick: EventEmitter<object>;\n private onTabClick(index, parentComponentId) {\n if (this.disabled) return;\n this.pdsTabClick.emit([index, parentComponentId]);\n }\n\n private classNames() {\n const classes = [\n 'pds-tab',\n this.selected && 'is-active',\n this.disabled && 'is-disabled',\n ];\n return classes.filter(Boolean).join(' ');\n }\n\n render() {\n const availabilityTabEdgeInlineStart = (\n <span class=\"pds-tab-edge\" role=\"presentation\"></span>\n )\n\n const availabilityTabEdgeInlineEnd = (\n <span class=\"pds-tab-edge pds-tab-edge--end\" role=\"presentation\"></span>\n )\n\n return (\n <Host variant={this.variant} slot=\"tabs\" index={this.index}>\n <button\n role=\"tab\"\n id={this.parentComponentId + \"__\" + this.name}\n aria-controls={this.parentComponentId + \"__\" + this.name + \"-panel\"}\n tabindex={this.disabled ? \"-1\" : (this.selected ? \"0\" : \"-1\")}\n aria-selected={this.selected ? \"true\" : \"false\"}\n aria-disabled={this.disabled ? \"true\" : null}\n disabled={this.disabled}\n class={this.classNames()}\n onClick={this.onTabClick.bind(this, this.index, this.parentComponentId)}\n >\n {this.variant === \"availability\" && availabilityTabEdgeInlineStart}\n {this.variant === \"availability\" && availabilityTabEdgeInlineEnd}\n <div class=\"pds-tab__content\"><slot/></div>\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pds-table-cell2.js","mappings":";;AAAA,MAAM,eAAe,GAAG,okCAAokC;;MCO/kC,YAAY,iBAAAA,kBAAA,CAAA,MAAA,YAAA,SAAA,WAAA,CAAA;AALzB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;AAQU,QAAA,IAAe,CAAA,eAAA,GAAuB,IAAI;AAE1C,QAAA,IAAY,CAAA,YAAA,GAAW,CAAC;AAoEhC;;;AAGG;AACc,QAAA,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AAI,IAAI,CAAC,cAAc,EAAE;AACrE,YAAA,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC;;AAGjC,QAAA,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC;;IAoB7B,MAAM,GAAA;AACJ,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EACH,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,IAAI,EAAC,UAAU,EACf,IAAI,EAAC,MAAM,EACX,KAAK,EACH,IAAI,CAAC,QAAQ;gBACb,IAAI,CAAC,QAAQ,CAAC,WAAW;gBACzB,IAAI,CAAC,QAAQ,CAAC;AACZ,kBAAE,EAAE,uBAAuB,EAAE,MAAM;AACnC,kBAAE,EAAE,EAAA,EAGR,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACR;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/components/pds-table/pds-table-cell/pds-table-cell.scss?tag=pds-table-cell&encapsulation=shadow","src/components/pds-table/pds-table-cell/pds-table-cell.tsx"],"sourcesContent":[":host {\n --box-shadow-fixed: 3px 3px 6px -2px rgba(0, 0, 0, 0.2);\n\n color: var(--pine-color-text);\n display: table-cell;\n font-family: var(--pine-font-family-body);\n font-size: var(--pine-font-size);\n font-weight: var(--pine-font-weight-regular);\n inset-inline-start: var(--pine-dimension-none);\n letter-spacing: var(--pine-letter-spacing);\n line-height: var(--pine-line-height-body);\n padding: var(--pine-dimension-sm);\n vertical-align: inherit;\n}\n\n:host(.is-compact) {\n padding-block: var(--pine-dimension-2xs)\n}\n\n:host(.is-fixed) {\n background: var(--pine-color-background-container);\n left: 0;\n position: sticky;\n z-index: var(--pine-z-index-raised);\n}\n\n// box shadow when table has scrolled and cell is fixed\n:host(.has-scrolled.is-fixed) {\n box-shadow: var(--box-shadow-fixed);\n}\n\n:host(.is-truncated) {\n max-width: 100px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n:host(.has-checkbox) {\n vertical-align: middle;\n width: 16px;\n}\n\n// Text Alignment\n:host(.pds-table-cell--align-start) {\n text-align: start;\n}\n\n:host(.pds-table-cell--align-center) {\n text-align: center;\n}\n\n:host(.pds-table-cell--align-end) {\n text-align: end;\n}\n\n:host(.pds-table-cell--align-justify) {\n text-align: justify;\n}\n","import { Component, Element, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'pds-table-cell',\n styleUrls: ['pds-table-cell.scss'],\n shadow: true,\n})\nexport class PdsTableCell {\n @Element() hostElement: HTMLPdsTableCellElement;\n private tableRef: HTMLPdsTableElement;\n private scrollContainer: HTMLElement | null = null;\n private setupTimer: number | undefined;\n private setupRetries: number = 0;\n\n componentWillRender() {\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n }\n\n componentDidLoad() {\n if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {\n // For responsive tables with fixed columns, set up scroll detection\n // This enables the first column to show a shadow when the table is scrolled horizontally\n this.setupScrollListener();\n }\n }\n\n disconnectedCallback() {\n this.cleanupScrollListener();\n }\n\n private setupScrollListener() {\n if (!this.tableRef) return;\n\n // Query shadowRoot once and cache the container\n const container = this.tableRef.shadowRoot?.querySelector('.pds-table-responsive-container') as HTMLElement;\n\n if (container) {\n // Container available immediately\n this.scrollContainer = container;\n this.scrollContainer.addEventListener('scroll', this.handleScroll, { passive: true });\n this.handleScroll(); // Initial check\n this.setupRetries = 0; // Reset counter on success\n } else {\n // Container not ready, set up timer for retry with bounds\n this.setupTimer = window.setTimeout(() => {\n if (this.scrollContainer) return; // Already found\n this.setupRetries = (this.setupRetries || 0) + 1;\n if (this.setupRetries <= 50) {\n this.setupScrollListener();\n } else {\n console.warn('Failed to find responsive container after 50 attempts');\n }\n }, 100);\n }\n }\n\n private cleanupScrollListener() {\n if (this.scrollContainer) {\n this.scrollContainer.removeEventListener('scroll', this.handleScroll);\n this.scrollContainer = null;\n }\n\n if (this.setupTimer !== undefined) {\n window.clearTimeout(this.setupTimer);\n this.setupTimer = undefined;\n }\n\n this.setupRetries = 0; // Reset retry counter\n }\n\n /**\n * Sets the text alignment within the cell.\n */\n @Prop() cellAlign?: 'start' | 'center' | 'end' | 'justify';\n\n /**\n * Truncates content to a max width of 100px and adds an ellipsis.\n */\n @Prop() truncate: boolean;\n\n /**\n * Determines if the table is currently scrolling.\n * @defaultValue false\n */\n @State() private tableScrolling: boolean = false;\n\n private classNames() {\n const classNames = [];\n\n if (this.tableRef && this.tableRef.compact) {\n classNames.push('is-compact');\n }\n\n if (this.cellAlign) {\n classNames.push(`pds-table-cell--align-${this.cellAlign}`);\n }\n\n if (this.truncate) {\n classNames.push('is-truncated');\n }\n\n if (this.tableRef && this.tableRef.fixedColumn && this.tableScrolling) {\n classNames.push('has-scrolled');\n }\n\n return classNames.join(' ');\n }\n\n /**\n * Handles scroll events to update fixed column shadow state.\n * Updates the tableScrolling state to control CSS classes for fixed column shadows.\n * @private\n */\n private handleScroll = () => {\n if (!this.scrollContainer) {\n return;\n }\n\n try {\n this.tableScrolling = this.scrollContainer.scrollLeft > 0;\n } catch (error) {\n console.warn('Scroll handler error:', error);\n }\n };\n\n render() {\n return (\n <Host\n class={this.classNames()}\n role=\"gridcell\"\n part=\"cell\"\n style={\n this.tableRef &&\n this.tableRef.fixedColumn &&\n this.tableRef.selectable\n ? { '--fixed-cell-position': '40px' }\n : {}\n }\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"pds-table-cell2.js","mappings":";;AAAA,MAAM,eAAe,GAAG,okCAAokC;;MCO/kC,YAAY,iBAAAA,kBAAA,CAAA,MAAA,YAAA,SAAA,WAAA,CAAA;AALzB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;AAQU,QAAA,IAAe,CAAA,eAAA,GAAuB,IAAI;AAE1C,QAAA,IAAY,CAAA,YAAA,GAAW,CAAC;AAoEhC;;;AAGG;A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C,WAAW,IAAI,IAAI,CAAC,cAAc,EAAE;AACrE,YAAA,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC;;AAGjC,QAAA,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC;;IAoB7B,MAAM,GAAA;AACJ,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EACH,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,IAAI,EAAC,UAAU,EACf,IAAI,EAAC,MAAM,EACX,KAAK,EACH,IAAI,CAAC,QAAQ;gBACb,IAAI,CAAC,QAAQ,CAAC,WAAW;gBACzB,IAAI,CAAC,QAAQ,CAAC;AACZ,kBAAE,EAAE,uBAAuB,EAAE,MAAM;AACnC,kBAAE,EAAE,EAAA,EAGR,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACR;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/components/pds-table/pds-table-cell/pds-table-cell.scss?tag=pds-table-cell&encapsulation=shadow","src/components/pds-table/pds-table-cell/pds-table-cell.tsx"],"sourcesContent":[":host {\n /* stylelint-disable-next-line pine-design-system/no-hardcoded-colors */\n --box-shadow-fixed: 3px 3px 6px -2px rgba(0, 0, 0, 0.2);\n\n color: var(--pine-color-text);\n display: table-cell;\n font-family: var(--pine-font-family-body);\n font-size: var(--pine-font-size);\n font-weight: var(--pine-font-weight-regular);\n inset-inline-start: var(--pine-dimension-none);\n letter-spacing: var(--pine-letter-spacing);\n line-height: var(--pine-line-height-body);\n padding: var(--pine-dimension-sm);\n vertical-align: inherit;\n}\n\n:host(.is-compact) {\n padding-block: var(--pine-dimension-2xs)\n}\n\n:host(.is-fixed) {\n background: var(--pine-color-background-container);\n left: 0;\n position: sticky;\n z-index: var(--pine-z-index-raised);\n}\n\n// box shadow when table has scrolled and cell is fixed\n:host(.has-scrolled.is-fixed) {\n box-shadow: var(--box-shadow-fixed);\n}\n\n:host(.is-truncated) {\n max-width: 100px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n:host(.has-checkbox) {\n vertical-align: middle;\n width: 16px;\n}\n\n// Text Alignment\n:host(.pds-table-cell--align-start) {\n text-align: start;\n}\n\n:host(.pds-table-cell--align-center) {\n text-align: center;\n}\n\n:host(.pds-table-cell--align-end) {\n text-align: end;\n}\n\n:host(.pds-table-cell--align-justify) {\n text-align: justify;\n}\n","import { Component, Element, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'pds-table-cell',\n styleUrls: ['pds-table-cell.scss'],\n shadow: true,\n})\nexport class PdsTableCell {\n @Element() hostElement: HTMLPdsTableCellElement;\n private tableRef: HTMLPdsTableElement;\n private scrollContainer: HTMLElement | null = null;\n private setupTimer: number | undefined;\n private setupRetries: number = 0;\n\n componentWillRender() {\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n }\n\n componentDidLoad() {\n if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {\n // For responsive tables with fixed columns, set up scroll detection\n // This enables the first column to show a shadow when the table is scrolled horizontally\n this.setupScrollListener();\n }\n }\n\n disconnectedCallback() {\n this.cleanupScrollListener();\n }\n\n private setupScrollListener() {\n if (!this.tableRef) return;\n\n // Query shadowRoot once and cache the container\n const container = this.tableRef.shadowRoot?.querySelector('.pds-table-responsive-container') as HTMLElement;\n\n if (container) {\n // Container available immediately\n this.scrollContainer = container;\n this.scrollContainer.addEventListener('scroll', this.handleScroll, { passive: true });\n this.handleScroll(); // Initial check\n this.setupRetries = 0; // Reset counter on success\n } else {\n // Container not ready, set up timer for retry with bounds\n this.setupTimer = window.setTimeout(() => {\n if (this.scrollContainer) return; // Already found\n this.setupRetries = (this.setupRetries || 0) + 1;\n if (this.setupRetries <= 50) {\n this.setupScrollListener();\n } else {\n console.warn('Failed to find responsive container after 50 attempts');\n }\n }, 100);\n }\n }\n\n private cleanupScrollListener() {\n if (this.scrollContainer) {\n this.scrollContainer.removeEventListener('scroll', this.handleScroll);\n this.scrollContainer = null;\n }\n\n if (this.setupTimer !== undefined) {\n window.clearTimeout(this.setupTimer);\n this.setupTimer = undefined;\n }\n\n this.setupRetries = 0; // Reset retry counter\n }\n\n /**\n * Sets the text alignment within the cell.\n */\n @Prop() cellAlign?: 'start' | 'center' | 'end' | 'justify';\n\n /**\n * Truncates content to a max width of 100px and adds an ellipsis.\n */\n @Prop() truncate: boolean;\n\n /**\n * Determines if the table is currently scrolling.\n * @defaultValue false\n */\n @State() private tableScrolling: boolean = false;\n\n private classNames() {\n const classNames = [];\n\n if (this.tableRef && this.tableRef.compact) {\n classNames.push('is-compact');\n }\n\n if (this.cellAlign) {\n classNames.push(`pds-table-cell--align-${this.cellAlign}`);\n }\n\n if (this.truncate) {\n classNames.push('is-truncated');\n }\n\n if (this.tableRef && this.tableRef.fixedColumn && this.tableScrolling) {\n classNames.push('has-scrolled');\n }\n\n return classNames.join(' ');\n }\n\n /**\n * Handles scroll events to update fixed column shadow state.\n * Updates the tableScrolling state to control CSS classes for fixed column shadows.\n * @private\n */\n private handleScroll = () => {\n if (!this.scrollContainer) {\n return;\n }\n\n try {\n this.tableScrolling = this.scrollContainer.scrollLeft > 0;\n } catch (error) {\n console.warn('Scroll handler error:', error);\n }\n };\n\n render() {\n return (\n <Host\n class={this.classNames()}\n role=\"gridcell\"\n part=\"cell\"\n style={\n this.tableRef &&\n this.tableRef.fixedColumn &&\n this.tableRef.selectable\n ? { '--fixed-cell-position': '40px' }\n : {}\n }\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { u as upSmall, d as downSmall } from './index2.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './pds-icon2.js';
|
|
4
4
|
|
|
5
|
-
const pdsTableHeadCellCss = ":host{--border-head-cell-default:var(--pine-border-width-thin) solid var(--pine-color-
|
|
5
|
+
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);left: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(.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}";
|
|
6
6
|
|
|
7
7
|
const PdsTableHeadCell = /*@__PURE__*/ proxyCustomElement(class PdsTableHeadCell extends HTMLElement {
|
|
8
8
|
constructor(registerHost) {
|
|
@@ -28,6 +28,16 @@ const PdsTableHeadCell = /*@__PURE__*/ proxyCustomElement(class PdsTableHeadCell
|
|
|
28
28
|
* @defaultValue false
|
|
29
29
|
*/
|
|
30
30
|
this.isSelected = false;
|
|
31
|
+
/**
|
|
32
|
+
* Determines if the parent table-head has the border attribute.
|
|
33
|
+
* @defaultValue false
|
|
34
|
+
*/
|
|
35
|
+
this.hasHeadBorder = false;
|
|
36
|
+
/**
|
|
37
|
+
* Determines if the parent table-head has the background attribute.
|
|
38
|
+
* @defaultValue false
|
|
39
|
+
*/
|
|
40
|
+
this.hasHeadBackground = false;
|
|
31
41
|
/**
|
|
32
42
|
* Handles scroll events to update fixed column shadow state.
|
|
33
43
|
* Updates the tableScrolling state to control CSS classes for fixed column shadows.
|
|
@@ -56,8 +66,25 @@ const PdsTableHeadCell = /*@__PURE__*/ proxyCustomElement(class PdsTableHeadCell
|
|
|
56
66
|
}
|
|
57
67
|
};
|
|
58
68
|
}
|
|
59
|
-
|
|
69
|
+
/**
|
|
70
|
+
* Programmatically sets this column as the active sort column with the specified direction.
|
|
71
|
+
* Used by pds-table to apply a default sort on initial load.
|
|
72
|
+
* @param direction - The sort direction to apply ('asc' or 'desc')
|
|
73
|
+
*/
|
|
74
|
+
async setActiveSort(direction) {
|
|
75
|
+
if (!this.sortable)
|
|
76
|
+
return;
|
|
77
|
+
this.sortingDirection = direction;
|
|
78
|
+
this.hostElement.classList.add('is-active');
|
|
79
|
+
}
|
|
80
|
+
componentWillLoad() {
|
|
81
|
+
// Set initial references and state before first render
|
|
60
82
|
this.tableRef = this.hostElement.closest('pds-table');
|
|
83
|
+
const tableHead = this.hostElement.closest('pds-table-head');
|
|
84
|
+
if (tableHead) {
|
|
85
|
+
this.hasHeadBorder = tableHead.hasAttribute('border');
|
|
86
|
+
this.hasHeadBackground = tableHead.hasAttribute('background');
|
|
87
|
+
}
|
|
61
88
|
}
|
|
62
89
|
componentDidLoad() {
|
|
63
90
|
if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {
|
|
@@ -65,9 +92,29 @@ const PdsTableHeadCell = /*@__PURE__*/ proxyCustomElement(class PdsTableHeadCell
|
|
|
65
92
|
// This enables the first column header to show a shadow when the table is scrolled horizontally
|
|
66
93
|
this.setupScrollListener();
|
|
67
94
|
}
|
|
95
|
+
// Watch for changes to the parent table-head's border and background attributes
|
|
96
|
+
const tableHead = this.hostElement.closest('pds-table-head');
|
|
97
|
+
if (tableHead && typeof MutationObserver !== 'undefined') {
|
|
98
|
+
// Defensive guard: disconnect existing observer before creating a new one
|
|
99
|
+
if (this.headObserver) {
|
|
100
|
+
this.headObserver.disconnect();
|
|
101
|
+
}
|
|
102
|
+
this.headObserver = new MutationObserver(() => {
|
|
103
|
+
// Update state when border or background attributes change
|
|
104
|
+
this.hasHeadBorder = tableHead.hasAttribute('border');
|
|
105
|
+
this.hasHeadBackground = tableHead.hasAttribute('background');
|
|
106
|
+
});
|
|
107
|
+
this.headObserver.observe(tableHead, {
|
|
108
|
+
attributes: true,
|
|
109
|
+
attributeFilter: ['border', 'background']
|
|
110
|
+
});
|
|
111
|
+
}
|
|
68
112
|
}
|
|
69
113
|
disconnectedCallback() {
|
|
70
114
|
this.cleanupScrollListener();
|
|
115
|
+
if (this.headObserver) {
|
|
116
|
+
this.headObserver.disconnect();
|
|
117
|
+
}
|
|
71
118
|
}
|
|
72
119
|
setupScrollListener() {
|
|
73
120
|
var _a;
|
|
@@ -125,14 +172,20 @@ const PdsTableHeadCell = /*@__PURE__*/ proxyCustomElement(class PdsTableHeadCell
|
|
|
125
172
|
if (this.tableRef && this.tableRef.fixedColumn && this.tableScrolling) {
|
|
126
173
|
classNames.push('has-scrolled');
|
|
127
174
|
}
|
|
175
|
+
if (this.hasHeadBackground) {
|
|
176
|
+
classNames.push('has-head-background');
|
|
177
|
+
}
|
|
178
|
+
if (this.hasHeadBorder) {
|
|
179
|
+
classNames.push('has-head-border');
|
|
180
|
+
}
|
|
128
181
|
return classNames.join(' ');
|
|
129
182
|
}
|
|
130
183
|
render() {
|
|
131
|
-
return (h(Host, { key: '
|
|
184
|
+
return (h(Host, { key: '18228c7b1950668f12f983d9e5364bbf2deb3f1a', class: this.classNames(), role: "columnheader", onClick: this.toggleSort, part: "head-cell", style: this.tableRef &&
|
|
132
185
|
this.tableRef.fixedColumn &&
|
|
133
186
|
this.tableRef.selectable
|
|
134
187
|
? { '--fixed-cell-position': '40px' }
|
|
135
|
-
: {} }, h("slot", { key: '
|
|
188
|
+
: {} }, h("slot", { key: '283f5e031cc8fe521c25af8060ce51c3ebaffa93' }), this.sortable && (h("pds-icon", { key: 'a7e172c6fbf1185ab9885af04bcf2f2449370e6b', icon: this.sortingDirection === 'asc' ? upSmall : downSmall, part: "sort-icon" }))));
|
|
136
189
|
}
|
|
137
190
|
get hostElement() { return this; }
|
|
138
191
|
static get style() { return pdsTableHeadCellCss; }
|
|
@@ -141,7 +194,10 @@ const PdsTableHeadCell = /*@__PURE__*/ proxyCustomElement(class PdsTableHeadCell
|
|
|
141
194
|
"sortable": [4],
|
|
142
195
|
"sortingDirection": [32],
|
|
143
196
|
"tableScrolling": [32],
|
|
144
|
-
"isSelected": [32]
|
|
197
|
+
"isSelected": [32],
|
|
198
|
+
"hasHeadBorder": [32],
|
|
199
|
+
"hasHeadBackground": [32],
|
|
200
|
+
"setActiveSort": [64]
|
|
145
201
|
}]);
|
|
146
202
|
function defineCustomElement() {
|
|
147
203
|
if (typeof customElements === "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pds-table-head-cell2.js","mappings":";;;;AAAA,MAAM,mBAAmB,GAAG,y6CAAy6C;;MCSx7C,gBAAgB,iBAAAA,kBAAA,CAAA,MAAA,gBAAA,SAAA,WAAA,CAAA;AAL7B,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AAQU,QAAA,IAAe,CAAA,eAAA,GAAuB,IAAI;AAE1C,QAAA,IAAY,CAAA,YAAA,GAAW,CAAC;AAiBhC;;AAEG;AACc,QAAA,IAAgB,CAAA,gBAAA,GAAmB,KAAK;AAEzD;;;AAGG;AACc,QAAA,IAAc,CAAA,cAAA,GAAY,KAAK;AAEhD;;;AAGG;AACM,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AA0DpC;;;;AAIG;AACK,QAAA,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EAGR,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,EACZ,IAAI,CAAC,QAAQ,KACZ,CAAU,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAE,IAAI,CAAC,gBAAgB,KAAK,KAAK,GAAG,OAAO,GAAG,SAAS,EAAE,IAAI,EAAC,WAAW,EAAG,CAAA,CAC3F,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/components/pds-table/pds-table-head-cell/pds-table-head-cell.scss?tag=pds-table-head-cell&encapsulation=shadow","src/components/pds-table/pds-table-head-cell/pds-table-head-cell.tsx"],"sourcesContent":[":host {\n --border-head-cell-default: var(--pine-border-width-thin) solid var(--pine-color-background-subtle);\n\n --box-shadow-default: 3px 3px 6px -2px rgba(0, 0, 0, 0.1);\n\n border-block-end: var(--border-head-cell-default);\n color: var(--pine-color-text);\n display: table-cell;\n font-family: var(--pine-font-family-body);\n font-size: var(--pine-font-size);\n font-weight: var(--pine-font-weight-regular);\n line-height: var(--pine-line-height-body);\n padding: var(--pine-dimension-150);\n position: relative;\n text-align: start;\n vertical-align: inherit;\n}\n\n:host(.is-compact) {\n padding-block: var(--pine-dimension-2xs)\n}\n\n:host(.is-fixed) {\n background: var(--pine-color-background-container);\n left: var(--pine-dimension-none);\n position: sticky;\n z-index: var(--pine-z-index-raised);\n}\n\n// box shadow when table has scrolled and cell is fixed\n:host(.has-scrolled.is-fixed) {\n box-shadow: var(--box-shadow-default);\n}\n\n:host(.is-sortable) {\n cursor: pointer;\n\n pds-icon {\n margin-inline-start: var(--pine-dimension-2xs);\n padding-block-start: 2px;\n position: absolute;\n }\n}\n\n:host(.is-sortable:hover),\n:host(.is-active) {\n color: var(--pine-color-text-strong);\n}\n\n// Text Alignment\n:host(.pds-table-head-cell--align-start) {\n text-align: start;\n}\n\n:host(.pds-table-head-cell--align-center) {\n text-align: center;\n}\n\n:host(.pds-table-head-cell--align-end) {\n text-align: end;\n}\n\n:host(.pds-table-head-cell--align-justify) {\n text-align: justify;\n}\n","import { Component, Element, Host, Prop, h, Event, EventEmitter, State } from '@stencil/core';\n\nimport { downSmall, upSmall } from '@pine-ds/icons/icons';\n\n@Component({\n tag: 'pds-table-head-cell',\n styleUrls: ['pds-table-head-cell.scss'],\n shadow: true,\n})\nexport class PdsTableHeadCell {\n @Element() hostElement: HTMLPdsTableHeadCellElement;\n private tableRef: HTMLPdsTableElement;\n private scrollContainer: HTMLElement | null = null;\n private setupTimer: number | undefined;\n private setupRetries: number = 0;\n\n /**\n * Sets the text alignment within the head cell.\n */\n @Prop() cellAlign?: 'start' | 'center' | 'end' | 'justify';\n\n /**\n * Determines whether the table column is sortable when set to `true`.\n */\n @Prop() sortable: boolean;\n\n /**\n * Event emitted to signal that a table column header has been sorted, providing information about the sorted column's name and sorting direction.\n */\n @Event() pdsTableSort: EventEmitter<{ column: string; direction: string }>;\n\n /**\n * The direction of sorting.\n */\n @State() private sortingDirection: 'asc' | 'desc' = 'asc';\n\n /**\n * Determines if the table is currently scrolling.\n * @defaultValue false\n */\n @State() private tableScrolling: boolean = false;\n\n /**\n * Determines if the table row is currently selected.\n * @defaultValue false\n */\n @State() isSelected: boolean = false;\n\n componentWillRender() {\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n }\n\n componentDidLoad() {\n if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {\n // For responsive tables with fixed columns, set up scroll detection\n // This enables the first column header to show a shadow when the table is scrolled horizontally\n this.setupScrollListener();\n }\n }\n\n disconnectedCallback() {\n this.cleanupScrollListener();\n }\n\n private setupScrollListener() {\n if (!this.tableRef) return;\n\n // Query shadowRoot once and cache the container\n const container = this.tableRef.shadowRoot?.querySelector('.pds-table-responsive-container') as HTMLElement;\n\n if (container) {\n // Container available immediately\n this.scrollContainer = container;\n this.scrollContainer.addEventListener('scroll', this.handleScroll, { passive: true });\n this.handleScroll(); // Initial check\n this.setupRetries = 0; // Reset counter on success\n } else {\n // Container not ready, set up timer for retry with bounds\n this.setupTimer = window.setTimeout(() => {\n if (this.scrollContainer) return; // Already found\n this.setupRetries = (this.setupRetries || 0) + 1;\n if (this.setupRetries <= 50) {\n this.setupScrollListener();\n } else {\n console.warn('Failed to find responsive container after 50 attempts');\n }\n }, 100);\n }\n }\n\n private cleanupScrollListener() {\n if (this.scrollContainer) {\n this.scrollContainer.removeEventListener('scroll', this.handleScroll);\n this.scrollContainer = null;\n }\n\n if (this.setupTimer !== undefined) {\n window.clearTimeout(this.setupTimer);\n this.setupTimer = undefined;\n }\n\n this.setupRetries = 0; // Reset retry counter\n }\n\n /**\n * Handles scroll events to update fixed column shadow state.\n * Updates the tableScrolling state to control CSS classes for fixed column shadows.\n * @private\n */\n private handleScroll = () => {\n if (!this.scrollContainer) {\n return;\n }\n\n try {\n this.tableScrolling = this.scrollContainer.scrollLeft > 0;\n } catch (error) {\n console.warn('Scroll handler error:', error);\n }\n };\n\n private toggleSort = () => {\n if (this.sortable) {\n const column = this.hostElement.innerText.trim();\n this.sortingDirection = this.sortingDirection === 'asc' ? 'desc' : 'asc';\n\n this.tableRef.querySelectorAll('pds-table-head-cell').forEach((headCell) => {\n headCell.classList.remove('is-active');\n });\n\n this.hostElement.classList.toggle('is-active');\n this.pdsTableSort.emit({ column, direction: this.sortingDirection });\n }\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.tableRef && this.tableRef.compact) {\n classNames.push('is-compact');\n }\n\n if (this.cellAlign) {\n classNames.push(`pds-table-head-cell--align-${this.cellAlign}`);\n }\n\n if (this.sortable) {\n classNames.push('is-sortable');\n }\n\n if (this.sortable && this.sortingDirection !== null) {\n classNames.push('sort-' + this.sortingDirection);\n }\n\n if (this.tableRef && this.tableRef.fixedColumn && this.tableScrolling) {\n classNames.push('has-scrolled');\n }\n\n return classNames.join(' ');\n }\n\n render() {\n return (\n <Host\n class={this.classNames()}\n role=\"columnheader\"\n onClick={this.toggleSort}\n part=\"head-cell\"\n style={\n this.tableRef &&\n this.tableRef.fixedColumn &&\n this.tableRef.selectable\n ? { '--fixed-cell-position': '40px' }\n : {}\n }\n >\n <slot></slot>\n {this.sortable && (\n <pds-icon icon={this.sortingDirection === 'asc' ? upSmall : downSmall} part=\"sort-icon\" />\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"pds-table-head-cell2.js","mappings":";;;;AAAA,MAAM,mBAAmB,GAAG,yqDAAyqD;;MCSxrD,gBAAgB,iBAAAA,kBAAA,CAAA,MAAA,gBAAA,SAAA,WAAA,CAAA;AAL7B,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AAQU,QAAA,IAAe,CAAA,eAAA,GAAuB,IAAI;AAE1C,QAAA,IAAY,CAAA,YAAA,GAAW,CAAC;AAkBhC;;AAEG;AACc,QAAA,IAAgB,CAAA,gBAAA,GAAmB,KAAK;AAEzD;;;AAGG;AACc,QAAA,IAAc,CAAA,cAAA,GAAY,KAAK;AAEhD;;;AAGG;AACM,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AAEpC;;;AAGG;AACc,QAAA,IAAa,CAAA,aAAA,GAAY,KAAK;AAE/C;;;AAGG;AACc,QAAA,IAAiB,CAAA,iBAAA,GAAY,KAAK;AAuGnD;;;;AAIG;AACK,QAAA,IAAY,CAAA,YAAA,GAAG,MAAK;AAC1B,YAAA,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;gBACzB;;AAGF,YAAA,IAAI;gBACF,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,eAAe,CAAC,UAAU,GAAG,CAAC;;YACzD,OAAO,KAAK,EAAE;AACd,gBAAA,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,KAAK,CAAC;;AAEhD,SAAC;AAEO,QAAA,IAAU,CAAA,UAAA,GAAG,MAAK;AACxB,YAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,MAAM,MAAM,GAAG,IAAI,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/components/pds-table/pds-table-head-cell/pds-table-head-cell.scss?tag=pds-table-head-cell&encapsulation=shadow","src/components/pds-table/pds-table-head-cell/pds-table-head-cell.tsx"],"sourcesContent":[":host {\n --border-head-cell-default: var(--pine-border-width-thin) solid var(--pine-color-border-subtle);\n\n /* stylelint-disable-next-line pine-design-system/no-hardcoded-colors */\n --box-shadow-default: 3px 3px 6px -2px rgba(0, 0, 0, 0.1);\n\n border-block-end: var(--border-head-cell-default);\n color: var(--pine-color-text);\n display: table-cell;\n font-family: var(--pine-font-family-body);\n font-size: var(--pine-font-size);\n font-weight: var(--pine-font-weight-regular);\n letter-spacing: var(--pine-letter-spacing);\n line-height: var(--pine-line-height-body);\n padding: var(--pine-dimension-sm);\n position: relative;\n text-align: start;\n vertical-align: inherit;\n}\n\n:host(.is-compact) {\n padding-block: var(--pine-dimension-2xs)\n}\n\n:host(.is-fixed) {\n background: var(--pine-color-background-container);\n left: var(--pine-dimension-none);\n position: sticky;\n z-index: var(--pine-z-index-raised);\n}\n\n// When parent table-head has background, fixed cells should inherit it\n:host(.is-fixed.has-head-background) {\n background-color: var(--pine-color-background-subtle);\n}\n\n// When parent table-head has border prop, add top border (bottom already set in :host)\n:host(.has-head-border) {\n border-block-start: var(--border-head-cell-default);\n}\n\n// box shadow when table has scrolled and cell is fixed\n:host(.has-scrolled.is-fixed) {\n box-shadow: var(--box-shadow-default);\n}\n\n:host(.is-sortable) {\n cursor: pointer;\n\n pds-icon {\n margin-inline-start: var(--pine-dimension-2xs);\n padding-block-start: 2px;\n position: absolute;\n }\n}\n\n:host(.is-sortable:hover),\n:host(.is-active) {\n color: var(--pine-color-text-strong);\n}\n\n// Text Alignment\n:host(.pds-table-head-cell--align-start) {\n text-align: start;\n}\n\n:host(.pds-table-head-cell--align-center) {\n text-align: center;\n}\n\n:host(.pds-table-head-cell--align-end) {\n text-align: end;\n}\n\n:host(.pds-table-head-cell--align-justify) {\n text-align: justify;\n}\n","import { Component, Element, Host, Prop, h, Event, EventEmitter, State, Method } from '@stencil/core';\n\nimport { downSmall, upSmall } from '@pine-ds/icons/icons';\n\n@Component({\n tag: 'pds-table-head-cell',\n styleUrls: ['pds-table-head-cell.scss'],\n shadow: true,\n})\nexport class PdsTableHeadCell {\n @Element() hostElement: HTMLPdsTableHeadCellElement;\n private tableRef: HTMLPdsTableElement;\n private scrollContainer: HTMLElement | null = null;\n private setupTimer: number | undefined;\n private setupRetries: number = 0;\n private headObserver?: MutationObserver;\n\n /**\n * Sets the text alignment within the head cell.\n */\n @Prop() cellAlign?: 'start' | 'center' | 'end' | 'justify';\n\n /**\n * Determines whether the table column is sortable when set to `true`.\n */\n @Prop() sortable: boolean;\n\n /**\n * Event emitted to signal that a table column header has been sorted, providing information about the sorted column's name and sorting direction.\n */\n @Event() pdsTableSort: EventEmitter<{ column: string; direction: string }>;\n\n /**\n * The direction of sorting.\n */\n @State() private sortingDirection: 'asc' | 'desc' = 'asc';\n\n /**\n * Determines if the table is currently scrolling.\n * @defaultValue false\n */\n @State() private tableScrolling: boolean = false;\n\n /**\n * Determines if the table row is currently selected.\n * @defaultValue false\n */\n @State() isSelected: boolean = false;\n\n /**\n * Determines if the parent table-head has the border attribute.\n * @defaultValue false\n */\n @State() private hasHeadBorder: boolean = false;\n\n /**\n * Determines if the parent table-head has the background attribute.\n * @defaultValue false\n */\n @State() private hasHeadBackground: boolean = false;\n\n /**\n * Programmatically sets this column as the active sort column with the specified direction.\n * Used by pds-table to apply a default sort on initial load.\n * @param direction - The sort direction to apply ('asc' or 'desc')\n */\n @Method()\n async setActiveSort(direction: 'asc' | 'desc') {\n if (!this.sortable) return;\n\n this.sortingDirection = direction;\n this.hostElement.classList.add('is-active');\n }\n\n componentWillLoad() {\n // Set initial references and state before first render\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n\n const tableHead = this.hostElement.closest('pds-table-head') as HTMLElement;\n if (tableHead) {\n this.hasHeadBorder = tableHead.hasAttribute('border');\n this.hasHeadBackground = tableHead.hasAttribute('background');\n }\n }\n\n componentDidLoad() {\n if (this.tableRef && this.tableRef.responsive && this.tableRef.fixedColumn) {\n // For responsive tables with fixed columns, set up scroll detection\n // This enables the first column header to show a shadow when the table is scrolled horizontally\n this.setupScrollListener();\n }\n\n // Watch for changes to the parent table-head's border and background attributes\n const tableHead = this.hostElement.closest('pds-table-head') as HTMLElement;\n if (tableHead && typeof MutationObserver !== 'undefined') {\n // Defensive guard: disconnect existing observer before creating a new one\n if (this.headObserver) {\n this.headObserver.disconnect();\n }\n\n this.headObserver = new MutationObserver(() => {\n // Update state when border or background attributes change\n this.hasHeadBorder = tableHead.hasAttribute('border');\n this.hasHeadBackground = tableHead.hasAttribute('background');\n });\n\n this.headObserver.observe(tableHead, {\n attributes: true,\n attributeFilter: ['border', 'background']\n });\n }\n }\n\n disconnectedCallback() {\n this.cleanupScrollListener();\n\n if (this.headObserver) {\n this.headObserver.disconnect();\n }\n }\n\n\n private setupScrollListener() {\n if (!this.tableRef) return;\n\n // Query shadowRoot once and cache the container\n const container = this.tableRef.shadowRoot?.querySelector('.pds-table-responsive-container') as HTMLElement;\n\n if (container) {\n // Container available immediately\n this.scrollContainer = container;\n this.scrollContainer.addEventListener('scroll', this.handleScroll, { passive: true });\n this.handleScroll(); // Initial check\n this.setupRetries = 0; // Reset counter on success\n } else {\n // Container not ready, set up timer for retry with bounds\n this.setupTimer = window.setTimeout(() => {\n if (this.scrollContainer) return; // Already found\n this.setupRetries = (this.setupRetries || 0) + 1;\n if (this.setupRetries <= 50) {\n this.setupScrollListener();\n } else {\n console.warn('Failed to find responsive container after 50 attempts');\n }\n }, 100);\n }\n }\n\n private cleanupScrollListener() {\n if (this.scrollContainer) {\n this.scrollContainer.removeEventListener('scroll', this.handleScroll);\n this.scrollContainer = null;\n }\n\n if (this.setupTimer !== undefined) {\n window.clearTimeout(this.setupTimer);\n this.setupTimer = undefined;\n }\n\n this.setupRetries = 0; // Reset retry counter\n }\n\n /**\n * Handles scroll events to update fixed column shadow state.\n * Updates the tableScrolling state to control CSS classes for fixed column shadows.\n * @private\n */\n private handleScroll = () => {\n if (!this.scrollContainer) {\n return;\n }\n\n try {\n this.tableScrolling = this.scrollContainer.scrollLeft > 0;\n } catch (error) {\n console.warn('Scroll handler error:', error);\n }\n };\n\n private toggleSort = () => {\n if (this.sortable) {\n const column = this.hostElement.innerText.trim();\n this.sortingDirection = this.sortingDirection === 'asc' ? 'desc' : 'asc';\n\n this.tableRef.querySelectorAll('pds-table-head-cell').forEach((headCell) => {\n headCell.classList.remove('is-active');\n });\n\n this.hostElement.classList.toggle('is-active');\n this.pdsTableSort.emit({ column, direction: this.sortingDirection });\n }\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.tableRef && this.tableRef.compact) {\n classNames.push('is-compact');\n }\n\n if (this.cellAlign) {\n classNames.push(`pds-table-head-cell--align-${this.cellAlign}`);\n }\n\n if (this.sortable) {\n classNames.push('is-sortable');\n }\n\n if (this.sortable && this.sortingDirection !== null) {\n classNames.push('sort-' + this.sortingDirection);\n }\n\n if (this.tableRef && this.tableRef.fixedColumn && this.tableScrolling) {\n classNames.push('has-scrolled');\n }\n\n if (this.hasHeadBackground) {\n classNames.push('has-head-background');\n }\n\n if (this.hasHeadBorder) {\n classNames.push('has-head-border');\n }\n\n return classNames.join(' ');\n }\n\n render() {\n return (\n <Host\n class={this.classNames()}\n role=\"columnheader\"\n onClick={this.toggleSort}\n part=\"head-cell\"\n style={\n this.tableRef &&\n this.tableRef.fixedColumn &&\n this.tableRef.selectable\n ? { '--fixed-cell-position': '40px' }\n : {}\n }\n >\n <slot></slot>\n {this.sortable && (\n <pds-icon icon={this.sortingDirection === 'asc' ? upSmall : downSmall} part=\"sort-icon\" />\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -4,7 +4,7 @@ import { d as defineCustomElement$4 } from './pds-checkbox2.js';
|
|
|
4
4
|
import { d as defineCustomElement$3 } from './pds-icon2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './pds-table-head-cell2.js';
|
|
6
6
|
|
|
7
|
-
const pdsTableHeadCss = ":host{--border-head-default:var(--pine-border-width-thin) solid var(--pine-color-background-subtle);border-color:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:table-header-group;vertical-align:middle}:host::part(checkbox-cell){background-color: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 pds-table-checkbox-cell{-webkit-border-after:var(--border-head-default);border-block-end:var(--border-head-default)}";
|
|
7
|
+
const pdsTableHeadCss = ":host{--border-head-default:var(--pine-border-width-thin) solid var(--pine-color-background-subtle);border-color:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:table-header-group;vertical-align:middle}:host::part(checkbox-cell){background-color: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 pds-table-checkbox-cell{-webkit-border-after:var(--border-head-default);border-block-end:var(--border-head-default)}:host([border]){-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);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host([border]) pds-table-head-cell{-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);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle)}:host([background]){background-color:var(--pine-color-background-subtle)}:host([background]) pds-table-head-cell{background-color:var(--pine-color-background-subtle)}";
|
|
8
8
|
|
|
9
9
|
const PdsTableHead$1 = /*@__PURE__*/ proxyCustomElement(class PdsTableHead extends HTMLElement {
|
|
10
10
|
constructor(registerHost) {
|
|
@@ -14,6 +14,16 @@ const PdsTableHead$1 = /*@__PURE__*/ proxyCustomElement(class PdsTableHead exten
|
|
|
14
14
|
}
|
|
15
15
|
this.__attachShadow();
|
|
16
16
|
this.pdsTableSelectAll = createEvent(this, "pdsTableSelectAll", 7);
|
|
17
|
+
/**
|
|
18
|
+
* Adds top and bottom borders to the table head.
|
|
19
|
+
* @defaultValue false
|
|
20
|
+
*/
|
|
21
|
+
this.border = false;
|
|
22
|
+
/**
|
|
23
|
+
* Adds a subtle background color to the table head.
|
|
24
|
+
* @defaultValue false
|
|
25
|
+
*/
|
|
26
|
+
this.background = false;
|
|
17
27
|
this.generateUniqueId = () => {
|
|
18
28
|
const randomString = Math.random().toString(36).substring(2, 8);
|
|
19
29
|
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
|
|
@@ -44,13 +54,15 @@ const PdsTableHead$1 = /*@__PURE__*/ proxyCustomElement(class PdsTableHead exten
|
|
|
44
54
|
}
|
|
45
55
|
}
|
|
46
56
|
render() {
|
|
47
|
-
return (h(Host, { key: '
|
|
57
|
+
return (h(Host, { key: 'ebcbe90052f2f4b5aa6e3a09a7b23c46e5aba90f', role: "row", part: "head" }, this.tableRef && this.tableRef.selectable && (h("pds-table-head-cell", { key: 'cd43463e58db8244439d07b3826534a70028c1a4', part: this.tableRef.selectable ? 'checkbox-cell' : '' }, h("pds-checkbox", { key: 'd6f4e05806a2c823188bc01fdc7a299aab9bf7d7', 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: '8f86dd51b56f5c37cdcfbd3b2513b0e92c6e4c14' })));
|
|
48
58
|
}
|
|
49
59
|
get hostElement() { return this; }
|
|
50
60
|
static get style() { return pdsTableHeadCss; }
|
|
51
61
|
}, [257, "pds-table-head", {
|
|
52
62
|
"indeterminate": [1028],
|
|
53
|
-
"isSelected": [1028, "is-selected"]
|
|
63
|
+
"isSelected": [1028, "is-selected"],
|
|
64
|
+
"border": [516],
|
|
65
|
+
"background": [516]
|
|
54
66
|
}]);
|
|
55
67
|
function defineCustomElement$1() {
|
|
56
68
|
if (typeof customElements === "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pds-table-head.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,
|
|
1
|
+
{"file":"pds-table-head.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,87CAA87C;;MCQz8CA,cAAY,iBAAAC,kBAAA,CAAA,MAAA,YAAA,SAAA,WAAA,CAAA;AALzB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AAoBE;;;AAGG;AACsB,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;AAEvC;;;AAGG;AACsB,QAAA,IAAU,CAAA,UAAA,GAAG,KAAK;AAOnC,QAAA,IAAgB,CAAA,gBAAA,GAAG,MAAK;AAC9B,YAAA,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;AAC/D,YAAA,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;AAChE,YAAA,MAAM,QAAQ,GAAG,CAAA,EAAG,YAAY,CAAI,CAAA,EAAA,SAAS,EAAE;AAE/C,YAAA,OAAO,QAAQ;AACjB,SAAC;AAEO,QAAA,IAAA,CAAA,WAAW,GAAG,CAAC,EAAS,KAAI;YAClC,IAAI,CAAC,UAAU,GAAG,CAAE,EAAE,CAAC,MAA2B,CAAC,OAAO;AAC1D,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC;AACpC,SAAC;AAEO,QAAA,IAAA,CAAA,YAAY,GAAG,CAAC,UAAmB,KAAI;AAC7C,YAAA,IAAI,CAAC,aAAa,GAAG,KAAK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I,CAAC,UAAU,EACxB,IAAI,EAAC,qBAAqB,EAAA,CAC1B,CACkB,CACvB,EACD,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["PdsTableHead","__stencil_proxyCustomElement"],"sources":["src/components/pds-table/pds-table-head/pds-table-head.scss?tag=pds-table-head&encapsulation=shadow","src/components/pds-table/pds-table-head/pds-table-head.tsx"],"sourcesContent":[":host {\n --border-head-default: var(--pine-border-width-thin) solid var(--pine-color-background-subtle);\n\n border-color: inherit;\n box-sizing: border-box;\n display: table-header-group;\n vertical-align: middle;\n\n // used for pds-checkbox-cell\n // because it is in the ShadowDom\n &::part(checkbox-cell) {\n background-color: var(--pine-color-background-container);\n inset-inline-start: var(--pine-dimension-none);\n position: sticky;\n z-index: var(--pine-z-index-raised);\n }\n}\n\n:host pds-table-checkbox-cell {\n border-block-end: var(--border-head-default);\n}\n\n:host([border]) {\n border-block-end: var(--pine-border-width-thin) solid var(--pine-color-border-subtle);\n border-block-start: var(--pine-border-width-thin) solid var(--pine-color-border-subtle);\n}\n\n:host([border]) pds-table-head-cell {\n border-block-end: var(--pine-border-width-thin) solid var(--pine-color-border-subtle);\n border-block-start: var(--pine-border-width-thin) solid var(--pine-color-border-subtle);\n}\n\n:host([background]) {\n background-color: var(--pine-color-background-subtle);\n}\n\n:host([background]) pds-table-head-cell {\n background-color: var(--pine-color-background-subtle);\n}\n","import { Component, Element, Event, EventEmitter, Host, h, Prop } from '@stencil/core';\nimport { closest } from '@utils/closest';\n\n@Component({\n tag: 'pds-table-head',\n styleUrls: ['pds-table-head.scss'],\n shadow: true,\n})\nexport class PdsTableHead {\n @Element() hostElement: HTMLPdsTableHeadElement;\n private tableRef: HTMLPdsTableElement\n\n /**\n * Determines if the select all checkbox is in an indeterminate state.\n */\n @Prop({ mutable: true }) indeterminate?: boolean;\n\n /**\n * Determines if the table row is currently selected.\n * @defaultValue false\n */\n @Prop({mutable: true}) isSelected: boolean;\n\n /**\n * Adds top and bottom borders to the table head.\n * @defaultValue false\n */\n @Prop({ reflect: true }) border = false;\n\n /**\n * Adds a subtle background color to the table head.\n * @defaultValue false\n */\n @Prop({ reflect: true }) background = false;\n\n /**\n * Event that is emitted when the select all checkbox is clicked, carrying the selected value.\n */\n @Event() pdsTableSelectAll: EventEmitter<{ isSelected: boolean }>;\n\n private generateUniqueId = () => {\n const randomString = Math.random().toString(36).substring(2, 8);\n const timestamp = new Date().toISOString().replace(/[:.]/g, '-');\n const uniqueId = `${randomString}-${timestamp}`;\n\n return uniqueId;\n }\n\n private handleInput = (ev: Event) => {\n this.isSelected = !(ev.target as HTMLInputElement).checked\n this.handleSelect(this.isSelected)\n };\n\n private handleSelect = (isSelected: boolean) => {\n this.indeterminate = false\n\n if ( closest('pds-table-head', this.hostElement) ) {\n this.pdsTableSelectAll.emit({ isSelected });\n }\n }\n\n componentWillLoad() {\n if (this.isSelected) {\n this.handleSelect(this.isSelected)\n }\n }\n\n componentWillRender() {\n this.tableRef = this.hostElement.closest('pds-table') as HTMLPdsTableElement;\n\n if (this.tableRef && this.tableRef.fixedColumn) {\n const tableCell = this.hostElement.querySelector('pds-table-head-cell:first-child');\n tableCell?.classList.add(\"is-fixed\");\n }\n }\n\n render() {\n return (\n <Host role=\"row\" part=\"head\">\n {this.tableRef && this.tableRef.selectable && (\n <pds-table-head-cell part={this.tableRef.selectable ? 'checkbox-cell' : ''}>\n <pds-checkbox\n componentId={this.generateUniqueId()}\n indeterminate={this.indeterminate}\n onInput={this.handleInput}\n label={\"Select All Rows\"}\n hideLabel={true}\n checked={this.isSelected}\n part=\"select-all-checkbox\"\n />\n </pds-table-head-cell>\n )}\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -4,7 +4,7 @@ import { d as defineCustomElement$4 } from './pds-checkbox2.js';
|
|
|
4
4
|
import { d as defineCustomElement$3 } from './pds-icon2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './pds-table-cell2.js';
|
|
6
6
|
|
|
7
|
-
const pdsTableRowCss = ":host{--color-background-interactive:var(--pine-color-border-disabled);border-color:inherit;display:table-row;vertical-align:inherit}:host::part(checkbox-cell){background-color: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(:hover),:host(:hover)::part(checkbox-cell),:host(:hover) ::slotted(pds-table-cell),:host(.is-selected),:host(.is-selected)::part(checkbox-cell),:host(.is-selected) ::slotted(pds-table-cell){background:var(--color-background-interactive)}";
|
|
7
|
+
const pdsTableRowCss = ":host{--color-background-interactive:var(--pine-color-border-disabled);border-color:inherit;display:table-row;vertical-align:inherit}:host::part(checkbox-cell){background-color: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(:hover),:host(:hover)::part(checkbox-cell),:host(:hover) ::slotted(pds-table-cell),:host(.is-selected),:host(.is-selected)::part(checkbox-cell),:host(.is-selected) ::slotted(pds-table-cell){background:var(--color-background-interactive)}:host(.has-divider) ::slotted(pds-table-cell),:host(.has-divider) pds-table-cell{-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(.has-divider.is-last-row) ::slotted(pds-table-cell),:host(.has-divider.is-last-row) pds-table-cell{-webkit-border-after:0;border-block-end:0}";
|
|
8
8
|
|
|
9
9
|
const PdsTableRow$1 = /*@__PURE__*/ proxyCustomElement(class PdsTableRow extends HTMLElement {
|
|
10
10
|
constructor(registerHost) {
|
|
@@ -14,6 +14,18 @@ const PdsTableRow$1 = /*@__PURE__*/ proxyCustomElement(class PdsTableRow extends
|
|
|
14
14
|
}
|
|
15
15
|
this.__attachShadow();
|
|
16
16
|
this.pdsTableRowSelected = createEvent(this, "pdsTableRowSelected", 7);
|
|
17
|
+
this.observer = null;
|
|
18
|
+
this.bodyObserver = null;
|
|
19
|
+
/**
|
|
20
|
+
* Determines if the row should have a divider border.
|
|
21
|
+
* @defaultValue false
|
|
22
|
+
*/
|
|
23
|
+
this.hasDivider = false;
|
|
24
|
+
/**
|
|
25
|
+
* Determines if this is the last row in the table body.
|
|
26
|
+
* @defaultValue false
|
|
27
|
+
*/
|
|
28
|
+
this.isLastRow = false;
|
|
17
29
|
this.handleClick = () => {
|
|
18
30
|
this.isSelected = !this.isSelected; // Toggle the selected state
|
|
19
31
|
this.handleSelect(this.isSelected);
|
|
@@ -40,9 +52,17 @@ const PdsTableRow$1 = /*@__PURE__*/ proxyCustomElement(class PdsTableRow extends
|
|
|
40
52
|
if (this.isSelected) {
|
|
41
53
|
classNames.push("is-selected");
|
|
42
54
|
}
|
|
43
|
-
|
|
55
|
+
if (this.hasDivider) {
|
|
56
|
+
classNames.push("has-divider");
|
|
57
|
+
}
|
|
58
|
+
if (this.isLastRow) {
|
|
59
|
+
classNames.push("is-last-row");
|
|
60
|
+
}
|
|
61
|
+
return classNames.join(' ');
|
|
44
62
|
}
|
|
45
63
|
componentWillRender() {
|
|
64
|
+
// Always refresh tableRef to get latest prop values
|
|
65
|
+
// This ensures we pick up changes to parent table props
|
|
46
66
|
this.tableRef = this.hostElement.closest('pds-table');
|
|
47
67
|
if (this.tableRef && this.tableRef.fixedColumn) {
|
|
48
68
|
const tableCell = this.hostElement.querySelector('pds-table-cell');
|
|
@@ -50,18 +70,94 @@ const PdsTableRow$1 = /*@__PURE__*/ proxyCustomElement(class PdsTableRow extends
|
|
|
50
70
|
}
|
|
51
71
|
}
|
|
52
72
|
componentWillLoad() {
|
|
73
|
+
// Handle initial selection state
|
|
53
74
|
if (this.isSelected) {
|
|
54
75
|
this.handleSelect(this.isSelected);
|
|
55
76
|
}
|
|
77
|
+
// Note: tableRef, observers, and divider state are set up in connectedCallback
|
|
78
|
+
// which runs before componentWillLoad and also handles row re-attachment after sorting
|
|
79
|
+
}
|
|
80
|
+
connectedCallback() {
|
|
81
|
+
// When a row is re-attached to the DOM (e.g., after sorting),
|
|
82
|
+
// we need to re-setup the observers since disconnectedCallback cleared them
|
|
83
|
+
// Note: componentDidLoad only fires once, but connectedCallback fires every time
|
|
84
|
+
// the element is attached to the DOM (including after being moved)
|
|
85
|
+
this.tableRef = this.hostElement.closest('pds-table');
|
|
86
|
+
this.setupObservers();
|
|
87
|
+
this.updateDividerState();
|
|
88
|
+
}
|
|
89
|
+
disconnectedCallback() {
|
|
90
|
+
this.cleanupObservers();
|
|
91
|
+
}
|
|
92
|
+
cleanupObservers() {
|
|
93
|
+
if (this.observer) {
|
|
94
|
+
this.observer.disconnect();
|
|
95
|
+
this.observer = null;
|
|
96
|
+
}
|
|
97
|
+
if (this.bodyObserver) {
|
|
98
|
+
this.bodyObserver.disconnect();
|
|
99
|
+
this.bodyObserver = null;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
setupObservers() {
|
|
103
|
+
// Clean up any existing observers first
|
|
104
|
+
this.cleanupObservers();
|
|
105
|
+
// Watch for changes to the parent table's row-dividers attribute
|
|
106
|
+
if (this.tableRef && typeof MutationObserver !== 'undefined') {
|
|
107
|
+
this.observer = new MutationObserver(() => {
|
|
108
|
+
this.updateDividerState();
|
|
109
|
+
});
|
|
110
|
+
this.observer.observe(this.tableRef, {
|
|
111
|
+
attributes: true,
|
|
112
|
+
attributeFilter: ['row-dividers']
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
// Watch for child list changes in table body (e.g., when rows are reordered during sorting)
|
|
116
|
+
const tableBody = this.hostElement.closest('pds-table-body');
|
|
117
|
+
if (tableBody && typeof MutationObserver !== 'undefined') {
|
|
118
|
+
this.bodyObserver = new MutationObserver(() => {
|
|
119
|
+
this.updateLastRowState();
|
|
120
|
+
});
|
|
121
|
+
this.bodyObserver.observe(tableBody, {
|
|
122
|
+
childList: true
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
shouldHaveDivider() {
|
|
127
|
+
if (!this.tableRef) {
|
|
128
|
+
this.tableRef = this.hostElement.closest('pds-table');
|
|
129
|
+
}
|
|
130
|
+
// Reads the parent pds-table component's rowDividers property value directly
|
|
131
|
+
return !!(this.tableRef && this.tableRef.rowDividers);
|
|
132
|
+
}
|
|
133
|
+
updateDividerState() {
|
|
134
|
+
this.hasDivider = this.shouldHaveDivider();
|
|
135
|
+
this.updateLastRowState();
|
|
136
|
+
}
|
|
137
|
+
updateLastRowState() {
|
|
138
|
+
if (!this.hasDivider) {
|
|
139
|
+
this.isLastRow = false;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
const tableBody = this.hostElement.closest('pds-table-body');
|
|
143
|
+
if (tableBody) {
|
|
144
|
+
const rows = Array.from(tableBody.querySelectorAll('pds-table-row'));
|
|
145
|
+
this.isLastRow = rows[rows.length - 1] === this.hostElement;
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
this.isLastRow = false;
|
|
149
|
+
}
|
|
56
150
|
}
|
|
57
151
|
render() {
|
|
58
|
-
return (h(Host, { key: '
|
|
152
|
+
return (h(Host, { key: 'dedf37f2841e51a325b6c414d3e7ec0072bdf78f', class: this.classNames(), role: "row", part: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-cell", { key: '3e9295398c8f48cb7aa78d10daf5201ae8f86e9f', part: this.tableRef.fixedColumn ? 'checkbox-cell' : 'checkbox-cell', class: this.tableRef.selectable ? 'has-checkbox' : '' }, h("pds-checkbox", { key: 'b786f181988110d3e3d47928da9290dfd79f5fbd', componentId: this.generateUniqueId(), onClick: this.handleClick, indeterminate: this.indeterminate, label: "Select Row", hideLabel: true, checked: this.isSelected, part: "row-checkbox" }))), h("slot", { key: 'd37e3d44d34f81553060185d96fb44a55a40edc8' })));
|
|
59
153
|
}
|
|
60
154
|
get hostElement() { return this; }
|
|
61
155
|
static get style() { return pdsTableRowCss; }
|
|
62
156
|
}, [257, "pds-table-row", {
|
|
63
157
|
"indeterminate": [1028],
|
|
64
|
-
"isSelected": [1028, "is-selected"]
|
|
158
|
+
"isSelected": [1028, "is-selected"],
|
|
159
|
+
"hasDivider": [32],
|
|
160
|
+
"isLastRow": [32]
|
|
65
161
|
}]);
|
|
66
162
|
function defineCustomElement$1() {
|
|
67
163
|
if (typeof customElements === "undefined") {
|