@scania/tegel 0.0.9 → 0.0.11
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/README.md +3 -0
- package/dist/cjs/index-ee36ffa1.js +10 -14
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tds-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-badge.cjs.entry.js +3 -3
- package/dist/cjs/tds-banner.cjs.entry.js +13 -13
- package/dist/cjs/tds-breadcrumb.cjs.entry.js +2 -4
- package/dist/cjs/tds-breadcrumbs.cjs.entry.js +0 -3
- package/dist/cjs/tds-button.cjs.entry.js +20 -18
- package/dist/cjs/tds-card.cjs.entry.js +19 -23
- package/dist/cjs/tds-checkbox.cjs.entry.js +2 -1
- package/dist/cjs/tds-chip.cjs.entry.js +14 -3
- package/dist/cjs/tds-core-header-item_2.cjs.entry.js +1 -1
- package/dist/cjs/{tds-dropdown-option-v2.cjs.entry.js → tds-dropdown-option.cjs.entry.js} +5 -5
- package/dist/cjs/{tds-dropdown-v2.cjs.entry.js → tds-dropdown.cjs.entry.js} +31 -26
- package/dist/cjs/tds-folder-tab.cjs.entry.js +2 -3
- package/dist/cjs/tds-folder-tabs.cjs.entry.js +5 -5
- package/dist/cjs/tds-footer-group.cjs.entry.js +3 -3
- package/dist/cjs/tds-footer-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-footer.cjs.entry.js +6 -6
- package/dist/cjs/tds-header-cell.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-dropdown-list-item.cjs.entry.js +2 -2
- package/dist/cjs/tds-header-dropdown-list-user.cjs.entry.js +4 -4
- package/dist/cjs/tds-header-dropdown-list.cjs.entry.js +6 -6
- package/dist/cjs/tds-header-dropdown.cjs.entry.js +4 -3
- package/dist/cjs/tds-header-hamburger.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-launcher-button.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-launcher-grid-title.cjs.entry.js +3 -2
- package/dist/cjs/tds-header-launcher-grid.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-launcher-list-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-launcher-list-title.cjs.entry.js +3 -2
- package/dist/cjs/tds-header-launcher-list.cjs.entry.js +3 -2
- package/dist/cjs/tds-header-launcher.cjs.entry.js +2 -2
- package/dist/cjs/tds-header.cjs.entry.js +1 -1
- package/dist/cjs/tds-inline-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-inline-tabs.cjs.entry.js +5 -5
- package/dist/cjs/tds-link.cjs.entry.js +2 -2
- package/dist/cjs/tds-message.cjs.entry.js +6 -6
- package/dist/cjs/tds-modal.cjs.entry.js +13 -5
- package/dist/cjs/tds-navigation-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-navigation-tabs.cjs.entry.js +5 -5
- package/dist/cjs/tds-popover-canvas.cjs.entry.js +10 -80
- package/dist/{components/popper.js → cjs/tds-popover-core.cjs.entry.js} +166 -13
- package/dist/cjs/tds-popover-menu.cjs.entry.js +12 -62
- package/dist/cjs/tds-radio-button.cjs.entry.js +3 -2
- package/dist/cjs/tds-side-menu-close-button.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu.cjs.entry.js +2 -2
- package/dist/cjs/tds-slider.cjs.entry.js +16 -15
- package/dist/cjs/tds-stepper.cjs.entry.js +3 -2
- package/dist/cjs/tds-table-body.cjs.entry.js +4 -51
- package/dist/cjs/tds-table-footer.cjs.entry.js +47 -39
- package/dist/cjs/tds-table-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/tds-table.cjs.entry.js +2 -1
- package/dist/cjs/tds-text-field.cjs.entry.js +6 -2
- package/dist/cjs/tds-toast.cjs.entry.js +13 -28
- package/dist/cjs/tds-toggle.cjs.entry.js +2 -1
- package/dist/cjs/tds-tooltip.cjs.entry.js +41 -78
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/cjs/{utils-2beb1aa0.js → utils-a908536d.js} +33 -12
- package/dist/collection/collection-manifest.json +1 -3
- package/dist/collection/components/accordion/accordion-item/accordion-item.js +5 -1
- package/dist/collection/components/accordion/accordion.js +3 -0
- package/dist/collection/components/accordion/accordion.stories.js +100 -0
- package/dist/collection/components/badge/badge.js +4 -4
- package/dist/collection/components/badge/badge.stories.js +106 -0
- package/dist/collection/components/banner/banner.css +12 -9
- package/dist/collection/components/banner/banner.js +40 -24
- package/dist/collection/components/banner/banner.stories.js +107 -0
- package/dist/collection/components/block/block.js +3 -0
- package/dist/collection/components/block/block.stories.js +49 -0
- package/dist/collection/components/breadcrumbs/breadcrumb/breadcrumb.css +4 -4
- package/dist/collection/components/breadcrumbs/breadcrumb/breadcrumb.js +4 -21
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +3 -3
- package/dist/collection/components/breadcrumbs/breadcrumbs.stories.js +36 -0
- package/dist/collection/components/button/button.css +20 -14
- package/dist/collection/components/button/button.js +46 -23
- package/dist/collection/components/button/button.stories.js +185 -0
- package/dist/collection/components/card/card.css +18 -14
- package/dist/collection/components/card/card.js +32 -68
- package/dist/collection/components/card/card.stories.js +163 -0
- package/dist/collection/components/checkbox/checkbox.js +6 -2
- package/dist/collection/components/checkbox/checkbox.stories.js +80 -0
- package/dist/collection/components/chip/chip.css +23 -8
- package/dist/collection/components/chip/chip.js +19 -3
- package/dist/collection/components/chip/chip.stories.js +230 -0
- package/dist/collection/components/datetime/datetime.stories.js +195 -0
- package/dist/collection/components/divider/divider.stories.js +62 -0
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +145 -116
- package/dist/collection/components/dropdown/dropdown.css +212 -386
- package/dist/collection/components/dropdown/dropdown.js +480 -329
- package/dist/collection/components/dropdown/dropdown.stories.js +268 -0
- package/dist/collection/components/footer/footer-group/footer-group.css +3 -3
- package/dist/collection/components/footer/footer-group/footer-group.js +5 -2
- package/dist/collection/components/footer/footer-item/footer-item.css +16 -8
- package/dist/collection/components/footer/footer-item/footer-item.js +3 -0
- package/dist/collection/components/footer/footer.css +9 -12
- package/dist/collection/components/footer/footer.js +10 -10
- package/dist/collection/components/footer/footer.stories.js +145 -0
- package/dist/collection/components/header/core-header-item/core-header-item.js +3 -0
- package/dist/collection/components/header/header-brand-symbol/header-brand-symbol.js +3 -0
- package/dist/collection/components/header/header-dropdown/header-dropdown.js +11 -5
- package/dist/collection/components/header/header-dropdown-list/header-dropdown-list.css +2 -2
- package/dist/collection/components/header/header-dropdown-list/header-dropdown-list.js +10 -7
- package/dist/collection/components/header/header-dropdown-list-item/header-dropdown-list-item.css +3 -3
- package/dist/collection/components/header/header-dropdown-list-item/header-dropdown-list-item.js +7 -4
- package/dist/collection/components/header/header-dropdown-list-user/header-dropdown-list-user.css +1 -1
- package/dist/collection/components/header/header-dropdown-list-user/header-dropdown-list-user.js +13 -9
- package/dist/collection/components/header/header-hamburger/header-hamburger.css +0 -1
- package/dist/collection/components/header/header-item/header-item.js +3 -0
- package/dist/collection/components/header/header-launcher/header-launcher.js +5 -2
- package/dist/collection/components/header/header-launcher-grid/header-launcher-grid.js +3 -0
- package/dist/collection/components/header/header-launcher-grid-item/header-launcher-grid-item.js +3 -0
- package/dist/collection/components/header/header-launcher-grid-title/header-launcher-grid-title.js +6 -2
- package/dist/collection/components/header/header-launcher-list/header-launcher-list.js +6 -2
- package/dist/collection/components/header/header-launcher-list-item/header-launcher-list-item.js +4 -1
- package/dist/collection/components/header/header-launcher-list-title/header-launcher-list-title.js +6 -2
- package/dist/collection/components/header/header-title/header-title.js +3 -0
- package/dist/collection/components/header/header.css +1 -1
- package/dist/collection/components/header/header.js +6 -0
- package/dist/collection/components/header/header.stories.js +82 -0
- package/dist/collection/components/icon/icon.stories.js +48 -0
- package/dist/collection/components/link/link.css +16 -13
- package/dist/collection/components/link/link.js +5 -1
- package/dist/collection/components/link/link.stories.js +59 -0
- package/dist/collection/components/message/message.css +16 -16
- package/dist/collection/components/message/message.js +11 -8
- package/dist/collection/components/message/message.stories.js +110 -0
- package/dist/collection/components/modal/modal.css +19 -33
- package/dist/collection/components/modal/modal.js +36 -6
- package/dist/collection/components/modal/modal.stories.js +109 -0
- package/dist/collection/components/popover-canvas/popover-canvas.css +3 -7
- package/dist/collection/components/popover-canvas/popover-canvas.js +15 -104
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js +92 -0
- package/dist/collection/components/popover-core/popover-core.js +390 -0
- package/dist/collection/components/popover-menu/popover-menu.css +2 -8
- package/dist/collection/components/popover-menu/popover-menu.js +18 -81
- package/dist/collection/components/popover-menu/popover-menu.stories.js +140 -0
- package/dist/collection/components/radio-button/radio-button.css +1 -1
- package/dist/collection/components/radio-button/radio-button.js +6 -2
- package/dist/collection/components/radio-button/radio-button.stories.js +91 -0
- package/dist/collection/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.js +3 -0
- package/dist/collection/components/side-menu/side-menu-dropdown/side-menu-dropdown.css +1 -1
- package/dist/collection/components/side-menu/side-menu-dropdown/side-menu-dropdown.js +5 -0
- package/dist/collection/components/side-menu/side-menu-dropdown-list/side-menu-dropdown-list.js +3 -0
- package/dist/collection/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.js +3 -0
- package/dist/collection/components/side-menu/side-menu-item/side-menu-item.css +1 -1
- package/dist/collection/components/side-menu/side-menu-item/side-menu-item.js +3 -0
- package/dist/collection/components/side-menu/side-menu-user/side-menu-user.js +3 -0
- package/dist/collection/components/side-menu/side-menu-user-image/side-menu-user-image.js +5 -0
- package/dist/collection/components/side-menu/side-menu.css +6 -5
- package/dist/collection/components/side-menu/side-menu.js +11 -3
- package/dist/collection/components/side-menu/side-menu.stories.js +215 -0
- package/dist/collection/components/slider/slider.js +17 -16
- package/dist/collection/components/slider/slider.stories.js +243 -0
- package/dist/collection/components/spinner/spinner.stories.js +61 -0
- package/dist/collection/components/stepper/step/step.js +3 -0
- package/dist/collection/components/stepper/stepper.css +3 -0
- package/dist/collection/components/stepper/stepper.js +7 -3
- package/dist/collection/components/stepper/stepper.stories.js +95 -0
- package/dist/collection/components/table/table/table.js +7 -3
- package/dist/collection/components/table/table-body/table-body.js +15 -60
- package/dist/collection/components/table/table-body-cell/table-body-cell.js +3 -0
- package/dist/collection/components/table/table-body-row/table-body-row.js +3 -0
- package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.js +4 -0
- package/dist/collection/components/table/table-component-basic.stories.js +184 -0
- package/dist/collection/components/table/table-component-batch-actions.stories.js +201 -0
- package/dist/collection/components/table/table-component-bodydata.stories.js +101 -0
- package/dist/collection/components/table/table-component-custom-width.stories.js +174 -0
- package/dist/collection/components/table/table-component-event-listeners.stories.js +193 -0
- package/dist/collection/components/table/table-component-expandable-rows.stories.js +160 -0
- package/dist/collection/components/table/table-component-filtering.stories.js +210 -0
- package/dist/collection/components/table/table-component-multiselect.stories.js +230 -0
- package/dist/collection/components/table/table-component-pagination.stories.js +215 -0
- package/dist/collection/components/table/table-component-sorting.stories.js +238 -0
- package/dist/collection/components/table/table-footer/table-footer.js +65 -54
- package/dist/collection/components/table/table-header/table-header.js +3 -0
- package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -0
- package/dist/collection/components/table/table-toolbar/table-toolbar.css +2 -1
- package/dist/collection/components/table/table-toolbar/table-toolbar.js +4 -1
- package/dist/collection/components/table/table.filtering.spec.js +0 -6
- package/dist/collection/components/table/table.spec.js +0 -6
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.css +10 -11
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.js +4 -2
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +8 -5
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.stories.js +105 -0
- package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.css +13 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.js +3 -0
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +8 -5
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.stories.js +99 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.css +13 -2
- package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.js +3 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +8 -5
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +101 -0
- package/dist/collection/components/text-field/text-field.js +10 -2
- package/dist/collection/components/text-field/text-field.stories.js +247 -0
- package/dist/collection/components/textarea/textarea.stories.js +188 -0
- package/dist/collection/components/toast/toast.css +32 -25
- package/dist/collection/components/toast/toast.js +21 -37
- package/dist/collection/components/toast/toast.stories.js +79 -0
- package/dist/collection/components/toggle/toggle.js +6 -2
- package/dist/collection/components/toggle/toggle.stories.js +95 -0
- package/dist/collection/components/tooltip/tooltip.js +47 -87
- package/dist/collection/components/tooltip/tooltip.stories.js +136 -0
- package/dist/collection/stories/Installation/installation.stories.js +222 -0
- package/dist/collection/stories/announcements/announce-tegel.stories.js +262 -0
- package/dist/collection/stories/announcements/prefix-change.stories.js +93 -0
- package/dist/collection/stories/foundations/color/color-brand.stories.js +38 -0
- package/dist/collection/stories/foundations/color/color-scales.stories.js +71 -0
- package/dist/collection/stories/foundations/color/color-semantic.stories.js +40 -0
- package/dist/collection/stories/foundations/grid/grid.stories.js +386 -0
- package/dist/collection/stories/foundations/spacing/spacing-element.stories.js +100 -0
- package/dist/collection/stories/foundations/spacing/spacing-layout.stories.js +94 -0
- package/dist/collection/stories/foundations/typography/typography-body.stories.js +16 -0
- package/dist/collection/stories/foundations/typography/typography-detail.stories.js +17 -0
- package/dist/collection/stories/foundations/typography/typography-headline.stories.js +39 -0
- package/dist/collection/stories/foundations/typography/typography-paragraph.stories.js +12 -0
- package/dist/collection/stories/patterns/navigation/navigation-basic.stories.js +85 -0
- package/dist/collection/stories/patterns/navigation/navigation-fewitems.stories.js +259 -0
- package/dist/collection/stories/patterns/navigation/navigation-manyitems.stories.js +246 -0
- package/dist/collection/stories/patterns/navigation/navigation-user-menu.stories.js +140 -0
- package/dist/collection/stories/tegel.stories.js +293 -0
- package/dist/collection/stories/utility/color/background-color.stories.js +96 -0
- package/dist/collection/stories/utility/color/text-color.stories.js +94 -0
- package/dist/collection/utils/utils.js +30 -11
- package/dist/components/checkbox.js +2 -1
- package/dist/components/header-dropdown-list-item.js +3 -3
- package/dist/components/header-dropdown-list.js +7 -7
- package/dist/components/header-item.js +1 -1
- package/dist/components/popover-canvas.js +20 -89
- package/dist/{esm/popper-bfa25c7f.js → components/popover-core.js} +190 -13
- package/dist/components/side-menu-item.js +1 -1
- package/dist/components/tds-accordion-item.js +1 -1
- package/dist/components/tds-badge.js +4 -4
- package/dist/components/tds-banner.js +16 -17
- package/dist/components/tds-breadcrumb.js +3 -6
- package/dist/components/tds-breadcrumbs.js +0 -3
- package/dist/components/tds-button.js +23 -22
- package/dist/components/tds-card.js +21 -29
- package/dist/components/tds-chip.js +14 -3
- package/dist/components/tds-dropdown-option.js +121 -1
- package/dist/components/tds-dropdown.js +323 -1
- package/dist/components/tds-folder-tab.js +2 -3
- package/dist/components/tds-folder-tabs.js +5 -5
- package/dist/components/tds-footer-group.js +3 -3
- package/dist/components/tds-footer-item.js +1 -1
- package/dist/components/tds-footer.js +7 -8
- package/dist/components/tds-header-cell.js +1 -1
- package/dist/components/tds-header-dropdown-list-user.js +6 -6
- package/dist/components/tds-header-dropdown.js +19 -12
- package/dist/components/tds-header-launcher-grid-title.js +3 -2
- package/dist/components/tds-header-launcher-grid.js +1 -1
- package/dist/components/tds-header-launcher-list-item.js +1 -1
- package/dist/components/tds-header-launcher-list-title.js +3 -2
- package/dist/components/tds-header-launcher-list.js +3 -2
- package/dist/components/tds-header-launcher.js +18 -12
- package/dist/components/tds-inline-tab.js +1 -1
- package/dist/components/tds-inline-tabs.js +5 -5
- package/dist/components/tds-link.js +4 -3
- package/dist/components/tds-message.js +7 -7
- package/dist/components/tds-modal.js +14 -5
- package/dist/components/tds-navigation-tab.js +1 -1
- package/dist/components/tds-navigation-tabs.js +5 -5
- package/dist/components/{tds-dropdown-v2.d.ts → tds-popover-core.d.ts} +4 -4
- package/dist/components/tds-popover-core.js +6 -0
- package/dist/components/tds-popover-menu.js +22 -70
- package/dist/components/tds-radio-button.js +3 -2
- package/dist/components/tds-side-menu-dropdown.js +1 -1
- package/dist/components/tds-side-menu.js +2 -2
- package/dist/components/tds-slider.js +16 -15
- package/dist/components/tds-stepper.js +3 -2
- package/dist/components/tds-table-body.js +5 -53
- package/dist/components/tds-table-footer.js +50 -42
- package/dist/components/tds-table-toolbar.js +9 -3
- package/dist/components/tds-table.js +2 -1
- package/dist/components/tds-text-field.js +6 -2
- package/dist/components/tds-toast.js +15 -32
- package/dist/components/tds-toggle.js +2 -1
- package/dist/components/tds-tooltip.js +51 -85
- package/dist/components/utils.js +31 -12
- package/dist/esm/index-23ee700b.js +10 -14
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-accordion-item.entry.js +1 -1
- package/dist/esm/tds-badge.entry.js +3 -3
- package/dist/esm/tds-banner.entry.js +13 -13
- package/dist/esm/tds-breadcrumb.entry.js +2 -4
- package/dist/esm/tds-breadcrumbs.entry.js +0 -3
- package/dist/esm/tds-button.entry.js +20 -18
- package/dist/esm/tds-card.entry.js +19 -23
- package/dist/esm/tds-checkbox.entry.js +2 -1
- package/dist/esm/tds-chip.entry.js +15 -4
- package/dist/esm/tds-core-header-item_2.entry.js +1 -1
- package/dist/esm/{tds-dropdown-option-v2.entry.js → tds-dropdown-option.entry.js} +5 -5
- package/dist/esm/{tds-dropdown-v2.entry.js → tds-dropdown.entry.js} +31 -26
- package/dist/esm/tds-folder-tab.entry.js +2 -3
- package/dist/esm/tds-folder-tabs.entry.js +5 -5
- package/dist/esm/tds-footer-group.entry.js +3 -3
- package/dist/esm/tds-footer-item.entry.js +1 -1
- package/dist/esm/tds-footer.entry.js +6 -6
- package/dist/esm/tds-header-cell.entry.js +1 -1
- package/dist/esm/tds-header-dropdown-list-item.entry.js +2 -2
- package/dist/esm/tds-header-dropdown-list-user.entry.js +4 -4
- package/dist/esm/tds-header-dropdown-list.entry.js +6 -6
- package/dist/esm/tds-header-dropdown.entry.js +4 -3
- package/dist/esm/tds-header-hamburger.entry.js +1 -1
- package/dist/esm/tds-header-launcher-button.entry.js +1 -1
- package/dist/esm/tds-header-launcher-grid-title.entry.js +3 -2
- package/dist/esm/tds-header-launcher-grid.entry.js +1 -1
- package/dist/esm/tds-header-launcher-list-item.entry.js +1 -1
- package/dist/esm/tds-header-launcher-list-title.entry.js +3 -2
- package/dist/esm/tds-header-launcher-list.entry.js +3 -2
- package/dist/esm/tds-header-launcher.entry.js +2 -2
- package/dist/esm/tds-header.entry.js +1 -1
- package/dist/esm/tds-inline-tab.entry.js +1 -1
- package/dist/esm/tds-inline-tabs.entry.js +5 -5
- package/dist/esm/tds-link.entry.js +2 -2
- package/dist/esm/tds-message.entry.js +6 -6
- package/dist/esm/tds-modal.entry.js +13 -5
- package/dist/esm/tds-navigation-tab.entry.js +1 -1
- package/dist/esm/tds-navigation-tabs.entry.js +5 -5
- package/dist/esm/tds-popover-canvas.entry.js +10 -80
- package/dist/{cjs/popper-9def2535.js → esm/tds-popover-core.entry.js} +161 -14
- package/dist/esm/tds-popover-menu.entry.js +12 -62
- package/dist/esm/tds-radio-button.entry.js +3 -2
- package/dist/esm/tds-side-menu-close-button.entry.js +1 -1
- package/dist/esm/tds-side-menu-dropdown.entry.js +1 -1
- package/dist/esm/tds-side-menu-item.entry.js +1 -1
- package/dist/esm/tds-side-menu.entry.js +2 -2
- package/dist/esm/tds-slider.entry.js +16 -15
- package/dist/esm/tds-stepper.entry.js +3 -2
- package/dist/esm/tds-table-body.entry.js +4 -51
- package/dist/esm/tds-table-footer.entry.js +47 -39
- package/dist/esm/tds-table-toolbar.entry.js +2 -2
- package/dist/esm/tds-table.entry.js +2 -1
- package/dist/esm/tds-text-field.entry.js +7 -3
- package/dist/esm/tds-toast.entry.js +13 -28
- package/dist/esm/tds-toggle.entry.js +2 -1
- package/dist/esm/tds-tooltip.entry.js +42 -79
- package/dist/esm/tegel.js +1 -1
- package/dist/esm/{utils-9ac24735.js → utils-8544b156.js} +31 -12
- package/dist/tegel/p-000d60e5.entry.js +1 -0
- package/dist/tegel/p-04bff255.entry.js +1 -0
- package/dist/tegel/p-0641ac24.entry.js +1 -0
- package/dist/tegel/p-099025f0.entry.js +1 -0
- package/dist/tegel/p-0ae649c3.entry.js +1 -0
- package/dist/tegel/p-1a907ae9.entry.js +1 -0
- package/dist/tegel/p-1c82ccf0.entry.js +1 -0
- package/dist/tegel/{p-1acb8407.entry.js → p-1f43d4f0.entry.js} +1 -1
- package/dist/tegel/p-2e5f6086.entry.js +1 -0
- package/dist/tegel/{p-89283891.entry.js → p-31848a92.entry.js} +1 -1
- package/dist/tegel/{p-fb3f4a14.entry.js → p-3d28689e.entry.js} +1 -1
- package/dist/tegel/p-400282e5.entry.js +1 -0
- package/dist/tegel/p-4163997b.entry.js +1 -0
- package/dist/tegel/{p-bcb2fad3.entry.js → p-42990ec0.entry.js} +1 -1
- package/dist/tegel/p-43320d81.entry.js +1 -0
- package/dist/tegel/p-49a084db.entry.js +1 -0
- package/dist/tegel/{p-e8fccebc.entry.js → p-56189659.entry.js} +1 -1
- package/dist/tegel/{p-b6a16219.entry.js → p-656add37.entry.js} +1 -1
- package/dist/tegel/p-65ab407b.entry.js +1 -0
- package/dist/tegel/p-6654e59d.entry.js +1 -0
- package/dist/tegel/p-6f0072cc.entry.js +1 -0
- package/dist/tegel/{p-39227588.js → p-72fced16.js} +1 -1
- package/dist/tegel/p-79b1bb29.entry.js +1 -0
- package/dist/tegel/p-7ccff0a5.entry.js +1 -0
- package/dist/tegel/p-81915088.entry.js +1 -0
- package/dist/tegel/{p-232f5889.entry.js → p-823399ef.entry.js} +1 -1
- package/dist/tegel/p-84d231a5.entry.js +1 -0
- package/dist/tegel/{p-7b34156b.entry.js → p-88807dac.entry.js} +1 -1
- package/dist/tegel/p-88d7c4c1.entry.js +1 -0
- package/dist/tegel/p-8bd0a233.entry.js +1 -0
- package/dist/tegel/{p-e0ee20ee.entry.js → p-8c194dd8.entry.js} +1 -1
- package/dist/tegel/p-8e745d73.entry.js +1 -0
- package/dist/tegel/p-9991a816.entry.js +1 -0
- package/dist/tegel/{p-135575ae.entry.js → p-a08be1c3.entry.js} +1 -1
- package/dist/tegel/{p-3aa634ed.entry.js → p-a1ad46d2.entry.js} +1 -1
- package/dist/tegel/p-a8cc3901.entry.js +1 -0
- package/dist/tegel/{p-7d3a66ae.entry.js → p-aa7e2f79.entry.js} +1 -1
- package/dist/tegel/{p-cd2a74d7.entry.js → p-b0d313cd.entry.js} +1 -1
- package/dist/tegel/p-b1067b50.entry.js +1 -0
- package/dist/tegel/p-c411f254.entry.js +1 -0
- package/dist/tegel/p-cacdd03f.entry.js +1 -0
- package/dist/tegel/p-cb5a4d7d.entry.js +1 -0
- package/dist/tegel/p-d0f15f73.entry.js +1 -0
- package/dist/tegel/p-d2ca7f58.entry.js +1 -0
- package/dist/tegel/p-d4c25eb6.entry.js +1 -0
- package/dist/tegel/p-d5bd9b2e.entry.js +1 -0
- package/dist/tegel/{p-de799b9a.entry.js → p-d60cb9e5.entry.js} +1 -1
- package/dist/tegel/p-da6f310c.entry.js +1 -0
- package/dist/tegel/p-df318a85.entry.js +1 -0
- package/dist/tegel/p-df95f0ae.entry.js +1 -0
- package/dist/tegel/p-e36ceefe.entry.js +1 -0
- package/dist/tegel/p-e4d6a4c5.entry.js +1 -0
- package/dist/tegel/p-f36ec03b.entry.js +1 -0
- package/dist/tegel/p-f64ff692.entry.js +1 -0
- package/dist/tegel/p-f682dd0b.entry.js +1 -0
- package/dist/tegel/p-fa30061f.entry.js +1 -0
- package/dist/tegel/tegel.css +2 -2
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/accordion/accordion-item/accordion-item.d.ts +4 -0
- package/dist/types/components/accordion/accordion.d.ts +3 -0
- package/dist/types/components/accordion/accordion.stories.d.ts +77 -0
- package/dist/types/components/badge/badge.stories.d.ts +73 -0
- package/dist/types/components/banner/banner.d.ts +10 -5
- package/dist/types/components/banner/banner.stories.d.ts +82 -0
- package/dist/types/components/block/block.d.ts +3 -0
- package/dist/types/components/block/block.stories.d.ts +32 -0
- package/dist/types/components/breadcrumbs/breadcrumb/breadcrumb.d.ts +3 -2
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +3 -1
- package/dist/types/components/breadcrumbs/breadcrumbs.stories.d.ts +16 -0
- package/dist/types/components/button/button.d.ts +9 -3
- package/dist/types/components/button/button.stories.d.ts +147 -0
- package/dist/types/components/card/card.d.ts +11 -9
- package/dist/types/components/card/card.stories.d.ts +128 -0
- package/dist/types/components/checkbox/checkbox.d.ts +3 -0
- package/dist/types/components/checkbox/checkbox.stories.d.ts +52 -0
- package/dist/types/components/chip/chip.d.ts +6 -0
- package/dist/types/components/chip/chip.stories.d.ts +99 -0
- package/dist/types/components/datetime/datetime.stories.d.ts +125 -0
- package/dist/types/components/divider/divider.stories.d.ts +58 -0
- package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +31 -17
- package/dist/types/components/dropdown/dropdown.d.ts +82 -54
- package/dist/types/components/dropdown/dropdown.stories.d.ts +183 -0
- package/dist/types/components/footer/footer-group/footer-group.d.ts +4 -1
- package/dist/types/components/footer/footer-item/footer-item.d.ts +3 -0
- package/dist/types/components/footer/footer.d.ts +5 -3
- package/dist/types/components/footer/footer.stories.d.ts +44 -0
- package/dist/types/components/header/core-header-item/core-header-item.d.ts +3 -0
- package/dist/types/components/header/header-brand-symbol/header-brand-symbol.d.ts +3 -0
- package/dist/types/components/header/header-dropdown/header-dropdown.d.ts +6 -1
- package/dist/types/components/header/header-dropdown-list/header-dropdown-list.d.ts +5 -1
- package/dist/types/components/header/header-dropdown-list-item/header-dropdown-list-item.d.ts +5 -2
- package/dist/types/components/header/header-dropdown-list-user/header-dropdown-list-user.d.ts +8 -4
- package/dist/types/components/header/header-item/header-item.d.ts +3 -0
- package/dist/types/components/header/header-launcher/header-launcher.d.ts +3 -0
- package/dist/types/components/header/header-launcher-grid/header-launcher-grid.d.ts +3 -0
- package/dist/types/components/header/header-launcher-grid-item/header-launcher-grid-item.d.ts +3 -0
- package/dist/types/components/header/header-launcher-grid-title/header-launcher-grid-title.d.ts +3 -0
- package/dist/types/components/header/header-launcher-list/header-launcher-list.d.ts +3 -0
- package/dist/types/components/header/header-launcher-list-item/header-launcher-list-item.d.ts +3 -0
- package/dist/types/components/header/header-launcher-list-title/header-launcher-list-title.d.ts +3 -0
- package/dist/types/components/header/header-title/header-title.d.ts +3 -0
- package/dist/types/components/header/header.d.ts +6 -0
- package/dist/types/components/header/header.stories.d.ts +32 -0
- package/dist/types/components/icon/icon.stories.d.ts +36 -0
- package/dist/types/components/link/link.d.ts +3 -0
- package/dist/types/components/link/link.stories.d.ts +44 -0
- package/dist/types/components/message/message.d.ts +5 -2
- package/dist/types/components/message/message.stories.d.ts +88 -0
- package/dist/types/components/modal/modal.d.ts +9 -3
- package/dist/types/components/modal/modal.stories.d.ts +70 -0
- package/dist/types/components/popover-canvas/popover-canvas.d.ts +8 -14
- package/dist/types/components/popover-canvas/popover-canvas.stories.d.ts +27 -0
- package/dist/types/components/popover-core/popover-core.d.ts +46 -0
- package/dist/types/components/popover-menu/popover-menu.d.ts +9 -10
- package/dist/types/components/popover-menu/popover-menu.stories.d.ts +40 -0
- package/dist/types/components/radio-button/radio-button.d.ts +3 -0
- package/dist/types/components/radio-button/radio-button.stories.d.ts +39 -0
- package/dist/types/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.d.ts +3 -0
- package/dist/types/components/side-menu/side-menu-dropdown/side-menu-dropdown.d.ts +5 -0
- package/dist/types/components/side-menu/side-menu-dropdown-list/side-menu-dropdown-list.d.ts +3 -0
- package/dist/types/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.d.ts +3 -0
- package/dist/types/components/side-menu/side-menu-item/side-menu-item.d.ts +3 -0
- package/dist/types/components/side-menu/side-menu-user/side-menu-user.d.ts +3 -0
- package/dist/types/components/side-menu/side-menu-user-image/side-menu-user-image.d.ts +4 -0
- package/dist/types/components/side-menu/side-menu.d.ts +8 -0
- package/dist/types/components/side-menu/side-menu.stories.d.ts +53 -0
- package/dist/types/components/slider/slider.d.ts +0 -1
- package/dist/types/components/slider/slider.stories.d.ts +235 -0
- package/dist/types/components/spinner/spinner.stories.d.ts +46 -0
- package/dist/types/components/stepper/step/step.d.ts +3 -0
- package/dist/types/components/stepper/stepper.d.ts +3 -0
- package/dist/types/components/stepper/stepper.stories.d.ts +80 -0
- package/dist/types/components/table/table/table.d.ts +3 -0
- package/dist/types/components/table/table-body/table-body.d.ts +6 -3
- package/dist/types/components/table/table-body-cell/table-body-cell.d.ts +3 -0
- package/dist/types/components/table/table-body-row/table-body-row.d.ts +3 -0
- package/dist/types/components/table/table-body-row-expandable/table-body-row-expandable.d.ts +4 -0
- package/dist/types/components/table/table-component-basic.stories.d.ts +144 -0
- package/dist/types/components/table/table-component-batch-actions.stories.d.ts +139 -0
- package/dist/types/components/table/table-component-bodydata.stories.d.ts +35 -0
- package/dist/types/components/table/table-component-custom-width.stories.d.ts +131 -0
- package/dist/types/components/table/table-component-event-listeners.stories.d.ts +131 -0
- package/dist/types/components/table/table-component-expandable-rows.stories.d.ts +131 -0
- package/dist/types/components/table/table-component-filtering.stories.d.ts +139 -0
- package/dist/types/components/table/table-component-multiselect.stories.d.ts +144 -0
- package/dist/types/components/table/table-component-pagination.stories.d.ts +131 -0
- package/dist/types/components/table/table-component-sorting.stories.d.ts +183 -0
- package/dist/types/components/table/table-footer/table-footer.d.ts +7 -7
- package/dist/types/components/table/table-header/table-header.d.ts +3 -0
- package/dist/types/components/table/table-toolbar/table-toolbar.d.ts +3 -0
- package/dist/types/components/tabs/folder-tabs/folder-tab/folder-tab.d.ts +3 -0
- package/dist/types/components/tabs/folder-tabs/folder-tabs.d.ts +3 -0
- package/dist/types/components/tabs/folder-tabs/folder-tabs.stories.d.ts +69 -0
- package/dist/types/components/tabs/inline-tabs/inline-tab/inline-tab.d.ts +3 -0
- package/dist/types/components/tabs/inline-tabs/inline-tabs.d.ts +3 -0
- package/dist/types/components/tabs/inline-tabs/inline-tabs.stories.d.ts +61 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tab/navigation-tab.d.ts +3 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +3 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.stories.d.ts +61 -0
- package/dist/types/components/text-field/text-field.d.ts +5 -0
- package/dist/types/components/text-field/text-field.stories.d.ts +201 -0
- package/dist/types/components/textarea/textarea.stories.d.ts +139 -0
- package/dist/types/components/toast/toast.d.ts +6 -5
- package/dist/types/components/toast/toast.stories.d.ts +56 -0
- package/dist/types/components/toggle/toggle.d.ts +3 -0
- package/dist/types/components/toggle/toggle.stories.d.ts +74 -0
- package/dist/types/components/tooltip/tooltip.d.ts +17 -7
- package/dist/types/components/tooltip/tooltip.stories.d.ts +66 -0
- package/dist/types/components.d.ts +232 -415
- package/dist/types/stories/Installation/installation.stories.d.ts +7 -0
- package/dist/types/stories/announcements/announce-tegel.stories.d.ts +6 -0
- package/dist/types/stories/announcements/prefix-change.stories.d.ts +6 -0
- package/dist/types/stories/foundations/color/color-brand.stories.d.ts +13 -0
- package/dist/types/stories/foundations/color/color-scales.stories.d.ts +30 -0
- package/dist/types/stories/foundations/color/color-semantic.stories.d.ts +13 -0
- package/dist/types/stories/foundations/grid/grid.stories.d.ts +35 -0
- package/dist/types/stories/foundations/spacing/spacing-element.stories.d.ts +8 -0
- package/dist/types/stories/foundations/spacing/spacing-layout.stories.d.ts +8 -0
- package/dist/types/stories/foundations/typography/typography-body.stories.d.ts +8 -0
- package/dist/types/stories/foundations/typography/typography-detail.stories.d.ts +8 -0
- package/dist/types/stories/foundations/typography/typography-headline.stories.d.ts +21 -0
- package/dist/types/stories/foundations/typography/typography-paragraph.stories.d.ts +8 -0
- package/dist/types/stories/patterns/navigation/navigation-basic.stories.d.ts +23 -0
- package/dist/types/stories/patterns/navigation/navigation-fewitems.stories.d.ts +23 -0
- package/dist/types/stories/patterns/navigation/navigation-manyitems.stories.d.ts +38 -0
- package/dist/types/stories/patterns/navigation/navigation-user-menu.stories.d.ts +33 -0
- package/dist/types/stories/tegel.stories.d.ts +6 -0
- package/dist/types/stories/utility/color/background-color.stories.d.ts +64 -0
- package/dist/types/stories/utility/color/text-color.stories.d.ts +64 -0
- package/dist/types/utils/utils.d.ts +20 -6
- package/package.json +22 -24
- package/dist/cjs/tds-dropdown-filter.cjs.entry.js +0 -96
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +0 -339
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +0 -380
- package/dist/collection/components/dropdown-v2/dropdown-option-v2/dropdown-option-v2.js +0 -216
- package/dist/collection/components/dropdown-v2/dropdown-v2.css +0 -286
- package/dist/collection/components/dropdown-v2/dropdown-v2.js +0 -726
- package/dist/components/dropdown-option.js +0 -104
- package/dist/components/dropdown.js +0 -304
- package/dist/components/tds-dropdown-filter.d.ts +0 -11
- package/dist/components/tds-dropdown-filter.js +0 -150
- package/dist/components/tds-dropdown-option-v2.d.ts +0 -11
- package/dist/components/tds-dropdown-option-v2.js +0 -126
- package/dist/components/tds-dropdown-v2.js +0 -323
- package/dist/esm/tds-dropdown-filter.entry.js +0 -92
- package/dist/esm/tds-dropdown_2.entry.js +0 -334
- package/dist/tegel/p-07e5df94.entry.js +0 -1
- package/dist/tegel/p-0a3e7512.entry.js +0 -1
- package/dist/tegel/p-0e55d72f.entry.js +0 -1
- package/dist/tegel/p-107d3da8.entry.js +0 -1
- package/dist/tegel/p-13b02a4f.entry.js +0 -1
- package/dist/tegel/p-19e9addd.entry.js +0 -1
- package/dist/tegel/p-1fb5c5d4.entry.js +0 -1
- package/dist/tegel/p-2bee16f6.entry.js +0 -1
- package/dist/tegel/p-2e2c91c4.entry.js +0 -1
- package/dist/tegel/p-330ed982.entry.js +0 -1
- package/dist/tegel/p-3604b5d3.entry.js +0 -1
- package/dist/tegel/p-375e361b.entry.js +0 -1
- package/dist/tegel/p-55dc4711.entry.js +0 -1
- package/dist/tegel/p-59f1cb9b.entry.js +0 -1
- package/dist/tegel/p-5a6aba01.entry.js +0 -1
- package/dist/tegel/p-60733f89.entry.js +0 -1
- package/dist/tegel/p-6a530c2f.entry.js +0 -1
- package/dist/tegel/p-732256e0.entry.js +0 -1
- package/dist/tegel/p-7331ec7b.entry.js +0 -1
- package/dist/tegel/p-76f941e8.entry.js +0 -1
- package/dist/tegel/p-7b0853e6.entry.js +0 -1
- package/dist/tegel/p-90686bc7.entry.js +0 -1
- package/dist/tegel/p-95da9b7f.entry.js +0 -1
- package/dist/tegel/p-99f540db.entry.js +0 -1
- package/dist/tegel/p-9bcc42cf.entry.js +0 -1
- package/dist/tegel/p-9d707f6e.js +0 -1
- package/dist/tegel/p-9f57d275.entry.js +0 -1
- package/dist/tegel/p-9fe384ad.entry.js +0 -1
- package/dist/tegel/p-a5604352.entry.js +0 -1
- package/dist/tegel/p-acb62b52.entry.js +0 -1
- package/dist/tegel/p-aeffa257.entry.js +0 -1
- package/dist/tegel/p-b8d88873.entry.js +0 -1
- package/dist/tegel/p-beb8a6bd.entry.js +0 -1
- package/dist/tegel/p-c8d4af09.entry.js +0 -1
- package/dist/tegel/p-c90a247c.entry.js +0 -1
- package/dist/tegel/p-ca4527de.entry.js +0 -1
- package/dist/tegel/p-cf4cfc54.entry.js +0 -1
- package/dist/tegel/p-d3f5cf74.entry.js +0 -1
- package/dist/tegel/p-d67d67be.entry.js +0 -1
- package/dist/tegel/p-da4c92b9.entry.js +0 -1
- package/dist/tegel/p-e95059e9.entry.js +0 -1
- package/dist/tegel/p-f6206d3c.entry.js +0 -1
- package/dist/tegel/p-fc47d911.entry.js +0 -1
- package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.d.ts +0 -47
- package/dist/types/components/dropdown-v2/dropdown-option-v2/dropdown-option-v2.d.ts +0 -35
- package/dist/types/components/dropdown-v2/dropdown-v2.d.ts +0 -86
- /package/dist/collection/components/{dropdown-v2/dropdown-option-v2/dropdown-option-v2.css → dropdown/dropdown-option/dropdown-option.css} +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import itemReadme from './breadcrumb/readme.md';
|
|
2
|
+
import readme from './readme.md';
|
|
3
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
4
|
+
import { ComponentsFolder } from '../../utils/constants';
|
|
5
|
+
export default {
|
|
6
|
+
title: `${ComponentsFolder}/Breadcrumbs`,
|
|
7
|
+
parameters: {
|
|
8
|
+
notes: { Breadcrumbs: readme, Breadcrumb: itemReadme },
|
|
9
|
+
design: [
|
|
10
|
+
{
|
|
11
|
+
name: 'Figma',
|
|
12
|
+
type: 'figma',
|
|
13
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=2703%3A4725&t=rVXuTOgTmXPauyHd-1',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'Link',
|
|
17
|
+
type: 'link',
|
|
18
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=2703%3A4725&t=rVXuTOgTmXPauyHd-1',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
const Template = () => formatHtmlPreview(`
|
|
24
|
+
<tds-breadcrumbs>
|
|
25
|
+
<tds-breadcrumb>
|
|
26
|
+
<a href="#">Page 1</a>
|
|
27
|
+
</tds-breadcrumb>
|
|
28
|
+
<tds-breadcrumb>
|
|
29
|
+
<a href="#">Page 2</a>
|
|
30
|
+
</tds-breadcrumb>
|
|
31
|
+
<tds-breadcrumb current>
|
|
32
|
+
<a href="#">Page 3</a>
|
|
33
|
+
</tds-breadcrumb>
|
|
34
|
+
</tds-breadcrumbs>
|
|
35
|
+
`);
|
|
36
|
+
export const Default = Template.bind({});
|
|
@@ -229,6 +229,9 @@ button.sm {
|
|
|
229
229
|
padding: var(--tds-spacing-element-12);
|
|
230
230
|
height: 40px;
|
|
231
231
|
}
|
|
232
|
+
button.sm.icon {
|
|
233
|
+
padding: 10px var(--tds-spacing-element-12);
|
|
234
|
+
}
|
|
232
235
|
button.sm.only-icon {
|
|
233
236
|
padding: 11px;
|
|
234
237
|
}
|
|
@@ -240,6 +243,9 @@ button.md {
|
|
|
240
243
|
padding: var(--tds-spacing-element-16);
|
|
241
244
|
height: 48px;
|
|
242
245
|
}
|
|
246
|
+
button.md.icon {
|
|
247
|
+
padding: 14px var(--tds-spacing-element-16);
|
|
248
|
+
}
|
|
243
249
|
button.md.only-icon {
|
|
244
250
|
padding: 13px;
|
|
245
251
|
}
|
|
@@ -251,6 +257,9 @@ button.lg {
|
|
|
251
257
|
padding: var(--tds-spacing-element-20);
|
|
252
258
|
height: 56px;
|
|
253
259
|
}
|
|
260
|
+
button.lg.icon {
|
|
261
|
+
padding: 18px var(--tds-spacing-element-20);
|
|
262
|
+
}
|
|
254
263
|
button.lg.only-icon {
|
|
255
264
|
padding: 17px;
|
|
256
265
|
}
|
|
@@ -489,36 +498,33 @@ button.danger.disabled, button.danger:disabled {
|
|
|
489
498
|
height: var(--tds-spacing-element-16);
|
|
490
499
|
}
|
|
491
500
|
|
|
501
|
+
:host(tds-button[disabled=true]) {
|
|
502
|
+
pointer-events: none;
|
|
503
|
+
}
|
|
504
|
+
:host(tds-button[disabled=true]) ::slotted([slot=icon]) {
|
|
505
|
+
pointer-events: none;
|
|
506
|
+
}
|
|
507
|
+
|
|
492
508
|
:host(tds-button[fullbleed]) {
|
|
493
509
|
width: 100%;
|
|
494
510
|
justify-content: center;
|
|
495
511
|
}
|
|
496
512
|
|
|
497
|
-
|
|
498
|
-
padding: 11px;
|
|
499
|
-
}
|
|
500
|
-
:host(tds-button[only-icon]) .md {
|
|
501
|
-
padding: 13px;
|
|
502
|
-
}
|
|
503
|
-
:host(tds-button[only-icon]) .lg {
|
|
504
|
-
padding: 17px;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
:host(tds-button:not([only-icon])) {
|
|
513
|
+
tds-button:not([only-icon]) {
|
|
508
514
|
display: inline-flex;
|
|
509
515
|
align-items: center;
|
|
510
516
|
}
|
|
511
|
-
|
|
517
|
+
tds-button:not([only-icon]) .sm ::slotted([slot=icon]) {
|
|
512
518
|
margin-left: var(--tds-spacing-element-12);
|
|
513
519
|
width: var(--tds-spacing-element-16);
|
|
514
520
|
height: var(--tds-spacing-element-16);
|
|
515
521
|
}
|
|
516
|
-
|
|
522
|
+
tds-button:not([only-icon]) .md ::slotted([slot=icon]) {
|
|
517
523
|
margin-left: var(--tds-spacing-element-16);
|
|
518
524
|
width: var(--tds-spacing-element-20);
|
|
519
525
|
height: var(--tds-spacing-element-20);
|
|
520
526
|
}
|
|
521
|
-
|
|
527
|
+
tds-button:not([only-icon]) .lg ::slotted([slot=icon]) {
|
|
522
528
|
margin-left: var(--tds-spacing-element-20);
|
|
523
529
|
width: var(--tds-spacing-element-20);
|
|
524
530
|
height: var(--tds-spacing-element-20);
|
|
@@ -1,40 +1,46 @@
|
|
|
1
1
|
import { h, Host } from '@stencil/core';
|
|
2
|
-
import {
|
|
2
|
+
import { hasSlot } from '../../utils/utils';
|
|
3
|
+
/**
|
|
4
|
+
* @slot label - Slot for the text injection. Serves as alternative to text prop.
|
|
5
|
+
* @slot icon - Slot used to display an Icon in the Button.
|
|
6
|
+
*/
|
|
3
7
|
export class TdsButton {
|
|
4
8
|
constructor() {
|
|
5
9
|
this.text = undefined;
|
|
6
|
-
this.type = '
|
|
10
|
+
this.type = 'button';
|
|
11
|
+
this.variant = 'primary';
|
|
7
12
|
this.size = 'lg';
|
|
8
13
|
this.disabled = false;
|
|
9
14
|
this.fullbleed = false;
|
|
10
15
|
this.modeVariant = null;
|
|
11
16
|
this.onlyIcon = false;
|
|
12
|
-
this.slotElement = undefined;
|
|
13
17
|
}
|
|
14
18
|
connectedCallback() {
|
|
15
|
-
var _a;
|
|
16
|
-
this.slotElement = this.host.children ? this.host.children[0] : null;
|
|
17
|
-
if (this.disabled) {
|
|
18
|
-
disableClickOnElement(this.host);
|
|
19
|
-
if (((_a = this.slotElement) === null || _a === void 0 ? void 0 : _a.slot) === 'icon') {
|
|
20
|
-
disableClickOnElement(this.slotElement);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
19
|
if (!this.text) {
|
|
24
20
|
this.onlyIcon = true;
|
|
25
21
|
this.host.setAttribute('only-icon', '');
|
|
26
22
|
}
|
|
27
23
|
}
|
|
28
24
|
render() {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
const hasLabelSlot = hasSlot('label', this.host);
|
|
26
|
+
const hasIconSlot = hasSlot('icon', this.host);
|
|
27
|
+
return (h(Host, { class: `${this.modeVariant !== null ? `tds-mode-variant-${this.modeVariant}` : ''}` }, h("button", { type: this.type, disabled: this.disabled, class: {
|
|
28
|
+
'primary': this.variant === 'primary',
|
|
29
|
+
'secondary': this.variant === 'secondary',
|
|
30
|
+
'ghost': this.variant === 'ghost',
|
|
31
|
+
'danger': this.variant === 'danger',
|
|
32
|
+
'lg': this.size === 'lg',
|
|
33
|
+
'md': this.size === 'md',
|
|
34
|
+
'sm': this.size === 'sm',
|
|
35
|
+
'xs': this.size === 'xs',
|
|
36
|
+
'disabled': this.disabled,
|
|
37
|
+
'fullbleed': this.fullbleed,
|
|
38
|
+
'icon': hasIconSlot,
|
|
39
|
+
'only-icon': this.onlyIcon,
|
|
40
|
+
} }, this.text, hasLabelSlot && !this.onlyIcon && h("slot", { name: "label" }), hasIconSlot && h("slot", { name: "icon" }))));
|
|
35
41
|
}
|
|
36
42
|
static get is() { return "tds-button"; }
|
|
37
|
-
static get encapsulation() { return "
|
|
43
|
+
static get encapsulation() { return "scoped"; }
|
|
38
44
|
static get originalStyleUrls() {
|
|
39
45
|
return {
|
|
40
46
|
"$": ["button.scss"]
|
|
@@ -65,6 +71,24 @@ export class TdsButton {
|
|
|
65
71
|
"reflect": false
|
|
66
72
|
},
|
|
67
73
|
"type": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "'button' | 'submit' | 'reset'",
|
|
78
|
+
"resolved": "\"button\" | \"reset\" | \"submit\"",
|
|
79
|
+
"references": {}
|
|
80
|
+
},
|
|
81
|
+
"required": false,
|
|
82
|
+
"optional": false,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": "Button's type"
|
|
86
|
+
},
|
|
87
|
+
"attribute": "type",
|
|
88
|
+
"reflect": false,
|
|
89
|
+
"defaultValue": "'button'"
|
|
90
|
+
},
|
|
91
|
+
"variant": {
|
|
68
92
|
"type": "string",
|
|
69
93
|
"mutable": false,
|
|
70
94
|
"complexType": {
|
|
@@ -76,9 +100,9 @@ export class TdsButton {
|
|
|
76
100
|
"optional": false,
|
|
77
101
|
"docs": {
|
|
78
102
|
"tags": [],
|
|
79
|
-
"text": "
|
|
103
|
+
"text": "Variation of Button's design"
|
|
80
104
|
},
|
|
81
|
-
"attribute": "
|
|
105
|
+
"attribute": "variant",
|
|
82
106
|
"reflect": false,
|
|
83
107
|
"defaultValue": "'primary'"
|
|
84
108
|
},
|
|
@@ -94,7 +118,7 @@ export class TdsButton {
|
|
|
94
118
|
"optional": false,
|
|
95
119
|
"docs": {
|
|
96
120
|
"tags": [],
|
|
97
|
-
"text": ""
|
|
121
|
+
"text": "Size of a Button"
|
|
98
122
|
},
|
|
99
123
|
"attribute": "size",
|
|
100
124
|
"reflect": false,
|
|
@@ -158,8 +182,7 @@ export class TdsButton {
|
|
|
158
182
|
}
|
|
159
183
|
static get states() {
|
|
160
184
|
return {
|
|
161
|
-
"onlyIcon": {}
|
|
162
|
-
"slotElement": {}
|
|
185
|
+
"onlyIcon": {}
|
|
163
186
|
};
|
|
164
187
|
}
|
|
165
188
|
static get elementRef() { return "host"; }
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
2
|
+
import { iconsNames } from '../icon/iconsArray';
|
|
3
|
+
import readme from './readme.md';
|
|
4
|
+
import { ComponentsFolder } from '../../utils/constants';
|
|
5
|
+
export default {
|
|
6
|
+
title: `${ComponentsFolder}/Button`,
|
|
7
|
+
parameters: {
|
|
8
|
+
notes: readme,
|
|
9
|
+
layout: 'padded',
|
|
10
|
+
design: [
|
|
11
|
+
{
|
|
12
|
+
name: 'Figma',
|
|
13
|
+
type: 'figma',
|
|
14
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=1574%3A72148&t=rVXuTOgTmXPauyHd-1',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'Link',
|
|
18
|
+
type: 'link',
|
|
19
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=1574%3A72148&t=rVXuTOgTmXPauyHd-1',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
argTypes: {
|
|
24
|
+
modeVariant: {
|
|
25
|
+
name: 'Mode variant',
|
|
26
|
+
description: 'Mode variant adjusts component colors to have better visibility depending on global mode and background.',
|
|
27
|
+
control: {
|
|
28
|
+
type: 'radio',
|
|
29
|
+
},
|
|
30
|
+
options: ['Inherit from parent', 'Primary', 'Secondary'],
|
|
31
|
+
table: {
|
|
32
|
+
defaultValue: { summary: 'Inherit from parent' },
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
variant: {
|
|
36
|
+
name: 'Variant',
|
|
37
|
+
description: 'Four different Button variants to help the user to distinguish the level of importance of the task they represent.',
|
|
38
|
+
control: {
|
|
39
|
+
type: 'radio',
|
|
40
|
+
},
|
|
41
|
+
options: ['Primary', 'Secondary', 'Ghost', 'Danger'],
|
|
42
|
+
table: {
|
|
43
|
+
defaultValue: { summary: 'primary' },
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
type: {
|
|
47
|
+
name: 'Type',
|
|
48
|
+
description: 'Native types of button',
|
|
49
|
+
control: {
|
|
50
|
+
type: 'radio',
|
|
51
|
+
},
|
|
52
|
+
options: ['Button', 'Submit', 'Reset'],
|
|
53
|
+
table: {
|
|
54
|
+
defaultValue: { summary: 'button' },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
size: {
|
|
58
|
+
name: 'Size',
|
|
59
|
+
description: 'Sets the size of the Button.',
|
|
60
|
+
control: {
|
|
61
|
+
type: 'radio',
|
|
62
|
+
},
|
|
63
|
+
options: ['Large', 'Medium', 'Small', 'Extra small'],
|
|
64
|
+
table: {
|
|
65
|
+
defaultValue: { summary: 'lg' },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
text: {
|
|
69
|
+
name: 'Text',
|
|
70
|
+
description: 'Sets the text to be displayed on the Button.',
|
|
71
|
+
control: {
|
|
72
|
+
type: 'text',
|
|
73
|
+
},
|
|
74
|
+
if: { arg: 'onlyIcon', truthy: false },
|
|
75
|
+
},
|
|
76
|
+
fullbleed: {
|
|
77
|
+
name: 'Fullbleed',
|
|
78
|
+
description: 'Sets a fluid width on the Button.',
|
|
79
|
+
control: {
|
|
80
|
+
type: 'boolean',
|
|
81
|
+
},
|
|
82
|
+
table: {
|
|
83
|
+
defaultValue: { summary: false },
|
|
84
|
+
},
|
|
85
|
+
if: { arg: 'onlyIcon', truthy: false },
|
|
86
|
+
},
|
|
87
|
+
onlyIcon: {
|
|
88
|
+
name: 'Only Icon',
|
|
89
|
+
description: 'Displays only the icon and excludes any text from the Button.',
|
|
90
|
+
control: {
|
|
91
|
+
type: 'boolean',
|
|
92
|
+
},
|
|
93
|
+
table: {
|
|
94
|
+
defaultValue: { summary: false },
|
|
95
|
+
},
|
|
96
|
+
if: { arg: 'size', neq: 'Extra small' },
|
|
97
|
+
},
|
|
98
|
+
icon: {
|
|
99
|
+
name: 'Icon',
|
|
100
|
+
description: 'Sets icon to be displayed on the Button. Choose "none" to exclude the icon.',
|
|
101
|
+
control: {
|
|
102
|
+
type: 'select',
|
|
103
|
+
},
|
|
104
|
+
options: ['none', ...iconsNames],
|
|
105
|
+
if: { arg: 'size', neq: 'Extra small' },
|
|
106
|
+
},
|
|
107
|
+
disabled: {
|
|
108
|
+
name: 'Disabled',
|
|
109
|
+
description: 'Disables the Button.',
|
|
110
|
+
control: {
|
|
111
|
+
type: 'boolean',
|
|
112
|
+
},
|
|
113
|
+
table: {
|
|
114
|
+
defaultValue: { summary: false },
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
args: {
|
|
119
|
+
modeVariant: 'Inherit from parent',
|
|
120
|
+
type: 'Button',
|
|
121
|
+
variant: 'Primary',
|
|
122
|
+
size: 'Large',
|
|
123
|
+
text: 'Button',
|
|
124
|
+
fullbleed: false,
|
|
125
|
+
onlyIcon: false,
|
|
126
|
+
icon: 'none',
|
|
127
|
+
disabled: false,
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
const WebComponentTemplate = ({ modeVariant, type, variant, size, text = 'Button', fullbleed, onlyIcon, icon, disabled, }) => {
|
|
131
|
+
const variantLookUp = {
|
|
132
|
+
Primary: 'primary',
|
|
133
|
+
Secondary: 'secondary',
|
|
134
|
+
Ghost: 'ghost',
|
|
135
|
+
Danger: 'danger',
|
|
136
|
+
};
|
|
137
|
+
const sizeLookUp = {
|
|
138
|
+
'Large': 'lg',
|
|
139
|
+
'Medium': 'md',
|
|
140
|
+
'Small': 'sm',
|
|
141
|
+
'Extra small': 'xs',
|
|
142
|
+
};
|
|
143
|
+
const modeVariantLookup = {
|
|
144
|
+
Primary: 'primary',
|
|
145
|
+
Secondary: 'secondary',
|
|
146
|
+
};
|
|
147
|
+
const typeLookup = {
|
|
148
|
+
Button: 'button',
|
|
149
|
+
Submit: 'submit',
|
|
150
|
+
Reset: 'reset',
|
|
151
|
+
};
|
|
152
|
+
return formatHtmlPreview(`
|
|
153
|
+
<style>
|
|
154
|
+
/* demo-wrapper is for demonstration purposes only*/
|
|
155
|
+
.demo-wrapper{
|
|
156
|
+
width: 100%;
|
|
157
|
+
}
|
|
158
|
+
</style>
|
|
159
|
+
|
|
160
|
+
<div class="demo-wrapper">
|
|
161
|
+
<tds-button
|
|
162
|
+
type='${typeLookup[type]}'
|
|
163
|
+
variant="${variantLookUp[variant]}"
|
|
164
|
+
size="${sizeLookUp[size]}" ${disabled ? 'disabled' : ''} ${fullbleed ? 'fullbleed' : ''}
|
|
165
|
+
${!onlyIcon ? `text="${text}"` : ''}
|
|
166
|
+
${modeVariant !== 'Inherit from parent'
|
|
167
|
+
? `mode-variant="${modeVariantLookup[modeVariant]}"`
|
|
168
|
+
: ''}
|
|
169
|
+
>
|
|
170
|
+
${onlyIcon || (icon && icon !== 'none')
|
|
171
|
+
? `
|
|
172
|
+
<tds-icon slot="icon" class='tds-btn-icon ' size='${sizeLookUp[size] === 'sm' ? '16px' : '20px'}' name='${icon}'></tds-icon>
|
|
173
|
+
`
|
|
174
|
+
: ''}
|
|
175
|
+
</tds-button>
|
|
176
|
+
</div>
|
|
177
|
+
<script>
|
|
178
|
+
document.querySelector('tds-button').addEventListener('click', (event) => {
|
|
179
|
+
console.log(event)
|
|
180
|
+
})
|
|
181
|
+
</script>
|
|
182
|
+
`);
|
|
183
|
+
};
|
|
184
|
+
/** Button as a web component */
|
|
185
|
+
export const Default = WebComponentTemplate.bind({});
|
|
@@ -13,37 +13,41 @@
|
|
|
13
13
|
box-shadow: var(--tds-card-box-hover);
|
|
14
14
|
cursor: pointer;
|
|
15
15
|
}
|
|
16
|
-
.card .card-
|
|
16
|
+
.card .card-header {
|
|
17
17
|
font: var(--tds-headline-06);
|
|
18
18
|
letter-spacing: var(--tds-headline-06-ls);
|
|
19
19
|
padding: 16px;
|
|
20
20
|
display: flex;
|
|
21
21
|
align-items: center;
|
|
22
22
|
}
|
|
23
|
-
.card .card-
|
|
23
|
+
.card .card-header slot[name=thumbnail]::slotted(*) {
|
|
24
24
|
width: 36px;
|
|
25
25
|
height: 36px;
|
|
26
26
|
border-radius: 100%;
|
|
27
|
+
margin-right: 16px;
|
|
27
28
|
}
|
|
28
|
-
.card .card-
|
|
29
|
+
.card .card-header .card-top-header {
|
|
29
30
|
padding-left: 16px;
|
|
30
31
|
display: flex;
|
|
31
32
|
flex-direction: column;
|
|
32
|
-
row-gap: 4px;
|
|
33
33
|
}
|
|
34
|
-
.card .card-
|
|
34
|
+
.card .card-header .card-top-header.no-header-img {
|
|
35
35
|
padding-left: 0;
|
|
36
36
|
}
|
|
37
|
-
.card .card-
|
|
38
|
-
row-gap: 0;
|
|
39
|
-
}
|
|
40
|
-
.card .card-top.below {
|
|
37
|
+
.card .card-header.below {
|
|
41
38
|
padding-top: 16px;
|
|
42
39
|
}
|
|
43
|
-
.card .
|
|
40
|
+
.card .header-subheader {
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
gap: 4px;
|
|
44
|
+
}
|
|
45
|
+
.card .header-subheader .header,
|
|
46
|
+
.card .header-subheader slot[name=header] {
|
|
44
47
|
color: var(--tds-card-headline);
|
|
45
48
|
}
|
|
46
|
-
.card .
|
|
49
|
+
.card .header-subheader .subheader,
|
|
50
|
+
.card .header-subheader slot[name=subheader] {
|
|
47
51
|
color: var(--tds-card-sub-headline);
|
|
48
52
|
}
|
|
49
53
|
.card .card-body-img {
|
|
@@ -58,7 +62,7 @@
|
|
|
58
62
|
display: block;
|
|
59
63
|
word-wrap: break-word;
|
|
60
64
|
}
|
|
61
|
-
.card slot[name=
|
|
65
|
+
.card slot[name=body]::slotted(*) {
|
|
62
66
|
font: var(--tds-detail-03);
|
|
63
67
|
letter-spacing: var(--tds-detail-03-ls);
|
|
64
68
|
color: var(--tds-card-body-color);
|
|
@@ -67,7 +71,7 @@
|
|
|
67
71
|
margin-top: 16px;
|
|
68
72
|
max-width: 336px;
|
|
69
73
|
}
|
|
70
|
-
.card slot[name=
|
|
74
|
+
.card slot[name=bottom]::slotted(*) {
|
|
71
75
|
display: flex;
|
|
72
76
|
padding: 16px;
|
|
73
77
|
color: var(--tds-card-icon-color);
|
|
@@ -78,7 +82,7 @@ button {
|
|
|
78
82
|
text-align: left;
|
|
79
83
|
padding: 0;
|
|
80
84
|
}
|
|
81
|
-
button:focus {
|
|
85
|
+
button:focus-visible {
|
|
82
86
|
outline: 2px solid var(--tds-blue-400);
|
|
83
87
|
outline-offset: -2px;
|
|
84
88
|
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { h, Host } from '@stencil/core';
|
|
2
|
+
import { generateUniqueId, hasSlot } from '../../utils/utils';
|
|
3
|
+
/**
|
|
4
|
+
* @slot header - Slot for the Card header.
|
|
5
|
+
* @slot subheader - Slot for the Card subheader.
|
|
6
|
+
* @slot thumbnail - Slot for the Card thumbnail.
|
|
7
|
+
* @slot body - Slot for the body section of the Card.
|
|
8
|
+
* @slot body-image - Slot for the body section of the Card, used for image.
|
|
9
|
+
* @slot bottom - Slot for the bottom section of the Card.
|
|
10
|
+
*/
|
|
2
11
|
export class TdsCard {
|
|
3
12
|
constructor() {
|
|
4
13
|
this.handleClick = () => {
|
|
@@ -6,39 +15,34 @@ export class TdsCard {
|
|
|
6
15
|
cardId: this.cardId,
|
|
7
16
|
});
|
|
8
17
|
};
|
|
9
|
-
this.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
this.getCardHeader = () => {
|
|
19
|
+
const usesHeaderSlot = hasSlot('header', this.host);
|
|
20
|
+
const usesSubheaderSlot = hasSlot('subheader', this.host);
|
|
21
|
+
const usesThumbnailSlot = hasSlot('thumbnail', this.host);
|
|
22
|
+
return (h("div", { class: "card-header" }, usesThumbnailSlot && h("slot", { name: "thumbnail" }), h("div", { class: "header-subheader" }, this.header && h("span", { class: "header" }, this.header), usesHeaderSlot && h("slot", { name: "header" }), this.subheader && h("span", { class: "subheader" }, this.subheader), usesSubheaderSlot && h("slot", { name: "subheader" }))));
|
|
23
|
+
};
|
|
24
|
+
this.getCardContent = () => {
|
|
25
|
+
const usesBodySlot = hasSlot('body', this.host);
|
|
26
|
+
const usesBodyImageSlot = hasSlot('body-image', this.host);
|
|
27
|
+
const usesBottomSlot = hasSlot('bottom', this.host);
|
|
28
|
+
return (h("div", null, this.imagePlacement === 'below-header' && this.getCardHeader(), h("div", { class: `card-body` }, usesBodyImageSlot && h("slot", { name: "body-image" }), this.bodyImg && h("img", { class: "card-body-img", src: this.bodyImg, alt: this.bodyImgAlt }), this.imagePlacement === 'above-header' && this.getCardHeader(), this.bodyDivider && h("tds-divider", null), usesBodySlot && h("slot", { name: "body" })), usesBottomSlot && h("slot", { name: `bottom` })));
|
|
29
|
+
};
|
|
18
30
|
this.modeVariant = null;
|
|
19
|
-
this.
|
|
31
|
+
this.imagePlacement = 'below-header';
|
|
20
32
|
this.header = undefined;
|
|
21
33
|
this.subheader = undefined;
|
|
22
|
-
this.headerImg = undefined;
|
|
23
|
-
this.headerImgAlt = undefined;
|
|
24
34
|
this.bodyImg = undefined;
|
|
25
35
|
this.bodyImgAlt = undefined;
|
|
26
36
|
this.bodyDivider = false;
|
|
27
37
|
this.clickable = false;
|
|
28
|
-
this.cardId =
|
|
29
|
-
this.hasCardBottomSlot = false;
|
|
30
|
-
this.hasCardBodySlot = false;
|
|
31
|
-
}
|
|
32
|
-
connectedCallback() {
|
|
33
|
-
this.hasCardBottomSlot = !!this.hostElement.querySelector('[slot="card-bottom"]');
|
|
34
|
-
this.hasCardBodySlot = !!this.hostElement.querySelector('[slot="card-body"]');
|
|
38
|
+
this.cardId = generateUniqueId();
|
|
35
39
|
}
|
|
36
40
|
render() {
|
|
37
|
-
return (h(Host, { class: this.modeVariant && `tds-mode-variant-${this.modeVariant}` }, this.clickable ? (h("button", { class: `card ${this.clickable ? 'clickable' : ''} ${this.
|
|
41
|
+
return (h(Host, { class: this.modeVariant && `tds-mode-variant-${this.modeVariant}` }, this.clickable ? (h("button", { class: `card ${this.clickable ? 'clickable' : ''} ${this.imagePlacement}`, onClick: () => {
|
|
38
42
|
if (this.clickable) {
|
|
39
43
|
this.handleClick();
|
|
40
44
|
}
|
|
41
|
-
} }, this.getCardContent())) : (h("div", { class: `card ${this.clickable ? 'clickable' : ''} ${this.
|
|
45
|
+
} }, this.getCardContent())) : (h("div", { class: `card ${this.clickable ? 'clickable' : ''} ${this.imagePlacement}` }, this.getCardContent()))));
|
|
42
46
|
}
|
|
43
47
|
static get is() { return "tds-card"; }
|
|
44
48
|
static get encapsulation() { return "shadow"; }
|
|
@@ -72,12 +76,12 @@ export class TdsCard {
|
|
|
72
76
|
"reflect": false,
|
|
73
77
|
"defaultValue": "null"
|
|
74
78
|
},
|
|
75
|
-
"
|
|
79
|
+
"imagePlacement": {
|
|
76
80
|
"type": "string",
|
|
77
81
|
"mutable": false,
|
|
78
82
|
"complexType": {
|
|
79
|
-
"original": "'above' | 'below'",
|
|
80
|
-
"resolved": "\"above\" | \"below\"",
|
|
83
|
+
"original": "'above-header' | 'below-header'",
|
|
84
|
+
"resolved": "\"above-header\" | \"below-header\"",
|
|
81
85
|
"references": {}
|
|
82
86
|
},
|
|
83
87
|
"required": false,
|
|
@@ -86,9 +90,9 @@ export class TdsCard {
|
|
|
86
90
|
"tags": [],
|
|
87
91
|
"text": "Placement of the header"
|
|
88
92
|
},
|
|
89
|
-
"attribute": "
|
|
93
|
+
"attribute": "image-placement",
|
|
90
94
|
"reflect": false,
|
|
91
|
-
"defaultValue": "'
|
|
95
|
+
"defaultValue": "'below-header'"
|
|
92
96
|
},
|
|
93
97
|
"header": {
|
|
94
98
|
"type": "string",
|
|
@@ -124,40 +128,6 @@ export class TdsCard {
|
|
|
124
128
|
"attribute": "subheader",
|
|
125
129
|
"reflect": false
|
|
126
130
|
},
|
|
127
|
-
"headerImg": {
|
|
128
|
-
"type": "string",
|
|
129
|
-
"mutable": false,
|
|
130
|
-
"complexType": {
|
|
131
|
-
"original": "string",
|
|
132
|
-
"resolved": "string",
|
|
133
|
-
"references": {}
|
|
134
|
-
},
|
|
135
|
-
"required": false,
|
|
136
|
-
"optional": false,
|
|
137
|
-
"docs": {
|
|
138
|
-
"tags": [],
|
|
139
|
-
"text": "Header image src"
|
|
140
|
-
},
|
|
141
|
-
"attribute": "header-img",
|
|
142
|
-
"reflect": false
|
|
143
|
-
},
|
|
144
|
-
"headerImgAlt": {
|
|
145
|
-
"type": "string",
|
|
146
|
-
"mutable": false,
|
|
147
|
-
"complexType": {
|
|
148
|
-
"original": "string",
|
|
149
|
-
"resolved": "string",
|
|
150
|
-
"references": {}
|
|
151
|
-
},
|
|
152
|
-
"required": false,
|
|
153
|
-
"optional": false,
|
|
154
|
-
"docs": {
|
|
155
|
-
"tags": [],
|
|
156
|
-
"text": "Alt text for the header image"
|
|
157
|
-
},
|
|
158
|
-
"attribute": "header-img-alt",
|
|
159
|
-
"reflect": false
|
|
160
|
-
},
|
|
161
131
|
"bodyImg": {
|
|
162
132
|
"type": "string",
|
|
163
133
|
"mutable": false,
|
|
@@ -244,16 +214,10 @@ export class TdsCard {
|
|
|
244
214
|
},
|
|
245
215
|
"attribute": "card-id",
|
|
246
216
|
"reflect": false,
|
|
247
|
-
"defaultValue": "
|
|
217
|
+
"defaultValue": "generateUniqueId()"
|
|
248
218
|
}
|
|
249
219
|
};
|
|
250
220
|
}
|
|
251
|
-
static get states() {
|
|
252
|
-
return {
|
|
253
|
-
"hasCardBottomSlot": {},
|
|
254
|
-
"hasCardBodySlot": {}
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
221
|
static get events() {
|
|
258
222
|
return [{
|
|
259
223
|
"method": "tdsClick",
|
|
@@ -272,5 +236,5 @@ export class TdsCard {
|
|
|
272
236
|
}
|
|
273
237
|
}];
|
|
274
238
|
}
|
|
275
|
-
static get elementRef() { return "
|
|
239
|
+
static get elementRef() { return "host"; }
|
|
276
240
|
}
|