@nayhoo/ui 0.4.0 → 0.4.1

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/index.mjs CHANGED
@@ -22,12 +22,22 @@ function mergeClasses(...classes) {
22
22
  return classes.filter((cls) => Boolean(cls)).join(" ");
23
23
  }
24
24
 
25
+ // src/utils/pick.ts
26
+ function pick(obj, ...keys) {
27
+ const ret = {};
28
+ keys.forEach((key) => {
29
+ ret[key] = obj[key];
30
+ });
31
+ return ret;
32
+ }
33
+
25
34
  // src/components/box.tsx
26
35
  import { Slot } from "@radix-ui/react-slot";
27
36
  import { jsx } from "react/jsx-runtime";
28
37
  var defaultElement = "div";
29
38
  var Box = ({ asChild, ...props }) => {
30
- const box = boxRecipe({});
39
+ const variants = pick(props, ...boxRecipe.variants());
40
+ const box = boxRecipe(variants);
31
41
  const Comp = asChild ? Slot : defaultElement;
32
42
  return /* @__PURE__ */ jsx(Comp, { ...props, className: mergeClasses(box, props.className), children: props.children });
33
43
  };
@@ -50,17 +60,17 @@ import { Slot as Slot2 } from "@radix-ui/react-slot";
50
60
  import { jsx as jsx2 } from "react/jsx-runtime";
51
61
  var defaultElement2 = "div";
52
62
  var Status = ({ asChild, ...props }) => {
53
- const status = statusRecipe({});
63
+ const variants = pick(props, ...statusRecipe.variants());
64
+ const status = statusRecipe(variants);
54
65
  const Comp = asChild ? Slot2 : defaultElement2;
55
66
  return /* @__PURE__ */ jsx2(Comp, { ...props, className: mergeClasses(status, props.className), children: props.children });
56
67
  };
57
68
 
58
69
  // src/components/avatar.tsx
59
70
  import { jsx as jsx3, jsxs } from "react/jsx-runtime";
