@stealthscale/component-screen 0.2.1 → 0.2.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.
Files changed (44) hide show
  1. package/dist/cyclonedx/bom.json +1 -1
  2. package/dist/index.d.ts +3 -3
  3. package/dist/index.js +1 -8216
  4. package/dist/pages/action-bar/action-bar.js +471 -0
  5. package/dist/pages/action-bar/action-bar.props.js +3 -0
  6. package/dist/pages/app-shell/app-shell.js +4899 -0
  7. package/dist/pages/app-shell/app-shell.props.js +3 -0
  8. package/dist/pages/floating-panel/floating-panel.js +995 -0
  9. package/dist/pages/floating-panel/floating-panel.props.js +3 -0
  10. package/dist/pages/locale-switcher/locale-switcher.js +180 -0
  11. package/dist/pages/locale-switcher/locale-switcher.props.js +3 -0
  12. package/dist/pages/page/page.js +2308 -0
  13. package/dist/pages/page/page.props.js +3 -0
  14. package/dist/pages/pages.json +123 -0
  15. package/dist/pages/section/section.js +1241 -0
  16. package/dist/pages/section/section.props.js +3 -0
  17. package/dist/pages/sidebar/sidebar.js +1743 -0
  18. package/dist/pages/sidebar/sidebar.props.js +3 -0
  19. package/dist/pages/splitter/splitter.js +1563 -0
  20. package/dist/pages/splitter/splitter.props.js +3 -0
  21. package/dist/pages/switcher/switcher.js +900 -0
  22. package/dist/pages/switcher/switcher.props.js +3 -0
  23. package/dist/pages/theme-switcher/theme-switcher.js +180 -0
  24. package/dist/pages/theme-switcher/theme-switcher.props.js +3 -0
  25. package/dist/pages/toolbar/toolbar.js +1045 -0
  26. package/dist/pages/toolbar/toolbar.props.js +3 -0
  27. package/dist/{recipe-sZAQY6Kq.js → recipes-Cmy1leBm.js} +312 -30
  28. package/dist/shared-DxlFabHA.js +9547 -0
  29. package/dist/shell.js +1 -165
  30. package/dist/theme.js +3 -4
  31. package/locales/en/specimen/action-bar.json +46 -0
  32. package/locales/en/specimen/app-shell.json +288 -0
  33. package/locales/en/specimen/floating-panel.json +70 -0
  34. package/locales/en/specimen/locale-switcher.json +15 -0
  35. package/locales/en/specimen/page.json +198 -0
  36. package/locales/en/specimen/section.json +91 -0
  37. package/locales/en/specimen/sidebar.json +87 -0
  38. package/locales/en/specimen/splitter.json +93 -0
  39. package/locales/en/specimen/switcher.json +61 -0
  40. package/locales/en/specimen/theme-switcher.json +15 -0
  41. package/locales/en/specimen/toolbar.json +80 -0
  42. package/package.json +25 -24
  43. package/dist/recipe-DRMsitrw.js +0 -283
  44. package/dist/root-qEh4u7y5.js +0 -1182
