@stealthscale/component-collections 0.1.1 → 0.1.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/cyclonedx/bom.json +1 -1
- package/dist/index.js +1 -5700
- package/dist/pages/data-list/data-list.js +351 -0
- package/dist/pages/data-list/data-list.props.js +3 -0
- package/dist/pages/listbox/listbox.js +1277 -0
- package/dist/pages/listbox/listbox.props.js +3 -0
- package/dist/pages/pages.json +105 -0
- package/dist/pages/sortable/sortable.js +576 -0
- package/dist/pages/sortable/sortable.props.js +3 -0
- package/dist/pages/status-matrix/status-matrix.js +1403 -0
- package/dist/pages/status-matrix/status-matrix.props.js +3 -0
- package/dist/pages/swipe-actions/swipe-actions.js +212 -0
- package/dist/pages/swipe-actions/swipe-actions.props.js +3 -0
- package/dist/pages/table/table.js +1701 -0
- package/dist/pages/table/table.props.js +3 -0
- package/dist/pages/timeline/timeline.js +380 -0
- package/dist/pages/timeline/timeline.props.js +3 -0
- package/dist/pages/transfer/transfer.js +465 -0
- package/dist/pages/transfer/transfer.props.js +3 -0
- package/dist/pages/tree-view/tree-view.js +1059 -0
- package/dist/pages/tree-view/tree-view.props.js +3 -0
- package/dist/shared-DVn824MJ.js +5701 -0
- package/dist/theme.js +23 -13
- package/locales/en/specimen/data-list.json +64 -0
- package/locales/en/specimen/listbox.json +98 -0
- package/locales/en/specimen/sortable.json +65 -0
- package/locales/en/specimen/status-matrix.json +47 -0
- package/locales/en/specimen/swipe-actions.json +32 -0
- package/locales/en/specimen/table.json +94 -0
- package/locales/en/specimen/timeline.json +72 -0
- package/locales/en/specimen/transfer.json +34 -0
- package/locales/en/specimen/tree-view.json +107 -0
- package/package.json +10 -9
- /package/dist/{recipe-C1oaF8pO.js → recipes-C1oaF8pO.js} +0 -0
|
@@ -0,0 +1,1701 @@
|
|
|
1
|
+
import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { B as Body, F as Root, I as Header, L as ColumnHeader, M as Scroller, N as Row, P as RowHeader, R as Cell, T as Simple, z as Caption } from "../../shared-DVn824MJ.js";
|
|
3
|
+
import { s as recipe } from "../../recipes-C1oaF8pO.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { useEffect, useId, useState } from "react";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Matrix, Room, landmarked, scenesOf, specimen, useWords } from "@stealthscale/specimen";
|
|
8
|
+
import { ArrowDownIcon, ArrowUpDownIcon, ArrowUpIcon } from "lucide-react";
|
|
9
|
+
//#region src/table/examples/accounts.example.tsx
|
|
10
|
+
const ACCOUNTS$8 = [
|
|
11
|
+
{
|
|
12
|
+
amount: "4,120.00",
|
|
13
|
+
key: "bridge",
|
|
14
|
+
state: "settled"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
amount: "880.40",
|
|
18
|
+
key: "halden",
|
|
19
|
+
state: "held"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
amount: "12,500.00",
|
|
23
|
+
key: "perrin",
|
|
24
|
+
state: "queued"
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
function Accounts() {
|
|
28
|
+
const $ = c(24);
|
|
29
|
+
const { t } = useWords("table");
|
|
30
|
+
let t0;
|
|
31
|
+
if ($[0] !== t) {
|
|
32
|
+
t0 = t("caption");
|
|
33
|
+
$[0] = t;
|
|
34
|
+
$[1] = t0;
|
|
35
|
+
} else t0 = $[1];
|
|
36
|
+
let t1;
|
|
37
|
+
if ($[2] !== t) {
|
|
38
|
+
t1 = t("account");
|
|
39
|
+
$[2] = t;
|
|
40
|
+
$[3] = t1;
|
|
41
|
+
} else t1 = $[3];
|
|
42
|
+
let t2;
|
|
43
|
+
if ($[4] !== t1) {
|
|
44
|
+
t2 = {
|
|
45
|
+
key: "name",
|
|
46
|
+
label: t1,
|
|
47
|
+
rowHeader: true
|
|
48
|
+
};
|
|
49
|
+
$[4] = t1;
|
|
50
|
+
$[5] = t2;
|
|
51
|
+
} else t2 = $[5];
|
|
52
|
+
let t3;
|
|
53
|
+
if ($[6] !== t) {
|
|
54
|
+
t3 = t("state");
|
|
55
|
+
$[6] = t;
|
|
56
|
+
$[7] = t3;
|
|
57
|
+
} else t3 = $[7];
|
|
58
|
+
let t4;
|
|
59
|
+
if ($[8] !== t3) {
|
|
60
|
+
t4 = {
|
|
61
|
+
key: "state",
|
|
62
|
+
label: t3
|
|
63
|
+
};
|
|
64
|
+
$[8] = t3;
|
|
65
|
+
$[9] = t4;
|
|
66
|
+
} else t4 = $[9];
|
|
67
|
+
let t5;
|
|
68
|
+
if ($[10] !== t) {
|
|
69
|
+
t5 = t("amount");
|
|
70
|
+
$[10] = t;
|
|
71
|
+
$[11] = t5;
|
|
72
|
+
} else t5 = $[11];
|
|
73
|
+
let t6;
|
|
74
|
+
if ($[12] !== t5) {
|
|
75
|
+
t6 = {
|
|
76
|
+
key: "amount",
|
|
77
|
+
label: t5,
|
|
78
|
+
numeric: true
|
|
79
|
+
};
|
|
80
|
+
$[12] = t5;
|
|
81
|
+
$[13] = t6;
|
|
82
|
+
} else t6 = $[13];
|
|
83
|
+
let t7;
|
|
84
|
+
if ($[14] !== t2 || $[15] !== t4 || $[16] !== t6) {
|
|
85
|
+
t7 = [
|
|
86
|
+
t2,
|
|
87
|
+
t4,
|
|
88
|
+
t6
|
|
89
|
+
];
|
|
90
|
+
$[14] = t2;
|
|
91
|
+
$[15] = t4;
|
|
92
|
+
$[16] = t6;
|
|
93
|
+
$[17] = t7;
|
|
94
|
+
} else t7 = $[17];
|
|
95
|
+
let t8;
|
|
96
|
+
if ($[18] !== t) {
|
|
97
|
+
t8 = ACCOUNTS$8.map((t9) => {
|
|
98
|
+
const { amount, key, state } = t9;
|
|
99
|
+
return {
|
|
100
|
+
amount,
|
|
101
|
+
key,
|
|
102
|
+
name: t(key),
|
|
103
|
+
state: t(state)
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
$[18] = t;
|
|
107
|
+
$[19] = t8;
|
|
108
|
+
} else t8 = $[19];
|
|
109
|
+
let t9;
|
|
110
|
+
if ($[20] !== t0 || $[21] !== t7 || $[22] !== t8) {
|
|
111
|
+
t9 = /* @__PURE__ */ jsx(Simple, {
|
|
112
|
+
caption: t0,
|
|
113
|
+
columns: t7,
|
|
114
|
+
rows: t8,
|
|
115
|
+
rowToKey: _temp$9,
|
|
116
|
+
variant: "surface"
|
|
117
|
+
});
|
|
118
|
+
$[20] = t0;
|
|
119
|
+
$[21] = t7;
|
|
120
|
+
$[22] = t8;
|
|
121
|
+
$[23] = t9;
|
|
122
|
+
} else t9 = $[23];
|
|
123
|
+
return t9;
|
|
124
|
+
}
|
|
125
|
+
function _temp$9(row) {
|
|
126
|
+
return row.key;
|
|
127
|
+
}
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/table/examples/empty.example.tsx
|
|
130
|
+
var empty_example_exports = /* @__PURE__ */ __exportAll({
|
|
131
|
+
Empty: () => Empty,
|
|
132
|
+
source: () => source$9
|
|
133
|
+
});
|
|
134
|
+
function Empty() {
|
|
135
|
+
const $ = c(20);
|
|
136
|
+
const { t } = useWords("table");
|
|
137
|
+
let t0;
|
|
138
|
+
if ($[0] !== t) {
|
|
139
|
+
t0 = t("caption");
|
|
140
|
+
$[0] = t;
|
|
141
|
+
$[1] = t0;
|
|
142
|
+
} else t0 = $[1];
|
|
143
|
+
let t1;
|
|
144
|
+
if ($[2] !== t) {
|
|
145
|
+
t1 = t("account");
|
|
146
|
+
$[2] = t;
|
|
147
|
+
$[3] = t1;
|
|
148
|
+
} else t1 = $[3];
|
|
149
|
+
let t2;
|
|
150
|
+
if ($[4] !== t1) {
|
|
151
|
+
t2 = {
|
|
152
|
+
key: "name",
|
|
153
|
+
label: t1,
|
|
154
|
+
rowHeader: true
|
|
155
|
+
};
|
|
156
|
+
$[4] = t1;
|
|
157
|
+
$[5] = t2;
|
|
158
|
+
} else t2 = $[5];
|
|
159
|
+
let t3;
|
|
160
|
+
if ($[6] !== t) {
|
|
161
|
+
t3 = t("amount");
|
|
162
|
+
$[6] = t;
|
|
163
|
+
$[7] = t3;
|
|
164
|
+
} else t3 = $[7];
|
|
165
|
+
let t4;
|
|
166
|
+
if ($[8] !== t3) {
|
|
167
|
+
t4 = {
|
|
168
|
+
key: "amount",
|
|
169
|
+
label: t3,
|
|
170
|
+
numeric: true
|
|
171
|
+
};
|
|
172
|
+
$[8] = t3;
|
|
173
|
+
$[9] = t4;
|
|
174
|
+
} else t4 = $[9];
|
|
175
|
+
let t5;
|
|
176
|
+
if ($[10] !== t2 || $[11] !== t4) {
|
|
177
|
+
t5 = [t2, t4];
|
|
178
|
+
$[10] = t2;
|
|
179
|
+
$[11] = t4;
|
|
180
|
+
$[12] = t5;
|
|
181
|
+
} else t5 = $[12];
|
|
182
|
+
let t6;
|
|
183
|
+
if ($[13] !== t) {
|
|
184
|
+
t6 = t("nothing");
|
|
185
|
+
$[13] = t;
|
|
186
|
+
$[14] = t6;
|
|
187
|
+
} else t6 = $[14];
|
|
188
|
+
let t7;
|
|
189
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
190
|
+
t7 = [];
|
|
191
|
+
$[15] = t7;
|
|
192
|
+
} else t7 = $[15];
|
|
193
|
+
let t8;
|
|
194
|
+
if ($[16] !== t0 || $[17] !== t5 || $[18] !== t6) {
|
|
195
|
+
t8 = /* @__PURE__ */ jsx(Simple, {
|
|
196
|
+
caption: t0,
|
|
197
|
+
columns: t5,
|
|
198
|
+
empty: t6,
|
|
199
|
+
rows: t7,
|
|
200
|
+
rowToKey: _temp$8,
|
|
201
|
+
variant: "surface"
|
|
202
|
+
});
|
|
203
|
+
$[16] = t0;
|
|
204
|
+
$[17] = t5;
|
|
205
|
+
$[18] = t6;
|
|
206
|
+
$[19] = t8;
|
|
207
|
+
} else t8 = $[19];
|
|
208
|
+
return t8;
|
|
209
|
+
}
|
|
210
|
+
function _temp$8(row) {
|
|
211
|
+
return row.key;
|
|
212
|
+
}
|
|
213
|
+
const source$9 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Table } from \"@stealthscale/component-collections\";\n\ninterface Account {\n readonly amount: string;\n readonly key: string;\n readonly name: string;\n}\n\nexport function Empty(): ReactElement {\n const { t } = useWords(\"table\");\n\n return (\n <Table.Simple<Account>\n caption={t(\"caption\")}\n columns={[\n { key: \"name\", label: t(\"account\"), rowHeader: true },\n { key: \"amount\", label: t(\"amount\"), numeric: true },\n ]}\n empty={t(\"nothing\")}\n rows={[]}\n rowToKey={(row) => row.key}\n variant=\"surface\"\n />\n );\n}\n";
|
|
214
|
+
//#endregion
|
|
215
|
+
//#region src/table/examples/fixed.example.tsx
|
|
216
|
+
var fixed_example_exports = /* @__PURE__ */ __exportAll({
|
|
217
|
+
Fixed: () => Fixed,
|
|
218
|
+
source: () => source$8
|
|
219
|
+
});
|
|
220
|
+
const ACCOUNTS$7 = [
|
|
221
|
+
{
|
|
222
|
+
amount: "4,120.00",
|
|
223
|
+
key: "bridge",
|
|
224
|
+
state: "settled"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
amount: "880.40",
|
|
228
|
+
key: "halden",
|
|
229
|
+
state: "held"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
amount: "12,500.00",
|
|
233
|
+
key: "perrin",
|
|
234
|
+
state: "queued"
|
|
235
|
+
}
|
|
236
|
+
];
|
|
237
|
+
function Fixed() {
|
|
238
|
+
const $ = c(24);
|
|
239
|
+
const { t } = useWords("table");
|
|
240
|
+
let t0;
|
|
241
|
+
if ($[0] !== t) {
|
|
242
|
+
t0 = t("caption");
|
|
243
|
+
$[0] = t;
|
|
244
|
+
$[1] = t0;
|
|
245
|
+
} else t0 = $[1];
|
|
246
|
+
let t1;
|
|
247
|
+
if ($[2] !== t) {
|
|
248
|
+
t1 = t("account");
|
|
249
|
+
$[2] = t;
|
|
250
|
+
$[3] = t1;
|
|
251
|
+
} else t1 = $[3];
|
|
252
|
+
let t2;
|
|
253
|
+
if ($[4] !== t1) {
|
|
254
|
+
t2 = {
|
|
255
|
+
key: "name",
|
|
256
|
+
label: t1,
|
|
257
|
+
rowHeader: true,
|
|
258
|
+
width: "40%"
|
|
259
|
+
};
|
|
260
|
+
$[4] = t1;
|
|
261
|
+
$[5] = t2;
|
|
262
|
+
} else t2 = $[5];
|
|
263
|
+
let t3;
|
|
264
|
+
if ($[6] !== t) {
|
|
265
|
+
t3 = t("state");
|
|
266
|
+
$[6] = t;
|
|
267
|
+
$[7] = t3;
|
|
268
|
+
} else t3 = $[7];
|
|
269
|
+
let t4;
|
|
270
|
+
if ($[8] !== t3) {
|
|
271
|
+
t4 = {
|
|
272
|
+
key: "state",
|
|
273
|
+
label: t3,
|
|
274
|
+
width: "25%"
|
|
275
|
+
};
|
|
276
|
+
$[8] = t3;
|
|
277
|
+
$[9] = t4;
|
|
278
|
+
} else t4 = $[9];
|
|
279
|
+
let t5;
|
|
280
|
+
if ($[10] !== t) {
|
|
281
|
+
t5 = t("amount");
|
|
282
|
+
$[10] = t;
|
|
283
|
+
$[11] = t5;
|
|
284
|
+
} else t5 = $[11];
|
|
285
|
+
let t6;
|
|
286
|
+
if ($[12] !== t5) {
|
|
287
|
+
t6 = {
|
|
288
|
+
key: "amount",
|
|
289
|
+
label: t5,
|
|
290
|
+
numeric: true,
|
|
291
|
+
width: "35%"
|
|
292
|
+
};
|
|
293
|
+
$[12] = t5;
|
|
294
|
+
$[13] = t6;
|
|
295
|
+
} else t6 = $[13];
|
|
296
|
+
let t7;
|
|
297
|
+
if ($[14] !== t2 || $[15] !== t4 || $[16] !== t6) {
|
|
298
|
+
t7 = [
|
|
299
|
+
t2,
|
|
300
|
+
t4,
|
|
301
|
+
t6
|
|
302
|
+
];
|
|
303
|
+
$[14] = t2;
|
|
304
|
+
$[15] = t4;
|
|
305
|
+
$[16] = t6;
|
|
306
|
+
$[17] = t7;
|
|
307
|
+
} else t7 = $[17];
|
|
308
|
+
let t8;
|
|
309
|
+
if ($[18] !== t) {
|
|
310
|
+
t8 = ACCOUNTS$7.map((t9) => {
|
|
311
|
+
const { amount, key, state } = t9;
|
|
312
|
+
return {
|
|
313
|
+
amount,
|
|
314
|
+
key,
|
|
315
|
+
name: t(key),
|
|
316
|
+
state: t(state)
|
|
317
|
+
};
|
|
318
|
+
});
|
|
319
|
+
$[18] = t;
|
|
320
|
+
$[19] = t8;
|
|
321
|
+
} else t8 = $[19];
|
|
322
|
+
let t9;
|
|
323
|
+
if ($[20] !== t0 || $[21] !== t7 || $[22] !== t8) {
|
|
324
|
+
t9 = /* @__PURE__ */ jsx(Simple, {
|
|
325
|
+
caption: t0,
|
|
326
|
+
columns: t7,
|
|
327
|
+
layout: "fixed",
|
|
328
|
+
rows: t8,
|
|
329
|
+
rowToKey: _temp$7,
|
|
330
|
+
variant: "surface"
|
|
331
|
+
});
|
|
332
|
+
$[20] = t0;
|
|
333
|
+
$[21] = t7;
|
|
334
|
+
$[22] = t8;
|
|
335
|
+
$[23] = t9;
|
|
336
|
+
} else t9 = $[23];
|
|
337
|
+
return t9;
|
|
338
|
+
}
|
|
339
|
+
function _temp$7(row) {
|
|
340
|
+
return row.key;
|
|
341
|
+
}
|
|
342
|
+
const source$8 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Table } from \"@stealthscale/component-collections\";\n\ninterface Account {\n readonly amount: string;\n readonly key: string;\n readonly name: string;\n readonly state: string;\n}\n\nconst ACCOUNTS = [\n { amount: \"4,120.00\", key: \"bridge\", state: \"settled\" },\n { amount: \"880.40\", key: \"halden\", state: \"held\" },\n { amount: \"12,500.00\", key: \"perrin\", state: \"queued\" },\n] as const;\n\nexport function Fixed(): ReactElement {\n const { t } = useWords(\"table\");\n\n return (\n <Table.Simple<Account>\n caption={t(\"caption\")}\n columns={[\n { key: \"name\", label: t(\"account\"), rowHeader: true, width: \"40%\" },\n { key: \"state\", label: t(\"state\"), width: \"25%\" },\n { key: \"amount\", label: t(\"amount\"), numeric: true, width: \"35%\" },\n ]}\n layout=\"fixed\"\n rows={ACCOUNTS.map(({ amount, key, state }) => ({\n amount,\n key,\n name: t(key),\n state: t(state),\n }))}\n rowToKey={(row) => row.key}\n variant=\"surface\"\n />\n );\n}\n";
|
|
343
|
+
//#endregion
|
|
344
|
+
//#region src/table/examples/linked.example.tsx
|
|
345
|
+
var linked_example_exports = /* @__PURE__ */ __exportAll({
|
|
346
|
+
Linked: () => Linked,
|
|
347
|
+
source: () => source$7
|
|
348
|
+
});
|
|
349
|
+
const ACCOUNTS$6 = [
|
|
350
|
+
{
|
|
351
|
+
amount: "4,120.00",
|
|
352
|
+
key: "bridge"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
amount: "880.40",
|
|
356
|
+
key: "halden"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
amount: "12,500.00",
|
|
360
|
+
key: "perrin"
|
|
361
|
+
}
|
|
362
|
+
];
|
|
363
|
+
function linkOf(row) {
|
|
364
|
+
return /* @__PURE__ */ jsx("a", {
|
|
365
|
+
href: `#${row.key}`,
|
|
366
|
+
children: row.name
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
function Linked(props) {
|
|
370
|
+
const $ = c(20);
|
|
371
|
+
const { t } = useWords("table");
|
|
372
|
+
let t0;
|
|
373
|
+
if ($[0] !== t) {
|
|
374
|
+
t0 = t("caption");
|
|
375
|
+
$[0] = t;
|
|
376
|
+
$[1] = t0;
|
|
377
|
+
} else t0 = $[1];
|
|
378
|
+
let t1;
|
|
379
|
+
if ($[2] !== t) {
|
|
380
|
+
t1 = t("account");
|
|
381
|
+
$[2] = t;
|
|
382
|
+
$[3] = t1;
|
|
383
|
+
} else t1 = $[3];
|
|
384
|
+
let t2;
|
|
385
|
+
if ($[4] !== t1) {
|
|
386
|
+
t2 = {
|
|
387
|
+
cell: linkOf,
|
|
388
|
+
key: "name",
|
|
389
|
+
label: t1,
|
|
390
|
+
rowHeader: true
|
|
391
|
+
};
|
|
392
|
+
$[4] = t1;
|
|
393
|
+
$[5] = t2;
|
|
394
|
+
} else t2 = $[5];
|
|
395
|
+
let t3;
|
|
396
|
+
if ($[6] !== t) {
|
|
397
|
+
t3 = t("amount");
|
|
398
|
+
$[6] = t;
|
|
399
|
+
$[7] = t3;
|
|
400
|
+
} else t3 = $[7];
|
|
401
|
+
let t4;
|
|
402
|
+
if ($[8] !== t3) {
|
|
403
|
+
t4 = {
|
|
404
|
+
key: "amount",
|
|
405
|
+
label: t3,
|
|
406
|
+
numeric: true
|
|
407
|
+
};
|
|
408
|
+
$[8] = t3;
|
|
409
|
+
$[9] = t4;
|
|
410
|
+
} else t4 = $[9];
|
|
411
|
+
let t5;
|
|
412
|
+
if ($[10] !== t2 || $[11] !== t4) {
|
|
413
|
+
t5 = [t2, t4];
|
|
414
|
+
$[10] = t2;
|
|
415
|
+
$[11] = t4;
|
|
416
|
+
$[12] = t5;
|
|
417
|
+
} else t5 = $[12];
|
|
418
|
+
let t6;
|
|
419
|
+
if ($[13] !== t) {
|
|
420
|
+
t6 = ACCOUNTS$6.map((t7) => {
|
|
421
|
+
const { amount, key } = t7;
|
|
422
|
+
return {
|
|
423
|
+
amount,
|
|
424
|
+
key,
|
|
425
|
+
name: t(key)
|
|
426
|
+
};
|
|
427
|
+
});
|
|
428
|
+
$[13] = t;
|
|
429
|
+
$[14] = t6;
|
|
430
|
+
} else t6 = $[14];
|
|
431
|
+
let t7;
|
|
432
|
+
if ($[15] !== props || $[16] !== t0 || $[17] !== t5 || $[18] !== t6) {
|
|
433
|
+
t7 = /* @__PURE__ */ jsx(Simple, {
|
|
434
|
+
caption: t0,
|
|
435
|
+
columns: t5,
|
|
436
|
+
rows: t6,
|
|
437
|
+
rowToKey: _temp$6,
|
|
438
|
+
variant: "surface",
|
|
439
|
+
...props
|
|
440
|
+
});
|
|
441
|
+
$[15] = props;
|
|
442
|
+
$[16] = t0;
|
|
443
|
+
$[17] = t5;
|
|
444
|
+
$[18] = t6;
|
|
445
|
+
$[19] = t7;
|
|
446
|
+
} else t7 = $[19];
|
|
447
|
+
return t7;
|
|
448
|
+
}
|
|
449
|
+
function _temp$6(row) {
|
|
450
|
+
return row.key;
|
|
451
|
+
}
|
|
452
|
+
const source$7 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Table } from \"@stealthscale/component-collections\";\n\ninterface Account {\n readonly amount: string;\n readonly key: string;\n readonly name: string;\n}\n\nconst ACCOUNTS = [\n { amount: \"4,120.00\", key: \"bridge\" },\n { amount: \"880.40\", key: \"halden\" },\n { amount: \"12,500.00\", key: \"perrin\" },\n] as const;\n\nfunction linkOf(row: Account): ReactElement {\n return <a href={`#${row.key}`}>{row.name}</a>;\n}\n\nexport function Linked(\n props: Omit<Table.SimpleProps<Account>, \"columns\" | \"rows\" | \"rowToKey\">,\n): ReactElement {\n const { t } = useWords(\"table\");\n\n return (\n <Table.Simple<Account>\n caption={t(\"caption\")}\n columns={[\n { cell: linkOf, key: \"name\", label: t(\"account\"), rowHeader: true },\n { key: \"amount\", label: t(\"amount\"), numeric: true },\n ]}\n rows={ACCOUNTS.map(({ amount, key }) => ({ amount, key, name: t(key) }))}\n rowToKey={(row) => row.key}\n variant=\"surface\"\n {...props}\n />\n );\n}\n";
|
|
453
|
+
//#endregion
|
|
454
|
+
//#region src/table/examples/notes.example.tsx
|
|
455
|
+
var notes_example_exports = /* @__PURE__ */ __exportAll({
|
|
456
|
+
Notes: () => Notes,
|
|
457
|
+
source: () => source$6
|
|
458
|
+
});
|
|
459
|
+
const ACCOUNTS$5 = [
|
|
460
|
+
{
|
|
461
|
+
amount: "4,120.00",
|
|
462
|
+
key: "bridge"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
amount: "880.40",
|
|
466
|
+
key: "halden"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
amount: "12,500.00",
|
|
470
|
+
key: "perrin"
|
|
471
|
+
}
|
|
472
|
+
];
|
|
473
|
+
function Notes(props) {
|
|
474
|
+
const $ = c(25);
|
|
475
|
+
const { t } = useWords("table");
|
|
476
|
+
let t0;
|
|
477
|
+
if ($[0] !== t) {
|
|
478
|
+
t0 = t("caption");
|
|
479
|
+
$[0] = t;
|
|
480
|
+
$[1] = t0;
|
|
481
|
+
} else t0 = $[1];
|
|
482
|
+
let t1;
|
|
483
|
+
if ($[2] !== t) {
|
|
484
|
+
t1 = t("account");
|
|
485
|
+
$[2] = t;
|
|
486
|
+
$[3] = t1;
|
|
487
|
+
} else t1 = $[3];
|
|
488
|
+
let t2;
|
|
489
|
+
if ($[4] !== t1) {
|
|
490
|
+
t2 = {
|
|
491
|
+
key: "name",
|
|
492
|
+
label: t1,
|
|
493
|
+
rowHeader: true
|
|
494
|
+
};
|
|
495
|
+
$[4] = t1;
|
|
496
|
+
$[5] = t2;
|
|
497
|
+
} else t2 = $[5];
|
|
498
|
+
let t3;
|
|
499
|
+
if ($[6] !== t) {
|
|
500
|
+
t3 = t("note");
|
|
501
|
+
$[6] = t;
|
|
502
|
+
$[7] = t3;
|
|
503
|
+
} else t3 = $[7];
|
|
504
|
+
let t4;
|
|
505
|
+
if ($[8] !== t3) {
|
|
506
|
+
t4 = {
|
|
507
|
+
key: "note",
|
|
508
|
+
label: t3
|
|
509
|
+
};
|
|
510
|
+
$[8] = t3;
|
|
511
|
+
$[9] = t4;
|
|
512
|
+
} else t4 = $[9];
|
|
513
|
+
let t5;
|
|
514
|
+
if ($[10] !== t) {
|
|
515
|
+
t5 = t("amount");
|
|
516
|
+
$[10] = t;
|
|
517
|
+
$[11] = t5;
|
|
518
|
+
} else t5 = $[11];
|
|
519
|
+
let t6;
|
|
520
|
+
if ($[12] !== t5) {
|
|
521
|
+
t6 = {
|
|
522
|
+
key: "amount",
|
|
523
|
+
label: t5,
|
|
524
|
+
numeric: true
|
|
525
|
+
};
|
|
526
|
+
$[12] = t5;
|
|
527
|
+
$[13] = t6;
|
|
528
|
+
} else t6 = $[13];
|
|
529
|
+
let t7;
|
|
530
|
+
if ($[14] !== t2 || $[15] !== t4 || $[16] !== t6) {
|
|
531
|
+
t7 = [
|
|
532
|
+
t2,
|
|
533
|
+
t4,
|
|
534
|
+
t6
|
|
535
|
+
];
|
|
536
|
+
$[14] = t2;
|
|
537
|
+
$[15] = t4;
|
|
538
|
+
$[16] = t6;
|
|
539
|
+
$[17] = t7;
|
|
540
|
+
} else t7 = $[17];
|
|
541
|
+
let t8;
|
|
542
|
+
if ($[18] !== t) {
|
|
543
|
+
t8 = ACCOUNTS$5.map((t9) => {
|
|
544
|
+
const { amount, key } = t9;
|
|
545
|
+
return {
|
|
546
|
+
amount,
|
|
547
|
+
key,
|
|
548
|
+
name: t(key),
|
|
549
|
+
note: t(`${key}Note`)
|
|
550
|
+
};
|
|
551
|
+
});
|
|
552
|
+
$[18] = t;
|
|
553
|
+
$[19] = t8;
|
|
554
|
+
} else t8 = $[19];
|
|
555
|
+
let t9;
|
|
556
|
+
if ($[20] !== props || $[21] !== t0 || $[22] !== t7 || $[23] !== t8) {
|
|
557
|
+
t9 = /* @__PURE__ */ jsx(Simple, {
|
|
558
|
+
caption: t0,
|
|
559
|
+
columns: t7,
|
|
560
|
+
rows: t8,
|
|
561
|
+
rowToKey: _temp$5,
|
|
562
|
+
variant: "surface",
|
|
563
|
+
...props
|
|
564
|
+
});
|
|
565
|
+
$[20] = props;
|
|
566
|
+
$[21] = t0;
|
|
567
|
+
$[22] = t7;
|
|
568
|
+
$[23] = t8;
|
|
569
|
+
$[24] = t9;
|
|
570
|
+
} else t9 = $[24];
|
|
571
|
+
return t9;
|
|
572
|
+
}
|
|
573
|
+
function _temp$5(row) {
|
|
574
|
+
return row.key;
|
|
575
|
+
}
|
|
576
|
+
const source$6 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Table } from \"@stealthscale/component-collections\";\n\ninterface Account {\n readonly amount: string;\n readonly key: string;\n readonly name: string;\n readonly note: string;\n}\n\nconst ACCOUNTS = [\n { amount: \"4,120.00\", key: \"bridge\" },\n { amount: \"880.40\", key: \"halden\" },\n { amount: \"12,500.00\", key: \"perrin\" },\n] as const;\n\nexport function Notes(\n props: Omit<Table.SimpleProps<Account>, \"columns\" | \"rows\" | \"rowToKey\">,\n): ReactElement {\n const { t } = useWords(\"table\");\n\n return (\n <Table.Simple<Account>\n caption={t(\"caption\")}\n columns={[\n { key: \"name\", label: t(\"account\"), rowHeader: true },\n { key: \"note\", label: t(\"note\") },\n { key: \"amount\", label: t(\"amount\"), numeric: true },\n ]}\n rows={ACCOUNTS.map(({ amount, key }) => ({\n amount,\n key,\n name: t(key),\n note: t(`${key}Note`),\n }))}\n rowToKey={(row) => row.key}\n variant=\"surface\"\n {...props}\n />\n );\n}\n";
|
|
577
|
+
//#endregion
|
|
578
|
+
//#region src/table/examples/payouts.example.tsx
|
|
579
|
+
var payouts_example_exports = /* @__PURE__ */ __exportAll({
|
|
580
|
+
Payouts: () => Payouts,
|
|
581
|
+
source: () => source$5
|
|
582
|
+
});
|
|
583
|
+
const ACCOUNTS$4 = [
|
|
584
|
+
{
|
|
585
|
+
amount: "4,120.00",
|
|
586
|
+
key: "bridge"
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
amount: "880.40",
|
|
590
|
+
key: "halden"
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
amount: "12,500.00",
|
|
594
|
+
key: "perrin"
|
|
595
|
+
}
|
|
596
|
+
];
|
|
597
|
+
const TOTAL = "17,500.40";
|
|
598
|
+
function Payouts(props) {
|
|
599
|
+
const $ = c(23);
|
|
600
|
+
const { t } = useWords("table");
|
|
601
|
+
let t0;
|
|
602
|
+
if ($[0] !== t) {
|
|
603
|
+
t0 = t("caption");
|
|
604
|
+
$[0] = t;
|
|
605
|
+
$[1] = t0;
|
|
606
|
+
} else t0 = $[1];
|
|
607
|
+
let t1;
|
|
608
|
+
if ($[2] !== t) {
|
|
609
|
+
t1 = t("account");
|
|
610
|
+
$[2] = t;
|
|
611
|
+
$[3] = t1;
|
|
612
|
+
} else t1 = $[3];
|
|
613
|
+
let t2;
|
|
614
|
+
if ($[4] !== t1) {
|
|
615
|
+
t2 = {
|
|
616
|
+
key: "name",
|
|
617
|
+
label: t1,
|
|
618
|
+
rowHeader: true
|
|
619
|
+
};
|
|
620
|
+
$[4] = t1;
|
|
621
|
+
$[5] = t2;
|
|
622
|
+
} else t2 = $[5];
|
|
623
|
+
let t3;
|
|
624
|
+
if ($[6] !== t) {
|
|
625
|
+
t3 = t("amount");
|
|
626
|
+
$[6] = t;
|
|
627
|
+
$[7] = t3;
|
|
628
|
+
} else t3 = $[7];
|
|
629
|
+
let t4;
|
|
630
|
+
if ($[8] !== t3) {
|
|
631
|
+
t4 = {
|
|
632
|
+
key: "amount",
|
|
633
|
+
label: t3,
|
|
634
|
+
numeric: true,
|
|
635
|
+
sorted: "descending"
|
|
636
|
+
};
|
|
637
|
+
$[8] = t3;
|
|
638
|
+
$[9] = t4;
|
|
639
|
+
} else t4 = $[9];
|
|
640
|
+
let t5;
|
|
641
|
+
if ($[10] !== t2 || $[11] !== t4) {
|
|
642
|
+
t5 = [t2, t4];
|
|
643
|
+
$[10] = t2;
|
|
644
|
+
$[11] = t4;
|
|
645
|
+
$[12] = t5;
|
|
646
|
+
} else t5 = $[12];
|
|
647
|
+
let t6;
|
|
648
|
+
if ($[13] !== t) {
|
|
649
|
+
t6 = ACCOUNTS$4.map((t7) => {
|
|
650
|
+
const { amount, key } = t7;
|
|
651
|
+
return {
|
|
652
|
+
amount,
|
|
653
|
+
key,
|
|
654
|
+
name: t(key)
|
|
655
|
+
};
|
|
656
|
+
});
|
|
657
|
+
$[13] = t;
|
|
658
|
+
$[14] = t6;
|
|
659
|
+
} else t6 = $[14];
|
|
660
|
+
let t7;
|
|
661
|
+
if ($[15] !== t) {
|
|
662
|
+
t7 = (column) => {
|
|
663
|
+
if (column.key === "name") return t("total");
|
|
664
|
+
return column.numeric === true ? TOTAL : null;
|
|
665
|
+
};
|
|
666
|
+
$[15] = t;
|
|
667
|
+
$[16] = t7;
|
|
668
|
+
} else t7 = $[16];
|
|
669
|
+
let t8;
|
|
670
|
+
if ($[17] !== props || $[18] !== t0 || $[19] !== t5 || $[20] !== t6 || $[21] !== t7) {
|
|
671
|
+
t8 = /* @__PURE__ */ jsx(Simple, {
|
|
672
|
+
caption: t0,
|
|
673
|
+
columns: t5,
|
|
674
|
+
rows: t6,
|
|
675
|
+
rowToKey: _temp$4,
|
|
676
|
+
total: t7,
|
|
677
|
+
variant: "surface",
|
|
678
|
+
...props
|
|
679
|
+
});
|
|
680
|
+
$[17] = props;
|
|
681
|
+
$[18] = t0;
|
|
682
|
+
$[19] = t5;
|
|
683
|
+
$[20] = t6;
|
|
684
|
+
$[21] = t7;
|
|
685
|
+
$[22] = t8;
|
|
686
|
+
} else t8 = $[22];
|
|
687
|
+
return t8;
|
|
688
|
+
}
|
|
689
|
+
function _temp$4(row) {
|
|
690
|
+
return row.key;
|
|
691
|
+
}
|
|
692
|
+
const source$5 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Table } from \"@stealthscale/component-collections\";\n\ninterface Account {\n readonly amount: string;\n readonly key: string;\n readonly name: string;\n}\n\nconst ACCOUNTS = [\n { amount: \"4,120.00\", key: \"bridge\" },\n { amount: \"880.40\", key: \"halden\" },\n { amount: \"12,500.00\", key: \"perrin\" },\n] as const;\n\nconst TOTAL = \"17,500.40\";\n\nexport function Payouts(\n props: Omit<Table.SimpleProps<Account>, \"columns\" | \"rows\" | \"rowToKey\">,\n): ReactElement {\n const { t } = useWords(\"table\");\n\n return (\n <Table.Simple<Account>\n caption={t(\"caption\")}\n columns={[\n { key: \"name\", label: t(\"account\"), rowHeader: true },\n { key: \"amount\", label: t(\"amount\"), numeric: true, sorted: \"descending\" },\n ]}\n rows={ACCOUNTS.map(({ amount, key }) => ({ amount, key, name: t(key) }))}\n rowToKey={(row) => row.key}\n total={(column) => {\n if (column.key === \"name\") return t(\"total\");\n\n return column.numeric === true ? TOTAL : null;\n }}\n variant=\"surface\"\n {...props}\n />\n );\n}\n";
|
|
693
|
+
//#endregion
|
|
694
|
+
//#region src/table/examples/quarters.example.tsx
|
|
695
|
+
var quarters_example_exports = /* @__PURE__ */ __exportAll({
|
|
696
|
+
Quarters: () => Quarters,
|
|
697
|
+
source: () => source$4
|
|
698
|
+
});
|
|
699
|
+
const ACCOUNTS$3 = [
|
|
700
|
+
{
|
|
701
|
+
amount: "4,120.00",
|
|
702
|
+
key: "bridge"
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
amount: "880.40",
|
|
706
|
+
key: "halden"
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
amount: "12,500.00",
|
|
710
|
+
key: "perrin"
|
|
711
|
+
}
|
|
712
|
+
];
|
|
713
|
+
const QUARTERS = [
|
|
714
|
+
[
|
|
715
|
+
"Jan",
|
|
716
|
+
"Feb",
|
|
717
|
+
"Mar"
|
|
718
|
+
],
|
|
719
|
+
[
|
|
720
|
+
"Apr",
|
|
721
|
+
"May",
|
|
722
|
+
"Jun"
|
|
723
|
+
],
|
|
724
|
+
[
|
|
725
|
+
"Jul",
|
|
726
|
+
"Aug",
|
|
727
|
+
"Sep"
|
|
728
|
+
]
|
|
729
|
+
];
|
|
730
|
+
function Quarters() {
|
|
731
|
+
const $ = c(12);
|
|
732
|
+
const { t } = useWords("table");
|
|
733
|
+
let t0;
|
|
734
|
+
if ($[0] !== t) {
|
|
735
|
+
t0 = t("byMonth");
|
|
736
|
+
$[0] = t;
|
|
737
|
+
$[1] = t0;
|
|
738
|
+
} else t0 = $[1];
|
|
739
|
+
let t1;
|
|
740
|
+
if ($[2] !== t) {
|
|
741
|
+
t1 = t("account");
|
|
742
|
+
$[2] = t;
|
|
743
|
+
$[3] = t1;
|
|
744
|
+
} else t1 = $[3];
|
|
745
|
+
let t2;
|
|
746
|
+
if ($[4] !== t1) {
|
|
747
|
+
t2 = [{
|
|
748
|
+
key: "name",
|
|
749
|
+
label: t1,
|
|
750
|
+
rowHeader: true
|
|
751
|
+
}, ...QUARTERS.map(_temp3$1)];
|
|
752
|
+
$[4] = t1;
|
|
753
|
+
$[5] = t2;
|
|
754
|
+
} else t2 = $[5];
|
|
755
|
+
let t3;
|
|
756
|
+
if ($[6] !== t) {
|
|
757
|
+
t3 = ACCOUNTS$3.map((t4) => {
|
|
758
|
+
const { amount, key } = t4;
|
|
759
|
+
return {
|
|
760
|
+
amount,
|
|
761
|
+
key,
|
|
762
|
+
name: t(key)
|
|
763
|
+
};
|
|
764
|
+
});
|
|
765
|
+
$[6] = t;
|
|
766
|
+
$[7] = t3;
|
|
767
|
+
} else t3 = $[7];
|
|
768
|
+
let t4;
|
|
769
|
+
if ($[8] !== t0 || $[9] !== t2 || $[10] !== t3) {
|
|
770
|
+
t4 = /* @__PURE__ */ jsx(Simple, {
|
|
771
|
+
caption: t0,
|
|
772
|
+
columns: t2,
|
|
773
|
+
rows: t3,
|
|
774
|
+
rowToKey: _temp4,
|
|
775
|
+
rules: "all",
|
|
776
|
+
variant: "surface"
|
|
777
|
+
});
|
|
778
|
+
$[8] = t0;
|
|
779
|
+
$[9] = t2;
|
|
780
|
+
$[10] = t3;
|
|
781
|
+
$[11] = t4;
|
|
782
|
+
} else t4 = $[11];
|
|
783
|
+
return t4;
|
|
784
|
+
}
|
|
785
|
+
function _temp4(row_0) {
|
|
786
|
+
return row_0.key;
|
|
787
|
+
}
|
|
788
|
+
function _temp3$1(months, at) {
|
|
789
|
+
return {
|
|
790
|
+
columns: months.map(_temp2$2),
|
|
791
|
+
label: `Q${String(at + 1)}`
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
function _temp2$2(month) {
|
|
795
|
+
return {
|
|
796
|
+
cell: _temp$3,
|
|
797
|
+
key: month,
|
|
798
|
+
label: month,
|
|
799
|
+
numeric: true
|
|
800
|
+
};
|
|
801
|
+
}
|
|
802
|
+
function _temp$3(row) {
|
|
803
|
+
return row.amount;
|
|
804
|
+
}
|
|
805
|
+
const source$4 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Table } from \"@stealthscale/component-collections\";\n\ninterface Account {\n readonly amount: string;\n readonly key: string;\n readonly name: string;\n}\n\nconst ACCOUNTS = [\n { amount: \"4,120.00\", key: \"bridge\" },\n { amount: \"880.40\", key: \"halden\" },\n { amount: \"12,500.00\", key: \"perrin\" },\n] as const;\n\nconst QUARTERS = [\n [\"Jan\", \"Feb\", \"Mar\"],\n [\"Apr\", \"May\", \"Jun\"],\n [\"Jul\", \"Aug\", \"Sep\"],\n] as const;\n\nexport function Quarters(): ReactElement {\n const { t } = useWords(\"table\");\n\n return (\n <Table.Simple<Account>\n caption={t(\"byMonth\")}\n columns={[\n { key: \"name\", label: t(\"account\"), rowHeader: true },\n ...QUARTERS.map((months, at) => ({\n columns: months.map((month) => ({\n cell: (row: Account) => row.amount,\n key: month,\n label: month,\n numeric: true,\n })),\n label: `Q${String(at + 1)}`,\n })),\n ]}\n rows={ACCOUNTS.map(({ amount, key }) => ({ amount, key, name: t(key) }))}\n rowToKey={(row) => row.key}\n rules=\"all\"\n variant=\"surface\"\n />\n );\n}\n";
|
|
806
|
+
//#endregion
|
|
807
|
+
//#region src/table/examples/runs.example.tsx
|
|
808
|
+
var runs_example_exports = /* @__PURE__ */ __exportAll({
|
|
809
|
+
Runs: () => Runs,
|
|
810
|
+
source: () => source$3
|
|
811
|
+
});
|
|
812
|
+
const ACCOUNTS$2 = [
|
|
813
|
+
{
|
|
814
|
+
amount: "4,120.00",
|
|
815
|
+
key: "bridge"
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
amount: "880.40",
|
|
819
|
+
key: "halden"
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
amount: "12,500.00",
|
|
823
|
+
key: "perrin"
|
|
824
|
+
}
|
|
825
|
+
];
|
|
826
|
+
const MONTHS$1 = ["Jan", "Feb"];
|
|
827
|
+
function Runs() {
|
|
828
|
+
const $ = c(30);
|
|
829
|
+
const { t } = useWords("table");
|
|
830
|
+
const id = useId();
|
|
831
|
+
let t0;
|
|
832
|
+
if ($[0] !== t) {
|
|
833
|
+
t0 = t("caption");
|
|
834
|
+
$[0] = t;
|
|
835
|
+
$[1] = t0;
|
|
836
|
+
} else t0 = $[1];
|
|
837
|
+
let t1;
|
|
838
|
+
if ($[2] !== id || $[3] !== t0) {
|
|
839
|
+
t1 = /* @__PURE__ */ jsx(Caption, {
|
|
840
|
+
id,
|
|
841
|
+
children: t0
|
|
842
|
+
});
|
|
843
|
+
$[2] = id;
|
|
844
|
+
$[3] = t0;
|
|
845
|
+
$[4] = t1;
|
|
846
|
+
} else t1 = $[4];
|
|
847
|
+
let t2;
|
|
848
|
+
if ($[5] !== t) {
|
|
849
|
+
t2 = t("account");
|
|
850
|
+
$[5] = t;
|
|
851
|
+
$[6] = t2;
|
|
852
|
+
} else t2 = $[6];
|
|
853
|
+
let t3;
|
|
854
|
+
if ($[7] !== t2) {
|
|
855
|
+
t3 = /* @__PURE__ */ jsx(ColumnHeader, { children: t2 });
|
|
856
|
+
$[7] = t2;
|
|
857
|
+
$[8] = t3;
|
|
858
|
+
} else t3 = $[8];
|
|
859
|
+
let t4;
|
|
860
|
+
if ($[9] !== t) {
|
|
861
|
+
t4 = t("month");
|
|
862
|
+
$[9] = t;
|
|
863
|
+
$[10] = t4;
|
|
864
|
+
} else t4 = $[10];
|
|
865
|
+
let t5;
|
|
866
|
+
if ($[11] !== t4) {
|
|
867
|
+
t5 = /* @__PURE__ */ jsx(ColumnHeader, { children: t4 });
|
|
868
|
+
$[11] = t4;
|
|
869
|
+
$[12] = t5;
|
|
870
|
+
} else t5 = $[12];
|
|
871
|
+
let t6;
|
|
872
|
+
if ($[13] !== t) {
|
|
873
|
+
t6 = t("amount");
|
|
874
|
+
$[13] = t;
|
|
875
|
+
$[14] = t6;
|
|
876
|
+
} else t6 = $[14];
|
|
877
|
+
let t7;
|
|
878
|
+
if ($[15] !== t6) {
|
|
879
|
+
t7 = /* @__PURE__ */ jsx(ColumnHeader, {
|
|
880
|
+
"data-numeric": true,
|
|
881
|
+
children: t6
|
|
882
|
+
});
|
|
883
|
+
$[15] = t6;
|
|
884
|
+
$[16] = t7;
|
|
885
|
+
} else t7 = $[16];
|
|
886
|
+
let t8;
|
|
887
|
+
if ($[17] !== t3 || $[18] !== t5 || $[19] !== t7) {
|
|
888
|
+
t8 = /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
889
|
+
t3,
|
|
890
|
+
t5,
|
|
891
|
+
t7
|
|
892
|
+
] }) });
|
|
893
|
+
$[17] = t3;
|
|
894
|
+
$[18] = t5;
|
|
895
|
+
$[19] = t7;
|
|
896
|
+
$[20] = t8;
|
|
897
|
+
} else t8 = $[20];
|
|
898
|
+
let t9;
|
|
899
|
+
if ($[21] !== t) {
|
|
900
|
+
t9 = ACCOUNTS$2.map((account) => /* @__PURE__ */ jsx(Body, { children: MONTHS$1.map((month, at) => /* @__PURE__ */ jsxs(Row, { children: [
|
|
901
|
+
at === 0 ? /* @__PURE__ */ jsx(RowHeader, {
|
|
902
|
+
rowSpan: MONTHS$1.length,
|
|
903
|
+
scope: "rowgroup",
|
|
904
|
+
children: t(account.key)
|
|
905
|
+
}) : null,
|
|
906
|
+
/* @__PURE__ */ jsx(Cell, { children: month }),
|
|
907
|
+
/* @__PURE__ */ jsx(Cell, {
|
|
908
|
+
"data-numeric": true,
|
|
909
|
+
children: account.amount
|
|
910
|
+
})
|
|
911
|
+
] }, month)) }, account.key));
|
|
912
|
+
$[21] = t;
|
|
913
|
+
$[22] = t9;
|
|
914
|
+
} else t9 = $[22];
|
|
915
|
+
let t10;
|
|
916
|
+
if ($[23] !== t1 || $[24] !== t8 || $[25] !== t9) {
|
|
917
|
+
t10 = /* @__PURE__ */ jsxs(Root, { children: [
|
|
918
|
+
t1,
|
|
919
|
+
t8,
|
|
920
|
+
t9
|
|
921
|
+
] });
|
|
922
|
+
$[23] = t1;
|
|
923
|
+
$[24] = t8;
|
|
924
|
+
$[25] = t9;
|
|
925
|
+
$[26] = t10;
|
|
926
|
+
} else t10 = $[26];
|
|
927
|
+
let t11;
|
|
928
|
+
if ($[27] !== id || $[28] !== t10) {
|
|
929
|
+
t11 = /* @__PURE__ */ jsx(Scroller, {
|
|
930
|
+
"aria-labelledby": id,
|
|
931
|
+
variant: "surface",
|
|
932
|
+
children: t10
|
|
933
|
+
});
|
|
934
|
+
$[27] = id;
|
|
935
|
+
$[28] = t10;
|
|
936
|
+
$[29] = t11;
|
|
937
|
+
} else t11 = $[29];
|
|
938
|
+
return t11;
|
|
939
|
+
}
|
|
940
|
+
const source$3 = "import { type ReactElement, useId } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Table } from \"@stealthscale/component-collections\";\n\nconst ACCOUNTS = [\n { amount: \"4,120.00\", key: \"bridge\" },\n { amount: \"880.40\", key: \"halden\" },\n { amount: \"12,500.00\", key: \"perrin\" },\n] as const;\n\nconst MONTHS = [\"Jan\", \"Feb\"] as const;\n\nexport function Runs(): ReactElement {\n const { t } = useWords(\"table\");\n const id = useId();\n\n return (\n <Table.Scroller aria-labelledby={id} variant=\"surface\">\n <Table.Root>\n <Table.Caption id={id}>{t(\"caption\")}</Table.Caption>\n <Table.Header>\n <Table.Row>\n <Table.ColumnHeader>{t(\"account\")}</Table.ColumnHeader>\n <Table.ColumnHeader>{t(\"month\")}</Table.ColumnHeader>\n <Table.ColumnHeader data-numeric>{t(\"amount\")}</Table.ColumnHeader>\n </Table.Row>\n </Table.Header>\n {ACCOUNTS.map((account) => (\n <Table.Body key={account.key}>\n {MONTHS.map((month, at) => (\n <Table.Row key={month}>\n {at === 0 ? (\n <Table.RowHeader rowSpan={MONTHS.length} scope=\"rowgroup\">\n {t(account.key)}\n </Table.RowHeader>\n ) : null}\n <Table.Cell>{month}</Table.Cell>\n <Table.Cell data-numeric>{account.amount}</Table.Cell>\n </Table.Row>\n ))}\n </Table.Body>\n ))}\n </Table.Root>\n </Table.Scroller>\n );\n}\n";
|
|
941
|
+
//#endregion
|
|
942
|
+
//#region src/table/examples/sections.example.tsx
|
|
943
|
+
var sections_example_exports = /* @__PURE__ */ __exportAll({
|
|
944
|
+
Sections: () => Sections,
|
|
945
|
+
source: () => source$2
|
|
946
|
+
});
|
|
947
|
+
const ACCOUNTS$1 = [
|
|
948
|
+
{
|
|
949
|
+
amount: "4,120.00",
|
|
950
|
+
key: "bridge",
|
|
951
|
+
state: "settled"
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
amount: "880.40",
|
|
955
|
+
key: "halden",
|
|
956
|
+
state: "held"
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
amount: "12,500.00",
|
|
960
|
+
key: "perrin",
|
|
961
|
+
state: "queued"
|
|
962
|
+
}
|
|
963
|
+
];
|
|
964
|
+
function Sections() {
|
|
965
|
+
const $ = c(21);
|
|
966
|
+
const { t } = useWords("table");
|
|
967
|
+
let t0;
|
|
968
|
+
if ($[0] !== t) {
|
|
969
|
+
t0 = t("caption");
|
|
970
|
+
$[0] = t;
|
|
971
|
+
$[1] = t0;
|
|
972
|
+
} else t0 = $[1];
|
|
973
|
+
let t1;
|
|
974
|
+
if ($[2] !== t) {
|
|
975
|
+
t1 = t("account");
|
|
976
|
+
$[2] = t;
|
|
977
|
+
$[3] = t1;
|
|
978
|
+
} else t1 = $[3];
|
|
979
|
+
let t2;
|
|
980
|
+
if ($[4] !== t1) {
|
|
981
|
+
t2 = {
|
|
982
|
+
key: "name",
|
|
983
|
+
label: t1,
|
|
984
|
+
rowHeader: true
|
|
985
|
+
};
|
|
986
|
+
$[4] = t1;
|
|
987
|
+
$[5] = t2;
|
|
988
|
+
} else t2 = $[5];
|
|
989
|
+
let t3;
|
|
990
|
+
if ($[6] !== t) {
|
|
991
|
+
t3 = t("amount");
|
|
992
|
+
$[6] = t;
|
|
993
|
+
$[7] = t3;
|
|
994
|
+
} else t3 = $[7];
|
|
995
|
+
let t4;
|
|
996
|
+
if ($[8] !== t3) {
|
|
997
|
+
t4 = {
|
|
998
|
+
key: "amount",
|
|
999
|
+
label: t3,
|
|
1000
|
+
numeric: true
|
|
1001
|
+
};
|
|
1002
|
+
$[8] = t3;
|
|
1003
|
+
$[9] = t4;
|
|
1004
|
+
} else t4 = $[9];
|
|
1005
|
+
let t5;
|
|
1006
|
+
if ($[10] !== t2 || $[11] !== t4) {
|
|
1007
|
+
t5 = [t2, t4];
|
|
1008
|
+
$[10] = t2;
|
|
1009
|
+
$[11] = t4;
|
|
1010
|
+
$[12] = t5;
|
|
1011
|
+
} else t5 = $[12];
|
|
1012
|
+
let t6;
|
|
1013
|
+
let t7;
|
|
1014
|
+
if ($[13] !== t) {
|
|
1015
|
+
t6 = (state) => t(state);
|
|
1016
|
+
t7 = ACCOUNTS$1.map((t8) => {
|
|
1017
|
+
const { amount, key, state: state_0 } = t8;
|
|
1018
|
+
return {
|
|
1019
|
+
amount,
|
|
1020
|
+
key,
|
|
1021
|
+
name: t(key),
|
|
1022
|
+
state: state_0
|
|
1023
|
+
};
|
|
1024
|
+
});
|
|
1025
|
+
$[13] = t;
|
|
1026
|
+
$[14] = t6;
|
|
1027
|
+
$[15] = t7;
|
|
1028
|
+
} else {
|
|
1029
|
+
t6 = $[14];
|
|
1030
|
+
t7 = $[15];
|
|
1031
|
+
}
|
|
1032
|
+
let t8;
|
|
1033
|
+
if ($[16] !== t0 || $[17] !== t5 || $[18] !== t6 || $[19] !== t7) {
|
|
1034
|
+
t8 = /* @__PURE__ */ jsx(Simple, {
|
|
1035
|
+
caption: t0,
|
|
1036
|
+
columns: t5,
|
|
1037
|
+
groupBy: _temp$2,
|
|
1038
|
+
groupLabel: t6,
|
|
1039
|
+
rows: t7,
|
|
1040
|
+
rowToKey: _temp2$1,
|
|
1041
|
+
variant: "surface"
|
|
1042
|
+
});
|
|
1043
|
+
$[16] = t0;
|
|
1044
|
+
$[17] = t5;
|
|
1045
|
+
$[18] = t6;
|
|
1046
|
+
$[19] = t7;
|
|
1047
|
+
$[20] = t8;
|
|
1048
|
+
} else t8 = $[20];
|
|
1049
|
+
return t8;
|
|
1050
|
+
}
|
|
1051
|
+
function _temp2$1(row_0) {
|
|
1052
|
+
return row_0.key;
|
|
1053
|
+
}
|
|
1054
|
+
function _temp$2(row) {
|
|
1055
|
+
return row.state;
|
|
1056
|
+
}
|
|
1057
|
+
const source$2 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Table } from \"@stealthscale/component-collections\";\n\ninterface Account {\n readonly amount: string;\n readonly key: string;\n readonly name: string;\n readonly state: string;\n}\n\nconst ACCOUNTS = [\n { amount: \"4,120.00\", key: \"bridge\", state: \"settled\" },\n { amount: \"880.40\", key: \"halden\", state: \"held\" },\n { amount: \"12,500.00\", key: \"perrin\", state: \"queued\" },\n] as const;\n\nexport function Sections(): ReactElement {\n const { t } = useWords(\"table\");\n\n return (\n <Table.Simple<Account>\n caption={t(\"caption\")}\n columns={[\n { key: \"name\", label: t(\"account\"), rowHeader: true },\n { key: \"amount\", label: t(\"amount\"), numeric: true },\n ]}\n groupBy={(row) => row.state}\n groupLabel={(state) => t(state)}\n rows={ACCOUNTS.map(({ amount, key, state }) => ({ amount, key, name: t(key), state }))}\n rowToKey={(row) => row.key}\n variant=\"surface\"\n />\n );\n}\n";
|
|
1058
|
+
//#endregion
|
|
1059
|
+
//#region src/table/examples/sortable.example.tsx
|
|
1060
|
+
var sortable_example_exports = /* @__PURE__ */ __exportAll({
|
|
1061
|
+
Sortable: () => Sortable,
|
|
1062
|
+
source: () => source$1
|
|
1063
|
+
});
|
|
1064
|
+
const ACCOUNTS = [
|
|
1065
|
+
{
|
|
1066
|
+
amount: "4,120.00",
|
|
1067
|
+
key: "bridge",
|
|
1068
|
+
value: 4120
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
amount: "880.40",
|
|
1072
|
+
key: "halden",
|
|
1073
|
+
value: 880.4
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
amount: "12,500.00",
|
|
1077
|
+
key: "perrin",
|
|
1078
|
+
value: 12500
|
|
1079
|
+
}
|
|
1080
|
+
];
|
|
1081
|
+
const MARKS = {
|
|
1082
|
+
ascending: ArrowUpIcon,
|
|
1083
|
+
descending: ArrowDownIcon
|
|
1084
|
+
};
|
|
1085
|
+
function headed(text, direction) {
|
|
1086
|
+
const Mark = direction === void 0 ? ArrowUpDownIcon : MARKS[direction];
|
|
1087
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [text, /* @__PURE__ */ jsx(Mark, {
|
|
1088
|
+
"aria-hidden": true,
|
|
1089
|
+
size: "1em"
|
|
1090
|
+
})] });
|
|
1091
|
+
}
|
|
1092
|
+
function compared(sort) {
|
|
1093
|
+
const sign = sort.direction === "ascending" ? 1 : -1;
|
|
1094
|
+
return (left, right) => sign * (sort.key === "amount" ? left.value - right.value : left.name.localeCompare(right.name));
|
|
1095
|
+
}
|
|
1096
|
+
function Sortable() {
|
|
1097
|
+
const $ = c(41);
|
|
1098
|
+
const { t } = useWords("table");
|
|
1099
|
+
let t0;
|
|
1100
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1101
|
+
t0 = {
|
|
1102
|
+
direction: "descending",
|
|
1103
|
+
key: "amount"
|
|
1104
|
+
};
|
|
1105
|
+
$[0] = t0;
|
|
1106
|
+
} else t0 = $[0];
|
|
1107
|
+
const [sort, setSort] = useState(t0);
|
|
1108
|
+
let t1;
|
|
1109
|
+
if ($[1] !== sort.direction || $[2] !== sort.key) {
|
|
1110
|
+
t1 = (key) => sort.key === key ? sort.direction : void 0;
|
|
1111
|
+
$[1] = sort.direction;
|
|
1112
|
+
$[2] = sort.key;
|
|
1113
|
+
$[3] = t1;
|
|
1114
|
+
} else t1 = $[3];
|
|
1115
|
+
const directionOf = t1;
|
|
1116
|
+
let t2;
|
|
1117
|
+
if ($[4] !== t) {
|
|
1118
|
+
t2 = t("caption");
|
|
1119
|
+
$[4] = t;
|
|
1120
|
+
$[5] = t2;
|
|
1121
|
+
} else t2 = $[5];
|
|
1122
|
+
let t3;
|
|
1123
|
+
if ($[6] !== directionOf || $[7] !== t) {
|
|
1124
|
+
t3 = headed(t("account"), directionOf("name"));
|
|
1125
|
+
$[6] = directionOf;
|
|
1126
|
+
$[7] = t;
|
|
1127
|
+
$[8] = t3;
|
|
1128
|
+
} else t3 = $[8];
|
|
1129
|
+
let t4;
|
|
1130
|
+
if ($[9] !== directionOf) {
|
|
1131
|
+
t4 = directionOf("name");
|
|
1132
|
+
$[9] = directionOf;
|
|
1133
|
+
$[10] = t4;
|
|
1134
|
+
} else t4 = $[10];
|
|
1135
|
+
let t5;
|
|
1136
|
+
if ($[11] !== t) {
|
|
1137
|
+
t5 = t("sortByAccount");
|
|
1138
|
+
$[11] = t;
|
|
1139
|
+
$[12] = t5;
|
|
1140
|
+
} else t5 = $[12];
|
|
1141
|
+
let t6;
|
|
1142
|
+
if ($[13] !== t3 || $[14] !== t4 || $[15] !== t5) {
|
|
1143
|
+
t6 = {
|
|
1144
|
+
key: "name",
|
|
1145
|
+
label: t3,
|
|
1146
|
+
rowHeader: true,
|
|
1147
|
+
sorted: t4,
|
|
1148
|
+
sortLabel: t5
|
|
1149
|
+
};
|
|
1150
|
+
$[13] = t3;
|
|
1151
|
+
$[14] = t4;
|
|
1152
|
+
$[15] = t5;
|
|
1153
|
+
$[16] = t6;
|
|
1154
|
+
} else t6 = $[16];
|
|
1155
|
+
let t7;
|
|
1156
|
+
if ($[17] !== directionOf || $[18] !== t) {
|
|
1157
|
+
t7 = headed(t("amount"), directionOf("amount"));
|
|
1158
|
+
$[17] = directionOf;
|
|
1159
|
+
$[18] = t;
|
|
1160
|
+
$[19] = t7;
|
|
1161
|
+
} else t7 = $[19];
|
|
1162
|
+
let t8;
|
|
1163
|
+
if ($[20] !== directionOf) {
|
|
1164
|
+
t8 = directionOf("amount");
|
|
1165
|
+
$[20] = directionOf;
|
|
1166
|
+
$[21] = t8;
|
|
1167
|
+
} else t8 = $[21];
|
|
1168
|
+
let t9;
|
|
1169
|
+
if ($[22] !== t) {
|
|
1170
|
+
t9 = t("sortByAmount");
|
|
1171
|
+
$[22] = t;
|
|
1172
|
+
$[23] = t9;
|
|
1173
|
+
} else t9 = $[23];
|
|
1174
|
+
let t10;
|
|
1175
|
+
if ($[24] !== t7 || $[25] !== t8 || $[26] !== t9) {
|
|
1176
|
+
t10 = {
|
|
1177
|
+
key: "amount",
|
|
1178
|
+
label: t7,
|
|
1179
|
+
numeric: true,
|
|
1180
|
+
sorted: t8,
|
|
1181
|
+
sortLabel: t9
|
|
1182
|
+
};
|
|
1183
|
+
$[24] = t7;
|
|
1184
|
+
$[25] = t8;
|
|
1185
|
+
$[26] = t9;
|
|
1186
|
+
$[27] = t10;
|
|
1187
|
+
} else t10 = $[27];
|
|
1188
|
+
let t11;
|
|
1189
|
+
if ($[28] !== t10 || $[29] !== t6) {
|
|
1190
|
+
t11 = [t6, t10];
|
|
1191
|
+
$[28] = t10;
|
|
1192
|
+
$[29] = t6;
|
|
1193
|
+
$[30] = t11;
|
|
1194
|
+
} else t11 = $[30];
|
|
1195
|
+
let t12;
|
|
1196
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1197
|
+
t12 = (key_0) => {
|
|
1198
|
+
setSort((was) => ({
|
|
1199
|
+
direction: was.key === key_0 && was.direction === "ascending" ? "descending" : "ascending",
|
|
1200
|
+
key: key_0
|
|
1201
|
+
}));
|
|
1202
|
+
};
|
|
1203
|
+
$[31] = t12;
|
|
1204
|
+
} else t12 = $[31];
|
|
1205
|
+
let t13;
|
|
1206
|
+
if ($[32] !== sort || $[33] !== t) {
|
|
1207
|
+
let t14;
|
|
1208
|
+
if ($[35] !== t) {
|
|
1209
|
+
t14 = (t15) => {
|
|
1210
|
+
const { amount, key: key_1, value } = t15;
|
|
1211
|
+
return {
|
|
1212
|
+
amount,
|
|
1213
|
+
key: key_1,
|
|
1214
|
+
name: t(key_1),
|
|
1215
|
+
value
|
|
1216
|
+
};
|
|
1217
|
+
};
|
|
1218
|
+
$[35] = t;
|
|
1219
|
+
$[36] = t14;
|
|
1220
|
+
} else t14 = $[36];
|
|
1221
|
+
t13 = ACCOUNTS.map(t14).toSorted(compared(sort));
|
|
1222
|
+
$[32] = sort;
|
|
1223
|
+
$[33] = t;
|
|
1224
|
+
$[34] = t13;
|
|
1225
|
+
} else t13 = $[34];
|
|
1226
|
+
let t14;
|
|
1227
|
+
if ($[37] !== t11 || $[38] !== t13 || $[39] !== t2) {
|
|
1228
|
+
t14 = /* @__PURE__ */ jsx(Simple, {
|
|
1229
|
+
caption: t2,
|
|
1230
|
+
columns: t11,
|
|
1231
|
+
onSort: t12,
|
|
1232
|
+
rows: t13,
|
|
1233
|
+
rowToKey: _temp$1,
|
|
1234
|
+
variant: "surface"
|
|
1235
|
+
});
|
|
1236
|
+
$[37] = t11;
|
|
1237
|
+
$[38] = t13;
|
|
1238
|
+
$[39] = t2;
|
|
1239
|
+
$[40] = t14;
|
|
1240
|
+
} else t14 = $[40];
|
|
1241
|
+
return t14;
|
|
1242
|
+
}
|
|
1243
|
+
function _temp$1(row) {
|
|
1244
|
+
return row.key;
|
|
1245
|
+
}
|
|
1246
|
+
const source$1 = "import { type ReactElement, type ReactNode, useState } from \"react\";\n\nimport { ArrowDownIcon, ArrowUpDownIcon, ArrowUpIcon } from \"lucide-react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Table } from \"@stealthscale/component-collections\";\n\ninterface Account {\n readonly amount: string;\n readonly key: string;\n readonly name: string;\n readonly value: number;\n}\n\ntype Direction = \"ascending\" | \"descending\";\n\ninterface Sort {\n readonly direction: Direction;\n readonly key: string;\n}\n\nconst ACCOUNTS = [\n { amount: \"4,120.00\", key: \"bridge\", value: 4120 },\n { amount: \"880.40\", key: \"halden\", value: 880.4 },\n { amount: \"12,500.00\", key: \"perrin\", value: 12_500 },\n] as const;\n\nconst MARKS = { ascending: ArrowUpIcon, descending: ArrowDownIcon };\n\nfunction headed(text: string, direction: Direction | undefined): ReactNode {\n const Mark = direction === undefined ? ArrowUpDownIcon : MARKS[direction];\n\n return (\n <>\n {text}\n <Mark aria-hidden size=\"1em\" />\n </>\n );\n}\n\nfunction compared(sort: Sort): (left: Account, right: Account) => number {\n const sign = sort.direction === \"ascending\" ? 1 : -1;\n\n return (left, right) =>\n sign * (sort.key === \"amount\" ? left.value - right.value : left.name.localeCompare(right.name));\n}\n\nexport function Sortable(): ReactElement {\n const { t } = useWords(\"table\");\n const [sort, setSort] = useState<Sort>({ direction: \"descending\", key: \"amount\" });\n const directionOf = (key: string): Direction | undefined =>\n sort.key === key ? sort.direction : undefined;\n\n return (\n <Table.Simple<Account>\n caption={t(\"caption\")}\n columns={[\n {\n key: \"name\",\n label: headed(t(\"account\"), directionOf(\"name\")),\n rowHeader: true,\n sorted: directionOf(\"name\"),\n sortLabel: t(\"sortByAccount\"),\n },\n {\n key: \"amount\",\n label: headed(t(\"amount\"), directionOf(\"amount\")),\n numeric: true,\n sorted: directionOf(\"amount\"),\n sortLabel: t(\"sortByAmount\"),\n },\n ]}\n onSort={(key) => {\n setSort((was) => ({\n direction: was.key === key && was.direction === \"ascending\" ? \"descending\" : \"ascending\",\n key,\n }));\n }}\n rows={ACCOUNTS.map(({ amount, key, value }) => ({\n amount,\n key,\n name: t(key),\n value,\n })).toSorted(compared(sort))}\n rowToKey={(row) => row.key}\n variant=\"surface\"\n />\n );\n}\n";
|
|
1247
|
+
//#endregion
|
|
1248
|
+
//#region src/table/examples/weeks.example.tsx
|
|
1249
|
+
var weeks_example_exports = /* @__PURE__ */ __exportAll({
|
|
1250
|
+
Weeks: () => Weeks,
|
|
1251
|
+
source: () => source
|
|
1252
|
+
});
|
|
1253
|
+
const MONTHS = [
|
|
1254
|
+
"Jan",
|
|
1255
|
+
"Feb",
|
|
1256
|
+
"Mar",
|
|
1257
|
+
"Apr",
|
|
1258
|
+
"May",
|
|
1259
|
+
"Jun",
|
|
1260
|
+
"Jul",
|
|
1261
|
+
"Aug",
|
|
1262
|
+
"Sep"
|
|
1263
|
+
];
|
|
1264
|
+
const WEEKS = Array.from({ length: 12 }, (_, at) => at + 1);
|
|
1265
|
+
function Weeks(props) {
|
|
1266
|
+
const $ = c(14);
|
|
1267
|
+
const { t } = useWords("table");
|
|
1268
|
+
let t0;
|
|
1269
|
+
if ($[0] !== t) {
|
|
1270
|
+
t0 = t("caption");
|
|
1271
|
+
$[0] = t;
|
|
1272
|
+
$[1] = t0;
|
|
1273
|
+
} else t0 = $[1];
|
|
1274
|
+
let t1;
|
|
1275
|
+
if ($[2] !== t) {
|
|
1276
|
+
t1 = t("week");
|
|
1277
|
+
$[2] = t;
|
|
1278
|
+
$[3] = t1;
|
|
1279
|
+
} else t1 = $[3];
|
|
1280
|
+
let t2;
|
|
1281
|
+
if ($[4] !== t1) {
|
|
1282
|
+
t2 = [{
|
|
1283
|
+
key: "week",
|
|
1284
|
+
label: t1,
|
|
1285
|
+
rowHeader: true,
|
|
1286
|
+
width: "7rem"
|
|
1287
|
+
}, ...MONTHS.map(_temp2)];
|
|
1288
|
+
$[4] = t1;
|
|
1289
|
+
$[5] = t2;
|
|
1290
|
+
} else t2 = $[5];
|
|
1291
|
+
let t3;
|
|
1292
|
+
if ($[6] !== t) {
|
|
1293
|
+
t3 = WEEKS.map((week) => ({ week: t("weekAt", { at: String(week) }) }));
|
|
1294
|
+
$[6] = t;
|
|
1295
|
+
$[7] = t3;
|
|
1296
|
+
} else t3 = $[7];
|
|
1297
|
+
let t4;
|
|
1298
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1299
|
+
t4 = { maxBlockSize: "13rem" };
|
|
1300
|
+
$[8] = t4;
|
|
1301
|
+
} else t4 = $[8];
|
|
1302
|
+
let t5;
|
|
1303
|
+
if ($[9] !== props || $[10] !== t0 || $[11] !== t2 || $[12] !== t3) {
|
|
1304
|
+
t5 = /* @__PURE__ */ jsx(Simple, {
|
|
1305
|
+
"aria-label": t0,
|
|
1306
|
+
columns: t2,
|
|
1307
|
+
layout: "fixed",
|
|
1308
|
+
rows: t3,
|
|
1309
|
+
rowToKey: _temp3,
|
|
1310
|
+
style: t4,
|
|
1311
|
+
variant: "surface",
|
|
1312
|
+
...props
|
|
1313
|
+
});
|
|
1314
|
+
$[9] = props;
|
|
1315
|
+
$[10] = t0;
|
|
1316
|
+
$[11] = t2;
|
|
1317
|
+
$[12] = t3;
|
|
1318
|
+
$[13] = t5;
|
|
1319
|
+
} else t5 = $[13];
|
|
1320
|
+
return t5;
|
|
1321
|
+
}
|
|
1322
|
+
function _temp3(row) {
|
|
1323
|
+
return row.week;
|
|
1324
|
+
}
|
|
1325
|
+
function _temp2(month) {
|
|
1326
|
+
return {
|
|
1327
|
+
cell: _temp,
|
|
1328
|
+
key: month,
|
|
1329
|
+
label: month,
|
|
1330
|
+
numeric: true,
|
|
1331
|
+
width: "7rem"
|
|
1332
|
+
};
|
|
1333
|
+
}
|
|
1334
|
+
function _temp() {
|
|
1335
|
+
return "17,500.40";
|
|
1336
|
+
}
|
|
1337
|
+
const source = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Table } from \"@stealthscale/component-collections\";\n\ninterface Week {\n readonly week: string;\n}\n\nconst MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\"] as const;\n\nconst WEEKS = Array.from({ length: 12 }, (_, at) => at + 1);\n\nexport function Weeks(\n props: Omit<Table.SimpleProps<Week>, \"columns\" | \"rows\" | \"rowToKey\">,\n): ReactElement {\n const { t } = useWords(\"table\");\n\n return (\n <Table.Simple<Week>\n aria-label={t(\"caption\")}\n columns={[\n { key: \"week\", label: t(\"week\"), rowHeader: true, width: \"7rem\" },\n ...MONTHS.map((month) => ({\n cell: () => \"17,500.40\",\n key: month,\n label: month,\n numeric: true,\n width: \"7rem\",\n })),\n ]}\n layout=\"fixed\"\n rows={WEEKS.map((week) => ({ week: t(\"weekAt\", { at: String(week) }) }))}\n rowToKey={(row) => row.week}\n style={{ maxBlockSize: \"13rem\" }}\n variant=\"surface\"\n {...props}\n />\n );\n}\n";
|
|
1338
|
+
//#endregion
|
|
1339
|
+
//#region src/table/table.specimen.tsx
|
|
1340
|
+
/**
|
|
1341
|
+
* Catalogue page for the table.
|
|
1342
|
+
*
|
|
1343
|
+
* @remarks
|
|
1344
|
+
* `scenesOf` generates the sizes by looks, alignment, corners, rules, stripes, banded names,
|
|
1345
|
+
* interactive rows and palettes, each from an example. The interactive and palette scenes stage a
|
|
1346
|
+
* hover on the second row, and the held scenes stage a scroll position, so the behaviour shows in
|
|
1347
|
+
* a still image. The layout scene is hand-written, because a fixed layout needs declared widths
|
|
1348
|
+
* an auto layout does not. Sorting, spanning headers, row groups, sections, an empty table and
|
|
1349
|
+
* the three held tables have hand-written scenes. Every scene renders a component from
|
|
1350
|
+
* `examples/` and shows that file as its source. The words are keys under `table` in
|
|
1351
|
+
* `locales/en/specimen/table.json`.
|
|
1352
|
+
*/
|
|
1353
|
+
/**
|
|
1354
|
+
* Layouts of the layout scene.
|
|
1355
|
+
*/
|
|
1356
|
+
const LAYOUTS = ["auto", "fixed"];
|
|
1357
|
+
/**
|
|
1358
|
+
* Returns the distance from the end of one element to the start of another, on one axis.
|
|
1359
|
+
*
|
|
1360
|
+
* @remarks
|
|
1361
|
+
* The staging scrolls by this distance, so a whole row or column meets the sticky edge and no
|
|
1362
|
+
* part of one shows under it.
|
|
1363
|
+
*/
|
|
1364
|
+
function between(scroller, from, to, axis) {
|
|
1365
|
+
const start = scroller.querySelector(from)?.getBoundingClientRect();
|
|
1366
|
+
const end = scroller.querySelector(to)?.getBoundingClientRect();
|
|
1367
|
+
if (start === void 0 || end === void 0) return 0;
|
|
1368
|
+
return axis === "block" ? end.top - start.bottom : end.left - start.right;
|
|
1369
|
+
}
|
|
1370
|
+
/**
|
|
1371
|
+
* Renders a table and sets a hover or a scroll position on it after it mounts.
|
|
1372
|
+
*
|
|
1373
|
+
* @remarks
|
|
1374
|
+
* A still image shows no pointer and no scroll, so the scene sets the attribute or the position
|
|
1375
|
+
* the page would. The staging never appears in an example.
|
|
1376
|
+
*/
|
|
1377
|
+
function Staged(t0) {
|
|
1378
|
+
const $ = c(8);
|
|
1379
|
+
const { children, columns: t1, hover: t2, rows: t3 } = t0;
|
|
1380
|
+
const columns = t1 === void 0 ? 0 : t1;
|
|
1381
|
+
const hover = t2 === void 0 ? false : t2;
|
|
1382
|
+
const rows = t3 === void 0 ? 0 : t3;
|
|
1383
|
+
const [box, setBox] = useState(null);
|
|
1384
|
+
let t4;
|
|
1385
|
+
let t5;
|
|
1386
|
+
if ($[0] !== box || $[1] !== columns || $[2] !== hover || $[3] !== rows) {
|
|
1387
|
+
t4 = () => {
|
|
1388
|
+
const scroller = box?.querySelector(".table__viewport");
|
|
1389
|
+
const row = hover ? box?.querySelector("tbody > tr:nth-child(2)") : void 0;
|
|
1390
|
+
if (scroller === void 0 || scroller === null) return;
|
|
1391
|
+
scroller.scrollTo({
|
|
1392
|
+
left: between(scroller, "thead th", `thead th:nth-child(${String(columns + 2)})`, "inline"),
|
|
1393
|
+
top: between(scroller, "thead", `tbody > tr:nth-child(${String(rows + 1)})`, "block")
|
|
1394
|
+
});
|
|
1395
|
+
if (row !== void 0 && row !== null) row.dataset["hover"] = "";
|
|
1396
|
+
return () => {
|
|
1397
|
+
if (row !== void 0 && row !== null) delete row.dataset["hover"];
|
|
1398
|
+
};
|
|
1399
|
+
};
|
|
1400
|
+
t5 = [
|
|
1401
|
+
box,
|
|
1402
|
+
columns,
|
|
1403
|
+
hover,
|
|
1404
|
+
rows
|
|
1405
|
+
];
|
|
1406
|
+
$[0] = box;
|
|
1407
|
+
$[1] = columns;
|
|
1408
|
+
$[2] = hover;
|
|
1409
|
+
$[3] = rows;
|
|
1410
|
+
$[4] = t4;
|
|
1411
|
+
$[5] = t5;
|
|
1412
|
+
} else {
|
|
1413
|
+
t4 = $[4];
|
|
1414
|
+
t5 = $[5];
|
|
1415
|
+
}
|
|
1416
|
+
useEffect(t4, t5);
|
|
1417
|
+
let t6;
|
|
1418
|
+
if ($[6] !== children) {
|
|
1419
|
+
t6 = /* @__PURE__ */ jsx("div", {
|
|
1420
|
+
ref: setBox,
|
|
1421
|
+
children
|
|
1422
|
+
});
|
|
1423
|
+
$[6] = children;
|
|
1424
|
+
$[7] = t6;
|
|
1425
|
+
} else t6 = $[7];
|
|
1426
|
+
return t6;
|
|
1427
|
+
}
|
|
1428
|
+
/**
|
|
1429
|
+
* Renders the weeks table scrolled, named after its sticky axes so each region's name is unique.
|
|
1430
|
+
*/
|
|
1431
|
+
function Held(t0) {
|
|
1432
|
+
const $ = c(26);
|
|
1433
|
+
const { columns, rows, stickyColumn: t1, stickyHeader: t2 } = t0;
|
|
1434
|
+
const stickyColumn = t1 === void 0 ? false : t1;
|
|
1435
|
+
const stickyHeader = t2 === void 0 ? false : t2;
|
|
1436
|
+
const { t } = useWords("table");
|
|
1437
|
+
let T0;
|
|
1438
|
+
let T1;
|
|
1439
|
+
let T2;
|
|
1440
|
+
let sticky;
|
|
1441
|
+
let t3;
|
|
1442
|
+
let t4;
|
|
1443
|
+
let t5;
|
|
1444
|
+
let t6;
|
|
1445
|
+
if ($[0] !== columns || $[1] !== rows || $[2] !== stickyColumn || $[3] !== stickyHeader || $[4] !== t) {
|
|
1446
|
+
sticky = {
|
|
1447
|
+
stickyColumn,
|
|
1448
|
+
stickyHeader
|
|
1449
|
+
};
|
|
1450
|
+
T2 = Room;
|
|
1451
|
+
t6 = "sm";
|
|
1452
|
+
T1 = Staged;
|
|
1453
|
+
t4 = columns;
|
|
1454
|
+
t5 = rows;
|
|
1455
|
+
T0 = Weeks;
|
|
1456
|
+
t3 = landmarked(t("caption"), sticky);
|
|
1457
|
+
$[0] = columns;
|
|
1458
|
+
$[1] = rows;
|
|
1459
|
+
$[2] = stickyColumn;
|
|
1460
|
+
$[3] = stickyHeader;
|
|
1461
|
+
$[4] = t;
|
|
1462
|
+
$[5] = T0;
|
|
1463
|
+
$[6] = T1;
|
|
1464
|
+
$[7] = T2;
|
|
1465
|
+
$[8] = sticky;
|
|
1466
|
+
$[9] = t3;
|
|
1467
|
+
$[10] = t4;
|
|
1468
|
+
$[11] = t5;
|
|
1469
|
+
$[12] = t6;
|
|
1470
|
+
} else {
|
|
1471
|
+
T0 = $[5];
|
|
1472
|
+
T1 = $[6];
|
|
1473
|
+
T2 = $[7];
|
|
1474
|
+
sticky = $[8];
|
|
1475
|
+
t3 = $[9];
|
|
1476
|
+
t4 = $[10];
|
|
1477
|
+
t5 = $[11];
|
|
1478
|
+
t6 = $[12];
|
|
1479
|
+
}
|
|
1480
|
+
let t7;
|
|
1481
|
+
if ($[13] !== T0 || $[14] !== sticky || $[15] !== t3) {
|
|
1482
|
+
t7 = /* @__PURE__ */ jsx(T0, {
|
|
1483
|
+
"aria-label": t3,
|
|
1484
|
+
...sticky
|
|
1485
|
+
});
|
|
1486
|
+
$[13] = T0;
|
|
1487
|
+
$[14] = sticky;
|
|
1488
|
+
$[15] = t3;
|
|
1489
|
+
$[16] = t7;
|
|
1490
|
+
} else t7 = $[16];
|
|
1491
|
+
let t8;
|
|
1492
|
+
if ($[17] !== T1 || $[18] !== t4 || $[19] !== t5 || $[20] !== t7) {
|
|
1493
|
+
t8 = /* @__PURE__ */ jsx(T1, {
|
|
1494
|
+
columns: t4,
|
|
1495
|
+
rows: t5,
|
|
1496
|
+
children: t7
|
|
1497
|
+
});
|
|
1498
|
+
$[17] = T1;
|
|
1499
|
+
$[18] = t4;
|
|
1500
|
+
$[19] = t5;
|
|
1501
|
+
$[20] = t7;
|
|
1502
|
+
$[21] = t8;
|
|
1503
|
+
} else t8 = $[21];
|
|
1504
|
+
let t9;
|
|
1505
|
+
if ($[22] !== T2 || $[23] !== t6 || $[24] !== t8) {
|
|
1506
|
+
t9 = /* @__PURE__ */ jsx(T2, {
|
|
1507
|
+
size: t6,
|
|
1508
|
+
children: t8
|
|
1509
|
+
});
|
|
1510
|
+
$[22] = T2;
|
|
1511
|
+
$[23] = t6;
|
|
1512
|
+
$[24] = t8;
|
|
1513
|
+
$[25] = t9;
|
|
1514
|
+
} else t9 = $[25];
|
|
1515
|
+
return t9;
|
|
1516
|
+
}
|
|
1517
|
+
/**
|
|
1518
|
+
* Hand-written scene for the two layouts.
|
|
1519
|
+
*/
|
|
1520
|
+
const layouts = {
|
|
1521
|
+
about: "table.layout.about",
|
|
1522
|
+
axes: ["layout"],
|
|
1523
|
+
draw: () => /* @__PURE__ */ jsx(Matrix, {
|
|
1524
|
+
knob: "layout",
|
|
1525
|
+
of: LAYOUTS,
|
|
1526
|
+
children: (layout) => /* @__PURE__ */ jsx(Room, {
|
|
1527
|
+
size: "sm",
|
|
1528
|
+
children: layout === "fixed" ? /* @__PURE__ */ jsx(Fixed, {}) : /* @__PURE__ */ jsx(Accounts, {})
|
|
1529
|
+
})
|
|
1530
|
+
}),
|
|
1531
|
+
example: fixed_example_exports,
|
|
1532
|
+
title: "table.layout.title"
|
|
1533
|
+
};
|
|
1534
|
+
/**
|
|
1535
|
+
* Hand-written scene for columns that sort on a press.
|
|
1536
|
+
*/
|
|
1537
|
+
const sorting = {
|
|
1538
|
+
about: "table.sorting.about",
|
|
1539
|
+
draw: () => /* @__PURE__ */ jsx(Room, {
|
|
1540
|
+
size: "sm",
|
|
1541
|
+
children: /* @__PURE__ */ jsx(Sortable, {})
|
|
1542
|
+
}),
|
|
1543
|
+
example: sortable_example_exports,
|
|
1544
|
+
title: "table.sorting.title"
|
|
1545
|
+
};
|
|
1546
|
+
/**
|
|
1547
|
+
* Hand-written scene for headers that span columns.
|
|
1548
|
+
*/
|
|
1549
|
+
const quarters = {
|
|
1550
|
+
about: "table.quarters.about",
|
|
1551
|
+
draw: Quarters,
|
|
1552
|
+
example: quarters_example_exports,
|
|
1553
|
+
title: "table.quarters.title"
|
|
1554
|
+
};
|
|
1555
|
+
/**
|
|
1556
|
+
* Hand-written scene for headers that span rows.
|
|
1557
|
+
*/
|
|
1558
|
+
const runs = {
|
|
1559
|
+
about: "table.runs.about",
|
|
1560
|
+
draw: () => /* @__PURE__ */ jsx(Room, {
|
|
1561
|
+
size: "sm",
|
|
1562
|
+
children: /* @__PURE__ */ jsx(Runs, {})
|
|
1563
|
+
}),
|
|
1564
|
+
example: runs_example_exports,
|
|
1565
|
+
title: "table.runs.title"
|
|
1566
|
+
};
|
|
1567
|
+
/**
|
|
1568
|
+
* Hand-written scene for rows grouped into sections.
|
|
1569
|
+
*/
|
|
1570
|
+
const sections = {
|
|
1571
|
+
about: "table.sections.about",
|
|
1572
|
+
draw: () => /* @__PURE__ */ jsx(Room, {
|
|
1573
|
+
size: "sm",
|
|
1574
|
+
children: /* @__PURE__ */ jsx(Sections, {})
|
|
1575
|
+
}),
|
|
1576
|
+
example: sections_example_exports,
|
|
1577
|
+
title: "table.sections.title"
|
|
1578
|
+
};
|
|
1579
|
+
/**
|
|
1580
|
+
* Hand-written scene for a table with no rows.
|
|
1581
|
+
*/
|
|
1582
|
+
const empty = {
|
|
1583
|
+
about: "table.empty.about",
|
|
1584
|
+
draw: () => /* @__PURE__ */ jsx(Room, {
|
|
1585
|
+
size: "sm",
|
|
1586
|
+
children: /* @__PURE__ */ jsx(Empty, {})
|
|
1587
|
+
}),
|
|
1588
|
+
example: empty_example_exports,
|
|
1589
|
+
title: "table.empty.title"
|
|
1590
|
+
};
|
|
1591
|
+
/**
|
|
1592
|
+
* Hand-written scene for sticky header rows, scrolled down two rows.
|
|
1593
|
+
*/
|
|
1594
|
+
const stickyHeader = {
|
|
1595
|
+
about: "table.stickyHeader.about",
|
|
1596
|
+
axes: ["stickyHeader"],
|
|
1597
|
+
draw: () => /* @__PURE__ */ jsx(Held, {
|
|
1598
|
+
rows: 2,
|
|
1599
|
+
stickyHeader: true
|
|
1600
|
+
}),
|
|
1601
|
+
example: weeks_example_exports,
|
|
1602
|
+
props: { stickyHeader: true },
|
|
1603
|
+
title: "table.stickyHeader.title"
|
|
1604
|
+
};
|
|
1605
|
+
/**
|
|
1606
|
+
* Hand-written scene for a sticky first column, scrolled sideways.
|
|
1607
|
+
*/
|
|
1608
|
+
const stickyColumn = {
|
|
1609
|
+
about: "table.stickyColumn.about",
|
|
1610
|
+
axes: ["stickyColumn"],
|
|
1611
|
+
draw: () => /* @__PURE__ */ jsx(Held, {
|
|
1612
|
+
columns: 2,
|
|
1613
|
+
stickyColumn: true
|
|
1614
|
+
}),
|
|
1615
|
+
example: weeks_example_exports,
|
|
1616
|
+
props: { stickyColumn: true },
|
|
1617
|
+
title: "table.stickyColumn.title"
|
|
1618
|
+
};
|
|
1619
|
+
/**
|
|
1620
|
+
* Hand-written scene for sticky header rows and a sticky first column, scrolled both ways.
|
|
1621
|
+
*/
|
|
1622
|
+
const stickyBoth = {
|
|
1623
|
+
about: "table.stickyBoth.about",
|
|
1624
|
+
axes: ["stickyColumn", "stickyHeader"],
|
|
1625
|
+
draw: () => /* @__PURE__ */ jsx(Held, {
|
|
1626
|
+
columns: 2,
|
|
1627
|
+
rows: 2,
|
|
1628
|
+
stickyColumn: true,
|
|
1629
|
+
stickyHeader: true
|
|
1630
|
+
}),
|
|
1631
|
+
example: weeks_example_exports,
|
|
1632
|
+
props: {
|
|
1633
|
+
stickyColumn: true,
|
|
1634
|
+
stickyHeader: true
|
|
1635
|
+
},
|
|
1636
|
+
title: "table.stickyBoth.title"
|
|
1637
|
+
};
|
|
1638
|
+
var table_specimen_default = specimen({
|
|
1639
|
+
about: "table.about",
|
|
1640
|
+
id: "components/collections/table",
|
|
1641
|
+
imports: "import { Table } from \"@stealthscale/component-collections\";",
|
|
1642
|
+
scenes: [
|
|
1643
|
+
...scenesOf(recipe, {
|
|
1644
|
+
axes: {
|
|
1645
|
+
align: {
|
|
1646
|
+
draw: (props) => /* @__PURE__ */ jsx(Room, {
|
|
1647
|
+
size: "sm",
|
|
1648
|
+
children: /* @__PURE__ */ jsx(Notes, { ...props })
|
|
1649
|
+
}),
|
|
1650
|
+
example: notes_example_exports
|
|
1651
|
+
},
|
|
1652
|
+
interactive: {
|
|
1653
|
+
draw: (props) => /* @__PURE__ */ jsx(Staged, {
|
|
1654
|
+
hover: true,
|
|
1655
|
+
children: /* @__PURE__ */ jsx(Linked, { ...props })
|
|
1656
|
+
}),
|
|
1657
|
+
example: linked_example_exports
|
|
1658
|
+
},
|
|
1659
|
+
palette: {
|
|
1660
|
+
draw: (props) => /* @__PURE__ */ jsx(Staged, {
|
|
1661
|
+
hover: true,
|
|
1662
|
+
children: /* @__PURE__ */ jsx(Linked, { ...props })
|
|
1663
|
+
}),
|
|
1664
|
+
example: linked_example_exports,
|
|
1665
|
+
with: { interactive: true }
|
|
1666
|
+
},
|
|
1667
|
+
size: { across: "variant" }
|
|
1668
|
+
},
|
|
1669
|
+
draw: (props) => /* @__PURE__ */ jsx(Payouts, { ...props }),
|
|
1670
|
+
example: payouts_example_exports,
|
|
1671
|
+
namespace: "table",
|
|
1672
|
+
order: [
|
|
1673
|
+
"size",
|
|
1674
|
+
"align",
|
|
1675
|
+
"radius",
|
|
1676
|
+
"rules",
|
|
1677
|
+
"striped",
|
|
1678
|
+
"banded",
|
|
1679
|
+
"interactive",
|
|
1680
|
+
"palette"
|
|
1681
|
+
],
|
|
1682
|
+
skip: {
|
|
1683
|
+
layout: "a fixed layout needs declared widths, so a hand-written scene draws both layouts",
|
|
1684
|
+
stickyColumn: "the three held scenes at the foot of the page stage a scroll position",
|
|
1685
|
+
stickyHeader: "the three held scenes at the foot of the page stage a scroll position"
|
|
1686
|
+
}
|
|
1687
|
+
}),
|
|
1688
|
+
layouts,
|
|
1689
|
+
sorting,
|
|
1690
|
+
quarters,
|
|
1691
|
+
runs,
|
|
1692
|
+
sections,
|
|
1693
|
+
empty,
|
|
1694
|
+
stickyHeader,
|
|
1695
|
+
stickyColumn,
|
|
1696
|
+
stickyBoth
|
|
1697
|
+
],
|
|
1698
|
+
title: "table.title"
|
|
1699
|
+
});
|
|
1700
|
+
//#endregion
|
|
1701
|
+
export { table_specimen_default as default, empty, layouts, quarters, runs, sections, sorting, stickyBoth, stickyColumn, stickyHeader };
|