@pine-ds/core 4.5.0 → 4.6.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/mock-pds-modal.js +1 -1
- package/components/pds-combobox.js +1 -1
- package/components/pds-container.js +1 -1
- package/components/pds-copytext.js +1 -1
- package/components/pds-datepicker.js +1 -1
- package/components/pds-divider.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-item.js +1 -1
- package/components/pds-dropdown-menu-separator.js +1 -1
- package/components/pds-dropdown-menu.js +1 -1
- package/components/pds-filter.js +1 -1
- package/components/pds-filters.js +1 -1
- package/components/pds-icon2.js +1 -1
- package/components/pds-image.js +1 -1
- package/components/pds-input2.js +1 -1
- package/components/pds-link2.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-multiselect.js +1 -1
- package/components/pds-popover.js +1 -1
- package/components/pds-progress.js +1 -1
- package/components/pds-property.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 +1 -1
- package/components/pds-switch.js +1 -1
- package/components/pds-tab.js +1 -1
- package/components/pds-table-body.js +1 -1
- package/components/pds-table-cell2.js +1 -1
- package/components/pds-table-head-cell2.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-text2.js +1 -1
- package/components/pds-textarea.js +1 -1
- package/components/pds-toast.js +1 -1
- package/components/pds-tooltip.js +1 -1
- package/dist/cjs/{attributes-DXvaSETR.js → attributes-BJ7KBHql.js} +18 -11
- package/dist/cjs/{index-D-QQKB0y.js → index-5Azb8EQG.js} +1 -1
- package/dist/cjs/{index-BQjWfQXw.js → index-jl_Q819j.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/keep-hydrated-CiXgkEYd.js +196 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/mock-pds-modal.cjs.entry.js +3 -3
- package/dist/cjs/pds-accordion.cjs.entry.js +3 -3
- package/dist/cjs/pds-alert.cjs.entry.js +2 -2
- package/dist/cjs/pds-avatar.cjs.entry.js +3 -3
- package/dist/cjs/pds-box.cjs.entry.js +3 -3
- package/dist/cjs/pds-button.cjs.entry.js +3 -3
- package/dist/cjs/pds-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/pds-chip.cjs.entry.js +4 -4
- package/dist/cjs/pds-combobox.cjs.entry.js +156 -27
- package/dist/cjs/pds-container.cjs.entry.js +3 -3
- package/dist/cjs/pds-copytext.cjs.entry.js +5 -5
- package/dist/cjs/pds-datepicker.cjs.entry.js +5 -5
- package/dist/cjs/pds-divider.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer-content.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer-footer.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer-header.cjs.entry.js +3 -3
- package/dist/cjs/pds-drawer.cjs.entry.js +4 -4
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +3 -3
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +3 -3
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +16 -8
- package/dist/cjs/pds-filter.cjs.entry.js +4 -4
- package/dist/cjs/pds-filters.cjs.entry.js +3 -3
- package/dist/cjs/pds-icon.cjs.entry.js +27 -4
- package/dist/cjs/pds-image.cjs.entry.js +4 -4
- package/dist/cjs/pds-input.cjs.entry.js +6 -6
- package/dist/cjs/pds-link.cjs.entry.js +5 -5
- package/dist/cjs/pds-loader.cjs.entry.js +4 -4
- package/dist/cjs/pds-modal-content.cjs.entry.js +4 -4
- package/dist/cjs/pds-modal-footer.cjs.entry.js +3 -3
- package/dist/cjs/pds-modal-header.cjs.entry.js +3 -3
- package/dist/cjs/pds-modal.cjs.entry.js +5 -5
- package/dist/cjs/pds-multiselect.cjs.entry.js +6 -6
- package/dist/cjs/pds-popover.cjs.entry.js +58 -12
- package/dist/cjs/pds-progress.cjs.entry.js +4 -4
- package/dist/cjs/pds-property.cjs.entry.js +3 -3
- package/dist/cjs/pds-radio-group.cjs.entry.js +6 -6
- package/dist/cjs/pds-radio.cjs.entry.js +7 -7
- package/dist/cjs/pds-row.cjs.entry.js +4 -4
- package/dist/cjs/pds-select.cjs.entry.js +5 -5
- package/dist/cjs/pds-sortable-item.cjs.entry.js +5 -5
- package/dist/cjs/pds-sortable.cjs.entry.js +4 -4
- package/dist/cjs/pds-switch.cjs.entry.js +7 -7
- package/dist/cjs/pds-tab.cjs.entry.js +13 -2
- package/dist/cjs/pds-table-body.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-cell.cjs.entry.js +4 -4
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +5 -5
- package/dist/cjs/pds-table-head.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-row.cjs.entry.js +3 -3
- package/dist/cjs/pds-table.cjs.entry.js +2 -2
- package/dist/cjs/pds-tabpanel.cjs.entry.js +15 -3
- package/dist/cjs/pds-tabs.cjs.entry.js +111 -7
- package/dist/cjs/pds-text.cjs.entry.js +3 -3
- package/dist/cjs/pds-textarea.cjs.entry.js +8 -8
- package/dist/cjs/pds-toast.cjs.entry.js +5 -5
- package/dist/cjs/pds-tooltip.cjs.entry.js +4 -4
- package/dist/cjs/pine-core.cjs.js +3 -3
- package/dist/collection/components/pds-combobox/grouped-options-panel.js +21 -3
- package/dist/collection/components/pds-combobox/pds-combobox.css +42 -13
- package/dist/collection/components/pds-combobox/pds-combobox.js +135 -22
- package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +45 -0
- package/dist/collection/components/pds-container/pds-container.js +1 -1
- package/dist/collection/components/pds-copytext/pds-copytext.js +1 -1
- package/dist/collection/components/pds-datepicker/pds-datepicker.js +2 -2
- package/dist/collection/components/pds-divider/pds-divider.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +1 -1
- package/dist/collection/components/pds-drawer/pds-drawer.js +2 -2
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +19 -5
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +16 -5
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +1 -1
- package/dist/collection/components/pds-filters/pds-filters.js +1 -1
- package/dist/collection/components/pds-image/pds-image.js +2 -2
- package/dist/collection/components/pds-input/pds-input.js +2 -2
- package/dist/collection/components/pds-link/pds-link.js +2 -2
- package/dist/collection/components/pds-loader/pds-loader.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +2 -2
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal.js +3 -3
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +3 -3
- package/dist/collection/components/pds-popover/pds-popover.js +15 -9
- package/dist/collection/components/pds-progress/pds-progress.js +1 -1
- package/dist/collection/components/pds-property/pds-property.js +1 -1
- package/dist/collection/components/pds-radio/pds-radio.js +3 -3
- package/dist/collection/components/pds-radio-group/pds-radio-group.js +3 -3
- package/dist/collection/components/pds-row/pds-row.js +1 -1
- package/dist/collection/components/pds-select/pds-select.js +1 -1
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
- package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
- package/dist/collection/components/pds-switch/pds-switch.js +3 -3
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +2 -2
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +11 -0
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +13 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js +111 -7
- package/dist/collection/components/pds-text/pds-text.js +1 -1
- package/dist/collection/components/pds-textarea/pds-textarea.js +4 -4
- package/dist/collection/components/pds-toast/pds-toast.js +3 -3
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
- package/dist/collection/utils/attributes.js +18 -11
- package/dist/collection/utils/css.js +41 -0
- package/dist/collection/utils/keep-hydrated.js +133 -6
- package/dist/docs.json +15 -6
- package/dist/esm/{attributes-CF5K2pxn.js → attributes-WXw_I_uJ.js} +18 -11
- package/dist/esm/{index-DxI-61GK.js → index-BJXk71tO.js} +1 -1
- package/dist/esm/{index-2HMD-zUO.js → index-Cw9J31qd.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/keep-hydrated-BLG6RDBt.js +190 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/mock-pds-modal.entry.js +3 -3
- package/dist/esm/pds-accordion.entry.js +3 -3
- package/dist/esm/pds-alert.entry.js +2 -2
- package/dist/esm/pds-avatar.entry.js +3 -3
- package/dist/esm/pds-box.entry.js +3 -3
- package/dist/esm/pds-button.entry.js +3 -3
- package/dist/esm/pds-checkbox.entry.js +4 -4
- package/dist/esm/pds-chip.entry.js +4 -4
- package/dist/esm/pds-combobox.entry.js +156 -27
- package/dist/esm/pds-container.entry.js +3 -3
- package/dist/esm/pds-copytext.entry.js +5 -5
- package/dist/esm/pds-datepicker.entry.js +5 -5
- package/dist/esm/pds-divider.entry.js +3 -3
- package/dist/esm/pds-drawer-content.entry.js +3 -3
- package/dist/esm/pds-drawer-footer.entry.js +3 -3
- package/dist/esm/pds-drawer-header.entry.js +3 -3
- package/dist/esm/pds-drawer.entry.js +4 -4
- package/dist/esm/pds-dropdown-menu-item.entry.js +3 -3
- package/dist/esm/pds-dropdown-menu-separator.entry.js +3 -3
- package/dist/esm/pds-dropdown-menu.entry.js +16 -8
- package/dist/esm/pds-filter.entry.js +4 -4
- package/dist/esm/pds-filters.entry.js +3 -3
- package/dist/esm/pds-icon.entry.js +27 -4
- package/dist/esm/pds-image.entry.js +4 -4
- package/dist/esm/pds-input.entry.js +6 -6
- package/dist/esm/pds-link.entry.js +5 -5
- package/dist/esm/pds-loader.entry.js +4 -4
- package/dist/esm/pds-modal-content.entry.js +4 -4
- package/dist/esm/pds-modal-footer.entry.js +3 -3
- package/dist/esm/pds-modal-header.entry.js +3 -3
- package/dist/esm/pds-modal.entry.js +5 -5
- package/dist/esm/pds-multiselect.entry.js +6 -6
- package/dist/esm/pds-popover.entry.js +58 -12
- package/dist/esm/pds-progress.entry.js +4 -4
- package/dist/esm/pds-property.entry.js +3 -3
- package/dist/esm/pds-radio-group.entry.js +6 -6
- package/dist/esm/pds-radio.entry.js +7 -7
- package/dist/esm/pds-row.entry.js +4 -4
- package/dist/esm/pds-select.entry.js +5 -5
- package/dist/esm/pds-sortable-item.entry.js +5 -5
- package/dist/esm/pds-sortable.entry.js +4 -4
- package/dist/esm/pds-switch.entry.js +7 -7
- package/dist/esm/pds-tab.entry.js +13 -2
- package/dist/esm/pds-table-body.entry.js +3 -3
- package/dist/esm/pds-table-cell.entry.js +4 -4
- package/dist/esm/pds-table-head-cell.entry.js +5 -5
- package/dist/esm/pds-table-head.entry.js +3 -3
- package/dist/esm/pds-table-row.entry.js +3 -3
- package/dist/esm/pds-table.entry.js +2 -2
- package/dist/esm/pds-tabpanel.entry.js +15 -3
- package/dist/esm/pds-tabs.entry.js +111 -7
- package/dist/esm/pds-text.entry.js +3 -3
- package/dist/esm/pds-textarea.entry.js +8 -8
- package/dist/esm/pds-toast.entry.js +5 -5
- package/dist/esm/pds-tooltip.entry.js +4 -4
- package/dist/esm/pine-core.js +4 -4
- package/dist/esm-es5/attributes-WXw_I_uJ.js +1 -0
- package/dist/esm-es5/{index-2HMD-zUO.js → index-Cw9J31qd.js} +2 -2
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/keep-hydrated-BLG6RDBt.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/pine-core/index.esm.js +1 -1
- package/dist/pine-core/{p-9a7ee7cb.system.entry.js → p-0092444c.system.entry.js} +1 -1
- package/dist/pine-core/{p-d576e542.system.entry.js → p-01aa382c.system.entry.js} +1 -1
- package/dist/pine-core/p-01c9b8f3.entry.js +1 -0
- package/dist/pine-core/{p-d69cfaa4.entry.js → p-02088776.entry.js} +1 -1
- package/dist/pine-core/p-049f126a.entry.js +1 -0
- package/dist/pine-core/{p-8b9d8fb5.system.entry.js → p-080cb087.system.entry.js} +1 -1
- package/dist/pine-core/{p-99317375.system.entry.js → p-0913f696.system.entry.js} +1 -1
- package/dist/pine-core/{p-5737182f.entry.js → p-0a84d220.entry.js} +1 -1
- package/dist/pine-core/{p-4c9cccdb.system.entry.js → p-0b71ecb6.system.entry.js} +2 -2
- package/dist/pine-core/{p-37d73369.system.entry.js → p-1437585e.system.entry.js} +1 -1
- package/dist/pine-core/{p-22f041ee.system.entry.js → p-1ee86d87.system.entry.js} +1 -1
- package/dist/pine-core/{p-5decd81f.entry.js → p-208c7dbf.entry.js} +1 -1
- package/dist/pine-core/{p-51dff046.system.entry.js → p-258770cf.system.entry.js} +1 -1
- package/dist/pine-core/{p-1f2e5958.entry.js → p-258d5e83.entry.js} +1 -1
- package/dist/pine-core/{p-4e05a4f0.entry.js → p-26642718.entry.js} +1 -1
- package/dist/pine-core/{p-1b13f69c.system.entry.js → p-2ac2457b.system.entry.js} +1 -1
- package/dist/pine-core/p-2cb5483a.system.entry.js +1 -0
- package/dist/pine-core/{p-1f263c0b.system.entry.js → p-341c38f1.system.entry.js} +1 -1
- package/dist/pine-core/{p-bd7da23e.system.entry.js → p-3a959459.system.entry.js} +1 -1
- package/dist/pine-core/p-3c27088f.system.entry.js +1 -0
- package/dist/pine-core/{p-1e464117.entry.js → p-432d5ec7.entry.js} +1 -1
- package/dist/pine-core/{p-0de74105.entry.js → p-4849fda7.entry.js} +1 -1
- package/dist/pine-core/{p-f30d6192.system.entry.js → p-4d03d1e2.system.entry.js} +1 -1
- package/dist/pine-core/{p-2cb02706.entry.js → p-4de8f333.entry.js} +1 -1
- package/dist/pine-core/{p-152245fa.system.entry.js → p-4f94b4f1.system.entry.js} +1 -1
- package/dist/pine-core/{p-66cfef6d.system.entry.js → p-4fa63723.system.entry.js} +1 -1
- package/dist/pine-core/p-4fd454f6.entry.js +1 -0
- package/dist/pine-core/{p-70c6f0ed.system.entry.js → p-5442d983.system.entry.js} +1 -1
- package/dist/pine-core/{p-8027db25.entry.js → p-550c2fd3.entry.js} +1 -1
- package/dist/pine-core/{p-7d01e719.entry.js → p-55224683.entry.js} +1 -1
- package/dist/pine-core/{p-65e30a4c.entry.js → p-57a2f927.entry.js} +1 -1
- package/dist/pine-core/{p-721297b5.system.entry.js → p-5870b092.system.entry.js} +1 -1
- package/dist/pine-core/{p-6d83ad2d.system.entry.js → p-5c90091e.system.entry.js} +1 -1
- package/dist/pine-core/p-602c197f.entry.js +1 -0
- package/dist/pine-core/p-646afbca.system.entry.js +1 -0
- package/dist/pine-core/{p-45fcc5b7.entry.js → p-6bf853c9.entry.js} +1 -1
- package/dist/pine-core/{p-5d014059.entry.js → p-6d3610f9.entry.js} +1 -1
- package/dist/pine-core/{p-343546b1.system.entry.js → p-6eec23a7.system.entry.js} +1 -1
- package/dist/pine-core/{p-5132b8a1.entry.js → p-72865997.entry.js} +1 -1
- package/dist/pine-core/{p-9d33bb05.entry.js → p-73eb47fa.entry.js} +1 -1
- package/dist/pine-core/p-75ee0403.entry.js +1 -0
- package/dist/pine-core/p-77395d62.system.entry.js +1 -0
- package/dist/pine-core/p-7a287635.system.entry.js +1 -0
- package/dist/pine-core/p-7a5b21d2.system.entry.js +1 -0
- package/dist/pine-core/{p-a83a6618.system.entry.js → p-7bf6563a.system.entry.js} +1 -1
- package/dist/pine-core/{p-347ae53c.system.entry.js → p-7f367db4.system.entry.js} +1 -1
- package/dist/pine-core/{p-71e3a89e.system.entry.js → p-8191498f.system.entry.js} +1 -1
- package/dist/pine-core/{p-0166c620.entry.js → p-82cf4ec6.entry.js} +1 -1
- package/dist/pine-core/{p-16c2aa63.entry.js → p-84e9b7da.entry.js} +1 -1
- package/dist/pine-core/{p-bdf68e53.system.entry.js → p-86040cac.system.entry.js} +1 -1
- package/dist/pine-core/p-875b0436.system.entry.js +1 -0
- package/dist/pine-core/{p-87f91e02.system.entry.js → p-8c8cc079.system.entry.js} +1 -1
- package/dist/pine-core/{p-ba1b79c7.system.entry.js → p-8cc302aa.system.entry.js} +1 -1
- package/dist/pine-core/{p-5b7f7760.entry.js → p-8d292b48.entry.js} +1 -1
- package/dist/pine-core/{p-650ccffb.entry.js → p-8f531063.entry.js} +1 -1
- package/dist/pine-core/p-9109b90a.entry.js +1 -0
- package/dist/pine-core/p-94593f20.system.entry.js +1 -0
- package/dist/pine-core/{p-04fe5da7.system.entry.js → p-9880d251.system.entry.js} +1 -1
- package/dist/pine-core/p-99459e27.entry.js +1 -0
- package/dist/pine-core/{p-4414d442.system.entry.js → p-9a0083dd.system.entry.js} +1 -1
- package/dist/pine-core/{p-9835c74b.entry.js → p-9ab95438.entry.js} +1 -1
- package/dist/pine-core/{p-a6d09102.system.entry.js → p-9af131d6.system.entry.js} +1 -1
- package/dist/pine-core/{p-59491f98.entry.js → p-9dcd2cdb.entry.js} +1 -1
- package/dist/pine-core/{p-c00e46a5.system.entry.js → p-9e0f920a.system.entry.js} +1 -1
- package/dist/pine-core/p-BGLP3keB.js +1 -0
- package/dist/pine-core/p-BLG6RDBt.js +1 -0
- package/dist/pine-core/p-BR5nujVX.system.js +1 -0
- package/dist/pine-core/{p-BJlg6wq7.system.js → p-CGRdQc49.system.js} +2 -2
- package/dist/pine-core/{p-DeIDZHrg.js → p-CmSJytt1.js} +2 -2
- package/dist/pine-core/p-CuSNnuFu.system.js +1 -0
- package/dist/pine-core/{p-YQa3CeL9.system.js → p-Cy8cvR7I.system.js} +1 -1
- package/dist/pine-core/p-XW4H0W6i.system.js +1 -0
- package/dist/pine-core/p-a0960b3d.system.entry.js +1 -0
- package/dist/pine-core/p-a1230a74.system.entry.js +1 -0
- package/dist/pine-core/{p-fbea5703.entry.js → p-a19cd59c.entry.js} +1 -1
- package/dist/pine-core/p-a3735199.entry.js +1 -0
- package/dist/pine-core/p-a826f290.entry.js +1 -0
- package/dist/pine-core/{p-1ec4eeaf.system.entry.js → p-a85a6ab9.system.entry.js} +1 -1
- package/dist/pine-core/p-acce8eb2.entry.js +1 -0
- package/dist/pine-core/p-b1548a20.entry.js +1 -0
- package/dist/pine-core/{p-93877d4a.entry.js → p-b69f04b7.entry.js} +1 -1
- package/dist/pine-core/p-b75b0d09.system.entry.js +1 -0
- package/dist/pine-core/{p-02857936.entry.js → p-b8e8a4ce.entry.js} +1 -1
- package/dist/pine-core/{p-622e91e3.entry.js → p-b914dde8.entry.js} +2 -2
- package/dist/pine-core/{p-5bc670be.system.entry.js → p-ba1f65c2.system.entry.js} +1 -1
- package/dist/pine-core/p-bb68431a.entry.js +1 -0
- package/dist/pine-core/{p-c8e89b61.system.entry.js → p-bd67156b.system.entry.js} +1 -1
- package/dist/pine-core/{p-db4319fd.entry.js → p-beb23781.entry.js} +1 -1
- package/dist/pine-core/p-bf30dec0.entry.js +1 -0
- package/dist/pine-core/{p-91f712f4.system.entry.js → p-bf7ee3b7.system.entry.js} +1 -1
- package/dist/pine-core/{p-b5838211.system.entry.js → p-c5c9ed36.system.entry.js} +1 -1
- package/dist/pine-core/{p-21115986.system.entry.js → p-cb6a3e4c.system.entry.js} +1 -1
- package/dist/pine-core/{p-1cf1fced.entry.js → p-cde8eb81.entry.js} +1 -1
- package/dist/pine-core/{p-1d75a9b1.system.entry.js → p-cf08a6dd.system.entry.js} +1 -1
- package/dist/pine-core/p-cfd012d4.entry.js +1 -0
- package/dist/pine-core/{p-5e8d73d4.entry.js → p-d2c91e7a.entry.js} +1 -1
- package/dist/pine-core/{p-7e115d33.system.entry.js → p-da103a54.system.entry.js} +1 -1
- package/dist/pine-core/{p-7bbfb965.system.entry.js → p-db17c626.system.entry.js} +1 -1
- package/dist/pine-core/p-df539c42.system.entry.js +3 -0
- package/dist/pine-core/p-e0917a26.entry.js +1 -0
- package/dist/pine-core/p-e5420660.entry.js +1 -0
- package/dist/pine-core/{p-585832b1.entry.js → p-e800a2b1.entry.js} +1 -1
- package/dist/pine-core/{p-8b0fbeb3.entry.js → p-e836a041.entry.js} +1 -1
- package/dist/pine-core/{p-506d3e80.entry.js → p-e8cb76e8.entry.js} +1 -1
- package/dist/pine-core/p-ea4d4741.system.entry.js +1 -0
- package/dist/pine-core/{p-419f57c9.entry.js → p-eb5465ce.entry.js} +1 -1
- package/dist/pine-core/{p-63119d23.entry.js → p-ebd0bff2.entry.js} +1 -1
- package/dist/pine-core/p-ec5428fb.entry.js +1 -0
- package/dist/pine-core/{p-4e67e68e.entry.js → p-ed4b979e.entry.js} +1 -1
- package/dist/pine-core/p-f029b7da.system.entry.js +1 -0
- package/dist/pine-core/{p-e337f32c.system.entry.js → p-f0d24298.system.entry.js} +1 -1
- package/dist/pine-core/{p-9b9f66b7.entry.js → p-f1702281.entry.js} +1 -1
- package/dist/pine-core/p-f1f17940.entry.js +2 -0
- package/dist/pine-core/{p-238e5171.system.entry.js → p-f25e4731.system.entry.js} +1 -1
- package/dist/pine-core/{p-37d95be9.entry.js → p-f2c253d8.entry.js} +1 -1
- package/dist/pine-core/{p-a22091c4.system.entry.js → p-f77905aa.system.entry.js} +1 -1
- package/dist/pine-core/{p-bef04e15.system.entry.js → p-fc25b956.system.entry.js} +1 -1
- package/dist/pine-core/{p-f06ca8df.entry.js → p-ff3de72e.entry.js} +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/pine-core/pine-core.js +1 -1
- package/dist/types/components/pds-combobox/combobox-interface.d.ts +8 -1
- package/dist/types/components/pds-combobox/grouped-options-panel.d.ts +7 -1
- package/dist/types/components/pds-combobox/pds-combobox.d.ts +31 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +4 -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 +14 -2
- package/dist/types/components.d.ts +5 -5
- package/dist/types/utils/attributes.d.ts +2 -2
- package/dist/types/utils/css.d.ts +7 -0
- package/dist/types/utils/keep-hydrated.d.ts +29 -2
- package/dist/vscode.html-data.json +2 -2
- package/hydrate/index.js +604 -135
- package/hydrate/index.mjs +604 -135
- package/package.json +2 -2
- package/dist/cjs/keep-hydrated-iLS88j1Z.js +0 -67
- package/dist/esm/keep-hydrated-Dv7ssOTc.js +0 -63
- package/dist/esm-es5/attributes-CF5K2pxn.js +0 -1
- package/dist/esm-es5/keep-hydrated-Dv7ssOTc.js +0 -1
- package/dist/pine-core/p-1cd0acf0.system.entry.js +0 -1
- package/dist/pine-core/p-207c94da.entry.js +0 -1
- package/dist/pine-core/p-2357758d.system.entry.js +0 -1
- package/dist/pine-core/p-281efc69.entry.js +0 -1
- package/dist/pine-core/p-2ac9e90a.system.entry.js +0 -1
- package/dist/pine-core/p-2f539379.system.entry.js +0 -3
- package/dist/pine-core/p-34b575b6.entry.js +0 -2
- package/dist/pine-core/p-3b1d8fae.entry.js +0 -1
- package/dist/pine-core/p-539ef98c.entry.js +0 -1
- package/dist/pine-core/p-56576b6e.entry.js +0 -1
- package/dist/pine-core/p-5ac84b2f.entry.js +0 -1
- package/dist/pine-core/p-63854c10.system.entry.js +0 -1
- package/dist/pine-core/p-73bc6e9f.system.entry.js +0 -1
- package/dist/pine-core/p-798839f7.system.entry.js +0 -1
- package/dist/pine-core/p-834c678e.system.entry.js +0 -1
- package/dist/pine-core/p-912487fa.entry.js +0 -1
- package/dist/pine-core/p-969488f5.system.entry.js +0 -1
- package/dist/pine-core/p-9bcdfac2.entry.js +0 -1
- package/dist/pine-core/p-BMFBF3sJ.system.js +0 -1
- package/dist/pine-core/p-D2MUS7JO.js +0 -1
- package/dist/pine-core/p-D2yHYrxQ.system.js +0 -1
- package/dist/pine-core/p-Dv7ssOTc.js +0 -1
- package/dist/pine-core/p-TyevV8iv.system.js +0 -1
- package/dist/pine-core/p-afd5e2d7.entry.js +0 -1
- package/dist/pine-core/p-bde53290.system.entry.js +0 -1
- package/dist/pine-core/p-bf1aea9f.system.entry.js +0 -1
- package/dist/pine-core/p-c9395f43.system.entry.js +0 -1
- package/dist/pine-core/p-d5dd5599.entry.js +0 -1
- package/dist/pine-core/p-dc81ffff.entry.js +0 -1
- package/dist/pine-core/p-e46f7541.system.entry.js +0 -1
- package/dist/pine-core/p-e7ba30dd.system.entry.js +0 -1
- package/dist/pine-core/p-ed3dd3d2.entry.js +0 -1
- package/dist/pine-core/p-eee4f146.entry.js +0 -1
- package/dist/pine-core/p-f01e35e2.entry.js +0 -1
- package/dist/pine-core/p-f2e0da9a.entry.js +0 -1
- package/dist/pine-core/p-fc6ac917.entry.js +0 -1
- package/dist/pine-core/p-ffe276ef.entry.js +0 -1
- /package/dist/esm-es5/{index-DxI-61GK.js → index-BJXk71tO.js} +0 -0
- /package/dist/pine-core/{p-DxI-61GK.js → p-BJXk71tO.js} +0 -0
- /package/dist/pine-core/{p-CnO10OxH.system.js → p-n3_ytl_p.system.js} +0 -0
|
@@ -4,7 +4,7 @@ import { autoUpdate, computePosition, flip, offset, shift } from "@floating-ui/d
|
|
|
4
4
|
import { cancelDebouncedEvent, debounceEvent, flushDebouncedEvent } from "../../utils/utils";
|
|
5
5
|
import { closest } from "../../utils/closest";
|
|
6
6
|
import DOMPurify from "dompurify";
|
|
7
|
-
import { FlyoutController, buildPanelEntries, findGroup, groupIconOf, groupLabelOf, isGroupDisabled, isOptionDisabled, panelColumn, parentOptgroupOf, } from "./grouped-options-panel";
|
|
7
|
+
import { FlyoutController, buildPanelEntries, findGroup, groupIconOf, groupLabelOf, isGroupDisabled, isOptionDisabled, optionIconOf, panelColumn, parentOptgroupOf, } from "./grouped-options-panel";
|
|
8
8
|
/**
|
|
9
9
|
* @slot option - Option elements for the combobox dropdown
|
|
10
10
|
* @slot trigger-content - Custom content for the button trigger when customTriggerContent is true
|
|
@@ -207,6 +207,17 @@ export class PdsCombobox {
|
|
|
207
207
|
this.highlightedGroup = null;
|
|
208
208
|
/** The keys, not the pointer, moved the highlight last; the focus ring shows only then. */
|
|
209
209
|
this.keyboardNavigating = false;
|
|
210
|
+
/**
|
|
211
|
+
* A drill-in group row the first arrow showed rather than moved past. `aria-activedescendant`
|
|
212
|
+
* already pointed at it, so the status region says it instead.
|
|
213
|
+
*/
|
|
214
|
+
this.revealedGroupLabel = null;
|
|
215
|
+
/**
|
|
216
|
+
* The pointer in the panel can hover: a mouse or pen, not touch. Touch browsers keep a tapped row
|
|
217
|
+
* hovered, so group rows shade on `:hover` only for a pointer that can hover. Checked on the
|
|
218
|
+
* pointer itself rather than `(hover: hover)`, which a touch-first device with a trackpad fails.
|
|
219
|
+
*/
|
|
220
|
+
this.pointerCanHover = true;
|
|
210
221
|
/**
|
|
211
222
|
* What's typed in the dropdown's own search field (`panelSearch`).
|
|
212
223
|
*/
|
|
@@ -251,6 +262,11 @@ export class PdsCombobox {
|
|
|
251
262
|
});
|
|
252
263
|
/** The groups in the flyout panel's last render, so a row's index finds its optgroup. */
|
|
253
264
|
this.renderedGroups = [];
|
|
265
|
+
/**
|
|
266
|
+
* Where each ungrouped option and optgroup built from the `options` prop came in the data, so
|
|
267
|
+
* the flyout and drill-in panels draw them in that order. Slotted markup is already in order.
|
|
268
|
+
*/
|
|
269
|
+
this.panelPositions = new WeakMap();
|
|
254
270
|
/** Room for a flyout was checked for this open. */
|
|
255
271
|
this.flyoutRoomChecked = false;
|
|
256
272
|
/** The highlighted option sits in a flyout that hasn't rendered yet; focus it after the next render. */
|
|
@@ -264,10 +280,14 @@ export class PdsCombobox {
|
|
|
264
280
|
* the list shows every option until the user types (then normal filtering applies).
|
|
265
281
|
*/
|
|
266
282
|
this.expandFilterListWhileOpen = false;
|
|
283
|
+
this.onPanelPointer = (event) => {
|
|
284
|
+
const canHover = event.pointerType !== 'touch';
|
|
285
|
+
if (this.pointerCanHover !== canHover)
|
|
286
|
+
this.pointerCanHover = canHover;
|
|
287
|
+
};
|
|
267
288
|
this.onDrillAnimationEnd = (event) => {
|
|
268
|
-
var _a;
|
|
269
289
|
// Only the slide's own end: slotted consumer content can animate inside the list too.
|
|
270
|
-
if (
|
|
290
|
+
if (event.animationName === 'pds-combobox-drill')
|
|
271
291
|
this.drillDirection = null;
|
|
272
292
|
};
|
|
273
293
|
/** `<label for>` only works on the input trigger; for a div trigger a click on the label focuses it. */
|
|
@@ -686,6 +706,31 @@ export class PdsCombobox {
|
|
|
686
706
|
this.focusPanel(panelFocusEl);
|
|
687
707
|
}
|
|
688
708
|
}
|
|
709
|
+
/**
|
|
710
|
+
* Scrolls just enough to show `el`, as `scrollIntoView({ block: 'nearest' })` does. In the drill-in
|
|
711
|
+
* panel it scrolls the list alone, and never sideways: while a drill-in slide offsets a row past
|
|
712
|
+
* the list's edge, `scrollIntoView` also scrolls the list horizontally to reach it, which eats most
|
|
713
|
+
* of the slide. There it keeps clear of the sticky row back, through the scroll padding set for it,
|
|
714
|
+
* but doesn't scroll the page or a scrolling ancestor.
|
|
715
|
+
*/
|
|
716
|
+
scrollIntoViewNearest(el, smooth) {
|
|
717
|
+
const behavior = smooth ? 'smooth' : 'auto';
|
|
718
|
+
if (!this.showsGroupedPanel || this.effectiveGroupDisplay !== 'drill-in') {
|
|
719
|
+
el.scrollIntoView({ block: 'nearest', behavior });
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
const list = this.usesPanelSearch ? this.panelTreeEl : this.listboxEl;
|
|
723
|
+
if (!list)
|
|
724
|
+
return;
|
|
725
|
+
const offset = el.getBoundingClientRect().top - list.getBoundingClientRect().top - list.clientTop;
|
|
726
|
+
// The padding keeps rows clear of the sticky row back; the row back itself doesn't need it.
|
|
727
|
+
const padding = el.classList.contains('pds-combobox__group-back-trigger') ? 0 : parseFloat(list.style.scrollPaddingBlockStart) || 0;
|
|
728
|
+
const top = list.scrollTop + offset - padding;
|
|
729
|
+
const bottom = list.scrollTop + offset + el.offsetHeight - list.clientHeight;
|
|
730
|
+
const target = top < list.scrollTop ? top : bottom > list.scrollTop ? bottom : null;
|
|
731
|
+
if (target !== null)
|
|
732
|
+
list.scrollTo({ top: target, behavior });
|
|
733
|
+
}
|
|
689
734
|
focusPanel(el) {
|
|
690
735
|
var _a, _b;
|
|
691
736
|
this.panelFocusEl = el;
|
|
@@ -706,6 +751,7 @@ export class PdsCombobox {
|
|
|
706
751
|
}
|
|
707
752
|
openGroupChanged(next, previous) {
|
|
708
753
|
this.handPanelFocusToList();
|
|
754
|
+
this.revealedGroupLabel = null;
|
|
709
755
|
// Only moves between the drill-in panel's views slide; search results don't.
|
|
710
756
|
if (!this.isOpen || this.effectiveGroupDisplay !== 'drill-in' || !this.showsGroupedPanel)
|
|
711
757
|
return;
|
|
@@ -728,6 +774,7 @@ export class PdsCombobox {
|
|
|
728
774
|
}
|
|
729
775
|
isOpenChanged(isOpen) {
|
|
730
776
|
if (!isOpen) {
|
|
777
|
+
this.revealedGroupLabel = null;
|
|
731
778
|
this.drillDirection = null;
|
|
732
779
|
this.openGroup = null;
|
|
733
780
|
this.highlightedGroup = null;
|
|
@@ -1006,20 +1053,25 @@ export class PdsCombobox {
|
|
|
1006
1053
|
// slotted markup would be, so grouping, filtering and labels work the same either way. Each
|
|
1007
1054
|
// group is listed where it first appears with all of its options, even when the data
|
|
1008
1055
|
// interleaves groups, so an option never renders under another group's label. Ungrouped
|
|
1009
|
-
// options come first, so none reads as part of the group above it.
|
|
1056
|
+
// options come first, so none reads as part of the group above it. The flyout and drill-in
|
|
1057
|
+
// panels draw groups as rows, where that can't happen, so they keep the data's order instead.
|
|
1010
1058
|
const asyncOptions = this.options || this.internalOptions;
|
|
1011
1059
|
const groups = new Map();
|
|
1012
1060
|
const ungrouped = [];
|
|
1013
1061
|
const groupEntries = [];
|
|
1014
|
-
|
|
1062
|
+
this.panelPositions = new WeakMap();
|
|
1063
|
+
asyncOptions.forEach((opt, position) => {
|
|
1015
1064
|
const optionEl = document.createElement('option');
|
|
1016
1065
|
optionEl.value = String(opt.id);
|
|
1017
1066
|
optionEl.textContent = opt.text;
|
|
1018
1067
|
if (opt.disabled === true)
|
|
1019
1068
|
optionEl.setAttribute('disabled', '');
|
|
1020
1069
|
// Only strings group an option or name an icon; anything else from JS is ignored, not coerced.
|
|
1070
|
+
if (typeof opt.icon === 'string' && opt.icon !== '')
|
|
1071
|
+
optionEl.setAttribute('data-icon', opt.icon);
|
|
1021
1072
|
if (typeof opt.group !== 'string' || opt.group === '') {
|
|
1022
1073
|
ungrouped.push(optionEl);
|
|
1074
|
+
this.panelPositions.set(optionEl, position);
|
|
1023
1075
|
return;
|
|
1024
1076
|
}
|
|
1025
1077
|
let optgroup = groups.get(opt.group);
|
|
@@ -1028,6 +1080,7 @@ export class PdsCombobox {
|
|
|
1028
1080
|
optgroup.label = opt.group;
|
|
1029
1081
|
groups.set(opt.group, optgroup);
|
|
1030
1082
|
groupEntries.push(optgroup);
|
|
1083
|
+
this.panelPositions.set(optgroup, position);
|
|
1031
1084
|
}
|
|
1032
1085
|
if (!optgroup.hasAttribute('data-icon') && typeof opt.groupIcon === 'string' && opt.groupIcon !== '') {
|
|
1033
1086
|
optgroup.setAttribute('data-icon', opt.groupIcon);
|
|
@@ -1493,6 +1546,7 @@ export class PdsCombobox {
|
|
|
1493
1546
|
handleGroupedPanelKey(e) {
|
|
1494
1547
|
if (!this.showsGroupedPanel)
|
|
1495
1548
|
return false;
|
|
1549
|
+
const highlightShown = this.keyboardNavigating;
|
|
1496
1550
|
this.keyboardNavigating = true;
|
|
1497
1551
|
// In the input trigger, Left and Right still move the caret through typed text, and Space,
|
|
1498
1552
|
// Home and End edit it, as they do in the panel's search field.
|
|
@@ -1502,23 +1556,32 @@ export class PdsCombobox {
|
|
|
1502
1556
|
if (e.key === ' ' || e.key === 'Home' || e.key === 'End')
|
|
1503
1557
|
return false;
|
|
1504
1558
|
}
|
|
1505
|
-
const entries =
|
|
1559
|
+
const entries = this.panelEntries();
|
|
1506
1560
|
const drilledIn = this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null;
|
|
1507
1561
|
const current = this.currentPanelItem();
|
|
1508
1562
|
const column = panelColumn(entries, this.openGroup, current, drilledIn);
|
|
1509
1563
|
if (column.length === 0)
|
|
1510
1564
|
return false;
|
|
1511
1565
|
const position = current === null ? -1 : column.indexOf(current);
|
|
1566
|
+
// Drill-in doesn't shade a group row the pointer or a click-open highlighted, so the first Up or
|
|
1567
|
+
// Down shows that row rather than moving past one the user never saw.
|
|
1568
|
+
const unseenRow = !highlightShown && this.effectiveGroupDisplay === 'drill-in' && current !== null && typeof current !== 'number' && current !== this.openGroup;
|
|
1512
1569
|
const moveTo = (to) => {
|
|
1513
1570
|
e.preventDefault();
|
|
1514
1571
|
this.highlightPanelItem(column[Math.max(0, Math.min(column.length - 1, to))]);
|
|
1572
|
+
this.revealedGroupLabel = null;
|
|
1573
|
+
return true;
|
|
1574
|
+
};
|
|
1575
|
+
const reveal = () => {
|
|
1576
|
+
e.preventDefault();
|
|
1577
|
+
this.revealedGroupLabel = current.label;
|
|
1515
1578
|
return true;
|
|
1516
1579
|
};
|
|
1517
1580
|
switch (e.key) {
|
|
1518
1581
|
case 'ArrowDown':
|
|
1519
|
-
return moveTo(position < 0 ? 0 : position + 1);
|
|
1582
|
+
return unseenRow ? reveal() : moveTo(position < 0 ? 0 : position + 1);
|
|
1520
1583
|
case 'ArrowUp':
|
|
1521
|
-
return moveTo(position < 0 ? column.length - 1 : position - 1);
|
|
1584
|
+
return unseenRow ? reveal() : moveTo(position < 0 ? column.length - 1 : position - 1);
|
|
1522
1585
|
case 'Home':
|
|
1523
1586
|
return moveTo(0);
|
|
1524
1587
|
case 'End':
|
|
@@ -1651,7 +1714,7 @@ export class PdsCombobox {
|
|
|
1651
1714
|
// In the grouped panel, the first row with something to choose: a group stays closed until
|
|
1652
1715
|
// it's opened.
|
|
1653
1716
|
if (this.showsGroupedPanel) {
|
|
1654
|
-
const first =
|
|
1717
|
+
const first = this.panelEntries().find(entry => entry.kind === 'group' ? !isGroupDisabled(entry.group) : !isOptionDisabled(entry.option));
|
|
1655
1718
|
this.highlightedIndex = (first === null || first === void 0 ? void 0 : first.kind) === 'option' ? first.index : -1;
|
|
1656
1719
|
this.highlightedGroup = (first === null || first === void 0 ? void 0 : first.kind) === 'group' ? first.group.optgroup : null;
|
|
1657
1720
|
return;
|
|
@@ -1716,8 +1779,13 @@ export class PdsCombobox {
|
|
|
1716
1779
|
}
|
|
1717
1780
|
// Matched by id, not a selector: componentId is consumer text and may not be selector-safe.
|
|
1718
1781
|
const id = this.groupDomId(groupRow);
|
|
1719
|
-
|
|
1720
|
-
.find(
|
|
1782
|
+
const row = Array.from(this.listboxEl.querySelectorAll('[role="treeitem"]'))
|
|
1783
|
+
.find(item => item.id === id);
|
|
1784
|
+
// The row's trigger, not its item: the row back's item wraps the group's options, and showing
|
|
1785
|
+
// all of a group taller than the list would scroll the row back itself out of view.
|
|
1786
|
+
const trigger = Array.from((_a = row === null || row === void 0 ? void 0 : row.children) !== null && _a !== void 0 ? _a : []).find(child => child.classList.contains('pds-combobox__group-row-trigger'));
|
|
1787
|
+
if (trigger)
|
|
1788
|
+
this.scrollIntoViewNearest(trigger, false);
|
|
1721
1789
|
this.updateAriaActiveDescendant();
|
|
1722
1790
|
return;
|
|
1723
1791
|
}
|
|
@@ -1768,7 +1836,7 @@ export class PdsCombobox {
|
|
|
1768
1836
|
this.flyout.reveal(flyout, currentOption);
|
|
1769
1837
|
}
|
|
1770
1838
|
else {
|
|
1771
|
-
|
|
1839
|
+
this.scrollIntoViewNearest(currentOption, true);
|
|
1772
1840
|
}
|
|
1773
1841
|
}
|
|
1774
1842
|
// Always update aria-activedescendant on the trigger element
|
|
@@ -1865,6 +1933,8 @@ export class PdsCombobox {
|
|
|
1865
1933
|
this.highlightedIndex = -1;
|
|
1866
1934
|
this.highlightedGroup = group;
|
|
1867
1935
|
this.keyboardNavigating = false;
|
|
1936
|
+
// So revealing this row again later is announced again.
|
|
1937
|
+
this.revealedGroupLabel = null;
|
|
1868
1938
|
}
|
|
1869
1939
|
// Get the label of the selected option
|
|
1870
1940
|
get selectedLabel() {
|
|
@@ -2020,7 +2090,8 @@ export class PdsCombobox {
|
|
|
2020
2090
|
'pds-combobox__listbox--grouped': this.groupDisplay !== 'inline',
|
|
2021
2091
|
'pds-combobox__listbox--drill-in': this.drillDirection === 'in',
|
|
2022
2092
|
'pds-combobox__listbox--drill-out': this.drillDirection === 'out',
|
|
2023
|
-
|
|
2093
|
+
'pds-combobox__listbox--pointer-hover': this.pointerCanHover,
|
|
2094
|
+
}, onAnimationEnd: this.onDrillAnimationEnd, onPointerMove: this.onPanelPointer, onPointerDown: this.onPanelPointer, role: this.showsGroupedPanel ? 'tree' : 'listbox', id: this.listboxId, "aria-label": this.label || 'Options', "aria-multiselectable": "false",
|
|
2024
2095
|
// Focusable but out of the tab order with panel search, so it can take focus when a
|
|
2025
2096
|
// drilled-in group hides the field. Dropping it while focused would blur the list and close.
|
|
2026
2097
|
tabIndex: withSearch ? -1 : undefined, "aria-activedescendant": listTakesFocus ? this.activeDescendantId : undefined, onKeyDown: withSearch ? this.onPanelTreeKeyDown : undefined, ref: el => {
|
|
@@ -2186,7 +2257,21 @@ export class PdsCombobox {
|
|
|
2186
2257
|
'pds-combobox__option--layout': isLayout,
|
|
2187
2258
|
'pds-combobox__option--chip': isChip,
|
|
2188
2259
|
'pds-combobox__option--disabled': isDisabled,
|
|
2189
|
-
}, "data-option-index": index, onMouseDown: this.onOptionMouseDown, onClick: this.onOptionClick, onMouseEnter: this.onOptionMouseEnter, onKeyDown: this.onOptionKeyDown }, isLayout ? (h("pds-box", { class: "pds-combobox__option-layout-wrapper", innerHTML: this.getOptionLayoutContent(option) })) : isChip ? (this.renderOptionChip(option)) : (this.
|
|
2260
|
+
}, "data-option-index": index, onMouseDown: this.onOptionMouseDown, onClick: this.onOptionClick, onMouseEnter: this.onOptionMouseEnter, onKeyDown: this.onOptionKeyDown }, isLayout ? (h("pds-box", { class: "pds-combobox__option-layout-wrapper", innerHTML: this.getOptionLayoutContent(option) })) : isChip ? (this.renderOptionChip(option)) : (this.renderOptionLabel(option)), isSelected && h("pds-icon", { icon: "check", size: "regular", class: "pds-combobox__option-check" })));
|
|
2261
|
+
}
|
|
2262
|
+
/** An option's text, after its `data-icon` when it has one. */
|
|
2263
|
+
renderOptionLabel(option) {
|
|
2264
|
+
const icon = optionIconOf(option);
|
|
2265
|
+
if (icon === null)
|
|
2266
|
+
return this.getOptionLabel(option);
|
|
2267
|
+
return (h("span", { class: "pds-combobox__option-label" }, h("pds-icon", { name: icon, size: "regular", "aria-hidden": "true", class: "pds-combobox__option-icon" }), this.getOptionLabel(option)));
|
|
2268
|
+
}
|
|
2269
|
+
/** The grouped panel's rows, in the order the panel draws them and the keyboard moves through. */
|
|
2270
|
+
panelEntries() {
|
|
2271
|
+
// Slotted markup is already in order; only options from data record positions.
|
|
2272
|
+
if (this.options === undefined && !this.asyncUrl)
|
|
2273
|
+
return buildPanelEntries(this.filteredItems);
|
|
2274
|
+
return buildPanelEntries(this.filteredItems, element => this.panelPositions.get(element));
|
|
2190
2275
|
}
|
|
2191
2276
|
/**
|
|
2192
2277
|
* `flyout`: one row per group, its options in a flyout beside it. `drill-in`: the same rows, and
|
|
@@ -2194,7 +2279,7 @@ export class PdsCombobox {
|
|
|
2194
2279
|
* it's a tree: the rows and ungrouped options are level 1, a group's options level 2.
|
|
2195
2280
|
*/
|
|
2196
2281
|
renderGroupedPanel() {
|
|
2197
|
-
const entries =
|
|
2282
|
+
const entries = this.panelEntries();
|
|
2198
2283
|
const setsize = entries.length;
|
|
2199
2284
|
if (this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null) {
|
|
2200
2285
|
const position = entries.findIndex(entry => entry.kind === 'group' && entry.group.optgroup === this.openGroup);
|
|
@@ -2225,22 +2310,26 @@ export class PdsCombobox {
|
|
|
2225
2310
|
return (h("li", { key: "group-back", id: id, class: {
|
|
2226
2311
|
'pds-combobox__group-back': true,
|
|
2227
2312
|
'pds-combobox__group-back--disabled': disabled,
|
|
2228
|
-
|
|
2313
|
+
// As the group rows: shaded for the keys, and by `:hover` for the pointer.
|
|
2314
|
+
'pds-combobox__group-back--highlighted': this.keyboardNavigating && this.highlightedGroupRow === group.optgroup,
|
|
2229
2315
|
'pds-combobox__group-back--keyboard': this.keyboardNavigating && this.highlightedGroupRow === group.optgroup,
|
|
2230
2316
|
}, role: "treeitem", "aria-expanded": "true", "aria-disabled": disabled ? 'true' : undefined, "aria-level": 1, "aria-posinset": posinset, "aria-setsize": setsize, "aria-labelledby": `${id}-label` }, h("div", { class: "pds-combobox__group-row-trigger pds-combobox__group-back-trigger", onMouseDown: this.onOptionMouseDown, onMouseEnter: this.onGroupBackMouseEnter, onClick: this.onGroupBackClick }, h("span", { class: "pds-combobox__group-row-label", id: `${id}-label` }, h("pds-icon", { name: "caret-left", size: "regular", "aria-hidden": "true", class: "pds-combobox__group-row-caret" }), h("span", { class: "visually-hidden" }, this.drillInBackLabel, ": "), group.label)), h("ul", { class: "pds-combobox__drill-in-options", role: "group", "aria-label": group.label }, this.renderGroupOptions(group))));
|
|
2231
2317
|
}
|
|
2232
2318
|
renderGroupRow(group, groupIndex, { posinset, setsize }) {
|
|
2233
2319
|
const flyout = this.effectiveGroupDisplay === 'flyout';
|
|
2234
2320
|
const isOpen = flyout && this.openGroup === group.optgroup;
|
|
2235
|
-
|
|
2321
|
+
// Drill-in shades a group row only for the keys: not for the group holding the selection, or the
|
|
2322
|
+
// row the pointer or a click-open left highlighted, which read as picked. `:hover` covers the pointer.
|
|
2323
|
+
const hasSelection = flyout && group.options.some(({ option }) => this.isOptionSelected(option));
|
|
2324
|
+
const isCurrent = this.highlightedGroupRow === group.optgroup;
|
|
2236
2325
|
const disabled = isGroupDisabled(group);
|
|
2237
2326
|
const id = this.groupDomId(group.optgroup);
|
|
2238
2327
|
return (h("li", { key: `group-${groupIndex}`, id: id, class: {
|
|
2239
2328
|
'pds-combobox__group-row': true,
|
|
2240
2329
|
'pds-combobox__group-row--open': isOpen,
|
|
2241
2330
|
'pds-combobox__group-row--has-selection': hasSelection,
|
|
2242
|
-
'pds-combobox__group-row--highlighted':
|
|
2243
|
-
'pds-combobox__group-row--keyboard':
|
|
2331
|
+
'pds-combobox__group-row--highlighted': isCurrent && (flyout || this.keyboardNavigating),
|
|
2332
|
+
'pds-combobox__group-row--keyboard': isCurrent && this.keyboardNavigating,
|
|
2244
2333
|
'pds-combobox__group-row--disabled': disabled,
|
|
2245
2334
|
}, role: "treeitem", "aria-expanded": isOpen ? 'true' : 'false', "aria-disabled": disabled ? 'true' : undefined, "aria-level": 1, "aria-posinset": posinset, "aria-setsize": setsize, "aria-labelledby": `${id}-label`, "data-group-index": groupIndex, onMouseEnter: flyout ? this.onGroupRowMouseEnter : undefined, onMouseLeave: flyout ? this.onGroupRowMouseLeave : undefined }, h("div", { class: "pds-combobox__group-row-trigger", "data-group-index": groupIndex, onMouseDown: this.onOptionMouseDown, onMouseEnter: this.onGroupRowTriggerMouseEnter, onClick: this.onGroupRowClick }, h("span", { class: "pds-combobox__group-row-label", id: `${id}-label` }, group.icon !== null && (
|
|
2246
2335
|
// `name`, not `icon`: `icon` also loads URLs and data: SVGs, unsanitized.
|
|
@@ -2256,7 +2345,23 @@ export class PdsCombobox {
|
|
|
2256
2345
|
}
|
|
2257
2346
|
// Helper method to render default text content
|
|
2258
2347
|
renderDefaultContent() {
|
|
2259
|
-
|
|
2348
|
+
const icon = this.selectedIcon;
|
|
2349
|
+
return (h("span", { class: {
|
|
2350
|
+
'pds-combobox__button-trigger-label': true,
|
|
2351
|
+
'pds-combobox__button-trigger-label--placeholder': !this.selectedLabel,
|
|
2352
|
+
'pds-combobox__button-trigger-label--with-icon': icon !== null,
|
|
2353
|
+
} }, icon !== null && (
|
|
2354
|
+
// `name`, not `icon`: `icon` also loads URLs and data: SVGs, unsanitized.
|
|
2355
|
+
h("pds-icon", { name: icon, size: "regular", "aria-hidden": "true", class: "pds-combobox__button-trigger-icon" })), this.selectedLabel || this.placeholder));
|
|
2356
|
+
}
|
|
2357
|
+
/** The selection's icon for the button trigger: the option's own, or else its group's. */
|
|
2358
|
+
get selectedIcon() {
|
|
2359
|
+
var _a;
|
|
2360
|
+
const option = this.selectedOption;
|
|
2361
|
+
if (!option)
|
|
2362
|
+
return null;
|
|
2363
|
+
const optgroup = parentOptgroupOf(option);
|
|
2364
|
+
return (_a = optionIconOf(option)) !== null && _a !== void 0 ? _a : (optgroup !== null ? groupIconOf(optgroup) : null);
|
|
2260
2365
|
}
|
|
2261
2366
|
// Helper method to check if we should show layout content
|
|
2262
2367
|
shouldShowLayoutContent() {
|
|
@@ -2374,6 +2479,7 @@ export class PdsCombobox {
|
|
|
2374
2479
|
];
|
|
2375
2480
|
}
|
|
2376
2481
|
render() {
|
|
2482
|
+
var _a;
|
|
2377
2483
|
const triggerClass = [
|
|
2378
2484
|
'pds-combobox__button-trigger',
|
|
2379
2485
|
`pds-combobox__button-trigger--${this.triggerVariant}`,
|
|
@@ -2381,13 +2487,18 @@ export class PdsCombobox {
|
|
|
2381
2487
|
]
|
|
2382
2488
|
.filter(Boolean)
|
|
2383
2489
|
.join(' ');
|
|
2384
|
-
return (h(Host, { key: '
|
|
2490
|
+
return (h(Host, { key: 'e934b937916e45f715e6fb54d23a2a5e7c8ce4f6', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: '79d282907c4f218e124b4f9250e0aedb0e9ea51d', class: "pds-combobox", tabIndex: -1, onFocusout: this.onComboboxFocusOut, part: "combobox" }, this.hasVisibleLabel && (h("label", { key: 'd05a4a8fe5362b2b0a684f36115c127689c35c2f', 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 => {
|
|
2385
2491
|
this.inputEl = el;
|
|
2386
2492
|
this.triggerEl = el;
|
|
2387
2493
|
}, class: {
|
|
2388
2494
|
'pds-combobox__input': true,
|
|
2389
2495
|
'pds-combobox__input--invalid': this.isInvalid(),
|
|
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: '
|
|
2496
|
+
}, 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: '38d9c018d59472ef8b7eb3facb47bea5c73f5f1e', style: { display: 'none' } }, h("slot", { key: '26acb32e5f301b568485d52e29b68e526ef1d525', onSlotchange: () => this.updateOptions() })), this.renderDropdown(), this.groupDisplay !== 'inline' && [
|
|
2497
|
+
h("span", { key: "drill-status", class: "visually-hidden", role: "status", "aria-live": "polite" }, this.isOpen && this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null ? this.openGroup.label : ''),
|
|
2498
|
+
// Its own region: sharing one, revealing a row then opening it would leave the text the
|
|
2499
|
+
// same, and opening the group would go unannounced.
|
|
2500
|
+
h("span", { key: "reveal-status", class: "visually-hidden", role: "status", "aria-live": "polite" }, this.isOpen ? (_a = this.revealedGroupLabel) !== null && _a !== void 0 ? _a : '' : ''),
|
|
2501
|
+
])));
|
|
2391
2502
|
}
|
|
2392
2503
|
static get is() { return "pds-combobox"; }
|
|
2393
2504
|
static get encapsulation() { return "shadow"; }
|
|
@@ -3284,6 +3395,8 @@ export class PdsCombobox {
|
|
|
3284
3395
|
"drillDirection": {},
|
|
3285
3396
|
"highlightedGroup": {},
|
|
3286
3397
|
"keyboardNavigating": {},
|
|
3398
|
+
"revealedGroupLabel": {},
|
|
3399
|
+
"pointerCanHover": {},
|
|
3287
3400
|
"panelQuery": {},
|
|
3288
3401
|
"flyoutFallback": {},
|
|
3289
3402
|
"selectedOption": {},
|
|
@@ -559,6 +559,51 @@ GroupDisplayDrillInWithPanelSearch.argTypes = {
|
|
|
559
559
|
noOptionsFoundLabel: { control: 'text' },
|
|
560
560
|
};
|
|
561
561
|
|
|
562
|
+
// A category picker: ungrouped categories with icons, and groups listed between them in the
|
|
563
|
+
// data's order. Once a category is chosen, the trigger shows its icon, or its group's.
|
|
564
|
+
export const OptionIconsWithGroups = (args) => html`
|
|
565
|
+
<div style="min-height: 480px;">
|
|
566
|
+
<pds-combobox
|
|
567
|
+
component-id="combobox-option-icons"
|
|
568
|
+
label=${args.label}
|
|
569
|
+
hide-label
|
|
570
|
+
placeholder=${args.placeholder}
|
|
571
|
+
trigger="button"
|
|
572
|
+
trigger-shape="input"
|
|
573
|
+
mode="select-only"
|
|
574
|
+
group-display=${args.groupDisplay}
|
|
575
|
+
panel-search
|
|
576
|
+
search-placeholder=${args.searchPlaceholder}
|
|
577
|
+
search-options-label=${args.searchPlaceholder}
|
|
578
|
+
drill-in-back-label="Back"
|
|
579
|
+
trigger-width=${args.triggerWidth}
|
|
580
|
+
dropdown-width=${args.triggerWidth}
|
|
581
|
+
.options=${args.options}
|
|
582
|
+
></pds-combobox>
|
|
583
|
+
</div>`;
|
|
584
|
+
|
|
585
|
+
OptionIconsWithGroups.args = {
|
|
586
|
+
label: 'Category',
|
|
587
|
+
placeholder: 'Select category',
|
|
588
|
+
searchPlaceholder: 'Search categories',
|
|
589
|
+
groupDisplay: 'drill-in',
|
|
590
|
+
triggerWidth: '360px',
|
|
591
|
+
options: [
|
|
592
|
+
{ id: 'assessment', text: 'Assessment', icon: 'assessment' },
|
|
593
|
+
{ id: 'contact', text: 'Contact', icon: 'contact' },
|
|
594
|
+
{ id: 'coupon', text: 'Coupon', icon: 'coupon' },
|
|
595
|
+
{ id: 'broadcast', text: 'Broadcast', group: 'Email', groupIcon: 'mail' },
|
|
596
|
+
{ id: 'email-activity', text: 'Email activity', group: 'Email' },
|
|
597
|
+
{ id: 'marketing-status', text: 'Email marketing status', group: 'Email' },
|
|
598
|
+
{ id: 'sequence', text: 'Sequence', group: 'Email' },
|
|
599
|
+
{ id: 'event', text: 'Event', icon: 'calendar-date' },
|
|
600
|
+
{ id: 'custom-fields', text: 'Custom fields', group: 'Fields', groupIcon: 'columns' },
|
|
601
|
+
{ id: 'default-fields', text: 'Default fields', group: 'Fields' },
|
|
602
|
+
{ id: 'form', text: 'Form', icon: 'form' },
|
|
603
|
+
{ id: 'tag', text: 'Tag', icon: 'hashtag' },
|
|
604
|
+
],
|
|
605
|
+
};
|
|
606
|
+
|
|
562
607
|
// A large action catalog: many groups, a button trigger and panel search. The narrower widths
|
|
563
608
|
// leave room for the flyout beside the dropdown on a narrow canvas.
|
|
564
609
|
export const GroupDisplayActionCatalog = (args) => html`
|
|
@@ -25,7 +25,7 @@ export class PdsContainer {
|
|
|
25
25
|
hostStyle['--pine-container-max-width'] = customSize;
|
|
26
26
|
if (!this.centered)
|
|
27
27
|
hostStyle['margin-inline'] = '0';
|
|
28
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: '8a9b10b5d0e348b73f8a6bd7933083c596df10d8', class: { [`pds-container--${this.size}`]: isNamed }, style: Object.keys(hostStyle).length ? hostStyle : undefined }, h(Tag, { key: '55fb22be49377c4cccf08381e7cf954a3f097d08', part: "container" }, h("slot", { key: '4cd9c4fa74a2c6a056e076ab67a0279c395b5c79' }))));
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "pds-container"; }
|
|
31
31
|
static get encapsulation() { return "shadow"; }
|
|
@@ -102,7 +102,7 @@ export class PdsCopytext {
|
|
|
102
102
|
render() {
|
|
103
103
|
const hostClass = this.classNames();
|
|
104
104
|
this.hostKeeper.record(hostClass);
|
|
105
|
-
return (h(Host, { key: '
|
|
105
|
+
return (h(Host, { key: 'd9bd40af6e435d606841cb551341eab33c5983b7', class: hostClass, id: this.componentId }, h("pds-button", { key: '7a42b32678fccb2cbe0d7a68a5da6d5fe5276a4a', type: "button", variant: "unstyled", onClick: this.handleClick }, h("span", { key: '732db283b8075ebad8e1daff70692bac2978aade', ref: (el) => this.valueSpanEl = el }, this.value), h("pds-icon", { key: 'ebfd34b9b5a47b78783302ce97d752af09e3f3e3', "aria-hidden": "true", icon: copyIcon, size: "16px" }))));
|
|
106
106
|
}
|
|
107
107
|
static get is() { return "pds-copytext"; }
|
|
108
108
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1309,14 +1309,14 @@ export class PdsDatepicker {
|
|
|
1309
1309
|
}
|
|
1310
1310
|
render() {
|
|
1311
1311
|
const locale = this.resolvedLocale;
|
|
1312
|
-
return (h(Host, { key: '
|
|
1312
|
+
return (h(Host, { key: '82ffd88b7741a90edc28b66a7384178eb2a9a86c', class: { 'pds-datepicker--range': this.range, 'pds-datepicker--time': this.timePicker }, "full-width": this.fullWidth ? 'true' : null, onFocusin: this.onHostFocusIn, onFocusout: this.onHostFocusOut }, h("pds-input", { key: 'f2b9aad64d1fe8d94327cc3d4f87cd6904eb3076', ref: (el) => (this.inputEl = el), componentId: this.baseId, label: this.label, hideLabel: this.hideLabel, helperMessage: this.helperMessage, errorMessage: this.errorMessage, invalid: this.invalid || !!this.textError || !!this.valueError(), disabled: this.disabled, readonly: this.readonly, required: this.required, placeholder: this.fieldPlaceholder, fullWidth: this.fullWidth, autocomplete: "off", value: this.text, onClick: this.onFieldClick, onPdsInput: this.onTextInput, onPdsChange: this.onTextChange, onPdsKeyDown: this.onTextKeyDown, onPdsFocus: this.stopInnerEvent, onPdsBlur: this.stopInnerEvent }, this.clearable && !!this.value && this.isInteractive && (h("button", {
|
|
1313
1313
|
// Keyed, as is the calendar button: when Clear appears after a pick, the focused
|
|
1314
1314
|
// calendar button must stay that button rather than be reused as Clear.
|
|
1315
1315
|
key: "clear", slot: "suffix", type: "button", class: "pds-datepicker__clear", ref: (el) => (this.clearEl = el), "aria-label": this.label ? `${this.clearLabel} ${this.label}` : this.clearLabel,
|
|
1316
1316
|
// Out of the tab order, as a native search field's clear button is: Tab from a field
|
|
1317
1317
|
// just emptied would land on it as the change removes it, dropping focus to the page.
|
|
1318
1318
|
tabindex: "-1", onMouseDown: this.onClearMouseDown, onClick: this.onClearClick
|
|
1319
|
-
}, h("pds-icon", { key: '
|
|
1319
|
+
}, h("pds-icon", { key: 'f2c784e9d6577d4900b7641ee58aa43f5922fc75', icon: remove, "aria-hidden": "true" }))), h("button", { key: "trigger", slot: "suffix", type: "button", class: "pds-datepicker__trigger", ref: (el) => (this.triggerEl = el), "aria-label": this.triggerAccessibleName(locale), "aria-haspopup": "dialog", "aria-expanded": this.isOpen ? 'true' : 'false', disabled: !this.isInteractive, onClick: this.onTriggerClick, onKeyDown: this.onTriggerKeyDown }, h("pds-icon", { key: '98b2e773240c8ea2bbd5a1acfa3c9ba74cb7917b', icon: calendarSimple, "aria-hidden": "true" }))), this.isOpen && this.renderCalendar(locale)));
|
|
1320
1320
|
}
|
|
1321
1321
|
static get is() { return "pds-datepicker"; }
|
|
1322
1322
|
static get encapsulation() { return "shadow"; }
|
|
@@ -29,7 +29,7 @@ export class PdsDivider {
|
|
|
29
29
|
return classNames.join(' ');
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return (h(Host, { key: '
|
|
32
|
+
return (h(Host, { key: 'ef2a5ee85e8f37036be5b8df490683636ffb66f0', id: this.componentId }, this.hasLabel ? (h("div", { class: this.classNames(), role: "separator", "aria-label": this.label }, h("span", { class: "pds-divider__label", part: "label", "aria-hidden": "true" }, this.label))) : (h("hr", { class: this.classNames() }))));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "pds-divider"; }
|
|
35
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -13,7 +13,7 @@ export class PdsDrawerContent {
|
|
|
13
13
|
unwrapReconnectedContent(this.el.querySelector('.pds-drawer-content'), '.pds-drawer-content');
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h("div", { key: '
|
|
16
|
+
return (h("div", { key: 'f307939ab0a94f6a0d8a3675c658def0ded68b98', class: "pds-drawer-content" }, h("slot", { key: 'dadac08ac15bb8ded98ea982511e2d57bea9bdca' })));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "pds-drawer-content"; }
|
|
19
19
|
static get originalStyleUrls() {
|
|
@@ -9,7 +9,7 @@ export class PdsDrawerFooter {
|
|
|
9
9
|
unwrapReconnectedContent(this.el.querySelector('.pds-drawer__footer'), '.pds-drawer__footer');
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h("footer", { key: '
|
|
12
|
+
return (h("footer", { key: 'b58c68d88b467e8baa3682d16f97076d06ea2414', class: "pds-drawer__footer" }, h("slot", { key: 'ff2306202c14029b397d40b5bb3d672a8aa571c0' })));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "pds-drawer-footer"; }
|
|
15
15
|
static get originalStyleUrls() {
|
|
@@ -9,7 +9,7 @@ export class PdsDrawerHeader {
|
|
|
9
9
|
unwrapReconnectedContent(this.el.querySelector('.pds-drawer__header'), '.pds-drawer__header');
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h("header", { key: '
|
|
12
|
+
return (h("header", { key: '280e6ca734317d5733e4c595431c8070eff13d58', class: "pds-drawer__header" }, h("slot", { key: 'cc6af6084600c4dc60d7bd99e040376abdf5ffe3' })));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "pds-drawer-header"; }
|
|
15
15
|
static get originalStyleUrls() {
|
|
@@ -134,11 +134,11 @@ export class PdsDrawer {
|
|
|
134
134
|
this.open = false;
|
|
135
135
|
}
|
|
136
136
|
render() {
|
|
137
|
-
return (h(Host, { key: '
|
|
137
|
+
return (h(Host, { key: 'ae7e67ed196ef95a39c2b729e859712ce5c41144', class: {
|
|
138
138
|
'pds-drawer': true,
|
|
139
139
|
[`pds-drawer--${this.side}`]: true,
|
|
140
140
|
[`pds-drawer--${this.size}`]: true,
|
|
141
|
-
} }, h("pds-modal", { key: '
|
|
141
|
+
} }, h("pds-modal", { key: '9b35ce377c84612a844a561d5540e98b08c0e499', 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: 'dda01aa40dc41b3d17073238a8cad8d816571e18' }))));
|
|
142
142
|
}
|
|
143
143
|
static get is() { return "pds-drawer"; }
|
|
144
144
|
static get originalStyleUrls() {
|
|
@@ -72,7 +72,7 @@ export class PdsDropdownMenuItem {
|
|
|
72
72
|
}, tabIndex: this.disabled ? -1 : 0, type: "button", part: "button", onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null }, h("slot", null)));
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
|
-
return (h(Host, { key: '
|
|
75
|
+
return (h(Host, { key: '33bd645d7c9547e3fd07429cf795302e6a482296', id: this.componentId, class: { 'is-disabled': this.disabled, 'destructive': !this.disabled && this.destructive }, onClick: () => !this.disabled && this.handleClick(), role: "none", tabIndex: -1, "aria-disabled": this.disabled ? 'true' : null }, this.renderElement()));
|
|
76
76
|
}
|
|
77
77
|
static get is() { return "pds-dropdown-menu-item"; }
|
|
78
78
|
static get encapsulation() { return "shadow"; }
|
|
@@ -8,7 +8,7 @@ export class PdsDropdownMenuSeparator {
|
|
|
8
8
|
this.disabled = false;
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: '60407a2edc8b4667d39cbd1ba9a859d09b0b8ff1', id: this.componentId }, h("hr", { key: '8485d1c8508c5fe5e3635505f25e278f45f45b82' })));
|
|
12
12
|
}
|
|
13
13
|
static get is() { return "pds-dropdown-menu-separator"; }
|
|
14
14
|
static get encapsulation() { return "shadow"; }
|
|
@@ -19,8 +19,22 @@
|
|
|
19
19
|
border: var(--pine-border);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
.pds-dropdown-menu__header {
|
|
23
|
+
border-block-end: var(--pine-border-width-thin) solid var(--pine-color-border);
|
|
24
|
+
margin-block-end: var(--pine-dimension-xs);
|
|
25
|
+
margin-inline: calc(var(--pine-dimension-xs) * -1);
|
|
26
|
+
padding-block-end: var(--pine-dimension-xs);
|
|
27
|
+
padding-inline: calc(var(--pine-dimension-xs) * 2 + var(--pine-border-width) + 2px);
|
|
28
|
+
text-align: start;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.pds-dropdown-menu__items {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
::slotted(a:not([slot=header])),
|
|
37
|
+
::slotted(button:not([slot=header])) {
|
|
24
38
|
align-items: center;
|
|
25
39
|
appearance: none;
|
|
26
40
|
background: transparent;
|
|
@@ -40,12 +54,12 @@
|
|
|
40
54
|
width: calc(100% - (var(--pine-border-width) + 2px) * 2);
|
|
41
55
|
}
|
|
42
56
|
|
|
43
|
-
::slotted(.destructive) {
|
|
57
|
+
::slotted(.destructive:not([slot=header])) {
|
|
44
58
|
color: var(--pine-color-danger) !important;
|
|
45
59
|
}
|
|
46
60
|
|
|
47
|
-
::slotted([aria-disabled=true]),
|
|
48
|
-
::slotted([disabled]:not([disabled=false])) {
|
|
61
|
+
::slotted([aria-disabled=true]:not([slot=header])),
|
|
62
|
+
::slotted([disabled]:not([disabled=false]):not([slot=header])) {
|
|
49
63
|
cursor: not-allowed;
|
|
50
64
|
opacity: 0.5;
|
|
51
65
|
pointer-events: none;
|