@radui/ui 0.1.9 → 0.2.2

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.
Files changed (138) hide show
  1. package/dist/components/Accordion.d.ts +67 -34
  2. package/dist/components/Accordion.js +1 -1
  3. package/dist/components/AlertDialog.d.ts +13 -14
  4. package/dist/components/AlertDialog.js +1 -1
  5. package/dist/components/AspectRatio.js +1 -1
  6. package/dist/components/Avatar.d.ts +4 -3
  7. package/dist/components/Avatar.js +1 -1
  8. package/dist/components/AvatarGroup.d.ts +1 -0
  9. package/dist/components/AvatarGroup.js +1 -1
  10. package/dist/components/AvatarPrimitiveFallback-KiY3slgV.js +1 -0
  11. package/dist/components/Badge.d.ts +6 -4
  12. package/dist/components/Badge.js +1 -1
  13. package/dist/components/BlockQuote.js +1 -1
  14. package/dist/components/Button.js +1 -1
  15. package/dist/components/Callout.d.ts +19 -12
  16. package/dist/components/Callout.js +1 -1
  17. package/dist/components/Card.d.ts +30 -1
  18. package/dist/components/Card.js +1 -1
  19. package/dist/components/Checkbox.d.ts +22 -6
  20. package/dist/components/Checkbox.js +1 -1
  21. package/dist/components/CheckboxCards.d.ts +25 -7
  22. package/dist/components/CheckboxCards.js +1 -1
  23. package/dist/components/CheckboxGroup.d.ts +22 -7
  24. package/dist/components/CheckboxGroup.js +1 -1
  25. package/dist/components/CheckboxGroupPrimitive-DIOswrR1.js +1 -0
  26. package/dist/components/Code.js +1 -1
  27. package/dist/components/Collapsible.d.ts +12 -9
  28. package/dist/components/Collapsible.js +1 -1
  29. package/dist/components/Combobox.d.ts +98 -0
  30. package/dist/components/Combobox.js +1 -0
  31. package/dist/components/ComboboxPrimitive-Bn1C5dkn.js +1 -0
  32. package/dist/components/ContextMenu.d.ts +31 -1
  33. package/dist/components/ContextMenu.js +1 -1
  34. package/dist/components/DataList.d.ts +12 -5
  35. package/dist/components/DataList.js +1 -1
  36. package/dist/components/Dialog.d.ts +37 -18
  37. package/dist/components/Dialog.js +1 -1
  38. package/dist/components/Disclosure.d.ts +6 -1
  39. package/dist/components/Disclosure.js +1 -1
  40. package/dist/components/DropdownMenu.d.ts +31 -1
  41. package/dist/components/DropdownMenu.js +1 -1
  42. package/dist/components/Em.js +1 -1
  43. package/dist/components/Heading.js +1 -1
  44. package/dist/components/HoverCard.d.ts +12 -1
  45. package/dist/components/HoverCard.js +1 -1
  46. package/dist/components/Kbd.d.ts +1 -1
  47. package/dist/components/Kbd.js +1 -1
  48. package/dist/components/Link.d.ts +3 -1
  49. package/dist/components/Link.js +1 -1
  50. package/dist/components/MenuPrimitive-6Qr46BSn.js +1 -0
  51. package/dist/components/Menubar.d.ts +81 -37
  52. package/dist/components/Menubar.js +1 -1
  53. package/dist/components/Minimap.d.ts +11 -8
  54. package/dist/components/Minimap.js +1 -1
  55. package/dist/components/NavigationMenu.d.ts +13 -12
  56. package/dist/components/NavigationMenu.js +1 -1
  57. package/dist/components/NumberField.d.ts +28 -6
  58. package/dist/components/NumberField.js +1 -1
  59. package/dist/components/Progress.d.ts +1 -1
  60. package/dist/components/Progress.js +1 -1
  61. package/dist/components/Quote.js +1 -1
  62. package/dist/components/Radio.js +1 -1
  63. package/dist/components/RadioCards.d.ts +7 -2
  64. package/dist/components/RadioCards.js +1 -1
  65. package/dist/components/RadioGroup.d.ts +1 -1
  66. package/dist/components/RadioGroup.js +1 -1
  67. package/dist/components/RadioGroupPrimitive-QSMno27i.js +1 -0
  68. package/dist/components/ScrollArea.d.ts +18 -2
  69. package/dist/components/ScrollArea.js +1 -1
  70. package/dist/components/Select.d.ts +20 -15
  71. package/dist/components/Select.js +1 -1
  72. package/dist/components/Separator.js +1 -1
  73. package/dist/components/Skeleton.js +1 -1
  74. package/dist/components/Slider.d.ts +57 -11
  75. package/dist/components/Slider.js +1 -1
  76. package/dist/components/Spinner.d.ts +13 -0
  77. package/dist/components/Spinner.js +1 -0
  78. package/dist/components/Splitter.d.ts +1 -1
  79. package/dist/components/Splitter.js +1 -1
  80. package/dist/components/Steps.d.ts +21 -9
  81. package/dist/components/Steps.js +1 -1
  82. package/dist/components/Strong.js +1 -1
  83. package/dist/components/Switch.d.ts +8 -7
  84. package/dist/components/Switch.js +1 -1
  85. package/dist/components/TabNav.d.ts +23 -5
  86. package/dist/components/TabNav.js +1 -1
  87. package/dist/components/Table.d.ts +9 -1
  88. package/dist/components/Table.js +1 -1
  89. package/dist/components/Tabs.d.ts +25 -1
  90. package/dist/components/Tabs.js +1 -1
  91. package/dist/components/Text.js +1 -1
  92. package/dist/components/TextArea.d.ts +15 -2
  93. package/dist/components/TextArea.js +1 -1
  94. package/dist/components/Theme.js +1 -1
  95. package/dist/components/ThemeContext-Sm-iNANd.js +1 -0
  96. package/dist/components/Toggle.js +1 -1
  97. package/dist/components/ToggleGroup.d.ts +33 -0
  98. package/dist/components/ToggleGroup.js +1 -1
  99. package/dist/components/Toolbar.d.ts +83 -0
  100. package/dist/components/Toolbar.js +1 -0
  101. package/dist/components/Tooltip.d.ts +6 -0
  102. package/dist/components/Tooltip.js +1 -1
  103. package/dist/components/Tree.d.ts +10 -1
  104. package/dist/components/Tree.js +1 -1
  105. package/dist/components/VisuallyHidden.d.ts +1 -1
  106. package/dist/components/VisuallyHidden.js +1 -1
  107. package/dist/components/check-DujVUWP-.js +44 -0
  108. package/dist/components/floating-ui.react-DMgxgTKq.js +5 -0
  109. package/dist/components/index-3dZuI04X.js +1 -0
  110. package/dist/components/index-6If6D2Zi.js +1 -0
  111. package/dist/components/index-98jQ1vTr.js +1 -0
  112. package/dist/components/index-BOy86lYu.js +1 -0
  113. package/dist/components/index-BZVbVgqN.js +1 -0
  114. package/dist/components/index-CTJl2pTM.js +1 -0
  115. package/dist/components/index-CXzybYmm.js +1 -0
  116. package/dist/components/index-DTYJVF-V.js +1 -0
  117. package/dist/components/index-hAp0hL9w.js +1 -0
  118. package/dist/components/index-wRElCyvx.js +1 -0
  119. package/dist/components/index-yqRHPukT.js +1 -0
  120. package/dist/themes/default.css +1 -1
  121. package/package.json +51 -32
  122. package/dist/components/AvatarPrimitiveFallback-SECStDbi.js +0 -1
  123. package/dist/components/CheckboxGroupPrimitive-CEeFUCQV.js +0 -1
  124. package/dist/components/MenuPrimitive-CBMvjJyH.js +0 -1
  125. package/dist/components/RadioGroupPrimitive-CbRZK8wB.js +0 -1
  126. package/dist/components/floating-ui.react-CLbXmKZY.js +0 -5
  127. package/dist/components/index-BVxS3Ixi.js +0 -1
  128. package/dist/components/index-BgvB1-RV.js +0 -1
  129. package/dist/components/index-Br4Ygpsh.js +0 -1
  130. package/dist/components/index-BuGKU1-S.js +0 -1
  131. package/dist/components/index-BxNZdFaZ.js +0 -1
  132. package/dist/components/index-CD1lNchI.js +0 -1
  133. package/dist/components/index-DBZNt4Em.js +0 -1
  134. package/dist/components/index-DR_GC01Z.js +0 -1
  135. package/dist/components/index-Di6TooPD.js +0 -1
  136. package/dist/components/index-DzAecJCk.js +0 -1
  137. package/dist/components/index-fkj4Fdgt.js +0 -1
  138. package/dist/components/tslib.es6-B3RR16LH.js +0 -1
@@ -5,63 +5,96 @@ type AccordionRootProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'defaultVa
5
5
  transitionDuration?: number;
6
6
  transitionTimingFunction?: string;
7
7
  orientation?: 'horizontal' | 'vertical';
8
+ /** When true, every item is non-interactive (Radix Accordion.Root `disabled`). */
9
+ disabled?: boolean;
8
10
  asChild?: boolean;
9
11
  loop?: boolean;
10
12
  disableTabIndexing?: boolean;
13
+ /** @deprecated Prefer `type="multiple"`. */
11
14
  openMultiple?: boolean;
15
+ /** Radix-aligned mode: single allows one open section; multiple allows several. */
16
+ type?: 'single' | 'multiple';
17
+ /**
18
+ * When `type` is single (default), whether the open item can be closed by activating its trigger again.
19
+ * Matches Radix: defaults to false (trigger does not collapse the only open item).
20
+ */
21
+ collapsible?: boolean;
12
22
  value?: (number | string)[];
13
23
  defaultValue?: (number | string)[];
14
24
  onValueChange?: (value: (number | string)[]) => void;
15
25
  };
