@stealthscale/component-disclosure 0.2.3 → 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 +1 -1
- 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 +9 -8
- /package/dist/{recipe-95yCB2V3.js → recipes-95yCB2V3.js} +0 -0
|
@@ -0,0 +1,1103 @@
|
|
|
1
|
+
import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { u as recipe } from "../../recipes-95yCB2V3.js";
|
|
3
|
+
import { _t as ContextTrigger, at as Positioner, bt as ArrowTip, ct as ItemText, dt as ItemIndicator, ft as ItemGroup, gt as Indicator, ht as ItemCommand, it as Root, lt as ItemMark, mt as ItemDescription, nt as TriggerItem, ot as OptionItem, pt as ItemGroupLabel, rt as Separator, st as Item, tt as Trigger, ut as ItemLines, vt as Content, yt as Arrow } 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 { Portal } from "@stealthscale/component-primitives";
|
|
8
|
+
import { Matrix, Sample, scenesOf, specimen, useWords } from "@stealthscale/specimen";
|
|
9
|
+
import { ArrowDownWideNarrowIcon, ArrowUpNarrowWideIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronsUpDownIcon, CopyIcon, EllipsisIcon, EyeOffIcon, FolderInputIcon, PinIcon, PlusIcon, SettingsIcon, TrashIcon } from "lucide-react";
|
|
10
|
+
import { Button, ButtonPropsProvider, IconButton } from "@stealthscale/component-actions";
|
|
11
|
+
//#region src/menu/examples/actions.example.tsx
|
|
12
|
+
var actions_example_exports = /* @__PURE__ */ __exportAll({
|
|
13
|
+
Actions: () => Actions,
|
|
14
|
+
source: () => source$5
|
|
15
|
+
});
|
|
16
|
+
const FORMATS = [
|
|
17
|
+
"csv",
|
|
18
|
+
"json",
|
|
19
|
+
"pdf"
|
|
20
|
+
];
|
|
21
|
+
function Actions(props) {
|
|
22
|
+
const $ = c(56);
|
|
23
|
+
const { t } = useWords("menu");
|
|
24
|
+
const [notified, setNotified] = useState(true);
|
|
25
|
+
let t0;
|
|
26
|
+
if ($[0] !== t) {
|
|
27
|
+
t0 = t("actions");
|
|
28
|
+
$[0] = t;
|
|
29
|
+
$[1] = t0;
|
|
30
|
+
} else t0 = $[1];
|
|
31
|
+
let t1;
|
|
32
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
33
|
+
t1 = /* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: "1em" }) });
|
|
34
|
+
$[2] = t1;
|
|
35
|
+
} else t1 = $[2];
|
|
36
|
+
let t2;
|
|
37
|
+
if ($[3] !== t0) {
|
|
38
|
+
t2 = /* @__PURE__ */ jsxs(Trigger, {
|
|
39
|
+
as: Button,
|
|
40
|
+
children: [t0, t1]
|
|
41
|
+
});
|
|
42
|
+
$[3] = t0;
|
|
43
|
+
$[4] = t2;
|
|
44
|
+
} else t2 = $[4];
|
|
45
|
+
let t3;
|
|
46
|
+
if ($[5] !== t) {
|
|
47
|
+
t3 = t("payout");
|
|
48
|
+
$[5] = t;
|
|
49
|
+
$[6] = t3;
|
|
50
|
+
} else t3 = $[6];
|
|
51
|
+
let t4;
|
|
52
|
+
if ($[7] !== t3) {
|
|
53
|
+
t4 = /* @__PURE__ */ jsx(ItemGroupLabel, {
|
|
54
|
+
value: "payout",
|
|
55
|
+
children: t3
|
|
56
|
+
});
|
|
57
|
+
$[7] = t3;
|
|
58
|
+
$[8] = t4;
|
|
59
|
+
} else t4 = $[8];
|
|
60
|
+
let t5;
|
|
61
|
+
if ($[9] !== t) {
|
|
62
|
+
t5 = t("release");
|
|
63
|
+
$[9] = t;
|
|
64
|
+
$[10] = t5;
|
|
65
|
+
} else t5 = $[10];
|
|
66
|
+
let t6;
|
|
67
|
+
if ($[11] !== t5) {
|
|
68
|
+
t6 = /* @__PURE__ */ jsx(Item, {
|
|
69
|
+
value: "release",
|
|
70
|
+
children: t5
|
|
71
|
+
});
|
|
72
|
+
$[11] = t5;
|
|
73
|
+
$[12] = t6;
|
|
74
|
+
} else t6 = $[12];
|
|
75
|
+
let t7;
|
|
76
|
+
if ($[13] !== t) {
|
|
77
|
+
t7 = t("hold");
|
|
78
|
+
$[13] = t;
|
|
79
|
+
$[14] = t7;
|
|
80
|
+
} else t7 = $[14];
|
|
81
|
+
let t8;
|
|
82
|
+
if ($[15] !== t7) {
|
|
83
|
+
t8 = /* @__PURE__ */ jsx(Item, {
|
|
84
|
+
value: "hold",
|
|
85
|
+
children: t7
|
|
86
|
+
});
|
|
87
|
+
$[15] = t7;
|
|
88
|
+
$[16] = t8;
|
|
89
|
+
} else t8 = $[16];
|
|
90
|
+
let t9;
|
|
91
|
+
if ($[17] !== t) {
|
|
92
|
+
t9 = t("void");
|
|
93
|
+
$[17] = t;
|
|
94
|
+
$[18] = t9;
|
|
95
|
+
} else t9 = $[18];
|
|
96
|
+
let t10;
|
|
97
|
+
if ($[19] !== t9) {
|
|
98
|
+
t10 = /* @__PURE__ */ jsx(Item, {
|
|
99
|
+
tone: "critical",
|
|
100
|
+
value: "void",
|
|
101
|
+
children: t9
|
|
102
|
+
});
|
|
103
|
+
$[19] = t9;
|
|
104
|
+
$[20] = t10;
|
|
105
|
+
} else t10 = $[20];
|
|
106
|
+
let t11;
|
|
107
|
+
if ($[21] !== t10 || $[22] !== t4 || $[23] !== t6 || $[24] !== t8) {
|
|
108
|
+
t11 = /* @__PURE__ */ jsxs(ItemGroup, {
|
|
109
|
+
value: "payout",
|
|
110
|
+
children: [
|
|
111
|
+
t4,
|
|
112
|
+
t6,
|
|
113
|
+
t8,
|
|
114
|
+
t10
|
|
115
|
+
]
|
|
116
|
+
});
|
|
117
|
+
$[21] = t10;
|
|
118
|
+
$[22] = t4;
|
|
119
|
+
$[23] = t6;
|
|
120
|
+
$[24] = t8;
|
|
121
|
+
$[25] = t11;
|
|
122
|
+
} else t11 = $[25];
|
|
123
|
+
let t12;
|
|
124
|
+
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
125
|
+
t12 = /* @__PURE__ */ jsx(Separator, {});
|
|
126
|
+
$[26] = t12;
|
|
127
|
+
} else t12 = $[26];
|
|
128
|
+
let t13;
|
|
129
|
+
if ($[27] !== t) {
|
|
130
|
+
t13 = t("notify");
|
|
131
|
+
$[27] = t;
|
|
132
|
+
$[28] = t13;
|
|
133
|
+
} else t13 = $[28];
|
|
134
|
+
let t14;
|
|
135
|
+
if ($[29] !== t13) {
|
|
136
|
+
t14 = /* @__PURE__ */ jsx(ItemText, { children: t13 });
|
|
137
|
+
$[29] = t13;
|
|
138
|
+
$[30] = t14;
|
|
139
|
+
} else t14 = $[30];
|
|
140
|
+
let t15;
|
|
141
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
142
|
+
t15 = /* @__PURE__ */ jsx(ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { size: "1em" }) });
|
|
143
|
+
$[31] = t15;
|
|
144
|
+
} else t15 = $[31];
|
|
145
|
+
let t16;
|
|
146
|
+
if ($[32] !== notified || $[33] !== t14) {
|
|
147
|
+
t16 = /* @__PURE__ */ jsxs(OptionItem, {
|
|
148
|
+
checked: notified,
|
|
149
|
+
onCheckedChange: setNotified,
|
|
150
|
+
type: "checkbox",
|
|
151
|
+
value: "notify",
|
|
152
|
+
children: [t14, t15]
|
|
153
|
+
});
|
|
154
|
+
$[32] = notified;
|
|
155
|
+
$[33] = t14;
|
|
156
|
+
$[34] = t16;
|
|
157
|
+
} else t16 = $[34];
|
|
158
|
+
let t17;
|
|
159
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
160
|
+
t17 = /* @__PURE__ */ jsx(Separator, {});
|
|
161
|
+
$[35] = t17;
|
|
162
|
+
} else t17 = $[35];
|
|
163
|
+
let t18;
|
|
164
|
+
if ($[36] !== t) {
|
|
165
|
+
t18 = t("export");
|
|
166
|
+
$[36] = t;
|
|
167
|
+
$[37] = t18;
|
|
168
|
+
} else t18 = $[37];
|
|
169
|
+
let t19;
|
|
170
|
+
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
|
171
|
+
t19 = /* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(ChevronRightIcon, { size: "1em" }) });
|
|
172
|
+
$[38] = t19;
|
|
173
|
+
} else t19 = $[38];
|
|
174
|
+
let t20;
|
|
175
|
+
if ($[39] !== t18) {
|
|
176
|
+
t20 = /* @__PURE__ */ jsxs(TriggerItem, { children: [t18, t19] });
|
|
177
|
+
$[39] = t18;
|
|
178
|
+
$[40] = t20;
|
|
179
|
+
} else t20 = $[40];
|
|
180
|
+
let t21;
|
|
181
|
+
if ($[41] !== t) {
|
|
182
|
+
t21 = FORMATS.map((format) => /* @__PURE__ */ jsx(Item, {
|
|
183
|
+
value: format,
|
|
184
|
+
children: t(format)
|
|
185
|
+
}, format));
|
|
186
|
+
$[41] = t;
|
|
187
|
+
$[42] = t21;
|
|
188
|
+
} else t21 = $[42];
|
|
189
|
+
let t22;
|
|
190
|
+
if ($[43] !== t21) {
|
|
191
|
+
t22 = /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Positioner, { children: /* @__PURE__ */ jsx(Content, { children: t21 }) }) });
|
|
192
|
+
$[43] = t21;
|
|
193
|
+
$[44] = t22;
|
|
194
|
+
} else t22 = $[44];
|
|
195
|
+
let t23;
|
|
196
|
+
if ($[45] !== t20 || $[46] !== t22) {
|
|
197
|
+
t23 = /* @__PURE__ */ jsxs(Root, { children: [t20, t22] });
|
|
198
|
+
$[45] = t20;
|
|
199
|
+
$[46] = t22;
|
|
200
|
+
$[47] = t23;
|
|
201
|
+
} else t23 = $[47];
|
|
202
|
+
let t24;
|
|
203
|
+
if ($[48] !== t11 || $[49] !== t16 || $[50] !== t23) {
|
|
204
|
+
t24 = /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Positioner, { children: /* @__PURE__ */ jsxs(Content, { children: [
|
|
205
|
+
t11,
|
|
206
|
+
t12,
|
|
207
|
+
t16,
|
|
208
|
+
t17,
|
|
209
|
+
t23
|
|
210
|
+
] }) }) });
|
|
211
|
+
$[48] = t11;
|
|
212
|
+
$[49] = t16;
|
|
213
|
+
$[50] = t23;
|
|
214
|
+
$[51] = t24;
|
|
215
|
+
} else t24 = $[51];
|
|
216
|
+
let t25;
|
|
217
|
+
if ($[52] !== props || $[53] !== t2 || $[54] !== t24) {
|
|
218
|
+
t25 = /* @__PURE__ */ jsxs(Root, {
|
|
219
|
+
...props,
|
|
220
|
+
children: [t2, t24]
|
|
221
|
+
});
|
|
222
|
+
$[52] = props;
|
|
223
|
+
$[53] = t2;
|
|
224
|
+
$[54] = t24;
|
|
225
|
+
$[55] = t25;
|
|
226
|
+
} else t25 = $[55];
|
|
227
|
+
return t25;
|
|
228
|
+
}
|
|
229
|
+
const source$5 = "import { type ReactElement, useState } from \"react\";\n\nimport { CheckIcon, ChevronDownIcon, ChevronRightIcon } from \"lucide-react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Portal } from \"@stealthscale/component-primitives\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Menu } from \"@stealthscale/component-disclosure\";\n\nconst FORMATS = [\"csv\", \"json\", \"pdf\"] as const;\n\nexport function Actions(props: Menu.RootProps): ReactElement {\n const { t } = useWords(\"menu\");\n const [notified, setNotified] = useState(true);\n\n return (\n <Menu.Root {...props}>\n <Menu.Trigger as={Button}>\n {t(\"actions\")}\n <Menu.Indicator>\n <ChevronDownIcon size=\"1em\" />\n </Menu.Indicator>\n </Menu.Trigger>\n <Portal>\n <Menu.Positioner>\n <Menu.Content>\n <Menu.ItemGroup value=\"payout\">\n <Menu.ItemGroupLabel value=\"payout\">{t(\"payout\")}</Menu.ItemGroupLabel>\n <Menu.Item value=\"release\">{t(\"release\")}</Menu.Item>\n <Menu.Item value=\"hold\">{t(\"hold\")}</Menu.Item>\n <Menu.Item tone=\"critical\" value=\"void\">\n {t(\"void\")}\n </Menu.Item>\n </Menu.ItemGroup>\n <Menu.Separator />\n <Menu.OptionItem\n checked={notified}\n onCheckedChange={setNotified}\n type=\"checkbox\"\n value=\"notify\"\n >\n <Menu.ItemText>{t(\"notify\")}</Menu.ItemText>\n <Menu.ItemIndicator>\n <CheckIcon size=\"1em\" />\n </Menu.ItemIndicator>\n </Menu.OptionItem>\n <Menu.Separator />\n <Menu.Root>\n <Menu.TriggerItem>\n {t(\"export\")}\n <Menu.Indicator>\n <ChevronRightIcon size=\"1em\" />\n </Menu.Indicator>\n </Menu.TriggerItem>\n <Portal>\n <Menu.Positioner>\n <Menu.Content>\n {FORMATS.map((format) => (\n <Menu.Item key={format} value={format}>\n {t(format)}\n </Menu.Item>\n ))}\n </Menu.Content>\n </Menu.Positioner>\n </Portal>\n </Menu.Root>\n </Menu.Content>\n </Menu.Positioner>\n </Portal>\n </Menu.Root>\n );\n}\n";
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region src/menu/examples/card.example.tsx
|
|
232
|
+
var card_example_exports = /* @__PURE__ */ __exportAll({
|
|
233
|
+
Card: () => Card,
|
|
234
|
+
source: () => source$4
|
|
235
|
+
});
|
|
236
|
+
function Card(props) {
|
|
237
|
+
const $ = c(55);
|
|
238
|
+
const { t } = useWords("menu");
|
|
239
|
+
const [pinned, setPinned] = useState(true);
|
|
240
|
+
let t0;
|
|
241
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
242
|
+
t0 = {
|
|
243
|
+
size: "lg",
|
|
244
|
+
variant: "subtle"
|
|
245
|
+
};
|
|
246
|
+
$[0] = t0;
|
|
247
|
+
} else t0 = $[0];
|
|
248
|
+
let t1;
|
|
249
|
+
if ($[1] !== t) {
|
|
250
|
+
t1 = t("rightClickCard");
|
|
251
|
+
$[1] = t;
|
|
252
|
+
$[2] = t1;
|
|
253
|
+
} else t1 = $[2];
|
|
254
|
+
let t2;
|
|
255
|
+
if ($[3] !== t1) {
|
|
256
|
+
t2 = /* @__PURE__ */ jsx(ButtonPropsProvider, {
|
|
257
|
+
value: t0,
|
|
258
|
+
children: /* @__PURE__ */ jsx(ContextTrigger, {
|
|
259
|
+
as: Button,
|
|
260
|
+
children: t1
|
|
261
|
+
})
|
|
262
|
+
});
|
|
263
|
+
$[3] = t1;
|
|
264
|
+
$[4] = t2;
|
|
265
|
+
} else t2 = $[4];
|
|
266
|
+
let t3;
|
|
267
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
268
|
+
t3 = /* @__PURE__ */ jsx(CopyIcon, { size: "1em" });
|
|
269
|
+
$[5] = t3;
|
|
270
|
+
} else t3 = $[5];
|
|
271
|
+
let t4;
|
|
272
|
+
if ($[6] !== t) {
|
|
273
|
+
t4 = t("copy");
|
|
274
|
+
$[6] = t;
|
|
275
|
+
$[7] = t4;
|
|
276
|
+
} else t4 = $[7];
|
|
277
|
+
let t5;
|
|
278
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
279
|
+
t5 = /* @__PURE__ */ jsx(ItemCommand, { children: "⌘C" });
|
|
280
|
+
$[8] = t5;
|
|
281
|
+
} else t5 = $[8];
|
|
282
|
+
let t6;
|
|
283
|
+
if ($[9] !== t4) {
|
|
284
|
+
t6 = /* @__PURE__ */ jsxs(Item, {
|
|
285
|
+
value: "copy",
|
|
286
|
+
children: [
|
|
287
|
+
t3,
|
|
288
|
+
t4,
|
|
289
|
+
t5
|
|
290
|
+
]
|
|
291
|
+
});
|
|
292
|
+
$[9] = t4;
|
|
293
|
+
$[10] = t6;
|
|
294
|
+
} else t6 = $[10];
|
|
295
|
+
let t7;
|
|
296
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
297
|
+
t7 = /* @__PURE__ */ jsx(PinIcon, { size: "1em" });
|
|
298
|
+
$[11] = t7;
|
|
299
|
+
} else t7 = $[11];
|
|
300
|
+
let t8;
|
|
301
|
+
if ($[12] !== t) {
|
|
302
|
+
t8 = t("keepTop");
|
|
303
|
+
$[12] = t;
|
|
304
|
+
$[13] = t8;
|
|
305
|
+
} else t8 = $[13];
|
|
306
|
+
let t9;
|
|
307
|
+
if ($[14] !== t8) {
|
|
308
|
+
t9 = /* @__PURE__ */ jsx(ItemText, { children: t8 });
|
|
309
|
+
$[14] = t8;
|
|
310
|
+
$[15] = t9;
|
|
311
|
+
} else t9 = $[15];
|
|
312
|
+
let t10;
|
|
313
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
314
|
+
t10 = /* @__PURE__ */ jsx(ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { size: "1em" }) });
|
|
315
|
+
$[16] = t10;
|
|
316
|
+
} else t10 = $[16];
|
|
317
|
+
let t11;
|
|
318
|
+
if ($[17] !== pinned || $[18] !== t9) {
|
|
319
|
+
t11 = /* @__PURE__ */ jsxs(OptionItem, {
|
|
320
|
+
checked: pinned,
|
|
321
|
+
onCheckedChange: setPinned,
|
|
322
|
+
type: "checkbox",
|
|
323
|
+
value: "pin",
|
|
324
|
+
children: [
|
|
325
|
+
t7,
|
|
326
|
+
t9,
|
|
327
|
+
t10
|
|
328
|
+
]
|
|
329
|
+
});
|
|
330
|
+
$[17] = pinned;
|
|
331
|
+
$[18] = t9;
|
|
332
|
+
$[19] = t11;
|
|
333
|
+
} else t11 = $[19];
|
|
334
|
+
let t12;
|
|
335
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
336
|
+
t12 = /* @__PURE__ */ jsx(FolderInputIcon, { size: "1em" });
|
|
337
|
+
$[20] = t12;
|
|
338
|
+
} else t12 = $[20];
|
|
339
|
+
let t13;
|
|
340
|
+
if ($[21] !== t) {
|
|
341
|
+
t13 = t("moveTo");
|
|
342
|
+
$[21] = t;
|
|
343
|
+
$[22] = t13;
|
|
344
|
+
} else t13 = $[22];
|
|
345
|
+
let t14;
|
|
346
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
347
|
+
t14 = /* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(ChevronRightIcon, { size: "1em" }) });
|
|
348
|
+
$[23] = t14;
|
|
349
|
+
} else t14 = $[23];
|
|
350
|
+
let t15;
|
|
351
|
+
if ($[24] !== t13) {
|
|
352
|
+
t15 = /* @__PURE__ */ jsxs(TriggerItem, { children: [
|
|
353
|
+
t12,
|
|
354
|
+
t13,
|
|
355
|
+
t14
|
|
356
|
+
] });
|
|
357
|
+
$[24] = t13;
|
|
358
|
+
$[25] = t15;
|
|
359
|
+
} else t15 = $[25];
|
|
360
|
+
let t16;
|
|
361
|
+
if ($[26] !== t) {
|
|
362
|
+
t16 = t("archive");
|
|
363
|
+
$[26] = t;
|
|
364
|
+
$[27] = t16;
|
|
365
|
+
} else t16 = $[27];
|
|
366
|
+
let t17;
|
|
367
|
+
if ($[28] !== t16) {
|
|
368
|
+
t17 = /* @__PURE__ */ jsx(Item, {
|
|
369
|
+
value: "archive",
|
|
370
|
+
children: t16
|
|
371
|
+
});
|
|
372
|
+
$[28] = t16;
|
|
373
|
+
$[29] = t17;
|
|
374
|
+
} else t17 = $[29];
|
|
375
|
+
let t18;
|
|
376
|
+
if ($[30] !== t) {
|
|
377
|
+
t18 = t("drafts");
|
|
378
|
+
$[30] = t;
|
|
379
|
+
$[31] = t18;
|
|
380
|
+
} else t18 = $[31];
|
|
381
|
+
let t19;
|
|
382
|
+
if ($[32] !== t18) {
|
|
383
|
+
t19 = /* @__PURE__ */ jsx(Item, {
|
|
384
|
+
value: "drafts",
|
|
385
|
+
children: t18
|
|
386
|
+
});
|
|
387
|
+
$[32] = t18;
|
|
388
|
+
$[33] = t19;
|
|
389
|
+
} else t19 = $[33];
|
|
390
|
+
let t20;
|
|
391
|
+
if ($[34] !== t17 || $[35] !== t19) {
|
|
392
|
+
t20 = /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Positioner, { children: /* @__PURE__ */ jsxs(Content, { children: [t17, t19] }) }) });
|
|
393
|
+
$[34] = t17;
|
|
394
|
+
$[35] = t19;
|
|
395
|
+
$[36] = t20;
|
|
396
|
+
} else t20 = $[36];
|
|
397
|
+
let t21;
|
|
398
|
+
if ($[37] !== t15 || $[38] !== t20) {
|
|
399
|
+
t21 = /* @__PURE__ */ jsxs(Root, { children: [t15, t20] });
|
|
400
|
+
$[37] = t15;
|
|
401
|
+
$[38] = t20;
|
|
402
|
+
$[39] = t21;
|
|
403
|
+
} else t21 = $[39];
|
|
404
|
+
let t22;
|
|
405
|
+
if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
|
|
406
|
+
t22 = /* @__PURE__ */ jsx(Separator, {});
|
|
407
|
+
$[40] = t22;
|
|
408
|
+
} else t22 = $[40];
|
|
409
|
+
let t23;
|
|
410
|
+
if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
|
|
411
|
+
t23 = /* @__PURE__ */ jsx(TrashIcon, { size: "1em" });
|
|
412
|
+
$[41] = t23;
|
|
413
|
+
} else t23 = $[41];
|
|
414
|
+
let t24;
|
|
415
|
+
if ($[42] !== t) {
|
|
416
|
+
t24 = t("delete");
|
|
417
|
+
$[42] = t;
|
|
418
|
+
$[43] = t24;
|
|
419
|
+
} else t24 = $[43];
|
|
420
|
+
let t25;
|
|
421
|
+
if ($[44] !== t24) {
|
|
422
|
+
t25 = /* @__PURE__ */ jsxs(Item, {
|
|
423
|
+
tone: "critical",
|
|
424
|
+
value: "delete",
|
|
425
|
+
children: [t23, t24]
|
|
426
|
+
});
|
|
427
|
+
$[44] = t24;
|
|
428
|
+
$[45] = t25;
|
|
429
|
+
} else t25 = $[45];
|
|
430
|
+
let t26;
|
|
431
|
+
if ($[46] !== t11 || $[47] !== t21 || $[48] !== t25 || $[49] !== t6) {
|
|
432
|
+
t26 = /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Positioner, { children: /* @__PURE__ */ jsxs(Content, { children: [
|
|
433
|
+
t6,
|
|
434
|
+
t11,
|
|
435
|
+
t21,
|
|
436
|
+
t22,
|
|
437
|
+
t25
|
|
438
|
+
] }) }) });
|
|
439
|
+
$[46] = t11;
|
|
440
|
+
$[47] = t21;
|
|
441
|
+
$[48] = t25;
|
|
442
|
+
$[49] = t6;
|
|
443
|
+
$[50] = t26;
|
|
444
|
+
} else t26 = $[50];
|
|
445
|
+
let t27;
|
|
446
|
+
if ($[51] !== props || $[52] !== t2 || $[53] !== t26) {
|
|
447
|
+
t27 = /* @__PURE__ */ jsxs(Root, {
|
|
448
|
+
...props,
|
|
449
|
+
children: [t2, t26]
|
|
450
|
+
});
|
|
451
|
+
$[51] = props;
|
|
452
|
+
$[52] = t2;
|
|
453
|
+
$[53] = t26;
|
|
454
|
+
$[54] = t27;
|
|
455
|
+
} else t27 = $[54];
|
|
456
|
+
return t27;
|
|
457
|
+
}
|
|
458
|
+
const source$4 = "import { type ReactElement, useState } from \"react\";\n\nimport {\n CheckIcon,\n ChevronRightIcon,\n CopyIcon,\n FolderInputIcon,\n PinIcon,\n TrashIcon,\n} from \"lucide-react\";\n\nimport { Button, ButtonPropsProvider } from \"@stealthscale/component-actions\";\nimport { Portal } from \"@stealthscale/component-primitives\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Menu } from \"@stealthscale/component-disclosure\";\n\nexport function Card(props: Menu.RootProps): ReactElement {\n const { t } = useWords(\"menu\");\n const [pinned, setPinned] = useState(true);\n\n return (\n <Menu.Root {...props}>\n <ButtonPropsProvider value={{ size: \"lg\", variant: \"subtle\" }}>\n <Menu.ContextTrigger as={Button}>{t(\"rightClickCard\")}</Menu.ContextTrigger>\n </ButtonPropsProvider>\n <Portal>\n <Menu.Positioner>\n <Menu.Content>\n <Menu.Item value=\"copy\">\n <CopyIcon size=\"1em\" />\n {t(\"copy\")}\n <Menu.ItemCommand>⌘C</Menu.ItemCommand>\n </Menu.Item>\n <Menu.OptionItem\n checked={pinned}\n onCheckedChange={setPinned}\n type=\"checkbox\"\n value=\"pin\"\n >\n <PinIcon size=\"1em\" />\n <Menu.ItemText>{t(\"keepTop\")}</Menu.ItemText>\n <Menu.ItemIndicator>\n <CheckIcon size=\"1em\" />\n </Menu.ItemIndicator>\n </Menu.OptionItem>\n <Menu.Root>\n <Menu.TriggerItem>\n <FolderInputIcon size=\"1em\" />\n {t(\"moveTo\")}\n <Menu.Indicator>\n <ChevronRightIcon size=\"1em\" />\n </Menu.Indicator>\n </Menu.TriggerItem>\n <Portal>\n <Menu.Positioner>\n <Menu.Content>\n <Menu.Item value=\"archive\">{t(\"archive\")}</Menu.Item>\n <Menu.Item value=\"drafts\">{t(\"drafts\")}</Menu.Item>\n </Menu.Content>\n </Menu.Positioner>\n </Portal>\n </Menu.Root>\n <Menu.Separator />\n <Menu.Item tone=\"critical\" value=\"delete\">\n <TrashIcon size=\"1em\" />\n {t(\"delete\")}\n </Menu.Item>\n </Menu.Content>\n </Menu.Positioner>\n </Portal>\n </Menu.Root>\n );\n}\n";
|
|
459
|
+
//#endregion
|
|
460
|
+
//#region src/menu/examples/column.example.tsx
|
|
461
|
+
var column_example_exports = /* @__PURE__ */ __exportAll({
|
|
462
|
+
Column: () => Column,
|
|
463
|
+
source: () => source$3
|
|
464
|
+
});
|
|
465
|
+
function Column(props) {
|
|
466
|
+
const $ = c(39);
|
|
467
|
+
const { t } = useWords("menu");
|
|
468
|
+
const [wrapped, setWrapped] = useState(false);
|
|
469
|
+
let t0;
|
|
470
|
+
if ($[0] !== t) {
|
|
471
|
+
t0 = t("amount");
|
|
472
|
+
$[0] = t;
|
|
473
|
+
$[1] = t0;
|
|
474
|
+
} else t0 = $[1];
|
|
475
|
+
let t1;
|
|
476
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
477
|
+
t1 = /* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: "1em" }) });
|
|
478
|
+
$[2] = t1;
|
|
479
|
+
} else t1 = $[2];
|
|
480
|
+
let t2;
|
|
481
|
+
if ($[3] !== t0) {
|
|
482
|
+
t2 = /* @__PURE__ */ jsxs(Trigger, {
|
|
483
|
+
as: Button,
|
|
484
|
+
children: [t0, t1]
|
|
485
|
+
});
|
|
486
|
+
$[3] = t0;
|
|
487
|
+
$[4] = t2;
|
|
488
|
+
} else t2 = $[4];
|
|
489
|
+
let t3;
|
|
490
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
491
|
+
t3 = /* @__PURE__ */ jsx(ArrowUpNarrowWideIcon, { "aria-hidden": true });
|
|
492
|
+
$[5] = t3;
|
|
493
|
+
} else t3 = $[5];
|
|
494
|
+
let t4;
|
|
495
|
+
if ($[6] !== t) {
|
|
496
|
+
t4 = t("sortAscending");
|
|
497
|
+
$[6] = t;
|
|
498
|
+
$[7] = t4;
|
|
499
|
+
} else t4 = $[7];
|
|
500
|
+
let t5;
|
|
501
|
+
if ($[8] !== t4) {
|
|
502
|
+
t5 = /* @__PURE__ */ jsxs(Item, {
|
|
503
|
+
value: "ascending",
|
|
504
|
+
children: [t3, t4]
|
|
505
|
+
});
|
|
506
|
+
$[8] = t4;
|
|
507
|
+
$[9] = t5;
|
|
508
|
+
} else t5 = $[9];
|
|
509
|
+
let t6;
|
|
510
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
511
|
+
t6 = /* @__PURE__ */ jsx(ArrowDownWideNarrowIcon, { "aria-hidden": true });
|
|
512
|
+
$[10] = t6;
|
|
513
|
+
} else t6 = $[10];
|
|
514
|
+
let t7;
|
|
515
|
+
if ($[11] !== t) {
|
|
516
|
+
t7 = t("sortDescending");
|
|
517
|
+
$[11] = t;
|
|
518
|
+
$[12] = t7;
|
|
519
|
+
} else t7 = $[12];
|
|
520
|
+
let t8;
|
|
521
|
+
if ($[13] !== t7) {
|
|
522
|
+
t8 = /* @__PURE__ */ jsxs(Item, {
|
|
523
|
+
value: "descending",
|
|
524
|
+
children: [t6, t7]
|
|
525
|
+
});
|
|
526
|
+
$[13] = t7;
|
|
527
|
+
$[14] = t8;
|
|
528
|
+
} else t8 = $[14];
|
|
529
|
+
let t9;
|
|
530
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
531
|
+
t9 = /* @__PURE__ */ jsx(Separator, {});
|
|
532
|
+
$[15] = t9;
|
|
533
|
+
} else t9 = $[15];
|
|
534
|
+
let t10;
|
|
535
|
+
if ($[16] !== t) {
|
|
536
|
+
t10 = t("wrapText");
|
|
537
|
+
$[16] = t;
|
|
538
|
+
$[17] = t10;
|
|
539
|
+
} else t10 = $[17];
|
|
540
|
+
let t11;
|
|
541
|
+
if ($[18] !== t10) {
|
|
542
|
+
t11 = /* @__PURE__ */ jsx(ItemText, { children: t10 });
|
|
543
|
+
$[18] = t10;
|
|
544
|
+
$[19] = t11;
|
|
545
|
+
} else t11 = $[19];
|
|
546
|
+
let t12;
|
|
547
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
548
|
+
t12 = /* @__PURE__ */ jsx(ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { size: "1em" }) });
|
|
549
|
+
$[20] = t12;
|
|
550
|
+
} else t12 = $[20];
|
|
551
|
+
let t13;
|
|
552
|
+
if ($[21] !== t11 || $[22] !== wrapped) {
|
|
553
|
+
t13 = /* @__PURE__ */ jsxs(OptionItem, {
|
|
554
|
+
checked: wrapped,
|
|
555
|
+
onCheckedChange: setWrapped,
|
|
556
|
+
type: "checkbox",
|
|
557
|
+
value: "wrap",
|
|
558
|
+
children: [t11, t12]
|
|
559
|
+
});
|
|
560
|
+
$[21] = t11;
|
|
561
|
+
$[22] = wrapped;
|
|
562
|
+
$[23] = t13;
|
|
563
|
+
} else t13 = $[23];
|
|
564
|
+
let t14;
|
|
565
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
566
|
+
t14 = /* @__PURE__ */ jsx(Separator, {});
|
|
567
|
+
$[24] = t14;
|
|
568
|
+
} else t14 = $[24];
|
|
569
|
+
let t15;
|
|
570
|
+
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
571
|
+
t15 = /* @__PURE__ */ jsx(EyeOffIcon, { "aria-hidden": true });
|
|
572
|
+
$[25] = t15;
|
|
573
|
+
} else t15 = $[25];
|
|
574
|
+
let t16;
|
|
575
|
+
if ($[26] !== t) {
|
|
576
|
+
t16 = t("hideColumn");
|
|
577
|
+
$[26] = t;
|
|
578
|
+
$[27] = t16;
|
|
579
|
+
} else t16 = $[27];
|
|
580
|
+
let t17;
|
|
581
|
+
if ($[28] !== t16) {
|
|
582
|
+
t17 = /* @__PURE__ */ jsxs(Item, {
|
|
583
|
+
value: "hide",
|
|
584
|
+
children: [t15, t16]
|
|
585
|
+
});
|
|
586
|
+
$[28] = t16;
|
|
587
|
+
$[29] = t17;
|
|
588
|
+
} else t17 = $[29];
|
|
589
|
+
let t18;
|
|
590
|
+
if ($[30] !== t13 || $[31] !== t17 || $[32] !== t5 || $[33] !== t8) {
|
|
591
|
+
t18 = /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Positioner, { children: /* @__PURE__ */ jsxs(Content, { children: [
|
|
592
|
+
t5,
|
|
593
|
+
t8,
|
|
594
|
+
t9,
|
|
595
|
+
t13,
|
|
596
|
+
t14,
|
|
597
|
+
t17
|
|
598
|
+
] }) }) });
|
|
599
|
+
$[30] = t13;
|
|
600
|
+
$[31] = t17;
|
|
601
|
+
$[32] = t5;
|
|
602
|
+
$[33] = t8;
|
|
603
|
+
$[34] = t18;
|
|
604
|
+
} else t18 = $[34];
|
|
605
|
+
let t19;
|
|
606
|
+
if ($[35] !== props || $[36] !== t18 || $[37] !== t2) {
|
|
607
|
+
t19 = /* @__PURE__ */ jsxs(Root, {
|
|
608
|
+
...props,
|
|
609
|
+
children: [t2, t18]
|
|
610
|
+
});
|
|
611
|
+
$[35] = props;
|
|
612
|
+
$[36] = t18;
|
|
613
|
+
$[37] = t2;
|
|
614
|
+
$[38] = t19;
|
|
615
|
+
} else t19 = $[38];
|
|
616
|
+
return t19;
|
|
617
|
+
}
|
|
618
|
+
const source$3 = "import { type ReactElement, useState } from \"react\";\n\nimport {\n ArrowDownWideNarrowIcon,\n ArrowUpNarrowWideIcon,\n CheckIcon,\n ChevronDownIcon,\n EyeOffIcon,\n} from \"lucide-react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Portal } from \"@stealthscale/component-primitives\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Menu } from \"@stealthscale/component-disclosure\";\n\nexport function Column(props: Menu.RootProps): ReactElement {\n const { t } = useWords(\"menu\");\n const [wrapped, setWrapped] = useState(false);\n\n return (\n <Menu.Root {...props}>\n <Menu.Trigger as={Button}>\n {t(\"amount\")}\n <Menu.Indicator>\n <ChevronDownIcon size=\"1em\" />\n </Menu.Indicator>\n </Menu.Trigger>\n <Portal>\n <Menu.Positioner>\n <Menu.Content>\n <Menu.Item value=\"ascending\">\n <ArrowUpNarrowWideIcon aria-hidden />\n {t(\"sortAscending\")}\n </Menu.Item>\n <Menu.Item value=\"descending\">\n <ArrowDownWideNarrowIcon aria-hidden />\n {t(\"sortDescending\")}\n </Menu.Item>\n <Menu.Separator />\n <Menu.OptionItem\n checked={wrapped}\n onCheckedChange={setWrapped}\n type=\"checkbox\"\n value=\"wrap\"\n >\n <Menu.ItemText>{t(\"wrapText\")}</Menu.ItemText>\n <Menu.ItemIndicator>\n <CheckIcon size=\"1em\" />\n </Menu.ItemIndicator>\n </Menu.OptionItem>\n <Menu.Separator />\n <Menu.Item value=\"hide\">\n <EyeOffIcon aria-hidden />\n {t(\"hideColumn\")}\n </Menu.Item>\n </Menu.Content>\n </Menu.Positioner>\n </Portal>\n </Menu.Root>\n );\n}\n";
|
|
619
|
+
//#endregion
|
|
620
|
+
//#region src/menu/examples/ledgers.example.tsx
|
|
621
|
+
var ledgers_example_exports = /* @__PURE__ */ __exportAll({
|
|
622
|
+
Ledgers: () => Ledgers,
|
|
623
|
+
source: () => source$2
|
|
624
|
+
});
|
|
625
|
+
const LEDGERS = Array.from({ length: 24 }, (_, index) => String(index + 1).padStart(2, "0"));
|
|
626
|
+
function Ledgers(props) {
|
|
627
|
+
const $ = c(13);
|
|
628
|
+
const { t } = useWords("menu");
|
|
629
|
+
let t0;
|
|
630
|
+
if ($[0] !== t) {
|
|
631
|
+
t0 = t("pickLedger");
|
|
632
|
+
$[0] = t;
|
|
633
|
+
$[1] = t0;
|
|
634
|
+
} else t0 = $[1];
|
|
635
|
+
let t1;
|
|
636
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
637
|
+
t1 = /* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: "1em" }) });
|
|
638
|
+
$[2] = t1;
|
|
639
|
+
} else t1 = $[2];
|
|
640
|
+
let t2;
|
|
641
|
+
if ($[3] !== t0) {
|
|
642
|
+
t2 = /* @__PURE__ */ jsxs(Trigger, {
|
|
643
|
+
as: Button,
|
|
644
|
+
children: [t0, t1]
|
|
645
|
+
});
|
|
646
|
+
$[3] = t0;
|
|
647
|
+
$[4] = t2;
|
|
648
|
+
} else t2 = $[4];
|
|
649
|
+
let t3;
|
|
650
|
+
if ($[5] !== t) {
|
|
651
|
+
t3 = LEDGERS.map((number) => /* @__PURE__ */ jsx(Item, {
|
|
652
|
+
value: number,
|
|
653
|
+
children: t("ledger", { number })
|
|
654
|
+
}, number));
|
|
655
|
+
$[5] = t;
|
|
656
|
+
$[6] = t3;
|
|
657
|
+
} else t3 = $[6];
|
|
658
|
+
let t4;
|
|
659
|
+
if ($[7] !== t3) {
|
|
660
|
+
t4 = /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Positioner, { children: /* @__PURE__ */ jsx(Content, { children: t3 }) }) });
|
|
661
|
+
$[7] = t3;
|
|
662
|
+
$[8] = t4;
|
|
663
|
+
} else t4 = $[8];
|
|
664
|
+
let t5;
|
|
665
|
+
if ($[9] !== props || $[10] !== t2 || $[11] !== t4) {
|
|
666
|
+
t5 = /* @__PURE__ */ jsxs(Root, {
|
|
667
|
+
...props,
|
|
668
|
+
children: [t2, t4]
|
|
669
|
+
});
|
|
670
|
+
$[9] = props;
|
|
671
|
+
$[10] = t2;
|
|
672
|
+
$[11] = t4;
|
|
673
|
+
$[12] = t5;
|
|
674
|
+
} else t5 = $[12];
|
|
675
|
+
return t5;
|
|
676
|
+
}
|
|
677
|
+
const source$2 = "import { type ReactElement } from \"react\";\n\nimport { ChevronDownIcon } from \"lucide-react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Portal } from \"@stealthscale/component-primitives\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Menu } from \"@stealthscale/component-disclosure\";\n\nconst LEDGERS = Array.from({ length: 24 }, (_, index) => String(index + 1).padStart(2, \"0\"));\n\nexport function Ledgers(props: Menu.RootProps): ReactElement {\n const { t } = useWords(\"menu\");\n\n return (\n <Menu.Root {...props}>\n <Menu.Trigger as={Button}>\n {t(\"pickLedger\")}\n <Menu.Indicator>\n <ChevronDownIcon size=\"1em\" />\n </Menu.Indicator>\n </Menu.Trigger>\n <Portal>\n <Menu.Positioner>\n <Menu.Content>\n {LEDGERS.map((number) => (\n <Menu.Item key={number} value={number}>\n {t(\"ledger\", { number })}\n </Menu.Item>\n ))}\n </Menu.Content>\n </Menu.Positioner>\n </Portal>\n </Menu.Root>\n );\n}\n";
|
|
678
|
+
//#endregion
|
|
679
|
+
//#region src/menu/examples/more.example.tsx
|
|
680
|
+
var more_example_exports = /* @__PURE__ */ __exportAll({
|
|
681
|
+
More: () => More,
|
|
682
|
+
source: () => source$1
|
|
683
|
+
});
|
|
684
|
+
function More(props) {
|
|
685
|
+
const $ = c(33);
|
|
686
|
+
const { t } = useWords("menu");
|
|
687
|
+
let t0;
|
|
688
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
689
|
+
t0 = { variant: "outline" };
|
|
690
|
+
$[0] = t0;
|
|
691
|
+
} else t0 = $[0];
|
|
692
|
+
let t1;
|
|
693
|
+
if ($[1] !== t) {
|
|
694
|
+
t1 = t("more");
|
|
695
|
+
$[1] = t;
|
|
696
|
+
$[2] = t1;
|
|
697
|
+
} else t1 = $[2];
|
|
698
|
+
let t2;
|
|
699
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
700
|
+
t2 = /* @__PURE__ */ jsx(EllipsisIcon, {});
|
|
701
|
+
$[3] = t2;
|
|
702
|
+
} else t2 = $[3];
|
|
703
|
+
let t3;
|
|
704
|
+
if ($[4] !== t1) {
|
|
705
|
+
t3 = /* @__PURE__ */ jsx(ButtonPropsProvider, {
|
|
706
|
+
value: t0,
|
|
707
|
+
children: /* @__PURE__ */ jsx(Trigger, {
|
|
708
|
+
"aria-label": t1,
|
|
709
|
+
as: IconButton,
|
|
710
|
+
children: t2
|
|
711
|
+
})
|
|
712
|
+
});
|
|
713
|
+
$[4] = t1;
|
|
714
|
+
$[5] = t3;
|
|
715
|
+
} else t3 = $[5];
|
|
716
|
+
let t4;
|
|
717
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
718
|
+
t4 = /* @__PURE__ */ jsx(Arrow, { children: /* @__PURE__ */ jsx(ArrowTip, {}) });
|
|
719
|
+
$[6] = t4;
|
|
720
|
+
} else t4 = $[6];
|
|
721
|
+
let t5;
|
|
722
|
+
if ($[7] !== t) {
|
|
723
|
+
t5 = t("rename");
|
|
724
|
+
$[7] = t;
|
|
725
|
+
$[8] = t5;
|
|
726
|
+
} else t5 = $[8];
|
|
727
|
+
let t6;
|
|
728
|
+
if ($[9] !== t5) {
|
|
729
|
+
t6 = /* @__PURE__ */ jsx(Item, {
|
|
730
|
+
value: "rename",
|
|
731
|
+
children: t5
|
|
732
|
+
});
|
|
733
|
+
$[9] = t5;
|
|
734
|
+
$[10] = t6;
|
|
735
|
+
} else t6 = $[10];
|
|
736
|
+
let t7;
|
|
737
|
+
if ($[11] !== t) {
|
|
738
|
+
t7 = t("duplicate");
|
|
739
|
+
$[11] = t;
|
|
740
|
+
$[12] = t7;
|
|
741
|
+
} else t7 = $[12];
|
|
742
|
+
let t8;
|
|
743
|
+
if ($[13] !== t7) {
|
|
744
|
+
t8 = /* @__PURE__ */ jsx(Item, {
|
|
745
|
+
value: "duplicate",
|
|
746
|
+
children: t7
|
|
747
|
+
});
|
|
748
|
+
$[13] = t7;
|
|
749
|
+
$[14] = t8;
|
|
750
|
+
} else t8 = $[14];
|
|
751
|
+
let t9;
|
|
752
|
+
if ($[15] !== t) {
|
|
753
|
+
t9 = t("archive");
|
|
754
|
+
$[15] = t;
|
|
755
|
+
$[16] = t9;
|
|
756
|
+
} else t9 = $[16];
|
|
757
|
+
let t10;
|
|
758
|
+
if ($[17] !== t9) {
|
|
759
|
+
t10 = /* @__PURE__ */ jsx(Item, {
|
|
760
|
+
disabled: true,
|
|
761
|
+
value: "archive",
|
|
762
|
+
children: t9
|
|
763
|
+
});
|
|
764
|
+
$[17] = t9;
|
|
765
|
+
$[18] = t10;
|
|
766
|
+
} else t10 = $[18];
|
|
767
|
+
let t11;
|
|
768
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
769
|
+
t11 = /* @__PURE__ */ jsx(Separator, {});
|
|
770
|
+
$[19] = t11;
|
|
771
|
+
} else t11 = $[19];
|
|
772
|
+
let t12;
|
|
773
|
+
if ($[20] !== t) {
|
|
774
|
+
t12 = t("delete");
|
|
775
|
+
$[20] = t;
|
|
776
|
+
$[21] = t12;
|
|
777
|
+
} else t12 = $[21];
|
|
778
|
+
let t13;
|
|
779
|
+
if ($[22] !== t12) {
|
|
780
|
+
t13 = /* @__PURE__ */ jsx(Item, {
|
|
781
|
+
tone: "critical",
|
|
782
|
+
value: "delete",
|
|
783
|
+
children: t12
|
|
784
|
+
});
|
|
785
|
+
$[22] = t12;
|
|
786
|
+
$[23] = t13;
|
|
787
|
+
} else t13 = $[23];
|
|
788
|
+
let t14;
|
|
789
|
+
if ($[24] !== t10 || $[25] !== t13 || $[26] !== t6 || $[27] !== t8) {
|
|
790
|
+
t14 = /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Positioner, { children: /* @__PURE__ */ jsxs(Content, { children: [
|
|
791
|
+
t4,
|
|
792
|
+
t6,
|
|
793
|
+
t8,
|
|
794
|
+
t10,
|
|
795
|
+
t11,
|
|
796
|
+
t13
|
|
797
|
+
] }) }) });
|
|
798
|
+
$[24] = t10;
|
|
799
|
+
$[25] = t13;
|
|
800
|
+
$[26] = t6;
|
|
801
|
+
$[27] = t8;
|
|
802
|
+
$[28] = t14;
|
|
803
|
+
} else t14 = $[28];
|
|
804
|
+
let t15;
|
|
805
|
+
if ($[29] !== props || $[30] !== t14 || $[31] !== t3) {
|
|
806
|
+
t15 = /* @__PURE__ */ jsxs(Root, {
|
|
807
|
+
...props,
|
|
808
|
+
children: [t3, t14]
|
|
809
|
+
});
|
|
810
|
+
$[29] = props;
|
|
811
|
+
$[30] = t14;
|
|
812
|
+
$[31] = t3;
|
|
813
|
+
$[32] = t15;
|
|
814
|
+
} else t15 = $[32];
|
|
815
|
+
return t15;
|
|
816
|
+
}
|
|
817
|
+
const source$1 = "import { type ReactElement } from \"react\";\n\nimport { EllipsisIcon } from \"lucide-react\";\n\nimport { ButtonPropsProvider, IconButton } from \"@stealthscale/component-actions\";\nimport { Portal } from \"@stealthscale/component-primitives\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Menu } from \"@stealthscale/component-disclosure\";\n\nexport function More(props: Menu.RootProps): ReactElement {\n const { t } = useWords(\"menu\");\n\n return (\n <Menu.Root {...props}>\n <ButtonPropsProvider value={{ variant: \"outline\" }}>\n <Menu.Trigger aria-label={t(\"more\")} as={IconButton}>\n <EllipsisIcon />\n </Menu.Trigger>\n </ButtonPropsProvider>\n <Portal>\n <Menu.Positioner>\n <Menu.Content>\n <Menu.Arrow>\n <Menu.ArrowTip />\n </Menu.Arrow>\n <Menu.Item value=\"rename\">{t(\"rename\")}</Menu.Item>\n <Menu.Item value=\"duplicate\">{t(\"duplicate\")}</Menu.Item>\n <Menu.Item disabled value=\"archive\">\n {t(\"archive\")}\n </Menu.Item>\n <Menu.Separator />\n <Menu.Item tone=\"critical\" value=\"delete\">\n {t(\"delete\")}\n </Menu.Item>\n </Menu.Content>\n </Menu.Positioner>\n </Portal>\n </Menu.Root>\n );\n}\n";
|
|
818
|
+
//#endregion
|
|
819
|
+
//#region src/menu/examples/workspaces.example.tsx
|
|
820
|
+
var workspaces_example_exports = /* @__PURE__ */ __exportAll({
|
|
821
|
+
Workspaces: () => Workspaces,
|
|
822
|
+
source: () => source
|
|
823
|
+
});
|
|
824
|
+
const WORKSPACES = [
|
|
825
|
+
["acme", "acmePlan"],
|
|
826
|
+
["globex", "globexPlan"],
|
|
827
|
+
["initech", "initechPlan"]
|
|
828
|
+
];
|
|
829
|
+
function Workspaces(props) {
|
|
830
|
+
const $ = c(35);
|
|
831
|
+
const { t } = useWords("menu");
|
|
832
|
+
const [current, setCurrent] = useState("acme");
|
|
833
|
+
let t0;
|
|
834
|
+
if ($[0] !== t) {
|
|
835
|
+
t0 = t("switchWorkspace");
|
|
836
|
+
$[0] = t;
|
|
837
|
+
$[1] = t0;
|
|
838
|
+
} else t0 = $[1];
|
|
839
|
+
let t1;
|
|
840
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
841
|
+
t1 = /* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(ChevronsUpDownIcon, { size: "1em" }) });
|
|
842
|
+
$[2] = t1;
|
|
843
|
+
} else t1 = $[2];
|
|
844
|
+
let t2;
|
|
845
|
+
if ($[3] !== t0) {
|
|
846
|
+
t2 = /* @__PURE__ */ jsxs(Trigger, {
|
|
847
|
+
as: Button,
|
|
848
|
+
children: [t0, t1]
|
|
849
|
+
});
|
|
850
|
+
$[3] = t0;
|
|
851
|
+
$[4] = t2;
|
|
852
|
+
} else t2 = $[4];
|
|
853
|
+
let t3;
|
|
854
|
+
if ($[5] !== t) {
|
|
855
|
+
t3 = t("workspaces");
|
|
856
|
+
$[5] = t;
|
|
857
|
+
$[6] = t3;
|
|
858
|
+
} else t3 = $[6];
|
|
859
|
+
let t4;
|
|
860
|
+
if ($[7] !== t3) {
|
|
861
|
+
t4 = /* @__PURE__ */ jsx(ItemGroupLabel, {
|
|
862
|
+
value: "workspaces",
|
|
863
|
+
children: t3
|
|
864
|
+
});
|
|
865
|
+
$[7] = t3;
|
|
866
|
+
$[8] = t4;
|
|
867
|
+
} else t4 = $[8];
|
|
868
|
+
let t5;
|
|
869
|
+
if ($[9] !== current || $[10] !== t) {
|
|
870
|
+
t5 = WORKSPACES.map((t6) => {
|
|
871
|
+
const [name, plan] = t6;
|
|
872
|
+
return /* @__PURE__ */ jsxs(OptionItem, {
|
|
873
|
+
checked: current === name,
|
|
874
|
+
onCheckedChange: () => {
|
|
875
|
+
setCurrent(name);
|
|
876
|
+
},
|
|
877
|
+
type: "radio",
|
|
878
|
+
value: name,
|
|
879
|
+
children: [
|
|
880
|
+
/* @__PURE__ */ jsx(ItemMark, { children: t(name).slice(0, 1) }),
|
|
881
|
+
/* @__PURE__ */ jsxs(ItemLines, { children: [/* @__PURE__ */ jsx(ItemText, { children: t(name) }), /* @__PURE__ */ jsx(ItemDescription, { children: t(plan) })] }),
|
|
882
|
+
/* @__PURE__ */ jsx(ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { size: "1em" }) })
|
|
883
|
+
]
|
|
884
|
+
}, name);
|
|
885
|
+
});
|
|
886
|
+
$[9] = current;
|
|
887
|
+
$[10] = t;
|
|
888
|
+
$[11] = t5;
|
|
889
|
+
} else t5 = $[11];
|
|
890
|
+
let t6;
|
|
891
|
+
if ($[12] !== t4 || $[13] !== t5) {
|
|
892
|
+
t6 = /* @__PURE__ */ jsxs(ItemGroup, {
|
|
893
|
+
value: "workspaces",
|
|
894
|
+
children: [t4, t5]
|
|
895
|
+
});
|
|
896
|
+
$[12] = t4;
|
|
897
|
+
$[13] = t5;
|
|
898
|
+
$[14] = t6;
|
|
899
|
+
} else t6 = $[14];
|
|
900
|
+
let t7;
|
|
901
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
902
|
+
t7 = /* @__PURE__ */ jsx(Separator, {});
|
|
903
|
+
$[15] = t7;
|
|
904
|
+
} else t7 = $[15];
|
|
905
|
+
let t8;
|
|
906
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
907
|
+
t8 = /* @__PURE__ */ jsx(ItemMark, { children: /* @__PURE__ */ jsx(PlusIcon, { size: "1em" }) });
|
|
908
|
+
$[16] = t8;
|
|
909
|
+
} else t8 = $[16];
|
|
910
|
+
let t9;
|
|
911
|
+
if ($[17] !== t) {
|
|
912
|
+
t9 = t("createWorkspace");
|
|
913
|
+
$[17] = t;
|
|
914
|
+
$[18] = t9;
|
|
915
|
+
} else t9 = $[18];
|
|
916
|
+
let t10;
|
|
917
|
+
if ($[19] !== t9) {
|
|
918
|
+
t10 = /* @__PURE__ */ jsxs(Item, {
|
|
919
|
+
value: "create",
|
|
920
|
+
children: [t8, t9]
|
|
921
|
+
});
|
|
922
|
+
$[19] = t9;
|
|
923
|
+
$[20] = t10;
|
|
924
|
+
} else t10 = $[20];
|
|
925
|
+
let t11;
|
|
926
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
927
|
+
t11 = /* @__PURE__ */ jsx(ItemMark, { children: /* @__PURE__ */ jsx(SettingsIcon, { size: "1em" }) });
|
|
928
|
+
$[21] = t11;
|
|
929
|
+
} else t11 = $[21];
|
|
930
|
+
let t12;
|
|
931
|
+
if ($[22] !== t) {
|
|
932
|
+
t12 = t("settings");
|
|
933
|
+
$[22] = t;
|
|
934
|
+
$[23] = t12;
|
|
935
|
+
} else t12 = $[23];
|
|
936
|
+
let t13;
|
|
937
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
938
|
+
t13 = /* @__PURE__ */ jsx(ItemCommand, { children: "⌘," });
|
|
939
|
+
$[24] = t13;
|
|
940
|
+
} else t13 = $[24];
|
|
941
|
+
let t14;
|
|
942
|
+
if ($[25] !== t12) {
|
|
943
|
+
t14 = /* @__PURE__ */ jsxs(Item, {
|
|
944
|
+
value: "settings",
|
|
945
|
+
children: [
|
|
946
|
+
t11,
|
|
947
|
+
t12,
|
|
948
|
+
t13
|
|
949
|
+
]
|
|
950
|
+
});
|
|
951
|
+
$[25] = t12;
|
|
952
|
+
$[26] = t14;
|
|
953
|
+
} else t14 = $[26];
|
|
954
|
+
let t15;
|
|
955
|
+
if ($[27] !== t10 || $[28] !== t14 || $[29] !== t6) {
|
|
956
|
+
t15 = /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Positioner, { children: /* @__PURE__ */ jsxs(Content, { children: [
|
|
957
|
+
t6,
|
|
958
|
+
t7,
|
|
959
|
+
t10,
|
|
960
|
+
t14
|
|
961
|
+
] }) }) });
|
|
962
|
+
$[27] = t10;
|
|
963
|
+
$[28] = t14;
|
|
964
|
+
$[29] = t6;
|
|
965
|
+
$[30] = t15;
|
|
966
|
+
} else t15 = $[30];
|
|
967
|
+
let t16;
|
|
968
|
+
if ($[31] !== props || $[32] !== t15 || $[33] !== t2) {
|
|
969
|
+
t16 = /* @__PURE__ */ jsxs(Root, {
|
|
970
|
+
...props,
|
|
971
|
+
children: [t2, t15]
|
|
972
|
+
});
|
|
973
|
+
$[31] = props;
|
|
974
|
+
$[32] = t15;
|
|
975
|
+
$[33] = t2;
|
|
976
|
+
$[34] = t16;
|
|
977
|
+
} else t16 = $[34];
|
|
978
|
+
return t16;
|
|
979
|
+
}
|
|
980
|
+
const source = "import { type ReactElement, useState } from \"react\";\n\nimport { CheckIcon, ChevronsUpDownIcon, PlusIcon, SettingsIcon } from \"lucide-react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Portal } from \"@stealthscale/component-primitives\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Menu } from \"@stealthscale/component-disclosure\";\n\nconst WORKSPACES = [\n [\"acme\", \"acmePlan\"],\n [\"globex\", \"globexPlan\"],\n [\"initech\", \"initechPlan\"],\n] as const;\n\nexport function Workspaces(props: Menu.RootProps): ReactElement {\n const { t } = useWords(\"menu\");\n const [current, setCurrent] = useState<string>(\"acme\");\n\n return (\n <Menu.Root {...props}>\n <Menu.Trigger as={Button}>\n {t(\"switchWorkspace\")}\n <Menu.Indicator>\n <ChevronsUpDownIcon size=\"1em\" />\n </Menu.Indicator>\n </Menu.Trigger>\n <Portal>\n <Menu.Positioner>\n <Menu.Content>\n <Menu.ItemGroup value=\"workspaces\">\n <Menu.ItemGroupLabel value=\"workspaces\">{t(\"workspaces\")}</Menu.ItemGroupLabel>\n {WORKSPACES.map(([name, plan]) => (\n <Menu.OptionItem\n checked={current === name}\n key={name}\n onCheckedChange={() => {\n setCurrent(name);\n }}\n type=\"radio\"\n value={name}\n >\n <Menu.ItemMark>{t(name).slice(0, 1)}</Menu.ItemMark>\n <Menu.ItemLines>\n <Menu.ItemText>{t(name)}</Menu.ItemText>\n <Menu.ItemDescription>{t(plan)}</Menu.ItemDescription>\n </Menu.ItemLines>\n <Menu.ItemIndicator>\n <CheckIcon size=\"1em\" />\n </Menu.ItemIndicator>\n </Menu.OptionItem>\n ))}\n </Menu.ItemGroup>\n <Menu.Separator />\n <Menu.Item value=\"create\">\n <Menu.ItemMark>\n <PlusIcon size=\"1em\" />\n </Menu.ItemMark>\n {t(\"createWorkspace\")}\n </Menu.Item>\n <Menu.Item value=\"settings\">\n <Menu.ItemMark>\n <SettingsIcon size=\"1em\" />\n </Menu.ItemMark>\n {t(\"settings\")}\n <Menu.ItemCommand>⌘,</Menu.ItemCommand>\n </Menu.Item>\n </Menu.Content>\n </Menu.Positioner>\n </Portal>\n </Menu.Root>\n );\n}\n";
|
|
981
|
+
//#endregion
|
|
982
|
+
//#region src/menu/menu.specimen.tsx
|
|
983
|
+
/**
|
|
984
|
+
* Catalogue page for the menu.
|
|
985
|
+
*
|
|
986
|
+
* @remarks
|
|
987
|
+
* `scenesOf` generates the looks, the highlights by sizes and the palettes from the actions
|
|
988
|
+
* example, and the gutter from the column example, whose rows mix icon rows and plain rows. The
|
|
989
|
+
* placement, mark, long-list, context-menu, submenu and right-to-left scenes are hand-written,
|
|
990
|
+
* because each shows a machine option, a part or a behaviour that no axis sets. Every menu
|
|
991
|
+
* renders closed and portals its panel to the document body, so an opened panel renders over the
|
|
992
|
+
* page at the size the window allows, and a scene is as tall as its triggers. A single trigger
|
|
993
|
+
* renders in a `Sample`, which keeps it at its own width. The words are keys under `menu` in
|
|
994
|
+
* `locales/en/specimen/menu.json`.
|
|
995
|
+
*/
|
|
996
|
+
/**
|
|
997
|
+
* Placements of the placement scene.
|
|
998
|
+
*/
|
|
999
|
+
const PLACEMENTS = [
|
|
1000
|
+
"bottom-start",
|
|
1001
|
+
"bottom",
|
|
1002
|
+
"bottom-end",
|
|
1003
|
+
"top-start",
|
|
1004
|
+
"top",
|
|
1005
|
+
"top-end"
|
|
1006
|
+
];
|
|
1007
|
+
/**
|
|
1008
|
+
* Hand-written scene for six placements, with the arrow on each panel.
|
|
1009
|
+
*/
|
|
1010
|
+
const placements = {
|
|
1011
|
+
about: "menu.placements.about",
|
|
1012
|
+
draw: () => /* @__PURE__ */ jsx(Matrix, {
|
|
1013
|
+
knob: "placement",
|
|
1014
|
+
of: PLACEMENTS,
|
|
1015
|
+
children: (placement) => /* @__PURE__ */ jsx(More, { positioning: { placement } })
|
|
1016
|
+
}),
|
|
1017
|
+
example: more_example_exports,
|
|
1018
|
+
props: { positioning: { placement: "bottom-start" } },
|
|
1019
|
+
title: "menu.placements.title"
|
|
1020
|
+
};
|
|
1021
|
+
/**
|
|
1022
|
+
* Hand-written scene for rows that lead with a mark and read a name over a description.
|
|
1023
|
+
*/
|
|
1024
|
+
const marks = {
|
|
1025
|
+
about: "menu.marks.about",
|
|
1026
|
+
draw: () => /* @__PURE__ */ jsx(Sample, { children: /* @__PURE__ */ jsx(Workspaces, {}) }),
|
|
1027
|
+
example: workspaces_example_exports,
|
|
1028
|
+
title: "menu.marks.title"
|
|
1029
|
+
};
|
|
1030
|
+
/**
|
|
1031
|
+
* Hand-written scene for a list longer than the window.
|
|
1032
|
+
*/
|
|
1033
|
+
const long = {
|
|
1034
|
+
about: "menu.long.about",
|
|
1035
|
+
draw: () => /* @__PURE__ */ jsx(Sample, { children: /* @__PURE__ */ jsx(Ledgers, {}) }),
|
|
1036
|
+
example: ledgers_example_exports,
|
|
1037
|
+
title: "menu.long.title"
|
|
1038
|
+
};
|
|
1039
|
+
/**
|
|
1040
|
+
* Hand-written scene for a menu that opens over a region at the pointer.
|
|
1041
|
+
*/
|
|
1042
|
+
const over = {
|
|
1043
|
+
about: "menu.over.about",
|
|
1044
|
+
draw: Card,
|
|
1045
|
+
example: card_example_exports,
|
|
1046
|
+
title: "menu.over.title"
|
|
1047
|
+
};
|
|
1048
|
+
/**
|
|
1049
|
+
* Hand-written scene for a submenu opened from a row.
|
|
1050
|
+
*/
|
|
1051
|
+
const submenus = {
|
|
1052
|
+
about: "menu.submenus.about",
|
|
1053
|
+
draw: () => /* @__PURE__ */ jsx(Sample, { children: /* @__PURE__ */ jsx(Actions, {}) }),
|
|
1054
|
+
example: actions_example_exports,
|
|
1055
|
+
title: "menu.submenus.title"
|
|
1056
|
+
};
|
|
1057
|
+
/**
|
|
1058
|
+
* Hand-written scene for a menu in a right-to-left document.
|
|
1059
|
+
*/
|
|
1060
|
+
const rtl = {
|
|
1061
|
+
about: "menu.rtl.about",
|
|
1062
|
+
draw: () => /* @__PURE__ */ jsx("div", {
|
|
1063
|
+
dir: "rtl",
|
|
1064
|
+
children: /* @__PURE__ */ jsx(Actions, { dir: "rtl" })
|
|
1065
|
+
}),
|
|
1066
|
+
example: actions_example_exports,
|
|
1067
|
+
props: { dir: "rtl" },
|
|
1068
|
+
title: "menu.rtl.title"
|
|
1069
|
+
};
|
|
1070
|
+
var menu_specimen_default = specimen({
|
|
1071
|
+
about: "menu.about",
|
|
1072
|
+
id: "components/disclosure/menu",
|
|
1073
|
+
imports: "import { Menu } from \"@stealthscale/component-disclosure\";",
|
|
1074
|
+
scenes: [
|
|
1075
|
+
...scenesOf(recipe, {
|
|
1076
|
+
axes: {
|
|
1077
|
+
highlight: { across: "size" },
|
|
1078
|
+
inset: {
|
|
1079
|
+
draw: (props) => /* @__PURE__ */ jsx(Column, { ...props }),
|
|
1080
|
+
example: column_example_exports
|
|
1081
|
+
}
|
|
1082
|
+
},
|
|
1083
|
+
draw: (props) => /* @__PURE__ */ jsx(Actions, { ...props }),
|
|
1084
|
+
example: actions_example_exports,
|
|
1085
|
+
namespace: "menu",
|
|
1086
|
+
order: [
|
|
1087
|
+
"variant",
|
|
1088
|
+
"highlight",
|
|
1089
|
+
"inset",
|
|
1090
|
+
"palette"
|
|
1091
|
+
]
|
|
1092
|
+
}),
|
|
1093
|
+
placements,
|
|
1094
|
+
marks,
|
|
1095
|
+
long,
|
|
1096
|
+
over,
|
|
1097
|
+
submenus,
|
|
1098
|
+
rtl
|
|
1099
|
+
],
|
|
1100
|
+
title: "menu.title"
|
|
1101
|
+
});
|
|
1102
|
+
//#endregion
|
|
1103
|
+
export { menu_specimen_default as default, long, marks, over, placements, rtl, submenus };
|