@clasing/ui 0.1.137 → 2.0.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.
@@ -0,0 +1 @@
1
+ "use strict";const t=require("./jsx-runtime-BuHQgaKs.cjs"),p=require("./index-DoxiiusW.cjs"),$=require("@radix-ui/react-slot"),z=require("./index-C8P6Mn4U.cjs"),u=require("react"),r=require("./icon-component-D5YssRbR.cjs"),o=require("./tooltip-BRSR0-4n.cjs"),k="focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] relative flex items-center justify-center outline-1 transition-[color,box-shadow]",C=z.cva(k,{variants:{variant:{primary:["bg-primary-600 lg:hover:bg-primary-800 text-white outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],secondary:["bg-black text-white outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 lg:hover:bg-neutral-900 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],inverse:["lg:hover:bg-neutral-000 bg-white text-black outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],outline:["text-primary-600 outline-primary-600 lg:hover:bg-primary-050 bg-white disabled:bg-neutral-100 disabled:text-neutral-700 disabled:outline-transparent disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],ghost:["bg-primary-050 text-primary-600 lg:hover:bg-primary-100 outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],destructive:["bg-error-light text-error-main outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],link:["text-primary-600 lg:hover:bg-primary-050 bg-transparent outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"]},size:{xl:"h-12 gap-2 px-6 py-1 text-base",lg:"h-10 gap-2 px-5 py-1 text-sm",md:"h-8 gap-1.5 px-4 py-1 text-xs",sm:"h-7 gap-1 px-3 py-1 text-xs",xs:"h-6 gap-1 px-3 py-1 text-xs"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},iconPosition:{left:"",right:"",only:"aspect-square"}},compoundVariants:[{iconPosition:"only",variant:"primary",class:"outline-neutral-050 text-primary-600 lg:hover:bg-neutral-000 bg-white"},{iconPosition:"only",variant:"destructive",class:"bg-error-light text-error-main outline-transparent"},{iconPosition:"only",variant:"link",class:"text-primary-600 lg:hover:bg-primary-050 bg-transparent"},{iconPosition:"only",size:"xl",class:"size-12 p-1.5"},{iconPosition:"only",size:"lg",class:"size-10 p-1.5"},{iconPosition:"only",size:"md",class:"size-8 p-1.5"},{iconPosition:"only",size:"sm",class:"size-7 p-1.5"},{iconPosition:"only",size:"xs",class:"size-6 p-1.5"},{variant:"link",size:"xl",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"lg",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"md",class:"h-auto gap-1.5 px-3 py-1 text-sm"},{variant:"link",size:"sm",class:"h-auto gap-1 px-3 py-1 text-xs"},{variant:"link",size:"xs",class:"h-auto gap-1 px-3 py-1 text-xs"}],defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full",iconPosition:"left"}}),N=z.cva(`${k} cursor-default`,{variants:{variant:{primary:["bg-primary-800 text-white outline-transparent"],secondary:["bg-neutral-900 text-white outline-transparent"],inverse:["bg-neutral-000 text-black outline-transparent"],ghost:["bg-primary-100 text-primary-600 outline-transparent"],outline:["bg-primary-100 text-primary-600 outline-primary-600"],destructive:["bg-error-light text-error-main outline-transparent"],link:["bg-primary-050 text-primary-600"]},size:{xl:"h-12 gap-2 px-6 text-base",lg:"h-10 gap-2 px-5 text-sm",md:"h-8 gap-1.5 px-4 text-xs",sm:"h-7 gap-1 px-3 text-xs",xs:"h-6 gap-1 px-3 text-xs"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},iconPosition:{left:"",right:"",only:"aspect-square"}},compoundVariants:[{iconPosition:"only",variant:"primary",class:"bg-neutral-000 text-primary-600 outline-neutral-050"},{iconPosition:"only",variant:"destructive",class:"bg-error-light text-error-main outline-transparent"},{iconPosition:"only",variant:"link",class:"bg-primary-050 text-primary-600"},{iconPosition:"only",size:"xl",class:"size-12 p-3"},{iconPosition:"only",size:"lg",class:"size-10 p-2"},{iconPosition:"only",size:"md",class:"size-8 p-1"},{iconPosition:"only",size:"sm",class:"size-7 p-0.5"},{iconPosition:"only",size:"xs",class:"size-6 p-0.5"},{variant:"link",size:"xl",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"lg",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"md",class:"h-auto gap-1.5 px-3 py-1 text-sm"},{variant:"link",size:"sm",class:"h-auto gap-1 px-3 py-1 text-xs"},{variant:"link",size:"xs",class:"h-auto gap-1 px-3 py-1 text-xs"}],defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full",iconPosition:"left"}}),I=z.cva(k,{variants:{variant:{primary:["bg-primary-800 text-white outline-transparent"],secondary:["bg-neutral-900 text-white outline-transparent"],inverse:["bg-neutral-000 text-black outline-transparent"],ghost:["bg-primary-100 text-primary-600 outline-transparent"],outline:["bg-primary-100 text-primary-600 outline-primary-600"],destructive:["bg-error-light text-error-main outline-transparent"],link:["bg-primary-050 text-primary-600"]},size:{xl:"h-12 gap-2 px-6 text-base",lg:"h-10 gap-2 px-5 text-sm",md:"h-8 gap-1.5 px-4 text-xs",sm:"h-7 gap-1 px-3 text-xs",xs:"h-6 gap-1 px-3 text-xs"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},iconPosition:{left:"",right:"",only:"aspect-square"}},compoundVariants:[{iconPosition:"only",variant:"primary",class:"bg-neutral-000 text-primary-600 outline-neutral-050"},{iconPosition:"only",variant:"destructive",class:"bg-error-light text-error-main outline-transparent"},{iconPosition:"only",variant:"link",class:"bg-primary-050 text-primary-600"},{iconPosition:"only",size:"xl",class:"size-12 p-3"},{iconPosition:"only",size:"lg",class:"size-10 p-2"},{iconPosition:"only",size:"md",class:"size-8 p-1"},{iconPosition:"only",size:"sm",class:"size-7 p-0.5"},{iconPosition:"only",size:"xs",class:"size-6 p-0.5"},{variant:"link",size:"xl",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"lg",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"md",class:"h-auto gap-1.5 px-3 py-1 text-sm"},{variant:"link",size:"sm",class:"h-auto gap-1 px-3 py-1 text-xs"},{variant:"link",size:"xs",class:"h-auto gap-1 px-3 py-1 text-xs"}],defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full",iconPosition:"left"}}),w=u.forwardRef(({className:b,variant:y,size:s,weight:h,rounded:v,children:l,iconName:x,iconText:c,iconPosition:f="left",isLoading:i,isActive:q,disabled:E,tooltip:d,tooltipPlacement:R="top",asChild:j,...S},V)=>{const T=j?$.Slot:"button",n=u.useMemo(()=>!l&&x||f==="only"?"only":f,[l,x,f]),e=u.useMemo(()=>x?typeof x=="string"?{name:x}:x:null,[x]),a=n==="only"?{xl:"size-6",lg:"size-6",md:"size-5",sm:"size-4",xs:"size-3.5"}:{xl:"size-5",lg:"size-5",md:"size-4",sm:"size-4",xs:"size-3.5"},B=t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:n==="only"?t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:i?t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:"IconLoader2",className:p.cn("animate-spin",a[s||"xl"])}):e&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,stroke:e.stroke,iconText:c,className:a[s||"xl"]})}):t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx("span",{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${i?"visible opacity-100":"invisible opacity-0"}`,children:t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:"IconLoader2",className:p.cn("animate-spin",a[s||"xl"])})}),t.jsxRuntimeExports.jsxs("span",{className:p.cn("flex items-center justify-center gap-2",i?"invisible opacity-0":"visible opacity-100"),children:[e&&n==="left"&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,iconText:c,stroke:e.stroke,className:a[s||"xl"]}),l,e&&n==="right"&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,iconText:c,stroke:e.stroke,className:a[s||"xl"]})]})]})}),F=()=>{if(!j||!u.isValidElement(l)||!e&&n!=="only")return l;const m=l,A=m.props.children;if(n==="only")return u.cloneElement(m,{...m.props,children:i?t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:"IconLoader2",className:p.cn("animate-spin",a[s||"xl"])}):e&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,stroke:e.stroke,iconText:c,size:24})});const P=e&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,iconText:c,stroke:e.stroke,className:a[s||"xl"]}),M=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx("span",{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${i?"visible opacity-100":"invisible opacity-0"}`,children:t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:"IconLoader2",className:p.cn("animate-spin",a[s||"xl"])})}),t.jsxRuntimeExports.jsxs("span",{className:p.cn("flex items-center justify-center gap-2",i?"invisible opacity-0":"visible opacity-100"),children:[n==="left"&&P,A,n==="right"&&P]})]});return u.cloneElement(m,{...m.props,children:M})},g=t.jsxRuntimeExports.jsx(T,{ref:V,className:p.cn(i?N({variant:y,weight:h,size:s,rounded:v,iconPosition:n,className:b}):q?I({variant:y,weight:h,size:s,rounded:v,iconPosition:n,className:b}):C({variant:y,weight:h,size:s,rounded:v,iconPosition:n,className:b})),disabled:E||i,...S,children:j?F():B});return d&&(E||i)?t.jsxRuntimeExports.jsx(o.TooltipProvider,{children:t.jsxRuntimeExports.jsxs(o.Tooltip,{children:[t.jsxRuntimeExports.jsx(o.TooltipTrigger,{asChild:n==="only",children:n==="only"?t.jsxRuntimeExports.jsx("div",{className:"inline-block","aria-disabled":"true",children:g}):g}),t.jsxRuntimeExports.jsx(o.TooltipContent,{side:R,className:"text-muted-foreground",children:d})]})}):d?t.jsxRuntimeExports.jsx(o.TooltipProvider,{children:t.jsxRuntimeExports.jsxs(o.Tooltip,{children:[t.jsxRuntimeExports.jsx(o.TooltipTrigger,{asChild:n==="only",children:g}),t.jsxRuntimeExports.jsx(o.TooltipContent,{side:R,className:"text-muted-foreground",children:d})]})}):g});w.displayName="Button";exports.Button=w;exports.buttonActiveStyles=I;exports.buttonLoadingStyles=N;exports.buttonStyles=C;
@@ -1,11 +1,11 @@
1
1
  import { j as t } from "./jsx-runtime-DywqP_6a.js";
2
2
  import { c as p } from "./index-CRiPKpXj.js";
3
3
  import { Slot as M } from "@radix-ui/react-slot";
4
- import { c as w } from "./index-BqtVL8d-.js";
4
+ import { c as z } from "./index-BqtVL8d-.js";
5
5
  import x from "react";
6
- import { I as s } from "./icon-component-CxQsODCa.js";
7
- import { b as N, T as I, c as C, a as V } from "./tooltip-BnIdKYZi.js";
8
- const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] relative flex items-center justify-center outline-1 transition-[color,box-shadow]", T = w(k, {
6
+ import { I as n } from "./icon-component-CxQsODCa.js";
7
+ import { b as w, T as I, c as C, a as V } from "./tooltip-Bxh10S4Q.js";
8
+ const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] relative flex items-center justify-center outline-1 transition-[color,box-shadow]", T = z(k, {
9
9
  variants: {
10
10
  variant: {
11
11
  // Variantes de botón sólido
@@ -73,27 +73,27 @@ const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
73
73
  {
74
74
  iconPosition: "only",
75
75
  size: "xl",
76
- class: "h-12 w-12 p-1.5"
76
+ class: "size-12 p-1.5"
77
77
  },
78
78
  {
79
79
  iconPosition: "only",
80
80
  size: "lg",
81
- class: "h-10 w-10 p-1.5"
81
+ class: "size-10 p-1.5"
82
82
  },
83
83
  {
84
84
  iconPosition: "only",
85
85
  size: "md",
86
- class: "h-8 w-8 p-1.5"
86
+ class: "size-8 p-1.5"
87
87
  },
88
88
  {
89
89
  iconPosition: "only",
90
90
  size: "sm",
91
- class: "h-7 w-7 p-1.5"
91
+ class: "size-7 p-1.5"
92
92
  },
93
93
  {
94
94
  iconPosition: "only",
95
95
  size: "xs",
96
- class: "h-6 w-6 p-1.5"
96
+ class: "size-6 p-1.5"
97
97
  },
98
98
  {
99
99
  variant: "link",
@@ -128,7 +128,7 @@ const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
128
128
  rounded: "full",
129
129
  iconPosition: "left"
130
130
  }
131
- }), _ = w(`${k} cursor-default`, {
131
+ }), _ = z(`${k} cursor-default`, {
132
132
  variants: {
133
133
  variant: {
134
134
  primary: ["bg-primary-800 text-white outline-transparent"],
@@ -183,27 +183,27 @@ const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
183
183
  {
184
184
  iconPosition: "only",
185
185
  size: "xl",
186
- class: "h-12 w-12 p-3"
186
+ class: "size-12 p-3"
187
187
  },
188
188
  {
189
189
  iconPosition: "only",
190
190
  size: "lg",
191
- class: "h-10 w-10 p-2"
191
+ class: "size-10 p-2"
192
192
  },
193
193
  {
194
194
  iconPosition: "only",
195
195
  size: "md",
196
- class: "h-8 w-8 p-1"
196
+ class: "size-8 p-1"
197
197
  },
198
198
  {
199
199
  iconPosition: "only",
200
200
  size: "sm",
201
- class: "h-7 w-7 p-0.5"
201
+ class: "size-7 p-0.5"
202
202
  },
203
203
  {
204
204
  iconPosition: "only",
205
205
  size: "xs",
206
- class: "h-6 w-6 p-0.5"
206
+ class: "size-6 p-0.5"
207
207
  },
208
208
  // Link loading styles
209
209
  {
@@ -239,7 +239,7 @@ const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
239
239
  rounded: "full",
240
240
  iconPosition: "left"
241
241
  }
242
- }), D = w(k, {
242
+ }), D = z(k, {
243
243
  variants: {
244
244
  variant: {
245
245
  primary: ["bg-primary-800 text-white outline-transparent"],
@@ -294,27 +294,27 @@ const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
294
294
  {
295
295
  iconPosition: "only",
296
296
  size: "xl",
297
- class: "h-12 w-12 p-3"
297
+ class: "size-12 p-3"
298
298
  },
299
299
  {
300
300
  iconPosition: "only",
301
301
  size: "lg",
302
- class: "h-10 w-10 p-2"
302
+ class: "size-10 p-2"
303
303
  },
304
304
  {
305
305
  iconPosition: "only",
306
306
  size: "md",
307
- class: "h-8 w-8 p-1"
307
+ class: "size-8 p-1"
308
308
  },
309
309
  {
310
310
  iconPosition: "only",
311
311
  size: "sm",
312
- class: "h-7 w-7 p-0.5"
312
+ class: "size-7 p-0.5"
313
313
  },
314
314
  {
315
315
  iconPosition: "only",
316
316
  size: "xs",
317
- class: "h-6 w-6 p-0.5"
317
+ class: "size-6 p-0.5"
318
318
  },
319
319
  // Link active styles
320
320
  {
@@ -352,50 +352,50 @@ const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
352
352
  }
353
353
  }), G = x.forwardRef(
354
354
  ({
355
- className: g,
355
+ className: m,
356
356
  variant: b,
357
- size: n,
358
- weight: h,
359
- rounded: y,
360
- children: r,
361
- iconName: l,
357
+ size: i,
358
+ weight: y,
359
+ rounded: h,
360
+ children: l,
361
+ iconName: o,
362
362
  iconText: c,
363
363
  iconPosition: v = "left",
364
- isLoading: i,
364
+ isLoading: s,
365
365
  isActive: E,
366
366
  disabled: j,
367
- tooltip: m,
367
+ tooltip: d,
368
368
  tooltipPlacement: P = "top",
369
369
  asChild: f,
370
370
  ...S
371
371
  }, B) => {
372
- const F = f ? M : "button", a = x.useMemo(() => !r && l || v === "only" ? "only" : v, [r, l, v]), e = x.useMemo(() => l ? typeof l == "string" ? { name: l } : l : null, [l]), o = a === "only" ? {
373
- xl: "min-w-6 h-6",
374
- lg: "min-w-6 h-6",
375
- md: "min-w-5 h-5",
376
- sm: "min-w-4 h-4",
377
- xs: "min-w-3.5 h-3.5"
372
+ const F = f ? M : "button", a = x.useMemo(() => !l && o || v === "only" ? "only" : v, [l, o, v]), e = x.useMemo(() => o ? typeof o == "string" ? { name: o } : o : null, [o]), r = a === "only" ? {
373
+ xl: "size-6",
374
+ lg: "size-6",
375
+ md: "size-5",
376
+ sm: "size-4",
377
+ xs: "size-3.5"
378
378
  } : {
379
- xl: "min-w-5 h-5",
380
- lg: "min-w-5 h-5",
381
- md: "min-w-4 h-4",
382
- sm: "min-w-4 h-4",
383
- xs: "min-w-3.5 h-3.5"
379
+ xl: "size-5",
380
+ lg: "size-5",
381
+ md: "size-4",
382
+ sm: "size-4",
383
+ xs: "size-3.5"
384
384
  }, q = /* @__PURE__ */ t.jsx(t.Fragment, { children: a === "only" ? (
385
385
  // Renderizado para modo icon-only
386
- /* @__PURE__ */ t.jsx(t.Fragment, { children: i ? /* @__PURE__ */ t.jsx(
387
- s,
386
+ /* @__PURE__ */ t.jsx(t.Fragment, { children: s ? /* @__PURE__ */ t.jsx(
387
+ n,
388
388
  {
389
389
  iconName: "IconLoader2",
390
- className: p("animate-spin", o[n || "xl"])
390
+ className: p("animate-spin", r[i || "xl"])
391
391
  }
392
392
  ) : e && /* @__PURE__ */ t.jsx(
393
- s,
393
+ n,
394
394
  {
395
395
  iconName: e.name,
396
396
  stroke: e.stroke,
397
397
  iconText: c,
398
- size: 24
398
+ className: r[i || "xl"]
399
399
  }
400
400
  ) })
401
401
  ) : (
@@ -404,12 +404,12 @@ const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
404
404
  /* @__PURE__ */ t.jsx(
405
405
  "span",
406
406
  {
407
- className: `absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${i ? "visible opacity-100" : "invisible opacity-0"}`,
407
+ className: `absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${s ? "visible opacity-100" : "invisible opacity-0"}`,
408
408
  children: /* @__PURE__ */ t.jsx(
409
- s,
409
+ n,
410
410
  {
411
411
  iconName: "IconLoader2",
412
- className: p("animate-spin", o[n || "xl"])
412
+ className: p("animate-spin", r[i || "xl"])
413
413
  }
414
414
  )
415
415
  }
@@ -419,26 +419,26 @@ const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
419
419
  {
420
420
  className: p(
421
421
  "flex items-center justify-center gap-2",
422
- i ? "invisible opacity-0" : "visible opacity-100"
422
+ s ? "invisible opacity-0" : "visible opacity-100"
423
423
  ),
424
424
  children: [
425
425
  e && a === "left" && /* @__PURE__ */ t.jsx(
426
- s,
426
+ n,
427
427
  {
428
428
  iconName: e.name,
429
429
  iconText: c,
430
430
  stroke: e.stroke,
431
- className: o[n || "xl"]
431
+ className: r[i || "xl"]
432
432
  }
433
433
  ),
434
- r,
434
+ l,
435
435
  e && a === "right" && /* @__PURE__ */ t.jsx(
436
- s,
436
+ n,
437
437
  {
438
438
  iconName: e.name,
439
439
  iconText: c,
440
440
  stroke: e.stroke,
441
- className: o[n || "xl"]
441
+ className: r[i || "xl"]
442
442
  }
443
443
  )
444
444
  ]
@@ -446,20 +446,20 @@ const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
446
446
  )
447
447
  ] })
448
448
  ) }), R = () => {
449
- if (!f || !x.isValidElement(r) || !e && a !== "only")
450
- return r;
451
- const u = r, $ = u.props.children;
449
+ if (!f || !x.isValidElement(l) || !e && a !== "only")
450
+ return l;
451
+ const u = l, $ = u.props.children;
452
452
  if (a === "only")
453
453
  return x.cloneElement(u, {
454
454
  ...u.props,
455
- children: i ? /* @__PURE__ */ t.jsx(
456
- s,
455
+ children: s ? /* @__PURE__ */ t.jsx(
456
+ n,
457
457
  {
458
458
  iconName: "IconLoader2",
459
- className: p("animate-spin", o[n || "xl"])
459
+ className: p("animate-spin", r[i || "xl"])
460
460
  }
461
461
  ) : e && /* @__PURE__ */ t.jsx(
462
- s,
462
+ n,
463
463
  {
464
464
  iconName: e.name,
465
465
  stroke: e.stroke,
@@ -468,24 +468,24 @@ const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
468
468
  }
469
469
  )
470
470
  });
471
- const z = e && /* @__PURE__ */ t.jsx(
472
- s,
471
+ const N = e && /* @__PURE__ */ t.jsx(
472
+ n,
473
473
  {
474
474
  iconName: e.name,
475
475
  iconText: c,
476
476
  stroke: e.stroke,
477
- className: o[n || "xl"]
477
+ className: r[i || "xl"]
478
478
  }
479
479
  ), A = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
480
480
  /* @__PURE__ */ t.jsx(
481
481
  "span",
482
482
  {
483
- className: `absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${i ? "visible opacity-100" : "invisible opacity-0"}`,
483
+ className: `absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${s ? "visible opacity-100" : "invisible opacity-0"}`,
484
484
  children: /* @__PURE__ */ t.jsx(
485
- s,
485
+ n,
486
486
  {
487
487
  iconName: "IconLoader2",
488
- className: p("animate-spin", o[n || "xl"])
488
+ className: p("animate-spin", r[i || "xl"])
489
489
  }
490
490
  )
491
491
  }
@@ -495,12 +495,12 @@ const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
495
495
  {
496
496
  className: p(
497
497
  "flex items-center justify-center gap-2",
498
- i ? "invisible opacity-0" : "visible opacity-100"
498
+ s ? "invisible opacity-0" : "visible opacity-100"
499
499
  ),
500
500
  children: [
501
- a === "left" && z,
501
+ a === "left" && N,
502
502
  $,
503
- a === "right" && z
503
+ a === "right" && N
504
504
  ]
505
505
  }
506
506
  )
@@ -509,60 +509,60 @@ const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
509
509
  ...u.props,
510
510
  children: A
511
511
  });
512
- }, d = /* @__PURE__ */ t.jsx(
512
+ }, g = /* @__PURE__ */ t.jsx(
513
513
  F,
514
514
  {
515
515
  ref: B,
516
516
  className: p(
517
- i ? _({
517
+ s ? _({
518
518
  variant: b,
519
- weight: h,
520
- size: n,
521
- rounded: y,
519
+ weight: y,
520
+ size: i,
521
+ rounded: h,
522
522
  iconPosition: a,
523
- className: g
523
+ className: m
524
524
  }) : E ? D({
525
525
  variant: b,
526
- weight: h,
527
- size: n,
528
- rounded: y,
526
+ weight: y,
527
+ size: i,
528
+ rounded: h,
529
529
  iconPosition: a,
530
- className: g
530
+ className: m
531
531
  }) : T({
532
532
  variant: b,
533
- weight: h,
534
- size: n,
535
- rounded: y,
533
+ weight: y,
534
+ size: i,
535
+ rounded: h,
536
536
  iconPosition: a,
537
- className: g
537
+ className: m
538
538
  })
539
539
  ),
540
- disabled: j || i,
540
+ disabled: j || s,
541
541
  ...S,
542
542
  children: f ? R() : q
543
543
  }
544
544
  );
545
- return m && (j || i) ? /* @__PURE__ */ t.jsx(N, { children: /* @__PURE__ */ t.jsxs(I, { children: [
546
- /* @__PURE__ */ t.jsx(C, { asChild: a === "only", children: a === "only" ? /* @__PURE__ */ t.jsx("div", { className: "inline-block", "aria-disabled": "true", children: d }) : d }),
545
+ return d && (j || s) ? /* @__PURE__ */ t.jsx(w, { children: /* @__PURE__ */ t.jsxs(I, { children: [
546
+ /* @__PURE__ */ t.jsx(C, { asChild: a === "only", children: a === "only" ? /* @__PURE__ */ t.jsx("div", { className: "inline-block", "aria-disabled": "true", children: g }) : g }),
547
547
  /* @__PURE__ */ t.jsx(
548
548
  V,
549
549
  {
550
550
  side: P,
551
551
  className: "text-muted-foreground",
552
- children: m
552
+ children: d
553
553
  }
554
554
  )
555
- ] }) }) : m ? /* @__PURE__ */ t.jsx(N, { children: /* @__PURE__ */ t.jsxs(I, { children: [
556
- /* @__PURE__ */ t.jsx(C, { asChild: a === "only", children: d }),
555
+ ] }) }) : d ? /* @__PURE__ */ t.jsx(w, { children: /* @__PURE__ */ t.jsxs(I, { children: [
556
+ /* @__PURE__ */ t.jsx(C, { asChild: a === "only", children: g }),
557
557
  /* @__PURE__ */ t.jsx(
558
558
  V,
559
559
  {
560
560
  side: P,
561
561
  className: "text-muted-foreground",
562
- children: m
562
+ children: d
563
563
  }
564
564
  )
565
- ] }) }) : d;
565
+ ] }) }) : g;
566
566
  }
567
567
  );
568
568
  G.displayName = "Button";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../jsx-runtime-BuHQgaKs.cjs"),u=require("@radix-ui/react-alert-dialog"),i=require("../button-CPzha0kl.cjs"),r=require("../index-DoxiiusW.cjs");function d(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const l in t)if(l!=="default"){const n=Object.getOwnPropertyDescriptor(t,l);Object.defineProperty(e,l,n.get?n:{enumerable:!0,get:()=>t[l]})}}return e.default=t,Object.freeze(e)}const o=d(u);function g({...t}){return a.jsxRuntimeExports.jsx(o.Root,{"data-slot":"alert-dialog",...t})}function x({...t}){return a.jsxRuntimeExports.jsx(o.Trigger,{"data-slot":"alert-dialog-trigger",...t})}function s({...t}){return a.jsxRuntimeExports.jsx(o.Portal,{"data-slot":"alert-dialog-portal",...t})}function c({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Overlay,{"data-slot":"alert-dialog-overlay",className:r.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e})}function m({className:t,...e}){return a.jsxRuntimeExports.jsxs(s,{children:[a.jsxRuntimeExports.jsx(c,{}),a.jsxRuntimeExports.jsx(o.Content,{"data-slot":"alert-dialog-content",className:r.cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...e})]})}function f({className:t,...e}){return a.jsxRuntimeExports.jsx("div",{"data-slot":"alert-dialog-header",className:r.cn("flex flex-col gap-2 text-center sm:text-left",t),...e})}function p({className:t,...e}){return a.jsxRuntimeExports.jsx("div",{"data-slot":"alert-dialog-footer",className:r.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}function j({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Title,{"data-slot":"alert-dialog-title",className:r.cn("text-lg font-semibold",t),...e})}function D({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Description,{"data-slot":"alert-dialog-description",className:r.cn("text-muted-foreground text-sm",t),...e})}function A({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Action,{className:r.cn(i.buttonStyles(),t),...e})}function b({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Cancel,{className:r.cn(i.buttonStyles({variant:"outline"}),t),...e})}exports.AlertDialog=g;exports.AlertDialogAction=A;exports.AlertDialogCancel=b;exports.AlertDialogContent=m;exports.AlertDialogDescription=D;exports.AlertDialogFooter=p;exports.AlertDialogHeader=f;exports.AlertDialogOverlay=c;exports.AlertDialogPortal=s;exports.AlertDialogTitle=j;exports.AlertDialogTrigger=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../jsx-runtime-BuHQgaKs.cjs"),u=require("@radix-ui/react-alert-dialog"),i=require("../button-BnSM-lrr.cjs"),r=require("../index-DoxiiusW.cjs");function d(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const l in t)if(l!=="default"){const n=Object.getOwnPropertyDescriptor(t,l);Object.defineProperty(e,l,n.get?n:{enumerable:!0,get:()=>t[l]})}}return e.default=t,Object.freeze(e)}const o=d(u);function g({...t}){return a.jsxRuntimeExports.jsx(o.Root,{"data-slot":"alert-dialog",...t})}function x({...t}){return a.jsxRuntimeExports.jsx(o.Trigger,{"data-slot":"alert-dialog-trigger",...t})}function s({...t}){return a.jsxRuntimeExports.jsx(o.Portal,{"data-slot":"alert-dialog-portal",...t})}function c({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Overlay,{"data-slot":"alert-dialog-overlay",className:r.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e})}function m({className:t,...e}){return a.jsxRuntimeExports.jsxs(s,{children:[a.jsxRuntimeExports.jsx(c,{}),a.jsxRuntimeExports.jsx(o.Content,{"data-slot":"alert-dialog-content",className:r.cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...e})]})}function f({className:t,...e}){return a.jsxRuntimeExports.jsx("div",{"data-slot":"alert-dialog-header",className:r.cn("flex flex-col gap-2 text-center sm:text-left",t),...e})}function p({className:t,...e}){return a.jsxRuntimeExports.jsx("div",{"data-slot":"alert-dialog-footer",className:r.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}function j({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Title,{"data-slot":"alert-dialog-title",className:r.cn("text-lg font-semibold",t),...e})}function D({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Description,{"data-slot":"alert-dialog-description",className:r.cn("text-muted-foreground text-sm",t),...e})}function A({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Action,{className:r.cn(i.buttonStyles(),t),...e})}function b({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Cancel,{className:r.cn(i.buttonStyles({variant:"outline"}),t),...e})}exports.AlertDialog=g;exports.AlertDialogAction=A;exports.AlertDialogCancel=b;exports.AlertDialogContent=m;exports.AlertDialogDescription=D;exports.AlertDialogFooter=p;exports.AlertDialogHeader=f;exports.AlertDialogOverlay=c;exports.AlertDialogPortal=s;exports.AlertDialogTitle=j;exports.AlertDialogTrigger=x;
@@ -1,6 +1,6 @@
1
1
  import { j as e } from "../jsx-runtime-DywqP_6a.js";
2
2
  import * as o from "@radix-ui/react-alert-dialog";
3
- import { c as r } from "../button--Pnb6F6v.js";
3
+ import { c as r } from "../button-C5IBh3Tr.js";
4
4
  import { c as l } from "../index-CRiPKpXj.js";
5
5
  function g({
6
6
  ...t
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-BuHQgaKs.cjs"),I=require("../../badge-DknEN5GE.cjs"),i=require("../../card-D0D_gMHR.cjs"),j=require("../../icon-component-D5YssRbR.cjs"),u=require("../../tooltip-VxOmcZ36.cjs"),n=require("../../index-DoxiiusW.cjs"),q=require("../../index-C8P6Mn4U.cjs"),w=require("react"),y=q.cva("focus-visible:border-ring focus-visible:ring-ring/50 transition-[color,box-shadow] focus-visible:ring-[3px]"),g=w.forwardRef(({className:h,isActive:s,title:m,text:d,helperText:p,badgeText:l,disabled:r,badgeVariant:f,badgeSize:R="xs",iconName:o,iconText:a,tooltipIconName:b="IconHelpCircleFilled",tooltipText:t,tooltipTitle:x,tooltipSide:C,tooltipSideOffset:E,tooltipAlign:N,...c},v)=>e.jsxRuntimeExports.jsxs(i.Card,{ref:v,className:n.cn(y({className:h}),{"bg-blue-050 border-blue-950":s,"border-neutral-100 bg-neutral-100":r,"cursor-pointer lg:active:bg-blue-100":c.onClick&&s&&!r,"lg:active:bg-blue-050 cursor-pointer":c.onClick&&!s&&!r}),role:"button",tabIndex:0,...c,children:[l||o||a?e.jsxRuntimeExports.jsxs(i.CardHeader,{className:"flex items-center justify-between gap-2",children:[o||a?e.jsxRuntimeExports.jsx("div",{className:n.cn("rounded-full p-1",{"bg-neutral-000 text-muted-foreground":!s,"bg-white text-blue-800":s,"bg-white text-neutral-700":r}),children:e.jsxRuntimeExports.jsx(j.IconComponent,{iconName:o,iconText:a,size:20})}):null,(l||t)&&e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[l?e.jsxRuntimeExports.jsx(I.Badge,{variant:f,size:R,weight:"semibold",className:n.cn({"opacity-50":r}),children:l}):null,t&&e.jsxRuntimeExports.jsxs(u.Tooltip,{children:[e.jsxRuntimeExports.jsx(u.TooltipTrigger,{children:e.jsxRuntimeExports.jsx(j.IconComponent,{iconName:b??"IconHelpCircleFilled",size:20,className:"z-10 min-h-5 min-w-5"})}),e.jsxRuntimeExports.jsx(u.TooltipContent,{side:C,sideOffset:E,align:N,children:x||t&&e.jsxRuntimeExports.jsxs("div",{className:"text-neutral-1000 flex flex-col gap-1",children:[x&&e.jsxRuntimeExports.jsx("p",{className:"text-paragraph-md font-semibold",children:x}),t&&e.jsxRuntimeExports.jsx("p",{className:"text-paragraph-md",children:t})]})})]})]})]}):null,e.jsxRuntimeExports.jsxs(i.CardContent,{className:"flex flex-col gap-1",children:[m?e.jsxRuntimeExports.jsx("p",{className:n.cn("text-foreground text-label-xl font-semibold",{"text-neutral-700":r}),children:m}):null,d?e.jsxRuntimeExports.jsx("p",{className:n.cn("text-muted-foreground text-paragraph-md",{"text-neutral-700":r}),children:d}):null]}),p?e.jsxRuntimeExports.jsx(i.CardFooter,{children:e.jsxRuntimeExports.jsx("p",{className:n.cn("text-paragraph-sm text-neutral-800",{"text-neutral-700":r}),children:p})}):null]}));g.displayName="InteractiveCard";const z=g;exports.InteractiveCard=z;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-BuHQgaKs.cjs"),I=require("../../badge-DknEN5GE.cjs"),i=require("../../card-D0D_gMHR.cjs"),j=require("../../icon-component-D5YssRbR.cjs"),u=require("../../tooltip-BRSR0-4n.cjs"),n=require("../../index-DoxiiusW.cjs"),q=require("../../index-C8P6Mn4U.cjs"),w=require("react"),y=q.cva("focus-visible:border-ring focus-visible:ring-ring/50 transition-[color,box-shadow] focus-visible:ring-[3px]"),g=w.forwardRef(({className:h,isActive:s,title:m,text:d,helperText:p,badgeText:l,disabled:r,badgeVariant:f,badgeSize:R="xs",iconName:o,iconText:a,tooltipIconName:b="IconHelpCircleFilled",tooltipText:t,tooltipTitle:x,tooltipSide:C,tooltipSideOffset:E,tooltipAlign:N,...c},v)=>e.jsxRuntimeExports.jsxs(i.Card,{ref:v,className:n.cn(y({className:h}),{"bg-blue-050 border-blue-950":s,"border-neutral-100 bg-neutral-100":r,"cursor-pointer lg:active:bg-blue-100":c.onClick&&s&&!r,"lg:active:bg-blue-050 cursor-pointer":c.onClick&&!s&&!r}),role:"button",tabIndex:0,...c,children:[l||o||a?e.jsxRuntimeExports.jsxs(i.CardHeader,{className:"flex items-center justify-between gap-2",children:[o||a?e.jsxRuntimeExports.jsx("div",{className:n.cn("rounded-full p-1",{"bg-neutral-000 text-muted-foreground":!s,"bg-white text-blue-800":s,"bg-white text-neutral-700":r}),children:e.jsxRuntimeExports.jsx(j.IconComponent,{iconName:o,iconText:a,size:20})}):null,(l||t)&&e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[l?e.jsxRuntimeExports.jsx(I.Badge,{variant:f,size:R,weight:"semibold",className:n.cn({"opacity-50":r}),children:l}):null,t&&e.jsxRuntimeExports.jsxs(u.Tooltip,{children:[e.jsxRuntimeExports.jsx(u.TooltipTrigger,{children:e.jsxRuntimeExports.jsx(j.IconComponent,{iconName:b??"IconHelpCircleFilled",size:20,className:"z-10 min-h-5 min-w-5"})}),e.jsxRuntimeExports.jsx(u.TooltipContent,{side:C,sideOffset:E,align:N,children:x||t&&e.jsxRuntimeExports.jsxs("div",{className:"text-neutral-1000 flex flex-col gap-1",children:[x&&e.jsxRuntimeExports.jsx("p",{className:"text-paragraph-md font-semibold",children:x}),t&&e.jsxRuntimeExports.jsx("p",{className:"text-paragraph-md",children:t})]})})]})]})]}):null,e.jsxRuntimeExports.jsxs(i.CardContent,{className:"flex flex-col gap-1",children:[m?e.jsxRuntimeExports.jsx("p",{className:n.cn("text-foreground text-label-xl font-semibold",{"text-neutral-700":r}),children:m}):null,d?e.jsxRuntimeExports.jsx("p",{className:n.cn("text-muted-foreground text-paragraph-md",{"text-neutral-700":r}),children:d}):null]}),p?e.jsxRuntimeExports.jsx(i.CardFooter,{children:e.jsxRuntimeExports.jsx("p",{className:n.cn("text-paragraph-sm text-neutral-800",{"text-neutral-700":r}),children:p})}):null]}));g.displayName="InteractiveCard";const z=g;exports.InteractiveCard=z;
@@ -2,7 +2,7 @@ import { j as e } from "../../jsx-runtime-DywqP_6a.js";
2
2
  import { B as I } from "../../badge-CJxUpkWv.js";
3
3
  import { C as w, e as y, b as z, d as F } from "../../card-9-UcGdV0.js";
4
4
  import { I as x } from "../../icon-component-CxQsODCa.js";
5
- import { T as H, c as k, a as B } from "../../tooltip-BnIdKYZi.js";
5
+ import { T as H, c as k, a as B } from "../../tooltip-Bxh10S4Q.js";
6
6
  import { c as a } from "../../index-CRiPKpXj.js";
7
7
  import { c as R } from "../../index-BqtVL8d-.js";
8
8
  import { forwardRef as E } from "react";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../button-CPzha0kl.cjs");exports.Button=t.Button;exports.buttonActiveStyles=t.buttonActiveStyles;exports.buttonLoadingStyles=t.buttonLoadingStyles;exports.buttonStyles=t.buttonStyles;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../button-BnSM-lrr.cjs");exports.Button=t.Button;exports.buttonActiveStyles=t.buttonActiveStyles;exports.buttonLoadingStyles=t.buttonLoadingStyles;exports.buttonStyles=t.buttonStyles;
@@ -1,4 +1,4 @@
1
- import { B as s, b as a, a as e, c as n } from "../button--Pnb6F6v.js";
1
+ import { B as s, b as a, a as e, c as n } from "../button-C5IBh3Tr.js";
2
2
  export {
3
3
  s as Button,
4
4
  a as buttonActiveStyles,
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../jsx-runtime-BuHQgaKs.cjs"),x=require("@radix-ui/react-slot"),f=require("react"),c=require("react-hook-form"),F=require("../label-U5GnYvFO.cjs"),d=require("../index-DoxiiusW.cjs");function j(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const i=j(f),p=c.FormProvider,l=i.createContext({}),g=({...e})=>n.jsxRuntimeExports.jsx(l.Provider,{value:{name:e.name},children:n.jsxRuntimeExports.jsx(c.Controller,{...e})}),m=()=>{const e=i.useContext(l),t=i.useContext(u),{getFieldState:r}=c.useFormContext(),o=c.useFormState({name:e.name}),s=r(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...s}},u=i.createContext({});function b({className:e,...t}){const r=i.useId();return n.jsxRuntimeExports.jsx(u.Provider,{value:{id:r},children:n.jsxRuntimeExports.jsx("div",{"data-slot":"form-item",className:d.cn("grid gap-2",e),...t})})}function I({className:e,...t}){const{error:r,formItemId:o}=m();return n.jsxRuntimeExports.jsx(F.Label,{"data-slot":"form-label","data-error":!!r,className:d.cn("data-[error=true]:text-destructive",e),htmlFor:o,...t})}function C({...e}){const{error:t,formItemId:r,formDescriptionId:o,formMessageId:s}=m();return n.jsxRuntimeExports.jsx(x.Slot,{"data-slot":"form-control",id:r,"aria-describedby":t?`${o} ${s}`:`${o}`,"aria-invalid":!!t,...e})}function v({className:e,...t}){const{formDescriptionId:r}=m();return n.jsxRuntimeExports.jsx("p",{"data-slot":"form-description",id:r,className:d.cn("text-muted-foreground! text-label-md",e),...t})}function R({className:e,...t}){const{error:r,formMessageId:o}=m(),s=r?String(r?.message??""):t.children;return s?n.jsxRuntimeExports.jsx("p",{"data-slot":"form-message",id:o,className:d.cn("text-destructive! text-label-md",e),...t,children:s}):null}exports.Form=p;exports.FormControl=C;exports.FormDescription=v;exports.FormField=g;exports.FormItem=b;exports.FormLabel=I;exports.FormMessage=R;exports.useFormField=m;
@@ -0,0 +1,24 @@
1
+ import * as LabelPrimitive from '@radix-ui/react-label';
2
+ import { Slot } from '@radix-ui/react-slot';
3
+ import * as React from 'react';
4
+ import { type ControllerProps, type FieldPath, type FieldValues } from 'react-hook-form';
5
+ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
6
+ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
7
+ declare const useFormField: () => {
8
+ invalid: boolean;
9
+ isDirty: boolean;
10
+ isTouched: boolean;
11
+ isValidating: boolean;
12
+ error?: import("react-hook-form").FieldError;
13
+ id: string;
14
+ name: string;
15
+ formItemId: string;
16
+ formDescriptionId: string;
17
+ formMessageId: string;
18
+ };
19
+ declare function FormItem({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
20
+ declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
21
+ declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): import("react/jsx-runtime").JSX.Element;
22
+ declare function FormDescription({ className, ...props }: React.ComponentProps<'p'>): import("react/jsx-runtime").JSX.Element;
23
+ declare function FormMessage({ className, ...props }: React.ComponentProps<'p'>): import("react/jsx-runtime").JSX.Element | null;
24
+ export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField, };
@@ -0,0 +1,101 @@
1
+ import { j as m } from "../jsx-runtime-DywqP_6a.js";
2
+ import { Slot as f } from "@radix-ui/react-slot";
3
+ import * as n from "react";
4
+ import { FormProvider as u, Controller as x, useFormContext as F, useFormState as I } from "react-hook-form";
5
+ import { L as p } from "../label-_kG7WBoJ.js";
6
+ import { c as a } from "../index-CRiPKpXj.js";
7
+ const h = u, c = n.createContext(
8
+ {}
9
+ ), S = ({
10
+ ...e
11
+ }) => /* @__PURE__ */ m.jsx(c.Provider, { value: { name: e.name }, children: /* @__PURE__ */ m.jsx(x, { ...e }) }), d = () => {
12
+ const e = n.useContext(c), t = n.useContext(l), { getFieldState: r } = F(), o = I({ name: e.name }), s = r(e.name, o);
13
+ if (!e)
14
+ throw new Error("useFormField should be used within <FormField>");
15
+ const { id: i } = t;
16
+ return {
17
+ id: i,
18
+ name: e.name,
19
+ formItemId: `${i}-form-item`,
20
+ formDescriptionId: `${i}-form-item-description`,
21
+ formMessageId: `${i}-form-item-message`,
22
+ ...s
23
+ };
24
+ }, l = n.createContext(
25
+ {}
26
+ );
27
+ function $({ className: e, ...t }) {
28
+ const r = n.useId();
29
+ return /* @__PURE__ */ m.jsx(l.Provider, { value: { id: r }, children: /* @__PURE__ */ m.jsx(
30
+ "div",
31
+ {
32
+ "data-slot": "form-item",
33
+ className: a("grid gap-2", e),
34
+ ...t
35
+ }
36
+ ) });
37
+ }
38
+ function D({
39
+ className: e,
40
+ ...t
41
+ }) {
42
+ const { error: r, formItemId: o } = d();
43
+ return /* @__PURE__ */ m.jsx(
44
+ p,
45
+ {
46
+ "data-slot": "form-label",
47
+ "data-error": !!r,
48
+ className: a("data-[error=true]:text-destructive", e),
49
+ htmlFor: o,
50
+ ...t
51
+ }
52
+ );
53
+ }
54
+ function M({ ...e }) {
55
+ const { error: t, formItemId: r, formDescriptionId: o, formMessageId: s } = d();
56
+ return /* @__PURE__ */ m.jsx(
57
+ f,
58
+ {
59
+ "data-slot": "form-control",
60
+ id: r,
61
+ "aria-describedby": t ? `${o} ${s}` : `${o}`,
62
+ "aria-invalid": !!t,
63
+ ...e
64
+ }
65
+ );
66
+ }
67
+ function N({ className: e, ...t }) {
68
+ const { formDescriptionId: r } = d();
69
+ return /* @__PURE__ */ m.jsx(
70
+ "p",
71
+ {
72
+ "data-slot": "form-description",
73
+ id: r,
74
+ className: a("text-muted-foreground! text-label-md", e),
75
+ ...t
76
+ }
77
+ );
78
+ }
79
+ function w({ className: e, ...t }) {
80
+ const { error: r, formMessageId: o } = d(), s = r ? String(r?.message ?? "") : t.children;
81
+ return s ? /* @__PURE__ */ m.jsx(
82
+ "p",
83
+ {
84
+ "data-slot": "form-message",
85
+ id: o,
86
+ className: a("text-destructive! text-label-md", e),
87
+ ...t,
88
+ children: s
89
+ }
90
+ ) : null;
91
+ }
92
+ export {
93
+ h as Form,
94
+ M as FormControl,
95
+ N as FormDescription,
96
+ S as FormField,
97
+ $ as FormItem,
98
+ D as FormLabel,
99
+ w as FormMessage,
100
+ d as useFormField
101
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../input-eri6Lyeo.cjs");exports.Input=t.Input;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../input-wSGCWBH-.cjs");exports.Input=t.Input;