@pine-ds/core 2.16.4 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/index2.js +1 -1
- package/components/index2.js.map +1 -1
- package/components/pds-box.js +11 -2
- package/components/pds-box.js.map +1 -1
- package/components/pds-button2.js +31 -8
- package/components/pds-button2.js.map +1 -1
- package/components/pds-checkbox2.js +3 -3
- package/components/pds-checkbox2.js.map +1 -1
- package/components/pds-chip.js +1 -1
- package/components/pds-copytext.js +2 -2
- package/components/pds-copytext.js.map +1 -1
- package/components/pds-divider.js +1 -1
- package/components/pds-image.js +3 -3
- package/components/pds-image.js.map +1 -1
- package/components/pds-input.js +4 -4
- package/components/pds-link.js +2 -2
- package/components/pds-loader2.js +1 -1
- package/components/pds-popover.js +1 -1
- package/components/pds-progress.js +1 -1
- package/components/pds-radio.js +3 -3
- package/components/pds-row.js +1 -1
- package/components/pds-select.js +2 -2
- package/components/pds-sortable-item.js +1 -1
- package/components/pds-sortable.js +1 -1
- package/components/pds-switch.js +3 -3
- 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 +7 -3
- package/components/pds-text.js.map +1 -1
- package/components/pds-textarea.js +4 -4
- package/components/pds-tooltip.js +2 -2
- package/dist/cjs/{index-603f98cb.js → index-6a0fbd28.js} +2 -2
- package/dist/cjs/{index-603f98cb.js.map → index-6a0fbd28.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pds-accordion.cjs.entry.js +1 -1
- package/dist/cjs/pds-avatar.cjs.entry.js +1 -1
- package/dist/cjs/pds-box.cjs.entry.js +8 -2
- package/dist/cjs/pds-box.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-button.cjs.entry.js +28 -8
- package/dist/cjs/pds-button.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-checkbox.cjs.entry.js +4 -4
- 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 +3 -3
- package/dist/cjs/pds-copytext.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-divider.cjs.entry.js +1 -1
- package/dist/cjs/pds-image.cjs.entry.js +3 -3
- package/dist/cjs/pds-image.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-input.cjs.entry.js +5 -5
- package/dist/cjs/pds-link.cjs.entry.js +3 -3
- package/dist/cjs/pds-loader.cjs.entry.js +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 +4 -4
- package/dist/cjs/pds-row.cjs.entry.js +1 -1
- package/dist/cjs/pds-select.cjs.entry.js +3 -3
- 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 +4 -4
- 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 +4 -2
- package/dist/cjs/pds-text.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-textarea.cjs.entry.js +5 -5
- package/dist/cjs/pds-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/pine-core.cjs.js +1 -1
- package/dist/collection/components/pds-box/pds-box.css +92 -0
- package/dist/collection/components/pds-box/pds-box.js +80 -2
- package/dist/collection/components/pds-box/pds-box.js.map +1 -1
- package/dist/collection/components/pds-box/stories/pds-box.stories.js +3 -0
- package/dist/collection/components/pds-button/pds-button.css +45 -1
- package/dist/collection/components/pds-button/pds-button.js +86 -12
- package/dist/collection/components/pds-button/pds-button.js.map +1 -1
- package/dist/collection/components/pds-button/stories/pds-button.stories.js +46 -11
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +3 -3
- 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.css +10 -13
- 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.css +3 -0
- package/dist/collection/components/pds-image/pds-image.js +2 -2
- package/dist/collection/components/pds-input/pds-input.js +4 -4
- package/dist/collection/components/pds-link/pds-link.js +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.js +3 -3
- package/dist/collection/components/pds-row/pds-row.js +1 -1
- package/dist/collection/components/pds-select/pds-select.js +2 -2
- 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.js +3 -3
- 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.css +31 -7
- package/dist/collection/components/pds-text/pds-text.js +39 -3
- package/dist/collection/components/pds-text/pds-text.js.map +1 -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/docs.json +330 -6
- package/dist/esm/{index-858623fe.js → index-24f87b75.js} +2 -2
- package/dist/esm/{index-858623fe.js.map → index-24f87b75.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pds-accordion.entry.js +1 -1
- package/dist/esm/pds-avatar.entry.js +1 -1
- package/dist/esm/pds-box.entry.js +8 -2
- package/dist/esm/pds-box.entry.js.map +1 -1
- package/dist/esm/pds-button.entry.js +28 -8
- package/dist/esm/pds-button.entry.js.map +1 -1
- package/dist/esm/pds-checkbox.entry.js +4 -4
- 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 +3 -3
- package/dist/esm/pds-copytext.entry.js.map +1 -1
- package/dist/esm/pds-divider.entry.js +1 -1
- package/dist/esm/pds-image.entry.js +3 -3
- package/dist/esm/pds-image.entry.js.map +1 -1
- package/dist/esm/pds-input.entry.js +5 -5
- package/dist/esm/pds-link.entry.js +3 -3
- package/dist/esm/pds-loader.entry.js +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 +4 -4
- package/dist/esm/pds-row.entry.js +1 -1
- package/dist/esm/pds-select.entry.js +3 -3
- package/dist/esm/pds-sortable-item.entry.js +2 -2
- package/dist/esm/pds-sortable.entry.js +1 -1
- package/dist/esm/pds-switch.entry.js +4 -4
- 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 +4 -2
- package/dist/esm/pds-text.entry.js.map +1 -1
- package/dist/esm/pds-textarea.entry.js +5 -5
- package/dist/esm/pds-tooltip.entry.js +2 -2
- package/dist/esm/pine-core.js +1 -1
- package/dist/esm-es5/{index-858623fe.js → index-24f87b75.js} +1 -1
- package/dist/{pine-core/p-2f60d558.js.map → esm-es5/index-24f87b75.js.map} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/pds-accordion.entry.js +1 -1
- package/dist/esm-es5/pds-avatar.entry.js +1 -1
- package/dist/esm-es5/pds-box.entry.js +1 -1
- package/dist/esm-es5/pds-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-copytext.entry.js.map +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-image.entry.js.map +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-link.entry.js +1 -1
- package/dist/esm-es5/pds-loader.entry.js +1 -1
- package/dist/esm-es5/pds-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-row.entry.js +1 -1
- package/dist/esm-es5/pds-select.entry.js +1 -1
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
- package/dist/esm-es5/pds-sortable.entry.js +1 -1
- package/dist/esm-es5/pds-switch.entry.js +1 -1
- package/dist/esm-es5/pds-tab.entry.js +1 -1
- package/dist/esm-es5/pds-table-body.entry.js +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head.entry.js +1 -1
- package/dist/esm-es5/pds-table-row.entry.js +1 -1
- package/dist/esm-es5/pds-table.entry.js +1 -1
- package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
- package/dist/esm-es5/pds-tabs.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js.map +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/pine-core.js.map +1 -1
- package/dist/pine-core/{p-0ad21851.entry.js → p-015d990e.entry.js} +2 -2
- package/dist/pine-core/{p-55cbb360.system.entry.js → p-036267ba.system.entry.js} +2 -2
- package/dist/pine-core/{p-61666500.system.entry.js → p-0561fe8b.system.entry.js} +2 -2
- package/dist/pine-core/p-0561fe8b.system.entry.js.map +1 -0
- package/dist/pine-core/{p-dba6ac9c.system.js → p-06709258.system.js} +1 -1
- package/dist/pine-core/{p-dba6ac9c.system.js.map → p-06709258.system.js.map} +1 -1
- package/dist/pine-core/{p-518f8204.entry.js → p-09a59e3d.entry.js} +2 -2
- package/dist/pine-core/{p-d92c8d63.system.entry.js → p-0eb5831a.system.entry.js} +2 -2
- package/dist/pine-core/{p-d266843a.system.entry.js → p-0fc74497.system.entry.js} +2 -2
- package/dist/pine-core/{p-137aebf6.system.entry.js → p-0fee04db.system.entry.js} +2 -2
- package/dist/pine-core/p-1415445b.entry.js +2 -0
- package/dist/pine-core/{p-910c4422.entry.js.map → p-1415445b.entry.js.map} +1 -1
- package/dist/pine-core/{p-3de0ec6c.system.entry.js → p-1528089a.system.entry.js} +2 -2
- package/dist/pine-core/{p-ce0efc2d.entry.js → p-1701a397.entry.js} +2 -2
- package/dist/pine-core/{p-bda9a6a0.entry.js → p-19fc96d9.entry.js} +2 -2
- package/dist/pine-core/p-19fc96d9.entry.js.map +1 -0
- package/dist/pine-core/{p-b95c0169.system.entry.js → p-1e4dfcdf.system.entry.js} +2 -2
- package/dist/pine-core/{p-5ab15bbc.entry.js → p-1e9f77d7.entry.js} +2 -2
- package/dist/pine-core/p-219de09d.entry.js +2 -0
- package/dist/pine-core/p-219de09d.entry.js.map +1 -0
- package/dist/pine-core/{p-d34b9adb.entry.js → p-22caef95.entry.js} +2 -2
- package/dist/pine-core/p-26e34f6d.system.entry.js +2 -0
- package/dist/pine-core/{p-72218979.system.entry.js → p-2ca6d9cc.system.entry.js} +2 -2
- package/dist/pine-core/{p-b566ad6b.entry.js → p-3ef3b0af.entry.js} +2 -2
- package/dist/pine-core/{p-b2163263.entry.js → p-415666ba.entry.js} +2 -2
- package/dist/pine-core/p-415666ba.entry.js.map +1 -0
- package/dist/pine-core/p-43a47d32.entry.js +2 -0
- package/dist/pine-core/{p-21dc34b7.system.entry.js → p-44b8ab50.system.entry.js} +2 -2
- package/dist/pine-core/{p-138ef0d8.entry.js → p-49d45f31.entry.js} +2 -2
- package/dist/pine-core/p-4b8c1ecc.entry.js +2 -0
- package/dist/pine-core/{p-13bc1706.entry.js.map → p-4b8c1ecc.entry.js.map} +1 -1
- package/dist/pine-core/{p-5d0c0241.entry.js → p-4f325521.entry.js} +2 -2
- package/dist/pine-core/p-5291e641.system.entry.js +2 -0
- package/dist/pine-core/p-5291e641.system.entry.js.map +1 -0
- package/dist/pine-core/{p-10caa9e9.system.entry.js → p-54d8b9e1.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-b245df0a.system.entry.js → p-6165bcc6.system.entry.js} +2 -2
- package/dist/pine-core/{p-8afa0198.system.entry.js → p-61ac9c98.system.entry.js} +2 -2
- package/dist/pine-core/p-6929d7cb.system.entry.js +2 -0
- package/dist/pine-core/p-6929d7cb.system.entry.js.map +1 -0
- package/dist/pine-core/{p-c849426d.entry.js → p-6bc160fc.entry.js} +2 -2
- package/dist/pine-core/{p-0399a821.entry.js → p-6de82ebd.entry.js} +2 -2
- package/dist/pine-core/{p-2f60d558.js → p-6f5ded84.js} +1 -1
- package/dist/{esm-es5/index-858623fe.js.map → pine-core/p-6f5ded84.js.map} +1 -1
- package/dist/pine-core/{p-f70ebb08.system.entry.js → p-7594ef3d.system.entry.js} +2 -2
- package/dist/pine-core/p-7594ef3d.system.entry.js.map +1 -0
- package/dist/pine-core/{p-d8188c09.entry.js → p-7602617b.entry.js} +2 -2
- package/dist/pine-core/{p-fd3e2c23.system.entry.js → p-79dc91b9.system.entry.js} +2 -2
- package/dist/pine-core/p-7be96da6.system.entry.js +2 -0
- package/dist/pine-core/{p-c53f6513.entry.js → p-7c009a26.entry.js} +2 -2
- package/dist/pine-core/p-7c36d948.entry.js +2 -0
- package/dist/pine-core/{p-7cdcf66c.entry.js.map → p-7c36d948.entry.js.map} +1 -1
- package/dist/pine-core/{p-2f80836e.system.entry.js → p-80111ce1.system.entry.js} +2 -2
- package/dist/pine-core/{p-8b9e5fe5.entry.js → p-8148d557.entry.js} +2 -2
- package/dist/pine-core/{p-ee78b4c6.entry.js → p-8b454b50.entry.js} +2 -2
- package/dist/pine-core/{p-acf6cf26.system.entry.js → p-8d033c25.system.entry.js} +2 -2
- package/dist/pine-core/p-96df0855.entry.js +2 -0
- package/dist/pine-core/p-96df0855.entry.js.map +1 -0
- package/dist/pine-core/p-9b34d1b3.system.entry.js +2 -0
- package/dist/pine-core/p-9b34d1b3.system.entry.js.map +1 -0
- package/dist/pine-core/{p-7369f396.entry.js → p-a9212d32.entry.js} +2 -2
- package/dist/pine-core/p-ad6dbf39.system.entry.js +2 -0
- package/dist/pine-core/p-ad6dbf39.system.entry.js.map +1 -0
- package/dist/pine-core/{p-3f256ba6.entry.js → p-b60381ab.entry.js} +2 -2
- package/dist/pine-core/{p-0c68a8ea.system.entry.js → p-c49e6f45.system.entry.js} +2 -2
- package/dist/pine-core/{p-f099836d.entry.js → p-c7234372.entry.js} +2 -2
- package/dist/pine-core/{p-600b7640.system.entry.js → p-cb3b7c9e.system.entry.js} +2 -2
- package/dist/pine-core/{p-4158fa20.system.entry.js → p-cba861d7.system.entry.js} +2 -2
- package/dist/pine-core/{p-b20dd7d7.entry.js → p-d4dff9ff.entry.js} +2 -2
- package/dist/pine-core/p-d795f31b.entry.js +2 -0
- package/dist/pine-core/p-d795f31b.entry.js.map +1 -0
- package/dist/pine-core/{p-c20bc538.system.entry.js → p-e6b357c6.system.entry.js} +2 -2
- package/dist/pine-core/{p-2583c14d.entry.js → p-e73b841b.entry.js} +2 -2
- package/dist/pine-core/{p-b6dfd404.system.entry.js → p-e7af9dcc.system.entry.js} +2 -2
- package/dist/pine-core/{p-b492ea28.system.entry.js → p-e8d3ab88.system.entry.js} +2 -2
- package/dist/pine-core/p-e9b57c23.entry.js +2 -0
- package/dist/pine-core/p-e9b57c23.entry.js.map +1 -0
- package/dist/pine-core/{p-89fd4ca2.entry.js → p-eb22ed9a.entry.js} +2 -2
- package/dist/pine-core/{p-77d8e9fc.entry.js → p-ee1d23e4.entry.js} +2 -2
- package/dist/pine-core/{p-04fb06cd.system.entry.js → p-eefcdc9c.system.entry.js} +2 -2
- package/dist/pine-core/{p-a924b8a6.system.entry.js → p-f3632692.system.entry.js} +2 -2
- package/dist/pine-core/{p-e45ee7bb.entry.js → p-f3fe7aec.entry.js} +2 -2
- package/dist/pine-core/{p-a020513a.system.entry.js → p-f5efebb0.system.entry.js} +2 -2
- package/dist/pine-core/{p-03e4027f.system.entry.js → p-fab101f5.system.entry.js} +2 -2
- 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/logo-facebook-round.svg +1 -1
- package/dist/pine-core/svg/logo-facebook.svg +1 -1
- package/dist/pine-core/svg/logo-tiktok.svg +1 -1
- package/dist/types/components/pds-box/pds-box.d.ts +16 -1
- package/dist/types/components/pds-button/pds-button.d.ts +19 -4
- package/dist/types/components/pds-text/pds-text.d.ts +9 -1
- package/dist/types/components.d.ts +88 -6
- package/hydrate/index.js +101 -63
- package/hydrate/index.mjs +101 -63
- package/package.json +2 -2
- package/dist/pine-core/p-13bc1706.entry.js +0 -2
- package/dist/pine-core/p-21c441f2.system.entry.js +0 -2
- package/dist/pine-core/p-21c441f2.system.entry.js.map +0 -1
- package/dist/pine-core/p-546c2b18.entry.js +0 -2
- package/dist/pine-core/p-546c2b18.entry.js.map +0 -1
- package/dist/pine-core/p-5dd93828.system.entry.js +0 -2
- package/dist/pine-core/p-61666500.system.entry.js.map +0 -1
- package/dist/pine-core/p-61cf32c6.entry.js +0 -2
- package/dist/pine-core/p-61cf32c6.entry.js.map +0 -1
- package/dist/pine-core/p-6bba1784.system.entry.js +0 -2
- package/dist/pine-core/p-6bba1784.system.entry.js.map +0 -1
- package/dist/pine-core/p-7cdcf66c.entry.js +0 -2
- package/dist/pine-core/p-8b3d405b.entry.js +0 -2
- package/dist/pine-core/p-8b3d405b.entry.js.map +0 -1
- package/dist/pine-core/p-910c4422.entry.js +0 -2
- package/dist/pine-core/p-9b2cacf1.entry.js +0 -2
- package/dist/pine-core/p-9b2cacf1.entry.js.map +0 -1
- package/dist/pine-core/p-b2163263.entry.js.map +0 -1
- package/dist/pine-core/p-bda9a6a0.entry.js.map +0 -1
- package/dist/pine-core/p-bf55e42e.system.entry.js +0 -2
- package/dist/pine-core/p-e19d9edd.entry.js +0 -2
- package/dist/pine-core/p-f70ebb08.system.entry.js.map +0 -1
- package/dist/pine-core/p-fad3645f.system.entry.js +0 -2
- package/dist/pine-core/p-fad3645f.system.entry.js.map +0 -1
- package/dist/pine-core/p-fe70473e.system.entry.js +0 -2
- package/dist/pine-core/p-fe70473e.system.entry.js.map +0 -1
- /package/dist/pine-core/{p-0ad21851.entry.js.map → p-015d990e.entry.js.map} +0 -0
- /package/dist/pine-core/{p-55cbb360.system.entry.js.map → p-036267ba.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-518f8204.entry.js.map → p-09a59e3d.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d92c8d63.system.entry.js.map → p-0eb5831a.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d266843a.system.entry.js.map → p-0fc74497.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-137aebf6.system.entry.js.map → p-0fee04db.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3de0ec6c.system.entry.js.map → p-1528089a.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ce0efc2d.entry.js.map → p-1701a397.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b95c0169.system.entry.js.map → p-1e4dfcdf.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5ab15bbc.entry.js.map → p-1e9f77d7.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d34b9adb.entry.js.map → p-22caef95.entry.js.map} +0 -0
- /package/dist/pine-core/{p-bf55e42e.system.entry.js.map → p-26e34f6d.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-72218979.system.entry.js.map → p-2ca6d9cc.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b566ad6b.entry.js.map → p-3ef3b0af.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e19d9edd.entry.js.map → p-43a47d32.entry.js.map} +0 -0
- /package/dist/pine-core/{p-21dc34b7.system.entry.js.map → p-44b8ab50.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-138ef0d8.entry.js.map → p-49d45f31.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5d0c0241.entry.js.map → p-4f325521.entry.js.map} +0 -0
- /package/dist/pine-core/{p-10caa9e9.system.entry.js.map → p-54d8b9e1.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b245df0a.system.entry.js.map → p-6165bcc6.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-8afa0198.system.entry.js.map → p-61ac9c98.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c849426d.entry.js.map → p-6bc160fc.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0399a821.entry.js.map → p-6de82ebd.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d8188c09.entry.js.map → p-7602617b.entry.js.map} +0 -0
- /package/dist/pine-core/{p-fd3e2c23.system.entry.js.map → p-79dc91b9.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5dd93828.system.entry.js.map → p-7be96da6.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c53f6513.entry.js.map → p-7c009a26.entry.js.map} +0 -0
- /package/dist/pine-core/{p-2f80836e.system.entry.js.map → p-80111ce1.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-8b9e5fe5.entry.js.map → p-8148d557.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ee78b4c6.entry.js.map → p-8b454b50.entry.js.map} +0 -0
- /package/dist/pine-core/{p-acf6cf26.system.entry.js.map → p-8d033c25.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7369f396.entry.js.map → p-a9212d32.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3f256ba6.entry.js.map → p-b60381ab.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0c68a8ea.system.entry.js.map → p-c49e6f45.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f099836d.entry.js.map → p-c7234372.entry.js.map} +0 -0
- /package/dist/pine-core/{p-600b7640.system.entry.js.map → p-cb3b7c9e.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-4158fa20.system.entry.js.map → p-cba861d7.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b20dd7d7.entry.js.map → p-d4dff9ff.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c20bc538.system.entry.js.map → p-e6b357c6.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-2583c14d.entry.js.map → p-e73b841b.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b6dfd404.system.entry.js.map → p-e7af9dcc.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b492ea28.system.entry.js.map → p-e8d3ab88.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-89fd4ca2.entry.js.map → p-eb22ed9a.entry.js.map} +0 -0
- /package/dist/pine-core/{p-77d8e9fc.entry.js.map → p-ee1d23e4.entry.js.map} +0 -0
- /package/dist/pine-core/{p-04fb06cd.system.entry.js.map → p-eefcdc9c.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a924b8a6.system.entry.js.map → p-f3632692.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e45ee7bb.entry.js.map → p-f3fe7aec.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a020513a.system.entry.js.map → p-f5efebb0.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-03e4027f.system.entry.js.map → p-fab101f5.system.entry.js.map} +0 -0
|
@@ -3,6 +3,8 @@ import { hasShadowDom } from "../../utils/utils";
|
|
|
3
3
|
import { caretDown } from "@pine-ds/icons/icons";
|
|
4
4
|
/**
|
|
5
5
|
* @part button - Exposes the button element for styling.
|
|
6
|
+
* @part button-content - Exposes the button content for styling.
|
|
7
|
+
* @part button-text - Exposes the button text for styling.
|
|
6
8
|
* @part caret - Exposes the caret icon component for styling. Appears only on the disclosure variant.
|
|
7
9
|
* @part icon - Exposes the icon component for styling.
|
|
8
10
|
*/
|
|
@@ -13,7 +15,7 @@ export class PdsButton {
|
|
|
13
15
|
ev.preventDefault();
|
|
14
16
|
return;
|
|
15
17
|
}
|
|
16
|
-
if (this.type != 'button') {
|
|
18
|
+
if (!this.href && this.type != 'button') {
|
|
17
19
|
// If button clicked IS NOT associated with a form
|
|
18
20
|
if (hasShadowDom(this.el)) {
|
|
19
21
|
const form = this.el.closest('form');
|
|
@@ -33,11 +35,14 @@ export class PdsButton {
|
|
|
33
35
|
this.componentId = undefined;
|
|
34
36
|
this.disabled = false;
|
|
35
37
|
this.fullWidth = false;
|
|
38
|
+
this.href = undefined;
|
|
36
39
|
this.icon = null;
|
|
40
|
+
this.iconOnly = false;
|
|
37
41
|
this.loading = false;
|
|
38
42
|
this.name = undefined;
|
|
39
|
-
this.
|
|
43
|
+
this.target = undefined;
|
|
40
44
|
this.type = 'button';
|
|
45
|
+
this.value = undefined;
|
|
41
46
|
this.variant = 'primary';
|
|
42
47
|
}
|
|
43
48
|
classNames() {
|
|
@@ -45,16 +50,33 @@ export class PdsButton {
|
|
|
45
50
|
if (this.variant) {
|
|
46
51
|
classNames.push('pds-button--' + this.variant);
|
|
47
52
|
}
|
|
53
|
+
if (this.iconOnly) {
|
|
54
|
+
classNames.push('pds-button--icon-only');
|
|
55
|
+
}
|
|
48
56
|
if (this.loading) {
|
|
49
57
|
classNames.push('pds-button--loading');
|
|
50
58
|
}
|
|
51
59
|
return classNames.join(' ');
|
|
52
60
|
}
|
|
53
61
|
render() {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
// Common props for both button and anchor elements
|
|
63
|
+
const commonProps = {
|
|
64
|
+
class: this.classNames(),
|
|
65
|
+
part: 'button',
|
|
66
|
+
};
|
|
67
|
+
const attributes = () => {
|
|
68
|
+
if (this.href) {
|
|
69
|
+
return Object.assign(Object.assign({}, commonProps), { href: this.disabled ? null : this.href, target: this.target });
|
|
70
|
+
}
|
|
71
|
+
return Object.assign(Object.assign({}, commonProps), { 'aria-busy': this.loading ? 'true' : null, 'aria-live': this.loading ? 'polite' : null, 'disabled': this.disabled, 'name': this.name, 'type': this.type, 'value': this.value });
|
|
72
|
+
};
|
|
73
|
+
const ContentElement = this.href ? 'a' : 'button';
|
|
74
|
+
// Hide text when loading or iconOnly is true
|
|
75
|
+
const hideText = this.loading || this.iconOnly;
|
|
76
|
+
const content = (h("div", { class: "pds-button__content", part: "button-content" }, this.icon && this.variant !== 'disclosure' &&
|
|
77
|
+
h("pds-icon", { class: this.loading ? 'pds-button__icon--hidden' : '', name: this.icon, part: "icon", "aria-hidden": "true" }), h("span", { class: `pds-button__text ${hideText ? 'pds-button__text--hidden' : ''}`, part: "button-text" }, h("slot", null)), this.loading && (h("span", { class: "pds-button__loader" }, h("pds-loader", { "is-loading": true, size: "var(--pine-font-size-body-2xl)", variant: "spinner" }, "Loading..."))), this.variant === 'disclosure' &&
|
|
78
|
+
h("pds-icon", { class: this.loading ? 'pds-button__icon--hidden' : '', icon: caretDown, part: "caret", "aria-hidden": "true" })));
|
|
79
|
+
return (h(Host, { "aria-disabled": this.disabled ? 'true' : null, id: this.componentId, onClick: this.handleClick, variant: this.variant }, h(ContentElement, Object.assign({}, attributes()), content)));
|
|
58
80
|
}
|
|
59
81
|
static get is() { return "pds-button"; }
|
|
60
82
|
static get encapsulation() { return "shadow"; }
|
|
@@ -129,6 +151,23 @@ export class PdsButton {
|
|
|
129
151
|
"reflect": false,
|
|
130
152
|
"defaultValue": "false"
|
|
131
153
|
},
|
|
154
|
+
"href": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"mutable": false,
|
|
157
|
+
"complexType": {
|
|
158
|
+
"original": "string",
|
|
159
|
+
"resolved": "string",
|
|
160
|
+
"references": {}
|
|
161
|
+
},
|
|
162
|
+
"required": false,
|
|
163
|
+
"optional": true,
|
|
164
|
+
"docs": {
|
|
165
|
+
"tags": [],
|
|
166
|
+
"text": "If provided, renders the component as an anchor (`<a>`) element instead of a button.\nWhen using href, button-specific props (type, name, value, loading) will be ignored."
|
|
167
|
+
},
|
|
168
|
+
"attribute": "href",
|
|
169
|
+
"reflect": false
|
|
170
|
+
},
|
|
132
171
|
"icon": {
|
|
133
172
|
"type": "string",
|
|
134
173
|
"mutable": false,
|
|
@@ -144,12 +183,30 @@ export class PdsButton {
|
|
|
144
183
|
"name": "defaultValue",
|
|
145
184
|
"text": "null"
|
|
146
185
|
}],
|
|
147
|
-
"text": "Displays an icon
|
|
186
|
+
"text": "Displays an icon in the button."
|
|
148
187
|
},
|
|
149
188
|
"attribute": "icon",
|
|
150
189
|
"reflect": false,
|
|
151
190
|
"defaultValue": "null"
|
|
152
191
|
},
|
|
192
|
+
"iconOnly": {
|
|
193
|
+
"type": "boolean",
|
|
194
|
+
"mutable": false,
|
|
195
|
+
"complexType": {
|
|
196
|
+
"original": "boolean",
|
|
197
|
+
"resolved": "boolean",
|
|
198
|
+
"references": {}
|
|
199
|
+
},
|
|
200
|
+
"required": false,
|
|
201
|
+
"optional": true,
|
|
202
|
+
"docs": {
|
|
203
|
+
"tags": [],
|
|
204
|
+
"text": "When true, displays only the icon and visually hides the text (keeping it accessible)."
|
|
205
|
+
},
|
|
206
|
+
"attribute": "icon-only",
|
|
207
|
+
"reflect": false,
|
|
208
|
+
"defaultValue": "false"
|
|
209
|
+
},
|
|
153
210
|
"loading": {
|
|
154
211
|
"type": "boolean",
|
|
155
212
|
"mutable": false,
|
|
@@ -188,21 +245,21 @@ export class PdsButton {
|
|
|
188
245
|
"attribute": "name",
|
|
189
246
|
"reflect": false
|
|
190
247
|
},
|
|
191
|
-
"
|
|
248
|
+
"target": {
|
|
192
249
|
"type": "string",
|
|
193
250
|
"mutable": false,
|
|
194
251
|
"complexType": {
|
|
195
|
-
"original": "
|
|
196
|
-
"resolved": "
|
|
252
|
+
"original": "'_blank' | '_self' | '_parent' | '_top'",
|
|
253
|
+
"resolved": "\"_blank\" | \"_parent\" | \"_self\" | \"_top\"",
|
|
197
254
|
"references": {}
|
|
198
255
|
},
|
|
199
256
|
"required": false,
|
|
200
257
|
"optional": true,
|
|
201
258
|
"docs": {
|
|
202
259
|
"tags": [],
|
|
203
|
-
"text": "
|
|
260
|
+
"text": "Specifies where to open the linked document when href is provided.\nOnly applies when href is set."
|
|
204
261
|
},
|
|
205
|
-
"attribute": "
|
|
262
|
+
"attribute": "target",
|
|
206
263
|
"reflect": false
|
|
207
264
|
},
|
|
208
265
|
"type": {
|
|
@@ -226,6 +283,23 @@ export class PdsButton {
|
|
|
226
283
|
"reflect": false,
|
|
227
284
|
"defaultValue": "'button'"
|
|
228
285
|
},
|
|
286
|
+
"value": {
|
|
287
|
+
"type": "string",
|
|
288
|
+
"mutable": false,
|
|
289
|
+
"complexType": {
|
|
290
|
+
"original": "string",
|
|
291
|
+
"resolved": "string",
|
|
292
|
+
"references": {}
|
|
293
|
+
},
|
|
294
|
+
"required": false,
|
|
295
|
+
"optional": true,
|
|
296
|
+
"docs": {
|
|
297
|
+
"tags": [],
|
|
298
|
+
"text": "Provides button with a submittable value"
|
|
299
|
+
},
|
|
300
|
+
"attribute": "value",
|
|
301
|
+
"reflect": false
|
|
302
|
+
},
|
|
229
303
|
"variant": {
|
|
230
304
|
"type": "string",
|
|
231
305
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-button.js","sourceRoot":"","sources":["../../../src/components/pds-button/pds-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD
|
|
1
|
+
{"version":3,"file":"pds-button.js","sourceRoot":"","sources":["../../../src/components/pds-button/pds-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop } from '@stencil/core';\nimport { hasShadowDom } from '../../utils/utils';\n\nimport { caretDown } from '@pine-ds/icons/icons';\n\n/**\n * @part button - Exposes the button element for styling.\n * @part button-content - Exposes the button content for styling.\n * @part button-text - Exposes the button text for styling.\n * @part caret - Exposes the caret icon component for styling. Appears only on the disclosure variant.\n * @part icon - Exposes the icon component for styling.\n*/\n\n@Component({\n tag: 'pds-button',\n styleUrls: ['pds-button.scss'],\n shadow: true,\n})\nexport class PdsButton {\n @Element() el: HTMLPdsButtonElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Determines the button's disabled state.\n * @defaultValue false\n */\n @Prop() disabled? = false;\n\n /**\n * Determines if the button should take up the full width of its container.\n * @defaultValue false\n */\n @Prop() fullWidth? = false;\n\n /**\n * If provided, renders the component as an anchor (`<a>`) element instead of a button.\n * When using href, button-specific props (type, name, value, loading) will be ignored.\n */\n @Prop() href?: string;\n\n /**\n * Displays an icon in the button.\n * @defaultValue null\n */\n @Prop() icon?: string = null;\n\n /**\n * When true, displays only the icon and visually hides the text (keeping it accessible).\n */\n @Prop() iconOnly? = false;\n\n /**\n * Determines if the button is in a loading state.\n * When true, displays a loader and hides the button text.\n * @defaultValue false\n */\n @Prop() loading? = false;\n\n /**\n * Provides the button with a submittable name.\n */\n @Prop() name?: string;\n\n /**\n * Specifies where to open the linked document when href is provided.\n * Only applies when href is set.\n */\n @Prop() target?: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * Provides button with a type.\n * @defaultValue button\n */\n @Prop() type?: 'button' | 'reset' | 'submit' = 'button';\n\n /**\n * Provides button with a submittable value\n */\n @Prop() value?: string;\n\n /**\n * Sets the style variant of the button.\n * @defaultValue primary\n */\n @Prop() variant: 'primary' | 'secondary' | 'accent' | 'disclosure' | 'destructive' | 'unstyled' = 'primary';\n\n @Event() pdsClick: EventEmitter;\n\n private handleClick = (ev: Event) => {\n if (this.loading) {\n ev.preventDefault();\n return;\n }\n\n if (!this.href && this.type != 'button') {\n // If button clicked IS NOT associated with a form\n if (hasShadowDom(this.el)) {\n const form = this.el.closest('form');\n if (form) {\n ev.preventDefault();\n\n const fakeButton = document.createElement('button');\n fakeButton.type = this.type;\n fakeButton.style.display = 'none';\n form.appendChild(fakeButton);\n fakeButton.click();\n fakeButton.remove();\n }\n }\n }\n this.pdsClick.emit(ev);\n };\n\n private classNames() {\n const classNames = ['pds-button'];\n\n if (this.variant) {\n classNames.push('pds-button--' + this.variant);\n }\n\n if (this.iconOnly) {\n classNames.push('pds-button--icon-only');\n }\n\n if (this.loading) {\n classNames.push('pds-button--loading');\n }\n\n return classNames.join(' ');\n }\n\n render() {\n // Common props for both button and anchor elements\n const commonProps = {\n class: this.classNames(),\n part: 'button',\n };\n\n const attributes = () => {\n if (this.href) {\n return {\n // Anchor element props\n ...commonProps,\n href: this.disabled ? null : this.href,\n target: this.target,\n };\n }\n\n return {\n // Button element props\n ...commonProps,\n 'aria-busy': this.loading ? 'true' : null,\n 'aria-live': this.loading ? 'polite' : null,\n 'disabled': this.disabled,\n 'name': this.name,\n 'type': this.type,\n 'value': this.value,\n };\n };\n\n const ContentElement = this.href ? 'a' : 'button';\n\n // Hide text when loading or iconOnly is true\n const hideText = this.loading || this.iconOnly;\n\n const content = (\n <div class=\"pds-button__content\" part=\"button-content\">\n {this.icon && this.variant !== 'disclosure' &&\n <pds-icon class={this.loading ? 'pds-button__icon--hidden' : ''} name={this.icon} part=\"icon\" aria-hidden=\"true\"></pds-icon>\n }\n\n <span class={`pds-button__text ${hideText ? 'pds-button__text--hidden' : ''}`} part=\"button-text\">\n <slot />\n </span>\n\n {this.loading && (\n <span class=\"pds-button__loader\">\n <pds-loader is-loading={true} size=\"var(--pine-font-size-body-2xl)\" variant=\"spinner\">\n Loading...\n </pds-loader>\n </span>\n )}\n\n {this.variant === 'disclosure' &&\n <pds-icon class={this.loading ? 'pds-button__icon--hidden' : ''} icon={caretDown} part=\"caret\" aria-hidden=\"true\"></pds-icon>\n }\n </div>\n );\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n id={this.componentId}\n onClick={this.handleClick}\n variant={this.variant}\n >\n <ContentElement {...attributes()}>\n {content}\n </ContentElement>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -20,12 +20,16 @@ const BaseTemplate = (args) => html`
|
|
|
20
20
|
component-id=${args.componentId}
|
|
21
21
|
disabled=${args.disabled}
|
|
22
22
|
full-width=${args.fullWidth}
|
|
23
|
+
href=${args.href}
|
|
24
|
+
icon-only=${args.iconOnly}
|
|
23
25
|
icon=${args.icon}
|
|
24
26
|
loading=${args.loading}
|
|
25
27
|
name=${args.name}
|
|
28
|
+
target=${args.target}
|
|
26
29
|
type=${args.type}
|
|
27
30
|
value=${args.value}
|
|
28
|
-
variant=${args.variant}
|
|
31
|
+
variant=${args.variant}
|
|
32
|
+
>
|
|
29
33
|
${args.slot}
|
|
30
34
|
</pds-button> `;
|
|
31
35
|
|
|
@@ -33,16 +37,30 @@ export const Accent = BaseTemplate.bind();
|
|
|
33
37
|
Accent.args = {
|
|
34
38
|
disabled: false,
|
|
35
39
|
fullWidth: false,
|
|
40
|
+
iconOnly: false,
|
|
36
41
|
loading: false,
|
|
37
42
|
slot: 'Accent',
|
|
38
43
|
type: 'button',
|
|
39
44
|
variant: 'accent',
|
|
40
45
|
};
|
|
41
46
|
|
|
47
|
+
export const ButtonLink = BaseTemplate.bind();
|
|
48
|
+
ButtonLink.args = {
|
|
49
|
+
disabled: false,
|
|
50
|
+
fullWidth: false,
|
|
51
|
+
href: 'https://pine-design-system.netlify.app/',
|
|
52
|
+
iconOnly: false,
|
|
53
|
+
loading: false,
|
|
54
|
+
slot: 'Link Button',
|
|
55
|
+
target: '_blank',
|
|
56
|
+
variant: 'primary',
|
|
57
|
+
};
|
|
58
|
+
|
|
42
59
|
export const Destructive = BaseTemplate.bind({});
|
|
43
60
|
Destructive.args = {
|
|
44
61
|
disabled: false,
|
|
45
62
|
fullWidth: false,
|
|
63
|
+
iconOnly: false,
|
|
46
64
|
loading: false,
|
|
47
65
|
slot: 'Destructive',
|
|
48
66
|
type: 'button',
|
|
@@ -53,6 +71,7 @@ export const Disclosure = BaseTemplate.bind({});
|
|
|
53
71
|
Disclosure.args = {
|
|
54
72
|
disabled: false,
|
|
55
73
|
fullWidth: false,
|
|
74
|
+
iconOnly: false,
|
|
56
75
|
loading: false,
|
|
57
76
|
slot: 'Disclosure',
|
|
58
77
|
type: 'button',
|
|
@@ -68,16 +87,41 @@ export const FullWidth = BaseTemplate.bind({});
|
|
|
68
87
|
FullWidth.args = {
|
|
69
88
|
disabled: false,
|
|
70
89
|
fullWidth: true,
|
|
90
|
+
iconOnly: false,
|
|
71
91
|
loading: false,
|
|
72
92
|
slot: 'Full Width',
|
|
73
93
|
type: 'button',
|
|
74
94
|
variant: 'primary'
|
|
75
95
|
}
|
|
76
96
|
|
|
97
|
+
export const IconOnly = BaseTemplate.bind();
|
|
98
|
+
IconOnly.args = {
|
|
99
|
+
disabled: false,
|
|
100
|
+
fullWidth: false,
|
|
101
|
+
icon: 'favorite',
|
|
102
|
+
iconOnly: true,
|
|
103
|
+
loading: false,
|
|
104
|
+
slot: 'Icon Only',
|
|
105
|
+
type: 'button',
|
|
106
|
+
variant: 'secondary',
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export const Loading = BaseTemplate.bind({});
|
|
110
|
+
Loading.args = {
|
|
111
|
+
disabled: false,
|
|
112
|
+
fullWidth: false,
|
|
113
|
+
iconOnly: false,
|
|
114
|
+
loading: true,
|
|
115
|
+
slot: 'Loading',
|
|
116
|
+
type: 'button',
|
|
117
|
+
variant: 'primary',
|
|
118
|
+
}
|
|
119
|
+
|
|
77
120
|
export const Primary = BaseTemplate.bind({});
|
|
78
121
|
Primary.args = {
|
|
79
122
|
disabled: false,
|
|
80
123
|
fullWidth: false,
|
|
124
|
+
iconOnly: false,
|
|
81
125
|
loading: false,
|
|
82
126
|
slot: 'Primary',
|
|
83
127
|
type: 'button',
|
|
@@ -88,18 +132,9 @@ export const Secondary = BaseTemplate.bind({});
|
|
|
88
132
|
Secondary.args = {
|
|
89
133
|
disabled: false,
|
|
90
134
|
fullWidth: false,
|
|
135
|
+
iconOnly: false,
|
|
91
136
|
loading: false,
|
|
92
137
|
slot: 'Secondary',
|
|
93
138
|
type: 'button',
|
|
94
139
|
variant: 'secondary',
|
|
95
140
|
}
|
|
96
|
-
|
|
97
|
-
export const Loading = BaseTemplate.bind({});
|
|
98
|
-
Loading.args = {
|
|
99
|
-
disabled: false,
|
|
100
|
-
fullWidth: false,
|
|
101
|
-
loading: true,
|
|
102
|
-
slot: 'Loading',
|
|
103
|
-
type: 'button',
|
|
104
|
-
variant: 'primary',
|
|
105
|
-
}
|
|
@@ -50,9 +50,9 @@ export class PdsCheckbox {
|
|
|
50
50
|
return classNames.join(' ');
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
|
-
return (h(Host, { key: '
|
|
54
|
-
h("div", { key: '
|
|
55
|
-
h("div", { key: '
|
|
53
|
+
return (h(Host, { key: '9e2789028b697aa440ff90f44e6899d19403b825', class: this.classNames() }, h("label", { key: '79fdb66797651cc5cf0c7059495df8d7ce61a2af', htmlFor: this.componentId }, h("input", { key: '755975e58732cf844a641faf81f89adc6331c8b8', type: "checkbox", "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, id: this.componentId, indeterminate: this.indeterminate, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleCheckboxChange, onInput: this.handleInput }), h("span", { key: 'ef7401eb659719a2d5dc0d9d5b85e112497e4cf6', class: this.labelHidden ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
|
|
54
|
+
h("div", { key: '76a928518577f4b41c6ff38c9fdf5d6a82022a1e', class: 'pds-checkbox__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
55
|
+
h("div", { key: 'd656cc52b4c02bc7f021ff33649a4f0e9b10cb5d', class: `pds-checkbox__message pds-checkbox__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '59fb3ffc4271ef36a5530bdf8db870a99c876fa7', icon: danger, size: "small" }), this.errorMessage)));
|
|
56
56
|
}
|
|
57
57
|
static get is() { return "pds-checkbox"; }
|
|
58
58
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-checkbox.js","sourceRoot":"","sources":["../../../src/components/pds-checkbox/pds-checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAO9C,MAAM,OAAO,WAAW;;QA0Ed,yBAAoB,GAAG,CAAC,CAAQ,EAAE,EAAE;YAC1C,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,OAAO;YACT,CAAC;YAED,MAAM,MAAM,GAAG,CAAC,CAAC,MAA0B,CAAC;YAC5C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;YAE9B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC;gBAC1B,OAAO,EAAE,MA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ACN,CACD;YACP,IAAI,CAAC,aAAa;gBACjB,4DACE,KAAK,EAAE,uBAAuB,EAC9B,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,IAExC,IAAI,CAAC,aAAa,CACf;YAEP,IAAI,CAAC,YAAY;gBAChB,4DACE,KAAK,EAAE,oDAAoD,EAC3D,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, h, Prop, Host, Event, EventEmitter, Watch } from '@stencil/core';\nimport { assignDescription, messageId } from '../../utils/form';\nimport { CheckboxChangeEventDetail } from './checkbox-interface';\nimport { danger } from '@pine-ds/icons/icons';\n\n@Component({\n tag: 'pds-checkbox',\n styleUrls: ['../../global/styles/utils/label.scss', 'pds-checkbox.scss'],\n shadow: true,\n})\nexport class PdsCheckbox {\n /**\n * It determines whether or not the checkbox is checked.\n */\n @Prop({ mutable: true }) checked?: boolean = 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 * It determines whether or not the checkbox is disabled.\n */\n @Prop() disabled: boolean;\n\n /**\n * Displays message text describing an invalid state.\n */\n @Prop() errorMessage: string;\n\n /**\n * String used for helper message below checkbox.\n */\n @Prop() helperMessage: string;\n\n /**\n * If `true`, the checkbox will visually appear as indeterminate.\n * Only JavaScript can set the objects `indeterminate` property. See [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes).\n */\n @Prop({ mutable: true }) indeterminate: boolean;\n\n /**\n * It determines whether or not the checkbox is invalid.\n */\n @Prop() invalid: boolean;\n\n /**\n * String used for label text next to checkbox.\n */\n @Prop() label: string;\n\n /**\n * Visually hides the label text for instances where only the checkbox should be displayed. Label remains accessible to assistive technology such as screen readers.\n */\n @Prop() labelHidden: boolean;\n\n /**\n * String used for checkbox `name` attribute.\n */\n @Prop() name: string;\n\n /**\n * It determines whether or not the checkbox is required.\n */\n @Prop() required: boolean;\n\n /**\n * The value of the checkbox that is submitted with a form.\n */\n @Prop() value: string;\n\n /**\n * Event emitted that contains the `value` and `checked`.\n */\n @Event() pdsCheckboxChange: EventEmitter<CheckboxChangeEventDetail>;\n\n @Event() pdsCheckboxInput: EventEmitter<CheckboxChangeEventDetail>;\n\n @Watch('checked')\n updateIndeterminate() {\n this.indeterminate = undefined\n }\n\n private handleCheckboxChange = (e: Event) => {\n if (this.disabled) {\n return;\n }\n\n const target = e.target as HTMLInputElement;\n this.checked = target.checked;\n\n this.pdsCheckboxChange.emit({\n checked: target.checked,\n value: this.value\n });\n }\n\n private handleInput = () => {\n this.pdsCheckboxInput.emit({\n checked: this.checked,\n value: this.value\n });\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.invalid) { classNames.push('is-invalid'); }\n if (this.indeterminate) { classNames.push('is-indeterminate'); }\n if (this.disabled) { classNames.push('is-disabled'); }\n\n return classNames.join(' ');\n }\n\n render() {\n return (\n <Host class={this.classNames()}>\n <label htmlFor={this.componentId}>\n <input\n type=\"checkbox\"\n aria-describedby={assignDescription(this.componentId, this.invalid, this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n id={this.componentId}\n indeterminate={this.indeterminate}\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n onChange={this.handleCheckboxChange}\n onInput={this.handleInput}\n />\n <span class={this.labelHidden ? 'visually-hidden' : ''}>\n {this.label}\n </span>\n </label>\n {this.helperMessage &&\n <div\n class={'pds-checkbox__message'}\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </div>\n }\n {this.errorMessage &&\n <div\n class={`pds-checkbox__message pds-checkbox__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"]}
|
|
@@ -31,7 +31,7 @@ export class PdsChip {
|
|
|
31
31
|
return chipContent;
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '2306c195a098f23485ec804c95b0be28f3f8862c', class: this.classNames(), id: this.componentId }, this.setChipContent(), this.variant === 'tag' && (h("button", { key: '172aa562017aad775c2350e40c2bbaa8399d7bb4', class: "pds-chip__close", type: "button", onClick: this.handleCloseClick, "aria-label": "Remove" }, h("pds-icon", { key: 'ea6049e3a22903b3efef3b3ef66be1dee711e20b', icon: remove, size: "12px" })))));
|
|
35
35
|
}
|
|
36
36
|
static get is() { return "pds-chip"; }
|
|
37
37
|
static get encapsulation() { return "shadow"; }
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
:host(.pds-copytext):host(.pds-copytext--bordered) pds-button {
|
|
39
39
|
padding: var(--pine-dimension-none);
|
|
40
40
|
}
|
|
41
|
-
:host(.pds-copytext):host(.pds-copytext--bordered)
|
|
42
|
-
background:
|
|
41
|
+
:host(.pds-copytext):host(.pds-copytext--bordered)::part(button):hover {
|
|
42
|
+
background-color: transparent;
|
|
43
43
|
}
|
|
44
44
|
:host(.pds-copytext):host(.pds-copytext--bordered) span {
|
|
45
45
|
border: var(--pine-border);
|
|
@@ -51,26 +51,23 @@
|
|
|
51
51
|
:host(.pds-copytext):host(.pds-copytext--bordered) :hover span {
|
|
52
52
|
border: var(--pine-border-hover);
|
|
53
53
|
}
|
|
54
|
-
:host(.pds-copytext):host(.pds-copytext--full-width) {
|
|
55
|
-
display: flex;
|
|
54
|
+
:host(.pds-copytext):host(.pds-copytext--full-width) pds-button, :host(.pds-copytext):host(.pds-copytext--truncated) pds-button {
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
min-width: auto;
|
|
56
57
|
width: 100%;
|
|
57
58
|
}
|
|
58
|
-
:host(.pds-copytext):host(.pds-copytext--full-width) pds-button {
|
|
59
|
-
|
|
60
|
-
justify-content: space-between;
|
|
59
|
+
:host(.pds-copytext):host(.pds-copytext--full-width) pds-button::part(button-content), :host(.pds-copytext):host(.pds-copytext--full-width) pds-button::part(button-text), :host(.pds-copytext):host(.pds-copytext--truncated) pds-button::part(button-content), :host(.pds-copytext):host(.pds-copytext--truncated) pds-button::part(button-text) {
|
|
60
|
+
flex-shrink: 1;
|
|
61
61
|
width: 100%;
|
|
62
62
|
}
|
|
63
|
-
:host(.pds-copytext):host(.pds-copytext--full-width) pds-button span {
|
|
63
|
+
:host(.pds-copytext):host(.pds-copytext--full-width) pds-button span, :host(.pds-copytext):host(.pds-copytext--truncated) pds-button span {
|
|
64
64
|
text-align: left;
|
|
65
65
|
width: 100%;
|
|
66
66
|
}
|
|
67
|
-
:host(.pds-copytext):host(.pds-copytext--
|
|
68
|
-
|
|
69
|
-
width: 100%;
|
|
67
|
+
:host(.pds-copytext):host(.pds-copytext--full-width) pds-button {
|
|
68
|
+
justify-content: space-between;
|
|
70
69
|
}
|
|
71
70
|
:host(.pds-copytext):host(.pds-copytext--truncated) pds-button span {
|
|
72
71
|
overflow: hidden;
|
|
73
|
-
text-align: left;
|
|
74
72
|
text-overflow: ellipsis;
|
|
75
|
-
width: 100%;
|
|
76
73
|
}
|
|
@@ -36,7 +36,7 @@ export class PdsCopytext {
|
|
|
36
36
|
return classNames.join(' ');
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: '1d8bc5dd4e234f7ae3f1700d4ad58816422ff967', class: this.classNames(), id: this.componentId }, h("pds-button", { key: 'f1c42d6745efe6faff34ac0e538b589e1d709e41', type: "button", variant: "unstyled", onClick: this.handleClick }, h("span", { key: '2ba277f52661fe3852cf07b089b6f0b978f513f9' }, this.value), h("pds-icon", { key: '5730e7ad241b5ff56733db90c3580d1751c8ec4a', icon: copyIcon, size: "16px" }))));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "pds-copytext"; }
|
|
42
42
|
static get encapsulation() { return "shadow"; }
|
|
@@ -17,7 +17,7 @@ export class PdsDivider {
|
|
|
17
17
|
return classNames.join(' ');
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '320aa3a83547a773630fbb1a1d8d9e57d3f54477', id: this.componentId }, h("hr", { key: '1d1b7aaf8c783ecad6a1b5ad91bd258acb21046b', class: this.classNames() })));
|
|
21
21
|
}
|
|
22
22
|
static get is() { return "pds-divider"; }
|
|
23
23
|
static get encapsulation() { return "shadow"; }
|
|
@@ -11,9 +11,9 @@ export class PdsImage {
|
|
|
11
11
|
this.width = undefined;
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: '043894e2963cd548dc165c5d877d217ebc28b1a4', class: {
|
|
15
15
|
'pds-image': true,
|
|
16
|
-
}, id: this.componentId }, h("img", { key: '
|
|
16
|
+
}, id: this.componentId }, h("img", { key: '1c0c68d060c938922f0df9d398943d033344a592', alt: this.alt, height: this.height, loading: this.loading, sizes: this.sizes, src: this.src, srcset: this.srcset, width: this.width })));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "pds-image"; }
|
|
19
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -115,10 +115,10 @@ export class PdsInput {
|
|
|
115
115
|
return classNames.join(' ');
|
|
116
116
|
}
|
|
117
117
|
render() {
|
|
118
|
-
return (h(Host, { key: '
|
|
119
|
-
h("label", { key: '
|
|
120
|
-
h("p", { key: '
|
|
121
|
-
h("p", { key: '
|
|
118
|
+
return (h(Host, { key: '6e4e04c4db43e707c0681e878c1b1f73deee86ae', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null }, h("div", { key: '6610ccb16fb657e6d97aca89b21ff2e2bc0e3fe1', class: "pds-input" }, this.label &&
|
|
119
|
+
h("label", { key: 'd85cdc84dcd35abcd592e6374e1e3d080f97ab8c', class: "pds-input__label", htmlFor: this.componentId }, this.label), h("input", Object.assign({ key: 'de33a9a5ca6901c9c745fcef9475557cfec1cf91', class: this.inputClassNames(), ref: (input) => this.nativeInput = input, "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, autocomplete: this.autocomplete, disabled: this.disabled, id: this.componentId, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, type: this.type, value: this.value, onInput: this.onInputEvent, onChange: this.onChangeEvent, onBlur: this.onBlurEvent, onFocus: this.onFocusEvent, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd }, this.inheritedAttributes)), this.helperMessage &&
|
|
120
|
+
h("p", { key: '0721204043319effd9ce7ee3fd42a81570ffbdcc', class: "pds-input__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
121
|
+
h("p", { key: '68e71598657e55cb3ca4ad25a23b673bafe1eefb', class: "pds-input__error-message", id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '9d3969d79ecd3ab4bd2a83ff775409b00f8eb3c9', icon: danger, size: "small" }), this.errorMessage))));
|
|
122
122
|
}
|
|
123
123
|
static get is() { return "pds-input"; }
|
|
124
124
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: '7ac75452091305e238c20ef1fc2055fe2f34fb04', class: this.classNames(), href: this.href, id: this.componentId, target: this.external ? '_blank' : undefined, part: "link" }, h("slot", { key: '8f21b34931f85867b91e7c6c3fcc1952b9c430cd' }, this.href), this.external &&
|
|
27
|
+
h("pds-icon", { key: '60f1d607df5bf4cac7a9786f1560702719e73ff5', icon: launch, size: this.fontSize })));
|
|
28
28
|
}
|
|
29
29
|
static get is() { return "pds-link"; }
|
|
30
30
|
static get encapsulation() { return "shadow"; }
|
|
@@ -33,7 +33,7 @@ export class PdsLoader {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h(Host, { key: '
|
|
36
|
+
return (h(Host, { key: 'c01b34ac171a5581e1456737f17043cf8b47af8e', 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: 'ffd9e050fef503f1614c06896b8d888202df8656', class: "pds-loader--spinner" }, h("svg", { key: '056b84ca6f89f6dc93f72d115c9cad3efa9f468d', style: this.style(), viewBox: "0 0 200 200", fill: "none" }, h("defs", { key: '85bfeab6bc686de25e4156154273067fbcb3ba0b' }, h("linearGradient", { key: 'd32d0c03f7f851cd56365af16298c4da0db74ec8', id: "spinner-secondHalf" }, h("stop", { key: '1113756349854bc4ab581c0ce282dcd54def3891', offset: "0%", "stop-opacity": "0", "stop-color": "currentColor" }), h("stop", { key: '0f649b9e828409cab1b67a26d9a35d35e9fe7b0a', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" })), h("linearGradient", { key: '4aabb11799007ae40d7e112696809b35b652bb46', id: "spinner-firstHalf" }, h("stop", { key: '9624d9de9eaba0f29264d3b76bc27287bbc1b68b', offset: "0%", "stop-opacity": "1", "stop-color": "currentColor" }), h("stop", { key: '37fd5de86c5db30731b4dc39b1cd2cb6afbe7393', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" }))), h("g", { key: '06ccf17d191612cd5566714e69299a9e749618da', class: "pds-loader__spinner-path" }, h("path", { key: '9b5556b7c20e3c0f7effaa6d09120baa0b07e614', stroke: "url(#spinner-secondHalf)", d: "M 4 100 A 96 96 0 0 1 196 100" }), h("path", { key: 'aacb689fcace08aa9bee3c3eb2ee1b571ed1b9ee', stroke: "url(#spinner-firstHalf)", d: "M 196 100 A 96 96 0 0 1 4 100" }), h("path", { key: '875a3faf04e718f095d616db6a2cd1c7bcde2f14', stroke: "currentColor", "stroke-linecap": "round", d: "M 4 100 A 96 96 0 0 1 4 98" }))))), this.variant === 'typing' && (h("div", { key: '515a530c8acd7807d45c3f54ff1d264002e3e627', class: "pds-loader--typing" }, h("span", { key: 'bbb55e71064ab200ca388360a8a0986eda5b2008' }), h("span", { key: '77f42ba8124be61565479f21ed9253d928da49b3' }), h("span", { key: 'f8ef81fc9a9bf1a24f0bb3501c49291fe5028c5a' }))), h("div", { key: 'fd73795dfb15359ff655ed6abf4b2e41faa079a7', class: `pds-loader__label ${this.showLabel ? '' : 'pds-loader--hidden'}` }, h("slot", { key: 'cdfb46d54431a84b3ceaaaf94d48f69c42956c8d', 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: '3bed0c38e97500efb2bffcef8321a6b38215c434' }, h("button", { key: '0db59e1815568cb980ce0bbe5ef3502177015a1d', class: "pds-popover__trigger", popoverTarget: this.componentId, popoverTargetAction: this.popoverTargetAction, onClick: this.handleClick }, this.text), h("div", { key: 'd8c70cd36614cb3fc83669a843b00af0d18b03d4', class: `pds-popover ${this.active ? 'pds-popover--active' : ''}`, id: this.componentId, popover: this.popoverType, style: { maxWidth: `${this.maxWidth}px` } }, h("slot", { key: 'e7408b199525e88c0e975f9cc3e96200f82ea23e' }))));
|
|
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: 'a0a7cde165c1acc884366dfe7a368db5d7c4150e', class: this.animated ? { 'is-animated': this.animated } : '' }, h("div", { key: 'c2a8f262e0a6393448a0bc8a05dc49f30c451754', class: "pds-progress" }, h("label", { key: '422c51d5b06ef6d99e23cb2721b861ba9611b1df', class: "pds-progress__label", htmlFor: this.componentId }, this.label), h("progress", { key: '57081cc95c8bb44d6fa26cd7d1f7933108982165', id: this.componentId, max: "100", style: this.fillColor ? { '--color-progress-fill': this.fillColor } : {}, value: this.percent })), this.showPercent && h("div", { key: '37b88967a8584b43407314b0ba70faf4e43a9e5a', class: "pds-progress__percentage" }, this.percent, "%")));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "pds-progress"; }
|
|
15
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -33,9 +33,9 @@ export class PdsRadio {
|
|
|
33
33
|
return classNames.join(' ');
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h(Host, { key: '
|
|
37
|
-
h("div", { key: '
|
|
38
|
-
h("div", { key: '
|
|
36
|
+
return (h(Host, { key: 'f80c386dbbc3d77efbe0f4e2bcc4c78d72650f83', class: this.classNames() }, h("label", { key: '0cc2ae96ebdd1eb769021a72ae69ddf175e4ffe8', htmlFor: this.componentId }, h("input", { key: '8e643d6235a785dbd214ae191066b1b75a979171', "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 }), this.label), this.helperMessage &&
|
|
37
|
+
h("div", { key: 'c1a57d76d77eea12aab82fbfd257188f15ff73a9', class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
38
|
+
h("div", { key: '9e09fc73c58ee4c192ba03a9384ab34f9f038ce7', class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '80a49ff87ed900703a7f9f8d4127ea6e0ae9ca55', icon: danger, size: "small" }), this.errorMessage)));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "pds-radio"; }
|
|
41
41
|
static get encapsulation() { return "scoped"; }
|
|
@@ -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: '2c1ace3d1a16e1b437373d6d56c1d259f16c4525', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
|
|
36
36
|
}
|
|
37
37
|
static get is() { return "pds-row"; }
|
|
38
38
|
static get originalStyleUrls() {
|