@scania/tegel 0.0.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/cjs/index-e1c79686.js +1912 -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 +55 -0
- package/dist/cjs/sdds-body-cell_2.cjs.entry.js +173 -0
- package/dist/cjs/sdds-button.cjs.entry.js +36 -0
- package/dist/cjs/sdds-datetime.cjs.entry.js +66 -0
- package/dist/cjs/sdds-dropdown-filter.cjs.entry.js +92 -0
- package/dist/cjs/sdds-dropdown_2.cjs.entry.js +335 -0
- package/dist/cjs/sdds-header-cell.cjs.entry.js +141 -0
- package/dist/cjs/sdds-icon.cjs.entry.js +42 -0
- package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js +96 -0
- package/dist/cjs/sdds-inline-tabs.cjs.entry.js +211 -0
- package/dist/cjs/sdds-modal.cjs.entry.js +49 -0
- package/dist/cjs/sdds-navigation-tabs.cjs.entry.js +95 -0
- package/dist/cjs/sdds-popover-canvas.cjs.entry.js +76 -0
- package/dist/cjs/sdds-popover-menu.cjs.entry.js +75 -0
- package/dist/cjs/sdds-slider.cjs.entry.js +336 -0
- package/dist/cjs/sdds-spinner.cjs.entry.js +21 -0
- package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js +81 -0
- package/dist/cjs/sdds-table-body.cjs.entry.js +289 -0
- package/dist/cjs/sdds-table-footer.cjs.entry.js +165 -0
- package/dist/cjs/sdds-table-header.cjs.entry.js +100 -0
- package/dist/cjs/sdds-table-toolbar.cjs.entry.js +66 -0
- package/dist/cjs/sdds-table.cjs.entry.js +69 -0
- package/dist/cjs/sdds-textarea.cjs.entry.js +61 -0
- package/dist/cjs/sdds-textfield.cjs.entry.js +82 -0
- package/dist/cjs/sdds-tooltip.cjs.entry.js +95 -0
- package/dist/cjs/tegel.cjs.js +19 -0
- package/dist/collection/collection-manifest.json +40 -0
- package/dist/collection/components/accordion/accordion-item/accordion-item.css +134 -0
- package/dist/collection/components/accordion/accordion-item/accordion-item.js +146 -0
- package/dist/collection/components/accordion/accordion.css +77 -0
- package/dist/collection/components/accordion/accordion.js +62 -0
- package/dist/collection/components/accordion/accordion.stories.js +91 -0
- package/dist/collection/components/badge/badge.stories.js +101 -0
- package/dist/collection/components/badge/badges.css +42 -0
- package/dist/collection/components/badge/badges.js +150 -0
- package/dist/collection/components/banner/banner.stories.js +93 -0
- package/dist/collection/components/block/block.stories.js +46 -0
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js +26 -0
- package/dist/collection/components/button/button-component.js +154 -0
- package/dist/collection/components/button/button-native.stories.js +183 -0
- package/dist/collection/components/button/button-webcomponent.stories.js +182 -0
- package/dist/collection/components/button/button.css +658 -0
- package/dist/collection/components/card/card.stories.js +181 -0
- package/dist/collection/components/checkbox/checkbox.stories.js +54 -0
- package/dist/collection/components/chips/chips.stories.js +124 -0
- package/dist/collection/components/data-table/native-table.stories.js +182 -0
- package/dist/collection/components/data-table/table/table.css +15 -0
- package/dist/collection/components/data-table/table/table.js +253 -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 +169 -0
- package/dist/collection/components/data-table/table-body-row/table-body-row.css +196 -0
- package/dist/collection/components/data-table/table-body-row/table-body-row.js +164 -0
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.css +79 -0
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.js +155 -0
- package/dist/collection/components/data-table/table-component-basic.stories.js +163 -0
- package/dist/collection/components/data-table/table-component-batch-actions.stories.js +129 -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 +198 -0
- package/dist/collection/components/data-table/table-component-event-listeners.stories.js +153 -0
- package/dist/collection/components/data-table/table-component-expandable-rows.stories.js +137 -0
- package/dist/collection/components/data-table/table-component-filtering.stories.js +139 -0
- package/dist/collection/components/data-table/table-component-multiselect.stories.js +160 -0
- package/dist/collection/components/data-table/table-component-pagination.stories.js +129 -0
- package/dist/collection/components/data-table/table-component-sorting.stories.js +107 -0
- package/dist/collection/components/data-table/table-footer/table-footer.css +93 -0
- package/dist/collection/components/data-table/table-footer/table-footer.js +355 -0
- package/dist/collection/components/data-table/table-header/table-header.css +204 -0
- package/dist/collection/components/data-table/table-header/table-header.js +153 -0
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.css +126 -0
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.js +320 -0
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.css +92 -0
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.js +142 -0
- package/dist/collection/components/datetime/datetime.css +375 -0
- package/dist/collection/components/datetime/datetime.js +251 -0
- package/dist/collection/components/datetime/datetime.stories.js +149 -0
- package/dist/collection/components/divider/divider.stories.js +116 -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 +151 -0
- package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js +146 -0
- package/dist/collection/components/dropdown/dropdown.css +891 -0
- package/dist/collection/components/dropdown/dropdown.js +554 -0
- package/dist/collection/components/footer/footer.stories.js +100 -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/message/message.stories.js +117 -0
- package/dist/collection/components/modal/modal-native.stories.js +121 -0
- package/dist/collection/components/modal/modal-webcomponent.stories.js +78 -0
- package/dist/collection/components/modal/modal.css +324 -0
- package/dist/collection/components/modal/modal.js +146 -0
- package/dist/collection/components/popover-canvas/popover-canvas.css +20 -0
- package/dist/collection/components/popover-canvas/popover-canvas.js +190 -0
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js +87 -0
- package/dist/collection/components/popover-menu/popover-menu-icons.stories.js +132 -0
- package/dist/collection/components/popover-menu/popover-menu.css +19 -0
- package/dist/collection/components/popover-menu/popover-menu.js +189 -0
- package/dist/collection/components/popover-menu/popover-menu.stories.js +109 -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 +260 -0
- package/dist/collection/components/slider/slider.js +682 -0
- package/dist/collection/components/slider/slider.stories.js +251 -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-tabs.css +159 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.js +302 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.stories.js +65 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.css +172 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.js +126 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js +43 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +153 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +103 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +32 -0
- package/dist/collection/components/textarea/textarea.css +283 -0
- package/dist/collection/components/textarea/textarea.js +336 -0
- package/dist/collection/components/textarea/textarea.stories.js +149 -0
- package/dist/collection/components/textfield/textfield.css +494 -0
- package/dist/collection/components/textfield/textfield.js +359 -0
- package/dist/collection/components/textfield/textfield.stories.js +222 -0
- package/dist/collection/components/toast/toast.stories.js +119 -0
- package/dist/collection/components/toggle/toggle.stories.js +62 -0
- package/dist/collection/components/tooltip/tooltip.css +46 -0
- package/dist/collection/components/tooltip/tooltip.js +200 -0
- package/dist/collection/components/tooltip/tooltip.stories.js +113 -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 +296 -0
- package/dist/components/icon.js +58 -0
- package/dist/components/index.d.ts +50 -0
- package/dist/components/index.js +30 -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 +76 -0
- package/dist/components/sdds-body-cell.d.ts +11 -0
- package/dist/components/sdds-body-cell.js +6 -0
- package/dist/components/sdds-button.d.ts +11 -0
- package/dist/components/sdds-button.js +58 -0
- package/dist/components/sdds-datetime.d.ts +11 -0
- package/dist/components/sdds-datetime.js +90 -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 +173 -0
- package/dist/components/sdds-icon.d.ts +11 -0
- package/dist/components/sdds-icon.js +6 -0
- package/dist/components/sdds-inline-tabs-fullbleed.d.ts +11 -0
- package/dist/components/sdds-inline-tabs-fullbleed.js +115 -0
- package/dist/components/sdds-inline-tabs.d.ts +11 -0
- package/dist/components/sdds-inline-tabs.js +235 -0
- package/dist/components/sdds-modal.d.ts +11 -0
- package/dist/components/sdds-modal.js +69 -0
- package/dist/components/sdds-navigation-tabs.d.ts +11 -0
- package/dist/components/sdds-navigation-tabs.js +113 -0
- package/dist/components/sdds-popover-canvas.d.ts +11 -0
- package/dist/components/sdds-popover-canvas.js +97 -0
- package/dist/components/sdds-popover-menu.d.ts +11 -0
- package/dist/components/sdds-popover-menu.js +96 -0
- package/dist/components/sdds-slider.d.ts +11 -0
- package/dist/components/sdds-slider.js +366 -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 +104 -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 +196 -0
- package/dist/components/sdds-table-header.d.ts +11 -0
- package/dist/components/sdds-table-header.js +125 -0
- package/dist/components/sdds-table-toolbar.d.ts +11 -0
- package/dist/components/sdds-table-toolbar.js +88 -0
- package/dist/components/sdds-table.d.ts +11 -0
- package/dist/components/sdds-table.js +92 -0
- package/dist/components/sdds-textarea.d.ts +11 -0
- package/dist/components/sdds-textarea.js +90 -0
- package/dist/components/sdds-textfield.d.ts +11 -0
- package/dist/components/sdds-textfield.js +111 -0
- package/dist/components/sdds-tooltip.d.ts +11 -0
- package/dist/components/sdds-tooltip.js +116 -0
- package/dist/components/table-body-cell.js +102 -0
- package/dist/components/table-body-row.js +119 -0
- package/dist/esm/index-b67b15a6.js +1884 -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 +51 -0
- package/dist/esm/sdds-body-cell_2.entry.js +168 -0
- package/dist/esm/sdds-button.entry.js +32 -0
- package/dist/esm/sdds-datetime.entry.js +62 -0
- package/dist/esm/sdds-dropdown-filter.entry.js +88 -0
- package/dist/esm/sdds-dropdown_2.entry.js +330 -0
- package/dist/esm/sdds-header-cell.entry.js +137 -0
- package/dist/esm/sdds-icon.entry.js +38 -0
- package/dist/esm/sdds-inline-tabs-fullbleed.entry.js +92 -0
- package/dist/esm/sdds-inline-tabs.entry.js +207 -0
- package/dist/esm/sdds-modal.entry.js +45 -0
- package/dist/esm/sdds-navigation-tabs.entry.js +91 -0
- package/dist/esm/sdds-popover-canvas.entry.js +72 -0
- package/dist/esm/sdds-popover-menu.entry.js +71 -0
- package/dist/esm/sdds-slider.entry.js +332 -0
- package/dist/esm/sdds-spinner.entry.js +17 -0
- package/dist/esm/sdds-table-body-row-expandable.entry.js +77 -0
- package/dist/esm/sdds-table-body.entry.js +285 -0
- package/dist/esm/sdds-table-footer.entry.js +161 -0
- package/dist/esm/sdds-table-header.entry.js +96 -0
- package/dist/esm/sdds-table-toolbar.entry.js +62 -0
- package/dist/esm/sdds-table.entry.js +65 -0
- package/dist/esm/sdds-textarea.entry.js +57 -0
- package/dist/esm/sdds-textfield.entry.js +78 -0
- package/dist/esm/sdds-tooltip.entry.js +91 -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-040efb32.entry.js +1 -0
- package/dist/tegel/p-0e9d8e6d.entry.js +1 -0
- package/dist/tegel/p-12ca5cfa.entry.js +1 -0
- package/dist/tegel/p-157e1618.js +2 -0
- package/dist/tegel/p-1fe61cf6.entry.js +1 -0
- package/dist/tegel/p-29e77404.entry.js +1 -0
- package/dist/tegel/p-2f376504.entry.js +1 -0
- package/dist/tegel/p-44ced895.entry.js +1 -0
- package/dist/tegel/p-4880f03d.entry.js +1 -0
- package/dist/tegel/p-4aba73a3.entry.js +1 -0
- package/dist/tegel/p-4b58a02c.entry.js +1 -0
- package/dist/tegel/p-4cb85347.entry.js +1 -0
- package/dist/tegel/p-52031b5a.entry.js +1 -0
- package/dist/tegel/p-677baf7f.entry.js +1 -0
- package/dist/tegel/p-71797eaf.entry.js +1 -0
- package/dist/tegel/p-7373284c.entry.js +1 -0
- package/dist/tegel/p-7451779b.entry.js +1 -0
- package/dist/tegel/p-77aeea3b.entry.js +1 -0
- package/dist/tegel/p-8582d6a7.entry.js +1 -0
- package/dist/tegel/p-96021bd0.entry.js +1 -0
- package/dist/tegel/p-9d8caf51.entry.js +1 -0
- package/dist/tegel/p-a5919930.entry.js +1 -0
- package/dist/tegel/p-b01cface.entry.js +1 -0
- package/dist/tegel/p-bf896643.entry.js +1 -0
- package/dist/tegel/p-c311725c.entry.js +1 -0
- package/dist/tegel/p-cf72dfd9.entry.js +1 -0
- package/dist/tegel/p-d91caec6.entry.js +1 -0
- package/dist/tegel/p-e10eec33.entry.js +1 -0
- package/dist/tegel/p-ec26fc38.js +1 -0
- package/dist/tegel/p-f2262a69.entry.js +1 -0
- package/dist/tegel/p-f2f7aa45.entry.js +1 -0
- package/dist/tegel/tegel.css +101 -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/block/block.stories.d.ts +31 -0
- package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +12 -0
- package/dist/types/components/button/button-component.d.ts +15 -0
- package/dist/types/components/button/button-native.stories.d.ts +144 -0
- package/dist/types/components/button/button-webcomponent.stories.d.ts +143 -0
- package/dist/types/components/card/card.stories.d.ts +114 -0
- package/dist/types/components/checkbox/checkbox.stories.d.ts +39 -0
- package/dist/types/components/chips/chips.stories.d.ts +81 -0
- package/dist/types/components/data-table/native-table.stories.d.ts +147 -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 +100 -0
- package/dist/types/components/data-table/table-component-batch-actions.stories.d.ts +98 -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 +147 -0
- package/dist/types/components/data-table/table-component-event-listeners.stories.d.ts +87 -0
- package/dist/types/components/data-table/table-component-expandable-rows.stories.d.ts +87 -0
- package/dist/types/components/data-table/table-component-filtering.stories.d.ts +100 -0
- package/dist/types/components/data-table/table-component-multiselect.stories.d.ts +100 -0
- package/dist/types/components/data-table/table-component-pagination.stories.d.ts +100 -0
- package/dist/types/components/data-table/table-component-sorting.stories.d.ts +79 -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 +45 -0
- package/dist/types/components/data-table/table-toolbar/table-toolbar.d.ts +22 -0
- package/dist/types/components/datetime/datetime.d.ts +32 -0
- package/dist/types/components/datetime/datetime.stories.d.ts +80 -0
- package/dist/types/components/divider/divider.stories.d.ts +72 -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 +115 -0
- package/dist/types/components/dropdown/dropdown-wc-multiselect.stories.d.ts +115 -0
- package/dist/types/components/dropdown/dropdown.d.ts +56 -0
- package/dist/types/components/footer/footer.stories.d.ts +23 -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/message/message.stories.d.ts +67 -0
- package/dist/types/components/modal/modal-native.stories.d.ts +51 -0
- package/dist/types/components/modal/modal-webcomponent.stories.d.ts +44 -0
- package/dist/types/components/modal/modal.d.ts +16 -0
- package/dist/types/components/popover-canvas/popover-canvas.d.ts +18 -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 +18 -0
- package/dist/types/components/popover-menu/popover-menu.stories.d.ts +27 -0
- package/dist/types/components/radio-button/radio-button.stories.d.ts +41 -0
- package/dist/types/components/side-menu/side-menu.stories.d.ts +42 -0
- package/dist/types/components/slider/slider.d.ts +82 -0
- package/dist/types/components/slider/slider.stories.d.ts +156 -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-tabs.d.ts +41 -0
- package/dist/types/components/tabs/inline-tabs-default/inline-tabs.stories.d.ts +41 -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 +25 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +18 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.stories.d.ts +13 -0
- package/dist/types/components/textarea/textarea.d.ts +41 -0
- package/dist/types/components/textarea/textarea.stories.d.ts +111 -0
- package/dist/types/components/textfield/textfield.d.ts +42 -0
- package/dist/types/components/textfield/textfield.stories.d.ts +176 -0
- package/dist/types/components/toast/toast.stories.d.ts +58 -0
- package/dist/types/components/toggle/toggle.stories.d.ts +42 -0
- package/dist/types/components/tooltip/tooltip.d.ts +20 -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 +1752 -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 +86 -0
- package/readme.md +51 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import CardImage from '../../stories/assets/image/card-img.png';
|
|
2
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Card',
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'centered',
|
|
7
|
+
design: [
|
|
8
|
+
{
|
|
9
|
+
name: 'Figma',
|
|
10
|
+
type: 'figma',
|
|
11
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=2891%3A125&t=rVXuTOgTmXPauyHd-1',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'Link',
|
|
15
|
+
type: 'link',
|
|
16
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=2891%3A125&t=rVXuTOgTmXPauyHd-1',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
argTypes: {
|
|
21
|
+
headline: {
|
|
22
|
+
name: 'Header text',
|
|
23
|
+
description: 'The header text',
|
|
24
|
+
control: {
|
|
25
|
+
type: 'text',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
subheadline: {
|
|
29
|
+
name: 'Subheader text',
|
|
30
|
+
description: 'The subheader text',
|
|
31
|
+
control: {
|
|
32
|
+
type: 'text',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
text: {
|
|
36
|
+
name: 'Body text',
|
|
37
|
+
description: 'The body text for the card',
|
|
38
|
+
control: {
|
|
39
|
+
type: 'text',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
divider: {
|
|
43
|
+
name: 'Divider',
|
|
44
|
+
description: 'Add a divider to the card',
|
|
45
|
+
control: {
|
|
46
|
+
type: 'boolean',
|
|
47
|
+
},
|
|
48
|
+
table: {
|
|
49
|
+
defaultValue: { summary: false },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
footer: {
|
|
53
|
+
name: 'Footer',
|
|
54
|
+
description: 'The footer of the card',
|
|
55
|
+
control: {
|
|
56
|
+
type: 'text',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
clickable: {
|
|
60
|
+
name: 'Clickable',
|
|
61
|
+
description: 'Toggles if the card is clickable or not.',
|
|
62
|
+
control: {
|
|
63
|
+
type: 'boolean',
|
|
64
|
+
},
|
|
65
|
+
table: {
|
|
66
|
+
defaultValue: { summary: false },
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
image: {
|
|
70
|
+
name: 'Image',
|
|
71
|
+
description: 'Image on card',
|
|
72
|
+
control: {
|
|
73
|
+
type: 'boolean',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
imageTop: {
|
|
77
|
+
name: 'Image on top',
|
|
78
|
+
description: 'Sets the image on top',
|
|
79
|
+
control: {
|
|
80
|
+
type: 'boolean',
|
|
81
|
+
},
|
|
82
|
+
table: {
|
|
83
|
+
defaultValue: { summary: false },
|
|
84
|
+
},
|
|
85
|
+
if: { arg: 'image', eq: true },
|
|
86
|
+
},
|
|
87
|
+
avatar: {
|
|
88
|
+
name: 'Avatar',
|
|
89
|
+
description: 'An avatar image for the card',
|
|
90
|
+
control: {
|
|
91
|
+
type: 'boolean',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
args: {
|
|
96
|
+
headline: 'Header text',
|
|
97
|
+
subheadline: 'Subheader text',
|
|
98
|
+
text: '',
|
|
99
|
+
divider: false,
|
|
100
|
+
footer: '<sdds-icon style="font-size: 20px;" name="arrow_left"></sdds-icon>',
|
|
101
|
+
clickable: false,
|
|
102
|
+
image: false,
|
|
103
|
+
imageTop: false,
|
|
104
|
+
avatar: false,
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
const Template = ({ headline, subheadline, footer, clickable, text, divider, imageTop, avatar }) => formatHtmlPreview(`
|
|
108
|
+
<style>
|
|
109
|
+
/* demo-wrapper is for demonstration purposes only*/
|
|
110
|
+
.demo-wrapper {
|
|
111
|
+
width: 300px;
|
|
112
|
+
}
|
|
113
|
+
</style>
|
|
114
|
+
|
|
115
|
+
<div class="demo-wrapper">
|
|
116
|
+
<div class="sdds-card${clickable ? ' sdds-clickable' : ''}">
|
|
117
|
+
${imageTop === true
|
|
118
|
+
? `<img class="sdds-card-img" src="${CardImage}" alt="Add description to image"/>`
|
|
119
|
+
: ''}
|
|
120
|
+
<div class="${avatar ? 'sdds-card-header-avatar' : 'sdds-card-header'}">
|
|
121
|
+
${avatar
|
|
122
|
+
? `
|
|
123
|
+
<div class="sdds-card-avatar">
|
|
124
|
+
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="18" cy="18" r="18" fill="#E2E2E4"/></svg>
|
|
125
|
+
</div>`
|
|
126
|
+
: ''}
|
|
127
|
+
${avatar
|
|
128
|
+
? `<div class="sdds-card-headlines">
|
|
129
|
+
${headline ? `<h6 class="sdds-card-headline">${headline}</h6>` : ''}
|
|
130
|
+
${subheadline ? `<h6 class="sdds-card-sub-headline" >${subheadline}</h6>` : ''}
|
|
131
|
+
</div>`
|
|
132
|
+
: `${headline ? `<h6 class="sdds-card-headline">${headline}</h6>` : ''}
|
|
133
|
+
${subheadline ? `<h6 class="sdds-card-sub-headline" >${subheadline}</h6>` : ''}
|
|
134
|
+
`}
|
|
135
|
+
</div>
|
|
136
|
+
${imageTop === false
|
|
137
|
+
? `<img class="sdds-card-img" src="${CardImage}" alt="Add description to image"/>`
|
|
138
|
+
: ''}
|
|
139
|
+
${divider ? '<div class="sdds-divider-light-border-top"></div>' : ''}
|
|
140
|
+
${text ? `<div class="sdds-card-body">${text}</div>` : ''}
|
|
141
|
+
${footer ? `<div class="sdds-card-footer">${footer}</div>` : ''}
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
`);
|
|
145
|
+
export const Default = Template.bind({});
|
|
146
|
+
Default.args = {};
|
|
147
|
+
export const SupportText = Template.bind({});
|
|
148
|
+
SupportText.args = {
|
|
149
|
+
text: 'This is a short and consist detail text describing for the user what this text is really about.',
|
|
150
|
+
};
|
|
151
|
+
export const Divider = Template.bind({});
|
|
152
|
+
Divider.args = {
|
|
153
|
+
divider: true,
|
|
154
|
+
text: 'This is a short and consist detail text describing for the user what this text is really about.',
|
|
155
|
+
};
|
|
156
|
+
export const Link = Template.bind({});
|
|
157
|
+
Link.args = {
|
|
158
|
+
divider: true,
|
|
159
|
+
text: 'This is a short and consist detail text describing for the user what this text is really about.',
|
|
160
|
+
footer: '<a class="sdds-link sdds-link--no-underline" href="#">Link text</a><a class="sdds-link sdds-link--no-underline" href="#">Link text</a>',
|
|
161
|
+
};
|
|
162
|
+
export const Button = Template.bind({});
|
|
163
|
+
Button.args = {
|
|
164
|
+
divider: true,
|
|
165
|
+
text: 'This is a short and consist detail text describing for the user what this text is really about.',
|
|
166
|
+
footer: '<button class="sdds-btn sdds-btn-sm sdds-btn-primary">Button text</button>',
|
|
167
|
+
};
|
|
168
|
+
export const Image = Template.bind({});
|
|
169
|
+
Image.args = {
|
|
170
|
+
divider: true,
|
|
171
|
+
text: 'This is a short and consist detail text describing for the user what this text is really about.',
|
|
172
|
+
image: true,
|
|
173
|
+
imageTop: true,
|
|
174
|
+
};
|
|
175
|
+
export const Avatar = Template.bind({});
|
|
176
|
+
Avatar.args = {
|
|
177
|
+
avatar: true,
|
|
178
|
+
divider: false,
|
|
179
|
+
text: 'This is a short and consist detail text describing for the user what this text is really about.',
|
|
180
|
+
imageTop: false,
|
|
181
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Components/Checkbox',
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: 'centered',
|
|
6
|
+
design: [
|
|
7
|
+
{
|
|
8
|
+
name: 'Figma',
|
|
9
|
+
type: 'figma',
|
|
10
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=9266%3A17409&t=rVXuTOgTmXPauyHd-1',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'Link',
|
|
14
|
+
type: 'link',
|
|
15
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=9266%3A17409&t=rVXuTOgTmXPauyHd-1',
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
argTypes: {
|
|
20
|
+
disabled: {
|
|
21
|
+
name: 'Disabled',
|
|
22
|
+
description: 'Disables the checkbox',
|
|
23
|
+
control: {
|
|
24
|
+
type: 'boolean',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
checked: {
|
|
28
|
+
name: 'Checked',
|
|
29
|
+
description: 'Checks the checkbox',
|
|
30
|
+
control: {
|
|
31
|
+
type: 'boolean',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
label: {
|
|
35
|
+
name: 'Label text',
|
|
36
|
+
description: 'The label of the component',
|
|
37
|
+
type: 'string',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
args: {
|
|
41
|
+
disabled: false,
|
|
42
|
+
checked: false,
|
|
43
|
+
label: 'Label',
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
const Template = ({ checked, disabled, label }) => formatHtmlPreview(`
|
|
47
|
+
<div class="sdds-checkbox-item">
|
|
48
|
+
<input class="sdds-form-input" type="checkbox" id="unique-id" ${checked ? 'checked="checked"' : ''} ${disabled ? 'disabled' : ''}>
|
|
49
|
+
${label
|
|
50
|
+
? `<label class="sdds-form-label" for="unique-id" ${disabled ? 'disabled' : ''}> ${label} </label>`
|
|
51
|
+
: ''}
|
|
52
|
+
</div>
|
|
53
|
+
`);
|
|
54
|
+
export const Default = Template.bind({});
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Components/Chips',
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: 'centered',
|
|
6
|
+
design: [
|
|
7
|
+
{
|
|
8
|
+
name: 'Figma',
|
|
9
|
+
type: 'figma',
|
|
10
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=11268%3A39456&t=rVXuTOgTmXPauyHd-1',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'Link',
|
|
14
|
+
type: 'link',
|
|
15
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=11268%3A39456&t=rVXuTOgTmXPauyHd-1',
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
argTypes: {
|
|
20
|
+
placeholderText: {
|
|
21
|
+
name: 'Placeholder',
|
|
22
|
+
description: 'Set custom chip text',
|
|
23
|
+
control: {
|
|
24
|
+
type: 'text',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
icon: {
|
|
28
|
+
name: 'Icon',
|
|
29
|
+
description: 'Add an icon to the chip.',
|
|
30
|
+
control: {
|
|
31
|
+
type: 'boolean',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
iconType: {
|
|
35
|
+
name: 'Icon type',
|
|
36
|
+
description: 'Choose what icon type to use',
|
|
37
|
+
control: {
|
|
38
|
+
type: 'radio',
|
|
39
|
+
},
|
|
40
|
+
options: ['Native', 'Webcomponent'],
|
|
41
|
+
if: { arg: 'icon', eq: true },
|
|
42
|
+
},
|
|
43
|
+
iconPosition: {
|
|
44
|
+
name: 'Icon position',
|
|
45
|
+
description: 'Set the placement of the icon',
|
|
46
|
+
control: {
|
|
47
|
+
type: 'radio',
|
|
48
|
+
},
|
|
49
|
+
options: ['Icon left', 'Icon right'],
|
|
50
|
+
if: { arg: 'icon', eq: true },
|
|
51
|
+
},
|
|
52
|
+
state: {
|
|
53
|
+
name: 'State',
|
|
54
|
+
description: 'Set the chips state as active or default',
|
|
55
|
+
control: {
|
|
56
|
+
type: 'radio',
|
|
57
|
+
},
|
|
58
|
+
options: ['Default', 'Active'],
|
|
59
|
+
},
|
|
60
|
+
size: {
|
|
61
|
+
name: 'Size',
|
|
62
|
+
description: 'Set the chip size',
|
|
63
|
+
control: {
|
|
64
|
+
type: 'radio',
|
|
65
|
+
},
|
|
66
|
+
options: ['Default', 'Small'],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
args: {
|
|
70
|
+
placeholderText: 'Chip text',
|
|
71
|
+
icon: false,
|
|
72
|
+
iconType: 'Native',
|
|
73
|
+
iconPosition: 'Icon right',
|
|
74
|
+
state: 'Default',
|
|
75
|
+
size: 'Default',
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
const Template = ({ icon, iconPosition, iconType, state, placeholderText, size }) => {
|
|
79
|
+
const stateValue = state === 'Active' ? 'sdds-chip__active' : '';
|
|
80
|
+
const sizeValue = size === 'Small' ? 'sdds-chip-sm' : '';
|
|
81
|
+
const iconPositionLookup = {
|
|
82
|
+
'Icon left': 'sdds-chip__icon-left',
|
|
83
|
+
'Icon right': 'sdds-chip__icon-right',
|
|
84
|
+
};
|
|
85
|
+
// TODO - Add dark theme to story
|
|
86
|
+
const iconSvg = `
|
|
87
|
+
${iconType === 'Native'
|
|
88
|
+
? '<i class="sdds-chip-icon sdds-icon notification"></i>'
|
|
89
|
+
: '<sdds-icon class="sdds-chip-icon" name="notification" size="16px"></sdds-icon>'}
|
|
90
|
+
`;
|
|
91
|
+
return formatHtmlPreview(`
|
|
92
|
+
${iconType === 'Native'
|
|
93
|
+
? `<style>
|
|
94
|
+
/* Note: In case you are using WebFont icons, please make sure to import icons css file in your implementation */
|
|
95
|
+
@import url('https://cdn.digitaldesign.scania.com/icons/webfont/css/sdds-icons.css');
|
|
96
|
+
|
|
97
|
+
</style>`
|
|
98
|
+
: ''}
|
|
99
|
+
|
|
100
|
+
<div class="sdds-chip ${icon ? iconPositionLookup[iconPosition] : ''} ${stateValue} ${sizeValue}">
|
|
101
|
+
${icon ? iconSvg : ''}<span class="sdds-chip-text">${placeholderText}</span>
|
|
102
|
+
</div>
|
|
103
|
+
`);
|
|
104
|
+
};
|
|
105
|
+
export const Default = Template.bind({});
|
|
106
|
+
Default.args = {};
|
|
107
|
+
export const IconRight = Template.bind({});
|
|
108
|
+
IconRight.args = {
|
|
109
|
+
icon: true,
|
|
110
|
+
iconPosition: 'Icon right',
|
|
111
|
+
};
|
|
112
|
+
export const IconLeft = Template.bind({});
|
|
113
|
+
IconLeft.args = {
|
|
114
|
+
icon: true,
|
|
115
|
+
iconPosition: 'Icon left',
|
|
116
|
+
};
|
|
117
|
+
export const Active = Template.bind({});
|
|
118
|
+
Active.args = {
|
|
119
|
+
state: 'Active',
|
|
120
|
+
};
|
|
121
|
+
export const Small = Template.bind({});
|
|
122
|
+
Small.args = {
|
|
123
|
+
size: 'Small',
|
|
124
|
+
};
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Components/Data Table/Native',
|
|
4
|
+
argTypes: {
|
|
5
|
+
tableTitle: {
|
|
6
|
+
name: 'Table title',
|
|
7
|
+
description: 'Text that appears in table caption area.',
|
|
8
|
+
control: {
|
|
9
|
+
type: 'text',
|
|
10
|
+
},
|
|
11
|
+
table: {
|
|
12
|
+
defaultValue: {
|
|
13
|
+
summary: '',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
isCompact: {
|
|
18
|
+
name: 'Compact design',
|
|
19
|
+
description: 'Enables compact design of the table, rows with less height.',
|
|
20
|
+
control: {
|
|
21
|
+
type: 'boolean',
|
|
22
|
+
},
|
|
23
|
+
table: {
|
|
24
|
+
defaultValue: {
|
|
25
|
+
summary: false,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
dividers: {
|
|
30
|
+
name: 'Vertical dividers',
|
|
31
|
+
description: 'When enabled, table has vertical dividers between columns.',
|
|
32
|
+
control: {
|
|
33
|
+
type: 'boolean',
|
|
34
|
+
},
|
|
35
|
+
table: {
|
|
36
|
+
defaultValue: {
|
|
37
|
+
summary: false,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
onWhiteBG: {
|
|
42
|
+
name: 'On white background',
|
|
43
|
+
description: 'Changes BG color of table element to grey variation for better visibility on white layouts',
|
|
44
|
+
control: {
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
},
|
|
47
|
+
table: {
|
|
48
|
+
defaultValue: {
|
|
49
|
+
summary: false,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
responsiveTable: {
|
|
54
|
+
name: 'Responsive table',
|
|
55
|
+
description: 'Table takes 100% of available width. For column values less then 192px, "No minimum width" has to be enabled too. ',
|
|
56
|
+
control: {
|
|
57
|
+
type: 'boolean',
|
|
58
|
+
},
|
|
59
|
+
table: {
|
|
60
|
+
defaultValue: {
|
|
61
|
+
summary: false,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
noMinWidthArg: {
|
|
66
|
+
name: 'No minimum width',
|
|
67
|
+
description: 'Resets min-width rule and enabled setting column width value less then 192px which is default one. When enabled, controls for columns width will show here.',
|
|
68
|
+
control: {
|
|
69
|
+
type: 'boolean',
|
|
70
|
+
},
|
|
71
|
+
table: {
|
|
72
|
+
defaultValue: {
|
|
73
|
+
summary: false,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
column1Width: {
|
|
78
|
+
name: 'Column 1 width',
|
|
79
|
+
description: 'Value of width for column 1. In order to work correctly "No minimum width" has to be enabled too. When editing please provide a unit too next tot the value, eg. 200px.',
|
|
80
|
+
type: 'string',
|
|
81
|
+
table: {
|
|
82
|
+
defaultValue: {
|
|
83
|
+
summary: '192px',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
if: { arg: 'noMinWidthArg', eq: true },
|
|
87
|
+
},
|
|
88
|
+
column2Width: {
|
|
89
|
+
name: 'Column 2 width',
|
|
90
|
+
description: 'Value of width for column 2. In order to work correctly "No minimum width" has to be enabled too. When editing please provide a unit too next tot the value, eg. 200px.',
|
|
91
|
+
type: 'string',
|
|
92
|
+
table: {
|
|
93
|
+
defaultValue: {
|
|
94
|
+
summary: '192px',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
if: { arg: 'noMinWidthArg', eq: true },
|
|
98
|
+
},
|
|
99
|
+
column3Width: {
|
|
100
|
+
name: 'Column 3 width',
|
|
101
|
+
description: 'Value of width for column 3. In order to work correctly "No minimum width" has to be enabled too. When editing please provide a unit too next tot the value, eg. 200px.',
|
|
102
|
+
type: 'string',
|
|
103
|
+
table: {
|
|
104
|
+
defaultValue: {
|
|
105
|
+
summary: '192px',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
if: { arg: 'noMinWidthArg', eq: true },
|
|
109
|
+
},
|
|
110
|
+
column4Width: {
|
|
111
|
+
name: 'Column 4 width',
|
|
112
|
+
description: 'Value of width for column 4. In order to work correctly "No minimum width" has to be enabled too. When editing please provide a unit too next tot the value, eg. 200px.',
|
|
113
|
+
type: 'string',
|
|
114
|
+
table: {
|
|
115
|
+
defaultValue: {
|
|
116
|
+
summary: '192px',
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
if: { arg: 'noMinWidthArg', eq: true },
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
args: {
|
|
123
|
+
tableTitle: 'Native table',
|
|
124
|
+
isCompact: false,
|
|
125
|
+
dividers: false,
|
|
126
|
+
onWhiteBG: false,
|
|
127
|
+
noMinWidthArg: false,
|
|
128
|
+
responsiveTable: false,
|
|
129
|
+
column1Width: '',
|
|
130
|
+
column2Width: '',
|
|
131
|
+
column3Width: '',
|
|
132
|
+
column4Width: '',
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
const Template = (args) => formatHtmlPreview(`
|
|
136
|
+
<table class="
|
|
137
|
+
sdds-table
|
|
138
|
+
${args.isCompact ? 'sdds-table--compact' : ''}
|
|
139
|
+
${args.dividers ? 'sdds-table--divider' : ''}
|
|
140
|
+
${args.onWhiteBG ? 'sdds-table--on-white-bg' : ''}
|
|
141
|
+
${args.noMinWidthArg ? 'sdds-table--no-min-width' : ''}
|
|
142
|
+
${args.responsiveTable ? 'sdds-table--responsive' : ''}
|
|
143
|
+
" >
|
|
144
|
+
${args.tableTitle && `<caption class="sdds-table__title">${args.tableTitle}</caption>`}
|
|
145
|
+
<thead class="sdds-table__header">
|
|
146
|
+
<tr class="sdds-table__row">
|
|
147
|
+
<th class="sdds-table__header-cell" ${args.column1Width ? `style="width: ${args.column1Width};"` : ''}>Header</th>
|
|
148
|
+
<th class="sdds-table__header-cell" ${args.column2Width ? `style="width: ${args.column2Width};"` : ''}>Header</th>
|
|
149
|
+
<th class="sdds-table__header-cell" ${args.column3Width ? `style="width: ${args.column3Width};"` : ''}>Header</th>
|
|
150
|
+
<th class="sdds-table__header-cell" ${args.column4Width ? `style="width: ${args.column4Width};"` : ''}>Header</th>
|
|
151
|
+
</tr>
|
|
152
|
+
</thead>
|
|
153
|
+
<tbody class="sdds-table__body">
|
|
154
|
+
<tr class="sdds-table__row">
|
|
155
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
156
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
157
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
158
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
159
|
+
</tr>
|
|
160
|
+
<tr class="sdds-table__row">
|
|
161
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
162
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
163
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
164
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
165
|
+
</tr>
|
|
166
|
+
<tr class="sdds-table__row">
|
|
167
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
168
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
169
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
170
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
171
|
+
</tr>
|
|
172
|
+
<tr class="sdds-table__row">
|
|
173
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
174
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
175
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
176
|
+
<td class="sdds-table__body-cell">Text</td>
|
|
177
|
+
</tr>
|
|
178
|
+
</tbody>
|
|
179
|
+
</table>
|
|
180
|
+
`);
|
|
181
|
+
export const Default = Template.bind({});
|
|
182
|
+
Default.args = {};
|