@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
@@ -1 +1 @@
1
- 'use client';import{_ as a,b as e}from"./tslib.es6-B3RR16LH.js";import o,{createContext as n,forwardRef as r,useContext as t,useRef as l,useCallback as i,useEffect as s}from"react";import{c}from"./clsx-BaVHROc5.js";import{R as u}from"./index-Br4Ygpsh.js";import{P as d}from"./index-DR_GC01Z.js";import{c as m}from"./index-BVxS3Ixi.js";import{u as v}from"./index-fkj4Fdgt.js";import"./index-BxNZdFaZ.js";var f=n({rootClass:"",tabValue:"",handleTabChange:function(){}}),h=r((function(n,r){var s=n.value,m=n.className,v=void 0===m?"":m,h=n.href,b=void 0===h?"#":h,p=n.children,C=n.disabled,N=n.asChild,T=a(n,["value","className","href","children","disabled","asChild"]),j=t(f),x=j.rootClass,R=j.tabValue,V=j.handleTabChange;N&&(C=!1);var g=l(null),E=i((function(a){g.current=a,"function"==typeof r?r(a):r&&(r.current=a)}),[r]),k=s===R;return o.createElement(u.Item,{onFocus:function(){return s&&!C&&function(a){var e;C||(g.current&&(null===(e=g.current)||void 0===e||e.focus()),V(a))}(s)}},o.createElement(d.a,e({ref:E,className:c("".concat(x,"-link"),v),asChild:N,"aria-disabled":C,"aria-selected":k,disabled:C},C?{}:{href:b},T),p))}));h.displayName="TabNavLink";var b=r((function(n,r){var t=n.className,l=n.loop,i=void 0===l||l,d=n.orientation,h=void 0===d?"horizontal":d,b=n.children;n.color;var p=n.customRootClass,C=void 0===p?"":p,N=n.defaultValue,T=void 0===N?"":N,j=n.onValueChange,x=void 0===j?function(){}:j,R=n.value,V=a(n,["className","loop","orientation","children","color","customRootClass","defaultValue","onValueChange","value"]),g=m(C,"TabNav"),E=v(R,T||"",x),k=E[0],y=E[1],L=function(a){y(a)};s((function(){void 0===R&&T&&L(T)}),[T,R]);var P={rootClass:g,tabValue:k,handleTabChange:L};return o.createElement(f.Provider,{value:P},o.createElement(u.Root,{loop:i,orientation:h},o.createElement(u.Group,e({},{asChild:!0}),o.createElement("div",e({ref:r,className:c(g,t)},V),b))))}));b.displayName="TabNavRoot";var p=function(){return console.warn("Direct usage of TabNav is not supported. Please use TabNav.Root, TabNav.Link instead."),null};p.Root=b,p.Link=h;export{p as default};
1
+ 'use client';import{jsx as a}from"react/jsx-runtime";import{createContext as e,forwardRef as o,useContext as r,useRef as s,useCallback as n,useEffect as t}from"react";import{c as l}from"./clsx-BaVHROc5.js";import{R as i}from"./index-hAp0hL9w.js";import{P as c}from"./index-98jQ1vTr.js";import{c as d}from"./index-6If6D2Zi.js";import{u}from"./index-wRElCyvx.js";import"./index-BOy86lYu.js";const m=e({rootClass:"",tabValue:"",handleTabChange:()=>{}}),h=o((({value:e,className:o="",href:t="#",children:d,disabled:u,asChild:h,...f},p)=>{const{rootClass:b,tabValue:v,handleTabChange:N}=r(m);h&&(u=!1);const C=s(null),T=n((a=>{C.current=a,"function"==typeof p?p(a):p&&(p.current=a)}),[p]),x=e===v;return a(i.Item,{onFocus:()=>e&&!u&&(a=>{u||(C.current&&C.current?.focus(),N(a))})(e),children:a(c.a,{ref:T,className:l(`${b}-link`,o),asChild:h,"aria-disabled":u,"aria-selected":x,disabled:u,...u?{}:{href:t},...f,children:d})})}));h.displayName="TabNavLink";const f=o((({className:e,loop:o=!0,orientation:r="horizontal",children:s,color:n,customRootClass:c="",defaultValue:h="",onValueChange:f=()=>{},value:p,...b},v)=>{const N=d(c,"TabNav"),[C,T]=u(p,h||"",f),x=a=>{T(a)};t((()=>{void 0===p&&h&&x(h)}),[h,p]);const j={rootClass:N,tabValue:C,handleTabChange:x};return a(m.Provider,{value:j,children:a(i.Root,{loop:o,orientation:r,children:a(i.Group,{asChild:!0,children:a("div",{ref:v,className:l(N,e),...b,children:s})})})})}));f.displayName="TabNavRoot";const p=()=>(console.warn("Direct usage of TabNav is not supported. Please use TabNav.Root, TabNav.Link instead."),null);p.Root=f,p.Link=h;export{p as default};
@@ -1,17 +1,25 @@
1
1
  import React from 'react';
2
2
 
3
+ type TableRootProps = React.ComponentPropsWithoutRef<'div'> & {
4
+ customRootClass?: string;
5
+ };
3
6
  declare const TableRoot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
7
  customRootClass?: string;
5
8
  } & React.RefAttributes<HTMLDivElement>>;
6
9
 
10
+ type TableHeadProps = React.ComponentPropsWithoutRef<'thead'>;
7
11
  declare const TableHead: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
8
12
 
13
+ type TableBodyProps = React.ComponentPropsWithoutRef<'tbody'>;
9
14
  declare const TableBody: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
10
15
 
16
+ type TableRowProps = React.ComponentPropsWithoutRef<'tr'>;
11
17
  declare const TableRow: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & React.RefAttributes<HTMLTableRowElement>>;
12
18
 
19
+ type TableColumnCellHeaderProps = React.ComponentPropsWithoutRef<'th'>;
13
20
  declare const TableColumnCellHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "ref"> & React.RefAttributes<HTMLTableHeaderCellElement>>;
14
21
 
22
+ type TableCellProps = React.ComponentPropsWithoutRef<'td'>;
15
23
  declare const TableCell: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & React.RefAttributes<HTMLTableDataCellElement>>;
16
24
 
17
25
  type TableProps = React.HTMLAttributes<HTMLTableElement> & {
@@ -28,4 +36,4 @@ interface TableComponent extends React.ForwardRefExoticComponent<TableProps & Re
28
36
  declare const Table: TableComponent;
29
37
 
30
38
  export { Table as default };
31
- export type { TableProps };
39
+ export type { TableBodyProps, TableCellProps, TableColumnCellHeaderProps, TableHeadProps, TableProps, TableRootProps, TableRowProps };
@@ -1 +1 @@
1
- 'use client';import e from"react";import{_ as a,b as r}from"./tslib.es6-B3RR16LH.js";import{c as l}from"./clsx-BaVHROc5.js";import{c as s}from"./index-BVxS3Ixi.js";var c="Table",o=e.forwardRef((function(o,t){var d=o.children,n=o.className,m=void 0===n?"":n,i=o.customRootClass,f=void 0===i?"":i,N=a(o,["children","className","customRootClass"]),u=s(f,c);return e.createElement("div",r({ref:t,className:l("".concat(u,"-wrapper"),m)},N),e.createElement("table",{className:l(u)},d))}));o.displayName=c;var t=e.forwardRef((function(s,c){var o=s.children,t=s.className,d=void 0===t?"header":t,n=a(s,["children","className"]);return e.createElement("thead",r({ref:c,className:l(d)},n),o)}));t.displayName="TableHead";var d=e.forwardRef((function(s,c){var o=s.children,t=s.className,d=void 0===t?"":t,n=a(s,["children","className"]);return e.createElement("tbody",r({ref:c,className:l(d)},n),o)}));d.displayName="TableBody";var n=e.forwardRef((function(s,c){var o=s.children,t=s.className,d=void 0===t?"row":t,n=a(s,["children","className"]);return e.createElement("tr",r({ref:c,className:l(d)},n),o)}));n.displayName="TableRow";var m=e.forwardRef((function(s,c){var o=s.children,t=s.className,d=void 0===t?"cell-header":t,n=a(s,["children","className"]);return e.createElement("th",r({ref:c,className:l(d)},n),o)}));m.displayName="TableColumnCellHeader";var i=e.forwardRef((function(s,c){var o=s.children,t=s.className,d=void 0===t?"cell":t,n=a(s,["children","className"]);return e.createElement("td",r({ref:c,className:l(d)},n),o)}));i.displayName="TableCell";var f=e.forwardRef((function(e,a){return console.warn("Direct usage of Table is not supported. Please use Table.Root, Table.Head, etc. instead."),null}));f.displayName="Table",f.Root=o,f.Body=d,f.Head=t,f.Row=n,f.Cell=i,f.ColumnCellHeader=m;export{f as default};
1
+ 'use client';import e from"react";import{jsx as a}from"react/jsx-runtime";import{c as l}from"./clsx-BaVHROc5.js";import{c as r}from"./index-6If6D2Zi.js";const s="Table",c=e.forwardRef((({children:e,className:c="",customRootClass:o="",...d},t)=>{const n=r(o,s);return a("div",{ref:t,className:l(`${n}-wrapper`,c),...d,children:a("table",{className:l(n),children:e})})}));c.displayName=s;const o=e.forwardRef((({children:e,className:r="header",...s},c)=>a("thead",{ref:c,className:l(r),...s,children:e})));o.displayName="TableHead";const d=e.forwardRef((({children:e,className:r="",...s},c)=>a("tbody",{ref:c,className:l(r),...s,children:e})));d.displayName="TableBody";const t=e.forwardRef((({children:e,className:r="row",...s},c)=>a("tr",{ref:c,className:l(r),...s,children:e})));t.displayName="TableRow";const n=e.forwardRef((({children:e,className:r="cell-header",...s},c)=>a("th",{ref:c,className:l(r),...s,children:e})));n.displayName="TableColumnCellHeader";const m=e.forwardRef((({children:e,className:r="cell",...s},c)=>a("td",{ref:c,className:l(r),...s,children:e})));m.displayName="TableCell";const i=e.forwardRef((function(e,a){return console.warn("Direct usage of Table is not supported. Please use Table.Root, Table.Head, etc. instead."),null}));i.displayName="Table",i.Root=c,i.Body=d,i.Head=o,i.Row=t,i.Cell=m,i.ColumnCellHeader=n;export{i as default};
@@ -1,14 +1,27 @@
1
1
  import React from 'react';
2
2
 
3
+ type TabListProps = React.ComponentPropsWithoutRef<'div'> & {
4
+ asChild?: boolean;
5
+ };
3
6
  declare const TabList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
7
  asChild?: boolean;
5
8
  } & React.RefAttributes<HTMLDivElement>>;
