@pine-ds/core 4.3.0 → 4.4.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/closest.js +1 -1
- package/components/floating-ui.dom.js +1 -1
- package/components/i18n-format.js +1 -1
- package/components/index.d.ts +2 -0
- package/components/index.js +1 -1
- package/components/index2.js +1 -1
- package/components/mock-pds-modal.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 +2 -2
- package/components/pds-container.js +1 -1
- package/components/pds-copytext.js +1 -1
- package/components/pds-datepicker.d.ts +11 -0
- package/components/pds-datepicker.js +1 -0
- 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-input.js +1 -1
- package/components/pds-input2.js +1 -0
- 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/utils.js +1 -1
- package/dist/cjs/closest-D0qyYtJ3.js +20 -0
- package/dist/cjs/{floating-ui.dom-BZk7Blsu.js → floating-ui.dom-Dc8Anyel.js} +79 -0
- package/dist/cjs/{i18n-format-CrpIhahc.js → i18n-format-BD0PmYzT.js} +1 -0
- package/dist/cjs/{index-CaLa1zy9.js → index-Bl5KnQay.js} +4 -1
- package/dist/cjs/{index-DYvijwA6.js → index-D-QQKB0y.js} +8 -0
- package/dist/cjs/loader.cjs.js +2 -2
- 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 +1 -1
- package/dist/cjs/pds-avatar.cjs.entry.js +2 -2
- package/dist/cjs/pds-box.cjs.entry.js +2 -2
- package/dist/cjs/pds-button.cjs.entry.js +53 -4
- package/dist/cjs/pds-checkbox.cjs.entry.js +14 -6
- package/dist/cjs/pds-chip.cjs.entry.js +6 -6
- package/dist/cjs/pds-combobox.cjs.entry.js +1225 -117
- package/dist/cjs/pds-container.cjs.entry.js +2 -2
- package/dist/cjs/pds-copytext.cjs.entry.js +5 -5
- package/dist/cjs/pds-datepicker.cjs.entry.js +1962 -0
- package/dist/cjs/pds-divider.cjs.entry.js +2 -2
- package/dist/cjs/pds-drawer-content.cjs.entry.js +2 -2
- package/dist/cjs/pds-drawer-footer.cjs.entry.js +2 -2
- package/dist/cjs/pds-drawer-header.cjs.entry.js +2 -2
- package/dist/cjs/pds-drawer.cjs.entry.js +11 -4
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +2 -2
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +11 -4
- package/dist/cjs/pds-filter.cjs.entry.js +3 -3
- package/dist/cjs/pds-filters.cjs.entry.js +2 -2
- package/dist/cjs/pds-icon.cjs.entry.js +1 -1
- package/dist/cjs/pds-image.cjs.entry.js +3 -3
- package/dist/cjs/pds-input.cjs.entry.js +8 -5
- package/dist/cjs/pds-link.cjs.entry.js +5 -5
- package/dist/cjs/pds-loader.cjs.entry.js +2 -2
- package/dist/cjs/pds-modal-content.cjs.entry.js +3 -3
- package/dist/cjs/pds-modal-footer.cjs.entry.js +2 -2
- package/dist/cjs/pds-modal-header.cjs.entry.js +2 -2
- package/dist/cjs/pds-modal.cjs.entry.js +12 -6
- package/dist/cjs/pds-multiselect.cjs.entry.js +264 -51
- package/dist/cjs/pds-popover.cjs.entry.js +30 -12
- package/dist/cjs/pds-progress.cjs.entry.js +3 -3
- package/dist/cjs/pds-property.cjs.entry.js +2 -2
- package/dist/cjs/pds-radio-group.cjs.entry.js +5 -5
- package/dist/cjs/pds-radio.cjs.entry.js +5 -5
- package/dist/cjs/pds-row.cjs.entry.js +2 -2
- package/dist/cjs/pds-select.cjs.entry.js +3 -3
- package/dist/cjs/pds-sortable-item.cjs.entry.js +3 -3
- package/dist/cjs/pds-sortable.cjs.entry.js +2 -2
- package/dist/cjs/pds-switch.cjs.entry.js +14 -6
- package/dist/cjs/pds-tab.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-body.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-cell.cjs.entry.js +5 -5
- 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 +1 -1
- package/dist/cjs/pds-tabpanel.cjs.entry.js +2 -2
- package/dist/cjs/pds-tabs.cjs.entry.js +2 -2
- package/dist/cjs/pds-text.cjs.entry.js +5 -5
- package/dist/cjs/pds-textarea.cjs.entry.js +14 -9
- package/dist/cjs/pds-toast.cjs.entry.js +4 -4
- package/dist/cjs/pds-tooltip.cjs.entry.js +4 -4
- package/dist/cjs/pine-core.cjs.js +2 -2
- package/dist/cjs/{truncation-tooltip-Bps7_rUy.js → truncation-tooltip-CYgQfBLt.js} +1 -1
- package/dist/cjs/{utils-KWALOgy9.js → utils-BhRmyxT8.js} +35 -4
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/pds-button/pds-button.js +53 -2
- package/dist/collection/components/pds-checkbox/pds-checkbox.css +7 -0
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +19 -3
- package/dist/collection/components/pds-chip/pds-chip.js +1 -1
- package/dist/collection/components/pds-combobox/grouped-options-panel.js +262 -0
- package/dist/collection/components/pds-combobox/pds-combobox.css +242 -13
- package/dist/collection/components/pds-combobox/pds-combobox.js +1128 -114
- package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +240 -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/calendar-portal.js +136 -0
- package/dist/collection/components/pds-datepicker/date-utils.js +132 -0
- package/dist/collection/components/pds-datepicker/datepicker-interface.js +1 -0
- package/dist/collection/components/pds-datepicker/pds-datepicker.css +545 -0
- package/dist/collection/components/pds-datepicker/pds-datepicker.js +2406 -0
- package/dist/collection/components/pds-datepicker/presets.js +96 -0
- package/dist/collection/components/pds-datepicker/stories/pds-datepicker.stories.js +195 -0
- package/dist/collection/components/pds-datepicker/value.js +238 -0
- 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 -0
- package/dist/collection/components/pds-drawer/pds-drawer.js +9 -2
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +9 -2
- 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 +6 -3
- 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.css +16 -0
- package/dist/collection/components/pds-modal/pds-modal.js +10 -4
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
- package/dist/collection/components/pds-multiselect/pds-multiselect.css +19 -1
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +390 -47
- package/dist/collection/components/pds-multiselect/stories/pds-multiselect.stories.js +136 -1
- package/dist/collection/components/pds-popover/pds-popover.js +29 -11
- 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.css +3 -0
- package/dist/collection/components/pds-switch/pds-switch.js +20 -4
- 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-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 +11 -6
- 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/closest.js +8 -0
- package/dist/collection/utils/utils.js +33 -4
- package/dist/docs.json +1933 -59
- package/dist/esm/closest-DHPzKMVS.js +17 -0
- package/dist/esm/{floating-ui.dom-DDtwbwIl.js → floating-ui.dom-BPqJgIq6.js} +79 -1
- package/dist/esm/{i18n-format-BKsJZTyn.js → i18n-format-BJgZHCWe.js} +1 -1
- package/dist/esm/{index-DcT8--Dn.js → index-CB8Yh0Nt.js} +4 -1
- package/dist/esm/{index-BU1hN5Vy.js → index-DxI-61GK.js} +5 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mock-pds-modal.entry.js +3 -3
- package/dist/esm/pds-accordion.entry.js +2 -2
- package/dist/esm/pds-alert.entry.js +1 -1
- package/dist/esm/pds-avatar.entry.js +2 -2
- package/dist/esm/pds-box.entry.js +2 -2
- package/dist/esm/pds-button.entry.js +53 -4
- package/dist/esm/pds-checkbox.entry.js +14 -6
- package/dist/esm/pds-chip.entry.js +6 -6
- package/dist/esm/pds-combobox.entry.js +1225 -117
- package/dist/esm/pds-container.entry.js +2 -2
- package/dist/esm/pds-copytext.entry.js +5 -5
- package/dist/esm/pds-datepicker.entry.js +1960 -0
- package/dist/esm/pds-divider.entry.js +2 -2
- package/dist/esm/pds-drawer-content.entry.js +2 -2
- package/dist/esm/pds-drawer-footer.entry.js +2 -2
- package/dist/esm/pds-drawer-header.entry.js +2 -2
- package/dist/esm/pds-drawer.entry.js +11 -4
- package/dist/esm/pds-dropdown-menu-item.entry.js +2 -2
- package/dist/esm/pds-dropdown-menu-separator.entry.js +2 -2
- package/dist/esm/pds-dropdown-menu.entry.js +11 -4
- package/dist/esm/pds-filter.entry.js +3 -3
- package/dist/esm/pds-filters.entry.js +2 -2
- package/dist/esm/pds-icon.entry.js +1 -1
- package/dist/esm/pds-image.entry.js +3 -3
- package/dist/esm/pds-input.entry.js +8 -5
- package/dist/esm/pds-link.entry.js +5 -5
- package/dist/esm/pds-loader.entry.js +2 -2
- package/dist/esm/pds-modal-content.entry.js +3 -3
- package/dist/esm/pds-modal-footer.entry.js +2 -2
- package/dist/esm/pds-modal-header.entry.js +2 -2
- package/dist/esm/pds-modal.entry.js +12 -6
- package/dist/esm/pds-multiselect.entry.js +264 -51
- package/dist/esm/pds-popover.entry.js +30 -12
- package/dist/esm/pds-progress.entry.js +3 -3
- package/dist/esm/pds-property.entry.js +2 -2
- package/dist/esm/pds-radio-group.entry.js +5 -5
- package/dist/esm/pds-radio.entry.js +5 -5
- package/dist/esm/pds-row.entry.js +2 -2
- package/dist/esm/pds-select.entry.js +3 -3
- package/dist/esm/pds-sortable-item.entry.js +3 -3
- package/dist/esm/pds-sortable.entry.js +2 -2
- package/dist/esm/pds-switch.entry.js +14 -6
- package/dist/esm/pds-tab.entry.js +1 -1
- package/dist/esm/pds-table-body.entry.js +2 -2
- package/dist/esm/pds-table-cell.entry.js +5 -5
- package/dist/esm/pds-table-head-cell.entry.js +4 -4
- 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 +1 -1
- package/dist/esm/pds-tabpanel.entry.js +2 -2
- package/dist/esm/pds-tabs.entry.js +2 -2
- package/dist/esm/pds-text.entry.js +5 -5
- package/dist/esm/pds-textarea.entry.js +14 -9
- package/dist/esm/pds-toast.entry.js +4 -4
- package/dist/esm/pds-tooltip.entry.js +4 -4
- package/dist/esm/pine-core.js +3 -3
- package/dist/esm/{truncation-tooltip-CdtEBn_5.js → truncation-tooltip-_902ENWC.js} +1 -1
- package/dist/esm/{utils-u_0lxWnH.js → utils-OYK5-nwe.js} +34 -5
- package/dist/esm-es5/closest-DHPzKMVS.js +1 -0
- package/dist/esm-es5/floating-ui.dom-BPqJgIq6.js +1 -0
- package/dist/esm-es5/{i18n-format-BKsJZTyn.js → i18n-format-BJgZHCWe.js} +1 -1
- package/dist/esm-es5/index-CB8Yh0Nt.js +2 -0
- package/dist/esm-es5/index-DxI-61GK.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 -0
- 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/{truncation-tooltip-CdtEBn_5.js → truncation-tooltip-_902ENWC.js} +1 -1
- package/dist/esm-es5/utils-OYK5-nwe.js +1 -0
- package/dist/pine-core/p-0414092a.system.entry.js +1 -0
- package/dist/pine-core/p-04807201.entry.js +1 -0
- package/dist/pine-core/{p-cfcb89d1.system.entry.js → p-07f0d168.system.entry.js} +1 -1
- package/dist/pine-core/p-08f5d19c.entry.js +1 -0
- package/dist/pine-core/{p-d70aa0c7.system.entry.js → p-0aaf8faa.system.entry.js} +1 -1
- package/dist/pine-core/p-0bad5955.entry.js +1 -0
- package/dist/pine-core/{p-99f300ef.system.entry.js → p-0c3bf377.system.entry.js} +1 -1
- package/dist/pine-core/p-0ce79cd0.entry.js +1 -0
- package/dist/pine-core/{p-f682f08a.system.entry.js → p-1057b8c3.system.entry.js} +1 -1
- package/dist/pine-core/{p-089606b8.system.entry.js → p-108c910a.system.entry.js} +1 -1
- package/dist/pine-core/{p-ea986474.system.entry.js → p-166f61a6.system.entry.js} +1 -1
- package/dist/pine-core/{p-95defb53.entry.js → p-16c8f5e3.entry.js} +1 -1
- package/dist/pine-core/p-16e258d1.entry.js +1 -0
- package/dist/pine-core/{p-a8f1a48d.entry.js → p-1be33c95.entry.js} +1 -1
- package/dist/pine-core/{p-70fb83d4.entry.js → p-1e3a31da.entry.js} +1 -1
- package/dist/pine-core/{p-12941e0d.entry.js → p-1f228db9.entry.js} +1 -1
- package/dist/pine-core/p-257c6ef9.entry.js +1 -0
- package/dist/pine-core/p-26415245.system.entry.js +1 -0
- package/dist/pine-core/p-26e1e5bb.entry.js +1 -0
- package/dist/pine-core/p-27c06bf8.entry.js +2 -0
- package/dist/pine-core/p-31aee437.entry.js +1 -0
- package/dist/pine-core/p-330a76f6.system.entry.js +1 -0
- package/dist/pine-core/{p-4ebdb90b.system.entry.js → p-33c63be6.system.entry.js} +1 -1
- package/dist/pine-core/{p-c5b6b545.entry.js → p-344609f9.entry.js} +2 -2
- package/dist/pine-core/{p-2dbc90ba.entry.js → p-3a1711c1.entry.js} +1 -1
- package/dist/pine-core/p-3a9c58bd.system.entry.js +1 -0
- package/dist/pine-core/{p-32fc82c2.entry.js → p-3ebd543f.entry.js} +1 -1
- package/dist/pine-core/p-3fbcb0c8.system.entry.js +1 -0
- package/dist/pine-core/{p-e08e4ca7.entry.js → p-427b4aeb.entry.js} +1 -1
- package/dist/pine-core/{p-f5cf98be.system.entry.js → p-42bd87ea.system.entry.js} +1 -1
- package/dist/pine-core/{p-8d1e7b3c.system.entry.js → p-43c691bf.system.entry.js} +1 -1
- package/dist/pine-core/p-4566d659.system.entry.js +1 -0
- package/dist/pine-core/{p-b9a857fc.system.entry.js → p-4b8cf04a.system.entry.js} +1 -1
- package/dist/pine-core/p-4d6f471c.entry.js +1 -0
- package/dist/pine-core/{p-ec04d4c3.entry.js → p-4e7580c4.entry.js} +1 -1
- package/dist/pine-core/{p-fbb72e66.system.entry.js → p-4f4a2d2a.system.entry.js} +1 -1
- package/dist/pine-core/{p-b8a5597d.entry.js → p-5211aba7.entry.js} +1 -1
- package/dist/pine-core/{p-7e4729e0.entry.js → p-524b7d3f.entry.js} +1 -1
- package/dist/pine-core/{p-c08b1697.entry.js → p-5613c64c.entry.js} +1 -1
- package/dist/pine-core/{p-5a8345e2.entry.js → p-5bb24cb4.entry.js} +1 -1
- package/dist/pine-core/{p-73c3a73f.entry.js → p-5bb80b3c.entry.js} +1 -1
- package/dist/pine-core/{p-e039ebb6.system.entry.js → p-5c6e0a26.system.entry.js} +1 -1
- package/dist/pine-core/{p-b53d9620.system.entry.js → p-5db57551.system.entry.js} +1 -1
- package/dist/pine-core/{p-6b260a97.entry.js → p-5eb00ba5.entry.js} +1 -1
- package/dist/pine-core/p-61756414.system.entry.js +1 -0
- package/dist/pine-core/{p-08196d6c.entry.js → p-682e9e8f.entry.js} +1 -1
- package/dist/pine-core/p-6965db1d.entry.js +1 -0
- package/dist/pine-core/{p-317337e4.entry.js → p-6b180ee2.entry.js} +1 -1
- package/dist/pine-core/{p-d33d65f6.entry.js → p-6c53962f.entry.js} +1 -1
- package/dist/pine-core/p-6da6520b.system.entry.js +3 -0
- package/dist/pine-core/{p-bd9b2931.system.entry.js → p-6e3bf862.system.entry.js} +1 -1
- package/dist/pine-core/{p-9d77f2f8.system.entry.js → p-71c9f866.system.entry.js} +1 -1
- package/dist/pine-core/{p-a616385b.system.entry.js → p-7265b94c.system.entry.js} +1 -1
- package/dist/pine-core/{p-55532d56.system.entry.js → p-74229b5e.system.entry.js} +1 -1
- package/dist/pine-core/p-7512c2d4.system.entry.js +1 -0
- package/dist/pine-core/p-76db406d.system.entry.js +1 -0
- package/dist/pine-core/{p-3b555f06.system.entry.js → p-79aa5f43.system.entry.js} +1 -1
- package/dist/pine-core/{p-77082557.system.entry.js → p-7bbcda0f.system.entry.js} +1 -1
- package/dist/pine-core/p-7c8946e6.entry.js +1 -0
- package/dist/pine-core/p-7c98c90a.system.entry.js +1 -0
- package/dist/pine-core/p-81292c03.system.entry.js +1 -0
- package/dist/pine-core/p-81300046.system.entry.js +1 -0
- package/dist/pine-core/{p-93c52e2b.system.entry.js → p-8252cd84.system.entry.js} +1 -1
- package/dist/pine-core/p-84ba0e6a.system.entry.js +1 -0
- package/dist/pine-core/{p-45d55983.entry.js → p-86fc0bfa.entry.js} +1 -1
- package/dist/pine-core/p-90692bb6.entry.js +1 -0
- package/dist/pine-core/{p-67fc26e5.system.entry.js → p-90ea812c.system.entry.js} +1 -1
- package/dist/pine-core/p-948826db.entry.js +1 -0
- package/dist/pine-core/{p-35edd8b0.entry.js → p-9b66642d.entry.js} +1 -1
- package/dist/pine-core/p-BJgZHCWe.js +1 -0
- package/dist/pine-core/p-BPqJgIq6.js +1 -0
- package/dist/pine-core/p-BSRFZB4I.system.js +1 -0
- package/dist/pine-core/p-BZsj6eAn.system.js +1 -0
- package/dist/pine-core/p-CB8Yh0Nt.js +2 -0
- package/dist/pine-core/{p-B2qvvB3q.system.js → p-CBu9UrXr.system.js} +1 -1
- package/dist/pine-core/p-COtCa1Md.system.js +1 -0
- package/dist/pine-core/p-CTQZ2fkv.system.js +1 -0
- package/dist/pine-core/{p-B2nn1gSd.js → p-CnM3cCof.js} +1 -1
- package/dist/pine-core/p-CnO10OxH.system.js +1 -0
- package/dist/pine-core/p-D-akEPIU.system.js +2 -0
- package/dist/pine-core/p-DHPzKMVS.js +1 -0
- package/dist/pine-core/p-Dx8tEj0U.system.js +1 -0
- package/dist/pine-core/p-DxI-61GK.js +1 -0
- package/dist/pine-core/p-OYK5-nwe.js +1 -0
- package/dist/pine-core/p-a10af84b.system.entry.js +1 -0
- package/dist/pine-core/p-a21b530a.system.entry.js +1 -0
- package/dist/pine-core/{p-b0becff3.system.entry.js → p-a85535a4.system.entry.js} +1 -1
- package/dist/pine-core/p-abc0fe2f.system.entry.js +1 -0
- package/dist/pine-core/p-ac6a5bf0.entry.js +1 -0
- package/dist/pine-core/{p-5f5339ab.entry.js → p-b0526f98.entry.js} +1 -1
- package/dist/pine-core/p-b130b716.entry.js +1 -0
- package/dist/pine-core/{p-4cbb691f.entry.js → p-b195d345.entry.js} +1 -1
- package/dist/pine-core/{p-5c5bd609.entry.js → p-b4923acf.entry.js} +1 -1
- package/dist/pine-core/{p-15a0fa0a.system.entry.js → p-b4e440e3.system.entry.js} +1 -1
- package/dist/pine-core/p-b8693a87.entry.js +1 -0
- package/dist/pine-core/{p-bf025e38.entry.js → p-b8ada1eb.entry.js} +1 -1
- package/dist/pine-core/{p-a6a269da.system.entry.js → p-bb85bbb5.system.entry.js} +1 -1
- package/dist/pine-core/{p-fa8d3155.system.entry.js → p-bbc539bc.system.entry.js} +2 -2
- package/dist/pine-core/{p-f26dcbc2.system.entry.js → p-bf833976.system.entry.js} +1 -1
- package/dist/pine-core/{p-e055c543.entry.js → p-c23097af.entry.js} +1 -1
- package/dist/pine-core/p-c2dd84bd.system.entry.js +1 -0
- package/dist/pine-core/{p-441682f4.system.entry.js → p-c4520b04.system.entry.js} +1 -1
- package/dist/pine-core/{p-f1365550.entry.js → p-c4f68dfc.entry.js} +1 -1
- package/dist/pine-core/{p-fa2a786d.system.entry.js → p-c6fa6744.system.entry.js} +1 -1
- package/dist/pine-core/p-c7dba815.entry.js +1 -0
- package/dist/pine-core/p-cb6f55ff.entry.js +1 -0
- package/dist/pine-core/p-cfb8fa7c.system.entry.js +1 -0
- package/dist/pine-core/{p-2bb101c2.entry.js → p-d0d7d1d4.entry.js} +1 -1
- package/dist/pine-core/{p-4f5aacd9.entry.js → p-d1112c8a.entry.js} +1 -1
- package/dist/pine-core/{p-5f3d0c86.system.entry.js → p-d4e91ad9.system.entry.js} +1 -1
- package/dist/pine-core/{p-44222439.entry.js → p-da018dcb.entry.js} +1 -1
- package/dist/pine-core/{p-57784f2f.system.entry.js → p-dc27abe6.system.entry.js} +1 -1
- package/dist/pine-core/{p-f9f7101e.entry.js → p-dc343b6d.entry.js} +1 -1
- package/dist/pine-core/{p-fb774f89.system.entry.js → p-dde753e7.system.entry.js} +1 -1
- package/dist/pine-core/{p-558ac401.entry.js → p-dea3a582.entry.js} +1 -1
- package/dist/pine-core/p-df29fd41.entry.js +1 -0
- package/dist/pine-core/{p-c6426e16.system.entry.js → p-e4e2eae2.system.entry.js} +1 -1
- package/dist/pine-core/{p-1abae35f.entry.js → p-e8668178.entry.js} +1 -1
- package/dist/pine-core/{p-20753e42.system.entry.js → p-eb28d21d.system.entry.js} +1 -1
- package/dist/pine-core/p-eb71a82d.system.entry.js +1 -0
- package/dist/pine-core/{p-13bb89ff.entry.js → p-ed63873c.entry.js} +1 -1
- package/dist/pine-core/{p-5d2f95bd.entry.js → p-f4f6dc36.entry.js} +1 -1
- package/dist/pine-core/{p-6b3d8c2b.system.entry.js → p-f67a0ca8.system.entry.js} +1 -1
- package/dist/pine-core/{p-003df3b3.entry.js → p-fc455968.entry.js} +1 -1
- package/dist/pine-core/{p-02452806.system.entry.js → p-fe3e2ebd.system.entry.js} +1 -1
- package/dist/pine-core/pine-core.css +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-button/pds-button.d.ts +10 -0
- package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +5 -0
- package/dist/types/components/pds-combobox/combobox-interface.d.ts +17 -0
- package/dist/types/components/pds-combobox/grouped-options-panel.d.ts +105 -0
- package/dist/types/components/pds-combobox/pds-combobox.d.ts +235 -3
- package/dist/types/components/pds-datepicker/calendar-portal.d.ts +43 -0
- package/dist/types/components/pds-datepicker/date-utils.d.ts +48 -0
- package/dist/types/components/pds-datepicker/datepicker-interface.d.ts +30 -0
- package/dist/types/components/pds-datepicker/pds-datepicker.d.ts +489 -0
- package/dist/types/components/pds-datepicker/presets.d.ts +23 -0
- package/dist/types/components/pds-datepicker/value.d.ts +47 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +1 -0
- package/dist/types/components/pds-multiselect/multiselect-interface.d.ts +19 -0
- package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +56 -1
- package/dist/types/components/pds-popover/pds-popover.d.ts +1 -0
- package/dist/types/components/pds-switch/pds-switch.d.ts +5 -0
- package/dist/types/components.d.ts +677 -4
- package/dist/types/utils/closest.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +9 -1
- package/dist/vscode.html-data.json +467 -3
- package/hydrate/index.js +3973 -362
- package/hydrate/index.mjs +3973 -362
- package/package.json +2 -2
- package/dist/cjs/closest-BZXvuB_Y.js +0 -11
- package/dist/esm/closest-DnUJodVd.js +0 -9
- package/dist/esm-es5/closest-DnUJodVd.js +0 -1
- package/dist/esm-es5/floating-ui.dom-DDtwbwIl.js +0 -1
- package/dist/esm-es5/index-BU1hN5Vy.js +0 -1
- package/dist/esm-es5/index-DcT8--Dn.js +0 -2
- package/dist/esm-es5/utils-u_0lxWnH.js +0 -1
- package/dist/pine-core/p-026ee6de.entry.js +0 -1
- package/dist/pine-core/p-03f3fc92.system.entry.js +0 -1
- package/dist/pine-core/p-06375326.system.entry.js +0 -1
- package/dist/pine-core/p-1df5e088.entry.js +0 -1
- package/dist/pine-core/p-24214ab9.system.entry.js +0 -1
- package/dist/pine-core/p-250011ba.entry.js +0 -1
- package/dist/pine-core/p-2b420257.entry.js +0 -1
- package/dist/pine-core/p-375eb7f4.entry.js +0 -1
- package/dist/pine-core/p-3b796898.entry.js +0 -1
- package/dist/pine-core/p-3c5489ce.entry.js +0 -1
- package/dist/pine-core/p-3e868906.system.entry.js +0 -1
- package/dist/pine-core/p-464f23e6.entry.js +0 -1
- package/dist/pine-core/p-49c6112a.entry.js +0 -1
- package/dist/pine-core/p-4bd57896.system.entry.js +0 -1
- package/dist/pine-core/p-6a6a767b.system.entry.js +0 -1
- package/dist/pine-core/p-6dabeebc.system.entry.js +0 -3
- package/dist/pine-core/p-70891202.entry.js +0 -1
- package/dist/pine-core/p-73fa955a.system.entry.js +0 -1
- package/dist/pine-core/p-755e0b3c.system.entry.js +0 -1
- package/dist/pine-core/p-8b051229.entry.js +0 -1
- package/dist/pine-core/p-8d8a8550.system.entry.js +0 -1
- package/dist/pine-core/p-93486f2e.entry.js +0 -1
- package/dist/pine-core/p-93ae562d.entry.js +0 -1
- package/dist/pine-core/p-95b8bece.system.entry.js +0 -1
- package/dist/pine-core/p-9d902000.system.entry.js +0 -1
- package/dist/pine-core/p-9ef355b7.entry.js +0 -1
- package/dist/pine-core/p-BI7Ml0VF.system.js +0 -1
- package/dist/pine-core/p-BKsJZTyn.js +0 -1
- package/dist/pine-core/p-BU1hN5Vy.js +0 -1
- package/dist/pine-core/p-BrLs99ML.system.js +0 -1
- package/dist/pine-core/p-CJ8t3EBJ.system.js +0 -2
- package/dist/pine-core/p-Cr7-rJtJ.system.js +0 -1
- package/dist/pine-core/p-DDtwbwIl.js +0 -1
- package/dist/pine-core/p-D_I-k33A.system.js +0 -1
- package/dist/pine-core/p-DcT8--Dn.js +0 -2
- package/dist/pine-core/p-DnUJodVd.js +0 -1
- package/dist/pine-core/p-a009ab10.system.entry.js +0 -1
- package/dist/pine-core/p-a8cd2ab5.entry.js +0 -1
- package/dist/pine-core/p-b45b8f8b.system.entry.js +0 -1
- package/dist/pine-core/p-b85bb61d.system.entry.js +0 -1
- package/dist/pine-core/p-bdded57a.system.entry.js +0 -1
- package/dist/pine-core/p-c1a65082.entry.js +0 -1
- package/dist/pine-core/p-c1d1befb.system.entry.js +0 -1
- package/dist/pine-core/p-ctdGub9B.system.js +0 -1
- package/dist/pine-core/p-d9c1ee36.system.entry.js +0 -1
- package/dist/pine-core/p-df285ece.system.entry.js +0 -1
- package/dist/pine-core/p-ee114aef.entry.js +0 -1
- package/dist/pine-core/p-ee997fbf.entry.js +0 -2
- package/dist/pine-core/p-f89197c9.entry.js +0 -1
- package/dist/pine-core/p-kYMYDfJY.system.js +0 -1
- package/dist/pine-core/p-u_0lxWnH.js +0 -1
|
@@ -90,6 +90,23 @@ export default {
|
|
|
90
90
|
control: 'number',
|
|
91
91
|
description: 'Maximum chips shown inline before collapsing to a "+N more" badge.',
|
|
92
92
|
},
|
|
93
|
+
optionDisplay: {
|
|
94
|
+
control: 'select',
|
|
95
|
+
options: ['text', 'chip'],
|
|
96
|
+
description: 'Controls how options are displayed in the dropdown panel.',
|
|
97
|
+
},
|
|
98
|
+
optionActions: {
|
|
99
|
+
control: 'boolean',
|
|
100
|
+
description: 'Shows an action icon on each option that has an actionIcon.',
|
|
101
|
+
},
|
|
102
|
+
optionActionLabel: {
|
|
103
|
+
control: 'text',
|
|
104
|
+
description: 'Tooltip for an option action icon when the option has no actionLabel; {text} is interpolated.',
|
|
105
|
+
},
|
|
106
|
+
optionActionDescription: {
|
|
107
|
+
control: 'text',
|
|
108
|
+
description: 'Screen-reader hint on each option that has an action; {action} is interpolated.',
|
|
109
|
+
},
|
|
93
110
|
},
|
|
94
111
|
};
|
|
95
112
|
|
|
@@ -110,12 +127,16 @@ export const Default = {
|
|
|
110
127
|
label: 'Select Tags',
|
|
111
128
|
placeholder: 'Select...',
|
|
112
129
|
value: [],
|
|
130
|
+
optionDisplay: 'text',
|
|
131
|
+
optionActions: false,
|
|
113
132
|
},
|
|
114
133
|
render: (args, { updateArgs } = {}) => html`
|
|
115
134
|
<pds-multiselect
|
|
116
135
|
component-id="${args.componentId}"
|
|
117
136
|
label="${args.label}"
|
|
118
137
|
placeholder="${args.placeholder}"
|
|
138
|
+
option-display="${args.optionDisplay}"
|
|
139
|
+
?option-actions=${args.optionActions}
|
|
119
140
|
?hide-selected-items=${args.hideSelectedItems}
|
|
120
141
|
.value=${args.value}
|
|
121
142
|
@pdsMultiselectChange=${(e) => updateArgs?.({ value: e.detail.values })}
|
|
@@ -728,4 +749,118 @@ export const PillDisabled = {
|
|
|
728
749
|
Disabled state: chips show as text variant without close buttons.
|
|
729
750
|
</p>
|
|
730
751
|
`,
|
|
731
|
-
};
|
|
752
|
+
};
|
|
753
|
+
|
|
754
|
+
const labelOptions = `
|
|
755
|
+
<option value="1">Featured</option>
|
|
756
|
+
<option value="2">On sale</option>
|
|
757
|
+
<option value="3">Archived</option>
|
|
758
|
+
`;
|
|
759
|
+
|
|
760
|
+
export const OptionDisplay = {
|
|
761
|
+
args: {
|
|
762
|
+
componentId: 'multiselect-option-display',
|
|
763
|
+
label: 'Labels',
|
|
764
|
+
optionDisplay: 'chip',
|
|
765
|
+
value: ['1'],
|
|
766
|
+
},
|
|
767
|
+
render: (args, { updateArgs } = {}) => html`
|
|
768
|
+
<pds-multiselect
|
|
769
|
+
component-id="${args.componentId}"
|
|
770
|
+
label="${args.label}"
|
|
771
|
+
option-display="${args.optionDisplay}"
|
|
772
|
+
.value=${args.value}
|
|
773
|
+
@pdsMultiselectChange=${(e) => updateArgs?.({ value: e.detail.values })}
|
|
774
|
+
>
|
|
775
|
+
<option value="1" data-dot-color="--pine-color-purple-600">Featured</option>
|
|
776
|
+
<option value="2" data-dot-color="--pine-color-green-600">On sale</option>
|
|
777
|
+
<option value="3" data-dot-color="--pine-color-grey-600">Archived</option>
|
|
778
|
+
</pds-multiselect>
|
|
779
|
+
`,
|
|
780
|
+
};
|
|
781
|
+
|
|
782
|
+
const customTriggerLabels = [
|
|
783
|
+
{ value: '1', text: 'Featured' },
|
|
784
|
+
{ value: '2', text: 'On sale' },
|
|
785
|
+
{ value: '3', text: 'Archived' },
|
|
786
|
+
];
|
|
787
|
+
|
|
788
|
+
export const CustomTrigger = {
|
|
789
|
+
args: {
|
|
790
|
+
componentId: 'multiselect-custom-trigger',
|
|
791
|
+
value: ['1'],
|
|
792
|
+
},
|
|
793
|
+
render: (args, { updateArgs } = {}) => {
|
|
794
|
+
const selected = customTriggerLabels.filter((label) => args.value.includes(label.value));
|
|
795
|
+
const triggerName = selected.length ? `Labels: ${selected.map((label) => label.text).join(', ')}` : 'Add label';
|
|
796
|
+
|
|
797
|
+
return html`
|
|
798
|
+
<pds-multiselect
|
|
799
|
+
component-id="${args.componentId}"
|
|
800
|
+
label="Labels"
|
|
801
|
+
hide-label
|
|
802
|
+
.value=${args.value}
|
|
803
|
+
@pdsMultiselectChange=${(e) => updateArgs?.({ value: e.detail.values })}
|
|
804
|
+
>
|
|
805
|
+
${unsafeHTML(labelOptions)}
|
|
806
|
+
<button
|
|
807
|
+
slot="trigger"
|
|
808
|
+
type="button"
|
|
809
|
+
aria-label=${triggerName}
|
|
810
|
+
style="align-items: center; background: none; border: 0; cursor: pointer; display: inline-flex; flex-wrap: wrap; gap: var(--pine-dimension-2xs); padding: var(--pine-dimension-2xs);"
|
|
811
|
+
>
|
|
812
|
+
${selected.length
|
|
813
|
+
? selected.map((label) => html`<pds-chip sentiment="subtle">${label.text}</pds-chip>`)
|
|
814
|
+
: html`<pds-icon name="add" size="small" aria-hidden="true"></pds-icon> Add label`}
|
|
815
|
+
</button>
|
|
816
|
+
</pds-multiselect>
|
|
817
|
+
`;
|
|
818
|
+
},
|
|
819
|
+
};
|
|
820
|
+
|
|
821
|
+
export const OptionActions = {
|
|
822
|
+
args: {
|
|
823
|
+
componentId: 'multiselect-option-actions',
|
|
824
|
+
label: 'Labels',
|
|
825
|
+
value: ['1'],
|
|
826
|
+
lastAction: '',
|
|
827
|
+
},
|
|
828
|
+
render: (args, { updateArgs } = {}) => html`
|
|
829
|
+
<pds-multiselect
|
|
830
|
+
component-id="${args.componentId}"
|
|
831
|
+
label="${args.label}"
|
|
832
|
+
option-actions
|
|
833
|
+
.value=${args.value}
|
|
834
|
+
@pdsMultiselectChange=${(e) => updateArgs?.({ value: e.detail.values })}
|
|
835
|
+
@pdsMultiselectOptionAction=${(e) => updateArgs?.({ lastAction: e.detail.option.text })}
|
|
836
|
+
>
|
|
837
|
+
<option value="1" data-action-icon="pen">Featured</option>
|
|
838
|
+
<option value="2" data-action-icon="pen">On sale</option>
|
|
839
|
+
<option value="3" data-action-icon="info-circle" data-action-label="View {text}">Archived</option>
|
|
840
|
+
</pds-multiselect>
|
|
841
|
+
<p style="margin-top: var(--pine-dimension-sm); color: var(--pine-color-text-secondary);">
|
|
842
|
+
${args.lastAction
|
|
843
|
+
? `Action ran for ${args.lastAction}.`
|
|
844
|
+
: 'Hover an option and click its icon, or highlight it and press Right Arrow.'}
|
|
845
|
+
</p>
|
|
846
|
+
`,
|
|
847
|
+
};
|
|
848
|
+
|
|
849
|
+
export const WithFooter = {
|
|
850
|
+
args: {
|
|
851
|
+
componentId: 'multiselect-with-footer',
|
|
852
|
+
label: 'Labels',
|
|
853
|
+
value: ['1'],
|
|
854
|
+
},
|
|
855
|
+
render: (args, { updateArgs } = {}) => html`
|
|
856
|
+
<pds-multiselect
|
|
857
|
+
component-id="${args.componentId}"
|
|
858
|
+
label="${args.label}"
|
|
859
|
+
.value=${args.value}
|
|
860
|
+
@pdsMultiselectChange=${(e) => updateArgs?.({ value: e.detail.values })}
|
|
861
|
+
>
|
|
862
|
+
${unsafeHTML(labelOptions)}
|
|
863
|
+
<pds-link slot="footer" href="#manage-labels" variant="plain" font-size="md">Manage labels</pds-link>
|
|
864
|
+
</pds-multiselect>
|
|
865
|
+
`,
|
|
866
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { containsComposed } from "../../utils/closest";
|
|
2
3
|
/**
|
|
3
4
|
* @slot trigger - The trigger element for the popover
|
|
4
5
|
* @slot (default) - The content to display inside the popover
|
|
@@ -72,12 +73,7 @@ export class PdsPopover {
|
|
|
72
73
|
if (assignedElements.length > 0) {
|
|
73
74
|
// Use the first assigned element as the trigger
|
|
74
75
|
this.triggerEl = assignedElements[0];
|
|
75
|
-
|
|
76
|
-
// This mirrors the native Popover API's accessibility behavior
|
|
77
|
-
if (this.portalEl) {
|
|
78
|
-
this.triggerEl.setAttribute('aria-expanded', String(this.active));
|
|
79
|
-
this.triggerEl.setAttribute('aria-controls', this.portalEl.id);
|
|
80
|
-
}
|
|
76
|
+
this.linkTriggerToPortal();
|
|
81
77
|
// Attach click listener to handle popover visibility
|
|
82
78
|
this.triggerEl.addEventListener('click', this.handleTriggerClick);
|
|
83
79
|
}
|
|
@@ -138,6 +134,18 @@ export class PdsPopover {
|
|
|
138
134
|
Object.defineProperty(slotChangeEvent, 'target', { value: triggerSlot, enumerable: true });
|
|
139
135
|
this.handleTriggerSlotChange(slotChangeEvent);
|
|
140
136
|
}
|
|
137
|
+
else {
|
|
138
|
+
// A component trigger delays componentDidLoad, so its slotchange ran before the portal existed.
|
|
139
|
+
this.linkTriggerToPortal();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// Set ARIA attributes to establish relationship between trigger and popover
|
|
143
|
+
// This mirrors the native Popover API's accessibility behavior
|
|
144
|
+
linkTriggerToPortal() {
|
|
145
|
+
if (this.triggerEl == null || this.portalEl == null)
|
|
146
|
+
return;
|
|
147
|
+
this.triggerEl.setAttribute('aria-expanded', String(this.active));
|
|
148
|
+
this.triggerEl.setAttribute('aria-controls', this.portalEl.id);
|
|
141
149
|
}
|
|
142
150
|
disconnectedCallback() {
|
|
143
151
|
this.isComponentMounted = false;
|
|
@@ -333,6 +341,8 @@ export class PdsPopover {
|
|
|
333
341
|
if (!this.active || !this.portalEl)
|
|
334
342
|
return;
|
|
335
343
|
this.active = false;
|
|
344
|
+
// Restoring the content drops its focus to the body, so check where focus is first.
|
|
345
|
+
const focusWasInside = this.portalEl.contains(document.activeElement);
|
|
336
346
|
// Update ARIA expanded state on trigger
|
|
337
347
|
if (this.triggerEl) {
|
|
338
348
|
this.triggerEl.setAttribute('aria-expanded', 'false');
|
|
@@ -345,7 +355,9 @@ export class PdsPopover {
|
|
|
345
355
|
this.portalEl.style.visibility = 'hidden';
|
|
346
356
|
// Return focus to trigger for keyboard accessibility
|
|
347
357
|
// This mirrors native Popover API behavior on close
|
|
348
|
-
|
|
358
|
+
if (focusWasInside) {
|
|
359
|
+
this.returnFocusToTrigger();
|
|
360
|
+
}
|
|
349
361
|
// Remove all listeners
|
|
350
362
|
this.removeLightDismissListeners();
|
|
351
363
|
this.removeScrollAndResizeListeners();
|
|
@@ -401,7 +413,7 @@ export class PdsPopover {
|
|
|
401
413
|
* Handles clicks outside the popover for light dismiss (auto type only)
|
|
402
414
|
*/
|
|
403
415
|
handleClickOutside(event) {
|
|
404
|
-
var _a, _b;
|
|
416
|
+
var _a, _b, _c, _d;
|
|
405
417
|
// Ignore events that occurred at or before the popover opened
|
|
406
418
|
// This prevents the opening click from immediately closing the popover
|
|
407
419
|
// Convert event.timeStamp (DOMHighResTimeStamp from performance.now()) to epoch time
|
|
@@ -413,9 +425,15 @@ export class PdsPopover {
|
|
|
413
425
|
return;
|
|
414
426
|
}
|
|
415
427
|
const target = event.target;
|
|
428
|
+
// A datepicker's calendar is portaled to the body: a click in the calendar of a datepicker
|
|
429
|
+
// inside this popover, in its content or its trigger, isn't outside it.
|
|
430
|
+
const calendar = (_b = (_a = target).closest) === null || _b === void 0 ? void 0 : _b.call(_a, '.pds-datepicker-calendar-portal');
|
|
431
|
+
const owner = calendar === null || calendar === void 0 ? void 0 : calendar.pdsDatepicker;
|
|
432
|
+
if (owner && (containsComposed(this.portalEl, owner) || containsComposed(this.triggerEl, owner)))
|
|
433
|
+
return;
|
|
416
434
|
// Check if click is outside both the popover portal and the trigger
|
|
417
|
-
const clickedInsidePopover = (
|
|
418
|
-
const clickedInsideTrigger = (
|
|
435
|
+
const clickedInsidePopover = (_c = this.portalEl) === null || _c === void 0 ? void 0 : _c.contains(target);
|
|
436
|
+
const clickedInsideTrigger = (_d = this.triggerEl) === null || _d === void 0 ? void 0 : _d.contains(target);
|
|
419
437
|
if (!clickedInsidePopover && !clickedInsideTrigger) {
|
|
420
438
|
this.hide();
|
|
421
439
|
}
|
|
@@ -554,7 +572,7 @@ export class PdsPopover {
|
|
|
554
572
|
}, 16); // ~1 frame at 60fps
|
|
555
573
|
}
|
|
556
574
|
render() {
|
|
557
|
-
return (h(Host, { key: '
|
|
575
|
+
return (h(Host, { key: '7f02e4a9af4d2dc4cafb9187fc2263edaa79af86', id: this.componentId }, h("span", { key: '128828d5fc52478b3e9670418a8e9c2d5ce6e7f6', class: "pds-popover__trigger-wrapper" }, h("slot", { key: 'c479f39a3653d6627a20d05c3a87ea1a5e2bebf2', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), h("div", { key: 'e730149edce755c8789ec700c0a95dfa4b4ab835', class: "pds-popover__content-slot-wrapper" }, h("slot", { key: '2f5ab80b4d75c114568d364ce9a74a658e426766', onSlotchange: this.handleContentSlotChange }))));
|
|
558
576
|
}
|
|
559
577
|
static get is() { return "pds-popover"; }
|
|
560
578
|
static get encapsulation() { return "shadow"; }
|
|
@@ -20,7 +20,7 @@ export class PdsProgress {
|
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
22
|
const normalizedFillColor = normalizeColorValue(this.fillColor);
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: '2aaabbb78cef6237b47408a6766936a4ce065e40', class: this.animated ? { 'is-animated': this.animated } : '' }, h("div", { key: '192ce4a08155a84577ed46d9dc342a744354213a', class: "pds-progress" }, h("label", { key: '3e9f16f9a4c5d822ef6493d6457dbb657835903a', class: "pds-progress__label", htmlFor: this.componentId }, this.label), h("progress", { key: '35b4cd422bb247b8ae8eeaa7c3ea231d312197c9', id: this.componentId, max: "100", style: normalizedFillColor ? { '--color-progress-fill': normalizedFillColor } : {}, value: this.percent })), this.showPercent && h("div", { key: 'a4952bcda7ab062da7ff706b519476f8e7fff898', class: "pds-progress__percentage" }, this.percent, "%")));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "pds-progress"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class PdsProperty {
|
|
|
10
10
|
this.icon = 'star';
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: '0f6195faaaf3adb11ad14f09a36c78f94e2bdf65', id: this.componentId }, h("pds-box", { key: '0a9670c0e38065f5fbe035b81703e21155396ff8', "align-items": "center", gap: "xs" }, h("pds-icon", { key: '13b497e8670bc5210a752b8c24b9fd6397b1a8c9', icon: this.icon, size: "var(--pine-dimension-sm)", "aria-hidden": "true" }), h("slot", { key: 'a9b3cf5fd830b7551f68866a62341670f8b61b34' }))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "pds-property"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -92,11 +92,11 @@ export class PdsRadio {
|
|
|
92
92
|
}
|
|
93
93
|
render() {
|
|
94
94
|
const renderLabelAndMessages = () => [
|
|
95
|
-
h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, h("input", { key: '
|
|
95
|
+
h("label", { htmlFor: this.componentId, key: `${this.componentId}-label` }, h("input", { key: '4a8736c360681b399c4e70ef9e6612d4cb4f9285', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, type: "radio", id: this.componentId, name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onChange: this.handleRadioChange, class: this.hasImage() ? 'visually-hidden' : '' }), h("span", { key: '093d96ac788d713eafb2e537c812145869dddad8', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)),
|
|
96
96
|
this.helperMessage && (h("div", { key: `${this.componentId}-helper`, class: 'pds-radio__message', id: messageId(this.componentId, 'helper') }, this.helperMessage)),
|
|
97
|
-
this.errorMessage && (h("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '
|
|
97
|
+
this.errorMessage && (h("div", { key: `${this.componentId}-error`, class: `pds-radio__message pds-radio__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '55fc5ab2a5a18734dbd8ed452c4e3794ece7fe15', icon: danger, size: "small" }), this.errorMessage))
|
|
98
98
|
];
|
|
99
|
-
return (h(Host, { key: '
|
|
99
|
+
return (h(Host, { key: '97d0f61aeb93bb29e3d21281e72775cb274de072', class: this.classNames() }, this.hasImage() && (h("div", { key: '0d1fb05dc00617945350e9d1ffeec9e17fc4affa', class: "pds-radio__image-container", part: "image-container" }, h("slot", { key: '1cd8494378269651730ea64f25af4e9572ede794', name: "image", onSlotchange: () => (this._hasImage = this.hasImageSlot()) }))), this.hasImage() ? (h("div", { class: "pds-radio__content-wrapper" }, renderLabelAndMessages())) : (renderLabelAndMessages())));
|
|
100
100
|
}
|
|
101
101
|
static get is() { return "pds-radio"; }
|
|
102
102
|
static get encapsulation() { return "scoped"; }
|
|
@@ -160,13 +160,13 @@ export class PdsRadioGroup {
|
|
|
160
160
|
render() {
|
|
161
161
|
const gapValue = this.getGapValue();
|
|
162
162
|
const ariaDescribedBy = this.getAriaDescribedBy();
|
|
163
|
-
return (h(Host, { key: '
|
|
163
|
+
return (h(Host, { key: '3f35b3cea2933ed25174387fc45d80f0d6bceced', class: this.classNames(), id: this._groupId, role: "group", "aria-describedby": ariaDescribedBy, style: {
|
|
164
164
|
'--pds-radio-group-gap': gapValue,
|
|
165
|
-
} }, this.groupLabel && (h("div", { key: '
|
|
165
|
+
} }, this.groupLabel && (h("div", { key: '83764282e3049b0802e966c306654bbdda4f0c02', class: "pds-radio-group__label" }, this.groupLabel)), h("div", { key: '39c0e97e5280527d9ab597dcf4f5b0282b19d69a', class: {
|
|
166
166
|
'pds-radio-group__radios': true,
|
|
167
167
|
'pds-radio-group__radios--row': this.direction === 'row',
|
|
168
168
|
'pds-radio-group__radios--column': this.direction === 'column',
|
|
169
|
-
} }, h("slot", { key: '
|
|
169
|
+
} }, h("slot", { key: 'ef827a254e8b9bac58f297f5bbd6a37f8e132677', onSlotchange: () => this.updateChildRadios() })), this.helperMessage && (h("div", { key: '4d2f58d979a34e685d00f04483c20a0f9e286af2', class: "pds-radio-group__message", id: messageId(this._groupId, 'helper') }, this.helperMessage)), this.errorMessage && (h("div", { key: 'c05a32676fd6fe8aee30e1ea5c476424e10945f3', class: "pds-radio-group__message pds-radio-group__message--error", id: messageId(this._groupId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '1bc3177459e179af3709f1cacd329980a8a45df7', icon: danger, size: "small" }), this.errorMessage))));
|
|
170
170
|
}
|
|
171
171
|
static get is() { return "pds-radio-group"; }
|
|
172
172
|
static get encapsulation() { return "scoped"; }
|
|
@@ -55,7 +55,7 @@ export class PdsRow {
|
|
|
55
55
|
})), (this.minHeight && {
|
|
56
56
|
'min-height': this.minHeight,
|
|
57
57
|
}));
|
|
58
|
-
return h(Host, { key: '
|
|
58
|
+
return h(Host, { key: '2d71570cba49c0e896ffe29c0a7727d7c2872036', class: `pds-row ${rowClasses}`, style: rowInlineStyles });
|
|
59
59
|
}
|
|
60
60
|
static get is() { return "pds-row"; }
|
|
61
61
|
static get originalStyleUrls() {
|
|
@@ -228,7 +228,7 @@ export class PdsSelect {
|
|
|
228
228
|
}
|
|
229
229
|
render() {
|
|
230
230
|
const hasAction = this.el.querySelector('[slot="action"]') !== null;
|
|
231
|
-
return (h(Host, { key: '
|
|
231
|
+
return (h(Host, { key: '89ba8f5f06b2a1bf82a495992efcb8490021e19f', "aria-disabled": this.disabled ? 'true' : null, class: this.classNames(), "has-action": hasAction && !this.hideLabel ? 'true' : null }, h("div", { key: '009dd8fe960889fd85a6cbe3239d94f81eddc9bb', class: "pds-select" }, !this.hideLabel && (h("div", { key: 'e198c3dcd664da65c0356b7eb7f9b4dff8c27035', class: "pds-select__label-wrapper" }, h("label", { key: '914b278a8e154b17365ffadcfe655139d3bef915', htmlFor: this.componentId }, h("span", { key: '6cd42f182ae8c585364a781044b8fd2fa3d61304', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), hasAction && this.renderAction())), h("select", { key: '7a3a91336f938ffb13a1e7ea1632090c37b5ad78', "aria-describedby": assignDescription(this.componentId, this.isInvalid(), this.helperMessage, this.errorMessage), "aria-invalid": this.isInvalid() ? 'true' : undefined, "aria-label": this.hideLabel ? this.label : undefined, autocomplete: this.autocomplete || undefined, class: "pds-select__field", disabled: this.disabled, id: this.componentId, multiple: this.multiple, name: this.name, onBlur: this.onBlur, onChange: this.onSelectUpdate, onFocus: this.onFocus, onKeyDown: this.onKeyDown, part: "select", required: this.required, ref: (el) => (this.selectEl = el) }), h("div", { key: 'd3ddc61e4458e5ec0af1e700e69355d1cabaa651', "aria-hidden": "true", class: "hidden", ref: (el) => (this.slotContainer = el) }, h("slot", { key: 'dae8f36dd59e84f502500a24fec97a6fad305167', onSlotchange: this.handleSlotChange })), this.renderMessages(), !this.multiple && h("pds-icon", { key: '66fd7ed9fd065b6aff73df75234fa9534c828b6f', "aria-hidden": "true", class: "pds-select__select-icon", icon: enlarge }))));
|
|
232
232
|
}
|
|
233
233
|
static get is() { return "pds-select"; }
|
|
234
234
|
static get encapsulation() { return "shadow"; }
|
|
@@ -38,7 +38,7 @@ export class PdsSortableItem {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: 'a401963153e64b33f47f8897f2e8a157557d625e', class: "pds-sortable-item", id: this.componentId }, this.showHandle && (h("div", { key: 'e93df2aea5fcad497bd64f54b09a3e700141dfa6', class: "pds-sortable-item__handle" }, h("pds-icon", { key: '9454196233b1c12a232815a2a14f05e41721a152', "aria-hidden": "true", icon: handleIcon }))), h("slot", { key: 'da456ae383e8fe7dd9375eada035bee755cdd684' }), this.enableActions && (h("div", { key: 'bed7efa1c242e59b547e5e09018b1aacb1c1b172', class: "pds-sortable-item__actions" }, h("slot", { key: 'c4563d2a50c3bb55108527ae1f0a68a84d5749a7', name: "sortable-item-actions" })))));
|
|
42
42
|
}
|
|
43
43
|
static get is() { return "pds-sortable-item"; }
|
|
44
44
|
static get encapsulation() { return "scoped"; }
|
|
@@ -57,7 +57,7 @@ export class PdsSortable {
|
|
|
57
57
|
this.sortableInstance = Sortable.create(this.el, sortableOptions);
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
|
-
return (h(Host, { key: '
|
|
60
|
+
return (h(Host, { key: '6ff85345305337587c3d06b6f6c333125707efe8', class: this.classNames(), id: this.componentId }, h("slot", { key: 'e25c441574cc8b59bb1865a69af8691ce37ff341' })));
|
|
61
61
|
}
|
|
62
62
|
static get is() { return "pds-sortable"; }
|
|
63
63
|
static get encapsulation() { return "scoped"; }
|
|
@@ -2,10 +2,14 @@ import { Host, h } from "@stencil/core";
|
|
|
2
2
|
import { assignDescription, isSpecTest, messageId, exposeTypeProperty } from "../../utils/form";
|
|
3
3
|
import { danger } from "@pine-ds/icons/icons";
|
|
4
4
|
import { inheritAriaAttributes } from "../../utils/attributes";
|
|
5
|
+
/**
|
|
6
|
+
* @slot label - Content displayed as the switch label in place of the `label` text. Clicking it toggles the switch.
|
|
7
|
+
*/
|
|
5
8
|
export class PdsSwitch {
|
|
6
9
|
constructor() {
|
|
7
10
|
this.inheritedAttributes = {};
|
|
8
11
|
this._type = 'checkbox';
|
|
12
|
+
this.hasLabelSlot = false;
|
|
9
13
|
/**
|
|
10
14
|
* Determines the input 'checked' state.
|
|
11
15
|
*/
|
|
@@ -38,8 +42,14 @@ export class PdsSwitch {
|
|
|
38
42
|
if (this.helperMessage !== undefined) {
|
|
39
43
|
switchClasses += " pds-switch--message";
|
|
40
44
|
}
|
|
45
|
+
if (this.hasLabelSlot) {
|
|
46
|
+
switchClasses += " pds-switch--label-slot";
|
|
47
|
+
}
|
|
41
48
|
return switchClasses;
|
|
42
49
|
};
|
|
50
|
+
this.updateHasLabelSlot = () => {
|
|
51
|
+
this.hasLabelSlot = Array.from(this.el.children).some((child) => child.getAttribute('slot') === 'label');
|
|
52
|
+
};
|
|
43
53
|
}
|
|
44
54
|
connectedCallback() {
|
|
45
55
|
// Initialize ElementInternals for form association (only once per element instance)
|
|
@@ -80,11 +90,12 @@ export class PdsSwitch {
|
|
|
80
90
|
}
|
|
81
91
|
componentWillLoad() {
|
|
82
92
|
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
93
|
+
this.updateHasLabelSlot();
|
|
83
94
|
}
|
|
84
95
|
render() {
|
|
85
|
-
return (h(Host, { key: '
|
|
86
|
-
h("div", { key: '
|
|
87
|
-
h("div", { key: '
|
|
96
|
+
return (h(Host, { key: 'b04295a8cc5acec33c5c6461516e9ec57ff9c396', class: this.switchClassNames(), "aria-disabled": this.disabled ? 'true' : null }, h("label", { key: 'f052e2409b0d7603598fd59bcdd382d6091cd794', htmlFor: this.componentId }, h("input", Object.assign({ key: 'd61df3ac3762af2dcc27a8800f7317ac03994ea3', "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, checked: this.checked, class: "pds-switch__input", disabled: this.disabled, id: this.componentId, name: this.name ? this.name : this.componentId, onChange: this.onSwitchUpdate, required: this.required, type: "checkbox", value: this.value }, this.inheritedAttributes)), h("span", { key: '0f921ea88d5706c364b1d8e4e05afac95be9f092', class: this.hideLabel ? 'visually-hidden' : '' }, h("slot", { key: '727c77545b82e3f6f6399f5fc9d26657e42cc3f5', name: "label", onSlotchange: this.updateHasLabelSlot }, this.label))), this.helperMessage &&
|
|
97
|
+
h("div", { key: 'a9882d0246c772e0caec145c5c7f1170ea860624', class: `pds-switch__message`, id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
98
|
+
h("div", { key: '10b51b743e43f995a4352470b92cff7bce24a897', class: `pds-switch__message pds-switch__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '00bbbf4bf88321b307a1536f7d9d436b0646c6eb', icon: danger, size: "small" }), this.errorMessage)));
|
|
88
99
|
}
|
|
89
100
|
static get is() { return "pds-switch"; }
|
|
90
101
|
static get encapsulation() { return "shadow"; }
|
|
@@ -245,7 +256,7 @@ export class PdsSwitch {
|
|
|
245
256
|
"resolved": "string",
|
|
246
257
|
"references": {}
|
|
247
258
|
},
|
|
248
|
-
"required":
|
|
259
|
+
"required": false,
|
|
249
260
|
"optional": false,
|
|
250
261
|
"docs": {
|
|
251
262
|
"tags": [],
|
|
@@ -316,6 +327,11 @@ export class PdsSwitch {
|
|
|
316
327
|
}
|
|
317
328
|
};
|
|
318
329
|
}
|
|
330
|
+
static get states() {
|
|
331
|
+
return {
|
|
332
|
+
"hasLabelSlot": {}
|
|
333
|
+
};
|
|
334
|
+
}
|
|
319
335
|
static get events() {
|
|
320
336
|
return [{
|
|
321
337
|
"method": "pdsSwitchChange",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class PdsTableBody {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: '0278bf4c680e9054748039dddbbb5cfcce3bb4e6', role: "rowgroup", part: "body" }, h("slot", { key: '44cf68f3b0dff78312a3d31d898209544ce8131e' })));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "pds-table-body"; }
|
|
7
7
|
static get encapsulation() { return "shadow"; }
|
|
@@ -123,11 +123,11 @@ export class PdsTableCell {
|
|
|
123
123
|
return classNames.join(' ');
|
|
124
124
|
}
|
|
125
125
|
render() {
|
|
126
|
-
return (h(Host, { key: '
|
|
126
|
+
return (h(Host, { key: 'c32bd43c6080e9a8a98578016973de9025e5d367', class: this.classNames(), role: "gridcell", part: "cell", style: this.tableRef &&
|
|
127
127
|
this.tableRef.fixedColumn &&
|
|
128
128
|
this.tableRef.selectable
|
|
129
129
|
? { '--fixed-cell-position': '40px' }
|
|
130
|
-
: {} }, h("slot", { key: '
|
|
130
|
+
: {} }, h("slot", { key: '5b2af30784f41dcc7a0f66187f222ec2472f207f' })));
|
|
131
131
|
}
|
|
132
132
|
static get is() { return "pds-table-cell"; }
|
|
133
133
|
static get encapsulation() { return "shadow"; }
|
|
@@ -42,7 +42,7 @@ export class PdsTableHead {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: 'ca88406002f440e9b9eefa639dac056e85403bd8', role: "row", part: "head" }, this.tableRef && this.tableRef.selectable && (h("pds-table-head-cell", { key: '7c1939791a0573c6eccdec66d7b6d5de122a42c1', part: this.tableRef.selectable ? 'checkbox-cell' : '' }, !this.tableRef.disableSelectAll && (h("pds-checkbox", { key: '3a8581bbf9b5fc26396937e7d0bab370f6078090', componentId: this.generateUniqueId(), indeterminate: this.indeterminate, onInput: this.handleInput, label: "Select All Rows", hideLabel: true, checked: this.isSelected, part: "select-all-checkbox" })))), h("slot", { key: 'a736a10378936d4e4de5b139f3f57a345483c1bb' })));
|
|
46
46
|
}
|
|
47
47
|
static get is() { return "pds-table-head"; }
|
|
48
48
|
static get encapsulation() { return "shadow"; }
|
|
@@ -199,11 +199,11 @@ export class PdsTableHeadCell {
|
|
|
199
199
|
return classNames.join(' ');
|
|
200
200
|
}
|
|
201
201
|
render() {
|
|
202
|
-
return (h(Host, { key: '
|
|
202
|
+
return (h(Host, { key: 'de7b2fb674def0a8046e1940488d435176dc9851', class: this.classNames(), role: "columnheader", onClick: this.toggleSort, part: "head-cell", style: this.tableRef &&
|
|
203
203
|
this.tableRef.fixedColumn &&
|
|
204
204
|
this.tableRef.selectable
|
|
205
205
|
? { '--fixed-cell-position': '40px' }
|
|
206
|
-
: {} }, h("slot", { key: '
|
|
206
|
+
: {} }, h("slot", { key: '4ada173faf7d106cca34920540703a1d04f7e5bd' }), this.sortable && this.isActive && (h("pds-icon", { key: '1b0e87d74b6fa359e901a8e66479f37a88cdcf1c', icon: this.sortingDirection === 'asc' ? upSmall : downSmall, part: "sort-icon" }))));
|
|
207
207
|
}
|
|
208
208
|
static get is() { return "pds-table-head-cell"; }
|
|
209
209
|
static get encapsulation() { return "shadow"; }
|
|
@@ -137,7 +137,7 @@ export class PdsTableRow {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
render() {
|
|
140
|
-
return (h(Host, { key: '
|
|
140
|
+
return (h(Host, { key: '16ca08eefa74468559a1c084b7619836f01b27af', class: this.classNames(), role: "row", part: "row" }, this.tableRef && this.tableRef.selectable && (h("pds-table-cell", { key: '4b4d2ae15d519e08cd6710ddb6759923d478457c', part: this.tableRef.fixedColumn ? 'checkbox-cell' : 'checkbox-cell', class: this.tableRef.selectable ? 'has-checkbox' : '' }, h("pds-checkbox", { key: '78b9a731113cce82c59f40713561033f563ffc5f', componentId: this.generateUniqueId(), onPdsCheckboxChange: this.handleCheckboxChange, indeterminate: this.indeterminate, label: "Select Row", hideLabel: true, checked: this.isSelected, part: "row-checkbox" }))), h("slot", { key: '5522f2335912f59013e9fc1e1fc6070d645cd519' })));
|
|
141
141
|
}
|
|
142
142
|
static get is() { return "pds-table-row"; }
|
|
143
143
|
static get encapsulation() { return "shadow"; }
|
|
@@ -18,7 +18,7 @@ export class PdsTabpanel {
|
|
|
18
18
|
unwrapReconnectedContent(this.el.querySelector('.pds-tabpanel'), '.pds-tabpanel');
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: 'cce5229aaa694a4eeb30ceacb7edbb7b03f7e24a', slot: "tabpanels", class: this.stretch && this.selected ? "pds-tabpanel--stretch-active" : undefined }, h("div", { key: '614187ea6676c80d94acd9aef7c8e10137fb6179', role: "tabpanel", id: this.parentComponentId + "__" + this.name + '-panel', tabindex: "0", "aria-labelledby": this.parentComponentId + "__" + this.name, class: this.selected ? "pds-tabpanel is-active" : "pds-tabpanel" }, h("slot", { key: '368f81238023d647d42b3c1f6dc14795245bbc87' }))));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "pds-tabpanel"; }
|
|
24
24
|
static get originalStyleUrls() {
|
|
@@ -160,7 +160,7 @@ export class PdsTabs {
|
|
|
160
160
|
// Navigation mode: a <nav> landmark of links (aria-current marks the current
|
|
161
161
|
// page). Panel mode: the ARIA tablist of role=tab buttons over tabpanels.
|
|
162
162
|
const tabList = this.isNav ? (h("nav", { class: "pds-tabs__tablist", "aria-label": this.tablistLabel || undefined, part: "tab-list" }, h("slot", { name: "tabs" }))) : (h("div", { class: "pds-tabs__tablist", role: "tablist", "aria-label": this.tablistLabel, part: "tab-list" }, h("slot", { name: "tabs" })));
|
|
163
|
-
return (h(Host, { key: '
|
|
163
|
+
return (h(Host, { key: 'db689b695d53916eb40a7c6f4596a20925fd4b2e', "active-tab-name": this.activeTabName, class: this.classNames(), id: this.componentId }, tabList, h("slot", { key: 'd2e79967a75d4e2fc33bff5321c62cc89ac74491', name: "tabpanels" })));
|
|
164
164
|
}
|
|
165
165
|
static get is() { return "pds-tabs"; }
|
|
166
166
|
static get encapsulation() { return "shadow"; }
|
|
@@ -83,7 +83,7 @@ export class PdsText {
|
|
|
83
83
|
? `pds-text--decoration-${this.decoration}`
|
|
84
84
|
: ''}
|
|
85
85
|
`;
|
|
86
|
-
return (h(Tag, { key: '
|
|
86
|
+
return (h(Tag, { key: '98269ec5b06387f89026a4f1327688c611b25a46', ref: (el) => (this.contentEl = el), style: this.color && setColor(this.color), class: typeClasses, part: "content" }, h("slot", { key: '73b6169bdd25a73930d1a01db3a0b5359491ab67' })));
|
|
87
87
|
}
|
|
88
88
|
static get is() { return "pds-text"; }
|
|
89
89
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { assignDescription, isRequired, isSpecTest, messageId, exposeTypeProperty } from "../../utils/form";
|
|
3
|
-
import { debounceEvent } from "../../utils/utils";
|
|
3
|
+
import { cancelDebouncedEvent, debounceEvent, flushDebouncedEvent } from "../../utils/utils";
|
|
4
4
|
import { inheritAttributes, inheritAriaAttributes } from "../../utils/attributes";
|
|
5
5
|
import { danger } from "@pine-ds/icons/icons";
|
|
6
6
|
import { formatMessage } from "../../i18n";
|
|
@@ -100,6 +100,8 @@ export class PdsTextarea {
|
|
|
100
100
|
debounceChanged() {
|
|
101
101
|
const { pdsInput, debounce, originalPdsInput } = this;
|
|
102
102
|
this.pdsInput = debounce === undefined ? originalPdsInput !== null && originalPdsInput !== void 0 ? originalPdsInput : pdsInput : debounceEvent(pdsInput, debounce);
|
|
103
|
+
// After the swap, so an emit made while flushing goes to the new emitter, not the old one.
|
|
104
|
+
flushDebouncedEvent(pdsInput);
|
|
103
105
|
}
|
|
104
106
|
/**
|
|
105
107
|
* Update the native input element when the value changes
|
|
@@ -161,6 +163,9 @@ export class PdsTextarea {
|
|
|
161
163
|
return classNames.join(' ');
|
|
162
164
|
}
|
|
163
165
|
connectedCallback() {
|
|
166
|
+
var _a;
|
|
167
|
+
// Keep the raw emitter before the first wrap, so clearing debounce can restore it.
|
|
168
|
+
(_a = this.originalPdsInput) !== null && _a !== void 0 ? _a : (this.originalPdsInput = this.pdsInput);
|
|
164
169
|
this.debounceChanged();
|
|
165
170
|
// Initialize ElementInternals for form association (only once per element instance)
|
|
166
171
|
if (this.el.attachInternals && !this.internals) {
|
|
@@ -168,6 +173,7 @@ export class PdsTextarea {
|
|
|
168
173
|
}
|
|
169
174
|
}
|
|
170
175
|
disconnectedCallback() {
|
|
176
|
+
cancelDebouncedEvent(this.pdsInput);
|
|
171
177
|
// Clean up ResizeObserver
|
|
172
178
|
if (this.resizeObserver) {
|
|
173
179
|
this.resizeObserver.disconnect();
|
|
@@ -178,7 +184,6 @@ export class PdsTextarea {
|
|
|
178
184
|
this.hasAction = this.el.querySelector('[slot="action"]') !== null;
|
|
179
185
|
}
|
|
180
186
|
componentDidLoad() {
|
|
181
|
-
this.originalPdsInput = this.pdsInput;
|
|
182
187
|
// Set initial form value
|
|
183
188
|
this.updateFormValue();
|
|
184
189
|
// Setup ResizeObserver for character counter positioning
|
|
@@ -301,10 +306,10 @@ export class PdsTextarea {
|
|
|
301
306
|
}
|
|
302
307
|
render() {
|
|
303
308
|
const value = this.getValue();
|
|
304
|
-
return (h(Host, { key: '
|
|
305
|
-
h("div", { key: '
|
|
306
|
-
h("p", { key: '
|
|
307
|
-
h("p", { key: '
|
|
309
|
+
return (h(Host, { key: '2544624ceb5a51981954b76eb7a96f8bf0a258b5', "aria-disabled": this.disabled ? 'true' : null, "aria-readonly": this.readonly ? 'true' : null, "has-action": this.hasAction && !this.hideLabel ? 'true' : null }, h("div", { key: 'e85e356a15dd11bbea276b122e67da23342e6ceb', class: "pds-textarea" }, this.label &&
|
|
310
|
+
h("div", { key: '452e96073c2045c2cb2dfa0c9ef7f7102096ab51', class: "pds-textarea__label-wrapper" }, h("label", { key: '84f88bb8211120801cab8b0d7a4915a128fadbfb', htmlFor: this.componentId }, h("span", { key: '43038785de0cb8c833ccd546a00bfc8879c94ecb', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), !this.hideLabel && this.renderAction()), h("div", { key: '868a11635731026168c1ff75d81121ddb96ab7a6', class: "pds-textarea__field-wrapper" }, h("textarea", Object.assign({ key: '80cb7da264045aba177d20f18df31b274afbf485', ref: (el) => this.nativeTextarea = el, "aria-describedby": assignDescription(this.componentId, this.invalid, this.helperMessage, this.errorMessage), "aria-invalid": this.invalid ? "true" : undefined, autocomplete: this.autocomplete, class: this.textareaClassNames(), disabled: this.disabled, id: this.componentId, maxlength: this.maxLength, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, rows: this.rows, onBlur: this.onBlur, onChange: this.onTextareaChange, onFocus: this.onFocus, onInput: this.onInput, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value), this.renderCharacterCounter()), this.helperMessage &&
|
|
311
|
+
h("p", { key: '493b4378b668a96c7c66cbf2435f9c9d06bd0a72', class: "pds-textarea__helper-message", id: messageId(this.componentId, 'helper') }, this.helperMessage), this.invalid &&
|
|
312
|
+
h("p", { key: 'ae6826d389a2a92fbff8de62a0fd55811764eb15', "aria-live": "assertive", class: "pds-textarea__error-message", id: messageId(this.componentId, 'error') }, h("pds-icon", { key: 'e3dd638311ee2617c8b8ae5743b4e87e5a773ebd', icon: danger, size: "small" }), this.errorMessage))));
|
|
308
313
|
}
|
|
309
314
|
static get is() { return "pds-textarea"; }
|
|
310
315
|
static get encapsulation() { return "shadow"; }
|