@stealthscale/component-surfaces 0.0.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/cyclonedx/bom.json +1 -1
- package/dist/index.d.ts +12 -12
- package/dist/index.js +1 -123
- package/dist/pages/card/card.js +1337 -0
- package/dist/pages/card/card.props.js +3 -0
- package/dist/pages/pages.json +26 -0
- package/dist/{recipe-BSMN8WoK.js → recipes-DG4wIA5R.js} +9 -7
- package/dist/shared-qwSz4fS5.js +124 -0
- package/dist/theme.js +1 -1
- package/locales/en/specimen/card.json +156 -0
- package/package.json +14 -13
|
@@ -0,0 +1,1337 @@
|
|
|
1
|
+
import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { t as recipe } from "../../recipes-DG4wIA5R.js";
|
|
3
|
+
import { a as Overlay, c as Header, d as Content, f as Aside, i as Root, l as Footer, n as Title, o as Media, r as Section, s as Indicator, u as Description } from "../../shared-qwSz4fS5.js";
|
|
4
|
+
import { Room, scenesOf, specimen, useWords } from "@stealthscale/specimen";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { Badge, Stat } from "@stealthscale/component-data";
|
|
7
|
+
import { Link } from "@stealthscale/component-navigation";
|
|
8
|
+
import { Heading, List, Text } from "@stealthscale/component-typography";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { ArrowUpIcon, CheckIcon, ChevronDownIcon, EllipsisIcon, ReceiptTextIcon, ShoppingBagIcon } from "lucide-react";
|
|
11
|
+
import { Collapsible } from "@stealthscale/component-disclosure";
|
|
12
|
+
import { Button, IconButton } from "@stealthscale/component-actions";
|
|
13
|
+
import { Skeleton, SkeletonText } from "@stealthscale/component-feedback";
|
|
14
|
+
import { Switch } from "@stealthscale/component-forms";
|
|
15
|
+
//#region src/card/examples/dunes.webp
|
|
16
|
+
var dunes_default = "data:image/webp;base64,UklG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Afv3G3ZvlORyjjTDhpGuOhY4UY1AP7/4XjIs09fYwkmxJCRPmoucUvn8ajFp9TLRNstZb34kBY8M/uo3P5QZj6oj1nkXhlZDEFBfDl5A4oQLyfOSczUZu32s4+lz5ycW6HM1INmm/eth5KG2q2/WAemJ3eYelcJoJpxWHFTeouZXwWMcUL3zWyEVqmAkQBVzB3cQaXhMXeJZMCB3Cv0lQ09kLqFOmW9gjEcTP2oPpLhk8HAvs4mIhQEarK59DCU7kAj+hceM045JKo4aVXCWZAjLthVNtS7GJbon6e7ZI2Ji7RJz3NOJyQAlO715mLclWkRmzd+UUlc/TLhjVNYiVpvmCbPO3p0rOZf9b2iTiApU62470lpx4soSyPmPLHq+N2DwAMaaqc8tXKahz7DnE1saTPe2i3ee9srbmpv2f5t3T/Crz2p8raBl4XyLEqOmcL4liVO7StqmzR4UMcZGAAA==";
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/card/examples/article.example.tsx
|
|
19
|
+
var article_example_exports = /* @__PURE__ */ __exportAll({
|
|
20
|
+
Article: () => Article,
|
|
21
|
+
source: () => source$9
|
|
22
|
+
});
|
|
23
|
+
function Article(props) {
|
|
24
|
+
const $ = c(35);
|
|
25
|
+
const { t } = useWords("card");
|
|
26
|
+
let t0;
|
|
27
|
+
if ($[0] !== t) {
|
|
28
|
+
t0 = t("article.title");
|
|
29
|
+
$[0] = t;
|
|
30
|
+
$[1] = t0;
|
|
31
|
+
} else t0 = $[1];
|
|
32
|
+
let t1;
|
|
33
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
34
|
+
t1 = /* @__PURE__ */ jsx("img", {
|
|
35
|
+
alt: "",
|
|
36
|
+
src: dunes_default
|
|
37
|
+
});
|
|
38
|
+
$[2] = t1;
|
|
39
|
+
} else t1 = $[2];
|
|
40
|
+
let t2;
|
|
41
|
+
if ($[3] !== t) {
|
|
42
|
+
t2 = t("article.topic");
|
|
43
|
+
$[3] = t;
|
|
44
|
+
$[4] = t2;
|
|
45
|
+
} else t2 = $[4];
|
|
46
|
+
let t3;
|
|
47
|
+
if ($[5] !== t2) {
|
|
48
|
+
t3 = /* @__PURE__ */ jsx(Badge, {
|
|
49
|
+
variant: "solid",
|
|
50
|
+
children: t2
|
|
51
|
+
});
|
|
52
|
+
$[5] = t2;
|
|
53
|
+
$[6] = t3;
|
|
54
|
+
} else t3 = $[6];
|
|
55
|
+
let t4;
|
|
56
|
+
if ($[7] !== t) {
|
|
57
|
+
t4 = t("article.read");
|
|
58
|
+
$[7] = t;
|
|
59
|
+
$[8] = t4;
|
|
60
|
+
} else t4 = $[8];
|
|
61
|
+
let t5;
|
|
62
|
+
if ($[9] !== t4) {
|
|
63
|
+
t5 = /* @__PURE__ */ jsx(Text, {
|
|
64
|
+
size: "sm",
|
|
65
|
+
children: t4
|
|
66
|
+
});
|
|
67
|
+
$[9] = t4;
|
|
68
|
+
$[10] = t5;
|
|
69
|
+
} else t5 = $[10];
|
|
70
|
+
let t6;
|
|
71
|
+
if ($[11] !== t3 || $[12] !== t5) {
|
|
72
|
+
t6 = /* @__PURE__ */ jsxs(Media, { children: [t1, /* @__PURE__ */ jsxs(Overlay, { children: [t3, t5] })] });
|
|
73
|
+
$[11] = t3;
|
|
74
|
+
$[12] = t5;
|
|
75
|
+
$[13] = t6;
|
|
76
|
+
} else t6 = $[13];
|
|
77
|
+
let t7;
|
|
78
|
+
if ($[14] !== t) {
|
|
79
|
+
t7 = t("article.title");
|
|
80
|
+
$[14] = t;
|
|
81
|
+
$[15] = t7;
|
|
82
|
+
} else t7 = $[15];
|
|
83
|
+
let t8;
|
|
84
|
+
if ($[16] !== t7) {
|
|
85
|
+
t8 = /* @__PURE__ */ jsx(Title, { children: /* @__PURE__ */ jsx(Link, {
|
|
86
|
+
href: "#settlement",
|
|
87
|
+
inherit: true,
|
|
88
|
+
children: t7
|
|
89
|
+
}) });
|
|
90
|
+
$[16] = t7;
|
|
91
|
+
$[17] = t8;
|
|
92
|
+
} else t8 = $[17];
|
|
93
|
+
let t9;
|
|
94
|
+
if ($[18] !== t) {
|
|
95
|
+
t9 = t("article.date");
|
|
96
|
+
$[18] = t;
|
|
97
|
+
$[19] = t9;
|
|
98
|
+
} else t9 = $[19];
|
|
99
|
+
let t10;
|
|
100
|
+
if ($[20] !== t9) {
|
|
101
|
+
t10 = /* @__PURE__ */ jsx(Description, { children: t9 });
|
|
102
|
+
$[20] = t9;
|
|
103
|
+
$[21] = t10;
|
|
104
|
+
} else t10 = $[21];
|
|
105
|
+
let t11;
|
|
106
|
+
if ($[22] !== t10 || $[23] !== t8) {
|
|
107
|
+
t11 = /* @__PURE__ */ jsxs(Header, { children: [t8, t10] });
|
|
108
|
+
$[22] = t10;
|
|
109
|
+
$[23] = t8;
|
|
110
|
+
$[24] = t11;
|
|
111
|
+
} else t11 = $[24];
|
|
112
|
+
let t12;
|
|
113
|
+
if ($[25] !== t) {
|
|
114
|
+
t12 = t("article.summary");
|
|
115
|
+
$[25] = t;
|
|
116
|
+
$[26] = t12;
|
|
117
|
+
} else t12 = $[26];
|
|
118
|
+
let t13;
|
|
119
|
+
if ($[27] !== t12) {
|
|
120
|
+
t13 = /* @__PURE__ */ jsx(Content, { children: t12 });
|
|
121
|
+
$[27] = t12;
|
|
122
|
+
$[28] = t13;
|
|
123
|
+
} else t13 = $[28];
|
|
124
|
+
let t14;
|
|
125
|
+
if ($[29] !== props || $[30] !== t0 || $[31] !== t11 || $[32] !== t13 || $[33] !== t6) {
|
|
126
|
+
t14 = /* @__PURE__ */ jsxs(Root, {
|
|
127
|
+
"aria-label": t0,
|
|
128
|
+
interactive: true,
|
|
129
|
+
scrim: true,
|
|
130
|
+
...props,
|
|
131
|
+
children: [
|
|
132
|
+
t6,
|
|
133
|
+
t11,
|
|
134
|
+
t13
|
|
135
|
+
]
|
|
136
|
+
});
|
|
137
|
+
$[29] = props;
|
|
138
|
+
$[30] = t0;
|
|
139
|
+
$[31] = t11;
|
|
140
|
+
$[32] = t13;
|
|
141
|
+
$[33] = t6;
|
|
142
|
+
$[34] = t14;
|
|
143
|
+
} else t14 = $[34];
|
|
144
|
+
return t14;
|
|
145
|
+
}
|
|
146
|
+
const source$9 = "import { type ReactElement } from \"react\";\n\nimport { Badge } from \"@stealthscale/component-data\";\nimport { Link } from \"@stealthscale/component-navigation\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Card } from \"@stealthscale/component-surfaces\";\n\nimport dunes from \"./dunes.webp\";\n\nexport function Article(props: Card.RootProps): ReactElement {\n const { t } = useWords(\"card\");\n\n return (\n <Card.Root aria-label={t(\"article.title\")} interactive scrim {...props}>\n <Card.Media>\n <img alt=\"\" src={dunes} />\n <Card.Overlay>\n <Badge variant=\"solid\">{t(\"article.topic\")}</Badge>\n <Text size=\"sm\">{t(\"article.read\")}</Text>\n </Card.Overlay>\n </Card.Media>\n <Card.Header>\n <Card.Title>\n <Link href=\"#settlement\" inherit>\n {t(\"article.title\")}\n </Link>\n </Card.Title>\n <Card.Description>{t(\"article.date\")}</Card.Description>\n </Card.Header>\n <Card.Content>{t(\"article.summary\")}</Card.Content>\n </Card.Root>\n );\n}\n";
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region src/card/examples/balance.example.tsx
|
|
149
|
+
var balance_example_exports = /* @__PURE__ */ __exportAll({
|
|
150
|
+
Balance: () => Balance,
|
|
151
|
+
source: () => source$8
|
|
152
|
+
});
|
|
153
|
+
function Balance(props) {
|
|
154
|
+
const $ = c(23);
|
|
155
|
+
const { t } = useWords("card");
|
|
156
|
+
let t0;
|
|
157
|
+
if ($[0] !== t) {
|
|
158
|
+
t0 = t("balance.label");
|
|
159
|
+
$[0] = t;
|
|
160
|
+
$[1] = t0;
|
|
161
|
+
} else t0 = $[1];
|
|
162
|
+
let t1;
|
|
163
|
+
if ($[2] !== t) {
|
|
164
|
+
t1 = t("balance.label");
|
|
165
|
+
$[2] = t;
|
|
166
|
+
$[3] = t1;
|
|
167
|
+
} else t1 = $[3];
|
|
168
|
+
let t2;
|
|
169
|
+
if ($[4] !== t1) {
|
|
170
|
+
t2 = /* @__PURE__ */ jsx(Stat.Label, { children: t1 });
|
|
171
|
+
$[4] = t1;
|
|
172
|
+
$[5] = t2;
|
|
173
|
+
} else t2 = $[5];
|
|
174
|
+
let t3;
|
|
175
|
+
if ($[6] !== t) {
|
|
176
|
+
t3 = t("balance.value");
|
|
177
|
+
$[6] = t;
|
|
178
|
+
$[7] = t3;
|
|
179
|
+
} else t3 = $[7];
|
|
180
|
+
let t4;
|
|
181
|
+
if ($[8] !== t3) {
|
|
182
|
+
t4 = /* @__PURE__ */ jsx(Stat.ValueText, { children: t3 });
|
|
183
|
+
$[8] = t3;
|
|
184
|
+
$[9] = t4;
|
|
185
|
+
} else t4 = $[9];
|
|
186
|
+
let t5;
|
|
187
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
188
|
+
t5 = /* @__PURE__ */ jsx(Stat.Indicator, { children: /* @__PURE__ */ jsx(ArrowUpIcon, { "aria-hidden": true }) });
|
|
189
|
+
$[10] = t5;
|
|
190
|
+
} else t5 = $[10];
|
|
191
|
+
let t6;
|
|
192
|
+
if ($[11] !== t) {
|
|
193
|
+
t6 = t("balance.help");
|
|
194
|
+
$[11] = t;
|
|
195
|
+
$[12] = t6;
|
|
196
|
+
} else t6 = $[12];
|
|
197
|
+
let t7;
|
|
198
|
+
if ($[13] !== t6) {
|
|
199
|
+
t7 = /* @__PURE__ */ jsxs(Stat.HelpText, { children: [t5, t6] });
|
|
200
|
+
$[13] = t6;
|
|
201
|
+
$[14] = t7;
|
|
202
|
+
} else t7 = $[14];
|
|
203
|
+
let t8;
|
|
204
|
+
if ($[15] !== t2 || $[16] !== t4 || $[17] !== t7) {
|
|
205
|
+
t8 = /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsxs(Stat.Root, { children: [
|
|
206
|
+
t2,
|
|
207
|
+
t4,
|
|
208
|
+
t7
|
|
209
|
+
] }) });
|
|
210
|
+
$[15] = t2;
|
|
211
|
+
$[16] = t4;
|
|
212
|
+
$[17] = t7;
|
|
213
|
+
$[18] = t8;
|
|
214
|
+
} else t8 = $[18];
|
|
215
|
+
let t9;
|
|
216
|
+
if ($[19] !== props || $[20] !== t0 || $[21] !== t8) {
|
|
217
|
+
t9 = /* @__PURE__ */ jsx(Root, {
|
|
218
|
+
"aria-label": t0,
|
|
219
|
+
variant: "subtle",
|
|
220
|
+
...props,
|
|
221
|
+
children: t8
|
|
222
|
+
});
|
|
223
|
+
$[19] = props;
|
|
224
|
+
$[20] = t0;
|
|
225
|
+
$[21] = t8;
|
|
226
|
+
$[22] = t9;
|
|
227
|
+
} else t9 = $[22];
|
|
228
|
+
return t9;
|
|
229
|
+
}
|
|
230
|
+
const source$8 = "import { type ReactElement } from \"react\";\n\nimport { ArrowUpIcon } from \"lucide-react\";\n\nimport { Stat } from \"@stealthscale/component-data\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Card } from \"@stealthscale/component-surfaces\";\n\nexport function Balance(props: Card.RootProps): ReactElement {\n const { t } = useWords(\"card\");\n\n return (\n <Card.Root aria-label={t(\"balance.label\")} variant=\"subtle\" {...props}>\n <Card.Content>\n <Stat.Root>\n <Stat.Label>{t(\"balance.label\")}</Stat.Label>\n <Stat.ValueText>{t(\"balance.value\")}</Stat.ValueText>\n <Stat.HelpText>\n <Stat.Indicator>\n <ArrowUpIcon aria-hidden />\n </Stat.Indicator>\n {t(\"balance.help\")}\n </Stat.HelpText>\n </Stat.Root>\n </Card.Content>\n </Card.Root>\n );\n}\n";
|
|
231
|
+
//#endregion
|
|
232
|
+
//#region src/card/examples/expandable.example.tsx
|
|
233
|
+
var expandable_example_exports = /* @__PURE__ */ __exportAll({
|
|
234
|
+
Expandable: () => Expandable,
|
|
235
|
+
source: () => source$7
|
|
236
|
+
});
|
|
237
|
+
function Expandable() {
|
|
238
|
+
const $ = c(28);
|
|
239
|
+
const { t } = useWords("card");
|
|
240
|
+
let t0;
|
|
241
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
242
|
+
t0 = [
|
|
243
|
+
"first",
|
|
244
|
+
"second",
|
|
245
|
+
"third"
|
|
246
|
+
];
|
|
247
|
+
$[0] = t0;
|
|
248
|
+
} else t0 = $[0];
|
|
249
|
+
const transfers = t0;
|
|
250
|
+
let t1;
|
|
251
|
+
if ($[1] !== t) {
|
|
252
|
+
t1 = t("expandable.title");
|
|
253
|
+
$[1] = t;
|
|
254
|
+
$[2] = t1;
|
|
255
|
+
} else t1 = $[2];
|
|
256
|
+
let t2;
|
|
257
|
+
if ($[3] !== t) {
|
|
258
|
+
t2 = t("expandable.title");
|
|
259
|
+
$[3] = t;
|
|
260
|
+
$[4] = t2;
|
|
261
|
+
} else t2 = $[4];
|
|
262
|
+
let t3;
|
|
263
|
+
if ($[5] !== t2) {
|
|
264
|
+
t3 = /* @__PURE__ */ jsx(Title, { children: t2 });
|
|
265
|
+
$[5] = t2;
|
|
266
|
+
$[6] = t3;
|
|
267
|
+
} else t3 = $[6];
|
|
268
|
+
let t4;
|
|
269
|
+
if ($[7] !== t) {
|
|
270
|
+
t4 = t("expandable.amount");
|
|
271
|
+
$[7] = t;
|
|
272
|
+
$[8] = t4;
|
|
273
|
+
} else t4 = $[8];
|
|
274
|
+
let t5;
|
|
275
|
+
if ($[9] !== t4) {
|
|
276
|
+
t5 = /* @__PURE__ */ jsx(Description, { children: t4 });
|
|
277
|
+
$[9] = t4;
|
|
278
|
+
$[10] = t5;
|
|
279
|
+
} else t5 = $[10];
|
|
280
|
+
let t6;
|
|
281
|
+
if ($[11] !== t3 || $[12] !== t5) {
|
|
282
|
+
t6 = /* @__PURE__ */ jsxs(Header, { children: [t3, t5] });
|
|
283
|
+
$[11] = t3;
|
|
284
|
+
$[12] = t5;
|
|
285
|
+
$[13] = t6;
|
|
286
|
+
} else t6 = $[13];
|
|
287
|
+
let t7;
|
|
288
|
+
if ($[14] !== t) {
|
|
289
|
+
t7 = t("expandable.show");
|
|
290
|
+
$[14] = t;
|
|
291
|
+
$[15] = t7;
|
|
292
|
+
} else t7 = $[15];
|
|
293
|
+
let t8;
|
|
294
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
295
|
+
t8 = /* @__PURE__ */ jsx(Collapsible.Indicator, { children: /* @__PURE__ */ jsx(ChevronDownIcon, { "aria-hidden": true }) });
|
|
296
|
+
$[16] = t8;
|
|
297
|
+
} else t8 = $[16];
|
|
298
|
+
let t9;
|
|
299
|
+
if ($[17] !== t7) {
|
|
300
|
+
t9 = /* @__PURE__ */ jsxs(Collapsible.Trigger, { children: [t7, t8] });
|
|
301
|
+
$[17] = t7;
|
|
302
|
+
$[18] = t9;
|
|
303
|
+
} else t9 = $[18];
|
|
304
|
+
let t10;
|
|
305
|
+
if ($[19] !== t) {
|
|
306
|
+
t10 = /* @__PURE__ */ jsx(Collapsible.Content, { children: /* @__PURE__ */ jsx(List.Root, {
|
|
307
|
+
gap: "xs",
|
|
308
|
+
variant: "plain",
|
|
309
|
+
children: transfers.map((transfer) => /* @__PURE__ */ jsx(List.Item, { children: t(`expandable.transfers.${transfer}`) }, transfer))
|
|
310
|
+
}) });
|
|
311
|
+
$[19] = t;
|
|
312
|
+
$[20] = t10;
|
|
313
|
+
} else t10 = $[20];
|
|
314
|
+
let t11;
|
|
315
|
+
if ($[21] !== t10 || $[22] !== t9) {
|
|
316
|
+
t11 = /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsxs(Collapsible.Root, {
|
|
317
|
+
size: "sm",
|
|
318
|
+
variant: "subtle",
|
|
319
|
+
children: [t9, t10]
|
|
320
|
+
}) });
|
|
321
|
+
$[21] = t10;
|
|
322
|
+
$[22] = t9;
|
|
323
|
+
$[23] = t11;
|
|
324
|
+
} else t11 = $[23];
|
|
325
|
+
let t12;
|
|
326
|
+
if ($[24] !== t1 || $[25] !== t11 || $[26] !== t6) {
|
|
327
|
+
t12 = /* @__PURE__ */ jsxs(Root, {
|
|
328
|
+
"aria-label": t1,
|
|
329
|
+
children: [t6, t11]
|
|
330
|
+
});
|
|
331
|
+
$[24] = t1;
|
|
332
|
+
$[25] = t11;
|
|
333
|
+
$[26] = t6;
|
|
334
|
+
$[27] = t12;
|
|
335
|
+
} else t12 = $[27];
|
|
336
|
+
return t12;
|
|
337
|
+
}
|
|
338
|
+
const source$7 = "import { type ReactElement } from \"react\";\n\nimport { ChevronDownIcon } from \"lucide-react\";\n\nimport { Collapsible } from \"@stealthscale/component-disclosure\";\nimport { List } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Card } from \"@stealthscale/component-surfaces\";\n\nexport function Expandable(): ReactElement {\n const { t } = useWords(\"card\");\n const transfers = [\"first\", \"second\", \"third\"];\n\n return (\n <Card.Root aria-label={t(\"expandable.title\")}>\n <Card.Header>\n <Card.Title>{t(\"expandable.title\")}</Card.Title>\n <Card.Description>{t(\"expandable.amount\")}</Card.Description>\n </Card.Header>\n <Card.Content>\n <Collapsible.Root size=\"sm\" variant=\"subtle\">\n <Collapsible.Trigger>\n {t(\"expandable.show\")}\n <Collapsible.Indicator>\n <ChevronDownIcon aria-hidden />\n </Collapsible.Indicator>\n </Collapsible.Trigger>\n <Collapsible.Content>\n <List.Root gap=\"xs\" variant=\"plain\">\n {transfers.map((transfer) => (\n <List.Item key={transfer}>{t(`expandable.transfers.${transfer}`)}</List.Item>\n ))}\n </List.Root>\n </Collapsible.Content>\n </Collapsible.Root>\n </Card.Content>\n </Card.Root>\n );\n}\n";
|
|
339
|
+
//#endregion
|
|
340
|
+
//#region src/card/examples/invoice.example.tsx
|
|
341
|
+
var invoice_example_exports = /* @__PURE__ */ __exportAll({
|
|
342
|
+
Invoice: () => Invoice,
|
|
343
|
+
source: () => source$6
|
|
344
|
+
});
|
|
345
|
+
function Invoice(props) {
|
|
346
|
+
const $ = c(41);
|
|
347
|
+
const { t } = useWords("card");
|
|
348
|
+
let t0;
|
|
349
|
+
if ($[0] !== t) {
|
|
350
|
+
t0 = t("invoice.title");
|
|
351
|
+
$[0] = t;
|
|
352
|
+
$[1] = t0;
|
|
353
|
+
} else t0 = $[1];
|
|
354
|
+
let t1;
|
|
355
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
356
|
+
t1 = /* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(ReceiptTextIcon, { "aria-hidden": true }) });
|
|
357
|
+
$[2] = t1;
|
|
358
|
+
} else t1 = $[2];
|
|
359
|
+
let t2;
|
|
360
|
+
if ($[3] !== t) {
|
|
361
|
+
t2 = t("invoice.title");
|
|
362
|
+
$[3] = t;
|
|
363
|
+
$[4] = t2;
|
|
364
|
+
} else t2 = $[4];
|
|
365
|
+
let t3;
|
|
366
|
+
if ($[5] !== t2) {
|
|
367
|
+
t3 = /* @__PURE__ */ jsx(Title, { children: t2 });
|
|
368
|
+
$[5] = t2;
|
|
369
|
+
$[6] = t3;
|
|
370
|
+
} else t3 = $[6];
|
|
371
|
+
let t4;
|
|
372
|
+
if ($[7] !== t) {
|
|
373
|
+
t4 = t("invoice.issued");
|
|
374
|
+
$[7] = t;
|
|
375
|
+
$[8] = t4;
|
|
376
|
+
} else t4 = $[8];
|
|
377
|
+
let t5;
|
|
378
|
+
if ($[9] !== t4) {
|
|
379
|
+
t5 = /* @__PURE__ */ jsx(Description, { children: t4 });
|
|
380
|
+
$[9] = t4;
|
|
381
|
+
$[10] = t5;
|
|
382
|
+
} else t5 = $[10];
|
|
383
|
+
let t6;
|
|
384
|
+
if ($[11] !== t) {
|
|
385
|
+
t6 = t("invoice.more");
|
|
386
|
+
$[11] = t;
|
|
387
|
+
$[12] = t6;
|
|
388
|
+
} else t6 = $[12];
|
|
389
|
+
let t7;
|
|
390
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
391
|
+
t7 = /* @__PURE__ */ jsx(EllipsisIcon, { "aria-hidden": true });
|
|
392
|
+
$[13] = t7;
|
|
393
|
+
} else t7 = $[13];
|
|
394
|
+
let t8;
|
|
395
|
+
if ($[14] !== t6) {
|
|
396
|
+
t8 = /* @__PURE__ */ jsx(Aside, { children: /* @__PURE__ */ jsx(IconButton, {
|
|
397
|
+
"aria-label": t6,
|
|
398
|
+
size: "sm",
|
|
399
|
+
variant: "ghost",
|
|
400
|
+
children: t7
|
|
401
|
+
}) });
|
|
402
|
+
$[14] = t6;
|
|
403
|
+
$[15] = t8;
|
|
404
|
+
} else t8 = $[15];
|
|
405
|
+
let t9;
|
|
406
|
+
if ($[16] !== t3 || $[17] !== t5 || $[18] !== t8) {
|
|
407
|
+
t9 = /* @__PURE__ */ jsxs(Header, { children: [
|
|
408
|
+
t1,
|
|
409
|
+
t3,
|
|
410
|
+
t5,
|
|
411
|
+
t8
|
|
412
|
+
] });
|
|
413
|
+
$[16] = t3;
|
|
414
|
+
$[17] = t5;
|
|
415
|
+
$[18] = t8;
|
|
416
|
+
$[19] = t9;
|
|
417
|
+
} else t9 = $[19];
|
|
418
|
+
let t10;
|
|
419
|
+
if ($[20] !== t) {
|
|
420
|
+
t10 = t("invoice.lines");
|
|
421
|
+
$[20] = t;
|
|
422
|
+
$[21] = t10;
|
|
423
|
+
} else t10 = $[21];
|
|
424
|
+
let t11;
|
|
425
|
+
if ($[22] !== t10) {
|
|
426
|
+
t11 = /* @__PURE__ */ jsx(Content, { children: t10 });
|
|
427
|
+
$[22] = t10;
|
|
428
|
+
$[23] = t11;
|
|
429
|
+
} else t11 = $[23];
|
|
430
|
+
let t12;
|
|
431
|
+
if ($[24] !== t) {
|
|
432
|
+
t12 = t("invoice.remind");
|
|
433
|
+
$[24] = t;
|
|
434
|
+
$[25] = t12;
|
|
435
|
+
} else t12 = $[25];
|
|
436
|
+
let t13;
|
|
437
|
+
if ($[26] !== t12) {
|
|
438
|
+
t13 = /* @__PURE__ */ jsx(Button, {
|
|
439
|
+
size: "sm",
|
|
440
|
+
variant: "subtle",
|
|
441
|
+
children: t12
|
|
442
|
+
});
|
|
443
|
+
$[26] = t12;
|
|
444
|
+
$[27] = t13;
|
|
445
|
+
} else t13 = $[27];
|
|
446
|
+
let t14;
|
|
447
|
+
if ($[28] !== t) {
|
|
448
|
+
t14 = t("invoice.send");
|
|
449
|
+
$[28] = t;
|
|
450
|
+
$[29] = t14;
|
|
451
|
+
} else t14 = $[29];
|
|
452
|
+
let t15;
|
|
453
|
+
if ($[30] !== t14) {
|
|
454
|
+
t15 = /* @__PURE__ */ jsx(Button, {
|
|
455
|
+
size: "sm",
|
|
456
|
+
children: t14
|
|
457
|
+
});
|
|
458
|
+
$[30] = t14;
|
|
459
|
+
$[31] = t15;
|
|
460
|
+
} else t15 = $[31];
|
|
461
|
+
let t16;
|
|
462
|
+
if ($[32] !== t13 || $[33] !== t15) {
|
|
463
|
+
t16 = /* @__PURE__ */ jsxs(Footer, { children: [t13, t15] });
|
|
464
|
+
$[32] = t13;
|
|
465
|
+
$[33] = t15;
|
|
466
|
+
$[34] = t16;
|
|
467
|
+
} else t16 = $[34];
|
|
468
|
+
let t17;
|
|
469
|
+
if ($[35] !== props || $[36] !== t0 || $[37] !== t11 || $[38] !== t16 || $[39] !== t9) {
|
|
470
|
+
t17 = /* @__PURE__ */ jsxs(Root, {
|
|
471
|
+
"aria-label": t0,
|
|
472
|
+
...props,
|
|
473
|
+
children: [
|
|
474
|
+
t9,
|
|
475
|
+
t11,
|
|
476
|
+
t16
|
|
477
|
+
]
|
|
478
|
+
});
|
|
479
|
+
$[35] = props;
|
|
480
|
+
$[36] = t0;
|
|
481
|
+
$[37] = t11;
|
|
482
|
+
$[38] = t16;
|
|
483
|
+
$[39] = t9;
|
|
484
|
+
$[40] = t17;
|
|
485
|
+
} else t17 = $[40];
|
|
486
|
+
return t17;
|
|
487
|
+
}
|
|
488
|
+
const source$6 = "import { type ReactElement } from \"react\";\n\nimport { EllipsisIcon, ReceiptTextIcon } from \"lucide-react\";\n\nimport { Button, IconButton } from \"@stealthscale/component-actions\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Card } from \"@stealthscale/component-surfaces\";\n\nexport function Invoice(props: Card.RootProps): ReactElement {\n const { t } = useWords(\"card\");\n\n return (\n <Card.Root aria-label={t(\"invoice.title\")} {...props}>\n <Card.Header>\n <Card.Indicator>\n <ReceiptTextIcon aria-hidden />\n </Card.Indicator>\n <Card.Title>{t(\"invoice.title\")}</Card.Title>\n <Card.Description>{t(\"invoice.issued\")}</Card.Description>\n <Card.Aside>\n <IconButton aria-label={t(\"invoice.more\")} size=\"sm\" variant=\"ghost\">\n <EllipsisIcon aria-hidden />\n </IconButton>\n </Card.Aside>\n </Card.Header>\n <Card.Content>{t(\"invoice.lines\")}</Card.Content>\n <Card.Footer>\n <Button size=\"sm\" variant=\"subtle\">\n {t(\"invoice.remind\")}\n </Button>\n <Button size=\"sm\">{t(\"invoice.send\")}</Button>\n </Card.Footer>\n </Card.Root>\n );\n}\n";
|
|
489
|
+
//#endregion
|
|
490
|
+
//#region src/card/examples/linked.example.tsx
|
|
491
|
+
var linked_example_exports = /* @__PURE__ */ __exportAll({
|
|
492
|
+
Linked: () => Linked,
|
|
493
|
+
source: () => source$5
|
|
494
|
+
});
|
|
495
|
+
function Linked(props) {
|
|
496
|
+
const $ = c(28);
|
|
497
|
+
const { t } = useWords("card");
|
|
498
|
+
let t0;
|
|
499
|
+
if ($[0] !== t) {
|
|
500
|
+
t0 = t("invoice.title");
|
|
501
|
+
$[0] = t;
|
|
502
|
+
$[1] = t0;
|
|
503
|
+
} else t0 = $[1];
|
|
504
|
+
let t1;
|
|
505
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
506
|
+
t1 = /* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(ReceiptTextIcon, { "aria-hidden": true }) });
|
|
507
|
+
$[2] = t1;
|
|
508
|
+
} else t1 = $[2];
|
|
509
|
+
let t2;
|
|
510
|
+
if ($[3] !== t) {
|
|
511
|
+
t2 = t("invoice.title");
|
|
512
|
+
$[3] = t;
|
|
513
|
+
$[4] = t2;
|
|
514
|
+
} else t2 = $[4];
|
|
515
|
+
let t3;
|
|
516
|
+
if ($[5] !== t2) {
|
|
517
|
+
t3 = /* @__PURE__ */ jsx(Title, { children: /* @__PURE__ */ jsx(Link, {
|
|
518
|
+
href: "#invoice-4821",
|
|
519
|
+
inherit: true,
|
|
520
|
+
children: t2
|
|
521
|
+
}) });
|
|
522
|
+
$[5] = t2;
|
|
523
|
+
$[6] = t3;
|
|
524
|
+
} else t3 = $[6];
|
|
525
|
+
let t4;
|
|
526
|
+
if ($[7] !== t) {
|
|
527
|
+
t4 = t("invoice.issued");
|
|
528
|
+
$[7] = t;
|
|
529
|
+
$[8] = t4;
|
|
530
|
+
} else t4 = $[8];
|
|
531
|
+
let t5;
|
|
532
|
+
if ($[9] !== t4) {
|
|
533
|
+
t5 = /* @__PURE__ */ jsx(Description, { children: t4 });
|
|
534
|
+
$[9] = t4;
|
|
535
|
+
$[10] = t5;
|
|
536
|
+
} else t5 = $[10];
|
|
537
|
+
let t6;
|
|
538
|
+
if ($[11] !== t3 || $[12] !== t5) {
|
|
539
|
+
t6 = /* @__PURE__ */ jsxs(Header, { children: [
|
|
540
|
+
t1,
|
|
541
|
+
t3,
|
|
542
|
+
t5
|
|
543
|
+
] });
|
|
544
|
+
$[11] = t3;
|
|
545
|
+
$[12] = t5;
|
|
546
|
+
$[13] = t6;
|
|
547
|
+
} else t6 = $[13];
|
|
548
|
+
let t7;
|
|
549
|
+
if ($[14] !== t) {
|
|
550
|
+
t7 = t("invoice.lines");
|
|
551
|
+
$[14] = t;
|
|
552
|
+
$[15] = t7;
|
|
553
|
+
} else t7 = $[15];
|
|
554
|
+
let t8;
|
|
555
|
+
if ($[16] !== t7) {
|
|
556
|
+
t8 = /* @__PURE__ */ jsx(Content, { children: t7 });
|
|
557
|
+
$[16] = t7;
|
|
558
|
+
$[17] = t8;
|
|
559
|
+
} else t8 = $[17];
|
|
560
|
+
let t9;
|
|
561
|
+
if ($[18] !== t) {
|
|
562
|
+
t9 = t("invoice.remind");
|
|
563
|
+
$[18] = t;
|
|
564
|
+
$[19] = t9;
|
|
565
|
+
} else t9 = $[19];
|
|
566
|
+
let t10;
|
|
567
|
+
if ($[20] !== t9) {
|
|
568
|
+
t10 = /* @__PURE__ */ jsx(Footer, { children: /* @__PURE__ */ jsx(Button, {
|
|
569
|
+
size: "sm",
|
|
570
|
+
variant: "subtle",
|
|
571
|
+
children: t9
|
|
572
|
+
}) });
|
|
573
|
+
$[20] = t9;
|
|
574
|
+
$[21] = t10;
|
|
575
|
+
} else t10 = $[21];
|
|
576
|
+
let t11;
|
|
577
|
+
if ($[22] !== props || $[23] !== t0 || $[24] !== t10 || $[25] !== t6 || $[26] !== t8) {
|
|
578
|
+
t11 = /* @__PURE__ */ jsxs(Root, {
|
|
579
|
+
"aria-label": t0,
|
|
580
|
+
...props,
|
|
581
|
+
children: [
|
|
582
|
+
t6,
|
|
583
|
+
t8,
|
|
584
|
+
t10
|
|
585
|
+
]
|
|
586
|
+
});
|
|
587
|
+
$[22] = props;
|
|
588
|
+
$[23] = t0;
|
|
589
|
+
$[24] = t10;
|
|
590
|
+
$[25] = t6;
|
|
591
|
+
$[26] = t8;
|
|
592
|
+
$[27] = t11;
|
|
593
|
+
} else t11 = $[27];
|
|
594
|
+
return t11;
|
|
595
|
+
}
|
|
596
|
+
const source$5 = "import { type ReactElement } from \"react\";\n\nimport { ReceiptTextIcon } from \"lucide-react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Link } from \"@stealthscale/component-navigation\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Card } from \"@stealthscale/component-surfaces\";\n\nexport function Linked(props: Card.RootProps): ReactElement {\n const { t } = useWords(\"card\");\n\n return (\n <Card.Root aria-label={t(\"invoice.title\")} {...props}>\n <Card.Header>\n <Card.Indicator>\n <ReceiptTextIcon aria-hidden />\n </Card.Indicator>\n <Card.Title>\n <Link href=\"#invoice-4821\" inherit>\n {t(\"invoice.title\")}\n </Link>\n </Card.Title>\n <Card.Description>{t(\"invoice.issued\")}</Card.Description>\n </Card.Header>\n <Card.Content>{t(\"invoice.lines\")}</Card.Content>\n <Card.Footer>\n <Button size=\"sm\" variant=\"subtle\">\n {t(\"invoice.remind\")}\n </Button>\n </Card.Footer>\n </Card.Root>\n );\n}\n";
|
|
597
|
+
//#endregion
|
|
598
|
+
//#region src/card/examples/portrait.webp
|
|
599
|
+
var portrait_default = "data:image/webp;base64,UklGRiICAABXRUJQVlA4IBYCAACQEgCdASrAAMAAPolEm0wlI6IiIEjIoBEJZ27gQephfMlraP7UA/VNHwC6/y/IH0AW54YF3Ia9o3Agu8If+7/rav7ORcT9voayHzf/8YaVp/l2XaZ2ZlX////9iJEAirPjtXXpKo/0/1ygg/xepph/4c6Wv1mVL/vlv72yKyRO3hBenSJw8ZapY/kyF39/IfaLDGaKtyXJ0ik2oIGAAP7joeOv/8TF+7T9MV8H/F/y4sH9mRjFFKDMsVmz9ZGFi449i2YzmJDlUgxNtc8XArkmqYfZmsy0p11qS5LqChP9b1NHZfjx5lWWPDn0H0V6TalJSIkzGkXc1k4UPXY6WOmGdx7lor7pYyVzERXOMHhZ0VAZnKbaQebSxF8bVUT6zqRZocjdL533+V8EyIIdTQIpXnOAx8a9Q3yccycMf8RKzuWcy7c0qzYYMhAef32iU1B4dWLxRnEH498HQ58b/YZW+hdpGV7YUhynYgOVZMXq9NmpX68vDKY5S9MFvYPnhoiEXhECGClRpps5symtaNAuWkuMZMtG+yoa5m2OQhORVaLzPiOUAZPOR4YxEZDB1UabXFBsRQFdZ+32VLuvRhTt28IHo28doUQEv0k+dKnHdEHbYPT7JWaV7Y2hwXSasmhv/TwRWSCBp/CM7wU+OlzN+4hQ6K/gPgT8Ux5tIkCNm8Nr52TPhHiPE9ukoc/bDjZYtmFgAAA=";
|
|
600
|
+
//#endregion
|
|
601
|
+
//#region src/card/examples/loading.example.tsx
|
|
602
|
+
var loading_example_exports = /* @__PURE__ */ __exportAll({
|
|
603
|
+
Loading: () => Loading,
|
|
604
|
+
source: () => source$4
|
|
605
|
+
});
|
|
606
|
+
function Loading() {
|
|
607
|
+
const $ = c(18);
|
|
608
|
+
const { t } = useWords("card");
|
|
609
|
+
let t0;
|
|
610
|
+
if ($[0] !== t) {
|
|
611
|
+
t0 = t("loading.label");
|
|
612
|
+
$[0] = t;
|
|
613
|
+
$[1] = t0;
|
|
614
|
+
} else t0 = $[1];
|
|
615
|
+
let t1;
|
|
616
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
617
|
+
t1 = /* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(Skeleton, {
|
|
618
|
+
radius: "full",
|
|
619
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
620
|
+
alt: "",
|
|
621
|
+
src: portrait_default
|
|
622
|
+
})
|
|
623
|
+
}) });
|
|
624
|
+
$[2] = t1;
|
|
625
|
+
} else t1 = $[2];
|
|
626
|
+
let t2;
|
|
627
|
+
if ($[3] !== t) {
|
|
628
|
+
t2 = t("profile.name");
|
|
629
|
+
$[3] = t;
|
|
630
|
+
$[4] = t2;
|
|
631
|
+
} else t2 = $[4];
|
|
632
|
+
let t3;
|
|
633
|
+
if ($[5] !== t2) {
|
|
634
|
+
t3 = /* @__PURE__ */ jsx(Title, {
|
|
635
|
+
as: "p",
|
|
636
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
637
|
+
as: "span",
|
|
638
|
+
children: /* @__PURE__ */ jsx("span", { children: t2 })
|
|
639
|
+
})
|
|
640
|
+
});
|
|
641
|
+
$[5] = t2;
|
|
642
|
+
$[6] = t3;
|
|
643
|
+
} else t3 = $[6];
|
|
644
|
+
let t4;
|
|
645
|
+
if ($[7] !== t) {
|
|
646
|
+
t4 = t("profile.role");
|
|
647
|
+
$[7] = t;
|
|
648
|
+
$[8] = t4;
|
|
649
|
+
} else t4 = $[8];
|
|
650
|
+
let t5;
|
|
651
|
+
if ($[9] !== t4) {
|
|
652
|
+
t5 = /* @__PURE__ */ jsx(Description, { children: /* @__PURE__ */ jsx(Skeleton, {
|
|
653
|
+
as: "span",
|
|
654
|
+
children: /* @__PURE__ */ jsx("span", { children: t4 })
|
|
655
|
+
}) });
|
|
656
|
+
$[9] = t4;
|
|
657
|
+
$[10] = t5;
|
|
658
|
+
} else t5 = $[10];
|
|
659
|
+
let t6;
|
|
660
|
+
if ($[11] !== t3 || $[12] !== t5) {
|
|
661
|
+
t6 = /* @__PURE__ */ jsxs(Header, { children: [
|
|
662
|
+
t1,
|
|
663
|
+
t3,
|
|
664
|
+
t5
|
|
665
|
+
] });
|
|
666
|
+
$[11] = t3;
|
|
667
|
+
$[12] = t5;
|
|
668
|
+
$[13] = t6;
|
|
669
|
+
} else t6 = $[13];
|
|
670
|
+
let t7;
|
|
671
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
672
|
+
t7 = /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(SkeletonText, {}) });
|
|
673
|
+
$[14] = t7;
|
|
674
|
+
} else t7 = $[14];
|
|
675
|
+
let t8;
|
|
676
|
+
if ($[15] !== t0 || $[16] !== t6) {
|
|
677
|
+
t8 = /* @__PURE__ */ jsxs(Root, {
|
|
678
|
+
"aria-busy": true,
|
|
679
|
+
"aria-label": t0,
|
|
680
|
+
children: [t6, t7]
|
|
681
|
+
});
|
|
682
|
+
$[15] = t0;
|
|
683
|
+
$[16] = t6;
|
|
684
|
+
$[17] = t8;
|
|
685
|
+
} else t8 = $[17];
|
|
686
|
+
return t8;
|
|
687
|
+
}
|
|
688
|
+
const source$4 = "import { type ReactElement } from \"react\";\n\nimport { Skeleton, SkeletonText } from \"@stealthscale/component-feedback\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Card } from \"@stealthscale/component-surfaces\";\n\nimport portrait from \"./portrait.webp\";\n\nexport function Loading(): ReactElement {\n const { t } = useWords(\"card\");\n\n return (\n <Card.Root aria-busy aria-label={t(\"loading.label\")}>\n <Card.Header>\n <Card.Indicator>\n <Skeleton radius=\"full\">\n <img alt=\"\" src={portrait} />\n </Skeleton>\n </Card.Indicator>\n <Card.Title as=\"p\">\n <Skeleton as=\"span\">\n <span>{t(\"profile.name\")}</span>\n </Skeleton>\n </Card.Title>\n <Card.Description>\n <Skeleton as=\"span\">\n <span>{t(\"profile.role\")}</span>\n </Skeleton>\n </Card.Description>\n </Card.Header>\n <Card.Content>\n <SkeletonText />\n </Card.Content>\n </Card.Root>\n );\n}\n";
|
|
689
|
+
//#endregion
|
|
690
|
+
//#region src/card/examples/plan.example.tsx
|
|
691
|
+
var plan_example_exports = /* @__PURE__ */ __exportAll({
|
|
692
|
+
Plan: () => Plan,
|
|
693
|
+
source: () => source$3
|
|
694
|
+
});
|
|
695
|
+
function Plan() {
|
|
696
|
+
const $ = c(42);
|
|
697
|
+
const { t } = useWords("card");
|
|
698
|
+
let t0;
|
|
699
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
700
|
+
t0 = [
|
|
701
|
+
"reconcile",
|
|
702
|
+
"payouts",
|
|
703
|
+
"exports",
|
|
704
|
+
"support"
|
|
705
|
+
];
|
|
706
|
+
$[0] = t0;
|
|
707
|
+
} else t0 = $[0];
|
|
708
|
+
const features = t0;
|
|
709
|
+
let t1;
|
|
710
|
+
if ($[1] !== t) {
|
|
711
|
+
t1 = t("plan.name");
|
|
712
|
+
$[1] = t;
|
|
713
|
+
$[2] = t1;
|
|
714
|
+
} else t1 = $[2];
|
|
715
|
+
let t2;
|
|
716
|
+
if ($[3] !== t) {
|
|
717
|
+
t2 = t("plan.name");
|
|
718
|
+
$[3] = t;
|
|
719
|
+
$[4] = t2;
|
|
720
|
+
} else t2 = $[4];
|
|
721
|
+
let t3;
|
|
722
|
+
if ($[5] !== t2) {
|
|
723
|
+
t3 = /* @__PURE__ */ jsx(Title, { children: t2 });
|
|
724
|
+
$[5] = t2;
|
|
725
|
+
$[6] = t3;
|
|
726
|
+
} else t3 = $[6];
|
|
727
|
+
let t4;
|
|
728
|
+
if ($[7] !== t) {
|
|
729
|
+
t4 = t("plan.for");
|
|
730
|
+
$[7] = t;
|
|
731
|
+
$[8] = t4;
|
|
732
|
+
} else t4 = $[8];
|
|
733
|
+
let t5;
|
|
734
|
+
if ($[9] !== t4) {
|
|
735
|
+
t5 = /* @__PURE__ */ jsx(Description, { children: t4 });
|
|
736
|
+
$[9] = t4;
|
|
737
|
+
$[10] = t5;
|
|
738
|
+
} else t5 = $[10];
|
|
739
|
+
let t6;
|
|
740
|
+
if ($[11] !== t) {
|
|
741
|
+
t6 = t("plan.popular");
|
|
742
|
+
$[11] = t;
|
|
743
|
+
$[12] = t6;
|
|
744
|
+
} else t6 = $[12];
|
|
745
|
+
let t7;
|
|
746
|
+
if ($[13] !== t6) {
|
|
747
|
+
t7 = /* @__PURE__ */ jsx(Aside, { children: /* @__PURE__ */ jsx(Badge, {
|
|
748
|
+
palette: "primary",
|
|
749
|
+
children: t6
|
|
750
|
+
}) });
|
|
751
|
+
$[13] = t6;
|
|
752
|
+
$[14] = t7;
|
|
753
|
+
} else t7 = $[14];
|
|
754
|
+
let t8;
|
|
755
|
+
if ($[15] !== t3 || $[16] !== t5 || $[17] !== t7) {
|
|
756
|
+
t8 = /* @__PURE__ */ jsxs(Header, { children: [
|
|
757
|
+
t3,
|
|
758
|
+
t5,
|
|
759
|
+
t7
|
|
760
|
+
] });
|
|
761
|
+
$[15] = t3;
|
|
762
|
+
$[16] = t5;
|
|
763
|
+
$[17] = t7;
|
|
764
|
+
$[18] = t8;
|
|
765
|
+
} else t8 = $[18];
|
|
766
|
+
let t9;
|
|
767
|
+
if ($[19] !== t) {
|
|
768
|
+
t9 = t("plan.price");
|
|
769
|
+
$[19] = t;
|
|
770
|
+
$[20] = t9;
|
|
771
|
+
} else t9 = $[20];
|
|
772
|
+
let t10;
|
|
773
|
+
if ($[21] !== t9) {
|
|
774
|
+
t10 = /* @__PURE__ */ jsx(Heading, {
|
|
775
|
+
as: "p",
|
|
776
|
+
size: "2xl",
|
|
777
|
+
children: t9
|
|
778
|
+
});
|
|
779
|
+
$[21] = t9;
|
|
780
|
+
$[22] = t10;
|
|
781
|
+
} else t10 = $[22];
|
|
782
|
+
let t11;
|
|
783
|
+
if ($[23] !== t) {
|
|
784
|
+
t11 = t("plan.per");
|
|
785
|
+
$[23] = t;
|
|
786
|
+
$[24] = t11;
|
|
787
|
+
} else t11 = $[24];
|
|
788
|
+
let t12;
|
|
789
|
+
if ($[25] !== t11) {
|
|
790
|
+
t12 = /* @__PURE__ */ jsx(Text, {
|
|
791
|
+
size: "sm",
|
|
792
|
+
tone: "muted",
|
|
793
|
+
children: t11
|
|
794
|
+
});
|
|
795
|
+
$[25] = t11;
|
|
796
|
+
$[26] = t12;
|
|
797
|
+
} else t12 = $[26];
|
|
798
|
+
let t13;
|
|
799
|
+
if ($[27] !== t10 || $[28] !== t12) {
|
|
800
|
+
t13 = /* @__PURE__ */ jsxs(Content, { children: [t10, t12] });
|
|
801
|
+
$[27] = t10;
|
|
802
|
+
$[28] = t12;
|
|
803
|
+
$[29] = t13;
|
|
804
|
+
} else t13 = $[29];
|
|
805
|
+
let t14;
|
|
806
|
+
if ($[30] !== t) {
|
|
807
|
+
t14 = /* @__PURE__ */ jsx(Section, { children: /* @__PURE__ */ jsx(List.Root, {
|
|
808
|
+
gap: "sm",
|
|
809
|
+
variant: "plain",
|
|
810
|
+
children: features.map((feature) => /* @__PURE__ */ jsxs(List.Item, { children: [/* @__PURE__ */ jsx(List.Indicator, { children: /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": true }) }), t(`plan.features.${feature}`)] }, feature))
|
|
811
|
+
}) });
|
|
812
|
+
$[30] = t;
|
|
813
|
+
$[31] = t14;
|
|
814
|
+
} else t14 = $[31];
|
|
815
|
+
let t15;
|
|
816
|
+
if ($[32] !== t) {
|
|
817
|
+
t15 = t("plan.start");
|
|
818
|
+
$[32] = t;
|
|
819
|
+
$[33] = t15;
|
|
820
|
+
} else t15 = $[33];
|
|
821
|
+
let t16;
|
|
822
|
+
if ($[34] !== t15) {
|
|
823
|
+
t16 = /* @__PURE__ */ jsx(Footer, { children: /* @__PURE__ */ jsx(Button, { children: t15 }) });
|
|
824
|
+
$[34] = t15;
|
|
825
|
+
$[35] = t16;
|
|
826
|
+
} else t16 = $[35];
|
|
827
|
+
let t17;
|
|
828
|
+
if ($[36] !== t1 || $[37] !== t13 || $[38] !== t14 || $[39] !== t16 || $[40] !== t8) {
|
|
829
|
+
t17 = /* @__PURE__ */ jsxs(Root, {
|
|
830
|
+
"aria-label": t1,
|
|
831
|
+
palette: "primary",
|
|
832
|
+
variant: "outline",
|
|
833
|
+
children: [
|
|
834
|
+
t8,
|
|
835
|
+
t13,
|
|
836
|
+
t14,
|
|
837
|
+
t16
|
|
838
|
+
]
|
|
839
|
+
});
|
|
840
|
+
$[36] = t1;
|
|
841
|
+
$[37] = t13;
|
|
842
|
+
$[38] = t14;
|
|
843
|
+
$[39] = t16;
|
|
844
|
+
$[40] = t8;
|
|
845
|
+
$[41] = t17;
|
|
846
|
+
} else t17 = $[41];
|
|
847
|
+
return t17;
|
|
848
|
+
}
|
|
849
|
+
const source$3 = "import { type ReactElement } from \"react\";\n\nimport { CheckIcon } from \"lucide-react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Badge } from \"@stealthscale/component-data\";\nimport { Heading, List, Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Card } from \"@stealthscale/component-surfaces\";\n\nexport function Plan(): ReactElement {\n const { t } = useWords(\"card\");\n const features = [\"reconcile\", \"payouts\", \"exports\", \"support\"];\n\n return (\n <Card.Root aria-label={t(\"plan.name\")} palette=\"primary\" variant=\"outline\">\n <Card.Header>\n <Card.Title>{t(\"plan.name\")}</Card.Title>\n <Card.Description>{t(\"plan.for\")}</Card.Description>\n <Card.Aside>\n <Badge palette=\"primary\">{t(\"plan.popular\")}</Badge>\n </Card.Aside>\n </Card.Header>\n <Card.Content>\n <Heading as=\"p\" size=\"2xl\">\n {t(\"plan.price\")}\n </Heading>\n <Text size=\"sm\" tone=\"muted\">\n {t(\"plan.per\")}\n </Text>\n </Card.Content>\n <Card.Section>\n <List.Root gap=\"sm\" variant=\"plain\">\n {features.map((feature) => (\n <List.Item key={feature}>\n <List.Indicator>\n <CheckIcon aria-hidden />\n </List.Indicator>\n {t(`plan.features.${feature}`)}\n </List.Item>\n ))}\n </List.Root>\n </Card.Section>\n <Card.Footer>\n <Button>{t(\"plan.start\")}</Button>\n </Card.Footer>\n </Card.Root>\n );\n}\n";
|
|
850
|
+
//#endregion
|
|
851
|
+
//#region src/card/examples/studio.webp
|
|
852
|
+
var studio_default = "data:image/webp;base64,UklGRhIJAABXRUJQVlA4IAYJAAAQtACdASrAA9ACPolEn0wlI6KiIAgAoBEJaW7hWQCHnqTjX5lD1/aCV+fPqNBwScN3uZ8gC0tk5D32ych77ZZ37z5POt98dZIJ45hLtKgWS7Xi5OQ993eD38QCkEyGkXgaIftlwP3heR+0sE0qBZLteLlnfvPNSl3e1jEOmilmfKE2K8UCfTPmZO0u14uTkQVk22AP8RycEGWism2wFTRTdlLBFBgIggm+2TkPfd3iHWTbMwQtgnJiL2BCDja3nFD/+huqvtzMnaXa8XJyMVZNtgD/EAmv0phLyKEhN9YjXh0580nTA3Nrxcsn/q7z1FAE77gtSsBVk2tMP8mSMznFIoQjLYbXi5Z37l0VP4IwAXS2pFAqybanmAqNYUi+tSs32XEPge+s2N7TQpb2j7TuESaGlthjpGsDLNsOiWtcSo1a7JyMUw76AjSCobuW1CWjFw+953cd2EtYYBqhie3DV2Z+zcQjvnzSsBVkiavvaP0R1kkdd7x9S6R0siWsb9tPd3J7zbNDd56ip93ZqRN7brRA+3Mv11dPKpKtpwlECyehwwQhSv2rvPNQjjCRK9gXqPPhfc+UnUEBU3YIrss7Olsl44WkeIdbYyfG0fdryiBbt6JYLVhpUth/3/o6LQqdqAF3LoqfcPlKwE5cJ0tPva53eZf2N2zdN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YwhQbrtwF2pIIAA3mKQj8KFLucHHDRs4PvGpekkpvHg8DvK+nFo/c4ONYIVCTClzPlSNjtDuAnKvfZHrd6xT5sAgIVTs2xR8K5L8EEKpV0HX/+CAFcCHLxm6orPNXpMKQAEwX5VD3DAeIfDtYKu02cjf9AOzhaArKlTWHpLqelgUpAn0AHF1y0h0WAnvdN2UnePXt7mAtN10gZ6h1uIJFmEV28m/0AAnPU4j5X5LD4rfntfP39AAAAA=";
|
|
853
|
+
//#endregion
|
|
854
|
+
//#region src/card/examples/product.example.tsx
|
|
855
|
+
var product_example_exports = /* @__PURE__ */ __exportAll({
|
|
856
|
+
Product: () => Product,
|
|
857
|
+
source: () => source$2
|
|
858
|
+
});
|
|
859
|
+
function Product() {
|
|
860
|
+
const $ = c(33);
|
|
861
|
+
const { t } = useWords("card");
|
|
862
|
+
let t0;
|
|
863
|
+
if ($[0] !== t) {
|
|
864
|
+
t0 = t("product.name");
|
|
865
|
+
$[0] = t;
|
|
866
|
+
$[1] = t0;
|
|
867
|
+
} else t0 = $[1];
|
|
868
|
+
let t1;
|
|
869
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
870
|
+
t1 = /* @__PURE__ */ jsx("img", {
|
|
871
|
+
alt: "",
|
|
872
|
+
src: studio_default
|
|
873
|
+
});
|
|
874
|
+
$[2] = t1;
|
|
875
|
+
} else t1 = $[2];
|
|
876
|
+
let t2;
|
|
877
|
+
if ($[3] !== t) {
|
|
878
|
+
t2 = t("product.new");
|
|
879
|
+
$[3] = t;
|
|
880
|
+
$[4] = t2;
|
|
881
|
+
} else t2 = $[4];
|
|
882
|
+
let t3;
|
|
883
|
+
if ($[5] !== t2) {
|
|
884
|
+
t3 = /* @__PURE__ */ jsxs(Media, { children: [t1, /* @__PURE__ */ jsx(Overlay, { children: /* @__PURE__ */ jsx(Badge, {
|
|
885
|
+
palette: "success",
|
|
886
|
+
variant: "solid",
|
|
887
|
+
children: t2
|
|
888
|
+
}) })] });
|
|
889
|
+
$[5] = t2;
|
|
890
|
+
$[6] = t3;
|
|
891
|
+
} else t3 = $[6];
|
|
892
|
+
let t4;
|
|
893
|
+
if ($[7] !== t) {
|
|
894
|
+
t4 = t("product.name");
|
|
895
|
+
$[7] = t;
|
|
896
|
+
$[8] = t4;
|
|
897
|
+
} else t4 = $[8];
|
|
898
|
+
let t5;
|
|
899
|
+
if ($[9] !== t4) {
|
|
900
|
+
t5 = /* @__PURE__ */ jsx(Title, { children: t4 });
|
|
901
|
+
$[9] = t4;
|
|
902
|
+
$[10] = t5;
|
|
903
|
+
} else t5 = $[10];
|
|
904
|
+
let t6;
|
|
905
|
+
if ($[11] !== t) {
|
|
906
|
+
t6 = t("product.detail");
|
|
907
|
+
$[11] = t;
|
|
908
|
+
$[12] = t6;
|
|
909
|
+
} else t6 = $[12];
|
|
910
|
+
let t7;
|
|
911
|
+
if ($[13] !== t6) {
|
|
912
|
+
t7 = /* @__PURE__ */ jsx(Description, { children: t6 });
|
|
913
|
+
$[13] = t6;
|
|
914
|
+
$[14] = t7;
|
|
915
|
+
} else t7 = $[14];
|
|
916
|
+
let t8;
|
|
917
|
+
if ($[15] !== t5 || $[16] !== t7) {
|
|
918
|
+
t8 = /* @__PURE__ */ jsxs(Header, { children: [t5, t7] });
|
|
919
|
+
$[15] = t5;
|
|
920
|
+
$[16] = t7;
|
|
921
|
+
$[17] = t8;
|
|
922
|
+
} else t8 = $[17];
|
|
923
|
+
let t9;
|
|
924
|
+
if ($[18] !== t) {
|
|
925
|
+
t9 = t("product.price");
|
|
926
|
+
$[18] = t;
|
|
927
|
+
$[19] = t9;
|
|
928
|
+
} else t9 = $[19];
|
|
929
|
+
let t10;
|
|
930
|
+
if ($[20] !== t9) {
|
|
931
|
+
t10 = /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(Heading, {
|
|
932
|
+
as: "p",
|
|
933
|
+
size: "lg",
|
|
934
|
+
children: t9
|
|
935
|
+
}) });
|
|
936
|
+
$[20] = t9;
|
|
937
|
+
$[21] = t10;
|
|
938
|
+
} else t10 = $[21];
|
|
939
|
+
let t11;
|
|
940
|
+
if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
|
|
941
|
+
t11 = /* @__PURE__ */ jsx(ShoppingBagIcon, { "aria-hidden": true });
|
|
942
|
+
$[22] = t11;
|
|
943
|
+
} else t11 = $[22];
|
|
944
|
+
let t12;
|
|
945
|
+
if ($[23] !== t) {
|
|
946
|
+
t12 = t("product.add");
|
|
947
|
+
$[23] = t;
|
|
948
|
+
$[24] = t12;
|
|
949
|
+
} else t12 = $[24];
|
|
950
|
+
let t13;
|
|
951
|
+
if ($[25] !== t12) {
|
|
952
|
+
t13 = /* @__PURE__ */ jsx(Footer, { children: /* @__PURE__ */ jsxs(Button, { children: [t11, t12] }) });
|
|
953
|
+
$[25] = t12;
|
|
954
|
+
$[26] = t13;
|
|
955
|
+
} else t13 = $[26];
|
|
956
|
+
let t14;
|
|
957
|
+
if ($[27] !== t0 || $[28] !== t10 || $[29] !== t13 || $[30] !== t3 || $[31] !== t8) {
|
|
958
|
+
t14 = /* @__PURE__ */ jsxs(Root, {
|
|
959
|
+
"aria-label": t0,
|
|
960
|
+
children: [
|
|
961
|
+
t3,
|
|
962
|
+
t8,
|
|
963
|
+
t10,
|
|
964
|
+
t13
|
|
965
|
+
]
|
|
966
|
+
});
|
|
967
|
+
$[27] = t0;
|
|
968
|
+
$[28] = t10;
|
|
969
|
+
$[29] = t13;
|
|
970
|
+
$[30] = t3;
|
|
971
|
+
$[31] = t8;
|
|
972
|
+
$[32] = t14;
|
|
973
|
+
} else t14 = $[32];
|
|
974
|
+
return t14;
|
|
975
|
+
}
|
|
976
|
+
const source$2 = "import { type ReactElement } from \"react\";\n\nimport { ShoppingBagIcon } from \"lucide-react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Badge } from \"@stealthscale/component-data\";\nimport { Heading } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Card } from \"@stealthscale/component-surfaces\";\n\nimport studio from \"./studio.webp\";\n\nexport function Product(): ReactElement {\n const { t } = useWords(\"card\");\n\n return (\n <Card.Root aria-label={t(\"product.name\")}>\n <Card.Media>\n <img alt=\"\" src={studio} />\n <Card.Overlay>\n <Badge palette=\"success\" variant=\"solid\">\n {t(\"product.new\")}\n </Badge>\n </Card.Overlay>\n </Card.Media>\n <Card.Header>\n <Card.Title>{t(\"product.name\")}</Card.Title>\n <Card.Description>{t(\"product.detail\")}</Card.Description>\n </Card.Header>\n <Card.Content>\n <Heading as=\"p\" size=\"lg\">\n {t(\"product.price\")}\n </Heading>\n </Card.Content>\n <Card.Footer>\n <Button>\n <ShoppingBagIcon aria-hidden />\n {t(\"product.add\")}\n </Button>\n </Card.Footer>\n </Card.Root>\n );\n}\n";
|
|
977
|
+
//#endregion
|
|
978
|
+
//#region src/card/examples/harbour.webp
|
|
979
|
+
var harbour_default = "data:image/webp;base64,UklGRvYJAABXRUJQVlA4IOoJAADwYACdASrAA0ABPpVKok2lpCMiIAgAsBKJaW7hPq3wZBuma+vpVo/+nzf+7wfPUDcoF//0v7BP+9VbeOTy/9gC3Mx23e2cww/RHrm4xIlgHvtk5D32zd9kPxDrJyHJhvOhUQ4BoDReLg2v9BG/7Y010vXQM+x2uioNen+VE3Vk22Lj46ya8gq7/cadauvA1Cv/cXdBT9udQgye9Sn7s+PqS8zcvAh9FJbk8MRIU8OfJY27Fv2RRQcg9mnP3pm7Cg96sc/BTDe+69SaJPjuqlT+CMVQJw15TNE6NvV6jQhJ2pNQ8gq4tnIV9J/VcW933YCLkIhBPzP2KfLE0aDXN2oqeHOoy1kN3mfC60XhZk6bmzIN0OU0rddVKn7ybPR2WKKHfDn+m1bOVm+sZ0SnA2uW2G3iHHqGH6Izl7Zm6VMu6bJy99ie+ter4pLzYGVUNxW3TUfdR9hlL/hvQ3eeoqfqY4ufwRp9N1NpLfLz0lvY6mziPEAbEcvQc6Wh6IxrJtsBVi24Oj6bc4+Wgii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+NTnY4DQQuHccMOR3hVzgWIhLqFU8s/+HUeSiqC3f/ukUq5lMO04SkHD7IaHZKO3zpa6Tu7TbDyg0UqGsltDrpjUvFcpcc7ogEkoHJcMf8gHqRASl392Z8BtBND/GWQzHqykHg0sBb9gVRxzSho95K/kx9Qma35Msu53PRJs4nysbvN+ykETu6E1/vHmDoygZj/EuPjVGSl3MLHChNzpYsAzXGLL7bQmCN9Y9AGVXqErUiXl8BwLVdacE4lFix8WlVFK3UiRfXCPgd8FvpJ4pMH4BBG8JwXembYtnXdc9ukIJeCq7BZ+AvCNGWL4syzr+qUPWHhto8A1ZbyqSWfYIvyNVsQQMM7GO6fyJIe90rPkP9dtwxLZKhG1kWvSoGPBBdhNBd3iIyIAWXaJLDAbcfSGNYxZ1jm5QRJylTrcBgDlNXiIqn02Yt3kipJ9YCi5QGY0NAp4vQ+XesT23Xr2WIJp28t0eMFEpUh8ujMoYgjGq1Nh+qLfM6sp4Go2m9+63si2DghadQG/6ZINiNwwqEdcVEjCq01e94rUbKAtn2FHkY1FLOOq3urE9gGnATotTNVc+GukVe8O5r0kqimLKOWzUxJNUPfT7ztfsfm4lrU5lhFIwRoQ8T9gqL9eTeNU+TeL2Q8v1JBWrrwsc0O9k0ieo8wiaxnMxNXI80q+tBnwb8AAA=";
|
|
980
|
+
//#endregion
|
|
981
|
+
//#region src/card/examples/profile.example.tsx
|
|
982
|
+
var profile_example_exports = /* @__PURE__ */ __exportAll({
|
|
983
|
+
Profile: () => Profile,
|
|
984
|
+
source: () => source$1
|
|
985
|
+
});
|
|
986
|
+
function Profile() {
|
|
987
|
+
const $ = c(45);
|
|
988
|
+
const { t } = useWords("card");
|
|
989
|
+
let t0;
|
|
990
|
+
if ($[0] !== t) {
|
|
991
|
+
t0 = t("profile.name");
|
|
992
|
+
$[0] = t;
|
|
993
|
+
$[1] = t0;
|
|
994
|
+
} else t0 = $[1];
|
|
995
|
+
let t1;
|
|
996
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
997
|
+
t1 = /* @__PURE__ */ jsx(Media, { children: /* @__PURE__ */ jsx("img", {
|
|
998
|
+
alt: "",
|
|
999
|
+
src: harbour_default
|
|
1000
|
+
}) });
|
|
1001
|
+
$[2] = t1;
|
|
1002
|
+
} else t1 = $[2];
|
|
1003
|
+
let t2;
|
|
1004
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1005
|
+
t2 = /* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx("img", {
|
|
1006
|
+
alt: "",
|
|
1007
|
+
src: portrait_default
|
|
1008
|
+
}) });
|
|
1009
|
+
$[3] = t2;
|
|
1010
|
+
} else t2 = $[3];
|
|
1011
|
+
let t3;
|
|
1012
|
+
if ($[4] !== t) {
|
|
1013
|
+
t3 = t("profile.name");
|
|
1014
|
+
$[4] = t;
|
|
1015
|
+
$[5] = t3;
|
|
1016
|
+
} else t3 = $[5];
|
|
1017
|
+
let t4;
|
|
1018
|
+
if ($[6] !== t3) {
|
|
1019
|
+
t4 = /* @__PURE__ */ jsx(Title, { children: t3 });
|
|
1020
|
+
$[6] = t3;
|
|
1021
|
+
$[7] = t4;
|
|
1022
|
+
} else t4 = $[7];
|
|
1023
|
+
let t5;
|
|
1024
|
+
if ($[8] !== t) {
|
|
1025
|
+
t5 = t("profile.role");
|
|
1026
|
+
$[8] = t;
|
|
1027
|
+
$[9] = t5;
|
|
1028
|
+
} else t5 = $[9];
|
|
1029
|
+
let t6;
|
|
1030
|
+
if ($[10] !== t5) {
|
|
1031
|
+
t6 = /* @__PURE__ */ jsx(Description, { children: t5 });
|
|
1032
|
+
$[10] = t5;
|
|
1033
|
+
$[11] = t6;
|
|
1034
|
+
} else t6 = $[11];
|
|
1035
|
+
let t7;
|
|
1036
|
+
if ($[12] !== t) {
|
|
1037
|
+
t7 = t("profile.message");
|
|
1038
|
+
$[12] = t;
|
|
1039
|
+
$[13] = t7;
|
|
1040
|
+
} else t7 = $[13];
|
|
1041
|
+
let t8;
|
|
1042
|
+
if ($[14] !== t7) {
|
|
1043
|
+
t8 = /* @__PURE__ */ jsx(Aside, { children: /* @__PURE__ */ jsx(Button, {
|
|
1044
|
+
size: "sm",
|
|
1045
|
+
variant: "outline",
|
|
1046
|
+
children: t7
|
|
1047
|
+
}) });
|
|
1048
|
+
$[14] = t7;
|
|
1049
|
+
$[15] = t8;
|
|
1050
|
+
} else t8 = $[15];
|
|
1051
|
+
let t9;
|
|
1052
|
+
if ($[16] !== t4 || $[17] !== t6 || $[18] !== t8) {
|
|
1053
|
+
t9 = /* @__PURE__ */ jsxs(Header, { children: [
|
|
1054
|
+
t2,
|
|
1055
|
+
t4,
|
|
1056
|
+
t6,
|
|
1057
|
+
t8
|
|
1058
|
+
] });
|
|
1059
|
+
$[16] = t4;
|
|
1060
|
+
$[17] = t6;
|
|
1061
|
+
$[18] = t8;
|
|
1062
|
+
$[19] = t9;
|
|
1063
|
+
} else t9 = $[19];
|
|
1064
|
+
let t10;
|
|
1065
|
+
if ($[20] !== t) {
|
|
1066
|
+
t10 = t("profile.bio");
|
|
1067
|
+
$[20] = t;
|
|
1068
|
+
$[21] = t10;
|
|
1069
|
+
} else t10 = $[21];
|
|
1070
|
+
let t11;
|
|
1071
|
+
if ($[22] !== t10) {
|
|
1072
|
+
t11 = /* @__PURE__ */ jsx(Content, { children: t10 });
|
|
1073
|
+
$[22] = t10;
|
|
1074
|
+
$[23] = t11;
|
|
1075
|
+
} else t11 = $[23];
|
|
1076
|
+
let t12;
|
|
1077
|
+
if ($[24] !== t) {
|
|
1078
|
+
t12 = t("profile.payouts");
|
|
1079
|
+
$[24] = t;
|
|
1080
|
+
$[25] = t12;
|
|
1081
|
+
} else t12 = $[25];
|
|
1082
|
+
let t13;
|
|
1083
|
+
if ($[26] !== t12) {
|
|
1084
|
+
t13 = /* @__PURE__ */ jsx(Badge, { children: t12 });
|
|
1085
|
+
$[26] = t12;
|
|
1086
|
+
$[27] = t13;
|
|
1087
|
+
} else t13 = $[27];
|
|
1088
|
+
let t14;
|
|
1089
|
+
if ($[28] !== t) {
|
|
1090
|
+
t14 = t("profile.close");
|
|
1091
|
+
$[28] = t;
|
|
1092
|
+
$[29] = t14;
|
|
1093
|
+
} else t14 = $[29];
|
|
1094
|
+
let t15;
|
|
1095
|
+
if ($[30] !== t14) {
|
|
1096
|
+
t15 = /* @__PURE__ */ jsx(Badge, { children: t14 });
|
|
1097
|
+
$[30] = t14;
|
|
1098
|
+
$[31] = t15;
|
|
1099
|
+
} else t15 = $[31];
|
|
1100
|
+
let t16;
|
|
1101
|
+
if ($[32] !== t) {
|
|
1102
|
+
t16 = t("profile.treasury");
|
|
1103
|
+
$[32] = t;
|
|
1104
|
+
$[33] = t16;
|
|
1105
|
+
} else t16 = $[33];
|
|
1106
|
+
let t17;
|
|
1107
|
+
if ($[34] !== t16) {
|
|
1108
|
+
t17 = /* @__PURE__ */ jsx(Badge, { children: t16 });
|
|
1109
|
+
$[34] = t16;
|
|
1110
|
+
$[35] = t17;
|
|
1111
|
+
} else t17 = $[35];
|
|
1112
|
+
let t18;
|
|
1113
|
+
if ($[36] !== t13 || $[37] !== t15 || $[38] !== t17) {
|
|
1114
|
+
t18 = /* @__PURE__ */ jsxs(Footer, { children: [
|
|
1115
|
+
t13,
|
|
1116
|
+
t15,
|
|
1117
|
+
t17
|
|
1118
|
+
] });
|
|
1119
|
+
$[36] = t13;
|
|
1120
|
+
$[37] = t15;
|
|
1121
|
+
$[38] = t17;
|
|
1122
|
+
$[39] = t18;
|
|
1123
|
+
} else t18 = $[39];
|
|
1124
|
+
let t19;
|
|
1125
|
+
if ($[40] !== t0 || $[41] !== t11 || $[42] !== t18 || $[43] !== t9) {
|
|
1126
|
+
t19 = /* @__PURE__ */ jsxs(Root, {
|
|
1127
|
+
"aria-label": t0,
|
|
1128
|
+
justify: "start",
|
|
1129
|
+
children: [
|
|
1130
|
+
t1,
|
|
1131
|
+
t9,
|
|
1132
|
+
t11,
|
|
1133
|
+
t18
|
|
1134
|
+
]
|
|
1135
|
+
});
|
|
1136
|
+
$[40] = t0;
|
|
1137
|
+
$[41] = t11;
|
|
1138
|
+
$[42] = t18;
|
|
1139
|
+
$[43] = t9;
|
|
1140
|
+
$[44] = t19;
|
|
1141
|
+
} else t19 = $[44];
|
|
1142
|
+
return t19;
|
|
1143
|
+
}
|
|
1144
|
+
const source$1 = "import { type ReactElement } from \"react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Badge } from \"@stealthscale/component-data\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Card } from \"@stealthscale/component-surfaces\";\n\nimport harbour from \"./harbour.webp\";\nimport portrait from \"./portrait.webp\";\n\nexport function Profile(): ReactElement {\n const { t } = useWords(\"card\");\n\n return (\n <Card.Root aria-label={t(\"profile.name\")} justify=\"start\">\n <Card.Media>\n <img alt=\"\" src={harbour} />\n </Card.Media>\n <Card.Header>\n <Card.Indicator>\n <img alt=\"\" src={portrait} />\n </Card.Indicator>\n <Card.Title>{t(\"profile.name\")}</Card.Title>\n <Card.Description>{t(\"profile.role\")}</Card.Description>\n <Card.Aside>\n <Button size=\"sm\" variant=\"outline\">\n {t(\"profile.message\")}\n </Button>\n </Card.Aside>\n </Card.Header>\n <Card.Content>{t(\"profile.bio\")}</Card.Content>\n <Card.Footer>\n <Badge>{t(\"profile.payouts\")}</Badge>\n <Badge>{t(\"profile.close\")}</Badge>\n <Badge>{t(\"profile.treasury\")}</Badge>\n </Card.Footer>\n </Card.Root>\n );\n}\n";
|
|
1145
|
+
//#endregion
|
|
1146
|
+
//#region src/card/examples/settings.example.tsx
|
|
1147
|
+
var settings_example_exports = /* @__PURE__ */ __exportAll({
|
|
1148
|
+
Settings: () => Settings,
|
|
1149
|
+
source: () => source
|
|
1150
|
+
});
|
|
1151
|
+
function Settings() {
|
|
1152
|
+
const $ = c(20);
|
|
1153
|
+
const { t } = useWords("card");
|
|
1154
|
+
let t0;
|
|
1155
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1156
|
+
t0 = [
|
|
1157
|
+
{
|
|
1158
|
+
checked: true,
|
|
1159
|
+
name: "payouts"
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
checked: true,
|
|
1163
|
+
name: "overdue"
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
checked: false,
|
|
1167
|
+
name: "digest"
|
|
1168
|
+
}
|
|
1169
|
+
];
|
|
1170
|
+
$[0] = t0;
|
|
1171
|
+
} else t0 = $[0];
|
|
1172
|
+
const alerts = t0;
|
|
1173
|
+
let t1;
|
|
1174
|
+
if ($[1] !== t) {
|
|
1175
|
+
t1 = t("settings.title");
|
|
1176
|
+
$[1] = t;
|
|
1177
|
+
$[2] = t1;
|
|
1178
|
+
} else t1 = $[2];
|
|
1179
|
+
let t2;
|
|
1180
|
+
if ($[3] !== t) {
|
|
1181
|
+
t2 = t("settings.title");
|
|
1182
|
+
$[3] = t;
|
|
1183
|
+
$[4] = t2;
|
|
1184
|
+
} else t2 = $[4];
|
|
1185
|
+
let t3;
|
|
1186
|
+
if ($[5] !== t2) {
|
|
1187
|
+
t3 = /* @__PURE__ */ jsx(Title, { children: t2 });
|
|
1188
|
+
$[5] = t2;
|
|
1189
|
+
$[6] = t3;
|
|
1190
|
+
} else t3 = $[6];
|
|
1191
|
+
let t4;
|
|
1192
|
+
if ($[7] !== t) {
|
|
1193
|
+
t4 = t("settings.about");
|
|
1194
|
+
$[7] = t;
|
|
1195
|
+
$[8] = t4;
|
|
1196
|
+
} else t4 = $[8];
|
|
1197
|
+
let t5;
|
|
1198
|
+
if ($[9] !== t4) {
|
|
1199
|
+
t5 = /* @__PURE__ */ jsx(Description, { children: t4 });
|
|
1200
|
+
$[9] = t4;
|
|
1201
|
+
$[10] = t5;
|
|
1202
|
+
} else t5 = $[10];
|
|
1203
|
+
let t6;
|
|
1204
|
+
if ($[11] !== t3 || $[12] !== t5) {
|
|
1205
|
+
t6 = /* @__PURE__ */ jsxs(Header, { children: [t3, t5] });
|
|
1206
|
+
$[11] = t3;
|
|
1207
|
+
$[12] = t5;
|
|
1208
|
+
$[13] = t6;
|
|
1209
|
+
} else t6 = $[13];
|
|
1210
|
+
let t7;
|
|
1211
|
+
if ($[14] !== t) {
|
|
1212
|
+
t7 = alerts.map((alert) => /* @__PURE__ */ jsx(Section, { children: /* @__PURE__ */ jsxs(Switch.Root, {
|
|
1213
|
+
defaultChecked: alert.checked,
|
|
1214
|
+
spread: true,
|
|
1215
|
+
children: [/* @__PURE__ */ jsx(Switch.Label, { children: t(`settings.${alert.name}`) }), /* @__PURE__ */ jsx(Switch.Control, { children: /* @__PURE__ */ jsx(Switch.Thumb, {}) })]
|
|
1216
|
+
}) }, alert.name));
|
|
1217
|
+
$[14] = t;
|
|
1218
|
+
$[15] = t7;
|
|
1219
|
+
} else t7 = $[15];
|
|
1220
|
+
let t8;
|
|
1221
|
+
if ($[16] !== t1 || $[17] !== t6 || $[18] !== t7) {
|
|
1222
|
+
t8 = /* @__PURE__ */ jsxs(Root, {
|
|
1223
|
+
"aria-label": t1,
|
|
1224
|
+
children: [t6, t7]
|
|
1225
|
+
});
|
|
1226
|
+
$[16] = t1;
|
|
1227
|
+
$[17] = t6;
|
|
1228
|
+
$[18] = t7;
|
|
1229
|
+
$[19] = t8;
|
|
1230
|
+
} else t8 = $[19];
|
|
1231
|
+
return t8;
|
|
1232
|
+
}
|
|
1233
|
+
const source = "import { type ReactElement } from \"react\";\n\nimport { Switch } from \"@stealthscale/component-forms\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Card } from \"@stealthscale/component-surfaces\";\n\nexport function Settings(): ReactElement {\n const { t } = useWords(\"card\");\n const alerts = [\n { checked: true, name: \"payouts\" },\n { checked: true, name: \"overdue\" },\n { checked: false, name: \"digest\" },\n ];\n\n return (\n <Card.Root aria-label={t(\"settings.title\")}>\n <Card.Header>\n <Card.Title>{t(\"settings.title\")}</Card.Title>\n <Card.Description>{t(\"settings.about\")}</Card.Description>\n </Card.Header>\n {alerts.map((alert) => (\n <Card.Section key={alert.name}>\n <Switch.Root defaultChecked={alert.checked} spread>\n <Switch.Label>{t(`settings.${alert.name}`)}</Switch.Label>\n <Switch.Control>\n <Switch.Thumb />\n </Switch.Control>\n </Switch.Root>\n </Card.Section>\n ))}\n </Card.Root>\n );\n}\n";
|
|
1234
|
+
//#endregion
|
|
1235
|
+
//#region src/card/card.specimen.tsx
|
|
1236
|
+
/**
|
|
1237
|
+
* Builds a hand-written scene that renders one example in a room of a sidebar's width.
|
|
1238
|
+
*
|
|
1239
|
+
* @param name - Key of the scene under `card.scenes`.
|
|
1240
|
+
* @param example - Example module, whose source the scene shows.
|
|
1241
|
+
* @param Example - Component the example module exports.
|
|
1242
|
+
* @returns The scene.
|
|
1243
|
+
*/
|
|
1244
|
+
function roomed(name, example, Example) {
|
|
1245
|
+
return {
|
|
1246
|
+
about: `card.scenes.${name}.about`,
|
|
1247
|
+
draw: () => /* @__PURE__ */ jsx(Room, {
|
|
1248
|
+
size: "xs",
|
|
1249
|
+
children: /* @__PURE__ */ jsx(Example, {})
|
|
1250
|
+
}),
|
|
1251
|
+
example,
|
|
1252
|
+
title: `card.scenes.${name}.title`
|
|
1253
|
+
};
|
|
1254
|
+
}
|
|
1255
|
+
/**
|
|
1256
|
+
* Hand-written scenes, one per example file that shows the card in use.
|
|
1257
|
+
*/
|
|
1258
|
+
const shown = [
|
|
1259
|
+
roomed("profile", profile_example_exports, Profile),
|
|
1260
|
+
roomed("product", product_example_exports, Product),
|
|
1261
|
+
roomed("article", article_example_exports, () => /* @__PURE__ */ jsx(Article, {})),
|
|
1262
|
+
roomed("balance", balance_example_exports, () => /* @__PURE__ */ jsx(Balance, {})),
|
|
1263
|
+
roomed("plan", plan_example_exports, Plan),
|
|
1264
|
+
roomed("settings", settings_example_exports, Settings),
|
|
1265
|
+
roomed("loading", loading_example_exports, Loading),
|
|
1266
|
+
roomed("expandable", expandable_example_exports, Expandable)
|
|
1267
|
+
];
|
|
1268
|
+
var card_specimen_default = specimen({
|
|
1269
|
+
about: "card.about",
|
|
1270
|
+
id: "components/surfaces/card",
|
|
1271
|
+
imports: "import { Card } from \"@stealthscale/component-surfaces\";",
|
|
1272
|
+
scenes: [...shown, ...scenesOf(recipe, {
|
|
1273
|
+
axes: {
|
|
1274
|
+
disabled: {
|
|
1275
|
+
draw: (props) => /* @__PURE__ */ jsx(Room, {
|
|
1276
|
+
size: "xs",
|
|
1277
|
+
children: /* @__PURE__ */ jsx(Linked, { ...props })
|
|
1278
|
+
}),
|
|
1279
|
+
example: linked_example_exports,
|
|
1280
|
+
with: { interactive: true }
|
|
1281
|
+
},
|
|
1282
|
+
effect: { with: { palette: "info" } },
|
|
1283
|
+
interactive: {
|
|
1284
|
+
draw: (props) => /* @__PURE__ */ jsx(Room, {
|
|
1285
|
+
size: "xs",
|
|
1286
|
+
children: /* @__PURE__ */ jsx(Linked, { ...props })
|
|
1287
|
+
}),
|
|
1288
|
+
example: linked_example_exports
|
|
1289
|
+
},
|
|
1290
|
+
orientation: {
|
|
1291
|
+
direction: "column",
|
|
1292
|
+
draw: (props) => /* @__PURE__ */ jsx(Room, {
|
|
1293
|
+
size: "md",
|
|
1294
|
+
children: /* @__PURE__ */ jsx(Article, { ...props })
|
|
1295
|
+
}),
|
|
1296
|
+
example: article_example_exports
|
|
1297
|
+
},
|
|
1298
|
+
palette: {
|
|
1299
|
+
draw: (props) => /* @__PURE__ */ jsx(Room, {
|
|
1300
|
+
size: "xs",
|
|
1301
|
+
children: /* @__PURE__ */ jsx(Balance, { ...props })
|
|
1302
|
+
}),
|
|
1303
|
+
example: balance_example_exports
|
|
1304
|
+
},
|
|
1305
|
+
scrim: {
|
|
1306
|
+
draw: (props) => /* @__PURE__ */ jsx(Room, {
|
|
1307
|
+
size: "xs",
|
|
1308
|
+
children: /* @__PURE__ */ jsx(Article, { ...props })
|
|
1309
|
+
}),
|
|
1310
|
+
example: article_example_exports
|
|
1311
|
+
}
|
|
1312
|
+
},
|
|
1313
|
+
draw: (props) => /* @__PURE__ */ jsx(Room, {
|
|
1314
|
+
size: "xs",
|
|
1315
|
+
children: /* @__PURE__ */ jsx(Invoice, { ...props })
|
|
1316
|
+
}),
|
|
1317
|
+
example: invoice_example_exports,
|
|
1318
|
+
namespace: "card",
|
|
1319
|
+
order: [
|
|
1320
|
+
"variant",
|
|
1321
|
+
"palette",
|
|
1322
|
+
"size",
|
|
1323
|
+
"radius",
|
|
1324
|
+
"orientation",
|
|
1325
|
+
"scrim",
|
|
1326
|
+
"divided",
|
|
1327
|
+
"justify",
|
|
1328
|
+
"interactive",
|
|
1329
|
+
"disabled",
|
|
1330
|
+
"effect",
|
|
1331
|
+
"motion"
|
|
1332
|
+
]
|
|
1333
|
+
})],
|
|
1334
|
+
title: "card.title"
|
|
1335
|
+
});
|
|
1336
|
+
//#endregion
|
|
1337
|
+
export { card_specimen_default as default, shown };
|