@luxfi/ui 7.1.0 → 7.2.0

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.cjs CHANGED
@@ -6,7 +6,6 @@ var tailwindMerge = require('tailwind-merge');
6
6
  var AccordionPrimitive = require('@radix-ui/react-accordion');
7
7
  var React29 = require('react');
8
8
  var jsxRuntime = require('react/jsx-runtime');
9
- var classVarianceAuthority = require('class-variance-authority');
10
9
  var core = require('@hanzogui/core');
11
10
  var RadixAvatar = require('@radix-ui/react-avatar');
12
11
  var tooltip = require('@hanzogui/tooltip');
@@ -488,52 +487,22 @@ var SkeletonText = React29__namespace.forwardRef(
488
487
  }
489
488
  );
490
489
  var IndicatorIcon2 = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { className, viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm.75-11.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM9.25 10a.75.75 0 011.5 0v3a.75.75 0 01-1.5 0v-3z" }) });
491
- var alertRoot = classVarianceAuthority.cva(
492
- // base
493
- "w-full flex items-start relative rounded text-[var(--color-alert-fg)]",
494
- {
495
- variants: {
496
- status: {
497
- info: "bg-[var(--color-alert-bg-info)]",
498
- warning: "bg-[var(--color-alert-bg-warning)]",
499
- warning_table: "bg-[var(--color-alert-bg-warning-table)]",
500
- success: "bg-[var(--color-alert-bg-success)]",
501
- error: "bg-[var(--color-alert-bg-error)]"
502
- },
503
- size: {
504
- sm: "gap-2 px-2 py-2 text-xs",
505
- md: "gap-2 px-3 py-2 text-base"
506
- }
507
- },
508
- defaultVariants: {
509
- status: "info",
510
- size: "md"
511
- }
512
- }
513
- );
514
- var alertContent = classVarianceAuthority.cva("flex flex-1", {
515
- variants: {
516
- inline: {
517
- "true": "inline-flex flex-row items-center",
518
- "false": "flex flex-col"
519
- }
520
- },
521
- defaultVariants: {
522
- inline: true
523
- }
524
- });
525
- var INDICATOR_BASE = "inline-flex items-center justify-center shrink-0 w-5 h-5 text-[var(--color-alert-fg)] [&>svg]:w-full [&>svg]:h-full";
526
- var indicatorVariants = classVarianceAuthority.cva(INDICATOR_BASE, {
527
- variants: {
528
- size: {
529
- sm: "w-5 h-5 my-0",
530
- md: "w-5 h-5 my-[2px]"
531
- }
532
- },
533
- defaultVariants: {
534
- size: "md"
535
- }
536
- });
490
+ var ALERT_BASE = "w-full flex items-start relative rounded text-[var(--color-alert-fg)]";
491
+ var STATUS_CLASSES = {
492
+ info: "bg-[var(--color-alert-bg-info)]",
493
+ warning: "bg-[var(--color-alert-bg-warning)]",
494
+ warning_table: "bg-[var(--color-alert-bg-warning-table)]",
495
+ success: "bg-[var(--color-alert-bg-success)]",
496
+ error: "bg-[var(--color-alert-bg-error)]"
497
+ };
498
+ var SIZE_CLASSES = {
499
+ sm: "gap-2 px-2 py-2 text-xs",
500
+ md: "gap-2 px-3 py-2 text-base"
501
+ };
502
+ var INDICATOR_SIZE_CLASSES = {
503
+ sm: "w-5 h-5 my-0",
504
+ md: "w-5 h-5 my-[2px]"
505
+ };
537
506
  var Alert = React29__namespace.forwardRef(
538
507
  function Alert2(props, ref) {
539
508
  const {
@@ -569,7 +538,10 @@ var Alert = React29__namespace.forwardRef(
569
538
  if (!showIcon && icon === void 0) {
570
539
  return null;
571
540
  }
572
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: indicatorVariants({ size: resolvedSize }), children: icon || defaultIcon });
541
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
542
+ "inline-flex items-center justify-center shrink-0 text-[var(--color-alert-fg)] [&>svg]:w-full [&>svg]:h-full",
543
+ INDICATOR_SIZE_CLASSES[resolvedSize]
544
+ ), children: icon || defaultIcon });
573
545
  })();
