@pine-ds/core 3.0.3 → 3.2.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/index.d.ts +20 -0
- package/components/index.js +10 -0
- package/components/index.js.map +1 -1
- package/components/index2.js +1 -1
- package/components/index2.js.map +1 -1
- package/components/mock-pds-modal.d.ts +11 -0
- package/components/mock-pds-modal.js +108 -0
- package/components/mock-pds-modal.js.map +1 -0
- package/components/pds-alert.d.ts +11 -0
- package/components/pds-alert.js +107 -0
- package/components/pds-alert.js.map +1 -0
- package/components/pds-avatar.js +1 -1
- package/components/pds-box.js +1 -110
- package/components/pds-box.js.map +1 -1
- package/components/pds-box2.js +115 -0
- package/components/pds-box2.js.map +1 -0
- package/components/pds-button2.js +31 -5
- package/components/pds-button2.js.map +1 -1
- package/components/pds-checkbox2.js +9 -3
- package/components/pds-checkbox2.js.map +1 -1
- package/components/pds-chip.js +1 -1
- package/components/pds-copytext.js +2 -2
- package/components/pds-copytext.js.map +1 -1
- package/components/pds-divider.js +1 -1
- package/components/pds-dropdown-menu-item.d.ts +11 -0
- package/components/pds-dropdown-menu-item.js +117 -0
- package/components/pds-dropdown-menu-item.js.map +1 -0
- package/components/pds-dropdown-menu-separator.d.ts +11 -0
- package/components/pds-dropdown-menu-separator.js +44 -0
- package/components/pds-dropdown-menu-separator.js.map +1 -0
- package/components/pds-dropdown-menu.d.ts +11 -0
- package/components/pds-dropdown-menu.js +1600 -0
- package/components/pds-dropdown-menu.js.map +1 -0
- package/components/pds-icon2.js +103 -7
- package/components/pds-icon2.js.map +1 -1
- package/components/pds-image.js +2 -2
- package/components/pds-input.js +4 -4
- package/components/pds-link.js +1 -67
- package/components/pds-link.js.map +1 -1
- package/components/pds-link2.js +85 -0
- package/components/pds-link2.js.map +1 -0
- package/components/pds-loader2.js +1 -1
- package/components/pds-modal-content.d.ts +11 -0
- package/components/pds-modal-content.js +111 -0
- package/components/pds-modal-content.js.map +1 -0
- package/components/pds-modal-footer.d.ts +11 -0
- package/components/pds-modal-footer.js +35 -0
- package/components/pds-modal-footer.js.map +1 -0
- package/components/pds-modal-header.d.ts +11 -0
- package/components/pds-modal-header.js +35 -0
- package/components/pds-modal-header.js.map +1 -0
- package/components/pds-modal.d.ts +11 -0
- package/components/pds-modal.js +278 -0
- package/components/pds-modal.js.map +1 -0
- package/components/pds-popover.js +33 -1
- package/components/pds-popover.js.map +1 -1
- package/components/pds-progress.js +1 -1
- package/components/pds-radio.js +3 -3
- package/components/pds-row.js +1 -1
- package/components/pds-select.js +2 -2
- package/components/pds-sortable-item.js +1 -1
- package/components/pds-sortable.js +1 -1
- package/components/pds-switch.js +8 -3
- package/components/pds-switch.js.map +1 -1
- package/components/pds-tab.js +3 -3
- package/components/pds-table-body.js +1 -1
- package/components/pds-table-cell2.js +2 -2
- package/components/pds-table-head-cell2.js +2 -2
- package/components/pds-table-head.js +1 -1
- package/components/pds-table-row.js +1 -1
- package/components/pds-table.js +1 -1
- package/components/pds-tabpanel.js +1 -1
- package/components/pds-tabs.js +1 -1
- package/components/pds-text.js +1 -53
- package/components/pds-text.js.map +1 -1
- package/components/pds-text2.js +58 -0
- package/components/pds-text2.js.map +1 -0
- package/components/pds-textarea.js +4 -4
- package/components/pds-toast.d.ts +11 -0
- package/components/pds-toast.js +137 -0
- package/components/pds-toast.js.map +1 -0
- package/components/pds-tooltip.js +283 -81
- package/components/pds-tooltip.js.map +1 -1
- package/components/utils.js +3 -2
- package/components/utils.js.map +1 -1
- package/dist/cjs/{index-Br1YlNK2.js → index-CG2Rr2io.js} +3 -3
- package/dist/cjs/index-CG2Rr2io.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mock-pds-modal.cjs.entry.js +86 -0
- package/dist/cjs/mock-pds-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/mock-pds-modal.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-accordion.cjs.entry.js +1 -1
- package/dist/cjs/pds-alert.cjs.entry.js +66 -0
- package/dist/cjs/pds-alert.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-alert.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-avatar.cjs.entry.js +2 -2
- package/dist/cjs/pds-box.cjs.entry.js +2 -2
- package/dist/cjs/pds-box.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-box.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-button.cjs.entry.js +33 -7
- package/dist/cjs/pds-button.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-button.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-checkbox.cjs.entry.js +10 -4
- package/dist/cjs/pds-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-chip.cjs.entry.js +2 -2
- package/dist/cjs/pds-copytext.cjs.entry.js +3 -3
- package/dist/cjs/pds-copytext.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-copytext.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-divider.cjs.entry.js +1 -1
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +82 -0
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-dropdown-menu-item.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +25 -0
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-dropdown-menu-separator.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +1574 -0
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-dropdown-menu.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-icon.cjs.entry.js +102 -7
- package/dist/cjs/pds-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-icon.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-image.cjs.entry.js +2 -2
- package/dist/cjs/pds-input.cjs.entry.js +6 -6
- package/dist/cjs/pds-link.cjs.entry.js +16 -4
- package/dist/cjs/pds-link.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-link.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-loader.cjs.entry.js +1 -1
- package/dist/cjs/pds-modal-content.cjs.entry.js +93 -0
- package/dist/cjs/pds-modal-content.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-modal-content.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-modal-footer.cjs.entry.js +20 -0
- package/dist/cjs/pds-modal-footer.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-modal-footer.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-modal-header.cjs.entry.js +20 -0
- package/dist/cjs/pds-modal-header.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-modal-header.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-modal.cjs.entry.js +253 -0
- package/dist/cjs/pds-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-modal.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-popover.cjs.entry.js +33 -1
- package/dist/cjs/pds-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-popover.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-progress.cjs.entry.js +1 -1
- package/dist/cjs/pds-radio.cjs.entry.js +4 -4
- package/dist/cjs/pds-row.cjs.entry.js +1 -1
- package/dist/cjs/pds-select.cjs.entry.js +3 -3
- package/dist/cjs/pds-sortable-item.cjs.entry.js +2 -2
- package/dist/cjs/pds-sortable.cjs.entry.js +1 -1
- package/dist/cjs/pds-switch.cjs.entry.js +9 -4
- package/dist/cjs/pds-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-tab.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +3 -3
- package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
- package/dist/cjs/pds-table-row.cjs.entry.js +1 -1
- package/dist/cjs/pds-table.cjs.entry.js +1 -1
- package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
- package/dist/cjs/pds-tabs.cjs.entry.js +1 -1
- package/dist/cjs/pds-text.cjs.entry.js +2 -2
- package/dist/cjs/pds-text.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-text.entry.cjs.js.map +1 -1
- package/dist/cjs/pds-textarea.cjs.entry.js +6 -6
- package/dist/cjs/pds-toast.cjs.entry.js +104 -0
- package/dist/cjs/pds-toast.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-toast.entry.cjs.js.map +1 -0
- package/dist/cjs/pds-tooltip.cjs.entry.js +281 -79
- package/dist/cjs/pds-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-tooltip.entry.cjs.js.map +1 -1
- package/dist/cjs/pine-core.cjs.js +1 -1
- package/dist/cjs/{utils-CQKIgzWg.js → utils-jWx-Mf12.js} +5 -4
- package/dist/cjs/utils-jWx-Mf12.js.map +1 -0
- package/dist/collection/collection-manifest.json +10 -0
- package/dist/collection/components/pds-alert/pds-alert.css +108 -0
- package/dist/collection/components/pds-alert/pds-alert.js +198 -0
- package/dist/collection/components/pds-alert/pds-alert.js.map +1 -0
- package/dist/collection/components/pds-alert/pds-alert.tokens.css +32 -0
- package/dist/collection/components/pds-alert/stories/pds-alert.stories.js +97 -0
- package/dist/collection/components/pds-avatar/pds-avatar.js +1 -1
- package/dist/collection/components/pds-box/pds-box.js +8 -8
- package/dist/collection/components/pds-box/pds-box.js.map +1 -1
- package/dist/collection/components/pds-button/pds-button.css +7 -11
- package/dist/collection/components/pds-button/pds-button.js +37 -5
- package/dist/collection/components/pds-button/pds-button.js.map +1 -1
- package/dist/collection/components/pds-button/stories/pds-button.stories.js +46 -11
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +9 -3
- package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +1 -1
- package/dist/collection/components/pds-chip/pds-chip.js +1 -1
- package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +1 -1
- package/dist/collection/components/pds-copytext/pds-copytext.css +1 -1
- package/dist/collection/components/pds-copytext/pds-copytext.js +1 -1
- package/dist/collection/components/pds-divider/pds-divider.js +1 -1
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +68 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +219 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js.map +1 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.css +4 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +72 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js.map +1 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +16 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +328 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js.map +1 -0
- package/dist/collection/components/pds-dropdown-menu/stories/pds-dropdown-menu.stories.js +44 -0
- package/dist/collection/components/pds-icon/stories/pds-icon.stories.js +1 -1
- package/dist/collection/components/pds-image/pds-image.js +2 -2
- package/dist/collection/components/pds-input/pds-input.js +4 -4
- package/dist/collection/components/pds-link/pds-link.css +23 -9
- package/dist/collection/components/pds-link/pds-link.js +33 -2
- package/dist/collection/components/pds-link/pds-link.js.map +1 -1
- package/dist/collection/components/pds-link/stories/pds-link.stories.js +15 -2
- package/dist/collection/components/pds-loader/pds-loader.js +1 -1
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.css +27 -0
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +125 -0
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js.map +1 -0
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.css +8 -0
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +18 -0
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js.map +1 -0
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.css +8 -0
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +18 -0
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js.map +1 -0
- package/dist/collection/components/pds-modal/pds-modal.css +79 -0
- package/dist/collection/components/pds-modal/pds-modal.js +426 -0
- package/dist/collection/components/pds-modal/pds-modal.js.map +1 -0
- package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +415 -0
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +256 -0
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js.map +1 -0
- package/dist/collection/components/pds-popover/pds-popover.js +33 -1
- package/dist/collection/components/pds-popover/pds-popover.js.map +1 -1
- package/dist/collection/components/pds-popover/stories/pds-popover.stories.js +4 -5
- package/dist/collection/components/pds-progress/pds-progress.js +1 -1
- package/dist/collection/components/pds-radio/pds-radio.js +3 -3
- package/dist/collection/components/pds-row/pds-row.js +1 -1
- package/dist/collection/components/pds-select/pds-select.js +2 -2
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
- package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
- package/dist/collection/components/pds-switch/pds-switch.js +8 -3
- package/dist/collection/components/pds-switch/pds-switch.js.map +1 -1
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +2 -2
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
- package/dist/collection/components/pds-table/pds-table.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +3 -3
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
- package/dist/collection/components/pds-text/pds-text.js +2 -2
- package/dist/collection/components/pds-text/pds-text.js.map +1 -1
- package/dist/collection/components/pds-textarea/pds-textarea.js +4 -4
- package/dist/collection/components/pds-toast/pds-toast.css +153 -0
- package/dist/collection/components/pds-toast/pds-toast.js +263 -0
- package/dist/collection/components/pds-toast/pds-toast.js.map +1 -0
- package/dist/collection/components/pds-toast/stories/pds-toast.stories.js +103 -0
- package/dist/collection/components/pds-tooltip/pds-tooltip.css +2 -12
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +211 -26
- package/dist/collection/components/pds-tooltip/pds-tooltip.js.map +1 -1
- package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +7 -3
- package/dist/collection/utils/interfaces.js +2 -0
- package/dist/collection/utils/interfaces.js.map +1 -0
- package/dist/collection/utils/overlay.js +66 -49
- package/dist/collection/utils/overlay.js.map +1 -1
- package/dist/collection/utils/utils.js +3 -2
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/docs.json +1670 -268
- package/dist/esm/{index-mVZRKoXd.js → index-_4gljHh-.js} +3 -3
- package/dist/esm/index-_4gljHh-.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mock-pds-modal.entry.js +84 -0
- package/dist/esm/mock-pds-modal.entry.js.map +1 -0
- package/dist/esm/pds-accordion.entry.js +1 -1
- package/dist/esm/pds-alert.entry.js +64 -0
- package/dist/esm/pds-alert.entry.js.map +1 -0
- package/dist/esm/pds-avatar.entry.js +2 -2
- package/dist/esm/pds-box.entry.js +2 -2
- package/dist/esm/pds-box.entry.js.map +1 -1
- package/dist/esm/pds-button.entry.js +33 -7
- package/dist/esm/pds-button.entry.js.map +1 -1
- package/dist/esm/pds-checkbox.entry.js +11 -5
- package/dist/esm/pds-checkbox.entry.js.map +1 -1
- package/dist/esm/pds-chip.entry.js +2 -2
- package/dist/esm/pds-copytext.entry.js +3 -3
- package/dist/esm/pds-copytext.entry.js.map +1 -1
- package/dist/esm/pds-divider.entry.js +1 -1
- package/dist/esm/pds-dropdown-menu-item.entry.js +80 -0
- package/dist/esm/pds-dropdown-menu-item.entry.js.map +1 -0
- package/dist/esm/pds-dropdown-menu-separator.entry.js +23 -0
- package/dist/esm/pds-dropdown-menu-separator.entry.js.map +1 -0
- package/dist/esm/pds-dropdown-menu.entry.js +1572 -0
- package/dist/esm/pds-dropdown-menu.entry.js.map +1 -0
- package/dist/esm/pds-icon.entry.js +102 -7
- package/dist/esm/pds-icon.entry.js.map +1 -1
- package/dist/esm/pds-image.entry.js +2 -2
- package/dist/esm/pds-input.entry.js +6 -6
- package/dist/esm/pds-link.entry.js +16 -4
- package/dist/esm/pds-link.entry.js.map +1 -1
- package/dist/esm/pds-loader.entry.js +1 -1
- package/dist/esm/pds-modal-content.entry.js +91 -0
- package/dist/esm/pds-modal-content.entry.js.map +1 -0
- package/dist/esm/pds-modal-footer.entry.js +18 -0
- package/dist/esm/pds-modal-footer.entry.js.map +1 -0
- package/dist/esm/pds-modal-header.entry.js +18 -0
- package/dist/esm/pds-modal-header.entry.js.map +1 -0
- package/dist/esm/pds-modal.entry.js +251 -0
- package/dist/esm/pds-modal.entry.js.map +1 -0
- package/dist/esm/pds-popover.entry.js +33 -1
- package/dist/esm/pds-popover.entry.js.map +1 -1
- package/dist/esm/pds-progress.entry.js +1 -1
- package/dist/esm/pds-radio.entry.js +4 -4
- package/dist/esm/pds-row.entry.js +1 -1
- package/dist/esm/pds-select.entry.js +3 -3
- package/dist/esm/pds-sortable-item.entry.js +2 -2
- package/dist/esm/pds-sortable.entry.js +1 -1
- package/dist/esm/pds-switch.entry.js +9 -4
- package/dist/esm/pds-switch.entry.js.map +1 -1
- package/dist/esm/pds-tab.entry.js +3 -3
- package/dist/esm/pds-table-body.entry.js +1 -1
- package/dist/esm/pds-table-cell.entry.js +2 -2
- package/dist/esm/pds-table-head-cell.entry.js +3 -3
- package/dist/esm/pds-table-head.entry.js +1 -1
- package/dist/esm/pds-table-row.entry.js +1 -1
- package/dist/esm/pds-table.entry.js +1 -1
- package/dist/esm/pds-tabpanel.entry.js +1 -1
- package/dist/esm/pds-tabs.entry.js +1 -1
- package/dist/esm/pds-text.entry.js +2 -2
- package/dist/esm/pds-text.entry.js.map +1 -1
- package/dist/esm/pds-textarea.entry.js +6 -6
- package/dist/esm/pds-toast.entry.js +102 -0
- package/dist/esm/pds-toast.entry.js.map +1 -0
- package/dist/esm/pds-tooltip.entry.js +281 -79
- package/dist/esm/pds-tooltip.entry.js.map +1 -1
- package/dist/esm/pine-core.js +1 -1
- package/dist/esm/{utils-Dw9B1JDC.js → utils-DkabwBZT.js} +5 -4
- package/dist/esm/utils-DkabwBZT.js.map +1 -0
- package/dist/esm-es5/{index-mVZRKoXd.js → index-_4gljHh-.js} +1 -1
- package/dist/esm-es5/index-_4gljHh-.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mock-pds-modal.entry.js +2 -0
- package/dist/esm-es5/mock-pds-modal.entry.js.map +1 -0
- package/dist/esm-es5/pds-accordion.entry.js +1 -1
- package/dist/esm-es5/pds-alert.entry.js +2 -0
- package/dist/esm-es5/pds-alert.entry.js.map +1 -0
- 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-box.entry.js.map +1 -1
- package/dist/esm-es5/pds-button.entry.js +1 -1
- package/dist/esm-es5/pds-button.entry.js.map +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js +1 -1
- package/dist/esm-es5/pds-checkbox.entry.js.map +1 -1
- package/dist/esm-es5/pds-chip.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.entry.js +1 -1
- package/dist/esm-es5/pds-copytext.entry.js.map +1 -1
- package/dist/esm-es5/pds-divider.entry.js +1 -1
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js +2 -0
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js.map +1 -0
- package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +2 -0
- package/dist/esm-es5/pds-dropdown-menu-separator.entry.js.map +1 -0
- package/dist/esm-es5/pds-dropdown-menu.entry.js +2 -0
- package/dist/esm-es5/pds-dropdown-menu.entry.js.map +1 -0
- package/dist/esm-es5/pds-icon.entry.js +1 -1
- package/dist/esm-es5/pds-icon.entry.js.map +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-link.entry.js.map +1 -1
- package/dist/esm-es5/pds-loader.entry.js +1 -1
- package/dist/esm-es5/pds-modal-content.entry.js +2 -0
- package/dist/esm-es5/pds-modal-content.entry.js.map +1 -0
- package/dist/esm-es5/pds-modal-footer.entry.js +2 -0
- package/dist/esm-es5/pds-modal-footer.entry.js.map +1 -0
- package/dist/esm-es5/pds-modal-header.entry.js +2 -0
- package/dist/esm-es5/pds-modal-header.entry.js.map +1 -0
- package/dist/esm-es5/pds-modal.entry.js +2 -0
- package/dist/esm-es5/pds-modal.entry.js.map +1 -0
- package/dist/esm-es5/pds-popover.entry.js +1 -1
- package/dist/esm-es5/pds-popover.entry.js.map +1 -1
- package/dist/esm-es5/pds-progress.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 +1 -1
- package/dist/esm-es5/pds-switch.entry.js +1 -1
- package/dist/esm-es5/pds-switch.entry.js.map +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-text.entry.js.map +1 -1
- package/dist/esm-es5/pds-textarea.entry.js +1 -1
- package/dist/esm-es5/pds-toast.entry.js +2 -0
- package/dist/esm-es5/pds-toast.entry.js.map +1 -0
- package/dist/esm-es5/pds-tooltip.entry.js +1 -1
- package/dist/esm-es5/pds-tooltip.entry.js.map +1 -1
- package/dist/esm-es5/pine-core.js +1 -1
- package/dist/esm-es5/utils-DkabwBZT.js +2 -0
- package/dist/esm-es5/utils-DkabwBZT.js.map +1 -0
- package/dist/pine-core/mock-pds-modal.entry.esm.js.map +1 -0
- package/dist/pine-core/{p-ad69e5f9.system.entry.js → p-0069abf8.system.entry.js} +2 -2
- package/dist/pine-core/{p-a14c8ab4.system.entry.js → p-03d8cb4c.system.entry.js} +2 -2
- package/dist/pine-core/{p-2ab26d3d.system.entry.js → p-04df41d7.system.entry.js} +2 -2
- package/dist/pine-core/{p-0486ad57.entry.js → p-0572825b.entry.js} +2 -2
- package/dist/pine-core/{p-d2110923.system.entry.js → p-111e7da2.system.entry.js} +2 -2
- package/dist/pine-core/p-121e03ad.system.entry.js +2 -0
- package/dist/pine-core/p-121e03ad.system.entry.js.map +1 -0
- package/dist/pine-core/p-1224c874.entry.js +2 -0
- package/dist/pine-core/{p-b2bbc362.entry.js → p-146fcd44.entry.js} +2 -2
- package/dist/pine-core/{p-abcce8af.entry.js → p-17d3fa8b.entry.js} +2 -2
- package/dist/pine-core/p-1b109c01.entry.js +2 -0
- package/dist/pine-core/p-1b109c01.entry.js.map +1 -0
- package/dist/pine-core/p-1bd715ee.system.entry.js +2 -0
- package/dist/pine-core/p-1bd715ee.system.entry.js.map +1 -0
- package/dist/pine-core/{p-e4ea5041.system.entry.js → p-1eec6bea.system.entry.js} +2 -2
- package/dist/pine-core/p-21c3aaeb.entry.js +2 -0
- package/dist/pine-core/{p-f439922f.entry.js → p-2296c34f.entry.js} +2 -2
- package/dist/pine-core/{p-f439922f.entry.js.map → p-2296c34f.entry.js.map} +1 -1
- package/dist/pine-core/{p-5c396e75.entry.js → p-24607f93.entry.js} +2 -2
- package/dist/pine-core/p-28e28f42.system.entry.js +2 -0
- package/dist/pine-core/p-28e28f42.system.entry.js.map +1 -0
- package/dist/pine-core/p-29ad0b86.entry.js +2 -0
- package/dist/pine-core/p-29ad0b86.entry.js.map +1 -0
- package/dist/pine-core/{p-c0f0b368.system.entry.js → p-30142a25.system.entry.js} +2 -2
- package/dist/pine-core/p-32bd3e33.entry.js +2 -0
- package/dist/pine-core/p-32bd3e33.entry.js.map +1 -0
- package/dist/pine-core/{p-8305cd4d.entry.js → p-367e188f.entry.js} +2 -2
- package/dist/pine-core/{p-6147b1ea.system.entry.js → p-3798a631.system.entry.js} +2 -2
- package/dist/pine-core/p-3D0orTx_.system.js.map +1 -0
- package/dist/pine-core/p-3e91dccd.entry.js +2 -0
- package/dist/pine-core/p-3e91dccd.entry.js.map +1 -0
- package/dist/pine-core/{p-3fdbda99.system.entry.js → p-3f82ac77.system.entry.js} +2 -2
- package/dist/pine-core/p-4288c861.entry.js +2 -0
- package/dist/pine-core/p-4288c861.entry.js.map +1 -0
- package/dist/pine-core/p-47a7a65b.entry.js +2 -0
- package/dist/pine-core/p-47a7a65b.entry.js.map +1 -0
- package/dist/pine-core/{p-42f1190a.system.entry.js → p-48e76945.system.entry.js} +2 -2
- package/dist/pine-core/p-49265849.system.entry.js +2 -0
- package/dist/pine-core/p-49265849.system.entry.js.map +1 -0
- package/dist/pine-core/{p-b9f99fc9.entry.js → p-4ff0838c.entry.js} +2 -2
- package/dist/pine-core/p-513c16c7.entry.js +2 -0
- package/dist/pine-core/p-513c16c7.entry.js.map +1 -0
- package/dist/pine-core/{p-820faa91.system.entry.js → p-596e0292.system.entry.js} +2 -2
- package/dist/pine-core/p-5acda4ac.system.entry.js +2 -0
- package/dist/pine-core/p-5acda4ac.system.entry.js.map +1 -0
- package/dist/pine-core/p-5c4aceb7.entry.js +2 -0
- package/dist/pine-core/p-5c4aceb7.entry.js.map +1 -0
- package/dist/pine-core/{p-598ade79.entry.js → p-5e1e7762.entry.js} +2 -2
- package/dist/pine-core/p-624db3d6.system.entry.js +2 -0
- package/dist/pine-core/p-624db3d6.system.entry.js.map +1 -0
- package/dist/pine-core/{p-d0780ca1.system.entry.js → p-6a2296e6.system.entry.js} +2 -2
- package/dist/pine-core/{p-b68cb43d.system.entry.js → p-71265b2a.system.entry.js} +2 -2
- package/dist/pine-core/p-71f01676.system.entry.js +2 -0
- package/dist/pine-core/p-71f01676.system.entry.js.map +1 -0
- package/dist/pine-core/{p-a5587332.entry.js → p-722012ac.entry.js} +2 -2
- package/dist/pine-core/p-722012ac.entry.js.map +1 -0
- package/dist/pine-core/{p-98181fa8.system.entry.js → p-730221a8.system.entry.js} +2 -2
- package/dist/pine-core/{p-a97952fc.system.entry.js → p-73412ca9.system.entry.js} +2 -2
- package/dist/pine-core/{p-a97952fc.system.entry.js.map → p-73412ca9.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-91dadcbe.entry.js → p-742d4490.entry.js} +2 -2
- package/dist/pine-core/p-761946a0.entry.js +2 -0
- package/dist/pine-core/p-761946a0.entry.js.map +1 -0
- package/dist/pine-core/{p-950427b2.entry.js → p-77c3a10d.entry.js} +2 -2
- package/dist/pine-core/{p-fed4c0c0.system.entry.js → p-78cb1c40.system.entry.js} +2 -2
- package/dist/pine-core/{p-1d92261f.system.entry.js → p-78fb945e.system.entry.js} +2 -2
- package/dist/pine-core/p-7b38e384.system.entry.js +2 -0
- package/dist/pine-core/{p-9d0c1b2e.system.entry.js.map → p-7b38e384.system.entry.js.map} +1 -1
- package/dist/pine-core/p-7e92ec48.system.entry.js +2 -0
- package/dist/pine-core/p-7e92ec48.system.entry.js.map +1 -0
- package/dist/pine-core/{p-13b9ed06.system.entry.js → p-7ff213bb.system.entry.js} +2 -2
- package/dist/pine-core/{p-9e9d3a2b.entry.js → p-8023086c.entry.js} +2 -2
- package/dist/pine-core/p-83252078.system.entry.js +2 -0
- package/dist/pine-core/{p-bedddd53.entry.js → p-833f08f3.entry.js} +2 -2
- package/dist/pine-core/p-83c632f6.system.entry.js +2 -0
- package/dist/pine-core/p-83c632f6.system.entry.js.map +1 -0
- package/dist/pine-core/p-83ffc1cc.entry.js +2 -0
- package/dist/pine-core/p-83ffc1cc.entry.js.map +1 -0
- package/dist/pine-core/p-85ff1482.entry.js +2 -0
- package/dist/pine-core/{p-d5838288.entry.js.map → p-85ff1482.entry.js.map} +1 -1
- package/dist/pine-core/{p-12bee2e5.entry.js → p-86d388a2.entry.js} +2 -2
- package/dist/pine-core/p-929bb7ab.system.entry.js +2 -0
- package/dist/pine-core/p-929bb7ab.system.entry.js.map +1 -0
- package/dist/pine-core/p-942fa145.system.entry.js +2 -0
- package/dist/pine-core/p-942fa145.system.entry.js.map +1 -0
- package/dist/pine-core/{p-e045e337.system.entry.js → p-984578f8.system.entry.js} +2 -2
- package/dist/pine-core/{p-e281ac09.entry.js → p-99b5e1a5.entry.js} +2 -2
- package/dist/pine-core/{p-BFPxUBwH.system.js.map → p-B-pTdYoP.system.js.map} +1 -1
- package/dist/pine-core/p-B2gfQpwn.system.js.map +1 -0
- package/dist/pine-core/{p-Bd19LaTb.system.js → p-B4W0_y2p.system.js} +1 -1
- package/dist/pine-core/p-B4W0_y2p.system.js.map +1 -0
- package/dist/pine-core/{p-CDhmuxC9.system.js.map → p-B5JFBYFw.system.js.map} +1 -1
- package/dist/pine-core/p-B5LBNcOw.system.js.map +1 -0
- package/dist/pine-core/{p-B46WXJMn.system.js.map → p-BHZ6CSg4.system.js.map} +1 -1
- package/dist/pine-core/{p-Dlv6r83m.system.js.map → p-BO1OsmVU.system.js.map} +1 -1
- package/dist/pine-core/{p-Cj21y714.system.js.map → p-BOJnNd1p.system.js.map} +1 -1
- package/dist/pine-core/p-BVUeEWjl.system.js.map +1 -0
- package/dist/pine-core/{p-C94EgDFz.system.js → p-BhPuKJbQ.system.js} +2 -2
- package/dist/pine-core/p-BhPuKJbQ.system.js.map +1 -0
- package/dist/pine-core/p-Bo6FQRlR.system.js.map +1 -0
- package/dist/pine-core/{p-kMnJefdU.system.js.map → p-Bs9Nyvj2.system.js.map} +1 -1
- package/dist/pine-core/p-BsL2GDnH.system.js +1 -1
- package/dist/pine-core/p-C-oNYS10.system.js.map +1 -0
- package/dist/pine-core/p-C3ud771n.system.js.map +1 -0
- package/dist/pine-core/{p-C0hVtnK2.system.js.map → p-CDIHBBTC.system.js.map} +1 -1
- package/dist/pine-core/p-CLNi-hRD.system.js.map +1 -0
- package/dist/pine-core/{p-BjCOR1Nn.system.js.map → p-CV405yTU.system.js.map} +1 -1
- package/dist/pine-core/p-CWtKi9tV.system.js.map +1 -0
- package/dist/pine-core/{p-BoNavS-S.system.js.map → p-CcsZC7UR.system.js.map} +1 -1
- package/dist/pine-core/p-CiDIFl28.system.js.map +1 -0
- package/dist/pine-core/{p-BYgoXBct.system.js.map → p-Cj2r1nL6.system.js.map} +1 -1
- package/dist/pine-core/{p-w3zTyPF1.system.js.map → p-CnPERKGo.system.js.map} +1 -1
- package/dist/pine-core/p-CsM74dxm.system.js.map +1 -0
- package/dist/pine-core/{p-CFcYB49C.system.js.map → p-CtAVdPaE.system.js.map} +1 -1
- package/dist/pine-core/{p-qXPbJ8Ls.system.js.map → p-CzKqvFNN.system.js.map} +1 -1
- package/dist/pine-core/{p-CmTz2SvK.system.js.map → p-D-4Xbxlj.system.js.map} +1 -1
- package/dist/pine-core/{p-BVNW4NmT.system.js.map → p-D5vuiRx2.system.js.map} +1 -1
- package/dist/pine-core/p-D8DRYw9w.system.js.map +1 -0
- package/dist/pine-core/{p-DVVPJPOu.system.js.map → p-D9LPgNmN.system.js.map} +1 -1
- package/dist/pine-core/{p-DY5LpFEG.system.js.map → p-DEsea81X.system.js.map} +1 -1
- package/dist/pine-core/p-DKSZziVY.system.js.map +1 -0
- package/dist/pine-core/{p-CLIVqKy5.system.js.map → p-DN9puCWI.system.js.map} +1 -1
- package/dist/pine-core/{p-C0cdB2AV.system.js.map → p-DS7q5AvX.system.js.map} +1 -1
- package/dist/pine-core/{p-BSINexOf.system.js.map → p-DV_GadHU.system.js.map} +1 -1
- package/dist/pine-core/{p-BgcVBzVE.system.js.map → p-DbVkYdnF.system.js.map} +1 -1
- package/dist/pine-core/{p-eKz-xVcI.system.js.map → p-Derxa-nn.system.js.map} +1 -1
- package/dist/pine-core/{p-BW-n3jjz.system.js.map → p-DgOMN0Ur.system.js.map} +1 -1
- package/dist/pine-core/p-DiJV28pi.system.js.map +1 -0
- package/dist/pine-core/p-DkabwBZT.js +2 -0
- package/dist/pine-core/p-DkabwBZT.js.map +1 -0
- package/dist/pine-core/p-DyQ_s5MV.system.js.map +1 -0
- package/dist/pine-core/p-HBgo7i_E.system.js.map +1 -0
- package/dist/pine-core/{p-BUZBNCHp.system.js.map → p-M2Hhmwex.system.js.map} +1 -1
- package/dist/pine-core/p-PkSWq78_.system.js.map +1 -0
- package/dist/pine-core/{p-mVZRKoXd.js → p-_4gljHh-.js} +1 -1
- package/dist/pine-core/p-_4gljHh-.js.map +1 -0
- package/dist/pine-core/{p-1995a0f8.system.entry.js → p-a2572675.system.entry.js} +2 -2
- package/dist/pine-core/{p-85073252.system.entry.js → p-a394645a.system.entry.js} +2 -2
- package/dist/pine-core/p-a52b1413.entry.js +2 -0
- package/dist/pine-core/p-a52b1413.entry.js.map +1 -0
- package/dist/pine-core/{p-dae339c3.entry.js → p-abec6606.entry.js} +2 -2
- package/dist/pine-core/p-b2796d3c.system.entry.js +2 -0
- package/dist/pine-core/p-b2796d3c.system.entry.js.map +1 -0
- package/dist/pine-core/{p-5db706e1.entry.js → p-b3d05184.entry.js} +2 -2
- package/dist/pine-core/{p-b902f535.entry.js → p-b7ba6316.entry.js} +2 -2
- package/dist/pine-core/p-b9c13f99.entry.js +2 -0
- package/dist/pine-core/p-b9c13f99.entry.js.map +1 -0
- package/dist/pine-core/{p-14ca569b.entry.js → p-bcc4edaa.entry.js} +2 -2
- package/dist/pine-core/{p-1178485a.system.entry.js → p-bd04212c.system.entry.js} +2 -2
- package/dist/pine-core/{p-1178485a.system.entry.js.map → p-bd04212c.system.entry.js.map} +1 -1
- package/dist/pine-core/{p-9cdd57de.entry.js → p-c0f74199.entry.js} +2 -2
- package/dist/pine-core/{p-ed8c3064.system.entry.js → p-c1b0f921.system.entry.js} +2 -2
- package/dist/pine-core/{p-68de979e.entry.js → p-c4294be2.entry.js} +2 -2
- package/dist/pine-core/p-cd2cd116.entry.js +2 -0
- package/dist/pine-core/p-cd2cd116.entry.js.map +1 -0
- package/dist/pine-core/p-d1b222f5.entry.js +2 -0
- package/dist/pine-core/p-d1b222f5.entry.js.map +1 -0
- package/dist/pine-core/{p-7b6b354a.system.entry.js → p-d2ccda59.system.entry.js} +2 -2
- package/dist/pine-core/p-d6ac2862.system.entry.js +2 -0
- package/dist/pine-core/p-d6ac2862.system.entry.js.map +1 -0
- package/dist/pine-core/{p-040f3c92.system.entry.js → p-e09a3682.system.entry.js} +2 -2
- package/dist/pine-core/{p-792355e6.entry.js → p-e2dc81c0.entry.js} +2 -2
- package/dist/pine-core/p-e6d6e103.entry.js +2 -0
- package/dist/pine-core/p-e6d6e103.entry.js.map +1 -0
- package/dist/pine-core/{p-6c21bcb0.system.entry.js → p-e9d972db.system.entry.js} +2 -2
- package/dist/pine-core/p-e9d972db.system.entry.js.map +1 -0
- package/dist/pine-core/p-ef9ed75a.system.entry.js +2 -0
- package/dist/pine-core/p-ef9ed75a.system.entry.js.map +1 -0
- package/dist/pine-core/{p-4b59cae8.entry.js → p-f256dd8a.entry.js} +2 -2
- package/dist/pine-core/{p-4b59cae8.entry.js.map → p-f256dd8a.entry.js.map} +1 -1
- package/dist/pine-core/p-f2c807ac.entry.js +2 -0
- package/dist/pine-core/p-f2c807ac.entry.js.map +1 -0
- package/dist/pine-core/{p-eda0dc79.entry.js → p-f47133fd.entry.js} +2 -2
- package/dist/pine-core/p-f4fff209.system.entry.js +2 -0
- package/dist/pine-core/p-f4fff209.system.entry.js.map +1 -0
- package/dist/pine-core/p-f9e01886.system.entry.js +2 -0
- package/dist/pine-core/p-f9e01886.system.entry.js.map +1 -0
- package/dist/pine-core/{p-DhYEBuMP.system.js.map → p-xgOOHGQo.system.js.map} +1 -1
- package/dist/pine-core/p-yku4NLl6.system.js.map +1 -0
- package/dist/pine-core/pds-alert.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-box.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-button.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-checkbox.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-copytext.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-dropdown-menu-item.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-dropdown-menu-separator.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-dropdown-menu.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-icon.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-link.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-modal-content.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-modal-footer.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-modal-header.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-modal.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-popover.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-switch.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-text.entry.esm.js.map +1 -1
- package/dist/pine-core/pds-toast.entry.esm.js.map +1 -0
- package/dist/pine-core/pds-tooltip.entry.esm.js.map +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -1
- package/dist/types/components/pds-alert/pds-alert.d.ts +39 -0
- package/dist/types/components/pds-box/pds-box.d.ts +6 -6
- package/dist/types/components/pds-button/pds-button.d.ts +8 -1
- package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +3 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +43 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.d.ts +13 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +33 -0
- package/dist/types/components/pds-link/pds-link.d.ts +5 -0
- package/dist/types/components/pds-modal/pds-modal-content/pds-modal-content.d.ts +25 -0
- package/dist/types/components/pds-modal/pds-modal-footer/pds-modal-footer.d.ts +3 -0
- package/dist/types/components/pds-modal/pds-modal-header/pds-modal-header.d.ts +3 -0
- package/dist/types/components/pds-modal/pds-modal.d.ts +72 -0
- package/dist/types/components/pds-modal/test/mock-pds-modal.d.ts +63 -0
- package/dist/types/components/pds-switch/pds-switch.d.ts +2 -0
- package/dist/types/components/pds-toast/pds-toast.d.ts +57 -0
- package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +28 -3
- package/dist/types/components.d.ts +543 -16
- package/dist/types/utils/interfaces.d.ts +6 -0
- package/dist/types/utils/overlay.d.ts +3 -3
- package/dist/types/utils/utils.d.ts +1 -1
- package/hydrate/index.js +3093 -324
- package/hydrate/index.mjs +3093 -324
- package/package.json +6 -2
- package/dist/cjs/index-Br1YlNK2.js.map +0 -1
- package/dist/cjs/utils-CQKIgzWg.js.map +0 -1
- package/dist/esm/index-mVZRKoXd.js.map +0 -1
- package/dist/esm/utils-Dw9B1JDC.js.map +0 -1
- package/dist/esm-es5/index-mVZRKoXd.js.map +0 -1
- package/dist/esm-es5/utils-Dw9B1JDC.js +0 -2
- package/dist/esm-es5/utils-Dw9B1JDC.js.map +0 -1
- package/dist/pine-core/p-012c4d8b.entry.js +0 -2
- package/dist/pine-core/p-012c4d8b.entry.js.map +0 -1
- package/dist/pine-core/p-1d690915.entry.js +0 -2
- package/dist/pine-core/p-294f9b1f.entry.js +0 -2
- package/dist/pine-core/p-3be0323a.system.entry.js +0 -2
- package/dist/pine-core/p-3be0323a.system.entry.js.map +0 -1
- package/dist/pine-core/p-433c6687.system.entry.js +0 -2
- package/dist/pine-core/p-433c6687.system.entry.js.map +0 -1
- package/dist/pine-core/p-545ccff7.system.entry.js +0 -2
- package/dist/pine-core/p-545ccff7.system.entry.js.map +0 -1
- package/dist/pine-core/p-5c9e1a3d.system.entry.js +0 -2
- package/dist/pine-core/p-5c9e1a3d.system.entry.js.map +0 -1
- package/dist/pine-core/p-6c21bcb0.system.entry.js.map +0 -1
- package/dist/pine-core/p-722989ee.entry.js +0 -2
- package/dist/pine-core/p-722989ee.entry.js.map +0 -1
- package/dist/pine-core/p-768e754e.system.entry.js +0 -2
- package/dist/pine-core/p-768e754e.system.entry.js.map +0 -1
- package/dist/pine-core/p-953f619f.system.entry.js +0 -2
- package/dist/pine-core/p-9d0c1b2e.system.entry.js +0 -2
- package/dist/pine-core/p-BBpt-9kK.system.js.map +0 -1
- package/dist/pine-core/p-BUD-iaLL.system.js.map +0 -1
- package/dist/pine-core/p-Bd19LaTb.system.js.map +0 -1
- package/dist/pine-core/p-C94EgDFz.system.js.map +0 -1
- package/dist/pine-core/p-CIzJqNxZ.system.js.map +0 -1
- package/dist/pine-core/p-CbNKHcsJ.system.js.map +0 -1
- package/dist/pine-core/p-CdkqpuKd.system.js.map +0 -1
- package/dist/pine-core/p-Chrs_Qxi.system.js.map +0 -1
- package/dist/pine-core/p-DhwO1z4v.system.js.map +0 -1
- package/dist/pine-core/p-Dw9B1JDC.js +0 -2
- package/dist/pine-core/p-Dw9B1JDC.js.map +0 -1
- package/dist/pine-core/p-a5587332.entry.js.map +0 -1
- package/dist/pine-core/p-aa955b03.entry.js +0 -2
- package/dist/pine-core/p-aa955b03.entry.js.map +0 -1
- package/dist/pine-core/p-amsdFwC6.system.js.map +0 -1
- package/dist/pine-core/p-b41dee6f.system.entry.js +0 -2
- package/dist/pine-core/p-b41dee6f.system.entry.js.map +0 -1
- package/dist/pine-core/p-d5838288.entry.js +0 -2
- package/dist/pine-core/p-e7bf0be9.entry.js +0 -2
- package/dist/pine-core/p-e7bf0be9.entry.js.map +0 -1
- package/dist/pine-core/p-f1156360.entry.js +0 -2
- package/dist/pine-core/p-f1156360.entry.js.map +0 -1
- package/dist/pine-core/p-f4898d4f.entry.js +0 -2
- package/dist/pine-core/p-f4898d4f.entry.js.map +0 -1
- package/dist/pine-core/p-mVZRKoXd.js.map +0 -1
- /package/dist/pine-core/{p-ad69e5f9.system.entry.js.map → p-0069abf8.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-a14c8ab4.system.entry.js.map → p-03d8cb4c.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-2ab26d3d.system.entry.js.map → p-04df41d7.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-0486ad57.entry.js.map → p-0572825b.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d2110923.system.entry.js.map → p-111e7da2.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1d690915.entry.js.map → p-1224c874.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b2bbc362.entry.js.map → p-146fcd44.entry.js.map} +0 -0
- /package/dist/pine-core/{p-abcce8af.entry.js.map → p-17d3fa8b.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e4ea5041.system.entry.js.map → p-1eec6bea.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-294f9b1f.entry.js.map → p-21c3aaeb.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5c396e75.entry.js.map → p-24607f93.entry.js.map} +0 -0
- /package/dist/pine-core/{p-c0f0b368.system.entry.js.map → p-30142a25.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-8305cd4d.entry.js.map → p-367e188f.entry.js.map} +0 -0
- /package/dist/pine-core/{p-6147b1ea.system.entry.js.map → p-3798a631.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-3fdbda99.system.entry.js.map → p-3f82ac77.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-42f1190a.system.entry.js.map → p-48e76945.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b9f99fc9.entry.js.map → p-4ff0838c.entry.js.map} +0 -0
- /package/dist/pine-core/{p-820faa91.system.entry.js.map → p-596e0292.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-598ade79.entry.js.map → p-5e1e7762.entry.js.map} +0 -0
- /package/dist/pine-core/{p-d0780ca1.system.entry.js.map → p-6a2296e6.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b68cb43d.system.entry.js.map → p-71265b2a.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-98181fa8.system.entry.js.map → p-730221a8.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-91dadcbe.entry.js.map → p-742d4490.entry.js.map} +0 -0
- /package/dist/pine-core/{p-950427b2.entry.js.map → p-77c3a10d.entry.js.map} +0 -0
- /package/dist/pine-core/{p-fed4c0c0.system.entry.js.map → p-78cb1c40.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1d92261f.system.entry.js.map → p-78fb945e.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-13b9ed06.system.entry.js.map → p-7ff213bb.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-9e9d3a2b.entry.js.map → p-8023086c.entry.js.map} +0 -0
- /package/dist/pine-core/{p-953f619f.system.entry.js.map → p-83252078.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-bedddd53.entry.js.map → p-833f08f3.entry.js.map} +0 -0
- /package/dist/pine-core/{p-12bee2e5.entry.js.map → p-86d388a2.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e045e337.system.entry.js.map → p-984578f8.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-e281ac09.entry.js.map → p-99b5e1a5.entry.js.map} +0 -0
- /package/dist/pine-core/{p-1995a0f8.system.entry.js.map → p-a2572675.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-85073252.system.entry.js.map → p-a394645a.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-dae339c3.entry.js.map → p-abec6606.entry.js.map} +0 -0
- /package/dist/pine-core/{p-5db706e1.entry.js.map → p-b3d05184.entry.js.map} +0 -0
- /package/dist/pine-core/{p-b902f535.entry.js.map → p-b7ba6316.entry.js.map} +0 -0
- /package/dist/pine-core/{p-14ca569b.entry.js.map → p-bcc4edaa.entry.js.map} +0 -0
- /package/dist/pine-core/{p-9cdd57de.entry.js.map → p-c0f74199.entry.js.map} +0 -0
- /package/dist/pine-core/{p-ed8c3064.system.entry.js.map → p-c1b0f921.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-68de979e.entry.js.map → p-c4294be2.entry.js.map} +0 -0
- /package/dist/pine-core/{p-7b6b354a.system.entry.js.map → p-d2ccda59.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-040f3c92.system.entry.js.map → p-e09a3682.system.entry.js.map} +0 -0
- /package/dist/pine-core/{p-792355e6.entry.js.map → p-e2dc81c0.entry.js.map} +0 -0
- /package/dist/pine-core/{p-eda0dc79.entry.js.map → p-f47133fd.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-button.js","sourceRoot":"","sources":["../../../src/components/pds-button/pds-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD;;;;;;EAME;AAOF,MAAM,OAAO,SAAS;IALtB;QAaE;;;WAGG;QACK,aAAQ,GAAI,KAAK,CAAC;QAE1B;;;WAGG;QACK,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop } from '@stencil/core';\nimport { hasShadowDom } from '../../utils/utils';\n\nimport { caretDown } from '@pine-ds/icons/icons';\n\n/**\n * @part button - Exposes the button element for styling.\n * @part button-content - Exposes the button content for styling.\n * @part button-text - Exposes the button text for styling.\n * @part caret - Exposes the caret icon component for styling. Appears only on the disclosure variant.\n * @part icon - Exposes the icon component for styling.\n*/\n\n@Component({\n tag: 'pds-button',\n styleUrls: ['pds-button.scss'],\n shadow: true,\n})\nexport class PdsButton {\n @Element() el: HTMLPdsButtonElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Determines the button's disabled state.\n * @defaultValue false\n */\n @Prop() disabled? = false;\n\n /**\n * Determines if the button should take up the full width of its container.\n * @defaultValue false\n */\n @Prop() fullWidth? = false;\n\n /**\n * If provided, renders the component as an anchor (`<a>`) element instead of a button.\n * When using href, button-specific props (type, name, value, loading) will be ignored.\n */\n @Prop() href?: string;\n\n /**\n * Displays an icon in the button.\n * @defaultValue null\n */\n @Prop() icon?: string = null;\n\n /**\n * When true, displays only the icon and visually hides the text (keeping it accessible).\n */\n @Prop() iconOnly? = false;\n\n /**\n * Determines if the button is in a loading state.\n * When true, displays a loader and hides the button text.\n * @defaultValue false\n */\n @Prop() loading? = false;\n\n /**\n * Provides the button with a submittable name.\n */\n @Prop() name?: string;\n\n /**\n * Specifies where to open the linked document when href is provided.\n * Only applies when href is set.\n */\n @Prop() target?: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * Provides button with a type.\n * @defaultValue button\n */\n @Prop() type?: 'button' | 'reset' | 'submit' = 'button';\n\n /**\n * Provides button with a submittable value\n */\n @Prop() value?: string;\n\n /**\n * Sets the style variant of the button.\n * @defaultValue primary\n */\n @Prop() variant: 'primary' | 'secondary' | 'accent' | 'disclosure' | 'destructive' | 'unstyled' = 'primary';\n\n @Event() pdsClick: EventEmitter;\n\n private handleClick = (ev: Event) => {\n if (this.loading) {\n ev.preventDefault();\n return;\n }\n\n if (!this.href && this.type != 'button') {\n // If button clicked IS NOT associated with a form\n if (hasShadowDom(this.el)) {\n const form = this.el.closest('form');\n if (form) {\n ev.preventDefault();\n\n const fakeButton = document.createElement('button');\n fakeButton.type = this.type;\n fakeButton.style.display = 'none';\n form.appendChild(fakeButton);\n fakeButton.click();\n fakeButton.remove();\n }\n }\n }\n this.pdsClick.emit(ev);\n };\n\n private classNames() {\n const classNames = ['pds-button'];\n\n if (this.variant) {\n classNames.push('pds-button--' + this.variant);\n }\n\n if (this.iconOnly) {\n classNames.push('pds-button--icon-only');\n }\n\n if (this.loading) {\n classNames.push('pds-button--loading');\n }\n\n return classNames.join(' ');\n }\n\n render() {\n // Common props for both button and anchor elements\n const commonProps = {\n class: this.classNames(),\n part: 'button',\n };\n\n const attributes = () => {\n if (this.href) {\n return {\n // Anchor element props\n ...commonProps,\n href: this.disabled ? null : this.href,\n target: this.target,\n };\n }\n\n return {\n // Button element props\n ...commonProps,\n 'aria-busy': this.loading ? 'true' : null,\n 'aria-live': this.loading ? 'polite' : null,\n 'disabled': this.disabled,\n 'name': this.name,\n 'type': this.type,\n 'value': this.value,\n };\n };\n\n const ContentElement = this.href ? 'a' : 'button';\n\n // Hide text when loading or iconOnly is true\n const hideText = this.loading || this.iconOnly;\n\n const content = (\n <div class=\"pds-button__content\" part=\"button-content\">\n {this.icon && this.variant !== 'disclosure' &&\n <pds-icon class={this.loading ? 'pds-button__icon--hidden' : ''} name={this.icon} part=\"icon\" aria-hidden=\"true\"></pds-icon>\n }\n\n <span class={`pds-button__text ${hideText ? 'pds-button__text--hidden' : ''}`} part=\"button-text\">\n <slot />\n </span>\n\n {this.loading && (\n <span class=\"pds-button__loader\">\n <pds-loader is-loading={true} size=\"var(--pine-font-size-body-2xl)\" variant=\"spinner\">\n Loading...\n </pds-loader>\n </span>\n )}\n\n {this.variant === 'disclosure' &&\n <pds-icon class={this.loading ? 'pds-button__icon--hidden' : ''} icon={caretDown} part=\"caret\" aria-hidden=\"true\"></pds-icon>\n }\n </div>\n );\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n id={this.componentId}\n onClick={this.handleClick}\n variant={this.variant}\n >\n <ContentElement {...attributes()}>\n {content}\n </ContentElement>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pds-button.js","sourceRoot":"","sources":["../../../src/components/pds-button/pds-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD;;;;;;;;;EASE;AAOF,MAAM,OAAO,SAAS;IALtB;QAaE;;;WAGG;QACK,aAAQ,GAAI,KAAK,CAAC;QAE1B;;;WAGG;QACK,cAAS,GAAI,KAAK,CAAC;QAQ3B;;;;WAIG;QACK,SAAI,GAAY,IAAI,CAAC;QAE7B;;WAEG;QACK,aAAQ,GAAI,KAAK,CAAC;QAE1B;;;;WAIG;QACK,YAAO,GAAI,KAAK,CAAC;QAazB;;;WAGG;QACK,SAAI,GAAmC,QAAQ,CAAC;QAOxD;;;WAGG;QACK,YAAO,GAAmF,SAAS,CAAC;QAIpG,gBAAW,GAAG,CAAC,EAAS,EAAE,EAAE;YAClC,IAAI,IAAI,CAAC,OA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G,CACd,WAAK,KAAK,EAAC,qBAAqB,EAAC,IAAI,EAAC,gBAAgB;YACnD,IAAI,CAAC,kBAAkB,EAAE;YAE1B,YAAM,KAAK,EAAE,oBAAoB,QAAQ,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAC,aAAa;gBAC/F,eAAQ,CACH;YAEN,IAAI,CAAC,OAAO,IAAI,CACf,YAAM,KAAK,EAAC,oBAAoB;gBAC9B,gCAAwB,IAAI,EAAE,IAAI,EAAC,gCAAgC,EAAC,OAAO,EAAC,SAAS,iBAExE,CACR,CACR;YAEA,IAAI,CAAC,gBAAgB,EAAE,CACpB,CACP,CAAC;QAEF,OAAO,CACL,EAAC,IAAI,qBACY,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAC5C,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YAErB,EAAC,cAAc,oBAAK,UAAU,EAAE,GAC7B,OAAO,CACO,CACZ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop } from '@stencil/core';\nimport { hasShadowDom } from '../../utils/utils';\n\nimport { caretDown } from '@pine-ds/icons/icons';\n\n/**\n * @part button - Exposes the button element for styling.\n * @part button-content - Exposes the button content for styling.\n * @part button-text - Exposes the button text for styling.\n * @part caret - Exposes the caret icon component for styling. Appears only on the disclosure variant.\n * @part icon - Exposes the icon component for styling.\n * @slot (default) - Button text.\n * @slot start - Content to display before the button text.\n * @slot end - Content to display after the button text.\n*/\n\n@Component({\n tag: 'pds-button',\n styleUrls: ['pds-button.scss'],\n shadow: true,\n})\nexport class PdsButton {\n @Element() el: HTMLPdsButtonElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Determines the button's disabled state.\n * @defaultValue false\n */\n @Prop() disabled? = false;\n\n /**\n * Determines if the button should take up the full width of its container.\n * @defaultValue false\n */\n @Prop() fullWidth? = false;\n\n /**\n * If provided, renders the component as an anchor (`<a>`) element instead of a button.\n * When using href, button-specific props (type, name, value, loading) will be ignored.\n */\n @Prop() href?: string;\n\n /**\n * Displays a leading icon in the button. DEPRECATED.\n * @defaultValue null\n * @deprecated Use `start` slot instead.\n */\n @Prop() icon?: string = null;\n\n /**\n * When true, displays only the icon and visually hides the text (keeping it accessible).\n */\n @Prop() iconOnly? = false;\n\n /**\n * Determines if the button is in a loading state.\n * When true, displays a loader and hides the button text.\n * @defaultValue false\n */\n @Prop() loading? = false;\n\n /**\n * Provides the button with a submittable name.\n */\n @Prop() name?: string;\n\n /**\n * Specifies where to open the linked document when href is provided.\n * Only applies when href is set.\n */\n @Prop() target?: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * Provides button with a type.\n * @defaultValue button\n */\n @Prop() type?: 'button' | 'reset' | 'submit' = 'button';\n\n /**\n * Provides button with a submittable value\n */\n @Prop() value?: string;\n\n /**\n * Sets the style variant of the button.\n * @defaultValue primary\n */\n @Prop() variant: 'primary' | 'secondary' | 'accent' | 'disclosure' | 'destructive' | 'unstyled' = 'primary';\n\n @Event() pdsClick: EventEmitter;\n\n private handleClick = (ev: Event) => {\n if (this.loading) {\n ev.preventDefault();\n return;\n }\n\n if (!this.href && this.type != 'button') {\n // If button clicked IS NOT associated with a form\n if (hasShadowDom(this.el)) {\n const form = this.el.closest('form');\n if (form) {\n ev.preventDefault();\n\n const fakeButton = document.createElement('button');\n fakeButton.type = this.type;\n fakeButton.style.display = 'none';\n form.appendChild(fakeButton);\n fakeButton.click();\n fakeButton.remove();\n }\n }\n }\n this.pdsClick.emit(ev);\n };\n\n private classNames() {\n const classNames = ['pds-button'];\n\n if (this.variant) {\n classNames.push('pds-button--' + this.variant);\n }\n\n if (this.iconOnly) {\n classNames.push('pds-button--icon-only');\n }\n\n if (this.loading) {\n classNames.push('pds-button--loading');\n }\n\n return classNames.join(' ');\n }\n\n private hasSlotContent(slotName: string): boolean {\n const elements = this.el.querySelectorAll(`[slot=\"${slotName}\"]`);\n return elements.length > 0;\n }\n\n private renderStartContent() {\n const hasIcon = this.icon && this.variant !== 'disclosure';\n const hasStartSlot = this.hasSlotContent('start');\n\n if (Boolean(hasIcon)) {\n return (\n <pds-icon class={this.loading ? 'pds-button__icon--hidden' : ''} name={this.icon} part=\"icon\" aria-hidden=\"true\"></pds-icon>\n );\n } else if (Boolean(hasStartSlot)) {\n return <span class={`pds-button__icon ${this.loading ? 'pds-button__icon--hidden' : ''}`}><slot name=\"start\" /></span>;\n }\n\n return null;\n }\n\n private renderEndContent() {\n if (this.iconOnly) {\n return null;\n }\n\n if (this.variant === 'disclosure') {\n return (\n <pds-icon class={this.loading ? 'pds-button__icon--hidden' : ''} icon={caretDown} part=\"caret\" aria-hidden=\"true\"></pds-icon>\n );\n } else if (this.hasSlotContent('end')) {\n return <span class={`pds-button__icon ${this.loading ? 'pds-button__icon--hidden' : ''}`}><slot name=\"end\" /></span>;\n }\n\n return null;\n }\n\n render() {\n // Common props for both button and anchor elements\n const commonProps = {\n class: this.classNames(),\n part: 'button',\n };\n\n const attributes = () => {\n if (this.href) {\n return {\n // Anchor element props\n ...commonProps,\n href: this.disabled ? null : this.href,\n target: this.target,\n };\n }\n\n return {\n // Button element props\n ...commonProps,\n 'aria-busy': this.loading ? 'true' : null,\n 'aria-live': this.loading ? 'polite' : null,\n 'disabled': this.disabled,\n 'name': this.name,\n 'type': this.type,\n 'value': this.value,\n };\n };\n\n const ContentElement = this.href ? 'a' : 'button';\n\n // Hide text when loading or iconOnly is true\n const hideText = this.loading || this.iconOnly;\n\n const content = (\n <div class=\"pds-button__content\" part=\"button-content\">\n {this.renderStartContent()}\n\n <span class={`pds-button__text ${hideText ? 'pds-button__text--hidden' : ''}`} part=\"button-text\">\n <slot />\n </span>\n\n {this.loading && (\n <span class=\"pds-button__loader\">\n <pds-loader is-loading={true} size=\"var(--pine-font-size-body-2xl)\" variant=\"spinner\">\n Loading...\n </pds-loader>\n </span>\n )}\n\n {this.renderEndContent()}\n </div>\n );\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n id={this.componentId}\n onClick={this.handleClick}\n variant={this.variant}\n >\n <ContentElement {...attributes()}>\n {content}\n </ContentElement>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -30,8 +30,10 @@ const BaseTemplate = (args) => html`
|
|
|
30
30
|
value=${args.value}
|
|
31
31
|
variant=${args.variant}
|
|
32
32
|
>
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
${args.slot?.start}
|
|
34
|
+
${args.slot?.default}
|
|
35
|
+
${args.slot?.end}
|
|
36
|
+
</pds-button>`;
|
|
35
37
|
|
|
36
38
|
export const Accent = BaseTemplate.bind();
|
|
37
39
|
Accent.args = {
|
|
@@ -39,7 +41,9 @@ Accent.args = {
|
|
|
39
41
|
fullWidth: false,
|
|
40
42
|
iconOnly: false,
|
|
41
43
|
loading: false,
|
|
42
|
-
slot:
|
|
44
|
+
slot: {
|
|
45
|
+
default: 'Accent',
|
|
46
|
+
},
|
|
43
47
|
type: 'button',
|
|
44
48
|
variant: 'accent',
|
|
45
49
|
};
|
|
@@ -51,7 +55,9 @@ ButtonLink.args = {
|
|
|
51
55
|
href: 'https://pine-design-system.netlify.app/',
|
|
52
56
|
iconOnly: false,
|
|
53
57
|
loading: false,
|
|
54
|
-
slot:
|
|
58
|
+
slot: {
|
|
59
|
+
default: 'Link Button',
|
|
60
|
+
},
|
|
55
61
|
target: '_blank',
|
|
56
62
|
variant: 'primary',
|
|
57
63
|
};
|
|
@@ -62,7 +68,9 @@ Destructive.args = {
|
|
|
62
68
|
fullWidth: false,
|
|
63
69
|
iconOnly: false,
|
|
64
70
|
loading: false,
|
|
65
|
-
slot:
|
|
71
|
+
slot: {
|
|
72
|
+
default: 'Destructive',
|
|
73
|
+
},
|
|
66
74
|
type: 'button',
|
|
67
75
|
variant: 'destructive',
|
|
68
76
|
}
|
|
@@ -73,7 +81,9 @@ Disclosure.args = {
|
|
|
73
81
|
fullWidth: false,
|
|
74
82
|
iconOnly: false,
|
|
75
83
|
loading: false,
|
|
76
|
-
slot:
|
|
84
|
+
slot: {
|
|
85
|
+
default: 'Disclosure',
|
|
86
|
+
},
|
|
77
87
|
type: 'button',
|
|
78
88
|
variant: 'disclosure'
|
|
79
89
|
}
|
|
@@ -89,7 +99,24 @@ FullWidth.args = {
|
|
|
89
99
|
fullWidth: true,
|
|
90
100
|
iconOnly: false,
|
|
91
101
|
loading: false,
|
|
92
|
-
slot:
|
|
102
|
+
slot: {
|
|
103
|
+
default: 'Full Width',
|
|
104
|
+
},
|
|
105
|
+
type: 'button',
|
|
106
|
+
variant: 'primary'
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export const StartAndEndSlots = BaseTemplate.bind({});
|
|
110
|
+
StartAndEndSlots.args = {
|
|
111
|
+
disabled: false,
|
|
112
|
+
fullWidth: false,
|
|
113
|
+
iconOnly: false,
|
|
114
|
+
loading: false,
|
|
115
|
+
slot: {
|
|
116
|
+
start: html`<pds-icon slot="start" name="favorite"></pds-icon>`,
|
|
117
|
+
default: 'Button with Icons',
|
|
118
|
+
end: html`<pds-icon slot="end" name="add-image"></pds-icon>`
|
|
119
|
+
},
|
|
93
120
|
type: 'button',
|
|
94
121
|
variant: 'primary'
|
|
95
122
|
}
|
|
@@ -101,7 +128,9 @@ IconOnly.args = {
|
|
|
101
128
|
icon: 'favorite',
|
|
102
129
|
iconOnly: true,
|
|
103
130
|
loading: false,
|
|
104
|
-
slot:
|
|
131
|
+
slot: {
|
|
132
|
+
default: 'Icon Only',
|
|
133
|
+
},
|
|
105
134
|
type: 'button',
|
|
106
135
|
variant: 'secondary',
|
|
107
136
|
};
|
|
@@ -112,7 +141,9 @@ Loading.args = {
|
|
|
112
141
|
fullWidth: false,
|
|
113
142
|
iconOnly: false,
|
|
114
143
|
loading: true,
|
|
115
|
-
slot:
|
|
144
|
+
slot: {
|
|
145
|
+
default: 'Loading',
|
|
146
|
+
},
|
|
116
147
|
type: 'button',
|
|
117
148
|
variant: 'primary',
|
|
118
149
|
}
|
|
@@ -123,7 +154,9 @@ Primary.args = {
|
|
|
123
154
|
fullWidth: false,
|
|
124
155
|
iconOnly: false,
|
|
125
156
|
loading: false,
|
|
126
|
-
slot:
|
|
157
|
+
slot: {
|
|
158
|
+
default: 'Primary',
|
|
159
|
+
},
|
|
127
160
|
type: 'button',
|
|
128
161
|
variant: 'primary'
|
|
129
162
|
}
|
|
@@ -134,7 +167,9 @@ Secondary.args = {
|
|
|
134
167
|
fullWidth: false,
|
|
135
168
|
iconOnly: false,
|
|
136
169
|
loading: false,
|
|
137
|
-
slot:
|
|
170
|
+
slot: {
|
|
171
|
+
default: 'Secondary',
|
|
172
|
+
},
|
|
138
173
|
type: 'button',
|
|
139
174
|
variant: 'secondary',
|
|
140
175
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { assignDescription, messageId } from "../../utils/form";
|
|
3
3
|
import { danger } from "@pine-ds/icons/icons";
|
|
4
|
+
import { inheritAriaAttributes } from "../../utils/attributes";
|
|
4
5
|
export class PdsCheckbox {
|
|
5
6
|
constructor() {
|
|
7
|
+
this.inheritedAttributes = {};
|
|
6
8
|
/**
|
|
7
9
|
* It determines whether or not the checkbox is checked.
|
|
8
10
|
*/
|
|
@@ -41,10 +43,13 @@ export class PdsCheckbox {
|
|
|
41
43
|
}
|
|
42
44
|
return classNames.join(' ');
|
|
43
45
|
}
|
|
46
|
+
componentWillLoad() {
|
|
47
|
+
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
48
|
+
}
|
|
44
49
|
render() {
|
|
45
|
-
return (h(Host, { key: '
|
|
46
|
-
h("div", { key: '
|
|
47
|
-
h("div", { key: '
|
|
50
|
+
return (h(Host, { key: 'a60ffb7c96f1d15735f263cb55cd982fbfcbe729', class: this.classNames() }, h("label", { key: '6ed2c8670cded5165761374362d9f1e9f386a4d2', htmlFor: this.componentId }, h("input", Object.assign({ key: '0661b30a9af3bd8ee83b2f3ceb249810a78f19a5', type: "checkbox", "aria-describedby": assignDescription(this.componentId, this.invalid, this.errorMessage || this.helperMessage), "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: 'b16d78ead4da7ebdffb0f37127bdacf8b1538f86', class: this.hideLabel ? 'visually-hidden' : '' }, this.label)), this.helperMessage &&
|
|
51
|
+
h("div", { key: '78e88b11ba9e2759264e08ff0ce9e16c9cf67170', class: 'pds-checkbox__message', id: messageId(this.componentId, 'helper') }, this.helperMessage), this.errorMessage &&
|
|
52
|
+
h("div", { key: '0ba7d2bd2b4f6c996eecdd103abe3fb6497e4376', class: `pds-checkbox__message pds-checkbox__message--error`, id: messageId(this.componentId, 'error'), "aria-live": "assertive" }, h("pds-icon", { key: '65a94316603638e5230de0644fc8ca60e9543b63', icon: danger, size: "small" }), this.errorMessage)));
|
|
48
53
|
}
|
|
49
54
|
static get is() { return "pds-checkbox"; }
|
|
50
55
|
static get encapsulation() { return "shadow"; }
|
|
@@ -336,6 +341,7 @@ export class PdsCheckbox {
|
|
|
336
341
|
}
|
|
337
342
|
}];
|
|
338
343
|
}
|
|
344
|
+
static get elementRef() { return "el"; }
|
|
339
345
|
static get watchers() {
|
|
340
346
|
return [{
|
|
341
347
|
"propName": "checked",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-checkbox.js","sourceRoot":"","sources":["../../../src/components/pds-checkbox/pds-checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"pds-checkbox.js","sourceRoot":"","sources":["../../../src/components/pds-checkbox/pds-checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAQ1D,MAAM,OAAO,WAAW;IALxB;QAMU,wBAAmB,GAAe,EAAE,CAAC;QAI7C;;WAEG;QACsB,YAAO,GAAa,KAAK,CAAC;QAsE3C,yBAAoB,GAAG,CAAC,CAAQ,EAAE,EAAE;YAC1C,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,OAAO;YACT,CAAC;YAED,MAAM,MAAM,GAAG,CAAC,CAAC,MAA0B,CAAC;YAC5C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;YAE9B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC;gBAC1B,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;QACL,CAAC,CAAA;QAE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import { assignDescription, messageId } from '../../utils/form';\nimport { CheckboxChangeEventDetail } from './checkbox-interface';\nimport { danger } from '@pine-ds/icons/icons';\n\nimport { inheritAriaAttributes } from '@utils/attributes';\nimport type { Attributes } from '@utils/attributes';\n\n@Component({\n tag: 'pds-checkbox',\n styleUrls: ['../../global/styles/utils/label.scss', 'pds-checkbox.scss'],\n shadow: true,\n})\nexport class PdsCheckbox {\n private inheritedAttributes: Attributes = {};\n\n @Element() el: HTMLPdsCheckboxElement;\n\n /**\n * It determines whether or not the checkbox is checked.\n */\n @Prop({ mutable: true }) checked?: boolean = false;\n\n /**\n * A unique identifier used for the underlying component `id` attribute and the label `for` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * It determines whether or not the checkbox is disabled.\n */\n @Prop() disabled: boolean;\n\n /**\n * Displays message text describing an invalid state.\n */\n @Prop() errorMessage: string;\n\n /**\n * String used for helper message below checkbox.\n */\n @Prop() helperMessage: string;\n\n /**\n * If `true`, the checkbox will visually appear as indeterminate.\n * Only JavaScript can set the objects `indeterminate` property. See [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes).\n */\n @Prop({ mutable: true }) indeterminate: boolean;\n\n /**\n * It determines whether or not the checkbox is invalid.\n */\n @Prop() invalid: boolean;\n\n /**\n * String used for label text next to checkbox.\n */\n @Prop() label: string;\n\n /**\n * Visually hides the label text for instances where only the checkbox should be displayed. Label remains accessible to assistive technology such as screen readers.\n */\n @Prop() hideLabel: boolean;\n\n /**\n * String used for checkbox `name` attribute.\n */\n @Prop() name: string;\n\n /**\n * It determines whether or not the checkbox is required.\n */\n @Prop() required: boolean;\n\n /**\n * The value of the checkbox that is submitted with a form.\n */\n @Prop() value: string;\n\n /**\n * Event emitted that contains the `value` and `checked`.\n */\n @Event() pdsCheckboxChange: EventEmitter<CheckboxChangeEventDetail>;\n\n @Event() pdsCheckboxInput: EventEmitter<CheckboxChangeEventDetail>;\n\n @Watch('checked')\n updateIndeterminate() {\n this.indeterminate = undefined\n }\n\n private handleCheckboxChange = (e: Event) => {\n if (this.disabled) {\n return;\n }\n\n const target = e.target as HTMLInputElement;\n this.checked = target.checked;\n\n this.pdsCheckboxChange.emit({\n checked: target.checked,\n value: this.value\n });\n }\n\n private handleInput = () => {\n this.pdsCheckboxInput.emit({\n checked: this.checked,\n value: this.value\n });\n }\n\n private classNames() {\n const classNames = [];\n\n if (this.invalid) { classNames.push('is-invalid'); }\n if (this.indeterminate) { classNames.push('is-indeterminate'); }\n if (this.disabled) { classNames.push('is-disabled'); }\n\n return classNames.join(' ');\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el)\n }\n }\n\n render() {\n return (\n <Host class={this.classNames()}>\n <label htmlFor={this.componentId}>\n <input\n type=\"checkbox\"\n aria-describedby={assignDescription(this.componentId, this.invalid, this.errorMessage || this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n id={this.componentId}\n indeterminate={this.indeterminate}\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n onChange={this.handleCheckboxChange}\n onInput={this.handleInput}\n {...this.inheritedAttributes}\n />\n <span class={this.hideLabel ? 'visually-hidden' : ''}>\n {this.label}\n </span>\n </label>\n {this.helperMessage &&\n <div\n class={'pds-checkbox__message'}\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </div>\n }\n {this.errorMessage &&\n <div\n class={`pds-checkbox__message pds-checkbox__message--error`}\n id={messageId(this.componentId, 'error')}\n aria-live=\"assertive\"\n >\n <pds-icon icon={danger} size=\"small\" />\n {this.errorMessage}\n </div>\n }\n </Host>\n );\n }\n}\n"]}
|
|
@@ -48,7 +48,7 @@ export class PdsChip {
|
|
|
48
48
|
return chipContent;
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: 'b1987e434a5b9dcc4a5536660822bcb9c1f79e4f', class: this.classNames(), id: this.componentId }, this.setChipContent(), this.variant === 'tag' && (h("button", { key: '8f658cd564e86297a9b988d6080135e6d612be36', class: "pds-chip__close", type: "button", onClick: this.handleCloseClick, "aria-label": "Remove" }, h("pds-icon", { key: '32266c84697e0ffa3ff5d2e554cdf6b7e598d0e6', icon: remove, size: "12px" })))));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "pds-chip"; }
|
|
54
54
|
static get encapsulation() { return "shadow"; }
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
width: 100%;
|
|
61
61
|
}
|
|
62
62
|
:host(.pds-copytext):host(.pds-copytext--full-width) pds-button span, :host(.pds-copytext):host(.pds-copytext--truncated) pds-button span {
|
|
63
|
-
text-align:
|
|
63
|
+
text-align: start;
|
|
64
64
|
width: 100%;
|
|
65
65
|
}
|
|
66
66
|
:host(.pds-copytext):host(.pds-copytext--full-width) pds-button {
|
|
@@ -46,7 +46,7 @@ export class PdsCopytext {
|
|
|
46
46
|
return classNames.join(' ');
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '46c38faeba9b70d2e510a4b6af08866577936478', class: this.classNames(), id: this.componentId }, h("pds-button", { key: '6e28c11a9a7a57f4c256b0283b64ec655a897f65', type: "button", variant: "unstyled", onClick: this.handleClick }, h("span", { key: '6818451171f85fd6ad63f07c69871082d3fcba4e' }, this.value), h("pds-icon", { key: '05e683d7b28575d924d6af482e6ce4c3cfee3f05', icon: copyIcon, size: "16px" }))));
|
|
50
50
|
}
|
|
51
51
|
static get is() { return "pds-copytext"; }
|
|
52
52
|
static get encapsulation() { return "shadow"; }
|
|
@@ -19,7 +19,7 @@ export class PdsDivider {
|
|
|
19
19
|
return classNames.join(' ');
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: 'ee48ee45e0463abbd3cb7aa686f8d86928830ccb', id: this.componentId }, h("hr", { key: '4af739f85e502a7d9bff1b3581c283cb6ee53a0e', class: this.classNames() })));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "pds-divider"; }
|
|
25
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
display: flex;
|
|
4
|
+
width: 100%; /* Ensure the host takes full width */
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/* Make the disabled styles more specific and add !important to ensure they apply */
|
|
8
|
+
:host(.is-disabled) {
|
|
9
|
+
cursor: not-allowed !important;
|
|
10
|
+
opacity: 0.5 !important;
|
|
11
|
+
}
|
|
12
|
+
:host(.is-disabled) .pds-dropdown-menu-item__content {
|
|
13
|
+
cursor: not-allowed !important;
|
|
14
|
+
pointer-events: none !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pds-dropdown-menu-item__content {
|
|
18
|
+
align-items: center;
|
|
19
|
+
appearance: none;
|
|
20
|
+
background: transparent;
|
|
21
|
+
border: 0;
|
|
22
|
+
border-radius: var(--pine-dimension-xs);
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-grow: 1; /* Make it grow to fill available space */
|
|
25
|
+
font: var(--pine-typography-body-medium);
|
|
26
|
+
gap: var(--pine-dimension-xs);
|
|
27
|
+
margin: calc(var(--pine-border-width) + 2px);
|
|
28
|
+
padding: var(--pine-dimension-xs);
|
|
29
|
+
text-align: start; /* Ensure text aligns properly */
|
|
30
|
+
width: 100%; /* Ensure full width */
|
|
31
|
+
/* Focus styles applied via class + browser focus */
|
|
32
|
+
}
|
|
33
|
+
.pds-dropdown-menu-item__content:hover {
|
|
34
|
+
background-color: var(--pine-color-grey-150);
|
|
35
|
+
color: var(--pine-color-text-hover);
|
|
36
|
+
}
|
|
37
|
+
.pds-dropdown-menu-item__content:focus, .pds-dropdown-menu-item__content:focus-visible, .pds-dropdown-menu-item__content.has-focus {
|
|
38
|
+
outline: var(--pine-outline-focus);
|
|
39
|
+
outline-offset: var(--pine-border-width);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host(.destructive) .pds-dropdown-menu-item__content {
|
|
43
|
+
align-items: center;
|
|
44
|
+
color: var(--pine-color-danger);
|
|
45
|
+
}
|
|
46
|
+
:host(.destructive) .pds-dropdown-menu-item__content:hover {
|
|
47
|
+
background-color: var(--pine-color-danger-disabled);
|
|
48
|
+
color: var(--pine-color-danger-hover);
|
|
49
|
+
}
|
|
50
|
+
:host(.destructive) .pds-dropdown-menu-item__content:focus, :host(.destructive) .pds-dropdown-menu-item__content:focus-visible, :host(.destructive) .pds-dropdown-menu-item__content.has-focus {
|
|
51
|
+
background-color: var(--pine-color-danger-disabled);
|
|
52
|
+
outline: var(--pine-outline-focus-danger);
|
|
53
|
+
outline-offset: var(--pine-border-width);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Remove outline on contained links using the custom property */
|
|
57
|
+
pds-link::part(link):focus,
|
|
58
|
+
pds-link::part(link):focus-visible {
|
|
59
|
+
box-shadow: none;
|
|
60
|
+
outline: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
pds-link::part(link) {
|
|
64
|
+
display: block;
|
|
65
|
+
margin-inline: calc(var(--pine-dimension-xs) * -1);
|
|
66
|
+
padding-inline: var(--pine-dimension-xs);
|
|
67
|
+
width: 100%;
|
|
68
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class PdsDropdownMenuItem {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* It determines whether or not the dropdown-item is destructive.
|
|
6
|
+
* @defaultValue false
|
|
7
|
+
*/
|
|
8
|
+
this.destructive = false;
|
|
9
|
+
/**
|
|
10
|
+
* It determines whether or not the dropdown-item is disabled.
|
|
11
|
+
* @defaultValue false
|
|
12
|
+
*/
|
|
13
|
+
this.disabled = false;
|
|
14
|
+
this.hasFocus = false;
|
|
15
|
+
this.handleFocus = () => {
|
|
16
|
+
this.hasFocus = true;
|
|
17
|
+
};
|
|
18
|
+
this.handleBlur = () => {
|
|
19
|
+
this.hasFocus = false;
|
|
20
|
+
};
|
|
21
|
+
this.handleKeyDown = (event) => {
|
|
22
|
+
// Handle keyboard events
|
|
23
|
+
if (!this.disabled && (event.key === 'Enter')) {
|
|
24
|
+
// Only prevent default for button elements or Space key
|
|
25
|
+
// For links with Enter key, we want the default navigation behavior
|
|
26
|
+
if (!this.href) {
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
}
|
|
29
|
+
this.handleClick();
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Trigger the click event
|
|
35
|
+
*/
|
|
36
|
+
async clickItem() {
|
|
37
|
+
this.handleClick();
|
|
38
|
+
}
|
|
39
|
+
;
|
|
40
|
+
handleClick() {
|
|
41
|
+
var _a;
|
|
42
|
+
// Filter only pds-dropdown-menu-item elements and find the index of the current item
|
|
43
|
+
const menuItems = Array.from(this.host.parentNode.children).filter((child) => child.tagName.toLowerCase() === 'pds-dropdown-menu-item');
|
|
44
|
+
const itemIndex = menuItems.indexOf(this.host);
|
|
45
|
+
// Get the text content from the slotted content
|
|
46
|
+
const content = ((_a = this.host.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
47
|
+
this.pdsClick.emit({
|
|
48
|
+
itemIndex,
|
|
49
|
+
item: this.host,
|
|
50
|
+
content
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
renderElement() {
|
|
54
|
+
if (this.href !== undefined) {
|
|
55
|
+
return (h("pds-link", { href: this.disabled ? null : this.href, class: {
|
|
56
|
+
'pds-dropdown-menu-item__content': true,
|
|
57
|
+
'has-focus': this.hasFocus
|
|
58
|
+
}, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, "aria-disabled": this.disabled ? 'true' : null }, h("slot", null)));
|
|
59
|
+
}
|
|
60
|
+
return (h("button", { class: {
|
|
61
|
+
'pds-dropdown-menu-item__content': true,
|
|
62
|
+
'has-focus': this.hasFocus
|
|
63
|
+
}, tabIndex: this.disabled ? -1 : 0, type: "button", onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null }, h("slot", null)));
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
return (h(Host, { key: 'b27f62c0f1cfe56e777b1a875b93954d4c9da00d', id: this.componentId, class: { 'is-disabled': this.disabled, 'destructive': !this.disabled && this.destructive }, onClick: () => !this.disabled && this.handleClick(), role: "none", tabIndex: -1, "aria-disabled": this.disabled ? 'true' : null }, this.renderElement()));
|
|
67
|
+
}
|
|
68
|
+
static get is() { return "pds-dropdown-menu-item"; }
|
|
69
|
+
static get encapsulation() { return "shadow"; }
|
|
70
|
+
static get originalStyleUrls() {
|
|
71
|
+
return {
|
|
72
|
+
"$": ["pds-dropdown-menu-item.scss"]
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
static get styleUrls() {
|
|
76
|
+
return {
|
|
77
|
+
"$": ["pds-dropdown-menu-item.css"]
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
static get properties() {
|
|
81
|
+
return {
|
|
82
|
+
"componentId": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"mutable": false,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "string",
|
|
87
|
+
"resolved": "string",
|
|
88
|
+
"references": {}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": false,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": "A unique identifier used for the underlying component `id` attribute."
|
|
95
|
+
},
|
|
96
|
+
"getter": false,
|
|
97
|
+
"setter": false,
|
|
98
|
+
"attribute": "component-id",
|
|
99
|
+
"reflect": false
|
|
100
|
+
},
|
|
101
|
+
"destructive": {
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"mutable": false,
|
|
104
|
+
"complexType": {
|
|
105
|
+
"original": "boolean",
|
|
106
|
+
"resolved": "boolean",
|
|
107
|
+
"references": {}
|
|
108
|
+
},
|
|
109
|
+
"required": false,
|
|
110
|
+
"optional": false,
|
|
111
|
+
"docs": {
|
|
112
|
+
"tags": [{
|
|
113
|
+
"name": "defaultValue",
|
|
114
|
+
"text": "false"
|
|
115
|
+
}],
|
|
116
|
+
"text": "It determines whether or not the dropdown-item is destructive."
|
|
117
|
+
},
|
|
118
|
+
"getter": false,
|
|
119
|
+
"setter": false,
|
|
120
|
+
"attribute": "destructive",
|
|
121
|
+
"reflect": false,
|
|
122
|
+
"defaultValue": "false"
|
|
123
|
+
},
|
|
124
|
+
"disabled": {
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "boolean",
|
|
129
|
+
"resolved": "boolean",
|
|
130
|
+
"references": {}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": false,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [{
|
|
136
|
+
"name": "defaultValue",
|
|
137
|
+
"text": "false"
|
|
138
|
+
}],
|
|
139
|
+
"text": "It determines whether or not the dropdown-item is disabled."
|
|
140
|
+
},
|
|
141
|
+
"getter": false,
|
|
142
|
+
"setter": false,
|
|
143
|
+
"attribute": "disabled",
|
|
144
|
+
"reflect": false,
|
|
145
|
+
"defaultValue": "false"
|
|
146
|
+
},
|
|
147
|
+
"href": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"mutable": false,
|
|
150
|
+
"complexType": {
|
|
151
|
+
"original": "string | undefined",
|
|
152
|
+
"resolved": "string",
|
|
153
|
+
"references": {}
|
|
154
|
+
},
|
|
155
|
+
"required": false,
|
|
156
|
+
"optional": false,
|
|
157
|
+
"docs": {
|
|
158
|
+
"tags": [],
|
|
159
|
+
"text": "If provided, renders the dropdown-item as an anchor (`<a>`) element instead of a button."
|
|
160
|
+
},
|
|
161
|
+
"getter": false,
|
|
162
|
+
"setter": false,
|
|
163
|
+
"attribute": "href",
|
|
164
|
+
"reflect": false
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
static get states() {
|
|
169
|
+
return {
|
|
170
|
+
"hasFocus": {}
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
static get events() {
|
|
174
|
+
return [{
|
|
175
|
+
"method": "pdsClick",
|
|
176
|
+
"name": "pdsClick",
|
|
177
|
+
"bubbles": true,
|
|
178
|
+
"cancelable": true,
|
|
179
|
+
"composed": true,
|
|
180
|
+
"docs": {
|
|
181
|
+
"tags": [],
|
|
182
|
+
"text": "Emitted when the dropdown-item is clicked."
|
|
183
|
+
},
|
|
184
|
+
"complexType": {
|
|
185
|
+
"original": "{itemIndex: number, item: HTMLPdsDropdownMenuItemElement, content: string}",
|
|
186
|
+
"resolved": "{ itemIndex: number; item: HTMLPdsDropdownMenuItemElement; content: string; }",
|
|
187
|
+
"references": {
|
|
188
|
+
"HTMLPdsDropdownMenuItemElement": {
|
|
189
|
+
"location": "global",
|
|
190
|
+
"id": "global::HTMLPdsDropdownMenuItemElement"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}];
|
|
195
|
+
}
|
|
196
|
+
static get methods() {
|
|
197
|
+
return {
|
|
198
|
+
"clickItem": {
|
|
199
|
+
"complexType": {
|
|
200
|
+
"signature": "() => Promise<void>",
|
|
201
|
+
"parameters": [],
|
|
202
|
+
"references": {
|
|
203
|
+
"Promise": {
|
|
204
|
+
"location": "global",
|
|
205
|
+
"id": "global::Promise"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"return": "Promise<void>"
|
|
209
|
+
},
|
|
210
|
+
"docs": {
|
|
211
|
+
"text": "Trigger the click event",
|
|
212
|
+
"tags": []
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
static get elementRef() { return "host"; }
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=pds-dropdown-menu-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pds-dropdown-menu-item.js","sourceRoot":"","sources":["../../../../src/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQtG,MAAM,OAAO,mBAAmB;IALhC;QAaE;;;WAGG;QACK,gBAAW,GAAY,KAAK,CAAC;QAErC;;;WAGG;QACK,aAAQ,GAAY,KAAK,CAAC;QAwCzB,aAAQ,GAAY,KAAK,CAAC;QAE3B,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACvB,CAAC,CAAA;QAEO,eAAU,GAAG,GAAG,EAAE;YACxB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACxB,CAAC,CAAA;QAyCO,kBAAa,GAAG,CAAC,KAAoB,EAAE,EAAE;YAC/C,yBAAyB;YACzB,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,OAAO,CAAC,EAAE,CAAC;gBAC9C,wDAAwD;gBACxD,oEAAoE;gBACpE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;oBACf,KAAK,CAAC,cAAc,EAAE,CAAC;gBACzB,CAAC;gBACD,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC;QACH,CAAC,CAAA;KAeF;IApGC;;OAEG;IAEH,KAAK,CAAC,SAAS;QACb,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAAA,CAAC;IAGM,WAAW;;QACjB,qFA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3B,EACD,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAChC,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,aAAa,EAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,mBACR,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;YAE5C,eAAa,CACN,CACV,CAAC;IACJ,CAAC;IAcD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,EAAE,EAAE,IAAI,CAAC,WAAW,EACxB,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,EAC1F,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,EACnD,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,CAAC,CAAC,mBACG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,IAEzC,IAAI,CAAC,aAAa,EAAE,CAClB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State } from '@stencil/core';\nimport type { BasePdsProps } from '@utils/interfaces';\n\n@Component({\n tag: 'pds-dropdown-menu-item',\n styleUrl: 'pds-dropdown-menu-item.scss',\n shadow: true,\n})\nexport class PdsDropdownMenuItem implements BasePdsProps {\n @Element() host: HTMLPdsDropdownMenuItemElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * It determines whether or not the dropdown-item is destructive.\n * @defaultValue false\n */\n @Prop() destructive: boolean = false;\n\n /**\n * It determines whether or not the dropdown-item is disabled.\n * @defaultValue false\n */\n @Prop() disabled: boolean = false;\n\n\n /**\n * If provided, renders the dropdown-item as an anchor (`<a>`) element instead of a button.\n */\n @Prop() href: string | undefined;\n\n /**\n * Emitted when the dropdown-item is clicked.\n *\n */\n @Event() pdsClick: EventEmitter<{itemIndex: number, item: HTMLPdsDropdownMenuItemElement, content: string}>;\n\n /**\n * Trigger the click event\n */\n @Method()\n async clickItem() {\n this.handleClick();\n };\n\n\n private handleClick() {\n // Filter only pds-dropdown-menu-item elements and find the index of the current item\n const menuItems = Array.from(this.host.parentNode.children).filter(\n (child) => child.tagName.toLowerCase() === 'pds-dropdown-menu-item'\n );\n const itemIndex = menuItems.indexOf(this.host);\n\n // Get the text content from the slotted content\n const content = this.host.textContent?.trim() || '';\n\n this.pdsClick.emit({\n itemIndex,\n item: this.host,\n content\n });\n }\n\n @State() hasFocus: boolean = false;\n\n private handleFocus = () => {\n this.hasFocus = true;\n }\n\n private handleBlur = () => {\n this.hasFocus = false;\n }\n\n private renderElement() {\n if (this.href !== undefined) {\n return (\n <pds-link\n href={this.disabled ? null : this.href}\n class={{\n 'pds-dropdown-menu-item__content': true,\n 'has-focus': this.hasFocus\n }}\n tabIndex={this.disabled ? -1 : 0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n aria-disabled={this.disabled ? 'true' : null}\n >\n <slot></slot>\n </pds-link>\n );\n }\n\n return (\n <button\n class={{\n 'pds-dropdown-menu-item__content': true,\n 'has-focus': this.hasFocus\n }}\n tabIndex={this.disabled ? -1 : 0}\n type=\"button\"\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n disabled={this.disabled}\n aria-disabled={this.disabled ? 'true' : null}\n >\n <slot></slot>\n </button>\n );\n }\n\n private handleKeyDown = (event: KeyboardEvent) => {\n // Handle keyboard events\n if (!this.disabled && (event.key === 'Enter')) {\n // Only prevent default for button elements or Space key\n // For links with Enter key, we want the default navigation behavior\n if (!this.href) {\n event.preventDefault();\n }\n this.handleClick();\n }\n }\n\n render() {\n return (\n <Host id={this.componentId}\n class={{ 'is-disabled': this.disabled, 'destructive': !this.disabled && this.destructive }}\n onClick={() => !this.disabled && this.handleClick()}\n role=\"none\"\n tabIndex={-1}\n aria-disabled={this.disabled ? 'true' : null}\n >\n {this.renderElement()}\n </Host>\n );\n }\n}\n"]}
|