@stealthscale/component-actions 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cyclonedx/bom.json +1 -1
- package/dist/index.js +1 -996
- package/dist/pages/button/button.js +323 -0
- package/dist/pages/button/button.props.js +3 -0
- package/dist/pages/clipboard/clipboard.js +400 -0
- package/dist/pages/clipboard/clipboard.props.js +3 -0
- package/dist/pages/color-mode-toggle/color-mode-toggle.js +176 -0
- package/dist/pages/color-mode-toggle/color-mode-toggle.props.js +3 -0
- package/dist/pages/download-trigger/download-trigger.js +401 -0
- package/dist/pages/download-trigger/download-trigger.props.js +3 -0
- package/dist/pages/pages.json +74 -0
- package/dist/pages/swap/swap.js +379 -0
- package/dist/pages/swap/swap.props.js +3 -0
- package/dist/pages/toggle-group/toggle-group.js +326 -0
- package/dist/pages/toggle-group/toggle-group.props.js +3 -0
- package/dist/shared-Dv6Wx5nA.js +997 -0
- package/dist/theme.js +34 -13
- package/locales/en/specimen/button.json +39 -0
- package/locales/en/specimen/clipboard.json +33 -0
- package/locales/en/specimen/color-mode-toggle.json +14 -0
- package/locales/en/specimen/download-trigger.json +34 -0
- package/locales/en/specimen/swap.json +30 -0
- package/locales/en/specimen/toggle-group.json +48 -0
- package/package.json +6 -5
- /package/dist/{recipe-BhcK7PNL.js → recipes-BhcK7PNL.js} +0 -0
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { t as recipe } from "../../recipes-BhcK7PNL.js";
|
|
3
|
+
import { b as Button, c as Root, l as Indicator, y as IconButton } from "../../shared-Dv6Wx5nA.js";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Group } from "@stealthscale/component-layout";
|
|
8
|
+
import { Matrix, Sample, scenesOf, specimen, useWords } from "@stealthscale/specimen";
|
|
9
|
+
import { MoonIcon, PauseIcon, PlayIcon, SunIcon, Volume2Icon, VolumeXIcon } from "lucide-react";
|
|
10
|
+
import { Text } from "@stealthscale/component-typography";
|
|
11
|
+
//#region src/swap/examples/follow.example.tsx
|
|
12
|
+
var follow_example_exports = /* @__PURE__ */ __exportAll({
|
|
13
|
+
Follow: () => Follow,
|
|
14
|
+
source: () => source$3
|
|
15
|
+
});
|
|
16
|
+
function Follow() {
|
|
17
|
+
const $ = c(23);
|
|
18
|
+
const { t } = useWords("swap");
|
|
19
|
+
const [following, setFollowing] = useState(false);
|
|
20
|
+
let t0;
|
|
21
|
+
if ($[0] !== t) {
|
|
22
|
+
t0 = t("follow.person");
|
|
23
|
+
$[0] = t;
|
|
24
|
+
$[1] = t0;
|
|
25
|
+
} else t0 = $[1];
|
|
26
|
+
let t1;
|
|
27
|
+
if ($[2] !== t0) {
|
|
28
|
+
t1 = /* @__PURE__ */ jsx(Text, {
|
|
29
|
+
weight: "semibold",
|
|
30
|
+
children: t0
|
|
31
|
+
});
|
|
32
|
+
$[2] = t0;
|
|
33
|
+
$[3] = t1;
|
|
34
|
+
} else t1 = $[3];
|
|
35
|
+
let t2;
|
|
36
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
37
|
+
t2 = () => {
|
|
38
|
+
setFollowing(_temp$2);
|
|
39
|
+
};
|
|
40
|
+
$[4] = t2;
|
|
41
|
+
} else t2 = $[4];
|
|
42
|
+
const t3 = following ? "outline" : "solid";
|
|
43
|
+
let t4;
|
|
44
|
+
if ($[5] !== t) {
|
|
45
|
+
t4 = t("follow.unfollow");
|
|
46
|
+
$[5] = t;
|
|
47
|
+
$[6] = t4;
|
|
48
|
+
} else t4 = $[6];
|
|
49
|
+
let t5;
|
|
50
|
+
if ($[7] !== t4) {
|
|
51
|
+
t5 = /* @__PURE__ */ jsx(Indicator, {
|
|
52
|
+
type: "on",
|
|
53
|
+
children: t4
|
|
54
|
+
});
|
|
55
|
+
$[7] = t4;
|
|
56
|
+
$[8] = t5;
|
|
57
|
+
} else t5 = $[8];
|
|
58
|
+
let t6;
|
|
59
|
+
if ($[9] !== t) {
|
|
60
|
+
t6 = t("follow.follow");
|
|
61
|
+
$[9] = t;
|
|
62
|
+
$[10] = t6;
|
|
63
|
+
} else t6 = $[10];
|
|
64
|
+
let t7;
|
|
65
|
+
if ($[11] !== t6) {
|
|
66
|
+
t7 = /* @__PURE__ */ jsx(Indicator, {
|
|
67
|
+
type: "off",
|
|
68
|
+
children: t6
|
|
69
|
+
});
|
|
70
|
+
$[11] = t6;
|
|
71
|
+
$[12] = t7;
|
|
72
|
+
} else t7 = $[12];
|
|
73
|
+
let t8;
|
|
74
|
+
if ($[13] !== following || $[14] !== t5 || $[15] !== t7) {
|
|
75
|
+
t8 = /* @__PURE__ */ jsxs(Root, {
|
|
76
|
+
motion: "slide",
|
|
77
|
+
swap: following,
|
|
78
|
+
children: [t5, t7]
|
|
79
|
+
});
|
|
80
|
+
$[13] = following;
|
|
81
|
+
$[14] = t5;
|
|
82
|
+
$[15] = t7;
|
|
83
|
+
$[16] = t8;
|
|
84
|
+
} else t8 = $[16];
|
|
85
|
+
let t9;
|
|
86
|
+
if ($[17] !== t3 || $[18] !== t8) {
|
|
87
|
+
t9 = /* @__PURE__ */ jsx(Button, {
|
|
88
|
+
onClick: t2,
|
|
89
|
+
size: "sm",
|
|
90
|
+
variant: t3,
|
|
91
|
+
children: t8
|
|
92
|
+
});
|
|
93
|
+
$[17] = t3;
|
|
94
|
+
$[18] = t8;
|
|
95
|
+
$[19] = t9;
|
|
96
|
+
} else t9 = $[19];
|
|
97
|
+
let t10;
|
|
98
|
+
if ($[20] !== t1 || $[21] !== t9) {
|
|
99
|
+
t10 = /* @__PURE__ */ jsxs(Group, {
|
|
100
|
+
align: "baseline",
|
|
101
|
+
gap: "md",
|
|
102
|
+
children: [t1, t9]
|
|
103
|
+
});
|
|
104
|
+
$[20] = t1;
|
|
105
|
+
$[21] = t9;
|
|
106
|
+
$[22] = t10;
|
|
107
|
+
} else t10 = $[22];
|
|
108
|
+
return t10;
|
|
109
|
+
}
|
|
110
|
+
function _temp$2(was) {
|
|
111
|
+
return !was;
|
|
112
|
+
}
|
|
113
|
+
const source$3 = "import { type ReactElement, useState } from \"react\";\n\nimport { Group } from \"@stealthscale/component-layout\";\nimport { Text } from \"@stealthscale/component-typography\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Button, Swap } from \"@stealthscale/component-actions\";\n\nexport function Follow(): ReactElement {\n const { t } = useWords(\"swap\");\n const [following, setFollowing] = useState(false);\n\n return (\n <Group align=\"baseline\" gap=\"md\">\n <Text weight=\"semibold\">{t(\"follow.person\")}</Text>\n <Button\n onClick={() => {\n setFollowing((was) => !was);\n }}\n size=\"sm\"\n variant={following ? \"outline\" : \"solid\"}\n >\n <Swap.Root motion=\"slide\" swap={following}>\n <Swap.Indicator type=\"on\">{t(\"follow.unfollow\")}</Swap.Indicator>\n <Swap.Indicator type=\"off\">{t(\"follow.follow\")}</Swap.Indicator>\n </Swap.Root>\n </Button>\n </Group>\n );\n}\n";
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/swap/examples/marks.example.tsx
|
|
116
|
+
var marks_example_exports = /* @__PURE__ */ __exportAll({
|
|
117
|
+
Marks: () => Marks,
|
|
118
|
+
source: () => source$2
|
|
119
|
+
});
|
|
120
|
+
function Marks(props) {
|
|
121
|
+
const $ = c(4);
|
|
122
|
+
let t0;
|
|
123
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
124
|
+
t0 = /* @__PURE__ */ jsx(Indicator, {
|
|
125
|
+
type: "on",
|
|
126
|
+
children: /* @__PURE__ */ jsx(MoonIcon, {
|
|
127
|
+
"aria-hidden": true,
|
|
128
|
+
size: "1.5em"
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
$[0] = t0;
|
|
132
|
+
} else t0 = $[0];
|
|
133
|
+
let t1;
|
|
134
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
135
|
+
t1 = /* @__PURE__ */ jsx(Indicator, {
|
|
136
|
+
type: "off",
|
|
137
|
+
children: /* @__PURE__ */ jsx(SunIcon, {
|
|
138
|
+
"aria-hidden": true,
|
|
139
|
+
size: "1.5em"
|
|
140
|
+
})
|
|
141
|
+
});
|
|
142
|
+
$[1] = t1;
|
|
143
|
+
} else t1 = $[1];
|
|
144
|
+
let t2;
|
|
145
|
+
if ($[2] !== props) {
|
|
146
|
+
t2 = /* @__PURE__ */ jsxs(Root, {
|
|
147
|
+
...props,
|
|
148
|
+
children: [t0, t1]
|
|
149
|
+
});
|
|
150
|
+
$[2] = props;
|
|
151
|
+
$[3] = t2;
|
|
152
|
+
} else t2 = $[3];
|
|
153
|
+
return t2;
|
|
154
|
+
}
|
|
155
|
+
const source$2 = "import { type ReactElement } from \"react\";\n\nimport { MoonIcon, SunIcon } from \"lucide-react\";\n\nimport { Swap } from \"@stealthscale/component-actions\";\n\nexport function Marks(props: Swap.RootProps): ReactElement {\n return (\n <Swap.Root {...props}>\n <Swap.Indicator type=\"on\">\n <MoonIcon aria-hidden size=\"1.5em\" />\n </Swap.Indicator>\n <Swap.Indicator type=\"off\">\n <SunIcon aria-hidden size=\"1.5em\" />\n </Swap.Indicator>\n </Swap.Root>\n );\n}\n";
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region src/swap/examples/mute.example.tsx
|
|
158
|
+
var mute_example_exports = /* @__PURE__ */ __exportAll({
|
|
159
|
+
Mute: () => Mute,
|
|
160
|
+
source: () => source$1
|
|
161
|
+
});
|
|
162
|
+
function Mute(props) {
|
|
163
|
+
const $ = c(12);
|
|
164
|
+
const { t } = useWords("swap");
|
|
165
|
+
const [muted, setMuted] = useState(false);
|
|
166
|
+
let t0;
|
|
167
|
+
if ($[0] !== t) {
|
|
168
|
+
t0 = t("mute.label");
|
|
169
|
+
$[0] = t;
|
|
170
|
+
$[1] = t0;
|
|
171
|
+
} else t0 = $[1];
|
|
172
|
+
let t1;
|
|
173
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
174
|
+
t1 = () => {
|
|
175
|
+
setMuted(_temp$1);
|
|
176
|
+
};
|
|
177
|
+
$[2] = t1;
|
|
178
|
+
} else t1 = $[2];
|
|
179
|
+
let t2;
|
|
180
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
181
|
+
t2 = /* @__PURE__ */ jsx(Indicator, {
|
|
182
|
+
type: "on",
|
|
183
|
+
children: /* @__PURE__ */ jsx(VolumeXIcon, {
|
|
184
|
+
"aria-hidden": true,
|
|
185
|
+
size: "1em"
|
|
186
|
+
})
|
|
187
|
+
});
|
|
188
|
+
$[3] = t2;
|
|
189
|
+
} else t2 = $[3];
|
|
190
|
+
let t3;
|
|
191
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
192
|
+
t3 = /* @__PURE__ */ jsx(Indicator, {
|
|
193
|
+
type: "off",
|
|
194
|
+
children: /* @__PURE__ */ jsx(Volume2Icon, {
|
|
195
|
+
"aria-hidden": true,
|
|
196
|
+
size: "1em"
|
|
197
|
+
})
|
|
198
|
+
});
|
|
199
|
+
$[4] = t3;
|
|
200
|
+
} else t3 = $[4];
|
|
201
|
+
let t4;
|
|
202
|
+
if ($[5] !== muted || $[6] !== props) {
|
|
203
|
+
t4 = /* @__PURE__ */ jsxs(Root, {
|
|
204
|
+
...props,
|
|
205
|
+
swap: muted,
|
|
206
|
+
children: [t2, t3]
|
|
207
|
+
});
|
|
208
|
+
$[5] = muted;
|
|
209
|
+
$[6] = props;
|
|
210
|
+
$[7] = t4;
|
|
211
|
+
} else t4 = $[7];
|
|
212
|
+
let t5;
|
|
213
|
+
if ($[8] !== muted || $[9] !== t0 || $[10] !== t4) {
|
|
214
|
+
t5 = /* @__PURE__ */ jsx(IconButton, {
|
|
215
|
+
"aria-label": t0,
|
|
216
|
+
"aria-pressed": muted,
|
|
217
|
+
onClick: t1,
|
|
218
|
+
variant: "outline",
|
|
219
|
+
children: t4
|
|
220
|
+
});
|
|
221
|
+
$[8] = muted;
|
|
222
|
+
$[9] = t0;
|
|
223
|
+
$[10] = t4;
|
|
224
|
+
$[11] = t5;
|
|
225
|
+
} else t5 = $[11];
|
|
226
|
+
return t5;
|
|
227
|
+
}
|
|
228
|
+
function _temp$1(was) {
|
|
229
|
+
return !was;
|
|
230
|
+
}
|
|
231
|
+
const source$1 = "import { type ReactElement, useState } from \"react\";\n\nimport { Volume2Icon, VolumeXIcon } from \"lucide-react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { IconButton, Swap } from \"@stealthscale/component-actions\";\n\nexport function Mute(props: Swap.RootProps): ReactElement {\n const { t } = useWords(\"swap\");\n const [muted, setMuted] = useState(false);\n\n return (\n <IconButton\n aria-label={t(\"mute.label\")}\n aria-pressed={muted}\n onClick={() => {\n setMuted((was) => !was);\n }}\n variant=\"outline\"\n >\n <Swap.Root {...props} swap={muted}>\n <Swap.Indicator type=\"on\">\n <VolumeXIcon aria-hidden size=\"1em\" />\n </Swap.Indicator>\n <Swap.Indicator type=\"off\">\n <Volume2Icon aria-hidden size=\"1em\" />\n </Swap.Indicator>\n </Swap.Root>\n </IconButton>\n );\n}\n";
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region src/swap/examples/playback.example.tsx
|
|
234
|
+
var playback_example_exports = /* @__PURE__ */ __exportAll({
|
|
235
|
+
Playback: () => Playback,
|
|
236
|
+
source: () => source
|
|
237
|
+
});
|
|
238
|
+
function Playback() {
|
|
239
|
+
const $ = c(11);
|
|
240
|
+
const { t } = useWords("swap");
|
|
241
|
+
const [playing, setPlaying] = useState(false);
|
|
242
|
+
let t0;
|
|
243
|
+
if ($[0] !== playing || $[1] !== t) {
|
|
244
|
+
t0 = playing ? t("playback.pause") : t("playback.play");
|
|
245
|
+
$[0] = playing;
|
|
246
|
+
$[1] = t;
|
|
247
|
+
$[2] = t0;
|
|
248
|
+
} else t0 = $[2];
|
|
249
|
+
let t1;
|
|
250
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
251
|
+
t1 = () => {
|
|
252
|
+
setPlaying(_temp);
|
|
253
|
+
};
|
|
254
|
+
$[3] = t1;
|
|
255
|
+
} else t1 = $[3];
|
|
256
|
+
let t2;
|
|
257
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
258
|
+
t2 = /* @__PURE__ */ jsx(Indicator, {
|
|
259
|
+
type: "on",
|
|
260
|
+
children: /* @__PURE__ */ jsx(PauseIcon, {
|
|
261
|
+
"aria-hidden": true,
|
|
262
|
+
size: "1em"
|
|
263
|
+
})
|
|
264
|
+
});
|
|
265
|
+
$[4] = t2;
|
|
266
|
+
} else t2 = $[4];
|
|
267
|
+
let t3;
|
|
268
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
269
|
+
t3 = /* @__PURE__ */ jsx(Indicator, {
|
|
270
|
+
type: "off",
|
|
271
|
+
children: /* @__PURE__ */ jsx(PlayIcon, {
|
|
272
|
+
"aria-hidden": true,
|
|
273
|
+
size: "1em"
|
|
274
|
+
})
|
|
275
|
+
});
|
|
276
|
+
$[5] = t3;
|
|
277
|
+
} else t3 = $[5];
|
|
278
|
+
let t4;
|
|
279
|
+
if ($[6] !== playing) {
|
|
280
|
+
t4 = /* @__PURE__ */ jsxs(Root, {
|
|
281
|
+
swap: playing,
|
|
282
|
+
children: [t2, t3]
|
|
283
|
+
});
|
|
284
|
+
$[6] = playing;
|
|
285
|
+
$[7] = t4;
|
|
286
|
+
} else t4 = $[7];
|
|
287
|
+
let t5;
|
|
288
|
+
if ($[8] !== t0 || $[9] !== t4) {
|
|
289
|
+
t5 = /* @__PURE__ */ jsx(IconButton, {
|
|
290
|
+
"aria-label": t0,
|
|
291
|
+
onClick: t1,
|
|
292
|
+
children: t4
|
|
293
|
+
});
|
|
294
|
+
$[8] = t0;
|
|
295
|
+
$[9] = t4;
|
|
296
|
+
$[10] = t5;
|
|
297
|
+
} else t5 = $[10];
|
|
298
|
+
return t5;
|
|
299
|
+
}
|
|
300
|
+
function _temp(was) {
|
|
301
|
+
return !was;
|
|
302
|
+
}
|
|
303
|
+
const source = "import { type ReactElement, useState } from \"react\";\n\nimport { PauseIcon, PlayIcon } from \"lucide-react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { IconButton, Swap } from \"@stealthscale/component-actions\";\n\nexport function Playback(): ReactElement {\n const { t } = useWords(\"swap\");\n const [playing, setPlaying] = useState(false);\n\n return (\n <IconButton\n aria-label={playing ? t(\"playback.pause\") : t(\"playback.play\")}\n onClick={() => {\n setPlaying((was) => !was);\n }}\n >\n <Swap.Root swap={playing}>\n <Swap.Indicator type=\"on\">\n <PauseIcon aria-hidden size=\"1em\" />\n </Swap.Indicator>\n <Swap.Indicator type=\"off\">\n <PlayIcon aria-hidden size=\"1em\" />\n </Swap.Indicator>\n </Swap.Root>\n </IconButton>\n );\n}\n";
|
|
304
|
+
//#endregion
|
|
305
|
+
//#region src/swap/swap.specimen.tsx
|
|
306
|
+
/**
|
|
307
|
+
* Catalogue page for the swap.
|
|
308
|
+
*
|
|
309
|
+
* @remarks
|
|
310
|
+
* `scenesOf` generates the motion scene from the mute example, whose button turns the mark over.
|
|
311
|
+
* The other scenes are hand-written: the states matrix shows both marks at rest, and the mute,
|
|
312
|
+
* playback and follow scenes each show one example. The mute and playback buttons render in a
|
|
313
|
+
* `Sample`, because a lone control in a scene card stretches to the card's width. The words are
|
|
314
|
+
* keys under `swap` in `locales/en/specimen/swap.json`.
|
|
315
|
+
*/
|
|
316
|
+
/**
|
|
317
|
+
* Values of `swap` the states scene shows.
|
|
318
|
+
*/
|
|
319
|
+
const SWAPS = [false, true];
|
|
320
|
+
/**
|
|
321
|
+
* Hand-written scene for both marks at rest.
|
|
322
|
+
*/
|
|
323
|
+
const states = {
|
|
324
|
+
about: "swap.states.about",
|
|
325
|
+
draw: () => /* @__PURE__ */ jsx(Matrix, {
|
|
326
|
+
knob: "swap",
|
|
327
|
+
of: SWAPS,
|
|
328
|
+
children: (swap) => /* @__PURE__ */ jsx(Marks, { swap })
|
|
329
|
+
}),
|
|
330
|
+
example: marks_example_exports,
|
|
331
|
+
props: { swap: false },
|
|
332
|
+
title: "swap.states.title"
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* Hand-written scene for a toggle button that keeps one name.
|
|
336
|
+
*/
|
|
337
|
+
const toggle = {
|
|
338
|
+
about: "swap.mute.about",
|
|
339
|
+
draw: () => /* @__PURE__ */ jsx(Sample, { children: /* @__PURE__ */ jsx(Mute, {}) }),
|
|
340
|
+
example: mute_example_exports,
|
|
341
|
+
title: "swap.mute.title"
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* Hand-written scene for a button whose name follows the mark.
|
|
345
|
+
*/
|
|
346
|
+
const named = {
|
|
347
|
+
about: "swap.playback.about",
|
|
348
|
+
draw: () => /* @__PURE__ */ jsx(Sample, { children: /* @__PURE__ */ jsx(Playback, {}) }),
|
|
349
|
+
example: playback_example_exports,
|
|
350
|
+
title: "swap.playback.title"
|
|
351
|
+
};
|
|
352
|
+
/**
|
|
353
|
+
* Hand-written scene for two words in one place.
|
|
354
|
+
*/
|
|
355
|
+
const words = {
|
|
356
|
+
about: "swap.follow.about",
|
|
357
|
+
draw: Follow,
|
|
358
|
+
example: follow_example_exports,
|
|
359
|
+
title: "swap.follow.title"
|
|
360
|
+
};
|
|
361
|
+
var swap_specimen_default = specimen({
|
|
362
|
+
about: "swap.about",
|
|
363
|
+
id: "components/actions/swap",
|
|
364
|
+
imports: "import { Swap } from \"@stealthscale/component-actions\";",
|
|
365
|
+
scenes: [
|
|
366
|
+
states,
|
|
367
|
+
toggle,
|
|
368
|
+
named,
|
|
369
|
+
words,
|
|
370
|
+
...scenesOf(recipe, {
|
|
371
|
+
draw: (props) => /* @__PURE__ */ jsx(Mute, { ...props }),
|
|
372
|
+
example: mute_example_exports,
|
|
373
|
+
namespace: "swap"
|
|
374
|
+
})
|
|
375
|
+
],
|
|
376
|
+
title: "swap.title"
|
|
377
|
+
});
|
|
378
|
+
//#endregion
|
|
379
|
+
export { swap_specimen_default as default, named, states, toggle, words };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const dropped = {"IndicatorProps": {"conditions": 284, "foreign": 1040}, "RootProps": {"conditions": 284, "foreign": 1041}, "ButtonProps": {"conditions": 284, "foreign": 1051}, "IconButtonProps": {"conditions": 284, "foreign": 1049}};
|
|
2
|
+
export const parts = {"IndicatorProps": [{"accepts": "\"off\" | \"on\"", "fallback": "", "kind": "option", "name": "type", "refers": [], "required": true, "says": "Which mark this is: `on` shows while the root's `swap` is true, `off` while it is false."}], "RootProps": [{"accepts": "boolean", "fallback": "", "kind": "option", "name": "lazyMount", "refers": [], "required": false, "says": "Whether a mark renders nothing until it first shows. False unless the caller passes true."}, {"accepts": "\"fade\" | \"none\" | \"scale\" | \"slide\"", "fallback": "", "kind": "variant", "name": "motion", "refers": [], "required": false, "says": "Motion the marks replace each other with."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "swap", "refers": [], "required": false, "says": "Whether the `on` mark shows. False unless the caller passes true, which shows the `off` mark."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "unmountOnExit", "refers": [], "required": false, "says": "Whether a mark renders nothing once its exit motion ends. False unless the caller passes true."}], "ButtonProps": [{"accepts": "\"glow\" | \"pulse\"", "fallback": "", "kind": "variant", "name": "effect", "refers": [], "required": false, "says": "The halo around the button, in the palette's solid at half opacity."}, {"accepts": "Lift", "fallback": "", "kind": "variant", "name": "elevation", "refers": ["kit.Lift"], "required": false, "says": ""}, {"accepts": "\"accent\" | \"error\" | \"info\" | \"neutral\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"", "fallback": "", "kind": "variant", "name": "palette", "refers": [], "required": false, "says": "Palette of every look. The base sets `primary`."}, {"accepts": "\"square\"", "fallback": "", "kind": "variant", "name": "shape", "refers": [], "required": false, "says": ""}, {"accepts": "Scale", "fallback": "", "kind": "variant", "name": "size", "refers": ["kit.Scale"], "required": false, "says": ""}, {"accepts": "\"ghost\" | \"glass\" | \"outline\" | \"plain\" | \"solid\" | \"subtle\" | \"surface\"", "fallback": "", "kind": "variant", "name": "variant", "refers": [], "required": false, "says": ""}], "IconButtonProps": [{"accepts": "string", "fallback": "", "kind": "option", "name": "aria-label", "refers": [], "required": false, "says": "Defines a string value that labels the current element. The accessible name a screen reader announces in place of the icon."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "aria-labelledby", "refers": [], "required": false, "says": "Identifies the element (or elements) that labels the current element. The id of the element whose text names the control."}, {"accepts": "\"glow\" | \"pulse\"", "fallback": "", "kind": "variant", "name": "effect", "refers": [], "required": false, "says": "The halo around the button, in the palette's solid at half opacity."}, {"accepts": "Lift", "fallback": "", "kind": "variant", "name": "elevation", "refers": ["kit.Lift"], "required": false, "says": ""}, {"accepts": "\"accent\" | \"error\" | \"info\" | \"neutral\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"", "fallback": "", "kind": "variant", "name": "palette", "refers": [], "required": false, "says": "Palette of every look. The base sets `primary`."}, {"accepts": "\"square\"", "fallback": "", "kind": "variant", "name": "shape", "refers": [], "required": false, "says": ""}, {"accepts": "Scale", "fallback": "", "kind": "variant", "name": "size", "refers": ["kit.Scale"], "required": false, "says": ""}, {"accepts": "\"ghost\" | \"glass\" | \"outline\" | \"plain\" | \"solid\" | \"subtle\" | \"surface\"", "fallback": "", "kind": "variant", "name": "variant", "refers": [], "required": false, "says": ""}]};
|
|
3
|
+
export const shapes = {"kit.Lift": [{"accepts": "", "name": "\"floating\"", "says": ""}, {"accepts": "", "name": "\"raised\"", "says": ""}], "kit.Scale": [{"accepts": "", "name": "\"2xl\"", "says": ""}, {"accepts": "", "name": "\"3xl\"", "says": ""}, {"accepts": "", "name": "\"4xl\"", "says": ""}, {"accepts": "", "name": "\"lg\"", "says": ""}, {"accepts": "", "name": "\"md\"", "says": ""}, {"accepts": "", "name": "\"sm\"", "says": ""}, {"accepts": "", "name": "\"xl\"", "says": ""}, {"accepts": "", "name": "\"xs\"", "says": ""}]};
|