574
546
  const handleClose = React29__namespace.useCallback(() => {
575
547
  setIsOpen(false);
@@ -602,12 +574,12 @@ var Alert = React29__namespace.forwardRef(
602
574
  "div",
603
575
  {
604
576
  ref,
605
- className: cn(alertRoot({ status, size: resolvedSize }), className),
577
+ className: cn(ALERT_BASE, STATUS_CLASSES[status], SIZE_CLASSES[resolvedSize], className),
606
578
  style: alertStyle,
607
579
  ...alertRest,
608
580
  children: [
609
581
  iconElement,
610
- children ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: alertContent({ inline }), children: [
582
+ children ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-1", inline ? "inline-flex flex-row items-center" : "flex flex-col"), children: [
611
583
  title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold", children: title }),
612
584
  /* @__PURE__ */ jsxRuntime.jsx(
613
585
  "div",
@@ -632,7 +604,7 @@ var Alert = React29__namespace.forwardRef(
632
604
  ) });
633
605
  }
634
606
  );
635
- var SIZE_CLASSES = {
607
+ var SIZE_CLASSES2 = {
636
608
  xs: "h-6 w-6 text-[10px]",
637
609
  sm: "h-8 w-8 text-xs",
638
610
  md: "h-10 w-10 text-sm",
@@ -677,7 +649,7 @@ var Avatar = React29__namespace.forwardRef(
677
649
  ref,
678
650
  className: cn(
679
651
  "relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full align-middle",
680
- SIZE_CLASSES[size],
652
+ SIZE_CLASSES2[size],
681
653
  VARIANT_CLASSES[variant],
682
654
  !isBorderless && "ring-2 ring-white dark:ring-gray-900",
683
655
  className
@@ -885,7 +857,7 @@ function TruncatedTextTooltip({ label, children }) {
885
857
  return /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { content: label, positioning: { placement: "top" }, children });
886
858
  }
887
859
  var BASE_CLASSES = "inline-flex items-center rounded-sm gap-1 font-medium w-fit max-w-full whitespace-nowrap select-text";
888
- var SIZE_CLASSES2 = {
860
+ var SIZE_CLASSES3 = {
889
861
  sm: "text-xs p-1 h-[18px] min-h-[18px]",
890
862
  md: "text-sm px-1 py-0.5 min-h-6",
891
863
  lg: "text-sm px-2 py-1 min-h-7 font-semibold"
@@ -955,7 +927,7 @@ var Badge = React29__namespace.default.forwardRef(
955
927
  ref,
956
928
  className: cn(
957
929
  BASE_CLASSES,
958
- SIZE_CLASSES2[size],
930
+ SIZE_CLASSES3[size],
959
931
  COLOR_PALETTE_CLASSES[colorPalette],
960
932
  className
961
933
  ),
@@ -1255,7 +1227,7 @@ var Button = React29__namespace.forwardRef(
1255
1227
  return button;
1256
1228
  }
1257
1229
  );
1258
- var SIZE_CLASSES3 = {
1230
+ var SIZE_CLASSES4 = {
1259
1231
  "2xs": "px-2 h-5 min-w-5 text-xs rounded-sm gap-1",
1260
1232
  xs: "px-2 h-6 min-w-6 text-sm rounded-sm gap-1",
1261
1233
  sm: "px-3 h-8 min-w-8 text-sm rounded-md gap-1",
@@ -1264,7 +1236,7 @@ var SIZE_CLASSES3 = {
1264
1236
  function buttonVariants(opts) {
1265
1237
  const v = opts?.variant ?? "solid";
1266
1238
  const s = opts?.size ?? "md";
1267
- return [BASE_CLASSES2, VARIANT_CLASSES2[v] ?? "", SIZE_CLASSES3[s] ?? ""].filter(Boolean).join(" ");
1239
+ return [BASE_CLASSES2, VARIANT_CLASSES2[v] ?? "", SIZE_CLASSES4[s] ?? ""].filter(Boolean).join(" ");
1268
1240
  }
1269
1241
  var ButtonGroup = React29__namespace.forwardRef(
1270
1242
  function ButtonGroup2(props, ref) {
@@ -1381,7 +1353,7 @@ var CheckboxGroupBase = React29__namespace.forwardRef(
1381
1353
  }
1382
1354
  );
1383
1355
  var CheckboxGroup2 = CheckboxGroupBase;
1384
- var SIZE_CLASSES4 = {
1356
+ var SIZE_CLASSES5 = {
1385
1357
  sm: {
1386
1358
  root: "gap-1.5",
1387
1359
  control: "h-3.5 w-3.5 rounded-sm",
@@ -1491,7 +1463,7 @@ var CheckboxBase = React29__namespace.forwardRef(
1491
1463
  },
1492
1464
  [readOnly, isControlled, isInGroup, group, value, onCheckedChange, onChange]
1493
1465
  );
1494
- const sizeClasses2 = SIZE_CLASSES4[size];
1466
+ const sizeClasses2 = SIZE_CLASSES5[size];
1495
1467
  return /* @__PURE__ */ jsxRuntime.jsxs(
1496
1468
  "label",
1497
1469
  {
@@ -2187,7 +2159,7 @@ var PLACEMENT_CLASSES = {
2187
2159
  "data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom"
2188
2160
  ].join(" ")
2189
2161
  };
2190
- var SIZE_CLASSES5 = {
2162
+ var SIZE_CLASSES6 = {
2191
2163
  right: { xs: "w-60", sm: "w-80", md: "w-96", lg: "w-[480px]", xl: "w-[640px]", full: "w-screen" },
2192
2164
  left: { xs: "w-60", sm: "w-80", md: "w-96", lg: "w-[480px]", xl: "w-[640px]", full: "w-screen" },
2193
2165
  top: { xs: "h-40", sm: "h-60", md: "h-80", lg: "h-96", xl: "h-[480px]", full: "h-screen" },
@@ -2216,7 +2188,7 @@ var DrawerContent = React29__namespace.forwardRef(
2216
2188
  className: cn(
2217
2189
  "fixed z-50 flex flex-col bg-[var(--color-drawer-bg)] shadow-[var(--shadow-drawer)] duration-300",
2218
2190
  PLACEMENT_CLASSES[placement] ?? PLACEMENT_CLASSES.right,
2219
- SIZE_CLASSES5[placement]?.[size] ?? SIZE_CLASSES5.right?.md,
2191
+ SIZE_CLASSES6[placement]?.[size] ?? SIZE_CLASSES6.right?.md,
2220
2192
  className
2221
2193
  ),
2222
2194
  ...rest,
@@ -2840,46 +2812,36 @@ var Image2 = React29__namespace.default.forwardRef(
2840
2812
  ] });
2841
2813
  }
2842
2814
  );
2843
- var inputVariants = classVarianceAuthority.cva(
2844
- [
2845
- "w-full appearance-none outline-none transition-colors",
2846
- "bg-[var(--color-input-bg)] text-[var(--color-input-fg)] border-[var(--color-input-border)]",
2847
- "placeholder:text-[var(--color-input-placeholder,theme(colors.gray.400))]",
2848
- "hover:border-[var(--color-input-border-hover,theme(colors.gray.400))]",
2849
- "focus:border-[var(--color-input-border-focus,theme(colors.blue.500))]",
2850
- "focus:placeholder:text-[var(--color-input-placeholder-focus,theme(colors.gray.300))]",
2851
- "disabled:opacity-40 disabled:cursor-not-allowed",
2852
- "read-only:opacity-70",
2853
- "data-[invalid]:border-[var(--color-input-border-invalid,theme(colors.red.500))]"
2854
- ].join(" "),
2855
- {
2856
- variants: {
2857
- size: {
2858
- xs: "h-6 px-2 text-xs rounded",
2859
- sm: "h-8 px-3 text-sm rounded-md",
2860
- md: "h-10 px-4 text-base rounded-md",
2861
- lg: "h-12 px-4 text-lg rounded-lg",
2862
- "2xl": "h-14 px-4 text-xl rounded-lg"
2863
- },
2864
- variant: {
2865
- outline: "border border-solid",
2866
- filled: "border-0 bg-[var(--color-input-filled-bg,theme(colors.gray.100))]",
2867
- unstyled: "border-0 bg-transparent p-0 h-auto"
2868
- }
2869
- },
2870
- defaultVariants: {
2871
- size: "md",
2872
- variant: "outline"
2873
- }
2874
- }
2875
- );
2815
+ var INPUT_BASE = [
2816
+ "w-full appearance-none outline-none transition-colors",
2817
+ "bg-[var(--color-input-bg)] text-[var(--color-input-fg)] border-[var(--color-input-border)]",
2818
+ "placeholder:text-[var(--color-input-placeholder,theme(colors.gray.400))]",
2819
+ "hover:border-[var(--color-input-border-hover,theme(colors.gray.400))]",
2820
+ "focus:border-[var(--color-input-border-focus,theme(colors.blue.500))]",
2821
+ "focus:placeholder:text-[var(--color-input-placeholder-focus,theme(colors.gray.300))]",
2822
+ "disabled:opacity-40 disabled:cursor-not-allowed",
2823
+ "read-only:opacity-70",
2824
+ "data-[invalid]:border-[var(--color-input-border-invalid,theme(colors.red.500))]"
2825
+ ].join(" ");
2826
+ var INPUT_SIZE_CLASSES = {
2827
+ xs: "h-6 px-2 text-xs rounded",
2828
+ sm: "h-8 px-3 text-sm rounded-md",
2829
+ md: "h-10 px-4 text-base rounded-md",
2830
+ lg: "h-12 px-4 text-lg rounded-lg",
2831
+ "2xl": "h-14 px-4 text-xl rounded-lg"
2832
+ };
2833
+ var INPUT_VARIANT_CLASSES = {
2834
+ outline: "border border-solid",
2835
+ filled: "border-0 bg-[var(--color-input-filled-bg,theme(colors.gray.100))]",
2836
+ unstyled: "border-0 bg-transparent p-0 h-auto"
2837
+ };
2876
2838
  var Input = React29__namespace.default.forwardRef(
2877
- ({ size, variant, className, ...rest }, ref) => {
2839
+ ({ size = "md", variant = "outline", className, ...rest }, ref) => {
2878
2840
  return /* @__PURE__ */ jsxRuntime.jsx(
2879
2841
  "input",
2880
2842
  {
2881
2843
  ref,
2882
- className: cn(inputVariants({ size, variant }), className),
2844
+ className: cn(INPUT_BASE, INPUT_SIZE_CLASSES[size], INPUT_VARIANT_CLASSES[variant], className),
2883
2845
  ...rest
2884
2846
  }
2885
2847
  );
@@ -3262,7 +3224,7 @@ var MenuTriggerItem = React29__namespace.forwardRef(function MenuTriggerItem2(pr
3262
3224
  }
3263
3225
  ) });
3264
3226
  });
3265
- var INPUT_BASE = [
3227
+ var INPUT_BASE2 = [
3266
3228
  "w-10 h-10",
3267
3229
  "text-center text-sm font-medium",
3268
3230
  "border-2 rounded-md",
@@ -3393,7 +3355,7 @@ var PinInput = React29__namespace.forwardRef(
3393
3355
  "aria-invalid": invalid || void 0,
3394
3356
  value: values[index] || "",
3395
3357
  className: cn(
3396
- INPUT_BASE,
3358
+ INPUT_BASE2,
3397
3359
  values[index] && INPUT_FILLED,
3398
3360
  invalid && INPUT_INVALID,
3399
3361
  attached && index > 0 && "-ml-0.5"
@@ -3644,7 +3606,7 @@ var PopoverDescription = React29__namespace.forwardRef(function PopoverDescripti
3644
3606
  }
3645
3607
  );
3646
3608
  });
3647
- var SIZE_CLASSES6 = {
3609
+ var SIZE_CLASSES7 = {
3648
3610
  sm: "h-1",
3649
3611
  md: "h-2",
3650
3612
  lg: "h-3",
@@ -3702,7 +3664,7 @@ var Progress = React29__namespace.forwardRef(
3702
3664
  className: cn(
3703
3665
  "w-full overflow-hidden rounded-full",
3704
3666
  "bg-[var(--color-progress-track)]",
3705
- SIZE_CLASSES6[size],
3667
+ SIZE_CLASSES7[size],
3706
3668
  trackProps?.className
3707
3669
  ),
3708
3670
  style: trackStyle,
@@ -3841,7 +3803,7 @@ var ProgressCircleValueText = React29__namespace.forwardRef(function ProgressCir
3841
3803
  }
3842
3804
  );
3843
3805
  });
3844
- var SIZE_CLASSES7 = {
3806
+ var SIZE_CLASSES8 = {
3845
3807
  xs: {
3846
3808
  root: "gap-1.5",
3847
3809
  control: "h-3 w-3",
@@ -3922,7 +3884,7 @@ var RadioBase = React29__namespace.forwardRef(
3922
3884
  function Radio(props, ref) {
3923
3885
  const { children, inputProps, rootRef, value, disabled, className, ...rest } = props;
3924
3886
  const size = React29__namespace.useContext(RadioSizeContext);
3925
- const sizeClasses2 = SIZE_CLASSES7[size];
3887
+ const sizeClasses2 = SIZE_CLASSES8[size];
3926
3888
  return /* @__PURE__ */ jsxRuntime.jsxs(
3927
3889
  "label",
3928
3890
  {
@@ -4580,7 +4542,7 @@ function SliderMarks(props) {
4580
4542
  }
4581
4543
  var NOOP3 = () => {
4582
4544
  };
4583
- var SIZE_CLASSES8 = {
4545
+ var SIZE_CLASSES9 = {
4584
4546
  sm: {
4585
4547
  root: "h-4 w-7",
4586
4548
  thumb: "h-3 w-3 data-[state=checked]:translate-x-3",
@@ -4630,7 +4592,7 @@ var SwitchBase = React29__namespace.forwardRef(
4630
4592
  },
4631
4593
  [isControlled, onCheckedChange]
4632
4594
  );
4633
- const sizeClasses2 = SIZE_CLASSES8[size];
4595
+ const sizeClasses2 = SIZE_CLASSES9[size];
4634
4596
  const isRtl = direction === "rtl";
4635
4597
  return /* @__PURE__ */ jsxRuntime.jsxs(
4636
4598
  "label",
@@ -5315,39 +5277,18 @@ var nbsp = String.fromCharCode(160);
5315
5277
  function TruncatedTextTooltip2({ label, children }) {
5316
5278
  return /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { content: label, positioning: { placement: "top" }, children });
5317
5279
  }
5318
- var tagVariants = classVarianceAuthority.cva(
5319
- [
5320
- "inline-flex items-center align-top max-w-full select-text rounded-sm",
5321
- "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-500"
5322
- ].join(" "),
5323
- {
5324
- variants: {
5325
- variant: {
5326
- subtle: "bg-[var(--color-tag-subtle-bg)] text-[var(--color-tag-subtle-fg)]",
5327
- clickable: [
5328
- "cursor-pointer",
5329
- "bg-[var(--color-tag-clickable-bg)] text-[var(--color-tag-clickable-fg)]",
5330
- "hover:opacity-76"
5331
- ].join(" "),
5332
- filter: "bg-[var(--color-tag-filter-bg)]",
5333
- select: [
5334
- "cursor-pointer",
5335
- "bg-[var(--color-tag-select-bg)] text-[var(--color-tag-select-fg)]",
5336
- "hover:text-[var(--color-hover)] hover:opacity-76"
5337
- ].join(" ")
5338
- },
5339
- size: {
5340
- sm: "px-1 py-0.5 min-h-5 gap-1 text-xs",
5341
- md: "px-1 py-0.5 min-h-6 gap-1 text-sm",
5342
- lg: "px-1.5 py-1.5 min-h-8 min-w-8 gap-1 text-sm"
5343
- }
5344
- },
5345
- defaultVariants: {
5346
- variant: "subtle",
5347
- size: "md"
5348
- }
5349
- }
5350
- );
5280
+ var TAG_BASE = "inline-flex items-center align-top max-w-full select-text rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-500";
5281
+ var TAG_VARIANT_CLASSES = {
5282
+ subtle: "bg-[var(--color-tag-subtle-bg)] text-[var(--color-tag-subtle-fg)]",
5283
+ clickable: "cursor-pointer bg-[var(--color-tag-clickable-bg)] text-[var(--color-tag-clickable-fg)] hover:opacity-76",
5284
+ filter: "bg-[var(--color-tag-filter-bg)]",
5285
+ select: "cursor-pointer bg-[var(--color-tag-select-bg)] text-[var(--color-tag-select-fg)] hover:text-[var(--color-hover)] hover:opacity-76"
5286
+ };
5287
+ var TAG_SIZE_CLASSES = {
5288
+ sm: "px-1 py-0.5 min-h-5 gap-1 text-xs",
5289
+ md: "px-1 py-0.5 min-h-6 gap-1 text-sm",
5290
+ lg: "px-1.5 py-1.5 min-h-8 min-w-8 gap-1 text-sm"
5291
+ };
5351
5292
  var TAG_SELECTED_CLASSES = [
5352
5293
  "bg-[var(--color-tag-select-selected-bg)]",
5353
5294
  "text-[var(--color-tag-select-selected-fg)]",
@@ -5389,7 +5330,9 @@ var Tag = React29__namespace.forwardRef(
5389
5330
  {
5390
5331
  ref,
5391
5332
  className: cn(
5392
- tagVariants({ variant, size }),
5333
+ TAG_BASE,
5334
+ TAG_VARIANT_CLASSES[variant ?? "subtle"],
5335
+ TAG_SIZE_CLASSES[size ?? "md"],
5393
5336
  selected && !loading && TAG_SELECTED_CLASSES,
5394
5337
  disabled && TAG_DISABLED_CLASSES,
5395
5338
  className
@@ -5417,46 +5360,36 @@ var Tag = React29__namespace.forwardRef(
5417
5360
  ) });
5418
5361
  }
5419
5362
  );
5420
- var textareaVariants = classVarianceAuthority.cva(
5421
- [
5422
- "w-full appearance-none outline-none transition-colors resize-y",
5423
- "bg-[var(--color-input-bg)] text-[var(--color-input-fg)] border-[var(--color-input-border)]",
5424
- "placeholder:text-[var(--color-input-placeholder,theme(colors.gray.400))]",
5425
- "hover:border-[var(--color-input-border-hover,theme(colors.gray.400))]",
5426
- "focus:border-[var(--color-input-border-focus,theme(colors.blue.500))]",
5427
- "focus:placeholder:text-[var(--color-input-placeholder-focus,theme(colors.gray.300))]",
5428
- "disabled:opacity-40 disabled:cursor-not-allowed",
5429
- "read-only:opacity-70",
5430
- "data-[invalid]:border-[var(--color-input-border-invalid,theme(colors.red.500))]"
5431
- ].join(" "),
5432
- {
5433
- variants: {
5434
- size: {
5435
- xs: "px-2 py-1 text-xs rounded",
5436
- sm: "px-3 py-2 text-sm rounded-md",
5437
- md: "px-4 py-2 text-base rounded-md",
5438
- lg: "px-4 py-3 text-lg rounded-lg",
5439
- "2xl": "px-4 py-3 text-xl rounded-lg"
5440
- },
5441
- variant: {
5442
- outline: "border border-solid",
5443
- filled: "border-0 bg-[var(--color-input-filled-bg,theme(colors.gray.100))]",
5444
- unstyled: "border-0 bg-transparent p-0"
5445
- }
5446
- },
5447
- defaultVariants: {
5448
- size: "md",
5449
- variant: "outline"
5450
- }
5451
- }
5452
- );
5363
+ var TEXTAREA_BASE = [
5364
+ "w-full appearance-none outline-none transition-colors resize-y",
5365
+ "bg-[var(--color-input-bg)] text-[var(--color-input-fg)] border-[var(--color-input-border)]",
5366
+ "placeholder:text-[var(--color-input-placeholder,theme(colors.gray.400))]",
5367
+ "hover:border-[var(--color-input-border-hover,theme(colors.gray.400))]",
5368
+ "focus:border-[var(--color-input-border-focus,theme(colors.blue.500))]",
5369
+ "focus:placeholder:text-[var(--color-input-placeholder-focus,theme(colors.gray.300))]",
5370
+ "disabled:opacity-40 disabled:cursor-not-allowed",
5371
+ "read-only:opacity-70",
5372
+ "data-[invalid]:border-[var(--color-input-border-invalid,theme(colors.red.500))]"
5373
+ ].join(" ");
5374
+ var TEXTAREA_SIZE_CLASSES = {
5375
+ xs: "px-2 py-1 text-xs rounded",
5376
+ sm: "px-3 py-2 text-sm rounded-md",
5377
+ md: "px-4 py-2 text-base rounded-md",
5378
+ lg: "px-4 py-3 text-lg rounded-lg",
5379
+ "2xl": "px-4 py-3 text-xl rounded-lg"
5380
+ };
5381
+ var TEXTAREA_VARIANT_CLASSES = {
5382
+ outline: "border border-solid",
5383
+ filled: "border-0 bg-[var(--color-input-filled-bg,theme(colors.gray.100))]",
5384
+ unstyled: "border-0 bg-transparent p-0"
5385
+ };
5453
5386
  var Textarea = React29__namespace.default.forwardRef(
5454
- ({ size, variant, className, ...rest }, ref) => {
5387
+ ({ size = "md", variant = "outline", className, ...rest }, ref) => {
5455
5388
  return /* @__PURE__ */ jsxRuntime.jsx(
5456
5389
  "textarea",
5457
5390
  {
5458
5391
  ref,
5459
- className: cn(textareaVariants({ size, variant }), className),
5392
+ className: cn(TEXTAREA_BASE, TEXTAREA_SIZE_CLASSES[size], TEXTAREA_VARIANT_CLASSES[variant], className),
5460
5393
  ...rest
5461
5394
  }
5462
5395
  );