@stealthscale/component-disclosure 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cyclonedx/bom.json +1 -1
- package/dist/index.js +1 -5423
- package/dist/pages/accordion/accordion.js +512 -0
- package/dist/pages/accordion/accordion.props.js +3 -0
- package/dist/pages/collapsible/collapsible.js +173 -0
- package/dist/pages/collapsible/collapsible.props.js +3 -0
- package/dist/pages/details/details.js +281 -0
- package/dist/pages/details/details.props.js +3 -0
- package/dist/pages/hover-card/hover-card.js +552 -0
- package/dist/pages/hover-card/hover-card.props.js +3 -0
- package/dist/pages/menu/menu.js +1103 -0
- package/dist/pages/menu/menu.props.js +3 -0
- package/dist/pages/menubar/menubar.js +1181 -0
- package/dist/pages/menubar/menubar.props.js +3 -0
- package/dist/pages/pages.json +138 -0
- package/dist/pages/popover/popover.js +161 -0
- package/dist/pages/popover/popover.props.js +3 -0
- package/dist/pages/steps/steps.js +660 -0
- package/dist/pages/steps/steps.props.js +3 -0
- package/dist/pages/tabs/tabs.js +815 -0
- package/dist/pages/tabs/tabs.props.js +3 -0
- package/dist/pages/toggle-tip/toggle-tip.js +344 -0
- package/dist/pages/toggle-tip/toggle-tip.props.js +3 -0
- package/dist/pages/tooltip/tooltip.js +112 -0
- package/dist/pages/tooltip/tooltip.props.js +3 -0
- package/dist/pages/truncate/truncate.js +235 -0
- package/dist/pages/truncate/truncate.props.js +3 -0
- package/dist/shared-Cfsikh3X.js +5424 -0
- package/dist/theme.js +23 -14
- package/locales/en/specimen/accordion.json +130 -0
- package/locales/en/specimen/collapsible.json +27 -0
- package/locales/en/specimen/details.json +48 -0
- package/locales/en/specimen/hover-card.json +58 -0
- package/locales/en/specimen/menu.json +81 -0
- package/locales/en/specimen/menubar.json +108 -0
- package/locales/en/specimen/popover.json +16 -0
- package/locales/en/specimen/steps.json +86 -0
- package/locales/en/specimen/tabs.json +108 -0
- package/locales/en/specimen/toggle-tip.json +47 -0
- package/locales/en/specimen/tooltip.json +14 -0
- package/locales/en/specimen/truncate.json +31 -0
- package/package.json +10 -9
- /package/dist/{recipe-95yCB2V3.js → recipes-95yCB2V3.js} +0 -0
|
@@ -0,0 +1,660 @@
|
|
|
1
|
+
import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { a as recipe } from "../../recipes-95yCB2V3.js";
|
|
3
|
+
import { A as PrevTrigger, D as Status, E as Title, F as Description, I as Content, L as CompletedContent, M as List, N as Item, O as Separator, P as Indicator, T as Trigger, j as NextTrigger, k as Root } from "../../shared-Cfsikh3X.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Room, scenesOf, specimen, useWords } from "@stealthscale/specimen";
|
|
8
|
+
import { BanknoteIcon, CheckIcon, CircleAlertIcon, PenLineIcon, WalletIcon } from "lucide-react";
|
|
9
|
+
import { Button, ButtonPropsProvider } from "@stealthscale/component-actions";
|
|
10
|
+
import { Stack } from "@stealthscale/component-layout";
|
|
11
|
+
import { Checkbox, Field } from "@stealthscale/component-forms";
|
|
12
|
+
//#region src/steps/examples/gated.example.tsx
|
|
13
|
+
var gated_example_exports = /* @__PURE__ */ __exportAll({
|
|
14
|
+
Gated: () => Gated,
|
|
15
|
+
source: () => source$4
|
|
16
|
+
});
|
|
17
|
+
const STEPS$3 = [
|
|
18
|
+
"account",
|
|
19
|
+
"amount",
|
|
20
|
+
"confirm"
|
|
21
|
+
];
|
|
22
|
+
function Gated() {
|
|
23
|
+
const $ = c(58);
|
|
24
|
+
const { t } = useWords("steps");
|
|
25
|
+
const [agreed, setAgreed] = useState(false);
|
|
26
|
+
const [refused, setRefused] = useState(false);
|
|
27
|
+
let t0;
|
|
28
|
+
if ($[0] !== agreed) {
|
|
29
|
+
t0 = (index) => index !== 1 || agreed;
|
|
30
|
+
$[0] = agreed;
|
|
31
|
+
$[1] = t0;
|
|
32
|
+
} else t0 = $[1];
|
|
33
|
+
let t1;
|
|
34
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
35
|
+
t1 = () => {
|
|
36
|
+
setRefused(true);
|
|
37
|
+
};
|
|
38
|
+
$[2] = t1;
|
|
39
|
+
} else t1 = $[2];
|
|
40
|
+
let t2;
|
|
41
|
+
if ($[3] !== t) {
|
|
42
|
+
t2 = STEPS$3.map((step, index_0) => /* @__PURE__ */ jsxs(Item, {
|
|
43
|
+
index: index_0,
|
|
44
|
+
children: [/* @__PURE__ */ jsxs(Trigger, { children: [/* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(Status, { complete: /* @__PURE__ */ jsx(CheckIcon, {}) }) }), /* @__PURE__ */ jsx(Title, { children: t(`payout.${step}.title`) })] }), /* @__PURE__ */ jsx(Separator, {})]
|
|
45
|
+
}, step));
|
|
46
|
+
$[3] = t;
|
|
47
|
+
$[4] = t2;
|
|
48
|
+
} else t2 = $[4];
|
|
49
|
+
let t3;
|
|
50
|
+
if ($[5] !== t2) {
|
|
51
|
+
t3 = /* @__PURE__ */ jsx(List, { children: t2 });
|
|
52
|
+
$[5] = t2;
|
|
53
|
+
$[6] = t3;
|
|
54
|
+
} else t3 = $[6];
|
|
55
|
+
let t4;
|
|
56
|
+
if ($[7] !== t) {
|
|
57
|
+
t4 = t("payout.account.body");
|
|
58
|
+
$[7] = t;
|
|
59
|
+
$[8] = t4;
|
|
60
|
+
} else t4 = $[8];
|
|
61
|
+
let t5;
|
|
62
|
+
if ($[9] !== t4) {
|
|
63
|
+
t5 = /* @__PURE__ */ jsx(Content, {
|
|
64
|
+
index: 0,
|
|
65
|
+
children: t4
|
|
66
|
+
});
|
|
67
|
+
$[9] = t4;
|
|
68
|
+
$[10] = t5;
|
|
69
|
+
} else t5 = $[10];
|
|
70
|
+
const t6 = refused && !agreed;
|
|
71
|
+
let t7;
|
|
72
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
73
|
+
t7 = (t8) => {
|
|
74
|
+
const { checked } = t8;
|
|
75
|
+
setAgreed(checked === true);
|
|
76
|
+
};
|
|
77
|
+
$[11] = t7;
|
|
78
|
+
} else t7 = $[11];
|
|
79
|
+
let t8;
|
|
80
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
81
|
+
t8 = /* @__PURE__ */ jsx(Checkbox.Control, { children: /* @__PURE__ */ jsx(Checkbox.Indicator, { children: /* @__PURE__ */ jsx(CheckIcon, { strokeWidth: 3 }) }) });
|
|
82
|
+
$[12] = t8;
|
|
83
|
+
} else t8 = $[12];
|
|
84
|
+
let t9;
|
|
85
|
+
if ($[13] !== t) {
|
|
86
|
+
t9 = t("gated.agree");
|
|
87
|
+
$[13] = t;
|
|
88
|
+
$[14] = t9;
|
|
89
|
+
} else t9 = $[14];
|
|
90
|
+
let t10;
|
|
91
|
+
if ($[15] !== t9) {
|
|
92
|
+
t10 = /* @__PURE__ */ jsx(Checkbox.Label, { children: t9 });
|
|
93
|
+
$[15] = t9;
|
|
94
|
+
$[16] = t10;
|
|
95
|
+
} else t10 = $[16];
|
|
96
|
+
let t11;
|
|
97
|
+
if ($[17] !== agreed || $[18] !== t10) {
|
|
98
|
+
t11 = /* @__PURE__ */ jsxs(Checkbox.Root, {
|
|
99
|
+
checked: agreed,
|
|
100
|
+
onCheckedChange: t7,
|
|
101
|
+
children: [t8, t10]
|
|
102
|
+
});
|
|
103
|
+
$[17] = agreed;
|
|
104
|
+
$[18] = t10;
|
|
105
|
+
$[19] = t11;
|
|
106
|
+
} else t11 = $[19];
|
|
107
|
+
let t12;
|
|
108
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
109
|
+
t12 = /* @__PURE__ */ jsx(CircleAlertIcon, {});
|
|
110
|
+
$[20] = t12;
|
|
111
|
+
} else t12 = $[20];
|
|
112
|
+
let t13;
|
|
113
|
+
if ($[21] !== t) {
|
|
114
|
+
t13 = t("gated.check");
|
|
115
|
+
$[21] = t;
|
|
116
|
+
$[22] = t13;
|
|
117
|
+
} else t13 = $[22];
|
|
118
|
+
let t14;
|
|
119
|
+
if ($[23] !== t13) {
|
|
120
|
+
t14 = /* @__PURE__ */ jsxs(Field.ErrorText, { children: [t12, t13] });
|
|
121
|
+
$[23] = t13;
|
|
122
|
+
$[24] = t14;
|
|
123
|
+
} else t14 = $[24];
|
|
124
|
+
let t15;
|
|
125
|
+
if ($[25] !== t11 || $[26] !== t14 || $[27] !== t6) {
|
|
126
|
+
t15 = /* @__PURE__ */ jsx(Content, {
|
|
127
|
+
index: 1,
|
|
128
|
+
children: /* @__PURE__ */ jsxs(Field.Root, {
|
|
129
|
+
invalid: t6,
|
|
130
|
+
children: [t11, t14]
|
|
131
|
+
})
|
|
132
|
+
});
|
|
133
|
+
$[25] = t11;
|
|
134
|
+
$[26] = t14;
|
|
135
|
+
$[27] = t6;
|
|
136
|
+
$[28] = t15;
|
|
137
|
+
} else t15 = $[28];
|
|
138
|
+
let t16;
|
|
139
|
+
if ($[29] !== t) {
|
|
140
|
+
t16 = t("payout.confirm.body");
|
|
141
|
+
$[29] = t;
|
|
142
|
+
$[30] = t16;
|
|
143
|
+
} else t16 = $[30];
|
|
144
|
+
let t17;
|
|
145
|
+
if ($[31] !== t16) {
|
|
146
|
+
t17 = /* @__PURE__ */ jsx(Content, {
|
|
147
|
+
index: 2,
|
|
148
|
+
children: t16
|
|
149
|
+
});
|
|
150
|
+
$[31] = t16;
|
|
151
|
+
$[32] = t17;
|
|
152
|
+
} else t17 = $[32];
|
|
153
|
+
let t18;
|
|
154
|
+
if ($[33] !== t) {
|
|
155
|
+
t18 = t("payout.queued");
|
|
156
|
+
$[33] = t;
|
|
157
|
+
$[34] = t18;
|
|
158
|
+
} else t18 = $[34];
|
|
159
|
+
let t19;
|
|
160
|
+
if ($[35] !== t18) {
|
|
161
|
+
t19 = /* @__PURE__ */ jsx(CompletedContent, { children: t18 });
|
|
162
|
+
$[35] = t18;
|
|
163
|
+
$[36] = t19;
|
|
164
|
+
} else t19 = $[36];
|
|
165
|
+
let t20;
|
|
166
|
+
if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
|
|
167
|
+
t20 = {
|
|
168
|
+
size: "sm",
|
|
169
|
+
variant: "outline"
|
|
170
|
+
};
|
|
171
|
+
$[37] = t20;
|
|
172
|
+
} else t20 = $[37];
|
|
173
|
+
let t21;
|
|
174
|
+
if ($[38] !== t) {
|
|
175
|
+
t21 = t("back");
|
|
176
|
+
$[38] = t;
|
|
177
|
+
$[39] = t21;
|
|
178
|
+
} else t21 = $[39];
|
|
179
|
+
let t22;
|
|
180
|
+
if ($[40] !== t21) {
|
|
181
|
+
t22 = /* @__PURE__ */ jsx(ButtonPropsProvider, {
|
|
182
|
+
value: t20,
|
|
183
|
+
children: /* @__PURE__ */ jsx(PrevTrigger, {
|
|
184
|
+
as: Button,
|
|
185
|
+
children: t21
|
|
186
|
+
})
|
|
187
|
+
});
|
|
188
|
+
$[40] = t21;
|
|
189
|
+
$[41] = t22;
|
|
190
|
+
} else t22 = $[41];
|
|
191
|
+
let t23;
|
|
192
|
+
if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
193
|
+
t23 = { size: "sm" };
|
|
194
|
+
$[42] = t23;
|
|
195
|
+
} else t23 = $[42];
|
|
196
|
+
let t24;
|
|
197
|
+
if ($[43] !== t) {
|
|
198
|
+
t24 = t("next");
|
|
199
|
+
$[43] = t;
|
|
200
|
+
$[44] = t24;
|
|
201
|
+
} else t24 = $[44];
|
|
202
|
+
let t25;
|
|
203
|
+
if ($[45] !== t24) {
|
|
204
|
+
t25 = /* @__PURE__ */ jsx(ButtonPropsProvider, {
|
|
205
|
+
value: t23,
|
|
206
|
+
children: /* @__PURE__ */ jsx(NextTrigger, {
|
|
207
|
+
as: Button,
|
|
208
|
+
children: t24
|
|
209
|
+
})
|
|
210
|
+
});
|
|
211
|
+
$[45] = t24;
|
|
212
|
+
$[46] = t25;
|
|
213
|
+
} else t25 = $[46];
|
|
214
|
+
let t26;
|
|
215
|
+
if ($[47] !== t22 || $[48] !== t25) {
|
|
216
|
+
t26 = /* @__PURE__ */ jsxs(Stack, {
|
|
217
|
+
direction: "row",
|
|
218
|
+
gap: "sm",
|
|
219
|
+
children: [t22, t25]
|
|
220
|
+
});
|
|
221
|
+
$[47] = t22;
|
|
222
|
+
$[48] = t25;
|
|
223
|
+
$[49] = t26;
|
|
224
|
+
} else t26 = $[49];
|
|
225
|
+
let t27;
|
|
226
|
+
if ($[50] !== t0 || $[51] !== t15 || $[52] !== t17 || $[53] !== t19 || $[54] !== t26 || $[55] !== t3 || $[56] !== t5) {
|
|
227
|
+
t27 = /* @__PURE__ */ jsxs(Root, {
|
|
228
|
+
count: STEPS$3.length,
|
|
229
|
+
isStepValid: t0,
|
|
230
|
+
linear: true,
|
|
231
|
+
onStepInvalid: t1,
|
|
232
|
+
children: [
|
|
233
|
+
t3,
|
|
234
|
+
t5,
|
|
235
|
+
t15,
|
|
236
|
+
t17,
|
|
237
|
+
t19,
|
|
238
|
+
t26
|
|
239
|
+
]
|
|
240
|
+
});
|
|
241
|
+
$[50] = t0;
|
|
242
|
+
$[51] = t15;
|
|
243
|
+
$[52] = t17;
|
|
244
|
+
$[53] = t19;
|
|
245
|
+
$[54] = t26;
|
|
246
|
+
$[55] = t3;
|
|
247
|
+
$[56] = t5;
|
|
248
|
+
$[57] = t27;
|
|
249
|
+
} else t27 = $[57];
|
|
250
|
+
return t27;
|
|
251
|
+
}
|
|
252
|
+
const source$4 = "import { type ReactElement, useState } from \"react\";\n\nimport { CheckIcon, CircleAlertIcon } from \"lucide-react\";\n\nimport { Button, ButtonPropsProvider } from \"@stealthscale/component-actions\";\nimport { Checkbox, Field } from \"@stealthscale/component-forms\";\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Steps } from \"@stealthscale/component-disclosure\";\n\nconst STEPS = [\"account\", \"amount\", \"confirm\"] as const;\n\nexport function Gated(): ReactElement {\n const { t } = useWords(\"steps\");\n const [agreed, setAgreed] = useState(false);\n const [refused, setRefused] = useState(false);\n\n return (\n <Steps.Root\n count={STEPS.length}\n isStepValid={(index) => index !== 1 || agreed}\n linear\n onStepInvalid={() => {\n setRefused(true);\n }}\n >\n <Steps.List>\n {STEPS.map((step, index) => (\n <Steps.Item index={index} key={step}>\n <Steps.Trigger>\n <Steps.Indicator>\n <Steps.Status complete={<CheckIcon />} />\n </Steps.Indicator>\n <Steps.Title>{t(`payout.${step}.title`)}</Steps.Title>\n </Steps.Trigger>\n <Steps.Separator />\n </Steps.Item>\n ))}\n </Steps.List>\n <Steps.Content index={0}>{t(\"payout.account.body\")}</Steps.Content>\n <Steps.Content index={1}>\n <Field.Root invalid={refused && !agreed}>\n <Checkbox.Root\n checked={agreed}\n onCheckedChange={({ checked }) => {\n setAgreed(checked === true);\n }}\n >\n <Checkbox.Control>\n <Checkbox.Indicator>\n <CheckIcon strokeWidth={3} />\n </Checkbox.Indicator>\n </Checkbox.Control>\n <Checkbox.Label>{t(\"gated.agree\")}</Checkbox.Label>\n </Checkbox.Root>\n <Field.ErrorText>\n <CircleAlertIcon />\n {t(\"gated.check\")}\n </Field.ErrorText>\n </Field.Root>\n </Steps.Content>\n <Steps.Content index={2}>{t(\"payout.confirm.body\")}</Steps.Content>\n <Steps.CompletedContent>{t(\"payout.queued\")}</Steps.CompletedContent>\n <Stack direction=\"row\" gap=\"sm\">\n <ButtonPropsProvider value={{ size: \"sm\", variant: \"outline\" }}>\n <Steps.PrevTrigger as={Button}>{t(\"back\")}</Steps.PrevTrigger>\n </ButtonPropsProvider>\n <ButtonPropsProvider value={{ size: \"sm\" }}>\n <Steps.NextTrigger as={Button}>{t(\"next\")}</Steps.NextTrigger>\n </ButtonPropsProvider>\n </Stack>\n </Steps.Root>\n );\n}\n";
|
|
253
|
+
//#endregion
|
|
254
|
+
//#region src/steps/examples/marks.example.tsx
|
|
255
|
+
var marks_example_exports = /* @__PURE__ */ __exportAll({
|
|
256
|
+
Marks: () => Marks,
|
|
257
|
+
source: () => source$3
|
|
258
|
+
});
|
|
259
|
+
const STEPS$2 = [
|
|
260
|
+
{
|
|
261
|
+
Icon: WalletIcon,
|
|
262
|
+
step: "account"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
Icon: BanknoteIcon,
|
|
266
|
+
step: "amount"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
Icon: PenLineIcon,
|
|
270
|
+
step: "confirm"
|
|
271
|
+
}
|
|
272
|
+
];
|
|
273
|
+
function Marks() {
|
|
274
|
+
const $ = c(9);
|
|
275
|
+
const { t } = useWords("steps");
|
|
276
|
+
let t0;
|
|
277
|
+
if ($[0] !== t) {
|
|
278
|
+
t0 = STEPS$2.map((t1, index) => {
|
|
279
|
+
const { Icon, step } = t1;
|
|
280
|
+
return /* @__PURE__ */ jsxs(Item, {
|
|
281
|
+
index,
|
|
282
|
+
children: [/* @__PURE__ */ jsxs(Trigger, { children: [/* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(Status, {
|
|
283
|
+
complete: /* @__PURE__ */ jsx(CheckIcon, {}),
|
|
284
|
+
current: /* @__PURE__ */ jsx(Icon, {}),
|
|
285
|
+
incomplete: /* @__PURE__ */ jsx(Icon, {})
|
|
286
|
+
}) }), /* @__PURE__ */ jsx(Title, { children: t(`payout.${step}.title`) })] }), /* @__PURE__ */ jsx(Separator, {})]
|
|
287
|
+
}, step);
|
|
288
|
+
});
|
|
289
|
+
$[0] = t;
|
|
290
|
+
$[1] = t0;
|
|
291
|
+
} else t0 = $[1];
|
|
292
|
+
let t1;
|
|
293
|
+
if ($[2] !== t0) {
|
|
294
|
+
t1 = /* @__PURE__ */ jsx(List, { children: t0 });
|
|
295
|
+
$[2] = t0;
|
|
296
|
+
$[3] = t1;
|
|
297
|
+
} else t1 = $[3];
|
|
298
|
+
let t2;
|
|
299
|
+
if ($[4] !== t) {
|
|
300
|
+
t2 = STEPS$2.map((t3, index_0) => {
|
|
301
|
+
const { step: step_0 } = t3;
|
|
302
|
+
return /* @__PURE__ */ jsx(Content, {
|
|
303
|
+
index: index_0,
|
|
304
|
+
children: t(`payout.${step_0}.body`)
|
|
305
|
+
}, step_0);
|
|
306
|
+
});
|
|
307
|
+
$[4] = t;
|
|
308
|
+
$[5] = t2;
|
|
309
|
+
} else t2 = $[5];
|
|
310
|
+
let t3;
|
|
311
|
+
if ($[6] !== t1 || $[7] !== t2) {
|
|
312
|
+
t3 = /* @__PURE__ */ jsxs(Root, {
|
|
313
|
+
count: STEPS$2.length,
|
|
314
|
+
defaultStep: 1,
|
|
315
|
+
children: [t1, t2]
|
|
316
|
+
});
|
|
317
|
+
$[6] = t1;
|
|
318
|
+
$[7] = t2;
|
|
319
|
+
$[8] = t3;
|
|
320
|
+
} else t3 = $[8];
|
|
321
|
+
return t3;
|
|
322
|
+
}
|
|
323
|
+
const source$3 = "import { type ReactElement } from \"react\";\n\nimport { BanknoteIcon, CheckIcon, PenLineIcon, WalletIcon } from \"lucide-react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Steps } from \"@stealthscale/component-disclosure\";\n\nconst STEPS = [\n { Icon: WalletIcon, step: \"account\" },\n { Icon: BanknoteIcon, step: \"amount\" },\n { Icon: PenLineIcon, step: \"confirm\" },\n] as const;\n\nexport function Marks(): ReactElement {\n const { t } = useWords(\"steps\");\n\n return (\n <Steps.Root count={STEPS.length} defaultStep={1}>\n <Steps.List>\n {STEPS.map(({ Icon, step }, index) => (\n <Steps.Item index={index} key={step}>\n <Steps.Trigger>\n <Steps.Indicator>\n <Steps.Status complete={<CheckIcon />} current={<Icon />} incomplete={<Icon />} />\n </Steps.Indicator>\n <Steps.Title>{t(`payout.${step}.title`)}</Steps.Title>\n </Steps.Trigger>\n <Steps.Separator />\n </Steps.Item>\n ))}\n </Steps.List>\n {STEPS.map(({ step }, index) => (\n <Steps.Content index={index} key={step}>\n {t(`payout.${step}.body`)}\n </Steps.Content>\n ))}\n </Steps.Root>\n );\n}\n";
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region src/steps/examples/parcel.example.tsx
|
|
326
|
+
var parcel_example_exports = /* @__PURE__ */ __exportAll({
|
|
327
|
+
Parcel: () => Parcel,
|
|
328
|
+
source: () => source$2
|
|
329
|
+
});
|
|
330
|
+
const STAGES = [
|
|
331
|
+
"ordered",
|
|
332
|
+
"packed",
|
|
333
|
+
"shipped",
|
|
334
|
+
"delivered"
|
|
335
|
+
];
|
|
336
|
+
function Parcel() {
|
|
337
|
+
const $ = c(4);
|
|
338
|
+
const { t } = useWords("steps");
|
|
339
|
+
let t0;
|
|
340
|
+
if ($[0] !== t) {
|
|
341
|
+
t0 = STAGES.map((stage, index) => /* @__PURE__ */ jsxs(Item, {
|
|
342
|
+
index,
|
|
343
|
+
children: [
|
|
344
|
+
/* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(Status, { complete: /* @__PURE__ */ jsx(CheckIcon, {}) }) }),
|
|
345
|
+
/* @__PURE__ */ jsx(Title, { children: t(`parcel.${stage}.title`) }),
|
|
346
|
+
/* @__PURE__ */ jsx(Description, { children: t(`parcel.${stage}.date`) }),
|
|
347
|
+
/* @__PURE__ */ jsx(Separator, {})
|
|
348
|
+
]
|
|
349
|
+
}, stage));
|
|
350
|
+
$[0] = t;
|
|
351
|
+
$[1] = t0;
|
|
352
|
+
} else t0 = $[1];
|
|
353
|
+
let t1;
|
|
354
|
+
if ($[2] !== t0) {
|
|
355
|
+
t1 = /* @__PURE__ */ jsx(Root, {
|
|
356
|
+
count: STAGES.length,
|
|
357
|
+
labelPlacement: "below",
|
|
358
|
+
size: "sm",
|
|
359
|
+
step: 2,
|
|
360
|
+
children: /* @__PURE__ */ jsx(List, { children: t0 })
|
|
361
|
+
});
|
|
362
|
+
$[2] = t0;
|
|
363
|
+
$[3] = t1;
|
|
364
|
+
} else t1 = $[3];
|
|
365
|
+
return t1;
|
|
366
|
+
}
|
|
367
|
+
const source$2 = "import { type ReactElement } from \"react\";\n\nimport { CheckIcon } from \"lucide-react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Steps } from \"@stealthscale/component-disclosure\";\n\nconst STAGES = [\"ordered\", \"packed\", \"shipped\", \"delivered\"] as const;\n\nexport function Parcel(): ReactElement {\n const { t } = useWords(\"steps\");\n\n return (\n <Steps.Root count={STAGES.length} labelPlacement=\"below\" size=\"sm\" step={2}>\n <Steps.List>\n {STAGES.map((stage, index) => (\n <Steps.Item index={index} key={stage}>\n <Steps.Indicator>\n <Steps.Status complete={<CheckIcon />} />\n </Steps.Indicator>\n <Steps.Title>{t(`parcel.${stage}.title`)}</Steps.Title>\n <Steps.Description>{t(`parcel.${stage}.date`)}</Steps.Description>\n <Steps.Separator />\n </Steps.Item>\n ))}\n </Steps.List>\n </Steps.Root>\n );\n}\n";
|
|
368
|
+
//#endregion
|
|
369
|
+
//#region src/steps/examples/payout.example.tsx
|
|
370
|
+
var payout_example_exports = /* @__PURE__ */ __exportAll({
|
|
371
|
+
Payout: () => Payout,
|
|
372
|
+
source: () => source$1
|
|
373
|
+
});
|
|
374
|
+
const STEPS$1 = [
|
|
375
|
+
"account",
|
|
376
|
+
"amount",
|
|
377
|
+
"confirm"
|
|
378
|
+
];
|
|
379
|
+
function Payout(props) {
|
|
380
|
+
const $ = c(29);
|
|
381
|
+
const { t } = useWords("steps");
|
|
382
|
+
let t0;
|
|
383
|
+
if ($[0] !== t) {
|
|
384
|
+
t0 = STEPS$1.map((step, index) => /* @__PURE__ */ jsxs(Item, {
|
|
385
|
+
index,
|
|
386
|
+
children: [/* @__PURE__ */ jsxs(Trigger, { children: [/* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(Status, { complete: /* @__PURE__ */ jsx(CheckIcon, {}) }) }), /* @__PURE__ */ jsx(Title, { children: t(`payout.${step}.title`) })] }), /* @__PURE__ */ jsx(Separator, {})]
|
|
387
|
+
}, step));
|
|
388
|
+
$[0] = t;
|
|
389
|
+
$[1] = t0;
|
|
390
|
+
} else t0 = $[1];
|
|
391
|
+
let t1;
|
|
392
|
+
if ($[2] !== t0) {
|
|
393
|
+
t1 = /* @__PURE__ */ jsx(List, { children: t0 });
|
|
394
|
+
$[2] = t0;
|
|
395
|
+
$[3] = t1;
|
|
396
|
+
} else t1 = $[3];
|
|
397
|
+
let t2;
|
|
398
|
+
if ($[4] !== t) {
|
|
399
|
+
t2 = STEPS$1.map((step_0, index_0) => /* @__PURE__ */ jsx(Content, {
|
|
400
|
+
index: index_0,
|
|
401
|
+
children: t(`payout.${step_0}.body`)
|
|
402
|
+
}, step_0));
|
|
403
|
+
$[4] = t;
|
|
404
|
+
$[5] = t2;
|
|
405
|
+
} else t2 = $[5];
|
|
406
|
+
let t3;
|
|
407
|
+
if ($[6] !== t) {
|
|
408
|
+
t3 = t("payout.queued");
|
|
409
|
+
$[6] = t;
|
|
410
|
+
$[7] = t3;
|
|
411
|
+
} else t3 = $[7];
|
|
412
|
+
let t4;
|
|
413
|
+
if ($[8] !== t3) {
|
|
414
|
+
t4 = /* @__PURE__ */ jsx(CompletedContent, { children: t3 });
|
|
415
|
+
$[8] = t3;
|
|
416
|
+
$[9] = t4;
|
|
417
|
+
} else t4 = $[9];
|
|
418
|
+
let t5;
|
|
419
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
420
|
+
t5 = {
|
|
421
|
+
size: "sm",
|
|
422
|
+
variant: "outline"
|
|
423
|
+
};
|
|
424
|
+
$[10] = t5;
|
|
425
|
+
} else t5 = $[10];
|
|
426
|
+
let t6;
|
|
427
|
+
if ($[11] !== t) {
|
|
428
|
+
t6 = t("back");
|
|
429
|
+
$[11] = t;
|
|
430
|
+
$[12] = t6;
|
|
431
|
+
} else t6 = $[12];
|
|
432
|
+
let t7;
|
|
433
|
+
if ($[13] !== t6) {
|
|
434
|
+
t7 = /* @__PURE__ */ jsx(ButtonPropsProvider, {
|
|
435
|
+
value: t5,
|
|
436
|
+
children: /* @__PURE__ */ jsx(PrevTrigger, {
|
|
437
|
+
as: Button,
|
|
438
|
+
children: t6
|
|
439
|
+
})
|
|
440
|
+
});
|
|
441
|
+
$[13] = t6;
|
|
442
|
+
$[14] = t7;
|
|
443
|
+
} else t7 = $[14];
|
|
444
|
+
let t8;
|
|
445
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
446
|
+
t8 = { size: "sm" };
|
|
447
|
+
$[15] = t8;
|
|
448
|
+
} else t8 = $[15];
|
|
449
|
+
let t9;
|
|
450
|
+
if ($[16] !== t) {
|
|
451
|
+
t9 = t("next");
|
|
452
|
+
$[16] = t;
|
|
453
|
+
$[17] = t9;
|
|
454
|
+
} else t9 = $[17];
|
|
455
|
+
let t10;
|
|
456
|
+
if ($[18] !== t9) {
|
|
457
|
+
t10 = /* @__PURE__ */ jsx(ButtonPropsProvider, {
|
|
458
|
+
value: t8,
|
|
459
|
+
children: /* @__PURE__ */ jsx(NextTrigger, {
|
|
460
|
+
as: Button,
|
|
461
|
+
children: t9
|
|
462
|
+
})
|
|
463
|
+
});
|
|
464
|
+
$[18] = t9;
|
|
465
|
+
$[19] = t10;
|
|
466
|
+
} else t10 = $[19];
|
|
467
|
+
let t11;
|
|
468
|
+
if ($[20] !== t10 || $[21] !== t7) {
|
|
469
|
+
t11 = /* @__PURE__ */ jsxs(Stack, {
|
|
470
|
+
direction: "row",
|
|
471
|
+
gap: "sm",
|
|
472
|
+
children: [t7, t10]
|
|
473
|
+
});
|
|
474
|
+
$[20] = t10;
|
|
475
|
+
$[21] = t7;
|
|
476
|
+
$[22] = t11;
|
|
477
|
+
} else t11 = $[22];
|
|
478
|
+
let t12;
|
|
479
|
+
if ($[23] !== props || $[24] !== t1 || $[25] !== t11 || $[26] !== t2 || $[27] !== t4) {
|
|
480
|
+
t12 = /* @__PURE__ */ jsxs(Root, {
|
|
481
|
+
count: STEPS$1.length,
|
|
482
|
+
defaultStep: 1,
|
|
483
|
+
...props,
|
|
484
|
+
children: [
|
|
485
|
+
t1,
|
|
486
|
+
t2,
|
|
487
|
+
t4,
|
|
488
|
+
t11
|
|
489
|
+
]
|
|
490
|
+
});
|
|
491
|
+
$[23] = props;
|
|
492
|
+
$[24] = t1;
|
|
493
|
+
$[25] = t11;
|
|
494
|
+
$[26] = t2;
|
|
495
|
+
$[27] = t4;
|
|
496
|
+
$[28] = t12;
|
|
497
|
+
} else t12 = $[28];
|
|
498
|
+
return t12;
|
|
499
|
+
}
|
|
500
|
+
const source$1 = "import { type ReactElement } from \"react\";\n\nimport { CheckIcon } from \"lucide-react\";\n\nimport { Button, ButtonPropsProvider } from \"@stealthscale/component-actions\";\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Steps } from \"@stealthscale/component-disclosure\";\n\nconst STEPS = [\"account\", \"amount\", \"confirm\"] as const;\n\nexport function Payout(props: Steps.RootProps): ReactElement {\n const { t } = useWords(\"steps\");\n\n return (\n <Steps.Root count={STEPS.length} defaultStep={1} {...props}>\n <Steps.List>\n {STEPS.map((step, index) => (\n <Steps.Item index={index} key={step}>\n <Steps.Trigger>\n <Steps.Indicator>\n <Steps.Status complete={<CheckIcon />} />\n </Steps.Indicator>\n <Steps.Title>{t(`payout.${step}.title`)}</Steps.Title>\n </Steps.Trigger>\n <Steps.Separator />\n </Steps.Item>\n ))}\n </Steps.List>\n {STEPS.map((step, index) => (\n <Steps.Content index={index} key={step}>\n {t(`payout.${step}.body`)}\n </Steps.Content>\n ))}\n <Steps.CompletedContent>{t(\"payout.queued\")}</Steps.CompletedContent>\n <Stack direction=\"row\" gap=\"sm\">\n <ButtonPropsProvider value={{ size: \"sm\", variant: \"outline\" }}>\n <Steps.PrevTrigger as={Button}>{t(\"back\")}</Steps.PrevTrigger>\n </ButtonPropsProvider>\n <ButtonPropsProvider value={{ size: \"sm\" }}>\n <Steps.NextTrigger as={Button}>{t(\"next\")}</Steps.NextTrigger>\n </ButtonPropsProvider>\n </Stack>\n </Steps.Root>\n );\n}\n";
|
|
501
|
+
//#endregion
|
|
502
|
+
//#region src/steps/examples/setup.example.tsx
|
|
503
|
+
var setup_example_exports = /* @__PURE__ */ __exportAll({
|
|
504
|
+
Setup: () => Setup,
|
|
505
|
+
source: () => source
|
|
506
|
+
});
|
|
507
|
+
const STEPS = [
|
|
508
|
+
"profile",
|
|
509
|
+
"team",
|
|
510
|
+
"billing"
|
|
511
|
+
];
|
|
512
|
+
function Setup() {
|
|
513
|
+
const $ = c(9);
|
|
514
|
+
const { t } = useWords("steps");
|
|
515
|
+
let t0;
|
|
516
|
+
if ($[0] !== t) {
|
|
517
|
+
t0 = STEPS.map((step, index) => /* @__PURE__ */ jsxs(Item, {
|
|
518
|
+
index,
|
|
519
|
+
children: [/* @__PURE__ */ jsxs(Trigger, { children: [/* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(Status, { complete: /* @__PURE__ */ jsx(CheckIcon, {}) }) }), /* @__PURE__ */ jsxs(Stack, {
|
|
520
|
+
as: "span",
|
|
521
|
+
gap: "xs",
|
|
522
|
+
children: [/* @__PURE__ */ jsx(Title, { children: t(`setup.${step}.title`) }), /* @__PURE__ */ jsx(Description, { children: t(`setup.${step}.description`) })]
|
|
523
|
+
})] }), /* @__PURE__ */ jsx(Separator, {})]
|
|
524
|
+
}, step));
|
|
525
|
+
$[0] = t;
|
|
526
|
+
$[1] = t0;
|
|
527
|
+
} else t0 = $[1];
|
|
528
|
+
let t1;
|
|
529
|
+
if ($[2] !== t0) {
|
|
530
|
+
t1 = /* @__PURE__ */ jsx(List, { children: t0 });
|
|
531
|
+
$[2] = t0;
|
|
532
|
+
$[3] = t1;
|
|
533
|
+
} else t1 = $[3];
|
|
534
|
+
let t2;
|
|
535
|
+
if ($[4] !== t) {
|
|
536
|
+
t2 = STEPS.map((step_0, index_0) => /* @__PURE__ */ jsx(Content, {
|
|
537
|
+
index: index_0,
|
|
538
|
+
children: /* @__PURE__ */ jsxs(Stack, {
|
|
539
|
+
align: "flex-start",
|
|
540
|
+
gap: "md",
|
|
541
|
+
children: [t(`setup.${step_0}.body`), /* @__PURE__ */ jsx(ButtonPropsProvider, {
|
|
542
|
+
value: { size: "sm" },
|
|
543
|
+
children: /* @__PURE__ */ jsx(NextTrigger, {
|
|
544
|
+
as: Button,
|
|
545
|
+
children: t("next")
|
|
546
|
+
})
|
|
547
|
+
})]
|
|
548
|
+
})
|
|
549
|
+
}, step_0));
|
|
550
|
+
$[4] = t;
|
|
551
|
+
$[5] = t2;
|
|
552
|
+
} else t2 = $[5];
|
|
553
|
+
let t3;
|
|
554
|
+
if ($[6] !== t1 || $[7] !== t2) {
|
|
555
|
+
t3 = /* @__PURE__ */ jsxs(Root, {
|
|
556
|
+
count: STEPS.length,
|
|
557
|
+
defaultStep: 1,
|
|
558
|
+
orientation: "vertical",
|
|
559
|
+
children: [t1, t2]
|
|
560
|
+
});
|
|
561
|
+
$[6] = t1;
|
|
562
|
+
$[7] = t2;
|
|
563
|
+
$[8] = t3;
|
|
564
|
+
} else t3 = $[8];
|
|
565
|
+
return t3;
|
|
566
|
+
}
|
|
567
|
+
const source = "import { type ReactElement } from \"react\";\n\nimport { CheckIcon } from \"lucide-react\";\n\nimport { Button, ButtonPropsProvider } from \"@stealthscale/component-actions\";\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Steps } from \"@stealthscale/component-disclosure\";\n\nconst STEPS = [\"profile\", \"team\", \"billing\"] as const;\n\nexport function Setup(): ReactElement {\n const { t } = useWords(\"steps\");\n\n return (\n <Steps.Root count={STEPS.length} defaultStep={1} orientation=\"vertical\">\n <Steps.List>\n {STEPS.map((step, index) => (\n <Steps.Item index={index} key={step}>\n <Steps.Trigger>\n <Steps.Indicator>\n <Steps.Status complete={<CheckIcon />} />\n </Steps.Indicator>\n <Stack as=\"span\" gap=\"xs\">\n <Steps.Title>{t(`setup.${step}.title`)}</Steps.Title>\n <Steps.Description>{t(`setup.${step}.description`)}</Steps.Description>\n </Stack>\n </Steps.Trigger>\n <Steps.Separator />\n </Steps.Item>\n ))}\n </Steps.List>\n {STEPS.map((step, index) => (\n <Steps.Content index={index} key={step}>\n <Stack align=\"flex-start\" gap=\"md\">\n {t(`setup.${step}.body`)}\n <ButtonPropsProvider value={{ size: \"sm\" }}>\n <Steps.NextTrigger as={Button}>{t(\"next\")}</Steps.NextTrigger>\n </ButtonPropsProvider>\n </Stack>\n </Steps.Content>\n ))}\n </Steps.Root>\n );\n}\n";
|
|
568
|
+
//#endregion
|
|
569
|
+
//#region src/steps/steps.specimen.tsx
|
|
570
|
+
/**
|
|
571
|
+
* Catalogue page for the steps.
|
|
572
|
+
*
|
|
573
|
+
* @remarks
|
|
574
|
+
* `scenesOf` generates the looks, palettes, sizes and title placements from the payout example,
|
|
575
|
+
* which starts on the second step, so every scene shows a completed, a current and a later step.
|
|
576
|
+
* The hand-written scenes show a vertical flow with descriptions, marks that turn into a check, a
|
|
577
|
+
* gated linear flow and a parcel's progress without triggers. Every flow renders in a room at its
|
|
578
|
+
* real width. The words are keys under `steps` in `locales/en/specimen/steps.json`.
|
|
579
|
+
*/
|
|
580
|
+
/**
|
|
581
|
+
* Hand-written scene for a vertical flow with a line under each title.
|
|
582
|
+
*/
|
|
583
|
+
const setup = {
|
|
584
|
+
about: "steps.setup.about",
|
|
585
|
+
draw: () => /* @__PURE__ */ jsx(Room, {
|
|
586
|
+
size: "md",
|
|
587
|
+
children: /* @__PURE__ */ jsx(Setup, {})
|
|
588
|
+
}),
|
|
589
|
+
example: setup_example_exports,
|
|
590
|
+
title: "steps.setup.title"
|
|
591
|
+
};
|
|
592
|
+
/**
|
|
593
|
+
* Hand-written scene for discs that show an icon until their step is done.
|
|
594
|
+
*/
|
|
595
|
+
const marks = {
|
|
596
|
+
about: "steps.marks.about",
|
|
597
|
+
draw: () => /* @__PURE__ */ jsx(Room, {
|
|
598
|
+
size: "md",
|
|
599
|
+
children: /* @__PURE__ */ jsx(Marks, {})
|
|
600
|
+
}),
|
|
601
|
+
example: marks_example_exports,
|
|
602
|
+
title: "steps.marks.title"
|
|
603
|
+
};
|
|
604
|
+
/**
|
|
605
|
+
* Hand-written scene for a linear flow that refuses to leave a step until it is filled in.
|
|
606
|
+
*/
|
|
607
|
+
const gated = {
|
|
608
|
+
about: "steps.gated.about",
|
|
609
|
+
draw: () => /* @__PURE__ */ jsx(Room, {
|
|
610
|
+
size: "md",
|
|
611
|
+
children: /* @__PURE__ */ jsx(Gated, {})
|
|
612
|
+
}),
|
|
613
|
+
example: gated_example_exports,
|
|
614
|
+
title: "steps.gated.title"
|
|
615
|
+
};
|
|
616
|
+
/**
|
|
617
|
+
* Hand-written scene for steps that show progress without triggers or content.
|
|
618
|
+
*/
|
|
619
|
+
const parcel = {
|
|
620
|
+
about: "steps.parcel.about",
|
|
621
|
+
draw: () => /* @__PURE__ */ jsx(Room, {
|
|
622
|
+
size: "md",
|
|
623
|
+
children: /* @__PURE__ */ jsx(Parcel, {})
|
|
624
|
+
}),
|
|
625
|
+
example: parcel_example_exports,
|
|
626
|
+
title: "steps.parcel.title"
|
|
627
|
+
};
|
|
628
|
+
var steps_specimen_default = specimen({
|
|
629
|
+
about: "steps.about",
|
|
630
|
+
id: "components/disclosure/steps",
|
|
631
|
+
imports: "import { Steps } from \"@stealthscale/component-disclosure\";",
|
|
632
|
+
scenes: [
|
|
633
|
+
...scenesOf(recipe, {
|
|
634
|
+
axes: {
|
|
635
|
+
labelPlacement: { direction: "column" },
|
|
636
|
+
size: { direction: "column" },
|
|
637
|
+
variant: { direction: "column" }
|
|
638
|
+
},
|
|
639
|
+
draw: (props) => /* @__PURE__ */ jsx(Room, {
|
|
640
|
+
size: "md",
|
|
641
|
+
children: /* @__PURE__ */ jsx(Payout, { ...props })
|
|
642
|
+
}),
|
|
643
|
+
example: payout_example_exports,
|
|
644
|
+
namespace: "steps",
|
|
645
|
+
order: [
|
|
646
|
+
"variant",
|
|
647
|
+
"palette",
|
|
648
|
+
"size",
|
|
649
|
+
"labelPlacement"
|
|
650
|
+
]
|
|
651
|
+
}),
|
|
652
|
+
setup,
|
|
653
|
+
marks,
|
|
654
|
+
gated,
|
|
655
|
+
parcel
|
|
656
|
+
],
|
|
657
|
+
title: "steps.title"
|
|
658
|
+
});
|
|
659
|
+
//#endregion
|
|
660
|
+
export { steps_specimen_default as default, gated, marks, parcel, setup };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const dropped = {"CompletedContentProps": {"conditions": 284, "foreign": 1041}, "ContentProps": {"conditions": 284, "foreign": 1041}, "DescriptionProps": {"conditions": 284, "foreign": 1041}, "IndicatorProps": {"conditions": 284, "foreign": 1041}, "ItemProps": {"conditions": 284, "foreign": 1042}, "ListProps": {"conditions": 284, "foreign": 1042}, "NextTriggerProps": {"conditions": 284, "foreign": 1051}, "PrevTriggerProps": {"conditions": 284, "foreign": 1051}, "RootProps": {"conditions": 284, "foreign": 1039}, "SeparatorProps": {"conditions": 284, "foreign": 1041}, "StatusProps": {"conditions": 0, "foreign": 0}, "TitleProps": {"conditions": 284, "foreign": 1041}, "TriggerProps": {"conditions": 284, "foreign": 1051}};
|
|
2
|
+
export const parts = {"CompletedContentProps": [], "ContentProps": [{"accepts": "number", "fallback": "", "kind": "option", "name": "index", "refers": [], "required": true, "says": "Index of the step the content belongs to, from zero."}], "DescriptionProps": [], "IndicatorProps": [], "ItemProps": [{"accepts": "number", "fallback": "", "kind": "option", "name": "index", "refers": [], "required": true, "says": "Index of the step, from zero."}], "ListProps": [], "NextTriggerProps": [], "PrevTriggerProps": [], "RootProps": [{"accepts": "number", "fallback": "", "kind": "option", "name": "count", "refers": [], "required": false, "says": "The total number of steps"}, {"accepts": "number", "fallback": "", "kind": "option", "name": "defaultStep", "refers": [], "required": false, "says": "The initial value of the stepper when rendered. Use when you don't need to control the value of the stepper."}, {"accepts": "\"ltr\" | \"rtl\"", "fallback": "\"ltr\"", "kind": "option", "name": "dir", "refers": [], "required": false, "says": "The document's text/writing direction."}, {"accepts": "(() => Document | Node | ShadowRoot)", "fallback": "", "kind": "option", "name": "getRootNode", "refers": [], "required": false, "says": "A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "id", "refers": [], "required": false, "says": "The unique identifier of the machine."}, {"accepts": "ElementIds", "fallback": "", "kind": "option", "name": "ids", "refers": ["steps.ElementIds"], "required": false, "says": "The custom ids for the stepper elements"}, {"accepts": "((index: number) => boolean)", "fallback": "() => false", "kind": "option", "name": "isStepSkippable", "refers": [], "required": false, "says": "Whether a step can be skipped during navigation. Skippable steps are bypassed when using next/prev."}, {"accepts": "((index: number) => boolean)", "fallback": "() => true", "kind": "option", "name": "isStepValid", "refers": [], "required": false, "says": "Whether a step is valid. Invalid steps block forward navigation in linear mode."}, {"accepts": "\"below\" | \"beside\"", "fallback": "", "kind": "variant", "name": "labelPlacement", "refers": [], "required": false, "says": "Place of the titles in a horizontal flow: beside each disc, or centred below it."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "linear", "refers": [], "required": false, "says": "If `true`, the stepper requires the user to complete the steps in order"}, {"accepts": "((details: StepChangeDetails) => void)", "fallback": "", "kind": "option", "name": "onStepChange", "refers": ["steps.StepChangeDetails"], "required": false, "says": "Callback to be called when the value changes"}, {"accepts": "VoidFunction", "fallback": "", "kind": "option", "name": "onStepComplete", "refers": [], "required": false, "says": "Callback to be called when a step is completed"}, {"accepts": "((details: StepInvalidDetails) => void)", "fallback": "", "kind": "option", "name": "onStepInvalid", "refers": ["steps.StepInvalidDetails"], "required": false, "says": "Called when navigation is blocked due to an invalid step."}, {"accepts": "\"horizontal\" | \"vertical\"", "fallback": "\"horizontal\"", "kind": "option", "name": "orientation", "refers": [], "required": false, "says": "The orientation of the stepper"}, {"accepts": "\"accent\" | \"error\" | \"info\" | \"neutral\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"", "fallback": "", "kind": "variant", "name": "palette", "refers": [], "required": false, "says": "Palette the discs and the completed rules read, set on the root."}, {"accepts": "\"lg\" | \"md\" | \"sm\"", "fallback": "", "kind": "variant", "name": "size", "refers": [], "required": false, "says": "Size of the discs on the control scale, the titles, the descriptions and the room around them."}, {"accepts": "number", "fallback": "", "kind": "option", "name": "step", "refers": [], "required": false, "says": "The controlled value of the stepper"}, {"accepts": "\"solid\" | \"subtle\"", "fallback": "", "kind": "variant", "name": "variant", "refers": [], "required": false, "says": "Look of the discs and of the rules between completed steps."}], "SeparatorProps": [], "StatusProps": [{"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "complete", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Node a completed step shows, such as a check."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "current", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Node the current step shows."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "incomplete", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Node a later step shows."}], "TitleProps": [{"accepts": "string", "fallback": "", "kind": "option", "name": "completedLabel", "refers": [], "required": false, "says": "Hidden words before the name of a completed step, \"Completed: \" unless the caller passes others."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "currentLabel", "refers": [], "required": false, "says": "Hidden words before the name of the current step, \"Current: \" unless the caller passes others."}], "TriggerProps": []};
|
|
3
|
+
export const shapes = {"steps.ElementIds": [{"accepts": "string", "name": "root", "says": ""}, {"accepts": "string", "name": "list", "says": ""}, {"accepts": "((index: number) => string)", "name": "triggerId", "says": ""}, {"accepts": "((index: number) => string)", "name": "contentId", "says": ""}], "steps.StepChangeDetails": [{"accepts": "number", "name": "step", "says": ""}], "steps.StepInvalidDetails": [{"accepts": "number", "name": "step", "says": ""}, {"accepts": "\"next\" | \"set\"", "name": "action", "says": ""}, {"accepts": "number", "name": "targetStep", "says": ""}], "react.ReactElement": [{"accepts": "string | JSXElementConstructor<any>", "name": "type", "says": ""}, {"accepts": "unknown", "name": "props", "says": ""}, {"accepts": "string | null", "name": "key", "says": ""}], "react.ReactPortal": [{"accepts": "ReactNode", "name": "children", "says": ""}, {"accepts": "string | JSXElementConstructor<any>", "name": "type", "says": ""}, {"accepts": "unknown", "name": "props", "says": ""}, {"accepts": "string | null", "name": "key", "says": ""}]};
|