@pine-ds/core 3.17.0 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/index2.js +1 -1
- package/components/index2.js.map +1 -1
- package/components/pds-button2.js +18 -6
- package/components/pds-button2.js.map +1 -1
- package/components/pds-copytext.js +49 -1
- package/components/pds-copytext.js.map +1 -1
- package/components/pds-multiselect.js +60 -14
- package/components/pds-multiselect.js.map +1 -1
- package/components/pds-table-cell2.js +36 -3
- package/components/pds-table-cell2.js.map +1 -1
- package/components/pds-table-head.js +1 -1
- package/components/pds-table-head.js.map +1 -1
- package/components/pds-table-row.js +3 -3
- package/components/pds-table-row.js.map +1 -1
- package/components/pds-table.js +12 -4
- package/components/pds-table.js.map +1 -1
- package/components/pds-text2.js +41 -1
- package/components/pds-text2.js.map +1 -1
- package/components/truncation-tooltip.js +247 -0
- package/components/truncation-tooltip.js.map +1 -0
- package/dist/cjs/{index-DkQebouX.js → index-CjhTEk39.js} +3 -3
- package/dist/cjs/index-CjhTEk39.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pds-accordion.cjs.entry.js +1 -1
- package/dist/cjs/pds-avatar.cjs.entry.js +1 -1
- package/dist/cjs/pds-button.cjs.entry.js +16 -6
- 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 +1 -1
- package/dist/cjs/pds-copytext.cjs.entry.js +48 -2
- package/dist/cjs/pds-copytext.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-filter.cjs.entry.js +1 -1
- package/dist/cjs/pds-input.cjs.entry.js +1 -1
- package/dist/cjs/pds-link.cjs.entry.js +1 -1
- package/dist/cjs/pds-multiselect.cjs.entry.js +57 -14
- package/dist/cjs/pds-multiselect.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/pds-radio.cjs.entry.js +1 -1
- package/dist/cjs/pds-select.cjs.entry.js +1 -1
- package/dist/cjs/pds-sortable-item.cjs.entry.js +1 -1
- package/dist/cjs/pds-switch.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-cell.cjs.entry.js +35 -3
- package/dist/cjs/pds-table-cell.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-head.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-table-row.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-row.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-table.cjs.entry.js +11 -4
- package/dist/cjs/pds-table.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-text.cjs.entry.js +40 -1
- package/dist/cjs/pds-text.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-textarea.cjs.entry.js +1 -1
- package/dist/cjs/pine-core.cjs.js +1 -1
- package/dist/cjs/truncation-tooltip-BGGnm8SZ.js +249 -0
- package/dist/cjs/truncation-tooltip-BGGnm8SZ.js.map +1 -0
- package/dist/collection/components/pds-button/pds-button.css +1 -1
- package/dist/collection/components/pds-button/pds-button.js +20 -4
- package/dist/collection/components/pds-button/pds-button.js.map +1 -1
- package/dist/collection/components/pds-copytext/pds-copytext.js +52 -2
- package/dist/collection/components/pds-copytext/pds-copytext.js.map +1 -1
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +130 -13
- package/dist/collection/components/pds-multiselect/pds-multiselect.js.map +1 -1
- package/dist/collection/components/pds-multiselect/stories/pds-multiselect.stories.js +55 -0
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.css +1 -1
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +37 -3
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js.map +1 -1
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js.map +1 -1
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +3 -3
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js.map +1 -1
- package/dist/collection/components/pds-table/pds-table.css +1 -0
- package/dist/collection/components/pds-table/pds-table.js +33 -17
- package/dist/collection/components/pds-table/pds-table.js.map +1 -1
- package/dist/collection/components/pds-table/stories/pds-table.stories.js +58 -0
- package/dist/collection/components/pds-text/pds-text.js +43 -2
- package/dist/collection/components/pds-text/pds-text.js.map +1 -1
- package/dist/collection/components/pds-text/stories/pds-text.stories.js +21 -2
- package/dist/collection/utils/truncation-tooltip.js +242 -0
- package/dist/collection/utils/truncation-tooltip.js.map +1 -0
- package/dist/docs.json +127 -18
- package/dist/esm/{index-D094LgxJ.js → index-BFkDH5XU.js} +3 -3
- package/dist/esm/index-BFkDH5XU.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pds-accordion.entry.js +1 -1
- package/dist/esm/pds-avatar.entry.js +1 -1
- package/dist/esm/pds-button.entry.js +16 -6
- 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 +1 -1
- package/dist/esm/pds-copytext.entry.js +49 -3
- package/dist/esm/pds-copytext.entry.js.map +1 -1
- package/dist/esm/pds-filter.entry.js +1 -1
- package/dist/esm/pds-input.entry.js +1 -1
- package/dist/esm/pds-link.entry.js +1 -1
- package/dist/esm/pds-multiselect.entry.js +57 -14
- package/dist/esm/pds-multiselect.entry.js.map +1 -1
- package/dist/esm/pds-radio-group.entry.js +1 -1
- package/dist/esm/pds-radio.entry.js +1 -1
- package/dist/esm/pds-select.entry.js +1 -1
- package/dist/esm/pds-sortable-item.entry.js +1 -1
- package/dist/esm/pds-switch.entry.js +1 -1
- package/dist/esm/pds-table-cell.entry.js +35 -3
- package/dist/esm/pds-table-cell.entry.js.map +1 -1
- package/dist/esm/pds-table-head-cell.entry.js +1 -1
- package/dist/esm/pds-table-head.entry.js +1 -1
- package/dist/esm/pds-table-head.entry.js.map +1 -1
- package/dist/esm/pds-table-row.entry.js +3 -3
- package/dist/esm/pds-table-row.entry.js.map +1 -1
- package/dist/esm/pds-table.entry.js +11 -4
- package/dist/esm/pds-table.entry.js.map +1 -1
- package/dist/esm/pds-text.entry.js +40 -1
- package/dist/esm/pds-text.entry.js.map +1 -1
- package/dist/esm/pds-textarea.entry.js +1 -1
- package/dist/esm/pine-core.js +1 -1
- package/dist/esm/truncation-tooltip-CTHpMbU3.js +247 -0
- package/dist/esm/truncation-tooltip-CTHpMbU3.js.map +1 -0
- package/dist/esm-es5/{index-D094LgxJ.js → index-BFkDH5XU.js} +1 -1
- package/dist/esm-es5/index-BFkDH5XU.js.map +1 -0
- package/dist/esm-es5/loader.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-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.entry.js.map +1 -1
- package/dist/esm-es5/pds-filter.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-link.entry.js +1 -1
- package/dist/esm-es5/pds-multiselect.entry.js +1 -1
- package/dist/esm-es5/pds-multiselect.entry.js.map +1 -1
- package/dist/esm-es5/pds-radio-group.entry.js +1 -1
- package/dist/esm-es5/pds-radio.entry.js +1 -1
- package/dist/esm-es5/pds-select.entry.js +1 -1
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
- package/dist/esm-es5/pds-switch.entry.js +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js.map +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-head.entry.js.map +1 -1
- package/dist/esm-es5/pds-table-row.entry.js +1 -1
- package/dist/esm-es5/pds-table-row.entry.js.map +1 -1
- package/dist/esm-es5/pds-table.entry.js +1 -1
- package/dist/esm-es5/pds-table.entry.js.map +1 -1
- package/dist/esm-es5/pds-text.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js.map +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/truncation-tooltip-CTHpMbU3.js +2 -0
- package/dist/esm-es5/truncation-tooltip-CTHpMbU3.js.map +1 -0
- package/dist/pine-core/{p-2aac4495.system.entry.js → p-15ac22bd.system.entry.js} +2 -2
- package/dist/pine-core/{p-425144ae.entry.js → p-1cc2fe8d.entry.js} +2 -2
- package/dist/pine-core/p-203f6e9e.entry.js +2 -0
- package/dist/pine-core/p-203f6e9e.entry.js.map +1 -0
- package/dist/pine-core/{p-0ac54273.entry.js → p-276f774a.entry.js} +2 -2
- package/dist/pine-core/p-27ccbd3f.entry.js +2 -0
- package/dist/pine-core/p-27ccbd3f.entry.js.map +1 -0
- package/dist/pine-core/p-2e22a1fc.system.entry.js +2 -0
- package/dist/pine-core/p-2e22a1fc.system.entry.js.map +1 -0
- package/dist/pine-core/{p-ce069162.entry.js → p-32f65e48.entry.js} +2 -2
- package/dist/pine-core/{p-36e5e9f4.system.entry.js → p-3ea301dd.system.entry.js} +2 -2
- package/dist/pine-core/p-3ea301dd.system.entry.js.map +1 -0
- package/dist/pine-core/p-4189f1be.system.entry.js +2 -0
- package/dist/pine-core/p-4189f1be.system.entry.js.map +1 -0
- package/dist/pine-core/{p-7d7dce2c.system.entry.js → p-4232520f.system.entry.js} +2 -2
- package/dist/pine-core/{p-8e40c9ef.entry.js → p-439e3343.entry.js} +2 -2
- package/dist/pine-core/p-439e3343.entry.js.map +1 -0
- package/dist/pine-core/{p-b46f66e8.system.entry.js → p-45c1f3ea.system.entry.js} +2 -2
- package/dist/pine-core/{p-5abc5d82.system.entry.js → p-49c2e2ce.system.entry.js} +2 -2
- package/dist/pine-core/{p-b1a7a0b2.entry.js → p-4de64b1f.entry.js} +2 -2
- package/dist/pine-core/{p-94c73d98.entry.js → p-4e015ddd.entry.js} +2 -2
- package/dist/pine-core/p-4e015ddd.entry.js.map +1 -0
- package/dist/pine-core/{p-0b52923b.system.entry.js → p-52c5ced3.system.entry.js} +2 -2
- package/dist/pine-core/{p-3815f565.entry.js → p-593cee44.entry.js} +2 -2
- package/dist/pine-core/{p-73bce0bf.entry.js → p-5a7b25d0.entry.js} +2 -2
- package/dist/pine-core/p-5hPM5knE.js +2 -0
- package/dist/pine-core/p-5hPM5knE.js.map +1 -0
- package/dist/pine-core/{p-48ed8147.entry.js → p-632e398f.entry.js} +2 -2
- package/dist/pine-core/{p-957647f9.entry.js → p-663abd80.entry.js} +2 -2
- package/dist/pine-core/{p-23111b1c.system.entry.js → p-6980edfe.system.entry.js} +2 -2
- package/dist/pine-core/{p-BxVkyfaO.system.js → p-6I02BpQf.system.js} +1 -1
- package/dist/pine-core/p-6I02BpQf.system.js.map +1 -0
- package/dist/pine-core/{p-c9965216.system.entry.js → p-6fbe6be4.system.entry.js} +2 -2
- package/dist/pine-core/p-7514a191.entry.js +2 -0
- package/dist/pine-core/p-7514a191.entry.js.map +1 -0
- package/dist/pine-core/{p-bd18b9bf.system.entry.js → p-77d4f274.system.entry.js} +2 -2
- package/dist/pine-core/{p-78246e05.entry.js → p-85ce731b.entry.js} +2 -2
- package/dist/pine-core/{p-b1820970.system.entry.js → p-87cee4a0.system.entry.js} +2 -2
- package/dist/pine-core/{p-fbd8ae50.entry.js → p-88686193.entry.js} +2 -2
- package/dist/pine-core/p-88eb4f6c.entry.js +2 -0
- package/dist/pine-core/p-88eb4f6c.entry.js.map +1 -0
- package/dist/pine-core/{p-b09bde5c.system.entry.js → p-8ab66dbc.system.entry.js} +2 -2
- package/dist/pine-core/p-8be316b4.system.entry.js +2 -0
- package/dist/pine-core/p-8be316b4.system.entry.js.map +1 -0
- package/dist/pine-core/{p-7a11a6c7.entry.js → p-8f935480.entry.js} +2 -2
- package/dist/pine-core/p-9263809e.entry.js +2 -0
- package/dist/pine-core/p-9263809e.entry.js.map +1 -0
- package/dist/pine-core/{p-3f05d72e.system.entry.js → p-9e3e441c.system.entry.js} +2 -2
- package/dist/pine-core/{p-3cd53462.entry.js → p-9e8296fc.entry.js} +2 -2
- package/dist/pine-core/{p-BJPmPVaF.system.js.map → p-B3dAc5EW.system.js.map} +1 -1
- package/dist/pine-core/p-B48FyOD0.system.js.map +1 -0
- package/dist/pine-core/{p-DY97YDUU.system.js.map → p-B5CyjPYU.system.js.map} +1 -1
- package/dist/pine-core/{p-8KFA3I5T.system.js.map → p-B8CAflct.system.js.map} +1 -1
- package/dist/pine-core/{p-N-jt0_Yl.system.js.map → p-BBJXL9br.system.js.map} +1 -1
- package/dist/pine-core/{p-D094LgxJ.js → p-BFkDH5XU.js} +1 -1
- package/dist/pine-core/p-BFkDH5XU.js.map +1 -0
- package/dist/pine-core/{p-CjQwwLdV.system.js.map → p-Bd3ynCsJ.system.js.map} +1 -1
- package/dist/pine-core/{p-D4YdQDsG.system.js.map → p-BiLmvJTd.system.js.map} +1 -1
- package/dist/pine-core/{p-PZw10cnm.system.js.map → p-C8y7SAd7.system.js.map} +1 -1
- package/dist/pine-core/{p-gcCcHox5.system.js.map → p-CCh7iS6N.system.js.map} +1 -1
- package/dist/pine-core/p-CEE11B7K.system.js.map +1 -0
- package/dist/pine-core/{p-eT6pKhWF.system.js.map → p-CObf7nrT.system.js.map} +1 -1
- package/dist/pine-core/p-CPri5wQG.system.js.map +1 -0
- package/dist/pine-core/{p-D3Ug1A-l.system.js.map → p-CbRBe3Eq.system.js.map} +1 -1
- package/dist/pine-core/{p-c2oMjk1r.system.js.map → p-Ctc231vq.system.js.map} +1 -1
- package/dist/pine-core/p-DXVwADJT.system.js +2 -0
- package/dist/pine-core/p-DXVwADJT.system.js.map +1 -0
- package/dist/pine-core/p-DenbFuEN.system.js.map +1 -0
- package/dist/pine-core/{p-BnJypAy2.system.js.map → p-DhLX7iDs.system.js.map} +1 -1
- package/dist/pine-core/p-Dkz0RoFB.system.js.map +1 -0
- package/dist/pine-core/p-G3GztZmn.system.js.map +1 -0
- package/dist/pine-core/p-JAVnELnm.system.js +1 -1
- package/dist/pine-core/{p-15e554ae.entry.js → p-a30edeb1.entry.js} +2 -2
- package/dist/pine-core/{p-5O8bhSdk.system.js.map → p-aKHwHZQR.system.js.map} +1 -1
- package/dist/pine-core/{p-fce519e3.system.entry.js → p-b416cb4b.system.entry.js} +2 -2
- package/dist/pine-core/p-b416cb4b.system.entry.js.map +1 -0
- package/dist/pine-core/{p-d2b2caa2.system.entry.js → p-b6f57c0f.system.entry.js} +2 -2
- package/dist/pine-core/p-b7f2f9f3.system.entry.js +2 -0
- package/dist/pine-core/p-b7f2f9f3.system.entry.js.map +1 -0
- package/dist/pine-core/p-c25ea8de.entry.js +2 -0
- package/dist/pine-core/p-c25ea8de.entry.js.map +1 -0
- package/dist/pine-core/p-e78986ea.system.entry.js +2 -0
- package/dist/pine-core/p-e78986ea.system.entry.js.map +1 -0
- package/dist/pine-core/{p-13105538.system.entry.js → p-f795d3fe.system.entry.js} +2 -2
- package/dist/pine-core/p-f7d9bZ8U.system.js.map +1 -0
- package/dist/pine-core/p-f81b0dbb.system.entry.js +2 -0
- package/dist/pine-core/p-f81b0dbb.system.entry.js.map +1 -0
- package/dist/pine-core/{p-2d21bc31.entry.js → p-f8a2aedd.entry.js} +2 -2
- package/dist/pine-core/{p-f0df10c7.system.entry.js → p-fbe793c7.system.entry.js} +2 -2
- package/dist/pine-core/{p-CQtQQn3_.system.js.map → p-hL5Id7g5.system.js.map} +1 -1
- package/dist/pine-core/{p-BK1BTkTt.system.js.map → p-hzdqYC6e.system.js.map} +1 -1
- package/dist/pine-core/pds-button.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-copytext.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-multiselect.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-table-cell.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-table-head.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-table-row.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-table.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-text.entry.esm.js.map +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/types/components/pds-button/pds-button.d.ts +4 -0
- package/dist/types/components/pds-copytext/pds-copytext.d.ts +10 -0
- package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +27 -0
- package/dist/types/components/pds-table/pds-table-cell/pds-table-cell.d.ts +7 -1
- package/dist/types/components/pds-table/pds-table-row/pds-table-row.d.ts +1 -1
- package/dist/types/components/pds-table/pds-table.d.ts +6 -7
- package/dist/types/components/pds-text/pds-text.d.ts +9 -0
- package/dist/types/components.d.ts +45 -11
- package/dist/types/utils/truncation-tooltip.d.ts +21 -0
- package/dist/vscode.html-data.json +26 -5
- package/hydrate/index.js +452 -34
- package/hydrate/index.mjs +452 -34
- package/package.json +2 -2
- package/dist/cjs/index-DkQebouX.js.map +0 -1
- package/dist/esm/index-D094LgxJ.js.map +0 -1
- package/dist/esm-es5/index-D094LgxJ.js.map +0 -1
- package/dist/pine-core/p-003884fd.entry.js +0 -2
- package/dist/pine-core/p-003884fd.entry.js.map +0 -1
- package/dist/pine-core/p-1971d358.entry.js +0 -2
- package/dist/pine-core/p-1971d358.entry.js.map +0 -1
- package/dist/pine-core/p-23aba538.entry.js +0 -2
- package/dist/pine-core/p-23aba538.entry.js.map +0 -1
- package/dist/pine-core/p-36e5e9f4.system.entry.js.map +0 -1
- package/dist/pine-core/p-3b0a4abe.entry.js +0 -2
- package/dist/pine-core/p-3b0a4abe.entry.js.map +0 -1
- package/dist/pine-core/p-3c026ec7.system.entry.js +0 -2
- package/dist/pine-core/p-3c026ec7.system.entry.js.map +0 -1
- package/dist/pine-core/p-6877a50d.system.entry.js +0 -2
- package/dist/pine-core/p-6877a50d.system.entry.js.map +0 -1
- package/dist/pine-core/p-6918b378.system.entry.js +0 -2
- package/dist/pine-core/p-6918b378.system.entry.js.map +0 -1
- package/dist/pine-core/p-8e40c9ef.entry.js.map +0 -1
- package/dist/pine-core/p-93d0be59.entry.js +0 -2
- package/dist/pine-core/p-93d0be59.entry.js.map +0 -1
- package/dist/pine-core/p-94c73d98.entry.js.map +0 -1
- package/dist/pine-core/p-BpZTjdau.system.js.map +0 -1
- package/dist/pine-core/p-BxVkyfaO.system.js.map +0 -1
- package/dist/pine-core/p-CjnIO2Ro.system.js.map +0 -1
- package/dist/pine-core/p-Ct5QAsPN.system.js.map +0 -1
- package/dist/pine-core/p-D094LgxJ.js.map +0 -1
- package/dist/pine-core/p-DZEhYV6y.system.js.map +0 -1
- package/dist/pine-core/p-Ri89mw0-.system.js.map +0 -1
- package/dist/pine-core/p-ZUqfslIz.system.js.map +0 -1
- package/dist/pine-core/p-aeb2f6ac.system.entry.js +0 -2
- package/dist/pine-core/p-aeb2f6ac.system.entry.js.map +0 -1
- package/dist/pine-core/p-b3c66c58.entry.js +0 -2
- package/dist/pine-core/p-b3c66c58.entry.js.map +0 -1
- package/dist/pine-core/p-cb8c24ad.system.entry.js +0 -2
- package/dist/pine-core/p-cb8c24ad.system.entry.js.map +0 -1
- package/dist/pine-core/p-d83d6fce.system.entry.js +0 -2
- package/dist/pine-core/p-d83d6fce.system.entry.js.map +0 -1
- package/dist/pine-core/p-fce519e3.system.entry.js.map +0 -1
- package/dist/pine-core/p-kYQszSpu.system.js.map +0 -1
- /package/dist/pine-core/{p-2aac4495.system.entry.js.map → p-15ac22bd.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-425144ae.entry.js.map → p-1cc2fe8d.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0ac54273.entry.js.map → p-276f774a.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ce069162.entry.js.map → p-32f65e48.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7d7dce2c.system.entry.js.map → p-4232520f.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b46f66e8.system.entry.js.map → p-45c1f3ea.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5abc5d82.system.entry.js.map → p-49c2e2ce.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b1a7a0b2.entry.js.map → p-4de64b1f.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0b52923b.system.entry.js.map → p-52c5ced3.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3815f565.entry.js.map → p-593cee44.entry.js.map} +0 -0
- /package/dist/pine-core/{p-73bce0bf.entry.js.map → p-5a7b25d0.entry.js.map} +0 -0
- /package/dist/pine-core/{p-48ed8147.entry.js.map → p-632e398f.entry.js.map} +0 -0
- /package/dist/pine-core/{p-957647f9.entry.js.map → p-663abd80.entry.js.map} +0 -0
- /package/dist/pine-core/{p-23111b1c.system.entry.js.map → p-6980edfe.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c9965216.system.entry.js.map → p-6fbe6be4.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-bd18b9bf.system.entry.js.map → p-77d4f274.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-78246e05.entry.js.map → p-85ce731b.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b1820970.system.entry.js.map → p-87cee4a0.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-fbd8ae50.entry.js.map → p-88686193.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b09bde5c.system.entry.js.map → p-8ab66dbc.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7a11a6c7.entry.js.map → p-8f935480.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3f05d72e.system.entry.js.map → p-9e3e441c.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3cd53462.entry.js.map → p-9e8296fc.entry.js.map} +0 -0
- /package/dist/pine-core/{p-15e554ae.entry.js.map → p-a30edeb1.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d2b2caa2.system.entry.js.map → p-b6f57c0f.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-13105538.system.entry.js.map → p-f795d3fe.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-2d21bc31.entry.js.map → p-f8a2aedd.entry.js.map} +0 -0
- /package/dist/pine-core/{p-f0df10c7.system.entry.js.map → p-fbe793c7.system.entry.js.map} +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { copy as copyIcon } from "@pine-ds/icons/icons";
|
|
3
|
+
import { setupTruncationTooltip } from "../../utils/truncation-tooltip";
|
|
3
4
|
export class PdsCopytext {
|
|
4
5
|
constructor() {
|
|
6
|
+
this.truncationCleanup = null;
|
|
5
7
|
/**
|
|
6
8
|
* Determines whether `copytext` should have a visible border.
|
|
7
9
|
* @defaultValue true
|
|
@@ -14,6 +16,7 @@ export class PdsCopytext {
|
|
|
14
16
|
this.fullWidth = false;
|
|
15
17
|
/**
|
|
16
18
|
* Determines whether the `value` should truncate and display with an ellipsis.
|
|
19
|
+
* When text overflows, a tooltip showing the full value will appear on hover/focus.
|
|
17
20
|
* @defaultValue false
|
|
18
21
|
*/
|
|
19
22
|
this.truncate = false;
|
|
@@ -32,6 +35,43 @@ export class PdsCopytext {
|
|
|
32
35
|
this.copyToClipboard(this.value);
|
|
33
36
|
};
|
|
34
37
|
}
|
|
38
|
+
handleTruncateChange(newValue) {
|
|
39
|
+
if (newValue) {
|
|
40
|
+
this.initTruncationTooltip();
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.destroyTruncationTooltip();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
handleValueChange() {
|
|
47
|
+
if (this.truncate) {
|
|
48
|
+
this.initTruncationTooltip();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
componentDidLoad() {
|
|
52
|
+
if (this.truncate) {
|
|
53
|
+
this.initTruncationTooltip();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
disconnectedCallback() {
|
|
57
|
+
this.destroyTruncationTooltip();
|
|
58
|
+
}
|
|
59
|
+
initTruncationTooltip() {
|
|
60
|
+
this.destroyTruncationTooltip();
|
|
61
|
+
if (this.valueSpanEl) {
|
|
62
|
+
this.truncationCleanup = setupTruncationTooltip({
|
|
63
|
+
hostEl: this.el,
|
|
64
|
+
contentEl: this.valueSpanEl,
|
|
65
|
+
getTooltipText: () => this.value || '',
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
destroyTruncationTooltip() {
|
|
70
|
+
if (this.truncationCleanup) {
|
|
71
|
+
this.truncationCleanup();
|
|
72
|
+
this.truncationCleanup = null;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
35
75
|
classNames() {
|
|
36
76
|
const classNames = ['pds-copytext'];
|
|
37
77
|
if (this.border) {
|
|
@@ -46,7 +86,7 @@ export class PdsCopytext {
|
|
|
46
86
|
return classNames.join(' ');
|
|
47
87
|
}
|
|
48
88
|
render() {
|
|
49
|
-
return (h(Host, { key: '
|
|
89
|
+
return (h(Host, { key: 'bbca278ca4f2567d3aa5dfa27106fc09f0f4d959', class: this.classNames(), id: this.componentId }, h("pds-button", { key: '8a62ae4d01681648a95b313970a89f8641f1d8c9', type: "button", variant: "unstyled", onClick: this.handleClick }, h("span", { key: '465585ce0780a19113f8e7897a9c7af7114b2a1d', ref: (el) => this.valueSpanEl = el }, this.value), h("pds-icon", { key: 'db0295dfec0c4a1acbea50b849d631ea6325bf00', icon: copyIcon, size: "16px" }))));
|
|
50
90
|
}
|
|
51
91
|
static get is() { return "pds-copytext"; }
|
|
52
92
|
static get encapsulation() { return "shadow"; }
|
|
@@ -142,7 +182,7 @@ export class PdsCopytext {
|
|
|
142
182
|
"name": "defaultValue",
|
|
143
183
|
"text": "false"
|
|
144
184
|
}],
|
|
145
|
-
"text": "Determines whether the `value` should truncate and display with an ellipsis."
|
|
185
|
+
"text": "Determines whether the `value` should truncate and display with an ellipsis.\nWhen text overflows, a tooltip showing the full value will appear on hover/focus."
|
|
146
186
|
},
|
|
147
187
|
"getter": false,
|
|
148
188
|
"setter": false,
|
|
@@ -189,5 +229,15 @@ export class PdsCopytext {
|
|
|
189
229
|
}
|
|
190
230
|
}];
|
|
191
231
|
}
|
|
232
|
+
static get elementRef() { return "el"; }
|
|
233
|
+
static get watchers() {
|
|
234
|
+
return [{
|
|
235
|
+
"propName": "truncate",
|
|
236
|
+
"methodName": "handleTruncateChange"
|
|
237
|
+
}, {
|
|
238
|
+
"propName": "value",
|
|
239
|
+
"methodName": "handleValueChange"
|
|
240
|
+
}];
|
|
241
|
+
}
|
|
192
242
|
}
|
|
193
243
|
//# sourceMappingURL=pds-copytext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-copytext.js","sourceRoot":"","sources":["../../../../src/components/pds-copytext/pds-copytext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"pds-copytext.js","sourceRoot":"","sources":["../../../../src/components/pds-copytext/pds-copytext.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop, Watch } from '@stencil/core';\n\nimport { copy as copyIcon } from '@pine-ds/icons/icons';\nimport { setupTruncationTooltip } from '../../utils/truncation-tooltip';\n\n@Component({\n tag: 'pds-copytext',\n styleUrls: ['pds-copytext.scss'],\n shadow: true,\n})\nexport class PdsCopytext {\n @Element() el: HTMLPdsCopytextElement;\n private truncationCleanup: (() => void) | null = null;\n private valueSpanEl: HTMLSpanElement;\n\n /**\n * Determines whether `copytext` should have a visible border.\n * @defaultValue true\n */\n @Prop({ reflect: true }) border = true;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Determines whether `copytext` should expand to the full width of its container.\n * @defaultValue false\n */\n @Prop() fullWidth = false;\n\n /**\n * Determines whether the `value` should truncate and display with an ellipsis.\n * When text overflows, a tooltip showing the full value will appear on hover/focus.\n * @defaultValue false\n */\n @Prop() truncate = false;\n\n /**\n * The string displayed that is also copied to the clipboard upon interaction.\n */\n @Prop() value!: string;\n\n @Watch('truncate')\n handleTruncateChange(newValue: boolean) {\n if (newValue) {\n this.initTruncationTooltip();\n } else {\n this.destroyTruncationTooltip();\n }\n }\n\n @Watch('value')\n handleValueChange() {\n if (this.truncate) {\n this.initTruncationTooltip();\n }\n }\n\n componentDidLoad() {\n if (this.truncate) {\n this.initTruncationTooltip();\n }\n }\n\n disconnectedCallback() {\n this.destroyTruncationTooltip();\n }\n\n private initTruncationTooltip() {\n this.destroyTruncationTooltip();\n\n if (this.valueSpanEl) {\n this.truncationCleanup = setupTruncationTooltip({\n hostEl: this.el,\n contentEl: this.valueSpanEl,\n getTooltipText: () => this.value || '',\n });\n }\n }\n\n private destroyTruncationTooltip() {\n if (this.truncationCleanup) {\n this.truncationCleanup();\n this.truncationCleanup = null;\n }\n }\n\n /**\n * Event fired when copyText button is clicked.\n */\n @Event() pdsCopyTextClick: EventEmitter<string>;\n\n private copyToClipboard = async (value: string) => {\n try {\n if (typeof navigator.clipboard !== 'undefined') {\n await navigator.clipboard.writeText(value);\n this.pdsCopyTextClick.emit('Copied to clipboard');\n }\n } catch (err) {\n this.pdsCopyTextClick.emit(`Error writing text to clipboard: ${err}`);\n }\n };\n\n private handleClick = () => {\n this.copyToClipboard(this.value);\n };\n\n private classNames() {\n const classNames = ['pds-copytext'];\n\n if (this.border) {\n classNames.push('pds-copytext--bordered');\n }\n\n if (this.fullWidth) {\n classNames.push('pds-copytext--full-width');\n }\n\n if (this.truncate) {\n classNames.push('pds-copytext--truncated');\n }\n\n return classNames.join(' ');\n }\n\n render() {\n return (\n <Host class={this.classNames()} id={this.componentId}>\n <pds-button type=\"button\" variant=\"unstyled\" onClick={this.handleClick}>\n <span ref={(el) => this.valueSpanEl = el}>{this.value}</span>\n <pds-icon icon={copyIcon} size=\"16px\"></pds-icon>\n </pds-button>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -14,6 +14,16 @@ export class PdsMultiselect {
|
|
|
14
14
|
* Placeholder text for the input field.
|
|
15
15
|
*/
|
|
16
16
|
this.placeholder = 'Select...';
|
|
17
|
+
/**
|
|
18
|
+
* Placeholder text for the search input inside the dropdown panel.
|
|
19
|
+
* @default 'Find...'
|
|
20
|
+
*/
|
|
21
|
+
this.searchPlaceholder = 'Find...';
|
|
22
|
+
/**
|
|
23
|
+
* Whether to close the panel after an option is selected.
|
|
24
|
+
* Defaults to `false` (panel stays open for multi-select).
|
|
25
|
+
*/
|
|
26
|
+
this.closePanelOnSelect = false;
|
|
17
27
|
/**
|
|
18
28
|
* Array of selected option values.
|
|
19
29
|
*/
|
|
@@ -77,6 +87,8 @@ export class PdsMultiselect {
|
|
|
77
87
|
this.creating = false;
|
|
78
88
|
// Flag to prevent focusout from closing during open transition
|
|
79
89
|
this.isOpening = false;
|
|
90
|
+
// Flag to suppress dismiss event when panel closes due to selection (not user dismissal)
|
|
91
|
+
this.isClosingViaSelection = false;
|
|
80
92
|
// Flag to track if initial async fetch has been triggered (prevents double fetch)
|
|
81
93
|
this.initialAsyncFetchTriggered = false;
|
|
82
94
|
// Flag to track if value changed during loading and needs resolution after fetch completes
|
|
@@ -148,8 +160,9 @@ export class PdsMultiselect {
|
|
|
148
160
|
// before we decide to close the dropdown
|
|
149
161
|
setTimeout(() => {
|
|
150
162
|
var _a;
|
|
151
|
-
// Don't close if we're in the middle of opening
|
|
152
|
-
|
|
163
|
+
// Don't close if we're in the middle of opening, already closed,
|
|
164
|
+
// or closing due to a selection (not a user dismissal)
|
|
165
|
+
if (!this.isOpen || this.isOpening || this.isClosingViaSelection)
|
|
153
166
|
return;
|
|
154
167
|
const activeElement = document.activeElement;
|
|
155
168
|
// Check if focus is within our component's shadow root
|
|
@@ -157,6 +170,7 @@ export class PdsMultiselect {
|
|
|
157
170
|
// Also check if focus is on the host element itself
|
|
158
171
|
const isOnHost = activeElement === this.el;
|
|
159
172
|
if (!isInShadowRoot && !isOnHost) {
|
|
173
|
+
this.pdsMultiselectDismiss.emit();
|
|
160
174
|
this.closeDropdown();
|
|
161
175
|
}
|
|
162
176
|
}, 0);
|
|
@@ -286,6 +300,19 @@ export class PdsMultiselect {
|
|
|
286
300
|
var _a;
|
|
287
301
|
(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
288
302
|
}
|
|
303
|
+
/**
|
|
304
|
+
* Clears all selected values and resets the component.
|
|
305
|
+
*/
|
|
306
|
+
async clear() {
|
|
307
|
+
const hadValues = this.value.length > 0 || this.searchQuery !== '';
|
|
308
|
+
this.value = [];
|
|
309
|
+
this.searchQuery = '';
|
|
310
|
+
this.syncSelectedItems();
|
|
311
|
+
this.updateFormValue();
|
|
312
|
+
if (hadValues) {
|
|
313
|
+
this.pdsMultiselectChange.emit({ values: [], items: [] });
|
|
314
|
+
}
|
|
315
|
+
}
|
|
289
316
|
/**
|
|
290
317
|
* Handle global keyboard events for accessibility.
|
|
291
318
|
* Closes dropdown on Escape key press regardless of focus location.
|
|
@@ -296,6 +323,7 @@ export class PdsMultiselect {
|
|
|
296
323
|
return;
|
|
297
324
|
if (event.key === 'Escape') {
|
|
298
325
|
event.preventDefault();
|
|
326
|
+
this.pdsMultiselectDismiss.emit();
|
|
299
327
|
this.closeDropdown();
|
|
300
328
|
(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
301
329
|
}
|
|
@@ -633,6 +661,12 @@ export class PdsMultiselect {
|
|
|
633
661
|
this.isOpen = false;
|
|
634
662
|
this.highlightedIndex = -1;
|
|
635
663
|
this.searchQuery = '';
|
|
664
|
+
// Reset the selection-close guard after the focusout handler's setTimeout has resolved
|
|
665
|
+
if (this.isClosingViaSelection) {
|
|
666
|
+
setTimeout(() => {
|
|
667
|
+
this.isClosingViaSelection = false;
|
|
668
|
+
}, 0);
|
|
669
|
+
}
|
|
636
670
|
// Clean up auto-update
|
|
637
671
|
if (this.cleanupAutoUpdate) {
|
|
638
672
|
this.cleanupAutoUpdate();
|
|
@@ -685,7 +719,7 @@ export class PdsMultiselect {
|
|
|
685
719
|
});
|
|
686
720
|
}
|
|
687
721
|
toggleOption(option) {
|
|
688
|
-
var _a;
|
|
722
|
+
var _a, _b;
|
|
689
723
|
// Handle create option
|
|
690
724
|
if (option.isCreateOption) {
|
|
691
725
|
// Prevent multiple create calls while one is in-flight
|
|
@@ -694,17 +728,18 @@ export class PdsMultiselect {
|
|
|
694
728
|
}
|
|
695
729
|
return;
|
|
696
730
|
}
|
|
697
|
-
const
|
|
731
|
+
const optionId = String(option.id);
|
|
732
|
+
const isSelected = this.value.includes(optionId);
|
|
698
733
|
if (isSelected) {
|
|
699
734
|
// Remove from selection
|
|
700
|
-
this.value = this.value.filter(v => v !==
|
|
735
|
+
this.value = this.value.filter(v => v !== optionId);
|
|
701
736
|
}
|
|
702
737
|
else {
|
|
703
738
|
// Add to selection
|
|
704
739
|
if (this.maxSelections && this.value.length >= this.maxSelections) {
|
|
705
740
|
return;
|
|
706
741
|
}
|
|
707
|
-
this.value = [...this.value,
|
|
742
|
+
this.value = [...this.value, optionId];
|
|
708
743
|
}
|
|
709
744
|
// Sync selected items to ensure no duplicates and accurate state
|
|
710
745
|
this.syncSelectedItems();
|
|
@@ -713,8 +748,15 @@ export class PdsMultiselect {
|
|
|
713
748
|
values: this.value,
|
|
714
749
|
items: this.selectedItems,
|
|
715
750
|
});
|
|
716
|
-
|
|
717
|
-
|
|
751
|
+
if (this.closePanelOnSelect) {
|
|
752
|
+
this.isClosingViaSelection = true;
|
|
753
|
+
this.closeDropdown();
|
|
754
|
+
(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
755
|
+
}
|
|
756
|
+
else {
|
|
757
|
+
// Keep focus on search input, don't close dropdown
|
|
758
|
+
(_b = this.searchInputEl) === null || _b === void 0 ? void 0 : _b.focus();
|
|
759
|
+
}
|
|
718
760
|
}
|
|
719
761
|
selectOption(option) {
|
|
720
762
|
// For keyboard navigation - toggle the option
|
|
@@ -732,7 +774,7 @@ export class PdsMultiselect {
|
|
|
732
774
|
const valueArray = this.ensureValueArray();
|
|
733
775
|
const hasSlottedEmpty = !!this.el.querySelector('[slot="empty"]');
|
|
734
776
|
const hasSlottedLoading = !!this.el.querySelector('[slot="loading"]');
|
|
735
|
-
return (h("div", { class: "pds-multiselect__panel", ref: el => (this.panelEl = el), style: { minWidth: this.minWidth } }, h("div", { class: "pds-multiselect__search" }, h("pds-icon", { name: "search", size: "small" }), h("input", { ref: el => (this.searchInputEl = el), type: "text", class: "pds-multiselect__search-input", placeholder:
|
|
777
|
+
return (h("div", { class: "pds-multiselect__panel", ref: el => (this.panelEl = el), style: { minWidth: this.minWidth } }, h("div", { class: "pds-multiselect__search" }, h("pds-icon", { name: "search", size: "small" }), h("input", { ref: el => (this.searchInputEl = el), type: "text", class: "pds-multiselect__search-input", placeholder: this.searchPlaceholder, value: this.searchQuery, "aria-label": "Search options", "aria-controls": `${this.componentId}-listbox`, "aria-activedescendant": this.highlightedIndex >= 0 ? `${this.componentId}-option-${this.highlightedIndex}` : undefined, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": "true", "aria-autocomplete": "list", autocomplete: "off", onInput: this.handleSearchInputChange, onKeyDown: this.handleSearchInputKeyDown })), this.renderSelectedItemsList(), h("ul", { class: "pds-multiselect__listbox", role: "listbox", "aria-multiselectable": "true", "aria-label": this.label || 'Options', id: `${this.componentId}-listbox`, ref: el => (this.listboxEl = el), style: { maxHeight: this.maxHeight }, onScroll: this.handleScroll }, this.loading && (h("li", { class: "pds-multiselect__loading", role: "presentation" }, hasSlottedLoading ? (h("slot", { name: "loading" })) : (h("pds-loader", { size: "small" })))), !this.loading && filteredOptions.length === 0 && (h("li", { class: "pds-multiselect__empty", role: "presentation" }, hasSlottedEmpty ? (h("slot", { name: "empty" })) : (h("span", null, "No options found")))), filteredOptions.map((option, index) => {
|
|
736
778
|
const isSelected = valueArray.includes(String(option.id));
|
|
737
779
|
const isCreateOption = option.isCreateOption;
|
|
738
780
|
const isHighlighted = index === this.highlightedIndex && !isCreateOption;
|
|
@@ -756,19 +798,19 @@ export class PdsMultiselect {
|
|
|
756
798
|
}
|
|
757
799
|
render() {
|
|
758
800
|
const hasSelections = this.selectedItems.length > 0;
|
|
759
|
-
return (h(Host, { key: '
|
|
801
|
+
return (h(Host, { key: '824364c4ab70a90abc5542ac66eb8259e727e4e6', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: 'ff103de53850eef00dad44e97333c58a54c8ae59', class: "pds-multiselect" }, this.label && (h("label", { key: '0524860c38d53aeddf35e9905abe783cb1174d6b', htmlFor: this.componentId, class: {
|
|
760
802
|
'pds-multiselect__label': true,
|
|
761
803
|
'visually-hidden': this.hideLabel,
|
|
762
|
-
} }, this.label)), h("div", { key: '
|
|
804
|
+
} }, this.label)), h("div", { key: 'b6313b12f499656e98c33af524240fd51a332e68', class: "pds-multiselect__wrapper", ref: el => (this.containerEl = el), onFocusout: this.handleContainerFocusOut, style: { width: this.triggerWidth } }, h("button", { key: 'fbf274a4dace5f039ce1ce46674d66a08c5c280d', ref: el => (this.triggerEl = el), type: "button", class: {
|
|
763
805
|
'pds-multiselect__trigger': true,
|
|
764
806
|
'pds-multiselect__trigger--open': this.isOpen,
|
|
765
807
|
'pds-multiselect__trigger--disabled': this.disabled,
|
|
766
808
|
'pds-multiselect__trigger--invalid': this.invalid || !!this.errorMessage,
|
|
767
809
|
'pds-multiselect__trigger--has-value': hasSelections,
|
|
768
|
-
}, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.errorMessage || this.helperMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, h("span", { key: '
|
|
810
|
+
}, id: this.componentId, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-describedby": assignDescription(this.componentId, this.invalid || !!this.errorMessage, this.errorMessage || this.helperMessage), "aria-invalid": this.invalid || !!this.errorMessage ? 'true' : undefined, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, h("span", { key: '314fc7f00db71a170f1fc7c83306cebc3397a451', class: {
|
|
769
811
|
'pds-multiselect__trigger-text': true,
|
|
770
812
|
'pds-multiselect__trigger-text--placeholder': !hasSelections,
|
|
771
|
-
} }, this.getTriggerText()), h("pds-icon", { key: '
|
|
813
|
+
} }, this.getTriggerText()), h("pds-icon", { key: 'e81690095180cfe9b4799c531ba5d7a9952a2a6c', class: "pds-multiselect__icon", icon: enlarge })), this.renderDropdown()), this.helperMessage && !(this.errorMessage && this.errorMessage.length > 0) && (h("p", { key: 'd2a511d548d10a1bc5b9704f7de6f050e00cb9f4', class: "pds-multiselect__helper", id: messageId(this.componentId, 'helper') }, this.helperMessage)), this.errorMessage && (h("p", { key: '2cca6e85a6ca9033e7baea24a509bb6d7064119d', class: "pds-multiselect__error", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: '6f680d14585dac5c6de3d0ec864ef1311241d2d2', icon: danger, size: "small" }), this.errorMessage)), h("div", { key: '5be84a5f96531cb2add1d490c292a7482b444b83', style: { display: 'none' } }, h("slot", { key: 'cf9bece8f341293b6fa701b185db3926510c3845' })))));
|
|
772
814
|
}
|
|
773
815
|
static get is() { return "pds-multiselect"; }
|
|
774
816
|
static get encapsulation() { return "shadow"; }
|
|
@@ -843,6 +885,49 @@ export class PdsMultiselect {
|
|
|
843
885
|
"attribute": "placeholder",
|
|
844
886
|
"defaultValue": "'Select...'"
|
|
845
887
|
},
|
|
888
|
+
"searchPlaceholder": {
|
|
889
|
+
"type": "string",
|
|
890
|
+
"mutable": false,
|
|
891
|
+
"complexType": {
|
|
892
|
+
"original": "string",
|
|
893
|
+
"resolved": "string",
|
|
894
|
+
"references": {}
|
|
895
|
+
},
|
|
896
|
+
"required": false,
|
|
897
|
+
"optional": false,
|
|
898
|
+
"docs": {
|
|
899
|
+
"tags": [{
|
|
900
|
+
"name": "default",
|
|
901
|
+
"text": "'Find...'"
|
|
902
|
+
}],
|
|
903
|
+
"text": "Placeholder text for the search input inside the dropdown panel."
|
|
904
|
+
},
|
|
905
|
+
"getter": false,
|
|
906
|
+
"setter": false,
|
|
907
|
+
"reflect": false,
|
|
908
|
+
"attribute": "search-placeholder",
|
|
909
|
+
"defaultValue": "'Find...'"
|
|
910
|
+
},
|
|
911
|
+
"closePanelOnSelect": {
|
|
912
|
+
"type": "boolean",
|
|
913
|
+
"mutable": false,
|
|
914
|
+
"complexType": {
|
|
915
|
+
"original": "boolean",
|
|
916
|
+
"resolved": "boolean",
|
|
917
|
+
"references": {}
|
|
918
|
+
},
|
|
919
|
+
"required": false,
|
|
920
|
+
"optional": false,
|
|
921
|
+
"docs": {
|
|
922
|
+
"tags": [],
|
|
923
|
+
"text": "Whether to close the panel after an option is selected.\nDefaults to `false` (panel stays open for multi-select)."
|
|
924
|
+
},
|
|
925
|
+
"getter": false,
|
|
926
|
+
"setter": false,
|
|
927
|
+
"reflect": false,
|
|
928
|
+
"attribute": "close-panel-on-select",
|
|
929
|
+
"defaultValue": "false"
|
|
930
|
+
},
|
|
846
931
|
"name": {
|
|
847
932
|
"type": "string",
|
|
848
933
|
"mutable": false,
|
|
@@ -1417,6 +1502,21 @@ export class PdsMultiselect {
|
|
|
1417
1502
|
}
|
|
1418
1503
|
}
|
|
1419
1504
|
}
|
|
1505
|
+
}, {
|
|
1506
|
+
"method": "pdsMultiselectDismiss",
|
|
1507
|
+
"name": "pdsMultiselectDismiss",
|
|
1508
|
+
"bubbles": true,
|
|
1509
|
+
"cancelable": true,
|
|
1510
|
+
"composed": true,
|
|
1511
|
+
"docs": {
|
|
1512
|
+
"tags": [],
|
|
1513
|
+
"text": "Emitted when the dropdown is dismissed via Escape key or click outside.\n\nThis event fires only when the user explicitly dismisses the panel without making a selection:\n- \u2705 Fires: Pressing Escape key while dropdown is open\n- \u2705 Fires: Clicking outside the component while dropdown is open\n- \u274C Does NOT fire: When panel closes due to selection (including when `closePanelOnSelect` is true)\n- \u274C Does NOT fire: When panel closes programmatically via `closeDropdown()`\n\nEquivalent to Sage's `onEscapeHook`. Use this to restore parent UI state or run cleanup when the user cancels their interaction."
|
|
1514
|
+
},
|
|
1515
|
+
"complexType": {
|
|
1516
|
+
"original": "void",
|
|
1517
|
+
"resolved": "void",
|
|
1518
|
+
"references": {}
|
|
1519
|
+
}
|
|
1420
1520
|
}];
|
|
1421
1521
|
}
|
|
1422
1522
|
static get methods() {
|
|
@@ -1437,6 +1537,23 @@ export class PdsMultiselect {
|
|
|
1437
1537
|
"text": "Sets focus on the trigger button.",
|
|
1438
1538
|
"tags": []
|
|
1439
1539
|
}
|
|
1540
|
+
},
|
|
1541
|
+
"clear": {
|
|
1542
|
+
"complexType": {
|
|
1543
|
+
"signature": "() => Promise<void>",
|
|
1544
|
+
"parameters": [],
|
|
1545
|
+
"references": {
|
|
1546
|
+
"Promise": {
|
|
1547
|
+
"location": "global",
|
|
1548
|
+
"id": "global::Promise"
|
|
1549
|
+
}
|
|
1550
|
+
},
|
|
1551
|
+
"return": "Promise<void>"
|
|
1552
|
+
},
|
|
1553
|
+
"docs": {
|
|
1554
|
+
"text": "Clears all selected values and resets the component.",
|
|
1555
|
+
"tags": []
|
|
1556
|
+
}
|
|
1440
1557
|
}
|
|
1441
1558
|
};
|
|
1442
1559
|
}
|