@pine-ds/core 4.5.0 → 4.7.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 +187 -28
- 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 +25 -12
- 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 +24 -12
- 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 +118 -33
- package/dist/cjs/pds-multiselect.cjs.entry.js +9 -8
- package/dist/cjs/pds-popover.cjs.entry.js +227 -37
- 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 +166 -23
- 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.css +4 -1
- package/dist/collection/components/pds-drawer/pds-drawer.js +54 -17
- package/dist/collection/components/pds-drawer/stories/pds-drawer.stories.js +6 -1
- 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 +30 -9
- 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 +117 -32
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +8 -7
- package/dist/collection/components/pds-popover/pds-popover.js +185 -35
- 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 +56 -12
- 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 +187 -28
- 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 +25 -12
- 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 +24 -12
- 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 +118 -33
- package/dist/esm/pds-multiselect.entry.js +9 -8
- package/dist/esm/pds-popover.entry.js +228 -38
- 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-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-153ba77b.entry.js +1 -0
- 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-21fe6ee1.system.entry.js +1 -0
- package/dist/pine-core/p-24fbbb74.system.entry.js +1 -0
- 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-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-5a10784e.system.entry.js +3 -0
- 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-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-74a05bcc.entry.js +1 -0
- 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-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-92ae6082.entry.js +1 -0
- package/dist/pine-core/p-94593f20.system.entry.js +1 -0
- package/dist/pine-core/p-945fb0b1.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-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-a0344e30.entry.js +2 -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-a787b34a.system.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-b60ac7eb.system.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-bf5887e8.system.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-7bbfb965.system.entry.js → p-db17c626.system.entry.js} +1 -1
- package/dist/pine-core/p-e0917a26.entry.js +1 -0
- package/dist/pine-core/p-e21ff692.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-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-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 +32 -0
- package/dist/types/components/pds-drawer/pds-drawer.d.ts +21 -9
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +5 -0
- package/dist/types/components/pds-modal/pds-modal.d.ts +10 -3
- package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +2 -1
- package/dist/types/components/pds-popover/pds-popover.d.ts +31 -1
- 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 +50 -35
- 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 +13 -6
- package/hydrate/index.js +961 -213
- package/hydrate/index.mjs +961 -213
- 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-347ae53c.system.entry.js +0 -1
- 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-4414d442.system.entry.js +0 -1
- package/dist/pine-core/p-4e67e68e.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-7e115d33.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-9d33bb05.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. */
|
|
@@ -467,6 +487,9 @@ export class PdsCombobox {
|
|
|
467
487
|
};
|
|
468
488
|
// Handler for button trigger click
|
|
469
489
|
this.onButtonTriggerClick = () => {
|
|
490
|
+
// The button and chip triggers are divs, so a click reaches them even while disabled.
|
|
491
|
+
if (this.disabled)
|
|
492
|
+
return;
|
|
470
493
|
this.isOpen = !this.isOpen;
|
|
471
494
|
if (this.isOpen) {
|
|
472
495
|
this.prepareExpandFilterListOnOpen();
|
|
@@ -486,6 +509,13 @@ export class PdsCombobox {
|
|
|
486
509
|
};
|
|
487
510
|
// Handler for button trigger keyboard events
|
|
488
511
|
this.onButtonTriggerKeyDown = (e) => {
|
|
512
|
+
// Disabled takes it out of the tab order, but setFocus() or a click can still focus it.
|
|
513
|
+
if (this.disabled) {
|
|
514
|
+
// Keep Space from scrolling the page, as on a native disabled button.
|
|
515
|
+
if (e.key === ' ')
|
|
516
|
+
e.preventDefault();
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
489
519
|
// Escape closes an open group before the dropdown. Other keys reach the tree through handleKeyDown.
|
|
490
520
|
if (this.isOpen && e.key === 'Escape' && this.handleGroupedPanelKey(e))
|
|
491
521
|
return;
|
|
@@ -506,8 +536,9 @@ export class PdsCombobox {
|
|
|
506
536
|
}, 0);
|
|
507
537
|
}
|
|
508
538
|
else if (e.key === 'Escape') {
|
|
509
|
-
|
|
539
|
+
// Only an open dropdown claims Escape; a closed one leaves it to a modal or popover around it.
|
|
510
540
|
if (this.isOpen) {
|
|
541
|
+
e.preventDefault();
|
|
511
542
|
this.isOpen = false;
|
|
512
543
|
this.highlightedIndex = -1;
|
|
513
544
|
this.clearExpandFilterList();
|
|
@@ -686,6 +717,31 @@ export class PdsCombobox {
|
|
|
686
717
|
this.focusPanel(panelFocusEl);
|
|
687
718
|
}
|
|
688
719
|
}
|
|
720
|
+
/**
|
|
721
|
+
* Scrolls just enough to show `el`, as `scrollIntoView({ block: 'nearest' })` does. In the drill-in
|
|
722
|
+
* panel it scrolls the list alone, and never sideways: while a drill-in slide offsets a row past
|
|
723
|
+
* the list's edge, `scrollIntoView` also scrolls the list horizontally to reach it, which eats most
|
|
724
|
+
* of the slide. There it keeps clear of the sticky row back, through the scroll padding set for it,
|
|
725
|
+
* but doesn't scroll the page or a scrolling ancestor.
|
|
726
|
+
*/
|
|
727
|
+
scrollIntoViewNearest(el, smooth) {
|
|
728
|
+
const behavior = smooth ? 'smooth' : 'auto';
|
|
729
|
+
if (!this.showsGroupedPanel || this.effectiveGroupDisplay !== 'drill-in') {
|
|
730
|
+
el.scrollIntoView({ block: 'nearest', behavior });
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
const list = this.usesPanelSearch ? this.panelTreeEl : this.listboxEl;
|
|
734
|
+
if (!list)
|
|
735
|
+
return;
|
|
736
|
+
const offset = el.getBoundingClientRect().top - list.getBoundingClientRect().top - list.clientTop;
|
|
737
|
+
// The padding keeps rows clear of the sticky row back; the row back itself doesn't need it.
|
|
738
|
+
const padding = el.classList.contains('pds-combobox__group-back-trigger') ? 0 : parseFloat(list.style.scrollPaddingBlockStart) || 0;
|
|
739
|
+
const top = list.scrollTop + offset - padding;
|
|
740
|
+
const bottom = list.scrollTop + offset + el.offsetHeight - list.clientHeight;
|
|
741
|
+
const target = top < list.scrollTop ? top : bottom > list.scrollTop ? bottom : null;
|
|
742
|
+
if (target !== null)
|
|
743
|
+
list.scrollTo({ top: target, behavior });
|
|
744
|
+
}
|
|
689
745
|
focusPanel(el) {
|
|
690
746
|
var _a, _b;
|
|
691
747
|
this.panelFocusEl = el;
|
|
@@ -706,6 +762,7 @@ export class PdsCombobox {
|
|
|
706
762
|
}
|
|
707
763
|
openGroupChanged(next, previous) {
|
|
708
764
|
this.handPanelFocusToList();
|
|
765
|
+
this.revealedGroupLabel = null;
|
|
709
766
|
// Only moves between the drill-in panel's views slide; search results don't.
|
|
710
767
|
if (!this.isOpen || this.effectiveGroupDisplay !== 'drill-in' || !this.showsGroupedPanel)
|
|
711
768
|
return;
|
|
@@ -726,8 +783,25 @@ export class PdsCombobox {
|
|
|
726
783
|
if (this.isOpen && this.hidesPanelSearch && this.panelTreeEl)
|
|
727
784
|
this.focusPanel(this.panelTreeEl);
|
|
728
785
|
}
|
|
786
|
+
disabledChanged(disabled) {
|
|
787
|
+
var _a, _b, _c, _d, _e;
|
|
788
|
+
if (!disabled || !this.isOpen)
|
|
789
|
+
return;
|
|
790
|
+
const shadowActive = (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) !== null && _b !== void 0 ? _b : null;
|
|
791
|
+
const focusInDropdown = !!((_d = (_c = this.portalEl) === null || _c === void 0 ? void 0 : _c.shadowRoot) === null || _d === void 0 ? void 0 : _d.activeElement) || (!!shadowActive && !!((_e = this.listboxEl) === null || _e === void 0 ? void 0 : _e.contains(shadowActive)));
|
|
792
|
+
this.isOpen = false;
|
|
793
|
+
this.highlightedIndex = -1;
|
|
794
|
+
this.isArrowKeyNavigationMode = false;
|
|
795
|
+
this.clearExpandFilterList();
|
|
796
|
+
this.updateAriaActiveDescendant();
|
|
797
|
+
// Closing removes the search field or option that held focus. A button or chip trigger can still
|
|
798
|
+
// take it (aria-disabled), so focus doesn't fall to the page; a disabled input can't, as natively.
|
|
799
|
+
if (focusInDropdown && this.trigger !== 'input')
|
|
800
|
+
this.restoreFocusToTrigger();
|
|
801
|
+
}
|
|
729
802
|
isOpenChanged(isOpen) {
|
|
730
803
|
if (!isOpen) {
|
|
804
|
+
this.revealedGroupLabel = null;
|
|
731
805
|
this.drillDirection = null;
|
|
732
806
|
this.openGroup = null;
|
|
733
807
|
this.highlightedGroup = null;
|
|
@@ -1006,20 +1080,25 @@ export class PdsCombobox {
|
|
|
1006
1080
|
// slotted markup would be, so grouping, filtering and labels work the same either way. Each
|
|
1007
1081
|
// group is listed where it first appears with all of its options, even when the data
|
|
1008
1082
|
// 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.
|
|
1083
|
+
// options come first, so none reads as part of the group above it. The flyout and drill-in
|
|
1084
|
+
// panels draw groups as rows, where that can't happen, so they keep the data's order instead.
|
|
1010
1085
|
const asyncOptions = this.options || this.internalOptions;
|
|
1011
1086
|
const groups = new Map();
|
|
1012
1087
|
const ungrouped = [];
|
|
1013
1088
|
const groupEntries = [];
|
|
1014
|
-
|
|
1089
|
+
this.panelPositions = new WeakMap();
|
|
1090
|
+
asyncOptions.forEach((opt, position) => {
|
|
1015
1091
|
const optionEl = document.createElement('option');
|
|
1016
1092
|
optionEl.value = String(opt.id);
|
|
1017
1093
|
optionEl.textContent = opt.text;
|
|
1018
1094
|
if (opt.disabled === true)
|
|
1019
1095
|
optionEl.setAttribute('disabled', '');
|
|
1020
1096
|
// Only strings group an option or name an icon; anything else from JS is ignored, not coerced.
|
|
1097
|
+
if (typeof opt.icon === 'string' && opt.icon !== '')
|
|
1098
|
+
optionEl.setAttribute('data-icon', opt.icon);
|
|
1021
1099
|
if (typeof opt.group !== 'string' || opt.group === '') {
|
|
1022
1100
|
ungrouped.push(optionEl);
|
|
1101
|
+
this.panelPositions.set(optionEl, position);
|
|
1023
1102
|
return;
|
|
1024
1103
|
}
|
|
1025
1104
|
let optgroup = groups.get(opt.group);
|
|
@@ -1028,6 +1107,7 @@ export class PdsCombobox {
|
|
|
1028
1107
|
optgroup.label = opt.group;
|
|
1029
1108
|
groups.set(opt.group, optgroup);
|
|
1030
1109
|
groupEntries.push(optgroup);
|
|
1110
|
+
this.panelPositions.set(optgroup, position);
|
|
1031
1111
|
}
|
|
1032
1112
|
if (!optgroup.hasAttribute('data-icon') && typeof opt.groupIcon === 'string' && opt.groupIcon !== '') {
|
|
1033
1113
|
optgroup.setAttribute('data-icon', opt.groupIcon);
|
|
@@ -1493,6 +1573,7 @@ export class PdsCombobox {
|
|
|
1493
1573
|
handleGroupedPanelKey(e) {
|
|
1494
1574
|
if (!this.showsGroupedPanel)
|
|
1495
1575
|
return false;
|
|
1576
|
+
const highlightShown = this.keyboardNavigating;
|
|
1496
1577
|
this.keyboardNavigating = true;
|
|
1497
1578
|
// In the input trigger, Left and Right still move the caret through typed text, and Space,
|
|
1498
1579
|
// Home and End edit it, as they do in the panel's search field.
|
|
@@ -1502,23 +1583,32 @@ export class PdsCombobox {
|
|
|
1502
1583
|
if (e.key === ' ' || e.key === 'Home' || e.key === 'End')
|
|
1503
1584
|
return false;
|
|
1504
1585
|
}
|
|
1505
|
-
const entries =
|
|
1586
|
+
const entries = this.panelEntries();
|
|
1506
1587
|
const drilledIn = this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null;
|
|
1507
1588
|
const current = this.currentPanelItem();
|
|
1508
1589
|
const column = panelColumn(entries, this.openGroup, current, drilledIn);
|
|
1509
1590
|
if (column.length === 0)
|
|
1510
1591
|
return false;
|
|
1511
1592
|
const position = current === null ? -1 : column.indexOf(current);
|
|
1593
|
+
// Drill-in doesn't shade a group row the pointer or a click-open highlighted, so the first Up or
|
|
1594
|
+
// Down shows that row rather than moving past one the user never saw.
|
|
1595
|
+
const unseenRow = !highlightShown && this.effectiveGroupDisplay === 'drill-in' && current !== null && typeof current !== 'number' && current !== this.openGroup;
|
|
1512
1596
|
const moveTo = (to) => {
|
|
1513
1597
|
e.preventDefault();
|
|
1514
1598
|
this.highlightPanelItem(column[Math.max(0, Math.min(column.length - 1, to))]);
|
|
1599
|
+
this.revealedGroupLabel = null;
|
|
1600
|
+
return true;
|
|
1601
|
+
};
|
|
1602
|
+
const reveal = () => {
|
|
1603
|
+
e.preventDefault();
|
|
1604
|
+
this.revealedGroupLabel = current.label;
|
|
1515
1605
|
return true;
|
|
1516
1606
|
};
|
|
1517
1607
|
switch (e.key) {
|
|
1518
1608
|
case 'ArrowDown':
|
|
1519
|
-
return moveTo(position < 0 ? 0 : position + 1);
|
|
1609
|
+
return unseenRow ? reveal() : moveTo(position < 0 ? 0 : position + 1);
|
|
1520
1610
|
case 'ArrowUp':
|
|
1521
|
-
return moveTo(position < 0 ? column.length - 1 : position - 1);
|
|
1611
|
+
return unseenRow ? reveal() : moveTo(position < 0 ? column.length - 1 : position - 1);
|
|
1522
1612
|
case 'Home':
|
|
1523
1613
|
return moveTo(0);
|
|
1524
1614
|
case 'End':
|
|
@@ -1651,7 +1741,7 @@ export class PdsCombobox {
|
|
|
1651
1741
|
// In the grouped panel, the first row with something to choose: a group stays closed until
|
|
1652
1742
|
// it's opened.
|
|
1653
1743
|
if (this.showsGroupedPanel) {
|
|
1654
|
-
const first =
|
|
1744
|
+
const first = this.panelEntries().find(entry => entry.kind === 'group' ? !isGroupDisabled(entry.group) : !isOptionDisabled(entry.option));
|
|
1655
1745
|
this.highlightedIndex = (first === null || first === void 0 ? void 0 : first.kind) === 'option' ? first.index : -1;
|
|
1656
1746
|
this.highlightedGroup = (first === null || first === void 0 ? void 0 : first.kind) === 'group' ? first.group.optgroup : null;
|
|
1657
1747
|
return;
|
|
@@ -1716,8 +1806,13 @@ export class PdsCombobox {
|
|
|
1716
1806
|
}
|
|
1717
1807
|
// Matched by id, not a selector: componentId is consumer text and may not be selector-safe.
|
|
1718
1808
|
const id = this.groupDomId(groupRow);
|
|
1719
|
-
|
|
1720
|
-
.find(
|
|
1809
|
+
const row = Array.from(this.listboxEl.querySelectorAll('[role="treeitem"]'))
|
|
1810
|
+
.find(item => item.id === id);
|
|
1811
|
+
// The row's trigger, not its item: the row back's item wraps the group's options, and showing
|
|
1812
|
+
// all of a group taller than the list would scroll the row back itself out of view.
|
|
1813
|
+
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'));
|
|
1814
|
+
if (trigger)
|
|
1815
|
+
this.scrollIntoViewNearest(trigger, false);
|
|
1721
1816
|
this.updateAriaActiveDescendant();
|
|
1722
1817
|
return;
|
|
1723
1818
|
}
|
|
@@ -1768,7 +1863,7 @@ export class PdsCombobox {
|
|
|
1768
1863
|
this.flyout.reveal(flyout, currentOption);
|
|
1769
1864
|
}
|
|
1770
1865
|
else {
|
|
1771
|
-
|
|
1866
|
+
this.scrollIntoViewNearest(currentOption, true);
|
|
1772
1867
|
}
|
|
1773
1868
|
}
|
|
1774
1869
|
// Always update aria-activedescendant on the trigger element
|
|
@@ -1865,6 +1960,8 @@ export class PdsCombobox {
|
|
|
1865
1960
|
this.highlightedIndex = -1;
|
|
1866
1961
|
this.highlightedGroup = group;
|
|
1867
1962
|
this.keyboardNavigating = false;
|
|
1963
|
+
// So revealing this row again later is announced again.
|
|
1964
|
+
this.revealedGroupLabel = null;
|
|
1868
1965
|
}
|
|
1869
1966
|
// Get the label of the selected option
|
|
1870
1967
|
get selectedLabel() {
|
|
@@ -2020,7 +2117,8 @@ export class PdsCombobox {
|
|
|
2020
2117
|
'pds-combobox__listbox--grouped': this.groupDisplay !== 'inline',
|
|
2021
2118
|
'pds-combobox__listbox--drill-in': this.drillDirection === 'in',
|
|
2022
2119
|
'pds-combobox__listbox--drill-out': this.drillDirection === 'out',
|
|
2023
|
-
|
|
2120
|
+
'pds-combobox__listbox--pointer-hover': this.pointerCanHover,
|
|
2121
|
+
}, 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
2122
|
// Focusable but out of the tab order with panel search, so it can take focus when a
|
|
2025
2123
|
// drilled-in group hides the field. Dropping it while focused would blur the list and close.
|
|
2026
2124
|
tabIndex: withSearch ? -1 : undefined, "aria-activedescendant": listTakesFocus ? this.activeDescendantId : undefined, onKeyDown: withSearch ? this.onPanelTreeKeyDown : undefined, ref: el => {
|
|
@@ -2186,7 +2284,21 @@ export class PdsCombobox {
|
|
|
2186
2284
|
'pds-combobox__option--layout': isLayout,
|
|
2187
2285
|
'pds-combobox__option--chip': isChip,
|
|
2188
2286
|
'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.
|
|
2287
|
+
}, "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" })));
|
|
2288
|
+
}
|
|
2289
|
+
/** An option's text, after its `data-icon` when it has one. */
|
|
2290
|
+
renderOptionLabel(option) {
|
|
2291
|
+
const icon = optionIconOf(option);
|
|
2292
|
+
if (icon === null)
|
|
2293
|
+
return this.getOptionLabel(option);
|
|
2294
|
+
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)));
|
|
2295
|
+
}
|
|
2296
|
+
/** The grouped panel's rows, in the order the panel draws them and the keyboard moves through. */
|
|
2297
|
+
panelEntries() {
|
|
2298
|
+
// Slotted markup is already in order; only options from data record positions.
|
|
2299
|
+
if (this.options === undefined && !this.asyncUrl)
|
|
2300
|
+
return buildPanelEntries(this.filteredItems);
|
|
2301
|
+
return buildPanelEntries(this.filteredItems, element => this.panelPositions.get(element));
|
|
2190
2302
|
}
|
|
2191
2303
|
/**
|
|
2192
2304
|
* `flyout`: one row per group, its options in a flyout beside it. `drill-in`: the same rows, and
|
|
@@ -2194,7 +2306,7 @@ export class PdsCombobox {
|
|
|
2194
2306
|
* it's a tree: the rows and ungrouped options are level 1, a group's options level 2.
|
|
2195
2307
|
*/
|
|
2196
2308
|
renderGroupedPanel() {
|
|
2197
|
-
const entries =
|
|
2309
|
+
const entries = this.panelEntries();
|
|
2198
2310
|
const setsize = entries.length;
|
|
2199
2311
|
if (this.effectiveGroupDisplay === 'drill-in' && this.openGroup !== null) {
|
|
2200
2312
|
const position = entries.findIndex(entry => entry.kind === 'group' && entry.group.optgroup === this.openGroup);
|
|
@@ -2225,22 +2337,26 @@ export class PdsCombobox {
|
|
|
2225
2337
|
return (h("li", { key: "group-back", id: id, class: {
|
|
2226
2338
|
'pds-combobox__group-back': true,
|
|
2227
2339
|
'pds-combobox__group-back--disabled': disabled,
|
|
2228
|
-
|
|
2340
|
+
// As the group rows: shaded for the keys, and by `:hover` for the pointer.
|
|
2341
|
+
'pds-combobox__group-back--highlighted': this.keyboardNavigating && this.highlightedGroupRow === group.optgroup,
|
|
2229
2342
|
'pds-combobox__group-back--keyboard': this.keyboardNavigating && this.highlightedGroupRow === group.optgroup,
|
|
2230
2343
|
}, 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
2344
|
}
|
|
2232
2345
|
renderGroupRow(group, groupIndex, { posinset, setsize }) {
|
|
2233
2346
|
const flyout = this.effectiveGroupDisplay === 'flyout';
|
|
2234
2347
|
const isOpen = flyout && this.openGroup === group.optgroup;
|
|
2235
|
-
|
|
2348
|
+
// Drill-in shades a group row only for the keys: not for the group holding the selection, or the
|
|
2349
|
+
// row the pointer or a click-open left highlighted, which read as picked. `:hover` covers the pointer.
|
|
2350
|
+
const hasSelection = flyout && group.options.some(({ option }) => this.isOptionSelected(option));
|
|
2351
|
+
const isCurrent = this.highlightedGroupRow === group.optgroup;
|
|
2236
2352
|
const disabled = isGroupDisabled(group);
|
|
2237
2353
|
const id = this.groupDomId(group.optgroup);
|
|
2238
2354
|
return (h("li", { key: `group-${groupIndex}`, id: id, class: {
|
|
2239
2355
|
'pds-combobox__group-row': true,
|
|
2240
2356
|
'pds-combobox__group-row--open': isOpen,
|
|
2241
2357
|
'pds-combobox__group-row--has-selection': hasSelection,
|
|
2242
|
-
'pds-combobox__group-row--highlighted':
|
|
2243
|
-
'pds-combobox__group-row--keyboard':
|
|
2358
|
+
'pds-combobox__group-row--highlighted': isCurrent && (flyout || this.keyboardNavigating),
|
|
2359
|
+
'pds-combobox__group-row--keyboard': isCurrent && this.keyboardNavigating,
|
|
2244
2360
|
'pds-combobox__group-row--disabled': disabled,
|
|
2245
2361
|
}, 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
2362
|
// `name`, not `icon`: `icon` also loads URLs and data: SVGs, unsanitized.
|
|
@@ -2256,7 +2372,23 @@ export class PdsCombobox {
|
|
|
2256
2372
|
}
|
|
2257
2373
|
// Helper method to render default text content
|
|
2258
2374
|
renderDefaultContent() {
|
|
2259
|
-
|
|
2375
|
+
const icon = this.selectedIcon;
|
|
2376
|
+
return (h("span", { class: {
|
|
2377
|
+
'pds-combobox__button-trigger-label': true,
|
|
2378
|
+
'pds-combobox__button-trigger-label--placeholder': !this.selectedLabel,
|
|
2379
|
+
'pds-combobox__button-trigger-label--with-icon': icon !== null,
|
|
2380
|
+
} }, icon !== null && (
|
|
2381
|
+
// `name`, not `icon`: `icon` also loads URLs and data: SVGs, unsanitized.
|
|
2382
|
+
h("pds-icon", { name: icon, size: "regular", "aria-hidden": "true", class: "pds-combobox__button-trigger-icon" })), this.selectedLabel || this.placeholder));
|
|
2383
|
+
}
|
|
2384
|
+
/** The selection's icon for the button trigger: the option's own, or else its group's. */
|
|
2385
|
+
get selectedIcon() {
|
|
2386
|
+
var _a;
|
|
2387
|
+
const option = this.selectedOption;
|
|
2388
|
+
if (!option)
|
|
2389
|
+
return null;
|
|
2390
|
+
const optgroup = parentOptgroupOf(option);
|
|
2391
|
+
return (_a = optionIconOf(option)) !== null && _a !== void 0 ? _a : (optgroup !== null ? groupIconOf(optgroup) : null);
|
|
2260
2392
|
}
|
|
2261
2393
|
// Helper method to check if we should show layout content
|
|
2262
2394
|
shouldShowLayoutContent() {
|
|
@@ -2374,6 +2506,7 @@ export class PdsCombobox {
|
|
|
2374
2506
|
];
|
|
2375
2507
|
}
|
|
2376
2508
|
render() {
|
|
2509
|
+
var _a;
|
|
2377
2510
|
const triggerClass = [
|
|
2378
2511
|
'pds-combobox__button-trigger',
|
|
2379
2512
|
`pds-combobox__button-trigger--${this.triggerVariant}`,
|
|
@@ -2381,13 +2514,18 @@ export class PdsCombobox {
|
|
|
2381
2514
|
]
|
|
2382
2515
|
.filter(Boolean)
|
|
2383
2516
|
.join(' ');
|
|
2384
|
-
return (h(Host, { key: '
|
|
2517
|
+
return (h(Host, { key: 'c3bda161c67bab75f306c7f38435d279e5a88756', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: '92b3f83c14a7296b3b2671eaef538a15743f695f', class: "pds-combobox", tabIndex: -1, onFocusout: this.onComboboxFocusOut, part: "combobox" }, this.hasVisibleLabel && (h("label", { key: '4a2dba09dd6db9893e21346b861b4c6cb891112b', 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
2518
|
this.inputEl = el;
|
|
2386
2519
|
this.triggerEl = el;
|
|
2387
2520
|
}, class: {
|
|
2388
2521
|
'pds-combobox__input': true,
|
|
2389
2522
|
'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: '
|
|
2523
|
+
}, 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: 'b8d358339bb26037b6c3c464bd4e13fe978f7857', style: { display: 'none' } }, h("slot", { key: '4aa4c2b8f2b57e13d1e958cc745c61e39e800529', onSlotchange: () => this.updateOptions() })), this.renderDropdown(), this.groupDisplay !== 'inline' && [
|
|
2524
|
+
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 : ''),
|
|
2525
|
+
// Its own region: sharing one, revealing a row then opening it would leave the text the
|
|
2526
|
+
// same, and opening the group would go unannounced.
|
|
2527
|
+
h("span", { key: "reveal-status", class: "visually-hidden", role: "status", "aria-live": "polite" }, this.isOpen ? (_a = this.revealedGroupLabel) !== null && _a !== void 0 ? _a : '' : ''),
|
|
2528
|
+
])));
|
|
2391
2529
|
}
|
|
2392
2530
|
static get is() { return "pds-combobox"; }
|
|
2393
2531
|
static get encapsulation() { return "shadow"; }
|
|
@@ -3284,6 +3422,8 @@ export class PdsCombobox {
|
|
|
3284
3422
|
"drillDirection": {},
|
|
3285
3423
|
"highlightedGroup": {},
|
|
3286
3424
|
"keyboardNavigating": {},
|
|
3425
|
+
"revealedGroupLabel": {},
|
|
3426
|
+
"pointerCanHover": {},
|
|
3287
3427
|
"panelQuery": {},
|
|
3288
3428
|
"flyoutFallback": {},
|
|
3289
3429
|
"selectedOption": {},
|
|
@@ -3422,6 +3562,9 @@ export class PdsCombobox {
|
|
|
3422
3562
|
}, {
|
|
3423
3563
|
"propName": "flyoutFallback",
|
|
3424
3564
|
"methodName": "flyoutFallbackChanged"
|
|
3565
|
+
}, {
|
|
3566
|
+
"propName": "disabled",
|
|
3567
|
+
"methodName": "disabledChanged"
|
|
3425
3568
|
}, {
|
|
3426
3569
|
"propName": "isOpen",
|
|
3427
3570
|
"methodName": "isOpenChanged"
|
|
@@ -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() {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
.pds-drawer__modal > .pds-modal__backdrop {
|
|
2
2
|
align-items: stretch;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.pds-drawer__modal:not(.pds-drawer__modal--modal) > .pds-modal__backdrop {
|
|
3
6
|
background-color: transparent;
|
|
4
7
|
pointer-events: none;
|
|
5
8
|
}
|
|
6
9
|
@supports (backdrop-filter: blur(3px)) {
|
|
7
|
-
.pds-drawer__modal > .pds-modal__backdrop {
|
|
10
|
+
.pds-drawer__modal:not(.pds-drawer__modal--modal) > .pds-modal__backdrop {
|
|
8
11
|
backdrop-filter: none;
|
|
9
12
|
}
|
|
10
13
|
}
|