60
- var AvatarImage = ({
61
- ...props
62
- }) => {
63
- const avatarImage = avatarImageRecipe({});
71
+ var AvatarImage = ({ ...props }) => {
72
+ const variants = pick(props, ...avatarImageRecipe.variants());
73
+ const avatarImage = avatarImageRecipe(variants);
64
74
  return /* @__PURE__ */ jsx3(
65
75
  AvatarPrimitive.Image,
66
76
  {
@@ -70,10 +80,9 @@ var AvatarImage = ({
70
80
  }
71
81
  );
72
82
  };
73
- var AvatarFallback = ({
74
- ...props
75
- }) => {
76
- const avatarFallback = avatarFallbackRecipe({});
83
+ var AvatarFallback = ({ ...props }) => {
84
+ const variants = pick(props, ...avatarFallbackRecipe.variants());
85
+ const avatarFallback = avatarFallbackRecipe(variants);
77
86
  return /* @__PURE__ */ jsx3(
78
87
  AvatarPrimitive.Fallback,
79
88
  {
@@ -86,14 +95,13 @@ var AvatarFallback = ({
86
95
  var Avatar2 = ({
87
96
  alt,
88
97
  fallback,
89
- shape,
90
- size,
91
98
  src,
92
99
  status,
93
100
  style,
94
101
  ...props
95
102
  }) => {
96
- const avatar = avatarRecipe({ shape, size });
103
+ const variants = pick(props, ...avatarRecipe.variants());
104
+ const avatar = avatarRecipe(variants);
97
105
  return /* @__PURE__ */ jsxs(
98
106
  Box,
99
107
  {
@@ -111,7 +119,7 @@ var Avatar2 = ({
111
119
  className: mergeClasses(avatar, props.className),
112
120
  children: [
113
121
  /* @__PURE__ */ jsx3(AvatarImage, { alt, src }),
114
- /* @__PURE__ */ jsx3(AvatarFallback, { size })
122
+ /* @__PURE__ */ jsx3(AvatarFallback, { size: variants.size, delayMs: 600, children: fallback })
115
123
  ]
116
124
  }
117
125
  ),
@@ -130,7 +138,7 @@ var Avatar2 = ({
130
138
  children: /* @__PURE__ */ jsx3(
131
139
  Status,
132
140
  {
133
- size: size && Number(size) > 2 ? "2" : "1",
141
+ size: variants.size && Number(variants.size) > 2 ? "2" : "1",
134
142
  variant: status
135
143
  }
136
144
  )
@@ -149,14 +157,9 @@ var badgeRecipe = _7a4684({ defaultClassName: "badge_badgeRecipe__ir6sqr0", vari
149
157
  import { Slot as Slot3 } from "@radix-ui/react-slot";
150
158
  import { jsx as jsx4 } from "react/jsx-runtime";
151
159
  var defaultElement3 = "span";
152
- var Badge = ({
153
- asChild,
154
- color,
155
- size,
156
- label,
157
- ...props
158
- }) => {
159
- const badge = badgeRecipe({ color, size });
160
+ var Badge = ({ asChild, label, ...props }) => {
161
+ const variants = pick(props, ...badgeRecipe.variants());
162
+ const badge = badgeRecipe(variants);
160
163
  const Comp = asChild ? Slot3 : defaultElement3;
161
164
  return /* @__PURE__ */ jsx4(Comp, { ...props, className: mergeClasses(badge, props.className), children: label });
162
165
  };
@@ -169,8 +172,9 @@ var spinnerRecipe = _7a4685({ defaultClassName: "spinner_spinnerRecipe__41997v0"
169
172
  import { Slot as Slot4 } from "@radix-ui/react-slot";
170
173
  import { jsx as jsx5 } from "react/jsx-runtime";
171
174
  var defaultElement4 = "div";
172
- var Spinner = ({ asChild, size, ...props }) => {
173
- const spinner = spinnerRecipe({ size });
175
+ var Spinner = ({ asChild, ...props }) => {
176
+ const variants = pick(props, ...spinnerRecipe.variants());
177
+ const spinner = spinnerRecipe(variants);
174
178
  const Comp = asChild ? Slot4 : defaultElement4;
175
179
  return /* @__PURE__ */ jsx5(Comp, { ...props, className: mergeClasses(spinner, props.className), children: props.children });
176
180
  };
@@ -183,34 +187,19 @@ var buttonRecipe = _7a4686({ defaultClassName: "button_buttonRecipe__a5gfcc0", v
183
187
  import { Slot as Slot5 } from "@radix-ui/react-slot";
184
188
  import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
185
189
  var defaultElement5 = "button";
186
- var Button = ({
187
- asChild,
188
- color,
189
- fullWidth,
190
- loading,
191
- shape,
192
- size,
193
- variant,
194
- ...props
195
- }) => {
196
- const button = buttonRecipe({
197
- color,
198
- fullWidth,
199
- loading,
200
- shape,
201
- size,
202
- variant
203
- });
190
+ var Button = ({ asChild, ...props }) => {
191
+ const variants = pick(props, ...buttonRecipe.variants());
192
+ const button = buttonRecipe(variants);
204
193
  const Comp = asChild ? Slot5 : defaultElement5;
205
194
  return /* @__PURE__ */ jsxs2(
206
195
  Comp,
207
196
  {
208
197
  ...props,
209
198
  className: mergeClasses(button, props.className),
210
- disabled: props.disabled || Boolean(loading),
199
+ disabled: props.disabled || Boolean(variants.loading),
211
200
  children: [
212
201
  props.children,
213
- loading && /* @__PURE__ */ jsx6(Spinner, { style: { position: "absolute" } })
202
+ variants.loading && /* @__PURE__ */ jsx6(Spinner, { style: { position: "absolute" } })
214
203
  ]
215
204
  }
216
205
  );
@@ -224,13 +213,9 @@ var cardRecipe = _7a4687({ defaultClassName: "card_cardRecipe__1mkhus60 panel_pa
224
213
  import { Slot as Slot6 } from "@radix-ui/react-slot";
225
214
  import { jsx as jsx7 } from "react/jsx-runtime";
226
215
  var defaultElement6 = "div";
227
- var Card = ({
228
- asChild,
229
- disableElevation,
230
- variant,
231
- ...props
232
- }) => {
233
- const card = cardRecipe({ disableElevation, variant });
216
+ var Card = ({ asChild, ...props }) => {
217
+ const variants = pick(props, ...cardRecipe.variants());
218
+ const card = cardRecipe(variants);
234
219
  const Comp = asChild ? Slot6 : defaultElement6;
235
220
  return /* @__PURE__ */ jsx7(Comp, { ...props, className: mergeClasses(card, props.className), children: props.children });
236
221
  };
@@ -243,8 +228,9 @@ var containerRecipe = _7a4688({ defaultClassName: "container_containerRecipe__p5
243
228
  import { Slot as Slot7 } from "@radix-ui/react-slot";
244
229
  import { jsx as jsx8 } from "react/jsx-runtime";
245
230
  var defaultElement7 = "div";
246
- var Container = ({ asChild, size, ...props }) => {
247
- const container = containerRecipe({ size });
231
+ var Container = ({ asChild, ...props }) => {
232
+ const variants = pick(props, ...containerRecipe.variants());
233
+ const container = containerRecipe(variants);
248
234
  const Comp = asChild ? Slot7 : defaultElement7;
249
235
  return /* @__PURE__ */ jsx8(Comp, { ...props, className: mergeClasses(container, props.className), children: props.children });
250
236
  };
@@ -257,16 +243,9 @@ var flexRecipe = _7a4689({ defaultClassName: "flex_flexRecipe__ygbrx50", variant
257
243
  import { Slot as Slot8 } from "@radix-ui/react-slot";
258
244
  import { jsx as jsx9 } from "react/jsx-runtime";
259
245
  var defaultElement8 = "div";
260
- var Flex = ({
261
- asChild,
262
- align,
263
- direction,
264
- gap,
265
- justify,
266
- wrap,
267
- ...props
268
- }) => {
269
- const flex = flexRecipe({ align, direction, gap, justify, wrap });
246
+ var Flex = ({ asChild, ...props }) => {
247
+ const variants = pick(props, ...flexRecipe.variants());
248
+ const flex = flexRecipe(variants);
270
249
  const Comp = asChild ? Slot8 : defaultElement8;
271
250
  return /* @__PURE__ */ jsx9(Comp, { ...props, className: mergeClasses(flex, props.className), children: props.children });
272
251
  };
@@ -288,11 +267,9 @@ import { CheckIcon } from "@radix-ui/react-icons";
288
267
  import { jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
289
268
  var DropdownMenu = DropdownMenuPrimitive.Root;
290
269
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
291
- var DropdownMenuContent = ({
292
- ...props
293
- }) => {
294
- const menu = menuRecipe({});
295
- const panel = panelRecipe({});
270
+ var DropdownMenuContent = ({ ...props }) => {
271
+ const menu = menuRecipe(pick(props, ...menuRecipe.variants()));
272
+ const panel = panelRecipe(pick(props, ...panelRecipe.variants()));
296
273
  return /* @__PURE__ */ jsx10(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx10(
297
274
  DropdownMenuPrimitive.Content,
298
275
  {
@@ -301,10 +278,9 @@ var DropdownMenuContent = ({
301
278
  }
302
279
  ) });
303
280
  };
304
- var DropdownMenuItem = ({
305
- ...props
306
- }) => {
307
- const menuItem = menuItemRecipe({});
281
+ var DropdownMenuItem = ({ ...props }) => {
282
+ const variants = pick(props, ...menuItemRecipe.variants());
283
+ const menuItem = menuItemRecipe(variants);
308
284
  return /* @__PURE__ */ jsx10(
309
285
  DropdownMenuPrimitive.Item,
310
286
  {
@@ -315,10 +291,9 @@ var DropdownMenuItem = ({
315
291
  );
316
292
  };
317
293
  var DropdownMenuGroup = DropdownMenuPrimitive.Group;
318
- var DropdownMenuLabel = ({
319
- ...props
320
- }) => {
321
- const menuLabel = menuLabelRecipe({});
294
+ var DropdownMenuLabel = ({ ...props }) => {
295
+ const variants = pick(props, ...menuLabelRecipe.variants());
296
+ const menuLabel = menuLabelRecipe(variants);
322
297
  return /* @__PURE__ */ jsx10(
323
298
  DropdownMenuPrimitive.Label,
324
299
  {
@@ -331,7 +306,8 @@ var DropdownMenuLabel = ({
331
306
  var DropdownMenuSeparator = ({
332
307
  ...props
333
308
  }) => {
334
- const menuSeparator = menuSeparatorRecipe({});
309
+ const variants = pick(props, ...menuSeparatorRecipe.variants());
310
+ const menuSeparator = menuSeparatorRecipe(variants);
335
311
  return /* @__PURE__ */ jsx10(
336
312
  DropdownMenuPrimitive.Separator,
337
313
  {
@@ -344,7 +320,8 @@ var DropdownMenuSeparator = ({
344
320
  var DropdownMenuCheckboxItem = ({
345
321
  ...props
346
322
  }) => {
347
- const menuItem = menuItemRecipe({});
323
+ const variants = pick(props, ...menuItemRecipe.variants());
324
+ const menuItem = menuItemRecipe(variants);
348
325
  return /* @__PURE__ */ jsxs3(
349
326
  DropdownMenuPrimitive.CheckboxItem,
350
327
  {
@@ -362,7 +339,8 @@ var DropdownMenuRadioItem = ({
362
339
  children,
363
340
  ...props
364
341
  }) => {
365
- const menuItem = menuItemRecipe({});
342
+ const variants = pick(props, ...menuItemRecipe.variants());
343
+ const menuItem = menuItemRecipe(variants);
366
344
  return /* @__PURE__ */ jsxs3(
367
345
  DropdownMenuPrimitive.RadioItem,
368
346
  {
@@ -408,10 +386,9 @@ import * as FormPrimitive from "@radix-ui/react-form";
408
386
  import { jsx as jsx11 } from "react/jsx-runtime";
409
387
  var Form = FormPrimitive.Root;
410
388
  var FormControl = FormPrimitive.Control;
411
- var FormField = ({
412
- ...props
413
- }) => {
414
- const formField = formFieldRecipe({});
389
+ var FormField = ({ ...props }) => {
390
+ const variants = pick(props, ...formFieldRecipe.variants());
391
+ const formField = formFieldRecipe(variants);
415
392
  return /* @__PURE__ */ jsx11(
416
393
  FormPrimitive.Field,
417
394
  {
@@ -421,10 +398,9 @@ var FormField = ({
421
398
  }
422
399
  );
423
400
  };
424
- var FormLabel = ({
425
- ...props
426
- }) => {
427
- const formLabel = formLabelRecipe({});
401
+ var FormLabel = ({ ...props }) => {
402
+ const variants = pick(props, ...formLabelRecipe.variants());
403
+ const formLabel = formLabelRecipe(variants);
428
404
  return /* @__PURE__ */ jsx11(
429
405
  FormPrimitive.Label,
430
406
  {
@@ -434,11 +410,9 @@ var FormLabel = ({
434
410
  }
435
411
  );
436
412
  };
437
- var FormMessage = ({
438
- error,
439
- ...props
440
- }) => {
441
- const formMessage = formMessageRecipe({ error });
413
+ var FormMessage = ({ ...props }) => {
414
+ const variants = pick(props, ...formMessageRecipe.variants());
415
+ const formMessage = formMessageRecipe(variants);
442
416
  return /* @__PURE__ */ jsx11(
443
417
  FormPrimitive.Message,
444
418
  {
@@ -458,28 +432,9 @@ var gridRecipe = _7a46813({ defaultClassName: "grid_gridRecipe__1ab943t0", varia
458
432
  import { Slot as Slot9 } from "@radix-ui/react-slot";
459
433
  import { jsx as jsx12 } from "react/jsx-runtime";
460
434
  var defaultElement9 = "div";
461
- var Grid = ({
462
- asChild,
463
- align,
464
- columns,
465
- flow,
466
- gap,
467
- gapX,
468
- gapY,
469
- justify,
470
- rows,
471
- ...props
472
- }) => {
473
- const grid = gridRecipe({
474
- align,
475
- columns,
476
- flow,
477
- gap,
478
- gapX,
479
- gapY,
480
- justify,
481
- rows
482
- });
435
+ var Grid = ({ asChild, ...props }) => {
436
+ const variants = pick(props, ...gridRecipe.variants());
437
+ const grid = gridRecipe(variants);
483
438
  const Comp = asChild ? Slot9 : defaultElement9;
484
439
  return /* @__PURE__ */ jsx12(Comp, { ...props, className: mergeClasses(grid, props.className), children: props.children });
485
440
  };
@@ -528,24 +483,19 @@ var iconButtonRecipe = _7a46815({ defaultClassName: "icon-button_iconButtonRecip
528
483
  import { Slot as Slot11 } from "@radix-ui/react-slot";
529
484
  import { jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
530
485
  var defaultElement10 = "button";
531
- var IconButton = ({
532
- asChild,
533
- loading,
534
- size,
535
- variant,
536
- ...props
537
- }) => {
538
- const iconButton = iconButtonRecipe({ loading, size, variant });
486
+ var IconButton = ({ asChild, ...props }) => {
487
+ const variants = pick(props, ...iconButtonRecipe.variants());
488
+ const iconButton = iconButtonRecipe(variants);
539
489
  const Comp = asChild ? Slot11 : defaultElement10;
540
490
  return /* @__PURE__ */ jsxs4(
541
491
  Comp,
542
492
  {
543
493
  ...props,
544
494
  className: mergeClasses(iconButton, props.className),
545
- disabled: props.disabled || Boolean(loading),
495
+ disabled: props.disabled || Boolean(variants.loading),
546
496
  children: [
547
497
  props.children,
548
- loading && /* @__PURE__ */ jsx14(Spinner, { style: { position: "absolute" } })
498
+ variants.loading && /* @__PURE__ */ jsx14(Spinner, { style: { position: "absolute" } })
549
499
  ]
550
500
  }
551
501
  );
@@ -559,8 +509,9 @@ var linkRecipe = _7a46816({ defaultClassName: "link_linkRecipe__kd87m50", varian
559
509
  import { Slot as Slot12 } from "@radix-ui/react-slot";
560
510
  import { jsx as jsx15 } from "react/jsx-runtime";
561
511
  var defaultElement11 = "a";
562
- var Link = ({ asChild, color, ...props }) => {
563
- const link = linkRecipe({ color });
512
+ var Link = ({ asChild, ...props }) => {
513
+ const variants = pick(props, ...linkRecipe.variants());
514
+ const link = linkRecipe(variants);
564
515
  const Comp = asChild ? Slot12 : defaultElement11;
565
516
  return /* @__PURE__ */ jsx15(Comp, { ...props, className: mergeClasses(link, props.className), children: props.children });
566
517
  };
@@ -569,14 +520,14 @@ var Link = ({ asChild, color, ...props }) => {
569
520
  import { CheckIcon as CheckIcon2 } from "@radix-ui/react-icons";
570
521
  import * as MenuPrimitive from "@radix-ui/react-menu";
571
522
  import { jsx as jsx16, jsxs as jsxs5 } from "react/jsx-runtime";
572
- var Menu = ({
573
- ...props
574
- }) => {
575
- const menu = menuRecipe({});
523
+ var Menu = ({ ...props }) => {
524
+ const variants = pick(props, ...menuRecipe.variants());
525
+ const menu = menuRecipe(variants);
576
526
  return /* @__PURE__ */ jsx16(MenuPrimitive.Root, { ...props, children: /* @__PURE__ */ jsx16("div", { className: mergeClasses(menu, props.className), children: props.children }) });
577
527
  };
578
528
  var MenuContent = ({ ...props }) => {
579
- const panel = panelRecipe({});
529
+ const variants = pick(props, ...panelRecipe.variants());
530
+ const panel = panelRecipe(variants);
580
531
  return /* @__PURE__ */ jsx16(
581
532
  MenuPrimitive.Content,
582
533
  {
@@ -586,10 +537,9 @@ var MenuContent = ({ ...props }) => {
586
537
  }
587
538
  );
588
539
  };
589
- var MenuSeparator = ({
590
- ...props
591
- }) => {
592
- const menuSeparator = menuSeparatorRecipe({});
540
+ var MenuSeparator = ({ ...props }) => {
541
+ const variants = pick(props, ...menuSeparatorRecipe.variants());
542
+ const menuSeparator = menuSeparatorRecipe(variants);
593
543
  return /* @__PURE__ */ jsx16(
594
544
  MenuPrimitive.Separator,
595
545
  {
@@ -600,7 +550,8 @@ var MenuSeparator = ({
600
550
  );
601
551
  };
602
552
  var MenuItem2 = ({ ...props }) => {
603
- const menuItem = menuItemRecipe({});
553
+ const variants = pick(props, ...menuItemRecipe.variants());
554
+ const menuItem = menuItemRecipe(variants);
604
555
  return /* @__PURE__ */ jsx16(
605
556
  MenuPrimitive.MenuItem,
606
557
  {
@@ -610,10 +561,9 @@ var MenuItem2 = ({ ...props }) => {
610
561
  }
611
562
  );
612
563
  };
613
- var MenuRadioItem = ({
614
- ...props
615
- }) => {
616
- const menuItem = menuItemRecipe({});
564
+ var MenuRadioItem = ({ ...props }) => {
565
+ const variants = pick(props, ...menuItemRecipe.variants());
566
+ const menuItem = menuItemRecipe(variants);
617
567
  return /* @__PURE__ */ jsxs5(
618
568
  MenuPrimitive.RadioItem,
619
569
  {
@@ -647,10 +597,9 @@ var MenuRadioItem = ({
647
597
  }
648
598
  );
649
599
  };
650
- var MenuCheckboxItem2 = ({
651
- ...props
652
- }) => {
653
- const menuItem = menuItemRecipe({});
600
+ var MenuCheckboxItem2 = ({ ...props }) => {
601
+ const variants = pick(props, ...menuItemRecipe.variants());
602
+ const menuItem = menuItemRecipe(variants);
654
603
  return /* @__PURE__ */ jsxs5(
655
604
  MenuPrimitive.MenuCheckboxItem,
656
605
  {
@@ -664,7 +613,8 @@ var MenuCheckboxItem2 = ({
664
613
  );
665
614
  };
666
615
  var MenuLabel2 = ({ ...props }) => {
667
- const menuLabel = menuLabelRecipe({});
616
+ const variants = pick(props, ...menuLabelRecipe.variants());
617
+ const menuLabel = menuLabelRecipe(variants);
668
618
  return /* @__PURE__ */ jsx16(
669
619
  MenuPrimitive.MenuLabel,
670
620
  {
@@ -682,7 +632,8 @@ import { Slot as Slot13 } from "@radix-ui/react-slot";
682
632
  import { jsx as jsx17 } from "react/jsx-runtime";
683
633
  var defaultElement12 = "div";
684
634
  var Panel = ({ asChild, ...props }) => {
685
- const panel = panelRecipe({});
635
+ const variants = pick(props, ...panelRecipe.variants());
636
+ const panel = panelRecipe(variants);
686
637
  const Comp = asChild ? Slot13 : defaultElement12;
687
638
  return /* @__PURE__ */ jsx17(Comp, { ...props, className: mergeClasses(panel, props.className), children: props.children });
688
639
  };
@@ -714,10 +665,9 @@ var separatorRecipe = _7a46817({ defaultClassName: "separator_separatorRecipe__1
714
665
  // src/components/separator.tsx
715
666
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
716
667
  import { jsx as jsx19 } from "react/jsx-runtime";
717
- var Separator3 = ({
718
- ...props
719
- }) => {
720
- const separator = separatorRecipe({});
668
+ var Separator3 = ({ ...props }) => {
669
+ const variants = pick(props, ...separatorRecipe.variants());
670
+ const separator = separatorRecipe(variants);
721
671
  return /* @__PURE__ */ jsx19(
722
672
  SeparatorPrimitive.Root,
723
673
  {
@@ -736,8 +686,9 @@ var skeletonRecipe = _7a46818({ defaultClassName: "skeleton_skeletonRecipe__vq97
736
686
  import { Slot as Slot15 } from "@radix-ui/react-slot";
737
687
  import { jsx as jsx20 } from "react/jsx-runtime";
738
688
  var defaultElement14 = "div";
739
- var Skeleton = ({ asChild, variant, ...props }) => {
740
- const skeleton = skeletonRecipe({ variant });
689
+ var Skeleton = ({ asChild, ...props }) => {
690
+ const variants = pick(props, ...skeletonRecipe.variants());
691
+ const skeleton = skeletonRecipe(variants);
741
692
  const Comp = asChild ? Slot15 : defaultElement14;
742
693
  return /* @__PURE__ */ jsx20(Comp, { ...props, className: mergeClasses(skeleton, props.className), children: props.children });
743
694
  };
@@ -750,17 +701,26 @@ var switchThumbRecipe = _7a46819({ defaultClassName: "switch_switchThumbRecipe__
750
701
  // src/components/switch.tsx
751
702
  import * as SwitchPrimitive from "@radix-ui/react-switch";
752
703
  import { jsx as jsx21 } from "react/jsx-runtime";
753
- var Switch = ({
754
- size,
755
- ...props
756
- }) => {
757
- const switchThumb = switchThumbRecipe({});
704
+ var SwitchThumb = ({ ...props }) => {
705
+ const variants = pick(props, ...switchThumbRecipe.variants());
706
+ const switchThumb = switchThumbRecipe(variants);
707
+ return /* @__PURE__ */ jsx21(
708
+ SwitchPrimitive.Thumb,
709
+ {
710
+ ...props,
711
+ className: mergeClasses(switchThumb, props.className)
712
+ }
713
+ );
714
+ };
715
+ var Switch = ({ ...props }) => {
716
+ const variants = pick(props, ...switchRecipe.variants());
717
+ const _switch = switchRecipe(variants);
758
718
  return /* @__PURE__ */ jsx21(
759
719
  SwitchPrimitive.Root,
760
720
  {
761
721
  ...props,
762
- className: mergeClasses(switchRecipe({ size }), props.className),
763
- children: /* @__PURE__ */ jsx21(SwitchPrimitive.Thumb, { className: switchThumb })
722
+ className: mergeClasses(_switch, props.className),
723
+ children: /* @__PURE__ */ jsx21(SwitchThumb, {})
764
724
  }
765
725
  );
766
726
  };
@@ -773,15 +733,9 @@ var textFieldRecipe = _7a46820({ defaultClassName: "text-field_textFieldRecipe__
773
733
  import { Slot as Slot16 } from "@radix-ui/react-slot";
774
734
  import { jsx as jsx22 } from "react/jsx-runtime";
775
735
  var defaultElement15 = "input";
776
- var TextField = ({
777
- asChild,
778
- cursor,
779
- error,
780
- size,
781
- variant,
782
- ...props
783
- }) => {
784
- const textField = textFieldRecipe({ cursor, error, size, variant });
736
+ var TextField = ({ asChild, ...props }) => {
737
+ const variants = pick(props, ...textFieldRecipe.variants());
738
+ const textField = textFieldRecipe(variants);
785
739
  const Comp = asChild ? Slot16 : defaultElement15;
786
740
  return /* @__PURE__ */ jsx22(Comp, { ...props, className: mergeClasses(textField, props.className), children: props.children });
787
741
  };
@@ -790,8 +744,9 @@ var TextField = ({
790
744
  import { Slot as Slot17 } from "@radix-ui/react-slot";
791
745
  import { jsx as jsx23 } from "react/jsx-runtime";
792
746
  var defaultElement16 = "span";
793
- var Text = ({ asChild, color, size, weight, ...props }) => {
794
- const text = textRecipe({ color, size, weight });
747
+ var Text = ({ asChild, ...props }) => {
748
+ const variants = pick(props, ...textRecipe.variants());
749
+ const text = textRecipe(variants);
795
750
  const Comp = asChild ? Slot17 : defaultElement16;
796
751
  return /* @__PURE__ */ jsx23(Comp, { ...props, className: mergeClasses(text, props.className), children: props.children });
797
752
  };
@@ -843,6 +798,7 @@ export {
843
798
  Spinner,
844
799
  Status,
845
800
  Switch,
801
+ SwitchThumb,
846
802
  Text,
847
803
  TextField,
848
804
  darkTheme,