@pine-ds/core 1.3.0-dev.2 → 1.3.0-dev.3
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,75 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
import { extractArgTypes } from '@pxtrn/storybook-addon-docs-stencil';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
argTypes: extractArgTypes('pds-row'),
|
|
6
|
+
component: 'pds-row',
|
|
7
|
+
title: 'components/Layout/Row',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const BaseTemplate = (args) => html`
|
|
11
|
+
<pds-row
|
|
12
|
+
align-items="${args.alignItems}"
|
|
13
|
+
border="${args.border}"
|
|
14
|
+
component-id="${args.componentId}"
|
|
15
|
+
col-gap="${args.colGap}"
|
|
16
|
+
justify-content="${args.justifyContent}"
|
|
17
|
+
min-height="${args.minHeight}"
|
|
18
|
+
no-wrap="${args.noWrap}"
|
|
19
|
+
>
|
|
20
|
+
<pds-box border>Item 1</pds-box>
|
|
21
|
+
<pds-box border direction="column">
|
|
22
|
+
<p>Content 1</p>
|
|
23
|
+
<p>Content 2</p>
|
|
24
|
+
</pds-box>
|
|
25
|
+
</pds-row>
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
export const Default = BaseTemplate.bind();
|
|
29
|
+
Default.args = {
|
|
30
|
+
border: "true",
|
|
31
|
+
componentId: 'opt0',
|
|
32
|
+
colGap: '8px',
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const GapTemplate = (args) => html`
|
|
36
|
+
<pds-row
|
|
37
|
+
align-items="${args.alignItems}"
|
|
38
|
+
border="${args.border}"
|
|
39
|
+
component-id="${args.componentId}"
|
|
40
|
+
col-gap="${args.colGap}"
|
|
41
|
+
justify-content="${args.justifyContent}"
|
|
42
|
+
min-height="${args.minHeight}"
|
|
43
|
+
>
|
|
44
|
+
<pds-box size="4">
|
|
45
|
+
<pds-box
|
|
46
|
+
border="true"
|
|
47
|
+
border-radius="sm"
|
|
48
|
+
padding="sm"
|
|
49
|
+
shadow="sm"
|
|
50
|
+
>
|
|
51
|
+
Item 1
|
|
52
|
+
</pds-box>
|
|
53
|
+
</pds-box>
|
|
54
|
+
<pds-box size="8">
|
|
55
|
+
<pds-box
|
|
56
|
+
border="true"
|
|
57
|
+
border-radius="sm"
|
|
58
|
+
padding="sm"
|
|
59
|
+
shadow="sm"
|
|
60
|
+
>
|
|
61
|
+
Item 2
|
|
62
|
+
</pds-box>
|
|
63
|
+
</pds-box>
|
|
64
|
+
</pds-row>
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
export const Gap = GapTemplate.bind();
|
|
69
|
+
Gap.args = {
|
|
70
|
+
border: "false",
|
|
71
|
+
componentId: 'opt0',
|
|
72
|
+
colGap: 'sm',
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
:host(.pds-sortable-item) {
|
|
2
|
+
--border-radius: var(--pine-border-radius-125);
|
|
3
|
+
--border-default: var(--pine-border-width-thin) solid var(--pine-color-grey-300);
|
|
4
|
+
--box-shadow: var(--pine-box-shadow-lg);
|
|
5
|
+
--color-background-default: var(--pine-color-white);
|
|
6
|
+
--color-background-interactive: var(--pine-color-grey-200);
|
|
7
|
+
--color-interactive-handle: var(--pine-color-blue-300);
|
|
8
|
+
--spacing-margin-inline-end: var(--pine-spacing-300);
|
|
9
|
+
--spacing-padding-block-xs: var(--pine-spacing-100);
|
|
10
|
+
--spacing-padding-inline: var(--pine-spacing-300);
|
|
11
|
+
--spacing-padding-inline-start: var(--pine-spacing-300);
|
|
12
|
+
align-items: center;
|
|
13
|
+
display: flex;
|
|
14
|
+
padding-block: var(--spacing-padding-block-xs);
|
|
15
|
+
padding-inline: var(--spacing-padding-inline);
|
|
16
|
+
}
|
|
17
|
+
:host(.pds-sortable-item) .pds-sortable-item__actions {
|
|
18
|
+
margin-inline-start: auto;
|
|
19
|
+
padding-inline-start: var(--spacing-padding-inline-start);
|
|
20
|
+
}
|
|
21
|
+
:host(.pds-sortable-item) .pds-sortable-item__handle {
|
|
22
|
+
line-height: 1;
|
|
23
|
+
margin-inline-end: var(--spacing-margin-inline-end);
|
|
24
|
+
}
|
|
25
|
+
.pds-sortable--bordered :host(.pds-sortable-item):first-child {
|
|
26
|
+
border-start-end-radius: var(--border-radius);
|
|
27
|
+
border-start-start-radius: var(--border-radius);
|
|
28
|
+
}
|
|
29
|
+
.pds-sortable--bordered :host(.pds-sortable-item):last-child {
|
|
30
|
+
border-end-end-radius: var(--border-radius);
|
|
31
|
+
border-end-start-radius: var(--border-radius);
|
|
32
|
+
}
|
|
33
|
+
.pds-sortable--divided :host(.pds-sortable-item) {
|
|
34
|
+
border-block-end: var(--border-default);
|
|
35
|
+
}
|
|
36
|
+
.pds-sortable--divided :host(.pds-sortable-item):last-child {
|
|
37
|
+
border-block-end: 0;
|
|
38
|
+
}
|
|
39
|
+
.pds-sortable--handle-type-row :host(.pds-sortable-item) {
|
|
40
|
+
cursor: grab;
|
|
41
|
+
}
|
|
42
|
+
.pds-sortable--handle-type-handle :host(.pds-sortable-item) .pds-sortable-item__handle {
|
|
43
|
+
cursor: grab;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host(.pds-sortable-item):hover {
|
|
47
|
+
background-color: var(--color-background-interactive);
|
|
48
|
+
}
|
|
49
|
+
:host(.pds-sortable-item):hover pds-icon {
|
|
50
|
+
color: var(--color-interactive-handle);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:host(.pds-sortable-item--drag) {
|
|
54
|
+
background-color: var(--color-background-default);
|
|
55
|
+
border-radius: 0;
|
|
56
|
+
box-shadow: var(--box-shadow);
|
|
57
|
+
opacity: 1;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host(.pds-sortable-item--ghost) {
|
|
61
|
+
background-color: var(--color-background-interactive);
|
|
62
|
+
border-radius: 0;
|
|
63
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { handle as handleIcon } from "@pine-ds/icons/icons";
|
|
3
|
+
/**
|
|
4
|
+
* @slot sortable-item-actions - Content is placed within the `pds-sortable-item__actions` element as children. This slot is only rendered if `actions` is set to `true`.
|
|
5
|
+
*/
|
|
6
|
+
export class PdsSortableItem {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.enableActions = false;
|
|
9
|
+
this.componentId = undefined;
|
|
10
|
+
this.showHandle = false;
|
|
11
|
+
}
|
|
12
|
+
componentWillRender() {
|
|
13
|
+
// When the parent sortable has a type of 'handle', the sortable items
|
|
14
|
+
// will automatically set showHandle to 'true'.
|
|
15
|
+
this.sortableRef = this.el.closest('pds-sortable');
|
|
16
|
+
if (this.sortableRef && this.sortableRef.handleType === 'handle') {
|
|
17
|
+
this.showHandle = true;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return (h(Host, { key: '60214e183314736338f9b38cb93a9c5989e16cdf', class: "pds-sortable-item", id: this.componentId }, this.showHandle && (h("div", { key: '7cc252c99598f384a87518c101d0772a4ce344e4', class: "pds-sortable-item__handle" }, h("pds-icon", { key: 'e2b219927cf717fa53112066ba3fe0ac12688edd', icon: handleIcon }))), h("slot", { key: 'e259bfbf7e8c848567d07639e62adfe5781f29b8' }), this.enableActions && (h("div", { key: 'e83d28d55b6fee971575433a3e3f8b1d5b7e52fe', class: "pds-sortable-item__actions" }, h("slot", { key: '7ac52a8109e49cfff96cead45a3b318646c7f064', name: "sortable-item-actions" })))));
|
|
22
|
+
}
|
|
23
|
+
static get is() { return "pds-sortable-item"; }
|
|
24
|
+
static get encapsulation() { return "scoped"; }
|
|
25
|
+
static get originalStyleUrls() {
|
|
26
|
+
return {
|
|
27
|
+
"$": ["pds-sortable-item.scss"]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
static get styleUrls() {
|
|
31
|
+
return {
|
|
32
|
+
"$": ["pds-sortable-item.css"]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static get properties() {
|
|
36
|
+
return {
|
|
37
|
+
"enableActions": {
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"mutable": false,
|
|
40
|
+
"complexType": {
|
|
41
|
+
"original": "boolean",
|
|
42
|
+
"resolved": "boolean",
|
|
43
|
+
"references": {}
|
|
44
|
+
},
|
|
45
|
+
"required": false,
|
|
46
|
+
"optional": false,
|
|
47
|
+
"docs": {
|
|
48
|
+
"tags": [{
|
|
49
|
+
"name": "defaultValue",
|
|
50
|
+
"text": "false"
|
|
51
|
+
}],
|
|
52
|
+
"text": "Determines whether `sortable-item-actions` slot should be enabled."
|
|
53
|
+
},
|
|
54
|
+
"attribute": "enable-actions",
|
|
55
|
+
"reflect": false,
|
|
56
|
+
"defaultValue": "false"
|
|
57
|
+
},
|
|
58
|
+
"componentId": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"mutable": false,
|
|
61
|
+
"complexType": {
|
|
62
|
+
"original": "string",
|
|
63
|
+
"resolved": "string",
|
|
64
|
+
"references": {}
|
|
65
|
+
},
|
|
66
|
+
"required": false,
|
|
67
|
+
"optional": false,
|
|
68
|
+
"docs": {
|
|
69
|
+
"tags": [],
|
|
70
|
+
"text": "A unique identifier used for the sortable item `id` attribute."
|
|
71
|
+
},
|
|
72
|
+
"attribute": "component-id",
|
|
73
|
+
"reflect": false
|
|
74
|
+
},
|
|
75
|
+
"showHandle": {
|
|
76
|
+
"type": "boolean",
|
|
77
|
+
"mutable": true,
|
|
78
|
+
"complexType": {
|
|
79
|
+
"original": "boolean",
|
|
80
|
+
"resolved": "boolean",
|
|
81
|
+
"references": {}
|
|
82
|
+
},
|
|
83
|
+
"required": false,
|
|
84
|
+
"optional": false,
|
|
85
|
+
"docs": {
|
|
86
|
+
"tags": [{
|
|
87
|
+
"name": "defaultValue",
|
|
88
|
+
"text": "false"
|
|
89
|
+
}],
|
|
90
|
+
"text": "Determines whether `sortable-item` should have a handle."
|
|
91
|
+
},
|
|
92
|
+
"attribute": "show-handle",
|
|
93
|
+
"reflect": false,
|
|
94
|
+
"defaultValue": "false"
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
static get elementRef() { return "el"; }
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=pds-sortable-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pds-sortable-item.js","sourceRoot":"","sources":["../../../../src/components/pds-sortable/pds-sortable-item/pds-sortable-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAElE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC5D;;GAEG;AAMH,MAAM,OAAO,eAAe;;6BAOF,KAAK;;0BAWS,KAAK;;IAE3C,mBAAmB;QACjB,sEAAsE;QACtE,+CAA+C;QAC/C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,cAAc,CAA2B,CAAC;QAE7E,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;YACjE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACzB,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAC,mBAAmB,EAAC,EAAE,EAAE,IAAI,CAAC,WAAW;YACjD,IAAI,CAAC,UAAU,IAAI,CAClB,4DAAK,KAAK,EAAC,2BAA2B;gBACpC,iEAAU,IAAI,EAAE,UAAU,GAAa,CACnC,CACP;YACD,8DAAa;YACZ,IAAI,CAAC,aAAa,IAAI,CACrB,4DAAK,KAAK,EAAC,4BAA4B;gBACrC,6DAAM,IAAI,EAAC,uBAAuB,GAAG,CACjC,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, h, Prop } from '@stencil/core';\n\nimport { handle as handleIcon } from '@pine-ds/icons/icons';\n/**\n * @slot sortable-item-actions - Content is placed within the `pds-sortable-item__actions` element as children. This slot is only rendered if `actions` is set to `true`.\n */\n@Component({\n tag: 'pds-sortable-item',\n styleUrl: 'pds-sortable-item.scss',\n scoped: true,\n})\nexport class PdsSortableItem {\n @Element() el: HTMLPdsSortableItemElement;\n sortableRef: HTMLPdsSortableElement;\n /**\n * Determines whether `sortable-item-actions` slot should be enabled.\n * @defaultValue false\n */\n @Prop() enableActions = false;\n\n /**\n * A unique identifier used for the sortable item `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Determines whether `sortable-item` should have a handle.\n * @defaultValue false\n */\n @Prop({ mutable: true }) showHandle = false;\n\n componentWillRender() {\n // When the parent sortable has a type of 'handle', the sortable items\n // will automatically set showHandle to 'true'.\n this.sortableRef = this.el.closest('pds-sortable') as HTMLPdsSortableElement;\n\n if (this.sortableRef && this.sortableRef.handleType === 'handle') {\n this.showHandle = true;\n }\n }\n\n render() {\n return (\n <Host class=\"pds-sortable-item\" id={this.componentId}>\n {this.showHandle && (\n <div class=\"pds-sortable-item__handle\">\n <pds-icon icon={handleIcon}></pds-icon>\n </div>\n )}\n <slot></slot>\n {this.enableActions && (\n <div class=\"pds-sortable-item__actions\">\n <slot name=\"sortable-item-actions\" />\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
import { extractArgTypes } from '@pxtrn/storybook-addon-docs-stencil';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
argTypes: extractArgTypes('pds-sortable-item'),
|
|
6
|
+
component: 'pds-sortable-item',
|
|
7
|
+
title: 'components/Sortable/Sortable Item',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const BaseTemplate = (args) => html`
|
|
11
|
+
<pds-sortable-item
|
|
12
|
+
action="${args.enableActions}"
|
|
13
|
+
component-id="${args.componentId}"
|
|
14
|
+
show-handle="${args.showHandle}"
|
|
15
|
+
>
|
|
16
|
+
Item
|
|
17
|
+
</pds-sortable-item>`;
|
|
18
|
+
|
|
19
|
+
export const Default = BaseTemplate.bind();
|
|
20
|
+
Default.args = {
|
|
21
|
+
componentId: 'default',
|
|
22
|
+
enableActions: false,
|
|
23
|
+
showHandle: false,
|
|
24
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
:host(.pds-sortable) {
|
|
2
|
+
--border-radius: var(--pine-border-radius-050);
|
|
3
|
+
--border-default: var(--pine-border-width-thin) solid var(--pine-color-grey-300);
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
}
|
|
7
|
+
:host(.pds-sortable).pds-sortable--bordered {
|
|
8
|
+
border: var(--border-default);
|
|
9
|
+
border-radius: var(--border-radius);
|
|
10
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import Sortable from "sortablejs";
|
|
3
|
+
export class PdsSortable {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.border = false;
|
|
6
|
+
this.componentId = undefined;
|
|
7
|
+
this.dividers = false;
|
|
8
|
+
this.handleType = 'row';
|
|
9
|
+
}
|
|
10
|
+
classNames() {
|
|
11
|
+
const classNames = ['pds-sortable'];
|
|
12
|
+
if (this.border) {
|
|
13
|
+
classNames.push('pds-sortable--bordered');
|
|
14
|
+
}
|
|
15
|
+
if (this.dividers) {
|
|
16
|
+
classNames.push('pds-sortable--divided');
|
|
17
|
+
}
|
|
18
|
+
if (this.handleType !== undefined) {
|
|
19
|
+
classNames.push(`pds-sortable--handle-type-${this.handleType}`);
|
|
20
|
+
}
|
|
21
|
+
return classNames.join(' ');
|
|
22
|
+
}
|
|
23
|
+
componentDidLoad() {
|
|
24
|
+
let sortableOptions = {
|
|
25
|
+
animation: 150,
|
|
26
|
+
ghostClass: 'pds-sortable-item--ghost',
|
|
27
|
+
dragClass: 'pds-sortable-item--drag',
|
|
28
|
+
onEnd: (evt) => {
|
|
29
|
+
this.pdsSortableItemMoved.emit(evt);
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
if (this.handleType === 'handle') {
|
|
33
|
+
sortableOptions = Object.assign(Object.assign({}, sortableOptions), { handle: '.pds-sortable-item__handle' });
|
|
34
|
+
}
|
|
35
|
+
Sortable.create(this.el, sortableOptions);
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return (h(Host, { key: '030286aa0de920f4b5ce4470f3d1b5ab14be2792', class: this.classNames(), id: this.componentId }, h("slot", { key: 'c38822d7c82273c2fbc28d09c919e4c179ebb49d' })));
|
|
39
|
+
}
|
|
40
|
+
static get is() { return "pds-sortable"; }
|
|
41
|
+
static get encapsulation() { return "scoped"; }
|
|
42
|
+
static get originalStyleUrls() {
|
|
43
|
+
return {
|
|
44
|
+
"$": ["pds-sortable.scss"]
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
static get styleUrls() {
|
|
48
|
+
return {
|
|
49
|
+
"$": ["pds-sortable.css"]
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
static get properties() {
|
|
53
|
+
return {
|
|
54
|
+
"border": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"mutable": false,
|
|
57
|
+
"complexType": {
|
|
58
|
+
"original": "boolean",
|
|
59
|
+
"resolved": "boolean",
|
|
60
|
+
"references": {}
|
|
61
|
+
},
|
|
62
|
+
"required": false,
|
|
63
|
+
"optional": false,
|
|
64
|
+
"docs": {
|
|
65
|
+
"tags": [{
|
|
66
|
+
"name": "defaultValue",
|
|
67
|
+
"text": "false"
|
|
68
|
+
}],
|
|
69
|
+
"text": "Determines whether `sortable` should have a border."
|
|
70
|
+
},
|
|
71
|
+
"attribute": "border",
|
|
72
|
+
"reflect": true,
|
|
73
|
+
"defaultValue": "false"
|
|
74
|
+
},
|
|
75
|
+
"componentId": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"mutable": false,
|
|
78
|
+
"complexType": {
|
|
79
|
+
"original": "string",
|
|
80
|
+
"resolved": "string",
|
|
81
|
+
"references": {}
|
|
82
|
+
},
|
|
83
|
+
"required": true,
|
|
84
|
+
"optional": false,
|
|
85
|
+
"docs": {
|
|
86
|
+
"tags": [],
|
|
87
|
+
"text": "A unique identifier used for the sortable container `id` attribute."
|
|
88
|
+
},
|
|
89
|
+
"attribute": "component-id",
|
|
90
|
+
"reflect": false
|
|
91
|
+
},
|
|
92
|
+
"dividers": {
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"mutable": false,
|
|
95
|
+
"complexType": {
|
|
96
|
+
"original": "boolean",
|
|
97
|
+
"resolved": "boolean",
|
|
98
|
+
"references": {}
|
|
99
|
+
},
|
|
100
|
+
"required": false,
|
|
101
|
+
"optional": false,
|
|
102
|
+
"docs": {
|
|
103
|
+
"tags": [],
|
|
104
|
+
"text": "Deternines whether `sortable` items should be divided with border."
|
|
105
|
+
},
|
|
106
|
+
"attribute": "dividers",
|
|
107
|
+
"reflect": true,
|
|
108
|
+
"defaultValue": "false"
|
|
109
|
+
},
|
|
110
|
+
"handleType": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"mutable": false,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "'handle' | 'row'",
|
|
115
|
+
"resolved": "\"handle\" | \"row\"",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": false,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": "Determines the grabbable area for the `pds-sortable-item`."
|
|
123
|
+
},
|
|
124
|
+
"attribute": "handle-type",
|
|
125
|
+
"reflect": false,
|
|
126
|
+
"defaultValue": "'row'"
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
static get events() {
|
|
131
|
+
return [{
|
|
132
|
+
"method": "pdsSortableItemMoved",
|
|
133
|
+
"name": "pdsSortableItemMoved",
|
|
134
|
+
"bubbles": true,
|
|
135
|
+
"cancelable": true,
|
|
136
|
+
"composed": true,
|
|
137
|
+
"docs": {
|
|
138
|
+
"tags": [],
|
|
139
|
+
"text": "Event emitted when a sortable item is moved."
|
|
140
|
+
},
|
|
141
|
+
"complexType": {
|
|
142
|
+
"original": "any",
|
|
143
|
+
"resolved": "any",
|
|
144
|
+
"references": {}
|
|
145
|
+
}
|
|
146
|
+
}];
|
|
147
|
+
}
|
|
148
|
+
static get elementRef() { return "el"; }
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=pds-sortable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pds-sortable.js","sourceRoot":"","sources":["../../../src/components/pds-sortable/pds-sortable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEvF,OAAO,QAAQ,MAAM,YAAY,CAAC;AAOlC,MAAM,OAAO,WAAW;;sBAYY,KAAK;;wBAUH,KAAK;0BAKF,KAAK;;IAEpC,UAAU;QAChB,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC,CAAC;QAEpC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,UAAU,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAC5C,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,UAAU,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YAClC,UAAU,CAAC,IAAI,CAAC,6BAA6B,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAClE,CAAC;QAED,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,gBAAgB;QAEd,IAAI,eAAe,GAAiB;YAClC,SAAS,EAAE,GAAG;YACd,UAAU,EAAE,0BAA0B;YACtC,SAAS,EAAE,yBAAyB;YACpC,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE;gBACb,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACtC,CAAC;SACF,CAAC;QAEF,IAAI,IAAI,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;YACjC,eAAe,mCACV,eAAe,KAClB,MAAM,EAAE,4BAA4B,GACrC,CAAC;QACJ,CAAC;QAED,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,eAAe,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW;YAClD,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop } from '@stencil/core';\nimport { SortableType } from './sortable-interface';\nimport Sortable from 'sortablejs';\n\n@Component({\n tag: 'pds-sortable',\n styleUrl: 'pds-sortable.scss',\n scoped: true,\n})\nexport class PdsSortable {\n @Element() el: HTMLPdsSortableElement;\n\n /**\n * Event emitted when a sortable item is moved.\n */\n @Event() pdsSortableItemMoved: EventEmitter;\n\n /**\n * Determines whether `sortable` should have a border.\n * @defaultValue false\n */\n @Prop({ reflect: true }) border = false;\n\n /**\n * A unique identifier used for the sortable container `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Deternines whether `sortable` items should be divided with border.\n */\n @Prop({ reflect: true }) dividers = false;\n\n /**\n * Determines the grabbable area for the `pds-sortable-item`.\n */\n @Prop() handleType: 'handle' | 'row' = 'row';\n\n private classNames() {\n const classNames = ['pds-sortable'];\n\n if (this.border) {\n classNames.push('pds-sortable--bordered');\n }\n\n if (this.dividers) {\n classNames.push('pds-sortable--divided');\n }\n\n if (this.handleType !== undefined) {\n classNames.push(`pds-sortable--handle-type-${this.handleType}`);\n }\n\n return classNames.join(' ');\n }\n\n componentDidLoad() {\n\n let sortableOptions: SortableType = {\n animation: 150,\n ghostClass: 'pds-sortable-item--ghost',\n dragClass: 'pds-sortable-item--drag',\n onEnd: (evt) => {\n this.pdsSortableItemMoved.emit(evt);\n },\n };\n\n if (this.handleType === 'handle') {\n sortableOptions = {\n ...sortableOptions,\n handle: '.pds-sortable-item__handle',\n };\n }\n\n Sortable.create(this.el, sortableOptions);\n }\n\n render() {\n return (\n <Host class={this.classNames()} id={this.componentId}>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortable-interface.js","sourceRoot":"","sources":["../../../src/components/pds-sortable/sortable-interface.ts"],"names":[],"mappings":"","sourcesContent":["export interface SortableType {\n animation: number;\n ghostClass: string;\n dragClass: string;\n onEnd: (evt: Event) => void;\n handle?: string;\n}"]}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
import { extractArgTypes } from '@pxtrn/storybook-addon-docs-stencil';
|
|
3
|
+
import { withActions } from '@storybook/addon-actions/decorator';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
argTypes: extractArgTypes('pds-sortable'),
|
|
7
|
+
component: 'pds-sortable',
|
|
8
|
+
decorators: [withActions],
|
|
9
|
+
parameters: {
|
|
10
|
+
actions: {
|
|
11
|
+
handles: ['onchange', 'pdsSortableItemMoved'],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
title: 'components/Sortable',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const BaseTemplate = (args) => html`
|
|
18
|
+
<pds-sortable border="${args.border}" component-id="${args.componentId}" dividers="${args.dividers}" handle-type="${args.handleType}">
|
|
19
|
+
<pds-sortable-item>Item 1</pds-sortable-item>
|
|
20
|
+
<pds-sortable-item>Item 2</pds-sortable-item>
|
|
21
|
+
<pds-sortable-item>Item 3</pds-sortable-item>
|
|
22
|
+
</pds-sortable>`;
|
|
23
|
+
|
|
24
|
+
const HandleTemplate = (args) => html`
|
|
25
|
+
<pds-sortable border="${args.border}" component-id="${args.componentId}" dividers="${args.dividers}" handle-type="${args.handleType}">
|
|
26
|
+
<pds-sortable-item>Item 1</pds-sortable-item>
|
|
27
|
+
<pds-sortable-item>Item 2</pds-sortable-item>
|
|
28
|
+
<pds-sortable-item>Item 3</pds-sortable-item>
|
|
29
|
+
</pds-sortable>`;
|
|
30
|
+
|
|
31
|
+
const ActionsTemplate = (args) => html`
|
|
32
|
+
<pds-sortable border="${args.border}" component-id="${args.componentId}" dividers="${args.dividers}" handle-type="${args.handleType}">
|
|
33
|
+
<pds-sortable-item enable-actions>
|
|
34
|
+
<div>Item 1</div>
|
|
35
|
+
<div slot="sortable-item-actions">
|
|
36
|
+
<pds-link href="#" variant="plain">action</pds-link>
|
|
37
|
+
</div>
|
|
38
|
+
</pds-sortable-item>
|
|
39
|
+
<pds-sortable-item enable-actions>
|
|
40
|
+
<div>Item 2</div>
|
|
41
|
+
<div slot="sortable-item-actions">
|
|
42
|
+
<pds-link href="#" variant="plain">action</pds-link>
|
|
43
|
+
</div>
|
|
44
|
+
</pds-sortable-item>
|
|
45
|
+
<pds-sortable-item enable-actions>
|
|
46
|
+
<div>Item 3</div>
|
|
47
|
+
<div slot="sortable-item-actions">
|
|
48
|
+
<pds-link href="#" variant="plain">action</pds-link>
|
|
49
|
+
</div>
|
|
50
|
+
</pds-sortable-item>
|
|
51
|
+
</pds-sortable>`;
|
|
52
|
+
|
|
53
|
+
const FullDemoTemplate = (args) => html`
|
|
54
|
+
<pds-sortable border="${args.border}" component-id="${args.componentId}" dividers="${args.dividers}" handle-type="${args.handleType}">
|
|
55
|
+
<pds-sortable-item enable-actions>
|
|
56
|
+
<div>
|
|
57
|
+
<div><strong>Item 1</strong></div>
|
|
58
|
+
<div>Item 1 description copy text</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div slot="sortable-item-actions">
|
|
61
|
+
<pds-link href="#" variant="plain">action</pds-link>
|
|
62
|
+
</div>
|
|
63
|
+
</pds-sortable-item>
|
|
64
|
+
<pds-sortable-item enable-actions>
|
|
65
|
+
<div>
|
|
66
|
+
<div><strong>Item 2</strong></div>
|
|
67
|
+
<div>Item 2 description copy text</div>
|
|
68
|
+
</div>
|
|
69
|
+
<div slot="sortable-item-actions">
|
|
70
|
+
<pds-link href="#" variant="plain">action</pds-link>
|
|
71
|
+
</div>
|
|
72
|
+
</pds-sortable-item>
|
|
73
|
+
<pds-sortable-item enable-actions>
|
|
74
|
+
<div>
|
|
75
|
+
<div><strong>Item 3</strong></div>
|
|
76
|
+
<div>Item 3 description copy text</div>
|
|
77
|
+
</div>
|
|
78
|
+
<div slot="sortable-item-actions">
|
|
79
|
+
<pds-link href="#" variant="plain">action</pds-link>
|
|
80
|
+
</div>
|
|
81
|
+
</pds-sortable-item>
|
|
82
|
+
</pds-sortable>`;
|
|
83
|
+
|
|
84
|
+
export const Default = BaseTemplate.bind();
|
|
85
|
+
Default.args = {
|
|
86
|
+
componentId: 'default',
|
|
87
|
+
border: false,
|
|
88
|
+
dividers: false,
|
|
89
|
+
handleType: 'row',
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const Bordered = BaseTemplate.bind();
|
|
93
|
+
Bordered.args = {
|
|
94
|
+
componentId: 'bordered',
|
|
95
|
+
border: true,
|
|
96
|
+
dividers: false,
|
|
97
|
+
handleType: 'row',
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const Dividers = BaseTemplate.bind();
|
|
101
|
+
Dividers.args = {
|
|
102
|
+
componentId: 'dividers',
|
|
103
|
+
border: false,
|
|
104
|
+
dividers: true,
|
|
105
|
+
handleType: 'row',
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export const Handle = HandleTemplate.bind();
|
|
109
|
+
Handle.args = {
|
|
110
|
+
componentId: 'handle',
|
|
111
|
+
border: false,
|
|
112
|
+
dividers: false,
|
|
113
|
+
handleType: 'handle',
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export const Actions = ActionsTemplate.bind();
|
|
117
|
+
Actions.args = {
|
|
118
|
+
componentId: 'actions',
|
|
119
|
+
border: false,
|
|
120
|
+
dividers: false,
|
|
121
|
+
handleType: 'row',
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export const FullDemo = FullDemoTemplate.bind();
|
|
125
|
+
FullDemo.args = {
|
|
126
|
+
componentId: 'demo',
|
|
127
|
+
border: true,
|
|
128
|
+
dividers: true,
|
|
129
|
+
handleType: 'row',
|
|
130
|
+
};
|