6
9
 
10
+ type TabTriggerProps = React.ComponentPropsWithoutRef<'button'> & {
11
+ value?: string;
12
+ asChild?: boolean;
13
+ };
7
14
  declare const TabTrigger: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
8
15
  value?: string;
9
16
  asChild?: boolean;
10
17
  } & React.RefAttributes<HTMLButtonElement>>;
11
18
 
19
+ type TabContentProps = React.ComponentPropsWithoutRef<'div'> & {
20
+ customRootClass?: string;
21
+ value?: string;
22
+ asChild?: boolean;
23
+ forceMount?: boolean;
24
+ };
12
25
  declare const TabContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
13
26
  customRootClass?: string;
14
27
  value?: string;
@@ -16,6 +29,17 @@ declare const TabContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTM
16
29
  forceMount?: boolean;
17
30
  } & React.RefAttributes<HTMLDivElement>>;
18
31
 
32
+ type TabRootProps = React.ComponentPropsWithoutRef<'div'> & {
33
+ customRootClass?: string;
34
+ value?: string;
35
+ color?: string;
36
+ defaultValue?: string;
37
+ onValueChange?: (value: string) => void;
38
+ orientation?: 'horizontal' | 'vertical';
39
+ dir?: 'ltr' | 'rtl';
40
+ activationMode?: 'automatic' | 'manual';
41
+ asChild?: boolean;
42
+ };
19
43
  declare const TabRoot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
20
44
  customRootClass?: string;
21
45
  value?: string;
@@ -40,4 +64,4 @@ interface TabsComponent extends React.ForwardRefExoticComponent<TabsProps & Reac
40
64
  declare const Tabs: TabsComponent;
41
65
 
42
66
  export { Tabs as default };
