@bbl-digital/snorre 4.0.31 → 4.1.0-beta.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +523 -445
- package/esm/core/BoxedTable/BoxedTable.stories.js +407 -303
- package/esm/core/BoxedTable/DraggableRow/index.js +15 -13
- package/esm/core/BoxedTable/DraggableRow/styles.js +20 -14
- package/esm/core/BoxedTable/HeaderCell/styles.js +3 -3
- package/esm/core/BoxedTable/RowCell/index.js +14 -4
- package/esm/core/BoxedTable/RowCell/styles.js +7 -23
- package/esm/core/BoxedTable/TableBody/index.js +10 -0
- package/esm/core/BoxedTable/TableBody/styles.js +16 -0
- package/esm/core/BoxedTable/TableHeader/index.js +5 -3
- package/esm/core/BoxedTable/TableHeader/styles.js +18 -3
- package/esm/core/BoxedTable/TableRow/index.js +5 -8
- package/esm/core/BoxedTable/TableRow/styles.js +30 -24
- package/esm/core/BoxedTable/index.js +18 -7
- package/esm/core/BoxedTable/styles.js +25 -19
- package/esm/core/ListPager/index.js +20 -2
- package/esm/index.js +2 -1
- package/lib/core/Box/Box.stories.d.ts.map +1 -1
- package/lib/core/BoxedTable/BoxedTable.stories.d.ts +14 -35
- package/lib/core/BoxedTable/BoxedTable.stories.d.ts.map +1 -1
- package/lib/core/BoxedTable/BoxedTable.stories.js +407 -303
- package/lib/core/BoxedTable/DraggableRow/index.d.ts.map +1 -1
- package/lib/core/BoxedTable/DraggableRow/index.js +15 -13
- package/lib/core/BoxedTable/DraggableRow/styles.d.ts +5 -1
- package/lib/core/BoxedTable/DraggableRow/styles.d.ts.map +1 -1
- package/lib/core/BoxedTable/DraggableRow/styles.js +20 -14
- package/lib/core/BoxedTable/HeaderCell/styles.d.ts +6 -1
- package/lib/core/BoxedTable/HeaderCell/styles.d.ts.map +1 -1
- package/lib/core/BoxedTable/HeaderCell/styles.js +3 -3
- package/lib/core/BoxedTable/RowCell/index.d.ts +2 -0
- package/lib/core/BoxedTable/RowCell/index.d.ts.map +1 -1
- package/lib/core/BoxedTable/RowCell/index.js +14 -4
- package/lib/core/BoxedTable/RowCell/styles.d.ts +0 -3
- package/lib/core/BoxedTable/RowCell/styles.d.ts.map +1 -1
- package/lib/core/BoxedTable/RowCell/styles.js +7 -23
- package/lib/core/BoxedTable/TableBody/index.d.ts +7 -0
- package/lib/core/BoxedTable/TableBody/index.d.ts.map +1 -0
- package/lib/core/BoxedTable/TableBody/index.js +10 -0
- package/lib/core/BoxedTable/TableBody/styles.d.ts +6 -0
- package/lib/core/BoxedTable/TableBody/styles.d.ts.map +1 -0
- package/lib/core/BoxedTable/TableBody/styles.js +16 -0
- package/lib/core/BoxedTable/TableHeader/index.d.ts.map +1 -1
- package/lib/core/BoxedTable/TableHeader/index.js +5 -3
- package/lib/core/BoxedTable/TableHeader/styles.d.ts +5 -1
- package/lib/core/BoxedTable/TableHeader/styles.d.ts.map +1 -1
- package/lib/core/BoxedTable/TableHeader/styles.js +18 -3
- package/lib/core/BoxedTable/TableRow/index.d.ts.map +1 -1
- package/lib/core/BoxedTable/TableRow/index.js +5 -8
- package/lib/core/BoxedTable/TableRow/styles.d.ts +9 -5
- package/lib/core/BoxedTable/TableRow/styles.d.ts.map +1 -1
- package/lib/core/BoxedTable/TableRow/styles.js +30 -24
- package/lib/core/BoxedTable/index.d.ts +6 -0
- package/lib/core/BoxedTable/index.d.ts.map +1 -1
- package/lib/core/BoxedTable/index.js +18 -7
- package/lib/core/BoxedTable/styles.d.ts +9 -2
- package/lib/core/BoxedTable/styles.d.ts.map +1 -1
- package/lib/core/BoxedTable/styles.js +25 -19
- package/lib/core/ListPager/index.d.ts +2 -0
- package/lib/core/ListPager/index.d.ts.map +1 -1
- package/lib/core/ListPager/index.js +20 -2
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/package.json +1 -1
- package/esm/core/Autocomplete/utils/useHandleOptionsHeight.js +0 -16
- package/esm/core/CheckboxController/index.js +0 -22
- package/esm/core/Datepicker/yearMonthForm.js +0 -56
- package/esm/core/EditorOld/config.js +0 -69
- package/esm/core/EditorOld/index.js +0 -147
- package/esm/core/EditorOld/styles.js +0 -65
- package/esm/core/ImageCarousel/index.js +0 -70
- package/esm/core/ImageCarousel/styles.js +0 -58
- package/esm/enums/ModifierKey.js +0 -13
- package/lib/core/Autocomplete/utils/useHandleOptionsHeight.d.ts +0 -7
- package/lib/core/Autocomplete/utils/useHandleOptionsHeight.d.ts.map +0 -1
- package/lib/core/Autocomplete/utils/useHandleOptionsHeight.js +0 -16
- package/lib/core/CheckboxController/index.d.ts +0 -1
- package/lib/core/CheckboxController/index.d.ts.map +0 -1
- package/lib/core/CheckboxController/index.js +0 -22
- package/lib/core/Datepicker/yearMonthForm.d.ts +0 -10
- package/lib/core/Datepicker/yearMonthForm.d.ts.map +0 -1
- package/lib/core/Datepicker/yearMonthForm.js +0 -56
- package/lib/core/EditorOld/config.d.ts +0 -56
- package/lib/core/EditorOld/config.d.ts.map +0 -1
- package/lib/core/EditorOld/config.js +0 -69
- package/lib/core/EditorOld/index.d.ts +0 -39
- package/lib/core/EditorOld/index.d.ts.map +0 -1
- package/lib/core/EditorOld/index.js +0 -147
- package/lib/core/EditorOld/styles.d.ts +0 -23
- package/lib/core/EditorOld/styles.d.ts.map +0 -1
- package/lib/core/EditorOld/styles.js +0 -65
- package/lib/core/ImageCarousel/index.d.ts +0 -11
- package/lib/core/ImageCarousel/index.d.ts.map +0 -1
- package/lib/core/ImageCarousel/index.js +0 -70
- package/lib/core/ImageCarousel/styles.d.ts +0 -26
- package/lib/core/ImageCarousel/styles.d.ts.map +0 -1
- package/lib/core/ImageCarousel/styles.js +0 -58
- package/lib/enums/ModifierKey.d.ts +0 -12
- package/lib/enums/ModifierKey.d.ts.map +0 -1
- package/lib/enums/ModifierKey.js +0 -13
@@ -5,347 +5,451 @@ import TableRow from './TableRow';
|
|
5
5
|
import RowCell from './RowCell';
|
6
6
|
import DraggableRow from './DraggableRow';
|
7
7
|
import Checkbox from '../Checkbox';
|
8
|
+
import TableBody from './TableBody';
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
10
|
-
|
11
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
12
|
+
const meta = {
|
11
13
|
title: 'Core/BoxedTable',
|
12
14
|
component: BoxedTable
|
13
15
|
};
|
16
|
+
export default meta;
|
14
17
|
export const Table = {
|
15
|
-
|
16
|
-
columns:
|
17
|
-
children:
|
18
|
-
children: [/*#__PURE__*/
|
19
|
-
children:
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
18
|
+
args: {
|
19
|
+
columns: '2fr 1fr 1fr',
|
20
|
+
children: /*#__PURE__*/_jsxs(_Fragment, {
|
21
|
+
children: [/*#__PURE__*/_jsxs(TableHeader, {
|
22
|
+
children: [/*#__PURE__*/_jsx(HeaderCell, {
|
23
|
+
children: "Header 1"
|
24
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
25
|
+
children: "Header 2"
|
26
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
27
|
+
align: "center",
|
28
|
+
children: "Header 3 centered"
|
29
|
+
})]
|
30
|
+
}), /*#__PURE__*/_jsxs(TableBody, {
|
31
|
+
children: [/*#__PURE__*/_jsxs(TableRow, {
|
32
|
+
onClick: () => console.log('row clicked'),
|
33
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
34
|
+
children: "Clickable row cell 1"
|
35
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
36
|
+
pLeft: "1em",
|
37
|
+
pRight: "0.5em",
|
38
|
+
size: "12px",
|
39
|
+
children: "cell 2 with custom padding and size"
|
40
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
41
|
+
align: "center",
|
42
|
+
children: "cell 3 centered"
|
43
|
+
})]
|
44
|
+
}), /*#__PURE__*/_jsxs(TableRow, {
|
45
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
46
|
+
mobileTitle: "Mobile title",
|
47
|
+
children: "Non clickable row cell 1"
|
48
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
49
|
+
mobileTitle: "Mobile title",
|
50
|
+
children: "cell 2"
|
51
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
52
|
+
align: "right",
|
53
|
+
children: "cell 3 right align"
|
54
|
+
})]
|
55
|
+
})]
|
49
56
|
})]
|
50
|
-
})
|
51
|
-
}
|
57
|
+
})
|
58
|
+
},
|
52
59
|
name: 'Table'
|
53
60
|
};
|
61
|
+
export const TableWithCaption = {
|
62
|
+
args: {
|
63
|
+
columns: '2fr 1fr 1fr',
|
64
|
+
caption: 'This is a caption that will help screenreader users',
|
65
|
+
children: /*#__PURE__*/_jsxs(_Fragment, {
|
66
|
+
children: [/*#__PURE__*/_jsxs(TableHeader, {
|
67
|
+
children: [/*#__PURE__*/_jsx(HeaderCell, {
|
68
|
+
children: "Header 1"
|
69
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
70
|
+
children: "Header 2"
|
71
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
72
|
+
align: "center",
|
73
|
+
children: "Header 3 centered"
|
74
|
+
})]
|
75
|
+
}), /*#__PURE__*/_jsxs(TableBody, {
|
76
|
+
children: [/*#__PURE__*/_jsxs(TableRow, {
|
77
|
+
onClick: () => console.log('row clicked'),
|
78
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
79
|
+
children: "Clickable row cell 1"
|
80
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
81
|
+
pLeft: "1em",
|
82
|
+
pRight: "0.5em",
|
83
|
+
size: "12px",
|
84
|
+
children: "cell 2 with custom padding and size"
|
85
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
86
|
+
align: "center",
|
87
|
+
children: "cell 3 centered"
|
88
|
+
})]
|
89
|
+
}), /*#__PURE__*/_jsxs(TableRow, {
|
90
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
91
|
+
mobileTitle: "Mobile title",
|
92
|
+
children: "Non clickable row cell 1"
|
93
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
94
|
+
mobileTitle: "Mobile title",
|
95
|
+
children: "cell 2"
|
96
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
97
|
+
align: "right",
|
98
|
+
children: "cell 3 right align"
|
99
|
+
})]
|
100
|
+
})]
|
101
|
+
})]
|
102
|
+
})
|
103
|
+
},
|
104
|
+
name: 'Table with caption'
|
105
|
+
};
|
54
106
|
export const WithCheckbox = {
|
55
|
-
|
107
|
+
args: {
|
56
108
|
hasCheckbox: true,
|
57
|
-
columns:
|
58
|
-
type:
|
59
|
-
children:
|
60
|
-
children: [/*#__PURE__*/
|
61
|
-
children:
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
109
|
+
columns: '35px 1fr 1fr',
|
110
|
+
type: 'compact',
|
111
|
+
children: /*#__PURE__*/_jsxs(_Fragment, {
|
112
|
+
children: [/*#__PURE__*/_jsxs(TableHeader, {
|
113
|
+
children: [/*#__PURE__*/_jsx(HeaderCell, {}), /*#__PURE__*/_jsx(HeaderCell, {
|
114
|
+
children: "Header 1"
|
115
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
116
|
+
children: "Header 2"
|
117
|
+
})]
|
118
|
+
}), /*#__PURE__*/_jsxs(TableBody, {
|
119
|
+
children: [/*#__PURE__*/_jsxs(TableRow, {
|
120
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
121
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
122
|
+
checked: true
|
123
|
+
})
|
124
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
125
|
+
children: "cell 2 with custom padding and size"
|
126
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
127
|
+
children: "cell 3 centered with very long text blablablablablablablablablabla"
|
128
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
129
|
+
children: "cell 3 centered"
|
130
|
+
})]
|
131
|
+
}), /*#__PURE__*/_jsxs(TableRow, {
|
132
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
133
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
134
|
+
checked: true
|
135
|
+
})
|
136
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
137
|
+
children: "cell 2"
|
138
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
139
|
+
children: "cell 3 left align"
|
140
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
141
|
+
children: "cell 3 left align"
|
142
|
+
})]
|
143
|
+
}), /*#__PURE__*/_jsxs(TableRow, {
|
144
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
145
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
146
|
+
checked: true
|
147
|
+
})
|
148
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
149
|
+
children: "cell 2"
|
150
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
151
|
+
children: "cell 3 left align"
|
152
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
153
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
154
|
+
children: "Should not break"
|
155
|
+
})
|
156
|
+
})]
|
157
|
+
})]
|
94
158
|
})]
|
95
|
-
})
|
96
|
-
}
|
159
|
+
})
|
160
|
+
},
|
97
161
|
name: 'Checkbox'
|
98
162
|
};
|
99
163
|
export const WithSort = {
|
100
|
-
|
101
|
-
columns:
|
102
|
-
children:
|
103
|
-
children: [/*#__PURE__*/
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
164
|
+
args: {
|
165
|
+
columns: '2fr 1fr 1fr',
|
166
|
+
children: /*#__PURE__*/_jsxs(_Fragment, {
|
167
|
+
children: [/*#__PURE__*/_jsxs(TableHeader, {
|
168
|
+
children: [/*#__PURE__*/_jsx(HeaderCell, {
|
169
|
+
sortable: true,
|
170
|
+
sortOrder: "asc",
|
171
|
+
noSortReturnValue: "my value",
|
172
|
+
onSortChange: e => console.log('sort changed with value:', e),
|
173
|
+
children: "Sortable headers"
|
174
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
175
|
+
sortable: true,
|
176
|
+
sortOrder: "desc",
|
177
|
+
onSortChange: e => console.log('sort changed with value:', e),
|
178
|
+
children: "Header 2"
|
179
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
180
|
+
sortable: true,
|
181
|
+
sortOrder: "none",
|
182
|
+
onSortChange: e => console.log('sort changed with value:', e),
|
183
|
+
children: "Header 3"
|
184
|
+
})]
|
185
|
+
}), /*#__PURE__*/_jsxs(TableBody, {
|
186
|
+
children: [/*#__PURE__*/_jsxs(TableRow, {
|
187
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
188
|
+
className: "my-classname",
|
189
|
+
children: "row 1 cell 1"
|
190
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
191
|
+
children: "row 1 cell 2"
|
192
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
193
|
+
children: "row 1 cell 3"
|
194
|
+
})]
|
195
|
+
}), /*#__PURE__*/_jsxs(TableRow, {
|
196
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
197
|
+
children: "row 2 cell 1"
|
198
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
199
|
+
children: "row 2 cell 2"
|
200
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
201
|
+
ellipsis: true,
|
202
|
+
title: "Hello lots of stuff can be found here",
|
203
|
+
children: "Lots of stuff Lots of stuff Lots of stuff Lots of stuff Lots of stuff Lots of stuff Lots of stuff Lots of stuff Lots of stuff Lots of stuff Lots of stuff Lots of stuff"
|
204
|
+
})]
|
205
|
+
})]
|
138
206
|
})]
|
139
|
-
})
|
140
|
-
}
|
207
|
+
})
|
208
|
+
},
|
141
209
|
name: 'With sort'
|
142
210
|
};
|
143
211
|
export const Mysite = {
|
144
|
-
|
145
|
-
type:
|
146
|
-
columns:
|
147
|
-
children:
|
148
|
-
children: [/*#__PURE__*/
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
children:
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
212
|
+
args: {
|
213
|
+
type: 'mysite',
|
214
|
+
columns: '2fr 1fr 1fr',
|
215
|
+
children: /*#__PURE__*/_jsxs(_Fragment, {
|
216
|
+
children: [/*#__PURE__*/_jsxs(TableHeader, {
|
217
|
+
children: [/*#__PURE__*/_jsx(HeaderCell, {
|
218
|
+
sortable: true,
|
219
|
+
sortOrder: "asc",
|
220
|
+
noSortReturnValue: "my value",
|
221
|
+
onSortChange: e => console.log('sort changed with value:', e),
|
222
|
+
children: "Sortable headers"
|
223
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
224
|
+
sortable: true,
|
225
|
+
sortOrder: "desc",
|
226
|
+
onSortChange: e => console.log('sort changed with value:', e),
|
227
|
+
children: "Header 2"
|
228
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
229
|
+
sortable: true,
|
230
|
+
sortOrder: "none",
|
231
|
+
onSortChange: e => console.log('sort changed with value:', e),
|
232
|
+
children: "Header 3"
|
233
|
+
})]
|
234
|
+
}), /*#__PURE__*/_jsxs(TableBody, {
|
235
|
+
children: [/*#__PURE__*/_jsxs(TableRow, {
|
236
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
237
|
+
children: "row 1 cell 1"
|
238
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
239
|
+
children: "row 1 cell 2"
|
240
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
241
|
+
children: "row 1 cell 3"
|
242
|
+
})]
|
243
|
+
}), /*#__PURE__*/_jsxs(TableRow, {
|
244
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
245
|
+
children: "row 2 cell 1"
|
246
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
247
|
+
children: "row 2 cell 2"
|
248
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
249
|
+
children: "row 2 cell 3"
|
250
|
+
})]
|
251
|
+
})]
|
180
252
|
})]
|
181
|
-
})
|
182
|
-
}
|
253
|
+
})
|
254
|
+
},
|
183
255
|
name: 'Mysite'
|
184
256
|
};
|
185
257
|
export const Compact = {
|
186
|
-
|
187
|
-
type:
|
188
|
-
columns:
|
189
|
-
children:
|
190
|
-
children: [/*#__PURE__*/
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
children:
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
258
|
+
args: {
|
259
|
+
type: 'compact',
|
260
|
+
columns: '2fr 1fr 1fr',
|
261
|
+
children: /*#__PURE__*/_jsxs(_Fragment, {
|
262
|
+
children: [/*#__PURE__*/_jsxs(TableHeader, {
|
263
|
+
children: [/*#__PURE__*/_jsx(HeaderCell, {
|
264
|
+
sortable: true,
|
265
|
+
sortOrder: "asc",
|
266
|
+
noSortReturnValue: "my value",
|
267
|
+
onSortChange: e => console.log('sort changed with value:', e),
|
268
|
+
children: "Sortable headers"
|
269
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
270
|
+
sortable: true,
|
271
|
+
sortOrder: "desc",
|
272
|
+
onSortChange: e => console.log('sort changed with value:', e),
|
273
|
+
children: "Header 2"
|
274
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
275
|
+
sortable: true,
|
276
|
+
sortOrder: "none",
|
277
|
+
onSortChange: e => console.log('sort changed with value:', e),
|
278
|
+
children: "Header 3"
|
279
|
+
})]
|
280
|
+
}), /*#__PURE__*/_jsxs(TableBody, {
|
281
|
+
children: [/*#__PURE__*/_jsxs(TableRow, {
|
282
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
283
|
+
children: "row 1 cell 1"
|
284
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
285
|
+
children: "row 1 cell 2"
|
286
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
287
|
+
children: "row 1 cell 3"
|
288
|
+
})]
|
289
|
+
}), /*#__PURE__*/_jsxs(TableRow, {
|
290
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
291
|
+
children: "row 2 cell 1"
|
292
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
293
|
+
children: "row 2 cell 2"
|
294
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
295
|
+
children: "row 2 cell 3"
|
296
|
+
})]
|
297
|
+
})]
|
222
298
|
})]
|
223
|
-
})
|
224
|
-
}
|
299
|
+
})
|
300
|
+
},
|
225
301
|
name: 'Compact'
|
226
302
|
};
|
227
303
|
export const Expandable = {
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
304
|
+
args: {
|
305
|
+
columns: '1fr 1fr 1fr',
|
306
|
+
children: /*#__PURE__*/_jsxs(_Fragment, {
|
307
|
+
children: [/*#__PURE__*/_jsxs(TableHeader, {
|
308
|
+
children: [/*#__PURE__*/_jsx(HeaderCell, {
|
309
|
+
children: "Header 1"
|
310
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
311
|
+
children: "Header 2"
|
312
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
313
|
+
children: "Header 3"
|
314
|
+
})]
|
315
|
+
}), /*#__PURE__*/_jsxs(TableBody, {
|
316
|
+
children: [/*#__PURE__*/_jsxs(TableRow, {
|
317
|
+
expandable: true,
|
318
|
+
expandableContent: /*#__PURE__*/_jsx("span", {
|
319
|
+
children: "This is some nice content"
|
320
|
+
}),
|
321
|
+
defaultExpanded: true,
|
322
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
323
|
+
as: "div",
|
324
|
+
children: "row 1 cell 1"
|
325
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
326
|
+
as: "div",
|
327
|
+
children: "row 1 cell 2"
|
328
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
329
|
+
as: "div",
|
330
|
+
children: "row 1 cell 3"
|
331
|
+
})]
|
332
|
+
}), /*#__PURE__*/_jsxs(TableRow, {
|
333
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
334
|
+
children: "row 2 cell 1"
|
335
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
336
|
+
children: "row 2 cell 2"
|
337
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
338
|
+
children: "row 2 cell 3"
|
339
|
+
})]
|
340
|
+
})]
|
259
341
|
})]
|
260
|
-
})
|
261
|
-
}
|
342
|
+
})
|
343
|
+
},
|
262
344
|
name: 'Expandable'
|
263
345
|
};
|
264
346
|
export const DragAndDropList = {
|
265
|
-
|
266
|
-
columns:
|
347
|
+
args: {
|
348
|
+
columns: '1fr 1fr 1fr',
|
349
|
+
dropList: true,
|
267
350
|
onDrop: console.log,
|
268
|
-
children:
|
269
|
-
children: [/*#__PURE__*/
|
270
|
-
children:
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
351
|
+
children: /*#__PURE__*/_jsxs(_Fragment, {
|
352
|
+
children: [/*#__PURE__*/_jsxs(TableHeader, {
|
353
|
+
children: [/*#__PURE__*/_jsx(HeaderCell, {
|
354
|
+
children: "Header 1"
|
355
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
356
|
+
children: "Header 2"
|
357
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
358
|
+
align: "center",
|
359
|
+
children: "Header 3 centered"
|
360
|
+
})]
|
361
|
+
}), /*#__PURE__*/_jsxs(TableBody, {
|
362
|
+
children: [/*#__PURE__*/_jsxs(DraggableRow, {
|
363
|
+
id: "1",
|
364
|
+
index: 0,
|
365
|
+
subContent: /*#__PURE__*/_jsxs("div", {
|
366
|
+
children: [/*#__PURE__*/_jsx("span", {
|
367
|
+
children: "This is some nice content"
|
368
|
+
}), /*#__PURE__*/_jsx("br", {}), /*#__PURE__*/_jsx("span", {
|
369
|
+
children: "Here we can add lots of stuff"
|
370
|
+
})]
|
371
|
+
}),
|
372
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
373
|
+
as: "div",
|
374
|
+
children: "row 1 cell 1"
|
375
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
376
|
+
as: "div",
|
377
|
+
children: "row 1 cell 2"
|
378
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
379
|
+
as: "div",
|
380
|
+
children: "row 1 cell 3"
|
381
|
+
})]
|
382
|
+
}), /*#__PURE__*/_jsxs(DraggableRow, {
|
383
|
+
id: "2",
|
384
|
+
index: 1,
|
385
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
386
|
+
as: "div",
|
387
|
+
children: "row 2 cell 1"
|
388
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
389
|
+
as: "div",
|
390
|
+
children: "row 2 cell 2"
|
391
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
392
|
+
as: "div",
|
393
|
+
children: "row 2 cell 3"
|
394
|
+
})]
|
285
395
|
})]
|
286
|
-
}),
|
287
|
-
children: [/*#__PURE__*/_jsx(RowCell, {
|
288
|
-
children: "row 1 cell 1"
|
289
|
-
}), /*#__PURE__*/_jsx(RowCell, {
|
290
|
-
children: "row 1 cell 2"
|
291
|
-
}), /*#__PURE__*/_jsx(RowCell, {
|
292
|
-
children: "row 1 cell 3"
|
293
|
-
})]
|
294
|
-
}), /*#__PURE__*/_jsxs(DraggableRow, {
|
295
|
-
id: "2",
|
296
|
-
index: 1,
|
297
|
-
children: [/*#__PURE__*/_jsx(RowCell, {
|
298
|
-
children: "row 2 cell 1"
|
299
|
-
}), /*#__PURE__*/_jsx(RowCell, {
|
300
|
-
children: "row 2 cell 2"
|
301
|
-
}), /*#__PURE__*/_jsx(RowCell, {
|
302
|
-
children: "row 2 cell 3"
|
303
396
|
})]
|
304
|
-
})
|
305
|
-
}
|
397
|
+
})
|
398
|
+
},
|
306
399
|
name: 'Drag and drop list'
|
307
400
|
};
|
308
401
|
export const DragAndDropListDragDisabled = {
|
309
|
-
|
310
|
-
columns:
|
402
|
+
args: {
|
403
|
+
columns: '1fr 1fr 1fr',
|
404
|
+
dropList: true,
|
311
405
|
onDrop: console.log,
|
312
|
-
children:
|
313
|
-
children: [/*#__PURE__*/
|
314
|
-
children:
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
406
|
+
children: /*#__PURE__*/_jsxs(_Fragment, {
|
407
|
+
children: [/*#__PURE__*/_jsxs(TableHeader, {
|
408
|
+
children: [/*#__PURE__*/_jsx(HeaderCell, {
|
409
|
+
children: "Header 1"
|
410
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
411
|
+
children: "Header 2"
|
412
|
+
}), /*#__PURE__*/_jsx(HeaderCell, {
|
413
|
+
align: "center",
|
414
|
+
children: "Header 3 centered"
|
415
|
+
})]
|
416
|
+
}), /*#__PURE__*/_jsxs(TableBody, {
|
417
|
+
children: [/*#__PURE__*/_jsxs(DraggableRow, {
|
418
|
+
disableDrag: true,
|
419
|
+
id: "1",
|
420
|
+
index: 0,
|
421
|
+
subContent: /*#__PURE__*/_jsx("div", {
|
422
|
+
children: /*#__PURE__*/_jsx("span", {
|
423
|
+
children: "This is some nice content"
|
424
|
+
})
|
425
|
+
}),
|
426
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
427
|
+
as: "div",
|
428
|
+
children: "row 1 cell 1"
|
429
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
430
|
+
as: "div",
|
431
|
+
children: "row 1 cell 2"
|
432
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
433
|
+
as: "div",
|
434
|
+
children: "row 1 cell 3"
|
435
|
+
})]
|
436
|
+
}), /*#__PURE__*/_jsxs(DraggableRow, {
|
437
|
+
disableDrag: true,
|
438
|
+
id: "2",
|
439
|
+
index: 1,
|
440
|
+
children: [/*#__PURE__*/_jsx(RowCell, {
|
441
|
+
as: "div",
|
442
|
+
children: "row 2 cell 1"
|
443
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
444
|
+
as: "div",
|
445
|
+
children: "row 2 cell 2"
|
446
|
+
}), /*#__PURE__*/_jsx(RowCell, {
|
447
|
+
as: "div",
|
448
|
+
children: "row 2 cell 3"
|
449
|
+
})]
|
450
|
+
})]
|
347
451
|
})]
|
348
|
-
})
|
349
|
-
}
|
452
|
+
})
|
453
|
+
},
|
350
454
|
name: 'Drag and drop list (drag disabled)'
|
351
455
|
};
|