26
+ declare const AccordionRoot: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue"> & {
27
+ customRootClass?: string;
28
+ transitionDuration?: number;
29
+ transitionTimingFunction?: string;
30
+ orientation?: "horizontal" | "vertical";
31
+ /** When true, every item is non-interactive (Radix Accordion.Root `disabled`). */
32
+ disabled?: boolean;
33
+ asChild?: boolean;
34
+ loop?: boolean;
35
+ disableTabIndexing?: boolean;
36
+ /** @deprecated Prefer `type="multiple"`. */
37
+ openMultiple?: boolean;
38
+ /** Radix-aligned mode: single allows one open section; multiple allows several. */
39
+ type?: "single" | "multiple";
40
+ /**
41
+ * When `type` is single (default), whether the open item can be closed by activating its trigger again.
42
+ * Matches Radix: defaults to false (trigger does not collapse the only open item).
43
+ */
44
+ collapsible?: boolean;
45
+ value?: (number | string)[];
46
+ defaultValue?: (number | string)[];
47
+ onValueChange?: (value: (number | string)[]) => void;
48
+ } & React.RefAttributes<HTMLDivElement>>;
16
49
 
17
50
  type AccordionItemProps = React.ComponentPropsWithoutRef<'div'> & {
18
51
  value?: number | string;
19
52
  disabled?: boolean;
20
53
  asChild?: boolean;
21
54
  };
55
+ declare const AccordionItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
56
+ value?: number | string;
57
+ disabled?: boolean;
58
+ asChild?: boolean;
59
+ } & React.RefAttributes<HTMLDivElement>>;
22
60
 
23
- type AccordionHeaderProps = React.ComponentPropsWithoutRef<'div'>;
61
+ type AccordionHeaderProps = React.ComponentPropsWithoutRef<'h3'> & {
62
+ asChild?: boolean;
63
+ };
64
+ declare const AccordionHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
65
+ asChild?: boolean;
66
+ } & React.RefAttributes<HTMLHeadingElement>>;
24
67
 
25
68
  type AccordionTriggerProps = React.ComponentPropsWithoutRef<'button'> & {
26
- index?: number;
69
+ asChild?: boolean;
27
70
  };
71
+ declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
72
+ asChild?: boolean;
73
+ } & React.RefAttributes<HTMLButtonElement>>;
28
74
 
29
75
  type AccordionContentProps = React.ComponentPropsWithoutRef<'div'> & {
30
- index: number;
76
+ /** @deprecated Index is no longer required; ids come from collapsible context. */
77
+ index?: number;
78
+ forceMount?: boolean;
79
+ asChild?: boolean;
31
80
  };
81
+ declare const AccordionContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
82
+ /** @deprecated Index is no longer required; ids come from collapsible context. */
83
+ index?: number;
84
+ forceMount?: boolean;
85
+ asChild?: boolean;
86
+ } & React.RefAttributes<HTMLDivElement>>;
32
87
 
33
- type AccordionProps = React.HTMLAttributes<HTMLDivElement> & {
34
- children?: React.ReactNode;
88
+ type AccordionProps = React.ComponentPropsWithoutRef<typeof AccordionRoot>;
89
+ type AccordionCompound = typeof AccordionRoot & {
90
+ Root: typeof AccordionRoot;
91
+ Item: typeof AccordionItem;
92
+ Header: typeof AccordionHeader;
93
+ Trigger: typeof AccordionTrigger;
94
+ Content: typeof AccordionContent;
35
95
  };
36
96
 
37
- declare const Accordion: {
38
- (): null;
39
- Root: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue"> & {
40
- customRootClass?: string;
41
- transitionDuration?: number;
42
- transitionTimingFunction?: string;
43
- orientation?: "horizontal" | "vertical";
44
- asChild?: boolean;
45
- loop?: boolean;
46
- disableTabIndexing?: boolean;
47
- openMultiple?: boolean;
48
- value?: (number | string)[];
49
- defaultValue?: (number | string)[];
50
- onValueChange?: (value: (number | string)[]) => void;
51
- } & React.RefAttributes<HTMLDivElement>>;
52
- Item: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
53
- value?: number | string;
54
- disabled?: boolean;
55
- asChild?: boolean;
56
- } & React.RefAttributes<HTMLDivElement>>;
57
- Header: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
58
- Trigger: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
59
- index?: number;
60
- } & React.RefAttributes<HTMLButtonElement>>;
61
- Content: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
62
- index: number;
63
- } & React.RefAttributes<HTMLDivElement>>;
64
- };
97
+ declare const Accordion: AccordionCompound;
65
98
 
66
99
  export { Accordion as default };