43
- export type { TabsProps };
67
+ export type { TabContentProps, TabListProps, TabRootProps, TabTriggerProps, TabsProps };
@@ -1 +1 @@
1
- 'use client';import a,{createContext as e,useContext as t,useRef as o,useCallback as i,useEffect as r}from"react";import{_ as n,b as s}from"./tslib.es6-B3RR16LH.js";import{c as l}from"./clsx-BaVHROc5.js";import{R as d}from"./index-Br4Ygpsh.js";import{P as c}from"./index-DR_GC01Z.js";import{c as u}from"./index-BVxS3Ixi.js";import{u as v}from"./index-fkj4Fdgt.js";import"./index-BxNZdFaZ.js";var m=e(null),f=a.forwardRef((function(e,o){var i=e.className,r=void 0===i?"":i,u=e.children,v=e.asChild,f=void 0!==v&&v,h=n(e,["className","children","asChild"]),b=t(m);if(!b)throw new Error("TabList must be used within a TabRoot");var C=b.rootClass,p=b.orientation;return a.createElement(d.Group,null,a.createElement(c.div,s({ref:o,role:"tablist","aria-orientation":p,"aria-label":"todo",className:l("".concat(C,"-list"),r),asChild:f},h),u))}));f.displayName="TabList";var h=a.forwardRef((function(e,r){var u=e.value,v=e.children,f=e.className,h=void 0===f?"":f,b=e.disabled,C=e.asChild,p=void 0!==C&&C,T=n(e,["value","children","className","disabled","asChild"]),N=t(m);if(!N)throw new Error("TabTrigger must be used within a TabRoot");var R=N.tabValue,w=N.handleTabChange,g=N.rootClass,E=N.orientation,j=N.activationMode,x=o(null),V=i((function(a){x.current=a,"function"==typeof r?r(a):r&&(r.current=a)}),[r]),y=u===R,M={};return M["data-state"]=y?"active":"inactive",M["data-orientation"]=E||"horizontal",b&&(M["data-disabled"]=""),a.createElement(d.Item,{onFocus:function(){return u&&!b&&function(a){var e;b||(x.current&&(null===(e=x.current)||void 0===e||e.focus()),"automatic"===j&&w(a))}(u)}},a.createElement(c.button,s({ref:V,onClick:function(a){b||u&&w(u)},className:l("".concat(g,"-trigger"),y?"active":"",b?"disabled":"",h),role:"tab","aria-selected":y,"aria-disabled":b,disabled:b,asChild:p},M,T),v))}));h.displayName="TabTrigger";var b="TabContent",C=a.forwardRef((function(e,o){var i=e.className,r=void 0===i?"":i,d=e.value,v=e.children,f=e.customRootClass,h=e.asChild,C=void 0!==h&&h,p=e.forceMount,T=void 0!==p&&p,N=n(e,["className","value","children","customRootClass","asChild","forceMount"]),R=u(f,b),w=t(m);if(!w)throw new Error("TabContent must be used within a TabRoot");var g=w.tabValue,E=w.orientation,j=g===d;if(!(T||j))return null;var x={};return x["data-state"]=j?"active":"inactive",x["data-orientation"]=E||"horizontal",a.createElement(c.div,s({ref:o,className:l(R,r),role:"tabpanel","aria-hidden":!j,asChild:C},x,N),v)}));C.displayName=b;var p="Tabs",T=a.forwardRef((function(e,t){var o=e.children,i=e.defaultValue,f=void 0===i?"":i,h=e.onValueChange,b=void 0===h?function(){}:h,C=e.customRootClass,T=void 0===C?"":C,N=e.value,R=e.className,w=e.color,g=e.orientation,E=void 0===g?"horizontal":g,j=e.dir,x=void 0===j?"ltr":j,V=e.activationMode,y=void 0===V?"automatic":V,M=e.asChild,L=void 0!==M&&M,z=n(e,["children","defaultValue","onValueChange","customRootClass","value","className","color","orientation","dir","activationMode","asChild"]),P=u(T,p),k=v(N,f||"",b),D=k[0],F=k[1],G=function(a){F(a)};r((function(){void 0===N&&f&&G(f)}),[f,N]);var I={rootClass:P,tabValue:D,handleTabChange:G,orientation:E,activationMode:y},_={};return _["data-orientation"]=E,a.createElement(m.Provider,{value:I},a.createElement(d.Root,{orientation:E,loop:!0,dir:x,asChild:!0},a.createElement(c.div,s({ref:t,className:l(P,R),"data-rad-ui-accent-color":w,asChild:L},_,z),o)))}));T.displayName=p;var N=a.forwardRef((function(a,e){return console.warn("Direct usage of Tabs is not supported. Please use Tabs.Root, Tabs.List, etc. instead."),null}));N.displayName="Tabs",N.List=f,N.Content=C,N.Root=T,N.Trigger=h;export{N as default};
1
+ 'use client';import a,{createContext as t,useContext as e,useRef as o,useCallback as i,useEffect as r}from"react";import{jsx as n}from"react/jsx-runtime";import{c as s}from"./clsx-BaVHROc5.js";import{R as l}from"./index-hAp0hL9w.js";import{P as d}from"./index-98jQ1vTr.js";import{c}from"./index-6If6D2Zi.js";import{u}from"./index-wRElCyvx.js";import"./index-BOy86lYu.js";const m=t(null),h=a.forwardRef((({className:a="",children:t,asChild:o=!1,...i},r)=>{const c=e(m);if(!c)throw new Error("TabList must be used within a TabRoot");const{rootClass:u,orientation:h}=c;return n(l.Group,{children:n(d.div,{ref:r,role:"tablist","aria-orientation":h,"aria-label":"todo",className:s(`${u}-list`,a),asChild:o,...i,children:t})})}));h.displayName="TabList";const b=a.forwardRef((({value:a,children:t,className:r="",disabled:c,asChild:u=!1,...h},b)=>{const f=e(m);if(!f)throw new Error("TabTrigger must be used within a TabRoot");const{tabValue:C,handleTabChange:p,rootClass:v,orientation:T,activationMode:w}=f,R=o(null),N=i((a=>{R.current=a,"function"==typeof b?b(a):b&&(b.current=a)}),[b]),g=a===C,x={};return x["data-state"]=g?"active":"inactive",x["data-orientation"]=T||"horizontal",c&&(x["data-disabled"]=""),n(l.Item,{onFocus:()=>{return a&&!c&&(t=a,void(c||(R.current&&R.current?.focus(),"automatic"===w&&p(t))));var t},children:n(d.button,{ref:N,onClick:t=>{c||a&&p(a)},className:s(`${v}-trigger`,g?"active":"",c?"disabled":"",r),role:"tab","aria-selected":g,"aria-disabled":c,disabled:c,asChild:u,...x,...h,children:t})})}));b.displayName="TabTrigger";const f="TabContent",C=a.forwardRef((({className:a="",value:t,children:o,customRootClass:i,asChild:r=!1,forceMount:l=!1,...u},h)=>{const b=c(i,f),C=e(m);if(!C)throw new Error("TabContent must be used within a TabRoot");const{tabValue:p,orientation:v}=C,T=p===t;if(!(l||T))return null;const w={};return w["data-state"]=T?"active":"inactive",w["data-orientation"]=v||"horizontal",n(d.div,{ref:h,className:s(b,a),role:"tabpanel","aria-hidden":!T,asChild:r,...w,...u,children:o})}));C.displayName=f;const p="Tabs",v=a.forwardRef((({children:a,defaultValue:t="",onValueChange:e=()=>{},customRootClass:o="",value:i,className:h,color:b,orientation:f="horizontal",dir:C="ltr",activationMode:v="automatic",asChild:T=!1,...w},R)=>{const N=c(o,p),[g,x]=u(i,t||"",e),j=a=>{x(a)};r((()=>{void 0===i&&t&&j(t)}),[t,i]);const y={rootClass:N,tabValue:g,handleTabChange:j,orientation:f,activationMode:v},V={};return V["data-orientation"]=f,n(m.Provider,{value:y,children:n(l.Root,{orientation:f,loop:!0,dir:C,asChild:!0,children:n(d.div,{ref:R,className:s(N,h),"data-rad-ui-accent-color":b,asChild:T,...V,...w,children:a})})})}));v.displayName=p;const T=a.forwardRef(((a,t)=>(console.warn("Direct usage of Tabs is not supported. Please use Tabs.Root, Tabs.List, etc. instead."),null)));T.displayName="Tabs",T.List=h,T.Content=C,T.Root=v,T.Trigger=b;export{T as default};
@@ -1 +1 @@
1
- 'use client';import{_ as s,b as a}from"./tslib.es6-B3RR16LH.js";import e,{forwardRef as o}from"react";import{c as r}from"./index-BVxS3Ixi.js";import{c as t}from"./clsx-BaVHROc5.js";var i="Text",l=["div","span","p","label"],m=o((function(o,m){var c=o.children,d=o.customRootClass,p=void 0===d?"":d,n=o.className,f=void 0===n?"":n,u=o.as,v=void 0===u?"p":u,x=s(o,["children","customRootClass","className","as"]),N=r(p,i);return l.includes(v)||(v="p"),e.createElement(v,a({ref:m,className:t(N,f)},x),c)}));m.displayName=i;export{m as default};
1
+ 'use client';import s,{forwardRef as e}from"react";import{c as a}from"./index-6If6D2Zi.js";import{c as t}from"./clsx-BaVHROc5.js";const r="Text",c=["div","span","p","label"],o=e((({children:e,customRootClass:o="",className:l="",as:m="p",...p},i)=>{const n=a(o,r);return c.includes(m)||(m="p"),s.createElement(m,{ref:i,className:t(n,l),...p},e)}));o.displayName=r;export{o as default};
@@ -1,16 +1,29 @@
1
1
  import React from 'react';
2
2
 
3
+ type TextAreaRootProps = React.ComponentPropsWithoutRef<'div'> & {
4
+ customRootClass?: string;
5
+ variant?: string;
6
+ size?: string;
7
+ resize?: 'none' | 'vertical' | 'horizontal' | 'both';
8
+ color?: string;
9
+ radius?: string;
10
+ };
3
11
  declare const TextAreaRoot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
12
  customRootClass?: string;
5
13
  variant?: string;
6
14
  size?: string;
7
15
  resize?: "none" | "vertical" | "horizontal" | "both";
16
+ color?: string;
17
+ radius?: string;
8
18
  } & React.RefAttributes<HTMLDivElement>>;
9
19
 
20
+ type TextAreaInputProps = React.ComponentPropsWithoutRef<'textarea'>;
10
21
  declare const TextAreaInput: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
11
22
 