@@ -0,0 +1,1241 @@
1
+ import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
2
+ import { B as Root, G as Actions, H as Footer, K as Action, U as Description, V as Header, W as Body, X as Title$1, ct as Description$1, dt as Body$1, et as Root$1, ot as Header$1, z as Title } from "../../shared-DxlFabHA.js";
3
+ import { c } from "react/compiler-runtime";
4
+ import { Button } from "@stealthscale/component-actions";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ import { Input, Switch } from "@stealthscale/component-forms";
7
+ import { Stack } from "@stealthscale/component-layout";
8
+ import { Room, Screen, specimen, useWords } from "@stealthscale/specimen";
9
+ import { DownloadIcon, EllipsisIcon, KeyRoundIcon, PencilIcon, UserPlusIcon } from "lucide-react";
10
+ import { Text } from "@stealthscale/component-typography";
11
+ import { Table } from "@stealthscale/component-collections";
12
+ //#region src/section/examples/cards.example.tsx
13
+ var cards_example_exports = /* @__PURE__ */ __exportAll({
14
+ Cards: () => Cards,
15
+ source: () => source$3
16
+ });
17
+ const MEMBERS$1 = [
18
+ {
19
+ name: "Mara Lindqvist",
20
+ role: "owner"
21
+ },
22
+ {
23
+ name: "Jonas Berg",
24
+ role: "admin"
25
+ },
26
+ {
27
+ name: "Priya Nair",
28
+ role: "member"
29
+ }
30
+ ];
31
+ function Cards(props) {
32
+ const $ = c(88);
33
+ const { t } = useWords("section");
34
+ let t0;
35
+ if ($[0] !== t) {
36
+ t0 = t("rename.title");
37
+ $[0] = t;
38
+ $[1] = t0;
39
+ } else t0 = $[1];
40
+ let t1;
41
+ if ($[2] !== t0) {
42
+ t1 = /* @__PURE__ */ jsx(Title, {
43
+ as: "h3",
44
+ children: t0
45
+ });
46
+ $[2] = t0;
47
+ $[3] = t1;
48
+ } else t1 = $[3];
49
+ let t2;
50
+ if ($[4] !== t) {
51
+ t2 = t("rename.about");
52
+ $[4] = t;
53
+ $[5] = t2;
54
+ } else t2 = $[5];
55
+ let t3;
56
+ if ($[6] !== t2) {
57
+ t3 = /* @__PURE__ */ jsx(Description, { children: t2 });
58
+ $[6] = t2;
59
+ $[7] = t3;
60
+ } else t3 = $[7];
61
+ let t4;
62
+ if ($[8] !== t1 || $[9] !== t3) {
63
+ t4 = /* @__PURE__ */ jsxs(Header, { children: [t1, t3] });
64
+ $[8] = t1;
65
+ $[9] = t3;
66
+ $[10] = t4;
67
+ } else t4 = $[10];
68
+ let t5;
69
+ if ($[11] !== t) {
70
+ t5 = t("rename.title");
71
+ $[11] = t;
72
+ $[12] = t5;
73
+ } else t5 = $[12];
74
+ let t6;
75
+ if ($[13] !== t5) {
76
+ t6 = /* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsx(Input, {
77
+ "aria-label": t5,
78
+ defaultValue: "Ledger",
79
+ maxLength: 32,
80
+ size: "sm"
81
+ }) });
82
+ $[13] = t5;
83
+ $[14] = t6;
84
+ } else t6 = $[14];
85
+ let t7;
86
+ if ($[15] !== t) {
87
+ t7 = t("rename.limit");
88
+ $[15] = t;
89
+ $[16] = t7;
90
+ } else t7 = $[16];
91
+ let t8;
92
+ if ($[17] !== t7) {
93
+ t8 = /* @__PURE__ */ jsx(Text, {
94
+ size: "sm",
95
+ tone: "muted",
96
+ children: t7
97
+ });
98
+ $[17] = t7;
99
+ $[18] = t8;
100
+ } else t8 = $[18];
101
+ let t9;
102
+ if ($[19] !== t) {
103
+ t9 = t("rename.save");
104
+ $[19] = t;
105
+ $[20] = t9;
106
+ } else t9 = $[20];
107
+ let t10;
108
+ if ($[21] !== t9) {
109
+ t10 = /* @__PURE__ */ jsx(Button, {
110
+ size: "sm",
111
+ children: t9
112
+ });
113
+ $[21] = t9;
114
+ $[22] = t10;
115
+ } else t10 = $[22];
116
+ let t11;
117
+ if ($[23] !== t10 || $[24] !== t8) {
118
+ t11 = /* @__PURE__ */ jsxs(Footer, { children: [t8, t10] });
119
+ $[23] = t10;
120
+ $[24] = t8;
121
+ $[25] = t11;
122
+ } else t11 = $[25];
123
+ let t12;
124
+ if ($[26] !== props || $[27] !== t11 || $[28] !== t4 || $[29] !== t6) {
125
+ t12 = /* @__PURE__ */ jsxs(Root, {
126
+ variant: "surface",
127
+ ...props,
128
+ children: [
129
+ t4,
130
+ t6,
131
+ t11
132
+ ]
133
+ });
134
+ $[26] = props;
135
+ $[27] = t11;
136
+ $[28] = t4;
137
+ $[29] = t6;
138
+ $[30] = t12;
139
+ } else t12 = $[30];
140
+ let t13;
141
+ if ($[31] !== t) {
142
+ t13 = t("members.title");
143
+ $[31] = t;
144
+ $[32] = t13;
145
+ } else t13 = $[32];
146
+ let t14;
147
+ if ($[33] !== t13) {
148
+ t14 = /* @__PURE__ */ jsx(Title, {
149
+ as: "h3",
150
+ children: t13
151
+ });
152
+ $[33] = t13;
153
+ $[34] = t14;
154
+ } else t14 = $[34];
155
+ let t15;
156
+ if ($[35] !== t) {
157
+ t15 = t("members.about");
158
+ $[35] = t;
159
+ $[36] = t15;
160
+ } else t15 = $[36];
161
+ let t16;
162
+ if ($[37] !== t15) {
163
+ t16 = /* @__PURE__ */ jsx(Description, { children: t15 });
164
+ $[37] = t15;
165
+ $[38] = t16;
166
+ } else t16 = $[38];
167
+ let t17;
168
+ if ($[39] !== t) {
169
+ t17 = t("members.more");
170
+ $[39] = t;
171
+ $[40] = t17;
172
+ } else t17 = $[40];
173
+ let t18;
174
+ if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
175
+ t18 = /* @__PURE__ */ jsx(EllipsisIcon, { size: "1em" });
176
+ $[41] = t18;
177
+ } else t18 = $[41];
178
+ let t19;
179
+ if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
180
+ t19 = /* @__PURE__ */ jsx(PencilIcon, { size: "1em" });
181
+ $[42] = t19;
182
+ } else t19 = $[42];
183
+ let t20;
184
+ if ($[43] !== t) {
185
+ t20 = t("members.roles");
186
+ $[43] = t;
187
+ $[44] = t20;
188
+ } else t20 = $[44];
189
+ let t21;
190
+ if ($[45] !== t20) {
191
+ t21 = /* @__PURE__ */ jsx(Action, {
192
+ icon: t19,
193
+ children: t20
194
+ });
195
+ $[45] = t20;
196
+ $[46] = t21;
197
+ } else t21 = $[46];
198
+ let t22;
199
+ if ($[47] !== t) {
200
+ t22 = t("members.export");
201
+ $[47] = t;
202
+ $[48] = t22;
203
+ } else t22 = $[48];
204
+ let t23;
205
+ if ($[49] !== t22) {
206
+ t23 = /* @__PURE__ */ jsx(Action, { children: t22 });
207
+ $[49] = t22;
208
+ $[50] = t23;
209
+ } else t23 = $[50];
210
+ let t24;
211
+ if ($[51] === Symbol.for("react.memo_cache_sentinel")) {
212
+ t24 = /* @__PURE__ */ jsx(UserPlusIcon, { size: "1em" });
213
+ $[51] = t24;
214
+ } else t24 = $[51];
215
+ let t25;
216
+ if ($[52] !== t) {
217
+ t25 = t("members.invite");
218
+ $[52] = t;
219
+ $[53] = t25;
220
+ } else t25 = $[53];
221
+ let t26;
222
+ if ($[54] !== t25) {
223
+ t26 = /* @__PURE__ */ jsx(Action, {
224
+ icon: t24,
225
+ primary: true,
226
+ children: t25
227
+ });
228
+ $[54] = t25;
229
+ $[55] = t26;
230
+ } else t26 = $[55];
231
+ let t27;
232
+ if ($[56] !== t17 || $[57] !== t21 || $[58] !== t23 || $[59] !== t26) {
233
+ t27 = /* @__PURE__ */ jsxs(Actions, {
234
+ more: t17,
235
+ moreIcon: t18,
236
+ children: [
237
+ t21,
238
+ t23,
239
+ t26
240
+ ]
241
+ });
242
+ $[56] = t17;
243
+ $[57] = t21;
244
+ $[58] = t23;
245
+ $[59] = t26;
246
+ $[60] = t27;
247
+ } else t27 = $[60];
248
+ let t28;
249
+ if ($[61] !== t14 || $[62] !== t16 || $[63] !== t27) {
250
+ t28 = /* @__PURE__ */ jsxs(Header, { children: [
251
+ t14,
252
+ t16,
253
+ t27
254
+ ] });
255
+ $[61] = t14;
256
+ $[62] = t16;
257
+ $[63] = t27;
258
+ $[64] = t28;
259
+ } else t28 = $[64];
260
+ let t29;
261
+ if ($[65] !== t) {
262
+ t29 = MEMBERS$1.map((t30) => {
263
+ const { name, role } = t30;
264
+ return /* @__PURE__ */ jsxs(Table.Row, { children: [/* @__PURE__ */ jsx(Table.RowHeader, { children: name }), /* @__PURE__ */ jsx(Table.Cell, {
265
+ "data-numeric": true,
266
+ children: /* @__PURE__ */ jsx(Text, {
267
+ as: "span",
268
+ tone: "muted",
269
+ children: t(`roles.${role}`)
270
+ })
271
+ })] }, name);
272
+ });
273
+ $[65] = t;
274
+ $[66] = t29;
275
+ } else t29 = $[66];
276
+ let t30;
277
+ if ($[67] !== t29) {
278
+ t30 = /* @__PURE__ */ jsx(Body, {
279
+ bleed: true,
280
+ children: /* @__PURE__ */ jsx(Table.Scroller, { children: /* @__PURE__ */ jsx(Table.Root, { children: /* @__PURE__ */ jsx(Table.Body, { children: t29 }) }) })
281
+ });
282
+ $[67] = t29;
283
+ $[68] = t30;
284
+ } else t30 = $[68];
285
+ let t31;
286
+ if ($[69] !== t) {
287
+ t31 = t("members.seats");
288
+ $[69] = t;
289
+ $[70] = t31;
290
+ } else t31 = $[70];
291
+ let t32;
292
+ if ($[71] !== t31) {
293
+ t32 = /* @__PURE__ */ jsx(Text, {
294
+ size: "sm",
295
+ tone: "muted",
296
+ children: t31
297
+ });
298
+ $[71] = t31;
299
+ $[72] = t32;
300
+ } else t32 = $[72];
301
+ let t33;
302
+ if ($[73] !== t) {
303
+ t33 = t("members.manage");
304
+ $[73] = t;
305
+ $[74] = t33;
306
+ } else t33 = $[74];
307
+ let t34;
308
+ if ($[75] !== t33) {
309
+ t34 = /* @__PURE__ */ jsx(Button, {
310
+ size: "sm",
311
+ variant: "ghost",
312
+ children: t33
313
+ });
314
+ $[75] = t33;
315
+ $[76] = t34;
316
+ } else t34 = $[76];
317
+ let t35;
318
+ if ($[77] !== t32 || $[78] !== t34) {
319
+ t35 = /* @__PURE__ */ jsxs(Footer, { children: [t32, t34] });
320
+ $[77] = t32;
321
+ $[78] = t34;
322
+ $[79] = t35;
323
+ } else t35 = $[79];
324
+ let t36;
325
+ if ($[80] !== props || $[81] !== t28 || $[82] !== t30 || $[83] !== t35) {
326
+ t36 = /* @__PURE__ */ jsxs(Root, {
327
+ variant: "surface",
328
+ ...props,
329
+ children: [
330
+ t28,
331
+ t30,
332
+ t35
333
+ ]
334
+ });
335
+ $[80] = props;
336
+ $[81] = t28;
337
+ $[82] = t30;
338
+ $[83] = t35;
339
+ $[84] = t36;
340
+ } else t36 = $[84];
341
+ let t37;
342
+ if ($[85] !== t12 || $[86] !== t36) {
343
+ t37 = /* @__PURE__ */ jsxs(Fragment, { children: [t12, t36] });
344
+ $[85] = t12;
345
+ $[86] = t36;
346
+ $[87] = t37;
347
+ } else t37 = $[87];
348
+ return t37;
349
+ }
350
+ const source$3 = "import { type ReactElement } from \"react\";\n\nimport { EllipsisIcon, PencilIcon, UserPlusIcon } from \"lucide-react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Table } from \"@stealthscale/component-collections\";\nimport { Input } from \"@stealthscale/component-forms\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Section } from \"@stealthscale/component-screen\";\n\nconst MEMBERS = [\n { name: \"Mara Lindqvist\", role: \"owner\" },\n { name: \"Jonas Berg\", role: \"admin\" },\n { name: \"Priya Nair\", role: \"member\" },\n] as const;\n\nexport function Cards(props: Section.RootProps): ReactElement {\n const { t } = useWords(\"section\");\n\n return (\n <>\n <Section.Root variant=\"surface\" {...props}>\n <Section.Header>\n <Section.Title as=\"h3\">{t(\"rename.title\")}</Section.Title>\n <Section.Description>{t(\"rename.about\")}</Section.Description>\n </Section.Header>\n <Section.Body>\n <Input aria-label={t(\"rename.title\")} defaultValue=\"Ledger\" maxLength={32} size=\"sm\" />\n </Section.Body>\n <Section.Footer>\n <Text size=\"sm\" tone=\"muted\">\n {t(\"rename.limit\")}\n </Text>\n <Button size=\"sm\">{t(\"rename.save\")}</Button>\n </Section.Footer>\n </Section.Root>\n <Section.Root variant=\"surface\" {...props}>\n <Section.Header>\n <Section.Title as=\"h3\">{t(\"members.title\")}</Section.Title>\n <Section.Description>{t(\"members.about\")}</Section.Description>\n <Section.Actions more={t(\"members.more\")} moreIcon={<EllipsisIcon size=\"1em\" />}>\n <Section.Action icon={<PencilIcon size=\"1em\" />}>{t(\"members.roles\")}</Section.Action>\n <Section.Action>{t(\"members.export\")}</Section.Action>\n <Section.Action icon={<UserPlusIcon size=\"1em\" />} primary>\n {t(\"members.invite\")}\n </Section.Action>\n </Section.Actions>\n </Section.Header>\n <Section.Body bleed>\n <Table.Scroller>\n <Table.Root>\n <Table.Body>\n {MEMBERS.map(({ name, role }) => (\n <Table.Row key={name}>\n <Table.RowHeader>{name}</Table.RowHeader>\n <Table.Cell data-numeric>\n <Text as=\"span\" tone=\"muted\">\n {t(`roles.${role}`)}\n </Text>\n </Table.Cell>\n </Table.Row>\n ))}\n </Table.Body>\n </Table.Root>\n </Table.Scroller>\n </Section.Body>\n <Section.Footer>\n <Text size=\"sm\" tone=\"muted\">\n {t(\"members.seats\")}\n </Text>\n <Button size=\"sm\" variant=\"ghost\">\n {t(\"members.manage\")}\n </Button>\n </Section.Footer>\n </Section.Root>\n </>\n );\n}\n";
351
+ //#endregion
352
+ //#region src/section/examples/members.example.tsx
353
+ var members_example_exports = /* @__PURE__ */ __exportAll({
354
+ Members: () => Members,
355
+ source: () => source$2
356
+ });
357
+ const MEMBERS = [
358
+ {
359
+ name: "Mara Lindqvist",
360
+ role: "owner"
361
+ },
362
+ {
363
+ name: "Jonas Berg",
364
+ role: "admin"
365
+ },
366
+ {
367
+ name: "Priya Nair",
368
+ role: "member"
369
+ }
370
+ ];
371
+ function Members(props) {
372
+ const $ = c(54);
373
+ const { t } = useWords("section");
374
+ let t0;
375
+ if ($[0] !== t) {
376
+ t0 = t("members.title");
377
+ $[0] = t;
378
+ $[1] = t0;
379
+ } else t0 = $[1];
380
+ let t1;
381
+ if ($[2] !== t0) {
382
+ t1 = /* @__PURE__ */ jsx(Title, {
383
+ as: "h3",
384
+ children: t0
385
+ });
386
+ $[2] = t0;
387
+ $[3] = t1;
388
+ } else t1 = $[3];
389
+ let t2;
390
+ if ($[4] !== t) {
391
+ t2 = t("members.about");
392
+ $[4] = t;
393
+ $[5] = t2;
394
+ } else t2 = $[5];
395
+ let t3;
396
+ if ($[6] !== t2) {
397
+ t3 = /* @__PURE__ */ jsx(Description, { children: t2 });
398
+ $[6] = t2;
399
+ $[7] = t3;
400
+ } else t3 = $[7];
401
+ let t4;
402
+ if ($[8] !== t) {
403
+ t4 = t("members.more");
404
+ $[8] = t;
405
+ $[9] = t4;
406
+ } else t4 = $[9];
407
+ let t5;
408
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
409
+ t5 = /* @__PURE__ */ jsx(EllipsisIcon, { size: "1em" });
410
+ $[10] = t5;
411
+ } else t5 = $[10];
412
+ let t6;
413
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
414
+ t6 = /* @__PURE__ */ jsx(PencilIcon, { size: "1em" });
415
+ $[11] = t6;
416
+ } else t6 = $[11];
417
+ let t7;
418
+ if ($[12] !== t) {
419
+ t7 = t("members.roles");
420
+ $[12] = t;
421
+ $[13] = t7;
422
+ } else t7 = $[13];
423
+ let t8;
424
+ if ($[14] !== t7) {
425
+ t8 = /* @__PURE__ */ jsx(Action, {
426
+ icon: t6,
427
+ children: t7
428
+ });
429
+ $[14] = t7;
430
+ $[15] = t8;
431
+ } else t8 = $[15];
432
+ let t9;
433
+ if ($[16] !== t) {
434
+ t9 = t("members.export");
435
+ $[16] = t;
436
+ $[17] = t9;
437
+ } else t9 = $[17];
438
+ let t10;
439
+ if ($[18] !== t9) {
440
+ t10 = /* @__PURE__ */ jsx(Action, { children: t9 });
441
+ $[18] = t9;
442
+ $[19] = t10;
443
+ } else t10 = $[19];
444
+ let t11;
445
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
446
+ t11 = /* @__PURE__ */ jsx(UserPlusIcon, { size: "1em" });
447
+ $[20] = t11;
448
+ } else t11 = $[20];
449
+ let t12;
450
+ if ($[21] !== t) {
451
+ t12 = t("members.invite");
452
+ $[21] = t;
453
+ $[22] = t12;
454
+ } else t12 = $[22];
455
+ let t13;
456
+ if ($[23] !== t12) {
457
+ t13 = /* @__PURE__ */ jsx(Action, {
458
+ icon: t11,
459
+ primary: true,
460
+ children: t12
461
+ });
462
+ $[23] = t12;
463
+ $[24] = t13;
464
+ } else t13 = $[24];
465
+ let t14;
466
+ if ($[25] !== t10 || $[26] !== t13 || $[27] !== t4 || $[28] !== t8) {
467
+ t14 = /* @__PURE__ */ jsxs(Actions, {
468
+ more: t4,
469
+ moreIcon: t5,
470
+ children: [
471
+ t8,
472
+ t10,
473
+ t13
474
+ ]
475
+ });
476
+ $[25] = t10;
477
+ $[26] = t13;
478
+ $[27] = t4;
479
+ $[28] = t8;
480
+ $[29] = t14;
481
+ } else t14 = $[29];
482
+ let t15;
483
+ if ($[30] !== t1 || $[31] !== t14 || $[32] !== t3) {
484
+ t15 = /* @__PURE__ */ jsxs(Header, { children: [
485
+ t1,
486
+ t3,
487
+ t14
488
+ ] });
489
+ $[30] = t1;
490
+ $[31] = t14;
491
+ $[32] = t3;
492
+ $[33] = t15;
493
+ } else t15 = $[33];
494
+ let t16;
495
+ if ($[34] !== t) {
496
+ t16 = MEMBERS.map((t17) => {
497
+ const { name, role } = t17;
498
+ return /* @__PURE__ */ jsxs(Table.Row, { children: [/* @__PURE__ */ jsx(Table.RowHeader, { children: name }), /* @__PURE__ */ jsx(Table.Cell, {
499
+ "data-numeric": true,
500
+ children: /* @__PURE__ */ jsx(Text, {
501
+ as: "span",
502
+ tone: "muted",
503
+ children: t(`roles.${role}`)
504
+ })
505
+ })] }, name);
506
+ });
507
+ $[34] = t;
508
+ $[35] = t16;
509
+ } else t16 = $[35];
510
+ let t17;
511
+ if ($[36] !== t16) {
512
+ t17 = /* @__PURE__ */ jsx(Body, {
513
+ bleed: true,
514
+ children: /* @__PURE__ */ jsx(Table.Scroller, { children: /* @__PURE__ */ jsx(Table.Root, { children: /* @__PURE__ */ jsx(Table.Body, { children: t16 }) }) })
515
+ });
516
+ $[36] = t16;
517
+ $[37] = t17;
518
+ } else t17 = $[37];
519
+ let t18;
520
+ if ($[38] !== t) {
521
+ t18 = t("members.seats");
522
+ $[38] = t;
523
+ $[39] = t18;
524
+ } else t18 = $[39];
525
+ let t19;
526
+ if ($[40] !== t18) {
527
+ t19 = /* @__PURE__ */ jsx(Text, {
528
+ size: "sm",
529
+ tone: "muted",
530
+ children: t18
531
+ });
532
+ $[40] = t18;
533
+ $[41] = t19;
534
+ } else t19 = $[41];
535
+ let t20;
536
+ if ($[42] !== t) {
537
+ t20 = t("members.manage");
538
+ $[42] = t;
539
+ $[43] = t20;
540
+ } else t20 = $[43];
541
+ let t21;
542
+ if ($[44] !== t20) {
543
+ t21 = /* @__PURE__ */ jsx(Button, {
544
+ size: "sm",
545
+ variant: "ghost",
546
+ children: t20
547
+ });
548
+ $[44] = t20;
549
+ $[45] = t21;
550
+ } else t21 = $[45];
551
+ let t22;
552
+ if ($[46] !== t19 || $[47] !== t21) {
553
+ t22 = /* @__PURE__ */ jsxs(Footer, { children: [t19, t21] });
554
+ $[46] = t19;
555
+ $[47] = t21;
556
+ $[48] = t22;
557
+ } else t22 = $[48];
558
+ let t23;
559
+ if ($[49] !== props || $[50] !== t15 || $[51] !== t17 || $[52] !== t22) {
560
+ t23 = /* @__PURE__ */ jsxs(Root, {
561
+ variant: "surface",
562
+ ...props,
563
+ children: [
564
+ t15,
565
+ t17,
566
+ t22
567
+ ]
568
+ });
569
+ $[49] = props;
570
+ $[50] = t15;
571
+ $[51] = t17;
572
+ $[52] = t22;
573
+ $[53] = t23;
574
+ } else t23 = $[53];
575
+ return t23;
576
+ }
577
+ const source$2 = "import { type ReactElement } from \"react\";\n\nimport { EllipsisIcon, PencilIcon, UserPlusIcon } from \"lucide-react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Table } from \"@stealthscale/component-collections\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Section } from \"@stealthscale/component-screen\";\n\nconst MEMBERS = [\n { name: \"Mara Lindqvist\", role: \"owner\" },\n { name: \"Jonas Berg\", role: \"admin\" },\n { name: \"Priya Nair\", role: \"member\" },\n] as const;\n\nexport function Members(props: Section.RootProps): ReactElement {\n const { t } = useWords(\"section\");\n\n return (\n <Section.Root variant=\"surface\" {...props}>\n <Section.Header>\n <Section.Title as=\"h3\">{t(\"members.title\")}</Section.Title>\n <Section.Description>{t(\"members.about\")}</Section.Description>\n <Section.Actions more={t(\"members.more\")} moreIcon={<EllipsisIcon size=\"1em\" />}>\n <Section.Action icon={<PencilIcon size=\"1em\" />}>{t(\"members.roles\")}</Section.Action>\n <Section.Action>{t(\"members.export\")}</Section.Action>\n <Section.Action icon={<UserPlusIcon size=\"1em\" />} primary>\n {t(\"members.invite\")}\n </Section.Action>\n </Section.Actions>\n </Section.Header>\n <Section.Body bleed>\n <Table.Scroller>\n <Table.Root>\n <Table.Body>\n {MEMBERS.map(({ name, role }) => (\n <Table.Row key={name}>\n <Table.RowHeader>{name}</Table.RowHeader>\n <Table.Cell data-numeric>\n <Text as=\"span\" tone=\"muted\">\n {t(`roles.${role}`)}\n </Text>\n </Table.Cell>\n </Table.Row>\n ))}\n </Table.Body>\n </Table.Root>\n </Table.Scroller>\n </Section.Body>\n <Section.Footer>\n <Text size=\"sm\" tone=\"muted\">\n {t(\"members.seats\")}\n </Text>\n <Button size=\"sm\" variant=\"ghost\">\n {t(\"members.manage\")}\n </Button>\n </Section.Footer>\n </Section.Root>\n );\n}\n";
578
+ //#endregion
579
+ //#region src/section/examples/settings.example.tsx
580
+ var settings_example_exports = /* @__PURE__ */ __exportAll({
581
+ Settings: () => Settings,
582
+ source: () => source$1
583
+ });
584
+ const FACTS$1 = [
585
+ "name",
586
+ "region",
587
+ "plan"
588
+ ];
589
+ const CHANNELS = [
590
+ "deploys",
591
+ "failures",
592
+ "digest"
593
+ ];
594
+ function Settings() {
595
+ const $ = c(110);
596
+ const { t } = useWords("section");
597
+ let t0;
598
+ if ($[0] !== t) {
599
+ t0 = t("workspace.title");
600
+ $[0] = t;
601
+ $[1] = t0;
602
+ } else t0 = $[1];
603
+ let t1;
604
+ if ($[2] !== t0) {
605
+ t1 = /* @__PURE__ */ jsx(Title$1, {
606
+ as: "h3",
607
+ children: t0
608
+ });
609
+ $[2] = t0;
610
+ $[3] = t1;
611
+ } else t1 = $[3];
612
+ let t2;
613
+ if ($[4] !== t) {
614
+ t2 = t("workspace.about");
615
+ $[4] = t;
616
+ $[5] = t2;
617
+ } else t2 = $[5];
618
+ let t3;
619
+ if ($[6] !== t2) {
620
+ t3 = /* @__PURE__ */ jsx(Description$1, { children: t2 });
621
+ $[6] = t2;
622
+ $[7] = t3;
623
+ } else t3 = $[7];
624
+ let t4;
625
+ if ($[8] !== t1 || $[9] !== t3) {
626
+ t4 = /* @__PURE__ */ jsxs(Header$1, { children: [t1, t3] });
627
+ $[8] = t1;
628
+ $[9] = t3;
629
+ $[10] = t4;
630
+ } else t4 = $[10];
631
+ let t5;
632
+ if ($[11] !== t) {
633
+ t5 = t("profile.title");
634
+ $[11] = t;
635
+ $[12] = t5;
636
+ } else t5 = $[12];
637
+ let t6;
638
+ if ($[13] !== t5) {
639
+ t6 = /* @__PURE__ */ jsx(Title, {
640
+ as: "h4",
641
+ children: t5
642
+ });
643
+ $[13] = t5;
644
+ $[14] = t6;
645
+ } else t6 = $[14];
646
+ let t7;
647
+ if ($[15] !== t) {
648
+ t7 = t("profile.about");
649
+ $[15] = t;
650
+ $[16] = t7;
651
+ } else t7 = $[16];
652
+ let t8;
653
+ if ($[17] !== t7) {
654
+ t8 = /* @__PURE__ */ jsx(Description, { children: t7 });
655
+ $[17] = t7;
656
+ $[18] = t8;
657
+ } else t8 = $[18];
658
+ let t9;
659
+ if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
660
+ t9 = /* @__PURE__ */ jsx(PencilIcon, { size: "1em" });
661
+ $[19] = t9;
662
+ } else t9 = $[19];
663
+ let t10;
664
+ if ($[20] !== t) {
665
+ t10 = t("edit");
666
+ $[20] = t;
667
+ $[21] = t10;
668
+ } else t10 = $[21];
669
+ let t11;
670
+ if ($[22] !== t10) {
671
+ t11 = /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Action, {
672
+ icon: t9,
673
+ children: t10
674
+ }) });
675
+ $[22] = t10;
676
+ $[23] = t11;
677
+ } else t11 = $[23];
678
+ let t12;
679
+ if ($[24] !== t11 || $[25] !== t6 || $[26] !== t8) {
680
+ t12 = /* @__PURE__ */ jsxs(Header, { children: [
681
+ t6,
682
+ t8,
683
+ t11
684
+ ] });
685
+ $[24] = t11;
686
+ $[25] = t6;
687
+ $[26] = t8;
688
+ $[27] = t12;
689
+ } else t12 = $[27];
690
+ let t13;
691
+ if ($[28] !== t) {
692
+ t13 = FACTS$1.map((fact) => /* @__PURE__ */ jsxs(Stack, {
693
+ gap: "xs",
694
+ children: [/* @__PURE__ */ jsx(Text, {
695
+ size: "sm",
696
+ tone: "muted",
697
+ children: t(`facts.${fact}.label`)
698
+ }), /* @__PURE__ */ jsx(Text, {
699
+ size: "sm",
700
+ children: t(`facts.${fact}.value`)
701
+ })]
702
+ }, fact));
703
+ $[28] = t;
704
+ $[29] = t13;
705
+ } else t13 = $[29];
706
+ let t14;
707
+ if ($[30] !== t13) {
708
+ t14 = /* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsx(Stack, {
709
+ direction: "row",
710
+ gap: "2xl",
711
+ wrap: true,
712
+ children: t13
713
+ }) });
714
+ $[30] = t13;
715
+ $[31] = t14;
716
+ } else t14 = $[31];
717
+ let t15;
718
+ if ($[32] !== t12 || $[33] !== t14) {
719
+ t15 = /* @__PURE__ */ jsxs(Root, { children: [t12, t14] });
720
+ $[32] = t12;
721
+ $[33] = t14;
722
+ $[34] = t15;
723
+ } else t15 = $[34];
724
+ let t16;
725
+ if ($[35] !== t) {
726
+ t16 = t("notifications.title");
727
+ $[35] = t;
728
+ $[36] = t16;
729
+ } else t16 = $[36];
730
+ let t17;
731
+ if ($[37] !== t16) {
732
+ t17 = /* @__PURE__ */ jsx(Title, {
733
+ as: "h4",
734
+ children: t16
735
+ });
736
+ $[37] = t16;
737
+ $[38] = t17;
738
+ } else t17 = $[38];
739
+ let t18;
740
+ if ($[39] !== t) {
741
+ t18 = t("notifications.about");
742
+ $[39] = t;
743
+ $[40] = t18;
744
+ } else t18 = $[40];
745
+ let t19;
746
+ if ($[41] !== t18) {
747
+ t19 = /* @__PURE__ */ jsx(Description, { children: t18 });
748
+ $[41] = t18;
749
+ $[42] = t19;
750
+ } else t19 = $[42];
751
+ let t20;
752
+ if ($[43] !== t17 || $[44] !== t19) {
753
+ t20 = /* @__PURE__ */ jsxs(Header, { children: [t17, t19] });
754
+ $[43] = t17;
755
+ $[44] = t19;
756
+ $[45] = t20;
757
+ } else t20 = $[45];
758
+ let t21;
759
+ if ($[46] !== t) {
760
+ t21 = CHANNELS.map((channel) => /* @__PURE__ */ jsxs(Switch.Root, {
761
+ defaultChecked: channel !== "digest",
762
+ size: "sm",
763
+ children: [/* @__PURE__ */ jsx(Switch.Control, { children: /* @__PURE__ */ jsx(Switch.Thumb, {}) }), /* @__PURE__ */ jsx(Switch.Label, { children: /* @__PURE__ */ jsxs(Stack, {
764
+ as: "span",
765
+ gap: "xs",
766
+ children: [/* @__PURE__ */ jsx(Text, {
767
+ as: "span",
768
+ size: "sm",
769
+ children: t(`channels.${channel}.name`)
770
+ }), /* @__PURE__ */ jsx(Text, {
771
+ as: "span",
772
+ size: "sm",
773
+ tone: "muted",
774
+ children: t(`channels.${channel}.about`)
775
+ })]
776
+ }) })]
777
+ }, channel));
778
+ $[46] = t;
779
+ $[47] = t21;
780
+ } else t21 = $[47];
781
+ let t22;
782
+ if ($[48] !== t21) {
783
+ t22 = /* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsx(Stack, {
784
+ gap: "md",
785
+ children: t21
786
+ }) });
787
+ $[48] = t21;
788
+ $[49] = t22;
789
+ } else t22 = $[49];
790
+ let t23;
791
+ if ($[50] !== t20 || $[51] !== t22) {
792
+ t23 = /* @__PURE__ */ jsxs(Root, { children: [t20, t22] });
793
+ $[50] = t20;
794
+ $[51] = t22;
795
+ $[52] = t23;
796
+ } else t23 = $[52];
797
+ let t24;
798
+ if ($[53] !== t) {
799
+ t24 = t("keys.title");
800
+ $[53] = t;
801
+ $[54] = t24;
802
+ } else t24 = $[54];
803
+ let t25;
804
+ if ($[55] !== t24) {
805
+ t25 = /* @__PURE__ */ jsx(Title, {
806
+ as: "h4",
807
+ children: t24
808
+ });
809
+ $[55] = t24;
810
+ $[56] = t25;
811
+ } else t25 = $[56];
812
+ let t26;
813
+ if ($[57] !== t) {
814
+ t26 = t("keys.about");
815
+ $[57] = t;
816
+ $[58] = t26;
817
+ } else t26 = $[58];
818
+ let t27;
819
+ if ($[59] !== t26) {
820
+ t27 = /* @__PURE__ */ jsx(Description, { children: t26 });
821
+ $[59] = t26;
822
+ $[60] = t27;
823
+ } else t27 = $[60];
824
+ let t28;
825
+ if ($[61] === Symbol.for("react.memo_cache_sentinel")) {
826
+ t28 = /* @__PURE__ */ jsx(KeyRoundIcon, { size: "1em" });
827
+ $[61] = t28;
828
+ } else t28 = $[61];
829
+ let t29;
830
+ if ($[62] !== t) {
831
+ t29 = t("keys.add");
832
+ $[62] = t;
833
+ $[63] = t29;
834
+ } else t29 = $[63];
835
+ let t30;
836
+ if ($[64] !== t29) {
837
+ t30 = /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Action, {
838
+ icon: t28,
839
+ children: t29
840
+ }) });
841
+ $[64] = t29;
842
+ $[65] = t30;
843
+ } else t30 = $[65];
844
+ let t31;
845
+ if ($[66] !== t25 || $[67] !== t27 || $[68] !== t30) {
846
+ t31 = /* @__PURE__ */ jsxs(Header, { children: [
847
+ t25,
848
+ t27,
849
+ t30
850
+ ] });
851
+ $[66] = t25;
852
+ $[67] = t27;
853
+ $[68] = t30;
854
+ $[69] = t31;
855
+ } else t31 = $[69];
856
+ let t32;
857
+ if ($[70] !== t) {
858
+ t32 = t("keys.none");
859
+ $[70] = t;
860
+ $[71] = t32;
861
+ } else t32 = $[71];
862
+ let t33;
863
+ if ($[72] !== t32) {
864
+ t33 = /* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsx(Text, {
865
+ size: "sm",
866
+ tone: "muted",
867
+ children: t32
868
+ }) });
869
+ $[72] = t32;
870
+ $[73] = t33;
871
+ } else t33 = $[73];
872
+ let t34;
873
+ if ($[74] !== t31 || $[75] !== t33) {
874
+ t34 = /* @__PURE__ */ jsxs(Root, { children: [t31, t33] });
875
+ $[74] = t31;
876
+ $[75] = t33;
877
+ $[76] = t34;
878
+ } else t34 = $[76];
879
+ let t35;
880
+ if ($[77] !== t) {
881
+ t35 = t("danger.title");
882
+ $[77] = t;
883
+ $[78] = t35;
884
+ } else t35 = $[78];
885
+ let t36;
886
+ if ($[79] !== t35) {
887
+ t36 = /* @__PURE__ */ jsx(Title, {
888
+ as: "h4",
889
+ children: t35
890
+ });
891
+ $[79] = t35;
892
+ $[80] = t36;
893
+ } else t36 = $[80];
894
+ let t37;
895
+ if ($[81] !== t) {
896
+ t37 = t("danger.about");
897
+ $[81] = t;
898
+ $[82] = t37;
899
+ } else t37 = $[82];
900
+ let t38;
901
+ if ($[83] !== t37) {
902
+ t38 = /* @__PURE__ */ jsx(Description, { children: t37 });
903
+ $[83] = t37;
904
+ $[84] = t38;
905
+ } else t38 = $[84];
906
+ let t39;
907
+ if ($[85] !== t36 || $[86] !== t38) {
908
+ t39 = /* @__PURE__ */ jsxs(Header, { children: [t36, t38] });
909
+ $[85] = t36;
910
+ $[86] = t38;
911
+ $[87] = t39;
912
+ } else t39 = $[87];
913
+ let t40;
914
+ if ($[88] !== t) {
915
+ t40 = t("danger.owner");
916
+ $[88] = t;
917
+ $[89] = t40;
918
+ } else t40 = $[89];
919
+ let t41;
920
+ if ($[90] !== t40) {
921
+ t41 = /* @__PURE__ */ jsx(Text, {
922
+ size: "sm",
923
+ tone: "muted",
924
+ children: t40
925
+ });
926
+ $[90] = t40;
927
+ $[91] = t41;
928
+ } else t41 = $[91];
929
+ let t42;
930
+ if ($[92] !== t) {
931
+ t42 = t("danger.delete");
932
+ $[92] = t;
933
+ $[93] = t42;
934
+ } else t42 = $[93];
935
+ let t43;
936
+ if ($[94] !== t42) {
937
+ t43 = /* @__PURE__ */ jsx(Button, {
938
+ palette: "error",
939
+ size: "sm",
940
+ variant: "outline",
941
+ children: t42
942
+ });
943
+ $[94] = t42;
944
+ $[95] = t43;
945
+ } else t43 = $[95];
946
+ let t44;
947
+ if ($[96] !== t41 || $[97] !== t43) {
948
+ t44 = /* @__PURE__ */ jsxs(Footer, { children: [t41, t43] });
949
+ $[96] = t41;
950
+ $[97] = t43;
951
+ $[98] = t44;
952
+ } else t44 = $[98];
953
+ let t45;
954
+ if ($[99] !== t39 || $[100] !== t44) {
955
+ t45 = /* @__PURE__ */ jsxs(Root, {
956
+ variant: "surface",
957
+ children: [t39, t44]
958
+ });
959
+ $[99] = t39;
960
+ $[100] = t44;
961
+ $[101] = t45;
962
+ } else t45 = $[101];
963
+ let t46;
964
+ if ($[102] !== t15 || $[103] !== t23 || $[104] !== t34 || $[105] !== t45) {
965
+ t46 = /* @__PURE__ */ jsxs(Body$1, { children: [
966
+ t15,
967
+ t23,
968
+ t34,
969
+ t45
970
+ ] });
971
+ $[102] = t15;
972
+ $[103] = t23;
973
+ $[104] = t34;
974
+ $[105] = t45;
975
+ $[106] = t46;
976
+ } else t46 = $[106];
977
+ let t47;
978
+ if ($[107] !== t4 || $[108] !== t46) {
979
+ t47 = /* @__PURE__ */ jsxs(Root$1, { children: [t4, t46] });
980
+ $[107] = t4;
981
+ $[108] = t46;
982
+ $[109] = t47;
983
+ } else t47 = $[109];
984
+ return t47;
985
+ }
986
+ const source$1 = "import { type ReactElement } from \"react\";\n\nimport { KeyRoundIcon, PencilIcon } from \"lucide-react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Switch } from \"@stealthscale/component-forms\";\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Page, Section } from \"@stealthscale/component-screen\";\n\nconst FACTS = [\"name\", \"region\", \"plan\"] as const;\n\nconst CHANNELS = [\"deploys\", \"failures\", \"digest\"] as const;\n\nexport function Settings(): ReactElement {\n const { t } = useWords(\"section\");\n\n return (\n <Page.Root>\n <Page.Header>\n <Page.Title as=\"h3\">{t(\"workspace.title\")}</Page.Title>\n <Page.Description>{t(\"workspace.about\")}</Page.Description>\n </Page.Header>\n <Page.Body>\n <Section.Root>\n <Section.Header>\n <Section.Title as=\"h4\">{t(\"profile.title\")}</Section.Title>\n <Section.Description>{t(\"profile.about\")}</Section.Description>\n <Section.Actions>\n <Section.Action icon={<PencilIcon size=\"1em\" />}>{t(\"edit\")}</Section.Action>\n </Section.Actions>\n </Section.Header>\n <Section.Body>\n <Stack direction=\"row\" gap=\"2xl\" wrap>\n {FACTS.map((fact) => (\n <Stack gap=\"xs\" key={fact}>\n <Text size=\"sm\" tone=\"muted\">\n {t(`facts.${fact}.label`)}\n </Text>\n <Text size=\"sm\">{t(`facts.${fact}.value`)}</Text>\n </Stack>\n ))}\n </Stack>\n </Section.Body>\n </Section.Root>\n <Section.Root>\n <Section.Header>\n <Section.Title as=\"h4\">{t(\"notifications.title\")}</Section.Title>\n <Section.Description>{t(\"notifications.about\")}</Section.Description>\n </Section.Header>\n <Section.Body>\n <Stack gap=\"md\">\n {CHANNELS.map((channel) => (\n <Switch.Root defaultChecked={channel !== \"digest\"} key={channel} size=\"sm\">\n <Switch.Control>\n <Switch.Thumb />\n </Switch.Control>\n <Switch.Label>\n <Stack as=\"span\" gap=\"xs\">\n <Text as=\"span\" size=\"sm\">\n {t(`channels.${channel}.name`)}\n </Text>\n <Text as=\"span\" size=\"sm\" tone=\"muted\">\n {t(`channels.${channel}.about`)}\n </Text>\n </Stack>\n </Switch.Label>\n </Switch.Root>\n ))}\n </Stack>\n </Section.Body>\n </Section.Root>\n <Section.Root>\n <Section.Header>\n <Section.Title as=\"h4\">{t(\"keys.title\")}</Section.Title>\n <Section.Description>{t(\"keys.about\")}</Section.Description>\n <Section.Actions>\n <Section.Action icon={<KeyRoundIcon size=\"1em\" />}>{t(\"keys.add\")}</Section.Action>\n </Section.Actions>\n </Section.Header>\n <Section.Body>\n <Text size=\"sm\" tone=\"muted\">\n {t(\"keys.none\")}\n </Text>\n </Section.Body>\n </Section.Root>\n <Section.Root variant=\"surface\">\n <Section.Header>\n <Section.Title as=\"h4\">{t(\"danger.title\")}</Section.Title>\n <Section.Description>{t(\"danger.about\")}</Section.Description>\n </Section.Header>\n <Section.Footer>\n <Text size=\"sm\" tone=\"muted\">\n {t(\"danger.owner\")}\n </Text>\n <Button palette=\"error\" size=\"sm\" variant=\"outline\">\n {t(\"danger.delete\")}\n </Button>\n </Section.Footer>\n </Section.Root>\n </Page.Body>\n </Page.Root>\n );\n}\n";
987
+ //#endregion
988
+ //#region src/section/examples/sizes.example.tsx
989
+ var sizes_example_exports = /* @__PURE__ */ __exportAll({
990
+ Sizes: () => Sizes,
991
+ source: () => source
992
+ });
993
+ const FACTS = [
994
+ "plan",
995
+ "seats",
996
+ "next"
997
+ ];
998
+ function Sizes(props) {
999
+ const $ = c(34);
1000
+ const { t } = useWords("section");
1001
+ let t0;
1002
+ if ($[0] !== t) {
1003
+ t0 = t("billing.title");
1004
+ $[0] = t;
1005
+ $[1] = t0;
1006
+ } else t0 = $[1];
1007
+ let t1;
1008
+ if ($[2] !== t0) {
1009
+ t1 = /* @__PURE__ */ jsx(Title, {
1010
+ as: "h3",
1011
+ children: t0
1012
+ });
1013
+ $[2] = t0;
1014
+ $[3] = t1;
1015
+ } else t1 = $[3];
1016
+ let t2;
1017
+ if ($[4] !== t) {
1018
+ t2 = t("billing.about");
1019
+ $[4] = t;
1020
+ $[5] = t2;
1021
+ } else t2 = $[5];
1022
+ let t3;
1023
+ if ($[6] !== t2) {
1024
+ t3 = /* @__PURE__ */ jsx(Description, { children: t2 });
1025
+ $[6] = t2;
1026
+ $[7] = t3;
1027
+ } else t3 = $[7];
1028
+ let t4;
1029
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
1030
+ t4 = /* @__PURE__ */ jsx(DownloadIcon, { size: "1em" });
1031
+ $[8] = t4;
1032
+ } else t4 = $[8];
1033
+ let t5;
1034
+ if ($[9] !== t) {
1035
+ t5 = t("billing.download");
1036
+ $[9] = t;
1037
+ $[10] = t5;
1038
+ } else t5 = $[10];
1039
+ let t6;
1040
+ if ($[11] !== t5) {
1041
+ t6 = /* @__PURE__ */ jsx(Action, {
1042
+ icon: t4,
1043
+ children: t5
1044
+ });
1045
+ $[11] = t5;
1046
+ $[12] = t6;
1047
+ } else t6 = $[12];
1048
+ let t7;
1049
+ if ($[13] !== t) {
1050
+ t7 = t("billing.pay");
1051
+ $[13] = t;
1052
+ $[14] = t7;
1053
+ } else t7 = $[14];
1054
+ let t8;
1055
+ if ($[15] !== t7) {
1056
+ t8 = /* @__PURE__ */ jsx(Action, {
1057
+ primary: true,
1058
+ children: t7
1059
+ });
1060
+ $[15] = t7;
1061
+ $[16] = t8;
1062
+ } else t8 = $[16];
1063
+ let t9;
1064
+ if ($[17] !== t6 || $[18] !== t8) {
1065
+ t9 = /* @__PURE__ */ jsxs(Actions, { children: [t6, t8] });
1066
+ $[17] = t6;
1067
+ $[18] = t8;
1068
+ $[19] = t9;
1069
+ } else t9 = $[19];
1070
+ let t10;
1071
+ if ($[20] !== t1 || $[21] !== t3 || $[22] !== t9) {
1072
+ t10 = /* @__PURE__ */ jsxs(Header, { children: [
1073
+ t1,
1074
+ t3,
1075
+ t9
1076
+ ] });
1077
+ $[20] = t1;
1078
+ $[21] = t3;
1079
+ $[22] = t9;
1080
+ $[23] = t10;
1081
+ } else t10 = $[23];
1082
+ let t11;
1083
+ if ($[24] !== t) {
1084
+ t11 = FACTS.map((fact) => /* @__PURE__ */ jsxs(Stack, {
1085
+ gap: "xs",
1086
+ children: [/* @__PURE__ */ jsx(Text, {
1087
+ size: "sm",
1088
+ tone: "muted",
1089
+ children: t(`billing.facts.${fact}.label`)
1090
+ }), /* @__PURE__ */ jsx(Text, {
1091
+ size: "sm",
1092
+ children: t(`billing.facts.${fact}.value`)
1093
+ })]
1094
+ }, fact));
1095
+ $[24] = t;
1096
+ $[25] = t11;
1097
+ } else t11 = $[25];
1098
+ let t12;
1099
+ if ($[26] !== t11) {
1100
+ t12 = /* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsx(Stack, {
1101
+ direction: "row",
1102
+ gap: "2xl",
1103
+ wrap: true,
1104
+ children: t11
1105
+ }) });
1106
+ $[26] = t11;
1107
+ $[27] = t12;
1108
+ } else t12 = $[27];
1109
+ let t13;
1110
+ if ($[28] !== t10 || $[29] !== t12) {
1111
+ t13 = /* @__PURE__ */ jsx(Body$1, { children: /* @__PURE__ */ jsxs(Root, { children: [t10, t12] }) });
1112
+ $[28] = t10;
1113
+ $[29] = t12;
1114
+ $[30] = t13;
1115
+ } else t13 = $[30];
1116
+ let t14;
1117
+ if ($[31] !== props || $[32] !== t13) {
1118
+ t14 = /* @__PURE__ */ jsx(Root$1, {
1119
+ ...props,
1120
+ children: t13
1121
+ });
1122
+ $[31] = props;
1123
+ $[32] = t13;
1124
+ $[33] = t14;
1125
+ } else t14 = $[33];
1126
+ return t14;
1127
+ }
1128
+ const source = "import { type ReactElement } from \"react\";\n\nimport { DownloadIcon } from \"lucide-react\";\n\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Page, Section } from \"@stealthscale/component-screen\";\n\nconst FACTS = [\"plan\", \"seats\", \"next\"] as const;\n\nexport function Sizes(props: Page.RootProps): ReactElement {\n const { t } = useWords(\"section\");\n\n return (\n <Page.Root {...props}>\n <Page.Body>\n <Section.Root>\n <Section.Header>\n <Section.Title as=\"h3\">{t(\"billing.title\")}</Section.Title>\n <Section.Description>{t(\"billing.about\")}</Section.Description>\n <Section.Actions>\n <Section.Action icon={<DownloadIcon size=\"1em\" />}>\n {t(\"billing.download\")}\n </Section.Action>\n <Section.Action primary>{t(\"billing.pay\")}</Section.Action>\n </Section.Actions>\n </Section.Header>\n <Section.Body>\n <Stack direction=\"row\" gap=\"2xl\" wrap>\n {FACTS.map((fact) => (\n <Stack gap=\"xs\" key={fact}>\n <Text size=\"sm\" tone=\"muted\">\n {t(`billing.facts.${fact}.label`)}\n </Text>\n <Text size=\"sm\">{t(`billing.facts.${fact}.value`)}</Text>\n </Stack>\n ))}\n </Stack>\n </Section.Body>\n </Section.Root>\n </Page.Body>\n </Page.Root>\n );\n}\n";
1129
+ //#endregion
1130
+ //#region src/section/section.specimen.tsx
1131
+ /**
1132
+ * Catalogue page for the section.
1133
+ *
1134
+ * @remarks
1135
+ * The settings scene renders the settings example in a screen box, because a page renders its
1136
+ * gutter at its own edges. The annotated and the folding scenes render their cards twice: in a
1137
+ * room wider than the width the section folds at, and in a room a phone's width, because a
1138
+ * section folds on its own width. The sizes scene renders one page per size in a screen box. The
1139
+ * boxes and the rooms never appear in the examples. The words are keys under `section` in
1140
+ * `locales/en/specimen/section.json`.
1141
+ */
1142
+ /**
1143
+ * Hand-written scene for a settings page of plain sections and a card.
1144
+ */
1145
+ const settings = {
1146
+ about: "section.settings.about",
1147
+ draw: () => /* @__PURE__ */ jsx(Screen, { children: /* @__PURE__ */ jsx(Settings, {}) }),
1148
+ example: settings_example_exports,
1149
+ title: "section.settings.title"
1150
+ };
1151
+ /**
1152
+ * Hand-written scene for two sections raised as cards.
1153
+ */
1154
+ const cards = {
1155
+ about: "section.variant.about",
1156
+ axes: ["variant"],
1157
+ draw: () => /* @__PURE__ */ jsx(Stack, {
1158
+ gap: "lg",
1159
+ children: /* @__PURE__ */ jsx(Cards, {})
1160
+ }),
1161
+ example: cards_example_exports,
1162
+ title: "section.variant.title"
1163
+ };
1164
+ /**
1165
+ * Hand-written scene for the header in a column beside the cards, wide and at a phone's width.
1166
+ */
1167
+ const annotated = {
1168
+ about: "section.annotated.about",
1169
+ axes: ["annotated"],
1170
+ draw: () => /* @__PURE__ */ jsxs(Stack, {
1171
+ gap: "xl",
1172
+ children: [/* @__PURE__ */ jsx(Room, {
1173
+ size: "4xl",
1174
+ children: /* @__PURE__ */ jsx(Stack, {
1175
+ gap: "lg",
1176
+ children: /* @__PURE__ */ jsx(Cards, { annotated: true })
1177
+ })
1178
+ }), /* @__PURE__ */ jsx(Room, {
1179
+ size: "sm",
1180
+ children: /* @__PURE__ */ jsx(Stack, {
1181
+ gap: "lg",
1182
+ children: /* @__PURE__ */ jsx(Cards, { annotated: true })
1183
+ })
1184
+ })]
1185
+ }),
1186
+ example: cards_example_exports,
1187
+ props: { annotated: true },
1188
+ title: "section.annotated.title"
1189
+ };
1190
+ /**
1191
+ * Hand-written scene for one card wide and folded at a phone's width.
1192
+ */
1193
+ const folding = {
1194
+ about: "section.folding.about",
1195
+ draw: () => /* @__PURE__ */ jsxs(Stack, {
1196
+ gap: "xl",
1197
+ children: [/* @__PURE__ */ jsx(Members, {}), /* @__PURE__ */ jsx(Room, {
1198
+ size: "sm",
1199
+ children: /* @__PURE__ */ jsx(Members, {})
1200
+ })]
1201
+ }),
1202
+ example: members_example_exports,
1203
+ title: "section.folding.title"
1204
+ };
1205
+ /**
1206
+ * Sizes the sizes scene renders, from the largest.
1207
+ */
1208
+ const SIZES = [
1209
+ "lg",
1210
+ "md",
1211
+ "sm"
1212
+ ];
1213
+ /**
1214
+ * Hand-written scene for the three sizes, each on a page of that size.
1215
+ */
1216
+ const sizes = {
1217
+ about: "section.size.about",
1218
+ axes: ["size"],
1219
+ draw: () => /* @__PURE__ */ jsx(Stack, {
1220
+ gap: "xl",
1221
+ children: SIZES.map((size) => /* @__PURE__ */ jsx(Screen, { children: /* @__PURE__ */ jsx(Sizes, { size }) }, size))
1222
+ }),
1223
+ example: sizes_example_exports,
1224
+ props: { size: "lg" },
1225
+ title: "section.size.title"
1226
+ };
1227
+ var section_specimen_default = specimen({
1228
+ about: "section.about",
1229
+ id: "components/screen/section",
1230
+ imports: "import { Section } from \"@stealthscale/component-screen\";",
1231
+ scenes: [
1232
+ settings,
1233
+ cards,
1234
+ annotated,
1235
+ folding,
1236
+ sizes
1237
+ ],
1238
+ title: "section.title"
1239
+ });
1240
+ //#endregion
1241
+ export { annotated, cards, section_specimen_default as default, folding, settings, sizes };