@pine-ds/core 2.1.0 → 2.1.1
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-input.js +5 -3
- package/components/pds-input.js.map +1 -1
- package/components/pds-switch.js +6 -6
- package/components/pds-switch.js.map +1 -1
- package/components/pds-textarea.js +7 -5
- package/components/pds-textarea.js.map +1 -1
- package/components/pds-tooltip.js +6 -8
- package/components/pds-tooltip.js.map +1 -1
- package/dist/cjs/{index-d424fb6f.js → index-8ad0cd9d.js} +12 -6
- package/dist/cjs/index-8ad0cd9d.js.map +1 -0
- package/dist/cjs/{index-2240f8f4.js → index-8f7870bb.js} +2 -2
- package/dist/cjs/index-8f7870bb.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pds-accordion.cjs.entry.js +2 -2
- package/dist/cjs/pds-avatar.cjs.entry.js +2 -2
- package/dist/cjs/pds-box.cjs.entry.js +1 -1
- package/dist/cjs/pds-button.cjs.entry.js +2 -2
- package/dist/cjs/pds-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/pds-chip.cjs.entry.js +2 -2
- package/dist/cjs/pds-copytext.cjs.entry.js +2 -2
- package/dist/cjs/pds-divider.cjs.entry.js +1 -1
- package/dist/cjs/pds-icon.cjs.entry.js +1 -1
- package/dist/cjs/pds-image.cjs.entry.js +1 -1
- package/dist/cjs/pds-input.cjs.entry.js +6 -5
- package/dist/cjs/pds-input.cjs.entry.js.map +1 -1
- package/dist/cjs/{pds-label-397cc854.js → pds-label-35369959.js} +2 -2
- package/dist/cjs/{pds-label-397cc854.js.map → pds-label-35369959.js.map} +1 -1
- package/dist/cjs/pds-link.cjs.entry.js +2 -2
- package/dist/cjs/pds-loader.cjs.entry.js +1 -1
- package/dist/cjs/pds-progress.cjs.entry.js +1 -1
- package/dist/cjs/pds-radio.cjs.entry.js +2 -2
- package/dist/cjs/pds-row.cjs.entry.js +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 +7 -6
- package/dist/cjs/pds-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-tab.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +2 -2
- 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-textarea.cjs.entry.js +8 -7
- package/dist/cjs/pds-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-tooltip.cjs.entry.js +5 -8
- package/dist/cjs/pds-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/pine-core.cjs.js +3 -3
- package/dist/cjs/pine-core.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/pds-icon/stories/pds-icon.stories.js +1 -1
- package/dist/collection/components/pds-input/pds-input.js +21 -3
- package/dist/collection/components/pds-input/pds-input.js.map +1 -1
- package/dist/collection/components/pds-input/stories/pds-input.stories.js +10 -0
- package/dist/collection/components/pds-switch/pds-switch.js +6 -26
- package/dist/collection/components/pds-switch/pds-switch.js.map +1 -1
- package/dist/collection/components/pds-switch/stories/pds-switch.stories.js +0 -13
- package/dist/collection/components/pds-textarea/pds-textarea.js +23 -5
- package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -1
- package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +20 -9
- package/dist/collection/components/pds-tooltip/pds-tooltip.css +2 -1
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +24 -37
- package/dist/collection/components/pds-tooltip/pds-tooltip.js.map +1 -1
- package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +15 -15
- package/dist/docs.json +73 -65
- package/dist/esm/{index-786a51ce.js → index-5e7a8a36.js} +2 -2
- package/dist/esm/index-5e7a8a36.js.map +1 -0
- package/dist/esm/{index-94bbabb0.js → index-8b335bbb.js} +12 -6
- package/dist/esm/index-8b335bbb.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pds-accordion.entry.js +2 -2
- package/dist/esm/pds-avatar.entry.js +2 -2
- package/dist/esm/pds-box.entry.js +1 -1
- package/dist/esm/pds-button.entry.js +2 -2
- package/dist/esm/pds-checkbox.entry.js +2 -2
- package/dist/esm/pds-chip.entry.js +2 -2
- package/dist/esm/pds-copytext.entry.js +2 -2
- package/dist/esm/pds-divider.entry.js +1 -1
- package/dist/esm/pds-icon.entry.js +1 -1
- package/dist/esm/pds-image.entry.js +1 -1
- package/dist/esm/pds-input.entry.js +6 -5
- package/dist/esm/pds-input.entry.js.map +1 -1
- package/dist/esm/{pds-label-d28da6eb.js → pds-label-1f80d632.js} +2 -2
- package/dist/esm/{pds-label-d28da6eb.js.map → pds-label-1f80d632.js.map} +1 -1
- package/dist/esm/pds-link.entry.js +2 -2
- package/dist/esm/pds-loader.entry.js +1 -1
- package/dist/esm/pds-progress.entry.js +1 -1
- package/dist/esm/pds-radio.entry.js +2 -2
- package/dist/esm/pds-row.entry.js +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 +7 -6
- package/dist/esm/pds-switch.entry.js.map +1 -1
- package/dist/esm/pds-tab.entry.js +1 -1
- package/dist/esm/pds-table-body.entry.js +1 -1
- package/dist/esm/pds-table-cell.entry.js +1 -1
- package/dist/esm/pds-table-head-cell.entry.js +2 -2
- 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-textarea.entry.js +8 -7
- package/dist/esm/pds-textarea.entry.js.map +1 -1
- package/dist/esm/pds-tooltip.entry.js +5 -8
- package/dist/esm/pds-tooltip.entry.js.map +1 -1
- package/dist/esm/pine-core.js +4 -4
- package/dist/esm/pine-core.js.map +1 -1
- package/dist/esm-es5/{index-786a51ce.js → index-5e7a8a36.js} +1 -1
- package/dist/esm-es5/index-5e7a8a36.js.map +1 -0
- package/dist/esm-es5/index-8b335bbb.js +3 -0
- package/dist/esm-es5/index-8b335bbb.js.map +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/pds-accordion.entry.js +1 -1
- package/dist/esm-es5/pds-avatar.entry.js +1 -1
- package/dist/esm-es5/pds-box.entry.js +1 -1
- package/dist/esm-es5/pds-button.entry.js +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-divider.entry.js +1 -1
- package/dist/esm-es5/pds-icon.entry.js +1 -1
- package/dist/esm-es5/pds-image.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js.map +1 -1
- package/dist/esm-es5/{pds-label-d28da6eb.js → pds-label-1f80d632.js} +2 -2
- 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-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-sortable-item.entry.js +1 -1
- package/dist/esm-es5/pds-sortable.entry.js +1 -1
- package/dist/esm-es5/pds-switch.entry.js +1 -1
- package/dist/esm-es5/pds-switch.entry.js.map +1 -1
- package/dist/esm-es5/pds-tab.entry.js +1 -1
- package/dist/esm-es5/pds-table-body.entry.js +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head.entry.js +1 -1
- package/dist/esm-es5/pds-table-row.entry.js +1 -1
- package/dist/esm-es5/pds-table.entry.js +1 -1
- package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
- package/dist/esm-es5/pds-tabs.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js.map +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js.map +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/pine-core.js.map +1 -1
- package/dist/pine-core/index.esm.js +1 -1
- package/dist/pine-core/{p-72ee760e.entry.js → p-0186301f.entry.js} +2 -2
- package/dist/pine-core/p-0186301f.entry.js.map +1 -0
- package/dist/pine-core/{p-d461bee4.entry.js → p-0200fce9.entry.js} +2 -2
- package/dist/pine-core/{p-85507ca5.system.entry.js → p-02f06002.system.entry.js} +2 -2
- package/dist/pine-core/{p-284433e0.entry.js → p-053ca95a.entry.js} +2 -2
- package/dist/pine-core/{p-a17dea5e.system.entry.js → p-05d140a3.system.entry.js} +2 -2
- package/dist/pine-core/{p-3886e15a.entry.js → p-0630403a.entry.js} +2 -2
- package/dist/pine-core/p-0630403a.entry.js.map +1 -0
- package/dist/pine-core/{p-366c4924.system.entry.js → p-0e310504.system.entry.js} +2 -2
- package/dist/pine-core/{p-ca1fa95e.system.entry.js → p-0efee237.system.entry.js} +2 -2
- package/dist/pine-core/{p-77c5fe7b.entry.js → p-102222fd.entry.js} +2 -2
- package/dist/pine-core/p-102222fd.entry.js.map +1 -0
- package/dist/pine-core/{p-03ecf146.entry.js → p-136ea1e9.entry.js} +2 -2
- package/dist/pine-core/{p-d8eeadd1.system.entry.js → p-143bbe94.system.entry.js} +2 -2
- package/dist/pine-core/{p-6e15f0e1.entry.js → p-188be548.entry.js} +2 -2
- package/dist/pine-core/{p-852dce9d.system.entry.js → p-1b611a91.system.entry.js} +2 -2
- package/dist/pine-core/{p-d9611049.system.entry.js → p-1c0993d9.system.entry.js} +2 -2
- package/dist/pine-core/p-1ca76e21.entry.js +2 -0
- package/dist/pine-core/p-1ca76e21.entry.js.map +1 -0
- package/dist/pine-core/{p-ea27b026.system.entry.js → p-242ccc24.system.entry.js} +2 -2
- package/dist/pine-core/{p-835c73f4.entry.js → p-30d979d3.entry.js} +2 -2
- package/dist/pine-core/{p-57d81378.entry.js → p-330eda0c.entry.js} +2 -2
- package/dist/pine-core/{p-2a4952ea.system.entry.js → p-33a94e8c.system.entry.js} +2 -2
- package/dist/pine-core/{p-3558923a.entry.js → p-3b780711.entry.js} +2 -2
- package/dist/pine-core/{p-dbc5775f.entry.js → p-3cad7587.entry.js} +2 -2
- package/dist/pine-core/{p-2665d555.js → p-3e0449c5.js} +1 -1
- package/dist/pine-core/p-3e0449c5.js.map +1 -0
- package/dist/pine-core/p-3ec7fac1.js +2 -0
- package/dist/pine-core/p-3fc1efe7.system.entry.js +2 -0
- package/dist/pine-core/p-3fc1efe7.system.entry.js.map +1 -0
- package/dist/pine-core/{p-7fb3c253.entry.js → p-48f0a5a4.entry.js} +2 -2
- package/dist/pine-core/p-4c0c0b2d.system.js +3 -0
- package/dist/pine-core/p-4c0c0b2d.system.js.map +1 -0
- package/dist/pine-core/{p-64c07f01.system.entry.js → p-4e39bbd7.system.entry.js} +2 -2
- package/dist/pine-core/p-4e6e2052.js +3 -0
- package/dist/pine-core/p-4e6e2052.js.map +1 -0
- package/dist/pine-core/p-51e94e03.system.js +2 -0
- package/dist/pine-core/p-51e94e03.system.js.map +1 -0
- package/dist/pine-core/{p-4fcf94ee.system.entry.js → p-55f8a9e4.system.entry.js} +2 -2
- package/dist/pine-core/p-55f8a9e4.system.entry.js.map +1 -0
- package/dist/pine-core/{p-979ab4e2.system.entry.js → p-57dd9a98.system.entry.js} +2 -2
- package/dist/pine-core/{p-bb88538f.system.entry.js → p-5b43ff39.system.entry.js} +2 -2
- package/dist/pine-core/p-5b43ff39.system.entry.js.map +1 -0
- package/dist/pine-core/{p-9b0e5234.entry.js → p-5c90a600.entry.js} +2 -2
- package/dist/pine-core/{p-a09284c5.entry.js → p-5f13c97b.entry.js} +2 -2
- package/dist/pine-core/{p-95c2a6bf.entry.js → p-5f23f121.entry.js} +2 -2
- package/dist/pine-core/{p-1692ed0c.entry.js → p-5fb6ab2f.entry.js} +2 -2
- package/dist/pine-core/{p-58a25131.entry.js → p-62ebfe42.entry.js} +2 -2
- package/dist/pine-core/{p-244e264d.system.js → p-6bcd89dc.system.js} +1 -1
- package/dist/pine-core/p-6bcd89dc.system.js.map +1 -0
- package/dist/pine-core/{p-c5afbc57.entry.js → p-6deaad03.entry.js} +2 -2
- package/dist/pine-core/{p-961f79c5.system.entry.js → p-70e5e466.system.entry.js} +2 -2
- package/dist/pine-core/{p-90707120.entry.js → p-7d6d3e2b.entry.js} +2 -2
- package/dist/pine-core/{p-91cba446.system.entry.js → p-82096fe4.system.entry.js} +2 -2
- package/dist/pine-core/{p-d41fbbf0.system.entry.js → p-82a001ac.system.entry.js} +2 -2
- package/dist/pine-core/{p-e847089d.system.entry.js → p-89101362.system.entry.js} +2 -2
- package/dist/pine-core/p-8d34339d.system.js +2 -0
- package/dist/pine-core/{p-fe793116.entry.js → p-94a0fd6e.entry.js} +2 -2
- package/dist/pine-core/{p-0c2553c6.system.entry.js → p-9c294ea2.system.entry.js} +2 -2
- package/dist/pine-core/{p-a98f5e91.system.entry.js → p-9dec3592.system.entry.js} +2 -2
- package/dist/pine-core/{p-bd593d1c.entry.js → p-a15c9c4f.entry.js} +2 -2
- package/dist/pine-core/{p-ffa8e658.entry.js → p-a18ff34f.entry.js} +2 -2
- package/dist/pine-core/{p-4b06aed0.system.entry.js → p-a4b85fb8.system.entry.js} +2 -2
- package/dist/pine-core/{p-cd033c2a.entry.js → p-b78b3492.entry.js} +2 -2
- package/dist/pine-core/{p-8930c3b7.system.entry.js → p-be998f90.system.entry.js} +2 -2
- package/dist/pine-core/{p-4b856a95.system.entry.js → p-c18464e8.system.entry.js} +2 -2
- package/dist/pine-core/{p-469a84a3.system.entry.js → p-c5991956.system.entry.js} +2 -2
- package/dist/pine-core/{p-f79b96ee.entry.js → p-c8b0ea02.entry.js} +2 -2
- package/dist/pine-core/{p-d3eeb6f0.system.entry.js → p-d438c2c8.system.entry.js} +2 -2
- package/dist/pine-core/p-d438c2c8.system.entry.js.map +1 -0
- package/dist/pine-core/{p-abe6c2d6.entry.js → p-d464f04f.entry.js} +2 -2
- package/dist/pine-core/{p-8963f07a.entry.js → p-d618d51b.entry.js} +2 -2
- package/dist/pine-core/{p-bd5de072.system.entry.js → p-de0beb45.system.entry.js} +2 -2
- package/dist/pine-core/{p-7c79ff32.system.entry.js → p-e22b4427.system.entry.js} +2 -2
- package/dist/pine-core/{p-59cc888d.entry.js → p-e2d793eb.entry.js} +2 -2
- package/dist/pine-core/{p-a8cb75f0.system.entry.js → p-e4a1b3f5.system.entry.js} +2 -2
- package/dist/pine-core/{p-d2c98df0.system.entry.js → p-e7648adc.system.entry.js} +2 -2
- package/dist/pine-core/{p-7c4f8c64.entry.js → p-e9ca5a4e.entry.js} +2 -2
- package/dist/pine-core/{p-37458cc7.entry.js → p-efca871b.entry.js} +2 -2
- package/dist/pine-core/{p-d6873321.system.js → p-f408c34a.system.js} +2 -2
- package/dist/pine-core/{p-1dccfe1b.system.entry.js → p-f6e72c06.system.entry.js} +2 -2
- package/dist/pine-core/pine-core.css +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/pine-core/pine-core.esm.js.map +1 -1
- package/dist/pine-core/pine-core.js +1 -1
- package/dist/pine-core/svg/bookmark.svg +1 -0
- package/dist/pine-core/svg/expand.svg +1 -1
- package/dist/pine-core/svg/layout-grid-02.svg +1 -0
- package/dist/pine-core/svg/user-star-filled.svg +1 -1
- package/dist/pine-core/svg/user-star.svg +1 -1
- package/dist/types/components/pds-input/pds-input.d.ts +4 -0
- package/dist/types/components/pds-switch/pds-switch.d.ts +1 -6
- package/dist/types/components/pds-textarea/pds-textarea.d.ts +4 -0
- package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +5 -9
- package/dist/types/components.d.ts +24 -32
- package/dist/types/stencil-public-runtime.d.ts +2 -0
- package/hydrate/index.js +33 -29
- package/hydrate/index.mjs +33 -29
- package/package.json +13 -10
- package/dist/cjs/index-2240f8f4.js.map +0 -1
- package/dist/cjs/index-d424fb6f.js.map +0 -1
- package/dist/esm/index-786a51ce.js.map +0 -1
- package/dist/esm/index-94bbabb0.js.map +0 -1
- package/dist/esm-es5/index-786a51ce.js.map +0 -1
- package/dist/esm-es5/index-94bbabb0.js +0 -3
- package/dist/esm-es5/index-94bbabb0.js.map +0 -1
- package/dist/pine-core/p-0069affa.entry.js +0 -2
- package/dist/pine-core/p-0069affa.entry.js.map +0 -1
- package/dist/pine-core/p-14d3cdaf.system.js +0 -2
- package/dist/pine-core/p-14d3cdaf.system.js.map +0 -1
- package/dist/pine-core/p-244e264d.system.js.map +0 -1
- package/dist/pine-core/p-2665d555.js.map +0 -1
- package/dist/pine-core/p-3886e15a.entry.js.map +0 -1
- package/dist/pine-core/p-496454a3.system.js +0 -2
- package/dist/pine-core/p-4fcf94ee.system.entry.js.map +0 -1
- package/dist/pine-core/p-72ee760e.entry.js.map +0 -1
- package/dist/pine-core/p-77c5fe7b.entry.js.map +0 -1
- package/dist/pine-core/p-7841bd18.js +0 -3
- package/dist/pine-core/p-7841bd18.js.map +0 -1
- package/dist/pine-core/p-b54e35d2.system.entry.js +0 -2
- package/dist/pine-core/p-b54e35d2.system.entry.js.map +0 -1
- package/dist/pine-core/p-bb88538f.system.entry.js.map +0 -1
- package/dist/pine-core/p-bc1ecf2f.js +0 -2
- package/dist/pine-core/p-c6bee7a0.system.js +0 -3
- package/dist/pine-core/p-c6bee7a0.system.js.map +0 -1
- package/dist/pine-core/p-d3eeb6f0.system.entry.js.map +0 -1
- /package/dist/esm-es5/{pds-label-d28da6eb.js.map → pds-label-1f80d632.js.map} +0 -0
- /package/dist/pine-core/{p-d461bee4.entry.js.map → p-0200fce9.entry.js.map} +0 -0
- /package/dist/pine-core/{p-85507ca5.system.entry.js.map → p-02f06002.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-284433e0.entry.js.map → p-053ca95a.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a17dea5e.system.entry.js.map → p-05d140a3.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-366c4924.system.entry.js.map → p-0e310504.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ca1fa95e.system.entry.js.map → p-0efee237.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-03ecf146.entry.js.map → p-136ea1e9.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d8eeadd1.system.entry.js.map → p-143bbe94.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-6e15f0e1.entry.js.map → p-188be548.entry.js.map} +0 -0
- /package/dist/pine-core/{p-852dce9d.system.entry.js.map → p-1b611a91.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d9611049.system.entry.js.map → p-1c0993d9.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ea27b026.system.entry.js.map → p-242ccc24.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-835c73f4.entry.js.map → p-30d979d3.entry.js.map} +0 -0
- /package/dist/pine-core/{p-57d81378.entry.js.map → p-330eda0c.entry.js.map} +0 -0
- /package/dist/pine-core/{p-2a4952ea.system.entry.js.map → p-33a94e8c.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3558923a.entry.js.map → p-3b780711.entry.js.map} +0 -0
- /package/dist/pine-core/{p-dbc5775f.entry.js.map → p-3cad7587.entry.js.map} +0 -0
- /package/dist/pine-core/{p-bc1ecf2f.js.map → p-3ec7fac1.js.map} +0 -0
- /package/dist/pine-core/{p-7fb3c253.entry.js.map → p-48f0a5a4.entry.js.map} +0 -0
- /package/dist/pine-core/{p-64c07f01.system.entry.js.map → p-4e39bbd7.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-979ab4e2.system.entry.js.map → p-57dd9a98.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-9b0e5234.entry.js.map → p-5c90a600.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a09284c5.entry.js.map → p-5f13c97b.entry.js.map} +0 -0
- /package/dist/pine-core/{p-95c2a6bf.entry.js.map → p-5f23f121.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1692ed0c.entry.js.map → p-5fb6ab2f.entry.js.map} +0 -0
- /package/dist/pine-core/{p-58a25131.entry.js.map → p-62ebfe42.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c5afbc57.entry.js.map → p-6deaad03.entry.js.map} +0 -0
- /package/dist/pine-core/{p-961f79c5.system.entry.js.map → p-70e5e466.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-90707120.entry.js.map → p-7d6d3e2b.entry.js.map} +0 -0
- /package/dist/pine-core/{p-91cba446.system.entry.js.map → p-82096fe4.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d41fbbf0.system.entry.js.map → p-82a001ac.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e847089d.system.entry.js.map → p-89101362.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-496454a3.system.js.map → p-8d34339d.system.js.map} +0 -0
- /package/dist/pine-core/{p-fe793116.entry.js.map → p-94a0fd6e.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0c2553c6.system.entry.js.map → p-9c294ea2.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a98f5e91.system.entry.js.map → p-9dec3592.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-bd593d1c.entry.js.map → p-a15c9c4f.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ffa8e658.entry.js.map → p-a18ff34f.entry.js.map} +0 -0
- /package/dist/pine-core/{p-4b06aed0.system.entry.js.map → p-a4b85fb8.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-cd033c2a.entry.js.map → p-b78b3492.entry.js.map} +0 -0
- /package/dist/pine-core/{p-8930c3b7.system.entry.js.map → p-be998f90.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-4b856a95.system.entry.js.map → p-c18464e8.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-469a84a3.system.entry.js.map → p-c5991956.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f79b96ee.entry.js.map → p-c8b0ea02.entry.js.map} +0 -0
- /package/dist/pine-core/{p-abe6c2d6.entry.js.map → p-d464f04f.entry.js.map} +0 -0
- /package/dist/pine-core/{p-8963f07a.entry.js.map → p-d618d51b.entry.js.map} +0 -0
- /package/dist/pine-core/{p-bd5de072.system.entry.js.map → p-de0beb45.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7c79ff32.system.entry.js.map → p-e22b4427.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-59cc888d.entry.js.map → p-e2d793eb.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a8cb75f0.system.entry.js.map → p-e4a1b3f5.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d2c98df0.system.entry.js.map → p-e7648adc.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7c4f8c64.entry.js.map → p-e9ca5a4e.entry.js.map} +0 -0
- /package/dist/pine-core/{p-37458cc7.entry.js.map → p-efca871b.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d6873321.system.js.map → p-f408c34a.system.js.map} +0 -0
- /package/dist/pine-core/{p-1dccfe1b.system.entry.js.map → p-f6e72c06.system.entry.js.map} +0 -0
|
@@ -5,6 +5,7 @@ import { withActions } from '@storybook/addon-actions/decorator';
|
|
|
5
5
|
export default {
|
|
6
6
|
argTypes: extractArgTypes('pds-input'),
|
|
7
7
|
args: {
|
|
8
|
+
autocomplete: null,
|
|
8
9
|
disabled: false,
|
|
9
10
|
errorMessage: null,
|
|
10
11
|
helperMessage: null,
|
|
@@ -26,6 +27,7 @@ export default {
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
const BaseTemplate = (args) => html`<pds-input
|
|
30
|
+
autocomplete="${args.autocomplete}"
|
|
29
31
|
disabled="${args.disabled}"
|
|
30
32
|
error-message="${args.errorMessage}"
|
|
31
33
|
helper-message="${args.helperMessage}"
|
|
@@ -108,3 +110,11 @@ Invalid.args = {
|
|
|
108
110
|
type: 'email',
|
|
109
111
|
value: 'Frank Dux'
|
|
110
112
|
};
|
|
113
|
+
|
|
114
|
+
export const Autocomplete = BaseTemplate.bind({});
|
|
115
|
+
Autocomplete.args = {
|
|
116
|
+
componentId: 'pds-input-autocomplete',
|
|
117
|
+
label: 'First name',
|
|
118
|
+
type: 'text',
|
|
119
|
+
autocomplete: 'given-name',
|
|
120
|
+
};
|
|
@@ -6,6 +6,8 @@ export class PdsSwitch {
|
|
|
6
6
|
this.onSwitchUpdate = (e) => {
|
|
7
7
|
if (this.disabled)
|
|
8
8
|
return;
|
|
9
|
+
const input = e.target;
|
|
10
|
+
this.checked = input.checked;
|
|
9
11
|
this.pdsSwitchChange.emit(e);
|
|
10
12
|
};
|
|
11
13
|
/**
|
|
@@ -30,13 +32,12 @@ export class PdsSwitch {
|
|
|
30
32
|
this.label = undefined;
|
|
31
33
|
this.name = undefined;
|
|
32
34
|
this.required = false;
|
|
33
|
-
this.type = 'checkbox';
|
|
34
35
|
this.value = undefined;
|
|
35
36
|
}
|
|
36
37
|
render() {
|
|
37
|
-
return (h(Host, { key: '
|
|
38
|
-
h("div", { key: '
|
|
39
|
-
h("div", { key: '
|
|
38
|
+
return (h(Host, { key: '6caf30d657b79a0557ce5b22b35d5c07f80e7046', class: this.switchClassNames(), "aria-disabled": this.disabled ? 'true' : null }, h("input", { key: '96cced459d04d1e922d27f933ee1786a0d178608', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, checked: this.checked, class: "pds-switch__input", disabled: this.disabled, id: this.componentId, name: this.name ? this.name : this.componentId, onChange: this.onSwitchUpdate, required: this.required, type: "checkbox", value: this.value }), h(PdsLabel, { key: '86c1452da4a0b029ea17baeb1b0b603c32c9c2d6', classNames: "pds-switch__label", htmlFor: this.componentId, text: this.label }), this.helperMessage &&
|
|
39
|
+
h("div", { key: '68599a16f5c18e0d99f189ff728bbbc2962e8985', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
40
|
+
h("div", { key: '575fa7ca25c933e56691d908a0e840bc80d1822e', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, this.errorMessage)));
|
|
40
41
|
}
|
|
41
42
|
static get is() { return "pds-switch"; }
|
|
42
43
|
static get encapsulation() { return "shadow"; }
|
|
@@ -71,7 +72,7 @@ export class PdsSwitch {
|
|
|
71
72
|
},
|
|
72
73
|
"checked": {
|
|
73
74
|
"type": "boolean",
|
|
74
|
-
"mutable":
|
|
75
|
+
"mutable": true,
|
|
75
76
|
"complexType": {
|
|
76
77
|
"original": "boolean",
|
|
77
78
|
"resolved": "boolean",
|
|
@@ -209,27 +210,6 @@ export class PdsSwitch {
|
|
|
209
210
|
"reflect": false,
|
|
210
211
|
"defaultValue": "false"
|
|
211
212
|
},
|
|
212
|
-
"type": {
|
|
213
|
-
"type": "string",
|
|
214
|
-
"mutable": false,
|
|
215
|
-
"complexType": {
|
|
216
|
-
"original": "'checkbox' | 'radio'",
|
|
217
|
-
"resolved": "\"checkbox\" | \"radio\"",
|
|
218
|
-
"references": {}
|
|
219
|
-
},
|
|
220
|
-
"required": false,
|
|
221
|
-
"optional": false,
|
|
222
|
-
"docs": {
|
|
223
|
-
"tags": [{
|
|
224
|
-
"name": "defaultValue",
|
|
225
|
-
"text": "'checkbox'"
|
|
226
|
-
}],
|
|
227
|
-
"text": "Specifies the underlying input element type"
|
|
228
|
-
},
|
|
229
|
-
"attribute": "type",
|
|
230
|
-
"reflect": false,
|
|
231
|
-
"defaultValue": "'checkbox'"
|
|
232
|
-
},
|
|
233
213
|
"value": {
|
|
234
214
|
"type": "string",
|
|
235
215
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-switch.js","sourceRoot":"","sources":["../../../src/components/pds-switch/pds-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAO5D,MAAM,OAAO,SAAS;;
|
|
1
|
+
{"version":3,"file":"pds-switch.js","sourceRoot":"","sources":["../../../src/components/pds-switch/pds-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAO5D,MAAM,OAAO,SAAS;;QA0DZ,mBAAc,GAAG,CAAC,CAAQ,EAAE,EAAE;YACpC,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAE1B,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAC;YAC3C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;YAC7B,IAAI,CAAC,eAAe,CAAC,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AAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,GAAI;YACvF,IAAI,CAAC,aAAa;gBACjB,4DACE,KAAK,EAAE,qBAAqB,EAC5B,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,IAExC,IAAI,CAAC,aAAa,CACf;YAEP,IAAI,CAAC,YAAY;gBAChB,4DACE,KAAK,EAAE,gDAAgD,EACvD,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,eAC9B,WAAW,IAEpB,IAAI,CAAC,YAAY,CACd,CAEH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop } from '@stencil/core';\nimport { assignDescription, messageId } from '../../utils/form';\nimport { PdsLabel } from '../_internal/pds-label/pds-label';\n\n@Component({\n tag: 'pds-switch',\n styleUrls: ['../../global/styles/base.scss', 'pds-switch.scss'],\n shadow: true,\n})\nexport class PdsSwitch {\n @Element() el: HTMLPdsSwitchElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute and the label `for` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Determines the input 'checked' state\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * Determines the input 'disabled' state, preventing user interaction\n */\n @Prop() disabled? = false;\n\n /**\n * Displays message text describing an invalid state\n */\n @Prop() errorMessage?: string;\n\n /**\n * Displays help text for additional description of an input\n */\n @Prop() helperMessage: string;\n\n /**\n * Determines the input 'invalid' state, signifying an error is present\n */\n @Prop() invalid? = false;\n\n /**\n * Displays text to describe the input\n */\n @Prop() label!: string;\n\n /**\n * Identifies form data and unifies a group of radio inputs for toggling a single property/value\n */\n @Prop() name: string;\n\n /**\n * Determines the 'required' state of the input\n */\n @Prop() required? = false;\n\n /**\n * Provides input with a string submitted in form data, and can be used to distinguish radio inputs\n */\n @Prop() value: string;\n\n /**\n * Emits an event on input change\n */\n @Event() pdsSwitchChange: EventEmitter<InputEvent>;\n\n private onSwitchUpdate = (e: Event) => {\n if (this.disabled) return;\n\n const input = e.target as HTMLInputElement;\n this.checked = input.checked;\n this.pdsSwitchChange.emit(e as InputEvent);\n };\n\n /**\n * Generate switch classes\n */\n private switchClassNames = () => {\n let switchClasses = `pds-switch`;\n\n if (this.invalid === true) {\n switchClasses += \" pds-switch--error\";\n }\n if (this.helperMessage !== undefined) {\n switchClasses += \" pds-switch--message\";\n }\n return switchClasses;\n };\n\n render() {\n return (\n <Host class={this.switchClassNames()} aria-disabled={this.disabled ? 'true' : null}>\n <input\n aria-describedby={assignDescription(this.componentId, this.invalid, this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n checked={this.checked}\n class=\"pds-switch__input\"\n disabled={this.disabled}\n id={this.componentId}\n name={this.name ? this.name : this.componentId}\n onChange={this.onSwitchUpdate}\n required={this.required}\n type=\"checkbox\"\n value={this.value}\n />\n <PdsLabel classNames=\"pds-switch__label\" htmlFor={this.componentId} text={this.label} />\n {this.helperMessage &&\n <div\n class={`pds-switch__message`}\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </div>\n }\n {this.errorMessage &&\n <div\n class={`pds-switch__message pds-switch__message--error`}\n id={messageId(this.componentId, 'error')}\n aria-live=\"assertive\"\n >\n {this.errorMessage}\n </div>\n }\n </Host>\n );\n }\n}\n"]}
|
|
@@ -47,19 +47,6 @@ Default.args = {
|
|
|
47
47
|
type: 'checkbox',
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
export const Radio = BaseTemplate.bind({});
|
|
51
|
-
|
|
52
|
-
Radio.args = {
|
|
53
|
-
checked: false,
|
|
54
|
-
disabled: false,
|
|
55
|
-
componentId: 'pds-switch-radio-example',
|
|
56
|
-
invalid: false,
|
|
57
|
-
label: 'radio switch',
|
|
58
|
-
name: 'pds-switch-radio',
|
|
59
|
-
required: false,
|
|
60
|
-
type: 'radio',
|
|
61
|
-
};
|
|
62
|
-
|
|
63
50
|
export const Disabled = BaseTemplate.bind({});
|
|
64
51
|
|
|
65
52
|
Disabled.args = {
|
|
@@ -7,10 +7,11 @@ export class PdsTextarea {
|
|
|
7
7
|
const textarea = ev.target;
|
|
8
8
|
isRequired(textarea, this);
|
|
9
9
|
if (textarea) {
|
|
10
|
-
this.value = textarea.
|
|
10
|
+
this.value = textarea.value;
|
|
11
11
|
}
|
|
12
12
|
this.pdsTextareaChange.emit({ value: this.value, event: ev });
|
|
13
13
|
};
|
|
14
|
+
this.autocomplete = undefined;
|
|
14
15
|
this.componentId = undefined;
|
|
15
16
|
this.disabled = false;
|
|
16
17
|
this.errorMessage = undefined;
|
|
@@ -32,10 +33,10 @@ export class PdsTextarea {
|
|
|
32
33
|
return classNames.join(' ');
|
|
33
34
|
}
|
|
34
35
|
render() {
|
|
35
|
-
return (h(Host, { key: '
|
|
36
|
-
h(PdsLabel, { key: '
|
|
37
|
-
h("p", { key: '
|
|
38
|
-
h("p", { key: '
|
|
36
|
+
return (h(Host, { key: '14f6fea952c2ff5d1c87f8197ac4f0143163232a', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: '869abfd7d6fb788a136a728732b3fa5980817c3b', class: "pds-textarea" }, this.label &&
|
|
37
|
+
h(PdsLabel, { key: 'c4c659054ab9c9a634f46661c7255a99c22c9c34', htmlFor: this.componentId, text: this.label }), h("textarea", { key: '37eabc8d2f9027bcded41d4789c49f57d117d23a', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage), "aria-invalid": this.invalid ? "true" : undefined, autocomplete: this.autocomplete, class: this.textareaClassNames(), disabled: this.disabled, id: this.componentId, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, rows: this.rows, onChange: this.onTextareaChange }, this.value), this.helperMessage &&
|
|
38
|
+
h("p", { key: '328bb200eff1b3d14905579d3e96904b0eb92af2', class: "pds-textarea__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.invalid &&
|
|
39
|
+
h("p", { key: '6d8594f1819ad67cb055cf4f9d5b52a561ef94a8', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, this.errorMessage))));
|
|
39
40
|
}
|
|
40
41
|
static get is() { return "pds-textarea"; }
|
|
41
42
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,6 +52,23 @@ export class PdsTextarea {
|
|
|
51
52
|
}
|
|
52
53
|
static get properties() {
|
|
53
54
|
return {
|
|
55
|
+
"autocomplete": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"mutable": false,
|
|
58
|
+
"complexType": {
|
|
59
|
+
"original": "string",
|
|
60
|
+
"resolved": "string",
|
|
61
|
+
"references": {}
|
|
62
|
+
},
|
|
63
|
+
"required": false,
|
|
64
|
+
"optional": false,
|
|
65
|
+
"docs": {
|
|
66
|
+
"tags": [],
|
|
67
|
+
"text": "Specifies if and how the browser provides `autocomplete` assistance for the field."
|
|
68
|
+
},
|
|
69
|
+
"attribute": "autocomplete",
|
|
70
|
+
"reflect": false
|
|
71
|
+
},
|
|
54
72
|
"componentId": {
|
|
55
73
|
"type": "string",
|
|
56
74
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-textarea.js","sourceRoot":"","sources":["../../../src/components/pds-textarea/pds-textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\nimport { assignDescription, isRequired, messageId } from '../../utils/form';\nimport { TextareaChangeEventDetail } from './textarea-interface';\nimport { PdsLabel } from '../_internal/pds-label/pds-label';\n\n@Component({\n tag: 'pds-textarea',\n styleUrls: ['../../global/styles/base.scss', 'pds-textarea.scss'],\n shadow: true,\n})\nexport class PdsTextarea {\n @Element() el: HTMLPdsTextareaElement;\n\n /**\n * Specifies if and how the browser provides `autocomplete` assistance for the field.\n */\n @Prop() autocomplete: string;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Indicates whether or not the textarea is disabled\n * @defaultValue false\n */\n @Prop() disabled = false;\n\n /**\n * Specifies the error text and provides an error-themed treatment to the field\n */\n @Prop() errorMessage?: string;\n\n /**\n * Displays a hint or description of the textarea\n */\n @Prop() helperMessage?: string;\n\n /**\n * Indicates whether or not the textarea is invalid or throws an error\n * @defaultValue false\n */\n @Prop({mutable: true}) invalid = false; // eslint-disable-line @stencil-community/strict-mutable\n\n /**\n * Text to be displayed as the textarea label\n */\n @Prop() label?: string;\n\n /**\n * Specifies the name, submitted with the form name/value pair. This value will mirror the componentId\n */\n @Prop() name: string = this.componentId;\n\n /**\n * Specifies a short hint that describes the expected value of the textarea\n */\n @Prop() placeholder?: string;\n\n /**\n * Indicates whether or not the textarea is readonly\n * @defaultValue false\n */\n @Prop() readonly = false;\n\n /**\n * Indicates whether or not the textarea is required\n * @defaultValue false\n */\n @Prop() required = false;\n\n /**\n * Sets number of rows of text visible without needing to scroll in the textarea\n */\n @Prop() rows?: number;\n\n /**\n * The value of the textarea\n */\n @Prop({mutable: true}) value?: string;\n\n /**\n * Event emitted whenever the value of the textarea changes\n */\n @Event() pdsTextareaChange: EventEmitter<TextareaChangeEventDetail>;\n\n private onTextareaChange = (ev: Event) => {\n const textarea = ev.target as HTMLTextAreaElement;\n isRequired(textarea, this);\n\n if (textarea) {\n this.value = textarea.value;\n }\n\n this.pdsTextareaChange.emit({value: this.value, event: ev});\n };\n\n private textareaClassNames() {\n const classNames = ['pds-textarea__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 >\n <div class=\"pds-textarea\">\n {this.label &&\n <PdsLabel htmlFor={this.componentId} text={this.label} />\n }\n <textarea\n aria-describedby={assignDescription(this.componentId, this.invalid, this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n autocomplete={this.autocomplete}\n class={this.textareaClassNames()}\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 rows={this.rows}\n onChange={this.onTextareaChange}\n >{this.value}</textarea>\n {this.helperMessage &&\n <p\n class=\"pds-textarea__helper-message\"\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </p>\n }\n {this.invalid &&\n <p\n aria-live=\"assertive\"\n class=\"pds-textarea__error-message\"\n id={messageId(this.componentId, 'error')}\n >\n {this.errorMessage}\n </p>\n }\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -4,6 +4,7 @@ import { withActions } from '@storybook/addon-actions/decorator';
|
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
args: {
|
|
7
|
+
autocomplete: null,
|
|
7
8
|
componentId: null,
|
|
8
9
|
disabled: false,
|
|
9
10
|
errorMessage: null,
|
|
@@ -28,6 +29,7 @@ export default {
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
const BaseTemplate = (args) => html`<pds-textarea
|
|
32
|
+
autocomplete="${args.autocomplete}"
|
|
31
33
|
component-id="${args.componentId}"
|
|
32
34
|
disabled="${args.disabled}"
|
|
33
35
|
error-message="${args.errorMessage}"
|
|
@@ -47,14 +49,14 @@ const BaseTemplate = (args) => html`<pds-textarea
|
|
|
47
49
|
export const Default = BaseTemplate.bind({});
|
|
48
50
|
Default.args = {
|
|
49
51
|
componentId: 'pds-textarea-default-example',
|
|
50
|
-
label: '
|
|
52
|
+
label: 'Message',
|
|
51
53
|
name: 'Default',
|
|
52
54
|
};
|
|
53
55
|
|
|
54
56
|
export const Rows = BaseTemplate.bind({});
|
|
55
57
|
Rows.args = {
|
|
56
58
|
componentId: 'pds-textarea-rows-example',
|
|
57
|
-
label: '
|
|
59
|
+
label: 'Message',
|
|
58
60
|
name: 'Rows',
|
|
59
61
|
rows: 4,
|
|
60
62
|
};
|
|
@@ -62,7 +64,7 @@ Rows.args = {
|
|
|
62
64
|
export const Required = BaseTemplate.bind({});
|
|
63
65
|
Required.args = {
|
|
64
66
|
componentId: 'pds-textarea-required-example',
|
|
65
|
-
label: '
|
|
67
|
+
label: 'Message',
|
|
66
68
|
name: 'Required',
|
|
67
69
|
required: true,
|
|
68
70
|
};
|
|
@@ -70,23 +72,23 @@ Required.args = {
|
|
|
70
72
|
export const Placeholder = BaseTemplate.bind({});
|
|
71
73
|
Placeholder.args = {
|
|
72
74
|
componentId: 'pds-textarea-placeholder-example',
|
|
73
|
-
label: '
|
|
75
|
+
label: 'Message',
|
|
74
76
|
name: 'Placeholder',
|
|
75
|
-
placeholder: '
|
|
77
|
+
placeholder: 'Enter a message...'
|
|
76
78
|
};
|
|
77
79
|
|
|
78
80
|
export const Disabled = BaseTemplate.bind({});
|
|
79
81
|
Disabled.args = {
|
|
80
82
|
componentId: 'pds-textarea-disabled-example',
|
|
81
83
|
disabled: true,
|
|
82
|
-
label: '
|
|
84
|
+
label: 'Message',
|
|
83
85
|
name: 'Disabled',
|
|
84
86
|
};
|
|
85
87
|
|
|
86
88
|
export const Readonly = BaseTemplate.bind({});
|
|
87
89
|
Readonly.args = {
|
|
88
90
|
componentId: 'pds-textarea-readonly-example',
|
|
89
|
-
label: '
|
|
91
|
+
label: 'Message',
|
|
90
92
|
name: 'Readonly',
|
|
91
93
|
readonly: true,
|
|
92
94
|
value: 'Readonly Value'
|
|
@@ -96,7 +98,7 @@ export const Message = BaseTemplate.bind({});
|
|
|
96
98
|
Message.args = {
|
|
97
99
|
componentId: 'pds-textarea-helper-example',
|
|
98
100
|
helperMessage: 'Helper message text',
|
|
99
|
-
label: '
|
|
101
|
+
label: 'Message',
|
|
100
102
|
name: 'Message',
|
|
101
103
|
};
|
|
102
104
|
|
|
@@ -105,7 +107,16 @@ Invalid.args = {
|
|
|
105
107
|
componentId: 'pds-textarea-error-example',
|
|
106
108
|
errorMessage: 'Error',
|
|
107
109
|
invalid: true,
|
|
108
|
-
label: '
|
|
110
|
+
label: 'Message',
|
|
109
111
|
name: 'Error',
|
|
110
112
|
required: true,
|
|
111
113
|
};
|
|
114
|
+
|
|
115
|
+
export const Autocomplete = BaseTemplate.bind({});
|
|
116
|
+
Autocomplete.args = {
|
|
117
|
+
componentId: 'pds-textarea-autocomplete',
|
|
118
|
+
label: 'Message',
|
|
119
|
+
name: 'message',
|
|
120
|
+
autocomplete: 'on',
|
|
121
|
+
placeholder: 'Enter a message...',
|
|
122
|
+
};
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
}
|
|
20
20
|
:host ::slotted([slot=content]) {
|
|
21
21
|
display: block;
|
|
22
|
+
max-width: var(--sizing-width-default);
|
|
22
23
|
white-space: normal;
|
|
23
|
-
width: var(--sizing-width-default);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.pds-tooltip__content {
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
border-radius: var(--border-radius-overlay);
|
|
29
29
|
box-shadow: var(--box-shadow-default);
|
|
30
30
|
color: var(--color-text-default);
|
|
31
|
+
max-width: var(--sizing-width-default);
|
|
31
32
|
opacity: 0;
|
|
32
33
|
padding: var(--spacing-padding-overlay);
|
|
33
34
|
position: absolute;
|
|
@@ -8,11 +8,9 @@ export class PdsTooltip {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
this.handleHide = () => {
|
|
10
10
|
this.hideTooltip();
|
|
11
|
-
this.pdsTooltipHide.emit();
|
|
12
11
|
};
|
|
13
12
|
this.handleShow = () => {
|
|
14
13
|
this.showTooltip();
|
|
15
|
-
this.pdsTooltipShow.emit();
|
|
16
14
|
};
|
|
17
15
|
this.isOpen = false;
|
|
18
16
|
this.content = undefined;
|
|
@@ -20,6 +18,7 @@ export class PdsTooltip {
|
|
|
20
18
|
this.hasArrow = true;
|
|
21
19
|
this.htmlContent = false;
|
|
22
20
|
this.placement = 'right';
|
|
21
|
+
this.maxWidth = '352px';
|
|
23
22
|
this.opened = false;
|
|
24
23
|
}
|
|
25
24
|
handleOpenToggle() {
|
|
@@ -58,13 +57,13 @@ export class PdsTooltip {
|
|
|
58
57
|
this.opened = false;
|
|
59
58
|
}
|
|
60
59
|
render() {
|
|
61
|
-
return (h(Host, { key: '
|
|
60
|
+
return (h(Host, { key: 'cd40b8fab6c861456b87390f138ee7b41f4d37a0', onMouseEnter: this.handleShow, onMouseLeave: this.handleHide, onFocusin: this.handleShow, onFocusout: this.handleHide }, h("div", { key: '7aa003d0600cdda1452acec8ab5392cd6dbeeed8', class: `
|
|
62
61
|
pds-tooltip
|
|
63
62
|
pds-tooltip--${this.placement}
|
|
64
63
|
${this.htmlContent ? 'pds-tooltip--has-html-content' : ''}
|
|
65
64
|
${this.opened ? 'pds-tooltip--is-open' : ''}
|
|
66
65
|
${this.hasArrow ? '' : 'pds-tooltip--no-arrow'}
|
|
67
|
-
` }, h("span", { key: '
|
|
66
|
+
` }, h("span", { key: '2f83a557860d79c0930390689ce72a9fa5726b3d', "aria-describedby": this.componentId, class: "pds-tooltip__trigger" }, h("slot", { key: 'a78f31dae475a53ab709711a3c59142ed8d14418' })), h("div", { key: '42cabc5b6ef126e054383361531b982a4472953d', class: "pds-tooltip__content", "aria-hidden": this.opened ? 'false' : 'true', "aria-live": this.opened ? 'polite' : 'off', id: this.componentId, ref: (el) => (this.contentEl = el), role: "tooltip", style: { maxWidth: this.maxWidth } }, h("slot", { key: '990c5170d5f84863b7eaaeb4781a8ab6eff4b1b8', name: "content" }), this.content))));
|
|
68
67
|
}
|
|
69
68
|
static get is() { return "pds-tooltip"; }
|
|
70
69
|
static get encapsulation() { return "shadow"; }
|
|
@@ -177,6 +176,27 @@ export class PdsTooltip {
|
|
|
177
176
|
"reflect": true,
|
|
178
177
|
"defaultValue": "'right'"
|
|
179
178
|
},
|
|
179
|
+
"maxWidth": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"mutable": false,
|
|
182
|
+
"complexType": {
|
|
183
|
+
"original": "string",
|
|
184
|
+
"resolved": "string",
|
|
185
|
+
"references": {}
|
|
186
|
+
},
|
|
187
|
+
"required": false,
|
|
188
|
+
"optional": false,
|
|
189
|
+
"docs": {
|
|
190
|
+
"tags": [{
|
|
191
|
+
"name": "defaultValue",
|
|
192
|
+
"text": "\"352px\""
|
|
193
|
+
}],
|
|
194
|
+
"text": "Sets the maximum width of the tooltip content"
|
|
195
|
+
},
|
|
196
|
+
"attribute": "max-width",
|
|
197
|
+
"reflect": false,
|
|
198
|
+
"defaultValue": "'352px'"
|
|
199
|
+
},
|
|
180
200
|
"opened": {
|
|
181
201
|
"type": "boolean",
|
|
182
202
|
"mutable": true,
|
|
@@ -205,39 +225,6 @@ export class PdsTooltip {
|
|
|
205
225
|
"isOpen": {}
|
|
206
226
|
};
|
|
207
227
|
}
|
|
208
|
-
static get events() {
|
|
209
|
-
return [{
|
|
210
|
-
"method": "pdsTooltipHide",
|
|
211
|
-
"name": "pdsTooltipHide",
|
|
212
|
-
"bubbles": true,
|
|
213
|
-
"cancelable": true,
|
|
214
|
-
"composed": true,
|
|
215
|
-
"docs": {
|
|
216
|
-
"tags": [],
|
|
217
|
-
"text": "Emitted after a tooltip is closed"
|
|
218
|
-
},
|
|
219
|
-
"complexType": {
|
|
220
|
-
"original": "any",
|
|
221
|
-
"resolved": "any",
|
|
222
|
-
"references": {}
|
|
223
|
-
}
|
|
224
|
-
}, {
|
|
225
|
-
"method": "pdsTooltipShow",
|
|
226
|
-
"name": "pdsTooltipShow",
|
|
227
|
-
"bubbles": true,
|
|
228
|
-
"cancelable": true,
|
|
229
|
-
"composed": true,
|
|
230
|
-
"docs": {
|
|
231
|
-
"tags": [],
|
|
232
|
-
"text": "Emitted after a tooltip is shown"
|
|
233
|
-
},
|
|
234
|
-
"complexType": {
|
|
235
|
-
"original": "any",
|
|
236
|
-
"resolved": "any",
|
|
237
|
-
"references": {}
|
|
238
|
-
}
|
|
239
|
-
}];
|
|
240
|
-
}
|
|
241
228
|
static get methods() {
|
|
242
229
|
return {
|
|
243
230
|
"showTooltip": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-tooltip.js","sourceRoot":"","sources":["../../../src/components/pds-tooltip/pds-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"pds-tooltip.js","sourceRoot":"","sources":["../../../src/components/pds-tooltip/pds-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACxF,OAAO,EACL,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAE7B;;;GAGG;AAOH,MAAM,OAAO,UAAU;;QA8Gb,eAAU,GAAG,GAAG,EAAE;YACxB,IAAI,CAAC,WAAW,EAAE,CAAC;QACrB,CAAC,CAAC;QAEM,eAAU,GAAG,GAAG,EA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I,CAAC,UAAU,EAC1B,UAAU,EAAE,IAAI,CAAC,UAAU;YAE3B,4DACE,KAAK,EAAE;;2BAEU,IAAI,CAAC,SAAS;cAC3B,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE;cACvD,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE;cACzC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,uBAAuB;WAC/C;gBAED,iFACoB,IAAI,CAAC,WAAW,EAClC,KAAK,EAAC,sBAAsB;oBAE5B,8DAAQ,CACH;gBAEP,4DAAK,KAAK,EAAC,sBAAsB,iBAClB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,eAChC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,EACzC,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,EAClC,IAAI,EAAC,SAAS,EACd,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;oBAElC,6DACE,IAAI,EAAC,SAAS,GACR;oBACP,IAAI,CAAC,OAAO,CACT,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, State, h, Method, Watch } from '@stencil/core';\nimport {\n positionTooltip\n} from '../../utils/overlay';\n\n/**\n * @slot (default) - The tooltip's target element\n * @slot content - HTML content for the tooltip\n */\n\n@Component({\n tag: 'pds-tooltip',\n styleUrls: ['../../global/styles/base.scss', 'pds-tooltip.scss'],\n shadow: true,\n})\nexport class PdsTooltip {\n private contentEl: HTMLElement | null;\n\n /**\n * Reference to the Host element\n */\n @Element() el: HTMLPdsTooltipElement;\n\n /**\n * Determines when the tooltip is open\n * @defaultValue false\n */\n @State() isOpen = false;\n\n /**\n * Content for the tooltip. If HTML is required, use the content slot\n */\n @Prop() content: string;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Determines whether or not the tooltip has an arrow\n * @defaultValue true\n */\n @Prop() hasArrow? = true;\n\n /**\n * Enable this option when using the content slot\n * @defaultValue false\n */\n @Prop() htmlContent = false;\n\n /**\n * Determines the preferred position of the tooltip\n * @defaultValue \"right\"\n */\n @Prop({ reflect: true }) placement:\n 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'right';\n\n /**\n * Sets the maximum width of the tooltip content\n * @defaultValue \"352px\"\n */\n @Prop() maxWidth: string = '352px';\n\n /**\n * Determines whether or not the tooltip is visible\n * @defaultValue false\n */\n @Prop({mutable: true, reflect: true}) opened = false;\n\n @Watch('opened')\n handleOpenToggle() {\n if (this.opened) {\n this.handleShow();\n } else {\n this.handleHide();\n }\n }\n\n componentWillLoad() {\n if (this.opened) {\n this.showTooltip();\n }\n\n this.el.addEventListener('blur', this.handleHide, true);\n this.el.addEventListener('focus', this.handleShow, true);\n }\n\n componentDidUpdate() {\n if (this.opened) {\n this.showTooltip();\n }\n }\n\n componentDidRender() {\n positionTooltip({elem: this.el, elemPlacement: this.placement, overlay: this.contentEl});\n }\n\n /**\n * Shows the tooltip by enabling the opened property\n */\n @Method()\n async showTooltip() {\n this.opened = true;\n }\n\n /**\n * Hides the tooltip by disabling the opened property\n */\n @Method()\n async hideTooltip() {\n this.opened = false;\n }\n\n private handleHide = () => {\n this.hideTooltip();\n };\n\n private handleShow = () => {\n this.showTooltip();\n };\n\n render() {\n return (\n <Host\n onMouseEnter={this.handleShow}\n onMouseLeave={this.handleHide}\n onFocusin={this.handleShow}\n onFocusout={this.handleHide}\n >\n <div\n class={`\n pds-tooltip\n pds-tooltip--${this.placement}\n ${this.htmlContent ? 'pds-tooltip--has-html-content' : ''}\n ${this.opened ? 'pds-tooltip--is-open' : ''}\n ${this.hasArrow ? '' : 'pds-tooltip--no-arrow'}\n `}\n >\n <span\n aria-describedby={this.componentId}\n class=\"pds-tooltip__trigger\"\n >\n <slot />\n </span>\n\n <div class=\"pds-tooltip__content\"\n aria-hidden={this.opened ? 'false' : 'true'}\n aria-live={this.opened ? 'polite' : 'off'}\n id={this.componentId}\n ref={(el) => (this.contentEl = el)}\n role=\"tooltip\"\n style={{ maxWidth: this.maxWidth }}\n >\n <slot\n name=\"content\"\n ></slot>\n {this.content}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -8,17 +8,17 @@ export default {
|
|
|
8
8
|
decorators: [withActions],
|
|
9
9
|
parameters: {
|
|
10
10
|
actions: {
|
|
11
|
-
handles: [
|
|
11
|
+
handles: [],
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
14
|
title: 'components/Tooltip'
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
const BaseTemplate = (args) => html`
|
|
18
|
-
<pds-tooltip content=${args.content} has-arrow=${args.hasArrow} placement=${args.placement}>${args.slot}</pds-tooltip>`;
|
|
18
|
+
<pds-tooltip content=${args.content} max-width=${args.maxWidth} has-arrow=${args.hasArrow} placement=${args.placement}>${args.slot}</pds-tooltip>`;
|
|
19
19
|
|
|
20
20
|
const HTMLContentTemplate = (args) => html`
|
|
21
|
-
<pds-tooltip has-arrow=${args.hasArrow} placement=${args.placement} html-content=${args.htmlContent}>
|
|
21
|
+
<pds-tooltip has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement=${args.placement} html-content=${args.htmlContent}>
|
|
22
22
|
<div slot="content">
|
|
23
23
|
<p><strong>This is a tooltip</strong></p>
|
|
24
24
|
<p>Tooltips are used to describe or identify an element. In most scenarios, tooltips help the user understand the meaning, function or alt-text of an element.</p>
|
|
@@ -30,46 +30,46 @@ const PositionTemplate = (args) => html`
|
|
|
30
30
|
<div class="demo-container" style="min-height: 50vh; width: 100%; display: flex; align-items: center; justify-content: center;">
|
|
31
31
|
<div class="position-demo-grid">
|
|
32
32
|
<div class="position-demo-grid-item">
|
|
33
|
-
<pds-tooltip content="content 2" has-arrow=${args.hasArrow} placement="top-start" opened=${args.opened}>
|
|
33
|
+
<pds-tooltip content="content 2" has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="top-start" opened=${args.opened}>
|
|
34
34
|
<pds-button variant="accent">t</pds-button>
|
|
35
35
|
</pds-tooltip>
|
|
36
|
-
<pds-tooltip content="content 2" has-arrow=${args.hasArrow} placement="top" opened=${args.opened}>
|
|
36
|
+
<pds-tooltip content="content 2" has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="top" opened=${args.opened}>
|
|
37
37
|
<pds-button variant="accent">t</pds-button>
|
|
38
38
|
</pds-tooltip>
|
|
39
|
-
<pds-tooltip content="content 3" has-arrow=${args.hasArrow} placement="top-end" opened=${args.opened}>
|
|
39
|
+
<pds-tooltip content="content 3" has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="top-end" opened=${args.opened}>
|
|
40
40
|
<pds-button variant="accent">te</pds-button>
|
|
41
41
|
</pds-tooltip>
|
|
42
42
|
</div>
|
|
43
43
|
<div class="position-demo-grid-item">
|
|
44
|
-
<pds-tooltip content="content 1" has-arrow=${args.hasArrow} placement="left-start" opened=${args.opened}>
|
|
44
|
+
<pds-tooltip content="content 1" has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="left-start" opened=${args.opened}>
|
|
45
45
|
<pds-button variant="accent">ls</pds-button>
|
|
46
46
|
</pds-tooltip>
|
|
47
|
-
<pds-tooltip content="content 2" has-arrow=${args.hasArrow} placement="left" opened=${args.opened}>
|
|
47
|
+
<pds-tooltip content="content 2" has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="left" opened=${args.opened}>
|
|
48
48
|
<pds-button variant="accent">l</pds-button>
|
|
49
49
|
</pds-tooltip>
|
|
50
|
-
<pds-tooltip content="content 3" has-arrow=${args.hasArrow} placement="left-end" opened=${args.opened}>
|
|
50
|
+
<pds-tooltip content="content 3" has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="left-end" opened=${args.opened}>
|
|
51
51
|
<pds-button variant="accent">le</pds-button>
|
|
52
52
|
</pds-tooltip>
|
|
53
53
|
</div>
|
|
54
54
|
<div class="position-demo-grid-item">
|
|
55
|
-
<pds-tooltip content="content 1" has-arrow=${args.hasArrow} placement="bottom-start" opened=${args.opened}>
|
|
55
|
+
<pds-tooltip content="content 1" has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="bottom-start" opened=${args.opened}>
|
|
56
56
|
<pds-button variant="accent">bs</pds-button>
|
|
57
57
|
</pds-tooltip>
|
|
58
|
-
<pds-tooltip content="content 2" has-arrow=${args.hasArrow} placement="bottom" opened=${args.opened}>
|
|
58
|
+
<pds-tooltip content="content 2" has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="bottom" opened=${args.opened}>
|
|
59
59
|
<pds-button variant="accent">b</pds-button>
|
|
60
60
|
</pds-tooltip>
|
|
61
|
-
<pds-tooltip content="content 3" has-arrow=${args.hasArrow} placement="bottom-end" opened=${args.opened}>
|
|
61
|
+
<pds-tooltip content="content 3" has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="bottom-end" opened=${args.opened}>
|
|
62
62
|
<pds-button variant="accent">be</pds-button>
|
|
63
63
|
</pds-tooltip>
|
|
64
64
|
</div>
|
|
65
65
|
<div class="position-demo-grid-item">
|
|
66
|
-
<pds-tooltip content="content 1" has-arrow=${args.hasArrow} placement="right-start" opened=${args.opened}>
|
|
66
|
+
<pds-tooltip content="content 1" has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="right-start" opened=${args.opened}>
|
|
67
67
|
<pds-button variant="accent">rs</pds-button>
|
|
68
68
|
</pds-tooltip>
|
|
69
|
-
<pds-tooltip content="content 2" has-arrow=${args.hasArrow} placement="right" opened=${args.opened}>
|
|
69
|
+
<pds-tooltip content="content 2" has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="right" opened=${args.opened}>
|
|
70
70
|
<pds-button variant="accent">r</pds-button>
|
|
71
71
|
</pds-tooltip>
|
|
72
|
-
<pds-tooltip content="content 3" has-arrow=${args.hasArrow} placement="right-end" opened=${args.opened}>
|
|
72
|
+
<pds-tooltip content="content 3" has-arrow=${args.hasArrow} max-width=${args.maxWidth} placement="right-end" opened=${args.opened}>
|
|
73
73
|
<pds-button variant="accent">re</pds-button>
|
|
74
74
|
</pds-tooltip>
|
|
75
75
|
</div>
|