@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.js CHANGED
@@ -73,6 +73,7 @@ __export(index_exports, {
73
73
  Spinner: () => Spinner,
74
74
  Status: () => Status,
75
75
  Switch: () => Switch,
76
+ SwitchThumb: () => SwitchThumb,
76
77
  Text: () => Text,
77
78
  TextField: () => TextField,
78
79
  darkTheme: () => darkTheme,
@@ -104,12 +105,22 @@ function mergeClasses(...classes) {
104
105
  return classes.filter((cls) => Boolean(cls)).join(" ");
105
106
  }
106
107
 
108
+ // src/utils/pick.ts
109
+ function pick(obj, ...keys) {
110
+ const ret = {};
111
+ keys.forEach((key) => {
112
+ ret[key] = obj[key];
113
+ });
114
+ return ret;
115
+ }
116
+
107
117
  // src/components/box.tsx
108
118
  var import_react_slot = require("@radix-ui/react-slot");
109
119
  var import_jsx_runtime = require("react/jsx-runtime");
110
120
  var defaultElement = "div";
111
121
  var Box = ({ asChild, ...props }) => {
112
- const box = boxRecipe({});
122
+ const variants = pick(props, ...boxRecipe.variants());
123
+ const box = boxRecipe(variants);
113
124
  const Comp = asChild ? import_react_slot.Slot : defaultElement;
114
125
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { ...props, className: mergeClasses(box, props.className), children: props.children });
115
126
  };
@@ -135,17 +146,17 @@ var import_react_slot2 = require("@radix-ui/react-slot");
135
146
  var import_jsx_runtime2 = require("react/jsx-runtime");
136
147
  var defaultElement2 = "div";
137
148
  var Status = ({ asChild, ...props }) => {
138
- const status = statusRecipe({});
149
+ const variants = pick(props, ...statusRecipe.variants());
150
+ const status = statusRecipe(variants);
139
151
  const Comp = asChild ? import_react_slot2.Slot : defaultElement2;
140
152
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Comp, { ...props, className: mergeClasses(status, props.className), children: props.children });
141
153
  };
142
154
 
143
155
  // src/components/avatar.tsx
144
156
  var import_jsx_runtime3 = require("react/jsx-runtime");
