@scania/tegel 1.0.0 → 1.0.1
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 +178 -178
- package/components/checkbox.js +75 -0
- package/{dist/components → components}/core-header-item.js +1 -0
- package/{dist/components → components}/divider.js +1 -0
- package/{dist/components → components}/header-dropdown-list-item.js +1 -0
- package/{dist/components → components}/header-dropdown-list.js +1 -0
- package/{dist/components → components}/header-item.js +1 -0
- package/{dist/components → components}/header-launcher-button.js +1 -0
- package/{dist/components → components}/icon.js +2 -1
- package/{dist/components → components}/popover-canvas.js +1 -0
- package/{dist/components → components}/popover-core.js +1 -0
- package/{dist/components → components}/side-menu-item.js +1 -0
- package/{dist/components → components}/side-menu-user-image.js +1 -0
- package/{dist/components → components}/side-menu-user-label.js +1 -0
- package/{dist/components → components}/tds-accordion-item.d.ts +1 -1
- package/{dist/components → components}/tds-accordion-item.js +6 -5
- package/{dist/components → components}/tds-accordion.d.ts +1 -1
- package/{dist/components → components}/tds-accordion.js +1 -0
- package/{dist/components → components}/tds-badge.d.ts +1 -1
- package/{dist/components → components}/tds-badge.js +1 -0
- package/{dist/components → components}/tds-banner.d.ts +1 -1
- package/{dist/components → components}/tds-banner.js +1 -9
- package/{dist/components → components}/tds-block.d.ts +1 -1
- package/{dist/components → components}/tds-block.js +1 -0
- package/{dist/components → components}/tds-body-cell.d.ts +1 -1
- package/{dist/components → components}/tds-body-cell.js +1 -0
- package/{dist/components → components}/tds-breadcrumb.d.ts +1 -1
- package/{dist/components → components}/tds-breadcrumb.js +1 -0
- package/{dist/components → components}/tds-breadcrumbs.d.ts +1 -1
- package/{dist/components → components}/tds-breadcrumbs.js +1 -0
- package/{dist/components → components}/tds-button.d.ts +1 -1
- package/{dist/components → components}/tds-button.js +1 -0
- package/{dist/components → components}/tds-card.d.ts +1 -1
- package/{dist/components → components}/tds-card.js +1 -0
- package/{dist/components → components}/tds-checkbox.d.ts +1 -1
- package/{dist/components → components}/tds-chip.d.ts +1 -1
- package/{dist/components → components}/tds-chip.js +1 -0
- package/{dist/components → components}/tds-core-header-item.d.ts +1 -1
- package/{dist/components → components}/tds-datetime.d.ts +1 -1
- package/{dist/components → components}/tds-datetime.js +9 -8
- package/{dist/components → components}/tds-divider.d.ts +1 -1
- package/{dist/components → components}/tds-dropdown-option.d.ts +1 -1
- package/{dist/components → components}/tds-dropdown-option.js +6 -5
- package/{dist/components → components}/tds-dropdown.d.ts +1 -1
- package/{dist/components → components}/tds-dropdown.js +18 -17
- package/{dist/components → components}/tds-folder-tab.d.ts +1 -1
- package/{dist/components → components}/tds-folder-tab.js +2 -1
- package/{dist/components → components}/tds-folder-tabs.d.ts +1 -1
- package/{dist/components → components}/tds-folder-tabs.js +1 -0
- package/{dist/components → components}/tds-footer-group.d.ts +1 -1
- package/{dist/components → components}/tds-footer-group.js +3 -2
- package/{dist/components → components}/tds-footer-item.d.ts +1 -1
- package/{dist/components → components}/tds-footer-item.js +1 -0
- package/{dist/components → components}/tds-footer.d.ts +1 -1
- package/{dist/components → components}/tds-footer.js +1 -0
- package/{dist/components → components}/tds-header-brand-symbol.d.ts +1 -1
- package/{dist/components → components}/tds-header-brand-symbol.js +1 -0
- package/{dist/components → components}/tds-header-cell.d.ts +1 -1
- package/{dist/components → components}/tds-header-cell.js +1 -0
- package/{dist/components → components}/tds-header-dropdown-list-item.d.ts +1 -1
- package/{dist/components → components}/tds-header-dropdown-list-user.d.ts +1 -1
- package/{dist/components → components}/tds-header-dropdown-list-user.js +1 -0
- package/{dist/components → components}/tds-header-dropdown-list.d.ts +1 -1
- package/{dist/components → components}/tds-header-dropdown.d.ts +1 -1
- package/{dist/components → components}/tds-header-dropdown.js +1 -0
- package/{dist/components → components}/tds-header-hamburger.d.ts +1 -1
- package/{dist/components → components}/tds-header-hamburger.js +1 -0
- package/{dist/components → components}/tds-header-item.d.ts +1 -1
- package/{dist/components → components}/tds-header-launcher-button.d.ts +1 -1
- package/{dist/components → components}/tds-header-launcher-grid-item.d.ts +1 -1
- package/{dist/components → components}/tds-header-launcher-grid-item.js +1 -0
- package/{dist/components → components}/tds-header-launcher-grid-title.d.ts +1 -1
- package/{dist/components → components}/tds-header-launcher-grid-title.js +1 -0
- package/{dist/components → components}/tds-header-launcher-grid.d.ts +1 -1
- package/{dist/components → components}/tds-header-launcher-grid.js +1 -0
- package/{dist/components → components}/tds-header-launcher-list-item.d.ts +1 -1
- package/{dist/components → components}/tds-header-launcher-list-item.js +1 -0
- package/{dist/components → components}/tds-header-launcher-list-title.d.ts +1 -1
- package/{dist/components → components}/tds-header-launcher-list-title.js +1 -0
- package/{dist/components → components}/tds-header-launcher-list.d.ts +1 -1
- package/{dist/components → components}/tds-header-launcher-list.js +1 -0
- package/{dist/components → components}/tds-header-launcher.d.ts +1 -1
- package/{dist/components → components}/tds-header-launcher.js +1 -0
- package/{dist/components → components}/tds-header-title.d.ts +1 -1
- package/{dist/components → components}/tds-header-title.js +1 -0
- package/{dist/components → components}/tds-header.d.ts +1 -1
- package/{dist/components → components}/tds-header.js +1 -0
- package/{dist/components → components}/tds-icon.d.ts +1 -1
- package/{dist/components → components}/tds-inline-tab.d.ts +1 -1
- package/{dist/components → components}/tds-inline-tab.js +2 -1
- package/{dist/components → components}/tds-inline-tabs.d.ts +1 -1
- package/{dist/components → components}/tds-inline-tabs.js +1 -0
- package/{dist/components → components}/tds-link.d.ts +1 -1
- package/{dist/components → components}/tds-link.js +4 -3
- package/{dist/components → components}/tds-message.d.ts +1 -1
- package/{dist/components → components}/tds-message.js +4 -3
- package/{dist/components → components}/tds-modal.d.ts +1 -1
- package/{dist/components → components}/tds-modal.js +1 -0
- package/{dist/components → components}/tds-navigation-tab.d.ts +1 -1
- package/{dist/components → components}/tds-navigation-tab.js +2 -1
- package/{dist/components → components}/tds-navigation-tabs.d.ts +1 -1
- package/{dist/components → components}/tds-navigation-tabs.js +1 -0
- package/{dist/components → components}/tds-popover-canvas.d.ts +1 -1
- package/{dist/components → components}/tds-popover-core.d.ts +1 -1
- package/{dist/components → components}/tds-popover-menu-item.d.ts +1 -1
- package/{dist/components → components}/tds-popover-menu-item.js +1 -0
- package/{dist/components → components}/tds-popover-menu.d.ts +1 -1
- package/{dist/components → components}/tds-popover-menu.js +1 -0
- package/{dist/components → components}/tds-radio-button.d.ts +1 -1
- package/{dist/components → components}/tds-radio-button.js +1 -0
- package/{dist/components → components}/tds-side-menu-close-button.d.ts +1 -1
- package/{dist/components → components}/tds-side-menu-close-button.js +1 -0
- package/{dist/components → components}/tds-side-menu-collapse-button.d.ts +1 -1
- package/{dist/components → components}/tds-side-menu-collapse-button.js +1 -0
- package/{dist/components → components}/tds-side-menu-dropdown-list-item.d.ts +1 -1
- package/{dist/components → components}/tds-side-menu-dropdown-list-item.js +1 -0
- package/{dist/components → components}/tds-side-menu-dropdown-list.d.ts +1 -1
- package/{dist/components → components}/tds-side-menu-dropdown-list.js +1 -0
- package/{dist/components → components}/tds-side-menu-dropdown.d.ts +1 -1
- package/{dist/components → components}/tds-side-menu-dropdown.js +1 -0
- package/{dist/components → components}/tds-side-menu-item.d.ts +1 -1
- package/{dist/components → components}/tds-side-menu-overlay.d.ts +1 -1
- package/{dist/components → components}/tds-side-menu-overlay.js +1 -0
- package/{dist/components → components}/tds-side-menu-user-image.d.ts +1 -1
- package/{dist/components → components}/tds-side-menu-user-label.d.ts +1 -1
- package/{dist/components → components}/tds-side-menu-user.d.ts +1 -1
- package/{dist/components → components}/tds-side-menu-user.js +1 -0
- package/{dist/components → components}/tds-side-menu.d.ts +1 -1
- package/{dist/components → components}/tds-side-menu.js +1 -0
- package/{dist/components → components}/tds-slider.d.ts +1 -1
- package/{dist/components → components}/tds-slider.js +1 -0
- package/{dist/components → components}/tds-spinner.d.ts +1 -1
- package/{dist/components → components}/tds-spinner.js +1 -0
- package/{dist/components → components}/tds-step.d.ts +1 -1
- package/{dist/components → components}/tds-step.js +1 -0
- package/{dist/components → components}/tds-stepper.d.ts +1 -1
- package/{dist/components → components}/tds-stepper.js +1 -0
- package/{dist/components → components}/tds-table-body-row-expandable.d.ts +1 -1
- package/{dist/components → components}/tds-table-body-row-expandable.js +1 -0
- package/{dist/components → components}/tds-table-body-row.d.ts +1 -1
- package/{dist/components → components}/tds-table-body-row.js +1 -0
- package/{dist/components → components}/tds-table-body.d.ts +1 -1
- package/{dist/components → components}/tds-table-body.js +1 -0
- package/{dist/components → components}/tds-table-footer.d.ts +1 -1
- package/{dist/components → components}/tds-table-footer.js +2 -1
- package/{dist/components → components}/tds-table-header.d.ts +1 -1
- package/{dist/components → components}/tds-table-header.js +1 -0
- package/{dist/components → components}/tds-table-toolbar.d.ts +1 -1
- package/{dist/components → components}/tds-table-toolbar.js +1 -0
- package/{dist/components → components}/tds-table.d.ts +1 -1
- package/{dist/components → components}/tds-table.js +1 -0
- package/{dist/components → components}/tds-text-field.d.ts +1 -1
- package/{dist/components → components}/tds-text-field.js +12 -11
- package/{dist/components → components}/tds-textarea.d.ts +1 -1
- package/{dist/components → components}/tds-textarea.js +11 -10
- package/{dist/components → components}/tds-toast.d.ts +1 -1
- package/{dist/components → components}/tds-toast.js +3 -2
- package/{dist/components → components}/tds-toggle.d.ts +1 -1
- package/{dist/components → components}/tds-toggle.js +1 -0
- package/{dist/components → components}/tds-tooltip.d.ts +1 -1
- package/{dist/components → components}/tds-tooltip.js +1 -0
- package/dist/cjs/tds-accordion-item.cjs.entry.js +5 -5
- package/dist/cjs/tds-banner.cjs.entry.js +0 -9
- package/dist/cjs/tds-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/tds-datetime.cjs.entry.js +8 -8
- package/dist/cjs/tds-dropdown-option.cjs.entry.js +5 -5
- package/dist/cjs/tds-dropdown.cjs.entry.js +17 -17
- package/dist/cjs/tds-folder-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-footer-group.cjs.entry.js +2 -2
- package/dist/cjs/tds-icon.cjs.entry.js +1 -1
- package/dist/cjs/tds-inline-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-link.cjs.entry.js +3 -3
- package/dist/cjs/tds-message.cjs.entry.js +3 -3
- package/dist/cjs/tds-navigation-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-footer.cjs.entry.js +1 -1
- package/dist/cjs/tds-text-field.cjs.entry.js +11 -11
- package/dist/cjs/tds-textarea.cjs.entry.js +10 -10
- package/dist/cjs/tds-toast.cjs.entry.js +2 -2
- package/dist/collection/components/accordion/accordion-item/accordion-item.js +6 -6
- package/dist/collection/components/accordion/accordion.stories.js +21 -21
- package/dist/collection/components/badge/badge.stories.js +30 -30
- package/dist/collection/components/banner/banner.js +2 -25
- package/dist/collection/components/banner/banner.stories.js +16 -19
- package/dist/collection/components/block/block.stories.js +9 -9
- package/dist/collection/components/breadcrumbs/breadcrumbs.stories.js +12 -12
- package/dist/collection/components/button/button.stories.js +26 -26
- package/dist/collection/components/card/card.js +2 -2
- package/dist/collection/components/card/card.stories.js +31 -31
- package/dist/collection/components/checkbox/checkbox.css +14 -0
- package/dist/collection/components/checkbox/checkbox.js +1 -1
- package/dist/collection/components/checkbox/checkbox.stories.js +22 -22
- package/dist/collection/components/chip/chip.js +5 -5
- package/dist/collection/components/chip/chip.stories.js +93 -93
- package/dist/collection/components/datetime/datetime.js +8 -8
- package/dist/collection/components/datetime/datetime.stories.js +40 -40
- package/dist/collection/components/divider/divider.stories.js +4 -4
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.css +4 -4
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +5 -5
- package/dist/collection/components/dropdown/dropdown.js +18 -18
- package/dist/collection/components/dropdown/dropdown.stories.js +57 -57
- package/dist/collection/components/footer/footer-group/footer-group.js +2 -2
- package/dist/collection/components/footer/footer.stories.js +93 -93
- package/dist/collection/components/header/header-dropdown/header-dropdown.js +1 -1
- package/dist/collection/components/header/header-item/header-item.js +1 -1
- package/dist/collection/components/header/header-launcher-button/header-launcher-button.js +1 -1
- package/dist/collection/components/header/header.stories.js +31 -31
- package/dist/collection/components/icon/icon.stories.js +2 -2
- package/dist/collection/components/icon/iconsArray.js +115 -115
- package/dist/collection/components/link/link.js +3 -3
- package/dist/collection/components/link/link.stories.js +9 -9
- package/dist/collection/components/message/message.js +3 -3
- package/dist/collection/components/message/message.stories.js +18 -18
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/modal/modal.stories.js +27 -27
- package/dist/collection/components/popover-canvas/popover-canvas.js +1 -1
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js +33 -33
- package/dist/collection/components/popover-core/popover-core.js +1 -1
- package/dist/collection/components/popover-menu/popover-menu.js +1 -1
- package/dist/collection/components/popover-menu/popover-menu.stories.js +60 -60
- package/dist/collection/components/radio-button/radio-button.js +2 -2
- package/dist/collection/components/radio-button/radio-button.stories.js +44 -44
- package/dist/collection/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.js +1 -1
- package/dist/collection/components/side-menu/side-menu-dropdown/side-menu-dropdown.js +1 -1
- package/dist/collection/components/side-menu/side-menu-item/side-menu-item.js +1 -1
- package/dist/collection/components/side-menu/side-menu.js +4 -4
- package/dist/collection/components/side-menu/side-menu.stories.js +143 -143
- package/dist/collection/components/slider/slider.js +1 -1
- package/dist/collection/components/slider/slider.stories.js +38 -38
- package/dist/collection/components/spinner/spinner.stories.js +5 -5
- package/dist/collection/components/stepper/stepper.js +2 -2
- package/dist/collection/components/stepper/stepper.stories.js +14 -14
- package/dist/collection/components/table/table/table.js +2 -2
- package/dist/collection/components/table/table-body-row/table-body-row.js +1 -1
- package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.js +1 -1
- package/dist/collection/components/table/table-component-basic.stories.js +51 -51
- package/dist/collection/components/table/table-component-batch-actions.stories.js +58 -58
- package/dist/collection/components/table/table-component-custom-width.stories.js +52 -52
- package/dist/collection/components/table/table-component-expandable-rows.stories.js +38 -38
- package/dist/collection/components/table/table-component-filtering.stories.js +71 -71
- package/dist/collection/components/table/table-component-multiselect.stories.js +73 -73
- package/dist/collection/components/table/table-component-pagination.stories.js +72 -72
- package/dist/collection/components/table/table-component-sorting.stories.js +74 -74
- package/dist/collection/components/table/table-footer/table-footer.css +2 -1
- package/dist/collection/components/table/table-footer/table-footer.js +1 -1
- package/dist/collection/components/table/table-header/table-header.js +1 -1
- package/dist/collection/components/table/table-header-cell/table-header-cell.js +3 -3
- package/dist/collection/components/table/table-toolbar/table-toolbar.js +2 -2
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.js +1 -1
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +2 -2
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.stories.js +34 -34
- package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.js +1 -1
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +2 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.stories.js +34 -34
- package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.js +1 -1
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +2 -2
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +36 -36
- package/dist/collection/components/text-field/text-field.js +12 -12
- package/dist/collection/components/text-field/text-field.stories.js +45 -45
- package/dist/collection/components/textarea/textarea.js +10 -10
- package/dist/collection/components/textarea/textarea.stories.js +40 -40
- package/dist/collection/components/toast/toast.js +3 -3
- package/dist/collection/components/toast/toast.stories.js +15 -15
- package/dist/collection/components/toggle/toggle.js +1 -1
- package/dist/collection/components/toggle/toggle.stories.js +17 -17
- package/dist/collection/components/tooltip/tooltip.stories.js +33 -33
- package/dist/collection/stories/Installation/installation.stories.js +205 -205
- package/dist/collection/stories/announcements/announce-tegel.stories.js +248 -248
- package/dist/collection/stories/announcements/prefix-change.stories.js +79 -79
- package/dist/collection/stories/foundations/color/color-brand.stories.js +24 -24
- package/dist/collection/stories/foundations/color/color-scales.stories.js +18 -18
- package/dist/collection/stories/foundations/color/color-semantic.stories.js +26 -26
- package/dist/collection/stories/foundations/grid/grid.stories.js +334 -334
- package/dist/collection/stories/foundations/spacing/spacing-element.stories.js +90 -90
- package/dist/collection/stories/foundations/spacing/spacing-layout.stories.js +84 -84
- package/dist/collection/stories/foundations/typography/typography-body.stories.js +7 -7
- package/dist/collection/stories/foundations/typography/typography-detail.stories.js +8 -8
- package/dist/collection/stories/foundations/typography/typography-headline.stories.js +17 -17
- package/dist/collection/stories/foundations/typography/typography-paragraph.stories.js +3 -3
- package/dist/collection/stories/patterns/navigation/navigation-basic.stories.js +53 -53
- package/dist/collection/stories/patterns/navigation/navigation-fewitems.stories.js +227 -227
- package/dist/collection/stories/patterns/navigation/navigation-manyitems.stories.js +202 -202
- package/dist/collection/stories/patterns/navigation/navigation-user-menu.stories.js +98 -98
- package/dist/collection/stories/tegel.stories.js +270 -279
- package/dist/collection/stories/utility/color/background-color.stories.js +13 -13
- package/dist/collection/stories/utility/color/text-color.stories.js +11 -11
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/tds-accordion-item.entry.js +5 -5
- package/dist/esm/tds-banner.entry.js +0 -9
- package/dist/esm/tds-checkbox.entry.js +1 -1
- package/dist/esm/tds-datetime.entry.js +8 -8
- package/dist/esm/tds-dropdown-option.entry.js +5 -5
- package/dist/esm/tds-dropdown.entry.js +17 -17
- package/dist/esm/tds-folder-tab.entry.js +1 -1
- package/dist/esm/tds-footer-group.entry.js +2 -2
- package/dist/esm/tds-icon.entry.js +1 -1
- package/dist/esm/tds-inline-tab.entry.js +1 -1
- package/dist/esm/tds-link.entry.js +3 -3
- package/dist/esm/tds-message.entry.js +3 -3
- package/dist/esm/tds-navigation-tab.entry.js +1 -1
- package/dist/esm/tds-table-footer.entry.js +1 -1
- package/dist/esm/tds-text-field.entry.js +11 -11
- package/dist/esm/tds-textarea.entry.js +10 -10
- package/dist/esm/tds-toast.entry.js +2 -2
- package/dist/tegel/p-2efaac74.entry.js +1 -0
- package/dist/tegel/{p-9b560c6d.entry.js → p-67fa6245.entry.js} +1 -1
- package/dist/tegel/p-e9ae12d7.entry.js +1 -0
- package/dist/tegel/{p-52edb8b7.entry.js → p-e9b8d1d5.entry.js} +1 -1
- package/dist/tegel/tegel.css +2 -4
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/banner/banner.d.ts +0 -5
- package/dist/types/components/text-field/text-field.d.ts +1 -1
- package/dist/types/components.d.ts +58 -64
- package/dist/types/global.d.ts +2 -2
- package/package.json +81 -80
- package/dist/components/checkbox.js +0 -74
- package/dist/tegel/p-cf75e7c1.entry.js +0 -1
- package/dist/tegel/p-faaa50c2.entry.js +0 -1
- /package/{dist/components → components}/index.d.ts +0 -0
- /package/{dist/components → components}/index.js +0 -0
- /package/{dist/components → components}/tds-checkbox.js +0 -0
- /package/{dist/components → components}/tds-core-header-item.js +0 -0
- /package/{dist/components → components}/tds-divider.js +0 -0
- /package/{dist/components → components}/tds-header-dropdown-list-item.js +0 -0
- /package/{dist/components → components}/tds-header-dropdown-list.js +0 -0
- /package/{dist/components → components}/tds-header-item.js +0 -0
- /package/{dist/components → components}/tds-header-launcher-button.js +0 -0
- /package/{dist/components → components}/tds-icon.js +0 -0
- /package/{dist/components → components}/tds-popover-canvas.js +0 -0
- /package/{dist/components → components}/tds-popover-core.js +0 -0
- /package/{dist/components → components}/tds-side-menu-item.js +0 -0
- /package/{dist/components → components}/tds-side-menu-user-image.js +0 -0
- /package/{dist/components → components}/tds-side-menu-user-label.js +0 -0
- /package/{dist/components → components}/utils.js +0 -0
|
@@ -67,39 +67,39 @@ export default {
|
|
|
67
67
|
selectedIndex: 'None',
|
|
68
68
|
},
|
|
69
69
|
};
|
|
70
|
-
const Template = ({ modeVariant, selectedIndex, defaultSelectedIndex }) => formatHtmlPreview(`
|
|
71
|
-
<tds-folder-tabs
|
|
72
|
-
${defaultSelectedIndex !== 'None' ? `default-selected-index="${defaultSelectedIndex}"` : ''}
|
|
73
|
-
${selectedIndex && selectedIndex !== 'None' ? `selected-index="${selectedIndex}"` : ''}
|
|
74
|
-
${modeVariant !== 'Inherit from parent' ? `mode-variant="${modeVariant.toLowerCase()}"` : ''}>
|
|
75
|
-
<tds-folder-tab>
|
|
76
|
-
<button>First tab</button>
|
|
77
|
-
</tds-folder-tab>
|
|
78
|
-
<tds-folder-tab>
|
|
79
|
-
<button>Second tab is much longer</button>
|
|
80
|
-
</tds-folder-tab>
|
|
81
|
-
<tds-folder-tab>
|
|
82
|
-
<button>Third tab</button>
|
|
83
|
-
</tds-folder-tab>
|
|
84
|
-
<tds-folder-tab disabled>
|
|
85
|
-
<button>Fourth tab</button>
|
|
86
|
-
</tds-folder-tab>
|
|
87
|
-
</tds-folder-tabs>
|
|
88
|
-
|
|
89
|
-
<!-- Demo container. -->
|
|
90
|
-
<div class="demo-container">
|
|
91
|
-
<h4 class="tds-headline-04">Selected tab index: <span class="selectedTabIndex"></span></h4>
|
|
92
|
-
</div>
|
|
93
|
-
|
|
94
|
-
<!-- Script tag with eventlistener for demo purposes. -->
|
|
95
|
-
<script>
|
|
96
|
-
selectedTabIndex = document.getElementsByClassName('selectedTabIndex')[0]
|
|
97
|
-
tabs = document.querySelector('tds-folder-tabs');
|
|
98
|
-
|
|
99
|
-
tabs.addEventListener('tdsChange', (event) => {
|
|
100
|
-
selectedTabIndex.innerHTML = event.detail.selectedTabIndex
|
|
101
|
-
console.log(event)
|
|
102
|
-
})
|
|
103
|
-
</script>
|
|
70
|
+
const Template = ({ modeVariant, selectedIndex, defaultSelectedIndex }) => formatHtmlPreview(`
|
|
71
|
+
<tds-folder-tabs
|
|
72
|
+
${defaultSelectedIndex !== 'None' ? `default-selected-index="${defaultSelectedIndex}"` : ''}
|
|
73
|
+
${selectedIndex && selectedIndex !== 'None' ? `selected-index="${selectedIndex}"` : ''}
|
|
74
|
+
${modeVariant !== 'Inherit from parent' ? `mode-variant="${modeVariant.toLowerCase()}"` : ''}>
|
|
75
|
+
<tds-folder-tab>
|
|
76
|
+
<button>First tab</button>
|
|
77
|
+
</tds-folder-tab>
|
|
78
|
+
<tds-folder-tab>
|
|
79
|
+
<button>Second tab is much longer</button>
|
|
80
|
+
</tds-folder-tab>
|
|
81
|
+
<tds-folder-tab>
|
|
82
|
+
<button>Third tab</button>
|
|
83
|
+
</tds-folder-tab>
|
|
84
|
+
<tds-folder-tab disabled>
|
|
85
|
+
<button>Fourth tab</button>
|
|
86
|
+
</tds-folder-tab>
|
|
87
|
+
</tds-folder-tabs>
|
|
88
|
+
|
|
89
|
+
<!-- Demo container. -->
|
|
90
|
+
<div class="demo-container">
|
|
91
|
+
<h4 class="tds-headline-04">Selected tab index: <span class="selectedTabIndex"></span></h4>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<!-- Script tag with eventlistener for demo purposes. -->
|
|
95
|
+
<script>
|
|
96
|
+
selectedTabIndex = document.getElementsByClassName('selectedTabIndex')[0]
|
|
97
|
+
tabs = document.querySelector('tds-folder-tabs');
|
|
98
|
+
|
|
99
|
+
tabs.addEventListener('tdsChange', (event) => {
|
|
100
|
+
selectedTabIndex.innerHTML = event.detail.selectedTabIndex
|
|
101
|
+
console.log(event)
|
|
102
|
+
})
|
|
103
|
+
</script>
|
|
104
104
|
`);
|
|
105
105
|
export const FolderTabs = Template.bind({});
|
|
@@ -12,7 +12,7 @@ export class TdsInlineTab {
|
|
|
12
12
|
this.selected = selected;
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { role: "listitem" }, h("div", { class: `inline-tab-item ${this.selected ? 'selected' : ''}
|
|
15
|
+
return (h(Host, { role: "listitem" }, h("div", { class: `inline-tab-item ${this.selected ? 'selected' : ''}
|
|
16
16
|
${this.disabled ? 'disabled' : ''}` }, h("slot", null))));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "tds-inline-tab"; }
|
|
@@ -209,7 +209,7 @@ export class TdsInlineTabs {
|
|
|
209
209
|
"optional": false,
|
|
210
210
|
"docs": {
|
|
211
211
|
"tags": [],
|
|
212
|
-
"text": "Sets the selected Tab.\
|
|
212
|
+
"text": "Sets the selected Tab.\nIf this is set, all Tab changes need to be handled by the user."
|
|
213
213
|
},
|
|
214
214
|
"attribute": "selected-index",
|
|
215
215
|
"reflect": true
|
|
@@ -235,7 +235,7 @@ export class TdsInlineTabs {
|
|
|
235
235
|
"text": "Event emitted when the selected Tab is changed."
|
|
236
236
|
},
|
|
237
237
|
"complexType": {
|
|
238
|
-
"original": "{\
|
|
238
|
+
"original": "{\n selectedTabIndex: number;\n }",
|
|
239
239
|
"resolved": "{ selectedTabIndex: number; }",
|
|
240
240
|
"references": {}
|
|
241
241
|
}
|
|
@@ -61,39 +61,39 @@ export default {
|
|
|
61
61
|
selectedIndex: 'None',
|
|
62
62
|
},
|
|
63
63
|
};
|
|
64
|
-
const Template = ({ modeVariant, selectedIndex, defaultSelectedIndex }) => formatHtmlPreview(`
|
|
65
|
-
<tds-inline-tabs
|
|
66
|
-
${defaultSelectedIndex !== 'None' ? `default-selected-index="${defaultSelectedIndex}"` : ''}
|
|
67
|
-
${selectedIndex && selectedIndex !== 'None' ? `selected-index="${selectedIndex}"` : ''}
|
|
68
|
-
${modeVariant !== 'Inherit from parent' ? `mode-variant="${modeVariant.toLowerCase()}"` : ''}>
|
|
69
|
-
<tds-inline-tab>
|
|
70
|
-
<button>First tab</button>
|
|
71
|
-
</tds-inline-tab>
|
|
72
|
-
<tds-inline-tab>
|
|
73
|
-
<button>Second tab is much longer</button>
|
|
74
|
-
</tds-inline-tab>
|
|
75
|
-
<tds-inline-tab>
|
|
76
|
-
<button>Third tab</button>
|
|
77
|
-
</tds-inline-tab>
|
|
78
|
-
<tds-inline-tab disabled>
|
|
79
|
-
<button>Fourth tab</button>
|
|
80
|
-
</tds-inline-tab>
|
|
81
|
-
</tds-inline-tabs>
|
|
82
|
-
|
|
83
|
-
<!-- Demo container. -->
|
|
84
|
-
<div class="demo-container">
|
|
85
|
-
<h4 class="tds-headline-04">Selected tabindex: <span class="selectedTabIndex"></span></h4>
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
<!-- Script tag with eventlistener for demo purposes. -->
|
|
89
|
-
<script>
|
|
90
|
-
selectedTabIndex = document.getElementsByClassName('selectedTabIndex')[0]
|
|
91
|
-
tabs = document.querySelector('tds-inline-tabs');
|
|
92
|
-
|
|
93
|
-
tabs.addEventListener('tdsChange', (event) => {
|
|
94
|
-
selectedTabIndex.innerHTML = event.detail.selectedTabIndex
|
|
95
|
-
console.log(event)
|
|
96
|
-
})
|
|
97
|
-
</script>
|
|
64
|
+
const Template = ({ modeVariant, selectedIndex, defaultSelectedIndex }) => formatHtmlPreview(`
|
|
65
|
+
<tds-inline-tabs
|
|
66
|
+
${defaultSelectedIndex !== 'None' ? `default-selected-index="${defaultSelectedIndex}"` : ''}
|
|
67
|
+
${selectedIndex && selectedIndex !== 'None' ? `selected-index="${selectedIndex}"` : ''}
|
|
68
|
+
${modeVariant !== 'Inherit from parent' ? `mode-variant="${modeVariant.toLowerCase()}"` : ''}>
|
|
69
|
+
<tds-inline-tab>
|
|
70
|
+
<button>First tab</button>
|
|
71
|
+
</tds-inline-tab>
|
|
72
|
+
<tds-inline-tab>
|
|
73
|
+
<button>Second tab is much longer</button>
|
|
74
|
+
</tds-inline-tab>
|
|
75
|
+
<tds-inline-tab>
|
|
76
|
+
<button>Third tab</button>
|
|
77
|
+
</tds-inline-tab>
|
|
78
|
+
<tds-inline-tab disabled>
|
|
79
|
+
<button>Fourth tab</button>
|
|
80
|
+
</tds-inline-tab>
|
|
81
|
+
</tds-inline-tabs>
|
|
82
|
+
|
|
83
|
+
<!-- Demo container. -->
|
|
84
|
+
<div class="demo-container">
|
|
85
|
+
<h4 class="tds-headline-04">Selected tabindex: <span class="selectedTabIndex"></span></h4>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<!-- Script tag with eventlistener for demo purposes. -->
|
|
89
|
+
<script>
|
|
90
|
+
selectedTabIndex = document.getElementsByClassName('selectedTabIndex')[0]
|
|
91
|
+
tabs = document.querySelector('tds-inline-tabs');
|
|
92
|
+
|
|
93
|
+
tabs.addEventListener('tdsChange', (event) => {
|
|
94
|
+
selectedTabIndex.innerHTML = event.detail.selectedTabIndex
|
|
95
|
+
console.log(event)
|
|
96
|
+
})
|
|
97
|
+
</script>
|
|
98
98
|
`);
|
|
99
99
|
export const InlineTabs = Template.bind({});
|
|
@@ -12,7 +12,7 @@ export class TdsNavigationTab {
|
|
|
12
12
|
this.selected = selected;
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { role: "listitem" }, h("div", { class: `navigation-tab-item ${this.selected ? 'selected' : ''}
|
|
15
|
+
return (h(Host, { role: "listitem" }, h("div", { class: `navigation-tab-item ${this.selected ? 'selected' : ''}
|
|
16
16
|
${this.disabled ? 'disabled' : ''}` }, h("slot", null))));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "tds-navigation-tab"; }
|
|
@@ -200,7 +200,7 @@ export class TdsNavigationTabs {
|
|
|
200
200
|
"optional": false,
|
|
201
201
|
"docs": {
|
|
202
202
|
"tags": [],
|
|
203
|
-
"text": "Sets the selected Tab.\
|
|
203
|
+
"text": "Sets the selected Tab.\nIf this is set, all Tab changes need to be handled by the user."
|
|
204
204
|
},
|
|
205
205
|
"attribute": "selected-index",
|
|
206
206
|
"reflect": true
|
|
@@ -225,7 +225,7 @@ export class TdsNavigationTabs {
|
|
|
225
225
|
"text": "Event emitted when the selected Tab is changed."
|
|
226
226
|
},
|
|
227
227
|
"complexType": {
|
|
228
|
-
"original": "{\
|
|
228
|
+
"original": "{\n selectedTabIndex: number;\n }",
|
|
229
229
|
"resolved": "{ selectedTabIndex: number; }",
|
|
230
230
|
"references": {}
|
|
231
231
|
}
|
|
@@ -61,41 +61,41 @@ export default {
|
|
|
61
61
|
selectedIndex: 'None',
|
|
62
62
|
},
|
|
63
63
|
};
|
|
64
|
-
const Template = ({ modeVariant, selectedIndex, defaultSelectedIndex }) => formatHtmlPreview(`
|
|
65
|
-
<tds-navigation-tabs
|
|
66
|
-
${defaultSelectedIndex !== 'None' ? `default-selected-index="${defaultSelectedIndex}"` : ''}
|
|
67
|
-
${selectedIndex && selectedIndex !== 'None' ? `selected-index="${selectedIndex}"` : ''}
|
|
68
|
-
${modeVariant !== 'Inherit from parent' ? ` mode-variant="${modeVariant.toLowerCase()}"` : ''}
|
|
69
|
-
>
|
|
70
|
-
<tds-navigation-tab>
|
|
71
|
-
<button>First tab</button>
|
|
72
|
-
</tds-navigation-tab>
|
|
73
|
-
<tds-navigation-tab>
|
|
74
|
-
<button>Second tab is much longer</button>
|
|
75
|
-
</tds-navigation-tab>
|
|
76
|
-
<tds-navigation-tab>
|
|
77
|
-
<button>Third tab</button>
|
|
78
|
-
</tds-navigation-tab>
|
|
79
|
-
<tds-navigation-tab disabled>
|
|
80
|
-
<button>Fourth tab</button>
|
|
81
|
-
</tds-navigation-tab>
|
|
82
|
-
</tds-navigation-tabs>
|
|
83
|
-
|
|
84
|
-
<!-- Demo container. -->
|
|
85
|
-
<div class="demo-container">
|
|
86
|
-
<h4 class="tds-headline-04">Selected tabindex: <span class="selectedTabIndex"></span></h4>
|
|
87
|
-
</div>
|
|
88
|
-
|
|
89
|
-
<!-- Script tag with eventlistener for demo purposes. -->
|
|
90
|
-
<script>
|
|
91
|
-
selectedTab = document.getElementsByClassName('selectedTab')[0]
|
|
92
|
-
selectedTabIndex = document.getElementsByClassName('selectedTabIndex')[0]
|
|
93
|
-
tabs = document.querySelector('tds-navigation-tabs');
|
|
94
|
-
|
|
95
|
-
tabs.addEventListener('tdsChange', (event) => {
|
|
96
|
-
selectedTabIndex.innerHTML = event.detail.selectedTabIndex
|
|
97
|
-
console.log(event)
|
|
98
|
-
})
|
|
99
|
-
</script>
|
|
64
|
+
const Template = ({ modeVariant, selectedIndex, defaultSelectedIndex }) => formatHtmlPreview(`
|
|
65
|
+
<tds-navigation-tabs
|
|
66
|
+
${defaultSelectedIndex !== 'None' ? `default-selected-index="${defaultSelectedIndex}"` : ''}
|
|
67
|
+
${selectedIndex && selectedIndex !== 'None' ? `selected-index="${selectedIndex}"` : ''}
|
|
68
|
+
${modeVariant !== 'Inherit from parent' ? ` mode-variant="${modeVariant.toLowerCase()}"` : ''}
|
|
69
|
+
>
|
|
70
|
+
<tds-navigation-tab>
|
|
71
|
+
<button>First tab</button>
|
|
72
|
+
</tds-navigation-tab>
|
|
73
|
+
<tds-navigation-tab>
|
|
74
|
+
<button>Second tab is much longer</button>
|
|
75
|
+
</tds-navigation-tab>
|
|
76
|
+
<tds-navigation-tab>
|
|
77
|
+
<button>Third tab</button>
|
|
78
|
+
</tds-navigation-tab>
|
|
79
|
+
<tds-navigation-tab disabled>
|
|
80
|
+
<button>Fourth tab</button>
|
|
81
|
+
</tds-navigation-tab>
|
|
82
|
+
</tds-navigation-tabs>
|
|
83
|
+
|
|
84
|
+
<!-- Demo container. -->
|
|
85
|
+
<div class="demo-container">
|
|
86
|
+
<h4 class="tds-headline-04">Selected tabindex: <span class="selectedTabIndex"></span></h4>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<!-- Script tag with eventlistener for demo purposes. -->
|
|
90
|
+
<script>
|
|
91
|
+
selectedTab = document.getElementsByClassName('selectedTab')[0]
|
|
92
|
+
selectedTabIndex = document.getElementsByClassName('selectedTabIndex')[0]
|
|
93
|
+
tabs = document.querySelector('tds-navigation-tabs');
|
|
94
|
+
|
|
95
|
+
tabs.addEventListener('tdsChange', (event) => {
|
|
96
|
+
selectedTabIndex.innerHTML = event.detail.selectedTabIndex
|
|
97
|
+
console.log(event)
|
|
98
|
+
})
|
|
99
|
+
</script>
|
|
100
100
|
`);
|
|
101
101
|
export const NavigationTabs = Template.bind({});
|
|
@@ -46,21 +46,21 @@ export class TdsTextField {
|
|
|
46
46
|
var _a;
|
|
47
47
|
const usesPrefixSlot = hasSlot('prefix', this.host);
|
|
48
48
|
const usesSuffixSlot = hasSlot('suffix', this.host);
|
|
49
|
-
return (h("div", { class: `
|
|
50
|
-
${this.noMinWidth ? 'form-text-field-nomin' : ''}
|
|
49
|
+
return (h("div", { class: `
|
|
50
|
+
${this.noMinWidth ? 'form-text-field-nomin' : ''}
|
|
51
51
|
${this.focusInput && !this.disabled
|
|
52
52
|
? 'form-text-field text-field-focus'
|
|
53
|
-
: ' form-text-field'}
|
|
54
|
-
${this.value ? 'text-field-data' : ''}
|
|
53
|
+
: ' form-text-field'}
|
|
54
|
+
${this.value ? 'text-field-data' : ''}
|
|
55
55
|
${this.labelPosition === 'inside' && this.size !== 'sm'
|
|
56
56
|
? 'text-field-container-label-inside'
|
|
57
|
-
: ''}
|
|
58
|
-
${this.disabled ? 'form-text-field-disabled' : ''}
|
|
59
|
-
${this.readOnly ? 'form-text-field-readonly' : ''}
|
|
60
|
-
${this.modeVariant !== null ? `tds-mode-variant-${this.modeVariant}` : ''}
|
|
61
|
-
${this.size === 'md' ? 'form-text-field-md' : ''}
|
|
62
|
-
${this.size === 'sm' ? 'form-text-field-sm' : ''}
|
|
63
|
-
${this.state === 'error' || this.state === 'success' ? `form-text-field-${this.state}` : ''}
|
|
57
|
+
: ''}
|
|
58
|
+
${this.disabled ? 'form-text-field-disabled' : ''}
|
|
59
|
+
${this.readOnly ? 'form-text-field-readonly' : ''}
|
|
60
|
+
${this.modeVariant !== null ? `tds-mode-variant-${this.modeVariant}` : ''}
|
|
61
|
+
${this.size === 'md' ? 'form-text-field-md' : ''}
|
|
62
|
+
${this.size === 'sm' ? 'form-text-field-sm' : ''}
|
|
63
|
+
${this.state === 'error' || this.state === 'success' ? `form-text-field-${this.state}` : ''}
|
|
64
64
|
` }, this.labelPosition === 'outside' && (h("div", { class: "text-field-label-outside" }, h("div", null, this.label))), h("div", { onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { class: `text-field-slot-wrap-prefix text-field-${this.state}` }, h("slot", { name: "prefix" }))), h("div", { class: "text-field-input-container" }, h("input", { ref: (inputEl) => (this.textInput = inputEl), class: `text-field-input text-field-input-${this.size}`, type: this.type, disabled: this.disabled, readonly: this.readOnly, placeholder: this.placeholder, value: this.value, autofocus: this.autofocus, maxlength: this.maxLength, name: this.name, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onFocus: (event) => {
|
|
65
65
|
if (!this.readOnly) {
|
|
66
66
|
this.handleFocus(event);
|
|
@@ -276,7 +276,7 @@ export class TdsTextField {
|
|
|
276
276
|
"optional": false,
|
|
277
277
|
"docs": {
|
|
278
278
|
"tags": [],
|
|
279
|
-
"text": "
|
|
279
|
+
"text": "Unset minimum width of 208px."
|
|
280
280
|
},
|
|
281
281
|
"attribute": "no-min-width",
|
|
282
282
|
"reflect": false,
|
|
@@ -193,55 +193,55 @@ const Template = ({ modeVariant, state, type, size, label, labelPosition, placeh
|
|
|
193
193
|
Medium: 'md',
|
|
194
194
|
Small: 'sm',
|
|
195
195
|
};
|
|
196
|
-
return formatHtmlPreview(`
|
|
197
|
-
<style>
|
|
198
|
-
/* demo-wrapper is for demonstration purposes only*/
|
|
199
|
-
.demo-wrapper {
|
|
200
|
-
width: 200px;
|
|
201
|
-
height: 150px;
|
|
202
|
-
}
|
|
203
|
-
</style>
|
|
204
|
-
|
|
205
|
-
<div class="demo-wrapper">
|
|
206
|
-
<tds-text-field
|
|
207
|
-
type="${type}"
|
|
208
|
-
size="${sizeLookUp[size]}"
|
|
209
|
-
${modeVariant !== 'Inherit from parent' ? `mode-variant="${modeVariant.toLowerCase()}"` : ''}
|
|
210
|
-
state="${stateValue}"
|
|
211
|
-
label="${label}"
|
|
212
|
-
label-position="${labelPosition.toLowerCase()}"
|
|
213
|
-
${helper ? `helper="${helper}"` : ''}
|
|
214
|
-
${maxlength}
|
|
215
|
-
${disabled ? 'disabled' : ''}
|
|
216
|
-
${readonly ? 'read-only' : ''}
|
|
217
|
-
${noMinWidth ? 'no-min-width' : ''}
|
|
218
|
-
placeholder="${placeholderText}" >
|
|
196
|
+
return formatHtmlPreview(`
|
|
197
|
+
<style>
|
|
198
|
+
/* demo-wrapper is for demonstration purposes only*/
|
|
199
|
+
.demo-wrapper {
|
|
200
|
+
width: 200px;
|
|
201
|
+
height: 150px;
|
|
202
|
+
}
|
|
203
|
+
</style>
|
|
204
|
+
|
|
205
|
+
<div class="demo-wrapper">
|
|
206
|
+
<tds-text-field
|
|
207
|
+
type="${type}"
|
|
208
|
+
size="${sizeLookUp[size]}"
|
|
209
|
+
${modeVariant !== 'Inherit from parent' ? `mode-variant="${modeVariant.toLowerCase()}"` : ''}
|
|
210
|
+
state="${stateValue}"
|
|
211
|
+
label="${label}"
|
|
212
|
+
label-position="${labelPosition.toLowerCase()}"
|
|
213
|
+
${helper ? `helper="${helper}"` : ''}
|
|
214
|
+
${maxlength}
|
|
215
|
+
${disabled ? 'disabled' : ''}
|
|
216
|
+
${readonly ? 'read-only' : ''}
|
|
217
|
+
${noMinWidth ? 'no-min-width' : ''}
|
|
218
|
+
placeholder="${placeholderText}" >
|
|
219
219
|
${prefix || suffix
|
|
220
|
-
? `
|
|
220
|
+
? `
|
|
221
221
|
${prefixType || suffixType === 'Text'
|
|
222
222
|
? `<span slot="${prefix ? 'prefix' : 'suffix'}">$</span>`
|
|
223
|
-
: `<tds-icon slot="${prefix ? 'prefix' : 'suffix'}" name="truck" size="20px"></tds-icon>`}
|
|
223
|
+
: `<tds-icon slot="${prefix ? 'prefix' : 'suffix'}" name="truck" size="20px"></tds-icon>`}
|
|
224
224
|
`
|
|
225
|
-
: ''}
|
|
226
|
-
|
|
227
|
-
</tds-text-field>
|
|
228
|
-
</div>
|
|
229
|
-
<!-- Script tag for demo purposes -->
|
|
230
|
-
<script>
|
|
231
|
-
textElement = document.querySelector('tds-text-field')
|
|
232
|
-
textElement.addEventListener('tdsFocus',(event) => {
|
|
233
|
-
console.log(event)
|
|
234
|
-
})
|
|
235
|
-
textElement.addEventListener('tdsBlur',(event) => {
|
|
236
|
-
console.log(event)
|
|
237
|
-
})
|
|
238
|
-
textElement.addEventListener('tdsInput',(event) => {
|
|
239
|
-
console.log(event)
|
|
240
|
-
})
|
|
241
|
-
textElement.addEventListener('tdsChange',(event) => {
|
|
242
|
-
console.log(event)
|
|
243
|
-
})
|
|
244
|
-
</script>
|
|
225
|
+
: ''}
|
|
226
|
+
|
|
227
|
+
</tds-text-field>
|
|
228
|
+
</div>
|
|
229
|
+
<!-- Script tag for demo purposes -->
|
|
230
|
+
<script>
|
|
231
|
+
textElement = document.querySelector('tds-text-field')
|
|
232
|
+
textElement.addEventListener('tdsFocus',(event) => {
|
|
233
|
+
console.log(event)
|
|
234
|
+
})
|
|
235
|
+
textElement.addEventListener('tdsBlur',(event) => {
|
|
236
|
+
console.log(event)
|
|
237
|
+
})
|
|
238
|
+
textElement.addEventListener('tdsInput',(event) => {
|
|
239
|
+
console.log(event)
|
|
240
|
+
})
|
|
241
|
+
textElement.addEventListener('tdsChange',(event) => {
|
|
242
|
+
console.log(event)
|
|
243
|
+
})
|
|
244
|
+
</script>
|
|
245
245
|
`);
|
|
246
246
|
};
|
|
247
247
|
export const Default = Template.bind({});
|
|
@@ -38,16 +38,16 @@ export class TdsTextarea {
|
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
40
|
var _a;
|
|
41
|
-
return (h("div", { class: `
|
|
42
|
-
textarea-container
|
|
43
|
-
${this.labelPosition === 'inside' ? 'textarea-label-inside' : ''}
|
|
44
|
-
${this.focusInput ? 'textarea-focus' : ''}
|
|
45
|
-
${this.disabled ? 'textarea-disabled' : ''}
|
|
46
|
-
${this.readOnly ? 'textarea-readonly' : ''}
|
|
47
|
-
${this.modeVariant !== null ? `tds-mode-variant-${this.modeVariant}` : ''}
|
|
48
|
-
${this.value ? 'textarea-data' : ''}
|
|
49
|
-
${this.state === 'error' || this.state === 'success' ? `textarea-${this.state}` : ''}
|
|
50
|
-
${this.noMinWidth ? 'no-min-width' : ''}
|
|
41
|
+
return (h("div", { class: `
|
|
42
|
+
textarea-container
|
|
43
|
+
${this.labelPosition === 'inside' ? 'textarea-label-inside' : ''}
|
|
44
|
+
${this.focusInput ? 'textarea-focus' : ''}
|
|
45
|
+
${this.disabled ? 'textarea-disabled' : ''}
|
|
46
|
+
${this.readOnly ? 'textarea-readonly' : ''}
|
|
47
|
+
${this.modeVariant !== null ? `tds-mode-variant-${this.modeVariant}` : ''}
|
|
48
|
+
${this.value ? 'textarea-data' : ''}
|
|
49
|
+
${this.state === 'error' || this.state === 'success' ? `textarea-${this.state}` : ''}
|
|
50
|
+
${this.noMinWidth ? 'no-min-width' : ''}
|
|
51
51
|
` }, this.labelPosition !== 'no-label' && h("span", { class: 'textarea-label' }, this.label), h("div", { class: "textarea-wrapper" }, h("textarea", { class: '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) => {
|
|
52
52
|
if (!this.readOnly) {
|
|
53
53
|
this.handleFocus(event);
|
|
@@ -141,48 +141,48 @@ const Template = ({ modeVariant, state, label, labelPosition, placeholder, helpe
|
|
|
141
141
|
'Inside': 'inside',
|
|
142
142
|
'Outside': 'outside',
|
|
143
143
|
};
|
|
144
|
-
return formatHtmlPreview(`
|
|
145
|
-
<style>
|
|
146
|
-
/* demo-wrapper is for demonstration purposes only*/
|
|
147
|
-
.demo-wrapper {
|
|
148
|
-
width: 400px;
|
|
149
|
-
}
|
|
150
|
-
</style>
|
|
151
|
-
|
|
152
|
-
<div class="demo-wrapper">
|
|
153
|
-
<tds-textarea
|
|
154
|
-
rows="${rows}"
|
|
155
|
-
state="${stateValue}"
|
|
156
|
-
label="${label}"
|
|
157
|
-
helper="${helper}"
|
|
144
|
+
return formatHtmlPreview(`
|
|
145
|
+
<style>
|
|
146
|
+
/* demo-wrapper is for demonstration purposes only*/
|
|
147
|
+
.demo-wrapper {
|
|
148
|
+
width: 400px;
|
|
149
|
+
}
|
|
150
|
+
</style>
|
|
151
|
+
|
|
152
|
+
<div class="demo-wrapper">
|
|
153
|
+
<tds-textarea
|
|
154
|
+
rows="${rows}"
|
|
155
|
+
state="${stateValue}"
|
|
156
|
+
label="${label}"
|
|
157
|
+
helper="${helper}"
|
|
158
158
|
${modeVariant !== 'Inherit from parent'
|
|
159
159
|
? `mode-variant="${modeVariant.toLowerCase()}"`
|
|
160
|
-
: ''}
|
|
161
|
-
label-position="${labelPosLookup[labelPosition]}"
|
|
162
|
-
${disabled ? 'disabled' : ''}
|
|
163
|
-
${readonly ? 'read-only' : ''}
|
|
164
|
-
${noMinWidth ? 'no-min-width' : ''}
|
|
165
|
-
placeholder="${placeholder}"
|
|
166
|
-
${maxlength}>
|
|
167
|
-
</tds-textarea>
|
|
168
|
-
</div>
|
|
169
|
-
<!-- Script tag for demo purposes -->
|
|
170
|
-
<script>
|
|
171
|
-
textElement = document.querySelector('tds-textarea')
|
|
172
|
-
|
|
173
|
-
textElement.addEventListener('tdsFocus',(event) => {
|
|
174
|
-
console.log(event)
|
|
175
|
-
})
|
|
176
|
-
textElement.addEventListener('tdsBlur',(event) => {
|
|
177
|
-
console.log(event)
|
|
178
|
-
})
|
|
179
|
-
textElement.addEventListener('tdsInput',(event) => {
|
|
180
|
-
console.log(event)
|
|
181
|
-
})
|
|
182
|
-
textElement.addEventListener('tdsChange',(event) => {
|
|
183
|
-
console.log(event)
|
|
184
|
-
})
|
|
185
|
-
</script>
|
|
160
|
+
: ''}
|
|
161
|
+
label-position="${labelPosLookup[labelPosition]}"
|
|
162
|
+
${disabled ? 'disabled' : ''}
|
|
163
|
+
${readonly ? 'read-only' : ''}
|
|
164
|
+
${noMinWidth ? 'no-min-width' : ''}
|
|
165
|
+
placeholder="${placeholder}"
|
|
166
|
+
${maxlength}>
|
|
167
|
+
</tds-textarea>
|
|
168
|
+
</div>
|
|
169
|
+
<!-- Script tag for demo purposes -->
|
|
170
|
+
<script>
|
|
171
|
+
textElement = document.querySelector('tds-textarea')
|
|
172
|
+
|
|
173
|
+
textElement.addEventListener('tdsFocus',(event) => {
|
|
174
|
+
console.log(event)
|
|
175
|
+
})
|
|
176
|
+
textElement.addEventListener('tdsBlur',(event) => {
|
|
177
|
+
console.log(event)
|
|
178
|
+
})
|
|
179
|
+
textElement.addEventListener('tdsInput',(event) => {
|
|
180
|
+
console.log(event)
|
|
181
|
+
})
|
|
182
|
+
textElement.addEventListener('tdsChange',(event) => {
|
|
183
|
+
console.log(event)
|
|
184
|
+
})
|
|
185
|
+
</script>
|
|
186
186
|
`);
|
|
187
187
|
};
|
|
188
188
|
export const Default = Template.bind({});
|
|
@@ -56,8 +56,8 @@ export class TdsToast {
|
|
|
56
56
|
const usesHeaderSlot = hasSlot('header', this.host);
|
|
57
57
|
const usesSubheaderSlot = hasSlot('subheader', this.host);
|
|
58
58
|
const usesActionsSlot = hasSlot('actions', this.host);
|
|
59
|
-
return (h(Host, { toastRole: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class: `${this.hidden ? 'hide' : 'show'}` }, h("div", { class: `
|
|
60
|
-
wrapper
|
|
59
|
+
return (h(Host, { toastRole: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class: `${this.hidden ? 'hide' : 'show'}` }, h("div", { class: `
|
|
60
|
+
wrapper
|
|
61
61
|
${this.variant}` }, h("tds-icon", { name: this.getIconName(), size: "20px" }), h("div", { class: `content` }, h("div", { class: "header-subheader" }, this.header && h("div", { class: "header" }, this.header), usesHeaderSlot && h("slot", { name: "header" }), this.subheader && h("div", { class: "subheader" }, this.subheader), usesSubheaderSlot && h("slot", { name: "subheader" })), usesActionsSlot && (h("div", { class: `toast-bottom ${usesSubheaderSlot || this.subheader ? 'subheader' : 'no-subheader'}` }, h("slot", { name: "actions" })))), h("button", { onClick: () => {
|
|
62
62
|
this.handleClose();
|
|
63
63
|
}, class: `close` }, h("tds-icon", { name: "cross", size: "20px" })))));
|
|
@@ -196,7 +196,7 @@ export class TdsToast {
|
|
|
196
196
|
"text": "Sends unique Toast identifier when component is closed."
|
|
197
197
|
},
|
|
198
198
|
"complexType": {
|
|
199
|
-
"original": "{\
|
|
199
|
+
"original": "{\n toastId: string;\n }",
|
|
200
200
|
"resolved": "{ toastId: string; }",
|
|
201
201
|
"references": {}
|
|
202
202
|
}
|
|
@@ -59,23 +59,23 @@ export default {
|
|
|
59
59
|
variant: 'Information',
|
|
60
60
|
header: 'Header',
|
|
61
61
|
subheader: 'Subheader',
|
|
62
|
-
actions: `<tds-link slot="actions">
|
|
63
|
-
<a href="https://tegel.scania.com/home" target="_blank">Tegel</a>
|
|
62
|
+
actions: `<tds-link slot="actions">
|
|
63
|
+
<a href="https://tegel.scania.com/home" target="_blank">Tegel</a>
|
|
64
64
|
</tds-link>`,
|
|
65
65
|
},
|
|
66
66
|
};
|
|
67
|
-
const Template = ({ variant, header, subheader, actions }) => formatHtmlPreview(`<tds-toast
|
|
68
|
-
variant="${variant.toLowerCase()}"
|
|
69
|
-
header="${header}"
|
|
70
|
-
${subheader ? `subheader="${subheader}"` : ''}
|
|
71
|
-
>
|
|
72
|
-
${actions || ''}
|
|
73
|
-
</tds-toast>
|
|
74
|
-
|
|
75
|
-
<script>
|
|
76
|
-
document.addEventListener('tdsClose', (event) => {
|
|
77
|
-
console.log(event)
|
|
78
|
-
})
|
|
79
|
-
</script>
|
|
67
|
+
const Template = ({ variant, header, subheader, actions }) => formatHtmlPreview(`<tds-toast
|
|
68
|
+
variant="${variant.toLowerCase()}"
|
|
69
|
+
header="${header}"
|
|
70
|
+
${subheader ? `subheader="${subheader}"` : ''}
|
|
71
|
+
>
|
|
72
|
+
${actions || ''}
|
|
73
|
+
</tds-toast>
|
|
74
|
+
|
|
75
|
+
<script>
|
|
76
|
+
document.addEventListener('tdsClose', (event) => {
|
|
77
|
+
console.log(event)
|
|
78
|
+
})
|
|
79
|
+
</script>
|
|
80
80
|
`);
|
|
81
81
|
export const Default = Template.bind({});
|
|
@@ -183,7 +183,7 @@ export class TdsToggle {
|
|
|
183
183
|
"text": "Sends unique Toggle identifier and status when it is toggled."
|
|
184
184
|
},
|
|
185
185
|
"complexType": {
|
|
186
|
-
"original": "{\
|
|
186
|
+
"original": "{\n toggleId: string;\n checked: boolean;\n }",
|
|
187
187
|
"resolved": "{ toggleId: string; checked: boolean; }",
|
|
188
188
|
"references": {}
|
|
189
189
|
}
|