@pine-ds/core 1.3.0-dev.2 → 1.3.0-dev.4
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 +11 -0
- package/components/closest.js.map +1 -0
- package/components/index.js +33 -0
- package/components/index.js.map +1 -0
- package/components/index2.js +14 -0
- package/components/index2.js.map +1 -0
- package/components/pds-accordion.js +62 -0
- package/components/pds-accordion.js.map +1 -0
- package/components/pds-avatar.js +97 -0
- package/components/pds-avatar.js.map +1 -0
- package/components/pds-box.js +124 -0
- package/components/pds-box.js.map +1 -0
- package/components/pds-button.js +8 -0
- package/components/pds-button.js.map +1 -0
- package/components/pds-button2.js +78 -0
- package/components/pds-button2.js.map +1 -0
- package/components/pds-checkbox.js +8 -0
- package/components/pds-checkbox.js.map +1 -0
- package/components/pds-checkbox2.js +101 -0
- package/components/pds-checkbox2.js.map +1 -0
- package/components/pds-chip.js +72 -0
- package/components/pds-chip.js.map +1 -0
- package/components/pds-copytext.js +82 -0
- package/components/pds-copytext.js.map +1 -0
- package/components/pds-divider.js +54 -0
- package/components/pds-divider.js.map +1 -0
- package/components/pds-image.js +55 -0
- package/components/pds-image.js.map +1 -0
- package/components/pds-input.js +72 -0
- package/components/pds-input.js.map +1 -0
- package/components/pds-label.js +39 -0
- package/components/pds-label.js.map +1 -0
- package/components/pds-link.js +59 -0
- package/components/pds-link.js.map +1 -0
- package/components/pds-loader.js +68 -0
- package/components/pds-loader.js.map +1 -0
- package/components/pds-progress.js +49 -0
- package/components/pds-progress.js.map +1 -0
- package/components/pds-radio.js +78 -0
- package/components/pds-radio.js.map +1 -0
- package/components/pds-row.js +72 -0
- package/components/pds-row.js.map +1 -0
- package/components/pds-sortable-item.js +52 -0
- package/components/pds-sortable-item.js.map +1 -0
- package/components/pds-sortable.js +2722 -0
- package/components/pds-sortable.js.map +1 -0
- package/components/pds-switch.js +82 -0
- package/components/pds-switch.js.map +1 -0
- package/components/pds-tab.js +53 -0
- package/components/pds-tab.js.map +1 -0
- package/components/pds-table-body.js +36 -0
- package/components/pds-table-body.js.map +1 -0
- package/components/pds-table-cell.js +8 -0
- package/components/pds-table-cell.js.map +1 -0
- package/components/pds-table-cell2.js +72 -0
- package/components/pds-table-cell2.js.map +1 -0
- package/components/pds-table-head-cell.js +8 -0
- package/components/pds-table-head-cell.js.map +1 -0
- package/components/pds-table-head-cell2.js +92 -0
- package/components/pds-table-head-cell2.js.map +1 -0
- package/components/pds-table-head.js +84 -0
- package/components/pds-table-head.js.map +1 -0
- package/components/pds-table-row.js +95 -0
- package/components/pds-table-row.js.map +1 -0
- package/components/pds-table.js +124 -0
- package/components/pds-table.js.map +1 -0
- package/components/pds-tabpanel.js +45 -0
- package/components/pds-tabpanel.js.map +1 -0
- package/components/pds-tabs.js +119 -0
- package/components/pds-tabs.js.map +1 -0
- package/components/pds-textarea.js +82 -0
- package/components/pds-textarea.js.map +1 -0
- package/components/pds-tooltip.js +178 -0
- package/components/pds-tooltip.js.map +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/closest-b45138d3.js +13 -0
- package/dist/cjs/closest-b45138d3.js.map +1 -0
- package/dist/{pine-core/index-cccc19b7.js → cjs/index-11f95019.js} +220 -1563
- package/dist/cjs/index-11f95019.js.map +1 -0
- package/dist/cjs/index-dd191bbe.js +24 -0
- package/dist/cjs/index-dd191bbe.js.map +1 -0
- package/dist/cjs/index.cjs.js +6 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/pds-accordion.cjs.entry.js +43 -0
- package/dist/cjs/pds-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-avatar.cjs.entry.js +75 -0
- package/dist/cjs/pds-avatar.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-box.cjs.entry.js +82 -0
- package/dist/cjs/pds-box.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-button.cjs.entry.js +59 -0
- package/dist/cjs/pds-button.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-checkbox.cjs.entry.js +75 -0
- package/dist/cjs/pds-checkbox.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-chip.cjs.entry.js +51 -0
- package/dist/cjs/pds-chip.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-copytext.cjs.entry.js +56 -0
- package/dist/cjs/pds-copytext.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-divider.cjs.entry.js +36 -0
- package/dist/cjs/pds-divider.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-image.cjs.entry.js +32 -0
- package/dist/cjs/pds-image.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-input.cjs.entry.js +45 -0
- package/dist/cjs/pds-input.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-label-7acec6ab.js +44 -0
- package/dist/cjs/pds-label-7acec6ab.js.map +1 -0
- package/dist/cjs/pds-link.cjs.entry.js +39 -0
- package/dist/cjs/pds-link.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-loader.cjs.entry.js +49 -0
- package/dist/cjs/pds-loader.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-progress.cjs.entry.js +28 -0
- package/dist/cjs/pds-progress.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-radio.cjs.entry.js +54 -0
- package/dist/cjs/pds-radio.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-row.cjs.entry.js +51 -0
- package/dist/cjs/pds-row.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-sortable-item.cjs.entry.js +35 -0
- package/dist/cjs/pds-sortable-item.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-sortable.cjs.entry.js +2704 -0
- package/dist/cjs/pds-sortable.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-switch.cjs.entry.js +56 -0
- package/dist/cjs/pds-switch.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-tab.cjs.entry.js +34 -0
- package/dist/cjs/pds-tab.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-table-body.cjs.entry.js +22 -0
- package/dist/cjs/pds-table-body.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-table-cell.cjs.entry.js +58 -0
- package/dist/cjs/pds-table-cell.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +76 -0
- package/dist/cjs/pds-table-head-cell.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-table-head.cjs.entry.js +55 -0
- package/dist/cjs/pds-table-head.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-table-row.cjs.entry.js +66 -0
- package/dist/cjs/pds-table-row.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-table.cjs.entry.js +102 -0
- package/dist/cjs/pds-table.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-tabpanel.cjs.entry.js +27 -0
- package/dist/cjs/pds-tabpanel.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-tabs.cjs.entry.js +99 -0
- package/dist/cjs/pds-tabs.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-textarea.cjs.entry.js +55 -0
- package/dist/cjs/pds-textarea.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-tooltip.cjs.entry.js +152 -0
- package/dist/cjs/pds-tooltip.cjs.entry.js.map +1 -0
- package/dist/cjs/pine-core.cjs.js +27 -0
- package/dist/cjs/pine-core.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +40 -0
- package/dist/collection/components/_internal/pds-label/pds-label.js +7 -0
- package/dist/collection/components/_internal/pds-label/pds-label.js.map +1 -0
- package/dist/collection/components/pds-accordion/pds-accordion.css +65 -0
- package/dist/collection/components/pds-accordion/pds-accordion.js +94 -0
- package/dist/collection/components/pds-accordion/pds-accordion.js.map +1 -0
- package/dist/collection/components/pds-accordion/stories/pds-accordion.stories.js +34 -0
- package/dist/collection/components/pds-avatar/pds-avatar.css +65 -0
- package/dist/collection/components/pds-avatar/pds-avatar.js +224 -0
- package/dist/collection/components/pds-avatar/pds-avatar.js.map +1 -0
- package/dist/collection/components/pds-avatar/stories/pds-avatar.stories.js +65 -0
- package/dist/collection/components/pds-box/pds-box.css +1234 -0
- package/dist/collection/components/pds-box/pds-box.js +678 -0
- package/dist/collection/components/pds-box/pds-box.js.map +1 -0
- package/dist/collection/components/pds-box/stories/pds-box.stories.js +50 -0
- package/dist/collection/components/pds-button/pds-button.css +131 -0
- package/dist/collection/components/pds-button/pds-button.js +193 -0
- package/dist/collection/components/pds-button/pds-button.js.map +1 -0
- package/dist/collection/components/pds-button/stories/pds-button.stories.js +66 -0
- package/dist/collection/components/pds-checkbox/checkbox-interface.js +2 -0
- package/dist/collection/components/pds-checkbox/checkbox-interface.js.map +1 -0
- package/dist/collection/components/pds-checkbox/pds-checkbox.css +135 -0
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +330 -0
- package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +1 -0
- package/dist/collection/components/pds-checkbox/stories/pds-checkbox.stories.js +82 -0
- package/dist/collection/components/pds-chip/pds-chip.css +239 -0
- package/dist/collection/components/pds-chip/pds-chip.js +189 -0
- package/dist/collection/components/pds-chip/pds-chip.js.map +1 -0
- package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +79 -0
- package/dist/collection/components/pds-copytext/pds-copytext.css +87 -0
- package/dist/collection/components/pds-copytext/pds-copytext.js +173 -0
- package/dist/collection/components/pds-copytext/pds-copytext.js.map +1 -0
- package/dist/collection/components/pds-copytext/stories/pds-copytext.stories.js +57 -0
- package/dist/collection/components/pds-divider/pds-divider.css +92 -0
- package/dist/collection/components/pds-divider/pds-divider.js +94 -0
- package/dist/collection/components/pds-divider/pds-divider.js.map +1 -0
- package/dist/collection/components/pds-divider/stories/pds-divider.stories.js +25 -0
- package/dist/collection/components/pds-icon/stories/pds-icon.stories.js +16 -0
- package/dist/collection/components/pds-image/pds-image.css +13 -0
- package/dist/collection/components/pds-image/pds-image.js +173 -0
- package/dist/collection/components/pds-image/pds-image.js.map +1 -0
- package/dist/collection/components/pds-image/stories/pds-image.stories.js +35 -0
- package/dist/collection/components/pds-input/pds-input.css +92 -0
- package/dist/collection/components/pds-input/pds-input.js +279 -0
- package/dist/collection/components/pds-input/pds-input.js.map +1 -0
- package/dist/collection/components/pds-input/stories/pds-input.stories.js +110 -0
- package/dist/collection/components/pds-link/pds-link.css +68 -0
- package/dist/collection/components/pds-link/pds-link.js +140 -0
- package/dist/collection/components/pds-link/pds-link.js.map +1 -0
- package/dist/collection/components/pds-link/stories/pds-link.stories.js +49 -0
- package/dist/collection/components/pds-loader/pds-loader.css +93 -0
- package/dist/collection/components/pds-loader/pds-loader.js +127 -0
- package/dist/collection/components/pds-loader/pds-loader.js.map +1 -0
- package/dist/collection/components/pds-loader/stories/pds-loader.stories.js +36 -0
- package/dist/collection/components/pds-progress/pds-progress.css +79 -0
- package/dist/collection/components/pds-progress/pds-progress.js +148 -0
- package/dist/collection/components/pds-progress/pds-progress.js.map +1 -0
- package/dist/collection/components/pds-progress/stories/pds-progress.stories.js +65 -0
- package/dist/collection/components/pds-radio/pds-radio.css +104 -0
- package/dist/collection/components/pds-radio/pds-radio.js +261 -0
- package/dist/collection/components/pds-radio/pds-radio.js.map +1 -0
- package/dist/collection/components/pds-radio/stories/pds-radio.stories.js +71 -0
- package/dist/collection/components/pds-row/pds-row.css +78 -0
- package/dist/collection/components/pds-row/pds-row.js +186 -0
- package/dist/collection/components/pds-row/pds-row.js.map +1 -0
- package/dist/collection/components/pds-row/stories/pds-row.stories.js +75 -0
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.css +63 -0
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +100 -0
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js.map +1 -0
- package/dist/collection/components/pds-sortable/pds-sortable-item/stories/pds-sortable-item.stories.js +24 -0
- package/dist/collection/components/pds-sortable/pds-sortable.css +10 -0
- package/dist/collection/components/pds-sortable/pds-sortable.js +150 -0
- package/dist/collection/components/pds-sortable/pds-sortable.js.map +1 -0
- package/dist/collection/components/pds-sortable/sortable-interface.js +2 -0
- package/dist/collection/components/pds-sortable/sortable-interface.js.map +1 -0
- package/dist/collection/components/pds-sortable/stories/pds-sortable.stories.js +130 -0
- package/dist/collection/components/pds-switch/pds-switch.css +136 -0
- package/dist/collection/components/pds-switch/pds-switch.js +277 -0
- package/dist/collection/components/pds-switch/pds-switch.js.map +1 -0
- package/dist/collection/components/pds-switch/stories/pds-switch.stories.js +102 -0
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.css +5 -0
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +19 -0
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js.map +1 -0
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.css +45 -0
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +83 -0
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js.map +1 -0
- package/dist/collection/components/pds-table/pds-table-cell/stories/pds-table-cell.stories.js +26 -0
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.css +18 -0
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +109 -0
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js.map +1 -0
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.css +54 -0
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +120 -0
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js.map +1 -0
- package/dist/collection/components/pds-table/pds-table-head-cell/stories/pds-table-head-cell.stories.js +24 -0
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.css +22 -0
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +120 -0
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js.map +1 -0
- package/dist/collection/components/pds-table/pds-table-row/stories/pds-table-row.stories.js +26 -0
- package/dist/collection/components/pds-table/pds-table.css +27 -0
- package/dist/collection/components/pds-table/pds-table.js +248 -0
- package/dist/collection/components/pds-table/pds-table.js.map +1 -0
- package/dist/collection/components/pds-table/stories/pds-table.stories.js +227 -0
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.css +160 -0
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +154 -0
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js.map +1 -0
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.css +12 -0
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +107 -0
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js.map +1 -0
- package/dist/collection/components/pds-tabs/pds-tabs.css +29 -0
- package/dist/collection/components/pds-tabs/pds-tabs.js +209 -0
- package/dist/collection/components/pds-tabs/pds-tabs.js.map +1 -0
- package/dist/collection/components/pds-tabs/stories/pds-tabs.stories.js +63 -0
- package/dist/collection/components/pds-textarea/pds-textarea.css +88 -0
- package/dist/collection/components/pds-textarea/pds-textarea.js +303 -0
- package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -0
- package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +111 -0
- package/dist/collection/components/pds-textarea/textarea-interface.js +2 -0
- package/dist/collection/components/pds-textarea/textarea-interface.js.map +1 -0
- package/dist/collection/components/pds-tooltip/pds-tooltip.css +147 -0
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +287 -0
- package/dist/collection/components/pds-tooltip/pds-tooltip.js.map +1 -0
- package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +103 -0
- package/dist/collection/global/pine-ui-global.js +2 -0
- package/dist/collection/global/pine-ui-global.js.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/stories/_helpers/index.js +15 -0
- package/dist/collection/stories/_helpers/index.js.map +1 -0
- package/dist/collection/utils/closest.js +8 -0
- package/dist/collection/utils/closest.js.map +1 -0
- package/dist/collection/utils/form.js +28 -0
- package/dist/collection/utils/form.js.map +1 -0
- package/dist/collection/utils/overlay.js +68 -0
- package/dist/collection/utils/overlay.js.map +1 -0
- package/dist/collection/utils/types.js +2 -0
- package/dist/collection/utils/types.js.map +1 -0
- package/dist/collection/utils/utils.js +7 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/docs.json +1 -1
- package/dist/esm/index-b8872c16.js +14 -0
- package/dist/esm/index-b8872c16.js.map +1 -0
- package/dist/esm/index-cd2796be.js +2811 -0
- package/dist/esm/index-cd2796be.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/{pine-core → esm}/pds-accordion.entry.js +5 -4
- package/dist/esm/pds-accordion.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-avatar.entry.js +5 -4
- package/dist/esm/pds-avatar.entry.js.map +1 -0
- package/dist/esm/pds-box.entry.js +78 -0
- package/dist/esm/pds-box.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-button.entry.js +5 -7
- package/dist/esm/pds-button.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-checkbox.entry.js +5 -4
- package/dist/esm/pds-checkbox.entry.js.map +1 -0
- package/dist/esm/pds-chip.entry.js +47 -0
- package/dist/esm/pds-chip.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-copytext.entry.js +5 -4
- package/dist/esm/pds-copytext.entry.js.map +1 -0
- package/dist/esm/pds-divider.entry.js +32 -0
- package/dist/esm/pds-divider.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-image.entry.js +3 -2
- package/dist/esm/pds-image.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-input.entry.js +5 -4
- package/dist/esm/pds-input.entry.js.map +1 -0
- package/dist/{pine-core/pds-label-7201663d.js → esm/pds-label-7abc6d85.js} +2 -2
- package/dist/{pine-core/pds-label-7201663d.js.map → esm/pds-label-7abc6d85.js.map} +1 -1
- package/dist/{pine-core → esm}/pds-link.entry.js +5 -4
- package/dist/esm/pds-link.entry.js.map +1 -0
- package/dist/esm/pds-loader.entry.js +45 -0
- package/dist/esm/pds-loader.entry.js.map +1 -0
- package/dist/esm/pds-progress.entry.js +24 -0
- package/dist/esm/pds-progress.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-radio.entry.js +5 -4
- package/dist/esm/pds-radio.entry.js.map +1 -0
- package/dist/esm/pds-row.entry.js +47 -0
- package/dist/esm/pds-row.entry.js.map +1 -0
- package/dist/esm/pds-sortable-item.entry.js +31 -0
- package/dist/esm/pds-sortable-item.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-sortable.entry.js +4 -704
- package/dist/esm/pds-sortable.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-switch.entry.js +5 -4
- package/dist/esm/pds-switch.entry.js.map +1 -0
- package/dist/esm/pds-tab.entry.js +30 -0
- package/dist/esm/pds-tab.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-table-body.entry.js +3 -2
- package/dist/esm/pds-table-body.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-table-cell.entry.js +4 -3
- package/dist/esm/pds-table-cell.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-table-head-cell.entry.js +5 -4
- package/dist/esm/pds-table-head-cell.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-table-head.entry.js +4 -3
- package/dist/esm/pds-table-head.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-table-row.entry.js +4 -3
- package/dist/esm/pds-table-row.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-table.entry.js +4 -3
- package/dist/esm/pds-table.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-tabpanel.entry.js +3 -2
- package/dist/esm/pds-tabpanel.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-tabs.entry.js +4 -3
- package/dist/esm/pds-tabs.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-textarea.entry.js +5 -4
- package/dist/esm/pds-textarea.entry.js.map +1 -0
- package/dist/{pine-core → esm}/pds-tooltip.entry.js +4 -3
- package/dist/esm/pds-tooltip.entry.js.map +1 -0
- package/dist/esm/pine-core.js +22 -0
- package/dist/esm/pine-core.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm-es5/app-globals-0f993ce5.js +2 -0
- package/dist/esm-es5/app-globals-0f993ce5.js.map +1 -0
- package/dist/esm-es5/closest-d2d192be.js +2 -0
- package/dist/esm-es5/closest-d2d192be.js.map +1 -0
- package/dist/esm-es5/index-b8872c16.js +2 -0
- package/dist/esm-es5/index-b8872c16.js.map +1 -0
- package/dist/esm-es5/index-cd2796be.js +3 -0
- package/dist/esm-es5/index-cd2796be.js.map +1 -0
- package/dist/esm-es5/index.js +2 -0
- package/dist/esm-es5/index.js.map +1 -0
- package/dist/esm-es5/loader.js +2 -0
- package/dist/esm-es5/loader.js.map +1 -0
- package/dist/esm-es5/pds-accordion.entry.js +2 -0
- package/dist/esm-es5/pds-accordion.entry.js.map +1 -0
- package/dist/esm-es5/pds-avatar.entry.js +2 -0
- package/dist/esm-es5/pds-avatar.entry.js.map +1 -0
- package/dist/esm-es5/pds-box.entry.js +2 -0
- package/dist/esm-es5/pds-box.entry.js.map +1 -0
- package/dist/esm-es5/pds-button.entry.js +2 -0
- package/dist/esm-es5/pds-button.entry.js.map +1 -0
- package/dist/esm-es5/pds-checkbox.entry.js +2 -0
- package/dist/esm-es5/pds-checkbox.entry.js.map +1 -0
- package/dist/esm-es5/pds-chip.entry.js +2 -0
- package/dist/esm-es5/pds-chip.entry.js.map +1 -0
- package/dist/esm-es5/pds-copytext.entry.js +2 -0
- package/dist/esm-es5/pds-copytext.entry.js.map +1 -0
- package/dist/esm-es5/pds-divider.entry.js +2 -0
- package/dist/esm-es5/pds-divider.entry.js.map +1 -0
- package/dist/esm-es5/pds-image.entry.js +2 -0
- package/dist/esm-es5/pds-image.entry.js.map +1 -0
- package/dist/esm-es5/pds-input.entry.js +2 -0
- package/dist/esm-es5/pds-input.entry.js.map +1 -0
- package/dist/esm-es5/pds-label-7abc6d85.js +2 -0
- package/dist/esm-es5/pds-label-7abc6d85.js.map +1 -0
- package/dist/esm-es5/pds-link.entry.js +2 -0
- package/dist/esm-es5/pds-link.entry.js.map +1 -0
- package/dist/esm-es5/pds-loader.entry.js +2 -0
- package/dist/esm-es5/pds-loader.entry.js.map +1 -0
- package/dist/esm-es5/pds-progress.entry.js +2 -0
- package/dist/esm-es5/pds-progress.entry.js.map +1 -0
- package/dist/esm-es5/pds-radio.entry.js +2 -0
- package/dist/esm-es5/pds-radio.entry.js.map +1 -0
- package/dist/esm-es5/pds-row.entry.js +2 -0
- package/dist/esm-es5/pds-row.entry.js.map +1 -0
- package/dist/esm-es5/pds-sortable-item.entry.js +2 -0
- package/dist/esm-es5/pds-sortable-item.entry.js.map +1 -0
- package/dist/esm-es5/pds-sortable.entry.js +8 -0
- package/dist/esm-es5/pds-sortable.entry.js.map +1 -0
- package/dist/esm-es5/pds-switch.entry.js +2 -0
- package/dist/esm-es5/pds-switch.entry.js.map +1 -0
- package/dist/esm-es5/pds-tab.entry.js +2 -0
- package/dist/esm-es5/pds-tab.entry.js.map +1 -0
- package/dist/esm-es5/pds-table-body.entry.js +2 -0
- package/dist/esm-es5/pds-table-body.entry.js.map +1 -0
- package/dist/esm-es5/pds-table-cell.entry.js +2 -0
- package/dist/esm-es5/pds-table-cell.entry.js.map +1 -0
- package/dist/esm-es5/pds-table-head-cell.entry.js +2 -0
- package/dist/esm-es5/pds-table-head-cell.entry.js.map +1 -0
- package/dist/esm-es5/pds-table-head.entry.js +2 -0
- package/dist/esm-es5/pds-table-head.entry.js.map +1 -0
- package/dist/esm-es5/pds-table-row.entry.js +2 -0
- package/dist/esm-es5/pds-table-row.entry.js.map +1 -0
- package/dist/esm-es5/pds-table.entry.js +2 -0
- package/dist/{pine-core → esm-es5}/pds-table.entry.js.map +1 -1
- package/dist/esm-es5/pds-tabpanel.entry.js +2 -0
- package/dist/esm-es5/pds-tabpanel.entry.js.map +1 -0
- package/dist/esm-es5/pds-tabs.entry.js +2 -0
- package/dist/esm-es5/pds-tabs.entry.js.map +1 -0
- package/dist/esm-es5/pds-textarea.entry.js +2 -0
- package/dist/esm-es5/pds-textarea.entry.js.map +1 -0
- package/dist/esm-es5/pds-tooltip.entry.js +2 -0
- package/dist/esm-es5/pds-tooltip.entry.js.map +1 -0
- package/dist/esm-es5/pine-core.js +2 -0
- package/dist/esm-es5/pine-core.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/pine-core/index.esm.js +1 -2
- package/dist/pine-core/index.esm.js.map +1 -1
- package/dist/pine-core/p-03ac85bb.system.entry.js +2 -0
- package/dist/pine-core/p-03ac85bb.system.entry.js.map +1 -0
- package/dist/pine-core/p-0935a593.system.js +3 -0
- package/dist/pine-core/p-0935a593.system.js.map +1 -0
- package/dist/pine-core/p-0b77685e.js +2 -0
- package/dist/pine-core/p-0b77685e.js.map +1 -0
- package/dist/pine-core/p-0ca08a85.system.js +2 -0
- package/dist/pine-core/p-0ca08a85.system.js.map +1 -0
- package/dist/pine-core/p-1b1c6e9e.system.entry.js +2 -0
- package/dist/pine-core/p-1b1c6e9e.system.entry.js.map +1 -0
- package/dist/pine-core/p-1d34a83d.system.entry.js +2 -0
- package/dist/pine-core/p-1d34a83d.system.entry.js.map +1 -0
- package/dist/pine-core/p-224a435b.system.js +2 -0
- package/dist/pine-core/p-224a435b.system.js.map +1 -0
- package/dist/pine-core/p-23d97662.js +3 -0
- package/dist/pine-core/p-23d97662.js.map +1 -0
- package/dist/pine-core/p-24d43a5d.system.entry.js +2 -0
- package/dist/pine-core/p-24d43a5d.system.entry.js.map +1 -0
- package/dist/pine-core/p-252bcd1c.system.entry.js +2 -0
- package/dist/pine-core/p-252bcd1c.system.entry.js.map +1 -0
- package/dist/pine-core/p-27dfade4.system.entry.js +2 -0
- package/dist/pine-core/p-27dfade4.system.entry.js.map +1 -0
- package/dist/pine-core/p-28d205e0.system.entry.js +2 -0
- package/dist/pine-core/p-28d205e0.system.entry.js.map +1 -0
- package/dist/pine-core/p-2ac1781f.entry.js +2 -0
- package/dist/pine-core/p-2ac1781f.entry.js.map +1 -0
- package/dist/pine-core/p-35f2208a.system.entry.js +2 -0
- package/dist/pine-core/p-35f2208a.system.entry.js.map +1 -0
- package/dist/pine-core/p-38a23fac.system.entry.js +2 -0
- package/dist/pine-core/p-38a23fac.system.entry.js.map +1 -0
- package/dist/pine-core/p-39bc5dc9.system.entry.js +2 -0
- package/dist/pine-core/p-39bc5dc9.system.entry.js.map +1 -0
- package/dist/pine-core/p-3c02b099.entry.js +2 -0
- package/dist/pine-core/p-3c02b099.entry.js.map +1 -0
- package/dist/pine-core/p-41d6881e.system.entry.js +2 -0
- package/dist/pine-core/p-41d6881e.system.entry.js.map +1 -0
- package/dist/pine-core/p-443202f8.entry.js +8 -0
- package/dist/pine-core/p-443202f8.entry.js.map +1 -0
- package/dist/pine-core/p-4df579f2.entry.js +2 -0
- package/dist/pine-core/p-4df579f2.entry.js.map +1 -0
- package/dist/pine-core/p-519ef0c4.system.js +2 -0
- package/dist/pine-core/p-519ef0c4.system.js.map +1 -0
- package/dist/pine-core/p-56588c5d.entry.js +2 -0
- package/dist/pine-core/p-56588c5d.entry.js.map +1 -0
- package/dist/pine-core/p-56ba5cbf.system.js +2 -0
- package/dist/pine-core/p-56ba5cbf.system.js.map +1 -0
- package/dist/pine-core/p-5c60147f.system.entry.js +9 -0
- package/dist/pine-core/p-5c60147f.system.entry.js.map +1 -0
- package/dist/pine-core/p-5c8608cd.system.entry.js +2 -0
- package/dist/pine-core/p-5c8608cd.system.entry.js.map +1 -0
- package/dist/pine-core/p-5d08fe24.entry.js +2 -0
- package/dist/pine-core/p-5d08fe24.entry.js.map +1 -0
- package/dist/pine-core/p-606b6dbb.entry.js +2 -0
- package/dist/pine-core/p-606b6dbb.entry.js.map +1 -0
- package/dist/pine-core/p-60f4dc68.system.entry.js +2 -0
- package/dist/pine-core/p-60f4dc68.system.entry.js.map +1 -0
- package/dist/pine-core/p-6525ed78.entry.js +2 -0
- package/dist/pine-core/p-6525ed78.entry.js.map +1 -0
- package/dist/pine-core/p-684d04ae.entry.js +2 -0
- package/dist/pine-core/p-684d04ae.entry.js.map +1 -0
- package/dist/pine-core/p-6f38bc8e.entry.js +2 -0
- package/dist/pine-core/p-6f38bc8e.entry.js.map +1 -0
- package/dist/pine-core/p-6f511f31.entry.js +2 -0
- package/dist/pine-core/p-6f511f31.entry.js.map +1 -0
- package/dist/pine-core/p-74d57e61.system.entry.js +2 -0
- package/dist/pine-core/p-74d57e61.system.entry.js.map +1 -0
- package/dist/pine-core/p-806b41c3.entry.js +2 -0
- package/dist/pine-core/p-806b41c3.entry.js.map +1 -0
- package/dist/pine-core/p-807d5d68.system.entry.js +2 -0
- package/dist/pine-core/p-807d5d68.system.entry.js.map +1 -0
- package/dist/pine-core/p-854fa9e2.entry.js +2 -0
- package/dist/pine-core/p-854fa9e2.entry.js.map +1 -0
- package/dist/pine-core/p-867aee19.entry.js +2 -0
- package/dist/pine-core/p-867aee19.entry.js.map +1 -0
- package/dist/pine-core/p-8701cb7b.system.entry.js +2 -0
- package/dist/pine-core/p-8701cb7b.system.entry.js.map +1 -0
- package/dist/pine-core/p-87b61d15.system.entry.js +2 -0
- package/dist/pine-core/p-87b61d15.system.entry.js.map +1 -0
- package/dist/pine-core/p-8a1b3866.entry.js +2 -0
- package/dist/pine-core/p-8a1b3866.entry.js.map +1 -0
- package/dist/pine-core/p-8c719c49.entry.js +2 -0
- package/dist/pine-core/p-8c719c49.entry.js.map +1 -0
- package/dist/pine-core/p-8f3273ed.system.entry.js +2 -0
- package/dist/pine-core/p-8f3273ed.system.entry.js.map +1 -0
- package/dist/pine-core/p-8fcfa336.entry.js +2 -0
- package/dist/pine-core/p-8fcfa336.entry.js.map +1 -0
- package/dist/pine-core/p-90694e70.entry.js +2 -0
- package/dist/pine-core/p-90694e70.entry.js.map +1 -0
- package/dist/pine-core/p-91bb8017.entry.js +2 -0
- package/dist/pine-core/p-91bb8017.entry.js.map +1 -0
- package/dist/pine-core/p-924a951b.system.entry.js +2 -0
- package/dist/pine-core/p-924a951b.system.entry.js.map +1 -0
- package/dist/pine-core/p-9c538ab0.entry.js +2 -0
- package/dist/pine-core/p-9c538ab0.entry.js.map +1 -0
- package/dist/pine-core/p-9d959d25.system.entry.js +2 -0
- package/dist/pine-core/p-9d959d25.system.entry.js.map +1 -0
- package/dist/pine-core/p-ad997571.system.entry.js +2 -0
- package/dist/pine-core/p-ad997571.system.entry.js.map +1 -0
- package/dist/pine-core/p-b1363254.entry.js +2 -0
- package/dist/pine-core/p-b1363254.entry.js.map +1 -0
- package/dist/pine-core/p-b47f8855.entry.js +2 -0
- package/dist/pine-core/p-b47f8855.entry.js.map +1 -0
- package/dist/pine-core/p-b480d80a.entry.js +2 -0
- package/dist/pine-core/p-b480d80a.entry.js.map +1 -0
- package/dist/pine-core/p-b5859bbd.system.entry.js +2 -0
- package/dist/pine-core/p-b5859bbd.system.entry.js.map +1 -0
- package/dist/pine-core/p-b978c861.entry.js +2 -0
- package/dist/pine-core/p-b978c861.entry.js.map +1 -0
- package/dist/pine-core/p-bdc39517.system.entry.js +2 -0
- package/dist/pine-core/p-bdc39517.system.entry.js.map +1 -0
- package/dist/pine-core/p-c03cfc96.js +2 -0
- package/dist/pine-core/p-c03cfc96.js.map +1 -0
- package/dist/pine-core/p-c56d871e.system.entry.js +2 -0
- package/dist/pine-core/p-c56d871e.system.entry.js.map +1 -0
- package/dist/pine-core/p-cca53530.system.entry.js +2 -0
- package/dist/pine-core/p-cca53530.system.entry.js.map +1 -0
- package/dist/pine-core/p-cddeae53.entry.js +2 -0
- package/dist/pine-core/p-cddeae53.entry.js.map +1 -0
- package/dist/pine-core/p-d33de2b3.system.entry.js +2 -0
- package/dist/pine-core/p-d33de2b3.system.entry.js.map +1 -0
- package/dist/pine-core/p-dcc876d5.entry.js +2 -0
- package/dist/pine-core/p-dcc876d5.entry.js.map +1 -0
- package/dist/pine-core/p-e1255160.js +2 -0
- package/dist/pine-core/p-e1255160.js.map +1 -0
- package/dist/pine-core/p-ece97e5b.system.js +2 -0
- package/dist/pine-core/p-ece97e5b.system.js.map +1 -0
- package/dist/pine-core/p-ee65aef1.system.js +2 -0
- package/dist/pine-core/p-ee65aef1.system.js.map +1 -0
- package/dist/pine-core/p-efc85823.js +2 -0
- package/dist/pine-core/p-efc85823.js.map +1 -0
- package/dist/pine-core/p-f1610dff.system.entry.js +2 -0
- package/dist/pine-core/p-f1610dff.system.entry.js.map +1 -0
- package/dist/pine-core/p-f666c482.entry.js +2 -0
- package/dist/pine-core/p-f666c482.entry.js.map +1 -0
- package/dist/pine-core/p-f80b45a9.system.entry.js +2 -0
- package/dist/pine-core/p-f80b45a9.system.entry.js.map +1 -0
- package/dist/pine-core/p-f92e85c4.entry.js +2 -0
- package/dist/pine-core/p-f92e85c4.entry.js.map +1 -0
- package/dist/pine-core/p-fc202585.entry.js +2 -0
- package/dist/pine-core/p-fc202585.entry.js.map +1 -0
- package/dist/pine-core/pine-core.css +1 -180
- package/dist/pine-core/pine-core.esm.js +1 -52
- package/dist/pine-core/pine-core.esm.js.map +1 -1
- package/dist/pine-core/pine-core.js +127 -0
- package/hydrate/index.js +28 -28
- package/package.json +1 -1
- package/dist/pine-core/index-00e73f84.js +0 -329
- package/dist/pine-core/index-00e73f84.js.map +0 -1
- package/dist/pine-core/index-cccc19b7.js.map +0 -1
- package/dist/pine-core/pds-accordion.entry.js.map +0 -1
- package/dist/pine-core/pds-avatar.entry.js.map +0 -1
- package/dist/pine-core/pds-box.entry.js +0 -77
- package/dist/pine-core/pds-box.entry.js.map +0 -1
- package/dist/pine-core/pds-button.entry.js.map +0 -1
- package/dist/pine-core/pds-checkbox.entry.js.map +0 -1
- package/dist/pine-core/pds-chip.entry.js +0 -46
- package/dist/pine-core/pds-chip.entry.js.map +0 -1
- package/dist/pine-core/pds-copytext.entry.js.map +0 -1
- package/dist/pine-core/pds-divider.entry.js +0 -31
- package/dist/pine-core/pds-divider.entry.js.map +0 -1
- package/dist/pine-core/pds-image.entry.js.map +0 -1
- package/dist/pine-core/pds-input.entry.js.map +0 -1
- package/dist/pine-core/pds-link.entry.js.map +0 -1
- package/dist/pine-core/pds-loader.entry.js +0 -44
- package/dist/pine-core/pds-loader.entry.js.map +0 -1
- package/dist/pine-core/pds-progress.entry.js +0 -23
- package/dist/pine-core/pds-progress.entry.js.map +0 -1
- package/dist/pine-core/pds-radio.entry.js.map +0 -1
- package/dist/pine-core/pds-row.entry.js +0 -46
- package/dist/pine-core/pds-row.entry.js.map +0 -1
- package/dist/pine-core/pds-sortable-item.entry.js +0 -30
- package/dist/pine-core/pds-sortable-item.entry.js.map +0 -1
- package/dist/pine-core/pds-sortable.entry.js.map +0 -1
- package/dist/pine-core/pds-switch.entry.js.map +0 -1
- package/dist/pine-core/pds-tab.entry.js +0 -29
- package/dist/pine-core/pds-tab.entry.js.map +0 -1
- package/dist/pine-core/pds-table-body.entry.js.map +0 -1
- package/dist/pine-core/pds-table-cell.entry.js.map +0 -1
- package/dist/pine-core/pds-table-head-cell.entry.js.map +0 -1
- package/dist/pine-core/pds-table-head.entry.js.map +0 -1
- package/dist/pine-core/pds-table-row.entry.js.map +0 -1
- package/dist/pine-core/pds-tabpanel.entry.js.map +0 -1
- package/dist/pine-core/pds-tabs.entry.js.map +0 -1
- package/dist/pine-core/pds-textarea.entry.js.map +0 -1
- package/dist/pine-core/pds-tooltip.entry.js.map +0 -1
- package/dist/pine-core/shadow-css-2e0fed52.js +0 -478
- package/dist/pine-core/shadow-css-2e0fed52.js.map +0 -1
- /package/dist/{pine-core → esm}/app-globals-0f993ce5.js +0 -0
- /package/dist/{pine-core → esm}/app-globals-0f993ce5.js.map +0 -0
- /package/dist/{pine-core → esm}/closest-d2d192be.js +0 -0
- /package/dist/{pine-core → esm}/closest-d2d192be.js.map +0 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const positionTooltip = ({ elem, elemPlacement, overlay, offset = 8 }) => {
|
|
4
|
+
if (elem == undefined)
|
|
5
|
+
return;
|
|
6
|
+
const rect = elem.getBoundingClientRect();
|
|
7
|
+
const contentRect = overlay.getBoundingClientRect();
|
|
8
|
+
// Exit the function if the placement is not set
|
|
9
|
+
if (!elemPlacement || elemPlacement == "")
|
|
10
|
+
return;
|
|
11
|
+
switch (true) {
|
|
12
|
+
case elemPlacement.includes("right"):
|
|
13
|
+
overlay.style.top = '50%';
|
|
14
|
+
overlay.style.left = `calc(${rect.width}px + ${offset}px)`;
|
|
15
|
+
overlay.style.transform = 'translateY(-50%)';
|
|
16
|
+
if (elemPlacement.includes("start")) {
|
|
17
|
+
overlay.style.top = '0';
|
|
18
|
+
overlay.style.transform = 'translateY(0)';
|
|
19
|
+
}
|
|
20
|
+
if (elemPlacement.includes("end")) {
|
|
21
|
+
overlay.style.bottom = '0';
|
|
22
|
+
overlay.style.top = 'initial';
|
|
23
|
+
overlay.style.transform = 'translateY(0)';
|
|
24
|
+
}
|
|
25
|
+
break;
|
|
26
|
+
case elemPlacement.includes("left"):
|
|
27
|
+
overlay.style.top = '50%';
|
|
28
|
+
overlay.style.right = `calc(${rect.width}px + ${offset}px)`;
|
|
29
|
+
overlay.style.transform = 'translateY(-50%)';
|
|
30
|
+
if (elemPlacement.includes("start")) {
|
|
31
|
+
overlay.style.top = '0';
|
|
32
|
+
overlay.style.transform = 'translateY(0)';
|
|
33
|
+
}
|
|
34
|
+
if (elemPlacement.includes("end")) {
|
|
35
|
+
overlay.style.bottom = '0';
|
|
36
|
+
overlay.style.top = 'initial';
|
|
37
|
+
overlay.style.transform = 'translateY(0)';
|
|
38
|
+
}
|
|
39
|
+
break;
|
|
40
|
+
case elemPlacement.includes("bottom"):
|
|
41
|
+
overlay.style.top = `calc(${rect.height}px + ${offset}px)`;
|
|
42
|
+
overlay.style.left = '50%';
|
|
43
|
+
overlay.style.transform = 'translateX(-50%)';
|
|
44
|
+
if (elemPlacement.includes("start")) {
|
|
45
|
+
overlay.style.left = '0';
|
|
46
|
+
overlay.style.transform = 'translateX(0)';
|
|
47
|
+
}
|
|
48
|
+
if (elemPlacement.includes("end")) {
|
|
49
|
+
overlay.style.left = 'initial';
|
|
50
|
+
overlay.style.right = '0';
|
|
51
|
+
overlay.style.transform = 'translateX(0)';
|
|
52
|
+
}
|
|
53
|
+
break;
|
|
54
|
+
case elemPlacement.includes("top"):
|
|
55
|
+
overlay.style.top = `calc((${contentRect.height}px + ${offset}px) * -1)`;
|
|
56
|
+
overlay.style.left = '50%';
|
|
57
|
+
overlay.style.transform = 'translateX(-50%)';
|
|
58
|
+
if (elemPlacement.includes("start")) {
|
|
59
|
+
overlay.style.left = '0';
|
|
60
|
+
overlay.style.transform = 'translateX(0)';
|
|
61
|
+
}
|
|
62
|
+
if (elemPlacement.includes("end")) {
|
|
63
|
+
overlay.style.left = 'initial';
|
|
64
|
+
overlay.style.right = '0';
|
|
65
|
+
overlay.style.transform = 'translateX(0)';
|
|
66
|
+
}
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const pdsTooltipCss = ":host{--border-radius-overlay:var(--pine-border-radius-125);--border-width-arrow-down:var(--sizing-arrow-default) var(--sizing-arrow-default) 0;--border-width-arrow-left:var(--sizing-arrow-default) var(--sizing-arrow-default) var(--sizing-arrow-default) 0;--border-width-arrow-right:var(--sizing-arrow-default) 0 var(--sizing-arrow-default) var(--sizing-arrow-default);--border-width-arrow-up:0 var(--sizing-arrow-default) var(--sizing-arrow-default);--box-shadow-default:var(--pine-box-shadow-md);--color-background-default:var(--pine-color-charcoal-400);--color-text-default:var(--pine-color-white);--font-size-overlay:var(--pine-font-size-087);--line-height-overlay:var(--pine-line-height-125);--sizing-arrow-default:6px;--sizing-arrow-offset:14px;--sizing-width-default:320px;--spacing-padding-overlay:var(--pine-spacing-100) calc(var(--pine-spacing-300) / 2);display:inline-block;position:relative}:host ::slotted(*){display:-ms-flexbox;display:flex}:host ::slotted([slot=content]){display:block;white-space:normal;width:var(--sizing-width-default)}.pds-tooltip__content{background-color:var(--color-background-default);border-radius:var(--border-radius-overlay);-webkit-box-shadow:var(--box-shadow-default);box-shadow:var(--box-shadow-default);color:var(--color-text-default);font-size:var(--font-size-overlay);line-height:var(--line-height-overlay);opacity:0;padding:var(--spacing-padding-overlay);position:absolute;visibility:hidden;width:-webkit-max-content;width:-moz-max-content;width:max-content}.pds-tooltip--is-open .pds-tooltip__content{opacity:1;visibility:visible;z-index:1}:host(.pds-tooltip--has-html-content) .pds-tooltip__content{width:auto}.pds-tooltip__content::after{border-color:transparent;border-right-color:transparent;border-style:solid;border-width:var(--border-width-arrow-left);content:\"\";height:0;position:absolute;width:0}.pds-tooltip--right .pds-tooltip__content::after{border-inline-end-color:var(--color-background-default);border-width:var(--border-width-arrow-left);left:calc(var(--sizing-arrow-default) * -1);top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pds-tooltip--right-end .pds-tooltip__content::after{border-inline-end-color:var(--color-background-default);border-width:var(--border-width-arrow-left);bottom:var(--sizing-arrow-offset);left:calc(var(--sizing-arrow-default) * -1);top:initial}.pds-tooltip--right-start .pds-tooltip__content::after{border-inline-end-color:var(--color-background-default);border-width:var(--border-width-arrow-left);left:calc(var(--sizing-arrow-default) * -1);top:var(--sizing-arrow-offset)}.pds-tooltip--top .pds-tooltip__content::after{border-block-start-color:var(--color-background-default);border-width:var(--border-width-arrow-down);bottom:calc(var(--sizing-arrow-default) * -1);left:50%;top:initial;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.pds-tooltip--top-start .pds-tooltip__content::after{border-block-start-color:var(--color-background-default);border-width:var(--border-width-arrow-down);bottom:calc(var(--sizing-arrow-default) * -1);left:var(--sizing-arrow-offset);top:initial}.pds-tooltip--top-end .pds-tooltip__content::after{border-block-start-color:var(--color-background-default);border-width:var(--border-width-arrow-down);bottom:calc(var(--sizing-arrow-default) * -1);left:initial;right:var(--sizing-arrow-offset);top:initial}.pds-tooltip--left .pds-tooltip__content::after{border-inline-start-color:var(--color-background-default);border-width:var(--border-width-arrow-right);left:initial;right:calc(var(--sizing-arrow-default) * -1);top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pds-tooltip--left-end .pds-tooltip__content::after{border-inline-start-color:var(--color-background-default);border-width:var(--border-width-arrow-right);bottom:var(--sizing-arrow-offset);left:initial;right:calc(var(--sizing-arrow-default) * -1);top:initial}.pds-tooltip--left-start .pds-tooltip__content::after{border-inline-start-color:var(--color-background-default);border-width:var(--border-width-arrow-right);left:initial;right:calc(var(--sizing-arrow-default) * -1);top:var(--sizing-arrow-offset)}.pds-tooltip--bottom .pds-tooltip__content::after{border-block-end-color:var(--color-background-default);border-width:var(--border-width-arrow-up);left:50%;top:calc(var(--sizing-arrow-default) * -1);-webkit-transform:translateX(-50%);transform:translateX(-50%)}.pds-tooltip--bottom-end .pds-tooltip__content::after{border-block-end-color:var(--color-background-default);border-width:var(--border-width-arrow-up);left:initial;right:var(--sizing-arrow-offset);top:calc(var(--sizing-arrow-default) * -1)}.pds-tooltip--bottom-start .pds-tooltip__content::after{border-block-end-color:var(--color-background-default);border-width:var(--border-width-arrow-up);left:var(--sizing-arrow-offset);top:calc(var(--sizing-arrow-default) * -1)}.pds-tooltip--no-arrow .pds-tooltip__content::after{border-width:0}";
|
|
72
|
+
const PdsTooltipStyle0 = pdsTooltipCss;
|
|
73
|
+
|
|
74
|
+
const PdsTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PdsTooltip extends HTMLElement {
|
|
75
|
+
constructor() {
|
|
76
|
+
super();
|
|
77
|
+
this.__registerHost();
|
|
78
|
+
this.__attachShadow();
|
|
79
|
+
this.pdsTooltipHide = createEvent(this, "pdsTooltipHide", 7);
|
|
80
|
+
this.pdsTooltipShow = createEvent(this, "pdsTooltipShow", 7);
|
|
81
|
+
this.handleHide = () => {
|
|
82
|
+
this.hideTooltip();
|
|
83
|
+
this.pdsTooltipHide.emit();
|
|
84
|
+
};
|
|
85
|
+
this.handleShow = () => {
|
|
86
|
+
this.showTooltip();
|
|
87
|
+
this.pdsTooltipShow.emit();
|
|
88
|
+
};
|
|
89
|
+
this.isOpen = false;
|
|
90
|
+
this.content = undefined;
|
|
91
|
+
this.componentId = undefined;
|
|
92
|
+
this.hasArrow = true;
|
|
93
|
+
this.htmlContent = false;
|
|
94
|
+
this.placement = 'right';
|
|
95
|
+
this.opened = false;
|
|
96
|
+
}
|
|
97
|
+
handleOpenToggle() {
|
|
98
|
+
if (this.opened) {
|
|
99
|
+
this.handleShow();
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
this.handleHide();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
componentWillLoad() {
|
|
106
|
+
if (this.opened) {
|
|
107
|
+
this.showTooltip();
|
|
108
|
+
}
|
|
109
|
+
this.el.addEventListener('blur', this.handleHide, true);
|
|
110
|
+
this.el.addEventListener('focus', this.handleShow, true);
|
|
111
|
+
}
|
|
112
|
+
componentDidUpdate() {
|
|
113
|
+
if (this.opened) {
|
|
114
|
+
this.showTooltip();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
componentDidRender() {
|
|
118
|
+
positionTooltip({ elem: this.el, elemPlacement: this.placement, overlay: this.contentEl });
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Shows the tooltip by enabling the opened property
|
|
122
|
+
*/
|
|
123
|
+
async showTooltip() {
|
|
124
|
+
this.opened = true;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Hides the tooltip by disabling the opened property
|
|
128
|
+
*/
|
|
129
|
+
async hideTooltip() {
|
|
130
|
+
this.opened = false;
|
|
131
|
+
}
|
|
132
|
+
render() {
|
|
133
|
+
return (h(Host, { key: '52999e010e83fb265a46867b0b29169f7363a496', onMouseEnter: this.handleShow, onMouseLeave: this.handleHide, onFocusin: this.handleShow, onFocusout: this.handleHide }, h("div", { key: '6bb63ba10eab04114ced7ead7079d46cc22cb72c', class: `
|
|
134
|
+
pds-tooltip
|
|
135
|
+
pds-tooltip--${this.placement}
|
|
136
|
+
${this.htmlContent ? 'pds-tooltip--has-html-content' : ''}
|
|
137
|
+
${this.opened ? 'pds-tooltip--is-open' : ''}
|
|
138
|
+
${this.hasArrow ? '' : 'pds-tooltip--no-arrow'}
|
|
139
|
+
` }, h("span", { key: '930c148c837912ad9d5ea57e92246e0211b355c4', "aria-describedby": this.componentId, class: "pds-tooltip__trigger" }, h("slot", { key: '813429e2865fae92050d779ca7f47072313db851' })), h("div", { key: '7f47e8b4ff3d6238f27e38986f032ece94f6b584', class: "pds-tooltip__content", "aria-hidden": this.opened ? 'false' : 'true', "aria-live": this.opened ? 'polite' : 'off', id: this.componentId, ref: (el) => (this.contentEl = el), role: "tooltip" }, h("slot", { key: '90b3f02974d250375d55ed332a9c525626ff5439', name: "content" }), this.content))));
|
|
140
|
+
}
|
|
141
|
+
get el() { return this; }
|
|
142
|
+
static get watchers() { return {
|
|
143
|
+
"opened": ["handleOpenToggle"]
|
|
144
|
+
}; }
|
|
145
|
+
static get style() { return PdsTooltipStyle0; }
|
|
146
|
+
}, [1, "pds-tooltip", {
|
|
147
|
+
"content": [1],
|
|
148
|
+
"componentId": [1, "component-id"],
|
|
149
|
+
"hasArrow": [4, "has-arrow"],
|
|
150
|
+
"htmlContent": [4, "html-content"],
|
|
151
|
+
"placement": [513],
|
|
152
|
+
"opened": [1540],
|
|
153
|
+
"isOpen": [32],
|
|
154
|
+
"showTooltip": [64],
|
|
155
|
+
"hideTooltip": [64]
|
|
156
|
+
}, undefined, {
|
|
157
|
+
"opened": ["handleOpenToggle"]
|
|
158
|
+
}]);
|
|
159
|
+
function defineCustomElement$1() {
|
|
160
|
+
if (typeof customElements === "undefined") {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const components = ["pds-tooltip"];
|
|
164
|
+
components.forEach(tagName => { switch (tagName) {
|
|
165
|
+
case "pds-tooltip":
|
|
166
|
+
if (!customElements.get(tagName)) {
|
|
167
|
+
customElements.define(tagName, PdsTooltip$1);
|
|
168
|
+
}
|
|
169
|
+
break;
|
|
170
|
+
} });
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const PdsTooltip = PdsTooltip$1;
|
|
174
|
+
const defineCustomElement = defineCustomElement$1;
|
|
175
|
+
|
|
176
|
+
export { PdsTooltip, defineCustomElement };
|
|
177
|
+
|
|
178
|
+
//# sourceMappingURL=pds-tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"pds-tooltip.js","mappings":"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","names":["PdsTooltip"],"sources":["src/utils/overlay.ts","src/components/pds-tooltip/pds-tooltip.scss?tag=pds-tooltip&encapsulation=shadow","src/components/pds-tooltip/pds-tooltip.tsx"],"sourcesContent":["interface OverlayArgs {\n elem: HTMLElement;\n elemPlacement: string;\n overlay: HTMLElement;\n offset?: number;\n}\n\nexport const positionTooltip = ({elem, elemPlacement, overlay, offset = 8}: OverlayArgs) => {\n if (elem == undefined) return;\n\n const rect = elem.getBoundingClientRect();\n const contentRect = overlay.getBoundingClientRect();\n\n // Exit the function if the placement is not set\n if (!elemPlacement || elemPlacement == \"\") return;\n\n switch (true) {\n case elemPlacement.includes(\"right\"):\n overlay.style.top = '50%';\n overlay.style.left = `calc(${rect.width}px + ${offset}px)`;\n overlay.style.transform = 'translateY(-50%)';\n\n if (elemPlacement.includes(\"start\")) {\n overlay.style.top = '0';\n overlay.style.transform = 'translateY(0)';\n }\n\n if (elemPlacement.includes(\"end\")) {\n overlay.style.bottom = '0';\n overlay.style.top = 'initial';\n overlay.style.transform = 'translateY(0)';\n }\n\n break;\n\n case elemPlacement.includes(\"left\"):\n overlay.style.top = '50%';\n overlay.style.right = `calc(${rect.width}px + ${offset}px)`;\n overlay.style.transform = 'translateY(-50%)';\n\n if (elemPlacement.includes(\"start\")) {\n overlay.style.top = '0';\n overlay.style.transform = 'translateY(0)';\n }\n\n if (elemPlacement.includes(\"end\")) {\n overlay.style.bottom = '0';\n overlay.style.top = 'initial';\n overlay.style.transform = 'translateY(0)';\n }\n\n break;\n\n case elemPlacement.includes(\"bottom\"):\n overlay.style.top = `calc(${rect.height}px + ${offset}px)`;\n overlay.style.left = '50%';\n overlay.style.transform = 'translateX(-50%)';\n\n if (elemPlacement.includes(\"start\")) {\n overlay.style.left = '0';\n overlay.style.transform = 'translateX(0)';\n }\n\n if (elemPlacement.includes(\"end\")) {\n overlay.style.left = 'initial';\n overlay.style.right = '0';\n overlay.style.transform = 'translateX(0)';\n }\n\n break;\n\n case elemPlacement.includes(\"top\"):\n overlay.style.top = `calc((${contentRect.height}px + ${offset}px) * -1)`;\n overlay.style.left = '50%';\n overlay.style.transform = 'translateX(-50%)';\n\n if (elemPlacement.includes(\"start\")) {\n overlay.style.left = '0';\n overlay.style.transform = 'translateX(0)';\n }\n if (elemPlacement.includes(\"end\")) {\n overlay.style.left = 'initial';\n overlay.style.right = '0';\n overlay.style.transform = 'translateX(0)';\n }\n\n break;\n }\n}\n",":host {\n --border-radius-overlay: var(--pine-border-radius-125);\n\n --border-width-arrow-down: var(--sizing-arrow-default) var(--sizing-arrow-default) 0;\n --border-width-arrow-left: var(--sizing-arrow-default) var(--sizing-arrow-default) var(--sizing-arrow-default) 0;\n --border-width-arrow-right: var(--sizing-arrow-default) 0 var(--sizing-arrow-default) var(--sizing-arrow-default);\n --border-width-arrow-up: 0 var(--sizing-arrow-default) var(--sizing-arrow-default);\n\n --box-shadow-default: var(--pine-box-shadow-md);\n\n --color-background-default: var(--pine-color-charcoal-400);\n --color-text-default: var(--pine-color-white);\n\n --font-size-overlay: var(--pine-font-size-087);\n\n --line-height-overlay: var(--pine-line-height-125);\n\n --sizing-arrow-default: 6px;\n --sizing-arrow-offset: 14px;\n --sizing-width-default: 320px;\n\n --spacing-padding-overlay: var(--pine-spacing-100) calc(var(--pine-spacing-300) / 2);\n\n display: inline-block;\n position: relative;\n\n ::slotted(*) {\n display: flex;\n }\n\n ::slotted([slot=\"content\"]) {\n display: block;\n white-space: normal;\n width: var(--sizing-width-default);\n }\n}\n\n.pds-tooltip__content {\n background-color: var(--color-background-default);\n border-radius: var(--border-radius-overlay);\n box-shadow: var(--box-shadow-default);\n color: var(--color-text-default);\n font-size: var(--font-size-overlay);\n line-height: var(--line-height-overlay);\n // TODO: need to use block / none but the tooltip content width and height are needed for calculations\n opacity: 0;\n padding: var(--spacing-padding-overlay);\n position: absolute;\n visibility: hidden;\n width: max-content;\n\n .pds-tooltip--is-open & {\n // TODO: need to use block / none but the tooltip content width and height are needed for calculations\n opacity: 1;\n visibility: visible;\n z-index: 1;\n }\n\n :host(.pds-tooltip--has-html-content) & {\n width: auto;\n }\n\n &::after {\n border-color: transparent;\n border-right-color: transparent;\n border-style: solid;\n border-width: var(--border-width-arrow-left);\n content: '';\n height: 0;\n position: absolute;\n width: 0;\n\n .pds-tooltip--right & {\n border-inline-end-color: var(--color-background-default);\n border-width: var(--border-width-arrow-left);\n left: calc(var(--sizing-arrow-default) * -1);\n top: 50%;\n transform: translateY(-50%);\n }\n\n .pds-tooltip--right-end & {\n border-inline-end-color: var(--color-background-default);\n border-width: var(--border-width-arrow-left);\n bottom: var(--sizing-arrow-offset);\n left: calc(var(--sizing-arrow-default) * -1);\n top: initial;\n }\n\n .pds-tooltip--right-start & {\n border-inline-end-color: var(--color-background-default);\n border-width: var(--border-width-arrow-left);\n left: calc(var(--sizing-arrow-default) * -1);\n top: var(--sizing-arrow-offset);\n }\n\n .pds-tooltip--top & {\n border-block-start-color: var(--color-background-default);\n border-width: var(--border-width-arrow-down);\n bottom: calc(var(--sizing-arrow-default) * -1);\n left: 50%;\n top: initial;\n transform: translateX(-50%);\n }\n\n .pds-tooltip--top-start & {\n border-block-start-color: var(--color-background-default);\n border-width: var(--border-width-arrow-down);\n bottom: calc(var(--sizing-arrow-default) * -1);\n left: var(--sizing-arrow-offset);\n top: initial;\n }\n\n .pds-tooltip--top-end & {\n border-block-start-color: var(--color-background-default);\n border-width: var(--border-width-arrow-down);\n bottom: calc(var(--sizing-arrow-default) * -1);\n left: initial;\n right: var(--sizing-arrow-offset);\n top: initial;\n }\n\n .pds-tooltip--left & {\n border-inline-start-color: var(--color-background-default);\n border-width: var(--border-width-arrow-right);\n left: initial;\n right: calc(var(--sizing-arrow-default) * -1);\n top: 50%;\n transform: translateY(-50%);\n }\n\n .pds-tooltip--left-end & {\n border-inline-start-color: var(--color-background-default);\n border-width: var(--border-width-arrow-right);\n bottom: var(--sizing-arrow-offset);\n left: initial;\n right: calc(var(--sizing-arrow-default) * -1);\n top: initial;\n }\n\n .pds-tooltip--left-start & {\n border-inline-start-color: var(--color-background-default);\n border-width: var(--border-width-arrow-right);\n left: initial;\n right: calc(var(--sizing-arrow-default) * -1);\n top: var(--sizing-arrow-offset);\n }\n\n .pds-tooltip--bottom & {\n border-block-end-color: var(--color-background-default);\n border-width: var(--border-width-arrow-up);\n left: 50%;\n top: calc(var(--sizing-arrow-default) * -1);\n transform: translateX(-50%);\n }\n\n .pds-tooltip--bottom-end & {\n border-block-end-color: var(--color-background-default);\n border-width: var(--border-width-arrow-up);\n left: initial;\n right: var(--sizing-arrow-offset);\n top: calc(var(--sizing-arrow-default) * -1);\n }\n\n .pds-tooltip--bottom-start & {\n border-block-end-color: var(--color-background-default);\n border-width: var(--border-width-arrow-up);\n left: var(--sizing-arrow-offset);\n top: calc(var(--sizing-arrow-default) * -1);\n }\n\n .pds-tooltip--no-arrow & {\n border-width: 0;\n }\n }\n}\n","import { Component, Element, Event, Host, Prop, State, h, EventEmitter, Method, Watch } from '@stencil/core';\nimport {\n positionTooltip\n} from '../../utils/overlay';\n\n/**\n * @slot (default) - The tooltip's target element\n * @slot content - HTML content for the tooltip\n */\n\n@Component({\n tag: 'pds-tooltip',\n styleUrl: 'pds-tooltip.scss',\n shadow: true,\n})\nexport class PdsTooltip {\n private contentEl: HTMLElement | null;\n\n /**\n * Reference to the Host element\n */\n @Element() el: HTMLPdsTooltipElement;\n\n /**\n * Determines when the tooltip is open\n * @defaultValue false\n */\n @State() isOpen = false;\n\n /**\n * Content for the tooltip. If HTML is required, use the content slot\n */\n @Prop() content: string;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Determines whether or not the tooltip has an arrow\n * @defaultValue true\n */\n @Prop() hasArrow? = true;\n\n /**\n * Enable this option when using the content slot\n * @defaultValue false\n */\n @Prop() htmlContent = false;\n\n /**\n * Determines the preferred position of the tooltip\n * @defaultValue \"right\"\n */\n @Prop({ reflect: true }) placement:\n 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'right';\n\n /**\n * Determines whether or not the tooltip is visible\n * @defaultValue false\n */\n @Prop({mutable: true, reflect: true}) opened = false;\n\n @Watch('opened')\n handleOpenToggle() {\n if (this.opened) {\n this.handleShow();\n } else {\n this.handleHide();\n }\n }\n\n /**\n * Emitted after a tooltip is closed\n */\n @Event() pdsTooltipHide: EventEmitter;\n\n /**\n * Emitted after a tooltip is shown\n */\n @Event() pdsTooltipShow: EventEmitter;\n\n componentWillLoad() {\n if (this.opened) {\n this.showTooltip();\n }\n\n this.el.addEventListener('blur', this.handleHide, true);\n this.el.addEventListener('focus', this.handleShow, true);\n }\n\n componentDidUpdate() {\n if (this.opened) {\n this.showTooltip();\n }\n }\n\n componentDidRender() {\n positionTooltip({elem: this.el, elemPlacement: this.placement, overlay: this.contentEl});\n }\n\n /**\n * Shows the tooltip by enabling the opened property\n */\n @Method()\n async showTooltip() {\n this.opened = true;\n }\n\n /**\n * Hides the tooltip by disabling the opened property\n */\n @Method()\n async hideTooltip() {\n this.opened = false;\n }\n\n private handleHide = () => {\n this.hideTooltip();\n this.pdsTooltipHide.emit();\n };\n\n private handleShow = () => {\n this.showTooltip();\n this.pdsTooltipShow.emit();\n };\n\n render() {\n return (\n <Host\n onMouseEnter={this.handleShow}\n onMouseLeave={this.handleHide}\n onFocusin={this.handleShow}\n onFocusout={this.handleHide}\n >\n <div\n class={`\n pds-tooltip\n pds-tooltip--${this.placement}\n ${this.htmlContent ? 'pds-tooltip--has-html-content' : ''}\n ${this.opened ? 'pds-tooltip--is-open' : ''}\n ${this.hasArrow ? '' : 'pds-tooltip--no-arrow'}\n `}\n >\n <span\n aria-describedby={this.componentId}\n class=\"pds-tooltip__trigger\"\n >\n <slot />\n </span>\n\n <div class=\"pds-tooltip__content\"\n aria-hidden={this.opened ? 'false' : 'true'}\n aria-live={this.opened ? 'polite' : 'off'}\n id={this.componentId}\n ref={(el) => (this.contentEl = el)}\n role=\"tooltip\"\n >\n <slot\n name=\"content\"\n ></slot>\n {this.content}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"app-globals-3a1e7e63.js","mappings":";;AAAY,MAAC,aAAa,GAAG,MAAM;;;;","names":[],"sources":["@stencil/core/internal/app-globals"],"sourcesContent":["export const globalScripts = () => {};\n"],"version":3}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// This helper function is similar to Element.closest(),
|
|
4
|
+
// however it also traverses shadow DOM boundaries.
|
|
5
|
+
const closest = (selector, el) => {
|
|
6
|
+
return (el &&
|
|
7
|
+
(('closest' in el && el.closest(selector)) ||
|
|
8
|
+
closest(selector, el.getRootNode().host)));
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
exports.closest = closest;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=closest-b45138d3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"closest-b45138d3.js","mappings":";;AAAA;AACA;MACa,OAAO,GAAG,CAAC,QAAgB,EAAE,EAAsB;IAC9D,QACE,EAAE;SACD,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;YACvC,OAAO,CAAC,QAAQ,EAAG,EAAE,CAAC,WAAW,EAA4B,CAAC,IAAI,CAAC,CAAC,EACvE;AACH;;;;","names":[],"sources":["src/utils/closest.ts"],"sourcesContent":["// This helper function is similar to Element.closest(),\n// however it also traverses shadow DOM boundaries.\nexport const closest = (selector: string, el: Element | Document) => {\n return (\n el &&\n (('closest' in el && el.closest(selector)) ||\n closest(selector, (el.getRootNode() as unknown as ShadowRoot).host))\n )\n}\n"],"version":3}
|