@pine-ds/core 3.17.0 → 3.19.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 +21 -8
- package/components/pds-button2.js.map +1 -1
- package/components/pds-chip2.js +20 -7
- package/components/pds-chip2.js.map +1 -1
- package/components/pds-combobox.js +2 -2
- package/components/pds-combobox.js.map +1 -1
- package/components/pds-copytext.js +49 -1
- package/components/pds-copytext.js.map +1 -1
- package/components/pds-dropdown-menu-item.js +3 -2
- package/components/pds-dropdown-menu-item.js.map +1 -1
- package/components/pds-dropdown-menu.js +1 -1
- package/components/pds-dropdown-menu.js.map +1 -1
- package/components/pds-link2.js +3 -2
- package/components/pds-link2.js.map +1 -1
- package/components/pds-multiselect.js +61 -15
- 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 +17 -7
- 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 +20 -8
- package/dist/cjs/pds-chip.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-combobox.cjs.entry.js +2 -2
- package/dist/cjs/pds-combobox.entry.cjs.js.map +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-dropdown-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/pds-dropdown-menu-item.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +1 -1
- package/dist/cjs/pds-dropdown-menu.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 +3 -3
- package/dist/cjs/pds-link.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-multiselect.cjs.entry.js +58 -15
- 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 +42 -7
- package/dist/collection/components/pds-button/pds-button.js.map +1 -1
- package/dist/collection/components/pds-chip/pds-chip.css +25 -4
- package/dist/collection/components/pds-chip/pds-chip.js +50 -7
- package/dist/collection/components/pds-chip/pds-chip.js.map +1 -1
- package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +36 -13
- package/dist/collection/components/pds-combobox/pds-combobox.js +2 -2
- package/dist/collection/components/pds-combobox/pds-combobox.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-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +21 -2
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js.map +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +1 -1
- package/dist/collection/components/pds-link/pds-link.js +21 -2
- package/dist/collection/components/pds-link/pds-link.js.map +1 -1
- package/dist/collection/components/pds-multiselect/pds-multiselect.css +2 -2
- 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/collection/utils/types.js.map +1 -1
- package/dist/docs.json +255 -20
- 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 +17 -7
- 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 +20 -8
- package/dist/esm/pds-chip.entry.js.map +1 -1
- package/dist/esm/pds-combobox.entry.js +2 -2
- package/dist/esm/pds-combobox.entry.js.map +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-dropdown-menu-item.entry.js +2 -2
- package/dist/esm/pds-dropdown-menu-item.entry.js.map +1 -1
- package/dist/esm/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm/pds-dropdown-menu.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 +3 -3
- package/dist/esm/pds-link.entry.js.map +1 -1
- package/dist/esm/pds-multiselect.entry.js +58 -15
- 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-chip.entry.js.map +1 -1
- package/dist/esm-es5/pds-combobox.entry.js +1 -1
- package/dist/esm-es5/pds-combobox.entry.js.map +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-dropdown-menu-item.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js.map +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu.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-link.entry.js.map +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-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-01aec1ad.system.entry.js → p-2f64a2fe.system.entry.js} +2 -2
- package/dist/pine-core/p-2f64a2fe.system.entry.js.map +1 -0
- package/dist/pine-core/p-3239c67a.entry.js +2 -0
- package/dist/pine-core/{p-f5fb71f6.entry.js.map → p-3239c67a.entry.js.map} +1 -1
- package/dist/pine-core/{p-ce069162.entry.js → p-32f65e48.entry.js} +2 -2
- 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-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-0b52923b.system.entry.js → p-52c5ced3.system.entry.js} +2 -2
- package/dist/pine-core/{p-b46f66e8.system.entry.js → p-5757d038.system.entry.js} +2 -2
- package/dist/pine-core/p-5757d038.system.entry.js.map +1 -0
- package/dist/pine-core/{p-36e5e9f4.system.entry.js → p-57aa762e.system.entry.js} +2 -2
- package/dist/pine-core/p-57aa762e.system.entry.js.map +1 -0
- package/dist/pine-core/p-57d2c33a.entry.js +2 -0
- package/dist/pine-core/p-57d2c33a.entry.js.map +1 -0
- 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-06046885.entry.js → p-5dbbb2be.entry.js} +3 -3
- package/dist/pine-core/{p-06046885.entry.js.map → p-5dbbb2be.entry.js.map} +1 -1
- package/dist/pine-core/p-5hPM5knE.js +2 -0
- package/dist/pine-core/p-5hPM5knE.js.map +1 -0
- 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-425144ae.entry.js → p-9a9c1b17.entry.js} +2 -2
- package/dist/pine-core/p-9a9c1b17.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-h_fnwqV_.system.js.map → p-B3xx1u93.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-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-BGVC08sX.system.js.map +1 -0
- package/dist/pine-core/p-BMx906Ad.system.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-C9OQdhX3.system.js.map +1 -0
- 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-D3Ug1A-l.system.js.map → p-CbRBe3Eq.system.js.map} +1 -1
- package/dist/pine-core/p-CsWO_n3t.system.js.map +1 -0
- 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-DYm9--lc.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-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-b232004f.system.entry.js +2 -0
- package/dist/pine-core/p-b232004f.system.entry.js.map +1 -0
- 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-94c73d98.entry.js → p-b5316979.entry.js} +2 -2
- package/dist/pine-core/p-b5316979.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-19fef546.system.entry.js → p-c301925f.system.entry.js} +2 -2
- package/dist/pine-core/{p-19fef546.system.entry.js.map → p-c301925f.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-f0df10c7.system.entry.js → p-ca20b134.system.entry.js} +2 -2
- package/dist/pine-core/p-ca20b134.system.entry.js.map +1 -0
- package/dist/pine-core/{p-6748d7b4.entry.js → p-d38da7a6.entry.js} +2 -2
- package/dist/pine-core/p-d38da7a6.entry.js.map +1 -0
- package/dist/pine-core/p-eac7cc81.entry.js +2 -0
- package/dist/pine-core/p-eac7cc81.entry.js.map +1 -0
- package/dist/pine-core/p-ed5ca877.system.entry.js +2 -0
- package/dist/pine-core/{p-29266dcd.system.entry.js.map → p-ed5ca877.system.entry.js.map} +1 -1
- 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-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/p-n9xvc2MF.system.js.map +1 -0
- package/dist/pine-core/pds-button.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-chip.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-combobox.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-copytext.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-dropdown-menu-item.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-dropdown-menu.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-link.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 +12 -1
- package/dist/types/components/pds-chip/pds-chip.d.ts +9 -2
- package/dist/types/components/pds-copytext/pds-copytext.d.ts +10 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +7 -0
- package/dist/types/components/pds-link/pds-link.d.ts +6 -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 +86 -16
- package/dist/types/utils/truncation-tooltip.d.ts +21 -0
- package/dist/types/utils/types.d.ts +1 -0
- package/dist/vscode.html-data.json +68 -8
- package/hydrate/index.js +486 -52
- package/hydrate/index.mjs +486 -52
- 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-01aec1ad.system.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-29266dcd.system.entry.js +0 -2
- 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-425144ae.entry.js.map +0 -1
- package/dist/pine-core/p-48ed8147.entry.js +0 -2
- package/dist/pine-core/p-48ed8147.entry.js.map +0 -1
- package/dist/pine-core/p-6748d7b4.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-8KFA3I5T.system.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-DR2CskUb.system.js.map +0 -1
- package/dist/pine-core/p-DZEhYV6y.system.js.map +0 -1
- package/dist/pine-core/p-DdTbt4lH.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-b46f66e8.system.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-eT6pKhWF.system.js.map +0 -1
- package/dist/pine-core/p-f0df10c7.system.entry.js.map +0 -1
- package/dist/pine-core/p-f5fb71f6.entry.js +0 -2
- 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-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-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-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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-copytext.js","sourceRoot":"","sources":["../../../../src/components/pds-copytext/pds-copytext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAA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AAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;QAED,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW;YAClD,mEAAY,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,UAAU,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW;gBACpE,6DAAM,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,EAAE,IAAG,IAAI,CAAC,KAAK,CAAQ;gBAC7D,iEAAU,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,GAAY,CACtC,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","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"]}
|
|
@@ -58,7 +58,7 @@ export class PdsDropdownMenuItem {
|
|
|
58
58
|
}
|
|
59
59
|
renderElement() {
|
|
60
60
|
if (this.href !== undefined) {
|
|
61
|
-
return (h("pds-link", { href: this.disabled ? null : this.href, external: this.external, target: this.target, class: {
|
|
61
|
+
return (h("pds-link", { download: this.download, href: this.disabled ? null : this.href, external: this.external, target: this.target, class: {
|
|
62
62
|
'pds-dropdown-menu-item__content': true,
|
|
63
63
|
'has-focus': this.hasFocus
|
|
64
64
|
}, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, "aria-disabled": this.disabled ? 'true' : null }, h("slot", null)));
|
|
@@ -69,7 +69,7 @@ export class PdsDropdownMenuItem {
|
|
|
69
69
|
}, tabIndex: this.disabled ? -1 : 0, type: "button", onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null }, h("slot", null)));
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
return (h(Host, { key: '
|
|
72
|
+
return (h(Host, { key: 'cfe752ae18b068c88a0f4eee3293c3b0128e0ab1', id: this.componentId, class: { 'is-disabled': this.disabled, 'destructive': !this.disabled && this.destructive }, onClick: () => !this.disabled && this.handleClick(), role: "none", tabIndex: -1, "aria-disabled": this.disabled ? 'true' : null }, this.renderElement()));
|
|
73
73
|
}
|
|
74
74
|
static get is() { return "pds-dropdown-menu-item"; }
|
|
75
75
|
static get encapsulation() { return "shadow"; }
|
|
@@ -150,6 +150,25 @@ export class PdsDropdownMenuItem {
|
|
|
150
150
|
"attribute": "disabled",
|
|
151
151
|
"defaultValue": "false"
|
|
152
152
|
},
|
|
153
|
+
"download": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"mutable": false,
|
|
156
|
+
"complexType": {
|
|
157
|
+
"original": "string",
|
|
158
|
+
"resolved": "string",
|
|
159
|
+
"references": {}
|
|
160
|
+
},
|
|
161
|
+
"required": false,
|
|
162
|
+
"optional": true,
|
|
163
|
+
"docs": {
|
|
164
|
+
"tags": [],
|
|
165
|
+
"text": "Prompts the user to save the linked URL instead of navigating to it.\nIt can be used without a value to download with the default filename,\nor with a string value to suggest a specific filename for the download.\nOnly applies when href is set."
|
|
166
|
+
},
|
|
167
|
+
"getter": false,
|
|
168
|
+
"setter": false,
|
|
169
|
+
"reflect": false,
|
|
170
|
+
"attribute": "download"
|
|
171
|
+
},
|
|
153
172
|
"href": {
|
|
154
173
|
"type": "string",
|
|
155
174
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-dropdown-menu-item.js","sourceRoot":"","sources":["../../../../../src/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQtG,MAAM,OAAO,mBAAmB;IALhC;QAaE;;;WAGG;QACK,gBAAW,GAAY,KAAK,CAAC;QAErC;;;WAGG;QACsB,aAAQ,GAAY,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"pds-dropdown-menu-item.js","sourceRoot":"","sources":["../../../../../src/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQtG,MAAM,OAAO,mBAAmB;IALhC;QAaE;;;WAGG;QACK,gBAAW,GAAY,KAAK,CAAC;QAErC;;;WAGG;QACsB,aAAQ,GAAY,KAAK,CAAC;QAgBnD;;;;WAIG;QACsB,aA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J,OAAO,CACL,EAAC,IAAI,qDAAC,EAAE,EAAE,IAAI,CAAC,WAAW,EACxB,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,EAC1F,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,EACnD,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,CAAC,CAAC,mBACG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,IAEzC,IAAI,CAAC,aAAa,EAAE,CAClB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State } from '@stencil/core';\nimport type { BasePdsProps } from '@utils/interfaces';\n\n@Component({\n tag: 'pds-dropdown-menu-item',\n styleUrl: 'pds-dropdown-menu-item.scss',\n shadow: true,\n})\nexport class PdsDropdownMenuItem implements BasePdsProps {\n @Element() host: HTMLPdsDropdownMenuItemElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * It determines whether or not the dropdown-item is destructive.\n * @defaultValue false\n */\n @Prop() destructive: boolean = false;\n\n /**\n * It determines whether or not the dropdown-item is disabled.\n * @defaultValue false\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n\n /**\n * Prompts the user to save the linked URL instead of navigating to it.\n * It can be used without a value to download with the default filename,\n * or with a string value to suggest a specific filename for the download.\n * Only applies when href is set.\n */\n @Prop() download?: string;\n\n /**\n * If provided, renders the dropdown-item as an anchor (`<a>`) element instead of a button.\n */\n @Prop() href: string | undefined;\n\n /**\n * Determines whether the link should open in a new tab and display an external icon.\n * This is a simpler alternative to using `target=\"_blank\"` for the common case.\n * @defaultValue false\n */\n @Prop({ reflect: true }) external: boolean = false;\n\n /**\n * Specifies where to open the linked document when href is provided.\n * Takes precedence over the `external` prop if both are set.\n * Only applies when href is set.\n * @defaultValue undefined\n */\n @Prop({ reflect: true }) target?: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * Emitted when the dropdown-item is clicked.\n *\n */\n @Event() pdsClick: EventEmitter<{itemIndex: number, item: HTMLPdsDropdownMenuItemElement, content: string}>;\n\n /**\n * Trigger the click event\n */\n @Method()\n async clickItem() {\n this.handleClick();\n };\n\n\n private handleClick() {\n // Filter only pds-dropdown-menu-item elements and find the index of the current item\n const menuItems = Array.from(this.host.parentNode.children).filter(\n (child) => child.tagName.toLowerCase() === 'pds-dropdown-menu-item'\n );\n const itemIndex = menuItems.indexOf(this.host);\n\n // Get the text content from the slotted content\n const content = this.host.textContent?.trim() || '';\n\n this.pdsClick.emit({\n itemIndex,\n item: this.host,\n content\n });\n }\n\n @State() hasFocus: boolean = false;\n\n private handleFocus = () => {\n this.hasFocus = true;\n }\n\n private handleBlur = () => {\n this.hasFocus = false;\n }\n\n private renderElement() {\n if (this.href !== undefined) {\n return (\n <pds-link\n download={this.download}\n href={this.disabled ? null : this.href}\n external={this.external}\n target={this.target}\n class={{\n 'pds-dropdown-menu-item__content': true,\n 'has-focus': this.hasFocus\n }}\n tabIndex={this.disabled ? -1 : 0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n aria-disabled={this.disabled ? 'true' : null}\n >\n <slot></slot>\n </pds-link>\n );\n }\n\n return (\n <button\n class={{\n 'pds-dropdown-menu-item__content': true,\n 'has-focus': this.hasFocus\n }}\n tabIndex={this.disabled ? -1 : 0}\n type=\"button\"\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n disabled={this.disabled}\n aria-disabled={this.disabled ? 'true' : null}\n >\n <slot></slot>\n </button>\n );\n }\n\n private handleKeyDown = (event: KeyboardEvent) => {\n // Handle keyboard events\n if (!this.disabled && (event.key === 'Enter')) {\n // Only prevent default for button elements or Space key\n // For links with Enter key, we want the default navigation behavior\n if (!this.href) {\n event.preventDefault();\n }\n this.handleClick();\n }\n }\n\n render() {\n return (\n <Host id={this.componentId}\n class={{ 'is-disabled': this.disabled, 'destructive': !this.disabled && this.destructive }}\n onClick={() => !this.disabled && this.handleClick()}\n role=\"none\"\n tabIndex={-1}\n aria-disabled={this.disabled ? 'true' : null}\n >\n {this.renderElement()}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -49,8 +49,8 @@ export class PdsLink {
|
|
|
49
49
|
const targetValue = this.target || (this.external ? '_blank' : undefined);
|
|
50
50
|
const showExternalIcon = this.external;
|
|
51
51
|
const relValue = targetValue === '_blank' ? 'noopener noreferrer' : undefined;
|
|
52
|
-
return (h("a", { key: '
|
|
53
|
-
h("pds-icon", { key: '
|
|
52
|
+
return (h("a", { key: '7d42e0a140af1093ea3019556e607036be5b274b', class: this.classNames(), download: this.download, href: this.href, id: this.componentId, part: "link", target: targetValue, rel: relValue, style: this.setLinkStyles() }, h("slot", { key: '7a8e0c7393c87817350fc380fac2aed3ee7c338c' }, this.href), showExternalIcon &&
|
|
53
|
+
h("pds-icon", { key: 'f2486339296564d5d07e0c6c4cf83cb2566b8f24', icon: launch, size: this.fontSize })));
|
|
54
54
|
}
|
|
55
55
|
static get is() { return "pds-link"; }
|
|
56
56
|
static get encapsulation() { return "shadow"; }
|
|
@@ -85,6 +85,25 @@ export class PdsLink {
|
|
|
85
85
|
"reflect": false,
|
|
86
86
|
"attribute": "color"
|
|
87
87
|
},
|
|
88
|
+
"download": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"mutable": false,
|
|
91
|
+
"complexType": {
|
|
92
|
+
"original": "string",
|
|
93
|
+
"resolved": "string",
|
|
94
|
+
"references": {}
|
|
95
|
+
},
|
|
96
|
+
"required": false,
|
|
97
|
+
"optional": true,
|
|
98
|
+
"docs": {
|
|
99
|
+
"tags": [],
|
|
100
|
+
"text": "Prompts the user to save the linked URL instead of navigating to it.\nIt can be used without a value to download with the default filename,\nor with a string value to suggest a specific filename for the download."
|
|
101
|
+
},
|
|
102
|
+
"getter": false,
|
|
103
|
+
"setter": false,
|
|
104
|
+
"reflect": false,
|
|
105
|
+
"attribute": "download"
|
|
106
|
+
},
|
|
88
107
|
"componentId": {
|
|
89
108
|
"type": "string",
|
|
90
109
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-link.js","sourceRoot":"","sources":["../../../../src/components/pds-link/pds-link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C;;;GAGG;AAMH,MAAM,OAAO,OAAO;IALpB;
|
|
1
|
+
{"version":3,"file":"pds-link.js","sourceRoot":"","sources":["../../../../src/components/pds-link/pds-link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C;;;GAGG;AAMH,MAAM,OAAO,OAAO;IALpB;QAuBE;;;;WAIG;QACK,aAAQ,GAAG,KAAK,CAAC;QAUzB;;;WAGG;QACK,YAAO,GAAuB,QAAQ,CAAC;QAE/C;;;WAGG;QACK,aAAQ,GAAuB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QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE;YAE3B,+DAAO,IAAI,CAAC,IAAI,CAAQ;YACvB,gBAAgB;gBACf,iEAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,GAAa,CAExD,CACL,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\nimport { setColor } from '../../utils/utils';\n\nimport { launch } from '@pine-ds/icons/icons';\n\n/**\n * @part link - Link element styles.\n * @slot (default) - Text content placed between the opening and closing tags. If no text is provided, the **href** will be used as a fallback.\n */\n@Component({\n tag: 'pds-link',\n styleUrls: ['pds-link.scss'],\n shadow: true,\n})\nexport class PdsLink {\n /**\n * Sets the link color.\n */\n @Prop() color?: string;\n\n /**\n * Prompts the user to save the linked URL instead of navigating to it.\n * It can be used without a value to download with the default filename,\n * or with a string value to suggest a specific filename for the download.\n */\n @Prop() download?: string;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Determines whether the link should open in a new tab.\n * @defaultValue false\n * @deprecated Consider using the `target` prop for more control. This prop will be maintained for backward compatibility.\n */\n @Prop() external = false;\n\n /**\n * Specifies where to open the linked document.\n * @defaultValue undefined\n * @example\n * <pds-link href=\"https://example.com\" target=\"_blank\">Opens in new tab</pds-link>\n */\n @Prop() target?: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * Sets the link variant styles.\n * @defaultValue inline\n */\n @Prop() variant: 'inline' | 'plain' = 'inline';\n\n /**\n * The font size of the link's text.\n * @defaultValue lg\n */\n @Prop() fontSize: 'sm' | 'md' | 'lg' = 'lg';\n\n /**\n * The hyperlink's destination URL. If no text is provided in the custom slot, the href will be used.\n */\n @Prop() href!: string;\n\n private classNames() {\n const classNames = ['pds-link'];\n\n if (this.fontSize) {\n classNames.push('pds-link--' + this.fontSize);\n }\n\n if (this.variant) {\n classNames.push('pds-link--' + this.variant);\n }\n\n return classNames.join(' ');\n }\n\n private setLinkStyles() {\n if (!this.color) return;\n\n const linkColors = {\n secondary: 'var(--pine-color-text-primary)',\n accent: 'var(--pine-color-accent)',\n danger: 'var(--pine-color-danger)',\n }\n\n const linkStyles = setColor(this.color, linkColors);\n\n return linkStyles;\n }\n\n render() {\n const targetValue = this.target || (this.external ? '_blank' : undefined);\n const showExternalIcon = this.external;\n const relValue = targetValue === '_blank' ? 'noopener noreferrer' : undefined;\n\n return (\n <a\n class={this.classNames()}\n download={this.download}\n href={this.href}\n id={this.componentId}\n part=\"link\"\n target={targetValue}\n rel={relValue}\n style={this.setLinkStyles()}\n >\n <slot>{this.href}</slot>\n {showExternalIcon &&\n <pds-icon icon={launch} size={this.fontSize}></pds-icon>\n }\n </a>\n );\n }\n}\n"]}
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
border-radius: var(--pine-dimension-125);
|
|
36
36
|
cursor: pointer;
|
|
37
37
|
display: flex;
|
|
38
|
-
font: var(--pine-typography-body);
|
|
38
|
+
font: var(--pine-typography-body-medium);
|
|
39
39
|
gap: var(--pine-dimension-xs);
|
|
40
40
|
justify-content: space-between;
|
|
41
41
|
letter-spacing: var(--pine-letter-spacing);
|
|
42
|
-
min-height: var(--pine-dimension-
|
|
42
|
+
min-height: var(--pine-dimension-450);
|
|
43
43
|
padding: var(--pine-dimension-xs) var(--pine-dimension-sm);
|
|
44
44
|
position: relative;
|
|
45
45
|
text-align: start;
|
|
@@ -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
|
}
|