@bysages/react 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/{ai-response-nhDOlELQ.mjs → ai-response-CjjjprMY.mjs} +10 -3
  2. package/dist/{chevron-a2nIZKN4.mjs → chevron-BA7kV9m7.mjs} +1 -1
  3. package/dist/components/accordion/index.mjs +1 -1
  4. package/dist/components/ai/index.mjs +1 -1
  5. package/dist/components/ai-attachments/index.mjs +1 -1
  6. package/dist/components/ai-prompt-input/index.mjs +3 -12
  7. package/dist/components/ai-reasoning/index.mjs +1 -1
  8. package/dist/components/ai-response/index.mjs +1 -1
  9. package/dist/components/ai-tool/index.mjs +1 -1
  10. package/dist/components/alert/index.mjs +1 -1
  11. package/dist/components/back-top/index.mjs +1 -1
  12. package/dist/components/banner/index.mjs +1 -1
  13. package/dist/components/calendar/index.d.mts +18 -7
  14. package/dist/components/calendar/index.mjs +79 -43
  15. package/dist/components/carousel/index.mjs +1 -1
  16. package/dist/components/cascade-select/index.mjs +1 -1
  17. package/dist/components/checkbox/index.mjs +1 -1
  18. package/dist/components/checkbox-group/index.mjs +1 -1
  19. package/dist/components/chip/index.d.mts +1 -1
  20. package/dist/components/clipboard/index.mjs +1 -1
  21. package/dist/components/collapsible/index.mjs +1 -1
  22. package/dist/components/color-picker/index.mjs +1 -1
  23. package/dist/components/combobox/index.mjs +1 -1
  24. package/dist/components/date-picker/index.mjs +1 -1
  25. package/dist/components/dialog/index.mjs +1 -1
  26. package/dist/components/drawer/index.mjs +1 -1
  27. package/dist/components/dynamic-input/index.mjs +1 -1
  28. package/dist/components/editable/index.mjs +1 -1
  29. package/dist/components/file-upload/index.mjs +1 -1
  30. package/dist/components/floating-panel/index.mjs +1 -1
  31. package/dist/components/form/index.d.mts +48 -2
  32. package/dist/components/image/index.mjs +1 -1
  33. package/dist/components/image-viewer/index.mjs +1 -1
  34. package/dist/components/json-tree-view/index.mjs +1 -1
  35. package/dist/components/listbox/index.mjs +1 -1
  36. package/dist/components/media-player/index.mjs +1 -1
  37. package/dist/components/menu/index.mjs +1 -1
  38. package/dist/components/number-input/index.mjs +1 -1
  39. package/dist/components/order-list/index.mjs +1 -1
  40. package/dist/components/pagination/index.d.mts +2 -0
  41. package/dist/components/pagination/index.mjs +31 -6
  42. package/dist/components/password-input/index.mjs +1 -1
  43. package/dist/components/popover/index.mjs +1 -1
  44. package/dist/components/progress/index.d.mts +2 -2
  45. package/dist/components/progress/index.mjs +20 -4
  46. package/dist/components/rating-group/index.mjs +1 -1
  47. package/dist/components/result/index.mjs +2 -1
  48. package/dist/components/select/index.mjs +1 -1
  49. package/dist/components/signature-pad/index.mjs +1 -1
  50. package/dist/components/split-button/index.mjs +1 -1
  51. package/dist/components/steps/index.d.mts +5 -1
  52. package/dist/components/steps/index.mjs +6 -4
  53. package/dist/components/swap/index.mjs +1 -1
  54. package/dist/components/table/index.d.mts +2 -0
  55. package/dist/components/table/index.mjs +3 -2
  56. package/dist/components/tag/index.d.mts +33 -0
  57. package/dist/components/tag/index.mjs +75 -0
  58. package/dist/components/tags-input/index.mjs +1 -1
  59. package/dist/components/toggle-group/index.mjs +1 -1
  60. package/dist/components/transfer/index.mjs +1 -1
  61. package/dist/components/tree-select/index.mjs +1 -1
  62. package/dist/components/tree-view/index.mjs +1 -1
  63. package/dist/generative/index.d.mts +53 -0
  64. package/dist/generative/index.mjs +670 -0
  65. package/dist/icon-Cri0-7-x.mjs +38 -0
  66. package/dist/{image-viewer-B-hKFkEw.mjs → image-viewer-D4FuYrk6.mjs} +1 -1
  67. package/dist/index.d.mts +3 -2
  68. package/dist/index.mjs +6 -5
  69. package/dist/{media-player-DjVvo1_7.mjs → media-player-C0WcjVI-.mjs} +2 -2
  70. package/dist/{select-i9UZsQCU.mjs → select-D_soVdWK.mjs} +1 -1
  71. package/package.json +2 -2
  72. package/dist/icon-BALgGtNK.mjs +0 -18
  73. package/dist/index-PsgGWW3m.d.mts +0 -1819
