@pine-ds/core 4.4.3 → 4.5.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/attributes.js +1 -1
- package/components/closest.js +1 -1
- package/components/index.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-DXvaSETR.js +178 -0
- package/dist/cjs/{index-D8Gl0bIB.js → index-BQjWfQXw.js} +10 -1
- package/dist/cjs/index.cjs.js +3 -0
- package/dist/cjs/keep-hydrated-iLS88j1Z.js +67 -0
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/mock-pds-modal.cjs.entry.js +2 -1
- package/dist/cjs/pds-accordion.cjs.entry.js +2 -1
- package/dist/cjs/pds-alert.cjs.entry.js +2 -1
- package/dist/cjs/pds-avatar.cjs.entry.js +19 -2
- package/dist/cjs/pds-box.cjs.entry.js +13 -2
- package/dist/cjs/pds-button.cjs.entry.js +2 -1
- package/dist/cjs/pds-checkbox.cjs.entry.js +13 -5
- package/dist/cjs/pds-chip.cjs.entry.js +12 -2
- package/dist/cjs/pds-combobox.cjs.entry.js +13 -7
- package/dist/cjs/pds-container.cjs.entry.js +2 -1
- package/dist/cjs/pds-copytext.cjs.entry.js +18 -2
- package/dist/cjs/pds-datepicker.cjs.entry.js +3 -2
- package/dist/cjs/pds-divider.cjs.entry.js +2 -1
- package/dist/cjs/pds-drawer-content.cjs.entry.js +3 -2
- package/dist/cjs/pds-drawer-footer.cjs.entry.js +3 -2
- package/dist/cjs/pds-drawer-header.cjs.entry.js +3 -2
- package/dist/cjs/pds-drawer.cjs.entry.js +4 -3
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +2 -1
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +2 -1
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +41 -10
- package/dist/cjs/pds-filter.cjs.entry.js +2 -1
- package/dist/cjs/pds-filters.cjs.entry.js +2 -1
- package/dist/cjs/pds-icon.cjs.entry.js +2 -1
- package/dist/cjs/pds-image.cjs.entry.js +2 -1
- package/dist/cjs/pds-input.cjs.entry.js +3 -2
- package/dist/cjs/pds-link.cjs.entry.js +2 -1
- package/dist/cjs/pds-loader.cjs.entry.js +29 -2
- package/dist/cjs/pds-modal-content.cjs.entry.js +4 -3
- package/dist/cjs/pds-modal-footer.cjs.entry.js +3 -2
- package/dist/cjs/pds-modal-header.cjs.entry.js +3 -2
- package/dist/cjs/pds-modal.cjs.entry.js +137 -50
- package/dist/cjs/pds-multiselect.cjs.entry.js +2 -1
- package/dist/cjs/pds-popover.cjs.entry.js +83 -14
- package/dist/cjs/pds-progress.cjs.entry.js +14 -2
- package/dist/cjs/pds-property.cjs.entry.js +2 -1
- package/dist/cjs/pds-radio-group.cjs.entry.js +5 -4
- package/dist/cjs/pds-radio.cjs.entry.js +13 -4
- package/dist/cjs/pds-row.cjs.entry.js +13 -2
- package/dist/cjs/pds-select.cjs.entry.js +15 -2
- package/dist/cjs/pds-sortable-item.cjs.entry.js +12 -2
- package/dist/cjs/pds-sortable.cjs.entry.js +13 -2
- package/dist/cjs/pds-switch.cjs.entry.js +14 -5
- package/dist/cjs/pds-tab.cjs.entry.js +2 -1
- package/dist/cjs/pds-table-body.cjs.entry.js +2 -1
- package/dist/cjs/pds-table-cell.cjs.entry.js +2 -1
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +2 -1
- package/dist/cjs/pds-table-head.cjs.entry.js +2 -1
- package/dist/cjs/pds-table-row.cjs.entry.js +2 -1
- package/dist/cjs/pds-table.cjs.entry.js +2 -1
- package/dist/cjs/pds-tabpanel.cjs.entry.js +3 -2
- package/dist/cjs/pds-tabs.cjs.entry.js +15 -2
- package/dist/cjs/pds-text.cjs.entry.js +2 -1
- package/dist/cjs/pds-textarea.cjs.entry.js +3 -2
- package/dist/cjs/pds-toast.cjs.entry.js +2 -1
- package/dist/cjs/pds-tooltip.cjs.entry.js +4 -3
- package/dist/cjs/pine-core.cjs.js +3 -2
- package/dist/cjs/reflected-attribute-default-DVYHG6O1.js +44 -0
- package/dist/collection/collection-manifest.json +2 -1
- 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 +14 -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-datepicker/pds-datepicker.css +4 -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/global/pine-global.js +6 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/attributes.js +90 -0
- package/dist/collection/utils/keep-hydrated.js +61 -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-CF5K2pxn.js +173 -0
- package/dist/esm/{index-bLhIfh0N.js → index-2HMD-zUO.js} +10 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/keep-hydrated-Dv7ssOTc.js +63 -0
- package/dist/esm/loader.js +4 -3
- package/dist/esm/mock-pds-modal.entry.js +2 -1
- package/dist/esm/pds-accordion.entry.js +2 -1
- package/dist/esm/pds-alert.entry.js +2 -1
- package/dist/esm/pds-avatar.entry.js +19 -2
- package/dist/esm/pds-box.entry.js +13 -2
- package/dist/esm/pds-button.entry.js +2 -1
- package/dist/esm/pds-checkbox.entry.js +13 -5
- package/dist/esm/pds-chip.entry.js +12 -2
- package/dist/esm/pds-combobox.entry.js +13 -7
- package/dist/esm/pds-container.entry.js +2 -1
- package/dist/esm/pds-copytext.entry.js +18 -2
- package/dist/esm/pds-datepicker.entry.js +3 -2
- package/dist/esm/pds-divider.entry.js +2 -1
- package/dist/esm/pds-drawer-content.entry.js +3 -2
- package/dist/esm/pds-drawer-footer.entry.js +3 -2
- package/dist/esm/pds-drawer-header.entry.js +3 -2
- package/dist/esm/pds-drawer.entry.js +4 -3
- package/dist/esm/pds-dropdown-menu-item.entry.js +2 -1
- package/dist/esm/pds-dropdown-menu-separator.entry.js +2 -1
- package/dist/esm/pds-dropdown-menu.entry.js +41 -10
- package/dist/esm/pds-filter.entry.js +2 -1
- package/dist/esm/pds-filters.entry.js +2 -1
- package/dist/esm/pds-icon.entry.js +2 -1
- package/dist/esm/pds-image.entry.js +2 -1
- package/dist/esm/pds-input.entry.js +3 -2
- package/dist/esm/pds-link.entry.js +2 -1
- package/dist/esm/pds-loader.entry.js +29 -2
- package/dist/esm/pds-modal-content.entry.js +4 -3
- package/dist/esm/pds-modal-footer.entry.js +3 -2
- package/dist/esm/pds-modal-header.entry.js +3 -2
- package/dist/esm/pds-modal.entry.js +137 -50
- package/dist/esm/pds-multiselect.entry.js +2 -1
- package/dist/esm/pds-popover.entry.js +83 -14
- package/dist/esm/pds-progress.entry.js +14 -2
- package/dist/esm/pds-property.entry.js +2 -1
- package/dist/esm/pds-radio-group.entry.js +5 -4
- package/dist/esm/pds-radio.entry.js +13 -4
- package/dist/esm/pds-row.entry.js +13 -2
- package/dist/esm/pds-select.entry.js +15 -2
- package/dist/esm/pds-sortable-item.entry.js +12 -2
- package/dist/esm/pds-sortable.entry.js +13 -2
- package/dist/esm/pds-switch.entry.js +14 -5
- package/dist/esm/pds-tab.entry.js +2 -1
- package/dist/esm/pds-table-body.entry.js +2 -1
- package/dist/esm/pds-table-cell.entry.js +2 -1
- package/dist/esm/pds-table-head-cell.entry.js +2 -1
- package/dist/esm/pds-table-head.entry.js +2 -1
- package/dist/esm/pds-table-row.entry.js +2 -1
- package/dist/esm/pds-table.entry.js +2 -1
- package/dist/esm/pds-tabpanel.entry.js +3 -2
- package/dist/esm/pds-tabs.entry.js +15 -2
- package/dist/esm/pds-text.entry.js +2 -1
- package/dist/esm/pds-textarea.entry.js +3 -2
- package/dist/esm/pds-toast.entry.js +2 -1
- package/dist/esm/pds-tooltip.entry.js +4 -3
- package/dist/esm/pine-core.js +4 -3
- package/dist/esm/reflected-attribute-default-t3idJwV0.js +42 -0
- package/dist/esm-es5/attributes-CF5K2pxn.js +1 -0
- package/dist/esm-es5/{index-bLhIfh0N.js → index-2HMD-zUO.js} +2 -2
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/keep-hydrated-Dv7ssOTc.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-accordion.entry.js +1 -1
- package/dist/esm-es5/pds-alert.entry.js +1 -1
- package/dist/esm-es5/pds-avatar.entry.js +1 -1
- package/dist/esm-es5/pds-box.entry.js +1 -1
- package/dist/esm-es5/pds-button.entry.js +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-combobox.entry.js +2 -2
- package/dist/esm-es5/pds-container.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-datepicker.entry.js +1 -1
- package/dist/esm-es5/pds-divider.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-item.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm-es5/pds-filter.entry.js +1 -1
- package/dist/esm-es5/pds-filters.entry.js +1 -1
- package/dist/esm-es5/pds-icon.entry.js +1 -1
- package/dist/esm-es5/pds-image.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-link.entry.js +1 -1
- package/dist/esm-es5/pds-loader.entry.js +1 -1
- package/dist/esm-es5/pds-modal-content.entry.js +1 -1
- package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
- package/dist/esm-es5/pds-modal-header.entry.js +1 -1
- package/dist/esm-es5/pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-multiselect.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-property.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-tab.entry.js +1 -1
- package/dist/esm-es5/pds-table-body.entry.js +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head.entry.js +1 -1
- package/dist/esm-es5/pds-table-row.entry.js +1 -1
- package/dist/esm-es5/pds-table.entry.js +1 -1
- package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
- package/dist/esm-es5/pds-tabs.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-toast.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/reflected-attribute-default-t3idJwV0.js +1 -0
- package/dist/pine-core/index.esm.js +1 -1
- package/dist/pine-core/p-0166c620.entry.js +1 -0
- package/dist/pine-core/p-02857936.entry.js +1 -0
- package/dist/pine-core/{p-5986f3c9.entry.js → p-04fe5da7.system.entry.js} +1 -1
- package/dist/pine-core/p-0de74105.entry.js +1 -0
- package/dist/pine-core/p-152245fa.system.entry.js +1 -0
- package/dist/pine-core/p-16c2aa63.entry.js +1 -0
- package/dist/pine-core/p-1b13f69c.system.entry.js +1 -0
- package/dist/pine-core/p-1cd0acf0.system.entry.js +1 -0
- package/dist/pine-core/p-1cf1fced.entry.js +1 -0
- package/dist/pine-core/p-1d75a9b1.system.entry.js +1 -0
- package/dist/pine-core/p-1e464117.entry.js +1 -0
- package/dist/pine-core/p-1ec4eeaf.system.entry.js +1 -0
- package/dist/pine-core/p-1f263c0b.system.entry.js +1 -0
- package/dist/pine-core/p-1f2e5958.entry.js +1 -0
- package/dist/pine-core/p-207c94da.entry.js +1 -0
- package/dist/pine-core/p-21115986.system.entry.js +1 -0
- package/dist/pine-core/p-22f041ee.system.entry.js +1 -0
- package/dist/pine-core/p-2357758d.system.entry.js +1 -0
- package/dist/pine-core/p-238e5171.system.entry.js +1 -0
- package/dist/pine-core/p-281efc69.entry.js +1 -0
- package/dist/pine-core/p-2ac9e90a.system.entry.js +1 -0
- package/dist/pine-core/p-2cb02706.entry.js +1 -0
- package/dist/pine-core/p-2f539379.system.entry.js +3 -0
- package/dist/pine-core/p-343546b1.system.entry.js +1 -0
- package/dist/pine-core/p-347ae53c.system.entry.js +1 -0
- package/dist/pine-core/p-34b575b6.entry.js +2 -0
- package/dist/pine-core/p-37d73369.system.entry.js +1 -0
- package/dist/pine-core/p-37d95be9.entry.js +1 -0
- package/dist/pine-core/p-3b1d8fae.entry.js +1 -0
- package/dist/pine-core/p-419f57c9.entry.js +1 -0
- package/dist/pine-core/p-4414d442.system.entry.js +1 -0
- package/dist/pine-core/p-45fcc5b7.entry.js +1 -0
- package/dist/pine-core/p-4c9cccdb.system.entry.js +8 -0
- package/dist/pine-core/p-4e05a4f0.entry.js +1 -0
- package/dist/pine-core/p-4e67e68e.entry.js +1 -0
- package/dist/pine-core/p-506d3e80.entry.js +1 -0
- package/dist/pine-core/p-5132b8a1.entry.js +1 -0
- package/dist/pine-core/p-51dff046.system.entry.js +1 -0
- package/dist/pine-core/p-539ef98c.entry.js +1 -0
- package/dist/pine-core/p-56576b6e.entry.js +1 -0
- package/dist/pine-core/p-5737182f.entry.js +1 -0
- package/dist/pine-core/p-585832b1.entry.js +1 -0
- package/dist/pine-core/p-59491f98.entry.js +1 -0
- package/dist/pine-core/p-5ac84b2f.entry.js +1 -0
- package/dist/pine-core/p-5b7f7760.entry.js +1 -0
- package/dist/pine-core/p-5bc670be.system.entry.js +1 -0
- package/dist/pine-core/p-5d014059.entry.js +1 -0
- package/dist/pine-core/p-5decd81f.entry.js +1 -0
- package/dist/pine-core/p-5e8d73d4.entry.js +1 -0
- package/dist/pine-core/p-622e91e3.entry.js +7 -0
- package/dist/pine-core/{p-d00c5b9c.system.entry.js → p-63119d23.entry.js} +1 -1
- package/dist/pine-core/p-63854c10.system.entry.js +1 -0
- package/dist/pine-core/p-650ccffb.entry.js +1 -0
- package/dist/pine-core/p-65e30a4c.entry.js +1 -0
- package/dist/pine-core/p-66cfef6d.system.entry.js +1 -0
- package/dist/pine-core/p-6d83ad2d.system.entry.js +1 -0
- package/dist/pine-core/p-70c6f0ed.system.entry.js +1 -0
- package/dist/pine-core/p-71e3a89e.system.entry.js +1 -0
- package/dist/pine-core/p-721297b5.system.entry.js +1 -0
- package/dist/pine-core/p-73bc6e9f.system.entry.js +1 -0
- package/dist/pine-core/p-798839f7.system.entry.js +1 -0
- package/dist/pine-core/p-7bbfb965.system.entry.js +1 -0
- package/dist/pine-core/p-7d01e719.entry.js +1 -0
- package/dist/pine-core/p-7e115d33.system.entry.js +1 -0
- package/dist/pine-core/p-8027db25.entry.js +1 -0
- package/dist/pine-core/p-834c678e.system.entry.js +1 -0
- package/dist/pine-core/p-87f91e02.system.entry.js +1 -0
- package/dist/pine-core/p-8b0fbeb3.entry.js +1 -0
- package/dist/pine-core/p-8b9d8fb5.system.entry.js +1 -0
- package/dist/pine-core/p-912487fa.entry.js +1 -0
- package/dist/pine-core/p-91f712f4.system.entry.js +1 -0
- package/dist/pine-core/p-93877d4a.entry.js +1 -0
- package/dist/pine-core/p-969488f5.system.entry.js +1 -0
- package/dist/pine-core/p-9835c74b.entry.js +1 -0
- package/dist/pine-core/p-99317375.system.entry.js +1 -0
- package/dist/pine-core/p-9a7ee7cb.system.entry.js +1 -0
- package/dist/pine-core/p-9b9f66b7.entry.js +1 -0
- package/dist/pine-core/p-9bcdfac2.entry.js +1 -0
- package/dist/pine-core/p-9d33bb05.entry.js +1 -0
- package/dist/pine-core/p-BJlg6wq7.system.js +2 -0
- package/dist/pine-core/p-BMFBF3sJ.system.js +1 -0
- package/dist/pine-core/p-Bkho_oFB.system.js +1 -0
- package/dist/pine-core/p-D2MUS7JO.js +1 -0
- package/dist/pine-core/p-D2yHYrxQ.system.js +1 -0
- package/dist/pine-core/p-DeIDZHrg.js +2 -0
- package/dist/pine-core/p-Dv7ssOTc.js +1 -0
- package/dist/pine-core/p-TyevV8iv.system.js +1 -0
- package/dist/pine-core/p-YQa3CeL9.system.js +1 -0
- package/dist/pine-core/p-a22091c4.system.entry.js +1 -0
- package/dist/pine-core/p-a6d09102.system.entry.js +1 -0
- package/dist/pine-core/p-a83a6618.system.entry.js +1 -0
- package/dist/pine-core/p-afd5e2d7.entry.js +1 -0
- package/dist/pine-core/p-b5838211.system.entry.js +1 -0
- package/dist/pine-core/p-ba1b79c7.system.entry.js +1 -0
- package/dist/pine-core/p-bd7da23e.system.entry.js +1 -0
- package/dist/pine-core/p-bde53290.system.entry.js +1 -0
- package/dist/pine-core/p-bdf68e53.system.entry.js +1 -0
- package/dist/pine-core/p-bef04e15.system.entry.js +1 -0
- package/dist/pine-core/p-bf1aea9f.system.entry.js +1 -0
- package/dist/pine-core/p-c00e46a5.system.entry.js +1 -0
- package/dist/pine-core/p-c8e89b61.system.entry.js +1 -0
- package/dist/pine-core/p-c9395f43.system.entry.js +1 -0
- package/dist/pine-core/p-d576e542.system.entry.js +1 -0
- package/dist/pine-core/p-d5dd5599.entry.js +1 -0
- package/dist/pine-core/p-d69cfaa4.entry.js +1 -0
- package/dist/pine-core/p-db4319fd.entry.js +1 -0
- package/dist/pine-core/p-dc81ffff.entry.js +1 -0
- package/dist/pine-core/p-e337f32c.system.entry.js +1 -0
- package/dist/pine-core/p-e46f7541.system.entry.js +1 -0
- package/dist/pine-core/p-e7ba30dd.system.entry.js +1 -0
- package/dist/pine-core/p-ed3dd3d2.entry.js +1 -0
- package/dist/pine-core/p-eee4f146.entry.js +1 -0
- package/dist/pine-core/p-f01e35e2.entry.js +1 -0
- package/dist/pine-core/p-f06ca8df.entry.js +1 -0
- package/dist/pine-core/p-f2e0da9a.entry.js +1 -0
- package/dist/pine-core/p-f30d6192.system.entry.js +1 -0
- package/dist/pine-core/p-fbea5703.entry.js +1 -0
- package/dist/pine-core/p-fc6ac917.entry.js +1 -0
- package/dist/pine-core/p-ffe276ef.entry.js +1 -0
- package/dist/pine-core/p-t3idJwV0.js +1 -0
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/pine-core/pine-core.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/global/pine-global.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/attributes.d.ts +34 -0
- package/dist/types/utils/keep-hydrated.d.ts +29 -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 +778 -202
- package/hydrate/index.mjs +778 -202
- 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-085c92aa.system.entry.js +0 -1
- package/dist/pine-core/p-0af4685d.entry.js +0 -1
- package/dist/pine-core/p-0bfe152a.entry.js +0 -1
- package/dist/pine-core/p-0ce3bcf2.system.entry.js +0 -1
- package/dist/pine-core/p-1747c005.system.entry.js +0 -1
- package/dist/pine-core/p-1dd395d8.system.entry.js +0 -1
- package/dist/pine-core/p-2126b4e4.system.entry.js +0 -1
- package/dist/pine-core/p-23044953.system.entry.js +0 -1
- package/dist/pine-core/p-26d8c4f7.system.entry.js +0 -1
- package/dist/pine-core/p-28abc253.system.entry.js +0 -1
- 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-3add97f7.system.entry.js +0 -1
- package/dist/pine-core/p-40928521.system.entry.js +0 -1
- package/dist/pine-core/p-40ebfe59.system.entry.js +0 -1
- package/dist/pine-core/p-468f0dab.system.entry.js +0 -1
- package/dist/pine-core/p-478e69d1.entry.js +0 -1
- package/dist/pine-core/p-495f791c.entry.js +0 -1
- package/dist/pine-core/p-4a43fbd9.entry.js +0 -1
- package/dist/pine-core/p-4d3f5098.system.entry.js +0 -1
- package/dist/pine-core/p-517e04f6.entry.js +0 -1
- package/dist/pine-core/p-517f9962.entry.js +0 -1
- package/dist/pine-core/p-563ba784.entry.js +0 -1
- package/dist/pine-core/p-569b07ed.system.entry.js +0 -1
- package/dist/pine-core/p-5bf397ca.entry.js +0 -1
- package/dist/pine-core/p-5c7c2ffa.entry.js +0 -1
- package/dist/pine-core/p-5e9396e2.system.entry.js +0 -1
- package/dist/pine-core/p-600be0e1.entry.js +0 -1
- package/dist/pine-core/p-601b646c.system.entry.js +0 -1
- package/dist/pine-core/p-60393d52.entry.js +0 -1
- package/dist/pine-core/p-60a15bf7.system.entry.js +0 -1
- package/dist/pine-core/p-60e687ac.entry.js +0 -1
- package/dist/pine-core/p-61ae5a4b.system.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-62974869.entry.js +0 -1
- package/dist/pine-core/p-63422f56.entry.js +0 -2
- 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-67227922.entry.js +0 -1
- package/dist/pine-core/p-686b526d.entry.js +0 -1
- package/dist/pine-core/p-69f60432.system.entry.js +0 -1
- package/dist/pine-core/p-6aaf945c.entry.js +0 -1
- package/dist/pine-core/p-6b25f349.system.entry.js +0 -1
- package/dist/pine-core/p-6eb2070a.entry.js +0 -1
- package/dist/pine-core/p-715b8e6b.entry.js +0 -1
- package/dist/pine-core/p-74b1b841.entry.js +0 -1
- package/dist/pine-core/p-7608e9b2.entry.js +0 -1
- package/dist/pine-core/p-773f5771.system.entry.js +0 -1
- package/dist/pine-core/p-77961987.system.entry.js +0 -1
- package/dist/pine-core/p-77e12080.system.entry.js +0 -1
- package/dist/pine-core/p-7a177548.system.entry.js +0 -1
- package/dist/pine-core/p-7fbb7037.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-86978a51.entry.js +0 -1
- package/dist/pine-core/p-871894e1.entry.js +0 -1
- package/dist/pine-core/p-893b02b7.entry.js +0 -1
- package/dist/pine-core/p-8961d112.system.entry.js +0 -3
- package/dist/pine-core/p-8d42f505.entry.js +0 -1
- package/dist/pine-core/p-9452adc4.entry.js +0 -1
- package/dist/pine-core/p-977db8b2.entry.js +0 -1
- package/dist/pine-core/p-9903eb37.system.entry.js +0 -1
- package/dist/pine-core/p-9b18314c.entry.js +0 -1
- package/dist/pine-core/p-9b262a9d.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-CrXTJmBd.system.js +0 -2
- package/dist/pine-core/p-DO9XKAkv.system.js +0 -1
- package/dist/pine-core/p-G3CPPJEt.system.js +0 -1
- package/dist/pine-core/p-a44316ad.entry.js +0 -1
- package/dist/pine-core/p-ae125139.entry.js +0 -1
- package/dist/pine-core/p-af9bce53.entry.js +0 -1
- package/dist/pine-core/p-b2901e60.system.entry.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-b802776b.system.entry.js +0 -1
- package/dist/pine-core/p-b823bde2.system.entry.js +0 -1
- package/dist/pine-core/p-b82a0693.entry.js +0 -1
- package/dist/pine-core/p-b852c82b.system.entry.js +0 -1
- package/dist/pine-core/p-b979105e.entry.js +0 -1
- package/dist/pine-core/p-bLhIfh0N.js +0 -2
- package/dist/pine-core/p-bb9d158c.system.entry.js +0 -1
- package/dist/pine-core/p-bd1bdb07.system.entry.js +0 -1
- package/dist/pine-core/p-c53e560a.system.entry.js +0 -1
- package/dist/pine-core/p-c5c46b65.entry.js +0 -1
- package/dist/pine-core/p-cbae27a4.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-d11e4956.entry.js +0 -1
- package/dist/pine-core/p-da7a7cca.entry.js +0 -1
- package/dist/pine-core/p-daaf653f.system.entry.js +0 -1
- package/dist/pine-core/p-de740b3e.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-ea9468fb.entry.js +0 -1
- package/dist/pine-core/p-f22abb4d.system.entry.js +0 -1
- package/dist/pine-core/p-f2560935.entry.js +0 -1
- package/dist/pine-core/p-f279f435.system.entry.js +0 -1
- package/dist/pine-core/p-f5677949.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
- package/dist/pine-core/p-fe09b6fb.system.entry.js +0 -1
|
@@ -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
|
}
|
|
@@ -498,7 +503,14 @@
|
|
|
498
503
|
|
|
499
504
|
.pds-combobox__button-trigger--input-shape {
|
|
500
505
|
border-radius: var(--pine-dimension-125);
|
|
501
|
-
|
|
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);
|
|
502
514
|
}
|
|
503
515
|
|
|
504
516
|
.pds-combobox__button-trigger-chevron {
|
|
@@ -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
|
}, {
|
|
@@ -186,7 +186,6 @@ pds-input {
|
|
|
186
186
|
.pds-datepicker__day--selected,
|
|
187
187
|
.pds-datepicker__day--selected:hover {
|
|
188
188
|
background: var(--pine-color-primary);
|
|
189
|
-
border-radius: var(--pine-border-radius-full);
|
|
190
189
|
color: var(--pine-color-text-primary);
|
|
191
190
|
}
|
|
192
191
|
|
|
@@ -218,10 +217,13 @@ pds-input {
|
|
|
218
217
|
background: var(--pine-color-text-primary);
|
|
219
218
|
}
|
|
220
219
|
|
|
220
|
+
.pds-datepicker__day--in-range {
|
|
221
|
+
border-radius: 0;
|
|
222
|
+
}
|
|
223
|
+
|
|
221
224
|
.pds-datepicker__day--in-range,
|
|
222
225
|
.pds-datepicker__day--in-range:hover {
|
|
223
226
|
background: var(--pine-color-background-muted);
|
|
224
|
-
border-radius: 0;
|
|
225
227
|
color: var(--pine-color-text-secondary);
|
|
226
228
|
}
|
|
227
229
|
|
|
@@ -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"; }
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { HostStylingKeeper } from "../../utils/attributes";
|
|
3
|
+
import { restoreReflectedDefault } from "../../utils/reflected-attribute-default";
|
|
2
4
|
/**
|
|
3
5
|
* @part loader-svg - Exposes the spinner SVG element for color customization.
|
|
4
6
|
* @slot label - Default slot for Loader label text.
|
|
5
7
|
*/
|
|
6
8
|
export class PdsLoader {
|
|
7
9
|
constructor() {
|
|
10
|
+
this.hostKeeper = new HostStylingKeeper();
|
|
8
11
|
/**
|
|
9
12
|
* If false, the loader will be hidden.
|
|
10
13
|
*/
|
|
@@ -30,6 +33,15 @@ export class PdsLoader {
|
|
|
30
33
|
}
|
|
31
34
|
};
|
|
32
35
|
}
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
this.hostKeeper.connect(this.el);
|
|
38
|
+
}
|
|
39
|
+
disconnectedCallback() {
|
|
40
|
+
this.hostKeeper.disconnect();
|
|
41
|
+
}
|
|
42
|
+
restoreSizeDefault(newValue) {
|
|
43
|
+
this.size = restoreReflectedDefault(this.el, 'size', newValue, 'md');
|
|
44
|
+
}
|
|
33
45
|
loaderSize() {
|
|
34
46
|
const sizes = {
|
|
35
47
|
xs: '24px',
|
|
@@ -46,7 +58,15 @@ export class PdsLoader {
|
|
|
46
58
|
}
|
|
47
59
|
}
|
|
48
60
|
render() {
|
|
49
|
-
|
|
61
|
+
const hostClass = `pds-loader ${this.isLoading ? '' : 'pds-loader--hidden'}`;
|
|
62
|
+
// Explicit 'true': a boolean `true` lands as an empty value, which ARIA reads as unset.
|
|
63
|
+
const hostAttributes = {
|
|
64
|
+
'aria-hidden': this.isLoading ? null : 'true',
|
|
65
|
+
'aria-busy': this.isLoading ? 'true' : null,
|
|
66
|
+
'aria-live': 'polite',
|
|
67
|
+
};
|
|
68
|
+
this.hostKeeper.record(hostClass, {}, hostAttributes);
|
|
69
|
+
return (h(Host, Object.assign({ key: '81f97b8a6adf4d2c0e5516aa2af9054e200629e1', class: hostClass }, hostAttributes), this.variant === 'spinner' && (h("div", { key: '6e25806c83d6ddeb1141acdd083654867c6ff8a2', class: "pds-loader--spinner" }, h("svg", { key: '4798f27facfcf57da8d408319527fc6083489107', style: this.getSvgStyle(), viewBox: "0 0 200 200", fill: "none", part: "loader-svg" }, h("defs", { key: '0c64abfabc18ccd51ef41017e088f6ec10736d61' }, h("linearGradient", { key: '3aa61edf6250dc827bf925938b69008860f96596', id: "spinner-secondHalf" }, h("stop", { key: '2693d8a866492ef4ca98cbc4beb5f9f1a34a8b52', offset: "0%", "stop-opacity": "0", "stop-color": "currentColor" }), h("stop", { key: 'ae229fdc73733e4d6ab15a6663e67b574bd49b40', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" })), h("linearGradient", { key: '8ddbb46a1a387113d74a82cc4e3e0e9c7e12d573', id: "spinner-firstHalf" }, h("stop", { key: 'd166a3c1ae37c3afa898351683b07f5c4d0ee906', offset: "0%", "stop-opacity": "1", "stop-color": "currentColor" }), h("stop", { key: 'e4c9790bc9a645d752aa56c238fb8708310208b5', offset: "100%", "stop-opacity": "0.5", "stop-color": "currentColor" }))), h("g", { key: '8b3897ff925d4207f9060e2fb69afa657b1b8fe3', class: "pds-loader__spinner-path" }, h("path", { key: '603ef195d1fc64d2059d9fbfeb9b14e2bdb1cabe', stroke: "url(#spinner-secondHalf)", d: "M 4 100 A 96 96 0 0 1 196 100" }), h("path", { key: 'a649ac9538248f5a22d48008377e18f4407efad9', stroke: "url(#spinner-firstHalf)", d: "M 196 100 A 96 96 0 0 1 4 100" }), h("path", { key: '37f3772b61d1459959cc4d8c0b5c729dbd6953ff', stroke: "currentColor", "stroke-linecap": "round", d: "M 4 100 A 96 96 0 0 1 4 98" }))))), this.variant === 'typing' && (h("div", { key: 'e510c2e6498a5542ce6e6573fdc03e8770121cd7', class: "pds-loader--typing" }, h("span", { key: 'bbf4f5a328175f06b221d9abc73118505a09455d' }), h("span", { key: '9a7e80b28e1455ef9d0c1bdb330a6425a3037709' }), h("span", { key: 'f8aa1eb4f822a6d0e2a14a982bbe99866a97815b' }))), h("div", { key: '3492189495798a2ea861d0dcb460f1b25d43d565', class: `pds-loader__label ${this.showLabel ? '' : 'pds-loader--hidden'}` }, h("slot", { key: 'c1a19415b513a2a5f76a53d64b0ef5fbb4a5d100', name: "label" }, "Loading..."))));
|
|
50
70
|
}
|
|
51
71
|
static get is() { return "pds-loader"; }
|
|
52
72
|
static get encapsulation() { return "shadow"; }
|
|
@@ -104,7 +124,7 @@ export class PdsLoader {
|
|
|
104
124
|
},
|
|
105
125
|
"size": {
|
|
106
126
|
"type": "string",
|
|
107
|
-
"mutable":
|
|
127
|
+
"mutable": true,
|
|
108
128
|
"complexType": {
|
|
109
129
|
"original": "| 'xs' // 24px\n | 'sm' // 32px\n | 'md' // 48px\n | 'lg' // 64px\n | 'xl' // 80px\n | string",
|
|
110
130
|
"resolved": "string",
|
|
@@ -144,4 +164,11 @@ export class PdsLoader {
|
|
|
144
164
|
}
|
|
145
165
|
};
|
|
146
166
|
}
|
|
167
|
+
static get elementRef() { return "el"; }
|
|
168
|
+
static get watchers() {
|
|
169
|
+
return [{
|
|
170
|
+
"propName": "size",
|
|
171
|
+
"methodName": "restoreSizeDefault"
|
|
172
|
+
}];
|
|
173
|
+
}
|
|
147
174
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { unwrapReconnectedContent } from "../../../utils/reconnected-content";
|
|
3
|
+
/**
|
|
4
|
+
* @lightDom renders-markup
|
|
5
|
+
*/
|
|
3
6
|
export class PdsModalContent {
|
|
4
7
|
constructor() {
|
|
5
8
|
/**
|
|
@@ -178,10 +181,10 @@ export class PdsModalContent {
|
|
|
178
181
|
render() {
|
|
179
182
|
// Only apply max-height style if it's not 'none'
|
|
180
183
|
const styleObj = this.contentMaxHeight !== 'none' ? { maxHeight: this.contentMaxHeight } : {};
|
|
181
|
-
return (h(Host, { key: '
|
|
184
|
+
return (h(Host, { key: 'f66dbdd08d6af3f87b0a6e8f30e1948b2f674e34' }, h("div", { key: 'ac0469cbfe48002d5bc7f401e0dc30926cfd4421', class: {
|
|
182
185
|
'pds-modal-content': true,
|
|
183
186
|
[`pds-modal-content--border-${this.border}`]: true
|
|
184
|
-
}, style: styleObj, tabindex: "-1" }, h("slot", { key: '
|
|
187
|
+
}, style: styleObj, tabindex: "-1" }, h("slot", { key: '26a8a45ab4dcd0349da68304fa3cacc64603208a' }))));
|
|
185
188
|
}
|
|
186
189
|
static get is() { return "pds-modal-content"; }
|
|
187
190
|
static get originalStyleUrls() {
|