@pine-ds/core 4.4.2 → 4.4.4
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/attributes.js +1 -1
- package/components/closest.js +1 -1
- package/components/pds-avatar.js +1 -1
- package/components/pds-box2.js +1 -1
- package/components/pds-checkbox2.js +1 -1
- package/components/pds-chip2.js +1 -1
- package/components/pds-combobox.js +2 -2
- package/components/pds-copytext.js +1 -1
- package/components/pds-datepicker.js +1 -1
- package/components/pds-drawer-content.js +1 -1
- package/components/pds-drawer-footer.js +1 -1
- package/components/pds-drawer-header.js +1 -1
- package/components/pds-drawer.js +1 -1
- package/components/pds-dropdown-menu.js +1 -1
- package/components/pds-loader2.js +1 -1
- package/components/pds-modal-content.js +1 -1
- package/components/pds-modal-footer.js +1 -1
- package/components/pds-modal-header.js +1 -1
- package/components/pds-modal2.js +1 -1
- package/components/pds-popover.js +1 -1
- package/components/pds-progress.js +1 -1
- package/components/pds-radio-group.js +1 -1
- package/components/pds-radio.js +1 -1
- package/components/pds-row.js +1 -1
- package/components/pds-select.js +1 -1
- package/components/pds-sortable-item.js +1 -1
- package/components/pds-sortable.js +2 -2
- package/components/pds-switch.js +1 -1
- package/components/pds-table-head.js +1 -1
- package/components/pds-table-row.js +1 -1
- package/components/pds-tabpanel.js +1 -1
- package/components/pds-tabs.js +1 -1
- package/components/pds-tooltip.js +1 -1
- package/components/reflected-attribute-default.js +1 -0
- package/dist/cjs/attributes-DrQqSEv4.js +188 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pds-avatar.cjs.entry.js +17 -1
- package/dist/cjs/pds-box.cjs.entry.js +11 -1
- package/dist/cjs/pds-checkbox.cjs.entry.js +11 -4
- package/dist/cjs/pds-chip.cjs.entry.js +10 -1
- package/dist/cjs/pds-combobox.cjs.entry.js +11 -6
- package/dist/cjs/pds-copytext.cjs.entry.js +16 -1
- package/dist/cjs/pds-drawer-content.cjs.entry.js +1 -1
- package/dist/cjs/pds-drawer-footer.cjs.entry.js +1 -1
- package/dist/cjs/pds-drawer-header.cjs.entry.js +1 -1
- package/dist/cjs/pds-drawer.cjs.entry.js +2 -2
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +39 -9
- package/dist/cjs/pds-input.cjs.entry.js +1 -1
- package/dist/cjs/pds-loader.cjs.entry.js +27 -1
- package/dist/cjs/pds-modal-content.cjs.entry.js +2 -2
- package/dist/cjs/pds-modal-footer.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal-header.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal.cjs.entry.js +135 -49
- package/dist/cjs/pds-popover.cjs.entry.js +81 -13
- package/dist/cjs/pds-progress.cjs.entry.js +12 -1
- package/dist/cjs/pds-radio-group.cjs.entry.js +3 -3
- package/dist/cjs/pds-radio.cjs.entry.js +11 -3
- package/dist/cjs/pds-row.cjs.entry.js +11 -1
- package/dist/cjs/pds-select.cjs.entry.js +13 -1
- package/dist/cjs/pds-sortable-item.cjs.entry.js +10 -1
- package/dist/cjs/pds-sortable.cjs.entry.js +11 -1
- package/dist/cjs/pds-switch.cjs.entry.js +12 -4
- package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
- package/dist/cjs/pds-tabs.cjs.entry.js +13 -1
- package/dist/cjs/pds-textarea.cjs.entry.js +1 -1
- package/dist/cjs/pds-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/pine-core.cjs.js +1 -1
- package/dist/cjs/reflected-attribute-default-DVYHG6O1.js +44 -0
- package/dist/collection/components/pds-avatar/pds-avatar.js +20 -3
- package/dist/collection/components/pds-box/pds-box.js +14 -1
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +11 -4
- package/dist/collection/components/pds-chip/pds-chip.js +10 -1
- package/dist/collection/components/pds-combobox/pds-combobox.css +16 -2
- package/dist/collection/components/pds-combobox/pds-combobox.js +33 -5
- package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +41 -0
- package/dist/collection/components/pds-copytext/pds-copytext.js +17 -2
- package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +2 -1
- package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +4 -1
- package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +4 -1
- package/dist/collection/components/pds-drawer/pds-drawer.js +3 -2
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +39 -9
- package/dist/collection/components/pds-loader/pds-loader.js +29 -2
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +5 -2
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +4 -1
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +4 -1
- package/dist/collection/components/pds-modal/pds-modal.js +138 -49
- package/dist/collection/components/pds-popover/pds-popover.js +83 -14
- package/dist/collection/components/pds-progress/pds-progress.js +12 -1
- package/dist/collection/components/pds-radio/pds-radio.js +12 -3
- package/dist/collection/components/pds-radio-group/pds-radio-group.js +4 -3
- package/dist/collection/components/pds-row/pds-row.js +14 -1
- package/dist/collection/components/pds-select/pds-select.js +13 -1
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +11 -1
- package/dist/collection/components/pds-sortable/pds-sortable.js +14 -1
- package/dist/collection/components/pds-switch/pds-switch.js +12 -4
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +3 -0
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +4 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js +13 -1
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +3 -2
- package/dist/collection/utils/attributes.js +101 -0
- package/dist/collection/utils/reflected-attribute-default.js +40 -0
- package/dist/collection/utils/test/host-strip.js +50 -0
- package/dist/docs.json +129 -19
- package/dist/esm/attributes-myrJDwbR.js +183 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pds-avatar.entry.js +18 -2
- package/dist/esm/pds-box.entry.js +12 -2
- package/dist/esm/pds-checkbox.entry.js +11 -4
- package/dist/esm/pds-chip.entry.js +10 -1
- package/dist/esm/pds-combobox.entry.js +11 -6
- package/dist/esm/pds-copytext.entry.js +16 -1
- package/dist/esm/pds-drawer-content.entry.js +1 -1
- package/dist/esm/pds-drawer-footer.entry.js +1 -1
- package/dist/esm/pds-drawer-header.entry.js +1 -1
- package/dist/esm/pds-drawer.entry.js +2 -2
- package/dist/esm/pds-dropdown-menu.entry.js +39 -9
- package/dist/esm/pds-input.entry.js +1 -1
- package/dist/esm/pds-loader.entry.js +28 -2
- package/dist/esm/pds-modal-content.entry.js +2 -2
- package/dist/esm/pds-modal-footer.entry.js +1 -1
- package/dist/esm/pds-modal-header.entry.js +1 -1
- package/dist/esm/pds-modal.entry.js +135 -49
- package/dist/esm/pds-popover.entry.js +81 -13
- package/dist/esm/pds-progress.entry.js +13 -2
- package/dist/esm/pds-radio-group.entry.js +3 -3
- package/dist/esm/pds-radio.entry.js +11 -3
- package/dist/esm/pds-row.entry.js +12 -2
- package/dist/esm/pds-select.entry.js +13 -1
- package/dist/esm/pds-sortable-item.entry.js +10 -1
- package/dist/esm/pds-sortable.entry.js +11 -1
- package/dist/esm/pds-switch.entry.js +12 -4
- package/dist/esm/pds-tabpanel.entry.js +1 -1
- package/dist/esm/pds-tabs.entry.js +13 -1
- package/dist/esm/pds-textarea.entry.js +1 -1
- package/dist/esm/pds-tooltip.entry.js +2 -2
- package/dist/esm/pine-core.js +1 -1
- package/dist/esm/reflected-attribute-default-t3idJwV0.js +42 -0
- package/dist/esm-es5/attributes-myrJDwbR.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/pds-avatar.entry.js +1 -1
- package/dist/esm-es5/pds-box.entry.js +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-combobox.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-content.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-footer.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-header.entry.js +1 -1
- package/dist/esm-es5/pds-drawer.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-loader.entry.js +1 -1
- package/dist/esm-es5/pds-modal-content.entry.js +1 -1
- package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
- package/dist/esm-es5/pds-modal-header.entry.js +1 -1
- package/dist/esm-es5/pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-popover.entry.js +1 -1
- package/dist/esm-es5/pds-progress.entry.js +1 -1
- package/dist/esm-es5/pds-radio-group.entry.js +1 -1
- package/dist/esm-es5/pds-radio.entry.js +1 -1
- package/dist/esm-es5/pds-row.entry.js +1 -1
- package/dist/esm-es5/pds-select.entry.js +1 -1
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
- package/dist/esm-es5/pds-sortable.entry.js +2 -2
- package/dist/esm-es5/pds-switch.entry.js +1 -1
- package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
- package/dist/esm-es5/pds-tabs.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/reflected-attribute-default-t3idJwV0.js +1 -0
- package/dist/pine-core/p-09d10e9e.entry.js +7 -0
- package/dist/pine-core/p-1feace6a.system.entry.js +1 -0
- package/dist/pine-core/p-21abd971.entry.js +1 -0
- package/dist/pine-core/p-2212224a.system.entry.js +1 -0
- package/dist/pine-core/p-2806fa55.system.entry.js +1 -0
- package/dist/pine-core/p-2dd3ab72.entry.js +1 -0
- package/dist/pine-core/p-30784d57.entry.js +1 -0
- package/dist/pine-core/p-3088cd66.entry.js +1 -0
- package/dist/pine-core/p-3e829372.system.entry.js +1 -0
- package/dist/pine-core/{p-67227922.entry.js → p-44cbdf94.system.entry.js} +1 -1
- package/dist/pine-core/p-4765f7f0.entry.js +1 -0
- package/dist/pine-core/{p-d00c5b9c.system.entry.js → p-48ab7da8.system.entry.js} +1 -1
- package/dist/pine-core/{p-c5c46b65.entry.js → p-4af5f936.entry.js} +1 -1
- package/dist/pine-core/{p-b823bde2.system.entry.js → p-5064f007.system.entry.js} +1 -1
- package/dist/pine-core/p-5081a96f.entry.js +1 -0
- package/dist/pine-core/p-51eb36f4.system.entry.js +3 -0
- package/dist/pine-core/p-5527e825.system.entry.js +1 -0
- package/dist/pine-core/{p-8d42f505.entry.js → p-5db91557.entry.js} +1 -1
- package/dist/pine-core/p-62377463.system.entry.js +1 -0
- package/dist/pine-core/{p-d11e4956.entry.js → p-63644dbd.entry.js} +1 -1
- package/dist/pine-core/p-6d6079f5.entry.js +1 -0
- package/dist/pine-core/p-7386bbdf.system.entry.js +1 -0
- package/dist/pine-core/p-74d93179.system.entry.js +1 -0
- package/dist/pine-core/p-7647b568.system.entry.js +1 -0
- package/dist/pine-core/{p-5e9396e2.system.entry.js → p-7698fcfa.system.entry.js} +1 -1
- package/dist/pine-core/{p-b802776b.system.entry.js → p-778a0228.system.entry.js} +1 -1
- package/dist/pine-core/{p-f5677949.system.entry.js → p-7a9c687d.system.entry.js} +1 -1
- package/dist/pine-core/{p-9b262a9d.entry.js → p-85d77b55.entry.js} +1 -1
- package/dist/pine-core/p-88728d46.system.entry.js +1 -0
- package/dist/pine-core/{p-6b25f349.system.entry.js → p-8d8512ae.system.entry.js} +1 -1
- package/dist/pine-core/p-93341083.system.entry.js +1 -0
- package/dist/pine-core/{p-871894e1.entry.js → p-95649e1c.entry.js} +1 -1
- package/dist/pine-core/p-97c04215.system.entry.js +1 -0
- package/dist/pine-core/p-9ca1b473.system.entry.js +1 -0
- package/dist/pine-core/p-Bkho_oFB.system.js +1 -0
- package/dist/pine-core/p-BwmzR47K.system.js +1 -0
- package/dist/pine-core/p-DO9XKAkv.system.js +1 -1
- package/dist/pine-core/p-a0f8a61a.entry.js +1 -0
- package/dist/pine-core/p-a232dc19.entry.js +1 -0
- package/dist/pine-core/p-a8884f2d.system.entry.js +1 -0
- package/dist/pine-core/{p-601b646c.system.entry.js → p-a8f23db0.system.entry.js} +1 -1
- package/dist/pine-core/p-a9ea3c9d.entry.js +1 -0
- package/dist/pine-core/{p-495f791c.entry.js → p-b15777a2.entry.js} +1 -1
- package/dist/pine-core/p-bc7ba7d3.system.entry.js +1 -0
- package/dist/pine-core/{p-7608e9b2.entry.js → p-c497d6c6.entry.js} +1 -1
- package/dist/pine-core/p-c971cdb3.entry.js +1 -0
- package/dist/pine-core/p-cdd21cbe.entry.js +1 -0
- package/dist/pine-core/p-ce74a47e.entry.js +2 -0
- package/dist/pine-core/p-cf4758a7.entry.js +1 -0
- package/dist/pine-core/{p-f2560935.entry.js → p-cfc9d4a8.entry.js} +1 -1
- package/dist/pine-core/p-d1b0b372.entry.js +1 -0
- package/dist/pine-core/p-d6002d5b.entry.js +1 -0
- package/dist/pine-core/{p-773f5771.system.entry.js → p-d8a6298c.system.entry.js} +1 -1
- package/dist/pine-core/p-d933227e.system.entry.js +1 -0
- package/dist/pine-core/p-d962fc84.entry.js +1 -0
- package/dist/pine-core/p-dafff7dd.system.entry.js +1 -0
- package/dist/pine-core/p-ed22da0c.system.entry.js +1 -0
- package/dist/pine-core/{p-de740b3e.system.entry.js → p-f0632690.system.entry.js} +1 -1
- package/dist/pine-core/p-f1c6b23a.entry.js +1 -0
- package/dist/pine-core/p-f3188c57.system.entry.js +8 -0
- package/dist/pine-core/p-f33d6417.entry.js +1 -0
- package/dist/pine-core/p-f832dcd9.entry.js +1 -0
- package/dist/pine-core/p-f83fe305.entry.js +1 -0
- package/dist/pine-core/p-myrJDwbR.js +1 -0
- package/dist/pine-core/p-t3idJwV0.js +1 -0
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/types/components/pds-avatar/pds-avatar.d.ts +3 -0
- package/dist/types/components/pds-box/pds-box.d.ts +7 -0
- package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +2 -0
- package/dist/types/components/pds-chip/pds-chip.d.ts +2 -0
- package/dist/types/components/pds-combobox/pds-combobox.d.ts +5 -0
- package/dist/types/components/pds-copytext/pds-copytext.d.ts +3 -0
- package/dist/types/components/pds-drawer/pds-drawer-content/pds-drawer-content.d.ts +1 -0
- package/dist/types/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.d.ts +3 -0
- package/dist/types/components/pds-drawer/pds-drawer-header/pds-drawer-header.d.ts +3 -0
- package/dist/types/components/pds-drawer/pds-drawer.d.ts +1 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +4 -0
- package/dist/types/components/pds-loader/pds-loader.d.ts +5 -0
- package/dist/types/components/pds-modal/pds-modal-content/pds-modal-content.d.ts +3 -0
- package/dist/types/components/pds-modal/pds-modal-footer/pds-modal-footer.d.ts +3 -0
- package/dist/types/components/pds-modal/pds-modal-header/pds-modal-header.d.ts +3 -0
- package/dist/types/components/pds-modal/pds-modal.d.ts +9 -1
- package/dist/types/components/pds-popover/pds-popover.d.ts +15 -0
- package/dist/types/components/pds-progress/pds-progress.d.ts +4 -0
- package/dist/types/components/pds-radio/pds-radio.d.ts +3 -0
- package/dist/types/components/pds-radio-group/pds-radio-group.d.ts +1 -0
- package/dist/types/components/pds-row/pds-row.d.ts +7 -0
- package/dist/types/components/pds-select/pds-select.d.ts +2 -0
- package/dist/types/components/pds-sortable/pds-sortable-item/pds-sortable-item.d.ts +4 -0
- package/dist/types/components/pds-sortable/pds-sortable.d.ts +6 -0
- package/dist/types/components/pds-switch/pds-switch.d.ts +2 -0
- package/dist/types/components/pds-tabs/pds-tab/pds-tab.d.ts +3 -0
- package/dist/types/components/pds-tabs/pds-tabpanel/pds-tabpanel.d.ts +3 -0
- package/dist/types/components/pds-tabs/pds-tabs.d.ts +3 -0
- package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +1 -0
- package/dist/types/components.d.ts +199 -0
- package/dist/types/utils/attributes.d.ts +38 -0
- package/dist/types/utils/reflected-attribute-default.d.ts +31 -0
- package/dist/types/utils/test/host-strip.d.ts +10 -0
- package/dist/vscode.html-data.json +7 -0
- package/hydrate/index.js +717 -201
- package/hydrate/index.mjs +717 -201
- package/package.json +2 -2
- package/dist/cjs/attributes-oNMnBEnP.js +0 -85
- package/dist/esm/attributes-C0M1gTKv.js +0 -82
- package/dist/esm-es5/attributes-C0M1gTKv.js +0 -1
- package/dist/pine-core/p-015d2ceb.entry.js +0 -1
- package/dist/pine-core/p-02a428af.system.entry.js +0 -1
- package/dist/pine-core/p-06534502.entry.js +0 -1
- package/dist/pine-core/p-0827c6a6.entry.js +0 -1
- package/dist/pine-core/p-0af4685d.entry.js +0 -1
- package/dist/pine-core/p-1747c005.system.entry.js +0 -1
- package/dist/pine-core/p-1ae0b503.entry.js +0 -2
- package/dist/pine-core/p-2a00844f.entry.js +0 -1
- package/dist/pine-core/p-3653fd52.system.entry.js +0 -1
- package/dist/pine-core/p-4a43fbd9.entry.js +0 -1
- package/dist/pine-core/p-517f9962.entry.js +0 -1
- package/dist/pine-core/p-569b07ed.system.entry.js +0 -1
- package/dist/pine-core/p-5986f3c9.entry.js +0 -1
- package/dist/pine-core/p-600be0e1.entry.js +0 -1
- package/dist/pine-core/p-62045f88.system.entry.js +0 -1
- package/dist/pine-core/p-62241978.entry.js +0 -1
- package/dist/pine-core/p-63930a06.system.entry.js +0 -1
- package/dist/pine-core/p-6516adf7.system.entry.js +0 -1
- package/dist/pine-core/p-6aaf945c.entry.js +0 -1
- package/dist/pine-core/p-715b8e6b.entry.js +0 -1
- package/dist/pine-core/p-77961987.system.entry.js +0 -1
- package/dist/pine-core/p-7a177548.system.entry.js +0 -1
- package/dist/pine-core/p-806f17de.system.entry.js +0 -1
- package/dist/pine-core/p-832cedb7.entry.js +0 -1
- package/dist/pine-core/p-847e5f00.system.entry.js +0 -1
- package/dist/pine-core/p-85981c5d.system.entry.js +0 -1
- package/dist/pine-core/p-9dbb8fe9.entry.js +0 -1
- package/dist/pine-core/p-BhQhw0S3.system.js +0 -1
- package/dist/pine-core/p-C0M1gTKv.js +0 -1
- package/dist/pine-core/p-b412473d.system.entry.js +0 -8
- package/dist/pine-core/p-b51cfa3b.entry.js +0 -1
- package/dist/pine-core/p-b62e08c2.system.entry.js +0 -1
- package/dist/pine-core/p-c53e560a.system.entry.js +0 -1
- package/dist/pine-core/p-cd7deae5.entry.js +0 -1
- package/dist/pine-core/p-cd86ee3e.system.entry.js +0 -1
- package/dist/pine-core/p-cf5a484e.system.entry.js +0 -1
- package/dist/pine-core/p-cf99f7d8.system.entry.js +0 -1
- package/dist/pine-core/p-cff7013e.system.entry.js +0 -1
- package/dist/pine-core/p-e1d541f7.entry.js +0 -1
- package/dist/pine-core/p-ea0e5253.entry.js +0 -7
- package/dist/pine-core/p-f22a5f9c.system.entry.js +0 -3
- package/dist/pine-core/p-f22abb4d.system.entry.js +0 -1
- package/dist/pine-core/p-f6943cbf.entry.js +0 -1
- package/dist/pine-core/p-f794f7ad.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { assignDescription, isSpecTest, messageId, exposeTypeProperty } from "../../utils/form";
|
|
3
3
|
import { danger } from "@pine-ds/icons/icons";
|
|
4
|
-
import { inheritAriaAttributes } from "../../utils/attributes";
|
|
4
|
+
import { inheritAriaAttributes, HostStylingKeeper } from "../../utils/attributes";
|
|
5
5
|
/**
|
|
6
6
|
* @slot label - Content displayed as the checkbox label in place of the `label` text. Clicking it toggles the checkbox.
|
|
7
7
|
*/
|
|
@@ -9,6 +9,7 @@ export class PdsCheckbox {
|
|
|
9
9
|
constructor() {
|
|
10
10
|
this.inheritedAttributes = {};
|
|
11
11
|
this._type = 'checkbox';
|
|
12
|
+
this.hostKeeper = new HostStylingKeeper();
|
|
12
13
|
this.hasLabelSlot = false;
|
|
13
14
|
/**
|
|
14
15
|
* It determines whether or not the checkbox is checked.
|
|
@@ -56,6 +57,7 @@ export class PdsCheckbox {
|
|
|
56
57
|
return classNames.join(' ');
|
|
57
58
|
}
|
|
58
59
|
connectedCallback() {
|
|
60
|
+
this.hostKeeper.connect(this.el);
|
|
59
61
|
// Initialize ElementInternals for form association (only once per element instance)
|
|
60
62
|
if (this.el.attachInternals && !this.internals) {
|
|
61
63
|
this.internals = this.el.attachInternals();
|
|
@@ -63,6 +65,9 @@ export class PdsCheckbox {
|
|
|
63
65
|
// Expose type property on the element instance to match native form element behavior
|
|
64
66
|
exposeTypeProperty(this.el, () => this._type);
|
|
65
67
|
}
|
|
68
|
+
disconnectedCallback() {
|
|
69
|
+
this.hostKeeper.disconnect();
|
|
70
|
+
}
|
|
66
71
|
componentDidLoad() {
|
|
67
72
|
this.updateFormValue();
|
|
68
73
|
}
|
|
@@ -97,9 +102,11 @@ export class PdsCheckbox {
|
|
|
97
102
|
this.updateHasLabelSlot();
|
|
98
103
|
}
|
|
99
104
|
render() {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
105
|
+
const hostClass = this.classNames();
|
|
106
|
+
this.hostKeeper.record(hostClass);
|
|
107
|
+
return (h(Host, { key: '2d63feb42a7fa2a0121c1b25625ff7c6b6844fa9', class: hostClass }, h("label", { key: '07158e232a025c978c2725bdd938ce8254a244ac', htmlFor: this.componentId }, h("input", Object.assign({ key: 'c1f47d9de63fef8e373f6b76efb1386cb7ab4921', type: "checkbox", "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, id: this.componentId, indeterminate: this.indeterminate, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleCheckboxChange, onInput: this.handleInput }, this.inheritedAttributes)), h("span", { key: 'e04db0b2a5600e3da74fb9857a276547f602c7eb', class: this.hideLabel ? 'visually-hidden' : '' }, h("slot", { key: '3af6b6bf89e9ab74821f63753843fca575aaea2f', name: "label", onSlotchange: this.updateHasLabelSlot }), !this.hasLabelSlot && this.label)), this.helperMessage &&
|
|
108
|
+
h("div", { key: '78c2f5f6b0cdc93facee367662ba190906a5421c', class: 'pds-checkbox__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
109
|
+
h("div", { key: 'd776e3539d2ff057c5a2471df4069df8fc3af864', class: `pds-checkbox__message pds-checkbox__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: 'f74131e597bc37569062b683b118b676af418a28', icon: danger, size: "small" }), this.errorMessage)));
|
|
103
110
|
}
|
|
104
111
|
static get is() { return "pds-checkbox"; }
|
|
105
112
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { downSmall, remove } from "@pine-ds/icons/icons";
|
|
2
2
|
import { Host, h } from "@stencil/core";
|
|
3
|
+
import { HostStylingKeeper } from "../../utils/attributes";
|
|
3
4
|
import { setupTruncationTooltip } from "../../utils/truncation-tooltip";
|
|
4
5
|
import { normalizeColorValue } from "../../utils/utils";
|
|
5
6
|
const SENTIMENT_DOT_COLORS = {
|
|
@@ -20,6 +21,7 @@ const SENTIMENT_DOT_COLORS = {
|
|
|
20
21
|
*/
|
|
21
22
|
export class PdsChip {
|
|
22
23
|
constructor() {
|
|
24
|
+
this.hostKeeper = new HostStylingKeeper();
|
|
23
25
|
this.truncationCleanup = null;
|
|
24
26
|
/**
|
|
25
27
|
* Determines whether a dot should be displayed on the chip.
|
|
@@ -47,6 +49,9 @@ export class PdsChip {
|
|
|
47
49
|
this.pdsTagCloseClick.emit();
|
|
48
50
|
};
|
|
49
51
|
}
|
|
52
|
+
connectedCallback() {
|
|
53
|
+
this.hostKeeper.connect(this.el);
|
|
54
|
+
}
|
|
50
55
|
// Bind (and re-bind) here, not just on load: changing variant/size remounts
|
|
51
56
|
// the label span, so the tooltip has to re-attach to the current node or it
|
|
52
57
|
// would keep measuring a detached one. Keyed on node identity so an unrelated
|
|
@@ -62,6 +67,7 @@ export class PdsChip {
|
|
|
62
67
|
}
|
|
63
68
|
}
|
|
64
69
|
disconnectedCallback() {
|
|
70
|
+
this.hostKeeper.disconnect();
|
|
65
71
|
this.destroyTruncationTooltip();
|
|
66
72
|
}
|
|
67
73
|
// Reveal the clipped label on hover/focus, matching pds-text / pds-table-cell.
|
|
@@ -206,7 +212,10 @@ export class PdsChip {
|
|
|
206
212
|
return (h(CloseElement, Object.assign({}, closeAttributes(), { onClick: this.handleCloseClick }), h("pds-icon", { icon: remove, size: this.iconSize })));
|
|
207
213
|
}
|
|
208
214
|
render() {
|
|
209
|
-
|
|
215
|
+
const hostClass = this.classNames();
|
|
216
|
+
const hostStyles = this.hostStyles;
|
|
217
|
+
this.hostKeeper.record(hostClass, hostStyles);
|
|
218
|
+
return (h(Host, { key: '63e00360276ca3941fb543b2c35211a709fbfc2b', class: hostClass, id: this.componentId, style: hostStyles }, this.setChipContent(), this.effectiveVariant === 'tag' && this.renderCloseButton()));
|
|
210
219
|
}
|
|
211
220
|
static get is() { return "pds-chip"; }
|
|
212
221
|
static get encapsulation() { return "shadow"; }
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
display: flex;
|
|
339
339
|
flex-shrink: 0;
|
|
340
340
|
gap: var(--pine-dimension-xs);
|
|
341
|
-
padding: var(--pine-dimension-
|
|
341
|
+
padding: var(--pine-dimension-sm);
|
|
342
342
|
}
|
|
343
343
|
.pds-combobox__panel-search pds-icon {
|
|
344
344
|
color: var(--pine-color-text-muted);
|
|
@@ -357,6 +357,7 @@
|
|
|
357
357
|
letter-spacing: var(--pine-letter-spacing);
|
|
358
358
|
min-width: 0;
|
|
359
359
|
outline: none;
|
|
360
|
+
padding: 0;
|
|
360
361
|
}
|
|
361
362
|
.pds-combobox__panel-search-input::placeholder {
|
|
362
363
|
color: var(--pine-color-text-placeholder);
|
|
@@ -389,8 +390,12 @@
|
|
|
389
390
|
border-block-end: var(--pine-border);
|
|
390
391
|
border-block-end-color: var(--pine-color-border-subtle);
|
|
391
392
|
border-radius: 0;
|
|
393
|
+
color: var(--pine-color-text-strong);
|
|
394
|
+
font: var(--pine-typography-body);
|
|
392
395
|
inset-block-start: 0;
|
|
396
|
+
letter-spacing: var(--pine-letter-spacing);
|
|
393
397
|
margin-inline: calc(var(--pine-dimension-2xs) * -1);
|
|
398
|
+
padding: var(--pine-dimension-sm);
|
|
394
399
|
position: sticky;
|
|
395
400
|
z-index: 1;
|
|
396
401
|
}
|
|
@@ -447,6 +452,7 @@
|
|
|
447
452
|
background: var(--color-background-default, var(--pine-color-secondary));
|
|
448
453
|
border: var(--pine-border);
|
|
449
454
|
border-radius: var(--pine-border-radius-full);
|
|
455
|
+
box-sizing: border-box;
|
|
450
456
|
color: var(--color-text-default, var(--pine-color-text-inverse-emphasis));
|
|
451
457
|
cursor: pointer;
|
|
452
458
|
display: flex;
|
|
@@ -497,7 +503,14 @@
|
|
|
497
503
|
|
|
498
504
|
.pds-combobox__button-trigger--input-shape {
|
|
499
505
|
border-radius: var(--pine-dimension-125);
|
|
500
|
-
|
|
506
|
+
font: var(--pine-typography-body);
|
|
507
|
+
letter-spacing: var(--pine-letter-spacing);
|
|
508
|
+
min-height: var(--pine-dimension-450);
|
|
509
|
+
padding: calc(var(--pine-dimension-xs) - var(--pine-border-width)) var(--pine-dimension-150);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.pds-combobox__button-trigger--secondary.pds-combobox__button-trigger--input-shape:not([aria-disabled=true]) .pds-combobox__button-trigger-label--placeholder {
|
|
513
|
+
color: var(--pine-color-text-muted);
|
|
501
514
|
}
|
|
502
515
|
|
|
503
516
|
.pds-combobox__button-trigger-chevron {
|
|
@@ -566,6 +579,7 @@
|
|
|
566
579
|
.pds-combobox__chip-trigger {
|
|
567
580
|
align-items: center;
|
|
568
581
|
border-radius: var(--pine-dimension-sm);
|
|
582
|
+
box-sizing: border-box;
|
|
569
583
|
cursor: pointer;
|
|
570
584
|
display: inline-flex;
|
|
571
585
|
font: var(--pine-typography-body-medium);
|
|
@@ -61,6 +61,11 @@ export class PdsCombobox {
|
|
|
61
61
|
* @defaultValue 'Back'
|
|
62
62
|
*/
|
|
63
63
|
this.drillInBackLabel = 'Back';
|
|
64
|
+
/**
|
|
65
|
+
* Text shown when no options match the search. Pass a translated string to localize it; defaults to English.
|
|
66
|
+
* @defaultValue 'No options found'
|
|
67
|
+
*/
|
|
68
|
+
this.noOptionsFoundLabel = 'No options found';
|
|
64
69
|
/**
|
|
65
70
|
* Maximum width of a group's flyout when `group-display` is `flyout`. Any valid CSS width value.
|
|
66
71
|
* @default '380px'
|
|
@@ -2023,7 +2028,7 @@ export class PdsCombobox {
|
|
|
2023
2028
|
this.panelTreeEl = el;
|
|
2024
2029
|
else
|
|
2025
2030
|
this.listboxEl = el;
|
|
2026
|
-
}, onScroll: this.handleScroll }, this.loading && (h("li", { class: "pds-combobox__loading", role: "presentation" }, hasSlottedLoading ? (h("slot", { name: "loading" })) : (h("pds-loader", { size: "small" })))), !this.loading && this.filteredItems.length === 0 && (h("li", { class: "pds-combobox__empty", role: "presentation" }, hasSlottedEmpty ? (h("slot", { name: "empty" })) : (h("span", null,
|
|
2031
|
+
}, onScroll: this.handleScroll }, this.loading && (h("li", { class: "pds-combobox__loading", role: "presentation" }, hasSlottedLoading ? (h("slot", { name: "loading" })) : (h("pds-loader", { size: "small" })))), !this.loading && this.filteredItems.length === 0 && (h("li", { class: "pds-combobox__empty", role: "presentation" }, hasSlottedEmpty ? (h("slot", { name: "empty" })) : (h("span", null, this.noOptionsFoundLabel)))), this.showsGroupedPanel ? this.renderGroupedPanel() : this.renderListboxItems(selectableOptions.length), this.hasMore && !this.loading && (h("li", { class: "pds-combobox__load-more", role: "presentation" }, h("pds-loader", { size: "small" })))));
|
|
2027
2032
|
if (!withSearch)
|
|
2028
2033
|
return list;
|
|
2029
2034
|
// The search field sits above the list; the wrapper is what's positioned and portaled.
|
|
@@ -2162,7 +2167,7 @@ export class PdsCombobox {
|
|
|
2162
2167
|
return true;
|
|
2163
2168
|
}
|
|
2164
2169
|
renderPanelSearch() {
|
|
2165
|
-
return (h("div", { key: "panel-search", class: "pds-combobox__panel-search" }, h("pds-icon", { name: "search", size: "
|
|
2170
|
+
return (h("div", { key: "panel-search", class: "pds-combobox__panel-search" }, h("pds-icon", { name: "search", size: "regular", "aria-hidden": "true" }), h("input", { ref: el => (this.panelSearchEl = el), type: "text", class: "pds-combobox__panel-search-input", placeholder: this.searchPlaceholder, value: this.panelQuery, role: "combobox", "aria-label": this.searchOptionsLabel, "aria-haspopup": this.popupRole, "aria-controls": this.listboxId, "aria-autocomplete": "list", "aria-expanded": "true", "aria-activedescendant": this.activeDescendantId, autocomplete: "off", onInput: this.onPanelSearchInput, onKeyDown: this.onPanelSearchKeyDown })));
|
|
2166
2171
|
}
|
|
2167
2172
|
/**
|
|
2168
2173
|
* An option, as a listbox `option` or, given a tree `level`, a `treeitem`. `posinset` and
|
|
@@ -2251,7 +2256,7 @@ export class PdsCombobox {
|
|
|
2251
2256
|
}
|
|
2252
2257
|
// Helper method to render default text content
|
|
2253
2258
|
renderDefaultContent() {
|
|
2254
|
-
return (h("span", { class:
|
|
2259
|
+
return (h("span", { class: { 'pds-combobox__button-trigger-label': true, 'pds-combobox__button-trigger-label--placeholder': !this.selectedLabel } }, this.selectedLabel || this.placeholder));
|
|
2255
2260
|
}
|
|
2256
2261
|
// Helper method to check if we should show layout content
|
|
2257
2262
|
shouldShowLayoutContent() {
|
|
@@ -2376,13 +2381,13 @@ export class PdsCombobox {
|
|
|
2376
2381
|
]
|
|
2377
2382
|
.filter(Boolean)
|
|
2378
2383
|
.join(' ');
|
|
2379
|
-
return (h(Host, { key: '
|
|
2384
|
+
return (h(Host, { key: '960558b36010eb059c98acc37439656f2f7ff657', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: 'b0abcd004aa98b630819cfdd0cfb85ebde2ee2f8', class: "pds-combobox", tabIndex: -1, onFocusout: this.onComboboxFocusOut, part: "combobox" }, this.hasVisibleLabel && (h("label", { key: 'ae42f12fe4d0c498c99c0baae7673ff90e1be576', htmlFor: this.trigger === 'input' ? this.componentId : undefined, id: this.labelId, class: "pds-combobox__label", onClick: this.onLabelClick }, this.label)), this.trigger === 'input' ? (h("div", { class: "pds-combobox__input-wrapper", style: { width: this.triggerWidth } }, h("input", { ref: el => {
|
|
2380
2385
|
this.inputEl = el;
|
|
2381
2386
|
this.triggerEl = el;
|
|
2382
2387
|
}, class: {
|
|
2383
2388
|
'pds-combobox__input': true,
|
|
2384
2389
|
'pds-combobox__input--invalid': this.isInvalid(),
|
|
2385
|
-
}, type: "text", role: "combobox", "aria-autocomplete": "list", "aria-haspopup": this.inputPopupRole === 'tree' ? 'tree' : undefined, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.hideLabel ? this.label : undefined, id: this.componentId, value: this.displayText, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput, onClick: this.handleInputClick, onKeyDown: this.handleKeyDown, autocomplete: "off", part: "input" }), h("pds-icon", { icon: "enlarge", "aria-hidden": "true", class: "pds-combobox__input-icon" }))) : this.trigger === 'chip' ? (h("div", { class: this.getChipTriggerClass(), style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.triggerAriaLabel, "aria-labelledby": this.triggerLabelledBy, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "chip-trigger" }, this.renderChipTriggerContent())) : (h("div", { class: triggerClass, style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.triggerAriaLabel, "aria-labelledby": this.triggerLabelledBy, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "button-trigger" }, this.renderButtonTriggerContent())), this.renderMessages(), h("div", { key: '
|
|
2390
|
+
}, type: "text", role: "combobox", "aria-autocomplete": "list", "aria-haspopup": this.inputPopupRole === 'tree' ? 'tree' : undefined, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.hideLabel ? this.label : undefined, id: this.componentId, value: this.displayText, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput, onClick: this.handleInputClick, onKeyDown: this.handleKeyDown, autocomplete: "off", part: "input" }), h("pds-icon", { icon: "enlarge", "aria-hidden": "true", class: "pds-combobox__input-icon" }))) : this.trigger === 'chip' ? (h("div", { class: this.getChipTriggerClass(), style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.triggerAriaLabel, "aria-labelledby": this.triggerLabelledBy, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "chip-trigger" }, this.renderChipTriggerContent())) : (h("div", { class: triggerClass, style: { width: this.triggerWidth }, role: this.usesPanelSearch ? 'button' : 'combobox', "aria-haspopup": this.triggerPopupRole, "aria-controls": this.listboxId, "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-activedescendant": this.usesPanelSearch ? undefined : this.activeDescendantId, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.triggerAriaLabel, "aria-labelledby": this.triggerLabelledBy, id: this.componentId, tabIndex: this.disabled ? -1 : 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, onKeyUp: this.onButtonTriggerKeyUp, ref: el => (this.triggerEl = el), part: "button-trigger" }, this.renderButtonTriggerContent())), this.renderMessages(), h("div", { key: 'ab0dba6db0a989cb2e41632cb8412062f96c38cd', style: { display: 'none' } }, h("slot", { key: '337461c5ead6dda1d04911fd4b5a23b1dc6b9726', onSlotchange: () => this.updateOptions() })), this.renderDropdown(), this.groupDisplay !== 'inline' && (h("span", { key: 'd8d82d69381548b2e3266d9109c98ab0397b22e0', class: "visually-hidden", role: "status", "aria-live": "polite" }, this.isOpen && this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null ? this.openGroup.label : '')))));
|
|
2386
2391
|
}
|
|
2387
2392
|
static get is() { return "pds-combobox"; }
|
|
2388
2393
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2614,6 +2619,29 @@ export class PdsCombobox {
|
|
|
2614
2619
|
"attribute": "drill-in-back-label",
|
|
2615
2620
|
"defaultValue": "'Back'"
|
|
2616
2621
|
},
|
|
2622
|
+
"noOptionsFoundLabel": {
|
|
2623
|
+
"type": "string",
|
|
2624
|
+
"mutable": false,
|
|
2625
|
+
"complexType": {
|
|
2626
|
+
"original": "string",
|
|
2627
|
+
"resolved": "string",
|
|
2628
|
+
"references": {}
|
|
2629
|
+
},
|
|
2630
|
+
"required": false,
|
|
2631
|
+
"optional": false,
|
|
2632
|
+
"docs": {
|
|
2633
|
+
"tags": [{
|
|
2634
|
+
"name": "defaultValue",
|
|
2635
|
+
"text": "'No options found'"
|
|
2636
|
+
}],
|
|
2637
|
+
"text": "Text shown when no options match the search. Pass a translated string to localize it; defaults to English."
|
|
2638
|
+
},
|
|
2639
|
+
"getter": false,
|
|
2640
|
+
"setter": false,
|
|
2641
|
+
"reflect": false,
|
|
2642
|
+
"attribute": "no-options-found-label",
|
|
2643
|
+
"defaultValue": "'No options found'"
|
|
2644
|
+
},
|
|
2617
2645
|
"flyoutMaxWidth": {
|
|
2618
2646
|
"type": "string",
|
|
2619
2647
|
"mutable": false,
|
|
@@ -111,6 +111,40 @@ ButtonTrigger.args = {
|
|
|
111
111
|
value: 'dog',
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
+
// trigger-shape="input": the same field as pds-select, empty and with a value, beside one.
|
|
115
|
+
export const ButtonTriggerInputShape = (args) => html`
|
|
116
|
+
<div style="display: grid; gap: 16px; grid-template-columns: repeat(2, 240px);">
|
|
117
|
+
<pds-combobox component-id="combobox-input-shape-empty" label=${args.label} trigger="button" trigger-shape=${args.triggerShape} trigger-variant=${args.triggerVariant} trigger-width="100%" mode="select-only" placeholder=${args.placeholder} ?disabled=${args.disabled}>
|
|
118
|
+
<option value="tag">Tag</option>
|
|
119
|
+
<option value="offer">Offer</option>
|
|
120
|
+
</pds-combobox>
|
|
121
|
+
<pds-select component-id="select-input-shape-empty" label="Conditional" ?disabled=${args.disabled}>
|
|
122
|
+
<option value="">Select conditional...</option>
|
|
123
|
+
<option value="is">is</option>
|
|
124
|
+
</pds-select>
|
|
125
|
+
<pds-combobox component-id="combobox-input-shape-filled" label=${args.label} trigger="button" trigger-shape=${args.triggerShape} trigger-variant=${args.triggerVariant} trigger-width="100%" mode="select-only" value="tag" ?disabled=${args.disabled}>
|
|
126
|
+
<option value="tag">Tag</option>
|
|
127
|
+
<option value="offer">Offer</option>
|
|
128
|
+
</pds-combobox>
|
|
129
|
+
<pds-select component-id="select-input-shape-filled" label="Conditional" value="is" ?disabled=${args.disabled}>
|
|
130
|
+
<option value="">Select conditional...</option>
|
|
131
|
+
<option value="is">is</option>
|
|
132
|
+
</pds-select>
|
|
133
|
+
</div>`;
|
|
134
|
+
|
|
135
|
+
ButtonTriggerInputShape.args = {
|
|
136
|
+
label: 'Category',
|
|
137
|
+
placeholder: 'Select category',
|
|
138
|
+
triggerShape: 'input',
|
|
139
|
+
triggerVariant: 'secondary',
|
|
140
|
+
disabled: false,
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
ButtonTriggerInputShape.argTypes = {
|
|
144
|
+
triggerShape: { control: 'inline-radio', options: ['pill', 'input'] },
|
|
145
|
+
triggerVariant: { control: 'inline-radio', options: ['secondary', 'primary', 'accent', 'destructive'] },
|
|
146
|
+
};
|
|
147
|
+
|
|
114
148
|
export const ProgrammaticClear = (args) => html`
|
|
115
149
|
<pds-box direction="column" gap="sm" align-items="start">
|
|
116
150
|
<pds-combobox
|
|
@@ -494,14 +528,17 @@ export const GroupDisplayDrillInWithPanelSearch = (args) => html`
|
|
|
494
528
|
search-placeholder=${args.searchPlaceholder}
|
|
495
529
|
search-options-label=${args.searchOptionsLabel}
|
|
496
530
|
drill-in-back-label=${args.drillInBackLabel}
|
|
531
|
+
no-options-found-label=${args.noOptionsFoundLabel}
|
|
497
532
|
trigger-width=${args.triggerWidth}
|
|
498
533
|
dropdown-width=${args.dropdownWidth}
|
|
499
534
|
.options=${args.options}
|
|
500
535
|
></pds-combobox>
|
|
501
536
|
</div>`;
|
|
502
537
|
|
|
538
|
+
// Search for something that matches no filter to see noOptionsFoundLabel.
|
|
503
539
|
GroupDisplayDrillInWithPanelSearch.args = {
|
|
504
540
|
panelSearch: true,
|
|
541
|
+
noOptionsFoundLabel: 'No filters found',
|
|
505
542
|
label: 'Filter',
|
|
506
543
|
placeholder: 'Choose a filter',
|
|
507
544
|
searchPlaceholder: 'Search filters',
|
|
@@ -518,6 +555,10 @@ GroupDisplayDrillInWithPanelSearch.args = {
|
|
|
518
555
|
],
|
|
519
556
|
};
|
|
520
557
|
|
|
558
|
+
GroupDisplayDrillInWithPanelSearch.argTypes = {
|
|
559
|
+
noOptionsFoundLabel: { control: 'text' },
|
|
560
|
+
};
|
|
561
|
+
|
|
521
562
|
// A large action catalog: many groups, a button trigger and panel search. The narrower widths
|
|
522
563
|
// leave room for the flyout beside the dropdown on a narrow canvas.
|
|
523
564
|
export const GroupDisplayActionCatalog = (args) => html`
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { HostStylingKeeper } from "../../utils/attributes";
|
|
2
3
|
import { copy as copyIcon } from "@pine-ds/icons/icons";
|
|
4
|
+
import { restoreReflectedDefault } from "../../utils/reflected-attribute-default";
|
|
3
5
|
import { setupTruncationTooltip } from "../../utils/truncation-tooltip";
|
|
4
6
|
export class PdsCopytext {
|
|
5
7
|
constructor() {
|
|
8
|
+
this.hostKeeper = new HostStylingKeeper();
|
|
6
9
|
this.truncationCleanup = null;
|
|
7
10
|
/**
|
|
8
11
|
* Determines whether `copytext` should have a visible border.
|
|
@@ -35,6 +38,12 @@ export class PdsCopytext {
|
|
|
35
38
|
this.copyToClipboard(this.value);
|
|
36
39
|
};
|
|
37
40
|
}
|
|
41
|
+
connectedCallback() {
|
|
42
|
+
this.hostKeeper.connect(this.el);
|
|
43
|
+
}
|
|
44
|
+
restoreBorderDefault(newValue) {
|
|
45
|
+
this.border = restoreReflectedDefault(this.el, 'border', newValue, true);
|
|
46
|
+
}
|
|
38
47
|
handleTruncateChange(newValue) {
|
|
39
48
|
if (newValue) {
|
|
40
49
|
this.initTruncationTooltip();
|
|
@@ -54,6 +63,7 @@ export class PdsCopytext {
|
|
|
54
63
|
}
|
|
55
64
|
}
|
|
56
65
|
disconnectedCallback() {
|
|
66
|
+
this.hostKeeper.disconnect();
|
|
57
67
|
this.destroyTruncationTooltip();
|
|
58
68
|
}
|
|
59
69
|
initTruncationTooltip() {
|
|
@@ -90,7 +100,9 @@ export class PdsCopytext {
|
|
|
90
100
|
return classNames.join(' ');
|
|
91
101
|
}
|
|
92
102
|
render() {
|
|
93
|
-
|
|
103
|
+
const hostClass = this.classNames();
|
|
104
|
+
this.hostKeeper.record(hostClass);
|
|
105
|
+
return (h(Host, { key: '1c43941f808f58a53f1c445e0f5693985c793c35', class: hostClass, id: this.componentId }, h("pds-button", { key: 'd771d2587a11f1b27bded17b5df5e649ea93cd90', type: "button", variant: "unstyled", onClick: this.handleClick }, h("span", { key: '0d4fd25220cac636b328fd1ee1aba40d07296265', ref: (el) => this.valueSpanEl = el }, this.value), h("pds-icon", { key: '832a044c10843bb90833301cc3f3ea1f7b755f42', "aria-hidden": "true", icon: copyIcon, size: "16px" }))));
|
|
94
106
|
}
|
|
95
107
|
static get is() { return "pds-copytext"; }
|
|
96
108
|
static get encapsulation() { return "shadow"; }
|
|
@@ -108,7 +120,7 @@ export class PdsCopytext {
|
|
|
108
120
|
return {
|
|
109
121
|
"border": {
|
|
110
122
|
"type": "boolean",
|
|
111
|
-
"mutable":
|
|
123
|
+
"mutable": true,
|
|
112
124
|
"complexType": {
|
|
113
125
|
"original": "boolean",
|
|
114
126
|
"resolved": "boolean",
|
|
@@ -236,6 +248,9 @@ export class PdsCopytext {
|
|
|
236
248
|
static get elementRef() { return "el"; }
|
|
237
249
|
static get watchers() {
|
|
238
250
|
return [{
|
|
251
|
+
"propName": "border",
|
|
252
|
+
"methodName": "restoreBorderDefault"
|
|
253
|
+
}, {
|
|
239
254
|
"propName": "truncate",
|
|
240
255
|
"methodName": "handleTruncateChange"
|
|
241
256
|
}, {
|
|
@@ -5,6 +5,7 @@ import { unwrapReconnectedContent } from "../../../utils/reconnected-content";
|
|
|
5
5
|
* which caps itself against the viewport for a centered, possibly-shorter
|
|
6
6
|
* modal, a drawer panel is already edge-to-edge, so its content can simply
|
|
7
7
|
* flex to fill whatever space the header and footer leave.
|
|
8
|
+
* @lightDom renders-markup
|
|
8
9
|
*/
|
|
9
10
|
export class PdsDrawerContent {
|
|
10
11
|
// Unwraps a nested .pds-drawer-content left by a page-cache (Turbo, bfcache) reconnect.
|
|
@@ -12,7 +13,7 @@ export class PdsDrawerContent {
|
|
|
12
13
|
unwrapReconnectedContent(this.el.querySelector('.pds-drawer-content'), '.pds-drawer-content');
|
|
13
14
|
}
|
|
14
15
|
render() {
|
|
15
|
-
return (h("div", { key: '
|
|
16
|
+
return (h("div", { key: 'b15b087506c1292f9d67e531e8d935069749c09d', class: "pds-drawer-content" }, h("slot", { key: '9c60ca75c7905e7e994f9c41eee213b962afb833' })));
|
|
16
17
|
}
|
|
17
18
|
static get is() { return "pds-drawer-content"; }
|
|
18
19
|
static get originalStyleUrls() {
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { unwrapReconnectedContent } from "../../../utils/reconnected-content";
|
|
3
|
+
/**
|
|
4
|
+
* @lightDom renders-markup
|
|
5
|
+
*/
|
|
3
6
|
export class PdsDrawerFooter {
|
|
4
7
|
// Unwraps a nested .pds-drawer__footer left by a page-cache (Turbo, bfcache) reconnect.
|
|
5
8
|
componentDidRender() {
|
|
6
9
|
unwrapReconnectedContent(this.el.querySelector('.pds-drawer__footer'), '.pds-drawer__footer');
|
|
7
10
|
}
|
|
8
11
|
render() {
|
|
9
|
-
return (h("footer", { key: '
|
|
12
|
+
return (h("footer", { key: 'a4eec0aff617c605b94f8d3b9ec1e2d98cded6fb', class: "pds-drawer__footer" }, h("slot", { key: '6dc379c940e37edfd05d99728be9dff58ca1d717' })));
|
|
10
13
|
}
|
|
11
14
|
static get is() { return "pds-drawer-footer"; }
|
|
12
15
|
static get originalStyleUrls() {
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { unwrapReconnectedContent } from "../../../utils/reconnected-content";
|
|
3
|
+
/**
|
|
4
|
+
* @lightDom renders-markup
|
|
5
|
+
*/
|
|
3
6
|
export class PdsDrawerHeader {
|
|
4
7
|
// Unwraps a nested .pds-drawer__header left by a page-cache (Turbo, bfcache) reconnect.
|
|
5
8
|
componentDidRender() {
|
|
6
9
|
unwrapReconnectedContent(this.el.querySelector('.pds-drawer__header'), '.pds-drawer__header');
|
|
7
10
|
}
|
|
8
11
|
render() {
|
|
9
|
-
return (h("header", { key: '
|
|
12
|
+
return (h("header", { key: '6b9338e5dbf7a7e580c11b28c95ca53693528382', class: "pds-drawer__header" }, h("slot", { key: '0990fbcf94c0c438b98cf1e8945f1e2fd9aa33dc' })));
|
|
10
13
|
}
|
|
11
14
|
static get is() { return "pds-drawer-header"; }
|
|
12
15
|
static get originalStyleUrls() {
|
|
@@ -16,6 +16,7 @@ const PORTALED_OVERLAY_SELECTOR = '.pds-popover, .pds-tooltip, .pds-combobox-dro
|
|
|
16
16
|
* suppressed, and adds the edge, width and dismiss behavior a side panel
|
|
17
17
|
* needs on top. It does not reimplement focus, Escape or dialog semantics —
|
|
18
18
|
* those come from `pds-modal` unchanged.
|
|
19
|
+
* @lightDom renders-markup
|
|
19
20
|
*/
|
|
20
21
|
export class PdsDrawer {
|
|
21
22
|
constructor() {
|
|
@@ -133,11 +134,11 @@ export class PdsDrawer {
|
|
|
133
134
|
this.open = false;
|
|
134
135
|
}
|
|
135
136
|
render() {
|
|
136
|
-
return (h(Host, { key: '
|
|
137
|
+
return (h(Host, { key: '166bc90b45d29f64f11b6840e7c6ae798bf14261', class: {
|
|
137
138
|
'pds-drawer': true,
|
|
138
139
|
[`pds-drawer--${this.side}`]: true,
|
|
139
140
|
[`pds-drawer--${this.size}`]: true,
|
|
140
|
-
} }, h("pds-modal", { key: '
|
|
141
|
+
} }, h("pds-modal", { key: '2faa1cee1f34a85e9df0cabb8e78803982414982', class: "pds-drawer__modal", ref: (el) => (this.modalEl = el), componentId: this.componentId, open: this.open, scrollable: this.scrollable, disableTopLayer: true, backdropDismiss: this.lightDismiss, disableInitialFocus: this.initialFocus === 'none' }, h("slot", { key: '93968e612756c398f6d1faf9383f6c88c420da28' }))));
|
|
141
142
|
}
|
|
142
143
|
static get is() { return "pds-drawer"; }
|
|
143
144
|
static get originalStyleUrls() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { setAttributesIfChanged } from "../../utils/attributes";
|
|
2
3
|
import { computePosition, flip, offset, shift, autoUpdate, } from "@floating-ui/dom";
|
|
3
4
|
/**
|
|
4
5
|
* @part menu-panel - Exposes the dropdown menu container for styling.
|
|
@@ -8,6 +9,7 @@ export class PdsDropdownMenu {
|
|
|
8
9
|
this.isOpen = false;
|
|
9
10
|
this.menuItems = [];
|
|
10
11
|
this.cleanupAutoUpdate = null;
|
|
12
|
+
this.triggerObserver = null;
|
|
11
13
|
this.currentFocusIndex = -1;
|
|
12
14
|
/**
|
|
13
15
|
* The placement of the dropdown panel relative to the trigger.
|
|
@@ -18,10 +20,17 @@ export class PdsDropdownMenu {
|
|
|
18
20
|
// Get all elements assigned to this slot
|
|
19
21
|
const assignedElements = this.slotEl.assignedElements();
|
|
20
22
|
this.triggerEl = assignedElements[0];
|
|
21
|
-
this.triggerEl
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
if (this.triggerEl) {
|
|
24
|
+
this.triggerEl.onclick = this.handleClick;
|
|
25
|
+
this.syncTriggerAria();
|
|
26
|
+
}
|
|
27
|
+
this.observeTrigger();
|
|
28
|
+
};
|
|
29
|
+
// Writes the trigger's ARIA from the menu's state, so the observer's own callback doesn't loop.
|
|
30
|
+
this.syncTriggerAria = () => {
|
|
31
|
+
if (!this.triggerEl)
|
|
32
|
+
return;
|
|
33
|
+
setAttributesIfChanged(this.triggerEl, { 'aria-haspopup': 'menu', 'aria-expanded': String(this.isOpen) });
|
|
25
34
|
};
|
|
26
35
|
this.handleSlotChange = (event) => {
|
|
27
36
|
this.slotEl = event.target;
|
|
@@ -75,8 +84,7 @@ export class PdsDropdownMenu {
|
|
|
75
84
|
this.cleanupAutoUpdate = autoUpdate(this.triggerEl, this.panelEl, updatePosition);
|
|
76
85
|
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-box').classList.remove('is-hidden');
|
|
77
86
|
this.isOpen = true;
|
|
78
|
-
|
|
79
|
-
this.triggerEl.setAttribute('aria-expanded', 'true');
|
|
87
|
+
this.syncTriggerAria();
|
|
80
88
|
};
|
|
81
89
|
// Close the dropdown
|
|
82
90
|
this.closeDropdown = () => {
|
|
@@ -88,8 +96,7 @@ export class PdsDropdownMenu {
|
|
|
88
96
|
this.cleanupAutoUpdate();
|
|
89
97
|
this.cleanupAutoUpdate = null;
|
|
90
98
|
}
|
|
91
|
-
|
|
92
|
-
this.triggerEl.setAttribute('aria-expanded', 'false');
|
|
99
|
+
this.syncTriggerAria();
|
|
93
100
|
// Reset focus index
|
|
94
101
|
this.currentFocusIndex = -1;
|
|
95
102
|
// Return focus to trigger
|
|
@@ -106,12 +113,35 @@ export class PdsDropdownMenu {
|
|
|
106
113
|
var _a;
|
|
107
114
|
this.panelEl = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('pds-box');
|
|
108
115
|
}
|
|
116
|
+
connectedCallback() {
|
|
117
|
+
// Moved within the page, the trigger slot doesn't change, so watch the same trigger again, and
|
|
118
|
+
// fix anything changed while the menu was detached and unobserved.
|
|
119
|
+
this.observeTrigger();
|
|
120
|
+
this.syncTriggerAria();
|
|
121
|
+
}
|
|
109
122
|
disconnectedCallback() {
|
|
123
|
+
var _a;
|
|
110
124
|
// Clean up auto-update when component is removed from DOM
|
|
111
125
|
if (this.cleanupAutoUpdate) {
|
|
112
126
|
this.cleanupAutoUpdate();
|
|
113
127
|
this.cleanupAutoUpdate = null;
|
|
114
128
|
}
|
|
129
|
+
(_a = this.triggerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
130
|
+
this.triggerObserver = null;
|
|
131
|
+
}
|
|
132
|
+
// The trigger is the consumer's element, so anything can rewrite its attributes (a Turbo morph
|
|
133
|
+
// matches it to server HTML that has no ARIA). Put Pine's values back when that happens.
|
|
134
|
+
observeTrigger() {
|
|
135
|
+
var _a;
|
|
136
|
+
(_a = this.triggerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
137
|
+
this.triggerObserver = null;
|
|
138
|
+
if (!this.triggerEl || typeof MutationObserver === 'undefined')
|
|
139
|
+
return;
|
|
140
|
+
this.triggerObserver = new MutationObserver(this.syncTriggerAria);
|
|
141
|
+
this.triggerObserver.observe(this.triggerEl, {
|
|
142
|
+
attributes: true,
|
|
143
|
+
attributeFilter: ['aria-haspopup', 'aria-expanded'],
|
|
144
|
+
});
|
|
115
145
|
}
|
|
116
146
|
// Outside clicks and scripted closes leave focus where it is; only focus in the menu or on its trigger returns.
|
|
117
147
|
isFocusInMenu() {
|
|
@@ -313,7 +343,7 @@ export class PdsDropdownMenu {
|
|
|
313
343
|
}
|
|
314
344
|
}
|
|
315
345
|
render() {
|
|
316
|
-
return (h(Host, { key: '
|
|
346
|
+
return (h(Host, { key: '9d67972cf15c22bc666c32b86dcd8f143160ee0a', id: this.componentId }, h("slot", { key: 'e9cbc0612ce0e8c2bf55e1dc7930eda075fcc173', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), h("pds-box", { key: '6fed3f11cf962a97f8ebb3cc69bd76efb425c464', "border-radius": "sm", display: "flex", direction: "column", class: "pds-dropdown-menu--panel is-hidden", shadow: "100", role: "menu", "aria-orientation": "vertical", part: "menu-panel" }, h("slot", { key: 'b8757512713b913f3ee56d9518897e7ed3c3b830', onSlotchange: this.handleSlotChange }))));
|
|
317
347
|
}
|
|
318
348
|
static get is() { return "pds-dropdown-menu"; }
|
|
319
349
|
static get encapsulation() { return "shadow"; }
|