@pine-ds/core 2.1.0 → 2.1.2
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 +14 -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 +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 +15 -11
- 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-head-cell2.js +3 -3
- package/components/pds-table-head.js +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-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 +16 -7
- package/components/pds-textarea.js.map +1 -1
- package/components/pds-tooltip.js +6 -8
- package/components/pds-tooltip.js.map +1 -1
- package/dist/cjs/{index-2240f8f4.js → index-0079013c.js} +4 -2
- package/dist/cjs/index-0079013c.js.map +1 -0
- package/dist/cjs/{index-d424fb6f.js → index-b7d9268e.js} +14 -7
- 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 +8 -6
- package/dist/cjs/pds-input.cjs.entry.js.map +1 -1
- package/dist/cjs/{pds-label-397cc854.js → pds-label-05f073ea.js} +2 -2
- package/dist/cjs/{pds-label-397cc854.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 +2 -2
- 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 +9 -10
- 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-head-cell.cjs.entry.js +4 -4
- package/dist/cjs/pds-table-head.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-row.cjs.entry.js +2 -2
- package/dist/cjs/pds-table.cjs.entry.js +2 -2
- 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 +10 -8
- package/dist/cjs/pds-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-tooltip.cjs.entry.js +5 -8
- package/dist/cjs/pds-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/pine-core.cjs.js +3 -3
- package/dist/cjs/pine-core.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/pds-button/pds-button.js +20 -1
- 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-icon/stories/pds-icon.stories.js +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 +22 -3
- package/dist/collection/components/pds-input/pds-input.js.map +1 -1
- package/dist/collection/components/pds-input/stories/pds-input.stories.js +10 -0
- 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.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 +17 -39
- package/dist/collection/components/pds-switch/pds-switch.js.map +1 -1
- package/dist/collection/components/pds-switch/stories/pds-switch.stories.js +2 -15
- 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-head/pds-table-head.js +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-row/pds-table-row.js +1 -1
- package/dist/collection/components/pds-table/pds-table.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 +24 -5
- package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -1
- package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +22 -11
- package/dist/collection/components/pds-tooltip/pds-tooltip.css +2 -1
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +24 -37
- package/dist/collection/components/pds-tooltip/pds-tooltip.js.map +1 -1
- package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +15 -15
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/docs.json +1184 -265
- package/dist/esm/{index-786a51ce.js → index-3ca52e8f.js} +4 -3
- package/dist/esm/index-3ca52e8f.js.map +1 -0
- package/dist/esm/{index-94bbabb0.js → index-b1696fed.js} +14 -7
- 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 +8 -6
- package/dist/esm/pds-input.entry.js.map +1 -1
- package/dist/esm/{pds-label-d28da6eb.js → pds-label-62469596.js} +2 -2
- package/dist/esm/{pds-label-d28da6eb.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 +2 -2
- 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 +9 -10
- 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-head-cell.entry.js +4 -4
- package/dist/esm/pds-table-head.entry.js +2 -2
- package/dist/esm/pds-table-row.entry.js +2 -2
- package/dist/esm/pds-table.entry.js +2 -2
- 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 +10 -8
- package/dist/esm/pds-textarea.entry.js.map +1 -1
- package/dist/esm/pds-tooltip.entry.js +5 -8
- package/dist/esm/pds-tooltip.entry.js.map +1 -1
- package/dist/esm/pine-core.js +4 -4
- package/dist/esm/pine-core.js.map +1 -1
- package/dist/esm-es5/index-3ca52e8f.js +2 -0
- package/dist/esm-es5/index-3ca52e8f.js.map +1 -0
- package/dist/esm-es5/index-b1696fed.js +3 -0
- 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-d28da6eb.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-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-head-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head.entry.js +1 -1
- package/dist/esm-es5/pds-table-row.entry.js +1 -1
- package/dist/esm-es5/pds-table.entry.js +1 -1
- package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
- package/dist/esm-es5/pds-tabs.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js +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/pds-tooltip.entry.js.map +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-284433e0.entry.js → p-00cccccb.entry.js} +2 -2
- package/dist/pine-core/p-06513fe5.entry.js +2 -0
- package/dist/pine-core/p-06513fe5.entry.js.map +1 -0
- package/dist/pine-core/p-06593922.system.entry.js +2 -0
- package/dist/pine-core/p-06593922.system.entry.js.map +1 -0
- package/dist/pine-core/{p-a8cb75f0.system.entry.js → p-08c4f190.system.entry.js} +2 -2
- package/dist/pine-core/{p-bd5de072.system.entry.js → p-09d83447.system.entry.js} +2 -2
- package/dist/pine-core/{p-bd5de072.system.entry.js.map → p-09d83447.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-abe6c2d6.entry.js → p-0ac04129.entry.js} +2 -2
- package/dist/pine-core/{p-abe6c2d6.entry.js.map → p-0ac04129.entry.js.map} +1 -1
- package/dist/pine-core/{p-cd033c2a.entry.js → p-0ff89cf4.entry.js} +2 -2
- package/dist/pine-core/{p-cd033c2a.entry.js.map → p-0ff89cf4.entry.js.map} +1 -1
- package/dist/pine-core/p-1010d12b.system.entry.js +2 -0
- package/dist/pine-core/p-1010d12b.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-d8eeadd1.system.entry.js → p-172464c1.system.entry.js} +2 -2
- package/dist/pine-core/{p-64c07f01.system.entry.js → p-1a1a76ea.system.entry.js} +2 -2
- package/dist/pine-core/{p-e847089d.system.entry.js → p-1df1990d.system.entry.js} +2 -2
- package/dist/pine-core/p-1e80f274.entry.js +2 -0
- package/dist/pine-core/p-1e80f274.entry.js.map +1 -0
- package/dist/pine-core/{p-3558923a.entry.js → p-239891e6.entry.js} +2 -2
- package/dist/pine-core/p-34f84589.entry.js +2 -0
- package/dist/pine-core/p-34f84589.entry.js.map +1 -0
- package/dist/pine-core/{p-1692ed0c.entry.js → p-3acb18ad.entry.js} +2 -2
- package/dist/pine-core/{p-57d81378.entry.js → p-3e4225fc.entry.js} +2 -2
- package/dist/pine-core/{p-7fb3c253.entry.js → p-3ff2642d.entry.js} +2 -2
- package/dist/pine-core/{p-7fb3c253.entry.js.map → p-3ff2642d.entry.js.map} +1 -1
- package/dist/pine-core/{p-d9611049.system.entry.js → p-4043cf6e.system.entry.js} +2 -2
- package/dist/pine-core/{p-d9611049.system.entry.js.map → p-4043cf6e.system.entry.js.map} +1 -1
- package/dist/pine-core/p-45cf2585.system.js +3 -0
- package/dist/pine-core/p-45cf2585.system.js.map +1 -0
- package/dist/pine-core/{p-03ecf146.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-961f79c5.system.entry.js → p-50918693.system.entry.js} +2 -2
- package/dist/pine-core/p-59214c8b.system.entry.js +2 -0
- package/dist/pine-core/p-59214c8b.system.entry.js.map +1 -0
- package/dist/pine-core/{p-a17dea5e.system.entry.js → p-59327483.system.entry.js} +2 -2
- 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-d461bee4.entry.js → p-59fcea0f.entry.js} +2 -2
- 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-85507ca5.system.entry.js → p-5c942465.system.entry.js} +2 -2
- package/dist/pine-core/{p-835c73f4.entry.js → p-624de926.entry.js} +2 -2
- package/dist/pine-core/p-65229490.entry.js +2 -0
- package/dist/pine-core/{p-ffa8e658.entry.js → p-6e079be2.entry.js} +2 -2
- package/dist/pine-core/p-6f8f471b.system.entry.js +2 -0
- package/dist/pine-core/p-6f8f471b.system.entry.js.map +1 -0
- package/dist/pine-core/{p-58a25131.entry.js → p-760e1c32.entry.js} +2 -2
- package/dist/pine-core/{p-58a25131.entry.js.map → p-760e1c32.entry.js.map} +1 -1
- package/dist/pine-core/{p-979ab4e2.system.entry.js → p-81bdf676.system.entry.js} +2 -2
- package/dist/pine-core/{p-8963f07a.entry.js → p-84a4930d.entry.js} +2 -2
- package/dist/pine-core/p-87fe352f.js +3 -0
- package/dist/pine-core/p-87fe352f.js.map +1 -0
- package/dist/pine-core/{p-6e15f0e1.entry.js → p-88410213.entry.js} +2 -2
- 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-d41fbbf0.system.entry.js → p-88edcb41.system.entry.js} +2 -2
- package/dist/pine-core/{p-469a84a3.system.entry.js → p-8ae84655.system.entry.js} +2 -2
- package/dist/pine-core/{p-469a84a3.system.entry.js.map → p-8ae84655.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-90707120.entry.js → p-9487df53.entry.js} +2 -2
- package/dist/pine-core/{p-c5afbc57.entry.js → p-953e6fde.entry.js} +2 -2
- package/dist/pine-core/{p-c5afbc57.entry.js.map → p-953e6fde.entry.js.map} +1 -1
- 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-a2726d3b.system.entry.js +2 -0
- package/dist/pine-core/p-a2726d3b.system.entry.js.map +1 -0
- package/dist/pine-core/{p-95c2a6bf.entry.js → p-a51098dd.entry.js} +2 -2
- package/dist/pine-core/p-a9038f7f.js +2 -0
- package/dist/pine-core/{p-a98f5e91.system.entry.js → p-a9e02a6f.system.entry.js} +2 -2
- package/dist/pine-core/{p-a09284c5.entry.js → p-b7890a73.system.entry.js} +2 -2
- package/dist/pine-core/p-b7890a73.system.entry.js.map +1 -0
- package/dist/pine-core/{p-ca1fa95e.system.entry.js → p-b7edbe43.system.entry.js} +2 -2
- package/dist/pine-core/{p-366c4924.system.entry.js → p-b95522e6.system.entry.js} +2 -2
- package/dist/pine-core/{p-fe793116.entry.js → p-bbd19258.entry.js} +2 -2
- package/dist/pine-core/{p-d2c98df0.system.entry.js → p-c4aec6ce.system.entry.js} +2 -2
- package/dist/pine-core/{p-d2c98df0.system.entry.js.map → p-c4aec6ce.system.entry.js.map} +1 -1
- 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-852dce9d.system.entry.js → p-ce91ca6a.system.entry.js} +2 -2
- package/dist/pine-core/{p-852dce9d.system.entry.js.map → p-ce91ca6a.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-f79b96ee.entry.js → p-ceb66096.entry.js} +3 -3
- package/dist/pine-core/{p-8930c3b7.system.entry.js → p-d3365f49.system.entry.js} +3 -3
- package/dist/pine-core/p-d37d900e.entry.js +2 -0
- package/dist/pine-core/p-d37d900e.entry.js.map +1 -0
- package/dist/pine-core/p-d5c90be4.entry.js +2 -0
- package/dist/pine-core/p-d5c90be4.entry.js.map +1 -0
- package/dist/pine-core/{p-7c4f8c64.entry.js → p-d6d8a21a.entry.js} +2 -2
- package/dist/pine-core/p-db622f8f.system.js +2 -0
- package/dist/pine-core/p-dc4a6d88.js +2 -0
- package/dist/pine-core/p-dc4a6d88.js.map +1 -0
- package/dist/pine-core/{p-bd593d1c.entry.js → p-e2a673e8.entry.js} +2 -2
- package/dist/pine-core/{p-d6873321.system.js → p-e3fab4be.system.js} +2 -2
- package/dist/pine-core/{p-1dccfe1b.system.entry.js → p-e64594ae.system.entry.js} +2 -2
- package/dist/pine-core/p-e90b2c75.system.js +2 -0
- package/dist/pine-core/p-e90b2c75.system.js.map +1 -0
- package/dist/pine-core/p-e936e948.entry.js +2 -0
- package/dist/pine-core/p-e936e948.entry.js.map +1 -0
- package/dist/pine-core/{p-9b0e5234.entry.js → p-ebdaf3ad.entry.js} +2 -2
- package/dist/pine-core/{p-4b856a95.system.entry.js → p-ece8530d.system.entry.js} +2 -2
- package/dist/pine-core/{p-0c2553c6.system.entry.js → p-ee21fa25.system.entry.js} +2 -2
- package/dist/pine-core/p-efbe2dc5.system.entry.js +2 -0
- package/dist/pine-core/p-efbe2dc5.system.entry.js.map +1 -0
- package/dist/pine-core/{p-4b06aed0.system.entry.js → p-f16ef73c.system.entry.js} +2 -2
- package/dist/pine-core/{p-2a4952ea.system.entry.js → p-f9719887.system.entry.js} +2 -2
- package/dist/pine-core/p-ff20b191.entry.js +2 -0
- package/dist/pine-core/p-ff20b191.entry.js.map +1 -0
- package/dist/pine-core/pine-core.css +1 -1
- 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/bookmark.svg +1 -0
- package/dist/pine-core/svg/expand.svg +1 -1
- package/dist/pine-core/svg/file-add.svg +1 -1
- package/dist/pine-core/svg/layout-grid-02.svg +1 -0
- package/dist/pine-core/svg/user-star-filled.svg +1 -1
- package/dist/pine-core/svg/user-star.svg +1 -1
- package/dist/types/components/pds-button/pds-button.d.ts +2 -0
- 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 +4 -0
- 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 +11 -19
- package/dist/types/components/pds-text/pds-text.d.ts +27 -0
- package/dist/types/components/pds-textarea/pds-textarea.d.ts +4 -0
- package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +5 -9
- package/dist/types/components.d.ts +419 -81
- package/dist/types/stencil-public-runtime.d.ts +2 -0
- package/dist/types/utils/types.d.ts +1 -1
- package/hydrate/index.js +350 -79
- package/hydrate/index.mjs +350 -79
- package/package.json +13 -10
- package/dist/cjs/index-2240f8f4.js.map +0 -1
- package/dist/cjs/index-d424fb6f.js.map +0 -1
- package/dist/esm/index-786a51ce.js.map +0 -1
- package/dist/esm/index-94bbabb0.js.map +0 -1
- package/dist/esm-es5/index-786a51ce.js +0 -2
- package/dist/esm-es5/index-786a51ce.js.map +0 -1
- package/dist/esm-es5/index-94bbabb0.js +0 -3
- package/dist/esm-es5/index-94bbabb0.js.map +0 -1
- package/dist/pine-core/p-0069affa.entry.js +0 -2
- package/dist/pine-core/p-0069affa.entry.js.map +0 -1
- package/dist/pine-core/p-14d3cdaf.system.js +0 -2
- package/dist/pine-core/p-14d3cdaf.system.js.map +0 -1
- package/dist/pine-core/p-244e264d.system.js +0 -2
- package/dist/pine-core/p-244e264d.system.js.map +0 -1
- package/dist/pine-core/p-2665d555.js +0 -2
- package/dist/pine-core/p-2665d555.js.map +0 -1
- package/dist/pine-core/p-37458cc7.entry.js +0 -2
- package/dist/pine-core/p-37458cc7.entry.js.map +0 -1
- package/dist/pine-core/p-3886e15a.entry.js +0 -2
- package/dist/pine-core/p-3886e15a.entry.js.map +0 -1
- package/dist/pine-core/p-496454a3.system.js +0 -2
- package/dist/pine-core/p-4fcf94ee.system.entry.js +0 -2
- package/dist/pine-core/p-4fcf94ee.system.entry.js.map +0 -1
- package/dist/pine-core/p-59cc888d.entry.js +0 -2
- package/dist/pine-core/p-72ee760e.entry.js +0 -2
- package/dist/pine-core/p-72ee760e.entry.js.map +0 -1
- package/dist/pine-core/p-77c5fe7b.entry.js +0 -2
- package/dist/pine-core/p-77c5fe7b.entry.js.map +0 -1
- package/dist/pine-core/p-7841bd18.js +0 -3
- package/dist/pine-core/p-7841bd18.js.map +0 -1
- package/dist/pine-core/p-7c79ff32.system.entry.js +0 -2
- package/dist/pine-core/p-7c79ff32.system.entry.js.map +0 -1
- package/dist/pine-core/p-91cba446.system.entry.js +0 -2
- package/dist/pine-core/p-91cba446.system.entry.js.map +0 -1
- package/dist/pine-core/p-a09284c5.entry.js.map +0 -1
- package/dist/pine-core/p-b54e35d2.system.entry.js +0 -2
- package/dist/pine-core/p-b54e35d2.system.entry.js.map +0 -1
- package/dist/pine-core/p-bb88538f.system.entry.js +0 -2
- package/dist/pine-core/p-bb88538f.system.entry.js.map +0 -1
- package/dist/pine-core/p-bc1ecf2f.js +0 -2
- package/dist/pine-core/p-c6bee7a0.system.js +0 -3
- package/dist/pine-core/p-c6bee7a0.system.js.map +0 -1
- package/dist/pine-core/p-d3eeb6f0.system.entry.js +0 -2
- package/dist/pine-core/p-d3eeb6f0.system.entry.js.map +0 -1
- package/dist/pine-core/p-dbc5775f.entry.js +0 -2
- package/dist/pine-core/p-dbc5775f.entry.js.map +0 -1
- package/dist/pine-core/p-ea27b026.system.entry.js +0 -2
- package/dist/pine-core/p-ea27b026.system.entry.js.map +0 -1
- /package/dist/esm-es5/{pds-label-d28da6eb.js.map → pds-label-62469596.js.map} +0 -0
- /package/dist/pine-core/{p-284433e0.entry.js.map → p-00cccccb.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a8cb75f0.system.entry.js.map → p-08c4f190.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d8eeadd1.system.entry.js.map → p-172464c1.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-64c07f01.system.entry.js.map → p-1a1a76ea.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e847089d.system.entry.js.map → p-1df1990d.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3558923a.entry.js.map → p-239891e6.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1692ed0c.entry.js.map → p-3acb18ad.entry.js.map} +0 -0
- /package/dist/pine-core/{p-57d81378.entry.js.map → p-3e4225fc.entry.js.map} +0 -0
- /package/dist/pine-core/{p-03ecf146.entry.js.map → p-4d22b02c.entry.js.map} +0 -0
- /package/dist/pine-core/{p-961f79c5.system.entry.js.map → p-50918693.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a17dea5e.system.entry.js.map → p-59327483.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d461bee4.entry.js.map → p-59fcea0f.entry.js.map} +0 -0
- /package/dist/pine-core/{p-85507ca5.system.entry.js.map → p-5c942465.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-835c73f4.entry.js.map → p-624de926.entry.js.map} +0 -0
- /package/dist/pine-core/{p-59cc888d.entry.js.map → p-65229490.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ffa8e658.entry.js.map → p-6e079be2.entry.js.map} +0 -0
- /package/dist/pine-core/{p-979ab4e2.system.entry.js.map → p-81bdf676.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-8963f07a.entry.js.map → p-84a4930d.entry.js.map} +0 -0
- /package/dist/pine-core/{p-6e15f0e1.entry.js.map → p-88410213.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d41fbbf0.system.entry.js.map → p-88edcb41.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-90707120.entry.js.map → p-9487df53.entry.js.map} +0 -0
- /package/dist/pine-core/{p-95c2a6bf.entry.js.map → p-a51098dd.entry.js.map} +0 -0
- /package/dist/pine-core/{p-bc1ecf2f.js.map → p-a9038f7f.js.map} +0 -0
- /package/dist/pine-core/{p-a98f5e91.system.entry.js.map → p-a9e02a6f.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ca1fa95e.system.entry.js.map → p-b7edbe43.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-366c4924.system.entry.js.map → p-b95522e6.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-fe793116.entry.js.map → p-bbd19258.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f79b96ee.entry.js.map → p-ceb66096.entry.js.map} +0 -0
- /package/dist/pine-core/{p-8930c3b7.system.entry.js.map → p-d3365f49.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7c4f8c64.entry.js.map → p-d6d8a21a.entry.js.map} +0 -0
- /package/dist/pine-core/{p-496454a3.system.js.map → p-db622f8f.system.js.map} +0 -0
- /package/dist/pine-core/{p-bd593d1c.entry.js.map → p-e2a673e8.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d6873321.system.js.map → p-e3fab4be.system.js.map} +0 -0
- /package/dist/pine-core/{p-1dccfe1b.system.entry.js.map → p-e64594ae.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-9b0e5234.entry.js.map → p-ebdaf3ad.entry.js.map} +0 -0
- /package/dist/pine-core/{p-4b856a95.system.entry.js.map → p-ece8530d.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0c2553c6.system.entry.js.map → p-ee21fa25.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-4b06aed0.system.entry.js.map → p-f16ef73c.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-2a4952ea.system.entry.js.map → p-f9719887.system.entry.js.map} +0 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { m as messageId, P as PdsLabel } from './pds-label.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './pds-icon2.js';
|
|
4
|
+
|
|
5
|
+
const pdsSelectCss = ":host{--box-shadow-focus:0 0 0 1px #ffffff, 0 0 0 3px var(--pine-color-purple-300);--box-shadow-focus-error:0 0 0 1px #ffffff, 0 0 0 3px var(--pine-color-red-300);--color-background-disabled:var(--pine-color-grey-100);--color-background-error:var(--pine-color-red-050);--color-border-active:var(--pine-color-grey-400);--color-border-default:var(--pine-color-grey-300);--color-border-disabled:var(--pine-color-grey-200);--color-border-error:var(--pine-color-red-600);--color-border-hover:var(--pine-color-grey-500);--color-text-disabled:var(--pine-color-grey-600);--color-text-error:var(--pine-color-red-600);--font-size-helper-message:var(--pine-font-size-085);--font-size-select-field:var(--pine-font-size-100);--font-size-label:var(--pine-font-size-100);--font-weight-helper-message:var(--pine-font-weight-normal);--font-weight-select-field:var(--pine-font-weight-normal);--font-weight-label:var(--pine-font-weight-medium);--line-height-label:var(--pine-line-height-150);--line-height-helper-message:var(--pine-line-height-125);--line-height-select-field:var(--pine-line-height-150);--spacing-error-message:var(--pine-spacing-050);--spacing-field-padding-block:var(--pine-spacing-100);--spacing-label-margin-block-end:var(--pine-spacing-100);--spacing-margin-top-helper-message:var(--pine-spacing-100);--spacing-select-field-padding-inline:var(--pine-spacing-150);--spacing-select-field-icon-allowance:var(--pine-spacing-450)}:host .hidden,:host :host([hidden]){display:none}.pds-select{display:grid;-ms-flex-direction:column;flex-direction:column;grid-template-areas:\"label label\" \"field field\" \"message message\";grid-template-columns:1fr minmax(2rem, -webkit-min-content);grid-template-columns:1fr minmax(2rem, min-content);grid-template-rows:-webkit-min-content -webkit-min-content -webkit-min-content;grid-template-rows:min-content min-content min-content;position:relative;width:100%}label{font-size:var(--font-size-label);font-weight:var(--font-weight-label);grid-area:label;line-height:var(--line-height-label);-webkit-margin-after:var(--spacing-label-margin-block-end);margin-block-end:var(--spacing-label-margin-block-end)}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--color-border-default);border-radius:10px;font-size:var(--font-size-select-field);font-weight:var(--font-weight-select-field);grid-area:field;line-height:var(--line-height-select-field);padding:var(--spacing-field-padding-block) var(--spacing-select-field-padding-inline);padding-right:var(--spacing-select-field-icon-allowance);position:relative}select:hover{border-color:var(--color-border-hover);cursor:pointer}select:focus-visible{border-color:var(--color-border-active);-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}select:disabled{background-color:var(--color-background-disabled);border-color:var(--color-border-disabled);color:var(--color-text-disabled);cursor:not-allowed}select:has(~.pds-select__message .pds-select__error-message){background-color:var(--color-background-error);border-color:var(--color-border-error)}select:has(~.pds-select__message .pds-select__error-message):focus-visible{-webkit-box-shadow:var(--box-shadow-focus-error);box-shadow:var(--box-shadow-focus-error);outline:none}:host(.is-invalid) select{background-color:var(--color-background-error);border-color:var(--color-border-error)}:host(.is-invalid) select:focus-visible{-webkit-box-shadow:var(--box-shadow-focus-error);box-shadow:var(--box-shadow-focus-error);outline:none}.pds-select__error-message,.pds-select__helper-message{font-size:var(--font-size-helper-message);font-weight:var(--font-weight-helper-message);line-height:var(--line-height-helper-message);-webkit-margin-after:0;margin-block-end:0;-webkit-margin-before:var(--spacing-margin-top-helper-message);margin-block-start:var(--spacing-margin-top-helper-message)}.pds-select__error-message{-ms-flex-align:center;align-items:center;color:var(--color-text-error);display:-ms-flexbox;display:flex;gap:var(--spacing-error-message)}.pds-select__message{grid-area:message}.pds-select__select-icon{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;grid-column:-1/-2;grid-row:2/3;height:2.5rem;pointer-events:none;position:relative;z-index:1}";
|
|
6
|
+
const PdsSelectStyle0 = pdsSelectCss;
|
|
7
|
+
|
|
8
|
+
const PdsSelect$1 = /*@__PURE__*/ proxyCustomElement(class PdsSelect extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.pdsSelectChange = createEvent(this, "pdsSelectChange", 7);
|
|
14
|
+
/**
|
|
15
|
+
* Emits an event on input change.
|
|
16
|
+
*/
|
|
17
|
+
this.onSelectUpdate = (e) => {
|
|
18
|
+
const target = e.target;
|
|
19
|
+
const values = Array.from(target.options)
|
|
20
|
+
.filter((option) => (option.selected))
|
|
21
|
+
.map((option) => (option.value));
|
|
22
|
+
if (values.length === 1 && !this.multiple) {
|
|
23
|
+
this.value = values[0];
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
this.value = values;
|
|
27
|
+
}
|
|
28
|
+
this.pdsSelectChange.emit(e);
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Handles the change event for the slot element.
|
|
32
|
+
* This method is triggered when the slot content changes.
|
|
33
|
+
* It updates the inner HTML of the select element by cloning and appending
|
|
34
|
+
* the assigned <option> elements from the slot.
|
|
35
|
+
*/
|
|
36
|
+
this.handleSlotChange = () => {
|
|
37
|
+
const slot = this.slotContainer.querySelector('slot');
|
|
38
|
+
this.selectEl.innerHTML = '';
|
|
39
|
+
const assignedElements = slot.assignedElements({ flatten: true });
|
|
40
|
+
assignedElements.forEach((item) => {
|
|
41
|
+
if (['OPTION', 'OPTGROUP'].includes(item.tagName)) {
|
|
42
|
+
const clonedItem = item.cloneNode(true);
|
|
43
|
+
if (clonedItem.tagName === 'OPTION' && clonedItem.value === this.value) {
|
|
44
|
+
clonedItem.selected = true;
|
|
45
|
+
}
|
|
46
|
+
this.selectEl.appendChild(clonedItem);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
this.updateSelectedOption();
|
|
50
|
+
};
|
|
51
|
+
this.autocomplete = undefined;
|
|
52
|
+
this.componentId = undefined;
|
|
53
|
+
this.disabled = false;
|
|
54
|
+
this.errorMessage = undefined;
|
|
55
|
+
this.helperMessage = undefined;
|
|
56
|
+
this.invalid = undefined;
|
|
57
|
+
this.label = undefined;
|
|
58
|
+
this.multiple = false;
|
|
59
|
+
this.name = undefined;
|
|
60
|
+
this.required = false;
|
|
61
|
+
this.value = undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Handles the change in the value of the select component.
|
|
65
|
+
* This method is called whenever the value of the select component changes.
|
|
66
|
+
* It updates the selected option accordingly.
|
|
67
|
+
*/
|
|
68
|
+
valueChanged() {
|
|
69
|
+
this.updateSelectedOption();
|
|
70
|
+
}
|
|
71
|
+
componentWillLoad() {
|
|
72
|
+
this.updateSelectedOption();
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Updates the selected option in the select element based on the current value.
|
|
76
|
+
*
|
|
77
|
+
* This method iterates through all the options of the select element and sets the
|
|
78
|
+
* 'selected' attribute on the option that matches the current value. If an option
|
|
79
|
+
* does not match the current value, the 'selected' attribute is removed.
|
|
80
|
+
*
|
|
81
|
+
* @private
|
|
82
|
+
* @returns {void}
|
|
83
|
+
*/
|
|
84
|
+
updateSelectedOption() {
|
|
85
|
+
if (this.selectEl) {
|
|
86
|
+
const options = this.selectEl.options;
|
|
87
|
+
// Update the selected attribute for all options.
|
|
88
|
+
Array.from(options).map((option) => {
|
|
89
|
+
if (Array.isArray(this.value)) {
|
|
90
|
+
option.selected = this.value.includes(option.value);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
option.selected = this.value === option.value;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
getHelperMessage() {
|
|
99
|
+
return this.helperMessage && (h("p", { class: "pds-select__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage));
|
|
100
|
+
}
|
|
101
|
+
getErrorMessage() {
|
|
102
|
+
return this.errorMessage && (h("p", { class: "pds-select__error-message", id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { name: "danger", size: "small" }), this.errorMessage));
|
|
103
|
+
}
|
|
104
|
+
renderMessages() {
|
|
105
|
+
if (!this.helperMessage && !this.errorMessage)
|
|
106
|
+
return null;
|
|
107
|
+
return (h("div", { class: "pds-select__message" }, this.getHelperMessage(), this.getErrorMessage()));
|
|
108
|
+
}
|
|
109
|
+
classNames() {
|
|
110
|
+
const classNames = [];
|
|
111
|
+
if (this.invalid) {
|
|
112
|
+
classNames.push('is-invalid');
|
|
113
|
+
}
|
|
114
|
+
if (this.disabled) {
|
|
115
|
+
classNames.push('is-disabled');
|
|
116
|
+
}
|
|
117
|
+
return classNames.join(' ');
|
|
118
|
+
}
|
|
119
|
+
render() {
|
|
120
|
+
return (h(Host, { key: 'f0baf957ee67ee9171a41fc4171e548b94d5c22c', "aria-disabled": this.disabled ? 'true' : null, class: this.classNames() }, h("div", { key: '88ef7c54afc654133d613c91c4bb3fbfe4a944b3', class: "pds-select" }, h(PdsLabel, { key: '7723f468412f6567e0d4fd236807e1ba2fdea16a', htmlFor: this.componentId, text: this.label }), h("select", { key: '1bdb1e22360972aa6cb77902d1288abfcc9dbf07', autocomplete: this.autocomplete || undefined, class: "pds-select__field", disabled: this.disabled, id: this.componentId, multiple: this.multiple, name: this.name, onChange: this.onSelectUpdate, required: this.required, ref: (el) => (this.selectEl = el) }), h("div", { key: 'ddbac1f772b335688d7eb219a7ea3a9ab4a3192a', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, h("slot", { key: 'aa6093fd8833fdf4860dd8127c32f95405679a11', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && h("pds-icon", { key: 'de8dc37035701942d8b2bcf56b40edf2f6de20df', class: "pds-select__select-icon", name: "enlarge" }))));
|
|
121
|
+
}
|
|
122
|
+
static get watchers() { return {
|
|
123
|
+
"value": ["valueChanged"]
|
|
124
|
+
}; }
|
|
125
|
+
static get style() { return PdsSelectStyle0; }
|
|
126
|
+
}, [1, "pds-select", {
|
|
127
|
+
"autocomplete": [1],
|
|
128
|
+
"componentId": [1, "component-id"],
|
|
129
|
+
"disabled": [4],
|
|
130
|
+
"errorMessage": [1, "error-message"],
|
|
131
|
+
"helperMessage": [1, "helper-message"],
|
|
132
|
+
"invalid": [4],
|
|
133
|
+
"label": [1],
|
|
134
|
+
"multiple": [4],
|
|
135
|
+
"name": [1],
|
|
136
|
+
"required": [4],
|
|
137
|
+
"value": [1025]
|
|
138
|
+
}, undefined, {
|
|
139
|
+
"value": ["valueChanged"]
|
|
140
|
+
}]);
|
|
141
|
+
function defineCustomElement$1() {
|
|
142
|
+
if (typeof customElements === "undefined") {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const components = ["pds-select", "pds-icon"];
|
|
146
|
+
components.forEach(tagName => { switch (tagName) {
|
|
147
|
+
case "pds-select":
|
|
148
|
+
if (!customElements.get(tagName)) {
|
|
149
|
+
customElements.define(tagName, PdsSelect$1);
|
|
150
|
+
}
|
|
151
|
+
break;
|
|
152
|
+
case "pds-icon":
|
|
153
|
+
if (!customElements.get(tagName)) {
|
|
154
|
+
defineCustomElement$2();
|
|
155
|
+
}
|
|
156
|
+
break;
|
|
157
|
+
} });
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const PdsSelect = PdsSelect$1;
|
|
161
|
+
const defineCustomElement = defineCustomElement$1;
|
|
162
|
+
|
|
163
|
+
export { PdsSelect, defineCustomElement };
|
|
164
|
+
|
|
165
|
+
//# sourceMappingURL=pds-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"pds-select.js","mappings":"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","names":["PdsSelect"],"sources":["src/components/pds-select/pds-select.scss?tag=pds-select&encapsulation=shadow","src/components/pds-select/pds-select.tsx"],"sourcesContent":[":host {\n --box-shadow-focus: 0 0 0 1px #ffffff, 0 0 0 3px var(--pine-color-purple-300);\n --box-shadow-focus-error: 0 0 0 1px #ffffff, 0 0 0 3px var(--pine-color-red-300);\n\n --color-background-disabled: var(--pine-color-grey-100);\n --color-background-error: var(--pine-color-red-050);\n --color-border-active: var(--pine-color-grey-400);\n --color-border-default: var(--pine-color-grey-300);\n --color-border-disabled: var(--pine-color-grey-200);\n --color-border-error: var(--pine-color-red-600);\n --color-border-hover: var(--pine-color-grey-500);\n --color-text-disabled: var(--pine-color-grey-600);\n --color-text-error: var(--pine-color-red-600);\n\n --font-size-helper-message: var(--pine-font-size-085);\n --font-size-select-field: var(--pine-font-size-100);\n --font-size-label: var(--pine-font-size-100);\n --font-weight-helper-message: var(--pine-font-weight-normal);\n --font-weight-select-field: var(--pine-font-weight-normal);\n --font-weight-label: var(--pine-font-weight-medium);\n\n --line-height-label: var(--pine-line-height-150);\n --line-height-helper-message: var(--pine-line-height-125);\n --line-height-select-field: var(--pine-line-height-150);\n\n --spacing-error-message: var(--pine-spacing-050);\n --spacing-field-padding-block: var(--pine-spacing-100);\n --spacing-label-margin-block-end: var(--pine-spacing-100);\n --spacing-margin-top-helper-message: var(--pine-spacing-100);\n --spacing-select-field-padding-inline: var(--pine-spacing-150);\n --spacing-select-field-icon-allowance: var(--pine-spacing-450);\n\n .hidden,\n :host([hidden]) {\n display: none;\n }\n}\n\n.pds-select {\n display: grid;\n flex-direction: column;\n grid-template-areas:\n 'label label'\n 'field field'\n 'message message';\n grid-template-columns: 1fr minmax(2rem, min-content);\n grid-template-rows: min-content min-content min-content;\n position: relative;\n width: 100%;\n}\n\nlabel {\n font-size: var(--font-size-label);\n font-weight: var(--font-weight-label);\n grid-area: label;\n line-height: var(--line-height-label);\n margin-block-end: var(--spacing-label-margin-block-end);\n}\n\nselect {\n appearance: none;\n border: 1px solid var(--color-border-default);\n border-radius: 10px;\n font-size: var(--font-size-select-field);\n font-weight: var(--font-weight-select-field);\n grid-area: field;\n line-height: var(--line-height-select-field);\n padding: var(--spacing-field-padding-block) var(--spacing-select-field-padding-inline);\n padding-right: var(--spacing-select-field-icon-allowance);\n position: relative;\n\n &:hover {\n border-color: var(--color-border-hover);\n cursor: pointer;\n }\n\n &:focus-visible {\n border-color: var(--color-border-active);\n box-shadow: var(--box-shadow-focus);\n outline: none;\n }\n\n &:disabled {\n background-color: var(--color-background-disabled);\n border-color: var(--color-border-disabled);\n color: var(--color-text-disabled);\n cursor: not-allowed;\n }\n\n &:has(~ .pds-select__message .pds-select__error-message) {\n background-color: var(--color-background-error);\n border-color: var(--color-border-error);\n\n &:focus-visible {\n box-shadow: var(--box-shadow-focus-error);\n outline: none;\n }\n }\n}\n\n:host(.is-invalid) {\n select {\n background-color: var(--color-background-error);\n border-color: var(--color-border-error);\n\n &:focus-visible {\n box-shadow: var(--box-shadow-focus-error);\n outline: none;\n }\n }\n}\n\n.pds-select__error-message,\n.pds-select__helper-message {\n font-size: var(--font-size-helper-message);\n font-weight: var(--font-weight-helper-message);\n line-height: var(--line-height-helper-message);\n margin-block-end: 0;\n margin-block-start: var(--spacing-margin-top-helper-message);\n}\n\n.pds-select__error-message {\n align-items: center;\n color: var(--color-text-error);\n display: flex;\n gap: var(--spacing-error-message);\n}\n\n.pds-select__message {\n grid-area: message;\n}\n\n.pds-select__select-icon {\n align-items: center;\n display: flex;\n grid-column: -1 / -2;\n grid-row: 2 / 3;\n height: 2.5rem;\n pointer-events: none;\n position: relative;\n z-index: 1;\n}\n","import { Component, Event, EventEmitter, Host, h, Prop, Watch } from '@stencil/core';\nimport { messageId } from '../../utils/form';\nimport { PdsLabel } from '../_internal/pds-label/pds-label';\n\n@Component({\n tag: 'pds-select',\n styleUrl: 'pds-select.scss',\n shadow: true,\n})\nexport class PdsSelect {\n\n private selectEl!: HTMLSelectElement;\n private slotContainer!: HTMLDivElement;\n\n /**\n * Specifies if and how the browser provides `autocomplete` assistance for the field.\n */\n @Prop() autocomplete: string;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Indicates whether or not the select field is disabled.\n * @defaultValue false\n */\n @Prop() disabled = false\n\n /**\n * Displays error message text describing an invalid state.\n */\n @Prop() errorMessage: string;\n\n /**\n * Displays helper message text below select.\n */\n @Prop() helperMessage: string;\n\n /**\n * Determines whether or not the select is invalid.\n */\n @Prop() invalid?: boolean;\n\n /**\n * Text to be displayed as the select label.\n */\n @Prop() label: string;\n\n /**\n * Indicates whether multiple options can be selected.\n * @defaultValue false\n */\n @Prop() multiple = false;\n\n /**\n * Specifies the name. Submitted with the form name/value pair.\n */\n @Prop() name!: string;\n\n /**\n * Indicates whether or not the select field is required.\n * @defaultValue false\n */\n @Prop() required = false;\n\n /**\n * The value(s) of the selected option(s).\n *\n */\n @Prop({ mutable: true }) value?: string | string[];\n\n /**\n * Emitted when a keyboard input occurs.\n */\n @Event() pdsSelectChange: EventEmitter<InputEvent>;\n\n @Watch('value')\n /**\n * Handles the change in the value of the select component.\n * This method is called whenever the value of the select component changes.\n * It updates the selected option accordingly.\n */\n valueChanged() {\n this.updateSelectedOption();\n }\n\n componentWillLoad() {\n this.updateSelectedOption();\n }\n\n /**\n * Updates the selected option in the select element based on the current value.\n *\n * This method iterates through all the options of the select element and sets the\n * 'selected' attribute on the option that matches the current value. If an option\n * does not match the current value, the 'selected' attribute is removed.\n *\n * @private\n * @returns {void}\n */\n private updateSelectedOption() {\n if (this.selectEl) {\n const options = this.selectEl.options;\n\n // Update the selected attribute for all options.\n Array.from(options).map((option: HTMLOptionElement) => {\n if (Array.isArray(this.value)) {\n option.selected = this.value.includes(option.value);\n } else {\n option.selected = this.value === option.value;\n }\n });\n };\n }\n\n /**\n * Emits an event on input change.\n */\n private onSelectUpdate = (e: Event) => {\n const target = e.target as HTMLSelectElement\n\n const values = Array.from(target.options)\n .filter((option) => ( option.selected))\n .map((option) => ( option.value));\n\n if (values.length === 1 && !this.multiple) {\n this.value = values[0];\n } else {\n this.value = values;\n }\n\n this.pdsSelectChange.emit(e as InputEvent);\n };\n\n /**\n * Handles the change event for the slot element.\n * This method is triggered when the slot content changes.\n * It updates the inner HTML of the select element by cloning and appending\n * the assigned <option> elements from the slot.\n */\n private handleSlotChange = () => {\n const slot = this.slotContainer.querySelector('slot') as HTMLSlotElement;\n\n this.selectEl.innerHTML = '';\n const assignedElements = slot.assignedElements({ flatten: true }) as (HTMLOptionElement | HTMLOptGroupElement)[];\n\n assignedElements.forEach((item) => {\n if ( ['OPTION', 'OPTGROUP'].includes(item.tagName)) {\n const clonedItem = item.cloneNode(true) as HTMLOptionElement | HTMLOptGroupElement;\n if (clonedItem.tagName === 'OPTION' && (clonedItem as HTMLOptionElement).value === this.value) {\n (clonedItem as HTMLOptionElement).selected = true;\n }\n this.selectEl.appendChild(clonedItem);\n }\n });\n\n this.updateSelectedOption();\n };\n\n private getHelperMessage() {\n return this.helperMessage && (\n <p class=\"pds-select__helper-message\" id={messageId(this.componentId, 'helper')}>\n {this.helperMessage}\n </p>\n );\n }\n\n private getErrorMessage() {\n return this.errorMessage && (\n <p class=\"pds-select__error-message\" id={messageId(this.componentId, 'error')} aria-live=\"assertive\">\n <pds-icon name=\"danger\" size=\"small\" />\n {this.errorMessage}\n </p>\n );\n }\n\n private renderMessages() {\n if (!this.helperMessage && !this.errorMessage) return null;\n\n return (\n <div class=\"pds-select__message\">\n {this.getHelperMessage()}\n {this.getErrorMessage()}\n </div>\n );\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.invalid) { classNames.push('is-invalid'); }\n if (this.disabled) { classNames.push('is-disabled'); }\n\n return classNames.join(' ');\n }\n\n render() {\n return (\n <Host aria-disabled={this.disabled ? 'true' : null} class={this.classNames()}>\n <div class=\"pds-select\">\n <PdsLabel htmlFor={this.componentId} text={this.label} />\n <select\n autocomplete={this.autocomplete || undefined}\n class=\"pds-select__field\"\n disabled={this.disabled}\n id={this.componentId}\n multiple={this.multiple}\n name={this.name}\n onChange={this.onSelectUpdate}\n required={this.required}\n ref={(el) => (this.selectEl = el as HTMLSelectElement)}\n ></select>\n <div aria-hidden=\"true\" class=\"hidden\" ref={(el) => (this.slotContainer = el)}>\n <slot onSlotchange={this.handleSlotChange}></slot>\n </div>\n {this.renderMessages()}\n {!this.multiple && <pds-icon class=\"pds-select__select-icon\" name=\"enlarge\" />}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -22,7 +22,7 @@ const PdsSortableItem$1 = /*@__PURE__*/ proxyCustomElement(class PdsSortableItem
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '53229fa4308319c59c520bdf84291fb738d6f7c2', class: "pds-sortable-item", id: this.componentId }, this.showHandle && (h("div", { key: '28a4a4fe6a946880e7501fd2a0697152f0665f4c', class: "pds-sortable-item__handle" }, h("pds-icon", { key: 'e45540e3787977b0861418455f6a0689cfcec887', icon: handle }))), h("slot", { key: 'bca5cbb3c4f5b4f1732030428660f5ae976cced0' }), this.enableActions && (h("div", { key: '2928a942128e4bbad4c869f42b59d10501af4419', class: "pds-sortable-item__actions" }, h("slot", { key: 'c2a4e2a47300f1c8f06a23ba134c436a591442bf', name: "sortable-item-actions" })))));
|
|
26
26
|
}
|
|
27
27
|
get el() { return this; }
|
|
28
28
|
static get style() { return PdsSortableItemStyle0; }
|
|
@@ -2694,7 +2694,7 @@ const PdsSortable$1 = /*@__PURE__*/ proxyCustomElement(class PdsSortable extends
|
|
|
2694
2694
|
Sortable.create(this.el, sortableOptions);
|
|
2695
2695
|
}
|
|
2696
2696
|
render() {
|
|
2697
|
-
return (h(Host, { key: '
|
|
2697
|
+
return (h(Host, { key: 'e215bbd858767d4c5e5e85bd12352e6a50b7d594', class: this.classNames(), id: this.componentId }, h("slot", { key: 'bd4a58c7ceb78432c77615987e16e979d7240eb4' })));
|
|
2698
2698
|
}
|
|
2699
2699
|
get el() { return this; }
|
|
2700
2700
|
static get style() { return PdsSortableStyle0 + PdsSortableStyle1; }
|
package/components/pds-switch.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { a as assignDescription, P as PdsLabel, m as messageId } from './pds-label.js';
|
|
3
|
+
import { b as danger } from './index2.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './pds-icon2.js';
|
|
3
5
|
|
|
4
6
|
const baseCss = ":where(*:not(slot),*:not(slot)::before,*:not(slot)::after){-webkit-box-sizing:border-box;box-sizing:border-box}:where(*:not(slot)){margin:0}:where(img,picture,video,canvas,svg){display:block;max-width:100%}:where(input,button,textarea,select){font:inherit}:where(p,h1,h2,h3,h4,h5,h6){overflow-wrap:break-word}:where(a:not([href]):not([class])){color:currentColor;text-decoration:none}:where(a:not([href]):not([class]):hover){color:currentColor;text-decoration:none}:where(ul[role=list],ol[role=list]){list-style:none}:where(table){border-collapse:collapse;border-spacing:0}:where(*:not(slot)){font:var(--pine-typography-body-md-default);letter-spacing:var(--pine-letter-spacing-body-md)}:where(h1,h2,h3,h4,h5,h6){font-family:var(--pine-font-family-heading);color:var(--pine-color-grey-950)}:where(h1){font:var(--pine-typography-heading-h1);letter-spacing:var(--pine-letter-spacing-heading-h1)}:where(h2){font:var(--pine-typography-heading-h2);letter-spacing:var(--pine-letter-spacing-heading-h2)}:where(h3){font:var(--pine-typography-heading-h3);letter-spacing:var(--pine-letter-spacing-heading-h3)}:where(h4){font:var(--pine-typography-heading-h4);letter-spacing:var(--pine-letter-spacing-heading-h4)}:where(h5){font:var(--pine-typography-heading-h5);letter-spacing:var(--pine-letter-spacing-heading-h5)}:where(h6){font:var(--pine-typography-heading-h6);letter-spacing:var(--pine-letter-spacing-heading-h6)}:where(div,label,p,span){color:var(--pine-color-text-default)}:where(code,kbd,pre,samp){font-family:monospace}:where([role=button]){cursor:pointer}:where(:focus){outline:0}:where(:focus-visible){outline:var(--pine-border-width-thick) solid var(--pine-color-purple-500)}:where([hidden]){display:none !important}";
|
|
5
7
|
const PdsSwitchStyle0 = baseCss;
|
|
6
8
|
|
|
7
|
-
const pdsSwitchCss = ":host{--border-radius-input:var(--pine-border-radius-200);--box-shadow-focus:0 0 0 1px #ffffff, 0 0 0 3px var(--color-outline-focus);--box-shadow-focus-error:0 0 0 1px #ffffff, 0 0 0 3px var(--color-outline-focus-error);--box-shadow-input-toggle:0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.08);--color-background-checked:var(--pine-color-purple-500);--color-background-checked-hover:var(--pine-color-purple-600);--color-background-error:var(--pine-color-red-500);--color-background-input-disabled:var(--pine-color-grey-200);--color-background-input-default:var(--pine-color-grey-300);--color-background-input-hover:var(--pine-color-grey-400);--color-input-toggle-default:var(--pine-color-white);--color-input-toggle-disabled:var(--pine-color-grey-100);--color-message-text:var(--pine-color-grey-700);--color-outline-focus:var(--pine-color-purple-300);--color-outline-focus-error:var(--pine-color-red-200);--color-text-default:var(--pine-color-grey-900);--color-text-disabled:var(--pine-color-grey-500);--color-text-error:var(--pine-color-red-500);--font-weight-label-default:var(--pine-font-weight-body-medium);--dimension-input-height:20px;--dimension-input-width:36px;--sizing-input-toggle-size:calc(var(--dimension-input-height) - (var(--spacing-input-toggle-offset) * 2));--spacing-label-gap-size:var(--pine-spacing-150);--spacing-input-toggle-offset:calc(var(--pine-spacing-050) / 2);--spacing-message-block:var(--pine-spacing-
|
|
9
|
+
const pdsSwitchCss = ":host{--border-radius-input:var(--pine-border-radius-200);--box-shadow-focus:0 0 0 1px #ffffff, 0 0 0 3px var(--color-outline-focus);--box-shadow-focus-error:0 0 0 1px #ffffff, 0 0 0 3px var(--color-outline-focus-error);--box-shadow-input-toggle:0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.08);--color-background-checked:var(--pine-color-purple-500);--color-background-checked-hover:var(--pine-color-purple-600);--color-background-error:var(--pine-color-red-500);--color-background-input-disabled:var(--pine-color-grey-200);--color-background-input-default:var(--pine-color-grey-300);--color-background-input-hover:var(--pine-color-grey-400);--color-input-toggle-default:var(--pine-color-white);--color-input-toggle-disabled:var(--pine-color-grey-100);--color-message-text:var(--pine-color-grey-700);--color-outline-focus:var(--pine-color-purple-300);--color-outline-focus-error:var(--pine-color-red-200);--color-text-default:var(--pine-color-grey-900);--color-text-disabled:var(--pine-color-grey-500);--color-text-error:var(--pine-color-red-500);--font-weight-label-default:var(--pine-font-weight-body-medium);--dimension-input-height:20px;--dimension-input-width:36px;--sizing-input-toggle-size:calc(var(--dimension-input-height) - (var(--spacing-input-toggle-offset) * 2));--spacing-label-gap-size:var(--pine-spacing-150);--spacing-input-toggle-offset:calc(var(--pine-spacing-050) / 2);--spacing-message-block:calc(var(--pine-spacing-150) / 2);--spacing-message-inline:calc(var(--dimension-input-width) + var(--spacing-label-gap-size));--number-transition-timing:0.15s ease-out;-ms-flex-align:start;align-items:flex-start;color:var(--color-text-default);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-margin-after:var(--pine-spacing-md);margin-block-end:var(--pine-spacing-md);position:relative}:host(.pds-switch--error){color:var(--color-text-error)}:host(.pds-switch--error) input,:host(.pds-switch--error) input:checked,:host(.pds-switch--error) input:hover:not(:disabled):not(:checked){background-color:var(--color-background-error)}:host(.pds-switch--error) input:focus-visible:not(:disabled):not(:checked){-webkit-box-shadow:var(--box-shadow-focus-error);box-shadow:var(--box-shadow-focus-error)}:host(.pds-switch--error) label{color:var(--color-text-error)}input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--color-background-input-default);border:0;border-radius:var(--border-radius-input);cursor:pointer;display:inline-block;height:var(--dimension-input-height);margin:0;padding:0;position:relative;-webkit-transition:var(--number-transition-timing);transition:var(--number-transition-timing);-webkit-transition-property:background, border, color;transition-property:background, border, color;width:var(--dimension-input-width)}input::after{background:var(--color-input-toggle-default);border-radius:50%;-webkit-box-shadow:var(--box-shadow-input-toggle);box-shadow:var(--box-shadow-input-toggle);content:\"\";display:block;height:var(--sizing-input-toggle-size);inset-block-start:50%;inset-inline-start:50%;position:absolute;-webkit-transform:translate3d(-100%, -50%, 0);transform:translate3d(-100%, -50%, 0);-webkit-transition:-webkit-transform var(--number-transition-timing);transition:-webkit-transform var(--number-transition-timing);transition:transform var(--number-transition-timing);transition:transform var(--number-transition-timing), -webkit-transform var(--number-transition-timing);width:var(--sizing-input-toggle-size)}label{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-positive:1;flex-grow:1;font-weight:var(--font-weight-label-default);-webkit-margin-start:var(--spacing-label-gap-size);margin-inline-start:var(--spacing-label-gap-size)}.pds-switch--error label{color:inherit}.pds-switch__message{color:var(--color-message-text);-ms-flex:1 0 100%;flex:1 0 100%;font-size:var(--pine-font-size-body-md);-webkit-margin-before:var(--spacing-message-block);margin-block-start:var(--spacing-message-block);-webkit-margin-start:var(--spacing-message-inline);margin-inline-start:var(--spacing-message-inline)}.pds-switch__message--error{-ms-flex-align:center;align-items:center;color:inherit;display:-ms-flexbox;display:flex;font-size:var(--pine-font-size-085);gap:var(--pine-spacing-050)}input:disabled{background-color:var(--color-background-input-disabled);cursor:not-allowed}input:disabled~label{color:var(--color-text-disabled);cursor:initial}input:disabled:hover::after{background-color:var(--color-input-toggle-disabled)}input:disabled .pds-switch__message{color:initial}input:hover:not(:disabled){background-color:var(--color-background-input-hover)}input:focus-visible:not(:disabled){-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}input:checked::after{-webkit-transform:translate3d(0, -50%, 0);transform:translate3d(0, -50%, 0)}input:checked:not(:disabled){background-color:currentColor;color:var(--color-background-checked)}input:checked:not(:disabled):hover{border-color:currentColor;color:var(--color-background-checked-hover)}";
|
|
8
10
|
const PdsSwitchStyle1 = pdsSwitchCss;
|
|
9
11
|
|
|
10
12
|
const PdsSwitch$1 = /*@__PURE__*/ proxyCustomElement(class PdsSwitch extends HTMLElement {
|
|
@@ -16,11 +18,10 @@ const PdsSwitch$1 = /*@__PURE__*/ proxyCustomElement(class PdsSwitch extends HTM
|
|
|
16
18
|
this.onSwitchUpdate = (e) => {
|
|
17
19
|
if (this.disabled)
|
|
18
20
|
return;
|
|
21
|
+
const input = e.target;
|
|
22
|
+
this.checked = input.checked;
|
|
19
23
|
this.pdsSwitchChange.emit(e);
|
|
20
24
|
};
|
|
21
|
-
/**
|
|
22
|
-
* Generate switch classes
|
|
23
|
-
*/
|
|
24
25
|
this.switchClassNames = () => {
|
|
25
26
|
let switchClasses = `pds-switch`;
|
|
26
27
|
if (this.invalid === true) {
|
|
@@ -40,19 +41,18 @@ const PdsSwitch$1 = /*@__PURE__*/ proxyCustomElement(class PdsSwitch extends HTM
|
|
|
40
41
|
this.label = undefined;
|
|
41
42
|
this.name = undefined;
|
|
42
43
|
this.required = false;
|
|
43
|
-
this.type = 'checkbox';
|
|
44
44
|
this.value = undefined;
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
|
-
return (h(Host, { key: '
|
|
48
|
-
h("div", { key: '
|
|
49
|
-
h("div", { key: '
|
|
47
|
+
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 &&
|
|
48
|
+
h("div", { key: 'bf29e672c126446faeca4bce2946294e816718f4', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
49
|
+
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)));
|
|
50
50
|
}
|
|
51
51
|
get el() { return this; }
|
|
52
52
|
static get style() { return PdsSwitchStyle0 + PdsSwitchStyle1; }
|
|
53
53
|
}, [1, "pds-switch", {
|
|
54
54
|
"componentId": [1, "component-id"],
|
|
55
|
-
"checked": [
|
|
55
|
+
"checked": [1028],
|
|
56
56
|
"disabled": [4],
|
|
57
57
|
"errorMessage": [1, "error-message"],
|
|
58
58
|
"helperMessage": [1, "helper-message"],
|
|
@@ -60,20 +60,24 @@ const PdsSwitch$1 = /*@__PURE__*/ proxyCustomElement(class PdsSwitch extends HTM
|
|
|
60
60
|
"label": [1],
|
|
61
61
|
"name": [1],
|
|
62
62
|
"required": [4],
|
|
63
|
-
"type": [1],
|
|
64
63
|
"value": [1]
|
|
65
64
|
}]);
|
|
66
65
|
function defineCustomElement$1() {
|
|
67
66
|
if (typeof customElements === "undefined") {
|
|
68
67
|
return;
|
|
69
68
|
}
|
|
70
|
-
const components = ["pds-switch"];
|
|
69
|
+
const components = ["pds-switch", "pds-icon"];
|
|
71
70
|
components.forEach(tagName => { switch (tagName) {
|
|
72
71
|
case "pds-switch":
|
|
73
72
|
if (!customElements.get(tagName)) {
|
|
74
73
|
customElements.define(tagName, PdsSwitch$1);
|
|
75
74
|
}
|
|
76
75
|
break;
|
|
76
|
+
case "pds-icon":
|
|
77
|
+
if (!customElements.get(tagName)) {
|
|
78
|
+
defineCustomElement$2();
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
77
81
|
} });
|
|
78
82
|
}
|
|
79
83
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pds-switch.js","mappings":";;;AAAA,MAAM,OAAO,GAAG,wrDAAwrD,CAAC;AACzsD,wBAAe,OAAO;;ACDtB,MAAM,YAAY,GAAG,w4JAAw4J,CAAC;AAC95J,wBAAe,YAAY;;MCQdA,WAAS;;;;;;QAgEZ,mBAAc,GAAG,CAAC,CAAQ;YAChC,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAC1B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAe,CAAC,CAAC;SAC5C,CAAC;;;;QAKM,qBAAgB,GAAG;YACzB,IAAI,aAAa,GAAG,YAAY,CAAC;YAEjC,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE;gBACzB,aAAa,IAAI,oBAAoB,CAAC;aACvC;YACD,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE;gBACpC,aAAa,IAAI,sBAAsB,CAAC;aACzC;YACD,OAAO,aAAa,CAAC;SACtB,CAAC;;uBAvEgB,KAAK;wBAKH,KAAK;;;uBAeN,KAAK;;;wBAeJ,KAAK;oBAMY,UAAU;;;IAgC/C,MAAM;QACJ,QACE,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,mBAAiB,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,IAAI,IAChF,kFACoB,iBAAiB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,kBACzE,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG,SAAS,EAC/C,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAC,mBAAmB,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,EAC9C,QAAQ,EAAE,IAAI,CAAC,cAAc,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,EACF,EAAC,QAAQ,qDAAC,UAAU,EAAC,mBAAmB,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,GAAI,EACvF,IAAI,CAAC,aAAa;YACjB,4DACE,KAAK,EAAE,qBAAqB,EAC5B,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,IAExC,IAAI,CAAC,aAAa,CACf,EAEP,IAAI,CAAC,YAAY;YAChB,4DACE,KAAK,EAAE,gDAAgD,EACvD,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,eAC9B,WAAW,IAEpB,IAAI,CAAC,YAAY,CACd,CAEH,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["PdsSwitch"],"sources":["src/global/styles/base.scss?tag=pds-switch&encapsulation=shadow","src/components/pds-switch/pds-switch.scss?tag=pds-switch&encapsulation=shadow","src/components/pds-switch/pds-switch.tsx"],"sourcesContent":["// TODO: replace core tokens with semantic\n// Heading color + outline\n\n/*\n Josh's Custom CSS Reset\n https://www.joshwcomeau.com/css/custom-css-reset/\n*/\n:where(*:not(slot), *:not(slot)::before, *:not(slot)::after) {\n box-sizing: border-box;\n}\n\n:where(*:not(slot)) {\n margin: 0;\n}\n\n:where(img, picture, video, canvas, svg) {\n display: block;\n max-width: 100%;\n}\n\n:where(input, button, textarea, select) {\n font: inherit;\n}\n\n:where(p, h1, h2, h3, h4, h5, h6) {\n overflow-wrap: break-word;\n}\n\n/*\n Additional Reset Styles\n*/\n:where(a:not([href]):not([class])) {\n color: currentColor;\n text-decoration: none;\n}\n\n:where(a:not([href]):not([class]):hover) {\n color: currentColor;\n text-decoration: none;\n}\n\n:where(ul[role='list'], ol[role='list']) {\n list-style: none;\n}\n\n:where(table) {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\n/*\n Mercury Base Styles\n*/\n// Typography\n:where(*:not(slot)) {\n font: var(--pine-typography-body-md-default);\n letter-spacing: var(--pine-letter-spacing-body-md);\n}\n\n:where(h1, h2, h3, h4, h5, h6) {\n font-family: var(--pine-font-family-heading);\n color: var(--pine-color-grey-950);\n}\n\n:where(h1) {\n font: var(--pine-typography-heading-h1);\n letter-spacing: var(--pine-letter-spacing-heading-h1);\n}\n\n:where(h2) {\n font: var(--pine-typography-heading-h2);\n letter-spacing: var(--pine-letter-spacing-heading-h2);\n}\n\n:where(h3) {\n font: var(--pine-typography-heading-h3);\n letter-spacing: var(--pine-letter-spacing-heading-h3);\n}\n\n:where(h4) {\n font: var(--pine-typography-heading-h4);\n letter-spacing: var(--pine-letter-spacing-heading-h4);\n}\n\n:where(h5) {\n font: var(--pine-typography-heading-h5);\n letter-spacing: var(--pine-letter-spacing-heading-h5);\n}\n\n:where(h6) {\n font: var(--pine-typography-heading-h6);\n letter-spacing: var(--pine-letter-spacing-heading-h6);\n}\n\n:where(div, label, p, span) {\n color: var(--pine-color-text-default);\n}\n\n:where(code, kbd, pre, samp) {\n font-family: monospace;\n}\n\n// Accessibility\n:where([role=\"button\"]) {\n cursor: pointer;\n}\n\n:where(:focus) {\n outline: 0;\n}\n\n:where(:focus-visible) {\n outline: var(--pine-border-width-thick) solid var(--pine-color-purple-500);\n}\n\n// Misc.\n:where([hidden]) {\n display: none !important;\n}\n",":host {\n --border-radius-input: var(--pine-border-radius-200);\n\n --box-shadow-focus: 0 0 0 1px #ffffff, 0 0 0 3px var(--color-outline-focus);\n --box-shadow-focus-error: 0 0 0 1px #ffffff, 0 0 0 3px var(--color-outline-focus-error);\n --box-shadow-input-toggle: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.08);\n\n --color-background-checked: var(--pine-color-purple-500);\n --color-background-checked-hover: var(--pine-color-purple-600);\n --color-background-error: var(--pine-color-red-500);\n --color-background-input-disabled: var(--pine-color-grey-200);\n --color-background-input-default: var(--pine-color-grey-300);\n --color-background-input-hover: var(--pine-color-grey-400);\n --color-input-toggle-default: var(--pine-color-white);\n --color-input-toggle-disabled: var(--pine-color-grey-100);\n --color-message-text: var(--pine-color-grey-700);\n --color-outline-focus: var(--pine-color-purple-300);\n --color-outline-focus-error: var(--pine-color-red-200);\n --color-text-default: var(--pine-color-grey-900);\n --color-text-disabled: var(--pine-color-grey-500);\n --color-text-error: var(--pine-color-red-500);\n\n --font-weight-label-default: var(--pine-font-weight-body-medium);\n\n --dimension-input-height: 20px;\n --dimension-input-width: 36px;\n\n --sizing-input-toggle-size: calc(var(--dimension-input-height) - (var(--spacing-input-toggle-offset) * 2));\n\n --spacing-label-gap-size: var(--pine-spacing-150);\n --spacing-input-toggle-offset: calc(var(--pine-spacing-050) / 2);\n --spacing-message-block: var(--pine-spacing-050);\n --spacing-message-inline: calc(var(--dimension-input-width) + var(--spacing-label-gap-size));\n\n --number-transition-timing: 0.15s ease-out;\n\n\n align-items: flex-start;\n color: var(--color-text-default);\n display: inline-flex;\n flex-flow: row wrap;\n margin-block-end: var(--pine-spacing-md);\n position: relative;\n}\n\n:host(.pds-switch--error) {\n color: var(--color-text-error);\n\n input,\n input:checked,\n input:hover:not(:disabled):not(:checked) {\n background-color: var(--color-background-error);\n }\n\n input:focus-visible:not(:disabled):not(:checked) {\n box-shadow: var(--box-shadow-focus-error);\n }\n}\n\n// switch container\ninput {\n appearance: none;\n background: var(--color-background-input-default);\n border: 0;\n border-radius: var(--border-radius-input);\n cursor: pointer;\n display: inline-block;\n height: var(--dimension-input-height);\n margin: 0;\n padding: 0;\n position: relative;\n transition: var(--number-transition-timing);\n transition-property: background, border, color;\n width: var(--dimension-input-width);\n\n // switch toggle\n &::after {\n background: var(--color-input-toggle-default);\n border-radius: 50%;\n box-shadow: var(--box-shadow-input-toggle);\n content: \"\";\n display: block;\n height: var(--sizing-input-toggle-size);\n inset-block-start: 50%;\n inset-inline-start: 50%;\n position: absolute;\n transform: translate3d(-100%, -50%, 0);\n transition: transform var(--number-transition-timing);\n width: var(--sizing-input-toggle-size);\n }\n}\n\nlabel {\n cursor: pointer;\n display: inline-flex;\n flex-grow: 1;\n font-weight: var(--font-weight-label-default);\n margin-inline-start: var(--spacing-label-gap-size);\n\n .pds-switch--error & {\n color: inherit;\n }\n}\n\n// Help and error messages\n.pds-switch__message {\n color: var(--color-message-text);\n flex: 1 0 100%;\n font-size: var(--pine-font-size-body-sm);\n line-height: var(--pine-line-height-sm);\n margin-inline-start: var(--spacing-message-inline);\n\n + .pds-switch__message {\n margin-block-start: var(--spacing-message-block);\n }\n}\n\n.pds-switch__message--error {\n color: inherit;\n}\n\n// Disabled state\ninput:disabled {\n background-color: var(--color-background-input-disabled);\n cursor: not-allowed;\n\n ~ label {\n color: var(--color-text-disabled);\n cursor: initial;\n }\n\n &:hover::after {\n background-color: var(--color-input-toggle-disabled);\n }\n\n .pds-switch__message {\n color: initial;\n }\n}\n\n// Hover state\ninput:hover:not(:disabled) {\n background-color: var(--color-background-input-hover);\n}\n\n // Focus state\ninput:focus-visible:not(:disabled) {\n box-shadow: var(--box-shadow-focus);\n outline: none;\n}\n\n// 'Checked' state\n// switch toggle\ninput:checked::after {\n transform: translate3d(0, -50%, 0);\n}\n\n// switch container\ninput:checked:not(:disabled) {\n background-color: currentColor;\n color: var(--color-background-checked);\n\n &:hover {\n border-color: currentColor;\n color: var(--color-background-checked-hover);\n }\n}\n","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';\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() 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 * Specifies the underlying input element type\n * @defaultValue 'checkbox'\n */\n @Prop() type: 'checkbox' | 'radio' = 'checkbox';\n\n /**\n * Provides input with a string submitted in form data, and can be used to distinguish radio inputs\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 this.pdsSwitchChange.emit(e as InputEvent);\n };\n\n /**\n * Generate switch classes\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={this.type}\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 {this.errorMessage}\n </div>\n }\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"pds-switch.js","mappings":";;;;;AAAA,MAAM,OAAO,GAAG,wrDAAwrD,CAAC;AACzsD,wBAAe,OAAO;;ACDtB,MAAM,YAAY,GAAG,ygKAAygK,CAAC;AAC/hK,wBAAe,YAAY;;MCSdA,WAAS;;;;;;QA0DZ,mBAAc,GAAG,CAAC,CAAQ;YAChC,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;SAC5C,CAAC;QAEM,qBAAgB,GAAG;YACzB,IAAI,aAAa,GAAG,YAAY,CAAC;YAEjC,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE;gBACzB,aAAa,IAAI,oBAAoB,CAAC;aACvC;YACD,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE;gBACpC,aAAa,IAAI,sBAAsB,CAAC;aACzC;YACD,OAAO,aAAa,CAAC;SACtB,CAAC;;uBAjEiC,KAAK;wBAKpB,KAAK;;;uBAeN,KAAK;;;wBAeJ,KAAK;;;IAgCzB,MAAM;QACJ,QACE,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,mBAAiB,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,IAAI,IAChF,kFACoB,iBAAiB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,kBACzE,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG,SAAS,EAC/C,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAC,mBAAmB,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,EAC9C,QAAQ,EAAE,IAAI,CAAC,cAAc,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,EACF,EAAC,QAAQ,qDAAC,UAAU,EAAC,mBAAmB,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,GAAI,EACvF,IAAI,CAAC,aAAa;YACjB,4DACE,KAAK,EAAE,qBAAqB,EAC5B,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,IAExC,IAAI,CAAC,aAAa,CACf,EAEP,IAAI,CAAC,YAAY;YAChB,4DACE,KAAK,EAAE,gDAAgD,EACvD,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,eAC9B,WAAW,IAErB,iEAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,GAAG,EACtC,IAAI,CAAC,YAAY,CACd,CAEH,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["PdsSwitch"],"sources":["src/global/styles/base.scss?tag=pds-switch&encapsulation=shadow","src/components/pds-switch/pds-switch.scss?tag=pds-switch&encapsulation=shadow","src/components/pds-switch/pds-switch.tsx"],"sourcesContent":["// TODO: replace core tokens with semantic\n// Heading color + outline\n\n/*\n Josh's Custom CSS Reset\n https://www.joshwcomeau.com/css/custom-css-reset/\n*/\n:where(*:not(slot), *:not(slot)::before, *:not(slot)::after) {\n box-sizing: border-box;\n}\n\n:where(*:not(slot)) {\n margin: 0;\n}\n\n:where(img, picture, video, canvas, svg) {\n display: block;\n max-width: 100%;\n}\n\n:where(input, button, textarea, select) {\n font: inherit;\n}\n\n:where(p, h1, h2, h3, h4, h5, h6) {\n overflow-wrap: break-word;\n}\n\n/*\n Additional Reset Styles\n*/\n:where(a:not([href]):not([class])) {\n color: currentColor;\n text-decoration: none;\n}\n\n:where(a:not([href]):not([class]):hover) {\n color: currentColor;\n text-decoration: none;\n}\n\n:where(ul[role='list'], ol[role='list']) {\n list-style: none;\n}\n\n:where(table) {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\n/*\n Mercury Base Styles\n*/\n// Typography\n:where(*:not(slot)) {\n font: var(--pine-typography-body-md-default);\n letter-spacing: var(--pine-letter-spacing-body-md);\n}\n\n:where(h1, h2, h3, h4, h5, h6) {\n font-family: var(--pine-font-family-heading);\n color: var(--pine-color-grey-950);\n}\n\n:where(h1) {\n font: var(--pine-typography-heading-h1);\n letter-spacing: var(--pine-letter-spacing-heading-h1);\n}\n\n:where(h2) {\n font: var(--pine-typography-heading-h2);\n letter-spacing: var(--pine-letter-spacing-heading-h2);\n}\n\n:where(h3) {\n font: var(--pine-typography-heading-h3);\n letter-spacing: var(--pine-letter-spacing-heading-h3);\n}\n\n:where(h4) {\n font: var(--pine-typography-heading-h4);\n letter-spacing: var(--pine-letter-spacing-heading-h4);\n}\n\n:where(h5) {\n font: var(--pine-typography-heading-h5);\n letter-spacing: var(--pine-letter-spacing-heading-h5);\n}\n\n:where(h6) {\n font: var(--pine-typography-heading-h6);\n letter-spacing: var(--pine-letter-spacing-heading-h6);\n}\n\n:where(div, label, p, span) {\n color: var(--pine-color-text-default);\n}\n\n:where(code, kbd, pre, samp) {\n font-family: monospace;\n}\n\n// Accessibility\n:where([role=\"button\"]) {\n cursor: pointer;\n}\n\n:where(:focus) {\n outline: 0;\n}\n\n:where(:focus-visible) {\n outline: var(--pine-border-width-thick) solid var(--pine-color-purple-500);\n}\n\n// Misc.\n:where([hidden]) {\n display: none !important;\n}\n",":host {\n --border-radius-input: var(--pine-border-radius-200);\n\n --box-shadow-focus: 0 0 0 1px #ffffff, 0 0 0 3px var(--color-outline-focus);\n --box-shadow-focus-error: 0 0 0 1px #ffffff, 0 0 0 3px var(--color-outline-focus-error);\n --box-shadow-input-toggle: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.08);\n\n --color-background-checked: var(--pine-color-purple-500);\n --color-background-checked-hover: var(--pine-color-purple-600);\n --color-background-error: var(--pine-color-red-500);\n --color-background-input-disabled: var(--pine-color-grey-200);\n --color-background-input-default: var(--pine-color-grey-300);\n --color-background-input-hover: var(--pine-color-grey-400);\n --color-input-toggle-default: var(--pine-color-white);\n --color-input-toggle-disabled: var(--pine-color-grey-100);\n --color-message-text: var(--pine-color-grey-700);\n --color-outline-focus: var(--pine-color-purple-300);\n --color-outline-focus-error: var(--pine-color-red-200);\n --color-text-default: var(--pine-color-grey-900);\n --color-text-disabled: var(--pine-color-grey-500);\n --color-text-error: var(--pine-color-red-500);\n\n --font-weight-label-default: var(--pine-font-weight-body-medium);\n\n --dimension-input-height: 20px;\n --dimension-input-width: 36px;\n\n --sizing-input-toggle-size: calc(var(--dimension-input-height) - (var(--spacing-input-toggle-offset) * 2));\n\n --spacing-label-gap-size: var(--pine-spacing-150);\n --spacing-input-toggle-offset: calc(var(--pine-spacing-050) / 2);\n --spacing-message-block: calc(var(--pine-spacing-150) / 2);\n --spacing-message-inline: calc(var(--dimension-input-width) + var(--spacing-label-gap-size));\n\n --number-transition-timing: 0.15s ease-out;\n\n\n align-items: flex-start;\n color: var(--color-text-default);\n display: inline-flex;\n flex-flow: row wrap;\n margin-block-end: var(--pine-spacing-md);\n position: relative;\n}\n\n:host(.pds-switch--error) {\n color: var(--color-text-error);\n\n input,\n input:checked,\n input:hover:not(:disabled):not(:checked) {\n background-color: var(--color-background-error);\n }\n\n input:focus-visible:not(:disabled):not(:checked) {\n box-shadow: var(--box-shadow-focus-error);\n }\n\n label {\n color: var(--color-text-error);\n }\n}\n\n// switch container\ninput {\n appearance: none;\n background: var(--color-background-input-default);\n border: 0;\n border-radius: var(--border-radius-input);\n cursor: pointer;\n display: inline-block;\n height: var(--dimension-input-height);\n margin: 0;\n padding: 0;\n position: relative;\n transition: var(--number-transition-timing);\n transition-property: background, border, color;\n width: var(--dimension-input-width);\n\n // switch toggle\n &::after {\n background: var(--color-input-toggle-default);\n border-radius: 50%;\n box-shadow: var(--box-shadow-input-toggle);\n content: \"\";\n display: block;\n height: var(--sizing-input-toggle-size);\n inset-block-start: 50%;\n inset-inline-start: 50%;\n position: absolute;\n transform: translate3d(-100%, -50%, 0);\n transition: transform var(--number-transition-timing);\n width: var(--sizing-input-toggle-size);\n }\n}\n\nlabel {\n cursor: pointer;\n display: inline-flex;\n flex-grow: 1;\n font-weight: var(--font-weight-label-default);\n margin-inline-start: var(--spacing-label-gap-size);\n\n .pds-switch--error & {\n color: inherit;\n }\n}\n\n// Help and error messages\n.pds-switch__message {\n color: var(--color-message-text);\n flex: 1 0 100%;\n font-size: var(--pine-font-size-body-md);\n margin-block-start: var(--spacing-message-block);\n margin-inline-start: var(--spacing-message-inline);\n}\n\n.pds-switch__message--error {\n align-items: center;\n color: inherit;\n display: flex;\n font-size: var(--pine-font-size-085);\n gap: var(--pine-spacing-050);\n}\n\n// Disabled state\ninput:disabled {\n background-color: var(--color-background-input-disabled);\n cursor: not-allowed;\n\n ~ label {\n color: var(--color-text-disabled);\n cursor: initial;\n }\n\n &:hover::after {\n background-color: var(--color-input-toggle-disabled);\n }\n\n .pds-switch__message {\n color: initial;\n }\n}\n\n// Hover state\ninput:hover:not(:disabled) {\n background-color: var(--color-background-input-hover);\n}\n\n // Focus state\ninput:focus-visible:not(:disabled) {\n box-shadow: var(--box-shadow-focus);\n outline: none;\n}\n\n// 'Checked' state\n// switch toggle\ninput:checked::after {\n transform: translate3d(0, -50%, 0);\n}\n\n// switch container\ninput:checked:not(:disabled) {\n background-color: currentColor;\n color: var(--color-background-checked);\n\n &:hover {\n border-color: currentColor;\n color: var(--color-background-checked-hover);\n }\n}\n","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"],"version":3}
|
package/components/pds-tab.js
CHANGED
|
@@ -18,9 +18,9 @@ const PdsTab$1 = /*@__PURE__*/ proxyCustomElement(class PdsTab extends HTMLEleme
|
|
|
18
18
|
this.pdsTabClick.emit([index, parentComponentId]);
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
const availabilityTabEdgeInlineStart = (h("span", { key: '
|
|
22
|
-
const availabilityTabEdgeInlineEnd = (h("span", { key: '
|
|
23
|
-
return (h(Host, { key: '
|
|
21
|
+
const availabilityTabEdgeInlineStart = (h("span", { key: 'd98a922aaa1b9a6023830badc391c3d1d615ec6a', class: "pds-tab-edge", role: "presentation" }));
|
|
22
|
+
const availabilityTabEdgeInlineEnd = (h("span", { key: '390da28bb3fd9ab1fa2fddda45569e92d4547fa3', class: "pds-tab-edge pds-tab-edge--end", role: "presentation" }));
|
|
23
|
+
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' })))));
|
|
24
24
|
}
|
|
25
25
|
get el() { return this; }
|
|
26
26
|
static get style() { return PdsTabStyle0; }
|
|
@@ -13,7 +13,7 @@ const PdsTableBody$1 = /*@__PURE__*/ proxyCustomElement(class PdsTableBody exten
|
|
|
13
13
|
this.__attachShadow();
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: '2e51c5074e6dca980f24db2f91c66260da53dc57', role: "rowgroup" }, h("slot", { key: 'cec8f94525798f338ef13d8788c862fb6fd699a6' })));
|
|
17
17
|
}
|
|
18
18
|
static get style() { return PdsTableBodyStyle0 + PdsTableBodyStyle1; }
|
|
19
19
|
}, [1, "pds-table-body"]);
|
|
@@ -44,11 +44,11 @@ const PdsTableCell = /*@__PURE__*/ proxyCustomElement(class PdsTableCell extends
|
|
|
44
44
|
return classNames.join(' ');
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: '6481354cb8cd0e573effa15334f0547818cee0fc', class: this.classNames(), role: "gridcell", style: this.tableRef &&
|
|
48
48
|
this.tableRef.fixedColumn &&
|
|
49
49
|
this.tableRef.selectable
|
|
50
50
|
? { '--fixed-cell-position': '40px' }
|
|
51
|
-
: {} }, h("slot", { key: '
|
|
51
|
+
: {} }, h("slot", { key: 'dc48c3d504c2879faf940756bc42f5570f510a5b' })));
|
|
52
52
|
}
|
|
53
53
|
get hostElement() { return this; }
|
|
54
54
|
static get style() { return PdsTableCellStyle0 + PdsTableCellStyle1; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { f as upSmall, d as downSmall } from './index2.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './pds-icon2.js';
|
|
4
4
|
|
|
5
5
|
const baseCss = ":where(*:not(slot),*:not(slot)::before,*:not(slot)::after){-webkit-box-sizing:border-box;box-sizing:border-box}:where(*:not(slot)){margin:0}:where(img,picture,video,canvas,svg){display:block;max-width:100%}:where(input,button,textarea,select){font:inherit}:where(p,h1,h2,h3,h4,h5,h6){overflow-wrap:break-word}:where(a:not([href]):not([class])){color:currentColor;text-decoration:none}:where(a:not([href]):not([class]):hover){color:currentColor;text-decoration:none}:where(ul[role=list],ol[role=list]){list-style:none}:where(table){border-collapse:collapse;border-spacing:0}:where(*:not(slot)){font:var(--pine-typography-body-md-default);letter-spacing:var(--pine-letter-spacing-body-md)}:where(h1,h2,h3,h4,h5,h6){font-family:var(--pine-font-family-heading);color:var(--pine-color-grey-950)}:where(h1){font:var(--pine-typography-heading-h1);letter-spacing:var(--pine-letter-spacing-heading-h1)}:where(h2){font:var(--pine-typography-heading-h2);letter-spacing:var(--pine-letter-spacing-heading-h2)}:where(h3){font:var(--pine-typography-heading-h3);letter-spacing:var(--pine-letter-spacing-heading-h3)}:where(h4){font:var(--pine-typography-heading-h4);letter-spacing:var(--pine-letter-spacing-heading-h4)}:where(h5){font:var(--pine-typography-heading-h5);letter-spacing:var(--pine-letter-spacing-heading-h5)}:where(h6){font:var(--pine-typography-heading-h6);letter-spacing:var(--pine-letter-spacing-heading-h6)}:where(div,label,p,span){color:var(--pine-color-text-default)}:where(code,kbd,pre,samp){font-family:monospace}:where([role=button]){cursor:pointer}:where(:focus){outline:0}:where(:focus-visible){outline:var(--pine-border-width-thick) solid var(--pine-color-purple-500)}:where([hidden]){display:none !important}";
|
|
@@ -63,11 +63,11 @@ const PdsTableHeadCell = /*@__PURE__*/ proxyCustomElement(class PdsTableHeadCell
|
|
|
63
63
|
return classNames.join(' ');
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
|
-
return (h(Host, { key: '
|
|
66
|
+
return (h(Host, { key: 'c31e07c91b395e25893316405bfbb7473621ad5c', class: this.classNames(), role: "columnheader", onClick: this.toggleSort, style: this.tableRef &&
|
|
67
67
|
this.tableRef.fixedColumn &&
|
|
68
68
|
this.tableRef.selectable
|
|
69
69
|
? { '--fixed-cell-position': '40px' }
|
|
70
|
-
: {} }, h("slot", { key: '
|
|
70
|
+
: {} }, h("slot", { key: '0c8d8173377d7062531a6ddbca90fa097ffae1bb' }), this.sortable && (h("pds-icon", { key: '52750dafc29ad4af2ce89a5ca2e44e0a261aecac', icon: this.sortingDirection === 'asc' ? upSmall : downSmall }))));
|
|
71
71
|
}
|
|
72
72
|
get hostElement() { return this; }
|
|
73
73
|
static get style() { return PdsTableHeadCellStyle0 + PdsTableHeadCellStyle1; }
|
|
@@ -48,7 +48,7 @@ const PdsTableHead$1 = /*@__PURE__*/ proxyCustomElement(class PdsTableHead exten
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: '72c72994423440827b905aa1702741e534204e02', role: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-head-cell", { key: 'e46c49148956d51ce155587f711699fa49c4fc6f', part: this.tableRef.selectable ? 'checkbox-cell' : '' }, h("pds-checkbox", { key: 'c7343bdd9e32d861f9647e893ecb73b7b6176ebc', componentId: this.generateUniqueId(), indeterminate: this.indeterminate, onInput: this.handleInput, label: "Select All Rows", labelHidden: true, checked: this.isSelected }))), h("slot", { key: 'b43b9a1bf3384a0e635e57732d91202bbc0d01e2' })));
|
|
52
52
|
}
|
|
53
53
|
get hostElement() { return this; }
|
|
54
54
|
static get style() { return PdsTableHeadStyle0 + PdsTableHeadStyle1; }
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as closest } from './closest.js';
|
|
3
|
-
import { d as defineCustomElement$
|
|
3
|
+
import { d as defineCustomElement$4 } from './pds-checkbox2.js';
|
|
4
|
+
import { d as defineCustomElement$3 } from './pds-icon2.js';
|
|
4
5
|
import { d as defineCustomElement$2 } from './pds-table-cell2.js';
|
|
5
6
|
|
|
6
7
|
const baseCss = ":where(*:not(slot),*:not(slot)::before,*:not(slot)::after){-webkit-box-sizing:border-box;box-sizing:border-box}:where(*:not(slot)){margin:0}:where(img,picture,video,canvas,svg){display:block;max-width:100%}:where(input,button,textarea,select){font:inherit}:where(p,h1,h2,h3,h4,h5,h6){overflow-wrap:break-word}:where(a:not([href]):not([class])){color:currentColor;text-decoration:none}:where(a:not([href]):not([class]):hover){color:currentColor;text-decoration:none}:where(ul[role=list],ol[role=list]){list-style:none}:where(table){border-collapse:collapse;border-spacing:0}:where(*:not(slot)){font:var(--pine-typography-body-md-default);letter-spacing:var(--pine-letter-spacing-body-md)}:where(h1,h2,h3,h4,h5,h6){font-family:var(--pine-font-family-heading);color:var(--pine-color-grey-950)}:where(h1){font:var(--pine-typography-heading-h1);letter-spacing:var(--pine-letter-spacing-heading-h1)}:where(h2){font:var(--pine-typography-heading-h2);letter-spacing:var(--pine-letter-spacing-heading-h2)}:where(h3){font:var(--pine-typography-heading-h3);letter-spacing:var(--pine-letter-spacing-heading-h3)}:where(h4){font:var(--pine-typography-heading-h4);letter-spacing:var(--pine-letter-spacing-heading-h4)}:where(h5){font:var(--pine-typography-heading-h5);letter-spacing:var(--pine-letter-spacing-heading-h5)}:where(h6){font:var(--pine-typography-heading-h6);letter-spacing:var(--pine-letter-spacing-heading-h6)}:where(div,label,p,span){color:var(--pine-color-text-default)}:where(code,kbd,pre,samp){font-family:monospace}:where([role=button]){cursor:pointer}:where(:focus){outline:0}:where(:focus-visible){outline:var(--pine-border-width-thick) solid var(--pine-color-purple-500)}:where([hidden]){display:none !important}";
|
|
@@ -58,7 +59,7 @@ const PdsTableRow$1 = /*@__PURE__*/ proxyCustomElement(class PdsTableRow extends
|
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
render() {
|
|
61
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: '510501e1d6c567394bfaba09ac44bb9455a169a1', class: this.classNames(), role: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-cell", { key: '14105fd6283f92b9158138bc2da1623b24b7796f', part: this.tableRef.fixedColumn ? 'checkbox-cell' : '', class: this.tableRef.selectable ? 'has-checkbox' : '' }, h("pds-checkbox", { key: 'a70e4fb1a7a08d4126a63328fd75970b4a637f76', componentId: this.generateUniqueId(), onClick: this.handleClick, indeterminate: this.indeterminate, label: "Select Row", labelHidden: true, checked: this.isSelected }))), h("slot", { key: '5deb2da8405d0792a43531695ece38afe8fda9b4' })));
|
|
62
63
|
}
|
|
63
64
|
get hostElement() { return this; }
|
|
64
65
|
static get style() { return PdsTableRowStyle0 + PdsTableRowStyle1; }
|
|
@@ -70,7 +71,7 @@ function defineCustomElement$1() {
|
|
|
70
71
|
if (typeof customElements === "undefined") {
|
|
71
72
|
return;
|
|
72
73
|
}
|
|
73
|
-
const components = ["pds-table-row", "pds-checkbox", "pds-table-cell"];
|
|
74
|
+
const components = ["pds-table-row", "pds-checkbox", "pds-icon", "pds-table-cell"];
|
|
74
75
|
components.forEach(tagName => { switch (tagName) {
|
|
75
76
|
case "pds-table-row":
|
|
76
77
|
if (!customElements.get(tagName)) {
|
|
@@ -78,6 +79,11 @@ function defineCustomElement$1() {
|
|
|
78
79
|
}
|
|
79
80
|
break;
|
|
80
81
|
case "pds-checkbox":
|
|
82
|
+
if (!customElements.get(tagName)) {
|
|
83
|
+
defineCustomElement$4();
|
|
84
|
+
}
|
|
85
|
+
break;
|
|
86
|
+
case "pds-icon":
|
|
81
87
|
if (!customElements.get(tagName)) {
|
|
82
88
|
defineCustomElement$3();
|
|
83
89
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pds-table-row.js","mappings":"
|
|
1
|
+
{"file":"pds-table-row.js","mappings":"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","names":["PdsTableRow"],"sources":["src/global/styles/base.scss?tag=pds-table-row&encapsulation=shadow","src/components/pds-table/pds-table-row/pds-table-row.scss?tag=pds-table-row&encapsulation=shadow","src/components/pds-table/pds-table-row/pds-table-row.tsx"],"sourcesContent":["// TODO: replace core tokens with semantic\n// Heading color + outline\n\n/*\n Josh's Custom CSS Reset\n https://www.joshwcomeau.com/css/custom-css-reset/\n*/\n:where(*:not(slot), *:not(slot)::before, *:not(slot)::after) {\n box-sizing: border-box;\n}\n\n:where(*:not(slot)) {\n margin: 0;\n}\n\n:where(img, picture, video, canvas, svg) {\n display: block;\n max-width: 100%;\n}\n\n:where(input, button, textarea, select) {\n font: inherit;\n}\n\n:where(p, h1, h2, h3, h4, h5, h6) {\n overflow-wrap: break-word;\n}\n\n/*\n Additional Reset Styles\n*/\n:where(a:not([href]):not([class])) {\n color: currentColor;\n text-decoration: none;\n}\n\n:where(a:not([href]):not([class]):hover) {\n color: currentColor;\n text-decoration: none;\n}\n\n:where(ul[role='list'], ol[role='list']) {\n list-style: none;\n}\n\n:where(table) {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\n/*\n Mercury Base Styles\n*/\n// Typography\n:where(*:not(slot)) {\n font: var(--pine-typography-body-md-default);\n letter-spacing: var(--pine-letter-spacing-body-md);\n}\n\n:where(h1, h2, h3, h4, h5, h6) {\n font-family: var(--pine-font-family-heading);\n color: var(--pine-color-grey-950);\n}\n\n:where(h1) {\n font: var(--pine-typography-heading-h1);\n letter-spacing: var(--pine-letter-spacing-heading-h1);\n}\n\n:where(h2) {\n font: var(--pine-typography-heading-h2);\n letter-spacing: var(--pine-letter-spacing-heading-h2);\n}\n\n:where(h3) {\n font: var(--pine-typography-heading-h3);\n letter-spacing: var(--pine-letter-spacing-heading-h3);\n}\n\n:where(h4) {\n font: var(--pine-typography-heading-h4);\n letter-spacing: var(--pine-letter-spacing-heading-h4);\n}\n\n:where(h5) {\n font: var(--pine-typography-heading-h5);\n letter-spacing: var(--pine-letter-spacing-heading-h5);\n}\n\n:where(h6) {\n font: var(--pine-typography-heading-h6);\n letter-spacing: var(--pine-letter-spacing-heading-h6);\n}\n\n:where(div, label, p, span) {\n color: var(--pine-color-text-default);\n}\n\n:where(code, kbd, pre, samp) {\n font-family: monospace;\n}\n\n// Accessibility\n:where([role=\"button\"]) {\n cursor: pointer;\n}\n\n:where(:focus) {\n outline: 0;\n}\n\n:where(:focus-visible) {\n outline: var(--pine-border-width-thick) solid var(--pine-color-purple-500);\n}\n\n// Misc.\n:where([hidden]) {\n display: none !important;\n}\n",":host {\n --color-background-fixed: var(--pine-color-white);\n --color-background-interactive: var(--pine-color-grey-200);\n\n border-color: inherit;\n display: table-row;\n vertical-align: inherit;\n\n // used for pds-checkbox-cell\n // because it is in the ShadowDom\n &::part(checkbox-cell) {\n background-color: var(--color-background-fixed);\n left: 0;\n position: sticky;\n z-index: 1;\n }\n}\n\n:host(:hover),\n:host(:hover)::part(checkbox-cell),\n:host(:hover) ::slotted(pds-table-cell),\n:host(.is-selected),\n:host(.is-selected)::part(checkbox-cell),\n:host(.is-selected) ::slotted(pds-table-cell) {\n background: var(--color-background-interactive);\n}\n","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 * Indicates that the selection state is indeterminate.\n * */\n @Prop({ mutable: true }) indeterminate?: boolean\n\n /**\n * A local state to track whether the 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"],"version":3}
|
package/components/pds-table.js
CHANGED
|
@@ -92,7 +92,7 @@ const PdsTable$1 = /*@__PURE__*/ proxyCustomElement(class PdsTable extends HTMLE
|
|
|
92
92
|
headerCheckbox.indeterminate = !allSelectedRows && !noneSelectedRows;
|
|
93
93
|
}
|
|
94
94
|
render() {
|
|
95
|
-
return (h(Host, { key: '
|
|
95
|
+
return (h(Host, { key: 'b7cdce58b3d301540458b9d6763373be0f253346', class: this.classNames(), id: this.componentId, role: "grid", selectable: this.selectable, tabindex: "0" }, h("slot", { key: '780c60ee86ff522719a837b3c8f2a6e47fa00094' })));
|
|
96
96
|
}
|
|
97
97
|
get el() { return this; }
|
|
98
98
|
static get style() { return PdsTableStyle0 + PdsTableStyle1; }
|
|
@@ -13,7 +13,7 @@ const PdsTabpanel$1 = /*@__PURE__*/ proxyCustomElement(class PdsTabpanel extends
|
|
|
13
13
|
this.selected = false;
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
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' }))));
|
|
17
17
|
}
|
|
18
18
|
get el() { return this; }
|
|
19
19
|
static get style() { return PdsTabpanelStyle0; }
|
package/components/pds-tabs.js
CHANGED
|
@@ -89,7 +89,7 @@ const PdsTabs$1 = /*@__PURE__*/ proxyCustomElement(class PdsTabs extends HTMLEle
|
|
|
89
89
|
this.passPropsToChildren();
|
|
90
90
|
}
|
|
91
91
|
render() {
|
|
92
|
-
return (h(Host, { key: '
|
|
92
|
+
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" })));
|
|
93
93
|
}
|
|
94
94
|
get el() { return this; }
|
|
95
95
|
static get style() { return PdsTabsStyle0 + PdsTabsStyle1; }
|