145
- var AvatarImage = ({
146
- ...props
147
- }) => {
148
- const avatarImage = avatarImageRecipe({});
157
+ var AvatarImage = ({ ...props }) => {
158
+ const variants = pick(props, ...avatarImageRecipe.variants());
159
+ const avatarImage = avatarImageRecipe(variants);
149
160
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
150
161
  AvatarPrimitive.Image,
151
162
  {
@@ -155,10 +166,9 @@ var AvatarImage = ({
155
166
  }
156
167
  );
157
168
  };
158
- var AvatarFallback = ({
159
- ...props
160
- }) => {
161
- const avatarFallback = avatarFallbackRecipe({});
169
+ var AvatarFallback = ({ ...props }) => {
170
+ const variants = pick(props, ...avatarFallbackRecipe.variants());
171
+ const avatarFallback = avatarFallbackRecipe(variants);
162
172
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
163
173
  AvatarPrimitive.Fallback,
164
174
  {
@@ -171,14 +181,13 @@ var AvatarFallback = ({
171
181
  var Avatar2 = ({
172
182
  alt,
173
183
  fallback,
174
- shape,
175
- size,
176
184
  src,
177
185
  status,
178
186
  style,
179
187
  ...props
180
188
  }) => {
181
- const avatar = avatarRecipe({ shape, size });
189
+ const variants = pick(props, ...avatarRecipe.variants());
190
+ const avatar = avatarRecipe(variants);
182
191
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
183
192
  Box,
184
193
  {
@@ -196,7 +205,7 @@ var Avatar2 = ({
196
205
  className: mergeClasses(avatar, props.className),
197
206
  children: [
198
207
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AvatarImage, { alt, src }),
199
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AvatarFallback, { size })
208
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AvatarFallback, { size: variants.size, delayMs: 600, children: fallback })
200
209
  ]
201
210
  }
202
211
  ),
@@ -215,7 +224,7 @@ var Avatar2 = ({
215
224
  children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
216
225
  Status,
217
226
  {
218
- size: size && Number(size) > 2 ? "2" : "1",
227
+ size: variants.size && Number(variants.size) > 2 ? "2" : "1",
219
228
  variant: status
220
229
  }
221
230
  )
@@ -234,14 +243,9 @@ var badgeRecipe = (0, import_createRuntimeFn4.createRuntimeFn)({ defaultClassNam
234
243
  var import_react_slot3 = require("@radix-ui/react-slot");
235
244
  var import_jsx_runtime4 = require("react/jsx-runtime");
236
245
  var defaultElement3 = "span";
237
- var Badge = ({
238
- asChild,
239
- color,
240
- size,
241
- label,
242
- ...props
243
- }) => {
244
- const badge = badgeRecipe({ color, size });
246
+ var Badge = ({ asChild, label, ...props }) => {
247
+ const variants = pick(props, ...badgeRecipe.variants());
248
+ const badge = badgeRecipe(variants);
245
249
  const Comp = asChild ? import_react_slot3.Slot : defaultElement3;
246
250
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Comp, { ...props, className: mergeClasses(badge, props.className), children: label });
247
251
  };
@@ -254,8 +258,9 @@ var spinnerRecipe = (0, import_createRuntimeFn5.createRuntimeFn)({ defaultClassN
254
258
  var import_react_slot4 = require("@radix-ui/react-slot");
255
259
  var import_jsx_runtime5 = require("react/jsx-runtime");
256
260
  var defaultElement4 = "div";
257
- var Spinner = ({ asChild, size, ...props }) => {
258
- const spinner = spinnerRecipe({ size });
261
+ var Spinner = ({ asChild, ...props }) => {
262
+ const variants = pick(props, ...spinnerRecipe.variants());
263
+ const spinner = spinnerRecipe(variants);
259
264
  const Comp = asChild ? import_react_slot4.Slot : defaultElement4;
260
265
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Comp, { ...props, className: mergeClasses(spinner, props.className), children: props.children });
261
266
  };
@@ -268,34 +273,19 @@ var buttonRecipe = (0, import_createRuntimeFn6.createRuntimeFn)({ defaultClassNa
268
273
  var import_react_slot5 = require("@radix-ui/react-slot");
269
274
  var import_jsx_runtime6 = require("react/jsx-runtime");
270
275
  var defaultElement5 = "button";
271
- var Button = ({
272
- asChild,
273
- color,
274
- fullWidth,
275
- loading,
276
- shape,
277
- size,
278
- variant,
279
- ...props
280
- }) => {
281
- const button = buttonRecipe({
282
- color,
283
- fullWidth,
284
- loading,
285
- shape,
286
- size,
287
- variant
288
- });
276
+ var Button = ({ asChild, ...props }) => {
277
+ const variants = pick(props, ...buttonRecipe.variants());
278
+ const button = buttonRecipe(variants);
289
279
  const Comp = asChild ? import_react_slot5.Slot : defaultElement5;
290
280
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
291
281
  Comp,
292
282
  {
293
283
  ...props,
294
284
  className: mergeClasses(button, props.className),
295
- disabled: props.disabled || Boolean(loading),
285
+ disabled: props.disabled || Boolean(variants.loading),
296
286
  children: [
297
287
  props.children,
298
- loading && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Spinner, { style: { position: "absolute" } })
288
+ variants.loading && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Spinner, { style: { position: "absolute" } })
299
289
  ]
300
290
  }
301
291
  );
@@ -309,13 +299,9 @@ var cardRecipe = (0, import_createRuntimeFn7.createRuntimeFn)({ defaultClassName
309
299
  var import_react_slot6 = require("@radix-ui/react-slot");
310
300
  var import_jsx_runtime7 = require("react/jsx-runtime");
311
301
  var defaultElement6 = "div";
312
- var Card = ({
313
- asChild,
314
- disableElevation,
315
- variant,
316
- ...props
317
- }) => {
318
- const card = cardRecipe({ disableElevation, variant });
302
+ var Card = ({ asChild, ...props }) => {
303
+ const variants = pick(props, ...cardRecipe.variants());
304
+ const card = cardRecipe(variants);
319
305
  const Comp = asChild ? import_react_slot6.Slot : defaultElement6;
320
306
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Comp, { ...props, className: mergeClasses(card, props.className), children: props.children });
321
307
  };
@@ -328,8 +314,9 @@ var containerRecipe = (0, import_createRuntimeFn8.createRuntimeFn)({ defaultClas
328
314
  var import_react_slot7 = require("@radix-ui/react-slot");
329
315
  var import_jsx_runtime8 = require("react/jsx-runtime");
330
316
  var defaultElement7 = "div";
331
- var Container = ({ asChild, size, ...props }) => {
332
- const container = containerRecipe({ size });
317
+ var Container = ({ asChild, ...props }) => {
318
+ const variants = pick(props, ...containerRecipe.variants());
319
+ const container = containerRecipe(variants);
333
320
  const Comp = asChild ? import_react_slot7.Slot : defaultElement7;
334
321
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Comp, { ...props, className: mergeClasses(container, props.className), children: props.children });
335
322
  };
@@ -342,16 +329,9 @@ var flexRecipe = (0, import_createRuntimeFn9.createRuntimeFn)({ defaultClassName
342
329
  var import_react_slot8 = require("@radix-ui/react-slot");
343
330
  var import_jsx_runtime9 = require("react/jsx-runtime");
344
331
  var defaultElement8 = "div";
345
- var Flex = ({
346
- asChild,
347
- align,
348
- direction,
349
- gap,
350
- justify,
351
- wrap,
352
- ...props
353
- }) => {
354
- const flex = flexRecipe({ align, direction, gap, justify, wrap });
332
+ var Flex = ({ asChild, ...props }) => {
333
+ const variants = pick(props, ...flexRecipe.variants());
334
+ const flex = flexRecipe(variants);
355
335
  const Comp = asChild ? import_react_slot8.Slot : defaultElement8;
356
336
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Comp, { ...props, className: mergeClasses(flex, props.className), children: props.children });
357
337
  };
@@ -373,11 +353,9 @@ var import_react_icons = require("@radix-ui/react-icons");
373
353
  var import_jsx_runtime10 = require("react/jsx-runtime");
374
354
  var DropdownMenu = DropdownMenuPrimitive.Root;
375
355
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
376
- var DropdownMenuContent = ({
377
- ...props
378
- }) => {
379
- const menu = menuRecipe({});
380
- const panel = panelRecipe({});
356
+ var DropdownMenuContent = ({ ...props }) => {
357
+ const menu = menuRecipe(pick(props, ...menuRecipe.variants()));
358
+ const panel = panelRecipe(pick(props, ...panelRecipe.variants()));
381
359
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
382
360
  DropdownMenuPrimitive.Content,
383
361
  {
@@ -386,10 +364,9 @@ var DropdownMenuContent = ({
386
364
  }
387
365
  ) });
388
366
  };
389
- var DropdownMenuItem = ({
390
- ...props
391
- }) => {
392
- const menuItem = menuItemRecipe({});
367
+ var DropdownMenuItem = ({ ...props }) => {
368
+ const variants = pick(props, ...menuItemRecipe.variants());
369
+ const menuItem = menuItemRecipe(variants);
393
370
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
394
371
  DropdownMenuPrimitive.Item,
395
372
  {
@@ -400,10 +377,9 @@ var DropdownMenuItem = ({
400
377
  );
401
378
  };
402
379
  var DropdownMenuGroup = DropdownMenuPrimitive.Group;
403
- var DropdownMenuLabel = ({
404
- ...props
405
- }) => {
406
- const menuLabel = menuLabelRecipe({});
380
+ var DropdownMenuLabel = ({ ...props }) => {
381
+ const variants = pick(props, ...menuLabelRecipe.variants());
382
+ const menuLabel = menuLabelRecipe(variants);
407
383
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
408
384
  DropdownMenuPrimitive.Label,
409
385
  {
@@ -416,7 +392,8 @@ var DropdownMenuLabel = ({
416
392
  var DropdownMenuSeparator = ({
417
393
  ...props
418
394
  }) => {
419
- const menuSeparator = menuSeparatorRecipe({});
395
+ const variants = pick(props, ...menuSeparatorRecipe.variants());
396
+ const menuSeparator = menuSeparatorRecipe(variants);
420
397
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
421
398
  DropdownMenuPrimitive.Separator,
422
399
  {
@@ -429,7 +406,8 @@ var DropdownMenuSeparator = ({
429
406
  var DropdownMenuCheckboxItem = ({
430
407
  ...props
431
408
  }) => {
432
- const menuItem = menuItemRecipe({});
409
+ const variants = pick(props, ...menuItemRecipe.variants());
410
+ const menuItem = menuItemRecipe(variants);
433
411
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
434
412
  DropdownMenuPrimitive.CheckboxItem,
435
413
  {
@@ -447,7 +425,8 @@ var DropdownMenuRadioItem = ({
447
425
  children,
448
426
  ...props
449
427
  }) => {
450
- const menuItem = menuItemRecipe({});
428
+ const variants = pick(props, ...menuItemRecipe.variants());
429
+ const menuItem = menuItemRecipe(variants);
451
430
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
452
431
  DropdownMenuPrimitive.RadioItem,
453
432
  {
@@ -493,10 +472,9 @@ var FormPrimitive = __toESM(require("@radix-ui/react-form"));
493
472
  var import_jsx_runtime11 = require("react/jsx-runtime");
494
473
  var Form = FormPrimitive.Root;
495
474
  var FormControl = FormPrimitive.Control;
496
- var FormField = ({
497
- ...props
498
- }) => {
499
- const formField = formFieldRecipe({});
475
+ var FormField = ({ ...props }) => {
476
+ const variants = pick(props, ...formFieldRecipe.variants());
477
+ const formField = formFieldRecipe(variants);
500
478
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
501
479
  FormPrimitive.Field,
502
480
  {
@@ -506,10 +484,9 @@ var FormField = ({
506
484
  }
507
485
  );
508
486
  };
509
- var FormLabel = ({
510
- ...props
511
- }) => {
512
- const formLabel = formLabelRecipe({});
487
+ var FormLabel = ({ ...props }) => {
488
+ const variants = pick(props, ...formLabelRecipe.variants());
489
+ const formLabel = formLabelRecipe(variants);
513
490
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
514
491
  FormPrimitive.Label,
515
492
  {
@@ -519,11 +496,9 @@ var FormLabel = ({
519
496
  }
520
497
  );
521
498
  };
522
- var FormMessage = ({
523
- error,
524
- ...props
525
- }) => {
526
- const formMessage = formMessageRecipe({ error });
499
+ var FormMessage = ({ ...props }) => {
500
+ const variants = pick(props, ...formMessageRecipe.variants());
501
+ const formMessage = formMessageRecipe(variants);
527
502
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
528
503
  FormPrimitive.Message,
529
504
  {
@@ -543,28 +518,9 @@ var gridRecipe = (0, import_createRuntimeFn13.createRuntimeFn)({ defaultClassNam
543
518
  var import_react_slot9 = require("@radix-ui/react-slot");
544
519
  var import_jsx_runtime12 = require("react/jsx-runtime");
545
520
  var defaultElement9 = "div";
546
- var Grid = ({
547
- asChild,
548
- align,
549
- columns,
550
- flow,
551
- gap,
552
- gapX,
553
- gapY,
554
- justify,
555
- rows,
556
- ...props
557
- }) => {
558
- const grid = gridRecipe({
559
- align,
560
- columns,
561
- flow,
562
- gap,
563
- gapX,
564
- gapY,
565
- justify,
566
- rows
567
- });
521
+ var Grid = ({ asChild, ...props }) => {
522
+ const variants = pick(props, ...gridRecipe.variants());
523
+ const grid = gridRecipe(variants);
568
524
  const Comp = asChild ? import_react_slot9.Slot : defaultElement9;
569
525
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Comp, { ...props, className: mergeClasses(grid, props.className), children: props.children });
570
526
  };
@@ -613,24 +569,19 @@ var iconButtonRecipe = (0, import_createRuntimeFn15.createRuntimeFn)({ defaultCl
613
569
  var import_react_slot11 = require("@radix-ui/react-slot");
614
570
  var import_jsx_runtime14 = require("react/jsx-runtime");
615
571
  var defaultElement10 = "button";
616
- var IconButton = ({
617
- asChild,
618
- loading,
619
- size,
620
- variant,
621
- ...props
622
- }) => {
623
- const iconButton = iconButtonRecipe({ loading, size, variant });
572
+ var IconButton = ({ asChild, ...props }) => {
573
+ const variants = pick(props, ...iconButtonRecipe.variants());
574
+ const iconButton = iconButtonRecipe(variants);
624
575
  const Comp = asChild ? import_react_slot11.Slot : defaultElement10;
625
576
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
626
577
  Comp,
627
578
  {
628
579
  ...props,
629
580
  className: mergeClasses(iconButton, props.className),
630
- disabled: props.disabled || Boolean(loading),
581
+ disabled: props.disabled || Boolean(variants.loading),
631
582
  children: [
632
583
  props.children,
633
- loading && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Spinner, { style: { position: "absolute" } })
584
+ variants.loading && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Spinner, { style: { position: "absolute" } })
634
585
  ]
635
586
  }
636
587
  );
@@ -644,8 +595,9 @@ var linkRecipe = (0, import_createRuntimeFn16.createRuntimeFn)({ defaultClassNam
644
595
  var import_react_slot12 = require("@radix-ui/react-slot");
645
596
  var import_jsx_runtime15 = require("react/jsx-runtime");
646
597
  var defaultElement11 = "a";
647
- var Link = ({ asChild, color, ...props }) => {
648
- const link = linkRecipe({ color });
598
+ var Link = ({ asChild, ...props }) => {
599
+ const variants = pick(props, ...linkRecipe.variants());
600
+ const link = linkRecipe(variants);
649
601
  const Comp = asChild ? import_react_slot12.Slot : defaultElement11;
650
602
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Comp, { ...props, className: mergeClasses(link, props.className), children: props.children });
651
603
  };
@@ -654,14 +606,14 @@ var Link = ({ asChild, color, ...props }) => {
654
606
  var import_react_icons2 = require("@radix-ui/react-icons");
655
607
  var MenuPrimitive = __toESM(require("@radix-ui/react-menu"));
656
608
  var import_jsx_runtime16 = require("react/jsx-runtime");
657
- var Menu = ({
658
- ...props
659
- }) => {
660
- const menu = menuRecipe({});
609
+ var Menu = ({ ...props }) => {
610
+ const variants = pick(props, ...menuRecipe.variants());
611
+ const menu = menuRecipe(variants);
661
612
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MenuPrimitive.Root, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: mergeClasses(menu, props.className), children: props.children }) });
662
613
  };
663
614
  var MenuContent = ({ ...props }) => {
664
- const panel = panelRecipe({});
615
+ const variants = pick(props, ...panelRecipe.variants());
616
+ const panel = panelRecipe(variants);
665
617
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
666
618
  MenuPrimitive.Content,
667
619
  {
@@ -671,10 +623,9 @@ var MenuContent = ({ ...props }) => {
671
623
  }
672
624
  );
673
625
  };
674
- var MenuSeparator = ({
675
- ...props
676
- }) => {
677
- const menuSeparator = menuSeparatorRecipe({});
626
+ var MenuSeparator = ({ ...props }) => {
627
+ const variants = pick(props, ...menuSeparatorRecipe.variants());
628
+ const menuSeparator = menuSeparatorRecipe(variants);
678
629
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
679
630
  MenuPrimitive.Separator,
680
631
  {
@@ -685,7 +636,8 @@ var MenuSeparator = ({
685
636
  );
686
637
  };
687
638
  var MenuItem2 = ({ ...props }) => {
688
- const menuItem = menuItemRecipe({});
639
+ const variants = pick(props, ...menuItemRecipe.variants());
640
+ const menuItem = menuItemRecipe(variants);
689
641
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
690
642
  MenuPrimitive.MenuItem,
691
643
  {
@@ -695,10 +647,9 @@ var MenuItem2 = ({ ...props }) => {
695
647
  }
696
648
  );
697
649
  };
698
- var MenuRadioItem = ({
699
- ...props
700
- }) => {
701
- const menuItem = menuItemRecipe({});
650
+ var MenuRadioItem = ({ ...props }) => {
651
+ const variants = pick(props, ...menuItemRecipe.variants());
652
+ const menuItem = menuItemRecipe(variants);
702
653
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
703
654
  MenuPrimitive.RadioItem,
704
655
  {
@@ -732,10 +683,9 @@ var MenuRadioItem = ({
732
683
  }
733
684
  );
734
685
  };
735
- var MenuCheckboxItem2 = ({
736
- ...props
737
- }) => {
738
- const menuItem = menuItemRecipe({});
686
+ var MenuCheckboxItem2 = ({ ...props }) => {
687
+ const variants = pick(props, ...menuItemRecipe.variants());
688
+ const menuItem = menuItemRecipe(variants);
739
689
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
740
690
  MenuPrimitive.MenuCheckboxItem,
741
691
  {
@@ -749,7 +699,8 @@ var MenuCheckboxItem2 = ({
749
699
  );
750
700
  };
751
701
  var MenuLabel2 = ({ ...props }) => {
752
- const menuLabel = menuLabelRecipe({});
702
+ const variants = pick(props, ...menuLabelRecipe.variants());
703
+ const menuLabel = menuLabelRecipe(variants);
753
704
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
754
705
  MenuPrimitive.MenuLabel,
755
706
  {
@@ -767,7 +718,8 @@ var import_react_slot13 = require("@radix-ui/react-slot");
767
718
  var import_jsx_runtime17 = require("react/jsx-runtime");
768
719
  var defaultElement12 = "div";
769
720
  var Panel = ({ asChild, ...props }) => {
770
- const panel = panelRecipe({});
721
+ const variants = pick(props, ...panelRecipe.variants());
722
+ const panel = panelRecipe(variants);
771
723
  const Comp = asChild ? import_react_slot13.Slot : defaultElement12;
772
724
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Comp, { ...props, className: mergeClasses(panel, props.className), children: props.children });
773
725
  };
@@ -799,10 +751,9 @@ var separatorRecipe = (0, import_createRuntimeFn17.createRuntimeFn)({ defaultCla
799
751
  // src/components/separator.tsx
800
752
  var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"));
801
753
  var import_jsx_runtime19 = require("react/jsx-runtime");
802
- var Separator3 = ({
803
- ...props
804
- }) => {
805
- const separator = separatorRecipe({});
754
+ var Separator3 = ({ ...props }) => {
755
+ const variants = pick(props, ...separatorRecipe.variants());
756
+ const separator = separatorRecipe(variants);
806
757
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
807
758
  SeparatorPrimitive.Root,
808
759
  {
@@ -821,8 +772,9 @@ var skeletonRecipe = (0, import_createRuntimeFn18.createRuntimeFn)({ defaultClas
821
772
  var import_react_slot15 = require("@radix-ui/react-slot");
822
773
  var import_jsx_runtime20 = require("react/jsx-runtime");
823
774
  var defaultElement14 = "div";
824
- var Skeleton = ({ asChild, variant, ...props }) => {
825
- const skeleton = skeletonRecipe({ variant });
775
+ var Skeleton = ({ asChild, ...props }) => {
776
+ const variants = pick(props, ...skeletonRecipe.variants());
777
+ const skeleton = skeletonRecipe(variants);
826
778
  const Comp = asChild ? import_react_slot15.Slot : defaultElement14;
827
779
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Comp, { ...props, className: mergeClasses(skeleton, props.className), children: props.children });
828
780
  };
@@ -835,17 +787,26 @@ var switchThumbRecipe = (0, import_createRuntimeFn19.createRuntimeFn)({ defaultC
835
787
  // src/components/switch.tsx
836
788
  var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"));
837
789
  var import_jsx_runtime21 = require("react/jsx-runtime");
838
- var Switch = ({
839
- size,
840
- ...props
841
- }) => {
842
- const switchThumb = switchThumbRecipe({});
790
+ var SwitchThumb = ({ ...props }) => {
791
+ const variants = pick(props, ...switchThumbRecipe.variants());
792
+ const switchThumb = switchThumbRecipe(variants);
793
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
794
+ SwitchPrimitive.Thumb,
795
+ {
796
+ ...props,
797
+ className: mergeClasses(switchThumb, props.className)
798
+ }
799
+ );
800
+ };
801
+ var Switch = ({ ...props }) => {
802
+ const variants = pick(props, ...switchRecipe.variants());
803
+ const _switch = switchRecipe(variants);
843
804
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
844
805
  SwitchPrimitive.Root,
845
806
  {
846
807
  ...props,
847
- className: mergeClasses(switchRecipe({ size }), props.className),
848
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SwitchPrimitive.Thumb, { className: switchThumb })
808
+ className: mergeClasses(_switch, props.className),
809
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SwitchThumb, {})
849
810
  }
850
811
  );
851
812
  };
@@ -858,15 +819,9 @@ var textFieldRecipe = (0, import_createRuntimeFn20.createRuntimeFn)({ defaultCla
858
819
  var import_react_slot16 = require("@radix-ui/react-slot");
859
820
  var import_jsx_runtime22 = require("react/jsx-runtime");
860
821
  var defaultElement15 = "input";
861
- var TextField = ({
862
- asChild,
863
- cursor,
864
- error,
865
- size,
866
- variant,
867
- ...props
868
- }) => {
869
- const textField = textFieldRecipe({ cursor, error, size, variant });
822
+ var TextField = ({ asChild, ...props }) => {
823
+ const variants = pick(props, ...textFieldRecipe.variants());
824
+ const textField = textFieldRecipe(variants);
870
825
  const Comp = asChild ? import_react_slot16.Slot : defaultElement15;
871
826
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Comp, { ...props, className: mergeClasses(textField, props.className), children: props.children });
872
827
  };
@@ -875,8 +830,9 @@ var TextField = ({
875
830
  var import_react_slot17 = require("@radix-ui/react-slot");
876
831
  var import_jsx_runtime23 = require("react/jsx-runtime");
877
832
  var defaultElement16 = "span";
878
- var Text = ({ asChild, color, size, weight, ...props }) => {
879
- const text = textRecipe({ color, size, weight });
833
+ var Text = ({ asChild, ...props }) => {
834
+ const variants = pick(props, ...textRecipe.variants());
835
+ const text = textRecipe(variants);
880
836
  const Comp = asChild ? import_react_slot17.Slot : defaultElement16;
881
837
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Comp, { ...props, className: mergeClasses(text, props.className), children: props.children });
882
838
  };
@@ -935,6 +891,7 @@ var lightTheme = "light-theme__z73fs90";
935
891
  Spinner,
936
892
  Status,
937
893
  Switch,
894
+ SwitchThumb,
938
895
  Text,
939
896
  TextField,
940
897
  darkTheme,