@pine-ds/core 4.2.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-icon2.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-CuQil7H0.js → index-Bl5KnQay.js} +4 -1
- package/dist/cjs/{index-Bu3NXpbK.js → index-D-QQKB0y.js} +9 -1
- 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 +54 -5
- package/dist/cjs/pds-checkbox.cjs.entry.js +14 -6
- package/dist/cjs/pds-chip.cjs.entry.js +34 -9
- 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 +2 -2
- 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 +42 -8
- 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 +4 -2
- 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 +6 -6
- 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-7jx8T2mW.js → utils-BhRmyxT8.js} +51 -6
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/pds-button/pds-button.css +1 -2
- package/dist/collection/components/pds-button/pds-button.js +53 -2
- package/dist/collection/components/pds-checkbox/pds-checkbox.css +13 -4
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +19 -3
- package/dist/collection/components/pds-chip/pds-chip.css +60 -6
- package/dist/collection/components/pds-chip/pds-chip.js +69 -4
- package/dist/collection/components/pds-chip/pds-chip.tokens.css +16 -0
- package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +39 -1
- package/dist/collection/components/pds-combobox/grouped-options-panel.js +262 -0
- package/dist/collection/components/pds-combobox/pds-combobox.css +243 -15
- package/dist/collection/components/pds-combobox/pds-combobox.js +1129 -115
- 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 +20 -0
- package/dist/collection/components/pds-modal/pds-modal.js +55 -10
- package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +14 -0
- 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 +3 -1
- package/dist/collection/components/pds-property/pds-property.js +1 -1
- package/dist/collection/components/pds-radio/pds-radio.css +1 -2
- 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 +49 -6
- package/dist/docs.json +2055 -84
- 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-CTLu1TM4.js → index-CB8Yh0Nt.js} +4 -1
- package/dist/esm/{index-DdPaBxPo.js → index-DxI-61GK.js} +6 -2
- 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 +54 -5
- package/dist/esm/pds-checkbox.entry.js +14 -6
- package/dist/esm/pds-chip.entry.js +34 -9
- 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 +2 -2
- 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 +42 -8
- 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 +4 -2
- 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 +6 -6
- 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-tJa4KYNO.js → utils-OYK5-nwe.js} +50 -7
- 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-56b34569.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-15d3a4bc.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-4d388957.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-3464b456.system.entry.js → p-1057b8c3.system.entry.js} +1 -1
- package/dist/pine-core/{p-bf3afa16.system.entry.js → p-108c910a.system.entry.js} +1 -1
- package/dist/pine-core/{p-53a4852e.system.entry.js → p-166f61a6.system.entry.js} +1 -1
- package/dist/pine-core/{p-31e1722e.entry.js → p-16c8f5e3.entry.js} +1 -1
- package/dist/pine-core/p-16e258d1.entry.js +1 -0
- package/dist/pine-core/{p-591fbff5.entry.js → p-1be33c95.entry.js} +1 -1
- package/dist/pine-core/p-1e3a31da.entry.js +1 -0
- package/dist/pine-core/p-1f228db9.entry.js +1 -0
- 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-3c4236a8.system.entry.js → p-33c63be6.system.entry.js} +1 -1
- package/dist/pine-core/{p-d46adf7d.entry.js → p-344609f9.entry.js} +2 -2
- package/dist/pine-core/{p-049681fc.entry.js → p-3a1711c1.entry.js} +1 -1
- package/dist/pine-core/p-3a9c58bd.system.entry.js +1 -0
- package/dist/pine-core/{p-e3a7d2db.entry.js → p-3ebd543f.entry.js} +1 -1
- package/dist/pine-core/p-3fbcb0c8.system.entry.js +1 -0
- package/dist/pine-core/{p-b923a70b.entry.js → p-427b4aeb.entry.js} +1 -1
- package/dist/pine-core/{p-5772f260.system.entry.js → p-42bd87ea.system.entry.js} +1 -1
- package/dist/pine-core/{p-1e2a9b5d.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-4b8cf04a.system.entry.js +1 -0
- package/dist/pine-core/p-4d6f471c.entry.js +1 -0
- package/dist/pine-core/{p-3e0c6384.entry.js → p-4e7580c4.entry.js} +1 -1
- package/dist/pine-core/{p-0ab735aa.system.entry.js → p-4f4a2d2a.system.entry.js} +1 -1
- package/dist/pine-core/{p-7e2b934d.entry.js → p-5211aba7.entry.js} +1 -1
- package/dist/pine-core/{p-376f8286.entry.js → p-524b7d3f.entry.js} +1 -1
- package/dist/pine-core/{p-3f12afb1.entry.js → p-5613c64c.entry.js} +1 -1
- package/dist/pine-core/p-5bb24cb4.entry.js +1 -0
- package/dist/pine-core/{p-d7865297.entry.js → p-5bb80b3c.entry.js} +1 -1
- package/dist/pine-core/{p-e3cd4627.system.entry.js → p-5c6e0a26.system.entry.js} +1 -1
- package/dist/pine-core/{p-51dff5af.system.entry.js → p-5db57551.system.entry.js} +1 -1
- package/dist/pine-core/{p-f94667b5.entry.js → p-5eb00ba5.entry.js} +1 -1
- package/dist/pine-core/p-61756414.system.entry.js +1 -0
- package/dist/pine-core/{p-e5bbe8cc.entry.js → p-682e9e8f.entry.js} +1 -1
- package/dist/pine-core/p-6965db1d.entry.js +1 -0
- package/dist/pine-core/{p-5aea1082.entry.js → p-6b180ee2.entry.js} +1 -1
- package/dist/pine-core/{p-d21739eb.entry.js → p-6c53962f.entry.js} +1 -1
- package/dist/pine-core/p-6da6520b.system.entry.js +3 -0
- package/dist/pine-core/p-6e3bf862.system.entry.js +1 -0
- package/dist/pine-core/{p-053b0898.system.entry.js → p-71c9f866.system.entry.js} +1 -1
- package/dist/pine-core/{p-78fd593d.system.entry.js → p-7265b94c.system.entry.js} +1 -1
- package/dist/pine-core/{p-9187c26c.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-e1653d75.system.entry.js → p-79aa5f43.system.entry.js} +1 -1
- package/dist/pine-core/p-7bbcda0f.system.entry.js +1 -0
- 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-a11a9c40.system.entry.js → p-8252cd84.system.entry.js} +1 -1
- package/dist/pine-core/{p-d0d2a886.system.entry.js → p-84ba0e6a.system.entry.js} +1 -1
- package/dist/pine-core/{p-c1f8a187.entry.js → p-86fc0bfa.entry.js} +1 -1
- package/dist/pine-core/p-90692bb6.entry.js +1 -0
- package/dist/pine-core/{p-2eb8d697.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-714bfdbd.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-a85535a4.system.entry.js +1 -0
- 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-f7a5062f.entry.js → p-b0526f98.entry.js} +1 -1
- package/dist/pine-core/p-b130b716.entry.js +1 -0
- package/dist/pine-core/{p-09413b07.entry.js → p-b195d345.entry.js} +1 -1
- package/dist/pine-core/{p-e3600c53.entry.js → p-b4923acf.entry.js} +1 -1
- package/dist/pine-core/{p-e410b0d8.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-e95225cf.entry.js → p-b8ada1eb.entry.js} +1 -1
- package/dist/pine-core/{p-1614c000.system.entry.js → p-bb85bbb5.system.entry.js} +1 -1
- package/dist/pine-core/{p-fec298bb.system.entry.js → p-bbc539bc.system.entry.js} +2 -2
- package/dist/pine-core/{p-f21aea90.system.entry.js → p-bf833976.system.entry.js} +1 -1
- package/dist/pine-core/{p-c5ce6dea.entry.js → p-c23097af.entry.js} +1 -1
- package/dist/pine-core/p-c2dd84bd.system.entry.js +1 -0
- package/dist/pine-core/{p-869ed1c0.system.entry.js → p-c4520b04.system.entry.js} +1 -1
- package/dist/pine-core/{p-3605a5f5.entry.js → p-c4f68dfc.entry.js} +1 -1
- package/dist/pine-core/{p-d9ffb2d9.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-86bc2a0c.entry.js → p-d0d7d1d4.entry.js} +1 -1
- package/dist/pine-core/{p-b109de2e.entry.js → p-d1112c8a.entry.js} +1 -1
- package/dist/pine-core/p-d4e91ad9.system.entry.js +1 -0
- package/dist/pine-core/{p-7b1e3e91.entry.js → p-da018dcb.entry.js} +1 -1
- package/dist/pine-core/{p-c09dab1a.system.entry.js → p-dc27abe6.system.entry.js} +1 -1
- package/dist/pine-core/{p-3eca0b00.entry.js → p-dc343b6d.entry.js} +1 -1
- package/dist/pine-core/p-dde753e7.system.entry.js +1 -0
- package/dist/pine-core/{p-f35596cd.entry.js → p-dea3a582.entry.js} +1 -1
- package/dist/pine-core/p-df29fd41.entry.js +1 -0
- package/dist/pine-core/{p-1f307e59.system.entry.js → p-e4e2eae2.system.entry.js} +1 -1
- package/dist/pine-core/{p-51b8490d.entry.js → p-e8668178.entry.js} +1 -1
- package/dist/pine-core/{p-5dd393cd.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-8eef80d5.entry.js → p-ed63873c.entry.js} +1 -1
- package/dist/pine-core/{p-12182cab.entry.js → p-f4f6dc36.entry.js} +1 -1
- package/dist/pine-core/{p-be819bff.system.entry.js → p-f67a0ca8.system.entry.js} +1 -1
- package/dist/pine-core/p-fc455968.entry.js +1 -0
- package/dist/pine-core/{p-92ef1608.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-chip/pds-chip.d.ts +12 -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-modal/pds-modal.d.ts +9 -2
- 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 +702 -11
- package/dist/types/utils/closest.d.ts +2 -0
- package/dist/types/utils/types.d.ts +2 -1
- package/dist/types/utils/utils.d.ts +25 -2
- package/dist/vscode.html-data.json +497 -7
- package/hydrate/index.js +4059 -377
- package/hydrate/index.mjs +4059 -377
- 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-CTLu1TM4.js +0 -2
- package/dist/esm-es5/index-DdPaBxPo.js +0 -1
- package/dist/esm-es5/utils-tJa4KYNO.js +0 -1
- package/dist/pine-core/p--Llh7wKm.system.js +0 -1
- package/dist/pine-core/p-02a47ebb.entry.js +0 -1
- package/dist/pine-core/p-12ec8186.system.entry.js +0 -1
- package/dist/pine-core/p-17dc3f87.entry.js +0 -1
- package/dist/pine-core/p-18a59cdd.system.entry.js +0 -1
- package/dist/pine-core/p-2016c878.entry.js +0 -1
- package/dist/pine-core/p-222ff58e.system.entry.js +0 -1
- package/dist/pine-core/p-324a7ae4.system.entry.js +0 -1
- package/dist/pine-core/p-32f10aa9.entry.js +0 -1
- package/dist/pine-core/p-33c0f3c9.system.entry.js +0 -1
- package/dist/pine-core/p-34e38037.system.entry.js +0 -1
- package/dist/pine-core/p-3873f55b.entry.js +0 -1
- package/dist/pine-core/p-3aec9079.entry.js +0 -1
- package/dist/pine-core/p-3c229a00.system.entry.js +0 -1
- package/dist/pine-core/p-43338f77.system.entry.js +0 -1
- package/dist/pine-core/p-4661259e.system.entry.js +0 -1
- package/dist/pine-core/p-585ad368.system.entry.js +0 -1
- package/dist/pine-core/p-5d585aa8.entry.js +0 -1
- package/dist/pine-core/p-613a64f1.entry.js +0 -1
- package/dist/pine-core/p-630f33d6.system.entry.js +0 -1
- package/dist/pine-core/p-63686e2a.system.entry.js +0 -1
- package/dist/pine-core/p-6f7a7d55.entry.js +0 -1
- package/dist/pine-core/p-6fd863e5.system.entry.js +0 -1
- package/dist/pine-core/p-76286a68.system.entry.js +0 -1
- package/dist/pine-core/p-7691a875.system.entry.js +0 -3
- package/dist/pine-core/p-7e44106e.entry.js +0 -1
- package/dist/pine-core/p-84ade640.entry.js +0 -1
- package/dist/pine-core/p-8be301b6.entry.js +0 -1
- package/dist/pine-core/p-8cc270f0.system.entry.js +0 -1
- package/dist/pine-core/p-8cea0d7a.system.entry.js +0 -1
- package/dist/pine-core/p-957dbb0c.entry.js +0 -1
- package/dist/pine-core/p-BG6uGRQj.system.js +0 -1
- package/dist/pine-core/p-BKsJZTyn.js +0 -1
- package/dist/pine-core/p-BrLs99ML.system.js +0 -1
- package/dist/pine-core/p-CTLu1TM4.js +0 -2
- package/dist/pine-core/p-Cr7-rJtJ.system.js +0 -1
- package/dist/pine-core/p-DAIsVNlL.system.js +0 -2
- package/dist/pine-core/p-DDtwbwIl.js +0 -1
- package/dist/pine-core/p-DdPaBxPo.js +0 -1
- package/dist/pine-core/p-DnUJodVd.js +0 -1
- package/dist/pine-core/p-Dr-FzkdE.system.js +0 -1
- package/dist/pine-core/p-a4a58477.entry.js +0 -1
- package/dist/pine-core/p-a98bf89f.system.entry.js +0 -1
- package/dist/pine-core/p-ac0098fd.entry.js +0 -1
- package/dist/pine-core/p-b32e3174.system.entry.js +0 -1
- package/dist/pine-core/p-be4a6cc2.entry.js +0 -1
- package/dist/pine-core/p-c0b3f2c1.system.entry.js +0 -1
- package/dist/pine-core/p-c8bffb08.system.entry.js +0 -1
- package/dist/pine-core/p-cf24ed1e.system.entry.js +0 -1
- package/dist/pine-core/p-d12ef40d.entry.js +0 -1
- package/dist/pine-core/p-d280741f.entry.js +0 -1
- package/dist/pine-core/p-d415bb01.entry.js +0 -2
- package/dist/pine-core/p-d43db3ba.entry.js +0 -1
- package/dist/pine-core/p-db5703f2.entry.js +0 -1
- package/dist/pine-core/p-dd6d9807.system.entry.js +0 -1
- package/dist/pine-core/p-e0da17aa.system.entry.js +0 -1
- package/dist/pine-core/p-ed297f3e.entry.js +0 -1
- package/dist/pine-core/p-fbf5f315.entry.js +0 -1
- package/dist/pine-core/p-kYMYDfJY.system.js +0 -1
- package/dist/pine-core/p-tJa4KYNO.js +0 -1
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
:host(.is-invalid) input:checked {
|
|
11
11
|
background: var(--pine-color-danger);
|
|
12
12
|
}
|
|
13
|
+
:host(.is-invalid) input:checked::after {
|
|
14
|
+
/* stylelint-disable-next-line pine-design-system/prefer-semantic-tokens */
|
|
15
|
+
border-color: var(--pine-color-white);
|
|
16
|
+
}
|
|
13
17
|
:host(.is-invalid) input:checked:hover {
|
|
14
18
|
background: var(--pine-color-danger-hover);
|
|
15
19
|
border-color: var(--pine-color-border-danger-hover);
|
|
@@ -31,8 +35,7 @@
|
|
|
31
35
|
border-color: var(--pine-color-accent-hover);
|
|
32
36
|
}
|
|
33
37
|
:host(.is-indeterminate) input::after {
|
|
34
|
-
|
|
35
|
-
border: 1px solid var(--pine-color-white);
|
|
38
|
+
border: 1px solid var(--pine-color-text-primary);
|
|
36
39
|
border-block-end: var(--pine-border-width-none);
|
|
37
40
|
border-block-start: var(--pine-border-width-none);
|
|
38
41
|
border-inline-start: var(--pine-border-width-none);
|
|
@@ -71,8 +74,7 @@ input:checked:hover {
|
|
|
71
74
|
border-color: var(--pine-color-accent-hover);
|
|
72
75
|
}
|
|
73
76
|
input:checked::after {
|
|
74
|
-
|
|
75
|
-
border: 1px solid var(--pine-color-white);
|
|
77
|
+
border: 1px solid var(--pine-color-text-primary);
|
|
76
78
|
border-block-start: var(--pine-border-width-none);
|
|
77
79
|
border-inline-start: var(--pine-border-width-none);
|
|
78
80
|
content: "";
|
|
@@ -115,6 +117,13 @@ label {
|
|
|
115
117
|
gap: var(--pine-dimension-xs);
|
|
116
118
|
}
|
|
117
119
|
|
|
120
|
+
:host(.has-label-slot) label {
|
|
121
|
+
align-items: center;
|
|
122
|
+
}
|
|
123
|
+
:host(.has-label-slot) input {
|
|
124
|
+
margin-block-start: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
118
127
|
.visually-hidden {
|
|
119
128
|
border: 0;
|
|
120
129
|
clip: rect(0 0 0 0);
|
|
@@ -2,10 +2,14 @@ import { h, Host } 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 checkbox label in place of the `label` text. Clicking it toggles the checkbox.
|
|
7
|
+
*/
|
|
5
8
|
export class PdsCheckbox {
|
|
6
9
|
constructor() {
|
|
7
10
|
this.inheritedAttributes = {};
|
|
8
11
|
this._type = 'checkbox';
|
|
12
|
+
this.hasLabelSlot = false;
|
|
9
13
|
/**
|
|
10
14
|
* It determines whether or not the checkbox is checked.
|
|
11
15
|
*/
|
|
@@ -28,6 +32,9 @@ export class PdsCheckbox {
|
|
|
28
32
|
value: this.value
|
|
29
33
|
});
|
|
30
34
|
};
|
|
35
|
+
this.updateHasLabelSlot = () => {
|
|
36
|
+
this.hasLabelSlot = Array.from(this.el.children).some((child) => child.getAttribute('slot') === 'label');
|
|
37
|
+
};
|
|
31
38
|
}
|
|
32
39
|
updateIndeterminate() {
|
|
33
40
|
this.indeterminate = undefined;
|
|
@@ -43,6 +50,9 @@ export class PdsCheckbox {
|
|
|
43
50
|
if (this.disabled) {
|
|
44
51
|
classNames.push('is-disabled');
|
|
45
52
|
}
|
|
53
|
+
if (this.hasLabelSlot) {
|
|
54
|
+
classNames.push('has-label-slot');
|
|
55
|
+
}
|
|
46
56
|
return classNames.join(' ');
|
|
47
57
|
}
|
|
48
58
|
connectedCallback() {
|
|
@@ -84,11 +94,12 @@ export class PdsCheckbox {
|
|
|
84
94
|
}
|
|
85
95
|
componentWillLoad() {
|
|
86
96
|
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
97
|
+
this.updateHasLabelSlot();
|
|
87
98
|
}
|
|
88
99
|
render() {
|
|
89
|
-
return (h(Host, { key: '
|
|
90
|
-
h("div", { key: '
|
|
91
|
-
h("div", { key: '
|
|
100
|
+
return (h(Host, { key: 'aef1cece81ef5b59ee50d31f8542ffe627230734', class: this.classNames() }, h("label", { key: 'ad41c1039f2d11ff52e362e5e45d4c25e1d71b71', htmlFor: this.componentId }, h("input", Object.assign({ key: '180959e7154129ecbfe6a9151e13610d4799ece2', 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 }, this.inheritedAttributes)), h("span", { key: '37917f2d69bc0927d38fd8400f48201a451e1d4f', class: this.hideLabel ? 'visually-hidden' : '' }, h("slot", { key: 'b406e52494565eec642ebc3449a95319cf772398', name: "label", onSlotchange: this.updateHasLabelSlot }, this.label))), this.helperMessage &&
|
|
101
|
+
h("div", { key: '3fb5410f4c504da78c64511e9bf0058b4a7aa23b', class: 'pds-checkbox__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
102
|
+
h("div", { key: 'af9a7771b1b5444fc3e994e7c7904557a2507e3a', class: `pds-checkbox__message pds-checkbox__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '13f8ba65484f33df384dcff6179e756321c3238d', icon: danger, size: "small" }), this.errorMessage)));
|
|
92
103
|
}
|
|
93
104
|
static get is() { return "pds-checkbox"; }
|
|
94
105
|
static get encapsulation() { return "shadow"; }
|
|
@@ -336,6 +347,11 @@ export class PdsCheckbox {
|
|
|
336
347
|
}
|
|
337
348
|
};
|
|
338
349
|
}
|
|
350
|
+
static get states() {
|
|
351
|
+
return {
|
|
352
|
+
"hasLabelSlot": {}
|
|
353
|
+
};
|
|
354
|
+
}
|
|
339
355
|
static get events() {
|
|
340
356
|
return [{
|
|
341
357
|
"method": "pdsCheckboxChange",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
:host(.pds-chip--accent) .pds-chip__dot {
|
|
15
15
|
/* stylelint-disable-next-line */
|
|
16
|
-
background: var(--pine-chip-color-accent-dot);
|
|
16
|
+
background: var(--pds-chip-dot-color, var(--pine-chip-color-accent-dot));
|
|
17
17
|
}
|
|
18
18
|
:host(.pds-chip--accent) .pds-chip__label, :host(.pds-chip--accent) .pds-chip__button, :host(.pds-chip--accent) .pds-chip__close {
|
|
19
19
|
/* stylelint-disable-next-line */
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
}
|
|
37
37
|
:host(.pds-chip--danger) .pds-chip__dot {
|
|
38
38
|
/* stylelint-disable-next-line */
|
|
39
|
-
background: var(--pine-chip-color-danger-dot);
|
|
39
|
+
background: var(--pds-chip-dot-color, var(--pine-chip-color-danger-dot));
|
|
40
40
|
}
|
|
41
41
|
:host(.pds-chip--danger) .pds-chip__label, :host(.pds-chip--danger) .pds-chip__button, :host(.pds-chip--danger) .pds-chip__close {
|
|
42
42
|
/* stylelint-disable-next-line */
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
:host(.pds-chip--info) .pds-chip__dot {
|
|
61
61
|
/* stylelint-disable-next-line */
|
|
62
|
-
background: var(--pine-chip-color-info-dot);
|
|
62
|
+
background: var(--pds-chip-dot-color, var(--pine-chip-color-info-dot));
|
|
63
63
|
}
|
|
64
64
|
:host(.pds-chip--info) .pds-chip__label, :host(.pds-chip--info) .pds-chip__button, :host(.pds-chip--info) .pds-chip__close {
|
|
65
65
|
/* stylelint-disable-next-line */
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
}
|
|
83
83
|
:host(.pds-chip--neutral) .pds-chip__dot {
|
|
84
84
|
/* stylelint-disable-next-line */
|
|
85
|
-
background: var(--pine-chip-color-neutral-dot);
|
|
85
|
+
background: var(--pds-chip-dot-color, var(--pine-chip-color-neutral-dot));
|
|
86
86
|
}
|
|
87
87
|
:host(.pds-chip--neutral) .pds-chip__label, :host(.pds-chip--neutral) .pds-chip__button, :host(.pds-chip--neutral) .pds-chip__close {
|
|
88
88
|
/* stylelint-disable-next-line */
|
|
@@ -99,13 +99,59 @@
|
|
|
99
99
|
background: var(--pine-chip-color-neutral-hover);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
:host(.pds-chip--solid) {
|
|
103
|
+
background: var(--pine-chip-color-solid);
|
|
104
|
+
border: var(--pine-border-width) solid var(--pine-chip-color-solid-hover);
|
|
105
|
+
}
|
|
106
|
+
:host(.pds-chip--solid) .pds-chip__dot {
|
|
107
|
+
/* stylelint-disable-next-line */
|
|
108
|
+
background: var(--pds-chip-dot-color, var(--pine-chip-color-solid-dot));
|
|
109
|
+
}
|
|
110
|
+
:host(.pds-chip--solid) .pds-chip__label, :host(.pds-chip--solid) .pds-chip__button, :host(.pds-chip--solid) .pds-chip__close {
|
|
111
|
+
/* stylelint-disable-next-line */
|
|
112
|
+
color: var(--pine-chip-color-solid-text);
|
|
113
|
+
font-weight: var(--pine-font-weight-medium);
|
|
114
|
+
}
|
|
115
|
+
:host(.pds-chip--solid) .pds-chip__close:hover {
|
|
116
|
+
/* stylelint-disable-next-line */
|
|
117
|
+
background: var(--pine-chip-color-solid-hover);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
:host(.pds-chip--solid.pds-chip--dropdown:hover) {
|
|
121
|
+
/* stylelint-disable-next-line */
|
|
122
|
+
background: var(--pine-chip-color-solid-hover);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:host(.pds-chip--subtle) {
|
|
126
|
+
background: var(--pine-chip-color-subtle);
|
|
127
|
+
border: var(--pine-border-width) solid var(--pine-chip-color-subtle-hover);
|
|
128
|
+
}
|
|
129
|
+
:host(.pds-chip--subtle) .pds-chip__dot {
|
|
130
|
+
/* stylelint-disable-next-line */
|
|
131
|
+
background: var(--pds-chip-dot-color, var(--pine-chip-color-subtle-dot));
|
|
132
|
+
}
|
|
133
|
+
:host(.pds-chip--subtle) .pds-chip__label, :host(.pds-chip--subtle) .pds-chip__button, :host(.pds-chip--subtle) .pds-chip__close {
|
|
134
|
+
/* stylelint-disable-next-line */
|
|
135
|
+
color: var(--pine-chip-color-subtle-text);
|
|
136
|
+
font-weight: var(--pine-font-weight-medium);
|
|
137
|
+
}
|
|
138
|
+
:host(.pds-chip--subtle) .pds-chip__close:hover {
|
|
139
|
+
/* stylelint-disable-next-line */
|
|
140
|
+
background: var(--pine-chip-color-subtle-hover);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
:host(.pds-chip--subtle.pds-chip--dropdown:hover) {
|
|
144
|
+
/* stylelint-disable-next-line */
|
|
145
|
+
background: var(--pine-chip-color-subtle-hover);
|
|
146
|
+
}
|
|
147
|
+
|
|
102
148
|
:host(.pds-chip--success) {
|
|
103
149
|
background: var(--pine-chip-color-success);
|
|
104
150
|
border: var(--pine-border-width) solid var(--pine-chip-color-success-hover);
|
|
105
151
|
}
|
|
106
152
|
:host(.pds-chip--success) .pds-chip__dot {
|
|
107
153
|
/* stylelint-disable-next-line */
|
|
108
|
-
background: var(--pine-chip-color-success-dot);
|
|
154
|
+
background: var(--pds-chip-dot-color, var(--pine-chip-color-success-dot));
|
|
109
155
|
}
|
|
110
156
|
:host(.pds-chip--success) .pds-chip__label, :host(.pds-chip--success) .pds-chip__button, :host(.pds-chip--success) .pds-chip__close {
|
|
111
157
|
/* stylelint-disable-next-line */
|
|
@@ -128,7 +174,7 @@
|
|
|
128
174
|
}
|
|
129
175
|
:host(.pds-chip--warning) .pds-chip__dot {
|
|
130
176
|
/* stylelint-disable-next-line */
|
|
131
|
-
background: var(--pine-chip-color-warning-dot);
|
|
177
|
+
background: var(--pds-chip-dot-color, var(--pine-chip-color-warning-dot));
|
|
132
178
|
}
|
|
133
179
|
:host(.pds-chip--warning) .pds-chip__label, :host(.pds-chip--warning) .pds-chip__button, :host(.pds-chip--warning) .pds-chip__close {
|
|
134
180
|
/* stylelint-disable-next-line */
|
|
@@ -145,6 +191,10 @@
|
|
|
145
191
|
background: var(--pine-chip-color-warning-hover);
|
|
146
192
|
}
|
|
147
193
|
|
|
194
|
+
:host(.pds-chip--solid) {
|
|
195
|
+
border-color: transparent;
|
|
196
|
+
}
|
|
197
|
+
|
|
148
198
|
.pds-chip__dot {
|
|
149
199
|
border: var(--pine-border-width) solid transparent;
|
|
150
200
|
border-radius: var(--pine-border-radius-full);
|
|
@@ -155,6 +205,10 @@
|
|
|
155
205
|
width: var(--pine-dimension-2xs);
|
|
156
206
|
}
|
|
157
207
|
|
|
208
|
+
.pds-chip__icon {
|
|
209
|
+
color: var(--pds-chip-icon-color, currentColor);
|
|
210
|
+
}
|
|
211
|
+
|
|
158
212
|
.pds-chip__label {
|
|
159
213
|
align-items: center;
|
|
160
214
|
display: flex;
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import { downSmall, remove } from "@pine-ds/icons/icons";
|
|
2
2
|
import { Host, h } from "@stencil/core";
|
|
3
3
|
import { setupTruncationTooltip } from "../../utils/truncation-tooltip";
|
|
4
|
+
import { normalizeColorValue } from "../../utils/utils";
|
|
5
|
+
const SENTIMENT_DOT_COLORS = {
|
|
6
|
+
accent: 'var(--pine-chip-color-accent-dot)',
|
|
7
|
+
danger: 'var(--pine-chip-color-danger-dot)',
|
|
8
|
+
info: 'var(--pine-chip-color-info-dot)',
|
|
9
|
+
neutral: 'var(--pine-chip-color-neutral-dot)',
|
|
10
|
+
solid: 'var(--pine-chip-color-solid-dot)',
|
|
11
|
+
subtle: 'var(--pine-chip-color-subtle-dot)',
|
|
12
|
+
success: 'var(--pine-chip-color-success-dot)',
|
|
13
|
+
warning: 'var(--pine-chip-color-warning-dot)',
|
|
14
|
+
};
|
|
4
15
|
/**
|
|
5
16
|
* @slot (default) - The chip's label text.
|
|
6
17
|
* @part button
|
|
18
|
+
* @part dot - Exposes the dot for styling, such as a custom color. Appears only when `dot` is set.
|
|
19
|
+
* @part icon - Exposes the icon component for styling, such as a custom color. Appears only when `icon` is set.
|
|
7
20
|
*/
|
|
8
21
|
export class PdsChip {
|
|
9
22
|
constructor() {
|
|
@@ -123,7 +136,7 @@ export class PdsChip {
|
|
|
123
136
|
// which is already focusable and bubbles focusin to the host, so
|
|
124
137
|
// initTruncationTooltip passes `manageTabIndex: false` there to avoid
|
|
125
138
|
// nesting a second tab stop inside the button.
|
|
126
|
-
const chipContent = isDropdown ? (h("button", { class: "pds-chip__button", type: "button", part: "button" }, this.icon && h("pds-icon", { icon: this.icon, size: this.iconSize, "aria-hidden": "true" }), showDot && h("i", { class: "pds-chip__dot", "aria-hidden": "true" }), h("span", { class: "pds-chip__label-text", ref: (el) => (this.labelTextEl = el) }, h("slot", null)), h("pds-icon", { icon: downSmall, size: this.iconSize, "aria-hidden": "true" }))) : (h("span", { class: "pds-chip__label" }, this.icon && h("pds-icon", { icon: this.icon, size: this.iconSize, "aria-hidden": "true" }), showDot && h("i", { class: "pds-chip__dot", "aria-hidden": "true" }), h("span", { class: "pds-chip__label-text", ref: (el) => (this.labelTextEl = el) }, h("slot", null))));
|
|
139
|
+
const chipContent = isDropdown ? (h("button", { class: "pds-chip__button", type: "button", part: "button" }, this.icon && h("pds-icon", { class: "pds-chip__icon", part: "icon", icon: this.icon, size: this.iconSize, "aria-hidden": "true" }), showDot && h("i", { class: "pds-chip__dot", part: "dot", "aria-hidden": "true" }), h("span", { class: "pds-chip__label-text", ref: (el) => (this.labelTextEl = el) }, h("slot", null)), h("pds-icon", { icon: downSmall, size: this.iconSize, "aria-hidden": "true" }))) : (h("span", { class: "pds-chip__label" }, this.icon && h("pds-icon", { class: "pds-chip__icon", part: "icon", icon: this.icon, size: this.iconSize, "aria-hidden": "true" }), showDot && h("i", { class: "pds-chip__dot", part: "dot", "aria-hidden": "true" }), h("span", { class: "pds-chip__label-text", ref: (el) => (this.labelTextEl = el) }, h("slot", null))));
|
|
127
140
|
return chipContent;
|
|
128
141
|
}
|
|
129
142
|
get hostStyles() {
|
|
@@ -132,7 +145,21 @@ export class PdsChip {
|
|
|
132
145
|
// query) without !important — the same pattern pds-box uses for min-width.
|
|
133
146
|
// The width and the min-width/box-sizing that make it work are applied in
|
|
134
147
|
// pds-chip.scss under :host([max-width]).
|
|
135
|
-
|
|
148
|
+
const styles = {};
|
|
149
|
+
if (this.maxWidth) {
|
|
150
|
+
styles['--pds-chip-max-width'] = this.maxWidth;
|
|
151
|
+
}
|
|
152
|
+
// Custom properties rather than inline colors on the dot/icon, so a
|
|
153
|
+
// consumer's ::part(dot) or ::part(icon) rule still wins over the prop.
|
|
154
|
+
const dotColor = normalizeColorValue(this.dotColor, { semanticMap: SENTIMENT_DOT_COLORS });
|
|
155
|
+
if (dotColor !== undefined) {
|
|
156
|
+
styles['--pds-chip-dot-color'] = dotColor;
|
|
157
|
+
}
|
|
158
|
+
const iconColor = normalizeColorValue(this.iconColor, { semanticMap: SENTIMENT_DOT_COLORS });
|
|
159
|
+
if (iconColor !== undefined) {
|
|
160
|
+
styles['--pds-chip-icon-color'] = iconColor;
|
|
161
|
+
}
|
|
162
|
+
return styles;
|
|
136
163
|
}
|
|
137
164
|
renderCloseButton() {
|
|
138
165
|
const CloseElement = this.removeUrl ? 'a' : 'button';
|
|
@@ -179,7 +206,7 @@ export class PdsChip {
|
|
|
179
206
|
return (h(CloseElement, Object.assign({}, closeAttributes(), { onClick: this.handleCloseClick }), h("pds-icon", { icon: remove, size: this.iconSize })));
|
|
180
207
|
}
|
|
181
208
|
render() {
|
|
182
|
-
return (h(Host, { key: '
|
|
209
|
+
return (h(Host, { key: '065b561b3532d724a420b3fb1e4abaccd05b8879', class: this.classNames(), id: this.componentId, style: this.hostStyles }, this.setChipContent(), this.effectiveVariant === 'tag' && this.renderCloseButton()));
|
|
183
210
|
}
|
|
184
211
|
static get is() { return "pds-chip"; }
|
|
185
212
|
static get encapsulation() { return "shadow"; }
|
|
@@ -237,6 +264,25 @@ export class PdsChip {
|
|
|
237
264
|
"attribute": "dot",
|
|
238
265
|
"defaultValue": "false"
|
|
239
266
|
},
|
|
267
|
+
"dotColor": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"mutable": false,
|
|
270
|
+
"complexType": {
|
|
271
|
+
"original": "string",
|
|
272
|
+
"resolved": "string",
|
|
273
|
+
"references": {}
|
|
274
|
+
},
|
|
275
|
+
"required": false,
|
|
276
|
+
"optional": true,
|
|
277
|
+
"docs": {
|
|
278
|
+
"tags": [],
|
|
279
|
+
"text": "Sets the dot color. Accepts a sentiment name other than `brand` (e.g. `success`), a color token, or a [valid color value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).\nDefaults to the dot color of the chip's sentiment. Only applies when `dot` is set."
|
|
280
|
+
},
|
|
281
|
+
"getter": false,
|
|
282
|
+
"setter": false,
|
|
283
|
+
"reflect": false,
|
|
284
|
+
"attribute": "dot-color"
|
|
285
|
+
},
|
|
240
286
|
"icon": {
|
|
241
287
|
"type": "string",
|
|
242
288
|
"mutable": false,
|
|
@@ -256,6 +302,25 @@ export class PdsChip {
|
|
|
256
302
|
"reflect": false,
|
|
257
303
|
"attribute": "icon"
|
|
258
304
|
},
|
|
305
|
+
"iconColor": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"mutable": false,
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "string",
|
|
310
|
+
"resolved": "string",
|
|
311
|
+
"references": {}
|
|
312
|
+
},
|
|
313
|
+
"required": false,
|
|
314
|
+
"optional": true,
|
|
315
|
+
"docs": {
|
|
316
|
+
"tags": [],
|
|
317
|
+
"text": "Sets the icon color. Accepts a sentiment name other than `brand` (e.g. `success`), a color token, or a [valid color value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).\nDefaults to the chip's text color. Only applies when `icon` is set."
|
|
318
|
+
},
|
|
319
|
+
"getter": false,
|
|
320
|
+
"setter": false,
|
|
321
|
+
"reflect": false,
|
|
322
|
+
"attribute": "icon-color"
|
|
323
|
+
},
|
|
259
324
|
"size": {
|
|
260
325
|
"type": "string",
|
|
261
326
|
"mutable": false,
|
|
@@ -290,7 +355,7 @@ export class PdsChip {
|
|
|
290
355
|
"mutable": false,
|
|
291
356
|
"complexType": {
|
|
292
357
|
"original": "ChipSentimentType",
|
|
293
|
-
"resolved": "\"accent\" | \"brand\" | \"danger\" | \"info\" | \"neutral\" | \"success\" | \"warning\"",
|
|
358
|
+
"resolved": "\"accent\" | \"brand\" | \"danger\" | \"info\" | \"neutral\" | \"solid\" | \"subtle\" | \"success\" | \"warning\"",
|
|
294
359
|
"references": {
|
|
295
360
|
"ChipSentimentType": {
|
|
296
361
|
"location": "import",
|
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
--pine-chip-color-neutral-hover: var(--pine-color-grey-300);
|
|
16
16
|
--pine-chip-color-neutral-dot: var(--pine-color-grey-600);
|
|
17
17
|
--pine-chip-color-neutral-text: var(--pine-color-grey-950);
|
|
18
|
+
--pine-chip-color-solid: var(--pine-color-grey-900);
|
|
19
|
+
--pine-chip-color-solid-hover: var(--pine-color-grey-950);
|
|
20
|
+
--pine-chip-color-solid-dot: var(--pine-color-white);
|
|
21
|
+
--pine-chip-color-solid-text: var(--pine-color-white);
|
|
22
|
+
--pine-chip-color-subtle: var(--pine-color-white);
|
|
23
|
+
--pine-chip-color-subtle-hover: var(--pine-color-grey-300);
|
|
24
|
+
--pine-chip-color-subtle-dot: var(--pine-color-grey-900);
|
|
25
|
+
--pine-chip-color-subtle-text: var(--pine-color-grey-900);
|
|
18
26
|
--pine-chip-color-success: var(--pine-color-green-100);
|
|
19
27
|
--pine-chip-color-success-hover: var(--pine-color-green-300);
|
|
20
28
|
--pine-chip-color-success-dot: var(--pine-color-green-600);
|
|
@@ -42,6 +50,14 @@
|
|
|
42
50
|
--pine-chip-color-neutral-hover: var(--pine-color-grey-600);
|
|
43
51
|
--pine-chip-color-neutral-dot: var(--pine-color-grey-300);
|
|
44
52
|
--pine-chip-color-neutral-text: var(--pine-color-grey-100);
|
|
53
|
+
--pine-chip-color-solid: var(--pine-color-white);
|
|
54
|
+
--pine-chip-color-solid-hover: var(--pine-color-grey-100);
|
|
55
|
+
--pine-chip-color-solid-dot: var(--pine-color-grey-900);
|
|
56
|
+
--pine-chip-color-solid-text: var(--pine-color-grey-900);
|
|
57
|
+
--pine-chip-color-subtle: var(--pine-color-grey-900);
|
|
58
|
+
--pine-chip-color-subtle-hover: var(--pine-color-grey-500);
|
|
59
|
+
--pine-chip-color-subtle-dot: var(--pine-color-white);
|
|
60
|
+
--pine-chip-color-subtle-text: var(--pine-color-white);
|
|
45
61
|
--pine-chip-color-success: var(--pine-color-green-900);
|
|
46
62
|
--pine-chip-color-success-hover: var(--pine-color-green-800);
|
|
47
63
|
--pine-chip-color-success-dot: var(--pine-color-green-400);
|
|
@@ -2,10 +2,24 @@ import { html } from 'lit';
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
+
args: {
|
|
6
|
+
dotColor: '',
|
|
7
|
+
iconColor: '',
|
|
8
|
+
},
|
|
5
9
|
argTypes: {
|
|
10
|
+
// `dot` and `icon` are also CSS part names; without these the parts
|
|
11
|
+
// entries replace the prop controls in the Controls panel.
|
|
12
|
+
dot: {
|
|
13
|
+
control: { type: 'boolean' },
|
|
14
|
+
table: { category: 'properties' },
|
|
15
|
+
},
|
|
16
|
+
icon: {
|
|
17
|
+
control: { type: 'text' },
|
|
18
|
+
table: { category: 'properties' },
|
|
19
|
+
},
|
|
6
20
|
sentiment: {
|
|
7
21
|
control: { type: 'select' },
|
|
8
|
-
options: ['accent', 'brand', 'danger', 'info', 'neutral', 'success', 'warning'],
|
|
22
|
+
options: ['accent', 'brand', 'danger', 'info', 'neutral', 'solid', 'subtle', 'success', 'warning'],
|
|
9
23
|
},
|
|
10
24
|
size: {
|
|
11
25
|
control: { type: 'select' },
|
|
@@ -25,7 +39,9 @@ const BaseTemplate = (args) => html`
|
|
|
25
39
|
<pds-chip
|
|
26
40
|
component-id="${args.componentId}"
|
|
27
41
|
?dot=${args.dot}
|
|
42
|
+
dot-color="${args.dotColor}"
|
|
28
43
|
icon="${args.icon}"
|
|
44
|
+
icon-color="${args.iconColor}"
|
|
29
45
|
size="${args.size}"
|
|
30
46
|
sentiment="${args.sentiment}"
|
|
31
47
|
variant="${args.variant}"
|
|
@@ -77,6 +93,28 @@ Icon.args = {
|
|
|
77
93
|
variant: "text",
|
|
78
94
|
}
|
|
79
95
|
|
|
96
|
+
export const DotColor = BaseTemplate.bind();
|
|
97
|
+
DotColor.args = {
|
|
98
|
+
dot: true,
|
|
99
|
+
dotColor: "success",
|
|
100
|
+
icon: "",
|
|
101
|
+
size: "md",
|
|
102
|
+
sentiment: "neutral",
|
|
103
|
+
slot: "Active",
|
|
104
|
+
variant: "text",
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export const IconColor = BaseTemplate.bind();
|
|
108
|
+
IconColor.args = {
|
|
109
|
+
dot: false,
|
|
110
|
+
icon: "check",
|
|
111
|
+
iconColor: "success",
|
|
112
|
+
size: "md",
|
|
113
|
+
sentiment: "neutral",
|
|
114
|
+
slot: "Paid",
|
|
115
|
+
variant: "text",
|
|
116
|
+
}
|
|
117
|
+
|
|
80
118
|
export const Dropdown = BaseTemplate.bind();
|
|
81
119
|
Dropdown.args = {
|
|
82
120
|
dot: false,
|