67
- export type { AccordionContentProps, AccordionHeaderProps, AccordionItemProps, AccordionProps, AccordionRootProps, AccordionTriggerProps };
100
+ export type { AccordionCompound, AccordionContentProps, AccordionHeaderProps, AccordionItemProps, AccordionProps, AccordionRootProps, AccordionTriggerProps };
@@ -1 +1 @@
1
- 'use client';import{_ as e,a as n,b as t}from"./tslib.es6-B3RR16LH.js";import i,{createContext as o,useRef as r,useState as a,useEffect as c,useContext as l,useId as s}from"react";import{c as u}from"./clsx-BaVHROc5.js";import{c as d}from"./index-BVxS3Ixi.js";import{u as m}from"./index-fkj4Fdgt.js";import{R as f}from"./index-Br4Ygpsh.js";import{P as v}from"./index-DR_GC01Z.js";import{C as p}from"./index-BgvB1-RV.js";import{B as h}from"./index-BxNZdFaZ.js";var g=o({rootClass:"",activeItems:[],setActiveItems:function(){},accordionRef:void 0,transitionDuration:0,transitionTimingFunction:"ease-out",openMultiple:!1}),C="Accordion",N=i.forwardRef((function(o,l){var s=o.children,p=o.orientation,h=void 0===p?"vertical":p,N=o.disableTabIndexing,x=void 0===N||N,b=o.asChild,I=o.transitionDuration,A=void 0===I?0:I,T=o.transitionTimingFunction,R=void 0===T?"linear":T,E=o.customRootClass,F=o.loop,y=void 0===F||F,V=o.openMultiple,j=void 0!==V&&V,w=o.value,D=o.defaultValue,H=void 0===D?[]:D,M=o.onValueChange,q=e(o,["children","orientation","disableTabIndexing","asChild","transitionDuration","transitionTimingFunction","customRootClass","loop","openMultiple","value","defaultValue","onValueChange"]),P=r(null),k=d(E,C),B=a(null),G=B[0],O=B[1],_=r(),z=r([]),J=void 0!==w?j?w:w.length>0?[w[0]]:[]:void 0,K=j?H:H.length>0?[H[0]]:[],L=m(J,K,M),Q=L[0],S=L[1];return c((function(){if(0!==A&&P.current&&!j){var e=z.current,t=Q;if(e.length!==t.length||e.some((function(e){return!t.includes(e)}))||t.some((function(n){return!e.includes(n)}))){var i=P.current.offsetHeight;O(i),_.current&&clearTimeout(_.current),requestAnimationFrame((function(){requestAnimationFrame((function(){P.current&&(O(null),P.current.offsetHeight,requestAnimationFrame((function(){if(P.current){var e=P.current.offsetHeight;i!==e&&(O(i),requestAnimationFrame((function(){O(e)}))),_.current=setTimeout((function(){O(null)}),A)}})))}))}))}return z.current=n([],t,!0),function(){_.current&&clearTimeout(_.current)}}z.current=n([],Q,!0)}),[Q,A,j]),i.createElement(g.Provider,{value:{rootClass:k,activeItems:Q,setActiveItems:S,accordionRef:P,transitionDuration:A,transitionTimingFunction:R,openMultiple:j}},i.createElement(f.Root,{orientation:h,loop:y,disableTabIndexing:x},i.createElement(f.Group,null,i.createElement(v.div,t({className:u("".concat(k,"-root")),ref:function(e){var n=e;P.current=n,"function"==typeof l?l(n):l&&(l.current=n)},style:t(t({},null!==G&&A>0?{height:"".concat(G,"px"),overflow:"hidden",transition:"height ".concat(A,"ms ").concat(R)}:{}),q.style||{}),asChild:b},q),s))))}));N.displayName=C;var x=o({itemValue:0,setItemValue:function(){},disabled:!1}),b=i.forwardRef((function(n,o){var d=n.children,m=n.value,f=n.className,h=void 0===f?"":f,C=n.disabled,N=void 0!==C&&C;n.asChild;var b=e(n,["children","value","className","disabled","asChild"]),I=r(null),A=a(null!=m?m:0),T=A[0],R=A[1],E=l(g),F=E.rootClass,y=E.activeItems,V=E.transitionDuration,j=E.transitionTimingFunction,w=a(y.includes(T)),D=w[0],H=w[1];c((function(){H(y.includes(T))}),[y,T]);var M=s();return c((function(){void 0!==m&&m!==T&&R(m)}),[m]),i.createElement(x.Provider,{value:{itemValue:T,setItemValue:R,disabled:N}},i.createElement(p.Root,{open:D,onOpenChange:H,disabled:N,transitionDuration:V,transitionTimingFunction:j,asChild:!0},i.createElement(v.div,t({ref:function(e){var n=e;I.current=n,"function"==typeof o?o(n):o&&(o.current=n)},className:u("".concat(F,"-item"),h)},b,{id:"accordion-data-item-".concat(M),role:"region","data-state":D?"open":"closed"}),d)))}));b.displayName="AccordionItem";var I=i.forwardRef((function(n,o){var r=n.children,a=n.className,c=void 0===a?"":a,s=e(n,["children","className"]),d=l(g).rootClass;return i.createElement("div",t({ref:o,className:u("".concat(d,"-header"),c)},s),r)}));I.displayName="AccordionHeader";var A=i.forwardRef((function(o,r){var a=o.children,c=o.index,s=o.className,d=void 0===s?"":s,m=o.onClick,v=e(o,["children","index","className","onClick"]),C=l(g),N=C.setActiveItems,b=C.rootClass,I=C.activeItems,A=C.openMultiple,T=l(x),R=T.itemValue,E=T.disabled;return i.createElement(f.Item,null,i.createElement(p.Trigger,{disabled:E,asChild:!0},i.createElement(h,t({className:u("".concat(b,"-trigger"),d),ref:r,"aria-disabled":E,onClick:function(e){var t;t=I||[],A?t.includes(R)?N(t.filter((function(e){return e!==R}))):N(n(n([],t,!0),[R],!1)):t.includes(R)?N([]):N([R]),null==m||m(e)},"aria-expanded":I.includes(R),"aria-controls":void 0!==c?"content-".concat(c):void 0},v),a)))}));A.displayName="AccordionTrigger";var T=i.forwardRef((function(n,o){var r=n.children,a=n.index,c=n.className,s=void 0===c?"":c,d=e(n,["children","index","className"]),m=l(g).rootClass;return i.createElement(p.Content,t({ref:o,asChild:!0,className:u("".concat(m,"-content"),s),id:"content-".concat(a),role:"region"},d),r)}));T.displayName="AccordionContent";var R=function(){return console.warn("Direct usage of Accordion is not supported. Please use Accordion.Root, Accordion.Item, etc. instead. "),null};R.Root=N,R.Item=b,R.Header=I,R.Trigger=A,R.Content=T;export{R as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import i,{createContext as t,useRef as n,useId as a,useContext as o,useCallback as r,isValidElement as s,cloneElement as l}from"react";import{c as d}from"./clsx-BaVHROc5.js";import{c}from"./index-6If6D2Zi.js";import{u as m}from"./index-wRElCyvx.js";import{R as u}from"./index-hAp0hL9w.js";import{P as f,m as h,c as p}from"./index-98jQ1vTr.js";import{C}from"./index-DTYJVF-V.js";import{B as b}from"./index-BOy86lYu.js";const g=t({rootClass:"",activeItems:[],setActiveItems:()=>{},accordionRef:void 0,transitionDuration:0,transitionTimingFunction:"ease-out",openMultiple:!1,collapsible:!1,disabled:!1,orientation:"vertical"}),v="Accordion",I=i.forwardRef((({children:i,orientation:t="vertical",disableTabIndexing:a=!1,asChild:o,transitionDuration:r=0,transitionTimingFunction:s="linear",customRootClass:l,disabled:h=!1,loop:p=!0,openMultiple:C=!1,type:b,collapsible:I=!1,value:N,defaultValue:x=[],onValueChange:R,dir:T,...j},y)=>{const A=n(null),M=c(l,v),$="multiple"===b||"single"!==b&&C,w=!!$||I,D=void 0!==N?$?N:N.length>0?[N[0]]:[]:void 0,F=$?x:x.length>0?[x[0]]:[],[V,P]=m(D,F,R),H="rtl"===T?"rtl":"ltr";return e(g.Provider,{value:{rootClass:M,activeItems:V,setActiveItems:P,accordionRef:A,transitionDuration:r,transitionTimingFunction:s,openMultiple:$,collapsible:w,disabled:h,orientation:t},children:e(u.Root,{orientation:t,loop:p,disableTabIndexing:a,dir:H,children:e(u.Group,{children:e(f.div,{className:d(`${M}-root`),dir:T,"data-orientation":t,ref:e=>{const i=e;A.current=i,"function"==typeof y?y(i):y&&(y.current=i)},asChild:o,...j,children:i})})})})}));I.displayName=v;const N=t({itemValue:"",disabled:!1,headerId:""});function x(...e){return i=>{e.forEach((e=>{e&&("function"==typeof e?e(i):e.current=i)}))}}const R=i.forwardRef((({children:t,value:n,className:s="",disabled:l=!1,asChild:c=!1,...m},u)=>{const h=i.useRef(null),p=a(),b=n??p,v=a(),{rootClass:I,activeItems:R,setActiveItems:T,transitionDuration:j,transitionTimingFunction:y,openMultiple:A,collapsible:M,disabled:$,orientation:w}=o(g),D=l||$,F=R.includes(b),V=r((e=>{D||T(A?i=>e?i.includes(b)?i:[...i,b]:i.filter((e=>e!==b)):e?[b]:e=>!M&&e.includes(b)&&1===e.length?e:[])}),[D,A,b,T,M]);return e(N.Provider,{value:{itemValue:b,disabled:D,headerId:v},children:e(C.Root,{open:F,onOpenChange:V,disabled:D,transitionDuration:j,transitionTimingFunction:y,asChild:!0,children:e(f.div,{ref:x(h,u),className:d(`${I}-item`,s),"data-state":F?"open":"closed","data-disabled":D?"":void 0,"data-orientation":w,asChild:c,...m,children:t})})})}));R.displayName="AccordionItem";const T=i.forwardRef((({children:i,className:t="",asChild:n=!1,...a},r)=>{const{rootClass:c,orientation:m}=o(g),u=d(`${c}-header`,t);if(n&&s(i)){const e=i,t=h({className:u,"data-orientation":m},e.props);return l(e,{...t,ref:p(r,e.ref)})}return e("h3",{ref:r,className:u,"data-orientation":m,...a,children:i})}));T.displayName="AccordionHeader";const j=i.forwardRef((({children:i,className:t="",asChild:n=!1,id:a,...r},s)=>{const{rootClass:l,activeItems:c,orientation:m}=o(g),{itemValue:f,disabled:h,headerId:p}=o(N);return e(u.Item,{domId:a??p,children:e(C.Trigger,{disabled:h,asChild:!0,children:e(b,{className:d(`${l}-trigger`,t),ref:s,"aria-disabled":h,"aria-expanded":c.includes(f),"data-orientation":m,asChild:n,...r,children:i})})})}));j.displayName="AccordionTrigger";const y=i.forwardRef((({children:i,index:t,className:n="",forceMount:a,asChild:r=!1,...s},l)=>{const{rootClass:c,orientation:m}=o(g),{headerId:u}=o(N);return e(C.Content,{ref:l,asChild:r,forceMount:a,className:d(`${c}-content`,n),role:"region","aria-labelledby":u,"data-orientation":m,...s,children:r?i:e("div",{className:`${c}-content-inner`,children:i})})}));y.displayName="AccordionContent";const A=Object.assign(I,{Root:I,Item:R,Header:T,Trigger:j,Content:y});export{A as default};
@@ -1,6 +1,7 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default from 'react';
3
3
  import DialogPrimitive from '~/core/primitives/Dialog';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
5
  import Primitive from '~/core/primitives/Primitive';
5
6
 
6
7
  type DialogPrimitiveActionProps = {
@@ -15,15 +16,9 @@ type DialogPrimitiveCancelProps = {
15
16
  className?: string;
16
17
  };
17
18
 
18
- type DialogPrimitiveContentProps = {
19
- children: React__default.ReactNode;
19
+ type DialogPrimitiveFooterProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Footer>;
20
+ type AlertDialogFooterProps = DialogPrimitiveFooterProps & {
20
21
  className?: string;
21
- asChild?: boolean;
22
- forceMount?: boolean;
23
- role?: string;
24
- 'aria-modal'?: boolean;
25
- 'aria-labelledby'?: string;
26
- 'aria-describedby'?: string;
27
22
  };
28
23
 
29
24
  type DialogPrimitiveRootProps$1 = {
@@ -57,6 +52,13 @@ type AlertDialogPortalProps = DialogPrimitivePortalProps & {
57
52
  keepMounted?: boolean;
58
53
  };
59
54
 
55
+ type DialogPrimitiveContentProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;
56
+ type AlertDialogContentProps = DialogPrimitiveContentProps & {
57
+ className?: string;
58
+ asChild?: boolean;
59
+ forceMount?: boolean;
60
+ };
61
+
60
62
  type PrimitiveH2Props = React__default.ComponentPropsWithoutRef<typeof Primitive.h2>;
61
63
  type AlertDialogTitleProps = PrimitiveH2Props & {
62
64
  className?: string;
@@ -94,16 +96,13 @@ declare const AlertDialog: {
94
96
  children?: React.ReactNode;
95
97
  } & React$1.RefAttributes<HTMLDivElement>>;
96
98
  Portal: {
97
- ({ children, ...props }: AlertDialogPortalProps): React$1.JSX.Element;
99
+ ({ children, ...props }: AlertDialogPortalProps): react_jsx_runtime.JSX.Element;
98
100
  displayName: string;
99
101
  };
100
- Content: React$1.ForwardRefExoticComponent<Omit<DialogPrimitiveContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
101
- className?: string;
102
- asChild?: boolean;
103
- forceMount?: boolean;
104
- } & React$1.RefAttributes<HTMLDivElement>>;
102
+ Content: React$1.ForwardRefExoticComponent<AlertDialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
105
103
  Title: React$1.ForwardRefExoticComponent<AlertDialogTitleProps & React$1.RefAttributes<HTMLElement>>;
106
104
  Description: React$1.ForwardRefExoticComponent<AlertDialogDescriptionProps & React$1.RefAttributes<HTMLElement>>;
105
+ Footer: React$1.ForwardRefExoticComponent<AlertDialogFooterProps & React$1.RefAttributes<HTMLDivElement>>;
107
106
  Cancel: React$1.ForwardRefExoticComponent<Omit<DialogPrimitiveCancelProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
108
107
  className?: string;
109
108
  } & React$1.RefAttributes<HTMLButtonElement>>;
@@ -1 +1 @@
1
- 'use client';import{_ as e,b as a}from"./tslib.es6-B3RR16LH.js";import t,{createContext as i,forwardRef as r,useState as o,useContext as l,useRef as n,useEffect as s}from"react";import{c}from"./index-BVxS3Ixi.js";import{c as d}from"./clsx-BaVHROc5.js";import{u as m}from"./index-fkj4Fdgt.js";import{D as u}from"./index-DzAecJCk.js";import{F as v}from"./index-Di6TooPD.js";import{P as p}from"./index-DR_GC01Z.js";import"./index-BxNZdFaZ.js";import"./floating-ui.react-CLbXmKZY.js";import"react/jsx-runtime";import"react-dom";var f=i({rootClass:"",isOpen:!1,setIsOpen:function(){},titleId:void 0,descriptionId:void 0,setTitleId:function(){},setDescriptionId:function(){}}),h="AlertDialog",C=r((function(i,r){var l=i.children,n=i.className,s=void 0===n?"":n,v=i.customRootClass,p=void 0===v?"":v,C=i.defaultOpen,N=void 0!==C&&C,g=i.open,D=i.onOpenChange,I=e(i,["children","className","customRootClass","defaultOpen","open","onOpenChange"]),y=c(p,h),A=m(g,N,D),O=A[0],b=A[1],E=o(void 0),j=E[0],x=E[1],T=o(void 0),M={rootClass:y,isOpen:O,setIsOpen:b,titleId:j,descriptionId:T[0],setTitleId:x,setDescriptionId:T[1]};return t.createElement(u.Root,a({open:O,onOpenChange:b,className:d(y,s)},I),t.createElement(f.Provider,{value:M},t.createElement("div",{ref:r,className:d(y,s)},l)))}));C.displayName=h;var N=r((function(i,r){var o=i.children,n=i.className,s=void 0===n?"":n,c=i.asChild,m=void 0!==c&&c,v=i.forceMount,p=void 0!==v&&v,h=e(i,["children","className","asChild","forceMount"]),C=l(f),N=C.rootClass,g=C.titleId,D=C.descriptionId;return t.createElement(u.Content,a({ref:r,className:d("".concat(N,"-content"),s),asChild:m,forceMount:p,role:"alertdialog","aria-modal":!0,"aria-labelledby":g,"aria-describedby":D},h),o)}));N.displayName="AlertDialogContent";var g=r((function(i,r){var o=i.children,n=i.asChild,s=i.className,c=void 0===s?"":s,m=i.disabled,v=void 0!==m&&m,p=e(i,["children","asChild","className","disabled"]),h=l(f),C=h.rootClass,N=h.isOpen?"open":"closed",g=v?"":void 0;return t.createElement(u.Trigger,a({ref:r,className:d("".concat(C,"-trigger"),c),asChild:n,disabled:v,"data-state":N,"data-disabled":g},p),o)}));g.displayName="AlertDialogTrigger";var D=function(i){var r=i.children,o=e(i,["children"]);return t.createElement(u.Portal,a({},o),r)};D.displayName="AlertDialogPortal";var I=r((function(i,r){var o=i.className,n=void 0===o?"":o,s=i.asChild,c=void 0!==s&&s,m=i.forceMount,v=void 0!==m&&m,p=i.children,h=e(i,["className","asChild","forceMount","children"]),C=l(f).rootClass;return t.createElement(u.Overlay,a({ref:r,className:d("".concat(C,"-overlay"),n),asChild:c,forceMount:v},h),p)}));I.displayName="AlertDialogOverlay";var y=r((function(i,r){var o=i.children,n=i.asChild,s=i.className,c=void 0===s?"":s,d=e(i,["children","asChild","className"]),m=l(f).rootClass;return t.createElement(u.Cancel,a({ref:r,className:"".concat(m,"-cancel ").concat(c),asChild:n},d),o)}));y.displayName="AlertDialogCancel";var A=r((function(i,r){var o=i.children,n=i.asChild,s=i.className,c=void 0===s?"":s,d=e(i,["children","asChild","className"]),m=l(f).rootClass;return t.createElement(u.Action,a({ref:r,className:"".concat(m,"-action ").concat(c),asChild:n},d),o)}));A.displayName="AlertDialogAction";var O=r((function(i,r){var o=i.children,c=i.className,d=void 0===c?"":c,m=i.asChild,u=void 0!==m&&m,h=i.id,C=e(i,["children","className","asChild","id"]),N=l(f),g=N.rootClass,D=N.setTitleId,I=N.titleId,y=v.useId(),A=null!=h?h:y,O=n(A),b=n(I);return s((function(){b.current=I}),[I]),s((function(){return O.current=A,A&&D(A),function(){b.current===O.current&&D(void 0)}}),[A,D]),t.createElement(p.h2,a({ref:r,id:A,className:"".concat(g,"-title ").concat(d),asChild:u},C),o)}));O.displayName="AlertDialogTitle";var b=r((function(i,r){var o=i.children,c=i.className,d=void 0===c?"":c,m=i.asChild,u=void 0!==m&&m,h=i.id,C=e(i,["children","className","asChild","id"]),N=l(f),g=N.rootClass,D=N.setDescriptionId,I=N.descriptionId,y=v.useId(),A=null!=h?h:y,O=n(A),b=n(I);return s((function(){b.current=I}),[I]),s((function(){return O.current=A,A&&D(A),function(){b.current===O.current&&D(void 0)}}),[A,D]),t.createElement(p.p,a({ref:r,id:A,className:"".concat(g,"-description ").concat(d),asChild:u},C),o)}));b.displayName="AlertDialogDescription";var E=function(){return console.warn("Direct usage of AlertDialog is not supported. Please use AlertDialog.Root, AlertDialog.Content, etc. instead."),null};E.Root=C,E.Trigger=g,E.Overlay=I,E.Portal=D,E.Content=N,E.Title=O,E.Description=b,E.Cancel=y,E.Action=A;export{E as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import{createContext as s,forwardRef as r,useState as t,useContext as a,useRef as o,useEffect as i}from"react";import{c as l}from"./index-6If6D2Zi.js";import{c as n}from"./clsx-BaVHROc5.js";import{u as c}from"./index-wRElCyvx.js";import{D as d}from"./index-CTJl2pTM.js";import{F as m}from"./index-yqRHPukT.js";import{P as p}from"./index-98jQ1vTr.js";import"./index-BOy86lYu.js";import"./ThemeContext-Sm-iNANd.js";import"./floating-ui.react-DMgxgTKq.js";import"react-dom";const h=s({rootClass:"",isOpen:!1,setIsOpen:()=>{},titleId:void 0,descriptionId:void 0,setTitleId:()=>{},setDescriptionId:()=>{}}),C="AlertDialog",u=r((({children:s,className:r="",customRootClass:a="",defaultOpen:o=!1,open:i,onOpenChange:m,...p},u)=>{const N=l(a,C),[f,g]=c(i,o,m),[D,I]=t(void 0),[y,A]=t(void 0),v={rootClass:N,isOpen:f,setIsOpen:g,titleId:D,descriptionId:y,setTitleId:I,setDescriptionId:A};return e(d.Root,{open:f,onOpenChange:g,className:n(N,r),...p,children:e(h.Provider,{value:v,children:e("div",{ref:u,className:n(N,r),children:s})})})}));u.displayName=C;const N=r((({children:s,className:r="",asChild:t=!1,forceMount:o=!1,...i},l)=>{const{rootClass:c,titleId:m,descriptionId:p}=a(h);return e(d.Content,{ref:l,className:n(`${c}-content`,r),asChild:t,forceMount:o,role:"alertdialog","aria-modal":!0,"aria-labelledby":m,"aria-describedby":p,...i,children:s})}));N.displayName="AlertDialogContent";const f=r((({children:s,asChild:r,className:t="",disabled:o=!1,...i},l)=>{const{rootClass:c,isOpen:m}=a(h),p=m?"open":"closed",C=o?"":void 0;return e(d.Trigger,{ref:l,className:n(`${c}-trigger`,t),asChild:r,disabled:o,"data-state":p,"data-disabled":C,...i,children:s})}));f.displayName="AlertDialogTrigger";const g=({children:s,...r})=>e(d.Portal,{...r,children:s});g.displayName="AlertDialogPortal";const D=r((({className:s="",asChild:r=!1,forceMount:t=!1,children:o,...i},l)=>{const{rootClass:c}=a(h);return e(d.Overlay,{ref:l,className:n(`${c}-overlay`,s),asChild:r,forceMount:t,...i,children:o})}));D.displayName="AlertDialogOverlay";const I=r((({children:s,asChild:r,className:t="",...o},i)=>{const{rootClass:l}=a(h);return e(d.Cancel,{ref:i,className:`${l}-cancel ${t}`,asChild:r,...o,children:s})}));I.displayName="AlertDialogCancel";const y=r((({children:s,asChild:r,className:t="",...o},i)=>{const{rootClass:l}=a(h);return e(d.Action,{ref:i,className:`${l}-action ${t}`,asChild:r,...o,children:s})}));y.displayName="AlertDialogAction";const A=r((({children:s,className:r="",...t},o)=>{const{rootClass:i}=a(h);return e(d.Footer,{ref:o,className:n(`${i}-footer`,r),...t,children:s})}));A.displayName="AlertDialogFooter";const v=r((({children:s,className:r="",asChild:t=!1,id:l,...n},c)=>{const{rootClass:d,setTitleId:C,titleId:u}=a(h),N=m.useId(),f=l??N,g=o(f),D=o(u);return i((()=>{D.current=u}),[u]),i((()=>(g.current=f,f&&C(f),()=>{D.current===g.current&&C(void 0)})),[f,C]),e(p.h2,{ref:c,id:f,className:`${d}-title ${r}`,asChild:t,...n,children:s})}));v.displayName="AlertDialogTitle";const $=r((({children:s,className:r="",asChild:t=!1,id:l,...n},c)=>{const{rootClass:d,setDescriptionId:C,descriptionId:u}=a(h),N=m.useId(),f=l??N,g=o(f),D=o(u);return i((()=>{D.current=u}),[u]),i((()=>(g.current=f,f&&C(f),()=>{D.current===g.current&&C(void 0)})),[f,C]),e(p.p,{ref:c,id:f,className:`${d}-description ${r}`,asChild:t,...n,children:s})}));$.displayName="AlertDialogDescription";const O=()=>(console.warn("Direct usage of AlertDialog is not supported. Please use AlertDialog.Root, AlertDialog.Content, etc. instead."),null);O.Root=u,O.Trigger=f,O.Overlay=D,O.Portal=g,O.Content=N,O.Title=v,O.Description=$,O.Footer=A,O.Cancel=I,O.Action=y;export{O as default};
@@ -1 +1 @@
1
- 'use client';import{_ as a,b as s}from"./tslib.es6-B3RR16LH.js";import r from"react";import{c as t}from"./index-BVxS3Ixi.js";import{c as e}from"./clsx-BaVHROc5.js";var o="AspectRatio",m=r.forwardRef((function(m,i){var c=m.children,l=m.customRootClass,d=m.className,f=m.ratio,p=void 0===f?"1":f,N=a(m,["children","customRootClass","className","ratio"]);isNaN(Number(p))&&!p.match(/^(\d+)\/(\d+)$/)&&(p="1"),Number(p)<=0&&(p="1");var n=t(l,o);return r.createElement("div",s({ref:i,style:{aspectRatio:p},className:e(n,d)},N),c)}));m.displayName=o;export{m as default};
1
+ 'use client';import{jsx as r}from"react/jsx-runtime";import s from"react";import{c as t}from"./index-6If6D2Zi.js";import{c as a}from"./clsx-BaVHROc5.js";const e="AspectRatio",o=s.forwardRef((({children:s,customRootClass:o,className:m,ratio:c="1",...i},d)=>{isNaN(Number(c))&&!c.match(/^(\d+)\/(\d+)$/)&&(c="1"),Number(c)<=0&&(c="1");const l=t(o,e);return r("div",{ref:d,style:{aspectRatio:c},className:a(l,m),...i,children:s})}));o.displayName=e;export{o as default};
@@ -1,10 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import React__default from 'react';
3
- import AvatarPrimitiveFallback from '~/core/primitives/Avatar/fragments/AvatarPrimitiveFallback';
4
3
  import AvatarPrimitiveRoot from '~/core/primitives/Avatar/fragments/AvatarPrimitiveRoot';
5
4
  import AvatarPrimitiveImage from '~/core/primitives/Avatar/fragments/AvatarPrimitiveImage';
6
-
7
- type AvatarFallbackProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrimitiveFallback>;
5
+ import AvatarPrimitiveFallback from '~/core/primitives/Avatar/fragments/AvatarPrimitiveFallback';
8
6
 
9
7
  type AvatarRootProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrimitiveRoot> & {
10
8
  customRootClass?: string;
@@ -16,6 +14,8 @@ type AvatarRootProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrim
16
14
 
17
15
  type AvatarImageProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrimitiveImage>;
18
16
 
17
+ type AvatarFallbackProps = React__default.ComponentPropsWithoutRef<typeof AvatarPrimitiveFallback>;
18
+
19
19
  declare const Avatar: {
20
20
  (): null;
21
21
  displayName: string;
@@ -29,3 +29,4 @@ declare namespace AvatarProps {
29
29
  }
30
30
 
31
31
  export { AvatarProps, Avatar as default };
32
+ export type { AvatarFallbackProps, AvatarImageProps, AvatarRootProps };
@@ -1 +1 @@
1
- 'use client';import{_ as a,b as r}from"./tslib.es6-B3RR16LH.js";import e,{createContext as s,useContext as o}from"react";import{A as t,a as l,b as i}from"./AvatarPrimitiveFallback-SECStDbi.js";import{c}from"./clsx-BaVHROc5.js";import{c as m}from"./index-BVxS3Ixi.js";import{u as n,a as v,b as d}from"./index-CD1lNchI.js";import"./index-DR_GC01Z.js";var f=s({size:"",variant:"",color:"",rootClass:""}),u="Avatar",p=e.forwardRef((function(s,o){var l=s.children,i=s.customRootClass,p=void 0===i?"":i,N=s.className,A=void 0===N?"":N,b=s.size,R=void 0===b?"":b,j=s.variant,C=void 0===j?"":j,g=s.color,k=void 0===g?"":g,x=a(s,["children","customRootClass","className","size","variant","color"]),z=m(p,u),h=n("avatar",{variant:C,size:R}),w=v(k),y=d(h(),w());return e.createElement(f.Provider,{value:{size:R,variant:C,color:k,rootClass:z}},e.createElement(t,r({ref:o,className:c(z,A)},y(),x),l))}));p.displayName=u;var N=e.forwardRef((function(s,t){var i=s.src,m=void 0===i?"":i,n=s.alt,v=void 0===n?"":n,d=a(s,["src","alt"]),u=o(f).rootClass;return e.createElement(l,r({ref:t,className:c("".concat(u,"-image")),src:m,alt:v},d))}));N.displayName="AvatarImage";var A=e.forwardRef((function(s,t){var l=s.children,m=s.className,n=void 0===m?"":m,v=a(s,["children","className"]),d=o(f).rootClass;return e.createElement(i,r({ref:t,className:c("".concat(d,"-fallback"),n)},v),l)}));A.displayName="AvatarFallback";var b=function(){return console.warn("Direct usage of Avatar is not supported. Please use Avatar.Root, Avatar.Image, Avatar.Fallback instead."),null};b.displayName="Avatar",b.Root=p,b.Image=N,b.Fallback=A;export{b as default};
1
+ 'use client';import{jsx as a}from"react/jsx-runtime";import r,{createContext as s,useContext as o}from"react";import{A as t,a as e,b as l}from"./AvatarPrimitiveFallback-KiY3slgV.js";import{c}from"./clsx-BaVHROc5.js";import{c as i}from"./index-6If6D2Zi.js";import{c as m,a as n,b as d}from"./index-3dZuI04X.js";import"./index-98jQ1vTr.js";const f=s({size:"",variant:"",color:"",rootClass:""}),v="Avatar",p=r.forwardRef((({children:r,customRootClass:s="",className:o="",size:e="",variant:l="",color:p="",...u},A)=>{const N=i(s,v),b=m("avatar",{variant:l,size:e}),j=d(p),x=n(b,j);return a(f.Provider,{value:{size:e,variant:l,color:p,rootClass:N},children:a(t,{ref:A,className:c(N,o),...x,...u,children:r})})}));p.displayName=v;const u=r.forwardRef((({src:r="",alt:s="",...t},l)=>{const{rootClass:i}=o(f);return a(e,{ref:l,className:c(`${i}-image`),src:r,alt:s,...t})}));u.displayName="AvatarImage";const A=r.forwardRef((({children:r,className:s="",...t},e)=>{const{rootClass:i}=o(f);return a(l,{ref:e,className:c(`${i}-fallback`,s),...t,children:r})}));A.displayName="AvatarFallback";const N=()=>(console.warn("Direct usage of Avatar is not supported. Please use Avatar.Root, Avatar.Image, Avatar.Fallback instead."),null);N.displayName="Avatar",N.Root=p,N.Image=u,N.Fallback=A;export{N as default};
@@ -43,3 +43,4 @@ declare namespace AvatarGroupProps {
43
43
  }
44
44
 
45
45
  export { AvatarGroupProps, AvatarGroup as default };
46
+ export type { AvatarGroupAvatarProps, AvatarGroupFallbackProps, AvatarGroupItemProps, AvatarGroupRootProps };
@@ -1 +1 @@
1
- 'use client';import{_ as a,b as r}from"./tslib.es6-B3RR16LH.js";import e,{createContext as t,useContext as s}from"react";import{c as o}from"./clsx-BaVHROc5.js";import{c as l}from"./index-BVxS3Ixi.js";import{u as i,b as c,a as n}from"./index-CD1lNchI.js";import{A as m,a as v,b as d}from"./AvatarPrimitiveFallback-SECStDbi.js";import"./index-DR_GC01Z.js";var u=t({rootClass:"",size:"",variant:""}),f="AvatarGroup",p=e.forwardRef((function(t,s){var n=t.customRootClass,m=void 0===n?"":n,v=t.size,d=void 0===v?"":v,p=t.variant,A=void 0===p?"":p,N=t.children,b=t.className,G=void 0===b?"":b,R=a(t,["customRootClass","size","variant","children","className"]),h=l(m,f),j=i("avatar",{variant:A,size:d}),C=c(j());return e.createElement(u.Provider,{value:{size:d,variant:A,rootClass:h}},e.createElement("div",r({ref:s,className:o(h,G)},C(),R),N))}));p.displayName=f;var A=e.forwardRef((function(t,l){var i=t.color,v=void 0===i?"":i,d=t.children,f=t.className,p=a(t,["color","children","className"]),A=s(u).rootClass,N=n(v),b=c(N());return e.createElement(m,r({ref:l,className:o("".concat(A,"-item"),f)},b(),p),d)}));A.displayName="AvatarGroupItem";var N=e.forwardRef((function(t,s){var o=t.src,l=t.alt,i=a(t,["src","alt"]);return e.createElement(v,r({ref:s,src:o,alt:l},i))}));N.displayName="AvatarGroupAvatar";var b=e.forwardRef((function(t,l){var i=t.children,c=t.className,n=a(t,["children","className"]),m=s(u).rootClass;return e.createElement(d,r({ref:l,className:o("".concat(m,"-fallback"),c)},n),i)}));b.displayName="AvatarGroupFallback";var G=function(){return console.warn("Direct usage of AvatarGroup is not supported. Please use AvatarGroup.Root, AvatarGroup.Item, AvatarGroup.Avatar, AvatarGroup.Fallback instead."),null};G.Root=p,G.Item=A,G.Avatar=N,G.Fallback=b;export{G as default};
1
+ 'use client';import{jsx as a}from"react/jsx-runtime";import r,{createContext as s,useContext as t}from"react";import{c as o}from"./clsx-BaVHROc5.js";import{c as e}from"./index-6If6D2Zi.js";import{c as l,a as c,b as i}from"./index-3dZuI04X.js";import{A as n,a as m,b as d}from"./AvatarPrimitiveFallback-KiY3slgV.js";import"./index-98jQ1vTr.js";const p=s({rootClass:"",size:"",variant:""}),v="AvatarGroup",f=r.forwardRef((({customRootClass:r="",size:s="",variant:t="",children:i,className:n="",...m},d)=>{const f=e(r,v),u=l("avatar",{variant:t,size:s}),A=c(u);return a(p.Provider,{value:{size:s,variant:t,rootClass:f},children:a("div",{ref:d,className:o(f,n),...A,...m,children:i})})}));f.displayName=v;const u=r.forwardRef((({color:r="",children:s,className:e,...l},m)=>{const{rootClass:d}=t(p),v=i(r),f=c(v);return a(n,{ref:m,className:o(`${d}-item`,e),...f,...l,children:s})}));u.displayName="AvatarGroupItem";const A=r.forwardRef((({src:r,alt:s,...t},o)=>a(m,{ref:o,src:r,alt:s,...t})));A.displayName="AvatarGroupAvatar";const N=r.forwardRef((({children:r,className:s,...e},l)=>{const{rootClass:c}=t(p);return a(d,{ref:l,className:o(`${c}-fallback`,s),...e,children:r})}));N.displayName="AvatarGroupFallback";const G=()=>(console.warn("Direct usage of AvatarGroup is not supported. Please use AvatarGroup.Root, AvatarGroup.Item, AvatarGroup.Avatar, AvatarGroup.Fallback instead."),null);G.Root=f,G.Item=u,G.Avatar=A,G.Fallback=N;export{G as default};
@@ -0,0 +1 @@
1
+ 'use client';import{jsx as r}from"react/jsx-runtime";import a,{createContext as e,useState as i,useMemo as s,useContext as o,useEffect as n}from"react";import{P as t}from"./index-98jQ1vTr.js";const d=e({}),l=a.forwardRef((({children:e,asChild:o=!1,...n},l)=>{const[m,c]=i(!1),[h,p]=i(!1),f=s((()=>{if(!e)return!1;const r=e=>{if(a.isValidElement(e)){if("img"===e.type&&e.props?.src)return!0;if(e.props?.src)return!0;if(e.props?.children)return a.Children.toArray(e.props.children).some(r)}return!1};return a.Children.toArray(e).some(r)}),[e]),u={isImageLoaded:m,hasError:h,setHasError:p,handleLoadImage:()=>{c(!0),p(!1)},handleErrorImage:()=>{c(!1),p(!0)}};return r(d.Provider,{value:u,children:r(t.span,{ref:l,asChild:o,"data-rad-ui-has-image":f?"":void 0,...n,children:e})})}));l.displayName="AvatarPrimitiveRoot";const m=a.forwardRef((({src:a="",alt:e="",...i},s)=>{const{handleErrorImage:l,handleLoadImage:m,hasError:c}=o(d);return c?null:(n((()=>{a||l()}),[a,l,c]),r(t.img,{ref:s,src:a,alt:e,onError:l,onLoad:m,...i}))}));m.displayName="AvatarPrimitiveImage";const c=a.forwardRef((({children:a,asChild:e=!1,className:i="",...s},n)=>{const{isImageLoaded:l}=o(d);return l?null:r(t.span,{ref:n,asChild:e,className:i,...s,children:a})}));c.displayName="AvatarPrimitiveFallback";export{l as A,m as a,c as b};
@@ -1,15 +1,17 @@
1
1
  import React from 'react';
2
2
 
3
+ type BadgeVariant = 'solid' | 'soft' | 'surface' | 'outline' | 'ghost';
4
+ type BadgeSize = 'small' | 'medium' | 'large' | 'x-large';
3
5
  type BadgeProps = React.ComponentPropsWithoutRef<'div'> & {
4
6
  customRootClass?: string;
5
- variant?: string;
6
- size?: string;
7
+ variant?: BadgeVariant;
8
+ size?: BadgeSize;
7
9
  color?: string;
8
10
  };
9
11
  declare const Badge: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
12
  customRootClass?: string;
11
- variant?: string;
12
- size?: string;
13
+ variant?: BadgeVariant;
14
+ size?: BadgeSize;
13
15
  color?: string;
14
16
  } & React.RefAttributes<HTMLDivElement>>;
15
17
 
@@ -1 +1 @@
1
- 'use client';import{_ as a,b as s}from"./tslib.es6-B3RR16LH.js";import o from"react";import{c as r}from"./index-BVxS3Ixi.js";import{c as e}from"./clsx-BaVHROc5.js";import{u as i,a as t,b as m}from"./index-CD1lNchI.js";var d="Badge",c=o.forwardRef((function(c,l){var n=c.children,v=c.customRootClass,f=void 0===v?"":v,p=c.className,u=void 0===p?"":p,b=c.color,j=void 0===b?"":b,x=c.variant,N=void 0===x?"":x,z=c.size,R=void 0===z?"":z,g=a(c,["children","customRootClass","className","color","variant","size"]),h=r(f,d),C=i("badge",{variant:N,size:R}),w=t(j),y=m(C(),w());return o.createElement("div",s({ref:l,className:e(h,u)},y(),g),n)}));c.displayName=d;export{c as default};
1
+ 'use client';import{jsx as a}from"react/jsx-runtime";import r from"react";import{c as s}from"./index-6If6D2Zi.js";import{c as e}from"./clsx-BaVHROc5.js";import{c as o,a as i,b as m}from"./index-3dZuI04X.js";const t="Badge",c=r.forwardRef((({children:r,customRootClass:c="",className:d="",color:l="",variant:n="solid",size:f="medium",...p},u)=>{const x=s(c,t),j=o("badge",{variant:n,size:f}),v=m(l),N=i(j,v);return a("div",{ref:u,className:e(x,d),...N,...p,children:r})}));c.displayName=t;export{c as default};
@@ -1 +1 @@
1
- 'use client';import{_ as o,b as a}from"./tslib.es6-B3RR16LH.js";import r from"react";import{c as s}from"./clsx-BaVHROc5.js";import{c as t}from"./index-BVxS3Ixi.js";var e="BlockQuote",c=r.forwardRef((function(c,i){var l=c.children,d=c.customRootClass,m=void 0===d?"":d,n=c.className,u=void 0===n?"":n,v=c.color,f=void 0===v?"":v,p=c.variant,b=void 0===p?"":p,k=c.size,N=void 0===k?"":k,j=o(c,["children","customRootClass","className","color","variant","size"]),q=t(m,e),x={};return b&&(x["data-block-quote-variant"]=b),N&&(x["data-block-quote-size"]=N),f&&(x["data-rad-ui-accent-color"]=f),r.createElement("blockquote",a({ref:i,className:s(q,u)},j,x),l)}));c.displayName=e;export{c as default};
1
+ 'use client';import{jsx as o}from"react/jsx-runtime";import a from"react";import{c as r}from"./clsx-BaVHROc5.js";import{c as t}from"./index-6If6D2Zi.js";const e="BlockQuote",c=a.forwardRef((({children:a,customRootClass:c="",className:s="",color:i="",variant:l="",size:m="",...d},n)=>{const u=t(c,e),f={};return l&&(f["data-block-quote-variant"]=l),m&&(f["data-block-quote-size"]=m),i&&(f["data-rad-ui-accent-color"]=i),o("blockquote",{ref:n,className:r(u,s),...d,...f,children:a})}));c.displayName=e;export{c as default};
@@ -1 +1 @@
1
- 'use client';import{_ as o,b as i}from"./tslib.es6-B3RR16LH.js";import a,{forwardRef as s}from"react";import{c as t}from"./index-BVxS3Ixi.js";import{c as e}from"./clsx-BaVHROc5.js";import{B as r}from"./index-BxNZdFaZ.js";import{u as d,a as n,b as l}from"./index-CD1lNchI.js";import"./index-DR_GC01Z.js";var m="Button",c=s((function(s,c){var p=s.children,v=s.type,u=void 0===v?"button":v,f=s.customRootClass,b=void 0===f?"":f,j=s.className,x=void 0===j?"":j,C=s.variant,y=void 0===C?"":C,N=s.size,k=void 0===N?"":N,z=s.color,h=void 0===z?"":z,B=s.disabled,R=void 0!==B&&B,g=s.onClick,D=o(s,["children","type","customRootClass","className","variant","size","color","disabled","onClick"]),E=t(b,m),P=d("button",{variant:y,size:k}),_=n(h),q=l(P(),_());return a.createElement(r,i({ref:c,type:u,disabled:R,"data-disabled":R?"":void 0,className:e(E,x)},q(),{onClick:function(o){if(R)return o.preventDefault(),void o.stopPropagation();null==g||g(o)}},D),p)}));c.displayName=m;export{c as default};
1
+ 'use client';import{jsx as t}from"react/jsx-runtime";import{forwardRef as o}from"react";import{c as a}from"./index-6If6D2Zi.js";import{c as s}from"./clsx-BaVHROc5.js";import{B as r}from"./index-BOy86lYu.js";import{c as i,a as e,b as n}from"./index-3dZuI04X.js";import"./index-98jQ1vTr.js";const d="Button",m=o((({children:o,type:m="button",customRootClass:c="",className:l="",variant:p="",size:f="",color:u="",disabled:x=!1,onClick:b,...j},v)=>{const y=a(c,d),C=i("button",{variant:p,size:f}),N=n(u),h=e(C,N);return t(r,{ref:v,type:m,disabled:x,"data-disabled":x?"":void 0,className:s(y,l),...h,onClick:t=>{if(x)return t.preventDefault(),void t.stopPropagation();b?.(t)},...j,children:o})}));m.displayName=d;export{m as default};
@@ -1,19 +1,25 @@
1
1
  import * as react from 'react';
2
+ import react__default from 'react';
3
+ import Primitive from '~/core/primitives/Primitive';
4
+
5
+ type PrimitiveDivProps = react__default.ComponentPropsWithoutRef<typeof Primitive.div>;
6
+ type CalloutRootProps = PrimitiveDivProps & {
7
+ color?: string;
8
+ variant?: string;
9
+ intent?: string;
10
+ size?: string;
11
+ customRootClass?: string;
12
+ };
13
+
14
+ type PrimitiveSpanProps = react__default.ComponentPropsWithoutRef<typeof Primitive.span>;
15
+ type CalloutIconProps = PrimitiveSpanProps;
16
+
17
+ type PrimitivePProps = react__default.ComponentPropsWithoutRef<typeof Primitive.p>;
18
+ type CalloutTextProps = PrimitivePProps;
2
19
 
3
20
  declare const Callout: {
4
21
  (): null;
5
- Root: react.ForwardRefExoticComponent<((Omit<react.InputHTMLAttributes<HTMLInputElement> & {
6
- asChild?: boolean;
7
- } & react.RefAttributes<HTMLElement>, "ref"> | Omit<react.HTMLAttributes<HTMLElement> & {
8
- asChild?: boolean;
9
- children?: React.ReactNode;
10
- } & react.RefAttributes<HTMLElement>, "ref">) & {
11
- color?: string;
12
- variant?: string;
13
- intent?: string;
14
- size?: string;
15
- customRootClass?: string;
16
- }) & react.RefAttributes<HTMLElement>>;
22
+ Root: react.ForwardRefExoticComponent<CalloutRootProps & react.RefAttributes<HTMLElement>>;
17
23
  Icon: react.ForwardRefExoticComponent<(Omit<react.InputHTMLAttributes<HTMLInputElement> & {
18
24
  asChild?: boolean;
19
25
  } & react.RefAttributes<HTMLElement>, "ref"> | Omit<react.HTMLAttributes<HTMLElement> & {
@@ -29,3 +35,4 @@ declare const Callout: {
29
35
  };
30
36
 
31
37
  export { Callout as default };
38
+ export type { CalloutIconProps, CalloutRootProps, CalloutTextProps };
@@ -1 +1 @@
1
- 'use client';import{_ as a,b as e}from"./tslib.es6-B3RR16LH.js";import o,{createContext as s,useContext as t}from"react";import{c as r}from"./index-BVxS3Ixi.js";import{c as l}from"./clsx-BaVHROc5.js";import{P as i}from"./index-DR_GC01Z.js";import{u as c,a as n,b as d}from"./index-CD1lNchI.js";var m=s({rootClass:""}),u="Callout",v=o.forwardRef((function(s,t){var v=s.children,f=s.asChild,C=void 0!==f&&f,p=s.className,N=void 0===p?"":p,h=s.color,x=void 0===h?"":h,R=s.variant,j=void 0===R?"":R,w=s.intent,E=void 0===w?"":w,b=s.size,y=void 0===b?"":b,z=s.customRootClass,I=void 0===z?"":z,P=a(s,["children","asChild","className","color","variant","intent","size","customRootClass"]),T=r(I,u),g=c("callout",{variant:"destructive"===j?"":j,intent:E||("destructive"===j?"destructive":""),size:y}),D=n(x),_=d(g(),D());return o.createElement(m.Provider,{value:{rootClass:T}},o.createElement(i.div,e({ref:t,asChild:C,className:l(T,N)},_(),P),v))}));v.displayName=u;var f=o.forwardRef((function(s,r){var c=s.children,n=s.className,d=void 0===n?"":n,u=a(s,["children","className"]),v=t(m).rootClass;return o.createElement(i.span,e({ref:r,className:l("".concat(v,"-icon"),d)},u),c)}));f.displayName="CalloutIcon";var C=o.forwardRef((function(s,r){var c=s.children,n=s.className,d=void 0===n?"":n,u=a(s,["children","className"]),v=t(m).rootClass;return o.createElement(i.p,e({ref:r,className:l("".concat(v,"-text"),d)},u),c)}));C.displayName="CalloutText";var p=function(){return console.warn("Direct usage of Callout is not supported. Please use Callout.Root, Callout.Icon, etc. instead."),null};p.Root=v,p.Icon=f,p.Text=C;export{p as default};
1
+ 'use client';import{jsx as s}from"react/jsx-runtime";import e,{createContext as o,useContext as t}from"react";import{c as a}from"./index-6If6D2Zi.js";import{c as r}from"./clsx-BaVHROc5.js";import{P as l}from"./index-98jQ1vTr.js";import{c,a as i,b as n}from"./index-3dZuI04X.js";const d=o({rootClass:""}),m="Callout",u=e.forwardRef((({children:e,asChild:o=!1,className:t="",color:u="",variant:f="",intent:p="",size:C="",customRootClass:h="",...x},N)=>{const v=a(h,m),R=c("callout",{variant:"destructive"===f?"":f,intent:p||("destructive"===f?"destructive":""),size:C}),j=n(u),w=i(R,j);return s(d.Provider,{value:{rootClass:v},children:s(l.div,{ref:N,asChild:o,className:r(v,t),...w,...x,children:e})})}));u.displayName=m;const f=e.forwardRef((({children:e,className:o="",...a},c)=>{const{rootClass:i}=t(d);return s(l.span,{ref:c,className:r(`${i}-icon`,o),...a,children:e})}));f.displayName="CalloutIcon";const p=e.forwardRef((({children:e,className:o="",...a},c)=>{const{rootClass:i}=t(d);return s(l.p,{ref:c,className:r(`${i}-text`,o),...a,children:e})}));p.displayName="CalloutText";const C=()=>(console.warn("Direct usage of Callout is not supported. Please use Callout.Root, Callout.Icon, etc. instead."),null);C.Root=u,C.Icon=f,C.Text=p;export{C as default};
@@ -1,11 +1,34 @@
1
1
  import React from 'react';
2
2
 
3
+ type CardRootProps = React.ComponentPropsWithoutRef<'div'> & {
4
+ customRootClass?: string;
5
+ variant?: string;
6
+ size?: string;
7
+ };
3
8
  declare const CardRoot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
9
  customRootClass?: string;
5
10
  variant?: string;
6
11
  size?: string;
7
12
  } & React.RefAttributes<HTMLDivElement>>;
8
13
 
14
+ type CardActionProps = React.ComponentPropsWithoutRef<'div'>;
15
+ declare const CardAction: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
+
17
+ type CardContentProps = React.ComponentPropsWithoutRef<'div'>;
18
+ declare const CardContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+
20
+ type CardDescriptionProps = React.ComponentPropsWithoutRef<'p'>;
21
+ declare const CardDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
22
+
23
+ type CardFooterProps = React.ComponentPropsWithoutRef<'div'>;
24
+ declare const CardFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
25
+
26
+ type CardHeaderProps = React.ComponentPropsWithoutRef<'div'>;
27
+ declare const CardHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
28
+
29
+ type CardTitleProps = React.ComponentPropsWithoutRef<'h3'>;
30
+ declare const CardTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
31
+
9
32
  type CardProps = React.ComponentPropsWithoutRef<'div'> & {
10
33
  customRootClass?: string;
11
34
  variant?: string;
@@ -13,8 +36,14 @@ type CardProps = React.ComponentPropsWithoutRef<'div'> & {
13
36
  };
14
37
  type CardComponent = React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>> & {
15
38
  Root: typeof CardRoot;
39
+ Action: typeof CardAction;
40
+ Content: typeof CardContent;
41
+ Description: typeof CardDescription;
42
+ Footer: typeof CardFooter;
43
+ Header: typeof CardHeader;
44
+ Title: typeof CardTitle;
16
45
  };
17
46
  declare const Card: CardComponent;
18
47
 
19
48
  export { Card as default };
20
- export type { CardProps };
49
+ export type { CardActionProps, CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardProps, CardRootProps, CardTitleProps };
@@ -1 +1 @@
1
- 'use client';import{_ as a,b as s}from"./tslib.es6-B3RR16LH.js";import r from"react";import{c as e}from"./index-BVxS3Ixi.js";import{c as o}from"./clsx-BaVHROc5.js";import{u as i}from"./index-CD1lNchI.js";var t="Card",m=r.forwardRef((function(m,c){var d=m.children,l=m.customRootClass,n=m.className,v=void 0===n?"":n,f=m.variant,u=void 0===f?"":f,p=m.size,N=void 0===p?"":p,R=a(m,["children","customRootClass","className","variant","size"]),C=e(l,t),z=i("card",{variant:u,size:N});return r.createElement("div",s({ref:c,className:o(C,v)},z(),R),d)}));m.displayName=t;var c=r.forwardRef((function(e,i){var t=e.children,c=e.className,d=void 0===c?"":c,l=e.customRootClass,n=e.variant,v=void 0===n?"":n,f=e.size,u=void 0===f?"":f,p=a(e,["children","className","customRootClass","variant","size"]);return r.createElement(m,s({ref:i,className:o(d),customRootClass:l,variant:v,size:u},p),t)}));c.displayName="Card",c.Root=m;export{c as default};
1
+ 'use client';import{jsx as r}from"react/jsx-runtime";import a,{createContext as s,useMemo as e,useContext as o}from"react";import{c as t}from"./index-6If6D2Zi.js";import{c}from"./clsx-BaVHROc5.js";import{c as i}from"./index-3dZuI04X.js";const d=s({rootClass:"rad-ui-card"}),l="Card",n=a.forwardRef((({children:a,customRootClass:s,className:o="",variant:n="",size:m="",...f},N)=>{const C=t(s,l),h=i("card",{variant:n,size:m}),p=e((()=>({rootClass:C})),[C]);return r(d.Provider,{value:p,children:r("div",{ref:N,className:c(C,o),...h,...f,children:a})})}));n.displayName=l;const m=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(d);return r("div",{ref:t,className:c(`${i}-action`,s),...e,children:a})}));m.displayName="CardAction";const f=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(d);return r("div",{ref:t,className:c(`${i}-content`,s),...e,children:a})}));f.displayName="CardContent";const N=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(d);return r("p",{ref:t,className:c(`${i}-description`,s),...e,children:a})}));N.displayName="CardDescription";const C=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(d);return r("div",{ref:t,className:c(`${i}-footer`,s),...e,children:a})}));C.displayName="CardFooter";const h=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(d);return r("div",{ref:t,className:c(`${i}-header`,s),...e,children:a})}));h.displayName="CardHeader";const p=a.forwardRef((({children:a,className:s="",...e},t)=>{const{rootClass:i}=o(d);return r("h3",{ref:t,className:c(`${i}-title`,s),...e,children:a})}));p.displayName="CardTitle";const u=a.forwardRef((({children:a,className:s="",customRootClass:e,variant:o="",size:t="",...i},d)=>r(n,{ref:d,className:c(s),customRootClass:e,variant:o,size:t,...i,children:a})));u.displayName="Card",u.Root=n,u.Action=m,u.Content=f,u.Description=N,u.Footer=C,u.Header=h,u.Title=p;export{u as default};
@@ -1,8 +1,23 @@
1
- import * as react from 'react';
1
+ import * as React$1 from 'react';
2
+ import React__default, { ComponentPropsWithoutRef } from 'react';
3
+ import CheckboxPrimitiveRoot from '~/core/primitives/Checkbox/fragments/CheckboxPrimitiveRoot';
4
+ import CheckboxPrimitiveIndicator from '~/core/primitives/Checkbox/fragments/CheckboxPrimitiveIndicator';
5
+
6
+ type CheckboxRootProps = {
7
+ customRootClass?: string;
8
+ color?: string;
9
+ variant?: string;
10
+ size?: string;
11
+ } & ComponentPropsWithoutRef<typeof CheckboxPrimitiveRoot>;
12
+
13
+ type CheckboxIndicatorProps = {
14
+ children?: React__default.ReactNode;
15
+ className?: string;
16
+ } & Omit<ComponentPropsWithoutRef<typeof CheckboxPrimitiveIndicator>, 'children'>;
2
17
 