@@ -0,0 +1,670 @@
1
+ import { r as iconNode } from "../icon-Cri0-7-x.mjs";
2
+ import { Button } from "../components/button/index.mjs";
3
+ import { Alert } from "../components/alert/index.mjs";
4
+ import { Avatar } from "../components/avatar/index.mjs";
5
+ import { Badge } from "../components/badge/index.mjs";
6
+ import { Spinner } from "../components/spinner/index.mjs";
7
+ import { Card } from "../components/card/index.mjs";
8
+ import { t as Input } from "../input-BDpQ0e6G.mjs";
9
+ import { Checkbox } from "../components/checkbox/index.mjs";
10
+ import { Progress } from "../components/progress/index.mjs";
11
+ import { RadioGroup } from "../components/radio-group/index.mjs";
12
+ import { t as Select } from "../select-D_soVdWK.mjs";
13
+ import { Separator } from "../components/separator/index.mjs";
14
+ import { Slider } from "../components/slider/index.mjs";
15
+ import { Stack } from "../components/stack/index.mjs";
16
+ import { Stat } from "../components/stat/index.mjs";
17
+ import { Switch } from "../components/switch/index.mjs";
18
+ import { Textarea } from "../components/textarea/index.mjs";
19
+ import { Typography } from "../components/typography/index.mjs";
20
+ import { jsx, jsxs } from "react/jsx-runtime";
21
+ import { createElement } from "react";
22
+ import { createListCollection } from "@ark-ui/react/collection";
23
+ import { z } from "zod";
24
+ import { defineRegistry, useBoundProp } from "@json-render/react";
25
+ import { defineCatalog } from "@json-render/core";
26
+ import { schema } from "@json-render/react/schema";
27
+ //#region \0rolldown/runtime.js
28
+ var __defProp = Object.defineProperty;
29
+ var __exportAll = (all, no_symbols) => {
30
+ let target = {};
31
+ for (var name in all) __defProp(target, name, {
32
+ get: all[name],
33
+ enumerable: true
34
+ });
35
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
36
+ return target;
37
+ };
38
+ //#endregion
39
+ //#region src/generative/faces.generated.ts
40
+ /** Name the faces a family contributes; the identity keeps inference
41
+ * honest at the call site. */
42
+ function defineFace(faces) {
43
+ return faces;
44
+ }
45
+ /** Map a catalog Heading level to a measure — the serif voice stays, the
46
+ * size steps down. */
47
+ const headingClass = {
48
+ "1": "text-4xl",
49
+ "2": "text-3xl",
50
+ "3": "text-2xl",
51
+ "4": "text-xl",
52
+ "5": "text-lg",
53
+ "6": "text-base"
54
+ };
55
+ function initials(name) {
56
+ return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
57
+ }
58
+ function slug(value) {
59
+ return value.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "") || value;
60
+ }
61
+ /** The vocabulary the wrappers speak. One face per composed name — the
62
+ * per-family assemblies in each wrapper spread these and add only the
63
+ * rendering. */
64
+ const faces$1 = defineFace({
65
+ Alert: {
66
+ props: z.object({
67
+ status: z.enum([
68
+ "success",
69
+ "warning",
70
+ "danger",
71
+ "info",
72
+ "ink"
73
+ ]).optional(),
74
+ title: z.string().optional(),
75
+ message: z.string().optional()
76
+ }),
77
+ description: "A bordered notice; status picks the pigment."
78
+ },
79
+ Avatar: {
80
+ props: z.object({
81
+ name: z.string(),
82
+ src: z.string().optional(),
83
+ size: z.enum([
84
+ "sm",
85
+ "md",
86
+ "lg"
87
+ ]).optional()
88
+ }),
89
+ description: "A person's seal: image when given, initials as the fallback."
90
+ },
91
+ Badge: {
92
+ props: z.object({
93
+ text: z.string(),
94
+ tone: z.enum([
95
+ "ink",
96
+ "primary",
97
+ "success",
98
+ "warning",
99
+ "danger",
100
+ "info"
101
+ ]).optional(),
102
+ variant: z.enum([
103
+ "solid",
104
+ "subtle",
105
+ "outline"
106
+ ]).optional()
107
+ }),
108
+ description: "A small status seal beside content; reads at a glance."
109
+ },
110
+ Button: {
111
+ props: z.object({
112
+ label: z.string(),
113
+ variant: z.enum([
114
+ "solid",
115
+ "outline",
116
+ "ghost",
117
+ "subtle"
118
+ ]).optional(),
119
+ tone: z.enum([
120
+ "ink",
121
+ "success",
122
+ "warning",
123
+ "danger",
124
+ "info"
125
+ ]).optional(),
126
+ size: z.enum([
127
+ "sm",
128
+ "md",
129
+ "lg"
130
+ ]).optional(),
131
+ disabled: z.boolean().optional()
132
+ }),
133
+ description: "The primary action register: solid ink for the one main action, outline, ghost, or subtle for the rest."
134
+ },
135
+ Card: {
136
+ props: z.object({
137
+ title: z.string().optional(),
138
+ description: z.string().optional()
139
+ }),
140
+ slots: [
141
+ "default",
142
+ "header",
143
+ "footer"
144
+ ],
145
+ description: "Grouping vessel. Give title and description instead of hand-building a header; children render in the body; footer holds actions."
146
+ },
147
+ Checkbox: {
148
+ props: z.object({
149
+ label: z.string(),
150
+ checked: z.boolean().optional(),
151
+ disabled: z.boolean().optional()
152
+ }),
153
+ description: "One independent box with its label."
154
+ },
155
+ Heading: {
156
+ props: z.object({
157
+ text: z.string(),
158
+ level: z.enum([
159
+ "1",
160
+ "2",
161
+ "3",
162
+ "4",
163
+ "5",
164
+ "6"
165
+ ]).optional()
166
+ }),
167
+ description: "Section heading. One per view at level 1; do not skip levels."
168
+ },
169
+ Input: {
170
+ props: z.object({
171
+ label: z.string().optional(),
172
+ placeholder: z.string().optional(),
173
+ type: z.enum([
174
+ "text",
175
+ "email",
176
+ "url",
177
+ "search",
178
+ "tel"
179
+ ]).optional(),
180
+ value: z.string().optional(),
181
+ disabled: z.boolean().optional()
182
+ }),
183
+ description: "A single-line field; rely on border, surface and the focus halo."
184
+ },
185
+ Progress: {
186
+ props: z.object({
187
+ value: z.number().optional(),
188
+ label: z.string().optional(),
189
+ max: z.number().optional()
190
+ }),
191
+ description: "A working track that fills toward done."
192
+ },
193
+ RadioGroup: {
194
+ props: z.object({
195
+ label: z.string().optional(),
196
+ items: z.array(z.string()).optional()
197
+ }),
198
+ description: "Several boxes where exactly one may hold."
199
+ },
200
+ Select: {
201
+ props: z.object({
202
+ label: z.string().optional(),
203
+ placeholder: z.string().optional(),
204
+ options: z.array(z.object({
205
+ label: z.string(),
206
+ value: z.string()
207
+ })),
208
+ value: z.union([z.string(), z.array(z.string())]).optional(),
209
+ multiple: z.boolean().optional(),
210
+ disabled: z.boolean().optional()
211
+ }),
212
+ description: "A choice field that opens a ruled list; options carry label and value."
213
+ },
214
+ Separator: {
215
+ props: z.object({ orientation: z.enum(["horizontal", "vertical"]).optional() }),
216
+ description: "Hairline divider between sections."
217
+ },
218
+ Slider: {
219
+ props: z.object({
220
+ label: z.string().optional(),
221
+ value: z.number().optional(),
222
+ min: z.number().optional(),
223
+ max: z.number().optional(),
224
+ step: z.number().optional()
225
+ }),
226
+ description: "A ruled track the hand slides between bounds."
227
+ },
228
+ Spinner: {
229
+ props: z.object({
230
+ size: z.enum([
231
+ "sm",
232
+ "md",
233
+ "lg"
234
+ ]).optional(),
235
+ label: z.string().optional()
236
+ }),
237
+ description: "A quiet wheel for work still settling."
238
+ },
239
+ Stack: {
240
+ props: z.object({
241
+ direction: z.enum(["column", "row"]).optional(),
242
+ gap: z.enum([
243
+ "none",
244
+ "xs",
245
+ "sm",
246
+ "md",
247
+ "lg",
248
+ "xl"
249
+ ]).optional(),
250
+ align: z.enum([
251
+ "start",
252
+ "center",
253
+ "end",
254
+ "stretch",
255
+ "baseline"
256
+ ]).optional(),
257
+ justify: z.enum([
258
+ "start",
259
+ "center",
260
+ "end",
261
+ "space-between",
262
+ "space-around"
263
+ ]).optional(),
264
+ wrap: z.boolean().optional()
265
+ }),
266
+ slots: ["default"],
267
+ description: "Flex container for layout. direction column stacks vertically, row lays side by side. gap is a named spacing step."
268
+ },
269
+ Stat: {
270
+ props: z.object({
271
+ label: z.string(),
272
+ value: z.string(),
273
+ change: z.string().optional(),
274
+ direction: z.enum([
275
+ "up",
276
+ "down",
277
+ "flat"
278
+ ]).optional()
279
+ }),
280
+ description: "One loud figure with its quiet label and an optional delta."
281
+ },
282
+ Switch: {
283
+ props: z.object({
284
+ label: z.string().optional(),
285
+ checked: z.boolean().optional(),
286
+ disabled: z.boolean().optional()
287
+ }),
288
+ description: "An instant on/off; label names what it switches."
289
+ },
290
+ Text: {
291
+ props: z.object({
292
+ text: z.string(),
293
+ variant: z.enum([
294
+ "body",
295
+ "lead",
296
+ "muted",
297
+ "label"
298
+ ]).optional()
299
+ }),
300
+ description: "A prose voice: lead opens, body carries, muted whispers, label names."
301
+ },
302
+ Textarea: {
303
+ props: z.object({
304
+ label: z.string().optional(),
305
+ placeholder: z.string().optional(),
306
+ rows: z.number().int().optional(),
307
+ value: z.string().optional(),
308
+ disabled: z.boolean().optional()
309
+ }),
310
+ description: "A multi-line field for prose-length answers."
311
+ }
312
+ });
313
+ //#endregion
314
+ //#region src/generative/shared.ts
315
+ /** Name the entries a family contributes; the identity keeps inference
316
+ * honest at the call site. */
317
+ function defineEntry(entries) {
318
+ return entries;
319
+ }
320
+ const textVoices = {
321
+ body: Typography.Body,
322
+ lead: Typography.Lead,
323
+ muted: Typography.Muted,
324
+ label: Typography.Label
325
+ };
326
+ /** Two-way binding plumbing: the resolved value plus its write-back
327
+ * setter, typed for the family's use. */
328
+ function useBound(value, path) {
329
+ return useBoundProp(value, path);
330
+ }
331
+ const collectionCache = /* @__PURE__ */ new Map();
332
+ function collectionFor(options) {
333
+ const key = JSON.stringify(options);
334
+ let collection = collectionCache.get(key);
335
+ if (!collection) {
336
+ collection = createListCollection({ items: options });
337
+ collectionCache.set(key, collection);
338
+ }
339
+ return collection;
340
+ }
341
+ /** A labelled field: the label whispers above, the control answers. */
342
+ function labelled(label, control) {
343
+ return label ? createElement(Stack, { gap: "xs" }, createElement(Typography.Label, null, label), control) : control;
344
+ }
345
+ //#endregion
346
+ //#region src/components/alert/generative.ts
347
+ var generative_exports$17 = /* @__PURE__ */ __exportAll({ default: () => generative_default$17 });
348
+ /** A bordered notice; status picks the pigment. */
349
+ var generative_default$17 = defineEntry({ Alert: {
350
+ ...faces$1.Alert,
351
+ component: ({ props }) => createElement(Alert.Root, { status: props.status ?? "ink" }, createElement(Alert.Icon), createElement(Alert.Body, null, createElement(Alert.Title, null, props.title), props.message != null ? createElement(Alert.Description, null, props.message) : null))
352
+ } });
353
+ //#endregion
354
+ //#region src/components/avatar/generative.ts
355
+ var generative_exports$16 = /* @__PURE__ */ __exportAll({ default: () => generative_default$16 });
356
+ /** A person's seal: image when given, initials as the fallback. */
357
+ var generative_default$16 = defineEntry({ Avatar: {
358
+ ...faces$1.Avatar,
359
+ component: ({ props }) => createElement(Avatar.Root, { size: props.size }, [props.src != null ? createElement(Avatar.Image, {
360
+ src: props.src,
361
+ alt: props.name
362
+ }) : null, createElement(Avatar.Fallback, null, initials(props.name))])
363
+ } });
364
+ //#endregion
365
+ //#region src/components/badge/generative.ts
366
+ var generative_exports$15 = /* @__PURE__ */ __exportAll({ default: () => generative_default$15 });
367
+ /** A small status seal beside content; reads at a glance. */
368
+ var generative_default$15 = defineEntry({ Badge: {
369
+ ...faces$1.Badge,
370
+ component: ({ props }) => createElement(Badge, {
371
+ tone: props.tone,
372
+ variant: props.variant
373
+ }, props.text)
374
+ } });
375
+ //#endregion
376
+ //#region src/components/button/generative.ts
377
+ var generative_exports$14 = /* @__PURE__ */ __exportAll({ default: () => generative_default$14 });
378
+ /** The primary action register: solid ink for the one main action, outline, ghost, or subtle for the rest. */
379
+ var generative_default$14 = defineEntry({ Button: {
380
+ ...faces$1.Button,
381
+ component: ({ props, emit }) => createElement(Button, {
382
+ variant: props.variant ?? "solid",
383
+ tone: props.tone,
384
+ size: props.size,
385
+ disabled: props.disabled,
386
+ onClick: () => emit("press")
387
+ }, props.label)
388
+ } });
389
+ //#endregion
390
+ //#region src/components/card/generative.ts
391
+ var generative_exports$13 = /* @__PURE__ */ __exportAll({ default: () => generative_default$13 });
392
+ /** Grouping vessel. Give title and description instead of hand-building a header; children render in the body; footer holds actions. */
393
+ var generative_default$13 = defineEntry({ Card: {
394
+ ...faces$1.Card,
395
+ component: ({ props, children, slots }) => {
396
+ const header = slots?.header ?? null;
397
+ const footer = slots?.footer ?? null;
398
+ return createElement(Card.Root, null, header ? createElement(Card.Header, null, header) : props.title != null || props.description != null ? createElement(Card.Header, null, props.title != null ? createElement(Card.Title, null, props.title) : null, props.description != null ? createElement(Card.Description, null, props.description) : null) : null, createElement(Card.Content, null, children), footer ? createElement(Card.Footer, null, footer) : null);
399
+ }
400
+ } });
401
+ //#endregion
402
+ //#region src/components/checkbox/generative.ts
403
+ var generative_exports$12 = /* @__PURE__ */ __exportAll({ default: () => generative_default$12 });
404
+ /** One independent box with its label. */
405
+ var generative_default$12 = defineEntry({ Checkbox: {
406
+ ...faces$1.Checkbox,
407
+ component: ({ props }) => {
408
+ const mark = iconNode("check");
409
+ return createElement(Checkbox.Root, {
410
+ defaultChecked: props.checked ?? false,
411
+ disabled: props.disabled
412
+ }, [
413
+ createElement(Checkbox.Control, null, createElement(Checkbox.Indicator, null, mark)),
414
+ createElement(Checkbox.Label, null, props.label),
415
+ createElement(Checkbox.HiddenInput)
416
+ ]);
417
+ }
418
+ } });
419
+ //#endregion
420
+ //#region src/components/input/generative.ts
421
+ var generative_exports$11 = /* @__PURE__ */ __exportAll({ default: () => generative_default$11 });
422
+ /** A single-line field; rely on border, surface and the focus halo. */
423
+ var generative_default$11 = defineEntry({ Input: {
424
+ ...faces$1.Input,
425
+ component: ({ props, bindings }) => {
426
+ const [value, setValue] = useBound(props.value, bindings?.value);
427
+ return labelled(props.label, createElement(Input, {
428
+ value: value ?? "",
429
+ placeholder: props.placeholder,
430
+ type: props.type,
431
+ disabled: props.disabled,
432
+ onValueChange: (next) => setValue(next)
433
+ }));
434
+ }
435
+ } });
436
+ //#endregion
437
+ //#region src/components/progress/generative.ts
438
+ var generative_exports$10 = /* @__PURE__ */ __exportAll({ default: () => generative_default$10 });
439
+ /** A working track that fills toward done. */
440
+ var generative_default$10 = defineEntry({ Progress: {
441
+ ...faces$1.Progress,
442
+ component: ({ props }) => createElement(Progress.Root, {
443
+ value: props.value,
444
+ max: props.max
445
+ }, props.label != null ? createElement(Progress.Label, null, props.label) : null, createElement(Progress.Track, null, createElement(Progress.Range)))
446
+ } });
447
+ //#endregion
448
+ //#region src/components/radio-group/generative.ts
449
+ var generative_exports$9 = /* @__PURE__ */ __exportAll({ default: () => generative_default$9 });
450
+ /** Several boxes where exactly one may hold. */
451
+ var generative_default$9 = defineEntry({ RadioGroup: {
452
+ ...faces$1.RadioGroup,
453
+ component: ({ props }) => {
454
+ const values = props.items ?? [
455
+ "Option A",
456
+ "Option B",
457
+ "Option C"
458
+ ];
459
+ return labelled(props.label, createElement(RadioGroup.Root, { defaultValue: slug(values[0] ?? "") }, createElement(Stack, { gap: "sm" }, values.map((value) => createElement(RadioGroup.Item, {
460
+ key: value,
461
+ value
462
+ }, createElement(RadioGroup.ItemControl), createElement(RadioGroup.ItemText, null, value), createElement(RadioGroup.ItemHiddenInput))))));
463
+ }
464
+ } });
465
+ //#endregion
466
+ //#region src/components/select/generative.tsx
467
+ var generative_exports$8 = /* @__PURE__ */ __exportAll({ default: () => generative_default$8 });
468
+ /** A choice field that opens a ruled list; options carry label and value. */
469
+ var generative_default$8 = defineEntry({ Select: {
470
+ ...faces$1.Select,
471
+ component: ({ props, bindings }) => {
472
+ const [value, setValue] = useBound(props.value, bindings?.value);
473
+ const selectedValue = props.multiple ? Array.isArray(value) ? value : value ? [value] : void 0 : typeof value === "string" ? [value] : void 0;
474
+ const collection = collectionFor(props.options);
475
+ return labelled(props.label, /* @__PURE__ */ jsxs(Select.Root, {
476
+ collection,
477
+ value: selectedValue,
478
+ disabled: props.disabled,
479
+ multiple: props.multiple,
480
+ onValueChange: (details) => setValue(props.multiple ? details.value : details.value[0] ?? ""),
481
+ children: [
482
+ /* @__PURE__ */ jsxs(Select.Control, { children: [/* @__PURE__ */ jsx(Select.Trigger, { children: /* @__PURE__ */ jsx(Select.ValueText, { placeholder: props.placeholder }) }), /* @__PURE__ */ jsx(Select.Indicator, { children: iconNode("chevrons-up-down", {
483
+ width: 14,
484
+ height: 14
485
+ }) })] }),
486
+ /* @__PURE__ */ jsx(Select.Positioner, { children: /* @__PURE__ */ jsx(Select.Content, { children: /* @__PURE__ */ jsx(Select.ItemGroup, { children: props.options.map((option) => /* @__PURE__ */ jsxs(Select.Item, {
487
+ item: option,
488
+ children: [/* @__PURE__ */ jsx(Select.ItemText, { children: option.label }), /* @__PURE__ */ jsx(Select.ItemIndicator, { children: iconNode("check", {
489
+ width: 14,
490
+ height: 14
491
+ }) })]
492
+ }, option.value)) }) }) }),
493
+ /* @__PURE__ */ jsx(Select.HiddenSelect, {})
494
+ ]
495
+ }));
496
+ }
497
+ } });
498
+ //#endregion
499
+ //#region src/components/separator/generative.ts
500
+ var generative_exports$7 = /* @__PURE__ */ __exportAll({ default: () => generative_default$7 });
501
+ /** Hairline divider between sections. */
502
+ var generative_default$7 = defineEntry({ Separator: {
503
+ ...faces$1.Separator,
504
+ component: ({ props }) => createElement(Separator, {
505
+ orientation: props.orientation ?? "horizontal",
506
+ decorative: true
507
+ })
508
+ } });
509
+ //#endregion
510
+ //#region src/components/slider/generative.ts
511
+ var generative_exports$6 = /* @__PURE__ */ __exportAll({ default: () => generative_default$6 });
512
+ /** A ruled track the hand slides between bounds. */
513
+ var generative_default$6 = defineEntry({ Slider: {
514
+ ...faces$1.Slider,
515
+ component: ({ props }) => labelled(props.label, createElement(Slider.Root, {
516
+ defaultValue: [props.value ?? 50],
517
+ min: props.min,
518
+ max: props.max,
519
+ step: props.step
520
+ }, [createElement(Slider.Control, null, [createElement(Slider.Track, null, createElement(Slider.Range)), createElement(Slider.Thumb, {
521
+ index: 0,
522
+ key: 0
523
+ })])]))
524
+ } });
525
+ //#endregion
526
+ //#region src/components/spinner/generative.ts
527
+ var generative_exports$5 = /* @__PURE__ */ __exportAll({ default: () => generative_default$5 });
528
+ /** A quiet wheel for work still settling. */
529
+ var generative_default$5 = defineEntry({ Spinner: {
530
+ ...faces$1.Spinner,
531
+ component: ({ props }) => createElement(Spinner, {
532
+ size: props.size,
533
+ "aria-label": props.label
534
+ })
535
+ } });
536
+ //#endregion
537
+ //#region src/components/stack/generative.ts
538
+ var generative_exports$4 = /* @__PURE__ */ __exportAll({ default: () => generative_default$4 });
539
+ /** Flex container for layout. direction column stacks vertically, row lays side by side. gap is a named spacing step. */
540
+ var generative_default$4 = defineEntry({ Stack: {
541
+ ...faces$1.Stack,
542
+ component: ({ props, children }) => createElement(Stack, {
543
+ direction: props.direction ?? "column",
544
+ gap: props.gap ?? "md",
545
+ align: props.align,
546
+ justify: props.justify,
547
+ wrap: props.wrap
548
+ }, children)
549
+ } });
550
+ //#endregion
551
+ //#region src/components/stat/generative.ts
552
+ var generative_exports$3 = /* @__PURE__ */ __exportAll({ default: () => generative_default$3 });
553
+ /** One loud figure with its quiet label and an optional delta. */
554
+ var generative_default$3 = defineEntry({ Stat: {
555
+ ...faces$1.Stat,
556
+ component: ({ props }) => createElement(Stat.Root, null, [
557
+ createElement(Stat.Label, null, props.label),
558
+ createElement(Stat.Value, null, props.value),
559
+ props.change != null ? createElement(Stat.Delta, { direction: props.direction ?? "flat" }, props.change) : null
560
+ ])
561
+ } });
562
+ //#endregion
563
+ //#region src/components/switch/generative.ts
564
+ var generative_exports$2 = /* @__PURE__ */ __exportAll({ default: () => generative_default$2 });
565
+ /** An instant on/off; label names what it switches. */
566
+ var generative_default$2 = defineEntry({ Switch: {
567
+ ...faces$1.Switch,
568
+ component: ({ props, bindings }) => {
569
+ const [checked, setChecked] = useBound(props.checked, bindings?.checked);
570
+ return createElement(Switch.Root, {
571
+ checked: checked ?? false,
572
+ disabled: props.disabled,
573
+ onCheckedChange: (details) => setChecked(details.checked)
574
+ }, [
575
+ createElement(Switch.Control, null, createElement(Switch.Thumb)),
576
+ props.label != null ? createElement(Switch.Label, null, props.label) : null,
577
+ createElement(Switch.HiddenInput)
578
+ ]);
579
+ }
580
+ } });
581
+ //#endregion
582
+ //#region src/components/textarea/generative.ts
583
+ var generative_exports$1 = /* @__PURE__ */ __exportAll({ default: () => generative_default$1 });
584
+ /** A multi-line field for prose-length answers. */
585
+ var generative_default$1 = defineEntry({ Textarea: {
586
+ ...faces$1.Textarea,
587
+ component: ({ props, bindings }) => {
588
+ const [value, setValue] = useBound(props.value, bindings?.value);
589
+ return labelled(props.label, createElement(Textarea, {
590
+ value: value ?? "",
591
+ placeholder: props.placeholder,
592
+ rows: props.rows,
593
+ disabled: props.disabled,
594
+ onValueChange: (next) => setValue(next)
595
+ }));
596
+ }
597
+ } });
598
+ //#endregion
599
+ //#region src/components/typography/generative.ts
600
+ var generative_exports = /* @__PURE__ */ __exportAll({ default: () => generative_default });
601
+ /** Section heading. One per view at level 1; do not skip levels. */
602
+ var generative_default = defineEntry({
603
+ Heading: {
604
+ ...faces$1.Heading,
605
+ component: ({ props }) => createElement(Typography.Heading, { className: headingClass[props.level ?? "2"] }, props.text)
606
+ },
607
+ Text: {
608
+ ...faces$1.Text,
609
+ component: ({ props }) => {
610
+ const Voice = textVoices[props.variant ?? "body"];
611
+ return createElement(Voice, null, props.text);
612
+ }
613
+ }
614
+ });
615
+ //#endregion
616
+ //#region src/generative/index.ts
617
+ /** Every family writes its own generative face beside the component —
618
+ * `components/<family>/generative.ts` — and this module is where they
619
+ * meet: one glob picks the faces up, so a family that lands in the
620
+ * package is in the vocabulary without anyone editing this file. */
621
+ const modules = /* #__PURE__ */ Object.assign({
622
+ "../components/alert/generative.ts": generative_exports$17,
623
+ "../components/avatar/generative.ts": generative_exports$16,
624
+ "../components/badge/generative.ts": generative_exports$15,
625
+ "../components/button/generative.ts": generative_exports$14,
626
+ "../components/card/generative.ts": generative_exports$13,
627
+ "../components/checkbox/generative.ts": generative_exports$12,
628
+ "../components/input/generative.ts": generative_exports$11,
629
+ "../components/progress/generative.ts": generative_exports$10,
630
+ "../components/radio-group/generative.ts": generative_exports$9,
631
+ "../components/select/generative.tsx": generative_exports$8,
632
+ "../components/separator/generative.ts": generative_exports$7,
633
+ "../components/slider/generative.ts": generative_exports$6,
634
+ "../components/spinner/generative.ts": generative_exports$5,
635
+ "../components/stack/generative.ts": generative_exports$4,
636
+ "../components/stat/generative.ts": generative_exports$3,
637
+ "../components/switch/generative.ts": generative_exports$2,
638
+ "../components/textarea/generative.ts": generative_exports$1,
639
+ "../components/typography/generative.ts": generative_exports
640
+ });
641
+ const entries = {};
642
+ for (const [file, module] of Object.entries(modules)) {
643
+ const family = file.match(/components\/([^/]+)\/generative\.tsx?/)?.[1] ?? file;
644
+ for (const [name, entry] of Object.entries(module.default ?? {})) {
645
+ if (entries[name]) throw new Error("Two generative faces claim \"" + name + "\": " + entries[name]._from + " and " + family);
646
+ entries[name] = {
647
+ ...entry,
648
+ _from: family
649
+ };
650
+ }
651
+ }
652
+ const faces = Object.fromEntries(Object.entries(entries).map(([name, entry]) => [name, {
653
+ props: entry.props,
654
+ slots: entry.slots,
655
+ description: entry.description
656
+ }]));
657
+ const catalog = defineCatalog(schema, {
658
+ components: faces,
659
+ actions: {}
660
+ });
661
+ const { registry } = defineRegistry(catalog, {
662
+ actions: {},
663
+ components: Object.fromEntries(Object.entries(entries).map(([name, entry]) => [name, entry.component]))
664
+ });
665
+ /** Which family each face came home from. A family may speak under
666
+ * several names - Layout plus its parts, Bento plus its cell - and the
667
+ * palette groups by provenance, never by guessing from the name. */
668
+ const faceFamilies = Object.fromEntries(Object.entries(entries).map(([name, entry]) => [name, entry._from]));
669
+ //#endregion
670
+ export { catalog, faceFamilies, registry };