@scania/tegel 0.0.1-beta.2 → 0.0.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/dropdown-option.js +1 -0
- package/dist/components/dropdown.js +1 -0
- package/dist/components/icon.js +1 -0
- package/dist/components/sdds-accordion-item.js +1 -0
- package/dist/components/sdds-accordion.js +1 -0
- package/dist/components/sdds-badges.js +1 -0
- package/dist/components/sdds-button.js +1 -0
- package/dist/components/sdds-datetime.js +1 -0
- package/dist/components/sdds-dropdown-filter.js +1 -0
- package/dist/components/sdds-header-cell.js +1 -0
- package/dist/components/sdds-inline-tabs-fullbleed.js +1 -0
- package/dist/components/sdds-inline-tabs.js +1 -0
- package/dist/components/sdds-modal.js +1 -0
- package/dist/components/sdds-navigation-tabs.js +1 -0
- package/dist/components/sdds-popover-canvas.js +1 -0
- package/dist/components/sdds-popover-menu.js +1 -0
- package/dist/components/sdds-slider.js +1 -0
- package/dist/components/sdds-spinner.js +1 -0
- package/dist/components/sdds-table-body-row-expandable.js +1 -0
- package/dist/components/sdds-table-body.js +1 -0
- package/dist/components/sdds-table-footer.js +1 -0
- package/dist/components/sdds-table-header.js +1 -0
- package/dist/components/sdds-table-toolbar.js +1 -0
- package/dist/components/sdds-table.js +1 -0
- package/dist/components/sdds-textarea.js +1 -0
- package/dist/components/sdds-textfield.js +1 -0
- package/dist/components/sdds-tooltip.js +1 -0
- package/dist/components/table-body-cell.js +1 -0
- package/dist/components/table-body-row.js +1 -0
- package/package.json +2 -2
- package/dist/cjs/index-e1c79686.js +0 -1912
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/popper-11d5f714.js +0 -1801
- package/dist/cjs/sdds-accordion-item.cjs.entry.js +0 -34
- package/dist/cjs/sdds-accordion.cjs.entry.js +0 -21
- package/dist/cjs/sdds-badges.cjs.entry.js +0 -55
- package/dist/cjs/sdds-body-cell_2.cjs.entry.js +0 -173
- package/dist/cjs/sdds-button.cjs.entry.js +0 -36
- package/dist/cjs/sdds-datetime.cjs.entry.js +0 -66
- package/dist/cjs/sdds-dropdown-filter.cjs.entry.js +0 -92
- package/dist/cjs/sdds-dropdown_2.cjs.entry.js +0 -335
- package/dist/cjs/sdds-header-cell.cjs.entry.js +0 -141
- package/dist/cjs/sdds-icon.cjs.entry.js +0 -42
- package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js +0 -96
- package/dist/cjs/sdds-inline-tabs.cjs.entry.js +0 -211
- package/dist/cjs/sdds-modal.cjs.entry.js +0 -49
- package/dist/cjs/sdds-navigation-tabs.cjs.entry.js +0 -95
- package/dist/cjs/sdds-popover-canvas.cjs.entry.js +0 -76
- package/dist/cjs/sdds-popover-menu.cjs.entry.js +0 -75
- package/dist/cjs/sdds-slider.cjs.entry.js +0 -336
- package/dist/cjs/sdds-spinner.cjs.entry.js +0 -21
- package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js +0 -81
- package/dist/cjs/sdds-table-body.cjs.entry.js +0 -289
- package/dist/cjs/sdds-table-footer.cjs.entry.js +0 -165
- package/dist/cjs/sdds-table-header.cjs.entry.js +0 -100
- package/dist/cjs/sdds-table-toolbar.cjs.entry.js +0 -66
- package/dist/cjs/sdds-table.cjs.entry.js +0 -69
- package/dist/cjs/sdds-textarea.cjs.entry.js +0 -61
- package/dist/cjs/sdds-textfield.cjs.entry.js +0 -82
- package/dist/cjs/sdds-tooltip.cjs.entry.js +0 -95
- package/dist/cjs/tegel.cjs.js +0 -19
- package/dist/collection/collection-manifest.json +0 -40
- package/dist/collection/components/accordion/accordion-item/accordion-item.css +0 -134
- package/dist/collection/components/accordion/accordion-item/accordion-item.js +0 -146
- package/dist/collection/components/accordion/accordion.css +0 -77
- package/dist/collection/components/accordion/accordion.js +0 -62
- package/dist/collection/components/accordion/accordion.stories.js +0 -91
- package/dist/collection/components/badge/badge.stories.js +0 -101
- package/dist/collection/components/badge/badges.css +0 -42
- package/dist/collection/components/badge/badges.js +0 -150
- package/dist/collection/components/banner/banner.stories.js +0 -93
- package/dist/collection/components/block/block.stories.js +0 -46
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js +0 -26
- package/dist/collection/components/button/button-component.js +0 -154
- package/dist/collection/components/button/button-native.stories.js +0 -183
- package/dist/collection/components/button/button-webcomponent.stories.js +0 -182
- package/dist/collection/components/button/button.css +0 -658
- package/dist/collection/components/card/card.stories.js +0 -181
- package/dist/collection/components/checkbox/checkbox.stories.js +0 -54
- package/dist/collection/components/chips/chips.stories.js +0 -124
- package/dist/collection/components/data-table/native-table.stories.js +0 -182
- package/dist/collection/components/data-table/table/table.css +0 -15
- package/dist/collection/components/data-table/table/table.js +0 -253
- package/dist/collection/components/data-table/table-body/table-body.css +0 -22
- package/dist/collection/components/data-table/table-body/table-body.js +0 -425
- package/dist/collection/components/data-table/table-body-cell/table-body-cell.css +0 -40
- package/dist/collection/components/data-table/table-body-cell/table-body-cell.js +0 -169
- package/dist/collection/components/data-table/table-body-row/table-body-row.css +0 -196
- package/dist/collection/components/data-table/table-body-row/table-body-row.js +0 -164
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.css +0 -79
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.js +0 -155
- package/dist/collection/components/data-table/table-component-basic.stories.js +0 -163
- package/dist/collection/components/data-table/table-component-batch-actions.stories.js +0 -129
- package/dist/collection/components/data-table/table-component-bodydata.stories.js +0 -58
- package/dist/collection/components/data-table/table-component-custom-width.stories.js +0 -198
- package/dist/collection/components/data-table/table-component-event-listeners.stories.js +0 -153
- package/dist/collection/components/data-table/table-component-expandable-rows.stories.js +0 -137
- package/dist/collection/components/data-table/table-component-filtering.stories.js +0 -139
- package/dist/collection/components/data-table/table-component-multiselect.stories.js +0 -160
- package/dist/collection/components/data-table/table-component-pagination.stories.js +0 -129
- package/dist/collection/components/data-table/table-component-sorting.stories.js +0 -107
- package/dist/collection/components/data-table/table-footer/table-footer.css +0 -93
- package/dist/collection/components/data-table/table-footer/table-footer.js +0 -355
- package/dist/collection/components/data-table/table-header/table-header.css +0 -204
- package/dist/collection/components/data-table/table-header/table-header.js +0 -153
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.css +0 -126
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.js +0 -320
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.css +0 -92
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.js +0 -142
- package/dist/collection/components/datetime/datetime.css +0 -375
- package/dist/collection/components/datetime/datetime.js +0 -251
- package/dist/collection/components/datetime/datetime.stories.js +0 -149
- package/dist/collection/components/divider/divider.stories.js +0 -116
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +0 -339
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js +0 -130
- package/dist/collection/components/dropdown/dropdown-native.stories.js +0 -90
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +0 -185
- package/dist/collection/components/dropdown/dropdown-wc-default.stories.js +0 -151
- package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js +0 -146
- package/dist/collection/components/dropdown/dropdown.css +0 -891
- package/dist/collection/components/dropdown/dropdown.js +0 -554
- package/dist/collection/components/footer/footer.stories.js +0 -100
- package/dist/collection/components/header/header-all.stories.js +0 -217
- package/dist/collection/components/header/header-default.stories.js +0 -47
- package/dist/collection/components/header/header-inline.stories.js +0 -113
- package/dist/collection/components/header/header-search.stories.js +0 -263
- package/dist/collection/components/header/header-toolbar.stories.js +0 -204
- package/dist/collection/components/icon/icon-font.stories.js +0 -57
- package/dist/collection/components/icon/icon-web-component.stories.js +0 -51
- package/dist/collection/components/icon/icon.css +0 -16
- package/dist/collection/components/icon/icon.js +0 -89
- package/dist/collection/components/icon/iconsArray.js +0 -2
- package/dist/collection/components/link/link.stories.js +0 -45
- package/dist/collection/components/message/message.stories.js +0 -117
- package/dist/collection/components/modal/modal-native.stories.js +0 -121
- package/dist/collection/components/modal/modal-webcomponent.stories.js +0 -78
- package/dist/collection/components/modal/modal.css +0 -324
- package/dist/collection/components/modal/modal.js +0 -146
- package/dist/collection/components/popover-canvas/popover-canvas.css +0 -20
- package/dist/collection/components/popover-canvas/popover-canvas.js +0 -190
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js +0 -87
- package/dist/collection/components/popover-menu/popover-menu-icons.stories.js +0 -132
- package/dist/collection/components/popover-menu/popover-menu.css +0 -19
- package/dist/collection/components/popover-menu/popover-menu.js +0 -189
- package/dist/collection/components/popover-menu/popover-menu.stories.js +0 -109
- package/dist/collection/components/radio-button/radio-button.stories.js +0 -68
- package/dist/collection/components/side-menu/side-menu.stories.js +0 -182
- package/dist/collection/components/slider/slider.css +0 -260
- package/dist/collection/components/slider/slider.js +0 -682
- package/dist/collection/components/slider/slider.stories.js +0 -251
- package/dist/collection/components/spinner/spinner.css +0 -79
- package/dist/collection/components/spinner/spinner.js +0 -61
- package/dist/collection/components/spinner/spinner.stories.js +0 -59
- package/dist/collection/components/stepper/stepper.stories.js +0 -139
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.css +0 -159
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.js +0 -302
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.stories.js +0 -65
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.css +0 -172
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.js +0 -126
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js +0 -43
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +0 -153
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +0 -103
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +0 -32
- package/dist/collection/components/textarea/textarea.css +0 -283
- package/dist/collection/components/textarea/textarea.js +0 -336
- package/dist/collection/components/textarea/textarea.stories.js +0 -149
- package/dist/collection/components/textfield/textfield.css +0 -494
- package/dist/collection/components/textfield/textfield.js +0 -359
- package/dist/collection/components/textfield/textfield.stories.js +0 -222
- package/dist/collection/components/toast/toast.stories.js +0 -119
- package/dist/collection/components/toggle/toggle.stories.js +0 -62
- package/dist/collection/components/tooltip/tooltip.css +0 -46
- package/dist/collection/components/tooltip/tooltip.js +0 -200
- package/dist/collection/components/tooltip/tooltip.stories.js +0 -113
- package/dist/collection/components/utility/colour/background-color.stories.js +0 -96
- package/dist/collection/components/utility/colour/text-color.stories.js +0 -94
- package/dist/collection/foundations-stories/colour/colour-brand.stories.js +0 -38
- package/dist/collection/foundations-stories/colour/colour-scales.stories.js +0 -71
- package/dist/collection/foundations-stories/colour/colour-semantic.stories.js +0 -40
- package/dist/collection/foundations-stories/grid/grid.stories.js +0 -386
- package/dist/collection/foundations-stories/spacing/spacing-element.stories.js +0 -100
- package/dist/collection/foundations-stories/spacing/spacing-layout.stories.js +0 -94
- package/dist/collection/foundations-stories/typography/typography-body.stories.js +0 -16
- package/dist/collection/foundations-stories/typography/typography-detail.stories.js +0 -17
- package/dist/collection/foundations-stories/typography/typography-headline.stories.js +0 -39
- package/dist/collection/foundations-stories/typography/typography-paragraph.stories.js +0 -12
- package/dist/collection/index.js +0 -1
- package/dist/collection/stories/assets/code-brackets.svg +0 -1
- package/dist/collection/stories/assets/colors.svg +0 -1
- package/dist/collection/stories/assets/comments.svg +0 -1
- package/dist/collection/stories/assets/direction.svg +0 -1
- package/dist/collection/stories/assets/flow.svg +0 -1
- package/dist/collection/stories/assets/plugin.svg +0 -1
- package/dist/collection/stories/assets/repo.svg +0 -1
- package/dist/collection/stories/assets/stackalt.svg +0 -1
- package/dist/collection/utils/utils.js +0 -12
- package/dist/esm/index-b67b15a6.js +0 -1884
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -17
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/popper-f860750c.js +0 -1799
- package/dist/esm/sdds-accordion-item.entry.js +0 -30
- package/dist/esm/sdds-accordion.entry.js +0 -17
- package/dist/esm/sdds-badges.entry.js +0 -51
- package/dist/esm/sdds-body-cell_2.entry.js +0 -168
- package/dist/esm/sdds-button.entry.js +0 -32
- package/dist/esm/sdds-datetime.entry.js +0 -62
- package/dist/esm/sdds-dropdown-filter.entry.js +0 -88
- package/dist/esm/sdds-dropdown_2.entry.js +0 -330
- package/dist/esm/sdds-header-cell.entry.js +0 -137
- package/dist/esm/sdds-icon.entry.js +0 -38
- package/dist/esm/sdds-inline-tabs-fullbleed.entry.js +0 -92
- package/dist/esm/sdds-inline-tabs.entry.js +0 -207
- package/dist/esm/sdds-modal.entry.js +0 -45
- package/dist/esm/sdds-navigation-tabs.entry.js +0 -91
- package/dist/esm/sdds-popover-canvas.entry.js +0 -72
- package/dist/esm/sdds-popover-menu.entry.js +0 -71
- package/dist/esm/sdds-slider.entry.js +0 -332
- package/dist/esm/sdds-spinner.entry.js +0 -17
- package/dist/esm/sdds-table-body-row-expandable.entry.js +0 -77
- package/dist/esm/sdds-table-body.entry.js +0 -285
- package/dist/esm/sdds-table-footer.entry.js +0 -161
- package/dist/esm/sdds-table-header.entry.js +0 -96
- package/dist/esm/sdds-table-toolbar.entry.js +0 -62
- package/dist/esm/sdds-table.entry.js +0 -65
- package/dist/esm/sdds-textarea.entry.js +0 -57
- package/dist/esm/sdds-textfield.entry.js +0 -78
- package/dist/esm/sdds-tooltip.entry.js +0 -91
- package/dist/esm/tegel.js +0 -17
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/tegel/index.esm.js +0 -0
- package/dist/tegel/p-040efb32.entry.js +0 -1
- package/dist/tegel/p-12ca5cfa.entry.js +0 -1
- package/dist/tegel/p-157e1618.js +0 -2
- package/dist/tegel/p-1fe61cf6.entry.js +0 -1
- package/dist/tegel/p-2f376504.entry.js +0 -1
- package/dist/tegel/p-44ced895.entry.js +0 -1
- package/dist/tegel/p-4880f03d.entry.js +0 -1
- package/dist/tegel/p-4aba73a3.entry.js +0 -1
- package/dist/tegel/p-4b58a02c.entry.js +0 -1
- package/dist/tegel/p-4cb85347.entry.js +0 -1
- package/dist/tegel/p-52031b5a.entry.js +0 -1
- package/dist/tegel/p-677baf7f.entry.js +0 -1
- package/dist/tegel/p-71797eaf.entry.js +0 -1
- package/dist/tegel/p-7373284c.entry.js +0 -1
- package/dist/tegel/p-7451779b.entry.js +0 -1
- package/dist/tegel/p-77aeea3b.entry.js +0 -1
- package/dist/tegel/p-8582d6a7.entry.js +0 -1
- package/dist/tegel/p-96021bd0.entry.js +0 -1
- package/dist/tegel/p-9d8caf51.entry.js +0 -1
- package/dist/tegel/p-a5919930.entry.js +0 -1
- package/dist/tegel/p-b01cface.entry.js +0 -1
- package/dist/tegel/p-bf896643.entry.js +0 -1
- package/dist/tegel/p-c311725c.entry.js +0 -1
- package/dist/tegel/p-cf72dfd9.entry.js +0 -1
- package/dist/tegel/p-d91caec6.entry.js +0 -1
- package/dist/tegel/p-e10eec33.entry.js +0 -1
- package/dist/tegel/p-ec26fc38.js +0 -1
- package/dist/tegel/p-f2262a69.entry.js +0 -1
- package/dist/tegel/p-f2f7aa45.entry.js +0 -1
- package/dist/tegel/tegel.css +0 -101
- package/dist/tegel/tegel.esm.js +0 -1
- package/loader/cdn.js +0 -3
- package/loader/index.cjs.js +0 -3
- package/loader/index.d.ts +0 -12
- package/loader/index.es2017.js +0 -3
- package/loader/index.js +0 -4
- package/loader/package.json +0 -11
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { formatHtmlPreview } from '../../utils/utils';
|
|
2
|
-
import sddsTable from './table/readme.md';
|
|
3
|
-
import sddsTableToolbar from './table-toolbar/readme.md';
|
|
4
|
-
import sddsHeader from './table-header/readme.md';
|
|
5
|
-
import sddsHeaderCell from './table-header-cell/readme.md';
|
|
6
|
-
import sddsTableBody from './table-body/readme.md';
|
|
7
|
-
import sddsBodyRow from './table-body-row/readme.md';
|
|
8
|
-
import sddsBodyRowExpandable from './table-body-row-expandable/readme.md';
|
|
9
|
-
import sddsBodyCell from './table-body-cell/readme.md';
|
|
10
|
-
import sddsTableFooter from './table-footer/readme.md';
|
|
11
|
-
export default {
|
|
12
|
-
title: 'Components/Data Table/Web Component',
|
|
13
|
-
parameters: {
|
|
14
|
-
notes: {
|
|
15
|
-
'sdds-table': sddsTable,
|
|
16
|
-
'sdds-table-toolbar': sddsTableToolbar,
|
|
17
|
-
'sdds-header': sddsHeader,
|
|
18
|
-
'sdds-header-cell': sddsHeaderCell,
|
|
19
|
-
'sdds-table-body': sddsTableBody,
|
|
20
|
-
'sdds-body-row': sddsBodyRow,
|
|
21
|
-
'sdds-body-row-expandable': sddsBodyRowExpandable,
|
|
22
|
-
'sdds-body-cell': sddsBodyCell,
|
|
23
|
-
'sdds-table-footer': sddsTableFooter,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
argTypes: {
|
|
27
|
-
enableMultiselect: {
|
|
28
|
-
name: 'Enable multiselect',
|
|
29
|
-
description: 'Enable row selection.',
|
|
30
|
-
control: {
|
|
31
|
-
type: 'boolean',
|
|
32
|
-
},
|
|
33
|
-
table: {
|
|
34
|
-
defaultValue: {
|
|
35
|
-
summary: true,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
verticalDivider: {
|
|
40
|
-
name: 'Vertical dividers',
|
|
41
|
-
description: 'When enabled, table has vertical dividers between columns.',
|
|
42
|
-
control: {
|
|
43
|
-
type: 'boolean',
|
|
44
|
-
},
|
|
45
|
-
table: {
|
|
46
|
-
defaultValue: {
|
|
47
|
-
summary: false,
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
compactDesign: {
|
|
52
|
-
name: 'Compact design',
|
|
53
|
-
description: 'Enables compact design of the table, rows with less height.',
|
|
54
|
-
control: {
|
|
55
|
-
type: 'boolean',
|
|
56
|
-
},
|
|
57
|
-
table: {
|
|
58
|
-
defaultValue: {
|
|
59
|
-
summary: false,
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
onWhiteBackground: {
|
|
64
|
-
name: 'On white background',
|
|
65
|
-
description: 'Changes BG color of table element to grey variation for better visibility on white layouts',
|
|
66
|
-
control: {
|
|
67
|
-
type: 'boolean',
|
|
68
|
-
},
|
|
69
|
-
table: {
|
|
70
|
-
defaultValue: {
|
|
71
|
-
summary: false,
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
responsiveDesign: {
|
|
76
|
-
name: 'Responsive table',
|
|
77
|
-
description: 'Table takes 100% of available width. For column values less then 192px, "No minimum width" has to be enabled too. ',
|
|
78
|
-
control: {
|
|
79
|
-
type: 'boolean',
|
|
80
|
-
},
|
|
81
|
-
table: {
|
|
82
|
-
defaultValue: {
|
|
83
|
-
summary: false,
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
noMinWidth: {
|
|
88
|
-
name: 'No column minimum width limitation',
|
|
89
|
-
description: 'If columns should be able to shrink below 192px width.',
|
|
90
|
-
control: {
|
|
91
|
-
type: 'boolean',
|
|
92
|
-
},
|
|
93
|
-
table: {
|
|
94
|
-
defaultValue: {
|
|
95
|
-
summary: 'false',
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
args: {
|
|
101
|
-
compactDesign: false,
|
|
102
|
-
onWhiteBackground: false,
|
|
103
|
-
verticalDivider: false,
|
|
104
|
-
responsiveDesign: false,
|
|
105
|
-
noMinWidth: false,
|
|
106
|
-
enableMultiselect: true,
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
const MultiselectTemplate = ({ verticalDivider, compactDesign, onWhiteBackground, responsiveDesign, enableMultiselect, noMinWidth, }) => formatHtmlPreview(`
|
|
110
|
-
<script>
|
|
111
|
-
// Note: Script here is only for demo purposes
|
|
112
|
-
function getValue() {
|
|
113
|
-
const element = document.querySelector('#multiselect-table > sdds-table-body');
|
|
114
|
-
const textArea = document.getElementById('selected-rows-value-textarea');
|
|
115
|
-
const observer = new MutationObserver(mutations => {
|
|
116
|
-
mutations.forEach(mutation => {
|
|
117
|
-
if (mutation.type === 'attributes') {
|
|
118
|
-
textArea.value = element.getAttribute('data-selected-rows');
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
observer.observe(element, {
|
|
123
|
-
attributes: true,
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
window.addEventListener('click', () => {
|
|
127
|
-
getValue();
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
</script>
|
|
131
|
-
|
|
132
|
-
<h3>Multiselect</h3>
|
|
133
|
-
<sdds-table
|
|
134
|
-
id="multiselect-table"
|
|
135
|
-
${enableMultiselect ? 'enable-multiselect' : ''}
|
|
136
|
-
vertical-dividers="${verticalDivider}"
|
|
137
|
-
compact-design="${compactDesign}"
|
|
138
|
-
white-background="${onWhiteBackground}"
|
|
139
|
-
enable-responsive="${responsiveDesign}"
|
|
140
|
-
${noMinWidth ? 'no-min-width' : ''}
|
|
141
|
-
>
|
|
142
|
-
<sdds-table-header>
|
|
143
|
-
<sdds-header-cell column-key='truck' column-title='Truck type'></sdds-header-cell>
|
|
144
|
-
<sdds-header-cell column-key='driver' column-title='Driver name'></sdds-header-cell>
|
|
145
|
-
<sdds-header-cell column-key='country' column-title='Country'></sdds-header-cell>
|
|
146
|
-
<sdds-header-cell column-key='mileage' column-title='Mileage' text-align='right'></sdds-header-cell>
|
|
147
|
-
</sdds-table-header>
|
|
148
|
-
<sdds-table-body enable-dummy-data>
|
|
149
|
-
</sdds-table-body>
|
|
150
|
-
</sdds-table>
|
|
151
|
-
|
|
152
|
-
<!-- Note: Code below is just for demo purposes -->
|
|
153
|
-
<div class="sdds-u-mt1" style="width: 450px; background-color: lightblue; padding: 16px;">
|
|
154
|
-
<p class="sdds-u-mt0">Note: This box works only in "Canvas" tab.</p>
|
|
155
|
-
<h6 class="sdds-u-pb0 sdds-u-mb0 sdds-u-mt0">Selected rows data</h6>
|
|
156
|
-
<small>Values here are values found in data-selected-rows attribute of sdds-table-body element. They are shown here just for presentation purposes.</small>
|
|
157
|
-
<textarea id="selected-rows-value-textarea" rows="5" cols="50" readonly></textarea>
|
|
158
|
-
</div>`);
|
|
159
|
-
export const Multiselect = MultiselectTemplate.bind({});
|
|
160
|
-
Multiselect.args = {};
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { formatHtmlPreview } from '../../utils/utils';
|
|
2
|
-
import sddsTable from './table/readme.md';
|
|
3
|
-
import sddsTableToolbar from './table-toolbar/readme.md';
|
|
4
|
-
import sddsHeader from './table-header/readme.md';
|
|
5
|
-
import sddsHeaderCell from './table-header-cell/readme.md';
|
|
6
|
-
import sddsTableBody from './table-body/readme.md';
|
|
7
|
-
import sddsBodyRow from './table-body-row/readme.md';
|
|
8
|
-
import sddsBodyRowExpandable from './table-body-row-expandable/readme.md';
|
|
9
|
-
import sddsBodyCell from './table-body-cell/readme.md';
|
|
10
|
-
import sddsTableFooter from './table-footer/readme.md';
|
|
11
|
-
export default {
|
|
12
|
-
title: 'Components/Data Table/Web Component',
|
|
13
|
-
parameters: {
|
|
14
|
-
notes: {
|
|
15
|
-
'sdds-table': sddsTable,
|
|
16
|
-
'sdds-table-toolbar': sddsTableToolbar,
|
|
17
|
-
'sdds-header': sddsHeader,
|
|
18
|
-
'sdds-header-cell': sddsHeaderCell,
|
|
19
|
-
'sdds-table-body': sddsTableBody,
|
|
20
|
-
'sdds-body-row': sddsBodyRow,
|
|
21
|
-
'sdds-body-row-expandable': sddsBodyRowExpandable,
|
|
22
|
-
'sdds-body-cell': sddsBodyCell,
|
|
23
|
-
'sdds-table-footer': sddsTableFooter,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
argTypes: {
|
|
27
|
-
verticalDivider: {
|
|
28
|
-
name: 'Vertical dividers',
|
|
29
|
-
description: 'When enabled, table has vertical dividers between columns.',
|
|
30
|
-
control: {
|
|
31
|
-
type: 'boolean',
|
|
32
|
-
},
|
|
33
|
-
table: {
|
|
34
|
-
defaultValue: {
|
|
35
|
-
summary: false,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
compactDesign: {
|
|
40
|
-
name: 'Compact design',
|
|
41
|
-
description: 'Enables compact design of the table, rows with less height.',
|
|
42
|
-
control: {
|
|
43
|
-
type: 'boolean',
|
|
44
|
-
},
|
|
45
|
-
table: {
|
|
46
|
-
defaultValue: {
|
|
47
|
-
summary: false,
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
onWhiteBackground: {
|
|
52
|
-
name: 'On white background',
|
|
53
|
-
description: 'Changes BG color of table element to grey variation for better visibility on white layouts',
|
|
54
|
-
control: {
|
|
55
|
-
type: 'boolean',
|
|
56
|
-
},
|
|
57
|
-
table: {
|
|
58
|
-
defaultValue: {
|
|
59
|
-
summary: false,
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
responsiveDesign: {
|
|
64
|
-
name: 'Responsive table',
|
|
65
|
-
description: 'Table takes 100% of available width. For column values less then 192px, "No minimum width" has to be enabled too. ',
|
|
66
|
-
control: {
|
|
67
|
-
type: 'boolean',
|
|
68
|
-
},
|
|
69
|
-
table: {
|
|
70
|
-
defaultValue: {
|
|
71
|
-
summary: false,
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
noMinWidth: {
|
|
76
|
-
name: 'No column minimum width limitation',
|
|
77
|
-
description: 'If columns should be able to shrink below 192px width.',
|
|
78
|
-
control: {
|
|
79
|
-
type: 'boolean',
|
|
80
|
-
},
|
|
81
|
-
table: {
|
|
82
|
-
defaultValue: {
|
|
83
|
-
summary: 'false',
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
rowsPerPageControl: {
|
|
88
|
-
name: 'Rows per page',
|
|
89
|
-
description: 'Specify how many rows per page user would like to see',
|
|
90
|
-
control: {
|
|
91
|
-
type: 'number',
|
|
92
|
-
},
|
|
93
|
-
table: {
|
|
94
|
-
defaultValue: {
|
|
95
|
-
summary: 4,
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
args: {
|
|
101
|
-
compactDesign: false,
|
|
102
|
-
onWhiteBackground: false,
|
|
103
|
-
verticalDivider: false,
|
|
104
|
-
responsiveDesign: false,
|
|
105
|
-
rowsPerPageControl: 4,
|
|
106
|
-
noMinWidth: false,
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
const PaginationTemplate = ({ verticalDivider, compactDesign, onWhiteBackground, rowsPerPageControl, responsiveDesign, noMinWidth, }) => formatHtmlPreview(`
|
|
110
|
-
<h3>Pagination</h3>
|
|
111
|
-
<sdds-table
|
|
112
|
-
vertical-dividers="${verticalDivider}"
|
|
113
|
-
compact-design="${compactDesign}"
|
|
114
|
-
white-background="${onWhiteBackground}"
|
|
115
|
-
enable-responsive="${responsiveDesign}"
|
|
116
|
-
${noMinWidth ? 'no-min-width' : ''}
|
|
117
|
-
>
|
|
118
|
-
<sdds-table-header>
|
|
119
|
-
<sdds-header-cell column-key='truck' column-title='Truck type'></sdds-header-cell>
|
|
120
|
-
<sdds-header-cell column-key='driver' column-title='Driver name'></sdds-header-cell>
|
|
121
|
-
<sdds-header-cell column-key='country' column-title='Country'></sdds-header-cell>
|
|
122
|
-
<sdds-header-cell column-key='mileage' column-title='Mileage' text-align='right'></sdds-header-cell>
|
|
123
|
-
</sdds-table-header>
|
|
124
|
-
<sdds-table-body enable-dummy-data>
|
|
125
|
-
</sdds-table-body>
|
|
126
|
-
<sdds-table-footer enable-pagination rows-per-page="${rowsPerPageControl}"></sdds-table-footer>
|
|
127
|
-
</sdds-table>`);
|
|
128
|
-
export const Pagination = PaginationTemplate.bind({});
|
|
129
|
-
Pagination.args = {};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { formatHtmlPreview } from '../../utils/utils';
|
|
2
|
-
import sddsTable from './table/readme.md';
|
|
3
|
-
import sddsTableToolbar from './table-toolbar/readme.md';
|
|
4
|
-
import sddsHeader from './table-header/readme.md';
|
|
5
|
-
import sddsHeaderCell from './table-header-cell/readme.md';
|
|
6
|
-
import sddsTableBody from './table-body/readme.md';
|
|
7
|
-
import sddsBodyRow from './table-body-row/readme.md';
|
|
8
|
-
import sddsBodyRowExpandable from './table-body-row-expandable/readme.md';
|
|
9
|
-
import sddsBodyCell from './table-body-cell/readme.md';
|
|
10
|
-
import sddsTableFooter from './table-footer/readme.md';
|
|
11
|
-
export default {
|
|
12
|
-
title: 'Components/Data Table/Web Component',
|
|
13
|
-
parameters: {
|
|
14
|
-
notes: {
|
|
15
|
-
'sdds-table': sddsTable,
|
|
16
|
-
'sdds-table-toolbar': sddsTableToolbar,
|
|
17
|
-
'sdds-header': sddsHeader,
|
|
18
|
-
'sdds-header-cell': sddsHeaderCell,
|
|
19
|
-
'sdds-table-body': sddsTableBody,
|
|
20
|
-
'sdds-body-row': sddsBodyRow,
|
|
21
|
-
'sdds-body-row-expandable': sddsBodyRowExpandable,
|
|
22
|
-
'sdds-body-cell': sddsBodyCell,
|
|
23
|
-
'sdds-table-footer': sddsTableFooter,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
argTypes: {
|
|
27
|
-
verticalDivider: {
|
|
28
|
-
name: 'Vertical dividers',
|
|
29
|
-
control: {
|
|
30
|
-
type: 'boolean',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
compactDesign: {
|
|
34
|
-
name: 'Compact Design',
|
|
35
|
-
control: {
|
|
36
|
-
type: 'boolean',
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
onWhiteBackground: {
|
|
40
|
-
name: 'On white background',
|
|
41
|
-
control: {
|
|
42
|
-
type: 'boolean',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
responsiveDesign: {
|
|
46
|
-
name: 'Responsive design',
|
|
47
|
-
control: {
|
|
48
|
-
type: 'boolean',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
column1sortable: {
|
|
52
|
-
name: 'Column 1 is sortable',
|
|
53
|
-
control: {
|
|
54
|
-
type: 'boolean',
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
column2sortable: {
|
|
58
|
-
name: 'Column 2 is sortable',
|
|
59
|
-
control: {
|
|
60
|
-
type: 'boolean',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
column3sortable: {
|
|
64
|
-
name: 'Column 3 is sortable',
|
|
65
|
-
control: {
|
|
66
|
-
type: 'boolean',
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
column4sortable: {
|
|
70
|
-
name: 'Column 4 is sortable',
|
|
71
|
-
control: {
|
|
72
|
-
type: 'boolean',
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
args: {
|
|
77
|
-
verticalDivider: false,
|
|
78
|
-
compactDesign: false,
|
|
79
|
-
onWhiteBackground: false,
|
|
80
|
-
responsiveDesign: false,
|
|
81
|
-
column1sortable: true,
|
|
82
|
-
column2sortable: true,
|
|
83
|
-
column3sortable: true,
|
|
84
|
-
column4sortable: true,
|
|
85
|
-
noMinWidth: false,
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
const SortingTemplate = ({ verticalDivider, compactDesign, onWhiteBackground, responsiveDesign, column1sortable, column2sortable, column3sortable, column4sortable, noMinWidth, }) => formatHtmlPreview(`
|
|
89
|
-
<h3>Sorting example</h3>
|
|
90
|
-
<sdds-table
|
|
91
|
-
vertical-dividers="${verticalDivider}"
|
|
92
|
-
compact-design="${compactDesign}"
|
|
93
|
-
white-background="${onWhiteBackground}"
|
|
94
|
-
enable-responsive="${responsiveDesign}"
|
|
95
|
-
${noMinWidth ? 'no-min-width' : ''}
|
|
96
|
-
>
|
|
97
|
-
<sdds-table-header>
|
|
98
|
-
<sdds-header-cell column-key='truck' column-title='Truck type' sortable="${column1sortable}"></sdds-header-cell>
|
|
99
|
-
<sdds-header-cell column-key='driver' column-title='Driver name' sortable="${column2sortable}"></sdds-header-cell>
|
|
100
|
-
<sdds-header-cell column-key='country' column-title='Country' sortable="${column3sortable}"></sdds-header-cell>
|
|
101
|
-
<sdds-header-cell column-key='mileage' column-title='Mileage' sortable="${column4sortable}" text-align='right'></sdds-header-cell>
|
|
102
|
-
</sdds-table-header>
|
|
103
|
-
<sdds-table-body enable-dummy-data>
|
|
104
|
-
</sdds-table-body>
|
|
105
|
-
</sdds-table>`);
|
|
106
|
-
export const Sorting = SortingTemplate.bind({});
|
|
107
|
-
Sorting.args = {};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
box-sizing: border-box;
|
|
3
|
-
display: table-footer-group;
|
|
4
|
-
height: 48px;
|
|
5
|
-
}
|
|
6
|
-
:host * {
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
}
|
|
9
|
-
:host .sdds-table__footer-row {
|
|
10
|
-
background-color: var(--sdds-grey-100);
|
|
11
|
-
}
|
|
12
|
-
:host .sdds-table__footer-cell {
|
|
13
|
-
padding: 0 16px;
|
|
14
|
-
}
|
|
15
|
-
:host .sdds-table__footer-cell .sdds-table__pagination {
|
|
16
|
-
height: 48px;
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
justify-content: space-between;
|
|
20
|
-
}
|
|
21
|
-
:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__row-selector,
|
|
22
|
-
:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector {
|
|
23
|
-
display: flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
}
|
|
26
|
-
:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input {
|
|
27
|
-
font: var(--sdds-detail-02);
|
|
28
|
-
letter-spacing: var(--sdds-detail-02-ls);
|
|
29
|
-
background-color: var(--sdds-grey-50);
|
|
30
|
-
width: 36px;
|
|
31
|
-
height: 30px;
|
|
32
|
-
border: none;
|
|
33
|
-
border-radius: 4px;
|
|
34
|
-
transition: background-color 250ms ease;
|
|
35
|
-
margin-right: 4px;
|
|
36
|
-
padding-right: 8px;
|
|
37
|
-
}
|
|
38
|
-
:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input:hover {
|
|
39
|
-
background-color: var(--sdds-white);
|
|
40
|
-
}
|
|
41
|
-
:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input:disabled {
|
|
42
|
-
color: var(--sdds-grey-600);
|
|
43
|
-
}
|
|
44
|
-
:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input--shake {
|
|
45
|
-
animation: sdds-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
|
|
46
|
-
transform: translate3d(0, 0, 0);
|
|
47
|
-
backface-visibility: hidden;
|
|
48
|
-
perspective: 1000px;
|
|
49
|
-
}
|
|
50
|
-
:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-text {
|
|
51
|
-
font: var(--sdds-detail-02);
|
|
52
|
-
letter-spacing: var(--sdds-detail-02-ls);
|
|
53
|
-
padding: 1px 8px 0 0;
|
|
54
|
-
}
|
|
55
|
-
:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn {
|
|
56
|
-
display: flex;
|
|
57
|
-
justify-content: center;
|
|
58
|
-
align-items: center;
|
|
59
|
-
border: none;
|
|
60
|
-
background-color: transparent;
|
|
61
|
-
cursor: pointer;
|
|
62
|
-
height: 32px;
|
|
63
|
-
width: 32px;
|
|
64
|
-
border-radius: 4px;
|
|
65
|
-
transition: background-color 250ms ease;
|
|
66
|
-
}
|
|
67
|
-
:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn:hover {
|
|
68
|
-
background-color: var(--sdds-grey-300);
|
|
69
|
-
}
|
|
70
|
-
:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn:disabled {
|
|
71
|
-
cursor: default;
|
|
72
|
-
}
|
|
73
|
-
:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn:disabled:hover {
|
|
74
|
-
background-color: transparent;
|
|
75
|
-
}
|
|
76
|
-
:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn-svg {
|
|
77
|
-
height: 20px;
|
|
78
|
-
width: 20px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
:host(.sdds-table--compact) {
|
|
82
|
-
height: 32px;
|
|
83
|
-
}
|
|
84
|
-
:host(.sdds-table--compact) .sdds-table__footer-cell .sdds-table__pagination {
|
|
85
|
-
height: 32px;
|
|
86
|
-
}
|
|
87
|
-
:host(.sdds-table--compact) .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input {
|
|
88
|
-
height: 24px;
|
|
89
|
-
}
|
|
90
|
-
:host(.sdds-table--compact) .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn {
|
|
91
|
-
height: 28px;
|
|
92
|
-
width: 28px;
|
|
93
|
-
}
|