3
18
  declare const Checkbox: {
4
19
  (): null;
5
- Root: react.ForwardRefExoticComponent<{
20
+ Root: React$1.ForwardRefExoticComponent<{
6
21
  customRootClass?: string;
7
22
  color?: string;
8
23
  variant?: string;
@@ -21,13 +36,14 @@ declare const Checkbox: {
21
36
  asChild?: boolean;
22
37
  required?: boolean;
23
38
  onChange?: any;
24
- } & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
25
- Indicator: react.ForwardRefExoticComponent<{
39
+ } & Omit<React$1.DetailedHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
40
+ Indicator: React$1.ForwardRefExoticComponent<{
26
41
  children?: React.ReactNode;
27
42
  className?: string;
28
- } & Omit<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
43
+ } & Omit<Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
29
44
  children: React.ReactNode;
30
- } & react.RefAttributes<HTMLSpanElement>, "ref">, "children"> & react.RefAttributes<HTMLSpanElement>>;
45
+ } & React$1.RefAttributes<HTMLSpanElement>, "ref">, "children"> & React$1.RefAttributes<HTMLSpanElement>>;
31
46
  };
32
47
 
33
48
  export { Checkbox as default };
49
+ export type { CheckboxIndicatorProps, CheckboxRootProps };
@@ -1 +1 @@
1
- 'use client';import{_ as e,b as a}from"./tslib.es6-B3RR16LH.js";import r,{forwardRef as i,useRef as t,useEffect as n,useContext as s}from"react";import{B as c}from"./index-BxNZdFaZ.js";import{u as d}from"./index-fkj4Fdgt.js";import{c as o}from"./index-BVxS3Ixi.js";import{c as l}from"./clsx-BaVHROc5.js";import{u as m,a as u,b as h}from"./index-CD1lNchI.js";import"./index-DR_GC01Z.js";var v=r.createContext({isChecked:!1,setIsChecked:function(){},id:"",required:!1,disabled:!1}),C=i((function(i,t){var n=i.children,s=i.className,d=void 0===s?"":s,o=e(i,["children","className"]),l=r.useContext(v),m=l.isChecked,u=l.setIsChecked,h=l.id,C=l.required,f=l.disabled,k="indeterminate"===m||null===m?"indeterminate":m?"checked":"unchecked",p="indeterminate"===m||null===m?"mixed":m;return r.createElement(c,a({ref:t,onClick:function(){u("indeterminate"===m||null===m||!m)},role:"checkbox",id:h,"aria-checked":p,"aria-required":C,"data-checked":m,"data-state":k,disabled:f,"data-disabled":f,className:d},o),n)}));C.displayName="CheckboxPrimitiveTrigger";var f=i((function(i,s){var c=i.children,o=i.className,l=void 0===o?"":o,m=i.checked,u=i.defaultChecked,h=void 0!==u&&u,f=i.onCheckedChange,k=i.disabled,p=i.required,x=i.name,b=i.value,N=i.id,E=e(i,["children","className","checked","defaultChecked","onCheckedChange","disabled","required","name","value","id"]),g=d(m,h,f),y=g[0],q=g[1],j=t(null);n((function(){j.current&&(j.current.indeterminate="indeterminate"===y||null===y)}),[y]);var w={isChecked:y,setIsChecked:q,id:N,required:p,disabled:k};return r.createElement(v.Provider,{value:w},r.createElement(C,a({ref:s,className:l,disabled:k,required:p},E),c),r.createElement("input",{ref:j,type:"checkbox",id:N,style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"},name:x,value:b,checked:!0===y,disabled:k,required:p,readOnly:!0}))}));f.displayName="CheckboxPrimitiveRoot";var k=r.createContext({rootClass:""}),p="Checkbox",x=i((function(i,t){var n=i.children,s=i.className,c=void 0===s?"":s,d=i.customRootClass,v=i.color,C=void 0===v?"":v,x=i.variant,b=i.size,N=e(i,["children","className","customRootClass","color","variant","size"]),E=o(d,p),g=m("checkbox",{variant:x,size:b}),y=u(C),q=h(g(),y());return r.createElement(k.Provider,{value:{rootClass:E}},r.createElement(f,a({ref:t,className:l(E,c)},N,q()),n))}));x.displayName=p;var b=i((function(i,t){var n=i.children,s=i.className,c=void 0===s?"":s,d=e(i,["children","className"]);return!0!==r.useContext(v).isChecked?null:r.createElement("span",a({ref:t,className:c},d),n)}));b.displayName="CheckboxPrimitiveIndicator";var N=i((function(i,t){var n=i.children,c=i.className,d=void 0===c?"":c,o=e(i,["children","className"]),m=s(k).rootClass;return r.createElement(b,a({ref:t},o),r.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",className:l("".concat(m,"-indicator"),d),fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),n)}));N.displayName="CheckboxIndicator";var E=function(){return console.warn("Direct usage of Checkbox is not supported. Please use Checkbox.Root, Checkbox.Indicator instead."),null};E.Root=x,E.Indicator=N;export{E as default};
1
+ 'use client';import{jsx as e,jsxs as r}from"react/jsx-runtime";import i,{forwardRef as a,useRef as s,useEffect as t,useContext as c}from"react";import{B as d}from"./index-BOy86lYu.js";import{u as n}from"./index-wRElCyvx.js";import{c as o}from"./index-6If6D2Zi.js";import{c as l}from"./clsx-BaVHROc5.js";import{c as m,a as h,b as u}from"./index-3dZuI04X.js";import{C as k}from"./check-DujVUWP-.js";import"./index-98jQ1vTr.js";const C=i.createContext({isChecked:!1,setIsChecked:()=>{},id:"",required:!1,disabled:!1}),x=a((({children:r,className:a="",...s},t)=>{const{isChecked:c,setIsChecked:n,id:o,required:l,disabled:m}=i.useContext(C);return e(d,{ref:t,onClick:()=>{n("indeterminate"===c||null===c||!c)},role:"checkbox",id:o,"aria-checked":"indeterminate"===c||null===c?"mixed":c,"aria-required":l,"data-checked":c,"data-state":"indeterminate"===c||null===c?"indeterminate":c?"checked":"unchecked",disabled:m,"data-disabled":m,className:a,...s,children:r})}));x.displayName="CheckboxPrimitiveTrigger";const p=a((({children:i,className:a="",checked:c,defaultChecked:d=!1,onCheckedChange:o,disabled:l,required:m,name:h,value:u,id:k,...p},b)=>{const[f,N]=n(c,d,o),v=s(null);t((()=>{v.current&&(v.current.indeterminate="indeterminate"===f||null===f)}),[f]);const y={isChecked:f,setIsChecked:N,id:k,required:m,disabled:l};return r(C.Provider,{value:y,children:[e(x,{ref:b,className:a,disabled:l,required:m,...p,children:i}),e("input",{ref:v,type:"checkbox",id:k,style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"},name:h,value:u,checked:!0===f,disabled:l,required:m,readOnly:!0})]})}));p.displayName="CheckboxPrimitiveRoot";const b=i.createContext({rootClass:""}),f="Checkbox",N=a((({children:r,className:i="",customRootClass:a,color:s="",variant:t,size:c,...d},n)=>{const k=o(a,f),C=m("checkbox",{variant:t,size:c}),x=u(s),N=h(C,x);return e(b.Provider,{value:{rootClass:k},children:e(p,{ref:n,className:l(k,i),...d,...N,children:r})})}));N.displayName=f;const v=a((({children:r,className:a="",...s},t)=>{const{isChecked:c}=i.useContext(C);return!0!==c?null:e("span",{ref:t,className:a,...s,children:r})}));v.displayName="CheckboxPrimitiveIndicator";const y=a((({children:i,className:a="",...s},t)=>{const{rootClass:d}=c(b);return r(v,{ref:t,...s,children:[e(k,{width:15,height:15,className:l(`${d}-indicator`,a)}),i]})}));y.displayName="CheckboxIndicator";const j=()=>(console.warn("Direct usage of Checkbox is not supported. Please use Checkbox.Root, Checkbox.Indicator instead."),null);j.Root=N,j.Indicator=y;export{j as default};