@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,124 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const tableHeaderCss = ":root,.sdds-mode-light{--sdds-checkbox-color:var(--sdds-grey-900);--sdds-checkbox-interaction-01:var(--sdds-blue-800);--sdds-checkbox-interaction-02:var(--sdds-white);--sdds-checkbox-background-hover:var(--sdds-blue-800);--sdds-checkbox-background-focus:var(--sdds-blue-800);--sdds-checkbox-disabled:var(--sdds-grey-400);--sdds-checkbox-background-img:url(\"data:image/svg+xml;utf8,<svg width='8' height='6' viewBox='0 0 8 6' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M1 2.33333L3.4 5C4.80589 3.4379 5.59411 2.5621 7 1' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round'/></svg>\");--sdds-checkbox-background-img-disabled:url(\"data:image/svg+xml;utf8,<svg width='8' height='6' viewBox='0 0 8 6' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M1 2.33333L3.4 5C4.80589 3.4379 5.59411 2.5621 7 1' stroke='%23b0b7c4' stroke-linecap='round' stroke-linejoin='round'/></svg>\");--sdds-checkbox-border-color-disabled-after:var(--sdds-grey-500);--sdds-checkbox-color-disabled-after:var(--sdds-grey-500)}:root .sdds-mode-dark,.sdds-mode-light .sdds-mode-dark{--sdds-checkbox-color:var(--sdds-white);--sdds-checkbox-interaction-01:var(--sdds-white);--sdds-checkbox-interaction-02:var(--sdds-grey-958);--sdds-checkbox-background-hover:white;--sdds-checkbox-background-focus:white;--sdds-checkbox-disabled:white;--sdds-checkbox-background-img:url(\"data:image/svg+xml;utf8,<svg width='8' height='6' viewBox='0 0 8 6' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M1 2.33333L3.4 5C4.80589 3.4379 5.59411 2.5621 7 1' stroke='%230D0F13' stroke-linecap='round' stroke-linejoin='round'/></svg>\");--sdds-checkbox-background-img-disabled:url(\"data:image/svg+xml;utf8,<svg width='8' height='6' viewBox='0 0 8 6' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M1 2.33333L3.4 5C4.80589 3.4379 5.59411 2.5621 7 1' stroke='%2356657A' stroke-linecap='round' stroke-linejoin='round'/></svg>\");--sdds-checkbox-border-color-disabled-after:var(--sdds-grey-700);--sdds-checkbox-color-disabled-after:var(--sdds-grey-700)}.sdds-checkbox-item{box-sizing:border-box;font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls);color:var(--sdds-checkbox-text);display:flex;align-items:center;margin-left:-4px}.sdds-checkbox-item *{box-sizing:border-box}.sdds-checkbox-item .sdds-form-input[type=checkbox]{appearance:none;outline:none;margin:0;border:0;border-radius:2px;width:24px;height:24px;position:relative;cursor:pointer}.sdds-checkbox-item .sdds-form-input[type=checkbox]+label{color:var(--sdds-checkbox-color);padding-left:var(--sdds-spacing-element-4);padding-top:var(--sdds-spacing-element-4);padding-bottom:var(--sdds-spacing-element-4);cursor:pointer}.sdds-checkbox-item .sdds-form-input[type=checkbox]::before,.sdds-checkbox-item .sdds-form-input[type=checkbox]::after{content:\"\";position:absolute;box-sizing:border-box;border-radius:2px}.sdds-checkbox-item .sdds-form-input[type=checkbox]::before{width:24px;height:24px;left:0;top:0}.sdds-checkbox-item .sdds-form-input[type=checkbox]::after{border:1px solid var(--sdds-checkbox-interaction-01);background-color:var(--sdds-checkbox-interaction-02);width:16px;height:16px;left:4px;top:4px}.sdds-checkbox-item .sdds-form-input[type=checkbox]:hover::before{background-color:var(--sdds-checkbox-background-hover);opacity:0.12}.sdds-checkbox-item .sdds-form-input[type=checkbox]:focus::before{background-color:var(--sdds-checkbox-background-focus);opacity:0.24;transition:opacity 0.2s ease-in-out}.sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled,.sdds-checkbox-item .sdds-form-input[type=checkbox].disabled{cursor:not-allowed}.sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled::after,.sdds-checkbox-item .sdds-form-input[type=checkbox].disabled::after{border-color:var(--sdds-checkbox-border-color-disabled-after)}.sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled+label,.sdds-checkbox-item .sdds-form-input[type=checkbox].disabled+label{color:var(--sdds-grey-600);cursor:not-allowed}.sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled:hover::before,.sdds-checkbox-item .sdds-form-input[type=checkbox].disabled:hover::before{display:none}.sdds-form-input[type=checkbox]:checked::after{background-image:var(--sdds-checkbox-background-img);background-color:var(--sdds-checkbox-interaction-01);background-repeat:no-repeat;background-position:center}.sdds-form-input[type=checkbox]:checked:disabled:hover::before,.sdds-form-input[type=checkbox]:checked:disabled::before,.sdds-form-input[type=checkbox]:checked.disabled:hover::before,.sdds-form-input[type=checkbox]:checked.disabled::before{display:block;width:16px;height:16px;left:4px;top:4px;border:1px solid #b0b7c4}.sdds-form-input[type=checkbox]:checked:disabled::after,.sdds-form-input[type=checkbox]:checked.disabled::after{background-image:var(--sdds-checkbox-background-img-disabled);background-color:var(--sdds-checkbox-interaction-02);color:var(--sdds-checkbox-color-disabled-after)}:host{box-sizing:border-box;display:table-header-group}:host *{box-sizing:border-box}:host .sdds-table__header-cell--checkbox{font:var(--sdds-headline-07);letter-spacing:var(--sdds-headline-07-ls);display:table-cell;text-align:left;color:var(--sdds-data-table-color);background-color:var(--sdds-data-table-header-background);border-bottom:1px solid var(--sdds-data-table-divider);height:48px;box-sizing:border-box;overflow:hidden;transition:background-color 200ms ease;min-width:unset;width:48px;padding:0;border-top-left-radius:4px}:host .sdds-form-label--data-table{width:100%;height:48px;display:flex;justify-content:center;align-items:center;cursor:pointer}:host .sdds-table__expand-control-container{display:flex;justify-content:center;align-items:center;height:48px;cursor:pointer}:host .sdds-table__expand-control-container .sdds-table__expand-input{display:none}:host .sdds-table__expand-control-container .sdds-expandable-row-icon{height:20px;width:20px;transition:transform 200ms ease;transform:rotate(0)}:host .sdds-table__expand-control-container .sdds-expandable-row-icon--opened{transform:rotate(180deg)}:host ::slotted(sdds-header-cell:hover){background-color:var(--sdds-data-table-header-background-hover)}:host(.sdds-table--compact) .sdds-table__header-cell--checkbox{height:32px}:host(.sdds-table--compact) .sdds-form-label--data-table{height:32px}:host(.sdds-table--divider) .sdds-table__header-cell--checkbox{border-right:1px solid var(--sdds-data-table-divider)}:host(.sdds-table--toolbar-available) .sdds-table__header-cell--checkbox{border-top-left-radius:0}";
|
|
4
|
+
|
|
5
|
+
const relevantTableProps = [
|
|
6
|
+
'enableMultiselect',
|
|
7
|
+
'enableExpandableRows',
|
|
8
|
+
'verticalDividers',
|
|
9
|
+
'compactDesign',
|
|
10
|
+
'noMinWidth',
|
|
11
|
+
];
|
|
12
|
+
const TableHeaderRow = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.__registerHost();
|
|
16
|
+
this.__attachShadow();
|
|
17
|
+
this.mainCheckboxSelectedEvent = createEvent(this, "mainCheckboxSelectedEvent", 7);
|
|
18
|
+
this.enableMultiselect = false;
|
|
19
|
+
this.enableExpandableRows = false;
|
|
20
|
+
this.mainCheckboxSelected = false;
|
|
21
|
+
this.mainExpendSelected = false;
|
|
22
|
+
this.verticalDividers = false;
|
|
23
|
+
this.compactDesign = false;
|
|
24
|
+
this.noMinWidth = false;
|
|
25
|
+
this.whiteBackground = false;
|
|
26
|
+
this.enableToolbarDesign = false;
|
|
27
|
+
this.tableId = '';
|
|
28
|
+
}
|
|
29
|
+
tablePropsChangedEventListener(event) {
|
|
30
|
+
if (this.tableId === event.detail.tableId) {
|
|
31
|
+
event.detail.changed
|
|
32
|
+
.filter((changedProp) => relevantTableProps.includes(changedProp))
|
|
33
|
+
.forEach((changedProp) => {
|
|
34
|
+
if (typeof this[changedProp] === 'undefined') {
|
|
35
|
+
throw new Error(`Table prop is not supported: ${changedProp}`);
|
|
36
|
+
}
|
|
37
|
+
this[changedProp] = event.detail[changedProp];
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
updateMainCheckboxEventListener(event) {
|
|
42
|
+
const [receivedID, receivedMainCheckboxStatus] = event.detail;
|
|
43
|
+
if (this.tableId === receivedID) {
|
|
44
|
+
this.mainCheckboxSelected = receivedMainCheckboxStatus;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
singleRowExpandedEventListener(event) {
|
|
48
|
+
if (this.tableId === event.detail[0]) {
|
|
49
|
+
// TODO: Improve this logic. Why we get late repose in DOM?
|
|
50
|
+
setTimeout(() => {
|
|
51
|
+
this.bodyExpandClicked();
|
|
52
|
+
}, 100);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
bodyExpandClicked() {
|
|
56
|
+
const numberOfExtendRowsActive = this.host.parentElement
|
|
57
|
+
.querySelector('sdds-table-body')
|
|
58
|
+
.getElementsByClassName('sdds-table__row-extend--active').length;
|
|
59
|
+
const numberOfExtendRows = this.host.parentElement
|
|
60
|
+
.querySelector('sdds-table-body')
|
|
61
|
+
.getElementsByTagName('sdds-table-body-row-expendable').length;
|
|
62
|
+
if (numberOfExtendRows === numberOfExtendRowsActive) {
|
|
63
|
+
this.mainExpendSelected = true;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
this.mainExpendSelected = false;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
connectedCallback() {
|
|
70
|
+
this.tableEl = this.host.closest('sdds-table');
|
|
71
|
+
this.tableId = this.tableEl.tableId;
|
|
72
|
+
}
|
|
73
|
+
componentWillLoad() {
|
|
74
|
+
relevantTableProps.forEach((tablePropName) => {
|
|
75
|
+
this[tablePropName] = this.tableEl[tablePropName];
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
componentWillRender() {
|
|
79
|
+
this.enableToolbarDesign =
|
|
80
|
+
this.host.closest('sdds-table').getElementsByTagName('sdds-table-toolbar').length >= 1;
|
|
81
|
+
}
|
|
82
|
+
headCheckBoxClicked(event) {
|
|
83
|
+
this.mainCheckboxSelected = event.currentTarget.checked;
|
|
84
|
+
this.mainCheckboxSelectedEvent.emit([this.tableId, this.mainCheckboxSelected]);
|
|
85
|
+
}
|
|
86
|
+
render() {
|
|
87
|
+
return (h(Host, { class: {
|
|
88
|
+
'sdds-table--compact': this.compactDesign,
|
|
89
|
+
'sdds-table--divider': this.verticalDividers,
|
|
90
|
+
'sdds-table--toolbar-available': this.enableToolbarDesign,
|
|
91
|
+
} }, h("tr", null, this.enableMultiselect && (h("th", { class: "sdds-table__header-cell sdds-table__header-cell--checkbox" }, h("div", { class: "sdds-checkbox-item" }, h("label", { class: "sdds-form-label sdds-form-label--data-table" }, h("input", { class: "sdds-form-input", type: "checkbox", onChange: (e) => this.headCheckBoxClicked(e), checked: this.mainCheckboxSelected }))))), this.enableExpandableRows && (h("th", { class: "sdds-table__header-cell sdds-table__header-cell--checkbox" })), h("slot", null))));
|
|
92
|
+
}
|
|
93
|
+
get host() { return this; }
|
|
94
|
+
static get style() { return tableHeaderCss; }
|
|
95
|
+
}, [1, "sdds-table-header", {
|
|
96
|
+
"enableMultiselect": [32],
|
|
97
|
+
"enableExpandableRows": [32],
|
|
98
|
+
"mainCheckboxSelected": [32],
|
|
99
|
+
"mainExpendSelected": [32],
|
|
100
|
+
"verticalDividers": [32],
|
|
101
|
+
"compactDesign": [32],
|
|
102
|
+
"noMinWidth": [32],
|
|
103
|
+
"whiteBackground": [32],
|
|
104
|
+
"enableToolbarDesign": [32],
|
|
105
|
+
"tableId": [32]
|
|
106
|
+
}, [[16, "tablePropsChangedEvent", "tablePropsChangedEventListener"], [16, "updateMainCheckboxEvent", "updateMainCheckboxEventListener"], [16, "singleRowExpandedEvent", "singleRowExpandedEventListener"]]]);
|
|
107
|
+
function defineCustomElement$1() {
|
|
108
|
+
if (typeof customElements === "undefined") {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const components = ["sdds-table-header"];
|
|
112
|
+
components.forEach(tagName => { switch (tagName) {
|
|
113
|
+
case "sdds-table-header":
|
|
114
|
+
if (!customElements.get(tagName)) {
|
|
115
|
+
customElements.define(tagName, TableHeaderRow);
|
|
116
|
+
}
|
|
117
|
+
break;
|
|
118
|
+
} });
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const SddsTableHeader = TableHeaderRow;
|
|
122
|
+
const defineCustomElement = defineCustomElement$1;
|
|
123
|
+
|
|
124
|
+
export { SddsTableHeader, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SddsTableToolbar extends Components.SddsTableToolbar, HTMLElement {}
|
|
4
|
+
export const SddsTableToolbar: {
|
|
5
|
+
prototype: SddsTableToolbar;
|
|
6
|
+
new (): SddsTableToolbar;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const tableToolbarCss = ":host{box-sizing:border-box;display:table-caption;position:relative;background-color:var(--sdds-data-table-toolbar-background);color:var(--sdds-data-table-color);padding:0 var(--sdds-spacing-element-16);height:64px;border-top-left-radius:4px;border-top-right-radius:4px}:host *{box-sizing:border-box}:host .sdds-table__upper-bar-flex{width:100%;height:100%;display:flex;justify-content:space-between}:host .sdds-table__title{font:var(--sdds-headline-07);letter-spacing:var(--sdds-headline-07-ls);padding-top:var(--sdds-spacing-element-16);text-align:left}:host .sdds-table__actionbar{display:flex;align-self:center;gap:8px}:host .sdds-table__searchbar{display:flex;align-self:center;position:relative;height:40px;width:40px;border-radius:4px 4px 0 0;transition:background-color 250ms ease, width 250ms ease;overflow:hidden;background-color:transparent}:host .sdds-table__searchbar::after{content:\"\";width:100%;height:2px;position:absolute;bottom:0;background-color:var(--sdds-blue-400);transform:scaleX(0);transition:transform 150ms ease}:host .sdds-table__searchbar:focus-within::after{transform:scaleX(100%)}:host .sdds-table__searchbar:focus-within,:host .sdds-table__searchbar.sdds-table__searchbar--active{width:208px;background-color:var(--sdds-data-table-toolbar-searchbar-background)}:host .sdds-table__searchbar:focus-within:hover,:host .sdds-table__searchbar.sdds-table__searchbar--active:hover{background-color:var(--sdds-data-table-toolbar-searchbar-background)}:host .sdds-table__searchbar .sdds-table__searchbar-input{font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls);color:var(--sdds-data-table-color);z-index:1;width:100%;height:100%;border:none;padding:0 36px 0 16px;background-color:transparent;outline:none;cursor:pointer}:host .sdds-table__searchbar .sdds-table__searchbar-input :focus{background-color:var(--sdds-data-table-toolbar-searchbar-background)}:host .sdds-table__searchbar:hover{background-color:var(--sdds-data-table-toolbar-searchbar-background-hover)}:host .sdds-table__searchbar .sdds-table__searchbar-icon{z-index:0;position:absolute;right:9px;top:9px;width:20px;height:20px}:host(.sdds-table--compact){height:56px}";
|
|
4
|
+
|
|
5
|
+
const relevantTableProps = [
|
|
6
|
+
'compactDesign',
|
|
7
|
+
'noMinWidth',
|
|
8
|
+
'verticalDividers',
|
|
9
|
+
];
|
|
10
|
+
const TableToolbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.__registerHost();
|
|
14
|
+
this.__attachShadow();
|
|
15
|
+
this.tableFilteringTerm = createEvent(this, "tableFilteringTerm", 7);
|
|
16
|
+
this.tableTitle = '';
|
|
17
|
+
this.enableFiltering = false;
|
|
18
|
+
this.verticalDividers = false;
|
|
19
|
+
this.compactDesign = false;
|
|
20
|
+
this.noMinWidth = false;
|
|
21
|
+
this.whiteBackground = false;
|
|
22
|
+
this.tableId = '';
|
|
23
|
+
}
|
|
24
|
+
tablePropsChangedEventListener(event) {
|
|
25
|
+
if (this.tableId === event.detail.tableId) {
|
|
26
|
+
event.detail.changed
|
|
27
|
+
.filter((changedProp) => relevantTableProps.includes(changedProp))
|
|
28
|
+
.forEach((changedProp) => {
|
|
29
|
+
if (typeof this[changedProp] === 'undefined') {
|
|
30
|
+
throw new Error(`Table prop is not supported: ${changedProp}`);
|
|
31
|
+
}
|
|
32
|
+
this[changedProp] = event.detail[changedProp];
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
this.tableEl = this.host.closest('sdds-table');
|
|
38
|
+
this.tableId = this.tableEl.tableId;
|
|
39
|
+
}
|
|
40
|
+
componentWillLoad() {
|
|
41
|
+
relevantTableProps.forEach((tablePropName) => {
|
|
42
|
+
this[tablePropName] = this.tableEl[tablePropName];
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
searchFunction(event) {
|
|
46
|
+
const searchTerm = event.currentTarget.value.toLowerCase();
|
|
47
|
+
const sddsTableSearchBar = event.currentTarget.parentElement;
|
|
48
|
+
this.tableFilteringTerm.emit([this.tableId, searchTerm]);
|
|
49
|
+
if (searchTerm.length > 0) {
|
|
50
|
+
sddsTableSearchBar.classList.add('sdds-table__searchbar--active');
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
sddsTableSearchBar.classList.remove('sdds-table__searchbar--active');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
return (h(Host, { class: this.compactDesign ? 'sdds-table--compact' : '' }, h("div", { class: "sdds-table__upper-bar-flex" }, h("caption", { class: "sdds-table__title" }, this.tableTitle), h("div", { class: "sdds-table__actionbar" }, this.enableFiltering && (h("div", { class: "sdds-table__searchbar" }, h("input", { class: "sdds-table__searchbar-input", type: "text", onKeyUp: (event) => this.searchFunction(event) }), h("span", { class: "sdds-table__searchbar-icon" }, h("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M12.942 1.985c-6.051 0-10.957 4.905-10.957 10.957 0 6.051 4.906 10.957 10.957 10.957 2.666 0 5.109-.952 7.008-2.534l8.332 8.331a1 1 0 1 0 1.414-1.414l-8.331-8.331a10.912 10.912 0 0 0 2.534-7.01c0-6.05-4.905-10.956-10.957-10.956ZM3.985 12.942a8.957 8.957 0 1 1 17.914 0 8.957 8.957 0 0 1-17.914 0Z", fill: "currentColor" }))))), h("slot", { name: "sdds-table__actionbar" })))));
|
|
58
|
+
}
|
|
59
|
+
get host() { return this; }
|
|
60
|
+
static get style() { return tableToolbarCss; }
|
|
61
|
+
}, [1, "sdds-table-toolbar", {
|
|
62
|
+
"tableTitle": [513, "table-title"],
|
|
63
|
+
"enableFiltering": [516, "enable-filtering"],
|
|
64
|
+
"verticalDividers": [32],
|
|
65
|
+
"compactDesign": [32],
|
|
66
|
+
"noMinWidth": [32],
|
|
67
|
+
"whiteBackground": [32],
|
|
68
|
+
"tableId": [32]
|
|
69
|
+
}, [[16, "tablePropsChangedEvent", "tablePropsChangedEventListener"]]]);
|
|
70
|
+
function defineCustomElement$1() {
|
|
71
|
+
if (typeof customElements === "undefined") {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const components = ["sdds-table-toolbar"];
|
|
75
|
+
components.forEach(tagName => { switch (tagName) {
|
|
76
|
+
case "sdds-table-toolbar":
|
|
77
|
+
if (!customElements.get(tagName)) {
|
|
78
|
+
customElements.define(tagName, TableToolbar);
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
} });
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const SddsTableToolbar = TableToolbar;
|
|
85
|
+
const defineCustomElement = defineCustomElement$1;
|
|
86
|
+
|
|
87
|
+
export { SddsTableToolbar, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SddsTable extends Components.SddsTable, HTMLElement {}
|
|
4
|
+
export const SddsTable: {
|
|
5
|
+
prototype: SddsTable;
|
|
6
|
+
new (): SddsTable;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const tableCss = ":host,.sdds-table{border-collapse:collapse;display:table;box-sizing:border-box}:host *,.sdds-table *{box-sizing:border-box}:host(.sdds-table--responsive),.sdds-table--responsive{width:100%}";
|
|
4
|
+
|
|
5
|
+
const Table = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.tablePropsChangedEvent = createEvent(this, "tablePropsChangedEvent", 7);
|
|
11
|
+
this.verticalDividers = false;
|
|
12
|
+
this.compactDesign = false;
|
|
13
|
+
this.noMinWidth = undefined;
|
|
14
|
+
this.enableMultiselect = false;
|
|
15
|
+
this.enableExpandableRows = false;
|
|
16
|
+
this.enableResponsive = false;
|
|
17
|
+
this.modeVariant = null;
|
|
18
|
+
this.tableId = crypto.randomUUID();
|
|
19
|
+
}
|
|
20
|
+
emitTablePropsChangedEvent(changedValueName, changedValue) {
|
|
21
|
+
this.tablePropsChangedEvent.emit({
|
|
22
|
+
tableId: this.tableId,
|
|
23
|
+
changed: [changedValueName],
|
|
24
|
+
[changedValueName]: changedValue,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
enableMultiselectChanged(newValue) {
|
|
28
|
+
this.emitTablePropsChangedEvent('enableMultiselect', newValue);
|
|
29
|
+
}
|
|
30
|
+
enableExpandableRowsChanged(newValue) {
|
|
31
|
+
this.emitTablePropsChangedEvent('enableExpandableRows', newValue);
|
|
32
|
+
}
|
|
33
|
+
compactDesignChanged(newValue) {
|
|
34
|
+
this.emitTablePropsChangedEvent('compactDesign', newValue);
|
|
35
|
+
}
|
|
36
|
+
verticalDividersChanged(newValue) {
|
|
37
|
+
this.emitTablePropsChangedEvent('verticalDividers', newValue);
|
|
38
|
+
}
|
|
39
|
+
noMinWidthChanged(newValue) {
|
|
40
|
+
this.emitTablePropsChangedEvent('noMinWidth', newValue);
|
|
41
|
+
}
|
|
42
|
+
modeVariantChanged(newValue) {
|
|
43
|
+
this.emitTablePropsChangedEvent('modeVariant', newValue);
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
return (h(Host, { class: { 'sdds-table--responsive': this.enableResponsive } }, h("table", { class: {
|
|
47
|
+
'sdds-table': true,
|
|
48
|
+
'sdds-table--compact': this.compactDesign,
|
|
49
|
+
'sdds-table--divider': this.verticalDividers,
|
|
50
|
+
'sdds-table--no-min-width': this.noMinWidth,
|
|
51
|
+
'sdds-table--responsive': this.enableResponsive,
|
|
52
|
+
} }, h("slot", null))));
|
|
53
|
+
}
|
|
54
|
+
get host() { return this; }
|
|
55
|
+
static get watchers() { return {
|
|
56
|
+
"enableMultiselect": ["enableMultiselectChanged"],
|
|
57
|
+
"enableExpandableRows": ["enableExpandableRowsChanged"],
|
|
58
|
+
"compactDesign": ["compactDesignChanged"],
|
|
59
|
+
"verticalDividers": ["verticalDividersChanged"],
|
|
60
|
+
"noMinWidth": ["noMinWidthChanged"],
|
|
61
|
+
"modeVariant": ["modeVariantChanged"]
|
|
62
|
+
}; }
|
|
63
|
+
static get style() { return tableCss; }
|
|
64
|
+
}, [1, "sdds-table", {
|
|
65
|
+
"verticalDividers": [516, "vertical-dividers"],
|
|
66
|
+
"compactDesign": [516, "compact-design"],
|
|
67
|
+
"noMinWidth": [516, "no-min-width"],
|
|
68
|
+
"enableMultiselect": [516, "enable-multiselect"],
|
|
69
|
+
"enableExpandableRows": [516, "enable-expandable-rows"],
|
|
70
|
+
"enableResponsive": [516, "enable-responsive"],
|
|
71
|
+
"modeVariant": [513, "mode-variant"],
|
|
72
|
+
"tableId": [1, "table-id"]
|
|
73
|
+
}]);
|
|
74
|
+
function defineCustomElement$1() {
|
|
75
|
+
if (typeof customElements === "undefined") {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const components = ["sdds-table"];
|
|
79
|
+
components.forEach(tagName => { switch (tagName) {
|
|
80
|
+
case "sdds-table":
|
|
81
|
+
if (!customElements.get(tagName)) {
|
|
82
|
+
customElements.define(tagName, Table);
|
|
83
|
+
}
|
|
84
|
+
break;
|
|
85
|
+
} });
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const SddsTable = Table;
|
|
89
|
+
const defineCustomElement = defineCustomElement$1;
|
|
90
|
+
|
|
91
|
+
export { SddsTable, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SddsTextarea extends Components.SddsTextarea, HTMLElement {}
|
|
4
|
+
export const SddsTextarea: {
|
|
5
|
+
prototype: SddsTextarea;
|
|
6
|
+
new (): SddsTextarea;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './icon.js';
|
|
3
|
+
|
|
4
|
+
const textareaCss = ":root,.sdds-mode-light{--sdds-textarea-background-primary:var(--sdds-grey-50);--sdds-textarea-background-secondary:var(--sdds-white);--sdds-textarea-background:var(--sdds-textarea-background-primary);--sdds-textarea-color:var(--sdds-grey-868);--sdds-textarea-placeholder:var(--sdds-grey-500);--sdds-textarea-placeholder-focus-color:var(--sdds-grey-500);--sdds-textarea-disabled-color:var(--sdds-grey-400);--sdds-textarea-disabled-background:var(--sdds-white);--sdds-textarea-disabled-placeholder:var(--sdds-grey-400);--sdds-textarea-disabled-label:var(--sdds-grey-400);--sdds-textarea-label-color:var(--sdds-grey-958);--sdds-textarea-label-inside-color:var(--sdds-grey-700);--sdds-textarea-placeholder-focus-color:var(--sdds-grey-500);--sdds-textarea-helper:var(--sdds-grey-700);--sdds-textarea-helper-error:var(--sdds-negative);--sdds-textarea-bar:var(--sdds-blue-400);--sdds-textarea-bar-error:var(--sdds-negative);--sdds-textarea-textcounter:var(--sdds-grey-700);--sdds-textarea-textcounter-divider:var(--sdds-grey-500);--sdds-textarea-border-bottom:var(--sdds-grey-600);--sdds-textarea-border-bottom-hover:var(--sdds-grey-800);--sdds-textarea-border-bottom-success:var(--sdds-grey-958);--sdds-textarea-border-bottom-error:var(--sdds-negative);--sdds-textarea-icon-read-only-color:var(--sdds-grey-958);--sdds-textarea-icon-read-only-label-color:var(--sdds-grey-958);--sdds-textarea-resize-icon:var(--sdds-grey-500)}:root .sdds-mode-variant-primary,.sdds-mode-light .sdds-mode-variant-primary{--sdds-textarea-background:var(--sdds-textarea-background-primary)}:root .sdds-mode-variant-secondary,.sdds-mode-light .sdds-mode-variant-secondary{--sdds-textarea-background:var(--sdds-textarea-background-secondary)}.sdds-mode-dark{--sdds-textarea-background-primary:var(--sdds-grey-900);--sdds-textarea-background-secondary:var(--sdds-grey-868);--sdds-textarea-background:var(--sdds-textarea-background-primary);--sdds-textarea-color:var(--sdds-grey-200);--sdds-textarea-placeholder:var(--sdds-grey-600);--sdds-textarea-placeholder-focus-color:var(--sdds-grey-700);--sdds-textarea-disabled-color:var(--sdds-grey-800);--sdds-textarea-disabled-background:var(--sdds-grey-868);--sdds-textarea-disabled-placeholder:var(--sdds-grey-800);--sdds-textarea-disabled-label:var(--sdds-grey-700);--sdds-textarea-label-color:var(--sdds-grey-100);--sdds-textarea-label-inside-color:var(--sdds-grey-400);--sdds-textarea-placeholder-focus-color:var(--sdds-grey-700);--sdds-textarea-helper:var(--sdds-grey-600);--sdds-textarea-helper-error:var(--sdds-negative);--sdds-textarea-bar:var(--sdds-blue-400);--sdds-textarea-bar-error:var(--sdds-negative);--sdds-textarea-textcounter:var(--sdds-grey-600);--sdds-textarea-textcounter-divider:var(--sdds-grey-700);--sdds-textarea-border-bottom:var(--sdds-grey-600);--sdds-textarea-border-bottom-hover:var(--sdds-grey-400);--sdds-textarea-border-bottom-success:var(--sdds-grey-50);--sdds-textarea-border-bottom-error:var(--sdds-negative);--sdds-textarea-icon-read-only-color:var(--sdds-grey-100);--sdds-textarea-icon-read-only-label-color:var(--sdds-grey-50);--sdds-textarea-resize-icon:var(--sdds-grey-500)}.sdds-mode-dark .sdds-mode-variant-primary{--sdds-textarea-background:var(--sdds-textarea-background-primary)}.sdds-mode-dark .sdds-mode-variant-secondary{--sdds-textarea-background:var(--sdds-textarea-background-secondary)}.sdds-textarea-container{border-radius:4px 4px 0 0;position:relative;box-sizing:border-box;height:auto;width:100%;min-width:208px;display:inline-flex;background-color:transparent;flex-flow:row wrap;border-bottom:0}.sdds-textarea-container .sdds-textarea-wrapper{position:relative;width:unset;min-width:100%}.sdds-textarea-container:not(.sdds-textarea-disabled) .sdds-textarea-wrapper::before,.sdds-textarea-container:not(.sdds-textarea-disabled) .sdds-textarea-wrapper::after{content:\"\";height:2px;width:0;position:absolute;background:var(--sdds-textarea-bar);transition:0.35s ease all}.sdds-textarea-container:not(.sdds-textarea-disabled) .sdds-textarea-wrapper::before{left:50%}.sdds-textarea-container:not(.sdds-textarea-disabled) .sdds-textarea-wrapper::after{right:50%}.sdds-textarea-container:not(.sdds-textarea-disabled) .sdds-textarea-wrapper::after,.sdds-textarea-container:not(.sdds-textarea-disabled) .sdds-textarea-wrapper::before{top:calc(100% - 2px)}.sdds-textarea-input{border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--sdds-textarea-color);background-color:var(--sdds-textarea-background);font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls);padding:var(--sdds-spacing-element-20) var(--sdds-spacing-element-16);display:block;resize:vertical;border-bottom:1px solid var(--sdds-textarea-border-bottom);transition:border-bottom-color 200ms ease}.sdds-textarea-input::placeholder{opacity:1;color:var(--sdds-textarea-placeholder)}.sdds-textarea-input:focus::placeholder{color:var(--sdds-textarea-placeholder-focus-color)}.sdds-textarea-input:disabled{background-color:var(--sdds-textarea-disabled-background);color:var(--sdds-textarea-disabled-color);cursor:not-allowed}.sdds-textarea-input:disabled::placeholder{color:var(--sdds-textarea-disabled-placeholder)}.sdds-textarea-input:disabled~.sdds-textfield-label-inside{color:var(--sdds-textarea-disabled-label)}.sdds-textarea-input::-webkit-resizer{display:none}.sdds-textarea-input:hover{border-bottom-color:var(--sdds-textarea-border-bottom-hover)}.sdds-textarea-resizer-icon{color:var(--sdds-textarea-resize-icon);position:absolute;display:block;bottom:2px;right:1px;padding-bottom:2px;padding-right:2px;pointer-events:none;background-color:var(--sdds-textarea-background)}.sdds-textarea-resizer-icon svg{display:block}.sdds-textarea-label{font:var(--sdds-detail-05);letter-spacing:var(--sdds-detail-05-ls);display:block;z-index:1;margin-bottom:var(--sdds-spacing-element-8);color:var(--sdds-textarea-label-color)}.sdds-textarea-container.sdds-textarea-label-inside .sdds-textarea-label{font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls);transition:0.1s ease all;color:var(--sdds-textarea-label-inside-color);position:absolute;top:var(--sdds-spacing-element-20);left:var(--sdds-spacing-element-16)}.sdds-textarea-container.sdds-textarea-label-inside .sdds-textarea-input::placeholder{color:transparent}.sdds-textarea-container.sdds-textarea-label-inside .sdds-textarea-input ::placeholder{color:transparent}.sdds-textarea-container.sdds-textarea-label-inside .sdds-textarea-input:focus::placeholder{transition:color 0.35s ease;color:var(--sdds-textarea-placeholder-focus-color)}.sdds-textarea-container.sdds-textarea-focus.sdds-textarea-label-inside .sdds-textarea-label{font:var(--sdds-detail-07);letter-spacing:var(--sdds-detail-07-ls);top:var(--sdds-spacing-element-8)}.sdds-textarea-container.sdds-textarea-focus .sdds-textarea-wrapper::before,.sdds-textarea-container.sdds-textarea-focus .sdds-textarea-wrapper::after{width:50%}.sdds-textarea-container.sdds-textarea-data.sdds-textarea-label-inside .sdds-textarea-label{font:var(--sdds-detail-07);letter-spacing:var(--sdds-detail-07-ls);top:var(--sdds-spacing-element-8)}.sdds-textarea-textcounter{font:var(--sdds-detail-05);letter-spacing:var(--sdds-detail-05-ls);color:var(--sdds-textarea-textcounter);float:right;flex-basis:100%;text-align:right;padding-top:var(--sdds-spacing-element-4)}.sdds-textarea-textcounter .sdds-textfield-textcounter-divider{font:var(--sdds-detail-05);letter-spacing:var(--sdds-detail-05-ls);color:var(--sdds-textarea-textcounter-divider)}.sdds-textarea-helper{font:var(--sdds-detail-05);letter-spacing:var(--sdds-detail-05-ls);display:flex;gap:8px;align-items:center;padding-top:var(--sdds-spacing-element-4);color:var(--sdds-textarea-helper);flex-grow:2;flex-basis:auto}.sdds-textarea-helper~.sdds-textarea-textcounter{flex-basis:auto}.sdds-textarea-success .sdds-textarea-input{border-bottom-color:var(--sdds-textarea-border-bottom-success)}.sdds-textarea-error .sdds-textarea-input{border-bottom-color:var(--sdds-textarea-border-bottom-error)}.sdds-textarea-error .sdds-textarea-wrapper::after,.sdds-textarea-error .sdds-textarea-wrapper::before{background:var(--sdds-textarea-bar-error)}.sdds-textarea-error .sdds-textarea-helper{color:var(--sdds-textarea-helper-error)}.sdds-textarea-disabled .sdds-textarea-input{border-bottom-color:transparent}.sdds-textarea-disabled .sdds-textarea-label{color:var(--sdds-textarea-disabled-label)}.sdds-textarea-icon__readonly{display:none;position:absolute;right:18px;top:18px;color:var(--sdds-textarea-icon-read-only-color)}.sdds-textarea-icon__readonly-label{display:none;position:absolute;right:18px;top:48px;font:var(--sdds-detail-05);letter-spacing:var(--sdds-detail-05-ls);padding:8px;color:var(--sdds-textarea-icon-read-only-label-color);background-color:var(--sdds-textarea-icon-read-only-label-background);white-space:nowrap;border-radius:4px 0 4px 4px}.sdds-textarea-readonly{pointer-events:none}.sdds-textarea-readonly .sdds-textarea-icon__readonly{display:block}.sdds-textarea-readonly .sdds-textarea-icon__readonly:hover~.sdds-textarea-icon__readonly-label{display:block}.sdds-textarea-readonly .sdds-textfield-input{padding-right:54px;background-color:transparent}.sdds-textarea-readonly .sdds-textfield-container{background-color:transparent}";
|
|
5
|
+
|
|
6
|
+
const Textarea = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.sddsChange = createEvent(this, "sddsChange", 6);
|
|
11
|
+
this.sddsBlur = createEvent(this, "sddsBlur", 6);
|
|
12
|
+
this.sddsInput = createEvent(this, "sddsInput", 6);
|
|
13
|
+
this.sddsFocus = createEvent(this, "sddsFocus", 6);
|
|
14
|
+
this.label = '';
|
|
15
|
+
this.name = '';
|
|
16
|
+
this.helper = undefined;
|
|
17
|
+
this.cols = undefined;
|
|
18
|
+
this.rows = undefined;
|
|
19
|
+
this.labelPosition = 'no-label';
|
|
20
|
+
this.placeholder = '';
|
|
21
|
+
this.value = '';
|
|
22
|
+
this.disabled = false;
|
|
23
|
+
this.readOnly = false;
|
|
24
|
+
this.state = 'default';
|
|
25
|
+
this.maxLength = undefined;
|
|
26
|
+
this.modeVariant = null;
|
|
27
|
+
this.autoFocus = false;
|
|
28
|
+
this.focusInput = undefined;
|
|
29
|
+
}
|
|
30
|
+
handleChange(event) {
|
|
31
|
+
this.sddsChange.emit(event);
|
|
32
|
+
}
|
|
33
|
+
handleBlur(event) {
|
|
34
|
+
this.sddsBlur.emit(event);
|
|
35
|
+
this.focusInput = false;
|
|
36
|
+
}
|
|
37
|
+
// Data input event in value prop
|
|
38
|
+
handleInput(event) {
|
|
39
|
+
this.sddsInput.emit(event);
|
|
40
|
+
this.value = event.target.value;
|
|
41
|
+
}
|
|
42
|
+
/* Set the input as focus when clicking the whole textfield with suffix/prefix */
|
|
43
|
+
handleFocus(event) {
|
|
44
|
+
this.textEl.focus();
|
|
45
|
+
this.focusInput = true;
|
|
46
|
+
this.sddsFocus.emit(event);
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
var _a;
|
|
50
|
+
return (h("div", { class: `
|
|
51
|
+
sdds-textarea-container
|
|
52
|
+
${this.labelPosition === 'inside' ? 'sdds-textarea-label-inside' : ''}
|
|
53
|
+
${this.focusInput ? 'sdds-textarea-focus' : ''}
|
|
54
|
+
${this.disabled ? 'sdds-textarea-disabled' : ''}
|
|
55
|
+
${this.readOnly ? 'sdds-textarea-readonly' : ''}
|
|
56
|
+
${this.modeVariant !== null ? `sdds-mode-variant-${this.modeVariant}` : ''}
|
|
57
|
+
${this.value ? 'sdds-textarea-data' : ''}
|
|
58
|
+
${this.state === 'error' || this.state === 'success' ? `sdds-textarea-${this.state}` : ''}
|
|
59
|
+
` }, this.labelPosition !== 'no-label' && (h("span", { class: 'sdds-textarea-label' }, this.label)), h("div", { class: "sdds-textarea-wrapper" }, h("textarea", { class: 'sdds-textarea-input', ref: (inputEl) => (this.textEl = inputEl), disabled: this.disabled, readonly: this.readOnly, placeholder: this.placeholder, value: this.value, name: this.name, autofocus: this.autoFocus, maxlength: this.maxLength, cols: this.cols, rows: this.rows, onFocus: (event) => {
|
|
60
|
+
if (!this.readOnly) {
|
|
61
|
+
this.handleFocus(event);
|
|
62
|
+
}
|
|
63
|
+
}, onBlur: (event) => {
|
|
64
|
+
if (!this.readOnly) {
|
|
65
|
+
this.handleBlur(event);
|
|
66
|
+
}
|
|
67
|
+
}, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event) }), h("span", { class: "sdds-textarea-resizer-icon" }, h("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.8536 0.853553C12.0488 0.658291 12.0488 0.341709 11.8536 0.146447C11.6583 -0.0488155 11.3417 -0.0488155 11.1464 0.146447L0.146447 11.1464C-0.0488155 11.3417 -0.0488155 11.6583 0.146447 11.8536C0.341709 12.0488 0.658291 12.0488 0.853553 11.8536L11.8536 0.853553ZM11.8536 4.64645C12.0488 4.84171 12.0488 5.15829 11.8536 5.35355L5.35355 11.8536C5.15829 12.0488 4.84171 12.0488 4.64645 11.8536C4.45118 11.6583 4.45118 11.3417 4.64645 11.1464L11.1464 4.64645C11.3417 4.45118 11.6583 4.45118 11.8536 4.64645ZM11.8536 8.64645C12.0488 8.84171 12.0488 9.15829 11.8536 9.35355L9.35355 11.8536C9.15829 12.0488 8.84171 12.0488 8.64645 11.8536C8.45118 11.6583 8.45118 11.3417 8.64645 11.1464L11.1464 8.64645C11.3417 8.45118 11.6583 8.45118 11.8536 8.64645Z", fill: "currentColor" }))), h("span", { class: "sdds-textarea-icon__readonly" }, h("sdds-icon", { name: "edit_inactive" })), h("span", { class: "sdds-textarea-icon__readonly-label" }, "This field is non-editable")), h("span", { class: 'sdds-textarea-helper' }, this.state === 'error' && h("sdds-icon", { name: "error", size: "16px" }), this.helper), this.maxLength > 0 && (h("div", { class: 'sdds-textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { class: "sdds-textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
|
|
68
|
+
}
|
|
69
|
+
static get style() { return textareaCss; }
|
|
70
|
+
}, [0, "sdds-textarea", {
|
|
71
|
+
"label": [1],
|
|
72
|
+
"name": [1],
|
|
73
|
+
"helper": [1],
|
|
74
|
+
"cols": [2],
|
|
75
|
+
"rows": [2],
|
|
76
|
+
"labelPosition": [1, "label-position"],
|
|
77
|
+
"placeholder": [1],
|
|
78
|
+
"value": [1],
|
|
79
|
+
"disabled": [4],
|
|
80
|
+
"readOnly": [4, "read-only"],
|
|
81
|
+
"state": [1],
|
|
82
|
+
"maxLength": [2, "max-length"],
|
|
83
|
+
"modeVariant": [1, "mode-variant"],
|
|
84
|
+
"autoFocus": [4, "auto-focus"],
|
|
85
|
+
"focusInput": [32]
|
|
86
|
+
}]);
|
|
87
|
+
function defineCustomElement$1() {
|
|
88
|
+
if (typeof customElements === "undefined") {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const components = ["sdds-textarea", "sdds-icon"];
|
|
92
|
+
components.forEach(tagName => { switch (tagName) {
|
|
93
|
+
case "sdds-textarea":
|
|
94
|
+
if (!customElements.get(tagName)) {
|
|
95
|
+
customElements.define(tagName, Textarea);
|
|
96
|
+
}
|
|
97
|
+
break;
|
|
98
|
+
case "sdds-icon":
|
|
99
|
+
if (!customElements.get(tagName)) {
|
|
100
|
+
defineCustomElement$2();
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
} });
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const SddsTextarea = Textarea;
|
|
107
|
+
const defineCustomElement = defineCustomElement$1;
|
|
108
|
+
|
|
109
|
+
export { SddsTextarea, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SddsTextfield extends Components.SddsTextfield, HTMLElement {}
|
|
4
|
+
export const SddsTextfield: {
|
|
5
|
+
prototype: SddsTextfield;
|
|
6
|
+
new (): SddsTextfield;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|