@pine-ds/core 2.1.1 → 2.1.3
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/index.d.ts +6 -0
- package/components/index.js +3 -0
- package/components/index.js.map +1 -1
- package/components/index2.js +3 -2
- package/components/index2.js.map +1 -1
- package/components/pds-button2.js +5 -3
- package/components/pds-button2.js.map +1 -1
- package/components/pds-checkbox2.js +12 -5
- package/components/pds-checkbox2.js.map +1 -1
- package/components/pds-chip.js +4 -4
- package/components/pds-chip.js.map +1 -1
- package/components/pds-copytext.js +1 -1
- package/components/pds-copytext.js.map +1 -1
- package/components/pds-divider.js +1 -1
- package/components/pds-divider.js.map +1 -1
- package/components/pds-image.js +2 -2
- package/components/pds-image.js.map +1 -1
- package/components/pds-input.js +12 -5
- package/components/pds-input.js.map +1 -1
- package/components/pds-link.js +2 -2
- package/components/pds-link.js.map +1 -1
- package/components/pds-loader.js +1 -1
- package/components/pds-popover.d.ts +11 -0
- package/components/pds-popover.js +94 -0
- package/components/pds-popover.js.map +1 -0
- package/components/pds-progress.js +1 -1
- package/components/pds-radio.js +16 -9
- package/components/pds-radio.js.map +1 -1
- package/components/pds-row.js +2 -2
- package/components/pds-row.js.map +1 -1
- package/components/pds-select.d.ts +11 -0
- package/components/pds-select.js +165 -0
- package/components/pds-select.js.map +1 -0
- package/components/pds-sortable-item.js +1 -1
- package/components/pds-sortable.js +1 -1
- package/components/pds-switch.js +12 -8
- package/components/pds-switch.js.map +1 -1
- package/components/pds-tab.js +3 -3
- package/components/pds-table-body.js +1 -1
- package/components/pds-table-cell2.js +2 -2
- package/components/pds-table-cell2.js.map +1 -1
- package/components/pds-table-head-cell2.js +3 -3
- package/components/pds-table-head-cell2.js.map +1 -1
- package/components/pds-table-head.js +1 -1
- package/components/pds-table-head.js.map +1 -1
- package/components/pds-table-row.js +9 -3
- package/components/pds-table-row.js.map +1 -1
- package/components/pds-table.js +1 -1
- package/components/pds-table.js.map +1 -1
- package/components/pds-tabpanel.js +1 -1
- package/components/pds-tabs.js +1 -1
- package/components/pds-text.d.ts +11 -0
- package/components/pds-text.js +58 -0
- package/components/pds-text.js.map +1 -0
- package/components/pds-textarea.js +13 -6
- package/components/pds-textarea.js.map +1 -1
- package/components/pds-tooltip.js +2 -2
- package/dist/cjs/{index-8f7870bb.js → index-3ad62856.js} +4 -2
- package/dist/cjs/index-3ad62856.js.map +1 -0
- package/dist/cjs/{index-8ad0cd9d.js → index-b7d9268e.js} +3 -2
- package/dist/cjs/index-b7d9268e.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pds-accordion.cjs.entry.js +2 -2
- package/dist/cjs/pds-avatar.cjs.entry.js +2 -2
- package/dist/cjs/pds-box.cjs.entry.js +1 -1
- package/dist/cjs/pds-button.cjs.entry.js +5 -3
- package/dist/cjs/pds-button.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-checkbox.cjs.entry.js +7 -6
- package/dist/cjs/pds-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-chip.cjs.entry.js +5 -5
- package/dist/cjs/pds-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-copytext.cjs.entry.js +3 -3
- package/dist/cjs/pds-copytext.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-divider.cjs.entry.js +2 -2
- package/dist/cjs/pds-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-icon.cjs.entry.js +1 -1
- package/dist/cjs/pds-image.cjs.entry.js +3 -3
- package/dist/cjs/pds-image.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-input.cjs.entry.js +7 -6
- package/dist/cjs/pds-input.cjs.entry.js.map +1 -1
- package/dist/cjs/{pds-label-35369959.js → pds-label-05f073ea.js} +2 -2
- package/dist/cjs/{pds-label-35369959.js.map → pds-label-05f073ea.js.map} +1 -1
- package/dist/cjs/pds-link.cjs.entry.js +4 -4
- package/dist/cjs/pds-link.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-loader.cjs.entry.js +2 -2
- package/dist/cjs/pds-popover.cjs.entry.js +72 -0
- package/dist/cjs/pds-popover.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-progress.cjs.entry.js +2 -2
- package/dist/cjs/pds-radio.cjs.entry.js +9 -8
- package/dist/cjs/pds-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-row.cjs.entry.js +3 -3
- package/dist/cjs/pds-row.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-select.cjs.entry.js +131 -0
- package/dist/cjs/pds-select.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-sortable-item.cjs.entry.js +3 -3
- package/dist/cjs/pds-sortable.cjs.entry.js +2 -2
- package/dist/cjs/pds-switch.cjs.entry.js +7 -9
- package/dist/cjs/pds-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-tab.cjs.entry.js +4 -4
- package/dist/cjs/pds-table-body.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-cell.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +4 -4
- package/dist/cjs/pds-table-head-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-table-head.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-head.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-table-row.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-row.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-table.cjs.entry.js +2 -2
- package/dist/cjs/pds-table.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-tabpanel.cjs.entry.js +2 -2
- package/dist/cjs/pds-tabs.cjs.entry.js +2 -2
- package/dist/cjs/pds-text.cjs.entry.js +37 -0
- package/dist/cjs/pds-text.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-textarea.cjs.entry.js +8 -7
- package/dist/cjs/pds-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/pine-core.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/pds-button/pds-button.js +36 -11
- package/dist/collection/components/pds-button/pds-button.js.map +1 -1
- package/dist/collection/components/pds-button/stories/pds-button.stories.js +8 -1
- package/dist/collection/components/pds-checkbox/pds-checkbox.css +9 -1
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +4 -3
- package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +1 -1
- package/dist/collection/components/pds-chip/pds-chip.js +26 -26
- package/dist/collection/components/pds-chip/pds-chip.js.map +1 -1
- package/dist/collection/components/pds-copytext/pds-copytext.js +4 -4
- package/dist/collection/components/pds-copytext/pds-copytext.js.map +1 -1
- package/dist/collection/components/pds-divider/pds-divider.js +2 -2
- package/dist/collection/components/pds-divider/pds-divider.js.map +1 -1
- package/dist/collection/components/pds-image/pds-image.js +13 -7
- package/dist/collection/components/pds-image/pds-image.js.map +1 -1
- package/dist/collection/components/pds-input/pds-input.css +6 -1
- package/dist/collection/components/pds-input/pds-input.js +9 -8
- package/dist/collection/components/pds-input/pds-input.js.map +1 -1
- package/dist/collection/components/pds-link/pds-link.js +12 -9
- package/dist/collection/components/pds-link/pds-link.js.map +1 -1
- package/dist/collection/components/pds-loader/pds-loader.js +1 -1
- package/dist/collection/components/pds-popover/pds-popover.css +51 -0
- package/dist/collection/components/pds-popover/pds-popover.js +216 -0
- package/dist/collection/components/pds-popover/pds-popover.js.map +1 -0
- package/dist/collection/components/pds-popover/stories/pds-popover.stories.js +45 -0
- package/dist/collection/components/pds-progress/pds-progress.js +1 -1
- package/dist/collection/components/pds-radio/pds-radio.css +9 -1
- package/dist/collection/components/pds-radio/pds-radio.js +41 -40
- package/dist/collection/components/pds-radio/pds-radio.js.map +1 -1
- package/dist/collection/components/pds-row/pds-row.css +7 -5
- package/dist/collection/components/pds-row/pds-row.js +1 -1
- package/dist/collection/components/pds-select/pds-select.css +126 -0
- package/dist/collection/components/pds-select/pds-select.js +360 -0
- package/dist/collection/components/pds-select/pds-select.js.map +1 -0
- package/dist/collection/components/pds-select/stories/pds-select.stories.js +153 -0
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
- package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
- package/dist/collection/components/pds-switch/pds-switch.css +10 -6
- package/dist/collection/components/pds-switch/pds-switch.js +14 -16
- package/dist/collection/components/pds-switch/pds-switch.js.map +1 -1
- package/dist/collection/components/pds-switch/stories/pds-switch.stories.js +2 -2
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js.map +1 -1
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +7 -4
- 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.js +2 -2
- 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.js +3 -3
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js.map +1 -1
- package/dist/collection/components/pds-table/pds-table.js +4 -4
- package/dist/collection/components/pds-table/pds-table.js.map +1 -1
- package/dist/collection/components/pds-table/stories/pds-table.stories.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +3 -3
- package/dist/collection/components/pds-tabs/pds-tab/stories/pds-tab.stories.js +19 -0
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tabpanel/stories/pds-tabpanel.stories.js +19 -0
- package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
- package/dist/collection/components/pds-tabs/stories/pds-tabs.stories.js +18 -18
- package/dist/collection/components/pds-text/pds-text.css +218 -0
- package/dist/collection/components/pds-text/pds-text.js +143 -0
- package/dist/collection/components/pds-text/pds-text.js.map +1 -0
- package/dist/collection/components/pds-text/stories/pds-text.stories.js +111 -0
- package/dist/collection/components/pds-textarea/pds-textarea.css +4 -0
- package/dist/collection/components/pds-textarea/pds-textarea.js +17 -16
- package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -1
- package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +2 -2
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/docs.json +1091 -165
- package/dist/esm/{index-5e7a8a36.js → index-56752d25.js} +4 -3
- package/dist/esm/index-56752d25.js.map +1 -0
- package/dist/esm/{index-8b335bbb.js → index-b1696fed.js} +3 -2
- package/dist/esm/index-b1696fed.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pds-accordion.entry.js +2 -2
- package/dist/esm/pds-avatar.entry.js +2 -2
- package/dist/esm/pds-box.entry.js +1 -1
- package/dist/esm/pds-button.entry.js +5 -3
- package/dist/esm/pds-button.entry.js.map +1 -1
- package/dist/esm/pds-checkbox.entry.js +7 -6
- package/dist/esm/pds-checkbox.entry.js.map +1 -1
- package/dist/esm/pds-chip.entry.js +5 -5
- package/dist/esm/pds-chip.entry.js.map +1 -1
- package/dist/esm/pds-copytext.entry.js +3 -3
- package/dist/esm/pds-copytext.entry.js.map +1 -1
- package/dist/esm/pds-divider.entry.js +2 -2
- package/dist/esm/pds-divider.entry.js.map +1 -1
- package/dist/esm/pds-icon.entry.js +1 -1
- package/dist/esm/pds-image.entry.js +3 -3
- package/dist/esm/pds-image.entry.js.map +1 -1
- package/dist/esm/pds-input.entry.js +7 -6
- package/dist/esm/pds-input.entry.js.map +1 -1
- package/dist/esm/{pds-label-1f80d632.js → pds-label-62469596.js} +2 -2
- package/dist/esm/{pds-label-1f80d632.js.map → pds-label-62469596.js.map} +1 -1
- package/dist/esm/pds-link.entry.js +4 -4
- package/dist/esm/pds-link.entry.js.map +1 -1
- package/dist/esm/pds-loader.entry.js +2 -2
- package/dist/esm/pds-popover.entry.js +68 -0
- package/dist/esm/pds-popover.entry.js.map +1 -0
- package/dist/esm/pds-progress.entry.js +2 -2
- package/dist/esm/pds-radio.entry.js +9 -8
- package/dist/esm/pds-radio.entry.js.map +1 -1
- package/dist/esm/pds-row.entry.js +3 -3
- package/dist/esm/pds-row.entry.js.map +1 -1
- package/dist/esm/pds-select.entry.js +127 -0
- package/dist/esm/pds-select.entry.js.map +1 -0
- package/dist/esm/pds-sortable-item.entry.js +3 -3
- package/dist/esm/pds-sortable.entry.js +2 -2
- package/dist/esm/pds-switch.entry.js +7 -9
- package/dist/esm/pds-switch.entry.js.map +1 -1
- package/dist/esm/pds-tab.entry.js +4 -4
- package/dist/esm/pds-table-body.entry.js +2 -2
- package/dist/esm/pds-table-cell.entry.js +3 -3
- package/dist/esm/pds-table-cell.entry.js.map +1 -1
- package/dist/esm/pds-table-head-cell.entry.js +4 -4
- package/dist/esm/pds-table-head-cell.entry.js.map +1 -1
- package/dist/esm/pds-table-head.entry.js +2 -2
- package/dist/esm/pds-table-head.entry.js.map +1 -1
- package/dist/esm/pds-table-row.entry.js +2 -2
- package/dist/esm/pds-table-row.entry.js.map +1 -1
- package/dist/esm/pds-table.entry.js +2 -2
- package/dist/esm/pds-table.entry.js.map +1 -1
- package/dist/esm/pds-tabpanel.entry.js +2 -2
- package/dist/esm/pds-tabs.entry.js +2 -2
- package/dist/esm/pds-text.entry.js +33 -0
- package/dist/esm/pds-text.entry.js.map +1 -0
- package/dist/esm/pds-textarea.entry.js +8 -7
- package/dist/esm/pds-textarea.entry.js.map +1 -1
- package/dist/esm/pds-tooltip.entry.js +3 -3
- package/dist/esm/pine-core.js +3 -3
- package/dist/esm-es5/index-56752d25.js +2 -0
- package/dist/esm-es5/index-56752d25.js.map +1 -0
- package/dist/esm-es5/{index-8b335bbb.js → index-b1696fed.js} +3 -3
- package/dist/esm-es5/index-b1696fed.js.map +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/pds-accordion.entry.js +1 -1
- package/dist/esm-es5/pds-avatar.entry.js +1 -1
- package/dist/esm-es5/pds-box.entry.js +1 -1
- package/dist/esm-es5/pds-button.entry.js +1 -1
- package/dist/esm-es5/pds-button.entry.js.map +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js.map +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-chip.entry.js.map +1 -1
- package/dist/esm-es5/pds-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.entry.js.map +1 -1
- package/dist/esm-es5/pds-divider.entry.js +1 -1
- package/dist/esm-es5/pds-divider.entry.js.map +1 -1
- package/dist/esm-es5/pds-icon.entry.js +1 -1
- package/dist/esm-es5/pds-image.entry.js +1 -1
- package/dist/esm-es5/pds-image.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-label-1f80d632.js → pds-label-62469596.js} +2 -2
- 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-loader.entry.js +1 -1
- package/dist/esm-es5/pds-popover.entry.js +2 -0
- package/dist/esm-es5/pds-popover.entry.js.map +1 -0
- package/dist/esm-es5/pds-progress.entry.js +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-row.entry.js +1 -1
- package/dist/esm-es5/pds-row.entry.js.map +1 -1
- package/dist/esm-es5/pds-select.entry.js +2 -0
- package/dist/esm-es5/pds-select.entry.js.map +1 -0
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
- package/dist/esm-es5/pds-sortable.entry.js +2 -2
- package/dist/esm-es5/pds-switch.entry.js +1 -1
- package/dist/esm-es5/pds-switch.entry.js.map +1 -1
- package/dist/esm-es5/pds-tab.entry.js +1 -1
- package/dist/esm-es5/pds-table-body.entry.js +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-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-tabpanel.entry.js +1 -1
- package/dist/esm-es5/pds-tabs.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js +2 -0
- package/dist/esm-es5/pds-text.entry.js.map +1 -0
- 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/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/pine-core.js.map +1 -1
- package/dist/pine-core/index.esm.js +1 -1
- package/dist/pine-core/p-00c8d6d8.entry.js +2 -0
- package/dist/pine-core/p-00c8d6d8.entry.js.map +1 -0
- package/dist/pine-core/{p-6deaad03.entry.js → p-031ac651.entry.js} +2 -2
- package/dist/pine-core/{p-6deaad03.entry.js.map → p-031ac651.entry.js.map} +1 -1
- package/dist/pine-core/{p-de0beb45.system.entry.js → p-09d83447.system.entry.js} +2 -2
- package/dist/pine-core/{p-de0beb45.system.entry.js.map → p-09d83447.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-d464f04f.entry.js → p-0ac04129.entry.js} +2 -2
- package/dist/pine-core/{p-d464f04f.entry.js.map → p-0ac04129.entry.js.map} +1 -1
- package/dist/pine-core/p-0ad64b9d.system.entry.js +2 -0
- package/dist/pine-core/p-0ad64b9d.system.entry.js.map +1 -0
- package/dist/pine-core/p-110b2e03.entry.js +2 -0
- package/dist/pine-core/p-110b2e03.entry.js.map +1 -0
- package/dist/pine-core/p-1164c32c.system.entry.js +2 -0
- package/dist/pine-core/p-1164c32c.system.entry.js.map +1 -0
- package/dist/pine-core/{p-e9ca5a4e.entry.js → p-1351489d.entry.js} +2 -2
- package/dist/pine-core/{p-e9ca5a4e.entry.js.map → p-1351489d.entry.js.map} +1 -1
- package/dist/pine-core/{p-3b780711.entry.js → p-1712d594.entry.js} +2 -2
- package/dist/pine-core/{p-d618d51b.entry.js → p-196f615c.entry.js} +2 -2
- package/dist/pine-core/{p-d618d51b.entry.js.map → p-196f615c.entry.js.map} +1 -1
- package/dist/pine-core/{p-4e39bbd7.system.entry.js → p-1a1a76ea.system.entry.js} +2 -2
- package/dist/pine-core/{p-e4a1b3f5.system.entry.js → p-1a548198.system.entry.js} +2 -2
- package/dist/pine-core/p-1a78ee21.entry.js +2 -0
- package/dist/pine-core/p-1a78ee21.entry.js.map +1 -0
- package/dist/pine-core/{p-89101362.system.entry.js → p-1df1990d.system.entry.js} +2 -2
- package/dist/pine-core/{p-1ca76e21.entry.js → p-1e80f274.entry.js} +2 -2
- package/dist/pine-core/{p-143bbe94.system.entry.js → p-2e1dc5e5.system.entry.js} +2 -2
- package/dist/pine-core/{p-143bbe94.system.entry.js.map → p-2e1dc5e5.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-5f13c97b.entry.js → p-34cda8d5.system.entry.js} +2 -2
- package/dist/pine-core/p-34cda8d5.system.entry.js.map +1 -0
- package/dist/pine-core/{p-05d140a3.system.entry.js → p-364a7555.system.entry.js} +2 -2
- package/dist/pine-core/{p-5f23f121.entry.js → p-37a3c235.entry.js} +2 -2
- package/dist/pine-core/p-37a3c235.entry.js.map +1 -0
- package/dist/pine-core/{p-a18ff34f.entry.js → p-396014d3.entry.js} +2 -2
- package/dist/pine-core/{p-5fb6ab2f.entry.js → p-3acb18ad.entry.js} +2 -2
- package/dist/pine-core/p-3ae15266.entry.js +2 -0
- package/dist/pine-core/p-3ae15266.entry.js.map +1 -0
- package/dist/pine-core/{p-4c0c0b2d.system.js → p-45cf2585.system.js} +3 -3
- package/dist/pine-core/p-45cf2585.system.js.map +1 -0
- package/dist/pine-core/p-4a10164f.entry.js +2 -0
- package/dist/pine-core/p-4a10164f.entry.js.map +1 -0
- package/dist/pine-core/{p-136ea1e9.entry.js → p-4d22b02c.entry.js} +2 -2
- package/dist/pine-core/p-4f9b1945.entry.js +2 -0
- package/dist/pine-core/p-4f9b1945.entry.js.map +1 -0
- package/dist/pine-core/{p-70e5e466.system.entry.js → p-50918693.system.entry.js} +2 -2
- package/dist/pine-core/{p-188be548.entry.js → p-5380ad4f.entry.js} +2 -2
- package/dist/pine-core/{p-188be548.entry.js.map → p-5380ad4f.entry.js.map} +1 -1
- package/dist/pine-core/{p-e7648adc.system.entry.js → p-539fe011.system.entry.js} +2 -2
- package/dist/pine-core/{p-e7648adc.system.entry.js.map → p-539fe011.system.entry.js.map} +1 -1
- package/dist/pine-core/p-59a43f75.system.entry.js +2 -0
- package/dist/pine-core/p-59a43f75.system.entry.js.map +1 -0
- package/dist/pine-core/{p-0200fce9.entry.js → p-59fcea0f.entry.js} +2 -2
- package/dist/pine-core/p-5b9d6ad1.entry.js +2 -0
- package/dist/pine-core/p-5b9d6ad1.entry.js.map +1 -0
- package/dist/pine-core/p-5c04aee0.system.js +2 -0
- package/dist/pine-core/p-5c04aee0.system.js.map +1 -0
- package/dist/pine-core/{p-c18464e8.system.entry.js → p-5cb59e3f.system.entry.js} +2 -2
- package/dist/pine-core/{p-c18464e8.system.entry.js.map → p-5cb59e3f.system.entry.js.map} +1 -1
- package/dist/pine-core/p-605dc33a.system.entry.js +2 -0
- package/dist/pine-core/p-605dc33a.system.entry.js.map +1 -0
- package/dist/pine-core/p-630b1802.entry.js +2 -0
- package/dist/pine-core/p-630b1802.entry.js.map +1 -0
- package/dist/pine-core/{p-e2d793eb.entry.js → p-65229490.entry.js} +2 -2
- package/dist/pine-core/{p-f6e72c06.system.entry.js → p-6d447614.system.entry.js} +2 -2
- package/dist/pine-core/{p-f6e72c06.system.entry.js.map → p-6d447614.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-62ebfe42.entry.js → p-760e1c32.entry.js} +2 -2
- package/dist/pine-core/{p-62ebfe42.entry.js.map → p-760e1c32.entry.js.map} +1 -1
- package/dist/pine-core/{p-33a94e8c.system.entry.js → p-84d36583.system.entry.js} +2 -2
- package/dist/pine-core/{p-4e6e2052.js → p-87fe352f.js} +3 -3
- package/dist/pine-core/p-87fe352f.js.map +1 -0
- package/dist/pine-core/p-88702fa2.entry.js +2 -0
- package/dist/pine-core/p-88702fa2.entry.js.map +1 -0
- package/dist/pine-core/{p-82a001ac.system.entry.js → p-88edcb41.system.entry.js} +2 -2
- package/dist/pine-core/{p-330eda0c.entry.js → p-892b4a4c.entry.js} +2 -2
- package/dist/pine-core/{p-c5991956.system.entry.js → p-8ae84655.system.entry.js} +2 -2
- package/dist/pine-core/{p-c5991956.system.entry.js.map → p-8ae84655.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-7d6d3e2b.entry.js → p-9487df53.entry.js} +2 -2
- package/dist/pine-core/p-9db668f2.system.entry.js +2 -0
- package/dist/pine-core/p-9db668f2.system.entry.js.map +1 -0
- package/dist/pine-core/p-a24fa762.system.entry.js +2 -0
- package/dist/pine-core/p-a24fa762.system.entry.js.map +1 -0
- package/dist/pine-core/{p-3fc1efe7.system.entry.js → p-a2726d3b.system.entry.js} +2 -2
- package/dist/pine-core/{p-48f0a5a4.entry.js → p-a6713696.entry.js} +2 -2
- package/dist/pine-core/{p-48f0a5a4.entry.js.map → p-a6713696.entry.js.map} +1 -1
- package/dist/pine-core/{p-3ec7fac1.js → p-a9038f7f.js} +2 -2
- package/dist/pine-core/{p-9dec3592.system.entry.js → p-a9e02a6f.system.entry.js} +2 -2
- package/dist/pine-core/{p-1b611a91.system.entry.js → p-adda8682.system.entry.js} +2 -2
- package/dist/pine-core/{p-1b611a91.system.entry.js.map → p-adda8682.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-1c0993d9.system.entry.js → p-ae19532d.system.entry.js} +2 -2
- package/dist/pine-core/{p-1c0993d9.system.entry.js.map → p-ae19532d.system.entry.js.map} +1 -1
- package/dist/pine-core/p-b3e36d77.system.entry.js +2 -0
- package/dist/pine-core/p-b3e36d77.system.entry.js.map +1 -0
- package/dist/pine-core/{p-0efee237.system.entry.js → p-b7edbe43.system.entry.js} +2 -2
- package/dist/pine-core/{p-0e310504.system.entry.js → p-b95522e6.system.entry.js} +2 -2
- package/dist/pine-core/{p-053ca95a.entry.js → p-b9cebd24.entry.js} +2 -2
- package/dist/pine-core/{p-053ca95a.entry.js.map → p-b9cebd24.entry.js.map} +1 -1
- package/dist/pine-core/{p-94a0fd6e.entry.js → p-bbd19258.entry.js} +2 -2
- package/dist/pine-core/p-cbf2acbd.system.entry.js +2 -0
- package/dist/pine-core/p-cbf2acbd.system.entry.js.map +1 -0
- package/dist/pine-core/{p-c8b0ea02.entry.js → p-ceb66096.entry.js} +3 -3
- package/dist/pine-core/{p-be998f90.system.entry.js → p-d3365f49.system.entry.js} +3 -3
- package/dist/pine-core/p-d83716fb.js +2 -0
- package/dist/pine-core/p-d83716fb.js.map +1 -0
- package/dist/pine-core/{p-02f06002.system.entry.js → p-d95b2469.system.entry.js} +2 -2
- package/dist/pine-core/{p-02f06002.system.entry.js.map → p-d95b2469.system.entry.js.map} +1 -1
- package/dist/pine-core/p-da5a1e2c.system.entry.js +2 -0
- package/dist/pine-core/p-da5a1e2c.system.entry.js.map +1 -0
- package/dist/pine-core/p-db622f8f.system.js +2 -0
- package/dist/pine-core/p-de301890.entry.js +2 -0
- package/dist/pine-core/p-de301890.entry.js.map +1 -0
- package/dist/pine-core/p-dec11fa5.system.js +2 -0
- package/dist/pine-core/p-dec11fa5.system.js.map +1 -0
- package/dist/pine-core/{p-a15c9c4f.entry.js → p-e2a673e8.entry.js} +2 -2
- package/dist/pine-core/{p-b78b3492.entry.js → p-e2badc55.entry.js} +2 -2
- package/dist/pine-core/{p-b78b3492.entry.js.map → p-e2badc55.entry.js.map} +1 -1
- package/dist/pine-core/{p-f408c34a.system.js → p-e3fab4be.system.js} +2 -2
- package/dist/pine-core/{p-5c90a600.entry.js → p-ebdaf3ad.entry.js} +2 -2
- package/dist/pine-core/{p-a4b85fb8.system.entry.js → p-f16ef73c.system.entry.js} +2 -2
- package/dist/pine-core/{p-9c294ea2.system.entry.js → p-faa2bf05.system.entry.js} +2 -2
- package/dist/pine-core/p-faa2bf05.system.entry.js.map +1 -0
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/pine-core/pine-core.esm.js.map +1 -1
- package/dist/pine-core/pine-core.js +1 -1
- package/dist/pine-core/svg/file-add.svg +1 -1
- package/dist/pine-core/svg/file-search.svg +1 -0
- package/dist/pine-core/svg/logo-snapchat.svg +1 -0
- package/dist/types/components/pds-button/pds-button.d.ts +13 -8
- package/dist/types/components/pds-chip/pds-chip.d.ts +8 -8
- package/dist/types/components/pds-copytext/pds-copytext.d.ts +3 -3
- package/dist/types/components/pds-divider/pds-divider.d.ts +1 -1
- package/dist/types/components/pds-image/pds-image.d.ts +7 -3
- package/dist/types/components/pds-input/pds-input.d.ts +5 -5
- package/dist/types/components/pds-link/pds-link.d.ts +7 -11
- package/dist/types/components/pds-popover/pds-popover.d.ts +45 -0
- package/dist/types/components/pds-radio/pds-radio.d.ts +11 -11
- package/dist/types/components/pds-select/pds-select.d.ts +91 -0
- package/dist/types/components/pds-switch/pds-switch.d.ts +10 -13
- package/dist/types/components/pds-table/pds-table-cell/pds-table-cell.d.ts +4 -0
- package/dist/types/components/pds-table/pds-table-head/pds-table-head.d.ts +5 -2
- package/dist/types/components/pds-table/pds-table-head-cell/pds-table-head-cell.d.ts +9 -1
- package/dist/types/components/pds-table/pds-table-row/pds-table-row.d.ts +3 -3
- package/dist/types/components/pds-table/pds-table.d.ts +11 -3
- package/dist/types/components/pds-text/pds-text.d.ts +27 -0
- package/dist/types/components/pds-textarea/pds-textarea.d.ts +12 -12
- package/dist/types/components.d.ts +457 -105
- package/dist/types/utils/types.d.ts +1 -1
- package/hydrate/index.js +334 -67
- package/hydrate/index.mjs +334 -67
- package/package.json +2 -2
- package/dist/cjs/index-8ad0cd9d.js.map +0 -1
- package/dist/cjs/index-8f7870bb.js.map +0 -1
- package/dist/esm/index-5e7a8a36.js.map +0 -1
- package/dist/esm/index-8b335bbb.js.map +0 -1
- package/dist/esm-es5/index-5e7a8a36.js +0 -2
- package/dist/esm-es5/index-5e7a8a36.js.map +0 -1
- package/dist/esm-es5/index-8b335bbb.js.map +0 -1
- package/dist/pine-core/p-0186301f.entry.js +0 -2
- package/dist/pine-core/p-0186301f.entry.js.map +0 -1
- package/dist/pine-core/p-0630403a.entry.js +0 -2
- package/dist/pine-core/p-0630403a.entry.js.map +0 -1
- package/dist/pine-core/p-102222fd.entry.js +0 -2
- package/dist/pine-core/p-102222fd.entry.js.map +0 -1
- package/dist/pine-core/p-242ccc24.system.entry.js +0 -2
- package/dist/pine-core/p-242ccc24.system.entry.js.map +0 -1
- package/dist/pine-core/p-30d979d3.entry.js +0 -2
- package/dist/pine-core/p-30d979d3.entry.js.map +0 -1
- package/dist/pine-core/p-3cad7587.entry.js +0 -2
- package/dist/pine-core/p-3cad7587.entry.js.map +0 -1
- package/dist/pine-core/p-3e0449c5.js +0 -2
- package/dist/pine-core/p-3e0449c5.js.map +0 -1
- package/dist/pine-core/p-4c0c0b2d.system.js.map +0 -1
- package/dist/pine-core/p-4e6e2052.js.map +0 -1
- package/dist/pine-core/p-51e94e03.system.js +0 -2
- package/dist/pine-core/p-51e94e03.system.js.map +0 -1
- package/dist/pine-core/p-55f8a9e4.system.entry.js +0 -2
- package/dist/pine-core/p-55f8a9e4.system.entry.js.map +0 -1
- package/dist/pine-core/p-57dd9a98.system.entry.js +0 -2
- package/dist/pine-core/p-57dd9a98.system.entry.js.map +0 -1
- package/dist/pine-core/p-5b43ff39.system.entry.js +0 -2
- package/dist/pine-core/p-5b43ff39.system.entry.js.map +0 -1
- package/dist/pine-core/p-5f13c97b.entry.js.map +0 -1
- package/dist/pine-core/p-5f23f121.entry.js.map +0 -1
- package/dist/pine-core/p-6bcd89dc.system.js +0 -2
- package/dist/pine-core/p-6bcd89dc.system.js.map +0 -1
- package/dist/pine-core/p-82096fe4.system.entry.js +0 -2
- package/dist/pine-core/p-82096fe4.system.entry.js.map +0 -1
- package/dist/pine-core/p-8d34339d.system.js +0 -2
- package/dist/pine-core/p-9c294ea2.system.entry.js.map +0 -1
- package/dist/pine-core/p-d438c2c8.system.entry.js +0 -2
- package/dist/pine-core/p-d438c2c8.system.entry.js.map +0 -1
- package/dist/pine-core/p-e22b4427.system.entry.js +0 -2
- package/dist/pine-core/p-e22b4427.system.entry.js.map +0 -1
- package/dist/pine-core/p-efca871b.entry.js +0 -2
- package/dist/pine-core/p-efca871b.entry.js.map +0 -1
- /package/dist/esm-es5/{pds-label-1f80d632.js.map → pds-label-62469596.js.map} +0 -0
- /package/dist/pine-core/{p-3b780711.entry.js.map → p-1712d594.entry.js.map} +0 -0
- /package/dist/pine-core/{p-4e39bbd7.system.entry.js.map → p-1a1a76ea.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e4a1b3f5.system.entry.js.map → p-1a548198.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-89101362.system.entry.js.map → p-1df1990d.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1ca76e21.entry.js.map → p-1e80f274.entry.js.map} +0 -0
- /package/dist/pine-core/{p-05d140a3.system.entry.js.map → p-364a7555.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a18ff34f.entry.js.map → p-396014d3.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5fb6ab2f.entry.js.map → p-3acb18ad.entry.js.map} +0 -0
- /package/dist/pine-core/{p-136ea1e9.entry.js.map → p-4d22b02c.entry.js.map} +0 -0
- /package/dist/pine-core/{p-70e5e466.system.entry.js.map → p-50918693.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0200fce9.entry.js.map → p-59fcea0f.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e2d793eb.entry.js.map → p-65229490.entry.js.map} +0 -0
- /package/dist/pine-core/{p-33a94e8c.system.entry.js.map → p-84d36583.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-82a001ac.system.entry.js.map → p-88edcb41.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-330eda0c.entry.js.map → p-892b4a4c.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7d6d3e2b.entry.js.map → p-9487df53.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3fc1efe7.system.entry.js.map → p-a2726d3b.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3ec7fac1.js.map → p-a9038f7f.js.map} +0 -0
- /package/dist/pine-core/{p-9dec3592.system.entry.js.map → p-a9e02a6f.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0efee237.system.entry.js.map → p-b7edbe43.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0e310504.system.entry.js.map → p-b95522e6.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-94a0fd6e.entry.js.map → p-bbd19258.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c8b0ea02.entry.js.map → p-ceb66096.entry.js.map} +0 -0
- /package/dist/pine-core/{p-be998f90.system.entry.js.map → p-d3365f49.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-8d34339d.system.js.map → p-db622f8f.system.js.map} +0 -0
- /package/dist/pine-core/{p-a15c9c4f.entry.js.map → p-e2a673e8.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f408c34a.system.js.map → p-e3fab4be.system.js.map} +0 -0
- /package/dist/pine-core/{p-5c90a600.entry.js.map → p-ebdaf3ad.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a4b85fb8.system.entry.js.map → p-f16ef73c.system.entry.js.map} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { assignDescription, messageId } from "../../utils/form";
|
|
3
3
|
import { PdsLabel } from "../_internal/pds-label/pds-label";
|
|
4
|
+
import { danger } from "@pine-ds/icons/icons";
|
|
4
5
|
export class PdsSwitch {
|
|
5
6
|
constructor() {
|
|
6
7
|
this.onSwitchUpdate = (e) => {
|
|
@@ -10,9 +11,6 @@ export class PdsSwitch {
|
|
|
10
11
|
this.checked = input.checked;
|
|
11
12
|
this.pdsSwitchChange.emit(e);
|
|
12
13
|
};
|
|
13
|
-
/**
|
|
14
|
-
* Generate switch classes
|
|
15
|
-
*/
|
|
16
14
|
this.switchClassNames = () => {
|
|
17
15
|
let switchClasses = `pds-switch`;
|
|
18
16
|
if (this.invalid === true) {
|
|
@@ -35,9 +33,9 @@ export class PdsSwitch {
|
|
|
35
33
|
this.value = undefined;
|
|
36
34
|
}
|
|
37
35
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
39
|
-
h("div", { key: '
|
|
40
|
-
h("div", { key: '
|
|
36
|
+
return (h(Host, { key: '752bc5c5fd8d2cac945d6029656954d3f375ec71', class: this.switchClassNames(), "aria-disabled": this.disabled ? 'true' : null }, h("input", { key: '04472c44cf63aa671326c774c9fbf6890db69ddb', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, checked: this.checked, class: "pds-switch__input", disabled: this.disabled, id: this.componentId, name: this.name ? this.name : this.componentId, onChange: this.onSwitchUpdate, required: this.required, type: "checkbox", value: this.value }), h(PdsLabel, { key: '8895f0bd3a5eb345a91a9379ecb30cf47637ffe4', classNames: "pds-switch__label", htmlFor: this.componentId, text: this.label }), this.helperMessage &&
|
|
37
|
+
h("div", { key: 'bf29e672c126446faeca4bce2946294e816718f4', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
38
|
+
h("div", { key: '7428daf37dd2c60e6c0416a72a4f56cbb956dd9a', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '9efde77b0156883dd9514c9b2fc6f1234d04a645', icon: danger, size: "small" }), this.errorMessage)));
|
|
41
39
|
}
|
|
42
40
|
static get is() { return "pds-switch"; }
|
|
43
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -82,7 +80,7 @@ export class PdsSwitch {
|
|
|
82
80
|
"optional": false,
|
|
83
81
|
"docs": {
|
|
84
82
|
"tags": [],
|
|
85
|
-
"text": "Determines the input 'checked' state"
|
|
83
|
+
"text": "Determines the input 'checked' state."
|
|
86
84
|
},
|
|
87
85
|
"attribute": "checked",
|
|
88
86
|
"reflect": false,
|
|
@@ -100,7 +98,7 @@ export class PdsSwitch {
|
|
|
100
98
|
"optional": true,
|
|
101
99
|
"docs": {
|
|
102
100
|
"tags": [],
|
|
103
|
-
"text": "Determines the input 'disabled' state, preventing user interaction"
|
|
101
|
+
"text": "Determines the input 'disabled' state, preventing user interaction."
|
|
104
102
|
},
|
|
105
103
|
"attribute": "disabled",
|
|
106
104
|
"reflect": false,
|
|
@@ -118,7 +116,7 @@ export class PdsSwitch {
|
|
|
118
116
|
"optional": true,
|
|
119
117
|
"docs": {
|
|
120
118
|
"tags": [],
|
|
121
|
-
"text": "Displays message text describing an invalid state"
|
|
119
|
+
"text": "Displays message text describing an invalid state."
|
|
122
120
|
},
|
|
123
121
|
"attribute": "error-message",
|
|
124
122
|
"reflect": false
|
|
@@ -135,7 +133,7 @@ export class PdsSwitch {
|
|
|
135
133
|
"optional": false,
|
|
136
134
|
"docs": {
|
|
137
135
|
"tags": [],
|
|
138
|
-
"text": "Displays help text for additional description of an input"
|
|
136
|
+
"text": "Displays help text for additional description of an input."
|
|
139
137
|
},
|
|
140
138
|
"attribute": "helper-message",
|
|
141
139
|
"reflect": false
|
|
@@ -152,7 +150,7 @@ export class PdsSwitch {
|
|
|
152
150
|
"optional": true,
|
|
153
151
|
"docs": {
|
|
154
152
|
"tags": [],
|
|
155
|
-
"text": "Determines the input 'invalid' state, signifying an error is present"
|
|
153
|
+
"text": "Determines the input 'invalid' state, signifying an error is present."
|
|
156
154
|
},
|
|
157
155
|
"attribute": "invalid",
|
|
158
156
|
"reflect": false,
|
|
@@ -170,7 +168,7 @@ export class PdsSwitch {
|
|
|
170
168
|
"optional": false,
|
|
171
169
|
"docs": {
|
|
172
170
|
"tags": [],
|
|
173
|
-
"text": "Displays text to describe the input"
|
|
171
|
+
"text": "Displays text to describe the input."
|
|
174
172
|
},
|
|
175
173
|
"attribute": "label",
|
|
176
174
|
"reflect": false
|
|
@@ -187,7 +185,7 @@ export class PdsSwitch {
|
|
|
187
185
|
"optional": false,
|
|
188
186
|
"docs": {
|
|
189
187
|
"tags": [],
|
|
190
|
-
"text": "Identifies form data and unifies a group of radio inputs for toggling a single property/value"
|
|
188
|
+
"text": "Identifies form data and unifies a group of radio inputs for toggling a single property/value."
|
|
191
189
|
},
|
|
192
190
|
"attribute": "name",
|
|
193
191
|
"reflect": false
|
|
@@ -204,7 +202,7 @@ export class PdsSwitch {
|
|
|
204
202
|
"optional": true,
|
|
205
203
|
"docs": {
|
|
206
204
|
"tags": [],
|
|
207
|
-
"text": "Determines the 'required' state of the input"
|
|
205
|
+
"text": "Determines the 'required' state of the input."
|
|
208
206
|
},
|
|
209
207
|
"attribute": "required",
|
|
210
208
|
"reflect": false,
|
|
@@ -222,7 +220,7 @@ export class PdsSwitch {
|
|
|
222
220
|
"optional": false,
|
|
223
221
|
"docs": {
|
|
224
222
|
"tags": [],
|
|
225
|
-
"text": "Provides input with a string submitted in form data
|
|
223
|
+
"text": "Provides input with a string submitted in form data."
|
|
226
224
|
},
|
|
227
225
|
"attribute": "value",
|
|
228
226
|
"reflect": false
|
|
@@ -238,7 +236,7 @@ export class PdsSwitch {
|
|
|
238
236
|
"composed": true,
|
|
239
237
|
"docs": {
|
|
240
238
|
"tags": [],
|
|
241
|
-
"text": "Emits an event on input change"
|
|
239
|
+
"text": "Emits an event on input change."
|
|
242
240
|
},
|
|
243
241
|
"complexType": {
|
|
244
242
|
"original": "InputEvent",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-switch.js","sourceRoot":"","sources":["../../../src/components/pds-switch/pds-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"pds-switch.js","sourceRoot":"","sources":["../../../src/components/pds-switch/pds-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAO9C,MAAM,OAAO,SAAS;;QA0DZ,mBAAc,GAAG,CAAC,CAAQ,EAAE,EAAE;YACpC,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAE1B,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAC;YAC3C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;YAC7B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAe,CAAC,CAAC;QAC7C,CAA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,GAAI;YACvF,IAAI,CAAC,aAAa;gBACjB,4DACE,KAAK,EAAE,qBAAqB,EAC5B,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,IAExC,IAAI,CAAC,aAAa,CACf;YAEP,IAAI,CAAC,YAAY;gBAChB,4DACE,KAAK,EAAE,gDAAgD,EACvD,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,eAC9B,WAAW;oBAErB,iEAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,GAAG;oBACtC,IAAI,CAAC,YAAY,CACd,CAEH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop } from '@stencil/core';\nimport { assignDescription, messageId } from '../../utils/form';\nimport { PdsLabel } from '../_internal/pds-label/pds-label';\nimport { danger } from '@pine-ds/icons/icons';\n\n@Component({\n tag: 'pds-switch',\n styleUrls: ['../../global/styles/base.scss', 'pds-switch.scss'],\n shadow: true,\n})\nexport class PdsSwitch {\n @Element() el: HTMLPdsSwitchElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute and the label `for` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Determines the input 'checked' state.\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * Determines the input 'disabled' state, preventing user interaction.\n */\n @Prop() disabled? = false;\n\n /**\n * Displays message text describing an invalid state.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Displays help text for additional description of an input.\n */\n @Prop() helperMessage: string;\n\n /**\n * Determines the input 'invalid' state, signifying an error is present.\n */\n @Prop() invalid? = false;\n\n /**\n * Displays text to describe the input.\n */\n @Prop() label!: string;\n\n /**\n * Identifies form data and unifies a group of radio inputs for toggling a single property/value.\n */\n @Prop() name: string;\n\n /**\n * Determines the 'required' state of the input.\n */\n @Prop() required? = false;\n\n /**\n * Provides input with a string submitted in form data.\n */\n @Prop() value: string;\n\n /**\n * Emits an event on input change.\n */\n @Event() pdsSwitchChange: EventEmitter<InputEvent>;\n\n private onSwitchUpdate = (e: Event) => {\n if (this.disabled) return;\n\n const input = e.target as HTMLInputElement;\n this.checked = input.checked;\n this.pdsSwitchChange.emit(e as InputEvent);\n };\n\n private switchClassNames = () => {\n let switchClasses = `pds-switch`;\n\n if (this.invalid === true) {\n switchClasses += \" pds-switch--error\";\n }\n if (this.helperMessage !== undefined) {\n switchClasses += \" pds-switch--message\";\n }\n return switchClasses;\n };\n\n render() {\n return (\n <Host class={this.switchClassNames()} aria-disabled={this.disabled ? 'true' : null}>\n <input\n aria-describedby={assignDescription(this.componentId, this.invalid, this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n checked={this.checked}\n class=\"pds-switch__input\"\n disabled={this.disabled}\n id={this.componentId}\n name={this.name ? this.name : this.componentId}\n onChange={this.onSwitchUpdate}\n required={this.required}\n type=\"checkbox\"\n value={this.value}\n />\n <PdsLabel classNames=\"pds-switch__label\" htmlFor={this.componentId} text={this.label} />\n {this.helperMessage &&\n <div\n class={`pds-switch__message`}\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </div>\n }\n {this.errorMessage &&\n <div\n class={`pds-switch__message pds-switch__message--error`}\n id={messageId(this.componentId, 'error')}\n aria-live=\"assertive\"\n >\n <pds-icon icon={danger} size=\"small\" />\n {this.errorMessage}\n </div>\n }\n </Host>\n );\n }\n}\n"]}
|
|
@@ -60,9 +60,9 @@ Disabled.args = {
|
|
|
60
60
|
type: 'checkbox',
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
export const
|
|
63
|
+
export const WithMessage = BaseTemplate.bind({});
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
WithMessage.args = {
|
|
66
66
|
checked: true,
|
|
67
67
|
disabled: false,
|
|
68
68
|
componentId: 'pds-switch-helper-example',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class PdsTableBody {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: '2e51c5074e6dca980f24db2f91c66260da53dc57', role: "rowgroup" }, h("slot", { key: 'cec8f94525798f338ef13d8788c862fb6fd699a6' })));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "pds-table-body"; }
|
|
7
7
|
static get encapsulation() { return "shadow"; }
|
|
@@ -34,11 +34,11 @@ export class PdsTableCell {
|
|
|
34
34
|
return classNames.join(' ');
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return (h(Host, { key: '
|
|
37
|
+
return (h(Host, { key: '03e6833f06a00f24c12f58148d0be1c9d4472ba6', class: this.classNames(), role: "gridcell", style: this.tableRef &&
|
|
38
38
|
this.tableRef.fixedColumn &&
|
|
39
39
|
this.tableRef.selectable
|
|
40
40
|
? { '--fixed-cell-position': '40px' }
|
|
41
|
-
: {} }, h("slot", { key: '
|
|
41
|
+
: {} }, h("slot", { key: '5ac68bc25d266576f836341d71b96eaa229117c7' })));
|
|
42
42
|
}
|
|
43
43
|
static get is() { return "pds-table-cell"; }
|
|
44
44
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-table-cell.js","sourceRoot":"","sources":["../../../../src/components/pds-table/pds-table-cell/pds-table-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzE,MAAM,OAAO,YAAY;;
|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AI,CAAC,cAAc,EAAE,CAAC;YACtE,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAUD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,IAAI,EAAC,UAAU,EACf,KAAK,EACH,IAAI,CAAC,QAAQ;gBACb,IAAI,CAAC,QAAQ,CAAC,WAAW;gBACzB,IAAI,CAAC,QAAQ,CAAC,UAAU;gBACtB,CAAC,CAAC,EAAE,uBAAuB,EAAE,MAAM,EAAE;gBACrC,CAAC,CAAC,EAAE;YAGR,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'pds-table-cell',\n styleUrls: ['../../../global/styles/base.scss', 'pds-table-cell.scss'],\n shadow: true,\n})\nexport class PdsTableCell {\n @Element() hostElement: HTMLPdsTableCellElement;\n private tableRef: HTMLPdsTableElement;\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 this.tableRef.addEventListener('scroll', this.handleScroll);\n }\n }\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.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 private handleScroll = () => {\n if (this.tableRef.scrollLeft > 0) {\n this.tableScrolling = true;\n } else {\n this.tableScrolling = false;\n }\n };\n\n render() {\n return (\n <Host\n class={this.classNames()}\n role=\"gridcell\"\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"]}
|
|
@@ -34,7 +34,7 @@ export class PdsTableHead {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return (h(Host, { key: '
|
|
37
|
+
return (h(Host, { key: 'eb7e9eef443d0f222482b427a5ced7eaa4c0acf4', role: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-head-cell", { key: '6b7c87f0d07aac6e5b12b9e3a63914061f850da7', part: this.tableRef.selectable ? 'checkbox-cell' : '' }, h("pds-checkbox", { key: '74a7b333189bf92219b5a82bf0897d476b7adc8a', componentId: this.generateUniqueId(), indeterminate: this.indeterminate, onInput: this.handleInput, label: "Select All Rows", labelHidden: true, checked: this.isSelected }))), h("slot", { key: '5ef8daf29f10505b082619755b61014a52dbd00c' })));
|
|
38
38
|
}
|
|
39
39
|
static get is() { return "pds-table-head"; }
|
|
40
40
|
static get encapsulation() { return "shadow"; }
|
|
@@ -62,7 +62,7 @@ export class PdsTableHead {
|
|
|
62
62
|
"optional": true,
|
|
63
63
|
"docs": {
|
|
64
64
|
"tags": [],
|
|
65
|
-
"text": "
|
|
65
|
+
"text": "Determines if the select all checkbox is in an indeterminate state."
|
|
66
66
|
},
|
|
67
67
|
"attribute": "indeterminate",
|
|
68
68
|
"reflect": false
|
|
@@ -78,8 +78,11 @@ export class PdsTableHead {
|
|
|
78
78
|
"required": false,
|
|
79
79
|
"optional": false,
|
|
80
80
|
"docs": {
|
|
81
|
-
"tags": [
|
|
82
|
-
|
|
81
|
+
"tags": [{
|
|
82
|
+
"name": "defaultValue",
|
|
83
|
+
"text": "false"
|
|
84
|
+
}],
|
|
85
|
+
"text": "Determines if the table row is currently selected."
|
|
83
86
|
},
|
|
84
87
|
"attribute": "is-selected",
|
|
85
88
|
"reflect": false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-table-head.js","sourceRoot":"","sources":["../../../../src/components/pds-table/pds-table-head/pds-table-head.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAOzC,MAAM,OAAO,YAAY;;
|
|
1
|
+
{"version":3,"file":"pds-table-head.js","sourceRoot":"","sources":["../../../../src/components/pds-table/pds-table-head/pds-table-head.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAOzC,MAAM,OAAO,YAAY;;QAoBf,qBAAgB,GAAG,GAAG,EAAE;YAC9B,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAChE,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;YACjE,MAAM,QAAQ,GAAG,GAAG,YAAY,IAAI,SAAS,EAAE,CAAC;YAEhD,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA;QAEO,gBAAW,GAAG,CAAC,EAAS,EAAE,EAAE;YAClC,IAAI,CAAC,UAAU,GAAG,CAAE,EAAE,CAAC,MAA2B,CAAC,OAAO,CAAA;YAC1D,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,U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ACjB,OAAO,EAAE,IAAI,CAAC,UAAU,GACxB,CACkB,CACvB;YACD,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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: ['../../../global/styles/base.scss', '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 * 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\">\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 labelHidden={true}\n checked={this.isSelected}\n />\n </pds-table-head-cell>\n )}\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -51,11 +51,11 @@ export class PdsTableHeadCell {
|
|
|
51
51
|
return classNames.join(' ');
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: 'dcb6684146176db2dfc73c99ead82af732ef1f72', class: this.classNames(), role: "columnheader", onClick: this.toggleSort, style: this.tableRef &&
|
|
55
55
|
this.tableRef.fixedColumn &&
|
|
56
56
|
this.tableRef.selectable
|
|
57
57
|
? { '--fixed-cell-position': '40px' }
|
|
58
|
-
: {} }, h("slot", { key: '
|
|
58
|
+
: {} }, h("slot", { key: 'ea960d9245e41ce504083f2645aa01bd3a9404f0' }), this.sortable && (h("pds-icon", { key: 'dfa59925bbda74da7b2a3bf87f448cf323ff6342', icon: this.sortingDirection === 'asc' ? upSmall : downSmall }))));
|
|
59
59
|
}
|
|
60
60
|
static get is() { return "pds-table-head-cell"; }
|
|
61
61
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-table-head-cell.js","sourceRoot":"","sources":["../../../../src/components/pds-table/pds-table-head-cell/pds-table-head-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAE9F,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAO1D,MAAM,OAAO,gBAAgB;;
|
|
1
|
+
{"version":3,"file":"pds-table-head-cell.js","sourceRoot":"","sources":["../../../../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AAQ;gBACb,IAAI,CAAC,QAAQ,CAAC,WAAW;gBACzB,IAAI,CAAC,QAAQ,CAAC,UAAU;gBACtB,CAAC,CAAC,EAAE,uBAAuB,EAAE,MAAM,EAAE;gBACrC,CAAC,CAAC,EAAE;YAGR,8DAAa;YACZ,IAAI,CAAC,QAAQ,IAAI,CAChB,iEAAU,IAAI,EAAE,IAAI,CAAC,gBAAgB,KAAK,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,GAAI,CAC1E,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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: ['../../../global/styles/base.scss', 'pds-table-head-cell.scss'],\n shadow: true,\n})\nexport class PdsTableHeadCell {\n @Element() hostElement: HTMLPdsTableHeadCellElement;\n private tableRef: HTMLPdsTableElement;\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 this.tableRef.addEventListener('scroll', this.handleScroll);\n }\n }\n\n private handleScroll = () => {\n if (this.tableRef.scrollLeft > 0) {\n this.tableScrolling = true;\n } else {\n this.tableScrolling = false;\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.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 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} />\n )}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -45,7 +45,7 @@ export class PdsTableRow {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (h(Host, { key: '
|
|
48
|
+
return (h(Host, { key: '9dceed18de8775f4356afec4bafe85b8e01d784d', class: this.classNames(), role: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-cell", { key: 'a56e002c28377096430b6370744dc32726f578d3', part: this.tableRef.fixedColumn ? 'checkbox-cell' : '', class: this.tableRef.selectable ? 'has-checkbox' : '' }, h("pds-checkbox", { key: '5d7d6b2632d619bc7e7447f1eaf6ec7d9a2e2318', componentId: this.generateUniqueId(), onClick: this.handleClick, indeterminate: this.indeterminate, label: "Select Row", labelHidden: true, checked: this.isSelected }))), h("slot", { key: '9dcbe00aba5b4bba6318a301609ce2226c303178' })));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "pds-table-row"; }
|
|
51
51
|
static get encapsulation() { return "shadow"; }
|
|
@@ -73,7 +73,7 @@ export class PdsTableRow {
|
|
|
73
73
|
"optional": true,
|
|
74
74
|
"docs": {
|
|
75
75
|
"tags": [],
|
|
76
|
-
"text": "
|
|
76
|
+
"text": "Determines if the row selected is in an indeterminate state."
|
|
77
77
|
},
|
|
78
78
|
"attribute": "indeterminate",
|
|
79
79
|
"reflect": false
|
|
@@ -90,7 +90,7 @@ export class PdsTableRow {
|
|
|
90
90
|
"optional": true,
|
|
91
91
|
"docs": {
|
|
92
92
|
"tags": [],
|
|
93
|
-
"text": "
|
|
93
|
+
"text": "Determines if the table row is currently selected."
|
|
94
94
|
},
|
|
95
95
|
"attribute": "is-selected",
|
|
96
96
|
"reflect": false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-table-row.js","sourceRoot":"","sources":["../../../../src/components/pds-table/pds-table-row/pds-table-row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,eAAe,CAAC;AAEvF,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAOjD,MAAM,OAAO,WAAW;;QAmBd,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,4BAA4B;YAChE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC,CAAA;QAEO,iBAAY,GAAG,CAAC,UAAmB,EAAE,EAAE;YAC7C,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;YAE3B,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,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AC;IACH,CAAC;IAED,iBAAiB;QACf,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IAUD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,IAAI,EAAC,KAAK;YAET,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,IAAI,CAC5C,uEAAgB,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;gBAC3H,qEACE,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAAE,EACpC,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,IAAI,CAAC,UAAU,GACxB,CACa,CAClB;YACD,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, h, Event, EventEmitter, Prop } from '@stencil/core';\n\nimport { closest } from '../../../utils/closest';\n\n@Component({\n tag: 'pds-table-row',\n styleUrls: ['../../../global/styles/base.scss', 'pds-table-row.scss'],\n shadow: true,\n})\nexport class PdsTableRow {\n @Element() hostElement: HTMLPdsTableRowElement;\n private tableRef: HTMLPdsTableElement;\n\n /**\n
|
|
1
|
+
{"version":3,"file":"pds-table-row.js","sourceRoot":"","sources":["../../../../src/components/pds-table/pds-table-row/pds-table-row.tsx"],"names":[],"mappings":"AAAA,OAAO,E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,OAAO,EAAE,IAAI,CAAC,UAAU,GACxB,CACa,CAClB;YACD,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, h, Event, EventEmitter, Prop } from '@stencil/core';\n\nimport { closest } from '../../../utils/closest';\n\n@Component({\n tag: 'pds-table-row',\n styleUrls: ['../../../global/styles/base.scss', 'pds-table-row.scss'],\n shadow: true,\n})\nexport class PdsTableRow {\n @Element() hostElement: HTMLPdsTableRowElement;\n private tableRef: HTMLPdsTableElement;\n\n /**\n * Determines if the row selected is in an indeterminate state.\n */\n @Prop({ mutable: true }) indeterminate?: boolean;\n\n /**\n * Determines if the table row is currently selected.\n */\n @Prop({ mutable: true }) isSelected?: boolean;\n\n /**\n * Event that is emitted when the checkbox is clicked, carrying the selected value.\n */\n @Event() pdsTableRowSelected: EventEmitter<{ rowIndex: number; isSelected: boolean; }>;\n\n private handleClick = () => {\n this.isSelected = !this.isSelected; // Toggle the selected state\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 const rowIndex = Array.from(this.hostElement.parentNode.children).indexOf(this.hostElement)\n this.pdsTableRowSelected.emit({\n rowIndex,\n isSelected,\n })\n }\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.isSelected) {\n classNames.push(\"is-selected\");\n }\n\n return classNames.join(' ');\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-cell');\n tableCell?.classList.add(\"is-fixed\");\n }\n }\n\n componentWillLoad() {\n if (this.isSelected) {\n this.handleSelect(this.isSelected);\n }\n }\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 render() {\n return (\n <Host\n class={this.classNames()}\n role=\"row\"\n >\n {this.tableRef && this.tableRef.selectable && (\n <pds-table-cell part={this.tableRef.fixedColumn ? 'checkbox-cell' : ''} class={this.tableRef.selectable ? 'has-checkbox' : ''} >\n <pds-checkbox\n componentId={this.generateUniqueId()}\n onClick={this.handleClick}\n indeterminate={this.indeterminate}\n label={\"Select Row\"}\n labelHidden={true}\n checked={this.isSelected}\n />\n </pds-table-cell>\n )}\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -80,7 +80,7 @@ export class PdsTable {
|
|
|
80
80
|
headerCheckbox.indeterminate = !allSelectedRows && !noneSelectedRows;
|
|
81
81
|
}
|
|
82
82
|
render() {
|
|
83
|
-
return (h(Host, { key: '
|
|
83
|
+
return (h(Host, { key: '1525beac2ebdb255e34f834c57755f3bb7e0735b', class: this.classNames(), id: this.componentId, role: "grid", selectable: this.selectable, tabindex: "0" }, h("slot", { key: '2e04d93fe72d2d91ab80037ec42d805f8b472a0f' })));
|
|
84
84
|
}
|
|
85
85
|
static get is() { return "pds-table"; }
|
|
86
86
|
static get encapsulation() { return "shadow"; }
|
|
@@ -108,7 +108,7 @@ export class PdsTable {
|
|
|
108
108
|
"optional": false,
|
|
109
109
|
"docs": {
|
|
110
110
|
"tags": [],
|
|
111
|
-
"text": "Determines if table displays
|
|
111
|
+
"text": "Determines if the table displays with reduced table cell padding."
|
|
112
112
|
},
|
|
113
113
|
"attribute": "compact",
|
|
114
114
|
"reflect": false
|
|
@@ -159,7 +159,7 @@ export class PdsTable {
|
|
|
159
159
|
"optional": false,
|
|
160
160
|
"docs": {
|
|
161
161
|
"tags": [],
|
|
162
|
-
"text": "Determines if
|
|
162
|
+
"text": "Determines if the should display a fixed first column."
|
|
163
163
|
},
|
|
164
164
|
"attribute": "fixed-column",
|
|
165
165
|
"reflect": false
|
|
@@ -176,7 +176,7 @@ export class PdsTable {
|
|
|
176
176
|
"optional": false,
|
|
177
177
|
"docs": {
|
|
178
178
|
"tags": [],
|
|
179
|
-
"text": "Determines if table displays checkboxes for selectable rows."
|
|
179
|
+
"text": "Determines if the table displays checkboxes for selectable rows."
|
|
180
180
|
},
|
|
181
181
|
"attribute": "selectable",
|
|
182
182
|
"reflect": false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-table.js","sourceRoot":"","sources":["../../../src/components/pds-table/pds-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAOtG,MAAM,OAAO,QAAQ;;;;;;;
|
|
1
|
+
{"version":3,"file":"pds-table.js","sourceRoot":"","sources":["../../../src/components/pds-table/pds-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAOtG,MAAM,OAAO,QAAQ;;;;;;;6BAgCqB,IAAI;gCAMA,KAAK;;IAajD,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC5B,CAAC;IAEO,UAAU;QAChB,MAAM,UAAU,GAAG,CAAC,WAAW,CAAC,CAAC;QAEjC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAChC,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;QAED,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAEO,SAAS,CAAC,MAAc,EAAE,SAAyB;QACzD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AY,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAClF,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;QAC7D,IAAI,CAAC,YAAY;YAAE,OAAO;QAE1B,MAAM,cAAc,GAAG,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAC7E,cAAc,CAAC,OAAO,GAAG,eAAe,CAAC;QACzC,cAAc,CAAC,aAAa,GAAG,CAAC,eAAe,IAAI,CAAC,gBAAgB,CAAC;IACvE,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,IAAI,EAAC,MAAM,EACX,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,QAAQ,EAAC,GAAG;YAEZ,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop, State, Listen } from '@stencil/core';\n\n@Component({\n tag: 'pds-table',\n styleUrls: ['../../global/styles/base.scss', 'pds-table.scss'],\n shadow: true,\n})\nexport class PdsTable {\n @Element() el: HTMLPdsTableElement;\n\n /**\n * Determines if the table displays with reduced table cell padding.\n */\n @Prop() compact: boolean;\n\n /**\n * A unique identifier used for the table `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Enables the table to be responsive by horizontally scrolling on smaller screens.\n */\n @Prop() responsive: boolean;\n\n /**\n * Determines if the should display a fixed first column.\n */\n @Prop() fixedColumn: boolean;\n\n /**\n * Determines if the table displays checkboxes for selectable rows.\n */\n @Prop() selectable: boolean;\n\n /**\n * The name of the column being sorted.\n * @defaultValue null\n */\n @State() sortingColumn: string | null = null;\n\n /**\n * The direction of sorting.\n * @defaultValue 'asc'\n */\n @State() sortingDirection: 'asc' | 'desc' = 'asc';\n\n\n /**\n * Event that is emitted when the checkbox is clicked, carrying the rowIndex and selected value.\n */\n @Event() pdsTableSelect: EventEmitter<{ rowIndex: number; isSelected: boolean }>;\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 componentWillLoad() {\n this.sortingColumn = null;\n }\n\n private classNames() {\n const classNames = ['pds-table'];\n\n if (this.compact) {\n classNames.push('is-compact');\n }\n\n if (this.responsive) {\n classNames.push('is-responsive');\n }\n\n return classNames.join(' ');\n }\n\n private sortTable(column: string, direction: 'asc' | 'desc') {\n const tableBody = this.el.querySelector('pds-table-body');\n\n // Get the rows in the table body\n const tableRows = Array.from(tableBody.querySelectorAll('pds-table-row'));\n\n // Find the column index based on the column name\n const columnHeaderCells: HTMLElement[] = Array.from(\n this.el.querySelectorAll('pds-table-head-cell[sortable]')\n );\n\n const columnHeaderCell = columnHeaderCells.find(\n (cell) => cell.innerText.trim() === column\n );\n\n if (!columnHeaderCell) {\n console.warn(`Column \"${column}\" not found.`);\n return;\n }\n\n const columnIndex = columnHeaderCells.indexOf(columnHeaderCell);\n\n // Sort the rows based on the content of the specified column\n tableRows.sort((a, b) => {\n const valueA = a.querySelector(`pds-table-cell:nth-child(${columnIndex + 1})`).textContent.trim();\n const valueB = b.querySelector(`pds-table-cell:nth-child(${columnIndex + 1})`).textContent.trim();\n\n if (direction === 'asc') {\n return valueA.localeCompare(valueB);\n } else {\n return valueB.localeCompare(valueA);\n }\n });\n\n // Clear and append the sorted rows back to the table body\n tableBody.innerHTML = '';\n tableRows.forEach((row) => {\n tableBody.appendChild(row);\n });\n }\n\n @Listen('pdsTableSort')\n handleTableSort(event: CustomEvent<{ column: string; direction: 'asc' | 'desc' }>) {\n const { direction } = event.detail;\n this.sortTable(event.detail.column, direction);\n this.sortingColumn = event.detail.column;\n this.sortingDirection = direction;\n }\n\n @Listen('pdsTableSelectAll')\n handleTableSelectAll(event: CustomEvent<{ isSelected: boolean }>) {\n if (event.defaultPrevented) return;\n\n const pdsTableBody = this.el.querySelector('pds-table-body');\n const tableRows = Array.from(pdsTableBody.querySelectorAll('pds-table-row'));\n\n tableRows.forEach((row) => {\n row.isSelected = event.detail.isSelected;\n });\n }\n\n @Listen('pdsTableRowSelected')\n async handleTableSelect(event: CustomEvent<{ rowIndex: number; isSelected: boolean }>) {\n if (event.defaultPrevented) return;\n\n const allTableRows = this.el.querySelectorAll('pds-table-row');\n const allSelectedRows = Array.from(allTableRows).every((row) => row.isSelected);\n const noneSelectedRows = Array.from(allTableRows).every((row) => !row.isSelected);\n const pdsTableHead = this.el.querySelector('pds-table-head');\n if (!pdsTableHead) return;\n\n const headerCheckbox = pdsTableHead.shadowRoot.querySelector('pds-checkbox');\n headerCheckbox.checked = allSelectedRows;\n headerCheckbox.indeterminate = !allSelectedRows && !noneSelectedRows;\n }\n\n render() {\n return (\n <Host\n class={this.classNames()}\n id={this.componentId}\n role=\"grid\"\n selectable={this.selectable}\n tabindex=\"0\"\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
decorators: [withActions],
|
|
9
9
|
parameters: {
|
|
10
10
|
actions: {
|
|
11
|
-
handles: ['onclick', 'pdsTableRowSelected', 'onclick', 'pdsTableSelectAll'],
|
|
11
|
+
handles: ['onclick', 'pdsTableRowSelected', 'onclick', 'pdsTableSelectAll', 'pdsTableSort'],
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
14
|
title: 'components/Table',
|
|
@@ -11,9 +11,9 @@ export class PdsTab {
|
|
|
11
11
|
this.pdsTabClick.emit([index, parentComponentId]);
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
const availabilityTabEdgeInlineStart = (h("span", { key: '
|
|
15
|
-
const availabilityTabEdgeInlineEnd = (h("span", { key: '
|
|
16
|
-
return (h(Host, { key: '
|
|
14
|
+
const availabilityTabEdgeInlineStart = (h("span", { key: 'd98a922aaa1b9a6023830badc391c3d1d615ec6a', class: "pds-tab-edge", role: "presentation" }));
|
|
15
|
+
const availabilityTabEdgeInlineEnd = (h("span", { key: '390da28bb3fd9ab1fa2fddda45569e92d4547fa3', class: "pds-tab-edge pds-tab-edge--end", role: "presentation" }));
|
|
16
|
+
return (h(Host, { key: '5996673486d4bd95f98a691b155529a60655e92f', variant: this.variant, slot: "tabs", index: this.index }, h("button", { key: '6eded79f9d5aa9093080933aa9aaa2ad88440759', role: "tab", id: this.parentComponentId + "__" + this.name, "aria-controls": this.parentComponentId + "__" + this.name + "-panel", tabindex: this.selected ? "0" : "-1", "aria-selected": this.selected ? "true" : "false", class: this.selected ? "pds-tab is-active" : "pds-tab", onClick: this.onTabClick.bind(this, this.index, this.parentComponentId) }, this.variant === "availability" && availabilityTabEdgeInlineStart, this.variant === "availability" && availabilityTabEdgeInlineEnd, h("div", { key: '9f8927d976b6964c22414e9fbb8680b9132370fa', class: "pds-tab__content" }, h("slot", { key: '691c6cf5e42bc42c6492276fd5905733c424921c' })))));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "pds-tab"; }
|
|
19
19
|
static get originalStyleUrls() {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
import { extractArgTypes } from '@pxtrn/storybook-addon-docs-stencil';
|
|
3
|
+
import { withActions } from '@storybook/addon-actions/decorator';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
argTypes: extractArgTypes('pds-tab'),
|
|
7
|
+
component: 'pds-tab',
|
|
8
|
+
decorators: [withActions],
|
|
9
|
+
title: 'components/Tabs/Tab',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const BaseTemplate = (args) => html`
|
|
13
|
+
<pds-tabs active-tab-name="Sturdy" variant="primary" component-id="primary" tablist-label="Foo">
|
|
14
|
+
<pds-tab name="${args.name}">Sturdy</pds-tab>
|
|
15
|
+
<pds-tabpanel name="Sturdy">Content Sturdy</pds-tabpanel>
|
|
16
|
+
</pds-tabs>
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
export const Default = BaseTemplate.bind({});
|
|
@@ -7,7 +7,7 @@ export class PdsTabpanel {
|
|
|
7
7
|
this.selected = false;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: 'e373f0105e391bcb04888b060f41d96cf374ee2d', slot: "tabpanels" }, h("div", { key: '699b02073f6fa1caafc5920b82f776c86c553599', role: "tabpanel", id: this.parentComponentId + "__" + this.name + '-panel', tabindex: "0", "aria-labelledby": this.parentComponentId + "__" + this.name, class: this.selected ? "pds-tabpanel is-active" : "pds-tabpanel" }, h("slot", { key: 'df59ed91bf0ca60ccbde92b2f84c7c17659bfdbd' }))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "pds-tabpanel"; }
|
|
13
13
|
static get originalStyleUrls() {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
import { extractArgTypes } from '@pxtrn/storybook-addon-docs-stencil';
|
|
3
|
+
import { withActions } from '@storybook/addon-actions/decorator';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
argTypes: extractArgTypes('pds-tabpanel'),
|
|
7
|
+
component: 'pds-tabpanel',
|
|
8
|
+
decorators: [withActions],
|
|
9
|
+
title: 'components/Tabs/Tabpanel',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const BaseTemplate = (args) => html`
|
|
13
|
+
<pds-tabs active-tab-name="Sturdy" variant="primary" component-id="primary" tablist-label="Foo">
|
|
14
|
+
<pds-tab name="Sturdy">Sturdy</pds-tab>
|
|
15
|
+
<pds-tabpanel name="${args.name}">Content Sturdy</pds-tabpanel>
|
|
16
|
+
</pds-tabs>
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
export const Default = BaseTemplate.bind({});
|
|
@@ -83,7 +83,7 @@ export class PdsTabs {
|
|
|
83
83
|
this.passPropsToChildren();
|
|
84
84
|
}
|
|
85
85
|
render() {
|
|
86
|
-
return (h(Host, { key: '
|
|
86
|
+
return (h(Host, { key: '8b7537e2fc9007aaca3c1a6baff0a1c3d6b2cb07', "active-tab-name": this.activeTabName, class: this.classNames(), id: this.componentId }, h("div", { key: '7afa678022c1170d3912137897a5ece92e7b4394', class: "pds-tabs__tablist", role: "tablist", "aria-label": this.tablistLabel }, h("slot", { key: 'e2026e752548b4cdf8f768137e4bb567550ef3cd', name: "tabs" })), h("slot", { key: 'c3a3fbbfab88494b45e5d1cc6563877df2017f9f', name: "tabpanels" })));
|
|
87
87
|
}
|
|
88
88
|
static get is() { return "pds-tabs"; }
|
|
89
89
|
static get encapsulation() { return "shadow"; }
|