@scania/tegel 0.0.1-beta.9 → 0.0.2
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/dist/cjs/index-b98965c7.js +1919 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/popper-11d5f714.js +1801 -0
- package/dist/cjs/sdds-accordion-item.cjs.entry.js +34 -0
- package/dist/cjs/sdds-accordion.cjs.entry.js +21 -0
- package/dist/cjs/sdds-badges.cjs.entry.js +54 -0
- package/dist/cjs/sdds-banner.cjs.entry.js +79 -0
- package/dist/cjs/sdds-block.cjs.entry.js +32 -0
- package/dist/cjs/sdds-body-cell_2.cjs.entry.js +173 -0
- package/dist/cjs/sdds-breadcrumb-item.cjs.entry.js +25 -0
- package/dist/cjs/sdds-breadcrumb.cjs.entry.js +23 -0
- package/dist/cjs/sdds-button.cjs.entry.js +37 -0
- package/dist/cjs/sdds-card.cjs.entry.js +56 -0
- package/dist/cjs/sdds-checkbox.cjs.entry.js +55 -0
- package/dist/cjs/sdds-datetime.cjs.entry.js +95 -0
- package/dist/cjs/sdds-dropdown-filter.cjs.entry.js +92 -0
- package/dist/cjs/sdds-dropdown_2.cjs.entry.js +341 -0
- package/dist/cjs/sdds-header-cell.cjs.entry.js +139 -0
- package/dist/cjs/sdds-icon.cjs.entry.js +42 -0
- package/dist/cjs/sdds-inline-tab.cjs.entry.js +22 -0
- package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js +98 -0
- package/dist/cjs/sdds-inline-tabs.cjs.entry.js +221 -0
- package/dist/cjs/sdds-link.cjs.entry.js +28 -0
- package/dist/cjs/sdds-message.cjs.entry.js +41 -0
- package/dist/cjs/sdds-modal.cjs.entry.js +51 -0
- package/dist/cjs/sdds-navigation-tabs.cjs.entry.js +98 -0
- package/dist/cjs/sdds-popover-canvas.cjs.entry.js +84 -0
- package/dist/cjs/sdds-popover-menu.cjs.entry.js +85 -0
- package/dist/cjs/sdds-radio-button.cjs.entry.js +32 -0
- package/dist/cjs/sdds-slider.cjs.entry.js +357 -0
- package/dist/cjs/sdds-spinner.cjs.entry.js +21 -0
- package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js +82 -0
- package/dist/cjs/sdds-table-body.cjs.entry.js +289 -0
- package/dist/cjs/sdds-table-footer.cjs.entry.js +164 -0
- package/dist/cjs/sdds-table-header.cjs.entry.js +99 -0
- package/dist/cjs/sdds-table-toolbar.cjs.entry.js +65 -0
- package/dist/cjs/sdds-table.cjs.entry.js +68 -0
- package/dist/cjs/sdds-textarea.cjs.entry.js +74 -0
- package/dist/cjs/sdds-textfield.cjs.entry.js +91 -0
- package/dist/cjs/sdds-toast.cjs.entry.js +86 -0
- package/dist/cjs/sdds-toggle.cjs.entry.js +44 -0
- package/dist/cjs/sdds-tooltip.cjs.entry.js +104 -0
- package/dist/cjs/tegel.cjs.js +19 -0
- package/dist/collection/collection-manifest.json +52 -0
- package/dist/collection/components/accordion/accordion-item/accordion-item.css +153 -0
- package/dist/collection/components/accordion/accordion-item/accordion-item.js +146 -0
- package/dist/collection/components/accordion/accordion.css +63 -0
- package/dist/collection/components/accordion/accordion.js +62 -0
- package/dist/collection/components/accordion/accordion.stories.js +90 -0
- package/dist/collection/components/badge/badge.stories.js +102 -0
- package/dist/collection/components/badge/badges.css +42 -0
- package/dist/collection/components/badge/badges.js +147 -0
- package/dist/collection/components/banner/banner.stories.js +92 -0
- package/dist/collection/components/banner/sdds-banner.css +88 -0
- package/dist/collection/components/banner/sdds-banner.js +330 -0
- package/dist/collection/components/banner/sdds-banner.stories.js +129 -0
- package/dist/collection/components/block/block-native.stories.js +48 -0
- package/dist/collection/components/block/sdds-block.css +22 -0
- package/dist/collection/components/block/sdds-block.js +55 -0
- package/dist/collection/components/block/sdds-block.stories.js +48 -0
- package/dist/collection/components/breadcrumb/breadcrumb-component.css +30 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.css +43 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +83 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js +22 -0
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js +26 -0
- package/dist/collection/components/button/button-component.js +155 -0
- package/dist/collection/components/button/button-native.stories.js +187 -0
- package/dist/collection/components/button/button-webcomponent.stories.js +189 -0
- package/dist/collection/components/button/button.css +670 -0
- package/dist/collection/components/card/card.stories.js +167 -0
- package/dist/collection/components/card/sdds-card.css +78 -0
- package/dist/collection/components/card/sdds-card.js +276 -0
- package/dist/collection/components/card/sdds-card.stories.js +168 -0
- package/dist/collection/components/checkbox/checkbox.stories.js +54 -0
- package/dist/collection/components/checkbox/sdds-checkbox.css +95 -0
- package/dist/collection/components/checkbox/sdds-checkbox.js +239 -0
- package/dist/collection/components/checkbox/sdds-checkbox.stories.js +71 -0
- package/dist/collection/components/chips/chips.stories.js +106 -0
- package/dist/collection/components/data-table/native-table.stories.js +160 -0
- package/dist/collection/components/data-table/table/table.css +15 -0
- package/dist/collection/components/data-table/table/table.js +252 -0
- package/dist/collection/components/data-table/table-body/table-body.css +22 -0
- package/dist/collection/components/data-table/table-body/table-body.js +425 -0
- package/dist/collection/components/data-table/table-body-cell/table-body-cell.css +40 -0
- package/dist/collection/components/data-table/table-body-cell/table-body-cell.js +168 -0
- package/dist/collection/components/data-table/table-body-row/table-body-row.css +175 -0
- package/dist/collection/components/data-table/table-body-row/table-body-row.js +165 -0
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.css +78 -0
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.js +156 -0
- package/dist/collection/components/data-table/table-component-basic.stories.js +161 -0
- package/dist/collection/components/data-table/table-component-batch-actions.stories.js +128 -0
- package/dist/collection/components/data-table/table-component-bodydata.stories.js +58 -0
- package/dist/collection/components/data-table/table-component-custom-width.stories.js +197 -0
- package/dist/collection/components/data-table/table-component-event-listeners.stories.js +151 -0
- package/dist/collection/components/data-table/table-component-expandable-rows.stories.js +135 -0
- package/dist/collection/components/data-table/table-component-filtering.stories.js +137 -0
- package/dist/collection/components/data-table/table-component-multiselect.stories.js +158 -0
- package/dist/collection/components/data-table/table-component-pagination.stories.js +127 -0
- package/dist/collection/components/data-table/table-component-sorting.stories.js +126 -0
- package/dist/collection/components/data-table/table-footer/table-footer.css +97 -0
- package/dist/collection/components/data-table/table-footer/table-footer.js +354 -0
- package/dist/collection/components/data-table/table-header/table-header.css +190 -0
- package/dist/collection/components/data-table/table-header/table-header.js +152 -0
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.css +127 -0
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.js +317 -0
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.css +93 -0
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.js +141 -0
- package/dist/collection/components/datetime/datetime.css +385 -0
- package/dist/collection/components/datetime/datetime.js +352 -0
- package/dist/collection/components/datetime/datetime.stories.js +207 -0
- package/dist/collection/components/divider/divider.stories.js +133 -0
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +339 -0
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js +130 -0
- package/dist/collection/components/dropdown/dropdown-native.stories.js +90 -0
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +185 -0
- package/dist/collection/components/dropdown/dropdown-wc-default.stories.js +167 -0
- package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js +146 -0
- package/dist/collection/components/dropdown/dropdown.css +951 -0
- package/dist/collection/components/dropdown/dropdown.js +577 -0
- package/dist/collection/components/footer/footer.stories.js +117 -0
- package/dist/collection/components/header/header-all.stories.js +217 -0
- package/dist/collection/components/header/header-default.stories.js +47 -0
- package/dist/collection/components/header/header-inline.stories.js +113 -0
- package/dist/collection/components/header/header-search.stories.js +263 -0
- package/dist/collection/components/header/header-toolbar.stories.js +204 -0
- package/dist/collection/components/icon/icon-font.stories.js +57 -0
- package/dist/collection/components/icon/icon-web-component.stories.js +51 -0
- package/dist/collection/components/icon/icon.css +16 -0
- package/dist/collection/components/icon/icon.js +89 -0
- package/dist/collection/components/icon/iconsArray.js +2 -0
- package/dist/collection/components/link/link.stories.js +45 -0
- package/dist/collection/components/link/sdds-link.css +36 -0
- package/dist/collection/components/link/sdds-link.js +121 -0
- package/dist/collection/components/link/sdds-link.stories.js +70 -0
- package/dist/collection/components/message/message.stories.js +108 -0
- package/dist/collection/components/message/sdds-message.css +70 -0
- package/dist/collection/components/message/sdds-message.js +135 -0
- package/dist/collection/components/message/sdds-message.stories.js +106 -0
- package/dist/collection/components/modal/modal-native.stories.js +129 -0
- package/dist/collection/components/modal/modal-webcomponent.stories.js +86 -0
- package/dist/collection/components/modal/modal.css +350 -0
- package/dist/collection/components/modal/modal.js +148 -0
- package/dist/collection/components/popover-canvas/popover-canvas.css +20 -0
- package/dist/collection/components/popover-canvas/popover-canvas.js +219 -0
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js +89 -0
- package/dist/collection/components/popover-menu/popover-menu-icons.stories.js +121 -0
- package/dist/collection/components/popover-menu/popover-menu.css +19 -0
- package/dist/collection/components/popover-menu/popover-menu.js +220 -0
- package/dist/collection/components/popover-menu/popover-menu.stories.js +114 -0
- package/dist/collection/components/radio-button/radio-button-component.css +123 -0
- package/dist/collection/components/radio-button/radio-button-component.stories.js +91 -0
- package/dist/collection/components/radio-button/radio-button.js +160 -0
- package/dist/collection/components/radio-button/radio-button.stories.js +68 -0
- package/dist/collection/components/side-menu/side-menu.stories.js +182 -0
- package/dist/collection/components/slider/slider.css +297 -0
- package/dist/collection/components/slider/slider.js +721 -0
- package/dist/collection/components/slider/slider.stories.js +208 -0
- package/dist/collection/components/spinner/spinner.css +79 -0
- package/dist/collection/components/spinner/spinner.js +61 -0
- package/dist/collection/components/spinner/spinner.stories.js +59 -0
- package/dist/collection/components/stepper/stepper.stories.js +139 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tab/inline-tab.css +3 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tab/inline-tab.js +80 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.css +156 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.js +312 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.stories.js +71 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.css +141 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.js +128 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js +46 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +157 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +128 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +32 -0
- package/dist/collection/components/textarea/textarea.css +298 -0
- package/dist/collection/components/textarea/textarea.js +402 -0
- package/dist/collection/components/textarea/textarea.stories.js +169 -0
- package/dist/collection/components/textfield/textfield.css +502 -0
- package/dist/collection/components/textfield/textfield.js +439 -0
- package/dist/collection/components/textfield/textfield.stories.js +239 -0
- package/dist/collection/components/toast/sdds-toast.css +102 -0
- package/dist/collection/components/toast/sdds-toast.js +256 -0
- package/dist/collection/components/toast/sdds-toast.stories.js +86 -0
- package/dist/collection/components/toast/toast.stories.js +129 -0
- package/dist/collection/components/toggle/sdds-toggle.css +104 -0
- package/dist/collection/components/toggle/sdds-toggle.js +261 -0
- package/dist/collection/components/toggle/sdds-toggle.stories.js +92 -0
- package/dist/collection/components/toggle/toggle.stories.js +72 -0
- package/dist/collection/components/tooltip/tooltip.css +46 -0
- package/dist/collection/components/tooltip/tooltip.js +229 -0
- package/dist/collection/components/tooltip/tooltip.stories.js +115 -0
- package/dist/collection/components/utility/colour/background-color.stories.js +96 -0
- package/dist/collection/components/utility/colour/text-color.stories.js +94 -0
- package/dist/collection/foundations-stories/colour/colour-brand.stories.js +38 -0
- package/dist/collection/foundations-stories/colour/colour-scales.stories.js +71 -0
- package/dist/collection/foundations-stories/colour/colour-semantic.stories.js +40 -0
- package/dist/collection/foundations-stories/grid/grid.stories.js +386 -0
- package/dist/collection/foundations-stories/spacing/spacing-element.stories.js +100 -0
- package/dist/collection/foundations-stories/spacing/spacing-layout.stories.js +94 -0
- package/dist/collection/foundations-stories/typography/typography-body.stories.js +16 -0
- package/dist/collection/foundations-stories/typography/typography-detail.stories.js +17 -0
- package/dist/collection/foundations-stories/typography/typography-headline.stories.js +39 -0
- package/dist/collection/foundations-stories/typography/typography-paragraph.stories.js +12 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/stories/assets/code-brackets.svg +1 -0
- package/dist/collection/stories/assets/colors.svg +1 -0
- package/dist/collection/stories/assets/comments.svg +1 -0
- package/dist/collection/stories/assets/direction.svg +1 -0
- package/dist/collection/stories/assets/flow.svg +1 -0
- package/dist/collection/stories/assets/plugin.svg +1 -0
- package/dist/collection/stories/assets/repo.svg +1 -0
- package/dist/collection/stories/assets/stackalt.svg +1 -0
- package/dist/collection/utils/utils.js +12 -0
- package/dist/components/dropdown-option.js +100 -0
- package/dist/components/dropdown.js +303 -0
- package/dist/components/icon.js +58 -0
- package/dist/components/index.d.ts +62 -0
- package/dist/components/index.js +42 -0
- package/dist/components/popper.js +1799 -0
- package/dist/components/sdds-accordion-item.d.ts +11 -0
- package/dist/components/sdds-accordion-item.js +60 -0
- package/dist/components/sdds-accordion.d.ts +11 -0
- package/dist/components/sdds-accordion.js +38 -0
- package/dist/components/sdds-badges.d.ts +11 -0
- package/dist/components/sdds-badges.js +75 -0
- package/dist/components/sdds-banner.d.ts +11 -0
- package/dist/components/sdds-banner.js +119 -0
- package/dist/components/sdds-block.d.ts +11 -0
- package/dist/components/sdds-block.js +48 -0
- package/dist/components/sdds-body-cell.d.ts +11 -0
- package/dist/components/sdds-body-cell.js +6 -0
- package/dist/components/sdds-breadcrumb-item.d.ts +11 -0
- package/dist/components/sdds-breadcrumb-item.js +43 -0
- package/dist/components/sdds-breadcrumb.d.ts +11 -0
- package/dist/components/sdds-breadcrumb.js +37 -0
- package/dist/components/sdds-button.d.ts +11 -0
- package/dist/components/sdds-button.js +59 -0
- package/dist/components/sdds-card.d.ts +11 -0
- package/dist/components/sdds-card.js +84 -0
- package/dist/components/sdds-checkbox.d.ts +11 -0
- package/dist/components/sdds-checkbox.js +76 -0
- package/dist/components/sdds-datetime.d.ts +11 -0
- package/dist/components/sdds-datetime.js +129 -0
- package/dist/components/sdds-dropdown-filter.d.ts +11 -0
- package/dist/components/sdds-dropdown-filter.js +138 -0
- package/dist/components/sdds-dropdown-option.d.ts +11 -0
- package/dist/components/sdds-dropdown-option.js +6 -0
- package/dist/components/sdds-dropdown.d.ts +11 -0
- package/dist/components/sdds-dropdown.js +6 -0
- package/dist/components/sdds-header-cell.d.ts +11 -0
- package/dist/components/sdds-header-cell.js +170 -0
- package/dist/components/sdds-icon.d.ts +11 -0
- package/dist/components/sdds-icon.js +6 -0
- package/dist/components/sdds-inline-tab.d.ts +11 -0
- package/dist/components/sdds-inline-tab.js +40 -0
- package/dist/components/sdds-inline-tabs-fullbleed.d.ts +11 -0
- package/dist/components/sdds-inline-tabs-fullbleed.js +117 -0
- package/dist/components/sdds-inline-tabs.d.ts +11 -0
- package/dist/components/sdds-inline-tabs.js +245 -0
- package/dist/components/sdds-link.d.ts +11 -0
- package/dist/components/sdds-link.js +6 -0
- package/dist/components/sdds-link2.js +44 -0
- package/dist/components/sdds-message.d.ts +11 -0
- package/dist/components/sdds-message.js +67 -0
- package/dist/components/sdds-modal.d.ts +11 -0
- package/dist/components/sdds-modal.js +77 -0
- package/dist/components/sdds-navigation-tabs.d.ts +11 -0
- package/dist/components/sdds-navigation-tabs.js +117 -0
- package/dist/components/sdds-popover-canvas.d.ts +11 -0
- package/dist/components/sdds-popover-canvas.js +108 -0
- package/dist/components/sdds-popover-menu.d.ts +11 -0
- package/dist/components/sdds-popover-menu.js +109 -0
- package/dist/components/sdds-radio-button.d.ts +11 -0
- package/dist/components/sdds-radio-button.js +52 -0
- package/dist/components/sdds-slider.d.ts +11 -0
- package/dist/components/sdds-slider.js +394 -0
- package/dist/components/sdds-spinner.d.ts +11 -0
- package/dist/components/sdds-spinner.js +37 -0
- package/dist/components/sdds-table-body-row-expandable.d.ts +11 -0
- package/dist/components/sdds-table-body-row-expandable.js +105 -0
- package/dist/components/sdds-table-body-row.d.ts +11 -0
- package/dist/components/sdds-table-body-row.js +6 -0
- package/dist/components/sdds-table-body.d.ts +11 -0
- package/dist/components/sdds-table-body.js +337 -0
- package/dist/components/sdds-table-footer.d.ts +11 -0
- package/dist/components/sdds-table-footer.js +195 -0
- package/dist/components/sdds-table-header.d.ts +11 -0
- package/dist/components/sdds-table-header.js +124 -0
- package/dist/components/sdds-table-toolbar.d.ts +11 -0
- package/dist/components/sdds-table-toolbar.js +87 -0
- package/dist/components/sdds-table.d.ts +11 -0
- package/dist/components/sdds-table.js +91 -0
- package/dist/components/sdds-textarea.d.ts +11 -0
- package/dist/components/sdds-textarea.js +109 -0
- package/dist/components/sdds-textfield.d.ts +11 -0
- package/dist/components/sdds-textfield.js +127 -0
- package/dist/components/sdds-toast.d.ts +11 -0
- package/dist/components/sdds-toast.js +117 -0
- package/dist/components/sdds-toggle.d.ts +11 -0
- package/dist/components/sdds-toggle.js +69 -0
- package/dist/components/sdds-tooltip.d.ts +11 -0
- package/dist/components/sdds-tooltip.js +127 -0
- package/dist/components/table-body-cell.js +101 -0
- package/dist/components/table-body-row.js +120 -0
- package/dist/esm/index-32571711.js +1891 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -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/popper-f860750c.js +1799 -0
- package/dist/esm/sdds-accordion-item.entry.js +30 -0
- package/dist/esm/sdds-accordion.entry.js +17 -0
- package/dist/esm/sdds-badges.entry.js +50 -0
- package/dist/esm/sdds-banner.entry.js +75 -0
- package/dist/esm/sdds-block.entry.js +28 -0
- package/dist/esm/sdds-body-cell_2.entry.js +168 -0
- package/dist/esm/sdds-breadcrumb-item.entry.js +21 -0
- package/dist/esm/sdds-breadcrumb.entry.js +19 -0
- package/dist/esm/sdds-button.entry.js +33 -0
- package/dist/esm/sdds-card.entry.js +52 -0
- package/dist/esm/sdds-checkbox.entry.js +51 -0
- package/dist/esm/sdds-datetime.entry.js +91 -0
- package/dist/esm/sdds-dropdown-filter.entry.js +88 -0
- package/dist/esm/sdds-dropdown_2.entry.js +336 -0
- package/dist/esm/sdds-header-cell.entry.js +135 -0
- package/dist/esm/sdds-icon.entry.js +38 -0
- package/dist/esm/sdds-inline-tab.entry.js +18 -0
- package/dist/esm/sdds-inline-tabs-fullbleed.entry.js +94 -0
- package/dist/esm/sdds-inline-tabs.entry.js +217 -0
- package/dist/esm/sdds-link.entry.js +24 -0
- package/dist/esm/sdds-message.entry.js +37 -0
- package/dist/esm/sdds-modal.entry.js +47 -0
- package/dist/esm/sdds-navigation-tabs.entry.js +94 -0
- package/dist/esm/sdds-popover-canvas.entry.js +80 -0
- package/dist/esm/sdds-popover-menu.entry.js +81 -0
- package/dist/esm/sdds-radio-button.entry.js +28 -0
- package/dist/esm/sdds-slider.entry.js +353 -0
- package/dist/esm/sdds-spinner.entry.js +17 -0
- package/dist/esm/sdds-table-body-row-expandable.entry.js +78 -0
- package/dist/esm/sdds-table-body.entry.js +285 -0
- package/dist/esm/sdds-table-footer.entry.js +160 -0
- package/dist/esm/sdds-table-header.entry.js +95 -0
- package/dist/esm/sdds-table-toolbar.entry.js +61 -0
- package/dist/esm/sdds-table.entry.js +64 -0
- package/dist/esm/sdds-textarea.entry.js +70 -0
- package/dist/esm/sdds-textfield.entry.js +87 -0
- package/dist/esm/sdds-toast.entry.js +82 -0
- package/dist/esm/sdds-toggle.entry.js +40 -0
- package/dist/esm/sdds-tooltip.entry.js +100 -0
- package/dist/esm/tegel.js +17 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/node_modules/@types/jest/index.d.ts +1512 -0
- package/dist/tegel/index.esm.js +0 -0
- package/dist/tegel/p-05d3cfc8.entry.js +1 -0
- package/dist/tegel/p-13a25c7f.entry.js +1 -0
- package/dist/tegel/p-13b783f1.js +2 -0
- package/dist/tegel/p-1dda8de9.entry.js +1 -0
- package/dist/tegel/p-2248b59e.entry.js +1 -0
- package/dist/tegel/p-232e5c9a.entry.js +1 -0
- package/dist/tegel/p-2375f0eb.entry.js +1 -0
- package/dist/tegel/p-29deedc6.entry.js +1 -0
- package/dist/tegel/p-2f52021b.entry.js +1 -0
- package/dist/tegel/p-3344582d.entry.js +1 -0
- package/dist/tegel/p-4b14324d.entry.js +1 -0
- package/dist/tegel/p-561fbe77.entry.js +1 -0
- package/dist/tegel/p-5a215722.entry.js +1 -0
- package/dist/tegel/p-5f7b1539.entry.js +1 -0
- package/dist/tegel/p-6f382b38.entry.js +1 -0
- package/dist/tegel/p-765e2719.entry.js +1 -0
- package/dist/tegel/p-76f60546.entry.js +1 -0
- package/dist/tegel/p-7a5244b6.entry.js +1 -0
- package/dist/tegel/p-816ff5f7.entry.js +1 -0
- package/dist/tegel/p-81d2d57b.entry.js +1 -0
- package/dist/tegel/p-87650f36.entry.js +1 -0
- package/dist/tegel/p-8e6f885c.entry.js +1 -0
- package/dist/tegel/p-8e9dcc20.entry.js +1 -0
- package/dist/tegel/p-997fc919.entry.js +1 -0
- package/dist/tegel/p-9a057c9a.entry.js +1 -0
- package/dist/tegel/p-9a95e92c.entry.js +1 -0
- package/dist/tegel/p-a75ff060.entry.js +1 -0
- package/dist/tegel/p-bf1216f9.entry.js +1 -0
- package/dist/tegel/p-bf597564.entry.js +1 -0
- package/dist/tegel/p-d2217bf0.entry.js +1 -0
- package/dist/tegel/p-e335137d.entry.js +1 -0
- package/dist/tegel/p-e34cce75.entry.js +1 -0
- package/dist/tegel/p-e55d09f2.entry.js +1 -0
- package/dist/tegel/p-ebbffa8a.entry.js +1 -0
- package/dist/tegel/p-ec26fc38.js +1 -0
- package/dist/tegel/p-ed076d47.entry.js +1 -0
- package/dist/tegel/p-ef887910.entry.js +1 -0
- package/dist/tegel/p-f4b70868.entry.js +1 -0
- package/dist/tegel/p-f52a0b63.entry.js +1 -0
- package/dist/tegel/p-f5bf214b.entry.js +1 -0
- package/dist/tegel/p-fd1b5923.entry.js +1 -0
- package/dist/tegel/tegel.css +109 -0
- package/dist/tegel/tegel.esm.js +1 -0
- package/dist/types/components/accordion/accordion-item/accordion-item.d.ts +17 -0
- package/dist/types/components/accordion/accordion.d.ts +7 -0
- package/dist/types/components/accordion/accordion.stories.d.ts +77 -0
- package/dist/types/components/badge/badge.stories.d.ts +66 -0
- package/dist/types/components/badge/badges.d.ts +16 -0
- package/dist/types/components/banner/banner.stories.d.ts +68 -0
- package/dist/types/components/banner/sdds-banner.d.ts +48 -0
- package/dist/types/components/banner/sdds-banner.stories.d.ts +109 -0
- package/dist/types/components/block/block-native.stories.d.ts +31 -0
- package/dist/types/components/block/sdds-block.d.ts +9 -0
- package/dist/types/components/block/sdds-block.stories.d.ts +32 -0
- package/dist/types/components/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +9 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +5 -0
- package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +12 -0
- package/dist/types/components/button/button-component.d.ts +18 -0
- package/dist/types/components/button/button-native.stories.d.ts +148 -0
- package/dist/types/components/button/button-webcomponent.stories.d.ts +147 -0
- package/dist/types/components/card/card.stories.d.ts +138 -0
- package/dist/types/components/card/sdds-card.d.ts +39 -0
- package/dist/types/components/card/sdds-card.stories.d.ts +139 -0
- package/dist/types/components/checkbox/checkbox.stories.d.ts +39 -0
- package/dist/types/components/checkbox/sdds-checkbox.d.ts +38 -0
- package/dist/types/components/checkbox/sdds-checkbox.stories.d.ts +40 -0
- package/dist/types/components/chips/chips.stories.d.ts +77 -0
- package/dist/types/components/data-table/native-table.stories.d.ts +133 -0
- package/dist/types/components/data-table/table/table.d.ts +47 -0
- package/dist/types/components/data-table/table-body/table-body.d.ts +54 -0
- package/dist/types/components/data-table/table-body-cell/table-body-cell.d.ts +24 -0
- package/dist/types/components/data-table/table-body-row/table-body-row.d.ts +27 -0
- package/dist/types/components/data-table/table-body-row-expandable/table-body-row-expandable.d.ts +27 -0
- package/dist/types/components/data-table/table-component-basic.stories.d.ts +101 -0
- package/dist/types/components/data-table/table-component-batch-actions.stories.d.ts +99 -0
- package/dist/types/components/data-table/table-component-bodydata.stories.d.ts +38 -0
- package/dist/types/components/data-table/table-component-custom-width.stories.d.ts +148 -0
- package/dist/types/components/data-table/table-component-event-listeners.stories.d.ts +88 -0
- package/dist/types/components/data-table/table-component-expandable-rows.stories.d.ts +88 -0
- package/dist/types/components/data-table/table-component-filtering.stories.d.ts +101 -0
- package/dist/types/components/data-table/table-component-multiselect.stories.d.ts +101 -0
- package/dist/types/components/data-table/table-component-pagination.stories.d.ts +101 -0
- package/dist/types/components/data-table/table-component-sorting.stories.d.ts +100 -0
- package/dist/types/components/data-table/table-footer/table-footer.d.ts +50 -0
- package/dist/types/components/data-table/table-header/table-header.d.ts +27 -0
- package/dist/types/components/data-table/table-header-cell/table-header-cell.d.ts +44 -0
- package/dist/types/components/data-table/table-toolbar/table-toolbar.d.ts +22 -0
- package/dist/types/components/datetime/datetime.d.ts +42 -0
- package/dist/types/components/datetime/datetime.stories.d.ts +127 -0
- package/dist/types/components/divider/divider.stories.d.ts +65 -0
- package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.d.ts +42 -0
- package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.stories.d.ts +73 -0
- package/dist/types/components/dropdown/dropdown-native.stories.d.ts +57 -0
- package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +19 -0
- package/dist/types/components/dropdown/dropdown-wc-default.stories.d.ts +129 -0
- package/dist/types/components/dropdown/dropdown-wc-multiselect.stories.d.ts +115 -0
- package/dist/types/components/dropdown/dropdown.d.ts +58 -0
- package/dist/types/components/footer/footer.stories.d.ts +45 -0
- package/dist/types/components/header/header-all.stories.d.ts +29 -0
- package/dist/types/components/header/header-default.stories.d.ts +29 -0
- package/dist/types/components/header/header-inline.stories.d.ts +29 -0
- package/dist/types/components/header/header-search.stories.d.ts +29 -0
- package/dist/types/components/header/header-toolbar.stories.d.ts +29 -0
- package/dist/types/components/icon/icon-font.stories.d.ts +38 -0
- package/dist/types/components/icon/icon-web-component.stories.d.ts +38 -0
- package/dist/types/components/icon/icon.d.ts +12 -0
- package/dist/types/components/link/link.stories.d.ts +33 -0
- package/dist/types/components/link/sdds-link.d.ts +13 -0
- package/dist/types/components/link/sdds-link.stories.d.ts +58 -0
- package/dist/types/components/message/message.stories.d.ts +69 -0
- package/dist/types/components/message/sdds-message.d.ts +14 -0
- package/dist/types/components/message/sdds-message.stories.d.ts +87 -0
- package/dist/types/components/modal/modal-native.stories.d.ts +59 -0
- package/dist/types/components/modal/modal-webcomponent.stories.d.ts +52 -0
- package/dist/types/components/modal/modal.d.ts +17 -0
- package/dist/types/components/popover-canvas/popover-canvas.d.ts +24 -0
- package/dist/types/components/popover-canvas/popover-canvas.stories.d.ts +25 -0
- package/dist/types/components/popover-menu/popover-menu-icons.stories.d.ts +27 -0
- package/dist/types/components/popover-menu/popover-menu.d.ts +24 -0
- package/dist/types/components/popover-menu/popover-menu.stories.d.ts +27 -0
- package/dist/types/components/radio-button/radio-button-component.stories.d.ts +39 -0
- package/dist/types/components/radio-button/radio-button.d.ts +26 -0
- package/dist/types/components/radio-button/radio-button.stories.d.ts +33 -0
- package/dist/types/components/side-menu/side-menu.stories.d.ts +42 -0
- package/dist/types/components/slider/slider.d.ts +86 -0
- package/dist/types/components/slider/slider.stories.d.ts +169 -0
- package/dist/types/components/spinner/spinner.d.ts +7 -0
- package/dist/types/components/spinner/spinner.stories.d.ts +37 -0
- package/dist/types/components/stepper/stepper.stories.d.ts +56 -0
- package/dist/types/components/tabs/inline-tabs-default/inline-tab/inline-tab.d.ts +6 -0
- package/dist/types/components/tabs/inline-tabs-default/inline-tabs.d.ts +40 -0
- package/dist/types/components/tabs/inline-tabs-default/inline-tabs.stories.d.ts +49 -0
- package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.d.ts +20 -0
- package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.d.ts +30 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +20 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.stories.d.ts +13 -0
- package/dist/types/components/textarea/textarea.d.ts +48 -0
- package/dist/types/components/textarea/textarea.stories.d.ts +116 -0
- package/dist/types/components/textfield/textfield.d.ts +52 -0
- package/dist/types/components/textfield/textfield.stories.d.ts +180 -0
- package/dist/types/components/toast/sdds-toast.d.ts +36 -0
- package/dist/types/components/toast/sdds-toast.stories.d.ts +56 -0
- package/dist/types/components/toast/toast.stories.d.ts +69 -0
- package/dist/types/components/toggle/sdds-toggle.d.ts +34 -0
- package/dist/types/components/toggle/sdds-toggle.stories.d.ts +74 -0
- package/dist/types/components/toggle/toggle.stories.d.ts +55 -0
- package/dist/types/components/tooltip/tooltip.d.ts +24 -0
- package/dist/types/components/tooltip/tooltip.stories.d.ts +54 -0
- package/dist/types/components/utility/colour/background-color.stories.d.ts +58 -0
- package/dist/types/components/utility/colour/text-color.stories.d.ts +58 -0
- package/dist/types/components.d.ts +2643 -0
- package/dist/types/foundations-stories/colour/colour-brand.stories.d.ts +13 -0
- package/dist/types/foundations-stories/colour/colour-scales.stories.d.ts +13 -0
- package/dist/types/foundations-stories/colour/colour-semantic.stories.d.ts +13 -0
- package/dist/types/foundations-stories/grid/grid.stories.d.ts +35 -0
- package/dist/types/foundations-stories/spacing/spacing-element.stories.d.ts +8 -0
- package/dist/types/foundations-stories/spacing/spacing-layout.stories.d.ts +8 -0
- package/dist/types/foundations-stories/typography/typography-body.stories.d.ts +8 -0
- package/dist/types/foundations-stories/typography/typography-detail.stories.d.ts +8 -0
- package/dist/types/foundations-stories/typography/typography-headline.stories.d.ts +21 -0
- package/dist/types/foundations-stories/typography/typography-paragraph.stories.d.ts +8 -0
- package/dist/types/global.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1581 -0
- package/dist/types/utils/utils.d.ts +2 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +1 -1
- package/readme.md +34 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
min-width: 160px;
|
|
4
|
+
min-height: 160px;
|
|
5
|
+
color: var(--sdds-popover-canvas-color);
|
|
6
|
+
background-color: var(--sdds-popover-canvas-background);
|
|
7
|
+
padding: 16px;
|
|
8
|
+
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.15), 0 -1px 1px rgba(0, 0, 0, 0.1);
|
|
9
|
+
border-radius: 4px;
|
|
10
|
+
z-index: 800;
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
13
|
+
:host * {
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host(.sdds-popover-canvas-show) {
|
|
18
|
+
opacity: 1;
|
|
19
|
+
display: block;
|
|
20
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
import { createPopper } from '@popperjs/core';
|
|
3
|
+
export class PopoverCanvas {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.selector = '';
|
|
6
|
+
this.referenceEl = undefined;
|
|
7
|
+
this.show = false;
|
|
8
|
+
this.placement = 'auto';
|
|
9
|
+
this.offsetSkidding = 0;
|
|
10
|
+
this.offsetDistance = 8;
|
|
11
|
+
this.renderedShowValue = false;
|
|
12
|
+
this.popperInstance = undefined;
|
|
13
|
+
this.target = undefined;
|
|
14
|
+
}
|
|
15
|
+
handleOutsideClick() {
|
|
16
|
+
if (this.show) {
|
|
17
|
+
this.show = false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
componentDidLoad() {
|
|
21
|
+
var _a;
|
|
22
|
+
this.target = (_a = this.referenceEl) !== null && _a !== void 0 ? _a : document.querySelector(this.selector);
|
|
23
|
+
this.renderedShowValue = this.show;
|
|
24
|
+
this.popperInstance = createPopper(this.target, this.popoverCanvasElement, {
|
|
25
|
+
placement: this.placement,
|
|
26
|
+
modifiers: [
|
|
27
|
+
{
|
|
28
|
+
name: 'offset',
|
|
29
|
+
options: {
|
|
30
|
+
offset: [this.offsetSkidding, this.offsetDistance],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
});
|
|
35
|
+
const showCanvas = () => {
|
|
36
|
+
this.show = true;
|
|
37
|
+
};
|
|
38
|
+
const hideCanvas = () => {
|
|
39
|
+
this.show = false;
|
|
40
|
+
};
|
|
41
|
+
this.target.addEventListener('mousedown', (event) => {
|
|
42
|
+
event.stopPropagation();
|
|
43
|
+
if (this.show) {
|
|
44
|
+
hideCanvas();
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
showCanvas();
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
this.popoverCanvasElement.addEventListener('mousemove', (event) => {
|
|
51
|
+
event.stopPropagation();
|
|
52
|
+
});
|
|
53
|
+
this.popoverCanvasElement.addEventListener('mousedown', (event) => {
|
|
54
|
+
event.stopPropagation();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
componentDidRender() {
|
|
58
|
+
if (this.show && !this.renderedShowValue) {
|
|
59
|
+
// Here we update the popper position since its position is wrong
|
|
60
|
+
// before it is rendered.
|
|
61
|
+
this.popperInstance.update();
|
|
62
|
+
}
|
|
63
|
+
this.renderedShowValue = this.show;
|
|
64
|
+
}
|
|
65
|
+
disconnectedCallback() {
|
|
66
|
+
var _a;
|
|
67
|
+
(_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
68
|
+
}
|
|
69
|
+
render() {
|
|
70
|
+
return (h(Host, { class: `sdds-popover-canvas ${this.show ? 'sdds-popover-canvas-show' : ''}` }, h("slot", null)));
|
|
71
|
+
}
|
|
72
|
+
static get is() { return "sdds-popover-canvas"; }
|
|
73
|
+
static get encapsulation() { return "shadow"; }
|
|
74
|
+
static get originalStyleUrls() {
|
|
75
|
+
return {
|
|
76
|
+
"$": ["popover-canvas.scss"]
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
static get styleUrls() {
|
|
80
|
+
return {
|
|
81
|
+
"$": ["popover-canvas.css"]
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
static get properties() {
|
|
85
|
+
return {
|
|
86
|
+
"selector": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "string",
|
|
91
|
+
"resolved": "string",
|
|
92
|
+
"references": {}
|
|
93
|
+
},
|
|
94
|
+
"required": false,
|
|
95
|
+
"optional": false,
|
|
96
|
+
"docs": {
|
|
97
|
+
"tags": [],
|
|
98
|
+
"text": "The CSS-selector for an element that will trigger the popover"
|
|
99
|
+
},
|
|
100
|
+
"attribute": "selector",
|
|
101
|
+
"reflect": false,
|
|
102
|
+
"defaultValue": "''"
|
|
103
|
+
},
|
|
104
|
+
"referenceEl": {
|
|
105
|
+
"type": "unknown",
|
|
106
|
+
"mutable": false,
|
|
107
|
+
"complexType": {
|
|
108
|
+
"original": "HTMLElement",
|
|
109
|
+
"resolved": "HTMLElement",
|
|
110
|
+
"references": {
|
|
111
|
+
"HTMLElement": {
|
|
112
|
+
"location": "global"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"required": false,
|
|
117
|
+
"optional": false,
|
|
118
|
+
"docs": {
|
|
119
|
+
"tags": [],
|
|
120
|
+
"text": "Element that will trigger the popover (takes priority over selector)"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"show": {
|
|
124
|
+
"type": "boolean",
|
|
125
|
+
"mutable": false,
|
|
126
|
+
"complexType": {
|
|
127
|
+
"original": "boolean",
|
|
128
|
+
"resolved": "boolean",
|
|
129
|
+
"references": {}
|
|
130
|
+
},
|
|
131
|
+
"required": false,
|
|
132
|
+
"optional": false,
|
|
133
|
+
"docs": {
|
|
134
|
+
"tags": [],
|
|
135
|
+
"text": "Decides if the Popover Canvas should be visible from the start"
|
|
136
|
+
},
|
|
137
|
+
"attribute": "show",
|
|
138
|
+
"reflect": false,
|
|
139
|
+
"defaultValue": "false"
|
|
140
|
+
},
|
|
141
|
+
"placement": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"mutable": false,
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "Placement",
|
|
146
|
+
"resolved": "\"auto\" | \"auto-end\" | \"auto-start\" | \"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
147
|
+
"references": {
|
|
148
|
+
"Placement": {
|
|
149
|
+
"location": "import",
|
|
150
|
+
"path": "@popperjs/core"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"required": false,
|
|
155
|
+
"optional": false,
|
|
156
|
+
"docs": {
|
|
157
|
+
"tags": [],
|
|
158
|
+
"text": "Decides the placement of the Popover Canvas"
|
|
159
|
+
},
|
|
160
|
+
"attribute": "placement",
|
|
161
|
+
"reflect": false,
|
|
162
|
+
"defaultValue": "'auto'"
|
|
163
|
+
},
|
|
164
|
+
"offsetSkidding": {
|
|
165
|
+
"type": "number",
|
|
166
|
+
"mutable": false,
|
|
167
|
+
"complexType": {
|
|
168
|
+
"original": "number",
|
|
169
|
+
"resolved": "number",
|
|
170
|
+
"references": {}
|
|
171
|
+
},
|
|
172
|
+
"required": false,
|
|
173
|
+
"optional": false,
|
|
174
|
+
"docs": {
|
|
175
|
+
"tags": [],
|
|
176
|
+
"text": "Sets the offset skidding"
|
|
177
|
+
},
|
|
178
|
+
"attribute": "offset-skidding",
|
|
179
|
+
"reflect": false,
|
|
180
|
+
"defaultValue": "0"
|
|
181
|
+
},
|
|
182
|
+
"offsetDistance": {
|
|
183
|
+
"type": "number",
|
|
184
|
+
"mutable": false,
|
|
185
|
+
"complexType": {
|
|
186
|
+
"original": "number",
|
|
187
|
+
"resolved": "number",
|
|
188
|
+
"references": {}
|
|
189
|
+
},
|
|
190
|
+
"required": false,
|
|
191
|
+
"optional": false,
|
|
192
|
+
"docs": {
|
|
193
|
+
"tags": [],
|
|
194
|
+
"text": "Sets the offset distance"
|
|
195
|
+
},
|
|
196
|
+
"attribute": "offset-distance",
|
|
197
|
+
"reflect": false,
|
|
198
|
+
"defaultValue": "8"
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
static get states() {
|
|
203
|
+
return {
|
|
204
|
+
"renderedShowValue": {},
|
|
205
|
+
"popperInstance": {},
|
|
206
|
+
"target": {}
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
static get elementRef() { return "popoverCanvasElement"; }
|
|
210
|
+
static get listeners() {
|
|
211
|
+
return [{
|
|
212
|
+
"name": "mousedown",
|
|
213
|
+
"method": "handleOutsideClick",
|
|
214
|
+
"target": "window",
|
|
215
|
+
"capture": false,
|
|
216
|
+
"passive": true
|
|
217
|
+
}];
|
|
218
|
+
}
|
|
219
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
2
|
+
import readme from './readme.md';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Popover Canvas',
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'centered',
|
|
7
|
+
notes: readme,
|
|
8
|
+
},
|
|
9
|
+
argTypes: {
|
|
10
|
+
canvasPosition: {
|
|
11
|
+
name: 'Canvas position',
|
|
12
|
+
description: 'Position of the PopoverCanvas',
|
|
13
|
+
type: { summary: 'string' },
|
|
14
|
+
control: {
|
|
15
|
+
type: 'select',
|
|
16
|
+
},
|
|
17
|
+
options: [
|
|
18
|
+
'Bottom',
|
|
19
|
+
'Bottom start',
|
|
20
|
+
'Bottom end',
|
|
21
|
+
'Top',
|
|
22
|
+
'Top start',
|
|
23
|
+
'Top end',
|
|
24
|
+
'Left',
|
|
25
|
+
'Left-start',
|
|
26
|
+
'Left end',
|
|
27
|
+
'Right',
|
|
28
|
+
'Right start',
|
|
29
|
+
'Right end',
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
args: {
|
|
34
|
+
canvasPosition: 'Bottom',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
const ComponentPopoverCanvas = ({ canvasPosition }) => {
|
|
38
|
+
const canvasPosLookup = {
|
|
39
|
+
'Bottom': 'bottom',
|
|
40
|
+
'Bottom start': 'bottom-start',
|
|
41
|
+
'Bottom end': 'bottom-end',
|
|
42
|
+
'Top': 'top',
|
|
43
|
+
'Top start': 'top-start',
|
|
44
|
+
'Top end': 'top-end',
|
|
45
|
+
'Left': 'left',
|
|
46
|
+
'Left star': 'left-start',
|
|
47
|
+
'Left end': 'left-end',
|
|
48
|
+
'Right': 'right',
|
|
49
|
+
'Right start': 'right-start',
|
|
50
|
+
'Right end': 'right-end',
|
|
51
|
+
};
|
|
52
|
+
return formatHtmlPreview(`
|
|
53
|
+
<style>
|
|
54
|
+
/* demo-wrapper and demo-styles is for demonstration purposes only */
|
|
55
|
+
.demo-wrapper {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-wrap; nowrap;
|
|
58
|
+
align-items: center;
|
|
59
|
+
}
|
|
60
|
+
</style>
|
|
61
|
+
|
|
62
|
+
<!-- The 'referenceEl' prop can be used instead of 'selector',
|
|
63
|
+
wich might be preferable in frameworks like React -->
|
|
64
|
+
<sdds-popover-canvas
|
|
65
|
+
placement="${canvasPosLookup[canvasPosition]}"
|
|
66
|
+
selector="#trigger">
|
|
67
|
+
<div>
|
|
68
|
+
<h2>A popover canvas!</h2>
|
|
69
|
+
<p>
|
|
70
|
+
Where you can put anything you want!
|
|
71
|
+
</p>
|
|
72
|
+
<p>
|
|
73
|
+
<a target="_blank" rel="noopener noreferrer" href="https://digitaldesign.scania.com">Even links!</a>
|
|
74
|
+
</p>
|
|
75
|
+
</div>
|
|
76
|
+
</sdds-popover-canvas>
|
|
77
|
+
|
|
78
|
+
<!-- demo-wrapper code below is for demonstration purposes only -->
|
|
79
|
+
<div class="demo-wrapper">
|
|
80
|
+
<span class="sdds-u-mr2">Click icon for popover canvas</span>
|
|
81
|
+
|
|
82
|
+
<sdds-button aria-label="menu" onlyIcon id="trigger" type="ghost" size="sm">
|
|
83
|
+
<sdds-icon slot="icon" class="sdds-btn-icon" size="16px" name="kebab"></sdds-icon>
|
|
84
|
+
</sdds-button>
|
|
85
|
+
</div>
|
|
86
|
+
`);
|
|
87
|
+
};
|
|
88
|
+
export const Default = ComponentPopoverCanvas.bind({});
|
|
89
|
+
Default.args = {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
2
|
+
import readme from './readme.md';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Popover Menu',
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'centered',
|
|
7
|
+
notes: readme,
|
|
8
|
+
design: [
|
|
9
|
+
{
|
|
10
|
+
name: 'Figma',
|
|
11
|
+
type: 'figma',
|
|
12
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=16794%3A59241&t=Ne6myqwca5m00de7-1',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: 'Link',
|
|
16
|
+
type: 'link',
|
|
17
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=16794%3A59241&t=Ne6myqwca5m00de7-1',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
argTypes: {
|
|
22
|
+
menuPosition: {
|
|
23
|
+
name: 'Menu position',
|
|
24
|
+
description: 'Position of the Popover menu',
|
|
25
|
+
control: {
|
|
26
|
+
type: 'select',
|
|
27
|
+
},
|
|
28
|
+
options: [
|
|
29
|
+
'Bottom',
|
|
30
|
+
'Bottom start',
|
|
31
|
+
'Bottom end',
|
|
32
|
+
'Top',
|
|
33
|
+
'Top start',
|
|
34
|
+
'Top end',
|
|
35
|
+
'Left',
|
|
36
|
+
'Left-start',
|
|
37
|
+
'Left end',
|
|
38
|
+
'Right',
|
|
39
|
+
'Right start',
|
|
40
|
+
'Right end',
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
args: {
|
|
45
|
+
menuPosition: 'Bottom start',
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
const Template = ({ menuPosition }) => {
|
|
49
|
+
const menuPosLookup = {
|
|
50
|
+
'Bottom': 'bottom',
|
|
51
|
+
'Bottom start': 'bottom-start',
|
|
52
|
+
'Bottom end': 'bottom-end',
|
|
53
|
+
'Top': 'top',
|
|
54
|
+
'Top start': 'top-start',
|
|
55
|
+
'Top end': 'top-end',
|
|
56
|
+
'Left': 'left',
|
|
57
|
+
'Left star': 'left-start',
|
|
58
|
+
'Left end': 'left-end',
|
|
59
|
+
'Right': 'right',
|
|
60
|
+
'Right start': 'right-start',
|
|
61
|
+
'Right end': 'right-end',
|
|
62
|
+
};
|
|
63
|
+
return formatHtmlPreview(`
|
|
64
|
+
<style>
|
|
65
|
+
/* demo-wrapper styles is for demonstration purposes only */
|
|
66
|
+
.demo-wrapper {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-wrap: nowrap;
|
|
69
|
+
align-items: center;
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
72
|
+
|
|
73
|
+
<sdds-popover-menu
|
|
74
|
+
placement="${menuPosLookup[menuPosition]}"
|
|
75
|
+
id="my-popover-menu">
|
|
76
|
+
<ul class="sdds-popover-menu-wrapper">
|
|
77
|
+
<li>
|
|
78
|
+
<a target="_blank" rel="noopener noreferrer" href="https://digitaldesign.scania.com">
|
|
79
|
+
<i>
|
|
80
|
+
<sdds-icon name="save" size="16px"></sdds-icon>
|
|
81
|
+
</i>
|
|
82
|
+
Menu item 1
|
|
83
|
+
</a>
|
|
84
|
+
</li>
|
|
85
|
+
<li>
|
|
86
|
+
<a target="_blank" rel="noopener noreferrer" href="https://digitaldesign.scania.com">
|
|
87
|
+
<i>
|
|
88
|
+
<sdds-icon name="save" size="16px"></sdds-icon>
|
|
89
|
+
</i>
|
|
90
|
+
Menu item 2
|
|
91
|
+
</a>
|
|
92
|
+
</li>
|
|
93
|
+
<li class="divider"></li>
|
|
94
|
+
<li>
|
|
95
|
+
<a target="_blank" rel="noopener noreferrer" href="https://digitaldesign.scania.com">
|
|
96
|
+
<i>
|
|
97
|
+
<sdds-icon name="save" size="16px"></sdds-icon>
|
|
98
|
+
</i>
|
|
99
|
+
Menu item 4
|
|
100
|
+
</a>
|
|
101
|
+
</li>
|
|
102
|
+
</ul>
|
|
103
|
+
</sdds-popover-menu>
|
|
104
|
+
|
|
105
|
+
<!-- demo-wrapper code below is for demonstration purposes only -->
|
|
106
|
+
<div class="demo-wrapper">
|
|
107
|
+
<span class="sdds-u-mr2">Click icon for popover menu</span>
|
|
108
|
+
|
|
109
|
+
<sdds-button aria-label="menu" onlyIcon id="my-popover-button" type="ghost" size="sm">
|
|
110
|
+
<sdds-icon slot="icon" class="sdds-btn-icon" size="16px" name="kebab"></sdds-icon>
|
|
111
|
+
</sdds-button>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
<script>
|
|
115
|
+
// The 'selector' prop on Popover-Menu can be used instead, but it might be less ideal in frameworks like React
|
|
116
|
+
document.getElementById('my-popover-menu').referenceEl = document.getElementById('my-popover-button');
|
|
117
|
+
</script>
|
|
118
|
+
`);
|
|
119
|
+
};
|
|
120
|
+
export const WithIcons = Template.bind({});
|
|
121
|
+
WithIcons.args = {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
width: 160px;
|
|
5
|
+
background-color: var(--sdds-popover-menu-background);
|
|
6
|
+
padding: 16px;
|
|
7
|
+
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.15), 0 -1px 1px rgba(0, 0, 0, 0.1);
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
display: none;
|
|
10
|
+
z-index: 800;
|
|
11
|
+
}
|
|
12
|
+
:host * {
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:host(.sdds-popover-menu-show) {
|
|
17
|
+
opacity: 1;
|
|
18
|
+
display: block;
|
|
19
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
import { createPopper } from '@popperjs/core';
|
|
3
|
+
export class PopoverMenu {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.selector = '';
|
|
6
|
+
this.referenceEl = undefined;
|
|
7
|
+
this.show = false;
|
|
8
|
+
this.placement = 'auto';
|
|
9
|
+
this.offsetSkidding = 0;
|
|
10
|
+
this.offsetDistance = 8;
|
|
11
|
+
this.renderedShowValue = false;
|
|
12
|
+
this.popperInstance = undefined;
|
|
13
|
+
this.target = undefined;
|
|
14
|
+
}
|
|
15
|
+
handleOutsideClick() {
|
|
16
|
+
if (this.show) {
|
|
17
|
+
this.show = false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
componentDidLoad() {
|
|
21
|
+
var _a;
|
|
22
|
+
this.target = (_a = this.referenceEl) !== null && _a !== void 0 ? _a : document.querySelector(this.selector);
|
|
23
|
+
this.renderedShowValue = this.show;
|
|
24
|
+
this.popperInstance = createPopper(this.target, this.popoverMenuElement, {
|
|
25
|
+
strategy: 'fixed',
|
|
26
|
+
placement: this.placement,
|
|
27
|
+
modifiers: [
|
|
28
|
+
{
|
|
29
|
+
name: 'offset',
|
|
30
|
+
options: {
|
|
31
|
+
offset: [this.offsetSkidding, this.offsetDistance],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
});
|
|
36
|
+
const showMenu = () => {
|
|
37
|
+
this.show = true;
|
|
38
|
+
};
|
|
39
|
+
const hideMenu = () => {
|
|
40
|
+
this.show = false;
|
|
41
|
+
};
|
|
42
|
+
this.target.addEventListener('mousedown', (event) => {
|
|
43
|
+
event.stopPropagation();
|
|
44
|
+
if (this.show) {
|
|
45
|
+
hideMenu();
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
showMenu();
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
this.popoverMenuElement.addEventListener('mousemove', (event) => {
|
|
52
|
+
event.stopPropagation();
|
|
53
|
+
});
|
|
54
|
+
this.popoverMenuElement.addEventListener('mousedown', (event) => {
|
|
55
|
+
event.stopPropagation();
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
componentDidRender() {
|
|
59
|
+
if (this.show && !this.renderedShowValue) {
|
|
60
|
+
// Here we update the popper position since its position is wrong
|
|
61
|
+
// before it is rendered.
|
|
62
|
+
this.popperInstance.update();
|
|
63
|
+
}
|
|
64
|
+
this.renderedShowValue = this.show;
|
|
65
|
+
}
|
|
66
|
+
disconnectedCallback() {
|
|
67
|
+
var _a;
|
|
68
|
+
(_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
69
|
+
}
|
|
70
|
+
render() {
|
|
71
|
+
return (h(Host, { class: `sdds-popover-menu ${this.show ? 'sdds-popover-menu-show' : ''}` }, h("slot", null)));
|
|
72
|
+
}
|
|
73
|
+
static get is() { return "sdds-popover-menu"; }
|
|
74
|
+
static get encapsulation() { return "shadow"; }
|
|
75
|
+
static get originalStyleUrls() {
|
|
76
|
+
return {
|
|
77
|
+
"$": ["popover-menu.scss"]
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
static get styleUrls() {
|
|
81
|
+
return {
|
|
82
|
+
"$": ["popover-menu.css"]
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
static get properties() {
|
|
86
|
+
return {
|
|
87
|
+
"selector": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"mutable": false,
|
|
90
|
+
"complexType": {
|
|
91
|
+
"original": "string",
|
|
92
|
+
"resolved": "string",
|
|
93
|
+
"references": {}
|
|
94
|
+
},
|
|
95
|
+
"required": false,
|
|
96
|
+
"optional": false,
|
|
97
|
+
"docs": {
|
|
98
|
+
"tags": [],
|
|
99
|
+
"text": "The CSS-selector for an element that will trigger the popover"
|
|
100
|
+
},
|
|
101
|
+
"attribute": "selector",
|
|
102
|
+
"reflect": false,
|
|
103
|
+
"defaultValue": "''"
|
|
104
|
+
},
|
|
105
|
+
"referenceEl": {
|
|
106
|
+
"type": "unknown",
|
|
107
|
+
"mutable": false,
|
|
108
|
+
"complexType": {
|
|
109
|
+
"original": "HTMLElement",
|
|
110
|
+
"resolved": "HTMLElement",
|
|
111
|
+
"references": {
|
|
112
|
+
"HTMLElement": {
|
|
113
|
+
"location": "global"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": false,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": "Element that will trigger the popover (takes priority over selector)"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"show": {
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "boolean",
|
|
129
|
+
"resolved": "boolean",
|
|
130
|
+
"references": {}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": false,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [],
|
|
136
|
+
"text": "Decides if the Popover Menu should be visible from the start"
|
|
137
|
+
},
|
|
138
|
+
"attribute": "show",
|
|
139
|
+
"reflect": false,
|
|
140
|
+
"defaultValue": "false"
|
|
141
|
+
},
|
|
142
|
+
"placement": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "Placement",
|
|
147
|
+
"resolved": "\"auto\" | \"auto-end\" | \"auto-start\" | \"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
148
|
+
"references": {
|
|
149
|
+
"Placement": {
|
|
150
|
+
"location": "import",
|
|
151
|
+
"path": "@popperjs/core"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"required": false,
|
|
156
|
+
"optional": false,
|
|
157
|
+
"docs": {
|
|
158
|
+
"tags": [],
|
|
159
|
+
"text": "Decides the placement of the Popover Menu"
|
|
160
|
+
},
|
|
161
|
+
"attribute": "placement",
|
|
162
|
+
"reflect": false,
|
|
163
|
+
"defaultValue": "'auto'"
|
|
164
|
+
},
|
|
165
|
+
"offsetSkidding": {
|
|
166
|
+
"type": "number",
|
|
167
|
+
"mutable": false,
|
|
168
|
+
"complexType": {
|
|
169
|
+
"original": "number",
|
|
170
|
+
"resolved": "number",
|
|
171
|
+
"references": {}
|
|
172
|
+
},
|
|
173
|
+
"required": false,
|
|
174
|
+
"optional": false,
|
|
175
|
+
"docs": {
|
|
176
|
+
"tags": [],
|
|
177
|
+
"text": "Sets the offset skidding"
|
|
178
|
+
},
|
|
179
|
+
"attribute": "offset-skidding",
|
|
180
|
+
"reflect": false,
|
|
181
|
+
"defaultValue": "0"
|
|
182
|
+
},
|
|
183
|
+
"offsetDistance": {
|
|
184
|
+
"type": "number",
|
|
185
|
+
"mutable": false,
|
|
186
|
+
"complexType": {
|
|
187
|
+
"original": "number",
|
|
188
|
+
"resolved": "number",
|
|
189
|
+
"references": {}
|
|
190
|
+
},
|
|
191
|
+
"required": false,
|
|
192
|
+
"optional": false,
|
|
193
|
+
"docs": {
|
|
194
|
+
"tags": [],
|
|
195
|
+
"text": "Sets the offset distance"
|
|
196
|
+
},
|
|
197
|
+
"attribute": "offset-distance",
|
|
198
|
+
"reflect": false,
|
|
199
|
+
"defaultValue": "8"
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
static get states() {
|
|
204
|
+
return {
|
|
205
|
+
"renderedShowValue": {},
|
|
206
|
+
"popperInstance": {},
|
|
207
|
+
"target": {}
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
static get elementRef() { return "popoverMenuElement"; }
|
|
211
|
+
static get listeners() {
|
|
212
|
+
return [{
|
|
213
|
+
"name": "mousedown",
|
|
214
|
+
"method": "handleOutsideClick",
|
|
215
|
+
"target": "window",
|
|
216
|
+
"capture": false,
|
|
217
|
+
"passive": true
|
|
218
|
+
}];
|
|
219
|
+
}
|
|
220
|
+
}
|