@pine-ds/core 2.16.1 → 2.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/index2.js +2 -2
- package/components/index2.js.map +1 -1
- package/components/pds-accordion.js +1 -1
- package/components/pds-accordion.js.map +1 -1
- package/components/pds-box.js +1 -1
- package/components/pds-box.js.map +1 -1
- package/components/pds-button2.js +25 -5
- package/components/pds-button2.js.map +1 -1
- package/components/pds-checkbox2.js +9 -6
- package/components/pds-checkbox2.js.map +1 -1
- package/components/pds-chip.js +1 -1
- package/components/pds-copytext.js +11 -5
- package/components/pds-copytext.js.map +1 -1
- package/components/pds-divider.js +1 -1
- package/components/pds-image.js +2 -2
- package/components/pds-input.js +12 -5
- package/components/pds-input.js.map +1 -1
- package/components/pds-link.js +2 -2
- package/components/pds-loader.js +1 -61
- package/components/pds-loader.js.map +1 -1
- package/components/pds-loader2.js +65 -0
- package/components/pds-loader2.js.map +1 -0
- package/components/pds-popover.js +1 -1
- package/components/pds-progress.js +1 -1
- package/components/pds-radio.js +9 -6
- package/components/pds-radio.js.map +1 -1
- package/components/pds-row.js +1 -1
- package/components/pds-select.js +10 -4
- package/components/pds-select.js.map +1 -1
- package/components/pds-sortable-item.js +1 -1
- package/components/pds-sortable.js +1 -1
- package/components/pds-switch.js +9 -6
- 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 +2 -2
- package/components/pds-table-head.js +1 -1
- package/components/pds-table-row.js +1 -1
- package/components/pds-table.js +1 -1
- package/components/pds-tabpanel.js +1 -1
- package/components/pds-tabs.js +1 -1
- package/components/pds-text.js +1 -1
- package/components/pds-textarea.js +6 -6
- package/components/pds-textarea.js.map +1 -1
- package/components/pds-tooltip.js +2 -2
- package/dist/cjs/{index-034a8bb0.js → index-59b0d7e2.js} +3 -3
- package/dist/cjs/index-59b0d7e2.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pds-accordion.cjs.entry.js +2 -2
- package/dist/cjs/pds-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-avatar.cjs.entry.js +1 -1
- package/dist/cjs/pds-box.cjs.entry.js +1 -1
- package/dist/cjs/pds-box.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-button.cjs.entry.js +16 -4
- package/dist/cjs/pds-button.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-checkbox.cjs.entry.js +10 -7
- package/dist/cjs/pds-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-chip.cjs.entry.js +2 -2
- package/dist/cjs/pds-copytext.cjs.entry.js +2 -2
- package/dist/cjs/pds-divider.cjs.entry.js +1 -1
- package/dist/cjs/pds-image.cjs.entry.js +2 -2
- package/dist/cjs/pds-input.cjs.entry.js +13 -6
- package/dist/cjs/pds-input.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-link.cjs.entry.js +3 -3
- package/dist/cjs/pds-loader.cjs.entry.js +2 -2
- package/dist/cjs/pds-loader.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-popover.cjs.entry.js +1 -1
- package/dist/cjs/pds-progress.cjs.entry.js +1 -1
- package/dist/cjs/pds-radio.cjs.entry.js +10 -7
- package/dist/cjs/pds-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-row.cjs.entry.js +1 -1
- package/dist/cjs/pds-select.cjs.entry.js +11 -5
- package/dist/cjs/pds-select.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-sortable-item.cjs.entry.js +2 -2
- package/dist/cjs/pds-sortable.cjs.entry.js +1 -1
- package/dist/cjs/pds-switch.cjs.entry.js +10 -7
- package/dist/cjs/pds-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-tab.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-row.cjs.entry.js +1 -1
- package/dist/cjs/pds-table.cjs.entry.js +1 -1
- package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
- package/dist/cjs/pds-tabs.cjs.entry.js +1 -1
- package/dist/cjs/pds-text.cjs.entry.js +1 -1
- package/dist/cjs/pds-textarea.cjs.entry.js +7 -7
- package/dist/cjs/pds-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/pine-core.cjs.js +1 -1
- package/dist/collection/components/pds-accordion/pds-accordion.css +2 -2
- package/dist/collection/components/pds-box/pds-box.css +3 -3
- package/dist/collection/components/pds-button/pds-button.css +54 -7
- package/dist/collection/components/pds-button/pds-button.js +56 -2
- package/dist/collection/components/pds-button/pds-button.js.map +1 -1
- package/dist/collection/components/pds-button/stories/pds-button.stories.js +32 -0
- package/dist/collection/components/pds-checkbox/pds-checkbox.css +0 -2
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +5 -5
- package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +1 -1
- package/dist/collection/components/pds-chip/pds-chip.js +1 -1
- package/dist/collection/components/pds-copytext/pds-copytext.js +1 -1
- package/dist/collection/components/pds-divider/pds-divider.js +1 -1
- package/dist/collection/components/pds-image/pds-image.js +2 -2
- package/dist/collection/components/pds-input/pds-input.css +19 -23
- package/dist/collection/components/pds-input/pds-input.js +11 -4
- package/dist/collection/components/pds-input/pds-input.js.map +1 -1
- package/dist/collection/components/pds-link/pds-link.js +2 -2
- package/dist/collection/components/pds-loader/pds-loader.css +2 -2
- package/dist/collection/components/pds-loader/pds-loader.js +1 -1
- package/dist/collection/components/pds-popover/pds-popover.js +1 -1
- package/dist/collection/components/pds-progress/pds-progress.js +1 -1
- package/dist/collection/components/pds-radio/pds-radio.css +0 -2
- package/dist/collection/components/pds-radio/pds-radio.js +5 -5
- 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 +2 -4
- package/dist/collection/components/pds-select/pds-select.js +3 -3
- package/dist/collection/components/pds-select/pds-select.js.map +1 -1
- package/dist/collection/components/pds-select/pds-select.tokens.css +6 -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 +1 -2
- package/dist/collection/components/pds-switch/pds-switch.js +5 -5
- package/dist/collection/components/pds-switch/pds-switch.js.map +1 -1
- 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-tabpanel/pds-tabpanel.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
- package/dist/collection/components/pds-text/pds-text.js +1 -1
- package/dist/collection/components/pds-textarea/pds-textarea.css +2 -1
- package/dist/collection/components/pds-textarea/pds-textarea.js +4 -4
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
- package/dist/collection/global/styles/utils/label.css +2 -1
- package/dist/docs.json +70 -7
- package/dist/esm/{index-d320cfa9.js → index-7f8e0fa6.js} +3 -3
- package/dist/esm/index-7f8e0fa6.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pds-accordion.entry.js +2 -2
- package/dist/esm/pds-accordion.entry.js.map +1 -1
- package/dist/esm/pds-avatar.entry.js +1 -1
- package/dist/esm/pds-box.entry.js +1 -1
- package/dist/esm/pds-box.entry.js.map +1 -1
- package/dist/esm/pds-button.entry.js +16 -4
- package/dist/esm/pds-button.entry.js.map +1 -1
- package/dist/esm/pds-checkbox.entry.js +10 -7
- package/dist/esm/pds-checkbox.entry.js.map +1 -1
- package/dist/esm/pds-chip.entry.js +2 -2
- package/dist/esm/pds-copytext.entry.js +2 -2
- package/dist/esm/pds-divider.entry.js +1 -1
- package/dist/esm/pds-image.entry.js +2 -2
- package/dist/esm/pds-input.entry.js +13 -6
- package/dist/esm/pds-input.entry.js.map +1 -1
- package/dist/esm/pds-link.entry.js +3 -3
- package/dist/esm/pds-loader.entry.js +2 -2
- package/dist/esm/pds-loader.entry.js.map +1 -1
- package/dist/esm/pds-popover.entry.js +1 -1
- package/dist/esm/pds-progress.entry.js +1 -1
- package/dist/esm/pds-radio.entry.js +10 -7
- package/dist/esm/pds-radio.entry.js.map +1 -1
- package/dist/esm/pds-row.entry.js +1 -1
- package/dist/esm/pds-select.entry.js +11 -5
- package/dist/esm/pds-select.entry.js.map +1 -1
- package/dist/esm/pds-sortable-item.entry.js +2 -2
- package/dist/esm/pds-sortable.entry.js +1 -1
- package/dist/esm/pds-switch.entry.js +10 -7
- package/dist/esm/pds-switch.entry.js.map +1 -1
- package/dist/esm/pds-tab.entry.js +3 -3
- package/dist/esm/pds-table-body.entry.js +1 -1
- package/dist/esm/pds-table-cell.entry.js +2 -2
- package/dist/esm/pds-table-head-cell.entry.js +3 -3
- package/dist/esm/pds-table-head.entry.js +1 -1
- package/dist/esm/pds-table-row.entry.js +1 -1
- package/dist/esm/pds-table.entry.js +1 -1
- package/dist/esm/pds-tabpanel.entry.js +1 -1
- package/dist/esm/pds-tabs.entry.js +1 -1
- package/dist/esm/pds-text.entry.js +1 -1
- package/dist/esm/pds-textarea.entry.js +7 -7
- package/dist/esm/pds-textarea.entry.js.map +1 -1
- package/dist/esm/pds-tooltip.entry.js +2 -2
- package/dist/esm/pine-core.js +1 -1
- package/dist/esm-es5/{index-d320cfa9.js → index-7f8e0fa6.js} +2 -2
- package/dist/esm-es5/index-7f8e0fa6.js.map +1 -0
- 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-accordion.entry.js.map +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-box.entry.js.map +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-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-divider.entry.js +1 -1
- package/dist/esm-es5/pds-image.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js.map +1 -1
- package/dist/esm-es5/pds-link.entry.js +1 -1
- package/dist/esm-es5/pds-loader.entry.js +1 -1
- package/dist/esm-es5/pds-loader.entry.js.map +1 -1
- package/dist/esm-es5/pds-popover.entry.js +1 -1
- package/dist/esm-es5/pds-progress.entry.js +1 -1
- package/dist/esm-es5/pds-radio.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 +1 -1
- package/dist/esm-es5/pds-select.entry.js.map +1 -1
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
- package/dist/esm-es5/pds-sortable.entry.js +1 -1
- 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 +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js.map +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/pine-core.js.map +1 -1
- package/dist/pine-core/p-01fd3a62.system.entry.js +2 -0
- package/dist/pine-core/p-01fd3a62.system.entry.js.map +1 -0
- package/dist/pine-core/p-028fcdbc.entry.js +2 -0
- package/dist/pine-core/p-028fcdbc.entry.js.map +1 -0
- package/dist/pine-core/{p-8b2db323.system.entry.js → p-10caa9e9.system.entry.js} +2 -2
- package/dist/pine-core/p-11b3830e.entry.js +2 -0
- package/dist/pine-core/p-11b3830e.entry.js.map +1 -0
- package/dist/pine-core/p-129ea618.entry.js +2 -0
- package/dist/pine-core/p-129ea618.entry.js.map +1 -0
- package/dist/pine-core/{p-5e50a381.entry.js → p-138ef0d8.entry.js} +2 -2
- package/dist/pine-core/{p-954098a2.entry.js → p-14c58ba3.entry.js} +2 -2
- package/dist/pine-core/{p-d8260ebf.system.entry.js → p-2aa49969.system.entry.js} +2 -2
- package/dist/pine-core/p-2d0b1310.system.entry.js +2 -0
- package/dist/pine-core/p-2d0b1310.system.entry.js.map +1 -0
- package/dist/pine-core/{p-e890c1bb.system.entry.js → p-2f80836e.system.entry.js} +2 -2
- package/dist/pine-core/p-325e7255.system.entry.js +2 -0
- package/dist/pine-core/p-325e7255.system.entry.js.map +1 -0
- package/dist/pine-core/{p-8420594c.system.entry.js → p-3b529bb7.system.entry.js} +2 -2
- package/dist/pine-core/{p-d6a5ec65.system.entry.js → p-3c0abfe5.system.entry.js} +2 -2
- package/dist/pine-core/{p-e39bd4b2.system.entry.js → p-3de0ec6c.system.entry.js} +2 -2
- package/dist/pine-core/{p-df73ebae.entry.js → p-3f256ba6.entry.js} +2 -2
- package/dist/pine-core/p-3fa11581.entry.js +2 -0
- package/dist/pine-core/p-3fa11581.entry.js.map +1 -0
- package/dist/pine-core/{p-f085efeb.entry.js → p-511f7b8e.entry.js} +2 -2
- package/dist/pine-core/{p-92bcb091.entry.js → p-518f8204.entry.js} +2 -2
- package/dist/pine-core/{p-03440844.entry.js → p-520cb092.entry.js} +2 -2
- package/dist/pine-core/p-546c2b18.entry.js +2 -0
- package/dist/pine-core/{p-d0b371ee.system.entry.js → p-55b10add.system.entry.js} +2 -2
- package/dist/pine-core/{p-1e9d6f92.system.entry.js → p-55cbb360.system.entry.js} +2 -2
- package/dist/pine-core/p-5c04aee0.system.js +1 -1
- package/dist/pine-core/p-5c04aee0.system.js.map +1 -1
- package/dist/pine-core/{p-b7e91522.entry.js → p-5d0c0241.entry.js} +2 -2
- package/dist/pine-core/p-5dd93828.system.entry.js +2 -0
- package/dist/pine-core/{p-798cde42.system.entry.js → p-61ddfc76.system.entry.js} +2 -2
- package/dist/pine-core/p-6500852d.system.entry.js +2 -0
- package/dist/pine-core/p-6500852d.system.entry.js.map +1 -0
- package/dist/pine-core/{p-80c582b7.system.entry.js → p-6bba1784.system.entry.js} +2 -2
- package/dist/pine-core/p-6c42ed23.entry.js +2 -0
- package/dist/pine-core/p-6c42ed23.entry.js.map +1 -0
- package/dist/pine-core/{p-d561168e.js → p-6e1737e0.js} +2 -2
- package/dist/pine-core/p-6e1737e0.js.map +1 -0
- package/dist/pine-core/{p-07a7c5bb.entry.js → p-71ba893c.entry.js} +2 -2
- package/dist/pine-core/{p-1edca70e.entry.js → p-7369f396.entry.js} +2 -2
- package/dist/pine-core/p-77d8e9fc.entry.js +2 -0
- package/dist/pine-core/{p-e356293a.entry.js.map → p-77d8e9fc.entry.js.map} +1 -1
- package/dist/pine-core/{p-74ad0244.entry.js → p-7a7cd1eb.entry.js} +2 -2
- package/dist/pine-core/p-7cdcf66c.entry.js +2 -0
- package/dist/pine-core/{p-5e1b7996.entry.js.map → p-7cdcf66c.entry.js.map} +1 -1
- package/dist/pine-core/{p-f34096db.system.entry.js → p-8220fa98.system.entry.js} +2 -2
- package/dist/pine-core/{p-5480346a.system.js → p-840c252f.system.js} +2 -2
- package/dist/pine-core/p-840c252f.system.js.map +1 -0
- package/dist/pine-core/{p-c68362cc.entry.js → p-841eae86.entry.js} +2 -2
- package/dist/pine-core/{p-19be5a8e.system.entry.js → p-8afa0198.system.entry.js} +2 -2
- package/dist/pine-core/{p-da961d2b.entry.js → p-9b2cacf1.entry.js} +2 -2
- package/dist/pine-core/{p-2d52d5f7.entry.js → p-9e9f1428.entry.js} +2 -2
- package/dist/pine-core/p-a020513a.system.entry.js +2 -0
- package/dist/pine-core/p-a020513a.system.entry.js.map +1 -0
- package/dist/pine-core/p-a542bd00.entry.js +2 -0
- package/dist/pine-core/p-a542bd00.entry.js.map +1 -0
- package/dist/pine-core/{p-d9390457.entry.js → p-a5ab26b7.entry.js} +2 -2
- package/dist/pine-core/p-a5ab26b7.entry.js.map +1 -0
- package/dist/pine-core/p-a5c127c1.system.entry.js +2 -0
- package/dist/pine-core/p-a5c127c1.system.entry.js.map +1 -0
- package/dist/pine-core/{p-372a04fa.system.entry.js → p-aab44395.system.entry.js} +2 -2
- package/dist/pine-core/{p-a2465224.entry.js → p-b0cf37c0.entry.js} +2 -2
- package/dist/pine-core/{p-f0c28381.entry.js → p-b164dfe7.entry.js} +2 -2
- package/dist/pine-core/{p-ade60629.system.entry.js → p-b1aa0e9d.system.entry.js} +2 -2
- package/dist/pine-core/p-b1aa0e9d.system.entry.js.map +1 -0
- package/dist/pine-core/{p-ed990ad0.system.entry.js → p-b492ea28.system.entry.js} +2 -2
- package/dist/pine-core/p-bf55e42e.system.entry.js +2 -0
- package/dist/pine-core/p-c564c31b.system.entry.js +2 -0
- package/dist/pine-core/p-c564c31b.system.entry.js.map +1 -0
- package/dist/pine-core/{p-1da5aaf3.entry.js → p-ce0efc2d.entry.js} +2 -2
- package/dist/pine-core/{p-1fd67cb4.system.entry.js → p-d266843a.system.entry.js} +2 -2
- package/dist/pine-core/{p-f90088df.entry.js → p-d34b9adb.entry.js} +2 -2
- package/dist/pine-core/{p-987a101b.system.entry.js → p-d410221a.system.entry.js} +2 -2
- package/dist/pine-core/{p-4c252abb.system.entry.js → p-d61972a6.system.entry.js} +2 -2
- package/dist/pine-core/p-d6f5b0a5.system.entry.js +2 -0
- package/dist/pine-core/p-d6f5b0a5.system.entry.js.map +1 -0
- package/dist/pine-core/{p-cae3e411.entry.js → p-dbd37883.entry.js} +2 -2
- package/dist/pine-core/{p-29bb6589.entry.js → p-e19d9edd.entry.js} +2 -2
- package/dist/pine-core/p-ec1f256a.entry.js +2 -0
- package/dist/pine-core/p-ec1f256a.entry.js.map +1 -0
- package/dist/pine-core/p-ee3cc6ce.entry.js +2 -0
- package/dist/pine-core/p-ee3cc6ce.entry.js.map +1 -0
- package/dist/pine-core/p-f099836d.entry.js +2 -0
- package/dist/pine-core/p-f099836d.entry.js.map +1 -0
- package/dist/pine-core/{p-853af623.system.entry.js → p-f8e61c4c.system.entry.js} +2 -2
- package/dist/pine-core/{p-397ce1a8.system.entry.js → p-fad3645f.system.entry.js} +2 -2
- package/dist/pine-core/p-fce8b94f.system.entry.js +2 -0
- package/dist/pine-core/p-fce8b94f.system.entry.js.map +1 -0
- package/dist/pine-core/{p-285cd9d1.system.entry.js → p-fd3e2c23.system.entry.js} +2 -2
- 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/svg/align-horizontal-bottom.svg +1 -0
- package/dist/pine-core/svg/align-horizontal-center.svg +1 -0
- package/dist/pine-core/svg/align-horizontal-top.svg +1 -0
- package/dist/pine-core/svg/align-vertical-center.svg +1 -0
- package/dist/pine-core/svg/align-vertical-left.svg +1 -0
- package/dist/pine-core/svg/align-vertical-right.svg +1 -0
- package/dist/pine-core/svg/feedback.svg +1 -1
- package/dist/pine-core/svg/form.svg +1 -1
- package/dist/pine-core/svg/grant-offer.svg +1 -1
- package/dist/pine-core/svg/headphones.svg +1 -0
- package/dist/pine-core/svg/kajabi-filled.svg +1 -1
- package/dist/pine-core/svg/kajabi.svg +1 -1
- package/dist/pine-core/svg/layout-top.svg +1 -0
- package/dist/pine-core/svg/mail-open.svg +1 -1
- package/dist/pine-core/svg/mail.svg +1 -1
- package/dist/pine-core/svg/merge.svg +1 -1
- package/dist/pine-core/svg/newsletter-2.svg +1 -1
- package/dist/pine-core/svg/pie-chart-filled.svg +1 -0
- package/dist/pine-core/svg/present.svg +1 -1
- package/dist/pine-core/svg/restore.svg +1 -1
- package/dist/pine-core/svg/star-03.svg +1 -0
- package/dist/pine-core/svg/star-filled.svg +1 -0
- package/dist/pine-core/svg/star.svg +1 -1
- package/dist/pine-core/svg/sync.svg +1 -1
- package/dist/pine-core/svg/trophy.svg +1 -1
- package/dist/pine-core/svg/type.svg +1 -0
- package/dist/pine-core/svg/user-filled.svg +1 -1
- package/dist/types/components/pds-button/pds-button.d.ts +11 -0
- package/dist/types/components/pds-input/pds-input.d.ts +2 -1
- package/dist/types/components.d.ts +22 -2
- package/hydrate/index.js +107 -71
- package/hydrate/index.mjs +107 -71
- package/package.json +2 -2
- package/dist/cjs/index-034a8bb0.js.map +0 -1
- package/dist/esm/index-d320cfa9.js.map +0 -1
- package/dist/esm-es5/index-d320cfa9.js.map +0 -1
- package/dist/pine-core/p-0e4226b8.entry.js +0 -2
- package/dist/pine-core/p-0e4226b8.entry.js.map +0 -1
- package/dist/pine-core/p-2fedf634.system.entry.js +0 -2
- package/dist/pine-core/p-2fedf634.system.entry.js.map +0 -1
- package/dist/pine-core/p-30cd9f18.entry.js +0 -2
- package/dist/pine-core/p-399617f0.system.entry.js +0 -2
- package/dist/pine-core/p-399617f0.system.entry.js.map +0 -1
- package/dist/pine-core/p-3fbb568f.entry.js +0 -2
- package/dist/pine-core/p-3fbb568f.entry.js.map +0 -1
- package/dist/pine-core/p-4d1fbb88.system.entry.js +0 -2
- package/dist/pine-core/p-5480346a.system.js.map +0 -1
- package/dist/pine-core/p-59f4c8ab.system.entry.js +0 -2
- package/dist/pine-core/p-59f4c8ab.system.entry.js.map +0 -1
- package/dist/pine-core/p-5b9f8f6a.system.entry.js +0 -2
- package/dist/pine-core/p-5b9f8f6a.system.entry.js.map +0 -1
- package/dist/pine-core/p-5e1b7996.entry.js +0 -2
- package/dist/pine-core/p-60c2039e.system.entry.js +0 -2
- package/dist/pine-core/p-61631a68.entry.js +0 -2
- package/dist/pine-core/p-61631a68.entry.js.map +0 -1
- package/dist/pine-core/p-650a27ca.entry.js +0 -2
- package/dist/pine-core/p-650a27ca.entry.js.map +0 -1
- package/dist/pine-core/p-6709f0f7.system.entry.js +0 -2
- package/dist/pine-core/p-6709f0f7.system.entry.js.map +0 -1
- package/dist/pine-core/p-6ce5b998.entry.js +0 -2
- package/dist/pine-core/p-6ce5b998.entry.js.map +0 -1
- package/dist/pine-core/p-6d8df897.entry.js +0 -2
- package/dist/pine-core/p-6d8df897.entry.js.map +0 -1
- package/dist/pine-core/p-726dc3d1.entry.js +0 -2
- package/dist/pine-core/p-726dc3d1.entry.js.map +0 -1
- package/dist/pine-core/p-7c6320e4.entry.js +0 -2
- package/dist/pine-core/p-7c6320e4.entry.js.map +0 -1
- package/dist/pine-core/p-ade60629.system.entry.js.map +0 -1
- package/dist/pine-core/p-bacb5789.system.entry.js +0 -2
- package/dist/pine-core/p-bacb5789.system.entry.js.map +0 -1
- package/dist/pine-core/p-cb3ddff3.entry.js +0 -2
- package/dist/pine-core/p-cb3ddff3.entry.js.map +0 -1
- package/dist/pine-core/p-cd14918d.system.entry.js +0 -2
- package/dist/pine-core/p-cd14918d.system.entry.js.map +0 -1
- package/dist/pine-core/p-d477224e.system.entry.js +0 -2
- package/dist/pine-core/p-d477224e.system.entry.js.map +0 -1
- package/dist/pine-core/p-d561168e.js.map +0 -1
- package/dist/pine-core/p-d9390457.entry.js.map +0 -1
- package/dist/pine-core/p-e356293a.entry.js +0 -2
- package/dist/pine-core/p-e60348bc.system.entry.js +0 -2
- package/dist/pine-core/p-e60348bc.system.entry.js.map +0 -1
- /package/dist/pine-core/{p-8b2db323.system.entry.js.map → p-10caa9e9.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5e50a381.entry.js.map → p-138ef0d8.entry.js.map} +0 -0
- /package/dist/pine-core/{p-954098a2.entry.js.map → p-14c58ba3.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d8260ebf.system.entry.js.map → p-2aa49969.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e890c1bb.system.entry.js.map → p-2f80836e.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-8420594c.system.entry.js.map → p-3b529bb7.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d6a5ec65.system.entry.js.map → p-3c0abfe5.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e39bd4b2.system.entry.js.map → p-3de0ec6c.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-df73ebae.entry.js.map → p-3f256ba6.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f085efeb.entry.js.map → p-511f7b8e.entry.js.map} +0 -0
- /package/dist/pine-core/{p-92bcb091.entry.js.map → p-518f8204.entry.js.map} +0 -0
- /package/dist/pine-core/{p-03440844.entry.js.map → p-520cb092.entry.js.map} +0 -0
- /package/dist/pine-core/{p-30cd9f18.entry.js.map → p-546c2b18.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d0b371ee.system.entry.js.map → p-55b10add.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1e9d6f92.system.entry.js.map → p-55cbb360.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b7e91522.entry.js.map → p-5d0c0241.entry.js.map} +0 -0
- /package/dist/pine-core/{p-4d1fbb88.system.entry.js.map → p-5dd93828.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-798cde42.system.entry.js.map → p-61ddfc76.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-80c582b7.system.entry.js.map → p-6bba1784.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-07a7c5bb.entry.js.map → p-71ba893c.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1edca70e.entry.js.map → p-7369f396.entry.js.map} +0 -0
- /package/dist/pine-core/{p-74ad0244.entry.js.map → p-7a7cd1eb.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f34096db.system.entry.js.map → p-8220fa98.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c68362cc.entry.js.map → p-841eae86.entry.js.map} +0 -0
- /package/dist/pine-core/{p-19be5a8e.system.entry.js.map → p-8afa0198.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-da961d2b.entry.js.map → p-9b2cacf1.entry.js.map} +0 -0
- /package/dist/pine-core/{p-2d52d5f7.entry.js.map → p-9e9f1428.entry.js.map} +0 -0
- /package/dist/pine-core/{p-372a04fa.system.entry.js.map → p-aab44395.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a2465224.entry.js.map → p-b0cf37c0.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f0c28381.entry.js.map → p-b164dfe7.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ed990ad0.system.entry.js.map → p-b492ea28.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-60c2039e.system.entry.js.map → p-bf55e42e.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1da5aaf3.entry.js.map → p-ce0efc2d.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1fd67cb4.system.entry.js.map → p-d266843a.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f90088df.entry.js.map → p-d34b9adb.entry.js.map} +0 -0
- /package/dist/pine-core/{p-987a101b.system.entry.js.map → p-d410221a.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-4c252abb.system.entry.js.map → p-d61972a6.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-cae3e411.entry.js.map → p-dbd37883.entry.js.map} +0 -0
- /package/dist/pine-core/{p-29bb6589.entry.js.map → p-e19d9edd.entry.js.map} +0 -0
- /package/dist/pine-core/{p-853af623.system.entry.js.map → p-f8e61c4c.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-397ce1a8.system.entry.js.map → p-fad3645f.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-285cd9d1.system.entry.js.map → p-fd3e2c23.system.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-input.js","sourceRoot":"","sources":["../../../src/components/pds-input/pds-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAU1D,MAAM,OAAO,QAAQ;;QAEX,wBAAmB,GAAe,EAAE,CAAC;QACrC,gBAAW,GAAG,KAAK,CAAC;QAmJpB,iBAAY,GAAG,CAAC,EAAS,EAAE,EAAE;YACnC,MAAM,KAAK,GAAG,EAAE,CAAC,MAAiC,CAAC;YACnD,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;YACjC,CAAC;YACD,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC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,CAAC,aAAa,EAC5B,MAAM,EAAE,IAAI,CAAC,WAAW,EACxB,OAAO,EAAE,IAAI,CAAC,YAAY,EAC1B,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,IACnC,IAAI,CAAC,mBAAmB,EAC5B;gBACD,IAAI,CAAC,aAAa;oBACjB,0DACE,KAAK,EAAC,2BAA2B,EACjC,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,IAExC,IAAI,CAAC,aAAa,CACjB;gBAEL,IAAI,CAAC,YAAY;oBAChB,0DACE,KAAK,EAAC,0BAA0B,EAChC,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,eAC9B,WAAW;wBAErB,iEAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,GAAG;wBACtC,IAAI,CAAC,YAAY,CAChB,CAEF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { assignDescription, messageId } from '../../utils/form';\nimport { danger } from '@pine-ds/icons/icons';\n\nimport { debounceEvent } from '@utils/utils';\nimport { inheritAriaAttributes } from '@utils/attributes';\n\nimport type { Attributes } from '@utils/attributes';\nimport type { InputChangeEventDetail, InputInputEventDetail } from './input-interface';\n\n@Component({\n tag: 'pds-input',\n styleUrls: ['pds-input.tokens.scss', '../../global/styles/utils/label.scss', 'pds-input.scss'],\n shadow: true,\n})\nexport class PdsInput {\n private nativeInput?: HTMLInputElement;\n private inheritedAttributes: Attributes = {};\n private isComposing = false;\n /**\n * The value of the input when the input is focused.\n */\n private focusedValue?: string | number | null;\n\n private originalPdsInput?: EventEmitter<InputInputEventDetail>;\n\n @Element() el!: HTMLPdsInputElement;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() pdsBlur!: EventEmitter<FocusEvent>;\n\n /**\n *\n * Emitted when the value has changed.\n *\n * This event will not emit when programmatically setting the `value` property.\n */\n @Event() pdsChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() pdsFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when a keyboard input occurs.\n */\n @Event() pdsInput: EventEmitter<InputInputEventDetail>;\n\n /**\n * Sets focus on the native `input` in the `pds-input`. Use this method instead of the global\n * `input.focus()`.\n */\n @Method()\n async setFocus() {\n if ( this.nativeInput ) {\n this.nativeInput.focus();\n }\n }\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 * Sets the number of milliseconds to wait before updating the value.\n */\n @Prop() debounce?: number;\n\n /**\n * Determines whether or not the input field is disabled.\n */\n @Prop() disabled?: boolean;\n\n /**\n * Specifies the error message and provides an error-themed treatment to the field.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Displays a message or hint below the input field.\n */\n @Prop() helperMessage?: string;\n\n /**\n * Determines whether or not the input field is invalid or throws an error.\n */\n @Prop() invalid?: boolean;\n\n /**\n * Text to be displayed as the input label.\n */\n @Prop() label?: string;\n\n /**\n * Specifies the name. Submitted with the form name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * Specifies a short hint that describes the expected value of the input field.\n */\n @Prop() placeholder?: string;\n\n /**\n * Determines whether or not the input field is readonly.\n */\n @Prop() readonly?: boolean;\n\n /**\n * Determines whether or not the input field is required.\n */\n @Prop() required?: boolean;\n\n /**\n * Determines the type of control that will be displayed\n * `'email'`, `'number'`, `'password'`, `'tel'`, `'text'`\n * @defaultValue \"text\"\n */\n @Prop() type = 'text';\n\n /**\n * The value of the input.\n */\n @Prop({mutable: true}) value?: string | number | null = '';\n\n /**\n * Determines if the input has focus.\n */\n @State() hasFocus = false;\n\n\n @Watch('debounce')\n protected debounceChanged() {\n const { pdsInput, debounce, originalPdsInput } = this;\n\n /**\n * If debounce is undefined, we have to manually revert the pdsInput emitter in case\n * debounce used to be set to a number. Otherwise, the event would stay debounced.\n */\n this.pdsInput = debounce === undefined ? originalPdsInput ?? pdsInput : debounceEvent(pdsInput, debounce);\n }\n\n @Watch('value')\n protected valueChanged() {\n const nativeInput = this.nativeInput;\n const value = this.getValue();\n\n if (nativeInput && nativeInput.value !== value && !this.isComposing) {\n nativeInput.value = value;\n }\n }\n\n private getValue(): string {\n return typeof this.value === 'number' ? this.value.toString() : (this.value || '').toString();\n }\n\n private onInputEvent = (ev: Event) => {\n const input = ev.target as HTMLInputElement | null;\n if (input) {\n this.value = input.value || '';\n }\n this.emitInputChange(ev);\n };\n\n private onChangeEvent = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private onBlurEvent = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n if (this.focusedValue !== this.value) {\n /**\n * Emits the `pdsChange` event when the input value\n * is different than the value when the input was focused.\n */\n this.emitValueChange(ev);\n }\n\n this.pdsBlur.emit(ev);\n };\n\n private onFocusEvent = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusedValue = this.value;\n\n this.pdsFocus.emit(ev);\n };\n\n private onCompositionStart = () => {\n this.isComposing = true;\n }\n\n private onCompositionEnd = () => {\n this.isComposing = false;\n }\n\n /**\n * Emits a pdsChange event\n */\n private emitValueChange(event?: Event) {\n const { value } = this;\n const newValue = value == null ? value : value.toString();\n\n this.focusedValue = newValue;\n this.pdsChange.emit({ value: newValue, event });\n }\n\n /**\n *\n * Emits a `pdsInput` event\n */\n private emitInputChange(event?: Event) {\n const { value } = this;\n\n // Checks for both null and undefined values\n const newValue = value == null ? value : value.toString();\n\n this.pdsInput.emit({ value: newValue, event });\n }\n\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el)\n }\n }\n\n componentDidLoad() {\n this.debounceChanged();\n }\n\n render() {\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n aria-readonly={this.readonly ? 'true' : null}\n >\n <div class=\"pds-input\">\n <label htmlFor={this.componentId}>{this.label}</label>\n <input class=\"pds-input__field\"\n ref={(input) => this.nativeInput = input}\n aria-describedby={assignDescription(this.componentId, this.invalid, this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n autocomplete={this.autocomplete}\n disabled={this.disabled}\n id={this.componentId}\n name={this.name}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n type={this.type}\n value={this.value}\n onInput={this.onInputEvent}\n onChange={this.onChangeEvent}\n onBlur={this.onBlurEvent}\n onFocus={this.onFocusEvent}\n onCompositionstart={this.onCompositionStart}\n onCompositionend={this.onCompositionEnd}\n {...this.inheritedAttributes}\n />\n {this.helperMessage &&\n <p\n class=\"pds-input__helper-message\"\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </p>\n }\n {this.errorMessage &&\n <p\n class=\"pds-input__error-message\"\n id={messageId(this.componentId, 'error')}\n aria-live=\"assertive\"\n >\n <pds-icon icon={danger} size=\"small\" />\n {this.errorMessage}\n </p>\n }\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pds-input.js","sourceRoot":"","sources":["../../../src/components/pds-input/pds-input.tsx"],"names":[],"mappings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,EAAC,2BAA2B,EACjC,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,IAExC,IAAI,CAAC,aAAa,CACjB;gBAEL,IAAI,CAAC,YAAY;oBAChB,0DACE,KAAK,EAAC,0BAA0B,EAChC,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,eAC9B,WAAW;wBAErB,iEAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,GAAG;wBACtC,IAAI,CAAC,YAAY,CAChB,CAEF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { assignDescription, messageId } from '../../utils/form';\nimport { danger } from '@pine-ds/icons/icons';\n\nimport { debounceEvent } from '@utils/utils';\nimport { inheritAriaAttributes } from '@utils/attributes';\n\nimport type { Attributes } from '@utils/attributes';\nimport type { InputChangeEventDetail, InputInputEventDetail } from './input-interface';\n\n@Component({\n tag: 'pds-input',\n styleUrls: ['pds-input.tokens.scss', '../../global/styles/utils/label.scss', 'pds-input.scss'],\n shadow: true,\n})\nexport class PdsInput {\n private nativeInput?: HTMLInputElement;\n private inheritedAttributes: Attributes = {};\n private isComposing = false;\n /**\n * The value of the input when the input is focused.\n */\n private focusedValue?: string | number | null;\n\n private originalPdsInput?: EventEmitter<InputInputEventDetail>;\n\n @Element() el!: HTMLPdsInputElement;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() pdsBlur!: EventEmitter<FocusEvent>;\n\n /**\n *\n * Emitted when the value has changed.\n *\n * This event will not emit when programmatically setting the `value` property.\n */\n @Event() pdsChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() pdsFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when a keyboard input occurs.\n */\n @Event() pdsInput: EventEmitter<InputInputEventDetail>;\n\n /**\n * Sets focus on the native `input` in the `pds-input`. Use this method instead of the global\n * `input.focus()`.\n */\n @Method()\n async setFocus() {\n if ( this.nativeInput ) {\n this.nativeInput.focus();\n }\n }\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 * Sets the number of milliseconds to wait before updating the value.\n */\n @Prop() debounce?: number;\n\n /**\n * Determines whether or not the input field is disabled.\n */\n @Prop() disabled?: boolean;\n\n /**\n * Specifies the error message and provides an error-themed treatment to the field.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Displays a message or hint below the input field.\n */\n @Prop() helperMessage?: string;\n\n /**\n * Determines whether or not the input field is invalid or throws an error.\n */\n @Prop() invalid?: boolean;\n\n /**\n * Text to be displayed as the input label.\n */\n @Prop() label?: string;\n\n /**\n * Specifies the name. Submitted with the form name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * Specifies a short hint that describes the expected value of the input field.\n */\n @Prop() placeholder?: string;\n\n /**\n * Determines whether or not the input field is readonly.\n */\n @Prop() readonly?: boolean;\n\n /**\n * Determines whether or not the input field is required.\n */\n @Prop() required?: boolean;\n\n /**\n * Determines the type of control that will be displayed\n * `'email'`, `'number'`, `'password'`, `'tel'`, `'text'`, `'url'`\n * @defaultValue \"text\"\n */\n @Prop() type = 'text';\n\n /**\n * The value of the input.\n */\n @Prop({mutable: true}) value?: string | number | null = '';\n\n /**\n * Determines if the input has focus.\n */\n @State() hasFocus = false;\n\n\n @Watch('debounce')\n protected debounceChanged() {\n const { pdsInput, debounce, originalPdsInput } = this;\n\n /**\n * If debounce is undefined, we have to manually revert the pdsInput emitter in case\n * debounce used to be set to a number. Otherwise, the event would stay debounced.\n */\n this.pdsInput = debounce === undefined ? originalPdsInput ?? pdsInput : debounceEvent(pdsInput, debounce);\n }\n\n @Watch('value')\n protected valueChanged() {\n const nativeInput = this.nativeInput;\n const value = this.getValue();\n\n if (nativeInput && nativeInput.value !== value && !this.isComposing) {\n nativeInput.value = value;\n }\n }\n\n private getValue(): string {\n return typeof this.value === 'number' ? this.value.toString() : (this.value || '').toString();\n }\n\n private onInputEvent = (ev: Event) => {\n const input = ev.target as HTMLInputElement | null;\n if (input) {\n this.value = input.value || '';\n }\n this.emitInputChange(ev);\n };\n\n private onChangeEvent = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private onBlurEvent = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n if (this.focusedValue !== this.value) {\n /**\n * Emits the `pdsChange` event when the input value\n * is different than the value when the input was focused.\n */\n this.emitValueChange(ev);\n }\n\n this.pdsBlur.emit(ev);\n };\n\n private onFocusEvent = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusedValue = this.value;\n\n this.pdsFocus.emit(ev);\n };\n\n private onCompositionStart = () => {\n this.isComposing = true;\n }\n\n private onCompositionEnd = () => {\n this.isComposing = false;\n }\n\n /**\n * Emits a pdsChange event\n */\n private emitValueChange(event?: Event) {\n const { value } = this;\n const newValue = value == null ? value : value.toString();\n\n this.focusedValue = newValue;\n this.pdsChange.emit({ value: newValue, event });\n }\n\n /**\n *\n * Emits a `pdsInput` event\n */\n private emitInputChange(event?: Event) {\n const { value } = this;\n\n // Checks for both null and undefined values\n const newValue = value == null ? value : value.toString();\n\n this.pdsInput.emit({ value: newValue, event });\n }\n\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el)\n }\n }\n\n componentDidLoad() {\n this.debounceChanged();\n }\n\n private inputClassNames() {\n const classNames = ['pds-input__field'];\n\n if (this.invalid && this.invalid === true) {\n classNames.push('is-invalid');\n }\n\n return classNames.join(' ');\n }\n\n render() {\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n aria-readonly={this.readonly ? 'true' : null}\n >\n <div class=\"pds-input\">\n <label htmlFor={this.componentId}>{this.label}</label>\n <input\n class={this.inputClassNames()}\n ref={(input) => this.nativeInput = input}\n aria-describedby={assignDescription(this.componentId, this.invalid, this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n autocomplete={this.autocomplete}\n disabled={this.disabled}\n id={this.componentId}\n name={this.name}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n type={this.type}\n value={this.value}\n onInput={this.onInputEvent}\n onChange={this.onChangeEvent}\n onBlur={this.onBlurEvent}\n onFocus={this.onFocusEvent}\n onCompositionstart={this.onCompositionStart}\n onCompositionend={this.onCompositionEnd}\n {...this.inheritedAttributes}\n />\n {this.helperMessage &&\n <p\n class=\"pds-input__helper-message\"\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </p>\n }\n {this.errorMessage &&\n <p\n class=\"pds-input__error-message\"\n id={messageId(this.componentId, 'error')}\n aria-live=\"assertive\"\n >\n <pds-icon icon={danger} size=\"small\" />\n {this.errorMessage}\n </p>\n }\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -23,8 +23,8 @@ export class PdsLink {
|
|
|
23
23
|
return classNames.join(' ');
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
|
-
return (h("a", { key: '
|
|
27
|
-
h("pds-icon", { key: '
|
|
26
|
+
return (h("a", { key: 'ee9b0a9897e2a212989d607c85f2050ee992bd32', class: this.classNames(), href: this.href, id: this.componentId, target: this.external ? '_blank' : undefined, part: "link" }, h("slot", { key: '611a4f9194ce38fd3b79c7e55281a625267846a4' }, this.href), this.external &&
|
|
27
|
+
h("pds-icon", { key: 'a527d217c8ef1e69a2ca127019fbeb3eb25b3a02', icon: launch, size: this.fontSize })));
|
|
28
28
|
}
|
|
29
29
|
static get is() { return "pds-link"; }
|
|
30
30
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
:host {
|
|
2
|
+
--loader-color: var(--pine-color-brand);
|
|
2
3
|
align-items: center;
|
|
3
4
|
display: flex;
|
|
4
5
|
flex-direction: column;
|
|
@@ -19,11 +20,10 @@
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
.pds-loader--spinner svg {
|
|
22
|
-
--color-background-spinner: var(--pine-color-brand);
|
|
23
23
|
--number-spinner-timing: 2s;
|
|
24
24
|
--number-spinner-path-timing: 1.5s;
|
|
25
25
|
animation: rotate var(--number-spinner-timing) linear infinite;
|
|
26
|
-
color: var(--color
|
|
26
|
+
color: var(--loader-color);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.pds-loader__spinner-path {
|
|
@@ -33,7 +33,7 @@ export class PdsLoader {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h(Host, { key: '
|
|
36
|
+
return (h(Host, { key: '7c8fdc4812310a291f992786f1e7951664afb8b6', class: `pds-loader ${this.isLoading ? '' : 'pds-loader--hidden'}`, "aria-hidden": !this.isLoading, "aria-busy": this.isLoading, "aria-live": "polite" }, this.variant === 'spinner' && (h("div", { key: '411dbd7e815b2160abcbd0049f9e310a9059452c', class: "pds-loader--spinner" }, h("svg", { key: '1d59dc3aea7bb51015680c3657abb964a7b69106', style: this.style(), viewBox: "0 0 200 200", fill: "none" }, h("defs", { key: '9ed887bf61bda5cda7662952dfc9add1e3e1ca40' }, h("linearGradient", { key: 'af416e97cbfbb1b2cc5c6a06f168165d60f984c8', id: "spinner-secondHalf" }, h("stop", { key: 'dd3d79c1b422dbc29a2f7af106d7e648ea739e09', offset: "0%", "stop-opacity": "0", "stop-color": "currentColor" }), h("stop", { key: '313ef7bbcaecad0f4bf8eb268e05ef3ff48f55be', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" })), h("linearGradient", { key: 'b36dde7b2648bb9bef120354f70bab8fbc3879a8', id: "spinner-firstHalf" }, h("stop", { key: '7d38062cf2f39b1be1b29e7799ac68c59744a172', offset: "0%", "stop-opacity": "1", "stop-color": "currentColor" }), h("stop", { key: 'bfe1ea074d55af2098eca57459c54cd92a1ecafc', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" }))), h("g", { key: '0d2ee2c9abe4b90f8c38246c847c43a942316686', class: "pds-loader__spinner-path" }, h("path", { key: '87b0fc01bc7fe59e596013011034e2e1d6eabd38', stroke: "url(#spinner-secondHalf)", d: "M 4 100 A 96 96 0 0 1 196 100" }), h("path", { key: '07b2c9ddd18117d1ef40f3e26f76bafc8c8c5309', stroke: "url(#spinner-firstHalf)", d: "M 196 100 A 96 96 0 0 1 4 100" }), h("path", { key: 'f4a88b3aaefb70c1cb5582f94d507efe88a66fbe', stroke: "currentColor", "stroke-linecap": "round", d: "M 4 100 A 96 96 0 0 1 4 98" }))))), this.variant === 'typing' && (h("div", { key: 'ab906177f012e882487a447338c1e1155524b8c3', class: "pds-loader--typing" }, h("span", { key: 'b7080dffb6dfb66bd89ca754880e7456b33f9cdb' }), h("span", { key: '0b7d00d9e3fcbaecbade0860a2a50cec6f13b017' }), h("span", { key: '0e8cca8e86dba84a7b22913d5458c0c232661526' }))), h("div", { key: '540aee483c31b199a1c4ec09e6a848661379e593', class: `pds-loader__label ${this.showLabel ? '' : 'pds-loader--hidden'}` }, h("slot", { key: 'f94f166ef6a1ef8a995efc664cd2ddf509ad51d8', name: "label" }, "Loading..."))));
|
|
37
37
|
}
|
|
38
38
|
static get is() { return "pds-loader"; }
|
|
39
39
|
static get encapsulation() { return "shadow"; }
|
|
@@ -52,7 +52,7 @@ export class PdsPopover {
|
|
|
52
52
|
popoverEl.style.left = `${left}px`;
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '83f5e8306d9a8f9e541e638af6fab4e83700c9ce' }, h("button", { key: '11a49c046a9258b64508c3a48dff8b63468358e0', class: "pds-popover__trigger", popoverTarget: this.componentId, popoverTargetAction: this.popoverTargetAction, onClick: this.handleClick }, this.text), h("div", { key: 'c4034a97e7d3aa794d4cf20891cb1ccd31895fa9', class: `pds-popover ${this.active ? 'pds-popover--active' : ''}`, id: this.componentId, popover: this.popoverType, style: { maxWidth: `${this.maxWidth}px` } }, h("slot", { key: '2005210e15c7f73efed54de5980c117f682cc476' }))));
|
|
56
56
|
}
|
|
57
57
|
static get is() { return "pds-popover"; }
|
|
58
58
|
static get encapsulation() { return "shadow"; }
|
|
@@ -9,7 +9,7 @@ export class PdsProgress {
|
|
|
9
9
|
this.showPercent = false;
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: 'c90714bd802c1ec10cc1d557b21c4761a348c559', class: this.animated ? { 'is-animated': this.animated } : '' }, h("div", { key: '969f33669523f2c67d30aa94652e3b70373b780a', class: "pds-progress" }, h("label", { key: '206a7c2297361caae1c5ecadacfd11939d8decee', class: "pds-progress__label", htmlFor: this.componentId }, this.label), h("progress", { key: 'e7748d02c4070bb894943fe0795a3c7008a43d62', id: this.componentId, max: "100", style: this.fillColor ? { '--color-progress-fill': this.fillColor } : {}, value: this.percent })), this.showPercent && h("div", { key: '7ec96692f3dc869069071bae747371ea6ef911ec', class: "pds-progress__percentage" }, this.percent, "%")));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "pds-progress"; }
|
|
15
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -74,7 +74,6 @@ input:disabled:checked::after {
|
|
|
74
74
|
border-color: var(--pine-color-border-disabled);
|
|
75
75
|
}
|
|
76
76
|
input:disabled + label {
|
|
77
|
-
color: var(--pine-color-text-disabled);
|
|
78
77
|
cursor: not-allowed;
|
|
79
78
|
}
|
|
80
79
|
input:disabled ~ .pds-radio__message {
|
|
@@ -86,7 +85,6 @@ input:focus-visible {
|
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
label {
|
|
89
|
-
font-weight: var(--pine-font-weight-body-medium);
|
|
90
88
|
margin-inline-start: 10px;
|
|
91
89
|
}
|
|
92
90
|
|
|
@@ -34,20 +34,20 @@ export class PdsRadio {
|
|
|
34
34
|
return classNames.join(' ');
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return (h(Host, { key: '
|
|
38
|
-
h("div", { key: '
|
|
39
|
-
h("div", { key: '
|
|
37
|
+
return (h(Host, { key: 'e4d5980a8440cd429b26e5a0f2a614686dadfc73', class: this.classNames() }, h("input", { key: 'a7c37be10d2e4679119e7e23189a95141fa3d4a7', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, type: "radio", id: this.componentId, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleRadioChange }), h(PdsLabel, { key: '959d6c1403659c20325f5c4c16483dd61c2c4e51', htmlFor: this.componentId, text: this.label }), this.helperMessage &&
|
|
38
|
+
h("div", { key: '78c34138bbc169a6275bd859355020eaae6e1e10', class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
39
|
+
h("div", { key: '78a09442740dbd9b8b77c86c7cd519d02e847286', class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '1ccf0768cdc04ee342d4069ad54379ed0f3c32e8', icon: danger, size: "small" }), this.errorMessage)));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "pds-radio"; }
|
|
42
42
|
static get encapsulation() { return "scoped"; }
|
|
43
43
|
static get originalStyleUrls() {
|
|
44
44
|
return {
|
|
45
|
-
"$": ["pds-radio.scss"]
|
|
45
|
+
"$": ["../../global/styles/utils/label.scss", "pds-radio.scss"]
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
static get styleUrls() {
|
|
49
49
|
return {
|
|
50
|
-
"$": ["pds-radio.css"]
|
|
50
|
+
"$": ["../../global/styles/utils/label.css", "pds-radio.css"]
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
static get properties() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-radio.js","sourceRoot":"","sources":["../../../src/components/pds-radio/pds-radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAO9C,MAAM,OAAO,QAAQ;;QA4DX,sBAAiB,GAAG,CAAC,CAAQ,EAAE,EAAE;YACvC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,OAAO;YACT,CAAC;YAED,MAAM,MAAM,GAAG,CAAC,CAAC,MAA0B,CAAC;YAC5C,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC;YAEjC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,CAAC,CAAA;uBAhEiB,KAAK;;wBAWJ,KAAK;;;uBAgBJ,KAAK;;;wBAgBN,KAAK;;;IAuBhB,UAAU;QAChB,MAAM,UAAU,GAAG,EAAE,CAAC;QAEtB,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CA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IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter } 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-radio',\n styleUrls: ['pds-radio.scss'],\n scoped: true,\n})\nexport class PdsRadio {\n /**\n * Determines whether or not the radio is checked.\n * @defaultValue false\n */\n @Prop() checked = false;\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 whether or not the radio 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 radio.\n */\n @Prop() helperMessage: string;\n\n /**\n * Determines whether or not the radio is invalid.\n * @defaultValue false\n */\n @Prop() invalid = false;\n\n /**\n * String used for label text next to radio.\n */\n @Prop() label: string;\n\n /**\n * String used for radio `name` attribute.\n */\n @Prop() name: string;\n\n /**\n * Determines whether or not the radio is required.\n * @defaultValue false\n */\n @Prop() required = false;\n\n /**\n * The value of the radio that is submitted with a form.\n */\n @Prop() value: string;\n\n /**\n * Emits a boolean indicating whether the checkbox is currently checked or unchecked.\n */\n @Event() pdsRadioChange: EventEmitter<boolean>;\n\n private handleRadioChange = (e: Event) => {\n if (this.disabled) {\n return;\n }\n\n const target = e.target as HTMLInputElement;\n const isChecked = target.checked;\n\n this.pdsRadioChange.emit(isChecked);\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.invalid) {\n classNames.push('is-invalid');\n }\n if (this.disabled) {\n classNames.push('is-disabled');\n }\n\n return classNames.join(' ');\n }\n\n render() {\n return (\n <Host class={this.classNames()}>\n <input\n aria-describedby={assignDescription(this.componentId, this.invalid, this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n type=\"radio\"\n id={this.componentId}\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n onChange={this.handleRadioChange}\n />\n <PdsLabel htmlFor={this.componentId} text={this.label} />\n {this.helperMessage &&\n <div\n class={'pds-radio__message'}\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </div>\n }\n {this.errorMessage &&\n <div\n class={`pds-radio__message pds-radio__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"]}
|
|
1
|
+
{"version":3,"file":"pds-radio.js","sourceRoot":"","sources":["../../../src/components/pds-radio/pds-radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAO9C,MAAM,OAAO,QAAQ;;QA4DX,sBAAiB,GAAG,CAAC,CAAQ,EAAE,EAAE;YACvC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,OAAO;YACT,CAAC;YAED,MAAM,MAAM,GAAG,CAAC,CAAC,MAA0B,CAAC;YAC5C,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC;YAEjC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAA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AAI,CAAC,YAAY;gBAChB,4DACE,KAAK,EAAE,8CAA8C,EACrD,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,eAC9B,WAAW;oBAErB,iEAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,GAAG;oBACtC,IAAI,CAAC,YAAY,CACd,CAEH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter } 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-radio',\n styleUrls: ['../../global/styles/utils/label.scss', 'pds-radio.scss'],\n scoped: true,\n})\nexport class PdsRadio {\n /**\n * Determines whether or not the radio is checked.\n * @defaultValue false\n */\n @Prop() checked = false;\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 whether or not the radio 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 radio.\n */\n @Prop() helperMessage: string;\n\n /**\n * Determines whether or not the radio is invalid.\n * @defaultValue false\n */\n @Prop() invalid = false;\n\n /**\n * String used for label text next to radio.\n */\n @Prop() label: string;\n\n /**\n * String used for radio `name` attribute.\n */\n @Prop() name: string;\n\n /**\n * Determines whether or not the radio is required.\n * @defaultValue false\n */\n @Prop() required = false;\n\n /**\n * The value of the radio that is submitted with a form.\n */\n @Prop() value: string;\n\n /**\n * Emits a boolean indicating whether the checkbox is currently checked or unchecked.\n */\n @Event() pdsRadioChange: EventEmitter<boolean>;\n\n private handleRadioChange = (e: Event) => {\n if (this.disabled) {\n return;\n }\n\n const target = e.target as HTMLInputElement;\n const isChecked = target.checked;\n\n this.pdsRadioChange.emit(isChecked);\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.invalid) {\n classNames.push('is-invalid');\n }\n if (this.disabled) {\n classNames.push('is-disabled');\n }\n\n return classNames.join(' ');\n }\n\n render() {\n return (\n <Host class={this.classNames()}>\n <input\n aria-describedby={assignDescription(this.componentId, this.invalid, this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n type=\"radio\"\n id={this.componentId}\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n onChange={this.handleRadioChange}\n />\n <PdsLabel htmlFor={this.componentId} text={this.label} />\n {this.helperMessage &&\n <div\n class={'pds-radio__message'}\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </div>\n }\n {this.errorMessage &&\n <div\n class={`pds-radio__message pds-radio__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"]}
|
|
@@ -32,7 +32,7 @@ export class PdsRow {
|
|
|
32
32
|
})), (this.minHeight && {
|
|
33
33
|
'min-height': this.minHeight,
|
|
34
34
|
}));
|
|
35
|
-
return h(Host, { key: '
|
|
35
|
+
return h(Host, { key: '1984453536572d4bab9efc4c07e64a4e39d9c80a', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
|
|
36
36
|
}
|
|
37
37
|
static get is() { return "pds-row"; }
|
|
38
38
|
static get originalStyleUrls() {
|
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
label {
|
|
21
|
-
font: var(--pine-typography-body-medium);
|
|
22
21
|
grid-area: label;
|
|
23
|
-
letter-spacing: var(--pine-letter-spacing);
|
|
24
22
|
margin-block-end: var(--pine-dimension-2xs);
|
|
25
23
|
}
|
|
26
24
|
|
|
@@ -51,7 +49,7 @@ select:disabled {
|
|
|
51
49
|
cursor: not-allowed;
|
|
52
50
|
}
|
|
53
51
|
select:has(~ .pds-select__message .pds-select__error-message) {
|
|
54
|
-
background-color: var(--pine-color-
|
|
52
|
+
background-color: var(--pine-select-color-background-danger);
|
|
55
53
|
border-color: var(--pine-color-border-danger);
|
|
56
54
|
}
|
|
57
55
|
select:has(~ .pds-select__message .pds-select__error-message):focus-visible {
|
|
@@ -60,7 +58,7 @@ select:has(~ .pds-select__message .pds-select__error-message):focus-visible {
|
|
|
60
58
|
}
|
|
61
59
|
|
|
62
60
|
:host(.is-invalid) select {
|
|
63
|
-
background-color: var(--pine-color-
|
|
61
|
+
background-color: var(--pine-select-color-background-danger);
|
|
64
62
|
border-color: var(--pine-color-border-danger);
|
|
65
63
|
}
|
|
66
64
|
:host(.is-invalid) select:focus-visible {
|
|
@@ -111,18 +111,18 @@ export class PdsSelect {
|
|
|
111
111
|
return classNames.join(' ');
|
|
112
112
|
}
|
|
113
113
|
render() {
|
|
114
|
-
return (h(Host, { key: '
|
|
114
|
+
return (h(Host, { key: 'ea97867a2935648e8b780c3d04844144853b8a10', "aria-disabled": this.disabled ? 'true' : null, class: this.classNames() }, h("div", { key: '16d78573e7d8d0827cf87fb002692001246da99f', class: "pds-select" }, h(PdsLabel, { key: '71de457a56664cb7aabb104c08fd54eef0a9b5d2', htmlFor: this.componentId, text: this.label }), h("select", { key: 'd7e6c1072b8a8194a17d96f00f9214743d2c9572', 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: '16b1ac951267636f99252d12f7ae2b380b63a615', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, h("slot", { key: 'bb87fcabf1caf5faa918dd02ecaa3bd73d435081', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && h("pds-icon", { key: 'deb6fa5a734126a091a3544ed57778f0432ffc7c', class: "pds-select__select-icon", icon: enlarge }))));
|
|
115
115
|
}
|
|
116
116
|
static get is() { return "pds-select"; }
|
|
117
117
|
static get encapsulation() { return "shadow"; }
|
|
118
118
|
static get originalStyleUrls() {
|
|
119
119
|
return {
|
|
120
|
-
"$": ["pds-select.scss"]
|
|
120
|
+
"$": ["pds-select.tokens.scss", "../../global/styles/utils/label.scss", "pds-select.scss"]
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
static get styleUrls() {
|
|
124
124
|
return {
|
|
125
|
-
"$": ["pds-select.css"]
|
|
125
|
+
"$": ["pds-select.tokens.css", "../../global/styles/utils/label.css", "pds-select.css"]
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
static get properties() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-select.js","sourceRoot":"","sources":["../../../src/components/pds-select/pds-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAOvD,MAAM,OAAO,SAAS;;QA4GpB;;UAEE;QACM,mBAAc,GAAG,CAAC,CAAQ,EAAE,EAAE;YACpC,MAAM,MAAM,GAAG,CAAC,CAAC,MAA2B,CAAA;YAE5C,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;iBACpC,MAAM,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C7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,EAAuB,CAAC,GAC9C;gBACZ,2EAAiB,MAAM,EAAC,KAAK,EAAC,QAAQ,EAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;oBAC3E,6DAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAS,CAC9C;gBACL,IAAI,CAAC,cAAc,EAAE;gBACrB,CAAC,IAAI,CAAC,QAAQ,IAAI,iEAAU,KAAK,EAAC,yBAAyB,EAAC,IAAI,EAAE,OAAO,GAAI,CAC1E,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Host, h, Prop, Watch } from '@stencil/core';\nimport { messageId } from '../../utils/form';\nimport { PdsLabel } from '../_internal/pds-label/pds-label';\nimport { danger, enlarge } from '@pine-ds/icons/icons';\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 icon={danger} size=\"small\"></pds-icon>\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\" icon={enlarge} />}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pds-select.js","sourceRoot":"","sources":["../../../src/components/pds-select/pds-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAOvD,MAAM,OAAO,SAAS;;QA4GpB;;UAEE;QACM,mBAAc,GAAG,CAAC,CAAQ,EAAE,EAAE;YACpC,MAAM,MAAM,GAAG,CAAC,CAAC,MAA2B,CAAA;YAE5C,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;iBACpC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;iBACtC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAEtC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACxC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAC3B,CAAC;iBAAM,CAAC;gBACJ,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;YACxB,CAAC;YAED,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAe,CAAC,CAAC;QAC7C,CAAC,CAAC;QAEF;;;;;WAKG;QACK,qBAAgB,GAAG,GAAG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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Host, h, Prop, Watch } from '@stencil/core';\nimport { messageId } from '../../utils/form';\nimport { PdsLabel } from '../_internal/pds-label/pds-label';\nimport { danger, enlarge } from '@pine-ds/icons/icons';\n\n@Component({\n tag: 'pds-select',\n styleUrls: ['pds-select.tokens.scss', '../../global/styles/utils/label.scss', '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 icon={danger} size=\"small\"></pds-icon>\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\" icon={enlarge} />}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -18,7 +18,7 @@ export class PdsSortableItem {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: 'a1cb930442bdca3f9aedbc256b70d6582068186a', class: "pds-sortable-item", id: this.componentId }, this.showHandle && (h("div", { key: 'ad13a6f870cbae41faf4958979a0cda900e0f2f8', class: "pds-sortable-item__handle" }, h("pds-icon", { key: '1a45cc357b22c6fff2baaeb101544bc872703566', icon: handleIcon }))), h("slot", { key: '2b2f5b99b7e97069555b81e8c4539fa6ca48de41' }), this.enableActions && (h("div", { key: '97c23c665a260a153c7db5cbc9772f616fafb3f7', class: "pds-sortable-item__actions" }, h("slot", { key: 'e4b9b759a16f33919eb774fa021588b55df675dc', name: "sortable-item-actions" })))));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "pds-sortable-item"; }
|
|
24
24
|
static get encapsulation() { return "scoped"; }
|
|
@@ -35,7 +35,7 @@ export class PdsSortable {
|
|
|
35
35
|
Sortable.create(this.el, sortableOptions);
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: 'e87cbd8beffd24f25c549fc405b2db3136174086', class: this.classNames(), id: this.componentId }, h("slot", { key: '6292f89c3f12a440ae1f0f52ad5d1c36000eeb87' })));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "pds-sortable"; }
|
|
41
41
|
static get encapsulation() { return "scoped"; }
|
|
@@ -61,7 +61,6 @@ label {
|
|
|
61
61
|
cursor: pointer;
|
|
62
62
|
display: inline-flex;
|
|
63
63
|
flex-grow: 1;
|
|
64
|
-
font-weight: var(--pine-font-weight-medium);
|
|
65
64
|
margin-inline-start: var(--pine-dimension-150);
|
|
66
65
|
}
|
|
67
66
|
.pds-switch--error label {
|
|
@@ -73,6 +72,7 @@ label {
|
|
|
73
72
|
flex: 1 0 100%;
|
|
74
73
|
font: var(--pine-typography-body-sm-medium);
|
|
75
74
|
margin-block-start: var(--pine-dimension-xs);
|
|
75
|
+
margin-inline-start: var(--pine-dimension-2xl);
|
|
76
76
|
}
|
|
77
77
|
.pds-switch__message + .pds-switch__message {
|
|
78
78
|
margin-block-start: var(--pine-dimension-2xs);
|
|
@@ -90,7 +90,6 @@ input:disabled {
|
|
|
90
90
|
cursor: not-allowed;
|
|
91
91
|
}
|
|
92
92
|
input:disabled ~ label {
|
|
93
|
-
color: var(--pine-color-text-disabled);
|
|
94
93
|
cursor: initial;
|
|
95
94
|
}
|
|
96
95
|
input:disabled:hover::after {
|
|
@@ -33,20 +33,20 @@ export class PdsSwitch {
|
|
|
33
33
|
this.value = undefined;
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h(Host, { key: '
|
|
37
|
-
h("div", { key: '
|
|
38
|
-
h("div", { key: '
|
|
36
|
+
return (h(Host, { key: 'c4d1c78da3de4034094ff3bc1167437e33ebd9fd', class: this.switchClassNames(), "aria-disabled": this.disabled ? 'true' : null }, h("input", { key: '709b51cfd719b5498395e0921536606124c84626', "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: 'cf834cf60234a6a041d0fe75632ee13220b25fd3', classNames: "pds-switch__label", htmlFor: this.componentId, text: this.label }), this.helperMessage &&
|
|
37
|
+
h("div", { key: '93424c713be90c58cbe0330859688f8fee15163c', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
38
|
+
h("div", { key: 'a20a1c59aefe4e33fd6f595a80408626c8d2623e', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: 'c35d6daab76aeec7f64e72a38b1c8fe59ea5d897', icon: danger, size: "small" }), this.errorMessage)));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "pds-switch"; }
|
|
41
41
|
static get encapsulation() { return "shadow"; }
|
|
42
42
|
static get originalStyleUrls() {
|
|
43
43
|
return {
|
|
44
|
-
"$": ["pds-switch.scss"]
|
|
44
|
+
"$": ["../../global/styles/utils/label.scss", "pds-switch.scss"]
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
static get styleUrls() {
|
|
48
48
|
return {
|
|
49
|
-
"$": ["pds-switch.css"]
|
|
49
|
+
"$": ["../../global/styles/utils/label.css", "pds-switch.css"]
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
static get properties() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-switch.js","sourceRoot":"","sources":["../../../src/components/pds-switch/pds-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAO9C,MAAM,OAAO,SAAS;;QA0DZ,mBAAc,GAAG,CAAC,CAAQ,EAAE,EAAE;YACpC,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAE1B,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAC;YAC3C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;YAC7B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAe,CAAC,CAAC;QAC7C,CAAC,CAAC;QAEM,qBAAgB,GAAG,GAAG,EAAE;YAC9B,IAAI,aAAa,GAAG,YAAY,CAAC;YAEjC,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;gBAC1B,aAAa,IAAI,oBAAoB,CAAC;YACxC,CAAC;YACD,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;gBACrC,aAAa,IAAI,sBAAsB,CAAC;YAC1C,CAAC;YACD,OAAO,aAAa,CAAC;QACvB,CAAC,CAAC;;uBAjEiC,KAAK;wBAKpB,KAAK;;;uBAeN,KAAK;;;wBAeJ,KAAK;;;IAgCzB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,gBA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop } from '@stencil/core';\nimport { assignDescription, messageId } from '../../utils/form';\nimport { PdsLabel } from '../_internal/pds-label/pds-label';\nimport { danger } from '@pine-ds/icons/icons';\n\n@Component({\n tag: 'pds-switch',\n styleUrls: ['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"]}
|
|
1
|
+
{"version":3,"file":"pds-switch.js","sourceRoot":"","sources":["../../../src/components/pds-switch/pds-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAO9C,MAAM,OAAO,SAAS;;QA0DZ,mBAAc,GAAG,CAAC,CAAQ,EAAE,EAAE;YACpC,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAE1B,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAC;YAC3C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OA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C,mBAAmB,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,GAAI;YACvF,IAAI,CAAC,aAAa;gBACjB,4DACE,KAAK,EAAE,qBAAqB,EAC5B,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,IAExC,IAAI,CAAC,aAAa,CACf;YAEP,IAAI,CAAC,YAAY;gBAChB,4DACE,KAAK,EAAE,gDAAgD,EACvD,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,eAC9B,WAAW;oBAErB,iEAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,GAAG;oBACtC,IAAI,CAAC,YAAY,CACd,CAEH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop } from '@stencil/core';\nimport { assignDescription, messageId } from '../../utils/form';\nimport { PdsLabel } from '../_internal/pds-label/pds-label';\nimport { danger } from '@pine-ds/icons/icons';\n\n@Component({\n tag: 'pds-switch',\n styleUrls: ['../../global/styles/utils/label.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"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class PdsTableBody {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: '41157c331cf95bb8044016a19244b4773c0a719a', role: "rowgroup" }, h("slot", { key: '366c8c12343cb47ca01c84e20bba94a191b1d3b4' })));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "pds-table-body"; }
|
|
7
7
|
static get encapsulation() { return "shadow"; }
|
|
@@ -34,11 +34,11 @@ export class PdsTableCell {
|
|
|
34
34
|
return classNames.join(' ');
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return (h(Host, { key: '
|
|
37
|
+
return (h(Host, { key: '1c66a12a003b939e523af9885dd4812bb6d0381e', class: this.classNames(), role: "gridcell", style: this.tableRef &&
|
|
38
38
|
this.tableRef.fixedColumn &&
|
|
39
39
|
this.tableRef.selectable
|
|
40
40
|
? { '--fixed-cell-position': '40px' }
|
|
41
|
-
: {} }, h("slot", { key: '
|
|
41
|
+
: {} }, h("slot", { key: 'e0741820507ca0ac27ef693a0f4e553c1d90ba1e' })));
|
|
42
42
|
}
|
|
43
43
|
static get is() { return "pds-table-cell"; }
|
|
44
44
|
static get encapsulation() { return "shadow"; }
|
|
@@ -34,7 +34,7 @@ export class PdsTableHead {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return (h(Host, { key: '
|
|
37
|
+
return (h(Host, { key: '400ce9df17b3e7237b06c53e511c06f96e794cc3', role: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-head-cell", { key: '177e4324e68c94a3bf4ccf6211a68ea9a16dcd21', part: this.tableRef.selectable ? 'checkbox-cell' : '' }, h("pds-checkbox", { key: '3de990702506daebe0920bc0b41b05a66598e33c', componentId: this.generateUniqueId(), indeterminate: this.indeterminate, onInput: this.handleInput, label: "Select All Rows", labelHidden: true, checked: this.isSelected }))), h("slot", { key: '3f7c275d9ba797413c7c00f10598165b140f9370' })));
|
|
38
38
|
}
|
|
39
39
|
static get is() { return "pds-table-head"; }
|
|
40
40
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,11 +51,11 @@ export class PdsTableHeadCell {
|
|
|
51
51
|
return classNames.join(' ');
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: 'cc69c3960907c848101775317b0ff4e700e055e8', class: this.classNames(), role: "columnheader", onClick: this.toggleSort, style: this.tableRef &&
|
|
55
55
|
this.tableRef.fixedColumn &&
|
|
56
56
|
this.tableRef.selectable
|
|
57
57
|
? { '--fixed-cell-position': '40px' }
|
|
58
|
-
: {} }, h("slot", { key: '
|
|
58
|
+
: {} }, h("slot", { key: '02d63e30c6e05104b14fba26cf9f95709feb9d6c' }), this.sortable && (h("pds-icon", { key: 'e19c0af58d1ab0a909c72f6ddac89eacb6013a20', icon: this.sortingDirection === 'asc' ? upSmall : downSmall }))));
|
|
59
59
|
}
|
|
60
60
|
static get is() { return "pds-table-head-cell"; }
|
|
61
61
|
static get encapsulation() { return "shadow"; }
|
|
@@ -45,7 +45,7 @@ export class PdsTableRow {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (h(Host, { key: '
|
|
48
|
+
return (h(Host, { key: '6d45bf5daa277f7be53ddeb0160d6385cf7deaf8', class: this.classNames(), role: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-cell", { key: '41ede9f594d32ddc8c579fd76ab5c1f96ec36f15', part: this.tableRef.fixedColumn ? 'checkbox-cell' : '', class: this.tableRef.selectable ? 'has-checkbox' : '' }, h("pds-checkbox", { key: '112919d44ed2ebf59bc656a08b02c48b703c0487', componentId: this.generateUniqueId(), onClick: this.handleClick, indeterminate: this.indeterminate, label: "Select Row", labelHidden: true, checked: this.isSelected }))), h("slot", { key: 'cc280937ec2e77773ac10720e4e9bca9a4610501' })));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "pds-table-row"; }
|
|
51
51
|
static get encapsulation() { return "shadow"; }
|
|
@@ -80,7 +80,7 @@ export class PdsTable {
|
|
|
80
80
|
headerCheckbox.indeterminate = !allSelectedRows && !noneSelectedRows;
|
|
81
81
|
}
|
|
82
82
|
render() {
|
|
83
|
-
return (h(Host, { key: '
|
|
83
|
+
return (h(Host, { key: '7540429df3f462d59b731a08ff610c9d4c2a4d10', class: this.classNames(), id: this.componentId, role: "grid", selectable: this.selectable, tabindex: "0" }, h("slot", { key: '33a267a84e96e7aea042335672dab2a45d46ad15' })));
|
|
84
84
|
}
|
|
85
85
|
static get is() { return "pds-table"; }
|
|
86
86
|
static get encapsulation() { return "shadow"; }
|
|
@@ -11,9 +11,9 @@ export class PdsTab {
|
|
|
11
11
|
this.pdsTabClick.emit([index, parentComponentId]);
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
const availabilityTabEdgeInlineStart = (h("span", { key: '
|
|
15
|
-
const availabilityTabEdgeInlineEnd = (h("span", { key: '
|
|
16
|
-
return (h(Host, { key: '
|
|
14
|
+
const availabilityTabEdgeInlineStart = (h("span", { key: '86bc0085668c8abc70d43b3d51ecb0328c74a250', class: "pds-tab-edge", role: "presentation" }));
|
|
15
|
+
const availabilityTabEdgeInlineEnd = (h("span", { key: '1156c49c0448e6ea11bfe7b292d96c3a396c59e4', class: "pds-tab-edge pds-tab-edge--end", role: "presentation" }));
|
|
16
|
+
return (h(Host, { key: 'fc6a96add1a97e05ad8d85856ce44a3bc99c7581', variant: this.variant, slot: "tabs", index: this.index }, h("button", { key: '41b1b8bf4e74974aa1e375a87d69c149a1fb04e6', 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: '81d264e8ac4e9d94e59ea8c377ac7225f48353db', class: "pds-tab__content" }, h("slot", { key: '9549347c6fc773e9f9b234e72f39fa265e77aac2' })))));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "pds-tab"; }
|
|
19
19
|
static get originalStyleUrls() {
|
|
@@ -7,7 +7,7 @@ export class PdsTabpanel {
|
|
|
7
7
|
this.selected = false;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '63913321e3c0005e6a0e924a4de620ab2e46157a', slot: "tabpanels" }, h("div", { key: '6a7a0af19b0b506c927001484a935220e6b8e966', 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: '57dd1e7e66bb23562b527f9218fa350ed3f3c1a7' }))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "pds-tabpanel"; }
|
|
13
13
|
static get originalStyleUrls() {
|
|
@@ -83,7 +83,7 @@ export class PdsTabs {
|
|
|
83
83
|
this.passPropsToChildren();
|
|
84
84
|
}
|
|
85
85
|
render() {
|
|
86
|
-
return (h(Host, { key: '
|
|
86
|
+
return (h(Host, { key: '93431c0270fb4f658262c43ab65fc144c527d7bf', "active-tab-name": this.activeTabName, class: this.classNames(), id: this.componentId }, h("div", { key: 'a9b216ad2a3612b4bc5219b370efa90b9ef89e1c', class: "pds-tabs__tablist", role: "tablist", "aria-label": this.tablistLabel }, h("slot", { key: 'a4a9a6cf3a3d43ad6b390a041cc1ef18472325f0', name: "tabs" })), h("slot", { key: '729ae2b2a129760d0d347acaee0118ba667b5292', name: "tabpanels" })));
|
|
87
87
|
}
|
|
88
88
|
static get is() { return "pds-tabs"; }
|
|
89
89
|
static get encapsulation() { return "shadow"; }
|
|
@@ -20,7 +20,7 @@ export class PdsText {
|
|
|
20
20
|
${this.weight !== undefined && this.weight.trim() !== '' ? `pds-text--weight-${this.weight}` : ''}
|
|
21
21
|
${this.decoration !== undefined && this.decoration.trim() !== '' ? `pds-text--decoration-${this.decoration}` : ''}
|
|
22
22
|
`;
|
|
23
|
-
return (h(Tag, { key: '
|
|
23
|
+
return (h(Tag, { key: '2484af922fff3a9b3eb4064e1d5bc9d760bba47f', class: typeClasses }, h("slot", { key: '1f7dd37b81a6b0c2c2a7ca55f7616f12f22a67b1' })));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "pds-text"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|