@pine-ds/core 4.8.0 → 4.9.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/floating-ui.dom.js +1 -1
- package/components/index.js +1 -1
- package/components/index2.js +1 -1
- package/components/keep-hydrated.js +1 -0
- package/components/mock-pds-modal.js +1 -1
- package/components/pds-alert.js +1 -1
- package/components/pds-avatar.js +1 -1
- package/components/pds-box2.js +1 -1
- package/components/pds-button2.js +1 -1
- package/components/pds-checkbox2.js +1 -1
- package/components/pds-chip2.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-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 +2 -2
- package/components/pds-switch.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/components/tabbable.js +1 -0
- package/dist/cjs/{attributes-BJ7KBHql.js → attributes-CW49XqaL.js} +1 -1
- package/dist/cjs/{floating-ui.dom-Dc8Anyel.js → floating-ui.dom-Dw41zbyY.js} +1 -0
- package/dist/cjs/{index-jl_Q819j.js → index-BsWY_xEJ.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{keep-hydrated-CiXgkEYd.js → keep-hydrated-AKoh0DG4.js} +1 -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 +2 -2
- package/dist/cjs/pds-alert.cjs.entry.js +17 -4
- package/dist/cjs/pds-avatar.cjs.entry.js +21 -11
- package/dist/cjs/pds-box.cjs.entry.js +4 -4
- package/dist/cjs/pds-button.cjs.entry.js +57 -25
- package/dist/cjs/pds-checkbox.cjs.entry.js +15 -7
- package/dist/cjs/pds-chip.cjs.entry.js +6 -6
- package/dist/cjs/pds-combobox.cjs.entry.js +41 -11
- package/dist/cjs/pds-container.cjs.entry.js +3 -3
- package/dist/cjs/pds-copytext.cjs.entry.js +6 -6
- 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 +4 -4
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +3 -3
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +5 -5
- package/dist/cjs/pds-filter.cjs.entry.js +3 -3
- package/dist/cjs/pds-filters.cjs.entry.js +3 -3
- package/dist/cjs/pds-icon.cjs.entry.js +2 -2
- package/dist/cjs/pds-image.cjs.entry.js +4 -4
- package/dist/cjs/pds-input.cjs.entry.js +5 -5
- package/dist/cjs/pds-link.cjs.entry.js +14 -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 +8 -88
- package/dist/cjs/pds-multiselect.cjs.entry.js +6 -6
- package/dist/cjs/pds-popover.cjs.entry.js +230 -153
- 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 +5 -5
- package/dist/cjs/pds-radio.cjs.entry.js +23 -10
- package/dist/cjs/pds-row.cjs.entry.js +4 -4
- package/dist/cjs/pds-select.cjs.entry.js +131 -20
- package/dist/cjs/pds-sortable-item.cjs.entry.js +4 -4
- package/dist/cjs/pds-sortable.cjs.entry.js +4 -4
- package/dist/cjs/pds-switch.cjs.entry.js +6 -6
- package/dist/cjs/pds-tab.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-body.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-cell.cjs.entry.js +6 -6
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +4 -4
- 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 +4 -4
- package/dist/cjs/pds-tabs.cjs.entry.js +4 -4
- package/dist/cjs/pds-text.cjs.entry.js +5 -5
- package/dist/cjs/pds-textarea.cjs.entry.js +7 -7
- package/dist/cjs/pds-toast.cjs.entry.js +14 -8
- package/dist/cjs/pds-tooltip.cjs.entry.js +115 -44
- package/dist/cjs/pine-core.cjs.js +3 -3
- package/dist/cjs/tabbable-CddSt_Hi.js +85 -0
- package/dist/cjs/{truncation-tooltip-BtuiXLV0.js → truncation-tooltip-O5nQmXPw.js} +1 -1
- package/dist/collection/components/pds-alert/pds-alert.css +13 -0
- package/dist/collection/components/pds-alert/pds-alert.js +36 -1
- package/dist/collection/components/pds-alert/stories/pds-alert.stories.js +4 -0
- package/dist/collection/components/pds-avatar/pds-avatar.js +41 -9
- package/dist/collection/components/pds-avatar/stories/pds-avatar.stories.js +2 -0
- package/dist/collection/components/pds-box/pds-box.js +1 -1
- package/dist/collection/components/pds-button/pds-button.js +13 -23
- package/dist/collection/components/pds-checkbox/pds-checkbox.css +79 -0
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +36 -5
- package/dist/collection/components/pds-checkbox/stories/pds-checkbox.stories.js +38 -0
- package/dist/collection/components/pds-chip/pds-chip.js +1 -1
- package/dist/collection/components/pds-combobox/pds-combobox.css +33 -0
- package/dist/collection/components/pds-combobox/pds-combobox.js +60 -7
- package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +44 -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 +24 -2
- 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.js +1 -1
- 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-input/stories/pds-input.stories.js +6 -6
- package/dist/collection/components/pds-link/pds-link.js +34 -3
- package/dist/collection/components/pds-link/stories/pds-link.stories.js +3 -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 +4 -84
- 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.css +6 -0
- package/dist/collection/components/pds-popover/pds-popover.js +226 -149
- 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.css +57 -0
- package/dist/collection/components/pds-radio/pds-radio.js +45 -9
- package/dist/collection/components/pds-radio/stories/pds-radio.stories.js +15 -0
- package/dist/collection/components/pds-radio-group/pds-radio-group.js +3 -3
- package/dist/collection/components/pds-radio-group/stories/pds-radio-group.stories.js +45 -0
- package/dist/collection/components/pds-row/pds-row.js +1 -1
- package/dist/collection/components/pds-select/pds-select.js +128 -17
- package/dist/collection/components/pds-select/stories/pds-select.stories.js +2 -2
- 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-table/stories/pds-table.stories.js +3 -3
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
- 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-textarea/stories/pds-textarea.stories.js +2 -2
- package/dist/collection/components/pds-toast/pds-toast.css +13 -0
- package/dist/collection/components/pds-toast/pds-toast.js +33 -5
- package/dist/collection/components/pds-toast/stories/pds-toast.stories.js +4 -1
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +113 -41
- package/dist/collection/utils/aria-references.js +42 -0
- package/dist/collection/utils/tabbable.js +81 -0
- package/dist/docs.json +244 -7
- package/dist/esm/{attributes-WXw_I_uJ.js → attributes-DkeVeN0g.js} +1 -1
- package/dist/esm/{floating-ui.dom-BPqJgIq6.js → floating-ui.dom-Cuc0DYlm.js} +1 -1
- package/dist/esm/{index-Cw9J31qd.js → index-BFSwd-GQ.js} +1 -1
- package/dist/esm/{index-BWDu62Mo.js → index-m3pqpeWg.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{keep-hydrated-BLG6RDBt.js → keep-hydrated-BgNaWLoS.js} +1 -1
- 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 +17 -4
- package/dist/esm/pds-avatar.entry.js +22 -12
- package/dist/esm/pds-box.entry.js +4 -4
- package/dist/esm/pds-button.entry.js +58 -26
- package/dist/esm/pds-checkbox.entry.js +16 -8
- package/dist/esm/pds-chip.entry.js +7 -7
- package/dist/esm/pds-combobox.entry.js +41 -11
- package/dist/esm/pds-container.entry.js +3 -3
- package/dist/esm/pds-copytext.entry.js +7 -7
- package/dist/esm/pds-datepicker.entry.js +6 -6
- 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 +4 -4
- package/dist/esm/pds-dropdown-menu-separator.entry.js +3 -3
- package/dist/esm/pds-dropdown-menu.entry.js +5 -5
- 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 +2 -2
- 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 +15 -6
- 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 +6 -86
- package/dist/esm/pds-multiselect.entry.js +7 -7
- package/dist/esm/pds-popover.entry.js +230 -153
- 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 +24 -11
- package/dist/esm/pds-row.entry.js +4 -4
- package/dist/esm/pds-select.entry.js +132 -21
- 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 +3 -3
- package/dist/esm/pds-table-body.entry.js +3 -3
- package/dist/esm/pds-table-cell.entry.js +6 -6
- 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 +4 -4
- package/dist/esm/pds-tabs.entry.js +4 -4
- package/dist/esm/pds-text.entry.js +5 -5
- package/dist/esm/pds-textarea.entry.js +8 -8
- package/dist/esm/pds-toast.entry.js +14 -8
- package/dist/esm/pds-tooltip.entry.js +115 -44
- package/dist/esm/pine-core.js +4 -4
- package/dist/esm/tabbable-DCKBKRUy.js +83 -0
- package/dist/esm/{truncation-tooltip-FaW67DiY.js → truncation-tooltip-D_gvhB9r.js} +1 -1
- package/dist/esm-es5/{attributes-WXw_I_uJ.js → attributes-DkeVeN0g.js} +1 -1
- package/dist/esm-es5/{floating-ui.dom-BPqJgIq6.js → floating-ui.dom-Cuc0DYlm.js} +1 -1
- package/dist/esm-es5/{index-Cw9J31qd.js → index-BFSwd-GQ.js} +2 -2
- package/dist/esm-es5/{index-BWDu62Mo.js → index-m3pqpeWg.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{keep-hydrated-BLG6RDBt.js → keep-hydrated-BgNaWLoS.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-accordion.entry.js +1 -1
- package/dist/esm-es5/pds-alert.entry.js +1 -1
- package/dist/esm-es5/pds-avatar.entry.js +1 -1
- package/dist/esm-es5/pds-box.entry.js +1 -1
- package/dist/esm-es5/pds-button.entry.js +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-combobox.entry.js +2 -2
- package/dist/esm-es5/pds-container.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-datepicker.entry.js +1 -1
- package/dist/esm-es5/pds-divider.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-content.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-footer.entry.js +1 -1
- package/dist/esm-es5/pds-drawer-header.entry.js +1 -1
- package/dist/esm-es5/pds-drawer.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
- package/dist/esm-es5/pds-filter.entry.js +1 -1
- package/dist/esm-es5/pds-filters.entry.js +1 -1
- package/dist/esm-es5/pds-icon.entry.js +1 -1
- package/dist/esm-es5/pds-image.entry.js +1 -1
- package/dist/esm-es5/pds-input.entry.js +1 -1
- package/dist/esm-es5/pds-link.entry.js +1 -1
- package/dist/esm-es5/pds-loader.entry.js +1 -1
- package/dist/esm-es5/pds-modal-content.entry.js +1 -1
- package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
- package/dist/esm-es5/pds-modal-header.entry.js +1 -1
- package/dist/esm-es5/pds-modal.entry.js +1 -1
- package/dist/esm-es5/pds-multiselect.entry.js +1 -1
- package/dist/esm-es5/pds-popover.entry.js +1 -1
- package/dist/esm-es5/pds-progress.entry.js +1 -1
- package/dist/esm-es5/pds-property.entry.js +1 -1
- package/dist/esm-es5/pds-radio-group.entry.js +1 -1
- package/dist/esm-es5/pds-radio.entry.js +1 -1
- package/dist/esm-es5/pds-row.entry.js +1 -1
- package/dist/esm-es5/pds-select.entry.js +1 -1
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
- package/dist/esm-es5/pds-sortable.entry.js +2 -2
- package/dist/esm-es5/pds-switch.entry.js +1 -1
- package/dist/esm-es5/pds-tab.entry.js +1 -1
- package/dist/esm-es5/pds-table-body.entry.js +1 -1
- package/dist/esm-es5/pds-table-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
- package/dist/esm-es5/pds-table-head.entry.js +1 -1
- package/dist/esm-es5/pds-table-row.entry.js +1 -1
- package/dist/esm-es5/pds-table.entry.js +1 -1
- package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
- package/dist/esm-es5/pds-tabs.entry.js +1 -1
- package/dist/esm-es5/pds-text.entry.js +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-toast.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/tabbable-DCKBKRUy.js +1 -0
- package/dist/esm-es5/{truncation-tooltip-FaW67DiY.js → truncation-tooltip-D_gvhB9r.js} +1 -1
- package/dist/pine-core/index.esm.js +1 -1
- package/dist/pine-core/p-001d4b86.entry.js +1 -0
- package/dist/pine-core/p-06279b93.system.entry.js +1 -0
- package/dist/pine-core/{p-b75b0d09.system.entry.js → p-0790dd0d.system.entry.js} +1 -1
- package/dist/pine-core/p-079c39d1.entry.js +1 -0
- package/dist/pine-core/{p-158b2f51.entry.js → p-07b4524e.entry.js} +1 -1
- package/dist/pine-core/{p-4bfc8b3e.system.entry.js → p-08bbd3e6.system.entry.js} +1 -1
- package/dist/pine-core/{p-d3d69ca4.system.entry.js → p-0bd61097.system.entry.js} +1 -1
- package/dist/pine-core/p-0c60f577.system.entry.js +1 -0
- package/dist/pine-core/{p-acca5f7b.system.entry.js → p-110b4051.system.entry.js} +1 -1
- package/dist/pine-core/p-11e7d660.entry.js +1 -0
- package/dist/pine-core/p-14d872d3.entry.js +1 -0
- package/dist/pine-core/p-17fc76e7.system.entry.js +1 -0
- package/dist/pine-core/{p-0913f696.system.entry.js → p-1e5648bf.system.entry.js} +1 -1
- package/dist/pine-core/{p-ef13f665.system.entry.js → p-22ae92f7.system.entry.js} +1 -1
- package/dist/pine-core/p-239774c9.entry.js +1 -0
- package/dist/pine-core/{p-0b71ecb6.system.entry.js → p-25bf2f26.system.entry.js} +2 -2
- package/dist/pine-core/{p-719542e1.system.entry.js → p-272b24ad.system.entry.js} +1 -1
- package/dist/pine-core/{p-d2c91e7a.entry.js → p-2c0047cd.entry.js} +1 -1
- package/dist/pine-core/p-2d5b1deb.entry.js +1 -0
- package/dist/pine-core/{p-c97bfac9.entry.js → p-3556f6ad.entry.js} +1 -1
- package/dist/pine-core/{p-BGLP3keB.js → p-35s7h-dk.js} +1 -1
- package/dist/pine-core/{p-3c977d8d.system.entry.js → p-38b87aa2.system.entry.js} +1 -1
- package/dist/pine-core/{p-25ea48d1.entry.js → p-3afb1208.entry.js} +1 -1
- package/dist/pine-core/{p-9df5e204.entry.js → p-3b5b8f73.entry.js} +1 -1
- package/dist/pine-core/{p-8c8cc079.system.entry.js → p-3cc19ea8.system.entry.js} +1 -1
- package/dist/pine-core/{p-ca4ee736.system.entry.js → p-3ce7e72e.system.entry.js} +1 -1
- package/dist/pine-core/p-3f62581a.system.entry.js +1 -0
- package/dist/pine-core/p-414faecf.entry.js +1 -0
- package/dist/pine-core/p-463a29fa.entry.js +1 -0
- package/dist/pine-core/{p-f029b7da.system.entry.js → p-4ee44585.system.entry.js} +1 -1
- package/dist/pine-core/p-50af67ea.system.entry.js +1 -0
- package/dist/pine-core/p-5133e8be.system.entry.js +1 -0
- package/dist/pine-core/p-55fce29e.entry.js +1 -0
- package/dist/pine-core/{p-77395d62.system.entry.js → p-568a9a79.system.entry.js} +1 -1
- package/dist/pine-core/{p-5cfd4d41.system.entry.js → p-5967d9fa.system.entry.js} +1 -1
- package/dist/pine-core/{p-5870b092.system.entry.js → p-5c46553f.system.entry.js} +1 -1
- package/dist/pine-core/{p-ea340c55.system.entry.js → p-5ce5836e.system.entry.js} +1 -1
- package/dist/pine-core/p-5f3242c8.system.entry.js +1 -0
- package/dist/pine-core/{p-80e6f3a0.system.entry.js → p-60d27247.system.entry.js} +1 -1
- package/dist/pine-core/{p-90d5edc6.entry.js → p-60e3b1af.entry.js} +1 -1
- package/dist/pine-core/{p-ca0a8f5c.entry.js → p-64283f7b.entry.js} +1 -1
- package/dist/pine-core/p-6602b4d0.entry.js +1 -0
- package/dist/pine-core/p-6845867f.system.entry.js +1 -0
- package/dist/pine-core/{p-332590c7.system.entry.js → p-68fdfb8f.system.entry.js} +1 -1
- package/dist/pine-core/p-6b6ae1be.entry.js +1 -0
- package/dist/pine-core/{p-e5420660.entry.js → p-6d64e6c7.entry.js} +1 -1
- package/dist/pine-core/{p-121612a7.system.entry.js → p-6dad76cb.system.entry.js} +1 -1
- package/dist/pine-core/p-6f34ad9c.entry.js +1 -0
- package/dist/pine-core/{p-55224683.entry.js → p-7073146f.entry.js} +1 -1
- package/dist/pine-core/{p-f1702281.entry.js → p-735b3631.entry.js} +1 -1
- package/dist/pine-core/p-7a14473e.entry.js +1 -0
- package/dist/pine-core/{p-9880d251.system.entry.js → p-7a19477e.system.entry.js} +1 -1
- package/dist/pine-core/{p-ea8f5d29.entry.js → p-7d3a20ba.entry.js} +1 -1
- package/dist/pine-core/{p-a939b471.entry.js → p-7fcf3d37.entry.js} +1 -1
- package/dist/pine-core/{p-26642718.entry.js → p-87642228.entry.js} +1 -1
- package/dist/pine-core/{p-62433f32.entry.js → p-89fefe36.entry.js} +1 -1
- package/dist/pine-core/{p-cccfe60f.system.entry.js → p-8b97dd57.system.entry.js} +1 -1
- package/dist/pine-core/{p-0092444c.system.entry.js → p-9201b497.system.entry.js} +1 -1
- package/dist/pine-core/{p-631f5bcc.entry.js → p-92a8cf7d.entry.js} +1 -1
- package/dist/pine-core/{p-e836a041.entry.js → p-94597b73.entry.js} +1 -1
- package/dist/pine-core/p-9713d6a5.system.entry.js +1 -0
- package/dist/pine-core/p-97be00f4.system.entry.js +1 -0
- package/dist/pine-core/{p-2ac2457b.system.entry.js → p-98843402.system.entry.js} +1 -1
- package/dist/pine-core/{p-b914dde8.entry.js → p-98cc327b.entry.js} +2 -2
- package/dist/pine-core/p-9a8971e2.system.entry.js +1 -0
- package/dist/pine-core/p-9a8d2985.system.entry.js +3 -0
- package/dist/pine-core/{p-ee0e30bf.system.entry.js → p-9dbc017f.system.entry.js} +1 -1
- package/dist/pine-core/p-9fbcba0d.entry.js +1 -0
- package/dist/pine-core/p-9fe4a64a.entry.js +1 -0
- package/dist/pine-core/{p-COtCa1Md.system.js → p-BNTlHhoO.system.js} +1 -1
- package/dist/pine-core/p-BZ1l3LGl.system.js +1 -0
- package/dist/pine-core/p-BgNaWLoS.js +1 -0
- package/dist/pine-core/{p-CmSJytt1.js → p-BplEmwUQ.js} +2 -2
- package/dist/pine-core/{p-Cy8cvR7I.system.js → p-CANeE7Ss.system.js} +1 -1
- package/dist/pine-core/{p-XW4H0W6i.system.js → p-CNXspDYs.system.js} +1 -1
- package/dist/pine-core/{p-jrkGLEPe.js → p-CirzxZ33.js} +1 -1
- package/dist/pine-core/{p-CGRdQc49.system.js → p-CjRCtzPD.system.js} +2 -2
- package/dist/pine-core/{p-BPqJgIq6.js → p-Cuc0DYlm.js} +1 -1
- package/dist/pine-core/{p-D04W0cAO.system.js → p-D52aRqFx.system.js} +1 -1
- package/dist/pine-core/p-DCKBKRUy.js +1 -0
- package/dist/pine-core/p-DXO1yd32.system.js +1 -0
- package/dist/pine-core/{p-ClDiSG97.system.js → p-DaCT2ssj.system.js} +1 -1
- package/dist/pine-core/{p-295f64ea.entry.js → p-a2078add.entry.js} +1 -1
- package/dist/pine-core/{p-f3067d90.system.entry.js → p-a48b025a.system.entry.js} +1 -1
- package/dist/pine-core/{p-9713fb36.entry.js → p-a7d25143.entry.js} +1 -1
- package/dist/pine-core/{p-9dcd2cdb.entry.js → p-ad3b1ec3.entry.js} +1 -1
- package/dist/pine-core/p-b017eb99.system.entry.js +1 -0
- package/dist/pine-core/p-b037dcbd.system.entry.js +1 -0
- package/dist/pine-core/{p-db17c626.system.entry.js → p-b243767b.system.entry.js} +1 -1
- package/dist/pine-core/{p-0af0d752.system.entry.js → p-b33ad96e.system.entry.js} +1 -1
- package/dist/pine-core/p-b6edfdfe.entry.js +2 -0
- package/dist/pine-core/{p-8191498f.system.entry.js → p-b7cbd913.system.entry.js} +1 -1
- package/dist/pine-core/{p-8f531063.entry.js → p-b9d71b76.entry.js} +1 -1
- package/dist/pine-core/p-bcf57566.entry.js +1 -0
- package/dist/pine-core/{p-4fd454f6.entry.js → p-bda7e3be.entry.js} +1 -1
- package/dist/pine-core/{p-bdac8f2b.entry.js → p-bdde1e53.entry.js} +1 -1
- package/dist/pine-core/{p-cb6a3e4c.system.entry.js → p-be3b4f12.system.entry.js} +1 -1
- package/dist/pine-core/{p-b1548a20.entry.js → p-bfdfbe9f.entry.js} +1 -1
- package/dist/pine-core/{p-8e3ff75d.entry.js → p-c02a32ec.entry.js} +1 -1
- package/dist/pine-core/p-c1da80e5.entry.js +1 -0
- package/dist/pine-core/{p-eaf85be6.system.entry.js → p-c233866c.system.entry.js} +1 -1
- package/dist/pine-core/{p-ecc7a531.system.entry.js → p-cb560aab.system.entry.js} +1 -1
- package/dist/pine-core/{p-8c588ca0.entry.js → p-ce554098.entry.js} +1 -1
- package/dist/pine-core/p-ced6a814.system.entry.js +1 -0
- package/dist/pine-core/{p-9aaedded.entry.js → p-d7930540.entry.js} +1 -1
- package/dist/pine-core/{p-11d98408.system.entry.js → p-d7db749a.system.entry.js} +1 -1
- package/dist/pine-core/{p-7a5b21d2.system.entry.js → p-d8bedb58.system.entry.js} +1 -1
- package/dist/pine-core/{p-1dc5a7e0.system.entry.js → p-d9243653.system.entry.js} +1 -1
- package/dist/pine-core/{p-9ab95438.entry.js → p-d94ebe84.entry.js} +1 -1
- package/dist/pine-core/{p-9109b90a.entry.js → p-de176bd9.entry.js} +1 -1
- package/dist/pine-core/{p-57a2f927.entry.js → p-dea2a254.entry.js} +1 -1
- package/dist/pine-core/p-dfadfcd1.entry.js +1 -0
- package/dist/pine-core/{p-047433a4.system.entry.js → p-e1fdd53a.system.entry.js} +1 -1
- package/dist/pine-core/{p-8987fd45.system.entry.js → p-e70cb112.system.entry.js} +1 -1
- package/dist/pine-core/{p-b9d145f8.system.entry.js → p-e9a53a88.system.entry.js} +1 -1
- package/dist/pine-core/p-eb93cc6e.entry.js +1 -0
- package/dist/pine-core/{p-4d03d1e2.system.entry.js → p-ebf0c51b.system.entry.js} +1 -1
- package/dist/pine-core/p-ebf74c43.system.entry.js +1 -0
- package/dist/pine-core/{p-138b278b.entry.js → p-ee449a4b.entry.js} +1 -1
- package/dist/pine-core/p-ef4d8fea.entry.js +1 -0
- package/dist/pine-core/p-f09f27ab.system.entry.js +1 -0
- package/dist/pine-core/{p-c483997a.entry.js → p-f2c487e6.entry.js} +1 -1
- package/dist/pine-core/p-f549f2bc.entry.js +1 -0
- package/dist/pine-core/{p-717323e4.entry.js → p-fc743f6e.entry.js} +1 -1
- package/dist/pine-core/{p-BWDu62Mo.js → p-m3pqpeWg.js} +1 -1
- package/dist/pine-core/p-wXfuz0Bd.system.js +1 -0
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/pine-core/pine-core.js +1 -1
- package/dist/types/components/pds-alert/pds-alert.d.ts +10 -0
- package/dist/types/components/pds-avatar/pds-avatar.d.ts +8 -0
- package/dist/types/components/pds-button/pds-button.d.ts +2 -2
- package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +7 -1
- package/dist/types/components/pds-combobox/pds-combobox.d.ts +9 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +7 -0
- package/dist/types/components/pds-link/pds-link.d.ts +8 -0
- package/dist/types/components/pds-popover/pds-popover.d.ts +44 -20
- package/dist/types/components/pds-radio/pds-radio.d.ts +9 -3
- package/dist/types/components/pds-select/pds-select.d.ts +32 -4
- package/dist/types/components/pds-toast/pds-toast.d.ts +9 -0
- package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +31 -0
- package/dist/types/components.d.ts +96 -8
- package/dist/types/utils/aria-references.d.ts +24 -0
- package/dist/types/utils/tabbable.d.ts +2 -0
- package/dist/vscode.html-data.json +79 -7
- package/hydrate/index.js +724 -337
- package/hydrate/index.mjs +724 -337
- package/package.json +2 -2
- package/dist/pine-core/p-00a50de5.system.entry.js +0 -3
- package/dist/pine-core/p-049f126a.entry.js +0 -1
- package/dist/pine-core/p-089c3e60.entry.js +0 -1
- package/dist/pine-core/p-17f97f1a.entry.js +0 -1
- package/dist/pine-core/p-19ba2788.system.entry.js +0 -1
- package/dist/pine-core/p-208c7dbf.entry.js +0 -1
- package/dist/pine-core/p-29cd4113.system.entry.js +0 -1
- package/dist/pine-core/p-2cb5483a.system.entry.js +0 -1
- package/dist/pine-core/p-36cb4bf6.entry.js +0 -1
- package/dist/pine-core/p-3d51891a.entry.js +0 -1
- package/dist/pine-core/p-432d5ec7.entry.js +0 -1
- package/dist/pine-core/p-44f546ae.entry.js +0 -1
- package/dist/pine-core/p-5442d983.system.entry.js +0 -1
- package/dist/pine-core/p-5833a072.system.entry.js +0 -1
- package/dist/pine-core/p-602c197f.entry.js +0 -1
- package/dist/pine-core/p-73f931a1.entry.js +0 -1
- package/dist/pine-core/p-75ee0403.entry.js +0 -1
- package/dist/pine-core/p-7a287635.system.entry.js +0 -1
- package/dist/pine-core/p-86040cac.system.entry.js +0 -1
- package/dist/pine-core/p-875b0436.system.entry.js +0 -1
- package/dist/pine-core/p-884cb31d.system.entry.js +0 -1
- package/dist/pine-core/p-8cc302aa.system.entry.js +0 -1
- package/dist/pine-core/p-91f60173.entry.js +0 -1
- package/dist/pine-core/p-9265497e.system.entry.js +0 -1
- package/dist/pine-core/p-94593f20.system.entry.js +0 -1
- package/dist/pine-core/p-99459e27.entry.js +0 -1
- package/dist/pine-core/p-99fdf70f.entry.js +0 -1
- package/dist/pine-core/p-BLG6RDBt.js +0 -1
- package/dist/pine-core/p-BR5nujVX.system.js +0 -1
- package/dist/pine-core/p-CuSNnuFu.system.js +0 -1
- package/dist/pine-core/p-a0960b3d.system.entry.js +0 -1
- package/dist/pine-core/p-a1230a74.system.entry.js +0 -1
- package/dist/pine-core/p-a826f290.entry.js +0 -1
- package/dist/pine-core/p-acce8eb2.entry.js +0 -1
- package/dist/pine-core/p-aff411d0.entry.js +0 -1
- package/dist/pine-core/p-b182f806.entry.js +0 -2
- package/dist/pine-core/p-bb68431a.entry.js +0 -1
- package/dist/pine-core/p-be9b6e63.system.entry.js +0 -1
- package/dist/pine-core/p-bf30dec0.entry.js +0 -1
- package/dist/pine-core/p-c4e12f0a.entry.js +0 -1
- package/dist/pine-core/p-e0917a26.entry.js +0 -1
- package/dist/pine-core/p-ea4d4741.system.entry.js +0 -1
|
@@ -155,4 +155,83 @@ label {
|
|
|
155
155
|
}
|
|
156
156
|
.pds-checkbox__message--error pds-icon {
|
|
157
157
|
margin-block-start: var(--pine-dimension-025);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:host(.pds-checkbox--pill) {
|
|
161
|
+
position: relative;
|
|
162
|
+
}
|
|
163
|
+
:host(.pds-checkbox--pill) label {
|
|
164
|
+
align-items: center;
|
|
165
|
+
background: var(--pine-color-background-container);
|
|
166
|
+
border: var(--pine-border);
|
|
167
|
+
border-radius: var(--pine-border-radius-full);
|
|
168
|
+
box-sizing: border-box;
|
|
169
|
+
color: var(--pine-color-text-active);
|
|
170
|
+
cursor: pointer;
|
|
171
|
+
font: var(--pine-typography-body);
|
|
172
|
+
min-block-size: var(--pine-dimension-xl);
|
|
173
|
+
padding: 0 var(--pine-dimension-sm);
|
|
174
|
+
transition: border-color var(--pine-motion-duration-fast) ease;
|
|
175
|
+
}
|
|
176
|
+
:host(.pds-checkbox--pill) label span {
|
|
177
|
+
min-width: 0;
|
|
178
|
+
overflow-wrap: anywhere;
|
|
179
|
+
}
|
|
180
|
+
:host(.pds-checkbox--pill) label:hover {
|
|
181
|
+
border-color: var(--pine-color-text);
|
|
182
|
+
}
|
|
183
|
+
:host(.pds-checkbox--pill) label:has(input:checked) {
|
|
184
|
+
border-color: var(--pine-color-text-active);
|
|
185
|
+
box-shadow: inset 0 0 0 var(--pine-border-width) var(--pine-color-text-active);
|
|
186
|
+
}
|
|
187
|
+
:host(.pds-checkbox--pill) label:has(input:focus-visible) {
|
|
188
|
+
outline: var(--pine-outline-focus);
|
|
189
|
+
outline-offset: var(--pine-border-width-thick);
|
|
190
|
+
}
|
|
191
|
+
:host(.pds-checkbox--pill) label:has(input:disabled) {
|
|
192
|
+
background: var(--pine-color-background-container-disabled);
|
|
193
|
+
border-color: var(--pine-color-border-disabled);
|
|
194
|
+
color: var(--pine-color-text-disabled);
|
|
195
|
+
cursor: not-allowed;
|
|
196
|
+
}
|
|
197
|
+
:host(.pds-checkbox--pill) label:has(input:disabled:checked) {
|
|
198
|
+
border-color: var(--pine-color-text-disabled);
|
|
199
|
+
box-shadow: inset 0 0 0 var(--pine-border-width) var(--pine-color-text-disabled);
|
|
200
|
+
}
|
|
201
|
+
@media (forced-colors: active) {
|
|
202
|
+
:host(.pds-checkbox--pill) label:has(input:disabled) {
|
|
203
|
+
border-color: GrayText;
|
|
204
|
+
}
|
|
205
|
+
:host(.pds-checkbox--pill) label:has(input:checked) {
|
|
206
|
+
border-color: Highlight;
|
|
207
|
+
border-width: var(--pine-border-width-thick);
|
|
208
|
+
padding-inline: calc(var(--pine-dimension-sm) - (var(--pine-border-width-thick) - var(--pine-border-width)));
|
|
209
|
+
}
|
|
210
|
+
:host(.pds-checkbox--pill) label:has(input:disabled:checked) {
|
|
211
|
+
border-color: GrayText;
|
|
212
|
+
border-width: var(--pine-border-width-thick);
|
|
213
|
+
padding-inline: calc(var(--pine-dimension-sm) - (var(--pine-border-width-thick) - var(--pine-border-width)));
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
:host(.pds-checkbox--pill) .pds-checkbox__message {
|
|
217
|
+
margin-inline-start: 0;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
:host(.pds-checkbox--pill.is-invalid:not(.is-disabled)) label {
|
|
221
|
+
border-color: var(--pine-color-border-danger);
|
|
222
|
+
color: var(--pine-color-text-active);
|
|
223
|
+
}
|
|
224
|
+
:host(.pds-checkbox--pill.is-invalid:not(.is-disabled)) label:has(input:checked) {
|
|
225
|
+
border-color: var(--pine-color-border-danger);
|
|
226
|
+
box-shadow: inset 0 0 0 var(--pine-border-width) var(--pine-color-border-danger);
|
|
227
|
+
}
|
|
228
|
+
:host(.pds-checkbox--pill.is-invalid:not(.is-disabled)) label:has(input:focus-visible) {
|
|
229
|
+
outline: var(--pine-outline-focus-danger);
|
|
230
|
+
}
|
|
231
|
+
@media (forced-colors: active) {
|
|
232
|
+
:host(.pds-checkbox--pill.is-invalid:not(.is-disabled)) label:has(input:checked) {
|
|
233
|
+
border-color: Highlight;
|
|
234
|
+
border-width: var(--pine-border-width-thick);
|
|
235
|
+
padding-inline: calc(var(--pine-dimension-sm) - (var(--pine-border-width-thick) - var(--pine-border-width)));
|
|
236
|
+
}
|
|
158
237
|
}
|
|
@@ -15,6 +15,11 @@ export class PdsCheckbox {
|
|
|
15
15
|
* It determines whether or not the checkbox is checked.
|
|
16
16
|
*/
|
|
17
17
|
this.checked = false;
|
|
18
|
+
/**
|
|
19
|
+
* Sets the style variant of the checkbox. `pill` renders the label as a pill-shaped choice; the native input still handles keyboard, form, and screen reader behavior.
|
|
20
|
+
* @defaultValue default
|
|
21
|
+
*/
|
|
22
|
+
this.variant = 'default';
|
|
18
23
|
this.handleCheckboxChange = (e) => {
|
|
19
24
|
if (this.disabled) {
|
|
20
25
|
return;
|
|
@@ -54,6 +59,9 @@ export class PdsCheckbox {
|
|
|
54
59
|
if (this.hasLabelSlot) {
|
|
55
60
|
classNames.push('has-label-slot');
|
|
56
61
|
}
|
|
62
|
+
if (this.variant === 'pill') {
|
|
63
|
+
classNames.push('pds-checkbox--pill');
|
|
64
|
+
}
|
|
57
65
|
return classNames.join(' ');
|
|
58
66
|
}
|
|
59
67
|
connectedCallback() {
|
|
@@ -116,9 +124,9 @@ export class PdsCheckbox {
|
|
|
116
124
|
render() {
|
|
117
125
|
const hostClass = this.classNames();
|
|
118
126
|
this.hostKeeper.record(hostClass);
|
|
119
|
-
return (h(Host, { key: '
|
|
120
|
-
h("div", { key: '
|
|
121
|
-
h("div", { key: '
|
|
127
|
+
return (h(Host, { key: '8e9185653796f250ad425350b9adc1f65fd047c1', class: hostClass }, h("label", { key: 'e17bab4b96b4ffc716e311ecea488a3025e1551c', htmlFor: this.componentId }, h("input", Object.assign({ key: '8af9bbc3dbe18409532e95b4b490eab4aabc8762', type: "checkbox", "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, id: this.componentId, indeterminate: this.indeterminate, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleCheckboxChange, onInput: this.handleInput, class: this.variant === 'pill' ? 'visually-hidden' : undefined }, this.inheritedAttributes)), h("span", { key: '1e4d9a826b6b5ec429ae47096d4aede3af43d110', class: this.hideLabel && this.variant !== 'pill' ? 'visually-hidden' : '' }, h("slot", { key: '7b10c7d1e018be4afe019cb56e82a5ec7a638de8', name: "label", onSlotchange: this.updateHasLabelSlot }), !this.hasLabelSlot && this.label)), this.helperMessage &&
|
|
128
|
+
h("div", { key: 'c5455322eb07bf73805a17c28bf6acc1b5384337', class: 'pds-checkbox__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
129
|
+
h("div", { key: '0f7c8ec00362c31b1c5bd11c185c6e7bfc177f22', class: `pds-checkbox__message pds-checkbox__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: 'f6eccfaac90505903aee379f2fc28b5735d8c4a9', "aria-hidden": "true", icon: danger, size: "small" }), this.errorMessage)));
|
|
122
130
|
}
|
|
123
131
|
static get is() { return "pds-checkbox"; }
|
|
124
132
|
static get encapsulation() { return "shadow"; }
|
|
@@ -243,7 +251,7 @@ export class PdsCheckbox {
|
|
|
243
251
|
"optional": false,
|
|
244
252
|
"docs": {
|
|
245
253
|
"tags": [],
|
|
246
|
-
"text": "If `true`, the checkbox will visually appear as indeterminate.\nOnly JavaScript can set the objects `indeterminate` property. See [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes)
|
|
254
|
+
"text": "If `true`, the checkbox will visually appear as indeterminate.\nOnly JavaScript can set the objects `indeterminate` property. See [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes).\nHas no visual style when `variant` is `pill`."
|
|
247
255
|
},
|
|
248
256
|
"getter": false,
|
|
249
257
|
"setter": false,
|
|
@@ -300,7 +308,7 @@ export class PdsCheckbox {
|
|
|
300
308
|
"optional": false,
|
|
301
309
|
"docs": {
|
|
302
310
|
"tags": [],
|
|
303
|
-
"text": "Visually hides the label text for instances where only the checkbox should be displayed. Label remains accessible to assistive technology such as screen readers."
|
|
311
|
+
"text": "Visually hides the label text for instances where only the checkbox should be displayed. Label remains accessible to assistive technology such as screen readers. Ignored when `variant` is `pill`."
|
|
304
312
|
},
|
|
305
313
|
"getter": false,
|
|
306
314
|
"setter": false,
|
|
@@ -363,6 +371,29 @@ export class PdsCheckbox {
|
|
|
363
371
|
"setter": false,
|
|
364
372
|
"reflect": false,
|
|
365
373
|
"attribute": "value"
|
|
374
|
+
},
|
|
375
|
+
"variant": {
|
|
376
|
+
"type": "string",
|
|
377
|
+
"mutable": false,
|
|
378
|
+
"complexType": {
|
|
379
|
+
"original": "'default' | 'pill'",
|
|
380
|
+
"resolved": "\"default\" | \"pill\"",
|
|
381
|
+
"references": {}
|
|
382
|
+
},
|
|
383
|
+
"required": false,
|
|
384
|
+
"optional": false,
|
|
385
|
+
"docs": {
|
|
386
|
+
"tags": [{
|
|
387
|
+
"name": "defaultValue",
|
|
388
|
+
"text": "default"
|
|
389
|
+
}],
|
|
390
|
+
"text": "Sets the style variant of the checkbox. `pill` renders the label as a pill-shaped choice; the native input still handles keyboard, form, and screen reader behavior."
|
|
391
|
+
},
|
|
392
|
+
"getter": false,
|
|
393
|
+
"setter": false,
|
|
394
|
+
"reflect": false,
|
|
395
|
+
"attribute": "variant",
|
|
396
|
+
"defaultValue": "'default'"
|
|
366
397
|
}
|
|
367
398
|
};
|
|
368
399
|
}
|
|
@@ -8,6 +8,13 @@ export default {
|
|
|
8
8
|
invalid: false,
|
|
9
9
|
hideLabel: false,
|
|
10
10
|
required: false,
|
|
11
|
+
variant: 'default',
|
|
12
|
+
},
|
|
13
|
+
argTypes: {
|
|
14
|
+
variant: {
|
|
15
|
+
control: { type: 'select' },
|
|
16
|
+
options: ['default', 'pill'],
|
|
17
|
+
},
|
|
11
18
|
},
|
|
12
19
|
component: 'pds-checkbox',
|
|
13
20
|
parameters: {},
|
|
@@ -28,6 +35,7 @@ const BaseTemplate = (args) =>
|
|
|
28
35
|
name=${args.name}
|
|
29
36
|
?required=${args.required}
|
|
30
37
|
value=${args.value}
|
|
38
|
+
variant=${args.variant}
|
|
31
39
|
/>`;
|
|
32
40
|
|
|
33
41
|
export const Default = BaseTemplate.bind();
|
|
@@ -72,3 +80,33 @@ Invalid.args = {
|
|
|
72
80
|
label: 'Label text',
|
|
73
81
|
invalid: true,
|
|
74
82
|
};
|
|
83
|
+
|
|
84
|
+
export const Pill = BaseTemplate.bind();
|
|
85
|
+
Pill.args = {
|
|
86
|
+
componentId: 'pill',
|
|
87
|
+
label: 'Label text',
|
|
88
|
+
variant: 'pill',
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const PillGroupTemplate = (args) =>
|
|
92
|
+
html`<fieldset style="border: 0; margin: 0; padding: 0;">
|
|
93
|
+
<legend style="font: var(--pine-typography-body-medium); margin-block-end: var(--pine-dimension-xs); padding: 0;">Send to</legend>
|
|
94
|
+
<pds-box wrap gap="xs">
|
|
95
|
+
<pds-checkbox component-id="pill-email" name="channels" value="email" label="Email" variant="pill" checked ?disabled=${args.disabled} ?invalid=${args.invalid}></pds-checkbox>
|
|
96
|
+
<pds-checkbox component-id="pill-sms" name="channels" value="sms" label="SMS" variant="pill" ?disabled=${args.disabled} ?invalid=${args.invalid}></pds-checkbox>
|
|
97
|
+
<pds-checkbox component-id="pill-push" name="channels" value="push" label="Push notification" variant="pill" ?disabled=${args.disabled} ?invalid=${args.invalid}></pds-checkbox>
|
|
98
|
+
</pds-box>
|
|
99
|
+
</fieldset>`;
|
|
100
|
+
|
|
101
|
+
export const PillGroup = PillGroupTemplate.bind();
|
|
102
|
+
PillGroup.args = {};
|
|
103
|
+
|
|
104
|
+
export const PillDisabled = PillGroupTemplate.bind();
|
|
105
|
+
PillDisabled.args = {
|
|
106
|
+
disabled: true,
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export const PillInvalid = PillGroupTemplate.bind();
|
|
110
|
+
PillInvalid.args = {
|
|
111
|
+
invalid: true,
|
|
112
|
+
};
|
|
@@ -240,7 +240,7 @@ export class PdsChip {
|
|
|
240
240
|
const hostClass = this.classNames();
|
|
241
241
|
const hostStyles = this.hostStyles;
|
|
242
242
|
this.hostKeeper.record(hostClass, hostStyles);
|
|
243
|
-
return (h(Host, { key: '
|
|
243
|
+
return (h(Host, { key: '0e67ea3700e8a8e1ad3049b6eafced6934262335', class: hostClass, id: this.componentId, style: hostStyles }, this.setChipContent(), this.effectiveVariant === 'tag' && this.renderCloseButton()));
|
|
244
244
|
}
|
|
245
245
|
static get is() { return "pds-chip"; }
|
|
246
246
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
display: block;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
:host([truncate]) {
|
|
6
|
+
display: block;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
5
10
|
:host([aria-disabled=true]) .pds-combobox__input-icon {
|
|
6
11
|
color: var(--pine-color-text-disabled);
|
|
7
12
|
pointer-events: none;
|
|
@@ -184,6 +189,14 @@
|
|
|
184
189
|
flex-shrink: 0;
|
|
185
190
|
}
|
|
186
191
|
|
|
192
|
+
.pds-combobox__listbox--truncate .pds-combobox__option-label {
|
|
193
|
+
flex: 1 1 auto;
|
|
194
|
+
overflow-wrap: normal;
|
|
195
|
+
}
|
|
196
|
+
.pds-combobox__listbox--truncate .pds-combobox__option-check {
|
|
197
|
+
flex-shrink: 0;
|
|
198
|
+
}
|
|
199
|
+
|
|
187
200
|
.pds-combobox__option-check {
|
|
188
201
|
color: currentColor;
|
|
189
202
|
font-size: var(--pine-dimension-150);
|
|
@@ -530,6 +543,26 @@
|
|
|
530
543
|
flex-shrink: 0;
|
|
531
544
|
}
|
|
532
545
|
|
|
546
|
+
.pds-combobox__button-trigger--truncate {
|
|
547
|
+
max-width: 100%;
|
|
548
|
+
}
|
|
549
|
+
.pds-combobox__button-trigger--truncate .pds-combobox__button-trigger-label {
|
|
550
|
+
overflow-wrap: normal;
|
|
551
|
+
}
|
|
552
|
+
.pds-combobox__button-trigger--truncate .pds-combobox__button-trigger-chevron {
|
|
553
|
+
flex-shrink: 0;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.pds-combobox__button-trigger-text,
|
|
557
|
+
.pds-combobox__listbox--truncate .pds-combobox__option-text {
|
|
558
|
+
display: block;
|
|
559
|
+
flex: 1 1 auto;
|
|
560
|
+
min-width: 0;
|
|
561
|
+
overflow: hidden;
|
|
562
|
+
text-overflow: ellipsis;
|
|
563
|
+
white-space: nowrap;
|
|
564
|
+
}
|
|
565
|
+
|
|
533
566
|
.pds-combobox__button-trigger--input-shape {
|
|
534
567
|
border-radius: var(--pine-dimension-125);
|
|
535
568
|
font: var(--pine-typography-body);
|
|
@@ -140,6 +140,13 @@ export class PdsCombobox {
|
|
|
140
140
|
* @default 'pill'
|
|
141
141
|
*/
|
|
142
142
|
this.triggerShape = 'pill';
|
|
143
|
+
/**
|
|
144
|
+
* Determines whether the button trigger's label and the option labels should truncate and display with an ellipsis.
|
|
145
|
+
* When a label overflows, a `title` showing the full label will appear on hover.
|
|
146
|
+
* Chip options, custom layouts and group rows aren't affected.
|
|
147
|
+
* @defaultValue false
|
|
148
|
+
*/
|
|
149
|
+
this.truncate = false;
|
|
143
150
|
/**
|
|
144
151
|
* The sentiment for the chip trigger. Matches Pine chip sentiments.
|
|
145
152
|
* @default 'neutral'
|
|
@@ -436,10 +443,15 @@ export class PdsCombobox {
|
|
|
436
443
|
if (this.usesPanelSearch)
|
|
437
444
|
this.restoreFocusToTrigger();
|
|
438
445
|
};
|
|
446
|
+
this.onButtonTriggerMouseEnter = (event) => {
|
|
447
|
+
this.syncTitle(event.currentTarget, '.pds-combobox__button-trigger-text');
|
|
448
|
+
};
|
|
439
449
|
// Event handler for mouse enter on option
|
|
440
450
|
this.onOptionMouseEnter = (event) => {
|
|
441
|
-
const
|
|
442
|
-
this.
|
|
451
|
+
const row = event.currentTarget;
|
|
452
|
+
if (this.truncate)
|
|
453
|
+
this.syncTitle(row, '.pds-combobox__option-text');
|
|
454
|
+
this.highlightedIndex = Number(row.getAttribute('data-option-index'));
|
|
443
455
|
this.keyboardNavigating = false;
|
|
444
456
|
};
|
|
445
457
|
this.onGroupRowMouseEnter = (event) => {
|
|
@@ -729,6 +741,19 @@ export class PdsCombobox {
|
|
|
729
741
|
this.focusPanel(panelFocusEl);
|
|
730
742
|
}
|
|
731
743
|
}
|
|
744
|
+
// A `title` only while the text is cut, measured on hover. On the span, not the option or trigger,
|
|
745
|
+
// so it isn't read again as their description.
|
|
746
|
+
syncTitle(el, selector) {
|
|
747
|
+
const text = el.querySelector(selector);
|
|
748
|
+
if (!text)
|
|
749
|
+
return;
|
|
750
|
+
if (text.scrollWidth > text.clientWidth) {
|
|
751
|
+
text.title = text.textContent || '';
|
|
752
|
+
}
|
|
753
|
+
else {
|
|
754
|
+
text.removeAttribute('title');
|
|
755
|
+
}
|
|
756
|
+
}
|
|
732
757
|
/**
|
|
733
758
|
* Scrolls just enough to show `el`, as `scrollIntoView({ block: 'nearest' })` does. In the drill-in
|
|
734
759
|
* panel it scrolls the list alone, and never sideways: while a drill-in slide offsets a row past
|
|
@@ -2131,6 +2156,7 @@ export class PdsCombobox {
|
|
|
2131
2156
|
'pds-combobox__listbox--drill-in': this.drillDirection === 'in',
|
|
2132
2157
|
'pds-combobox__listbox--drill-out': this.drillDirection === 'out',
|
|
2133
2158
|
'pds-combobox__listbox--pointer-hover': this.pointerCanHover,
|
|
2159
|
+
'pds-combobox__listbox--truncate': this.truncate,
|
|
2134
2160
|
}, 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",
|
|
2135
2161
|
// Focusable but out of the tab order with panel search, so it can take focus when a
|
|
2136
2162
|
// drilled-in group hides the field. Dropping it while focused would blur the list and close.
|
|
@@ -2302,9 +2328,10 @@ export class PdsCombobox {
|
|
|
2302
2328
|
/** An option's text, after its `data-icon` when it has one. */
|
|
2303
2329
|
renderOptionLabel(option) {
|
|
2304
2330
|
const icon = optionIconOf(option);
|
|
2331
|
+
const label = this.truncate ? (h("span", { key: this.getOptionLabel(option), class: "pds-combobox__option-text" }, this.getOptionLabel(option))) : this.getOptionLabel(option);
|
|
2305
2332
|
if (icon === null)
|
|
2306
|
-
return
|
|
2307
|
-
return (h("span", { class: "pds-combobox__option-label" }, h("pds-icon", { name: icon, size: "regular", "aria-hidden": "true", class: "pds-combobox__option-icon" }),
|
|
2333
|
+
return label;
|
|
2334
|
+
return (h("span", { class: "pds-combobox__option-label" }, h("pds-icon", { name: icon, size: "regular", "aria-hidden": "true", class: "pds-combobox__option-icon" }), label));
|
|
2308
2335
|
}
|
|
2309
2336
|
/** The grouped panel's rows, in the order the panel draws them and the keyboard moves through. */
|
|
2310
2337
|
panelEntries() {
|
|
@@ -2392,7 +2419,9 @@ export class PdsCombobox {
|
|
|
2392
2419
|
'pds-combobox__button-trigger-label--with-icon': icon !== null,
|
|
2393
2420
|
} }, icon !== null && (
|
|
2394
2421
|
// `name`, not `icon`: `icon` also loads URLs and data: SVGs, unsanitized.
|
|
2395
|
-
h("pds-icon", { name: icon, size: "regular", "aria-hidden": "true", class: "pds-combobox__button-trigger-icon" })), this.
|
|
2422
|
+
h("pds-icon", { name: icon, size: "regular", "aria-hidden": "true", class: "pds-combobox__button-trigger-icon" })), this.truncate ? (
|
|
2423
|
+
// Keyed so a new label drops a stale `title`.
|
|
2424
|
+
h("span", { key: this.selectedLabel || this.placeholder, class: "pds-combobox__button-trigger-text" }, this.selectedLabel || this.placeholder)) : (this.selectedLabel || this.placeholder)));
|
|
2396
2425
|
}
|
|
2397
2426
|
/** The selection's icon for the button trigger: the option's own, or else its group's. */
|
|
2398
2427
|
get selectedIcon() {
|
|
@@ -2524,16 +2553,17 @@ export class PdsCombobox {
|
|
|
2524
2553
|
'pds-combobox__button-trigger',
|
|
2525
2554
|
`pds-combobox__button-trigger--${this.triggerVariant}`,
|
|
2526
2555
|
this.triggerShape === 'input' && 'pds-combobox__button-trigger--input-shape',
|
|
2556
|
+
this.truncate && 'pds-combobox__button-trigger--truncate',
|
|
2527
2557
|
]
|
|
2528
2558
|
.filter(Boolean)
|
|
2529
2559
|
.join(' ');
|
|
2530
|
-
return (h(Host, { key: '
|
|
2560
|
+
return (h(Host, { key: '2786062989bc490e87ea382b5c80f7e2758c1a8a', "aria-disabled": this.disabled ? 'true' : null }, h("div", { key: 'b3b272a99528d725a52d3092a3650efacaf54b34', class: "pds-combobox", tabIndex: -1, onFocusout: this.onComboboxFocusOut, part: "combobox" }, this.hasVisibleLabel && (h("label", { key: '8e2e0021e1f60cddfe41b918406c7d76659fbff1', 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 => {
|
|
2531
2561
|
this.inputEl = el;
|
|
2532
2562
|
this.triggerEl = el;
|
|
2533
2563
|
}, class: {
|
|
2534
2564
|
'pds-combobox__input': true,
|
|
2535
2565
|
'pds-combobox__input--invalid': this.isInvalid(),
|
|
2536
|
-
}, 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: '
|
|
2566
|
+
}, 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, onMouseEnter: this.truncate ? this.onButtonTriggerMouseEnter : undefined, ref: el => (this.triggerEl = el), part: "button-trigger" }, this.renderButtonTriggerContent())), this.renderMessages(), h("div", { key: '2216779564fa3f4efd1b4d0972ac045fa0851078', style: { display: 'none' } }, h("slot", { key: '77b344d7301193f435949cbe2be2b28e1d7f6602', onSlotchange: () => this.updateOptions() })), this.renderDropdown(), this.groupDisplay !== 'inline' && [
|
|
2537
2567
|
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 : ''),
|
|
2538
2568
|
// Its own region: sharing one, revealing a row then opening it would leave the text the
|
|
2539
2569
|
// same, and opening the group would go unannounced.
|
|
@@ -3161,6 +3191,29 @@ export class PdsCombobox {
|
|
|
3161
3191
|
"attribute": "trigger-shape",
|
|
3162
3192
|
"defaultValue": "'pill'"
|
|
3163
3193
|
},
|
|
3194
|
+
"truncate": {
|
|
3195
|
+
"type": "boolean",
|
|
3196
|
+
"mutable": false,
|
|
3197
|
+
"complexType": {
|
|
3198
|
+
"original": "boolean",
|
|
3199
|
+
"resolved": "boolean",
|
|
3200
|
+
"references": {}
|
|
3201
|
+
},
|
|
3202
|
+
"required": false,
|
|
3203
|
+
"optional": false,
|
|
3204
|
+
"docs": {
|
|
3205
|
+
"tags": [{
|
|
3206
|
+
"name": "defaultValue",
|
|
3207
|
+
"text": "false"
|
|
3208
|
+
}],
|
|
3209
|
+
"text": "Determines whether the button trigger's label and the option labels should truncate and display with an ellipsis.\nWhen a label overflows, a `title` showing the full label will appear on hover.\nChip options, custom layouts and group rows aren't affected."
|
|
3210
|
+
},
|
|
3211
|
+
"getter": false,
|
|
3212
|
+
"setter": false,
|
|
3213
|
+
"reflect": true,
|
|
3214
|
+
"attribute": "truncate",
|
|
3215
|
+
"defaultValue": "false"
|
|
3216
|
+
},
|
|
3164
3217
|
"chipSentiment": {
|
|
3165
3218
|
"type": "string",
|
|
3166
3219
|
"mutable": false,
|
|
@@ -22,6 +22,7 @@ export default {
|
|
|
22
22
|
trigger: 'input',
|
|
23
23
|
triggerVariant: 'secondary',
|
|
24
24
|
triggerWidth: 'fit-content',
|
|
25
|
+
truncate: false,
|
|
25
26
|
chipSentiment: 'neutral',
|
|
26
27
|
chipLarge: false,
|
|
27
28
|
chipIcon: null,
|
|
@@ -55,6 +56,7 @@ const BaseTemplate = (args) => html`
|
|
|
55
56
|
trigger=${args.trigger}
|
|
56
57
|
trigger-variant=${args.triggerVariant}
|
|
57
58
|
trigger-width=${args.triggerWidth}
|
|
59
|
+
truncate=${args.truncate}
|
|
58
60
|
chip-sentiment=${args.chipSentiment}
|
|
59
61
|
chip-large=${args.chipLarge}
|
|
60
62
|
chip-icon=${args.chipIcon}
|
|
@@ -604,6 +606,48 @@ OptionIconsWithGroups.args = {
|
|
|
604
606
|
],
|
|
605
607
|
};
|
|
606
608
|
|
|
609
|
+
// truncate: a long label in the trigger and the options, without it (wrapping, as by default) and
|
|
610
|
+
// with it (one line, with an ellipsis). Options with an icon and in a group truncate too.
|
|
611
|
+
const truncateOptions = [
|
|
612
|
+
{ id: 'onboarding', text: 'Assessment for the quarterly onboarding cohort', icon: 'assessment' },
|
|
613
|
+
{ id: 'contact', text: 'Contact who joined during the spring membership launch', icon: 'contact' },
|
|
614
|
+
{ id: 'broadcast', text: 'Broadcast to everyone who joined the spring membership launch', group: 'Email', groupIcon: 'mail' },
|
|
615
|
+
{ id: 'sequence', text: 'Sequence', group: 'Email' },
|
|
616
|
+
{ id: 'tag', text: 'Tag', icon: 'hashtag' },
|
|
617
|
+
];
|
|
618
|
+
|
|
619
|
+
export const Truncate = (args) => html`
|
|
620
|
+
<div style="display: flex; gap: 48px; min-height: 360px;">
|
|
621
|
+
${[false, true].map(truncate => html`
|
|
622
|
+
<pds-combobox
|
|
623
|
+
component-id=${`combobox-truncate-${truncate ? 'on' : 'off'}`}
|
|
624
|
+
label=${truncate ? 'With truncate' : 'Without truncate'}
|
|
625
|
+
trigger=${args.trigger}
|
|
626
|
+
trigger-shape=${args.triggerShape}
|
|
627
|
+
trigger-variant=${args.triggerVariant}
|
|
628
|
+
mode="select-only"
|
|
629
|
+
trigger-width=${args.triggerWidth}
|
|
630
|
+
dropdown-width=${args.triggerWidth}
|
|
631
|
+
value=${args.value}
|
|
632
|
+
?truncate=${truncate}
|
|
633
|
+
.options=${args.options}
|
|
634
|
+
></pds-combobox>`)}
|
|
635
|
+
</div>`;
|
|
636
|
+
|
|
637
|
+
Truncate.args = {
|
|
638
|
+
trigger: 'button',
|
|
639
|
+
triggerShape: 'input',
|
|
640
|
+
triggerVariant: 'secondary',
|
|
641
|
+
triggerWidth: '240px',
|
|
642
|
+
value: 'onboarding',
|
|
643
|
+
options: truncateOptions,
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
Truncate.argTypes = {
|
|
647
|
+
trigger: { control: 'select', options: ['input', 'button'] },
|
|
648
|
+
triggerShape: { control: 'select', options: ['pill', 'input'] },
|
|
649
|
+
};
|
|
650
|
+
|
|
607
651
|
// A large action catalog: many groups, a button trigger and panel search. The narrower widths
|
|
608
652
|
// leave room for the flyout beside the dropdown on a narrow canvas.
|
|
609
653
|
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: '8a01369c4d1817dd083b1ac714ff7c02920f817e', class: { [`pds-container--${this.size}`]: isNamed }, style: Object.keys(hostStyle).length ? hostStyle : undefined }, h(Tag, { key: '7428cb0040896dc11004065cf91ae9d3c3a99c49', part: "container" }, h("slot", { key: '5a5b5bbc87c03afc23f1c9a0523fced8c0795efb' }))));
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "pds-container"; }
|
|
31
31
|
static get encapsulation() { return "shadow"; }
|
|
@@ -107,7 +107,7 @@ export class PdsCopytext {
|
|
|
107
107
|
render() {
|
|
108
108
|
const hostClass = this.classNames();
|
|
109
109
|
this.hostKeeper.record(hostClass);
|
|
110
|
-
return (h(Host, { key: '
|
|
110
|
+
return (h(Host, { key: '35d74eaecedd432f7852545522f9ce72396f9ab9', class: hostClass, id: this.componentId }, h("pds-button", { key: '9550ce2fb21166e9726b08b5928036244c7b729e', type: "button", variant: "unstyled", onClick: this.handleClick }, h("span", { key: '47af45448759c911ca4ca03d0158088289b622e0', ref: (el) => this.valueSpanEl = el }, this.value), h("pds-icon", { key: '3ddab7c3e7063843cd606ffb19481cae3792db43', "aria-hidden": "true", icon: copyIcon, size: "16px" }))));
|
|
111
111
|
}
|
|
112
112
|
static get is() { return "pds-copytext"; }
|
|
113
113
|
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: 'a761f0ca6eeedcac3e4bd90760aa9781cd37dcdc', 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: '2eb04f9fd4e2f7a2437145d250c629c2cc8a0bf6', 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: '98c325fbba8ea78b2d409bc77099db3206738508', 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: 'cb8483febe1b485058b7bb4271b749981a7747a1', 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: '072cc8552bd33c4a00d216f15a5a848cfc97fd92', 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: 'b15b087506c1292f9d67e531e8d935069749c09d', class: "pds-drawer-content" }, h("slot", { key: '9c60ca75c7905e7e994f9c41eee213b962afb833' })));
|
|
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: 'a4eec0aff617c605b94f8d3b9ec1e2d98cded6fb', class: "pds-drawer__footer" }, h("slot", { key: '6dc379c940e37edfd05d99728be9dff58ca1d717' })));
|
|
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: '6b9338e5dbf7a7e580c11b28c95ca53693528382', class: "pds-drawer__header" }, h("slot", { key: '0990fbcf94c0c438b98cf1e8945f1e2fd9aa33dc' })));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "pds-drawer-header"; }
|
|
15
15
|
static get originalStyleUrls() {
|
|
@@ -148,11 +148,11 @@ export class PdsDrawer {
|
|
|
148
148
|
this.open = false;
|
|
149
149
|
}
|
|
150
150
|
render() {
|
|
151
|
-
return (h(Host, { key: '
|
|
151
|
+
return (h(Host, { key: '7cf13256457914e48e8fde422832a2a52ee0c13b', class: {
|
|
152
152
|
'pds-drawer': true,
|
|
153
153
|
[`pds-drawer--${this.side}`]: true,
|
|
154
154
|
[`pds-drawer--${this.size}`]: true,
|
|
155
|
-
} }, h("pds-modal", { key: '
|
|
155
|
+
} }, h("pds-modal", { key: 'd4ceb5b4c0b03930aa3d001ae1bbbfbf449bde33', class: { 'pds-drawer__modal': true, 'pds-drawer__modal--modal': this.modal }, ref: (el) => (this.modalEl = el), componentId: this.componentId, open: this.open, scrollable: this.scrollable, disableTopLayer: !this.modal, backdropDismiss: this.lightDismiss, disableInitialFocus: !this.modal && this.initialFocus === 'none' }, h("slot", { key: '41bfdea76282b333ca6950048999cb9d94e69438' }))));
|
|
156
156
|
}
|
|
157
157
|
static get is() { return "pds-drawer"; }
|
|
158
158
|
static get originalStyleUrls() {
|