@btst/stack 2.5.4 → 2.5.6
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/components/pages/page-builder-page.internal.cjs +3 -1
- package/dist/packages/stack/src/plugins/ui-builder/client/components/pages/page-builder-page.internal.mjs +3 -1
- 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/dist/plugins/ui-builder/client/index.d.cts +6 -1
- package/dist/plugins/ui-builder/client/index.d.mts +6 -1
- package/dist/plugins/ui-builder/client/index.d.ts +6 -1
- package/package.json +1 -1
- package/src/plugins/ui-builder/client/components/pages/page-builder-page.internal.tsx +2 -0
- package/src/plugins/ui-builder/client/overrides.ts +10 -1
- package/src/plugins/ui-builder/client/registry.ts +295 -19
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
commonFieldOverrides,
|
|
44
44
|
childrenAsTipTapFieldOverrides,
|
|
45
45
|
childrenAsTextareaFieldOverrides,
|
|
46
|
+
functionPropFieldOverrides,
|
|
46
47
|
} from "@workspace/ui/lib/ui-builder/registry/form-field-overrides";
|
|
47
48
|
|
|
48
49
|
/**
|
|
@@ -62,8 +63,120 @@ export const primitiveComponentDefinitions: ComponentRegistry = {
|
|
|
62
63
|
rel: z.enum(["noopener", "noreferrer", "nofollow"]).optional(),
|
|
63
64
|
title: z.string().optional(),
|
|
64
65
|
download: z.boolean().optional().default(false),
|
|
66
|
+
onClick: z.any().optional(),
|
|
65
67
|
}),
|
|
66
|
-
fieldOverrides:
|
|
68
|
+
fieldOverrides: {
|
|
69
|
+
...commonFieldOverrides(),
|
|
70
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
button: {
|
|
74
|
+
schema: z.object({
|
|
75
|
+
className: z.string().optional(),
|
|
76
|
+
children: z.any().optional(),
|
|
77
|
+
type: z.enum(["button", "submit", "reset"]).optional().default("button"),
|
|
78
|
+
disabled: z.boolean().optional().default(false),
|
|
79
|
+
onClick: z.any().optional(),
|
|
80
|
+
}),
|
|
81
|
+
defaultChildren: "Button",
|
|
82
|
+
fieldOverrides: {
|
|
83
|
+
...commonFieldOverrides(),
|
|
84
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
form: {
|
|
88
|
+
schema: z.object({
|
|
89
|
+
className: z.string().optional(),
|
|
90
|
+
children: z.any().optional(),
|
|
91
|
+
action: z.string().optional(),
|
|
92
|
+
method: z.enum(["get", "post"]).optional(),
|
|
93
|
+
onSubmit: z.any().optional(),
|
|
94
|
+
}),
|
|
95
|
+
fieldOverrides: {
|
|
96
|
+
...commonFieldOverrides(),
|
|
97
|
+
onSubmit: () => functionPropFieldOverrides("onSubmit"),
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
input: {
|
|
101
|
+
schema: z.object({
|
|
102
|
+
className: z.string().optional(),
|
|
103
|
+
type: z
|
|
104
|
+
.enum([
|
|
105
|
+
"text",
|
|
106
|
+
"password",
|
|
107
|
+
"email",
|
|
108
|
+
"number",
|
|
109
|
+
"tel",
|
|
110
|
+
"url",
|
|
111
|
+
"search",
|
|
112
|
+
"date",
|
|
113
|
+
"time",
|
|
114
|
+
"hidden",
|
|
115
|
+
])
|
|
116
|
+
.optional()
|
|
117
|
+
.default("text"),
|
|
118
|
+
name: z.string().optional(),
|
|
119
|
+
placeholder: z.string().optional(),
|
|
120
|
+
defaultValue: z.string().optional(),
|
|
121
|
+
disabled: z.boolean().optional().default(false),
|
|
122
|
+
required: z.boolean().optional().default(false),
|
|
123
|
+
onChange: z.any().optional(),
|
|
124
|
+
onBlur: z.any().optional(),
|
|
125
|
+
onFocus: z.any().optional(),
|
|
126
|
+
}),
|
|
127
|
+
fieldOverrides: {
|
|
128
|
+
className: (layer) => classNameFieldOverrides(layer),
|
|
129
|
+
onChange: () => functionPropFieldOverrides("onChange"),
|
|
130
|
+
onBlur: () => functionPropFieldOverrides("onBlur"),
|
|
131
|
+
onFocus: () => functionPropFieldOverrides("onFocus"),
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
textarea: {
|
|
135
|
+
schema: z.object({
|
|
136
|
+
className: z.string().optional(),
|
|
137
|
+
name: z.string().optional(),
|
|
138
|
+
placeholder: z.string().optional(),
|
|
139
|
+
defaultValue: z.string().optional(),
|
|
140
|
+
rows: z.coerce.number().optional(),
|
|
141
|
+
disabled: z.boolean().optional().default(false),
|
|
142
|
+
required: z.boolean().optional().default(false),
|
|
143
|
+
onChange: z.any().optional(),
|
|
144
|
+
onBlur: z.any().optional(),
|
|
145
|
+
onFocus: z.any().optional(),
|
|
146
|
+
}),
|
|
147
|
+
fieldOverrides: {
|
|
148
|
+
className: (layer) => classNameFieldOverrides(layer),
|
|
149
|
+
onChange: () => functionPropFieldOverrides("onChange"),
|
|
150
|
+
onBlur: () => functionPropFieldOverrides("onBlur"),
|
|
151
|
+
onFocus: () => functionPropFieldOverrides("onFocus"),
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
select: {
|
|
155
|
+
schema: z.object({
|
|
156
|
+
className: z.string().optional(),
|
|
157
|
+
children: z.any().optional(),
|
|
158
|
+
name: z.string().optional(),
|
|
159
|
+
defaultValue: z.string().optional(),
|
|
160
|
+
disabled: z.boolean().optional().default(false),
|
|
161
|
+
required: z.boolean().optional().default(false),
|
|
162
|
+
onChange: z.any().optional(),
|
|
163
|
+
}),
|
|
164
|
+
fieldOverrides: {
|
|
165
|
+
...commonFieldOverrides(),
|
|
166
|
+
onChange: () => functionPropFieldOverrides("onChange"),
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
label: {
|
|
170
|
+
schema: z.object({
|
|
171
|
+
className: z.string().optional(),
|
|
172
|
+
children: z.any().optional(),
|
|
173
|
+
htmlFor: z.string().optional(),
|
|
174
|
+
onClick: z.any().optional(),
|
|
175
|
+
}),
|
|
176
|
+
fieldOverrides: {
|
|
177
|
+
...commonFieldOverrides(),
|
|
178
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
179
|
+
},
|
|
67
180
|
},
|
|
68
181
|
img: {
|
|
69
182
|
schema: z.object({
|
|
@@ -72,17 +185,23 @@ export const primitiveComponentDefinitions: ComponentRegistry = {
|
|
|
72
185
|
alt: z.string().optional(),
|
|
73
186
|
width: z.coerce.number().optional(),
|
|
74
187
|
height: z.coerce.number().optional(),
|
|
188
|
+
onClick: z.any().optional(),
|
|
75
189
|
}),
|
|
76
190
|
fieldOverrides: {
|
|
77
191
|
className: (layer) => classNameFieldOverrides(layer),
|
|
192
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
78
193
|
},
|
|
79
194
|
},
|
|
80
195
|
div: {
|
|
81
196
|
schema: z.object({
|
|
82
197
|
className: z.string().optional(),
|
|
83
198
|
children: z.any().optional(),
|
|
199
|
+
onClick: z.any().optional(),
|
|
84
200
|
}),
|
|
85
|
-
fieldOverrides:
|
|
201
|
+
fieldOverrides: {
|
|
202
|
+
...commonFieldOverrides(),
|
|
203
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
204
|
+
},
|
|
86
205
|
},
|
|
87
206
|
iframe: {
|
|
88
207
|
schema: z.object({
|
|
@@ -119,55 +238,100 @@ export const primitiveComponentDefinitions: ComponentRegistry = {
|
|
|
119
238
|
schema: z.object({
|
|
120
239
|
className: z.string().optional(),
|
|
121
240
|
children: z.string().optional(),
|
|
241
|
+
onClick: z.any().optional(),
|
|
122
242
|
}),
|
|
123
243
|
defaultChildren: "Text",
|
|
124
244
|
fieldOverrides: {
|
|
125
245
|
className: (layer) => classNameFieldOverrides(layer),
|
|
126
246
|
children: (layer) => childrenAsTextareaFieldOverrides(layer),
|
|
247
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
127
248
|
},
|
|
128
249
|
},
|
|
129
250
|
h1: {
|
|
130
251
|
schema: z.object({
|
|
131
252
|
className: z.string().optional(),
|
|
132
253
|
children: z.string().optional(),
|
|
254
|
+
onClick: z.any().optional(),
|
|
133
255
|
}),
|
|
134
256
|
defaultChildren: "Heading 1",
|
|
135
257
|
fieldOverrides: {
|
|
136
|
-
|
|
258
|
+
...commonFieldOverrides(),
|
|
137
259
|
children: (layer) => childrenAsTextareaFieldOverrides(layer),
|
|
260
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
138
261
|
},
|
|
139
262
|
},
|
|
140
263
|
h2: {
|
|
141
264
|
schema: z.object({
|
|
142
265
|
className: z.string().optional(),
|
|
143
266
|
children: z.string().optional(),
|
|
267
|
+
onClick: z.any().optional(),
|
|
144
268
|
}),
|
|
145
269
|
defaultChildren: "Heading 2",
|
|
146
270
|
fieldOverrides: {
|
|
147
|
-
|
|
271
|
+
...commonFieldOverrides(),
|
|
148
272
|
children: (layer) => childrenAsTextareaFieldOverrides(layer),
|
|
273
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
149
274
|
},
|
|
150
275
|
},
|
|
151
276
|
h3: {
|
|
152
277
|
schema: z.object({
|
|
153
278
|
className: z.string().optional(),
|
|
154
279
|
children: z.string().optional(),
|
|
280
|
+
onClick: z.any().optional(),
|
|
155
281
|
}),
|
|
156
282
|
defaultChildren: "Heading 3",
|
|
157
283
|
fieldOverrides: {
|
|
158
|
-
|
|
284
|
+
...commonFieldOverrides(),
|
|
159
285
|
children: (layer) => childrenAsTextareaFieldOverrides(layer),
|
|
286
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
160
287
|
},
|
|
161
288
|
},
|
|
162
289
|
p: {
|
|
163
290
|
schema: z.object({
|
|
164
291
|
className: z.string().optional(),
|
|
165
292
|
children: z.string().optional(),
|
|
293
|
+
onClick: z.any().optional(),
|
|
166
294
|
}),
|
|
167
|
-
defaultChildren: "Paragraph",
|
|
295
|
+
defaultChildren: "Paragraph text",
|
|
168
296
|
fieldOverrides: {
|
|
169
|
-
|
|
297
|
+
...commonFieldOverrides(),
|
|
298
|
+
children: (layer) => childrenAsTextareaFieldOverrides(layer),
|
|
299
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
li: {
|
|
303
|
+
schema: z.object({
|
|
304
|
+
className: z.string().optional(),
|
|
305
|
+
children: z.string().optional(),
|
|
306
|
+
onClick: z.any().optional(),
|
|
307
|
+
}),
|
|
308
|
+
defaultChildren: "List item",
|
|
309
|
+
fieldOverrides: {
|
|
310
|
+
...commonFieldOverrides(),
|
|
170
311
|
children: (layer) => childrenAsTextareaFieldOverrides(layer),
|
|
312
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
ul: {
|
|
316
|
+
schema: z.object({
|
|
317
|
+
className: z.string().optional(),
|
|
318
|
+
children: z.any().optional(),
|
|
319
|
+
onClick: z.any().optional(),
|
|
320
|
+
}),
|
|
321
|
+
fieldOverrides: {
|
|
322
|
+
...commonFieldOverrides(),
|
|
323
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
ol: {
|
|
327
|
+
schema: z.object({
|
|
328
|
+
className: z.string().optional(),
|
|
329
|
+
children: z.any().optional(),
|
|
330
|
+
onClick: z.any().optional(),
|
|
331
|
+
}),
|
|
332
|
+
fieldOverrides: {
|
|
333
|
+
...commonFieldOverrides(),
|
|
334
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
171
335
|
},
|
|
172
336
|
},
|
|
173
337
|
};
|
|
@@ -194,6 +358,7 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
194
358
|
])
|
|
195
359
|
.default("default"),
|
|
196
360
|
size: z.enum(["default", "sm", "lg", "icon"]).default("default"),
|
|
361
|
+
onClick: z.any().optional(),
|
|
197
362
|
}),
|
|
198
363
|
from: "@/components/ui/button",
|
|
199
364
|
defaultChildren: [
|
|
@@ -205,7 +370,10 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
205
370
|
children: "Button",
|
|
206
371
|
} satisfies ComponentLayer,
|
|
207
372
|
],
|
|
208
|
-
fieldOverrides:
|
|
373
|
+
fieldOverrides: {
|
|
374
|
+
...commonFieldOverrides(),
|
|
375
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
376
|
+
},
|
|
209
377
|
},
|
|
210
378
|
Badge: {
|
|
211
379
|
component: Badge,
|
|
@@ -215,6 +383,7 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
215
383
|
variant: z
|
|
216
384
|
.enum(["default", "secondary", "destructive", "outline"])
|
|
217
385
|
.default("default"),
|
|
386
|
+
onClick: z.any().optional(),
|
|
218
387
|
}),
|
|
219
388
|
from: "@/components/ui/badge",
|
|
220
389
|
defaultChildren: [
|
|
@@ -226,7 +395,10 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
226
395
|
children: "Badge",
|
|
227
396
|
} satisfies ComponentLayer,
|
|
228
397
|
],
|
|
229
|
-
fieldOverrides:
|
|
398
|
+
fieldOverrides: {
|
|
399
|
+
...commonFieldOverrides(),
|
|
400
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
401
|
+
},
|
|
230
402
|
},
|
|
231
403
|
Flexbox: {
|
|
232
404
|
component: Flexbox,
|
|
@@ -343,6 +515,7 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
343
515
|
children: z.any().optional(),
|
|
344
516
|
type: z.enum(["single", "multiple"]).default("single"),
|
|
345
517
|
collapsible: z.boolean().optional(),
|
|
518
|
+
onValueChange: z.any().optional(),
|
|
346
519
|
}),
|
|
347
520
|
from: "@/components/ui/accordion",
|
|
348
521
|
defaultChildren: [
|
|
@@ -359,7 +532,7 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
359
532
|
props: {},
|
|
360
533
|
children: [
|
|
361
534
|
{
|
|
362
|
-
id: "acc-trigger-text",
|
|
535
|
+
id: "acc-trigger-1-text",
|
|
363
536
|
type: "span",
|
|
364
537
|
name: "span",
|
|
365
538
|
props: {},
|
|
@@ -374,7 +547,45 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
374
547
|
props: {},
|
|
375
548
|
children: [
|
|
376
549
|
{
|
|
377
|
-
id: "acc-content-text",
|
|
550
|
+
id: "acc-content-1-text",
|
|
551
|
+
type: "span",
|
|
552
|
+
name: "span",
|
|
553
|
+
props: {},
|
|
554
|
+
children: "Accordion Content Text",
|
|
555
|
+
},
|
|
556
|
+
],
|
|
557
|
+
},
|
|
558
|
+
],
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
id: "acc-item-2",
|
|
562
|
+
type: "AccordionItem",
|
|
563
|
+
name: "AccordionItem",
|
|
564
|
+
props: { value: "item-2" },
|
|
565
|
+
children: [
|
|
566
|
+
{
|
|
567
|
+
id: "acc-trigger-2",
|
|
568
|
+
type: "AccordionTrigger",
|
|
569
|
+
name: "AccordionTrigger",
|
|
570
|
+
props: {},
|
|
571
|
+
children: [
|
|
572
|
+
{
|
|
573
|
+
id: "acc-trigger-2-text",
|
|
574
|
+
type: "span",
|
|
575
|
+
name: "span",
|
|
576
|
+
props: {},
|
|
577
|
+
children: "Accordion Item #2",
|
|
578
|
+
},
|
|
579
|
+
],
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
id: "acc-content-2",
|
|
583
|
+
type: "AccordionContent",
|
|
584
|
+
name: "AccordionContent",
|
|
585
|
+
props: {},
|
|
586
|
+
children: [
|
|
587
|
+
{
|
|
588
|
+
id: "acc-content-2-text",
|
|
378
589
|
type: "span",
|
|
379
590
|
name: "span",
|
|
380
591
|
props: {},
|
|
@@ -385,7 +596,10 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
385
596
|
],
|
|
386
597
|
},
|
|
387
598
|
] as ComponentLayer[],
|
|
388
|
-
fieldOverrides:
|
|
599
|
+
fieldOverrides: {
|
|
600
|
+
...commonFieldOverrides(),
|
|
601
|
+
onValueChange: () => functionPropFieldOverrides("onValueChange"),
|
|
602
|
+
},
|
|
389
603
|
},
|
|
390
604
|
AccordionItem: {
|
|
391
605
|
component: AccordionItem,
|
|
@@ -395,6 +609,39 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
395
609
|
value: z.string().default("item-1"),
|
|
396
610
|
}),
|
|
397
611
|
from: "@/components/ui/accordion",
|
|
612
|
+
childOf: ["Accordion"],
|
|
613
|
+
defaultChildren: [
|
|
614
|
+
{
|
|
615
|
+
id: "acc-trigger-default",
|
|
616
|
+
type: "AccordionTrigger",
|
|
617
|
+
name: "AccordionTrigger",
|
|
618
|
+
props: {},
|
|
619
|
+
children: [
|
|
620
|
+
{
|
|
621
|
+
id: "acc-trigger-default-text",
|
|
622
|
+
type: "span",
|
|
623
|
+
name: "span",
|
|
624
|
+
props: {},
|
|
625
|
+
children: "Accordion Item",
|
|
626
|
+
} satisfies ComponentLayer,
|
|
627
|
+
],
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
id: "acc-content-default",
|
|
631
|
+
type: "AccordionContent",
|
|
632
|
+
name: "AccordionContent",
|
|
633
|
+
props: {},
|
|
634
|
+
children: [
|
|
635
|
+
{
|
|
636
|
+
id: "acc-content-default-text",
|
|
637
|
+
type: "span",
|
|
638
|
+
name: "span",
|
|
639
|
+
props: {},
|
|
640
|
+
children: "Accordion Content",
|
|
641
|
+
} satisfies ComponentLayer,
|
|
642
|
+
],
|
|
643
|
+
},
|
|
644
|
+
] as ComponentLayer[],
|
|
398
645
|
fieldOverrides: commonFieldOverrides(),
|
|
399
646
|
},
|
|
400
647
|
AccordionTrigger: {
|
|
@@ -402,11 +649,14 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
402
649
|
schema: z.object({
|
|
403
650
|
className: z.string().optional(),
|
|
404
651
|
children: z.any().optional(),
|
|
652
|
+
onClick: z.any().optional(),
|
|
405
653
|
}),
|
|
406
654
|
from: "@/components/ui/accordion",
|
|
655
|
+
childOf: ["AccordionItem"],
|
|
407
656
|
fieldOverrides: {
|
|
408
657
|
className: (layer) => classNameFieldOverrides(layer),
|
|
409
658
|
children: (layer) => childrenFieldOverrides(layer),
|
|
659
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
410
660
|
},
|
|
411
661
|
},
|
|
412
662
|
AccordionContent: {
|
|
@@ -416,6 +666,7 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
416
666
|
children: z.any().optional(),
|
|
417
667
|
}),
|
|
418
668
|
from: "@/components/ui/accordion",
|
|
669
|
+
childOf: ["AccordionItem"],
|
|
419
670
|
fieldOverrides: commonFieldOverrides(),
|
|
420
671
|
},
|
|
421
672
|
Card: {
|
|
@@ -423,6 +674,7 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
423
674
|
schema: z.object({
|
|
424
675
|
className: z.string().optional(),
|
|
425
676
|
children: z.any().optional(),
|
|
677
|
+
onClick: z.any().optional(),
|
|
426
678
|
}),
|
|
427
679
|
from: "@/components/ui/card",
|
|
428
680
|
defaultChildren: [
|
|
@@ -437,14 +689,30 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
437
689
|
type: "CardTitle",
|
|
438
690
|
name: "CardTitle",
|
|
439
691
|
props: {},
|
|
440
|
-
children:
|
|
692
|
+
children: [
|
|
693
|
+
{
|
|
694
|
+
id: "card-title-text",
|
|
695
|
+
type: "span",
|
|
696
|
+
name: "span",
|
|
697
|
+
props: {},
|
|
698
|
+
children: "Card Title",
|
|
699
|
+
} satisfies ComponentLayer,
|
|
700
|
+
],
|
|
441
701
|
},
|
|
442
702
|
{
|
|
443
703
|
id: "card-description",
|
|
444
704
|
type: "CardDescription",
|
|
445
705
|
name: "CardDescription",
|
|
446
706
|
props: {},
|
|
447
|
-
children:
|
|
707
|
+
children: [
|
|
708
|
+
{
|
|
709
|
+
id: "card-description-text",
|
|
710
|
+
type: "span",
|
|
711
|
+
name: "span",
|
|
712
|
+
props: {},
|
|
713
|
+
children: "Card Description",
|
|
714
|
+
} satisfies ComponentLayer,
|
|
715
|
+
],
|
|
448
716
|
},
|
|
449
717
|
],
|
|
450
718
|
},
|
|
@@ -459,8 +727,8 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
459
727
|
type: "span",
|
|
460
728
|
name: "span",
|
|
461
729
|
props: {},
|
|
462
|
-
children: "Card Content
|
|
463
|
-
},
|
|
730
|
+
children: "Card Content",
|
|
731
|
+
} satisfies ComponentLayer,
|
|
464
732
|
],
|
|
465
733
|
},
|
|
466
734
|
{
|
|
@@ -474,12 +742,15 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
474
742
|
type: "span",
|
|
475
743
|
name: "span",
|
|
476
744
|
props: {},
|
|
477
|
-
children: "Card Footer
|
|
478
|
-
},
|
|
745
|
+
children: "Card Footer",
|
|
746
|
+
} satisfies ComponentLayer,
|
|
479
747
|
],
|
|
480
748
|
},
|
|
481
749
|
] as ComponentLayer[],
|
|
482
|
-
fieldOverrides:
|
|
750
|
+
fieldOverrides: {
|
|
751
|
+
...commonFieldOverrides(),
|
|
752
|
+
onClick: () => functionPropFieldOverrides("onClick"),
|
|
753
|
+
},
|
|
483
754
|
},
|
|
484
755
|
CardHeader: {
|
|
485
756
|
component: CardHeader,
|
|
@@ -488,6 +759,7 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
488
759
|
children: z.any().optional(),
|
|
489
760
|
}),
|
|
490
761
|
from: "@/components/ui/card",
|
|
762
|
+
childOf: ["Card"],
|
|
491
763
|
fieldOverrides: commonFieldOverrides(),
|
|
492
764
|
},
|
|
493
765
|
CardTitle: {
|
|
@@ -497,6 +769,7 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
497
769
|
children: z.any().optional(),
|
|
498
770
|
}),
|
|
499
771
|
from: "@/components/ui/card",
|
|
772
|
+
childOf: ["CardHeader"],
|
|
500
773
|
fieldOverrides: commonFieldOverrides(),
|
|
501
774
|
},
|
|
502
775
|
CardDescription: {
|
|
@@ -506,6 +779,7 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
506
779
|
children: z.any().optional(),
|
|
507
780
|
}),
|
|
508
781
|
from: "@/components/ui/card",
|
|
782
|
+
childOf: ["CardHeader"],
|
|
509
783
|
fieldOverrides: commonFieldOverrides(),
|
|
510
784
|
},
|
|
511
785
|
CardContent: {
|
|
@@ -515,6 +789,7 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
515
789
|
children: z.any().optional(),
|
|
516
790
|
}),
|
|
517
791
|
from: "@/components/ui/card",
|
|
792
|
+
childOf: ["Card"],
|
|
518
793
|
fieldOverrides: commonFieldOverrides(),
|
|
519
794
|
},
|
|
520
795
|
CardFooter: {
|
|
@@ -524,6 +799,7 @@ export const complexComponentDefinitions: ComponentRegistry = {
|
|
|
524
799
|
children: z.any().optional(),
|
|
525
800
|
}),
|
|
526
801
|
from: "@/components/ui/card",
|
|
802
|
+
childOf: ["Card"],
|
|
527
803
|
fieldOverrides: commonFieldOverrides(),
|
|
528
804
|
},
|
|
529
805
|
Separator: {
|