12
- type TextAreaProps = React.ComponentPropsWithoutRef<'div'> & {
23
+ type TextAreaProps = React.ComponentPropsWithoutRef<'div'> & TextAreaRootProps & TextAreaInputProps & {
13
24
  customRootClass?: string;
25
+ readonly?: boolean;
26
+ disabled?: boolean;
14
27
  };
15
28
  type TextAreaComponent = React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<React.ElementRef<'div'>>> & {
16
29
  Input: typeof TextAreaInput;
@@ -19,4 +32,4 @@ type TextAreaComponent = React.ForwardRefExoticComponent<TextAreaProps & React.R
19
32
  declare const TextArea: TextAreaComponent;
20
33
 
21
34
  export { TextArea as default };
22
- export type { TextAreaProps };
35
+ export type { TextAreaInputProps, TextAreaProps, TextAreaRootProps };
@@ -1 +1 @@
1
- 'use client';import{_ as e,b as a}from"./tslib.es6-B3RR16LH.js";import r from"react";import{c as t}from"./clsx-BaVHROc5.js";import{c as s}from"./index-BVxS3Ixi.js";import{u as o}from"./index-CD1lNchI.js";var i="TextArea",l=r.forwardRef((function(l,c){var d=l.children,m=l.customRootClass,n=void 0===m?"":m,f=l.className,v=void 0===f?"":f,u=l.variant,p=void 0===u?"":u,h=l.size,x=void 0===h?"":h,N=l.resize,R=void 0===N?"both":N,z=e(l,["children","customRootClass","className","variant","size","resize"]),C=s(n,i),j=o("textarea",{variant:p,size:x,resize:R});return r.createElement("div",a({ref:c,className:t(C,v)},z,j()),d)}));l.displayName=i;var c=r.forwardRef((function(t,s){var o=t.children,i=t.placeholder,l=void 0===i?"":i,c=e(t,["children","placeholder"]);return r.createElement("textarea",a({ref:s,placeholder:l,defaultValue:"string"==typeof o?o:void 0},c))}));c.displayName="TextAreaInput";var d=r.forwardRef((function(s,o){var i=s.customRootClass,d=void 0===i?"":i,m=s.className,n=void 0===m?"":m,f=s.children,v=e(s,["customRootClass","className","children"]);return r.createElement(l,a({ref:o,customRootClass:d,className:t(n)},v),r.createElement(c,{placeholder:"enter text"},f),f)}));d.displayName="TextArea",d.Input=c,d.Root=l;export{d as default};
1
+ 'use client';import{jsx as e,jsxs as a}from"react/jsx-runtime";import r from"react";import{c as s}from"./clsx-BaVHROc5.js";import{c as o}from"./index-6If6D2Zi.js";import{c as t,a as l,b as d}from"./index-3dZuI04X.js";const i="TextArea",c=r.forwardRef((({children:a,customRootClass:r="",className:c="",variant:m="",size:n="",resize:f="both",color:p="",radius:u="",...h},x)=>{const N=o(r,i),R=t("textarea",{variant:m,size:n,resize:f,radius:u}),y=d(p),b=l(R,y);return e("div",{ref:x,className:s(N,c),...h,...b,children:a})}));c.displayName=i;const m=r.forwardRef((({children:a,placeholder:r="",...s},o)=>e("textarea",{ref:o,placeholder:r,defaultValue:"string"==typeof a?a:void 0,...s})));m.displayName="TextAreaInput";const n=r.forwardRef((({customRootClass:r="",placeholder:o="",className:t="",disabled:l=!1,readonly:d=!1,children:i,...n},f)=>a(c,{ref:f,customRootClass:r,className:s(t),...n,children:[e(m,{placeholder:o,disabled:l,readOnly:d,children:i}),i]})));n.displayName="TextArea",n.Input=m,n.Root=c;export{n as default};
@@ -1 +1 @@
1
- 'use client';import{_ as a,b as e}from"./tslib.es6-B3RR16LH.js";import r,{forwardRef as i,useState as t,useEffect as n}from"react";var d=i((function(i,d){var c=i.appearance,o=void 0===c?"system":c,s=i.id,u=void 0===s?"rad-ui-theme-container":s,m=i.accentColor,l=void 0===m?"":m,h=i.radius,f=void 0===h?"":h,v=i.scaling,p=void 0===v?"":v,g=i.children,y=a(i,["appearance","id","accentColor","radius","scaling","children"]),k=t(o),E=k[0],b=k[1],w=t(l),C=w[0],L=w[1],j=t(f),x=j[0],M=j[1],N=t(p),T=N[0],_=N[1];return n((function(){var a=window.matchMedia("(prefers-color-scheme: dark)"),e=function(a){"system"===o&&b(a.matches?"dark":"light")};return"system"===o?(b(a.matches?"dark":"light"),a.addEventListener("change",e)):b(o),function(){return a.removeEventListener("change",e)}}),[o]),n((function(){l&&L(l)}),[l]),n((function(){f&&M(f)}),[f]),n((function(){p&&_(p)}),[p]),r.createElement("div",e({ref:d,id:u,"data-rad-ui-theme":E,"data-rad-ui-accent-color":C,"data-rad-ui-radius":x,"data-rad-ui-scaling":T},y),g)}));d.displayName="Theme";export{d as default};
1
+ 'use client';import{jsx as e,jsxs as r}from"react/jsx-runtime";import{forwardRef as t,useRef as a,useState as n,useEffect as i,useCallback as c}from"react";import{T as o}from"./ThemeContext-Sm-iNANd.js";const d=t((function({appearance:t="system",id:d="rad-ui-theme-container",accentColor:s="",radius:u="",scaling:m="",children:l,...h},f){const p=a(null),v=a(null),[g,y]=n(t),[k,x]=n(s),[R,T]=n(u),[j,w]=n(m),C=a(f);i((()=>{C.current=f}),[f]);const E=c((e=>{p.current=e,((e,r)=>{"function"!=typeof e?e&&(e.current=r):e(r)})(C.current,e)}),[]);return i((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)"),r=e=>{"system"===t&&y(e.matches?"dark":"light")};return"system"===t?(y(e.matches?"dark":"light"),e.addEventListener("change",r)):y(t),()=>e.removeEventListener("change",r)}),[t]),i((()=>{s&&x(s)}),[s]),i((()=>{u&&T(u)}),[u]),i((()=>{m&&w(m)}),[m]),e(o.Provider,{value:{containerRef:p,portalRootRef:v},children:r("div",{ref:E,id:d,"data-rad-ui-theme":g,"data-rad-ui-accent-color":k,"data-rad-ui-radius":R,"data-rad-ui-scaling":j,...h,children:[l,e("div",{ref:v,"data-rad-ui-portal-root":""})]})})}));d.displayName="Theme";export{d as default};
@@ -0,0 +1 @@
1
+ 'use client';import t from"react";const e=t.createContext(null);export{e as T};
@@ -1 +1 @@
1
- 'use client';import{_ as s,b as e}from"./tslib.es6-B3RR16LH.js";import a,{forwardRef as o}from"react";import{c as d}from"./clsx-BaVHROc5.js";import{c as r}from"./index-BVxS3Ixi.js";import{u as i}from"./index-fkj4Fdgt.js";import{T as t}from"./index-BuGKU1-S.js";import"./index-BxNZdFaZ.js";import"./index-DR_GC01Z.js";import"./index-DBZNt4Em.js";var l="Toggle",m=o((function(o,m){var n=o.defaultPressed,c=void 0!==n&&n,p=o.customRootClass,f=void 0===p?"":p,u=o.children,h=o.className,j=void 0===h?"":h,v=o.color,x=void 0===v?"":v,C=o.pressed,g=o.onPressedChange,P=o.asChild,b=void 0!==P&&P,N=s(o,["defaultPressed","customRootClass","children","className","color","pressed","onPressedChange","asChild"]),R=i(C,c,g),T=R[0],y=R[1],E=r(f,l),_={};return x&&(_["data-rad-ui-accent-color"]=x),a.createElement(t,e({ref:m,className:d(E,j),pressed:T,onPressedChange:y,"data-state":T?"on":"off","data-disabled":N.disabled?"":void 0,asChild:b},N,_),u)}));m.displayName=l;export{m as default};
1
+ 'use client';import{jsx as s}from"react/jsx-runtime";import{forwardRef as e}from"react";import{c as r}from"./clsx-BaVHROc5.js";import{c as a}from"./index-6If6D2Zi.js";import{u as o}from"./index-wRElCyvx.js";import{T as d}from"./index-BZVbVgqN.js";import"./index-BOy86lYu.js";import"./index-98jQ1vTr.js";import"./index-CXzybYmm.js";const t="Toggle",i=e((({defaultPressed:e=!1,customRootClass:i="",children:m,className:n="",color:c="",pressed:l,onPressedChange:p,asChild:f=!1,...x},j)=>{const[h,u]=o(l,e,p),C=a(i,t),g={};return c&&(g["data-rad-ui-accent-color"]=c),s(d,{ref:j,className:r(C,n),pressed:h,onPressedChange:u,"data-state":h?"on":"off","data-disabled":x.disabled?"":void 0,asChild:f,...x,...g,children:m})}));i.displayName=t;export{i as default};
@@ -1,6 +1,36 @@
1
1
  import React from 'react';
2
2
  import TogglePrimitive from '~/core/primitives/Toggle';
3
3
 
4
+ type ToggleGroupRootProps = React.ComponentPropsWithoutRef<'div'> & {
5
+ /** Selection mode - 'single' allows only one item to be selected, 'multiple' allows many */
6
+ type?: 'single' | 'multiple';
7
+ /** Additional CSS class names to apply */
8
+ className?: string;
9
+ /** Whether focus should loop from last to first and vice versa */
10
+ loop?: boolean;
11
+ /** Orientation of the toggle group - affects keyboard navigation */
12
+ orientation?: 'horizontal' | 'vertical';
13
+ /** Custom root class name to override default styling */
14
+ customRootClass?: string;
15
+ /** Current value or values for the toggle group (controlled mode) */
16
+ value?: any;
17
+ /** Initial value or values for the toggle group (uncontrolled mode) */
18
+ defaultValue?: any;
19
+ /** Callback fired when value changes */
20
+ onValueChange?: (value: any) => void;
21
+ /** Accent color for the toggle group */
22
+ color?: string;
23
+ /** Whether the toggle group is disabled */
24
+ disabled?: boolean;
25
+ /** Text direction */
26
+ dir?: 'ltr' | 'rtl';
27
+ /** Whether to enable roving focus */
28
+ rovingFocus?: boolean;
29
+ /** Whether to render as a child element instead of a div */
30
+ asChild?: boolean;
31
+ /** Child elements */
32
+ children?: React.ReactNode;
33
+ };
4
34
  declare const ToggleGroupRoot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
5
35
  /** Selection mode - 'single' allows only one item to be selected, 'multiple' allows many */
6
36
  type?: "single" | "multiple";
@@ -35,6 +65,8 @@ declare const ToggleGroupRoot: React.ForwardRefExoticComponent<Omit<React.Detail
35
65
  interface ToggleItemProps extends React.ComponentPropsWithoutRef<typeof TogglePrimitive> {
36
66
  /** Value associated with this toggle item, used for selection state */
37
67
  value?: any;
68
+ /** Use square fixed dimensions (icon-only controls). Omit for labeled or mixed content. */
69
+ iconOnly?: boolean;
38
70
  }
39
71
  /**
40
72
  * Individual toggle item to be used within a ToggleGroup.
@@ -61,3 +93,4 @@ type ToggleGroupComponent = React.ForwardRefExoticComponent<ToggleGroupProps & R
61
93
  declare const ToggleGroup: ToggleGroupComponent;
62
94
 
63
95
  export { ToggleGroup as default };
96
+ export type { ToggleGroupRootProps, ToggleItemProps };
@@ -1 +1 @@
1
- 'use client';import e,{createContext as o,useContext as a}from"react";import{_ as i,b as t,a as r}from"./tslib.es6-B3RR16LH.js";import{c as l}from"./clsx-BaVHROc5.js";import{c as s}from"./index-BVxS3Ixi.js";import{u as d}from"./index-fkj4Fdgt.js";import{R as n}from"./index-Br4Ygpsh.js";import{T as c}from"./index-BuGKU1-S.js";import"./index-DR_GC01Z.js";import"./index-BxNZdFaZ.js";import"./index-DBZNt4Em.js";var u=o({type:"single",activeToggles:[],setActiveToggles:function(){},rootClass:"",disabled:!1,orientation:"horizontal"}),m="ToggleGroup",v=e.forwardRef((function(o,a){var r=o.type,c=void 0===r?"single":r,v=o.className,g=void 0===v?"":v,p=o.loop,f=void 0===p||p,h=o.orientation,C=void 0===h?"horizontal":h,T=o.customRootClass,b=void 0===T?"":T,N=o.value,j=o.defaultValue,x=void 0===j?[]:j,R=o.onValueChange,y=o.color,E=void 0===y?"":y,G=o.disabled,w=void 0!==G&&G,I=o.dir,V=void 0===I?"ltr":I,A=o.rovingFocus,P=void 0===A||A;o.asChild;var z=o.children,F=i(o,["type","className","loop","orientation","customRootClass","value","defaultValue","onValueChange","color","disabled","dir","rovingFocus","asChild","children"]),k=s(b,m),D=d(N,x,R),_={activeToggles:D[0],setActiveToggles:D[1],type:c,rootClass:k,disabled:w,orientation:C},q={};return E&&(q["data-rad-ui-accent-color"]=E),w&&(q["data-disabled"]=""),q["data-orientation"]=C,P?e.createElement(u.Provider,{value:_},e.createElement(n.Root,{loop:f,orientation:C,dir:V},e.createElement(n.Group,t({},q,F),e.createElement("div",{ref:a,className:l(k,g)},z)))):e.createElement(u.Provider,{value:_},e.createElement("div",t({ref:a,className:l(k,g)},q,{dir:V},F),z))}));v.displayName=m;var g=e.forwardRef((function(o,l){var s=o.children,d=o.className,m=void 0===d?"":d,v=o.value,g=void 0===v?null:v,p=o.disabled,f=void 0!==p&&p,h=o.asChild,C=void 0!==h&&h,T=i(o,["children","className","value","disabled","asChild"]),b=a(u),N=b.type,j=b.activeToggles,x=b.setActiveToggles,R=b.rootClass,y=b.disabled,E=null==j?void 0:j.includes(g),G=f||y,w={},I={};return E?(w["aria-pressed"]="true",I["data-state"]="on"):(w["aria-pressed"]="false",I["data-state"]="off"),G&&(I["data-disabled"]=""),e.createElement(n.Item,null,e.createElement(c,t({ref:l,onClick:function(){if(!G){var e=j||[];if("single"===N)return E?void x([]):void x([g]);"multiple"===N&&(e=E?e.filter((function(e){return e!==g})):r(r([],e,!0),[g],!1)),x(e)}},className:"".concat(R,"-item ").concat(m),disabled:G,asChild:C},w,I,T),s))}));g.displayName="ToggleItem";var p=e.forwardRef((function(e,o){return console.warn("Direct usage of ToggleGroup is not supported. Please use ToggleGroup.Root, ToggleGroup.Item, etc. instead."),null}));p.displayName="ToggleGroup",p.Root=v,p.Item=g;export{p as default};
1
+ 'use client';import e,{createContext as o,useContext as a}from"react";import{jsx as i}from"react/jsx-runtime";import{c as t}from"./clsx-BaVHROc5.js";import{c as r}from"./index-6If6D2Zi.js";import{u as s}from"./index-wRElCyvx.js";import{R as l}from"./index-hAp0hL9w.js";import{T as d}from"./index-BZVbVgqN.js";import"./index-98jQ1vTr.js";import"./index-BOy86lYu.js";import"./index-CXzybYmm.js";const n=o({type:"single",activeToggles:[],setActiveToggles:()=>{},rootClass:"",disabled:!1,orientation:"horizontal"}),c="ToggleGroup",m=e.forwardRef((({type:e="single",className:o="",loop:a=!0,orientation:d="horizontal",customRootClass:m="",value:p,defaultValue:u=[],onValueChange:g,color:f="",disabled:h=!1,dir:v="ltr",rovingFocus:T=!0,asChild:x=!1,children:j,...y},C)=>{const b=r(m,c),[N,R]=s(p,u,g),G={activeToggles:N,setActiveToggles:R,type:e,rootClass:b,disabled:h,orientation:d},w={};return f&&(w["data-rad-ui-accent-color"]=f),h&&(w["data-disabled"]=""),w["data-orientation"]=d,i(n.Provider,T?{value:G,children:i(l.Root,{loop:a,orientation:d,dir:v,children:i(l.Group,{...w,...y,children:i("div",{ref:C,className:t(b,o),children:j})})})}:{value:G,children:i("div",{ref:C,className:t(b,o),...w,dir:v,...y,children:j})})}));m.displayName=c;const p=e.forwardRef((({children:e,className:o="",value:t=null,disabled:r=!1,asChild:s=!1,iconOnly:c=!1,...m},p)=>{const{type:u,activeToggles:g,setActiveToggles:f,rootClass:h,disabled:v}=a(n),T=g?.includes(t),x=r||v,j={},y={};return T?(j["aria-pressed"]="true",y["data-state"]="on"):(j["aria-pressed"]="false",y["data-state"]="off"),x&&(y["data-disabled"]=""),i(l.Item,{children:i(d,{ref:p,onClick:()=>{if(x)return;let e=g||[];if("single"===u)return T?void f([]):void f([t]);"multiple"===u&&(e=T?e.filter((e=>e!==t)):[...e,t]),f(e)},className:`${h}-item ${o}`,disabled:x,asChild:s,...c?{"data-icon-only":""}:{},...j,...y,...m,children:e})})}));p.displayName="ToggleItem";const u=e.forwardRef(((e,o)=>(console.warn("Direct usage of ToggleGroup is not supported. Please use ToggleGroup.Root, ToggleGroup.Item, etc. instead."),null)));u.displayName="ToggleGroup",u.Root=m,u.Item=p;export{u as default};
@@ -0,0 +1,83 @@
1
+ import React from 'react';
2
+ import ButtonPrimitive from '~/core/primitives/Button';
3
+ import { SeparatorProps } from '~/components/ui/Separator/Separator';
4
+ import { LinkProps } from '~/components/ui/Link/Link';
5
+ import * as TogglePrimitive from '~/core/primitives/Toggle';
6
+ import TogglePrimitive__default from '~/core/primitives/Toggle';
7
+
8
+ type ToolbarRootProps = React.ComponentPropsWithoutRef<'div'> & {
9
+ orientation?: 'horizontal' | 'vertical';
10
+ loop?: boolean;
11
+ dir?: 'ltr' | 'rtl';
12
+ customRootClass?: string;
13
+ asChild?: boolean;
14
+ };
15
+ declare const ToolbarRoot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
16
+ orientation?: "horizontal" | "vertical";
17
+ loop?: boolean;
18
+ dir?: "ltr" | "rtl";
19
+ customRootClass?: string;
20
+ asChild?: boolean;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+
23
+ type ToolbarButtonProps = React.ComponentPropsWithoutRef<typeof ButtonPrimitive> & {
24
+ asChild?: boolean;
25
+ };
26
+ declare const ToolbarButton: React.ForwardRefExoticComponent<Omit<{
27
+ label?: string;
28
+ description?: string;
29
+ asChild?: boolean;
30
+ required?: boolean;
31
+ onChange?: any;
32
+ } & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & {
33
+ asChild?: boolean;
34
+ } & React.RefAttributes<HTMLButtonElement>>;
35
+
36
+ type ToolbarSeparatorProps = SeparatorProps;
37
+ declare const ToolbarSeparator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLElement>>;
38
+
39
+ type ToolbarLinkProps = LinkProps & {
40
+ asChild?: boolean;
41
+ };
42
+ declare const ToolbarLink: React.ForwardRefExoticComponent<LinkProps & {
43
+ asChild?: boolean;
44
+ } & React.RefAttributes<HTMLAnchorElement>>;
45
+
46
+ type ToolbarToggleGroupType = 'single' | 'multiple';
47
+
48
+ type ToolbarToggleGroupProps = React.ComponentPropsWithoutRef<'div'> & {
49
+ type?: ToolbarToggleGroupType;
50
+ value?: any;
51
+ defaultValue?: any;
52
+ onValueChange?: (value: any) => void;
53
+ disabled?: boolean;
54
+ };
55
+ declare const ToolbarToggleGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
56
+ type?: ToolbarToggleGroupType;
57
+ value?: any;
58
+ defaultValue?: any;
59
+ onValueChange?: (value: any) => void;
60
+ disabled?: boolean;
61
+ } & React.RefAttributes<HTMLDivElement>>;
62
+
63
+ type ToolbarToggleItemProps = React.ComponentPropsWithoutRef<typeof TogglePrimitive__default> & {
64
+ value: any;
65
+ };
66
+ declare const ToolbarToggleItem: React.ForwardRefExoticComponent<Omit<TogglePrimitive.TogglePrimitiveProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
67
+ value: any;
68
+ } & React.RefAttributes<HTMLButtonElement>>;
69
+
70
+ type ToolbarElement = React.ElementRef<'div'>;
71
+ type ToolbarProps = React.ComponentPropsWithoutRef<'div'>;
72
+ type ToolbarComponent = React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<ToolbarElement>> & {
73
+ Root: typeof ToolbarRoot;
74
+ Button: typeof ToolbarButton;
75
+ Separator: typeof ToolbarSeparator;
76
+ Link: typeof ToolbarLink;
77
+ ToggleGroup: typeof ToolbarToggleGroup;
78
+ ToggleItem: typeof ToolbarToggleItem;
79
+ };
80
+ declare const Toolbar: ToolbarComponent;
81
+
82
+ export { Toolbar as default };
83
+ export type { ToolbarButtonProps, ToolbarLinkProps, ToolbarRootProps, ToolbarSeparatorProps, ToolbarToggleGroupProps, ToolbarToggleItemProps };
@@ -0,0 +1 @@
1
+ 'use client';import o,{createContext as e}from"react";import{jsx as r}from"react/jsx-runtime";import{c as t}from"./clsx-BaVHROc5.js";import{c as a}from"./index-6If6D2Zi.js";import{P as s}from"./index-98jQ1vTr.js";import{R as l}from"./index-hAp0hL9w.js";import{B as i}from"./index-BOy86lYu.js";import n from"./Separator.js";import d from"./Link.js";import{u}from"./index-wRElCyvx.js";import{T as m}from"./index-BZVbVgqN.js";import"./index-3dZuI04X.js";import"./index-CXzybYmm.js";const c=e(null),p="Toolbar",f=o.forwardRef((({orientation:e="horizontal",loop:i=!1,dir:n="ltr",className:d="",customRootClass:u="",asChild:m=!1,children:f,...h},b)=>{const T=a(u,p),g=o.useMemo((()=>({rootClass:T,orientation:e,dir:n})),[T,e,n]),w={"data-orientation":e};return r(c.Provider,{value:g,children:r(l.Root,{orientation:e,loop:i,dir:n,children:r(l.Group,{children:r(s.div,{asChild:m,ref:b,role:"toolbar","aria-orientation":"vertical"===e?"vertical":void 0,dir:n,className:t(T,d),...w,...h,children:f})})})})}));f.displayName=p;const h=o.forwardRef((({className:e="",asChild:a=!1,type:s="button",...n},d)=>{const u=o.useContext(c);if(!u)throw new Error("Toolbar.Button must be used within Toolbar.Root");const{rootClass:m}=u;return r(l.Item,{children:r(i,{ref:d,className:t(`${m}-button`,e),asChild:a,type:a?void 0:s,...n})})}));h.displayName="ToolbarButton";const b=o.forwardRef((({className:e="",orientation:a,...s},l)=>{const i=o.useContext(c);if(!i)throw new Error("Toolbar.Separator must be used within Toolbar.Root");const{rootClass:d,orientation:u}=i;return r(n,{ref:l,...s,decorative:!0,orientation:a??("horizontal"===u?"vertical":"horizontal"),className:t(`${d}-separator`,e)})}));b.displayName="ToolbarSeparator";const T=o.forwardRef((({className:e="",asChild:a=!1,href:s="#",...i},n)=>{const u=o.useContext(c);if(!u)throw new Error("Toolbar.Link must be used within Toolbar.Root");const{rootClass:m}=u;return r(l.Item,{role:"link",children:r(d,{ref:n,asChild:a,href:s,className:t(`${m}-link`,e),...i})})}));T.displayName="ToolbarLink";const g=e(null),w=o.forwardRef((({type:e="single",value:a,defaultValue:s=[],onValueChange:l,disabled:i=!1,className:n="",children:d,...m},p)=>{const f=o.useContext(c);if(!f)throw new Error("Toolbar.ToggleGroup must be used within Toolbar.Root");const[h,b]=u(a,s,l),T=o.useMemo((()=>Array.isArray(h)?h:h?[h]:[]),[h]),w=o.useMemo((()=>({type:e,value:T,setValue:b,rootClass:f.rootClass,disabled:i})),[e,T,b,f.rootClass,i]);return r(g.Provider,{value:w,children:r("div",{ref:p,...m,role:"group",className:t(`${f.rootClass}-toggle-group`,n),children:d})})}));w.displayName="ToolbarToggleGroup";const C=o.forwardRef((({value:e,disabled:a=!1,className:s="",...i},n)=>{const d=o.useContext(g);if(!d)throw new Error("Toolbar.ToggleItem must be used within Toolbar.ToggleGroup");const u=d.value.includes(e),c=a||d.disabled;return r(l.Item,{children:r(m,{ref:n,pressed:u,disabled:c,onPressedChange:o=>{c||("single"!==d.type?o?d.setValue([...d.value,e]):d.setValue(d.value.filter((o=>o!==e))):d.setValue(o?[e]:[]))},className:t(`${d.rootClass}-toggle-item`,s),...i})})}));C.displayName="ToolbarToggleItem";const N=o.forwardRef(((o,e)=>("production"!==process.env.NODE_ENV&&console.warn("Direct usage of Toolbar is not supported. Please use Toolbar.Root, Toolbar.Button, etc. instead."),null)));N.displayName="Toolbar",N.Root=f,N.Button=h,N.Separator=b,N.Link=T,N.ToggleGroup=w,N.ToggleItem=C;export{N as default};
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import ButtonPrimitive from '~/core/primitives/Button';
2
3
  import Primitive from '~/core/primitives/Primitive';
3
4
 
4
5
  type Placement = 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
@@ -8,6 +9,10 @@ interface TooltipRootProps extends React.ComponentPropsWithoutRef<'div'> {
8
9
  }
9
10
  declare const TooltipRoot: React.ForwardRefExoticComponent<TooltipRootProps & React.RefAttributes<HTMLDivElement>>;
10
11
 
12
+ type TooltipTriggerProps = React.ComponentPropsWithoutRef<typeof ButtonPrimitive> & {
13
+ asChild?: boolean;
14
+ children: React.ReactNode;
15
+ };
11
16
  declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<{
12
17
  label?: string;
13
18
  description?: string;
@@ -33,3 +38,4 @@ interface TooltipComponent extends React.ForwardRefExoticComponent<React.Compone
33
38
  declare const Tooltip: TooltipComponent;
34
39
 
35
40
  export { Tooltip as default };
41
+ export type { TooltipContentProps, TooltipRootProps, TooltipTriggerProps };
@@ -1 +1 @@
1
- 'use client';import e,{createContext as t,useRef as r,useState as o,useContext as a}from"react";import{_ as i,b as n}from"./tslib.es6-B3RR16LH.js";import{a as s,k as l,o as d,f as c,s as p,d as f,i as m,e as u,j as g,g as w,u as v,D as h,r as T}from"./floating-ui.react-CLbXmKZY.js";import{B as x}from"./index-BxNZdFaZ.js";import{c as R}from"./clsx-BaVHROc5.js";import{P as E}from"./index-DR_GC01Z.js";import"react/jsx-runtime";import"react-dom";var j=t(null),y=e.forwardRef((function(t,a){var v=t.children,h=t.placement,T=void 0===h?"top":h,x=i(t,["children","placement"]),R=r(null),E=o(!1),y=E[0],C=E[1],b=s({placement:T,strategy:"fixed",onOpenChange:C,middleware:[l({element:R,padding:4}),d(5),c({crossAxis:!0,fallbackAxisSideDirection:"start",padding:5}),p({padding:5})]}),N=b.context,O=f(N,{move:!1}),P=m(N,{}),A=u(N),D=g(N,{role:"tooltip"}),k=w([O,P,A,D]);return e.createElement(j.Provider,{value:{isOpen:y,setIsOpen:C,data:b,interactions:k,context:N,arrowRef:R}},e.createElement("div",n({ref:a},x),v))}));y.displayName="Tooltip";var C=e.forwardRef((function(t,r){var o=t.children,s=t.asChild,l=i(t,["children","asChild"]),d=a(j);if(!d)throw new Error("TooltipTrigger must be used within a TooltipRoot component");var c=d.isOpen,p=d.interactions,f=d.context,m=p.getReferenceProps,u=o.ref,g=v([f.refs.setReference,r,u]);return e.createElement(x,n({asChild:s,ref:g,"data-state":c?"open":"closed"},m(l)),o)}));C.displayName="TooltipTrigger";var b=e.forwardRef((function(t,r){var o=t.children,s=t.showArrow,l=void 0===s||s,d=i(t,["children","showArrow"]),c=a(j);if(!c)throw new Error("TooltipContent must be used within a TooltipRoot component");var p=c.isOpen,f=c.data,m=c.interactions,u=c.context,g=c.arrowRef,w=v([u.refs.setFloating,r]);if(!p)return null;var x=m.getFloatingProps;return e.createElement(h,null,e.createElement(E.div,n({className:"rad-ui-tooltip-floating-element",ref:w,"data-state":p?"open":"closed",style:n({},f.floatingStyles)},x(d)),l&&e.createElement(T,{className:R("rad-ui-arrow rad-ui-arrow"),ref:g,context:u}),o))}));b.displayName="TooltipContent";var N=e.forwardRef((function(e,t){return console.warn("Direct usage of Tooltip is not supported. Please use Tooltip.Root, Tooltip.Trigger, etc. instead."),null}));N.displayName="Tooltip",N.Root=y,N.Trigger=C,N.Content=b;export{N as default};
1
+ 'use client';import e,{createContext as t,useRef as o,useState as r,useContext as n}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";import{a as s,k as l,o as c,f as d,s as p,d as f,i as m,e as u,j as g,g as h,u as w,D as T,r as R}from"./floating-ui.react-DMgxgTKq.js";import{B as x}from"./index-BOy86lYu.js";import{c as y}from"./clsx-BaVHROc5.js";import{P as j}from"./index-98jQ1vTr.js";import{T as v}from"./ThemeContext-Sm-iNANd.js";import"react-dom";const C=t(null),N=e.forwardRef((({children:e,placement:t="top",...n},i)=>{const w=o(null),[T,R]=r(!1),x=s({placement:t,strategy:"fixed",onOpenChange:R,middleware:[l({element:w,padding:4}),c(5),d({crossAxis:!0,fallbackAxisSideDirection:"start",padding:5}),p({padding:5})]}),y=x.context,j=f(y,{move:!1}),v=m(y,{}),N=u(y),O=g(y,{role:"tooltip"}),P=h([j,v,N,O]);return a(C.Provider,{value:{isOpen:T,setIsOpen:R,data:x,interactions:P,context:y,arrowRef:w},children:a("div",{ref:i,...n,children:e})})}));N.displayName="Tooltip";const O=e.forwardRef((({children:e,asChild:t,...o},r)=>{const i=n(C);if(!i)throw new Error("TooltipTrigger must be used within a TooltipRoot component");const{isOpen:s,interactions:l,context:c}=i,{getReferenceProps:d}=l,p=e.ref,f=w([c.refs.setReference,r,p]);return a(x,{asChild:t,ref:f,"data-state":s?"open":"closed",...d(o),children:e})}));O.displayName="TooltipTrigger";const P=e.forwardRef((({children:e,showArrow:t=!0,...o},r)=>{const s=n(C),l=n(v);if(!s)throw new Error("TooltipContent must be used within a TooltipRoot component");const{isOpen:c,data:d,interactions:p,context:f}=s,m=s.arrowRef,u=w([f.refs.setFloating,r]);if(!c)return null;const{getFloatingProps:g}=p,h=l?.portalRootRef.current||document.querySelector("[data-rad-ui-portal-root]")||l?.containerRef.current||document.querySelector("#rad-ui-theme-container")||void 0;return a(T,{root:h,children:a(j.div,{className:"rad-ui-tooltip-floating-element",ref:u,"data-state":c?"open":"closed",style:{...d.floatingStyles},...g(o),children:i("div",{className:"rad-ui-tooltip-content-inner",children:[t&&a(R,{className:y("rad-ui-arrow"),ref:m,context:f}),e]})})})}));P.displayName="TooltipContent";const b=e.forwardRef(((e,t)=>(console.warn("Direct usage of Tooltip is not supported. Please use Tooltip.Root, Tooltip.Trigger, etc. instead."),null)));b.displayName="Tooltip",b.Root=N,b.Trigger=O,b.Content=P;export{b as default};
@@ -1,5 +1,6 @@
1
1
  import React, { ComponentPropsWithoutRef } from 'react';
2
2
  import Primitive from '~/core/primitives/Primitive';
3
+ import ButtonPrimitive from '~/core/primitives/Button';
3
4
 
4
5
  type TreeRootProps = {
5
6
  customRootClass?: string;
@@ -8,6 +9,14 @@ type TreeRootProps = {
8
9
  } & ComponentPropsWithoutRef<typeof Primitive.div>;
9
10
  declare const TreeRoot: React.ForwardRefExoticComponent<TreeRootProps & React.RefAttributes<HTMLElement>>;
10
11
 
12
+ type TreeItemProps = {
13
+ item: any;
14
+ level?: number;
15
+ parentId?: string | null;
16
+ isSelected?: boolean;
17
+ onToggleSelect?: (id: string, item: any) => void;
18
+ getIsSelected?: (item: any) => boolean;
19
+ } & ComponentPropsWithoutRef<typeof ButtonPrimitive>;
11
20
  declare const TreeItem: React.ForwardRefExoticComponent<{
12
21
  item: any;
13
22
  level?: number;
@@ -34,4 +43,4 @@ type TreeComponent = React.ForwardRefExoticComponent<TreeProps & React.RefAttrib
34
43
  declare const Tree: TreeComponent;
35
44
 
36
45
  export { Tree as default };
37
- export type { TreeElement, TreeProps };
46
+ export type { TreeElement, TreeItemProps, TreeProps, TreeRootProps };
@@ -1 +1 @@
1
- 'use client';import{_ as e,b as t}from"./tslib.es6-B3RR16LH.js";import l,{createContext as a,forwardRef as r,useRef as n,useImperativeHandle as o,useId as i,useState as s,useContext as c}from"react";import{R as d}from"./index-Br4Ygpsh.js";import{P as m}from"./index-DR_GC01Z.js";import{c as u}from"./index-BVxS3Ixi.js";import{c as f}from"./clsx-BaVHROc5.js";import{B as v}from"./index-BxNZdFaZ.js";var p=a({rootClass:"",treeRef:{current:null}}),g="Tree",b=r((function(a,r){var i=a.children,s=a.className,c=void 0===s?"":s,v=a.customRootClass,b=void 0===v?"":v,h=a["aria-label"],E=a["aria-labelledby"],y=e(a,["children","className","customRootClass","aria-label","aria-labelledby"]),S=n(null);o(r,(function(){return S.current}));var I=u(b,g),N={rootClass:I,treeRef:S};return l.createElement(p.Provider,{value:N},l.createElement(d.Root,{orientation:"vertical",mode:"tree"},l.createElement(d.Group,null,l.createElement(m.div,t({className:f(I,c),ref:S,role:"tree","aria-label":h,"aria-labelledby":E},y),i))))}));b.displayName=g;var h=r((function(a,r){var m=a.children,u=a.item,g=a.level,b=void 0===g?0:g,E=a.className,y=void 0===E?"":E,S=a.parentId,I=void 0===S?null:S,N=a.isSelected,R=void 0!==N&&N,T=a.onToggleSelect,x=a.getIsSelected,C=e(a,["children","item","level","className","parentId","isSelected","onToggleSelect","getIsSelected"]),j=i(),D=n(null);o(r,(function(){return D.current}));var k=s(!1),w=k[0],P=k[1],K=c(p).rootClass;return l.createElement(l.Fragment,null,l.createElement(d.Item,{handleRightKeyDown:function(){if(console.log("handleExpand",j),u.items&&0!==u.items.length)if(w){var e=D.current,t=null==e?void 0:e.nextElementSibling;t&&t.focus()}else P(!0)},handleLeftKeyDown:function(){if(console.log("handleCollapse",j),w)P(!1);else if(I){var e=document.querySelector('[data-id="'.concat(I,'"]'));e&&e.focus(),P(!1)}}},l.createElement(v,t({ref:D,className:f("".concat(K,"-item"),y),onClick:function(){console.log("clicked",j),T&&T(j,u),(null==u?void 0:u.items)&&u.items.length>0&&P((function(e){return!e}))},onKeyDownCapture:function(e){"Enter"===e.key&&(T&&T(j,u),e.preventDefault(),e.stopPropagation())},"data-selected":R,"aria-selected":R,"data-toggled":w,"data-id":j,"data-parent-id":I,"data-level":b},C),m)),w&&u.items&&l.createElement(l.Fragment,null,u.items.map((function(e){var t=b+1,a=!!x&&x(e);return l.createElement(h,{parentId:j,level:t,key:e.label,item:e,isSelected:a,onToggleSelect:T,getIsSelected:x},e.label)}))))}));h.displayName="TreeItem";var E=r((function(a,r){var n=a.children,o=e(a,["children"]);return console.warn("Direct usage of Tree is not supported. Please use Tree.Root and Tree.Item instead."),l.createElement("div",t({ref:r},o),n)}));E.displayName="Tree",E.Root=b,E.Item=h;export{E as default};
1
+ 'use client';import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{createContext as l,forwardRef as o,useRef as a,useImperativeHandle as n,useId as i,useState as s,useContext as d}from"react";import{R as c}from"./index-hAp0hL9w.js";import{P as m}from"./index-98jQ1vTr.js";import{c as u}from"./index-6If6D2Zi.js";import{c as h}from"./clsx-BaVHROc5.js";import{B as p}from"./index-BOy86lYu.js";const f=l({rootClass:"",treeRef:{current:null}}),g="Tree",v=o((({children:t,className:r="",customRootClass:l="","aria-label":o,"aria-labelledby":i,...s},d)=>{const p=a(null);n(d,(()=>p.current));const v=u(l,g),b={rootClass:v,treeRef:p};return e(f.Provider,{value:b,children:e(c.Root,{orientation:"vertical",mode:"tree",children:e(c.Group,{children:e(m.div,{className:h(v,r),ref:p,role:"tree","aria-label":o,"aria-labelledby":i,...s,children:t})})})})}));v.displayName=g;const b=o((({children:l,item:o,level:m=0,className:u="",parentId:g=null,isSelected:v=!1,onToggleSelect:x,getIsSelected:y,...w},N)=>{const S=i(),I=a(null);n(N,(()=>I.current));const R=Boolean(o?.items?.length),[T,j]=s((()=>Boolean(o?.expanded))),{rootClass:C}=d(f);return t(r,{children:[e(c.Item,{handleRightKeyDown:()=>{if(R)if(T){const e=I.current,t=e?.nextElementSibling;if(!t)return;if("group"===t.getAttribute("role")){const e=t.querySelector('[role="treeitem"]');return void e?.focus()}t.matches('[role="treeitem"]')&&t.focus()}else j(!0)},handleLeftKeyDown:()=>{if(T)return void j(!1);if(!g)return;const e=document.querySelector(`[data-id="${g}"]`);e&&e.focus(),j(!1)},role:"treeitem",children:t(p,{ref:I,className:h(`${C}-item`,u),onClick:()=>{x&&x(S,o),R&&j((e=>!e))},onKeyDownCapture:e=>{"Enter"===e.key&&(x&&x(S,o),e.preventDefault(),e.stopPropagation())},type:"button","data-selected":v,"aria-selected":v,"aria-expanded":R?T:void 0,"data-toggled":T,"data-has-children":R,"data-id":S,"data-parent-id":g,"data-level":m,...w,children:[e("span",{className:`${C}-item-chevron`,"aria-hidden":!0,children:R?e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false",children:e("path",{d:"M4.5 2.5L7.5 6L4.5 9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),e("span",{className:`${C}-item-label`,children:l})]})}),T&&o.items&&e("div",{className:`${C}-branch`,role:"group",children:o.items.map((t=>{const r=m+1,l=!!y&&y(t);return e(b,{parentId:S,level:r,item:t,isSelected:l,onToggleSelect:x,getIsSelected:y,children:t.label},t.label)}))})]})}));b.displayName="TreeItem";const x=o((({children:t,...r},l)=>(console.warn("Direct usage of Tree is not supported. Please use Tree.Root and Tree.Item instead."),e("div",{ref:l,...r,children:t}))));x.displayName="Tree",x.Root=v,x.Item=b;export{x as default};
@@ -1,4 +1,4 @@
1
- import React, { CSSProperties, ComponentPropsWithoutRef, ElementRef } from 'react';
1
+ import React, { ElementRef, CSSProperties, ComponentPropsWithoutRef } from 'react';
2
2
  import Primitive from '~/core/primitives/Primitive';
3
3
 
4
4
  type VisuallyHiddenElement = ElementRef<typeof Primitive.div>;
@@ -1 +1 @@
1
- 'use client';import{_ as e,b as s}from"./tslib.es6-B3RR16LH.js";import t,{forwardRef as o}from"react";import{P as a}from"./index-DR_GC01Z.js";import{c as i}from"./index-BVxS3Ixi.js";import{c as r}from"./clsx-BaVHROc5.js";var l="VisuallyHidden",n={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",pointerEvents:"none",userSelect:"none"},c=o((function(o,c){var m=o.children,p=o.customRootClass,d=o.className,f=o.style,h=void 0===f?{}:f,u=e(o,["children","customRootClass","className","style"]),x=i(p,l);return t.createElement(a.div,s({ref:c,className:r(x,d),style:s(s({},n),h)},u),m)}));c.displayName=l;export{c as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import{forwardRef as t}from"react";import{P as r}from"./index-98jQ1vTr.js";import{c as s}from"./index-6If6D2Zi.js";import{c as i}from"./clsx-BaVHROc5.js";const o="VisuallyHidden",a={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",pointerEvents:"none",userSelect:"none"},n=t((({children:t,customRootClass:n,className:c,style:l={},...p},m)=>{const d=s(n,o);return e(r.div,{ref:m,className:i(d,c),style:{...a,...l},...p,children:t})}));n.displayName=o;export{n as default};
@@ -0,0 +1,44 @@
1
+ 'use client';import{forwardRef as e,createElement as r}from"react";
2
+ /**
3
+ * @license lucide-react v0.575.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const t=(...e)=>e.filter(((e,r,t)=>Boolean(e)&&""!==e.trim()&&t.indexOf(e)===r)).join(" ").trim()
8
+ /**
9
+ * @license lucide-react v0.575.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */,o=e=>{const r=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,((e,r,t)=>t?t.toUpperCase():r.toLowerCase())))
14
+ /**
15
+ * @license lucide-react v0.575.0 - ISC
16
+ *
17
+ * This source code is licensed under the ISC license.
18
+ * See the LICENSE file in the root directory of this source tree.
19
+ */(e);return r.charAt(0).toUpperCase()+r.slice(1)};
20
+ /**
21
+ * @license lucide-react v0.575.0 - ISC
22
+ *
23
+ * This source code is licensed under the ISC license.
24
+ * See the LICENSE file in the root directory of this source tree.
25
+ */
26
+ var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
27
+ /**
28
+ * @license lucide-react v0.575.0 - ISC
29
+ *
30
+ * This source code is licensed under the ISC license.
31
+ * See the LICENSE file in the root directory of this source tree.
32
+ */const s=e=>{for(const r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0;return!1},a=e((({color:e="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:n,className:c="",children:l,iconNode:d,...h},u)=>r("svg",{ref:u,...i,width:o,height:o,stroke:e,strokeWidth:n?24*Number(a)/Number(o):a,className:t("lucide",c),...!l&&!s(h)&&{"aria-hidden":"true"},...h},[...d.map((([e,t])=>r(e,t))),...Array.isArray(l)?l:[l]]))),n=((i,s)=>{const n=e((({className:e,...n},c)=>{return r(a,{ref:c,iconNode:s,className:t(`lucide-${l=o(i),l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${i}`,e),...n});var l;
33
+ /**
34
+ * @license lucide-react v0.575.0 - ISC
35
+ *
36
+ * This source code is licensed under the ISC license.
37
+ * See the LICENSE file in the root directory of this source tree.
38
+ */}));return n.displayName=o(i),n})("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);
39
+ /**
40
+ * @license lucide-react v0.575.0 - ISC
41
+ *
42
+ * This source code is licensed under the ISC license.
43
+ * See the LICENSE file in the root directory of this source tree.
44
+ */export{n as C};