@btst/stack 2.5.4 → 2.5.5
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/packages/stack/src/plugins/ui-builder/client/registry.cjs +309 -37
- package/dist/packages/stack/src/plugins/ui-builder/client/registry.mjs +310 -38
- package/dist/packages/ui/src/lib/ui-builder/registry/form-field-overrides.cjs +207 -0
- package/dist/packages/ui/src/lib/ui-builder/registry/form-field-overrides.mjs +206 -1
- package/package.json +1 -1
- package/src/plugins/ui-builder/client/registry.ts +295 -19
|
@@ -10,7 +10,7 @@ import { Grid } from '../../../../../ui/src/components/ui-builder/components/gri
|
|
|
10
10
|
import { CodePanel } from '../../../../../ui/src/components/ui-builder/components/code-panel.mjs';
|
|
11
11
|
import { Markdown } from '../../../../../ui/src/components/ui-builder/components/markdown.mjs';
|
|
12
12
|
import { Icon, iconNames } from '../../../../../ui/src/components/ui-builder/components/icon.mjs';
|
|
13
|
-
import { classNameFieldOverrides, commonFieldOverrides, childrenFieldOverrides, iconNameFieldOverrides, childrenAsTipTapFieldOverrides, childrenAsTextareaFieldOverrides } from '../../../../../ui/src/lib/ui-builder/registry/form-field-overrides.mjs';
|
|
13
|
+
import { classNameFieldOverrides, commonFieldOverrides, functionPropFieldOverrides, childrenFieldOverrides, iconNameFieldOverrides, childrenAsTipTapFieldOverrides, childrenAsTextareaFieldOverrides } from '../../../../../ui/src/lib/ui-builder/registry/form-field-overrides.mjs';
|
|
14
14
|
|
|
15
15
|
const primitiveComponentDefinitions = {
|
|
16
16
|
a: {
|
|
@@ -21,9 +21,118 @@ const primitiveComponentDefinitions = {
|
|
|
21
21
|
target: z.enum(["_blank", "_self", "_parent", "_top"]).optional().default("_self"),
|
|
22
22
|
rel: z.enum(["noopener", "noreferrer", "nofollow"]).optional(),
|
|
23
23
|
title: z.string().optional(),
|
|
24
|
-
download: z.boolean().optional().default(false)
|
|
24
|
+
download: z.boolean().optional().default(false),
|
|
25
|
+
onClick: z.any().optional()
|
|
25
26
|
}),
|
|
26
|
-
fieldOverrides:
|
|
27
|
+
fieldOverrides: {
|
|
28
|
+
...commonFieldOverrides(),
|
|
29
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
button: {
|
|
33
|
+
schema: z.object({
|
|
34
|
+
className: z.string().optional(),
|
|
35
|
+
children: z.any().optional(),
|
|
36
|
+
type: z.enum(["button", "submit", "reset"]).optional().default("button"),
|
|
37
|
+
disabled: z.boolean().optional().default(false),
|
|
38
|
+
onClick: z.any().optional()
|
|
39
|
+
}),
|
|
40
|
+
defaultChildren: "Button",
|
|
41
|
+
fieldOverrides: {
|
|
42
|
+
...commonFieldOverrides(),
|
|
43
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
form: {
|
|
47
|
+
schema: z.object({
|
|
48
|
+
className: z.string().optional(),
|
|
49
|
+
children: z.any().optional(),
|
|
50
|
+
action: z.string().optional(),
|
|
51
|
+
method: z.enum(["get", "post"]).optional(),
|
|
52
|
+
onSubmit: z.any().optional()
|
|
53
|
+
}),
|
|
54
|
+
fieldOverrides: {
|
|
55
|
+
...commonFieldOverrides(),
|
|
56
|
+
onSubmit: () => functionPropFieldOverrides("onSubmit")
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
input: {
|
|
60
|
+
schema: z.object({
|
|
61
|
+
className: z.string().optional(),
|
|
62
|
+
type: z.enum([
|
|
63
|
+
"text",
|
|
64
|
+
"password",
|
|
65
|
+
"email",
|
|
66
|
+
"number",
|
|
67
|
+
"tel",
|
|
68
|
+
"url",
|
|
69
|
+
"search",
|
|
70
|
+
"date",
|
|
71
|
+
"time",
|
|
72
|
+
"hidden"
|
|
73
|
+
]).optional().default("text"),
|
|
74
|
+
name: z.string().optional(),
|
|
75
|
+
placeholder: z.string().optional(),
|
|
76
|
+
defaultValue: z.string().optional(),
|
|
77
|
+
disabled: z.boolean().optional().default(false),
|
|
78
|
+
required: z.boolean().optional().default(false),
|
|
79
|
+
onChange: z.any().optional(),
|
|
80
|
+
onBlur: z.any().optional(),
|
|
81
|
+
onFocus: z.any().optional()
|
|
82
|
+
}),
|
|
83
|
+
fieldOverrides: {
|
|
84
|
+
className: (layer) => classNameFieldOverrides(),
|
|
85
|
+
onChange: () => functionPropFieldOverrides("onChange"),
|
|
86
|
+
onBlur: () => functionPropFieldOverrides("onBlur"),
|
|
87
|
+
onFocus: () => functionPropFieldOverrides("onFocus")
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
textarea: {
|
|
91
|
+
schema: z.object({
|
|
92
|
+
className: z.string().optional(),
|
|
93
|
+
name: z.string().optional(),
|
|
94
|
+
placeholder: z.string().optional(),
|
|
95
|
+
defaultValue: z.string().optional(),
|
|
96
|
+
rows: z.coerce.number().optional(),
|
|
97
|
+
disabled: z.boolean().optional().default(false),
|
|
98
|
+
required: z.boolean().optional().default(false),
|
|
99
|
+
onChange: z.any().optional(),
|
|
100
|
+
onBlur: z.any().optional(),
|
|
101
|
+
onFocus: z.any().optional()
|
|
102
|
+
}),
|
|
103
|
+
fieldOverrides: {
|
|
104
|
+
className: (layer) => classNameFieldOverrides(),
|
|
105
|
+
onChange: () => functionPropFieldOverrides("onChange"),
|
|
106
|
+
onBlur: () => functionPropFieldOverrides("onBlur"),
|
|
107
|
+
onFocus: () => functionPropFieldOverrides("onFocus")
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
select: {
|
|
111
|
+
schema: z.object({
|
|
112
|
+
className: z.string().optional(),
|
|
113
|
+
children: z.any().optional(),
|
|
114
|
+
name: z.string().optional(),
|
|
115
|
+
defaultValue: z.string().optional(),
|
|
116
|
+
disabled: z.boolean().optional().default(false),
|
|
117
|
+
required: z.boolean().optional().default(false),
|
|
118
|
+
onChange: z.any().optional()
|
|
119
|
+
}),
|
|
120
|
+
fieldOverrides: {
|
|
121
|
+
...commonFieldOverrides(),
|
|
122
|
+
onChange: () => functionPropFieldOverrides("onChange")
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
label: {
|
|
126
|
+
schema: z.object({
|
|
127
|
+
className: z.string().optional(),
|
|
128
|
+
children: z.any().optional(),
|
|
129
|
+
htmlFor: z.string().optional(),
|
|
130
|
+
onClick: z.any().optional()
|
|
131
|
+
}),
|
|
132
|
+
fieldOverrides: {
|
|
133
|
+
...commonFieldOverrides(),
|
|
134
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
135
|
+
}
|
|
27
136
|
},
|
|
28
137
|
img: {
|
|
29
138
|
schema: z.object({
|
|
@@ -31,18 +140,24 @@ const primitiveComponentDefinitions = {
|
|
|
31
140
|
src: z.string().default("https://placehold.co/200"),
|
|
32
141
|
alt: z.string().optional(),
|
|
33
142
|
width: z.coerce.number().optional(),
|
|
34
|
-
height: z.coerce.number().optional()
|
|
143
|
+
height: z.coerce.number().optional(),
|
|
144
|
+
onClick: z.any().optional()
|
|
35
145
|
}),
|
|
36
146
|
fieldOverrides: {
|
|
37
|
-
className: (layer) => classNameFieldOverrides()
|
|
147
|
+
className: (layer) => classNameFieldOverrides(),
|
|
148
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
38
149
|
}
|
|
39
150
|
},
|
|
40
151
|
div: {
|
|
41
152
|
schema: z.object({
|
|
42
153
|
className: z.string().optional(),
|
|
43
|
-
children: z.any().optional()
|
|
154
|
+
children: z.any().optional(),
|
|
155
|
+
onClick: z.any().optional()
|
|
44
156
|
}),
|
|
45
|
-
fieldOverrides:
|
|
157
|
+
fieldOverrides: {
|
|
158
|
+
...commonFieldOverrides(),
|
|
159
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
160
|
+
}
|
|
46
161
|
},
|
|
47
162
|
iframe: {
|
|
48
163
|
schema: z.object({
|
|
@@ -74,56 +189,101 @@ const primitiveComponentDefinitions = {
|
|
|
74
189
|
span: {
|
|
75
190
|
schema: z.object({
|
|
76
191
|
className: z.string().optional(),
|
|
77
|
-
children: z.string().optional()
|
|
192
|
+
children: z.string().optional(),
|
|
193
|
+
onClick: z.any().optional()
|
|
78
194
|
}),
|
|
79
195
|
defaultChildren: "Text",
|
|
80
196
|
fieldOverrides: {
|
|
81
197
|
className: (layer) => classNameFieldOverrides(),
|
|
82
|
-
children: (layer) => childrenAsTextareaFieldOverrides(layer)
|
|
198
|
+
children: (layer) => childrenAsTextareaFieldOverrides(layer),
|
|
199
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
83
200
|
}
|
|
84
201
|
},
|
|
85
202
|
h1: {
|
|
86
203
|
schema: z.object({
|
|
87
204
|
className: z.string().optional(),
|
|
88
|
-
children: z.string().optional()
|
|
205
|
+
children: z.string().optional(),
|
|
206
|
+
onClick: z.any().optional()
|
|
89
207
|
}),
|
|
90
208
|
defaultChildren: "Heading 1",
|
|
91
209
|
fieldOverrides: {
|
|
92
|
-
|
|
93
|
-
children: (layer) => childrenAsTextareaFieldOverrides(layer)
|
|
210
|
+
...commonFieldOverrides(),
|
|
211
|
+
children: (layer) => childrenAsTextareaFieldOverrides(layer),
|
|
212
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
94
213
|
}
|
|
95
214
|
},
|
|
96
215
|
h2: {
|
|
97
216
|
schema: z.object({
|
|
98
217
|
className: z.string().optional(),
|
|
99
|
-
children: z.string().optional()
|
|
218
|
+
children: z.string().optional(),
|
|
219
|
+
onClick: z.any().optional()
|
|
100
220
|
}),
|
|
101
221
|
defaultChildren: "Heading 2",
|
|
102
222
|
fieldOverrides: {
|
|
103
|
-
|
|
104
|
-
children: (layer) => childrenAsTextareaFieldOverrides(layer)
|
|
223
|
+
...commonFieldOverrides(),
|
|
224
|
+
children: (layer) => childrenAsTextareaFieldOverrides(layer),
|
|
225
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
105
226
|
}
|
|
106
227
|
},
|
|
107
228
|
h3: {
|
|
108
229
|
schema: z.object({
|
|
109
230
|
className: z.string().optional(),
|
|
110
|
-
children: z.string().optional()
|
|
231
|
+
children: z.string().optional(),
|
|
232
|
+
onClick: z.any().optional()
|
|
111
233
|
}),
|
|
112
234
|
defaultChildren: "Heading 3",
|
|
113
235
|
fieldOverrides: {
|
|
114
|
-
|
|
115
|
-
children: (layer) => childrenAsTextareaFieldOverrides(layer)
|
|
236
|
+
...commonFieldOverrides(),
|
|
237
|
+
children: (layer) => childrenAsTextareaFieldOverrides(layer),
|
|
238
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
116
239
|
}
|
|
117
240
|
},
|
|
118
241
|
p: {
|
|
119
242
|
schema: z.object({
|
|
120
243
|
className: z.string().optional(),
|
|
121
|
-
children: z.string().optional()
|
|
244
|
+
children: z.string().optional(),
|
|
245
|
+
onClick: z.any().optional()
|
|
122
246
|
}),
|
|
123
|
-
defaultChildren: "Paragraph",
|
|
247
|
+
defaultChildren: "Paragraph text",
|
|
124
248
|
fieldOverrides: {
|
|
125
|
-
|
|
126
|
-
children: (layer) => childrenAsTextareaFieldOverrides(layer)
|
|
249
|
+
...commonFieldOverrides(),
|
|
250
|
+
children: (layer) => childrenAsTextareaFieldOverrides(layer),
|
|
251
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
li: {
|
|
255
|
+
schema: z.object({
|
|
256
|
+
className: z.string().optional(),
|
|
257
|
+
children: z.string().optional(),
|
|
258
|
+
onClick: z.any().optional()
|
|
259
|
+
}),
|
|
260
|
+
defaultChildren: "List item",
|
|
261
|
+
fieldOverrides: {
|
|
262
|
+
...commonFieldOverrides(),
|
|
263
|
+
children: (layer) => childrenAsTextareaFieldOverrides(layer),
|
|
264
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
ul: {
|
|
268
|
+
schema: z.object({
|
|
269
|
+
className: z.string().optional(),
|
|
270
|
+
children: z.any().optional(),
|
|
271
|
+
onClick: z.any().optional()
|
|
272
|
+
}),
|
|
273
|
+
fieldOverrides: {
|
|
274
|
+
...commonFieldOverrides(),
|
|
275
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
ol: {
|
|
279
|
+
schema: z.object({
|
|
280
|
+
className: z.string().optional(),
|
|
281
|
+
children: z.any().optional(),
|
|
282
|
+
onClick: z.any().optional()
|
|
283
|
+
}),
|
|
284
|
+
fieldOverrides: {
|
|
285
|
+
...commonFieldOverrides(),
|
|
286
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
127
287
|
}
|
|
128
288
|
}
|
|
129
289
|
};
|
|
@@ -142,7 +302,8 @@ const complexComponentDefinitions = {
|
|
|
142
302
|
"ghost",
|
|
143
303
|
"link"
|
|
144
304
|
]).default("default"),
|
|
145
|
-
size: z.enum(["default", "sm", "lg", "icon"]).default("default")
|
|
305
|
+
size: z.enum(["default", "sm", "lg", "icon"]).default("default"),
|
|
306
|
+
onClick: z.any().optional()
|
|
146
307
|
}),
|
|
147
308
|
from: "@/components/ui/button",
|
|
148
309
|
defaultChildren: [
|
|
@@ -154,14 +315,18 @@ const complexComponentDefinitions = {
|
|
|
154
315
|
children: "Button"
|
|
155
316
|
}
|
|
156
317
|
],
|
|
157
|
-
fieldOverrides:
|
|
318
|
+
fieldOverrides: {
|
|
319
|
+
...commonFieldOverrides(),
|
|
320
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
321
|
+
}
|
|
158
322
|
},
|
|
159
323
|
Badge: {
|
|
160
324
|
component: Badge,
|
|
161
325
|
schema: z.object({
|
|
162
326
|
className: z.string().optional(),
|
|
163
327
|
children: z.any().optional(),
|
|
164
|
-
variant: z.enum(["default", "secondary", "destructive", "outline"]).default("default")
|
|
328
|
+
variant: z.enum(["default", "secondary", "destructive", "outline"]).default("default"),
|
|
329
|
+
onClick: z.any().optional()
|
|
165
330
|
}),
|
|
166
331
|
from: "@/components/ui/badge",
|
|
167
332
|
defaultChildren: [
|
|
@@ -173,7 +338,10 @@ const complexComponentDefinitions = {
|
|
|
173
338
|
children: "Badge"
|
|
174
339
|
}
|
|
175
340
|
],
|
|
176
|
-
fieldOverrides:
|
|
341
|
+
fieldOverrides: {
|
|
342
|
+
...commonFieldOverrides(),
|
|
343
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
344
|
+
}
|
|
177
345
|
},
|
|
178
346
|
Flexbox: {
|
|
179
347
|
component: Flexbox,
|
|
@@ -266,7 +434,8 @@ const complexComponentDefinitions = {
|
|
|
266
434
|
className: z.string().optional(),
|
|
267
435
|
children: z.any().optional(),
|
|
268
436
|
type: z.enum(["single", "multiple"]).default("single"),
|
|
269
|
-
collapsible: z.boolean().optional()
|
|
437
|
+
collapsible: z.boolean().optional(),
|
|
438
|
+
onValueChange: z.any().optional()
|
|
270
439
|
}),
|
|
271
440
|
from: "@/components/ui/accordion",
|
|
272
441
|
defaultChildren: [
|
|
@@ -283,7 +452,7 @@ const complexComponentDefinitions = {
|
|
|
283
452
|
props: {},
|
|
284
453
|
children: [
|
|
285
454
|
{
|
|
286
|
-
id: "acc-trigger-text",
|
|
455
|
+
id: "acc-trigger-1-text",
|
|
287
456
|
type: "span",
|
|
288
457
|
name: "span",
|
|
289
458
|
props: {},
|
|
@@ -298,7 +467,45 @@ const complexComponentDefinitions = {
|
|
|
298
467
|
props: {},
|
|
299
468
|
children: [
|
|
300
469
|
{
|
|
301
|
-
id: "acc-content-text",
|
|
470
|
+
id: "acc-content-1-text",
|
|
471
|
+
type: "span",
|
|
472
|
+
name: "span",
|
|
473
|
+
props: {},
|
|
474
|
+
children: "Accordion Content Text"
|
|
475
|
+
}
|
|
476
|
+
]
|
|
477
|
+
}
|
|
478
|
+
]
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
id: "acc-item-2",
|
|
482
|
+
type: "AccordionItem",
|
|
483
|
+
name: "AccordionItem",
|
|
484
|
+
props: { value: "item-2" },
|
|
485
|
+
children: [
|
|
486
|
+
{
|
|
487
|
+
id: "acc-trigger-2",
|
|
488
|
+
type: "AccordionTrigger",
|
|
489
|
+
name: "AccordionTrigger",
|
|
490
|
+
props: {},
|
|
491
|
+
children: [
|
|
492
|
+
{
|
|
493
|
+
id: "acc-trigger-2-text",
|
|
494
|
+
type: "span",
|
|
495
|
+
name: "span",
|
|
496
|
+
props: {},
|
|
497
|
+
children: "Accordion Item #2"
|
|
498
|
+
}
|
|
499
|
+
]
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
id: "acc-content-2",
|
|
503
|
+
type: "AccordionContent",
|
|
504
|
+
name: "AccordionContent",
|
|
505
|
+
props: {},
|
|
506
|
+
children: [
|
|
507
|
+
{
|
|
508
|
+
id: "acc-content-2-text",
|
|
302
509
|
type: "span",
|
|
303
510
|
name: "span",
|
|
304
511
|
props: {},
|
|
@@ -309,7 +516,10 @@ const complexComponentDefinitions = {
|
|
|
309
516
|
]
|
|
310
517
|
}
|
|
311
518
|
],
|
|
312
|
-
fieldOverrides:
|
|
519
|
+
fieldOverrides: {
|
|
520
|
+
...commonFieldOverrides(),
|
|
521
|
+
onValueChange: () => functionPropFieldOverrides("onValueChange")
|
|
522
|
+
}
|
|
313
523
|
},
|
|
314
524
|
AccordionItem: {
|
|
315
525
|
component: AccordionItem,
|
|
@@ -319,18 +529,54 @@ const complexComponentDefinitions = {
|
|
|
319
529
|
value: z.string().default("item-1")
|
|
320
530
|
}),
|
|
321
531
|
from: "@/components/ui/accordion",
|
|
532
|
+
childOf: ["Accordion"],
|
|
533
|
+
defaultChildren: [
|
|
534
|
+
{
|
|
535
|
+
id: "acc-trigger-default",
|
|
536
|
+
type: "AccordionTrigger",
|
|
537
|
+
name: "AccordionTrigger",
|
|
538
|
+
props: {},
|
|
539
|
+
children: [
|
|
540
|
+
{
|
|
541
|
+
id: "acc-trigger-default-text",
|
|
542
|
+
type: "span",
|
|
543
|
+
name: "span",
|
|
544
|
+
props: {},
|
|
545
|
+
children: "Accordion Item"
|
|
546
|
+
}
|
|
547
|
+
]
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
id: "acc-content-default",
|
|
551
|
+
type: "AccordionContent",
|
|
552
|
+
name: "AccordionContent",
|
|
553
|
+
props: {},
|
|
554
|
+
children: [
|
|
555
|
+
{
|
|
556
|
+
id: "acc-content-default-text",
|
|
557
|
+
type: "span",
|
|
558
|
+
name: "span",
|
|
559
|
+
props: {},
|
|
560
|
+
children: "Accordion Content"
|
|
561
|
+
}
|
|
562
|
+
]
|
|
563
|
+
}
|
|
564
|
+
],
|
|
322
565
|
fieldOverrides: commonFieldOverrides()
|
|
323
566
|
},
|
|
324
567
|
AccordionTrigger: {
|
|
325
568
|
component: AccordionTrigger,
|
|
326
569
|
schema: z.object({
|
|
327
570
|
className: z.string().optional(),
|
|
328
|
-
children: z.any().optional()
|
|
571
|
+
children: z.any().optional(),
|
|
572
|
+
onClick: z.any().optional()
|
|
329
573
|
}),
|
|
330
574
|
from: "@/components/ui/accordion",
|
|
575
|
+
childOf: ["AccordionItem"],
|
|
331
576
|
fieldOverrides: {
|
|
332
577
|
className: (layer) => classNameFieldOverrides(),
|
|
333
|
-
children: (layer) => childrenFieldOverrides(layer)
|
|
578
|
+
children: (layer) => childrenFieldOverrides(layer),
|
|
579
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
334
580
|
}
|
|
335
581
|
},
|
|
336
582
|
AccordionContent: {
|
|
@@ -340,13 +586,15 @@ const complexComponentDefinitions = {
|
|
|
340
586
|
children: z.any().optional()
|
|
341
587
|
}),
|
|
342
588
|
from: "@/components/ui/accordion",
|
|
589
|
+
childOf: ["AccordionItem"],
|
|
343
590
|
fieldOverrides: commonFieldOverrides()
|
|
344
591
|
},
|
|
345
592
|
Card: {
|
|
346
593
|
component: Card,
|
|
347
594
|
schema: z.object({
|
|
348
595
|
className: z.string().optional(),
|
|
349
|
-
children: z.any().optional()
|
|
596
|
+
children: z.any().optional(),
|
|
597
|
+
onClick: z.any().optional()
|
|
350
598
|
}),
|
|
351
599
|
from: "@/components/ui/card",
|
|
352
600
|
defaultChildren: [
|
|
@@ -361,14 +609,30 @@ const complexComponentDefinitions = {
|
|
|
361
609
|
type: "CardTitle",
|
|
362
610
|
name: "CardTitle",
|
|
363
611
|
props: {},
|
|
364
|
-
children:
|
|
612
|
+
children: [
|
|
613
|
+
{
|
|
614
|
+
id: "card-title-text",
|
|
615
|
+
type: "span",
|
|
616
|
+
name: "span",
|
|
617
|
+
props: {},
|
|
618
|
+
children: "Card Title"
|
|
619
|
+
}
|
|
620
|
+
]
|
|
365
621
|
},
|
|
366
622
|
{
|
|
367
623
|
id: "card-description",
|
|
368
624
|
type: "CardDescription",
|
|
369
625
|
name: "CardDescription",
|
|
370
626
|
props: {},
|
|
371
|
-
children:
|
|
627
|
+
children: [
|
|
628
|
+
{
|
|
629
|
+
id: "card-description-text",
|
|
630
|
+
type: "span",
|
|
631
|
+
name: "span",
|
|
632
|
+
props: {},
|
|
633
|
+
children: "Card Description"
|
|
634
|
+
}
|
|
635
|
+
]
|
|
372
636
|
}
|
|
373
637
|
]
|
|
374
638
|
},
|
|
@@ -383,7 +647,7 @@ const complexComponentDefinitions = {
|
|
|
383
647
|
type: "span",
|
|
384
648
|
name: "span",
|
|
385
649
|
props: {},
|
|
386
|
-
children: "Card Content
|
|
650
|
+
children: "Card Content"
|
|
387
651
|
}
|
|
388
652
|
]
|
|
389
653
|
},
|
|
@@ -398,12 +662,15 @@ const complexComponentDefinitions = {
|
|
|
398
662
|
type: "span",
|
|
399
663
|
name: "span",
|
|
400
664
|
props: {},
|
|
401
|
-
children: "Card Footer
|
|
665
|
+
children: "Card Footer"
|
|
402
666
|
}
|
|
403
667
|
]
|
|
404
668
|
}
|
|
405
669
|
],
|
|
406
|
-
fieldOverrides:
|
|
670
|
+
fieldOverrides: {
|
|
671
|
+
...commonFieldOverrides(),
|
|
672
|
+
onClick: () => functionPropFieldOverrides("onClick")
|
|
673
|
+
}
|
|
407
674
|
},
|
|
408
675
|
CardHeader: {
|
|
409
676
|
component: CardHeader,
|
|
@@ -412,6 +679,7 @@ const complexComponentDefinitions = {
|
|
|
412
679
|
children: z.any().optional()
|
|
413
680
|
}),
|
|
414
681
|
from: "@/components/ui/card",
|
|
682
|
+
childOf: ["Card"],
|
|
415
683
|
fieldOverrides: commonFieldOverrides()
|
|
416
684
|
},
|
|
417
685
|
CardTitle: {
|
|
@@ -421,6 +689,7 @@ const complexComponentDefinitions = {
|
|
|
421
689
|
children: z.any().optional()
|
|
422
690
|
}),
|
|
423
691
|
from: "@/components/ui/card",
|
|
692
|
+
childOf: ["CardHeader"],
|
|
424
693
|
fieldOverrides: commonFieldOverrides()
|
|
425
694
|
},
|
|
426
695
|
CardDescription: {
|
|
@@ -430,6 +699,7 @@ const complexComponentDefinitions = {
|
|
|
430
699
|
children: z.any().optional()
|
|
431
700
|
}),
|
|
432
701
|
from: "@/components/ui/card",
|
|
702
|
+
childOf: ["CardHeader"],
|
|
433
703
|
fieldOverrides: commonFieldOverrides()
|
|
434
704
|
},
|
|
435
705
|
CardContent: {
|
|
@@ -439,6 +709,7 @@ const complexComponentDefinitions = {
|
|
|
439
709
|
children: z.any().optional()
|
|
440
710
|
}),
|
|
441
711
|
from: "@/components/ui/card",
|
|
712
|
+
childOf: ["Card"],
|
|
442
713
|
fieldOverrides: commonFieldOverrides()
|
|
443
714
|
},
|
|
444
715
|
CardFooter: {
|
|
@@ -448,6 +719,7 @@ const complexComponentDefinitions = {
|
|
|
448
719
|
children: z.any().optional()
|
|
449
720
|
}),
|
|
450
721
|
from: "@/components/ui/card",
|
|
722
|
+
childOf: ["Card"],
|
|
451
723
|
fieldOverrides: commonFieldOverrides()
|
|
452
724
|
},
|
|
453
725
|
Separator: {
|