@pine-ds/core 3.2.0 → 3.3.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/mock-pds-modal.js +1 -1
- package/components/pds-button2.js +1 -1
- package/components/pds-button2.js.map +1 -1
- package/components/pds-chip.js +21 -6
- package/components/pds-chip.js.map +1 -1
- package/components/pds-input.js +98 -21
- package/components/pds-input.js.map +1 -1
- package/components/pds-link2.js +2 -2
- package/components/pds-loader2.js +1 -1
- package/components/pds-modal-content.js +2 -2
- package/components/pds-modal-footer.js +1 -1
- package/components/pds-modal-header.js +1 -1
- package/components/pds-modal.js +2 -2
- 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 +3 -3
- 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 +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-text2.js +1 -1
- package/components/pds-textarea.js +4 -4
- package/components/pds-toast.js +3 -3
- package/components/pds-tooltip.js +17 -1
- package/components/pds-tooltip.js.map +1 -1
- package/dist/cjs/{index-CG2Rr2io.js → index-B0qLG6KJ.js} +3 -3
- package/dist/cjs/index-B0qLG6KJ.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mock-pds-modal.cjs.entry.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-button.cjs.entry.js +2 -2
- package/dist/cjs/pds-button.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-button.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/pds-chip.cjs.entry.js +21 -7
- package/dist/cjs/pds-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-chip.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-copytext.cjs.entry.js +1 -1
- package/dist/cjs/pds-input.cjs.entry.js +88 -21
- package/dist/cjs/pds-input.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-input.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-link.cjs.entry.js +3 -3
- package/dist/cjs/pds-loader.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal-content.cjs.entry.js +2 -2
- package/dist/cjs/pds-modal-footer.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal-header.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal.cjs.entry.js +2 -2
- 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 -4
- package/dist/cjs/pds-select.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-select.entry.cjs.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 +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 +1 -1
- package/dist/cjs/pds-textarea.cjs.entry.js +5 -5
- package/dist/cjs/pds-toast.cjs.entry.js +3 -3
- package/dist/cjs/pds-tooltip.cjs.entry.js +17 -1
- package/dist/cjs/pds-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-tooltip.entry.cjs.js.map +1 -1
- package/dist/cjs/pine-core.cjs.js +1 -1
- package/dist/collection/components/pds-button/pds-button.css +17 -5
- package/dist/collection/components/pds-chip/pds-chip.css +48 -11
- package/dist/collection/components/pds-chip/pds-chip.js +42 -9
- package/dist/collection/components/pds-chip/pds-chip.js.map +1 -1
- package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +17 -0
- package/dist/collection/components/pds-input/pds-input.css +167 -43
- package/dist/collection/components/pds-input/pds-input.js +212 -21
- package/dist/collection/components/pds-input/pds-input.js.map +1 -1
- package/dist/collection/components/pds-input/stories/pds-input.stories.js +84 -0
- 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-modal/pds-modal-content/pds-modal-content.js +2 -2
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal.js +2 -2
- package/dist/collection/components/pds-modal/test/mock-pds-modal.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.css +34 -4
- package/dist/collection/components/pds-select/pds-select.js +20 -2
- package/dist/collection/components/pds-select/pds-select.js.map +1 -1
- package/dist/collection/components/pds-select/stories/pds-select.stories.js +2 -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.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.js +1 -1
- package/dist/collection/components/pds-textarea/pds-textarea.js +4 -4
- package/dist/collection/components/pds-toast/pds-toast.js +3 -3
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +17 -1
- package/dist/collection/components/pds-tooltip/pds-tooltip.js.map +1 -1
- package/dist/docs.json +255 -11
- package/dist/esm/{index-_4gljHh-.js → index-DpOSrebJ.js} +3 -3
- package/dist/esm/index-DpOSrebJ.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mock-pds-modal.entry.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-button.entry.js +2 -2
- package/dist/esm/pds-button.entry.js.map +1 -1
- package/dist/esm/pds-checkbox.entry.js +1 -1
- package/dist/esm/pds-chip.entry.js +21 -7
- package/dist/esm/pds-chip.entry.js.map +1 -1
- package/dist/esm/pds-copytext.entry.js +1 -1
- package/dist/esm/pds-input.entry.js +88 -21
- 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 +1 -1
- package/dist/esm/pds-modal-content.entry.js +2 -2
- package/dist/esm/pds-modal-footer.entry.js +1 -1
- package/dist/esm/pds-modal-header.entry.js +1 -1
- package/dist/esm/pds-modal.entry.js +2 -2
- 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 -4
- 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 +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 +1 -1
- package/dist/esm/pds-textarea.entry.js +5 -5
- package/dist/esm/pds-toast.entry.js +3 -3
- package/dist/esm/pds-tooltip.entry.js +17 -1
- package/dist/esm/pds-tooltip.entry.js.map +1 -1
- package/dist/esm/pine-core.js +1 -1
- package/dist/esm-es5/{index-_4gljHh-.js → index-DpOSrebJ.js} +1 -1
- package/dist/esm-es5/index-DpOSrebJ.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js +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-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-chip.entry.js +1 -1
- package/dist/esm-es5/pds-chip.entry.js.map +1 -1
- package/dist/esm-es5/pds-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-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-modal-content.entry.js +1 -1
- package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
- package/dist/esm-es5/pds-modal-header.entry.js +1 -1
- package/dist/esm-es5/pds-modal.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-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-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-toast.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js.map +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/pine-core/{p-CV405yTU.system.js.map → p--YvWqEjm.system.js.map} +1 -1
- package/dist/pine-core/p-00599bd8.entry.js +2 -0
- package/dist/pine-core/p-00599bd8.entry.js.map +1 -0
- package/dist/pine-core/{p-833f08f3.entry.js → p-04195bdb.entry.js} +2 -2
- package/dist/pine-core/p-065208a1.system.entry.js +2 -0
- package/dist/pine-core/p-065208a1.system.entry.js.map +1 -0
- package/dist/pine-core/{p-4288c861.entry.js → p-07f45626.entry.js} +2 -2
- package/dist/pine-core/{p-0572825b.entry.js → p-0a11384e.entry.js} +2 -2
- package/dist/pine-core/{p-28e28f42.system.entry.js → p-0a87e2fc.system.entry.js} +2 -2
- package/dist/pine-core/p-0c30661b.system.entry.js +2 -0
- package/dist/pine-core/{p-146fcd44.entry.js → p-10e2feff.entry.js} +2 -2
- package/dist/pine-core/{p-bd04212c.system.entry.js → p-13481ef5.system.entry.js} +2 -2
- package/dist/pine-core/{p-c4294be2.entry.js → p-19c01019.entry.js} +2 -2
- package/dist/pine-core/{p-f2c807ac.entry.js → p-1d395d27.entry.js} +2 -2
- package/dist/pine-core/{p-4ff0838c.entry.js → p-2007a0b5.entry.js} +2 -2
- package/dist/pine-core/{p-78cb1c40.system.entry.js → p-27c0ffda.system.entry.js} +2 -2
- package/dist/pine-core/p-35917a1a.entry.js +2 -0
- package/dist/pine-core/p-39a31730.system.entry.js +2 -0
- package/dist/pine-core/p-39a31730.system.entry.js.map +1 -0
- package/dist/pine-core/{p-1b109c01.entry.js → p-3ea415b0.entry.js} +2 -2
- package/dist/pine-core/p-44f10d3c.entry.js +2 -0
- package/dist/pine-core/p-44f10d3c.entry.js.map +1 -0
- package/dist/pine-core/{p-48e76945.system.entry.js → p-4b2aab79.system.entry.js} +2 -2
- package/dist/pine-core/{p-77c3a10d.entry.js → p-51cc93b3.entry.js} +2 -2
- package/dist/pine-core/{p-83252078.system.entry.js → p-5367f477.system.entry.js} +2 -2
- package/dist/pine-core/{p-a2572675.system.entry.js → p-593df966.system.entry.js} +2 -2
- package/dist/pine-core/{p-d6ac2862.system.entry.js → p-5a437fcd.system.entry.js} +2 -2
- package/dist/pine-core/{p-c0f74199.entry.js → p-60fbeb1c.entry.js} +2 -2
- package/dist/pine-core/p-65a875f6.entry.js +2 -0
- package/dist/pine-core/{p-30142a25.system.entry.js → p-6a7936e7.system.entry.js} +2 -2
- package/dist/pine-core/p-76e35041.entry.js +2 -0
- package/dist/pine-core/{p-d1b222f5.entry.js.map → p-76e35041.entry.js.map} +1 -1
- package/dist/pine-core/{p-86d388a2.entry.js → p-76f7cf21.entry.js} +2 -2
- package/dist/pine-core/{p-121e03ad.system.entry.js → p-78327c08.system.entry.js} +2 -2
- package/dist/pine-core/{p-e2dc81c0.entry.js → p-78f29270.entry.js} +2 -2
- package/dist/pine-core/{p-83c632f6.system.entry.js → p-79cb7835.system.entry.js} +2 -2
- package/dist/pine-core/{p-e9d972db.system.entry.js → p-7bb3a5d4.system.entry.js} +2 -2
- package/dist/pine-core/{p-17d3fa8b.entry.js → p-80f36506.entry.js} +2 -2
- package/dist/pine-core/{p-f47133fd.entry.js → p-8180b641.entry.js} +2 -2
- package/dist/pine-core/{p-a394645a.system.entry.js → p-833b2170.system.entry.js} +2 -2
- package/dist/pine-core/{p-83ffc1cc.entry.js → p-86329612.entry.js} +2 -2
- package/dist/pine-core/p-8b6b0db7.entry.js +2 -0
- package/dist/pine-core/p-8b6b0db7.entry.js.map +1 -0
- package/dist/pine-core/{p-cd2cd116.entry.js → p-8f06b020.entry.js} +2 -2
- package/dist/pine-core/{p-78fb945e.system.entry.js → p-959c8247.system.entry.js} +2 -2
- package/dist/pine-core/{p-f9e01886.system.entry.js → p-96e9774e.system.entry.js} +2 -2
- package/dist/pine-core/p-9c01e81b.system.entry.js +2 -0
- package/dist/pine-core/p-9db1f179.entry.js +2 -0
- package/dist/pine-core/p-9db1f179.entry.js.map +1 -0
- package/dist/pine-core/{p-CWtKi9tV.system.js.map → p-A4_UN20E.system.js.map} +1 -1
- package/dist/pine-core/{p-C-oNYS10.system.js.map → p-BE1qV1Jc.system.js.map} +1 -1
- package/dist/pine-core/{p-BVUeEWjl.system.js.map → p-BEYGfY83.system.js.map} +1 -1
- package/dist/pine-core/p-BHp2IZGP.system.js.map +1 -0
- package/dist/pine-core/{p-DV_GadHU.system.js.map → p-BISuGf0f.system.js.map} +1 -1
- package/dist/pine-core/{p-HBgo7i_E.system.js.map → p-BPQAcMLl.system.js.map} +1 -1
- package/dist/pine-core/{p-CzKqvFNN.system.js.map → p-BaAcO8Mz.system.js.map} +1 -1
- package/dist/pine-core/{p-yku4NLl6.system.js.map → p-BcuE4ZrB.system.js.map} +1 -1
- package/dist/pine-core/p-BsL2GDnH.system.js +1 -1
- package/dist/pine-core/{p-DEsea81X.system.js.map → p-BwHnCFqU.system.js.map} +1 -1
- package/dist/pine-core/{p-D9LPgNmN.system.js.map → p-BxBtA60x.system.js.map} +1 -1
- package/dist/pine-core/{p-Bs9Nyvj2.system.js.map → p-C0oRS1F9.system.js.map} +1 -1
- package/dist/pine-core/{p-Derxa-nn.system.js.map → p-C2d75seA.system.js.map} +1 -1
- package/dist/pine-core/{p-DbVkYdnF.system.js.map → p-CGABEyvz.system.js.map} +1 -1
- package/dist/pine-core/{p-CiDIFl28.system.js.map → p-CIc_XeAg.system.js.map} +1 -1
- package/dist/pine-core/{p-Bo6FQRlR.system.js.map → p-CNYB6FL-.system.js.map} +1 -1
- package/dist/pine-core/{p-DgOMN0Ur.system.js.map → p-CNkajx9x.system.js.map} +1 -1
- package/dist/pine-core/{p-Cj2r1nL6.system.js.map → p-CS2nVL5p.system.js.map} +1 -1
- package/dist/pine-core/{p-B-pTdYoP.system.js.map → p-CTPMEWZT.system.js.map} +1 -1
- package/dist/pine-core/{p-CDIHBBTC.system.js.map → p-CTWkFhWu.system.js.map} +1 -1
- package/dist/pine-core/{p-M2Hhmwex.system.js.map → p-CdzfTGbZ.system.js.map} +1 -1
- package/dist/pine-core/{p-DiJV28pi.system.js.map → p-CkoeYrxa.system.js.map} +1 -1
- package/dist/pine-core/{p-DKSZziVY.system.js.map → p-ClVQjta4.system.js.map} +1 -1
- package/dist/pine-core/{p-DS7q5AvX.system.js.map → p-D2UtaGL2.system.js.map} +1 -1
- package/dist/pine-core/{p-DN9puCWI.system.js.map → p-DGyATOIf.system.js.map} +1 -1
- package/dist/pine-core/p-DMeT5CsE.system.js.map +1 -0
- package/dist/pine-core/{p-CsM74dxm.system.js.map → p-DVhX1_nD.system.js.map} +1 -1
- package/dist/pine-core/p-DeW-6a7f.system.js.map +1 -0
- package/dist/pine-core/{p-BOJnNd1p.system.js.map → p-DgTp_KeO.system.js.map} +1 -1
- package/dist/pine-core/p-DjXmy34u.system.js.map +1 -0
- package/dist/pine-core/{p-_4gljHh-.js → p-DpOSrebJ.js} +1 -1
- package/dist/pine-core/p-DpOSrebJ.js.map +1 -0
- package/dist/pine-core/{p-B4W0_y2p.system.js → p-DyDReOdO.system.js} +1 -1
- package/dist/pine-core/p-DyDReOdO.system.js.map +1 -0
- package/dist/pine-core/{p-CLNi-hRD.system.js.map → p-EqAbQY8l.system.js.map} +1 -1
- package/dist/pine-core/p-Ke8SGZqs.system.js.map +1 -0
- package/dist/pine-core/{p-D-4Xbxlj.system.js.map → p-Mqxw-gWj.system.js.map} +1 -1
- package/dist/pine-core/{p-D5vuiRx2.system.js.map → p-PPIMiuZX.system.js.map} +1 -1
- package/dist/pine-core/{p-CnPERKGo.system.js.map → p-UhZHDNH2.system.js.map} +1 -1
- package/dist/pine-core/{p-d2ccda59.system.entry.js → p-a556a328.system.entry.js} +2 -2
- package/dist/pine-core/{p-6a2296e6.system.entry.js → p-a98cda38.system.entry.js} +2 -2
- package/dist/pine-core/{p-3f82ac77.system.entry.js → p-ab7e4700.system.entry.js} +2 -2
- package/dist/pine-core/{p-3798a631.system.entry.js → p-aeaae417.system.entry.js} +2 -2
- package/dist/pine-core/{p-b7ba6316.entry.js → p-b2820acd.entry.js} +2 -2
- package/dist/pine-core/{p-2296c34f.entry.js → p-bf699bad.entry.js} +2 -2
- package/dist/pine-core/{p-7b38e384.system.entry.js → p-c1909a5d.system.entry.js} +2 -2
- package/dist/pine-core/{p-984578f8.system.entry.js → p-c551191a.system.entry.js} +2 -2
- package/dist/pine-core/{p-1bd715ee.system.entry.js → p-c5e1ed09.system.entry.js} +2 -2
- package/dist/pine-core/p-c5e1ed09.system.entry.js.map +1 -0
- package/dist/pine-core/{p-596e0292.system.entry.js → p-cc21ddcc.system.entry.js} +2 -2
- package/dist/pine-core/{p-b2796d3c.system.entry.js → p-d0adaca0.system.entry.js} +2 -2
- package/dist/pine-core/{p-722012ac.entry.js → p-d28768d1.entry.js} +2 -2
- package/dist/pine-core/{p-24607f93.entry.js → p-d35b3494.entry.js} +2 -2
- package/dist/pine-core/{p-730221a8.system.entry.js → p-d553e05c.system.entry.js} +2 -2
- package/dist/pine-core/{p-04df41d7.system.entry.js → p-d6d453d8.system.entry.js} +2 -2
- package/dist/pine-core/p-dcda4ff5.system.entry.js +2 -0
- package/dist/pine-core/{p-1224c874.entry.js → p-ddcc4932.entry.js} +2 -2
- package/dist/pine-core/{p-c1b0f921.system.entry.js → p-de550d9e.system.entry.js} +2 -2
- package/dist/pine-core/p-dfd5a5b6.system.entry.js +2 -0
- package/dist/pine-core/p-dfd5a5b6.system.entry.js.map +1 -0
- package/dist/pine-core/p-e562ad73.system.entry.js +2 -0
- package/dist/pine-core/p-e562ad73.system.entry.js.map +1 -0
- package/dist/pine-core/p-e9f004c5.entry.js +2 -0
- package/dist/pine-core/p-e9f004c5.entry.js.map +1 -0
- package/dist/pine-core/{p-71265b2a.system.entry.js → p-f46c4618.system.entry.js} +2 -2
- package/dist/pine-core/{p-761946a0.entry.js → p-f6b226df.entry.js} +2 -2
- package/dist/pine-core/{p-bcc4edaa.entry.js → p-f99c59a8.entry.js} +2 -2
- package/dist/pine-core/{p-b3d05184.entry.js → p-fb1eb0c4.entry.js} +2 -2
- package/dist/pine-core/{p-367e188f.entry.js → p-fb2fb435.entry.js} +2 -2
- package/dist/pine-core/p-fd1ef1e1.entry.js +2 -0
- package/dist/pine-core/{p-85ff1482.entry.js → p-fdf3a5ff.entry.js} +2 -2
- package/dist/pine-core/p-fed5f55e.system.entry.js +2 -0
- package/dist/pine-core/pds-button.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-chip.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-input.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-select.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-tooltip.entry.esm.js.map +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/types/components/pds-chip/pds-chip.d.ts +9 -1
- package/dist/types/components/pds-input/pds-input.d.ts +57 -9
- package/dist/types/components/pds-select/pds-select.d.ts +4 -0
- package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +70 -6
- package/hydrate/index.js +187 -73
- package/hydrate/index.mjs +187 -73
- package/package.json +2 -2
- package/dist/cjs/index-CG2Rr2io.js.map +0 -1
- package/dist/esm/index-_4gljHh-.js.map +0 -1
- package/dist/esm-es5/index-_4gljHh-.js.map +0 -1
- package/dist/pine-core/p-0069abf8.system.entry.js +0 -2
- package/dist/pine-core/p-0069abf8.system.entry.js.map +0 -1
- package/dist/pine-core/p-1bd715ee.system.entry.js.map +0 -1
- package/dist/pine-core/p-1eec6bea.system.entry.js +0 -2
- package/dist/pine-core/p-1eec6bea.system.entry.js.map +0 -1
- package/dist/pine-core/p-21c3aaeb.entry.js +0 -2
- package/dist/pine-core/p-29ad0b86.entry.js +0 -2
- package/dist/pine-core/p-29ad0b86.entry.js.map +0 -1
- package/dist/pine-core/p-32bd3e33.entry.js +0 -2
- package/dist/pine-core/p-32bd3e33.entry.js.map +0 -1
- package/dist/pine-core/p-49265849.system.entry.js +0 -2
- package/dist/pine-core/p-71f01676.system.entry.js +0 -2
- package/dist/pine-core/p-742d4490.entry.js +0 -2
- package/dist/pine-core/p-742d4490.entry.js.map +0 -1
- package/dist/pine-core/p-7e92ec48.system.entry.js +0 -2
- package/dist/pine-core/p-7e92ec48.system.entry.js.map +0 -1
- package/dist/pine-core/p-7ff213bb.system.entry.js +0 -2
- package/dist/pine-core/p-8023086c.entry.js +0 -2
- package/dist/pine-core/p-8023086c.entry.js.map +0 -1
- package/dist/pine-core/p-929bb7ab.system.entry.js +0 -2
- package/dist/pine-core/p-B4W0_y2p.system.js.map +0 -1
- package/dist/pine-core/p-BO1OsmVU.system.js.map +0 -1
- package/dist/pine-core/p-CtAVdPaE.system.js.map +0 -1
- package/dist/pine-core/p-D8DRYw9w.system.js.map +0 -1
- package/dist/pine-core/p-DyQ_s5MV.system.js.map +0 -1
- package/dist/pine-core/p-_4gljHh-.js.map +0 -1
- package/dist/pine-core/p-abec6606.entry.js +0 -2
- package/dist/pine-core/p-abec6606.entry.js.map +0 -1
- package/dist/pine-core/p-b9c13f99.entry.js +0 -2
- package/dist/pine-core/p-d1b222f5.entry.js +0 -2
- package/dist/pine-core/p-e09a3682.system.entry.js +0 -2
- package/dist/pine-core/p-e09a3682.system.entry.js.map +0 -1
- package/dist/pine-core/p-e6d6e103.entry.js +0 -2
- package/dist/pine-core/p-xgOOHGQo.system.js.map +0 -1
- /package/dist/pine-core/{p-833f08f3.entry.js.map → p-04195bdb.entry.js.map} +0 -0
- /package/dist/pine-core/{p-4288c861.entry.js.map → p-07f45626.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0572825b.entry.js.map → p-0a11384e.entry.js.map} +0 -0
- /package/dist/pine-core/{p-28e28f42.system.entry.js.map → p-0a87e2fc.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-71f01676.system.entry.js.map → p-0c30661b.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-146fcd44.entry.js.map → p-10e2feff.entry.js.map} +0 -0
- /package/dist/pine-core/{p-bd04212c.system.entry.js.map → p-13481ef5.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c4294be2.entry.js.map → p-19c01019.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f2c807ac.entry.js.map → p-1d395d27.entry.js.map} +0 -0
- /package/dist/pine-core/{p-4ff0838c.entry.js.map → p-2007a0b5.entry.js.map} +0 -0
- /package/dist/pine-core/{p-78cb1c40.system.entry.js.map → p-27c0ffda.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-21c3aaeb.entry.js.map → p-35917a1a.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1b109c01.entry.js.map → p-3ea415b0.entry.js.map} +0 -0
- /package/dist/pine-core/{p-48e76945.system.entry.js.map → p-4b2aab79.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-77c3a10d.entry.js.map → p-51cc93b3.entry.js.map} +0 -0
- /package/dist/pine-core/{p-83252078.system.entry.js.map → p-5367f477.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a2572675.system.entry.js.map → p-593df966.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d6ac2862.system.entry.js.map → p-5a437fcd.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c0f74199.entry.js.map → p-60fbeb1c.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e6d6e103.entry.js.map → p-65a875f6.entry.js.map} +0 -0
- /package/dist/pine-core/{p-30142a25.system.entry.js.map → p-6a7936e7.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-86d388a2.entry.js.map → p-76f7cf21.entry.js.map} +0 -0
- /package/dist/pine-core/{p-121e03ad.system.entry.js.map → p-78327c08.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e2dc81c0.entry.js.map → p-78f29270.entry.js.map} +0 -0
- /package/dist/pine-core/{p-83c632f6.system.entry.js.map → p-79cb7835.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e9d972db.system.entry.js.map → p-7bb3a5d4.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-17d3fa8b.entry.js.map → p-80f36506.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f47133fd.entry.js.map → p-8180b641.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a394645a.system.entry.js.map → p-833b2170.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-83ffc1cc.entry.js.map → p-86329612.entry.js.map} +0 -0
- /package/dist/pine-core/{p-cd2cd116.entry.js.map → p-8f06b020.entry.js.map} +0 -0
- /package/dist/pine-core/{p-78fb945e.system.entry.js.map → p-959c8247.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f9e01886.system.entry.js.map → p-96e9774e.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-929bb7ab.system.entry.js.map → p-9c01e81b.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d2ccda59.system.entry.js.map → p-a556a328.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-6a2296e6.system.entry.js.map → p-a98cda38.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3f82ac77.system.entry.js.map → p-ab7e4700.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3798a631.system.entry.js.map → p-aeaae417.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b7ba6316.entry.js.map → p-b2820acd.entry.js.map} +0 -0
- /package/dist/pine-core/{p-2296c34f.entry.js.map → p-bf699bad.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7b38e384.system.entry.js.map → p-c1909a5d.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-984578f8.system.entry.js.map → p-c551191a.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-596e0292.system.entry.js.map → p-cc21ddcc.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b2796d3c.system.entry.js.map → p-d0adaca0.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-722012ac.entry.js.map → p-d28768d1.entry.js.map} +0 -0
- /package/dist/pine-core/{p-24607f93.entry.js.map → p-d35b3494.entry.js.map} +0 -0
- /package/dist/pine-core/{p-730221a8.system.entry.js.map → p-d553e05c.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-04df41d7.system.entry.js.map → p-d6d453d8.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-49265849.system.entry.js.map → p-dcda4ff5.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1224c874.entry.js.map → p-ddcc4932.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c1b0f921.system.entry.js.map → p-de550d9e.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-71265b2a.system.entry.js.map → p-f46c4618.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-761946a0.entry.js.map → p-f6b226df.entry.js.map} +0 -0
- /package/dist/pine-core/{p-bcc4edaa.entry.js.map → p-f99c59a8.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b3d05184.entry.js.map → p-fb1eb0c4.entry.js.map} +0 -0
- /package/dist/pine-core/{p-367e188f.entry.js.map → p-fb2fb435.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b9c13f99.entry.js.map → p-fd1ef1e1.entry.js.map} +0 -0
- /package/dist/pine-core/{p-85ff1482.entry.js.map → p-fdf3a5ff.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7ff213bb.system.entry.js.map → p-fed5f55e.system.entry.js.map} +0 -0
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { assignDescription, messageId } from "../../utils/form";
|
|
3
|
-
import { danger } from "@pine-ds/icons/icons";
|
|
4
|
-
import { debounceEvent } from "../../utils/utils";
|
|
5
3
|
import { inheritAriaAttributes } from "../../utils/attributes";
|
|
4
|
+
import { debounceEvent } from "../../utils/utils";
|
|
5
|
+
import { danger } from "@pine-ds/icons/icons";
|
|
6
|
+
/**
|
|
7
|
+
* @slot append - Content to be displayed after the input field
|
|
8
|
+
* @slot prefix - Content that is displayed visually within the input field before the input field
|
|
9
|
+
* @slot prepend - Content to be displayed before the input field
|
|
10
|
+
* @slot suffix - Content that is displayed visually within the input field after the input field
|
|
11
|
+
*/
|
|
6
12
|
export class PdsInput {
|
|
7
13
|
constructor() {
|
|
8
14
|
this.inheritedAttributes = {};
|
|
9
15
|
this.isComposing = false;
|
|
16
|
+
/**
|
|
17
|
+
* If true, the input has prefix content (non-focusable)
|
|
18
|
+
*/
|
|
19
|
+
this.hasPrefix = false;
|
|
20
|
+
/**
|
|
21
|
+
* If true, the input has suffix content (non-focusable)
|
|
22
|
+
*/
|
|
23
|
+
this.hasSuffix = false;
|
|
24
|
+
/**
|
|
25
|
+
* If true, the input has prepend content (focusable)
|
|
26
|
+
*/
|
|
27
|
+
this.hasPrepend = false;
|
|
28
|
+
/**
|
|
29
|
+
* If true, the input has append content (focusable)
|
|
30
|
+
*/
|
|
31
|
+
this.hasAppend = false;
|
|
10
32
|
/**
|
|
11
33
|
* Determines the type of control that will be displayed
|
|
12
34
|
* `'email'`, `'number'`, `'password'`, `'tel'`, `'text'`, `'url'`
|
|
@@ -63,6 +85,62 @@ export class PdsInput {
|
|
|
63
85
|
this.nativeInput.focus();
|
|
64
86
|
}
|
|
65
87
|
}
|
|
88
|
+
updateAddonWidths() {
|
|
89
|
+
requestAnimationFrame(() => {
|
|
90
|
+
if (this.prefixEl) {
|
|
91
|
+
const prefixWidth = this.prefixEl.offsetWidth;
|
|
92
|
+
this.el.style.setProperty('--prefix-width', `${prefixWidth}px`);
|
|
93
|
+
}
|
|
94
|
+
if (this.suffixEl) {
|
|
95
|
+
const suffixWidth = this.suffixEl.offsetWidth;
|
|
96
|
+
this.el.style.setProperty('--suffix-width', `${suffixWidth}px`);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
renderPrefix() {
|
|
101
|
+
const hasPrefix = this.el.querySelector('[slot="prefix"]') !== null;
|
|
102
|
+
if (hasPrefix) {
|
|
103
|
+
return (h("div", { class: "pds-input__prefix", part: "prefix", ref: (el) => this.prefixEl = el }, h("slot", { name: "prefix", onSlotchange: () => this.updateAddonWidths() })));
|
|
104
|
+
}
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
renderSuffix() {
|
|
108
|
+
const hasSuffix = this.el.querySelector('[slot="suffix"]') !== null;
|
|
109
|
+
if (hasSuffix) {
|
|
110
|
+
return (h("div", { class: "pds-input__suffix", part: "suffix", ref: (el) => this.suffixEl = el }, h("slot", { name: "suffix", onSlotchange: () => this.updateAddonWidths() })));
|
|
111
|
+
}
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
renderPrepend() {
|
|
115
|
+
const hasPrepend = this.el.querySelector('[slot="prepend"]') !== null;
|
|
116
|
+
if (hasPrepend) {
|
|
117
|
+
return (h("div", { class: "pds-input__prepend", part: "prepend" }, h("slot", { name: "prepend" })));
|
|
118
|
+
}
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
renderAppend() {
|
|
122
|
+
const hasAppend = this.el.querySelector('[slot="append"]') !== null;
|
|
123
|
+
if (hasAppend) {
|
|
124
|
+
return (h("div", { class: "pds-input__append", part: "append" }, h("slot", { name: "append" })));
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
componentWillLoad() {
|
|
129
|
+
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
130
|
+
this.hasPrefix = this.el.querySelector('[slot="prefix"]') !== null;
|
|
131
|
+
this.hasSuffix = this.el.querySelector('[slot="suffix"]') !== null;
|
|
132
|
+
this.hasPrepend = this.el.querySelector('[slot="prepend"]') !== null;
|
|
133
|
+
this.hasAppend = this.el.querySelector('[slot="append"]') !== null;
|
|
134
|
+
// Store the original pdsInput event emitter
|
|
135
|
+
this.originalPdsInput = this.pdsInput;
|
|
136
|
+
}
|
|
137
|
+
componentDidLoad() {
|
|
138
|
+
this.debounceChanged();
|
|
139
|
+
this.updateAddonWidths();
|
|
140
|
+
}
|
|
141
|
+
componentDidUpdate() {
|
|
142
|
+
this.updateAddonWidths();
|
|
143
|
+
}
|
|
66
144
|
debounceChanged() {
|
|
67
145
|
const { pdsInput, debounce, originalPdsInput } = this;
|
|
68
146
|
/**
|
|
@@ -91,7 +169,6 @@ export class PdsInput {
|
|
|
91
169
|
this.pdsChange.emit({ value: newValue, event });
|
|
92
170
|
}
|
|
93
171
|
/**
|
|
94
|
-
*
|
|
95
172
|
* Emits a `pdsInput` event
|
|
96
173
|
*/
|
|
97
174
|
emitInputChange(event) {
|
|
@@ -100,24 +177,20 @@ export class PdsInput {
|
|
|
100
177
|
const newValue = value == null ? value : value.toString();
|
|
101
178
|
this.pdsInput.emit({ value: newValue, event });
|
|
102
179
|
}
|
|
103
|
-
componentWillLoad() {
|
|
104
|
-
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
105
|
-
}
|
|
106
|
-
componentDidLoad() {
|
|
107
|
-
this.debounceChanged();
|
|
108
|
-
}
|
|
109
|
-
inputClassNames() {
|
|
110
|
-
const classNames = ['pds-input__field'];
|
|
111
|
-
if (this.invalid && this.invalid === true) {
|
|
112
|
-
classNames.push('is-invalid');
|
|
113
|
-
}
|
|
114
|
-
return classNames.join(' ');
|
|
115
|
-
}
|
|
116
180
|
render() {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
181
|
+
const { componentId, disabled, errorMessage, helperMessage, invalid = false, label, } = this;
|
|
182
|
+
const value = this.getValue();
|
|
183
|
+
const inputWrapperClasses = {
|
|
184
|
+
'pds-input__field-wrapper': true,
|
|
185
|
+
'has-focus': this.hasFocus,
|
|
186
|
+
'has-error': invalid || !!errorMessage,
|
|
187
|
+
'is-disabled': disabled,
|
|
188
|
+
'has-prefix': this.hasPrefix,
|
|
189
|
+
'has-suffix': this.hasSuffix,
|
|
190
|
+
'has-prepend': this.hasPrepend,
|
|
191
|
+
'has-append': this.hasAppend,
|
|
192
|
+
};
|
|
193
|
+
return (h(Host, { key: '6ae7251aeee049e0e4f3a66c7d947a3ceb7d2b26', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-prefix": this.hasPrefix ? 'true' : null, "has-suffix": this.hasSuffix ? 'true' : null, "has-prepend": this.hasPrepend ? 'true' : null, "has-append": this.hasAppend ? 'true' : null }, h("div", { key: 'f397d329cf587b9bdf699a0c80a3bdb9c1de0b53', class: "pds-input" }, label && (h("label", { key: '7e5523268dd59acb3fbf2bd659f319cc458166c0', htmlFor: componentId, class: "pds-input__label" }, label, this.required && h("span", { key: 'f197ce55768d8409c9c7832af56e0a6bdc27e90a', class: "pds-input__required-indicator" }, " *"))), h("div", { key: 'ad92476c65ad280622a8aa8c731609aff8ec51a4', class: inputWrapperClasses }, this.renderPrepend(), this.renderPrefix(), h("input", Object.assign({ key: '187ee16cc7458af1dc06a7f424ce6bc2ffede359', ref: (input) => (this.nativeInput = input), class: "pds-input__field", "aria-describedby": assignDescription(componentId, invalid, helperMessage), "aria-invalid": invalid ? "true" : undefined, autocomplete: this.autocomplete, disabled: disabled, id: componentId, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, step: this.step, type: this.type, value: value, onInput: this.onInputEvent, onChange: this.onChangeEvent, onBlur: this.onBlurEvent, onFocus: this.onFocusEvent, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd }, this.inheritedAttributes)), this.renderSuffix(), this.renderAppend()), helperMessage && (h("p", { key: 'c11daa2e4ed085033d90a3e9185dd7beb259aa9e', class: "pds-input__helper-message", id: messageId(componentId, 'helper') }, helperMessage)), errorMessage && (h("p", { key: 'd5adbb495bd7abd83655390e0d34cbdf527b656a', class: "pds-input__error-message", id: messageId(componentId, 'error') }, h("pds-icon", { key: 'd1a80c2d7e6f8389488fe2c0bb6dd1923536588a', icon: danger, size: "small" }), errorMessage)))));
|
|
121
194
|
}
|
|
122
195
|
static get is() { return "pds-input"; }
|
|
123
196
|
static get encapsulation() { return "shadow"; }
|
|
@@ -285,6 +358,82 @@ export class PdsInput {
|
|
|
285
358
|
"attribute": "label",
|
|
286
359
|
"reflect": false
|
|
287
360
|
},
|
|
361
|
+
"max": {
|
|
362
|
+
"type": "string",
|
|
363
|
+
"mutable": false,
|
|
364
|
+
"complexType": {
|
|
365
|
+
"original": "string",
|
|
366
|
+
"resolved": "string",
|
|
367
|
+
"references": {}
|
|
368
|
+
},
|
|
369
|
+
"required": false,
|
|
370
|
+
"optional": true,
|
|
371
|
+
"docs": {
|
|
372
|
+
"tags": [],
|
|
373
|
+
"text": "Specifies the maximum value for the input field."
|
|
374
|
+
},
|
|
375
|
+
"getter": false,
|
|
376
|
+
"setter": false,
|
|
377
|
+
"attribute": "max",
|
|
378
|
+
"reflect": false
|
|
379
|
+
},
|
|
380
|
+
"maxlength": {
|
|
381
|
+
"type": "string",
|
|
382
|
+
"mutable": false,
|
|
383
|
+
"complexType": {
|
|
384
|
+
"original": "string",
|
|
385
|
+
"resolved": "string",
|
|
386
|
+
"references": {}
|
|
387
|
+
},
|
|
388
|
+
"required": false,
|
|
389
|
+
"optional": true,
|
|
390
|
+
"docs": {
|
|
391
|
+
"tags": [],
|
|
392
|
+
"text": "Specifies the maximum number of characters allowed in the input field."
|
|
393
|
+
},
|
|
394
|
+
"getter": false,
|
|
395
|
+
"setter": false,
|
|
396
|
+
"attribute": "maxlength",
|
|
397
|
+
"reflect": false
|
|
398
|
+
},
|
|
399
|
+
"min": {
|
|
400
|
+
"type": "string",
|
|
401
|
+
"mutable": false,
|
|
402
|
+
"complexType": {
|
|
403
|
+
"original": "string",
|
|
404
|
+
"resolved": "string",
|
|
405
|
+
"references": {}
|
|
406
|
+
},
|
|
407
|
+
"required": false,
|
|
408
|
+
"optional": true,
|
|
409
|
+
"docs": {
|
|
410
|
+
"tags": [],
|
|
411
|
+
"text": "Specifies the minimum value for the input field."
|
|
412
|
+
},
|
|
413
|
+
"getter": false,
|
|
414
|
+
"setter": false,
|
|
415
|
+
"attribute": "min",
|
|
416
|
+
"reflect": false
|
|
417
|
+
},
|
|
418
|
+
"minlength": {
|
|
419
|
+
"type": "string",
|
|
420
|
+
"mutable": false,
|
|
421
|
+
"complexType": {
|
|
422
|
+
"original": "string",
|
|
423
|
+
"resolved": "string",
|
|
424
|
+
"references": {}
|
|
425
|
+
},
|
|
426
|
+
"required": false,
|
|
427
|
+
"optional": true,
|
|
428
|
+
"docs": {
|
|
429
|
+
"tags": [],
|
|
430
|
+
"text": "Specifies the minimum number of characters allowed in the input field."
|
|
431
|
+
},
|
|
432
|
+
"getter": false,
|
|
433
|
+
"setter": false,
|
|
434
|
+
"attribute": "minlength",
|
|
435
|
+
"reflect": false
|
|
436
|
+
},
|
|
288
437
|
"name": {
|
|
289
438
|
"type": "string",
|
|
290
439
|
"mutable": false,
|
|
@@ -304,6 +453,25 @@ export class PdsInput {
|
|
|
304
453
|
"attribute": "name",
|
|
305
454
|
"reflect": false
|
|
306
455
|
},
|
|
456
|
+
"pattern": {
|
|
457
|
+
"type": "string",
|
|
458
|
+
"mutable": false,
|
|
459
|
+
"complexType": {
|
|
460
|
+
"original": "string",
|
|
461
|
+
"resolved": "string",
|
|
462
|
+
"references": {}
|
|
463
|
+
},
|
|
464
|
+
"required": false,
|
|
465
|
+
"optional": true,
|
|
466
|
+
"docs": {
|
|
467
|
+
"tags": [],
|
|
468
|
+
"text": "Specifies the regular expression that the input value is checked against."
|
|
469
|
+
},
|
|
470
|
+
"getter": false,
|
|
471
|
+
"setter": false,
|
|
472
|
+
"attribute": "pattern",
|
|
473
|
+
"reflect": false
|
|
474
|
+
},
|
|
307
475
|
"placeholder": {
|
|
308
476
|
"type": "string",
|
|
309
477
|
"mutable": false,
|
|
@@ -361,6 +529,25 @@ export class PdsInput {
|
|
|
361
529
|
"attribute": "required",
|
|
362
530
|
"reflect": false
|
|
363
531
|
},
|
|
532
|
+
"step": {
|
|
533
|
+
"type": "string",
|
|
534
|
+
"mutable": false,
|
|
535
|
+
"complexType": {
|
|
536
|
+
"original": "string",
|
|
537
|
+
"resolved": "string",
|
|
538
|
+
"references": {}
|
|
539
|
+
},
|
|
540
|
+
"required": false,
|
|
541
|
+
"optional": true,
|
|
542
|
+
"docs": {
|
|
543
|
+
"tags": [],
|
|
544
|
+
"text": "Works with the `min` and `max` attributes to define increments for the input field."
|
|
545
|
+
},
|
|
546
|
+
"getter": false,
|
|
547
|
+
"setter": false,
|
|
548
|
+
"attribute": "step",
|
|
549
|
+
"reflect": false
|
|
550
|
+
},
|
|
364
551
|
"type": {
|
|
365
552
|
"type": "string",
|
|
366
553
|
"mutable": false,
|
|
@@ -408,6 +595,10 @@ export class PdsInput {
|
|
|
408
595
|
}
|
|
409
596
|
static get states() {
|
|
410
597
|
return {
|
|
598
|
+
"hasPrefix": {},
|
|
599
|
+
"hasSuffix": {},
|
|
600
|
+
"hasPrepend": {},
|
|
601
|
+
"hasAppend": {},
|
|
411
602
|
"hasFocus": {}
|
|
412
603
|
};
|
|
413
604
|
}
|
|
@@ -440,7 +631,7 @@ export class PdsInput {
|
|
|
440
631
|
"composed": true,
|
|
441
632
|
"docs": {
|
|
442
633
|
"tags": [],
|
|
443
|
-
"text": "
|
|
634
|
+
"text": "Emitted when the value has changed.\n\nThis event will not emit when programmatically setting the `value` property."
|
|
444
635
|
},
|
|
445
636
|
"complexType": {
|
|
446
637
|
"original": "InputChangeEventDetail",
|
|
@@ -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,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C,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 {this.label &&\n <label class=\"pds-input__label\" htmlFor={this.componentId}>{this.label}</label>\n }\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"]}
|
|
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,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc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E,IAAI,EAAC,OAAO,GAAG;oBACtC,YAAY,CACX,CACL,CACG,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 { inheritAriaAttributes } from '@utils/attributes';\nimport type { Attributes } from '@utils/attributes';\nimport { InputChangeEventDetail, InputInputEventDetail } from './input-interface';\nimport { debounceEvent } from '@utils/utils';\nimport { danger } from '@pine-ds/icons/icons';\n\n/**\n * @slot append - Content to be displayed after the input field\n * @slot prefix - Content that is displayed visually within the input field before the input field\n * @slot prepend - Content to be displayed before the input field\n * @slot suffix - Content that is displayed visually within the input field after the input field\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 private prefixEl?: HTMLElement;\n private suffixEl?: HTMLElement;\n private focusedValue?: string | number | null;\n private originalPdsInput?: EventEmitter<InputInputEventDetail>;\n\n @Element() el!: HTMLPdsInputElement;\n\n /**\n * If true, the input has prefix content (non-focusable)\n */\n @State() hasPrefix = false;\n\n /**\n * If true, the input has suffix content (non-focusable)\n */\n @State() hasSuffix = false;\n\n /**\n * If true, the input has prepend content (focusable)\n */\n @State() hasPrepend = false;\n\n /**\n * If true, the input has append content (focusable)\n */\n @State() hasAppend = false;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() pdsBlur!: EventEmitter<FocusEvent>;\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 /**\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 maximum value for the input field.\n */\n @Prop() max?: string;\n\n /**\n * Specifies the maximum number of characters allowed in the input field.\n */\n @Prop() maxlength?: string;\n\n /**\n * Specifies the minimum value for the input field.\n */\n @Prop() min?: string;\n\n /**\n * Specifies the minimum number of characters allowed in the input field.\n */\n @Prop() minlength?: string;\n\n /**\n * Specifies the name. Submitted with the form name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * Specifies the regular expression that the input value is checked against.\n */\n @Prop() pattern?: 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 * Works with the `min` and `max` attributes to define increments for the input field.\n */\n @Prop() step?: string;\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 private updateAddonWidths() {\n requestAnimationFrame(() => {\n if (this.prefixEl) {\n const prefixWidth = this.prefixEl.offsetWidth;\n this.el.style.setProperty('--prefix-width', `${prefixWidth}px`);\n }\n\n if (this.suffixEl) {\n const suffixWidth = this.suffixEl.offsetWidth;\n this.el.style.setProperty('--suffix-width', `${suffixWidth}px`);\n }\n });\n }\n\n private renderPrefix() {\n const hasPrefix = this.el.querySelector('[slot=\"prefix\"]') !== null;\n if (hasPrefix) {\n return (\n <div class=\"pds-input__prefix\" part=\"prefix\" ref={(el) => this.prefixEl = el as HTMLElement}>\n <slot name=\"prefix\" onSlotchange={() => this.updateAddonWidths()}></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderSuffix() {\n const hasSuffix = this.el.querySelector('[slot=\"suffix\"]') !== null;\n if (hasSuffix) {\n return (\n <div class=\"pds-input__suffix\" part=\"suffix\" ref={(el) => this.suffixEl = el as HTMLElement}>\n <slot name=\"suffix\" onSlotchange={() => this.updateAddonWidths()}></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderPrepend() {\n const hasPrepend = this.el.querySelector('[slot=\"prepend\"]') !== null;\n if (hasPrepend) {\n return (\n <div class=\"pds-input__prepend\" part=\"prepend\">\n <slot name=\"prepend\"></slot>\n </div>\n );\n }\n return null;\n }\n\n private renderAppend() {\n const hasAppend = this.el.querySelector('[slot=\"append\"]') !== null;\n if (hasAppend) {\n return (\n <div class=\"pds-input__append\" part=\"append\">\n <slot name=\"append\"></slot>\n </div>\n );\n }\n return null;\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el)\n };\n this.hasPrefix = this.el.querySelector('[slot=\"prefix\"]') !== null;\n this.hasSuffix = this.el.querySelector('[slot=\"suffix\"]') !== null;\n this.hasPrepend = this.el.querySelector('[slot=\"prepend\"]') !== null;\n this.hasAppend = this.el.querySelector('[slot=\"append\"]') !== null;\n\n // Store the original pdsInput event emitter\n this.originalPdsInput = this.pdsInput;\n }\n\n componentDidLoad() {\n this.debounceChanged();\n this.updateAddonWidths();\n }\n\n componentDidUpdate() {\n this.updateAddonWidths();\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 * 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 render() {\n const {\n componentId,\n disabled,\n errorMessage,\n helperMessage,\n invalid = false,\n label,\n } = this;\n\n const value = this.getValue();\n\n const inputWrapperClasses = {\n 'pds-input__field-wrapper': true,\n 'has-focus': this.hasFocus,\n 'has-error': invalid || !!errorMessage,\n 'is-disabled': disabled,\n 'has-prefix': this.hasPrefix,\n 'has-suffix': this.hasSuffix,\n 'has-prepend': this.hasPrepend,\n 'has-append': this.hasAppend,\n };\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n aria-readonly={this.readonly ? 'true' : null}\n has-prefix={this.hasPrefix ? 'true' : null}\n has-suffix={this.hasSuffix ? 'true' : null}\n has-prepend={this.hasPrepend ? 'true' : null}\n has-append={this.hasAppend ? 'true' : null}\n >\n <div class=\"pds-input\">\n {label && (\n <label htmlFor={componentId} class=\"pds-input__label\">\n {label}\n {this.required && <span class=\"pds-input__required-indicator\"> *</span>}\n </label>\n )}\n\n <div class={inputWrapperClasses}>\n {this.renderPrepend()}\n {this.renderPrefix()}\n <input\n ref={(input) => (this.nativeInput = input)}\n class=\"pds-input__field\"\n aria-describedby={assignDescription(componentId, invalid, helperMessage)}\n aria-invalid={invalid ? \"true\" : undefined}\n autocomplete={this.autocomplete}\n disabled={disabled}\n id={componentId}\n max={this.max}\n maxlength={this.maxlength}\n min={this.min}\n minlength={this.minlength}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n step={this.step}\n type={this.type}\n value={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.renderSuffix()}\n {this.renderAppend()}\n </div>\n\n {helperMessage && (\n <p class=\"pds-input__helper-message\" id={messageId(componentId, 'helper')}>\n {helperMessage}\n </p>\n )}\n\n {errorMessage && (\n <p class=\"pds-input__error-message\" id={messageId(componentId, 'error')}>\n <pds-icon icon={danger} size=\"small\" />\n {errorMessage}\n </p>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -11,6 +11,12 @@ export default {
|
|
|
11
11
|
errorMessage: null,
|
|
12
12
|
helperMessage: null,
|
|
13
13
|
invalid: false,
|
|
14
|
+
max: null,
|
|
15
|
+
maxlength: null,
|
|
16
|
+
min: null,
|
|
17
|
+
minlength: null,
|
|
18
|
+
pattern: null,
|
|
19
|
+
step: null,
|
|
14
20
|
name: null,
|
|
15
21
|
placeholder: null,
|
|
16
22
|
readonly: false,
|
|
@@ -46,6 +52,10 @@ const BaseTemplate = (args) => html`<pds-input
|
|
|
46
52
|
required="${args.required}"
|
|
47
53
|
type="${args.type}"
|
|
48
54
|
value="${args.value}">
|
|
55
|
+
${args.prefix}
|
|
56
|
+
${args.suffix}
|
|
57
|
+
${args.prepend}
|
|
58
|
+
${args.append}
|
|
49
59
|
</pds-input>`;
|
|
50
60
|
|
|
51
61
|
export const Text = BaseTemplate.bind({});
|
|
@@ -124,3 +134,77 @@ Autocomplete.args = {
|
|
|
124
134
|
type: 'text',
|
|
125
135
|
autocomplete: 'given-name',
|
|
126
136
|
};
|
|
137
|
+
|
|
138
|
+
export const withPrefixIcon = BaseTemplate.bind({});
|
|
139
|
+
withPrefixIcon.args = {
|
|
140
|
+
componentId: 'pds-input-prefix-icon',
|
|
141
|
+
label: 'Email',
|
|
142
|
+
type: 'email',
|
|
143
|
+
prefix: html`<pds-icon slot="prefix" name="mail" size="small"></pds-icon>`,
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
export const withSuffixButton = BaseTemplate.bind({});
|
|
147
|
+
withSuffixButton.args = {
|
|
148
|
+
componentId: 'pds-input-suffix-button',
|
|
149
|
+
label: 'Search',
|
|
150
|
+
type: 'text',
|
|
151
|
+
suffix: html`<pds-button slot="suffix" variant="unstyled" class="pds-input__suffix"><pds-icon name="search" size="small"></pds-icon></pds-button>`,
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export const withPrependSelect = BaseTemplate.bind({});
|
|
155
|
+
withPrependSelect.args = {
|
|
156
|
+
componentId: 'pds-input-prepend-select',
|
|
157
|
+
label: 'Amount',
|
|
158
|
+
type: 'text',
|
|
159
|
+
prepend: html`
|
|
160
|
+
<pds-select hide-label label="Currency" slot="prepend" class="pds-input__prepend">
|
|
161
|
+
<option value="USD">USD</option>
|
|
162
|
+
<option value="EUR">EUR</option>
|
|
163
|
+
<option value="GBP">GBP</option>
|
|
164
|
+
</pds-select>
|
|
165
|
+
`,
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export const withAppendSelect = BaseTemplate.bind({});
|
|
169
|
+
withAppendSelect.args = {
|
|
170
|
+
componentId: 'pds-input-append-select',
|
|
171
|
+
label: 'Phone',
|
|
172
|
+
type: 'tel',
|
|
173
|
+
append: html`
|
|
174
|
+
<pds-select hide-label slot="append" class="pds-input__append">
|
|
175
|
+
<option value="mobile">Mobile</option>
|
|
176
|
+
<option value="home">Home</option>
|
|
177
|
+
<option value="work">Work</option>
|
|
178
|
+
</pds-select>
|
|
179
|
+
`,
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export const withPrefixAndAppend = BaseTemplate.bind({});
|
|
183
|
+
withPrefixAndAppend.args = {
|
|
184
|
+
componentId: 'pds-input-prefix-append',
|
|
185
|
+
label: 'Amount',
|
|
186
|
+
type: 'text',
|
|
187
|
+
prefix: html`<pds-icon name="dollar" size="small"></pds-icon>`,
|
|
188
|
+
append: html`
|
|
189
|
+
<pds-select hide-label slot="append" class="pds-input__append">
|
|
190
|
+
<option value="USD">USD</option>
|
|
191
|
+
<option value="EUR">EUR</option>
|
|
192
|
+
<option value="GBP">GBP</option>
|
|
193
|
+
</pds-select>
|
|
194
|
+
`,
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export const withPrependAndSuffix = BaseTemplate.bind({});
|
|
198
|
+
withPrependAndSuffix.args = {
|
|
199
|
+
componentId: 'pds-input-prepend-suffix',
|
|
200
|
+
label: 'Amount',
|
|
201
|
+
type: 'text',
|
|
202
|
+
prepend: html`
|
|
203
|
+
<pds-select hide-label slot="prepend" class="pds-input__prepend">
|
|
204
|
+
<option value="USD">USD</option>
|
|
205
|
+
<option value="EUR">EUR</option>
|
|
206
|
+
<option value="GBP">GBP</option>
|
|
207
|
+
</pds-select>
|
|
208
|
+
`,
|
|
209
|
+
suffix: html`<pds-button slot="suffix" variant="unstyled" class="pds-input__suffix"><pds-icon name="remove-circle" size="small"></pds-icon></pds-button>`,
|
|
210
|
+
};
|
|
@@ -45,8 +45,8 @@ export class PdsLink {
|
|
|
45
45
|
return linkStyles;
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (h("a", { key: '
|
|
49
|
-
h("pds-icon", { key: '
|
|
48
|
+
return (h("a", { key: 'f2b3e7f26b833f7b187fce6f36c392415e2499df', class: this.classNames(), href: this.href, id: this.componentId, part: "link", target: this.external ? '_blank' : undefined, style: this.setLinkStyles() }, h("slot", { key: 'c85c0add786ab8a90f7cb0d12b75d65a51b8e313' }, this.href), this.external &&
|
|
49
|
+
h("pds-icon", { key: '2ce9fa8d29168659546bc95b0633815978142bbb', icon: launch, size: this.fontSize })));
|
|
50
50
|
}
|
|
51
51
|
static get is() { return "pds-link"; }
|
|
52
52
|
static get encapsulation() { return "shadow"; }
|
|
@@ -45,7 +45,7 @@ export class PdsLoader {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (h(Host, { key: '
|
|
48
|
+
return (h(Host, { key: '5f9677b6338e4b1d7df0ab3182c91ecae4c5c857', 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: '5083b0fd6d468439dd0faa4375107c2cddc49812', class: "pds-loader--spinner" }, h("svg", { key: '689659c659901091215e3745e1778613dc8c64dc', style: this.style(), viewBox: "0 0 200 200", fill: "none" }, h("defs", { key: '2f20b260a1155a966abb9f8d0541374d707d4c09' }, h("linearGradient", { key: '2049a48645d6c02c3e5b4a659cb3767af297172a', id: "spinner-secondHalf" }, h("stop", { key: '8a51fd7117b39505d6e40ded168c1a323f19d791', offset: "0%", "stop-opacity": "0", "stop-color": "currentColor" }), h("stop", { key: '7a5273675a64eb794b8bbe513fa3fbfddb2b8b6b', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" })), h("linearGradient", { key: '12ea88879ebbd8c207e9d5e5838505796c747fd6', id: "spinner-firstHalf" }, h("stop", { key: '08a2198273017b0feeb16ec93a1a1daed34ada94', offset: "0%", "stop-opacity": "1", "stop-color": "currentColor" }), h("stop", { key: '02ac704dd21ba49f579f0f305123b53333ae669e', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" }))), h("g", { key: 'feb3d05f93da9f8d67181864d318678d2930b1dd', class: "pds-loader__spinner-path" }, h("path", { key: 'dde73e34e0a78bdd87f33212eb21a25e0c212b4f', stroke: "url(#spinner-secondHalf)", d: "M 4 100 A 96 96 0 0 1 196 100" }), h("path", { key: 'ce0c541df6294f6b08772d89cf791f0e6342ec0b', stroke: "url(#spinner-firstHalf)", d: "M 196 100 A 96 96 0 0 1 4 100" }), h("path", { key: '25fae107003b2c9172131b54a97ecd9780ac4e42', stroke: "currentColor", "stroke-linecap": "round", d: "M 4 100 A 96 96 0 0 1 4 98" }))))), this.variant === 'typing' && (h("div", { key: '7b467d87b5d4c0dbd96a277868bc587544259cff', class: "pds-loader--typing" }, h("span", { key: '1e0833eec5fc48e990bbfa7ce4e724a1eee019ad' }), h("span", { key: 'ef517f1aafca68e77fed199552a7a468ac8b37b2' }), h("span", { key: 'b6379ba5b3e1fb88c5ce0478bb51bf4471bd6dd1' }))), h("div", { key: '6148a67bddb3749b8778f5a97d381f01096fda23', class: `pds-loader__label ${this.showLabel ? '' : 'pds-loader--hidden'}` }, h("slot", { key: '774fd7274d111b17afe9ef0740e64448c6fcd8d4', name: "label" }, "Loading..."))));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "pds-loader"; }
|
|
51
51
|
static get encapsulation() { return "shadow"; }
|
|
@@ -72,10 +72,10 @@ export class PdsModalContent {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
|
-
return (h(Host, { key: '
|
|
75
|
+
return (h(Host, { key: '6b214e3462d8e1e1cb58d6c0075b3143e0db2d51' }, h("div", { key: '2f6a2daeb09a99f096cd46230813fe1b9a6950e9', class: {
|
|
76
76
|
'pds-modal-content': true,
|
|
77
77
|
[`pds-modal-content--border-${this.border}`]: true
|
|
78
|
-
}, style: { maxHeight: this.contentMaxHeight }, tabindex: "-1" }, h("slot", { key: '
|
|
78
|
+
}, style: { maxHeight: this.contentMaxHeight }, tabindex: "-1" }, h("slot", { key: '8392cc48a2dba0f32d4a83e642bd3f295832251b' }))));
|
|
79
79
|
}
|
|
80
80
|
static get is() { return "pds-modal-content"; }
|
|
81
81
|
static get originalStyleUrls() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export class PdsModalFooter {
|
|
3
3
|
render() {
|
|
4
|
-
return (h("footer", { key: '
|
|
4
|
+
return (h("footer", { key: '63d1121b84d10ea99354d07b029b7625d52d9095', class: "pds-modal__footer" }, h("slot", { key: 'dd08fc600f122e422ccd3161bc558f3b9cc075f9' })));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "pds-modal-footer"; }
|
|
7
7
|
static get originalStyleUrls() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export class PdsModalHeader {
|
|
3
3
|
render() {
|
|
4
|
-
return (h("header", { key: '
|
|
4
|
+
return (h("header", { key: 'c832013aee204170c29336e931d36f1eda667f11', class: "pds-modal__header" }, h("slot", { key: '19a76b689a8d8bf116f7061fd7c32415da4299e1' })));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "pds-modal-header"; }
|
|
7
7
|
static get originalStyleUrls() {
|
|
@@ -227,10 +227,10 @@ export class PdsModal {
|
|
|
227
227
|
return thisZIndex === maxZIndex;
|
|
228
228
|
}
|
|
229
229
|
render() {
|
|
230
|
-
return (h("dialog", { key: '
|
|
230
|
+
return (h("dialog", { key: '6ec691cfcf4865baeeba14f097d5e647a3201dba', class: {
|
|
231
231
|
'pds-modal__backdrop': true,
|
|
232
232
|
'open': this.open
|
|
233
|
-
}, "aria-modal": "true", "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, h("div", { key: '
|
|
233
|
+
}, "aria-modal": "true", "aria-labelledby": `${this.componentId}-heading`, onClick: this.handleBackdropClick }, h("div", { key: 'b7c4681717bfc0d095653c7dcf1a0e42cf069e8b', class: `pds-modal pds-modal--${this.size} pds-modal--scrollable` }, h("slot", { key: '9ca7f711579587c2f49fd19f81a488192d62ce72' }))));
|
|
234
234
|
}
|
|
235
235
|
static get is() { return "pds-modal"; }
|
|
236
236
|
static get originalStyleUrls() {
|
|
@@ -69,7 +69,7 @@ export class MockPdsModal {
|
|
|
69
69
|
'pds-modal__backdrop': true,
|
|
70
70
|
'open': this.open,
|
|
71
71
|
};
|
|
72
|
-
return (h("div", { key: '
|
|
72
|
+
return (h("div", { key: 'e61d355aaf75d5adc97a3e930f898e075f54d931', class: backdropClasses }, h("div", { key: '059c930eb27b9420ca294b2a7c07e53b15ce1c91', class: modalClasses, role: "dialog", "aria-modal": "true", "aria-labelledby": this.componentId ? `${this.componentId}-heading` : null }, h("div", { key: '9b2423c26eb6f015ee68f73805bd50965a32b5b0', class: "pds-modal__header" }, h("slot", { key: '770d212b20667a1ea4dce88a345f4cbbed363e52', name: "header" })), h("div", { key: '51821cd7d5323ae4543d354589ceabebf0c0ccb0', class: "pds-modal-content" }, h("slot", { key: '475b5844c8f9ac44d7fc366b95ca282a908e0cbb' })), h("div", { key: 'eb67b8e10942d51824296b82947025f8afee8a24', class: "pds-modal__footer" }, h("slot", { key: 'b66c31cd4abfb8d30d5dc66735a367d99f149559', name: "footer" })))));
|
|
73
73
|
}
|
|
74
74
|
static get is() { return "mock-pds-modal"; }
|
|
75
75
|
static get originalStyleUrls() {
|
|
@@ -102,7 +102,7 @@ export class PdsPopover {
|
|
|
102
102
|
popoverEl.style.left = `${left}px`;
|
|
103
103
|
}
|
|
104
104
|
render() {
|
|
105
|
-
return (h(Host, { key: '
|
|
105
|
+
return (h(Host, { key: '35e5f4c21884f02b17dcb920e5c7ba73b8bed849' }, h("button", { key: '586880a84a4ad659a00500206e5b3c6c5e7e1a37', class: "pds-popover__trigger", popoverTarget: this.componentId, popoverTargetAction: this.popoverTargetAction, onClick: this.handleClick }, this.text), h("div", { key: 'fcb97e9b4033eef58bdca4915572b986dabde43c', class: `pds-popover ${this.active ? 'pds-popover--active' : ''}`, id: this.componentId, popover: this.popoverType, style: { maxWidth: `${this.maxWidth}px` } }, h("slot", { key: '1ffb626c69e06f17379ebf4ff4d5498f030909e8' }))));
|
|
106
106
|
}
|
|
107
107
|
static get is() { return "pds-popover"; }
|
|
108
108
|
static get encapsulation() { return "shadow"; }
|
|
@@ -18,7 +18,7 @@ export class PdsProgress {
|
|
|
18
18
|
this.showPercent = false;
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: '2a7768cc769f62579bfee6d8f9e6109d10df0aaf', class: this.animated ? { 'is-animated': this.animated } : '' }, h("div", { key: '1eef3758e8c6e470f8cdd170e8d6c49e25bf9aa3', class: "pds-progress" }, h("label", { key: '5b75150a747a15379fdf0ee23b1be561e6d990e7', class: "pds-progress__label", htmlFor: this.componentId }, this.label), h("progress", { key: 'e20ad7d705d97ac11173ae515332fc1620a96328', id: this.componentId, max: "100", style: this.fillColor ? { '--color-progress-fill': this.fillColor } : {}, value: this.percent })), this.showPercent && h("div", { key: '8bafb39b5976149b80e720952e625f60f1e3c73c', class: "pds-progress__percentage" }, this.percent, "%")));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "pds-progress"; }
|
|
24
24
|
static get encapsulation() { return "shadow"; }
|
|
@@ -43,9 +43,9 @@ export class PdsRadio {
|
|
|
43
43
|
return classNames.join(' ');
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
return (h(Host, { key: '
|
|
47
|
-
h("div", { key: '
|
|
48
|
-
h("div", { key: '
|
|
46
|
+
return (h(Host, { key: '8c215fa4193cf8bd246cd83edf97b8316685714e', class: this.classNames() }, h("label", { key: '578530f26dd25f73ccbbb39c773290cd275920cf', htmlFor: this.componentId }, h("input", { key: '9ab61a2683246fae862feb5e432a0872288b7a87', "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("span", { key: 'f48c47ddb347bf0d7388359665dbbf3abf1b4859', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
|
|
47
|
+
h("div", { key: 'b8dbb34af90eed82f69621ceaadd8da668f0b3de', class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
48
|
+
h("div", { key: 'e777e4f2397ba833aefb7e8cd4ab9a32ea93685a', class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '13bd73d91bb3d676757ac9f4dcfcef7d2a5fcc55', icon: danger, size: "small" }), this.errorMessage)));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "pds-radio"; }
|
|
51
51
|
static get encapsulation() { return "scoped"; }
|