@radui/ui 0.0.47 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/README.md +12 -4
  2. package/dist/components/Accordion.d.ts +23 -40
  3. package/dist/components/Accordion.js +1 -1
  4. package/dist/components/AlertDialog.d.ts +79 -25
  5. package/dist/components/AlertDialog.js +1 -1
  6. package/dist/components/AspectRatio.d.ts +6 -9
  7. package/dist/components/AspectRatio.js +1 -1
  8. package/dist/components/Avatar.d.ts +9 -17
  9. package/dist/components/Avatar.js +1 -1
  10. package/dist/components/AvatarGroup.d.ts +21 -17
  11. package/dist/components/AvatarGroup.js +1 -1
  12. package/dist/components/AvatarPrimitiveFallback-BV0bK5Qg.js +1 -0
  13. package/dist/components/Badge.d.ts +7 -5
  14. package/dist/components/Badge.js +1 -1
  15. package/dist/components/BlockQuote.d.ts +7 -8
  16. package/dist/components/BlockQuote.js +1 -1
  17. package/dist/components/Button.d.ts +15 -6
  18. package/dist/components/Button.js +1 -1
  19. package/dist/components/Callout.d.ts +24 -29
  20. package/dist/components/Callout.js +1 -1
  21. package/dist/components/Card.d.ts +7 -15
  22. package/dist/components/Card.js +1 -1
  23. package/dist/components/Checkbox.d.ts +27 -17
  24. package/dist/components/Checkbox.js +1 -1
  25. package/dist/components/CheckboxCards.d.ts +28 -31
  26. package/dist/components/CheckboxCards.js +1 -1
  27. package/dist/components/CheckboxGroup.d.ts +31 -31
  28. package/dist/components/CheckboxGroup.js +1 -1
  29. package/dist/components/CheckboxGroupPrimitive-DrGqSxi3.js +1 -0
  30. package/dist/components/Code.d.ts +7 -3
  31. package/dist/components/Code.js +1 -1
  32. package/dist/components/Collapsible.d.ts +16 -22
  33. package/dist/components/Collapsible.js +1 -1
  34. package/dist/components/ContextMenu.d.ts +78 -35
  35. package/dist/components/ContextMenu.js +1 -1
  36. package/dist/components/DataList.d.ts +9 -17
  37. package/dist/components/DataList.js +1 -1
  38. package/dist/components/Dialog.d.ts +78 -32
  39. package/dist/components/Dialog.js +1 -1
  40. package/dist/components/Disclosure.d.ts +20 -26
  41. package/dist/components/Disclosure.js +1 -1
  42. package/dist/components/DropdownMenu.d.ts +78 -35
  43. package/dist/components/DropdownMenu.js +1 -1
  44. package/dist/components/Em.d.ts +5 -9
  45. package/dist/components/Em.js +1 -1
  46. package/dist/components/Heading.d.ts +7 -275
  47. package/dist/components/Heading.js +1 -1
  48. package/dist/components/HoverCard.d.ts +34 -33
  49. package/dist/components/HoverCard.js +1 -1
  50. package/dist/components/Kbd.d.ts +6 -8
  51. package/dist/components/Kbd.js +1 -1
  52. package/dist/components/Link.d.ts +6 -12
  53. package/dist/components/Link.js +1 -1
  54. package/dist/components/MenuPrimitive-DuUPySFO.js +1 -0
  55. package/dist/components/Menubar.d.ts +68 -45
  56. package/dist/components/Menubar.js +1 -1
  57. package/dist/components/Minimap.d.ts +48 -0
  58. package/dist/components/Minimap.js +1 -0
  59. package/dist/components/NavigationMenu.d.ts +35 -0
  60. package/dist/components/NavigationMenu.js +1 -0
  61. package/dist/components/NumberField.d.ts +17 -37
  62. package/dist/components/NumberField.js +1 -1
  63. package/dist/components/Progress.d.ts +22 -19
  64. package/dist/components/Progress.js +1 -1
  65. package/dist/components/Quote.d.ts +4 -8
  66. package/dist/components/Quote.js +1 -1
  67. package/dist/components/Radio.d.ts +11 -4
  68. package/dist/components/Radio.js +1 -1
  69. package/dist/components/RadioCards.d.ts +32 -35
  70. package/dist/components/RadioCards.js +1 -1
  71. package/dist/components/RadioGroup.d.ts +34 -37
  72. package/dist/components/RadioGroup.js +1 -1
  73. package/dist/components/RadioGroupPrimitive-D9grAL7G.js +1 -0
  74. package/dist/components/ScrollArea.d.ts +22 -14
  75. package/dist/components/ScrollArea.js +1 -1
  76. package/dist/components/Select.d.ts +69 -16
  77. package/dist/components/Select.js +1 -1
  78. package/dist/components/Separator.d.ts +5 -9
  79. package/dist/components/Separator.js +1 -1
  80. package/dist/components/Skeleton.d.ts +8 -7
  81. package/dist/components/Skeleton.js +1 -1
  82. package/dist/components/Slider.d.ts +78 -26
  83. package/dist/components/Slider.js +1 -1
  84. package/dist/components/Splitter.d.ts +57 -0
  85. package/dist/components/Splitter.js +1 -0
  86. package/dist/components/Steps.d.ts +38 -0
  87. package/dist/components/Steps.js +1 -0
  88. package/dist/components/Strong.d.ts +6 -7
  89. package/dist/components/Strong.js +1 -1
  90. package/dist/components/Switch.d.ts +28 -6
  91. package/dist/components/Switch.js +1 -1
  92. package/dist/components/TabNav.d.ts +15 -25
  93. package/dist/components/TabNav.js +1 -1
  94. package/dist/components/Table.d.ts +23 -27
  95. package/dist/components/Table.js +1 -1
  96. package/dist/components/Tabs.d.ts +23 -44
  97. package/dist/components/Tabs.js +1 -1
  98. package/dist/components/Text.d.ts +8 -274
  99. package/dist/components/Text.js +1 -1
  100. package/dist/components/TextArea.d.ts +9 -14
  101. package/dist/components/TextArea.js +1 -1
  102. package/dist/components/Theme.d.ts +9 -5
  103. package/dist/components/Theme.js +1 -1
  104. package/dist/components/Toggle.d.ts +8 -19
  105. package/dist/components/Toggle.js +1 -1
  106. package/dist/components/ToggleGroup.d.ts +55 -34
  107. package/dist/components/ToggleGroup.js +1 -1
  108. package/dist/components/Tooltip.d.ts +31 -18
  109. package/dist/components/Tooltip.js +1 -1
  110. package/dist/components/Tree.d.ts +31 -14
  111. package/dist/components/Tree.js +1 -1
  112. package/dist/components/VisuallyHidden.d.ts +6 -10
  113. package/dist/components/VisuallyHidden.js +1 -1
  114. package/dist/components/{floating-ui.react-jh3caJnc.js → floating-ui.react-CLbXmKZY.js} +2 -2
  115. package/dist/components/index-BRmT6kl7.js +1 -0
  116. package/dist/components/index-Bf4LVEjJ.js +1 -0
  117. package/dist/components/index-BtoPzkH9.js +1 -0
  118. package/dist/components/index-DBZNt4Em.js +1 -0
  119. package/dist/components/index-Dc5Cm9z0.js +1 -0
  120. package/dist/components/index-Di6TooPD.js +1 -0
  121. package/dist/components/{index-8D8A0ALD.js → index-DnCiOYxZ.js} +1 -1
  122. package/dist/components/index-XqbKa2D2.js +1 -0
  123. package/dist/components/index-YgKcfT__.js +1 -0
  124. package/dist/themes/default.css +1 -1
  125. package/package.json +21 -3
  126. package/dist/components/AvatarPrimitiveFallback-CSD78PQE.js +0 -1
  127. package/dist/components/CheckboxGroupPrimitive-PcT11bev.js +0 -1
  128. package/dist/components/MenuPrimitive-M690K2sI.js +0 -1
  129. package/dist/components/RadioGroupPrimitive-CUgW2PyL.js +0 -1
  130. package/dist/components/index-BNg6qXF-.js +0 -1
  131. package/dist/components/index-CaFVBHZz.js +0 -1
  132. package/dist/components/index-CyT0hgZn.js +0 -1
  133. package/dist/components/index-DAboJYKJ.js +0 -1
  134. package/dist/components/index-DIw4zyNG.js +0 -1
  135. package/dist/components/index-DpUtikes.js +0 -1
  136. package/dist/components/index-ZMIfeyHL.js +0 -1
  137. package/dist/components/setupTests.d.ts +0 -3
@@ -1 +1 @@
1
- 'use client';import{_ as e,a as t,b as n}from"./tslib.es6-BtVxab8e.js";import r from"react";import{c as o}from"./index-BVxS3Ixi.js";import{c as a}from"./clsx-BaVHROc5.js";import{F as s}from"./index-DAboJYKJ.js";import{M as l}from"./MenuPrimitive-M690K2sI.js";import"./floating-ui.react-jh3caJnc.js";import"react/jsx-runtime";import"react-dom";import"./index-fkj4Fdgt.js";import"./index-8D8A0ALD.js";import"./index-DIw4zyNG.js";var u=r.createContext(null),i=r.createContext(null),c=function(){return console.warn("Direct usage of Menubar is not supported. Please use Menubar.Root, Menubar.Item instead."),null};c.Root=function(l){var i=l.children,c=l.customRootClass,m=l.className,d=l.dir,f=l.loop,b=e(l,["children","customRootClass","className","dir","loop"]),g=o(c,"Menubar"),h=r.useState([]),p=h[0],v=h[1],C=r.useState(0),M=C[0],N=C[1],x=function(e,n){v((function(r){return r.map((function(r){return r.id===e?t(t({},r),{state:n}):r}))}))};return r.createElement(u.Provider,{value:{rootClass:g,registerItem:function(e,r){void 0===r&&(r="closed"),v((function(o){return o.find((function(t){return t.id===e}))?o.map((function(n){return n.id===e?t(t({},n),{state:r}):n})):n(n([],o,!0),[{id:e,state:r}],!1)}))},items:p,updateItemState:x}},r.createElement(s.Composite,t({className:a("".concat(g,"-root"),m),dir:d,loop:f},b,{activeIndex:M,onNavigate:function(e){var t=p[M],n=p[e];if(t&&x(t.id,"closed"),n){var r="open"===(null==t?void 0:t.state);x(n.id,r?"open":"closed")}N(e)}}),i))},c.Menu=function(n){var o,c=n.children,m=n.className,d=e(n,["children","className"]),f=r.useContext(u),b=s.useId();if(!f)return console.log("MenubarMenu should be used in the MenubarRoot"),null;var g=f.rootClass,h=f.registerItem,p=f.items,v=f.updateItemState;r.useEffect((function(){b&&h(b)}),[b]);var C="open"===(null===(o=p.find((function(e){return e.id===b})))||void 0===o?void 0:o.state);return r.createElement(l.Root,t({className:a("".concat(g,"-menu"),m),"data-id":b,"data-active":C,open:C,onOpenChange:function(e){return b&&v(b,e?"open":"closed")}},d),r.createElement(i.Provider,{value:{isOpen:C}},c))},c.Trigger=function(n){var o=n.children,c=n.className,m=e(n,["children","className"]),d=r.useContext(u),f=r.useContext(i);if(!d)return console.log("MenubarTrigger should be used in the MenubarRoot"),null;var b=d.rootClass;if(!f)return console.log("MenubarTrigger should be used in the MenubarMenu"),null;var g=f.isOpen;return r.createElement(s.CompositeItem,{render:function(){return r.createElement(l.Trigger,t({className:a("".concat(b,"-trigger"),c),"data-active":g},m),o)}})},c.Content=function(n){var o=n.children,s=n.className,i=e(n,["children","className"]),c=r.useContext(u);if(!c)return console.log("MenubarContent should be used in the MenubarRoot"),null;var m=c.rootClass;return r.createElement(l.Content,t({className:a("".concat(m,"-content"),s)},i),o)},c.Portal=function(e){var t=e.children,n=r.useContext(u);return n?(n.rootClass,r.createElement(l.Portal,null,t)):(console.log("MenubarPortal should be used in the MenubarRoot"),null)},c.Item=function(n){var o=n.children,s=n.className,i=n.label,c=e(n,["children","className","label"]),m=r.useContext(u);if(!m)return console.log("MenubarItem should be used in the MenubarRoot"),null;var d=m.rootClass;return r.createElement(l.Item,t({className:a("".concat(d,"-item"),s),label:i},c),o)},c.Sub=function(n){var o=n.children,s=n.className,i=e(n,["children","className"]),c=r.useContext(u);if(!c)return console.log("MenubarSub should be used in the MenubarRoot"),null;var m=c.rootClass;return r.createElement(l.Sub,t({className:a("".concat(m,"-sub"),s)},i),o)},c.SubTrigger=function(n){var o=n.children,s=n.className,i=e(n,["children","className"]),c=r.useContext(u);if(!c)return console.log("MenubarSubTrigger should be used in the MenubarRoot"),null;var m=c.rootClass;return r.createElement(l.Trigger,t({className:a("".concat(m,"-sub-trigger"),s)},i),o)};export{c as default};
1
+ 'use client';import{_ as e,a as r,b as t}from"./tslib.es6-BtVxab8e.js";import n,{forwardRef as a}from"react";import{c as o}from"./index-BVxS3Ixi.js";import{c as s}from"./clsx-BaVHROc5.js";import{F as u}from"./index-Di6TooPD.js";import{M as l}from"./MenuPrimitive-DuUPySFO.js";import"./floating-ui.react-CLbXmKZY.js";import"react/jsx-runtime";import"react-dom";import"./index-fkj4Fdgt.js";import"./index-DnCiOYxZ.js";import"./index-Dc5Cm9z0.js";var i=n.createContext(null),c=a((function(a,l){var c=a.children,m=a.customRootClass,d=a.className,b=a.dir,f=a.loop,p=e(a,["children","customRootClass","className","dir","loop"]),v=o(m,"Menubar"),g=n.useState([]),M=g[0],h=g[1],N=n.useState(0),C=N[0],x=N[1],R=function(e,t){h((function(n){return n.map((function(n){return n.id===e?r(r({},n),{state:t}):n}))}))};return n.createElement(i.Provider,{value:{rootClass:v,registerItem:function(e,n){void 0===n&&(n="closed"),h((function(a){return a.find((function(r){return r.id===e}))?a.map((function(t){return t.id===e?r(r({},t),{state:n}):t})):t(t([],a,!0),[{id:e,state:n}],!1)}))},items:M,updateItemState:R}},n.createElement(u.Composite,r({ref:l,className:s("".concat(v,"-root"),d),dir:b,loop:f},p,{activeIndex:C,onNavigate:function(e){var r=M[C],t=M[e];if(r&&R(r.id,"closed"),t){var n="open"===(null==r?void 0:r.state);R(t.id,n?"open":"closed")}x(e)}}),c))}));c.displayName="MenubarRoot";var m=n.createContext(null),d=a((function(t,a){var o=t.children,c=t.className,d=e(t,["children","className"]),b=n.useContext(i),f=n.useContext(m);if(!b)return console.log("MenubarTrigger should be used in the MenubarRoot"),null;var p=b.rootClass;if(!f)return console.log("MenubarTrigger should be used in the MenubarMenu"),null;var v=f.isOpen;return n.createElement(u.CompositeItem,{render:function(){return n.createElement(l.Trigger,r({ref:a,className:s("".concat(p,"-trigger"),c),"data-active":v},d),o)}})}));d.displayName="MenubarTrigger";var b=a((function(t,a){var o=t.children,u=t.className,c=e(t,["children","className"]),m=n.useContext(i);if(!m)return console.log("MenubarContent should be used in the MenubarRoot"),null;var d=m.rootClass;return n.createElement(l.Content,r({ref:a,className:s("".concat(d,"-content"),u)},c),o)}));b.displayName="MenubarContent";var f=a((function(t,a){var o=t.children,s=e(t,["children"]);return n.useContext(i)?n.createElement(l.Portal,r({ref:a},s),o):(console.log("MenubarPortal should be used in the MenubarRoot"),null)}));f.displayName="MenubarPortal";var p=a((function(t,a){var o=t.children,u=t.className,c=t.label,m=e(t,["children","className","label"]),d=n.useContext(i);if(!d)return console.log("MenubarItem should be used in the MenubarRoot"),null;var b=d.rootClass;return n.createElement(l.Item,r({ref:a,className:s("".concat(b,"-item"),u),label:c},m),o)}));p.displayName="MenubarItem";var v=a((function(t,a){var o=t.children,u=t.className,c=e(t,["children","className"]),m=n.useContext(i);if(!m)return console.log("MenubarSub should be used in the MenubarRoot"),null;var d=m.rootClass;return n.createElement(l.Sub,r({ref:a,className:s("".concat(d,"-sub"),u)},c),o)}));v.displayName="MenubarSub";var g=a((function(t,a){var o=t.children,u=t.className,c=e(t,["children","className"]),m=n.useContext(i);if(!m)return console.log("MenubarSubTrigger should be used in the MenubarRoot"),null;var d=m.rootClass;return n.createElement(l.Trigger,r({ref:a,className:s("".concat(d,"-sub-trigger"),u)},c),o)}));g.displayName="MenubarSubTrigger";var M=a((function(t,a){var o,c=t.children,d=t.className,b=e(t,["children","className"]),f=n.useContext(i),p=u.useId();if(!f)return console.log("MenubarMenu should be used in the MenubarRoot"),null;var v=f.rootClass,g=f.registerItem,M=f.items,h=f.updateItemState;n.useEffect((function(){p&&g(p)}),[p]);var N="open"===(null===(o=M.find((function(e){return e.id===p})))||void 0===o?void 0:o.state);return n.createElement(l.Root,r({ref:a,className:s("".concat(v,"-menu"),d),"data-id":p,"data-active":N,open:N,onOpenChange:function(e){return p&&h(p,e?"open":"closed")}},b),n.createElement(m.Provider,{value:{isOpen:N}},c))}));M.displayName="MenubarMenu";var h=function(){return console.warn("Direct usage of Menubar is not supported. Please use Menubar.Root, Menubar.Item instead."),null};h.Root=c,h.Menu=M,h.Trigger=d,h.Content=b,h.Portal=f,h.Item=p,h.Sub=v,h.SubTrigger=g;export{h as default};
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+
3
+ type MinimapRootProps = React.HTMLAttributes<HTMLDivElement> & {
4
+ customRootClass?: string;
5
+ };
6
+ declare const MinimapRoot: ({ children, className, customRootClass, ...props }: MinimapRootProps) => React.JSX.Element;
7
+
8
+ type MinimapItemProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
9
+ value: string;
10
+ };
11
+ declare const MinimapItem: ({ children, className, value, ...props }: MinimapItemProps) => React.JSX.Element;
12
+
13
+ declare const MinimapTrack: ({ children, className, ...props }: MinimapTrackProps) => React.JSX.Element;
14
+
15
+ type MinimapLineProps = React.HTMLAttributes<HTMLDivElement>;
16
+ declare const MinimapLine: ({ children, className, ...props }: MinimapLineProps) => React.JSX.Element;
17
+
18
+ type MinimapContentProps = React.HTMLAttributes<HTMLDivElement>;
19
+ declare const MinimapContent: ({ children, className, ...props }: MinimapContentProps) => React.JSX.Element;
20
+
21
+ type MinimapBubbleProps = React.HTMLAttributes<HTMLDivElement>;
22
+ declare const MinimapBubble: ({ children, className, ...props }: MinimapBubbleProps) => React.JSX.Element;
23
+
24
+ type MinimapProviderProps = React.HTMLAttributes<HTMLDivElement> & {
25
+ children: React.ReactNode;
26
+ scrollable?: boolean;
27
+ };
28
+ declare const MinimapProvider: ({ children, className, scrollable, ...props }: MinimapProviderProps) => React.JSX.Element;
29
+
30
+ type MinimapWaypointProps = React.HTMLAttributes<HTMLDivElement> & {
31
+ value?: string | null;
32
+ };
33
+ declare const MinimapWaypoint: ({ children, className, value, ...props }: MinimapWaypointProps) => React.JSX.Element;
34
+
35
+ declare const MinimapComponent: () => null;
36
+ type MinimapComponentType = typeof MinimapComponent & {
37
+ Root: typeof MinimapRoot;
38
+ Item: typeof MinimapItem;
39
+ Track: typeof MinimapTrack;
40
+ Line: typeof MinimapLine;
41
+ Content: typeof MinimapContent;
42
+ Bubble: typeof MinimapBubble;
43
+ Provider: typeof MinimapProvider;
44
+ Waypoint: typeof MinimapWaypoint;
45
+ };
46
+ declare const Minimap: MinimapComponentType;
47
+
48
+ export { Minimap as default };
@@ -0,0 +1 @@
1
+ 'use client';import{_ as e,a as t,b as n}from"./tslib.es6-BtVxab8e.js";import o,{createContext as r,useRef as l,useEffect as a}from"react";import{c as i}from"./clsx-BaVHROc5.js";import{c as s}from"./index-BVxS3Ixi.js";import{P as c}from"./index-Dc5Cm9z0.js";import{R as u}from"./index-BRmT6kl7.js";import"./index-DnCiOYxZ.js";var m=r({rootClass:"",rootRef:null}),d=r({value:"",isVisible:!1}),f=r({visibleItems:[],handleInView:function(){},handleOutView:function(){},scrollToItem:function(){},registerRef:function(){}});function v(e){if(!e)return null;var t=window.getComputedStyle(e).overflowY;return"auto"===t||"scroll"===t?e:v(e.parentElement)}function h(e){var t=e.onEnter,n=e.onLeave,o=e.threshold,r=void 0===o?0:o,i=e.rootMargin,s=void 0===i?"0px":i,c=e.root,u=l(null);return a((function(){if("undefined"!=typeof window&&"IntersectionObserver"in window&&u.current){var e=null!=c?c:v(u.current),o=new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting?null==t||t():null==n||n()}))}),{threshold:r,rootMargin:s,root:e});return o.observe(u.current),function(){u.current&&o.unobserve(u.current),o.disconnect()}}}),[t,n,r,s,c]),u}var C=Object.assign((function(){return console.warn("Direct usage of Minimap is not supported. Please use Minimap.Root, Minimap.Item instead."),null}),{Root:function(n){var r=n.children,l=n.className,a=n.customRootClass,d=void 0===a?"":a,f=e(n,["children","className","customRootClass"]),v=s(d,"Minimap"),h=o.useRef(null);return o.createElement(m.Provider,{value:{rootClass:v,rootRef:h}},o.createElement(u.Root,{loop:!0,orientation:"both"},o.createElement(u.Group,null,o.createElement(c.div,t({ref:h,className:i(v,l)},f),r))))},Item:function(n){var r=n.children,l=n.className,a=void 0===l?"":l,s=n.value,v=e(n,["children","className","value"]),h=(o.useContext(m)||{rootClass:""}).rootClass,C=o.useContext(f),b=C.visibleItems,p=C.scrollToItem,w=b.includes(s),N=o.useMemo((function(){return{value:s,isVisible:w}}),[s,w]),g=o.useCallback((function(){p(s)}),[s,p]);return o.createElement(d.Provider,{value:N},o.createElement(u.Item,{value:s},o.createElement(c.button,t({onClick:g,className:i("".concat(h,"-item"),a),"data-in-view":w?"true":"false"},v),r)))},Track:function(n){var r=n.children,l=n.className,a=void 0===l?"":l,s=e(n,["children","className"]),c=o.useContext(m).rootClass;return o.createElement("div",t({className:i("".concat(c,"-track"),a)},s),r)},Line:function(n){var r=n.children,l=n.className,a=void 0===l?"":l,s=e(n,["children","className"]),c=(o.useContext(m)||{rootClass:""}).rootClass,u=(o.useContext(d)||{value:""}).value,v=o.useContext(f).visibleItems,h=v.indexOf(u),C=-1!==h,b=-1!==h&&h<v.length-1,p=C&&b;return o.createElement("div",t({className:i("".concat(c,"-line"),a),"data-in-view":p?"true":"false"},s),r)},Content:function(n){var r=n.children,l=n.className,a=void 0===l?"":l,s=e(n,["children","className"]),c=o.useContext(m).rootClass;return o.createElement("div",t({className:i("".concat(c,"-content"),a)},s),r)},Bubble:function(n){var r=n.children,l=n.className,a=void 0===l?"":l,s=e(n,["children","className"]),c=(o.useContext(m)||{rootClass:""}).rootClass,u=(o.useContext(d)||{isVisible:!1}).isVisible;return o.createElement("div",t({className:i("".concat(c,"-bubble"),a),"data-in-view":u?"true":"false"},s),r)},Provider:function(r){var l=r.children,a=r.className,i=void 0===a?"":a,s=r.scrollable,c=e(r,["children","className","scrollable"]),u=o.useState([]),m=u[0],d=u[1],v=o.useRef(new Map),h=o.useRef(null),C=o.useCallback((function(e,t){t?v.current.set(e,t):v.current.delete(e)}),[]),b=o.useCallback((function(e){d((function(t){return null===e||t.includes(e)?t:n(n([],t,!0),[e],!1).sort((function(e,t){var n=v.current.get(e),o=v.current.get(t);return n&&o?n.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1:0}))}))}),[]),p=o.useCallback((function(e){d((function(t){return null!==e&&t.includes(e)?t.filter((function(t){return t!==e})):t}))}),[]),w=o.useCallback((function(e){var t=v.current.get(e);if(t){var n=null;if(s&&h.current)n=h.current;else{var o=function(e){if(!e||e===document.body)return null;var t=window.getComputedStyle(e);return("auto"===t.overflow||"scroll"===t.overflow||"auto"===t.overflowY||"scroll"===t.overflowY)&&e.scrollHeight>e.clientHeight?e:o(e.parentElement)};n=o(t.parentElement)}if(n){var r=t.getBoundingClientRect(),l=n.getBoundingClientRect(),a=r.top-l.top+n.scrollTop,i=n.scrollHeight-n.clientHeight,c=Math.max(0,Math.min(a,i));Math.abs(c-n.scrollTop)>1&&n.scrollTo({top:c,behavior:"smooth"})}}}),[]),N=o.useMemo((function(){return{visibleItems:m,handleInView:b,handleOutView:p,scrollToItem:w,registerRef:C}}),[m,b,p,w,C]);return o.createElement(f.Provider,{value:N},o.createElement("div",t({ref:h,className:"".concat(i)},c),l))},Waypoint:function(n){var r=n.children,l=n.className,a=void 0===l?"":l,s=n.value,c=void 0===s?"":s,u=e(n,["children","className","value"]),m=o.useContext(f),d=m.handleInView,v=m.handleOutView,C=m.registerRef,b=h({onEnter:o.useCallback((function(){console.log("waypoint",c,"in view"),d(c)}),[c,d]),onLeave:o.useCallback((function(){console.log("waypoint",c,"out of view"),v(c)}),[c,v]),threshold:.1}),p=o.useCallback((function(e){"function"==typeof b?b(e):b&&(b.current=e),c&&C(c,e)}),[b,c,C]);return o.createElement("div",t({ref:p,className:i(a)},u),r)}});export{C as default};
@@ -0,0 +1,35 @@
1
+ import * as React from 'react';
2
+ import React__default from 'react';
3
+
4
+ interface NavigationMenuLinkProps extends React__default.ComponentPropsWithoutRef<'a'> {
5
+ href: string;
6
+ }
7
+
8
+ interface NavigationMenuContentProps extends React__default.ComponentPropsWithoutRef<'div'> {
9
+ children: React__default.ReactNode;
10
+ }
11
+
12
+ interface NavigationMenuTriggerProps extends React__default.ComponentPropsWithoutRef<'button'> {
13
+ }
14
+
15
+ interface NavigationMenuItemProps extends React__default.ComponentPropsWithoutRef<'div'> {
16
+ value: string;
17
+ }
18
+
19
+ interface NavigationMenuRootProps extends React__default.ComponentPropsWithoutRef<'div'> {
20
+ children: React__default.ReactNode;
21
+ value?: string;
22
+ defaultValue?: string;
23
+ onValueChange?: (value: string) => void;
24
+ customRootClass?: string;
25
+ }
26
+
27
+ declare const NavigationMenu: {
28
+ Root: React.ForwardRefExoticComponent<NavigationMenuRootProps & React.RefAttributes<HTMLDivElement>>;
29
+ Item: React.ForwardRefExoticComponent<NavigationMenuItemProps & React.RefAttributes<HTMLDivElement>>;
30
+ Trigger: React.ForwardRefExoticComponent<NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
31
+ Content: React.ForwardRefExoticComponent<NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>>;
32
+ Link: React.ForwardRefExoticComponent<NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>>;
33
+ };
34
+
35
+ export { NavigationMenu as default };
@@ -0,0 +1 @@
1
+ 'use client';import{_ as e,a as n}from"./tslib.es6-BtVxab8e.js";import a,{useEffect as t}from"react";import{R as r}from"./index-BRmT6kl7.js";import{u as o}from"./index-fkj4Fdgt.js";import{c as s}from"./index-BVxS3Ixi.js";import{c as l}from"./clsx-BaVHROc5.js";import{c as i}from"./index-DBZNt4Em.js";import"./index-Dc5Cm9z0.js";import"./index-DnCiOYxZ.js";var c=a.createContext({isOpen:"",setIsOpen:function(){},rootClass:""}),u="NavigationMenuRoot",m=a.forwardRef((function(t,i){var m=t.children,d=t.value,f=t.defaultValue,v=void 0===f?"":f,p=t.onValueChange,N=t.customRootClass,C=t.className,g=e(t,["children","value","defaultValue","onValueChange","customRootClass","className"]),h=s(N,u),E=o(d,v,p),x=E[0],R=E[1];return a.createElement("div",n({ref:i},g),a.createElement(c.Provider,{value:{isOpen:x,setIsOpen:R,rootClass:h}},a.createElement(r.Root,null,a.createElement(r.Group,{className:l("".concat(h,"-root"),C)},m))))}));m.displayName=u;var d=a.createContext({itemOpen:!1,handleTrigger:function(){}}),f=a.forwardRef((function(t,r){var o=t.value,s=t.children,u=t.className,m=t.onMouseEnter,f=t.onMouseLeave,v=t.onKeyDown,p=e(t,["value","children","className","onMouseEnter","onMouseLeave","onKeyDown"]),N=a.useContext(c),C=N.isOpen,g=N.setIsOpen,h=N.rootClass,E=C===o,x=function(){g(E?"":o)};return a.createElement(d.Provider,{value:{itemOpen:E,handleTrigger:x}},a.createElement("div",n({ref:r,onMouseEnter:i(m,x),onMouseLeave:i(f,x),className:l("".concat(h,"-item"),u),onKeyDown:i(v,(function(e){"Escape"===e.key&&g("")}))},p),s))}));f.displayName="NavigationMenuItem";var v=a.forwardRef((function(t,o){var s=t.children,u=t.className,m=t.onClick,f=e(t,["children","className","onClick"]),v=a.useContext(d).handleTrigger,p=a.useContext(c).rootClass;return a.createElement(r.Item,null,a.createElement("button",n({ref:o,onClick:i(m,v),className:l("".concat(p,"-trigger"),u)},f),s))}));v.displayName="NavigationMenuTrigger";var p=a.forwardRef((function(o,s){var i=o.children,u=o.className,m=e(o,["children","className"]),f=a.useContext(d).itemOpen,v=a.useContext(c).rootClass,p=a.useRef(null);return a.useImperativeHandle(s,(function(){return p.current})),t((function(){var e,n=null===(e=p.current)||void 0===e?void 0:e.querySelector("*");null==n||n.focus()}),[f]),f?a.createElement("div",n({ref:p,className:l("".concat(v,"-content"),u),"data-state":f?"open":"closed"},m),a.createElement(r.Root,null,a.createElement(r.Group,null,i))):null}));p.displayName="NavigationMenuContent";var N=a.forwardRef((function(t,o){var s=t.children,i=t.href,u=t.className,m=e(t,["children","href","className"]),d=a.useContext(c).rootClass;return a.createElement(r.Item,null,a.createElement("a",n({ref:o,href:i,className:l("".concat(d,"-link"),u)},m),s))}));N.displayName="NavigationMenuLink";var C={Root:m,Item:f,Trigger:v,Content:p,Link:N};export{C as default};
@@ -1,43 +1,23 @@
1
- import * as React from 'react';
2
- import React__default from 'react';
3
-
4
- type NumberFieldDecrementProps = {
5
- className?: string;
6
- children?: React__default.ReactNode;
7
- };
8
-
9
- type NumberFieldIncrementProps = {
10
- className?: string;
11
- children?: React__default.ReactNode;
12
- };
13
-
14
- type NumberFieldInputProps = {
15
- className?: string;
16
- };
17
-
18
- type NumberFieldRootProps = {
19
- name?: string;
20
- defaultValue?: number | '';
21
- value?: number | '';
22
- onValueChange?: (value: number | '') => void;
23
- step?: number;
24
- largeStep?: number;
25
- min?: number;
26
- max?: number;
27
- disabled?: boolean;
28
- readOnly?: boolean;
29
- required?: boolean;
30
- id?: string;
31
- className?: string;
32
- children?: React__default.ReactNode;
33
- };
1
+ import * as react from 'react';
34
2
 
35
3
  declare const NumberField: {
36
4
  (): null;
37
- Root: ({ children, name, defaultValue, value, onValueChange, largeStep, step, min, max, disabled, readOnly, required, id, className, ...props }: NumberFieldRootProps) => React.JSX.Element;
38
- Input: ({ className, ...props }: NumberFieldInputProps) => React.JSX.Element | null;
39
- Increment: ({ children, className, ...props }: NumberFieldIncrementProps) => React.JSX.Element | null;
40
- Decrement: ({ children, className, ...props }: NumberFieldDecrementProps) => React.JSX.Element | null;
5
+ Root: react.ForwardRefExoticComponent<{
6
+ name?: string;
7
+ defaultValue?: number | "";
8
+ value?: number | "";
9
+ onValueChange?: (value: number | "") => void;
10
+ step?: number;
11
+ largeStep?: number;
12
+ min?: number;
13
+ max?: number;
14
+ disabled?: boolean;
15
+ readOnly?: boolean;
16
+ required?: boolean;
17
+ } & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
18
+ Input: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & react.RefAttributes<HTMLInputElement>>;
19
+ Increment: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
20
+ Decrement: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
41
21
  };
42
22
 
43
23
  export { NumberField as default };
@@ -1 +1 @@
1
- 'use client';import{_ as e,a as n}from"./tslib.es6-BtVxab8e.js";import r,{useContext as t}from"react";import{u as a}from"./index-fkj4Fdgt.js";import{c as l}from"./index-BVxS3Ixi.js";import{c as i}from"./clsx-BaVHROc5.js";var o=r.createContext(null),d=function(){return console.warn("Direct usage of NumberField is not supported. Please use NumberField.Root, NumberField.Item instead."),null};d.Root=function(t){var d=t.children,u=t.name,s=t.defaultValue,c=void 0===s?"":s,m=t.value,p=t.onValueChange,f=t.largeStep,b=t.step,v=t.min,y=t.max,h=t.disabled,N=t.readOnly,g=t.required,w=t.id,C=t.className,D=e(t,["children","name","defaultValue","value","onValueChange","largeStep","step","min","max","disabled","readOnly","required","id","className"]),F=l(C,"NumberField"),O=a(m,c,p),k=O[0],x=O[1],S={inputValue:k,handleOnChange:function(e){x(""!==e?void 0!==y&&e>y?y:void 0!==v&&e<v?v:e:"")},handleStep:function(e){var n=e.type,r=e.direction,t=0;switch(n){case"small":if(!b)return;t=b;break;case"large":if(!f)return;t=f}"decrement"===r&&(t*=-1),function(e){x((function(n){var r=n;""===r&&(r=void 0!==v?v:-1);var t=r+e;return void 0!==y&&t>y?y:void 0!==v&&t<v?v:t}))}(t)},id:w,name:u,disabled:h,readOnly:N,required:g,rootClass:F};return r.createElement("div",n({className:i("".concat(F,"-root"),C)},D),r.createElement(o.Provider,{value:S},d))},d.Input=function(a){var l=a.className,d=e(a,["className"]),u=t(o);if(!u)return console.error("NumberFieldInput must be used within a NumberField"),null;var s=u.inputValue,c=u.handleOnChange,m=u.handleStep,p=u.id,f=u.name,b=u.disabled,v=u.readOnly,y=u.required,h=u.rootClass;return r.createElement("input",n({type:"number",onKeyDown:function(e){"ArrowUp"!==e.key||e.shiftKey||(e.preventDefault(),m({direction:"increment",type:"small"})),"ArrowDown"!==e.key||e.shiftKey||(e.preventDefault(),m({direction:"decrement",type:"small"})),"ArrowUp"===e.key&&e.shiftKey&&(e.preventDefault(),m({direction:"increment",type:"large"})),"ArrowDown"===e.key&&e.shiftKey&&(e.preventDefault(),m({direction:"decrement",type:"large"}))},value:""===s?"":s,onChange:function(e){var n=e.target.value;c(""===n?"":Number(n))},id:p,name:f,disabled:b,readOnly:v,required:y,className:i("".concat(h,"-input"),l)},d))},d.Increment=function(a){var l=a.children,d=a.className,u=e(a,["children","className"]),s=t(o);if(!s)return console.error("NumberFieldIncrement must be used within a NumberField"),null;var c=s.handleStep,m=s.rootClass,p=s.disabled,f=s.readOnly;return r.createElement("button",n({onClick:function(){return c({direction:"increment",type:"small"})},className:i("".concat(m,"-increment"),d),disabled:p||f,type:"button"},u),l)},d.Decrement=function(a){var l=a.children,d=a.className,u=e(a,["children","className"]),s=t(o);if(!s)return console.error("NumberFieldDecrement must be used within a NumberField"),null;var c=s.handleStep,m=s.rootClass,p=s.disabled,f=s.readOnly;return r.createElement("button",n({onClick:function(){return c({direction:"decrement",type:"small"})},className:i("".concat(m,"-decrement"),d),disabled:p||f,type:"button"},u),l)};export{d as default};
1
+ 'use client';import{_ as e,a as r}from"./tslib.es6-BtVxab8e.js";import n,{forwardRef as a,useContext as t}from"react";import{u as l}from"./index-fkj4Fdgt.js";import{c as i}from"./index-BVxS3Ixi.js";import{c as d}from"./clsx-BaVHROc5.js";var u=n.createContext(null),o="NumberField",s=a((function(a,t){var s=a.children,c=a.name,m=a.defaultValue,p=void 0===m?"":m,f=a.value,b=a.onValueChange,v=a.largeStep,y=a.step,N=a.min,h=a.max,F=a.disabled,g=a.readOnly,w=a.required,C=a.id,D=a.className,O=e(a,["children","name","defaultValue","value","onValueChange","largeStep","step","min","max","disabled","readOnly","required","id","className"]),k=i(D,o),x=l(f,p,b),I=x[0],S=x[1],V={inputValue:I,handleOnChange:function(e){S(""!==e?void 0!==h&&e>h?h:void 0!==N&&e<N?N:e:"")},handleStep:function(e){var r=e.type,n=e.direction,a=0;switch(r){case"small":if(!y)return;a=y;break;case"large":if(!v)return;a=v}"decrement"===n&&(a*=-1),function(e){S((function(r){var n=r;""===n&&(n=void 0!==N?N:-1);var a=n+e;return void 0!==h&&a>h?h:void 0!==N&&a<N?N:a}))}(a)},id:C,name:c,disabled:F,readOnly:g,required:w,rootClass:k};return n.createElement("div",r({ref:t,className:d("".concat(k,"-root"),D)},O),n.createElement(u.Provider,{value:V},s))}));s.displayName=o;var c=a((function(a,l){var i=a.className,o=e(a,["className"]),s=t(u);if(!s)return console.error("NumberFieldInput must be used within a NumberField"),null;var c=s.inputValue,m=s.handleOnChange,p=s.handleStep,f=s.id,b=s.name,v=s.disabled,y=s.readOnly,N=s.required,h=s.rootClass;return n.createElement("input",r({ref:l,type:"number",onKeyDown:function(e){"ArrowUp"!==e.key||e.shiftKey||(e.preventDefault(),p({direction:"increment",type:"small"})),"ArrowDown"!==e.key||e.shiftKey||(e.preventDefault(),p({direction:"decrement",type:"small"})),"ArrowUp"===e.key&&e.shiftKey&&(e.preventDefault(),p({direction:"increment",type:"large"})),"ArrowDown"===e.key&&e.shiftKey&&(e.preventDefault(),p({direction:"decrement",type:"large"}))},value:""===c?"":c,onChange:function(e){var r=e.target.value;m(""===r?"":Number(r))},id:f,name:b,disabled:v,readOnly:y,required:N,className:d("".concat(h,"-input"),i)},o))}));c.displayName="NumberFieldInput";var m=a((function(a,l){var i=a.children,o=a.className,s=e(a,["children","className"]),c=t(u);if(!c)return console.error("NumberFieldIncrement must be used within a NumberField"),null;var m=c.handleStep,p=c.rootClass,f=c.disabled,b=c.readOnly;return n.createElement("button",r({ref:l,onClick:function(){return m({direction:"increment",type:"small"})},className:d("".concat(p,"-increment"),o),disabled:f||b,type:"button"},s),i)}));m.displayName="NumberFieldIncrement";var p=a((function(a,l){var i=a.children,o=a.className,s=e(a,["children","className"]),c=t(u);if(!c)return console.error("NumberFieldDecrement must be used within a NumberField"),null;var m=c.handleStep,p=c.rootClass,f=c.disabled,b=c.readOnly;return n.createElement("button",r({ref:l,onClick:function(){return m({direction:"decrement",type:"small"})},className:d("".concat(p,"-decrement"),o),disabled:f||b,type:"button"},s),i)}));p.displayName="NumberFieldDecrement";var f=function(){return console.warn("Direct usage of NumberField is not supported. Please use NumberField.Root, NumberField.Item instead."),null};f.Root=s,f.Input=c,f.Increment=m,f.Decrement=p;export{f as default};
@@ -1,24 +1,27 @@
1
- import * as React$1 from 'react';
2
- import React__default from 'react';
1
+ import React, { ComponentPropsWithoutRef, ElementRef } from 'react';
2
+ import Primitive from '~/core/primitives/Primitive';
3
3
 
4
- interface IndicatorProps {
5
- asChild?: boolean;
6
- }
7
- declare function ProgressIndicator({ asChild }: IndicatorProps): React__default.JSX.Element;
4
+ type ProgressRootElement = ElementRef<typeof Primitive.div>;
5
+ type ProgressRootProps = {
6
+ value: number | null;
7
+ minValue: number;
8
+ maxValue: number;
9
+ getValueLabel?: (value: number, minValue: number, maxValue: number) => string;
10
+ customRootClass?: string;
11
+ children: React.ReactNode;
12
+ } & ComponentPropsWithoutRef<typeof Primitive.div>;
13
+ declare const ProgressRoot: React.ForwardRefExoticComponent<ProgressRootProps & React.RefAttributes<HTMLElement>>;
14
+
15
+ type ProgressIndicatorProps = ComponentPropsWithoutRef<typeof Primitive.div>;
16
+ declare const ProgressIndicator: React.ForwardRefExoticComponent<ProgressIndicatorProps & React.RefAttributes<HTMLElement>>;
8
17
 
9
18
  declare const COMPONENT_NAME = "Progress";
10
- declare function Progress(): null;
11
- declare namespace Progress {
12
- var Root: ({ value, minValue, maxValue, children, customRootClass, asChild, getValueLabel }: {
13
- asChild?: boolean;
14
- value: number | null;
15
- minValue: number;
16
- maxValue: number;
17
- getValueLabel?: (value: number, minValue: number, maxValue: number) => string;
18
- children: React.ReactNode;
19
- customRootClass?: string;
20
- }) => React$1.JSX.Element;
21
- var Indicator: typeof ProgressIndicator;
22
- }
19
+ type ProgressProps = ProgressRootProps;
20
+ type ProgressComponent = React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<ProgressRootElement>> & {
21
+ Root: typeof ProgressRoot;
22
+ Indicator: typeof ProgressIndicator;
23
+ };
24
+ declare const Progress: ProgressComponent;
23
25
 
24
26
  export { COMPONENT_NAME, Progress as default };
27
+ export type { ProgressProps };
@@ -1 +1 @@
1
- 'use client';import a,{createContext as e,useState as l,useEffect as r,useContext as t}from"react";import{c as o}from"./clsx-BaVHROc5.js";import{c as s}from"./index-BVxS3Ixi.js";import{P as i}from"./index-DIw4zyNG.js";import{a as n}from"./tslib.es6-BtVxab8e.js";var u=e({value:0,minValue:0,maxValue:100,rootClass:"",ariaLabel:"",state:"loading"}),m="loading",d="complete",v="indeterminate";var c="Progress";function x(){return console.warn("Direct usage of Progress is not supported. Please use Progress.Root, Progress.Indicator, etc. instead."),null}x.Root=function(e){var t,n=e.value,c=void 0===n?0:n,x=e.minValue,f=void 0===x?0:x,g=e.maxValue,p=void 0===g?100:g,V=e.children,b=e.customRootClass,C=e.asChild,P=e.getValueLabel,h=l(m),j=h[0],L=h[1],w=s(b,"Progress"),E=null!==(t=null==P?void 0:P(null!=c?c:0,f,p))&&void 0!==t?t:"";r((function(){L(null===c?v:c===p?d:m)}),[c,p]);var R={value:c,minValue:f,maxValue:p,rootClass:w,getValueLabel:P,ariaLabel:E,state:j};return a.createElement(u.Provider,{value:R},a.createElement(i.div,{role:"progressbar","aria-label":E,"aria-valuetext":E,"aria-valuenow":null!=c?c:0,"aria-valuemin":f,"aria-valuemax":p,"data-state":j,"data-value":null!=c?c:0,"data-max":p,"data-min":f,className:o(w),asChild:C},V))},x.Indicator=function(e){var l=e.asChild,r=t(u),s=r.value,m=r.minValue,d=r.maxValue,v=r.rootClass,c=r.state,x=Math.min(Math.max(null!=s?s:0,m),d),f=(x-m)/(d-m)*100;return a.createElement(i.div,n({role:"progressbar",className:o("".concat(v,"-indicator")),style:{transform:"translateX(-".concat(100-f,"%)")},"aria-valuenow":x,"aria-valuemax":d,"aria-valuemin":m,"data-state":c,"data-value":x,"data-max":d,"data-min":m,asChild:l},{}))};export{c as COMPONENT_NAME,x as default};
1
+ 'use client';import{_ as a,a as e}from"./tslib.es6-BtVxab8e.js";import l,{createContext as r,forwardRef as s,useState as t,useEffect as o,useContext as i}from"react";import{c as n}from"./clsx-BaVHROc5.js";import{c as m}from"./index-BVxS3Ixi.js";import{P as u}from"./index-Dc5Cm9z0.js";var d=r({value:0,minValue:0,maxValue:100,rootClass:"",ariaLabel:"",state:"loading"}),c="Progress",v="loading",f="complete",x="indeterminate",g=s((function(r,s){var i,g=r.value,p=void 0===g?0:g,V=r.minValue,C=void 0===V?0:V,h=r.maxValue,b=void 0===h?100:h,N=r.children,P=r.customRootClass,y=r.getValueLabel,L=r.className,j=a(r,["value","minValue","maxValue","children","customRootClass","getValueLabel","className"]),E=t(v),R=E[0],w=E[1],I=m(P,c),M=null!==(i=null==y?void 0:y(null!=p?p:0,C,b))&&void 0!==i?i:"";o((function(){w(null===p?x:p===b?f:v)}),[p,b]);var D={value:p,minValue:C,maxValue:b,rootClass:I,getValueLabel:y,ariaLabel:M,state:R},X=j.asChild,_=a(j,["asChild"]);return l.createElement(d.Provider,{value:D},l.createElement(u.div,e({role:"progressbar","aria-label":M,"aria-valuetext":M,"aria-valuenow":null!=p?p:0,"aria-valuemin":C,"aria-valuemax":b,"data-state":R,"data-value":null!=p?p:0,"data-max":b,"data-min":C,className:n(I,L),asChild:X,ref:s},_),N))}));g.displayName=c;var p=s((function(r,s){var t=r.className,o=r.style,m=a(r,["className","style"]),c=i(d),v=c.value,f=c.minValue,x=c.maxValue,g=c.rootClass,p=c.state,V=Math.min(Math.max(null!=v?v:0,f),x),C=(V-f)/(x-f)*100,h=m.asChild,b=a(m,["asChild"]);return l.createElement(u.div,e({role:"progressbar",className:n("".concat(g,"-indicator"),t),style:e({transform:"translateX(-".concat(100-C,"%)")},o),"aria-valuenow":V,"aria-valuemax":x,"aria-valuemin":f,"data-state":p,"data-value":V,"data-max":x,"data-min":f,asChild:h,ref:s},b))}));p.displayName="ProgressIndicator";var V="Progress",C=s((function(a,r){return console.warn("Direct usage of Progress is not supported. Please use Progress.Root, Progress.Indicator, etc. instead."),l.createElement(g,e({ref:r},a))}));C.displayName=V,C.Root=g,C.Indicator=p;export{V as COMPONENT_NAME,C as default};
@@ -1,15 +1,11 @@
1
1
  import React from 'react';
2
2
 
3
- type QuoteProps = {
4
- children: React.ReactNode;
3
+ type QuoteProps = React.ComponentPropsWithoutRef<'q'> & {
5
4
  customRootClass?: string;
6
- className?: string;
7
- props?: Record<string, any>[];
8
- };
9
- declare const Quote: {
10
- ({ children, customRootClass, className, ...props }: QuoteProps): React.JSX.Element;
11
- displayName: string;
12
5
  };
6
+ declare const Quote: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, "ref"> & {
7
+ customRootClass?: string;
8
+ } & React.RefAttributes<HTMLQuoteElement>>;
13
9
 
14
10
  export { Quote as default };
15
11
  export type { QuoteProps };
@@ -1 +1 @@
1
- 'use client';import{_ as s,a}from"./tslib.es6-BtVxab8e.js";import e from"react";import{c as o}from"./index-BVxS3Ixi.js";import{c as r}from"./clsx-BaVHROc5.js";var t="Quote",m=function(m){var c=m.children,l=m.customRootClass,i=m.className,n=s(m,["children","customRootClass","className"]),f=o(l,t);return e.createElement("q",a({className:r(f,i)},n),c)};m.displayName=t;export{m as default};
1
+ 'use client';import{_ as s,a}from"./tslib.es6-BtVxab8e.js";import r from"react";import{c as e}from"./index-BVxS3Ixi.js";import{c as o}from"./clsx-BaVHROc5.js";var t="Quote",m=r.forwardRef((function(m,c){var l=m.children,i=m.customRootClass,f=m.className,n=s(m,["children","customRootClass","className"]),d=e(i,t);return r.createElement("q",a({ref:c,className:o(d,f)},n),l)}));m.displayName=t;export{m as default};
@@ -1,14 +1,21 @@
1
1
  import React from 'react';
2
- import { RadioPrimitiveProps } from '~/core/primitives/Radio';
2
+ import RadioPrimitive, { RadioPrimitiveProps } from '~/core/primitives/Radio';
3
3
 
4
- type RadioProps = RadioPrimitiveProps & {
4
+ type RadioElement = React.ElementRef<typeof RadioPrimitive>;
5
+ type RadioProps = Omit<RadioPrimitiveProps, 'size'> & {
5
6
  customRootClass?: string;
6
7
  className?: string;
7
8
  size?: string;
8
9
  color?: string;
9
10
  variant?: string;
10
11
  };
11
- declare function Radio({ name, value, id, checked, required, onChange, disabled, asChild, className, customRootClass, variant, size, color, ...props }: RadioProps): React.JSX.Element;
12
+ declare const Radio: React.ForwardRefExoticComponent<Omit<RadioPrimitiveProps, "size"> & {
13
+ customRootClass?: string;
14
+ className?: string;
15
+ size?: string;
16
+ color?: string;
17
+ variant?: string;
18
+ } & React.RefAttributes<HTMLInputElement>>;
12
19
 
13
20
  export { Radio as default };
14
- export type { RadioProps };
21
+ export type { RadioElement, RadioProps };
@@ -1 +1 @@
1
- 'use client';import{_ as e,a}from"./tslib.es6-BtVxab8e.js";import i from"react";import{P as d}from"./index-DIw4zyNG.js";import{c as s}from"./clsx-BaVHROc5.js";import{c as r}from"./index-BVxS3Ixi.js";import{u as o,a as n,b as l}from"./index-DpUtikes.js";function t(s){var r=s.name,o=s.value,n=s.id,l=s.checked,t=s.required,c=s.onChange,m=s.disabled,u=s.asChild,h=s.className,v=e(s,["name","value","id","checked","required","onChange","disabled","asChild","className"]);return i.createElement(d.input,a({type:"radio",checked:l,name:r,tabIndex:-1,value:o,onChange:c,id:n,"aria-disabled":m,disabled:m,required:t,"aria-required":t,asChild:u,className:h},v))}function c(d){var c=d.name,m=d.value,u=d.id,h=d.checked,v=void 0!==h&&h,C=d.required,b=d.onChange,f=d.disabled,p=d.asChild,k=d.className,q=d.customRootClass,g=d.variant,x=void 0===g?"":g,N=d.size,j=void 0===N?"":N,z=d.color,R=void 0===z?"":z,E=e(d,["name","value","id","checked","required","onChange","disabled","asChild","className","customRootClass","variant","size","color"]),y=r(q,"Radio"),I=i.useState(v),P=I[0],S=I[1],_=o("button",{variant:x,size:j}),w=n(R),A=l(_(),w());return i.createElement(t,a({name:c,id:u,value:m,checked:P,required:C,onChange:function(){b&&b(),S(!P)},disabled:f,asChild:p,className:s(y,k),"data-checked":P},A(),E))}export{c as default};
1
+ 'use client';import{_ as e,a}from"./tslib.es6-BtVxab8e.js";import i from"react";import{P as d}from"./index-Dc5Cm9z0.js";import{c as s}from"./clsx-BaVHROc5.js";import{c as r}from"./index-BVxS3Ixi.js";import{u as o,a as n,b as l}from"./index-Bf4LVEjJ.js";var t=i.forwardRef((function(s,r){var o=s.name,n=s.value,l=s.id,t=s.checked,c=s.required,m=s.onChange,u=s.disabled,h=s.asChild,v=s.className,f=e(s,["name","value","id","checked","required","onChange","disabled","asChild","className"]);return i.createElement(d.input,a({ref:r,type:"radio",checked:t,name:o,tabIndex:-1,value:n,onChange:m,id:l,"aria-disabled":u,disabled:u,required:c,"aria-required":c,asChild:h,className:v},f))}));t.displayName="RadioPrimitive";var c="Radio",m=i.forwardRef((function(d,m){var u=d.name,h=d.value,v=d.id,f=d.checked,C=void 0!==f&&f,b=d.required,p=d.onChange,N=d.disabled,k=d.asChild,q=d.className,g=d.customRootClass,x=d.variant,R=void 0===x?"":x,j=d.size,y=void 0===j?"":j,z=d.color,w=void 0===z?"":z,E=e(d,["name","value","id","checked","required","onChange","disabled","asChild","className","customRootClass","variant","size","color"]),P=r(g,c),I=i.useState(C),S=I[0],_=I[1],A=o("button",{variant:R,size:y}),B=n(w),D=l(A(),B());return i.createElement(t,a({ref:m,name:u,id:v,value:h,checked:S,required:b,onChange:function(){p&&p(),_(!S)},disabled:N,asChild:k,className:s(P,q),"data-checked":S},D(),E))}));m.displayName=c;export{m as default};
@@ -1,41 +1,38 @@
1
- import React from 'react';
2
- import { RadioGroupPrimitiveProps } from '~/core/primitives/RadioGroup/RadioGroupPrimitive';
1
+ import React, { ForwardRefExoticComponent, ComponentPropsWithoutRef, RefAttributes, ElementRef } from 'react';
2
+ import { RadioGroupPrimitiveRootProps } from '~/core/primitives/RadioGroup/fragments/RadioGroupPrimitiveRoot';
3
3
 
4
- type RadioCardsItemProps = {
5
- children?: React.ReactNode;
4
+ type RadioCardsRootProps = RadioGroupPrimitiveRootProps & {
5
+ children: React.ReactNode;
6
6
  className?: string;
7
- value: string;
8
- } & RadioGroupPrimitiveProps.Item;
7
+ customRootClass?: string;
8
+ variant?: string;
9
+ size?: string;
10
+ color?: string;
11
+ name?: string;
12
+ defaultValue?: string;
13
+ };
14
+ declare const RadioCardsRoot: React.ForwardRefExoticComponent<RadioCardsRootProps & React.RefAttributes<HTMLElement>>;
9
15
 
10
- type RadioCardsProps = React.HTMLAttributes<HTMLDivElement> & {
16
+ declare const RadioCardsItem: React.ForwardRefExoticComponent<Omit<{
17
+ label?: string;
18
+ description?: string;
19
+ asChild?: boolean;
20
+ required?: boolean;
21
+ onChange?: any;
22
+ } & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & {
23
+ value: string;
24
+ } & {
11
25
  children?: React.ReactNode;
12
- };
13
- declare const RadioCards: {
14
- (): null;
15
- Root: ({ children, className, customRootClass, variant, size, color, ...props }: {
16
- children: React.ReactNode;
17
- className?: string;
18
- customRootClass?: string;
19
- variant?: string;
20
- size?: string;
21
- color?: string;
22
- } & {
23
- className?: string;
24
- customRootClass?: string;
25
- value?: string;
26
- defaultValue?: string;
27
- onValueChange?: (value: string) => void;
28
- disabled?: boolean;
29
- required?: boolean;
30
- name?: string;
31
- orientation?: "horizontal" | "vertical" | "both";
32
- loop?: boolean;
33
- dir?: "ltr" | "rtl";
34
- } & {
35
- children?: React.ReactNode | undefined;
36
- }) => React.JSX.Element;
37
- Item: ({ children, className, value, ...props }: RadioCardsItemProps) => React.JSX.Element;
38
- };
26
+ className?: string;
27
+ } & React.RefAttributes<HTMLButtonElement>>;
28
+
29
+ type RadioCardsElement = ElementRef<'div'>;
30
+ type RadioCardsProps = ComponentPropsWithoutRef<'div'>;
31
+ interface RadioCardsComponent extends ForwardRefExoticComponent<RadioCardsProps & RefAttributes<RadioCardsElement>> {
32
+ Root: typeof RadioCardsRoot;
33
+ Item: typeof RadioCardsItem;
34
+ }
35
+ declare const RadioCards: RadioCardsComponent;
39
36
 
40
37
  export { RadioCards as default };
41
- export type { RadioCardsProps };
38
+ export type { RadioCardsElement, RadioCardsProps };
@@ -1 +1 @@
1
- 'use client';import{_ as a,a as o}from"./tslib.es6-BtVxab8e.js";import s,{createContext as e,useContext as r}from"react";import{R as i}from"./RadioGroupPrimitive-CUgW2PyL.js";import{c as t}from"./clsx-BaVHROc5.js";import{c as d}from"./index-BVxS3Ixi.js";import{u as m,a as n,b as l}from"./index-DpUtikes.js";import"./index-DIw4zyNG.js";import"./index-BNg6qXF-.js";import"./index-8D8A0ALD.js";import"./index-fkj4Fdgt.js";var c=e({rootClass:""}),u=function(){return console.warn("Direct usage of RadioCards is not supported. Please use RadioCards.Root and RadioCards.Item instead."),null};u.Root=function(e){var r=e.children,u=e.className,v=void 0===u?"":u,p=e.customRootClass,f=void 0===p?"":p,R=e.variant,j=void 0===R?"":R,C=e.size,x=void 0===C?"":C,N=e.color,h=void 0===N?"":N,z=a(e,["children","className","customRootClass","variant","size","color"]),E=d(f,"RadioCards"),I=m("radio-cards",{variant:j,size:x}),P=n(h),b=l(I(),P());return s.createElement(c.Provider,{value:{rootClass:E}},s.createElement(i.Root,o({className:t(E,v)},b,z),r))},u.Item=function(e){var d=e.children,m=e.className,n=void 0===m?"":m,l=e.value,u=a(e,["children","className","value"]),v=r(c).rootClass;return s.createElement(i.Item,o({className:t("".concat(v,"-item"),n)},u,{value:l}),d)};export{u as default};
1
+ 'use client';import a,{createContext as o,forwardRef as s,useContext as e}from"react";import{_ as r,a as i}from"./tslib.es6-BtVxab8e.js";import{R as t}from"./RadioGroupPrimitive-D9grAL7G.js";import{c as d}from"./clsx-BaVHROc5.js";import{c as m}from"./index-BVxS3Ixi.js";import{u as l,a as n,b as c}from"./index-Bf4LVEjJ.js";import"./index-Dc5Cm9z0.js";import"./index-BRmT6kl7.js";import"./index-DnCiOYxZ.js";import"./index-fkj4Fdgt.js";var v=o({rootClass:""}),u=s((function(o,s){var e=o.children,u=o.className,p=void 0===u?"":u,R=o.customRootClass,f=void 0===R?"":R,C=o.variant,j=void 0===C?"":C,N=o.size,x=void 0===N?"":N,h=o.color,I=void 0===h?"":h,y=r(o,["children","className","customRootClass","variant","size","color"]),z=m(f,"RadioCards"),E=l("radio-cards",{variant:j,size:x}),P=n(I),b=c(E(),P());return a.createElement(v.Provider,{value:{rootClass:z}},a.createElement(t.Root,i({ref:s,className:d(z,p)},b(),y),e))}));u.displayName="RadioCardsRoot";var p=s((function(o,s){var m=o.children,l=o.className,n=void 0===l?"":l,c=o.value,u=r(o,["children","className","value"]),p=e(v).rootClass;return a.createElement(t.Item,i({ref:s,className:d("".concat(p,"-item"),n)},u,{value:c}),m)}));p.displayName="RadioCardsItem";var R=s((function(a,o){return console.warn("Direct usage of RadioCards is not supported. Please use RadioCards.Root and RadioCards.Item instead."),null}));R.displayName="RadioCards",R.Root=u,R.Item=p;export{R as default};
@@ -1,54 +1,51 @@
1
1
  import React from 'react';
2
2
  import { RadioGroupPrimitiveProps } from '~/core/primitives/RadioGroup/RadioGroupPrimitive';
3
+ import Primitive from '~/core/primitives/Primitive';
3
4
 
4
- type RadioGroupLabelProps = {
5
- children?: React.ReactNode;
5
+ type RadioGroupRootProps = {
6
+ children: React.ReactNode;
7
+ className?: string;
8
+ customRootClass?: string;
9
+ variant?: string;
10
+ size?: string;
11
+ color?: string;
12
+ } & RadioGroupPrimitiveProps.Root;
13
+ declare const RadioGroupRoot: React.ForwardRefExoticComponent<RadioGroupRootProps & React.RefAttributes<HTMLElement>>;
14
+
15
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<{
16
+ children: React.ReactNode;
6
17
  className?: string;
18
+ value: string;
19
+ } & Omit<{
20
+ label?: string;
21
+ description?: string;
7
22
  asChild?: boolean;
8
- };
23
+ required?: boolean;
24
+ onChange?: any;
25
+ } & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & {
26
+ value: string;
27
+ } & React.RefAttributes<HTMLButtonElement>>;
9
28
 
10
29
  type RadioGroupIndicatorProps = {
11
30
  children?: React.ReactNode;
12
31
  className?: string;
13
32
  } & RadioGroupPrimitiveProps.Indicator;
33
+ declare const RadioGroupIndicator: React.ForwardRefExoticComponent<RadioGroupIndicatorProps & React.RefAttributes<HTMLElement>>;
14
34
 
15
- type RadioGroupItemProps = {
16
- children: React.ReactNode;
17
- className?: string;
18
- value: string;
19
- } & RadioGroupPrimitiveProps.Item;
35
+ type RadioGroupLabelProps = React.ComponentPropsWithoutRef<typeof Primitive.label>;
36
+ declare const RadioGroupLabel: React.ForwardRefExoticComponent<RadioGroupLabelProps & React.RefAttributes<HTMLElement>>;
20
37
 
21
- type RadioGroupProps = React.HTMLAttributes<HTMLDivElement> & {
38
+ type RadioGroupElement = React.ElementRef<'div'>;
39
+ type RadioGroupProps = React.ComponentPropsWithoutRef<'div'> & {
22
40
  children?: React.ReactNode;
23
41
  };
24
- declare const RadioGroup: {
25
- (): null;
26
- Root: ({ children, className, customRootClass, variant, size, color, ...props }: {
27
- children: React.ReactNode;
28
- className?: string;
29
- customRootClass?: string;
30
- variant?: string;
31
- size?: string;
32
- color?: string;
33
- } & {
34
- className?: string;
35
- customRootClass?: string;
36
- value?: string;
37
- defaultValue?: string;
38
- onValueChange?: (value: string) => void;
39
- disabled?: boolean;
40
- required?: boolean;
41
- name?: string;
42
- orientation?: "horizontal" | "vertical" | "both";
43
- loop?: boolean;
44
- dir?: "ltr" | "rtl";
45
- } & {
46
- children?: React.ReactNode | undefined;
47
- }) => React.JSX.Element;
48
- Item: ({ children, className, value, ...props }: RadioGroupItemProps) => React.JSX.Element;
49
- Indicator: ({ className, children, ...props }: RadioGroupIndicatorProps) => React.JSX.Element;
50
- Label: ({ className, asChild, children, ...props }: RadioGroupLabelProps) => React.JSX.Element;
42
+ type RadioGroupComponent = React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<RadioGroupElement>> & {
43
+ Root: typeof RadioGroupRoot;
44
+ Item: typeof RadioGroupItem;
45
+ Indicator: typeof RadioGroupIndicator;
46
+ Label: typeof RadioGroupLabel;
51
47
  };
48
+ declare const RadioGroup: RadioGroupComponent;
52
49
 
53
50
  export { RadioGroup as default };
54
- export type { RadioGroupProps };
51
+ export type { RadioGroupElement, RadioGroupProps };
@@ -1 +1 @@
1
- 'use client';import{_ as a,a as o}from"./tslib.es6-BtVxab8e.js";import e,{createContext as s,useContext as r}from"react";import{R as t}from"./RadioGroupPrimitive-CUgW2PyL.js";import{c as i}from"./clsx-BaVHROc5.js";import{c as l}from"./index-BVxS3Ixi.js";import{u as n,a as c,b as d}from"./index-DpUtikes.js";import{P as m}from"./index-DIw4zyNG.js";import"./index-BNg6qXF-.js";import"./index-8D8A0ALD.js";import"./index-fkj4Fdgt.js";var u=s({rootClass:""}),v=function(){return console.warn("Direct usage of RadioGroup is not supported. Please use RadioGroup.Root and RadioGroup.Item instead."),null};v.Root=function(s){var r=s.children,m=s.className,v=void 0===m?"":m,p=s.customRootClass,f=void 0===p?"":p,C=s.variant,N=void 0===C?"":C,h=s.size,R=void 0===h?"":h,x=s.color,j=void 0===x?"":x,b=a(s,["children","className","customRootClass","variant","size","color"]),E=l(f,"RadioGroup"),G=n("radio-group",{variant:N,size:R}),I=c(j),P=d(G(),I());return e.createElement(u.Provider,{value:{rootClass:E}},e.createElement(t.Root,o({className:i("".concat(E,"-root"),v)},P(),b)," ",r," "))},v.Item=function(s){var l=s.children,n=s.className,c=void 0===n?"":n,d=s.value,m=a(s,["children","className","value"]),v=r(u).rootClass;return e.createElement(t.Item,o({className:i("".concat(v,"-item"),c),value:d},m),l)},v.Indicator=function(s){var r=s.className,l=void 0===r?"":r,n=s.children,c=a(s,["className","children"]),d=e.useContext(u).rootClass;return e.createElement(t.Indicator,o({className:i("".concat(d,"-indicator"),l)},c),n)},v.Label=function(s){var r=s.className,t=void 0===r?"":r,l=s.asChild,n=void 0!==l&&l,c=s.children,d=a(s,["className","asChild","children"]),v=e.useContext(u).rootClass;return e.createElement(m.label,o({},d,{className:i("".concat(v,"-label"),t),asChild:n})," ",c," ")};export{v as default};
1
+ 'use client';import a,{createContext as o,useContext as e}from"react";import{_ as r,a as s}from"./tslib.es6-BtVxab8e.js";import{R as i}from"./RadioGroupPrimitive-D9grAL7G.js";import{c as t}from"./clsx-BaVHROc5.js";import{c as l}from"./index-BVxS3Ixi.js";import{u as d,a as n,b as c}from"./index-Bf4LVEjJ.js";import{P as m}from"./index-Dc5Cm9z0.js";import"./index-BRmT6kl7.js";import"./index-DnCiOYxZ.js";import"./index-fkj4Fdgt.js";var u=o({rootClass:""}),p=a.forwardRef((function(o,e){var m=o.children,p=o.className,f=void 0===p?"":p,v=o.customRootClass,R=void 0===v?"":v,N=o.variant,h=void 0===N?"":N,C=o.size,x=void 0===C?"":C,G=o.color,j=void 0===G?"":G,I=r(o,["children","className","customRootClass","variant","size","color"]),b=l(R,"RadioGroup"),w=d("radio-group",{variant:h,size:x}),y=n(j),E=c(w(),y());return a.createElement(u.Provider,{value:{rootClass:b}},a.createElement(i.Root,s({ref:e,className:t("".concat(b,"-root"),f)},E(),I)," ",m," "))}));p.displayName="RadioGroupRoot";var f=a.forwardRef((function(o,l){var d=o.children,n=o.className,c=void 0===n?"":n,m=o.value,p=r(o,["children","className","value"]),f=e(u).rootClass;return a.createElement(i.Item,s({ref:l,className:t("".concat(f,"-item"),c),value:m},p),d)}));f.displayName="RadioGroupItem";var v=a.forwardRef((function(o,e){var l=o.className,d=void 0===l?"":l,n=o.children,c=r(o,["className","children"]),m=a.useContext(u).rootClass;return a.createElement(i.Indicator,s({ref:e,className:t("".concat(m,"-indicator"),d)},c),n)}));v.displayName="RadioGroupIndicator";var R=a.forwardRef((function(o,e){var i=o.className,l=void 0===i?"":i,d=o.asChild,n=void 0!==d&&d,c=o.children,p=r(o,["className","asChild","children"]),f=a.useContext(u).rootClass;return a.createElement(m.label,s({ref:e},p,{className:t("".concat(f,"-label"),l),asChild:n})," ",c," ")}));R.displayName="RadioGroupLabel";var N=a.forwardRef((function(a,o){return console.warn("Direct usage of RadioGroup is not supported. Please use RadioGroup.Root and RadioGroup.Item instead."),null}));N.displayName="RadioGroup",N.Root=p,N.Item=f,N.Indicator=v,N.Label=R;export{N as default};
@@ -0,0 +1 @@
1
+ 'use client';import e,{useContext as a}from"react";import{_ as i,a as r}from"./tslib.es6-BtVxab8e.js";import{P as t}from"./index-Dc5Cm9z0.js";import{R as d}from"./index-BRmT6kl7.js";import{u as o}from"./index-fkj4Fdgt.js";import{B as l}from"./index-DnCiOYxZ.js";var n=e.createContext(null),s=e.forwardRef((function(a,l){var s=a.value,u=a.defaultValue,c=void 0===u?"":u,m=a.onValueChange,p=a.children,v=a.disabled,f=void 0!==v&&v,h=a.required,R=void 0!==h&&h,b=a.name,C=void 0===b?"":b,E=a.orientation,g=void 0===E?"horizontal":E,G=a.loop,N=void 0!==G&&G,w=a.dir,x=void 0===w?"ltr":w,y=i(a,["value","defaultValue","onValueChange","children","disabled","required","name","orientation","loop","dir"]),I=o(s,c,m),P=I[0],V={selectedValue:P,setSelectedValue:I[1],groupDisabled:f};return e.createElement(t.div,r({ref:l},y,{"aria-required":R,role:"radiogroup","aria-disabled":f,"data-disabled":f?"":void 0}),e.createElement(d.Root,{dir:x,orientation:g,loop:N,asChild:!0},e.createElement(n.Provider,{value:V},e.createElement(d.Group,null,p))),C&&e.createElement(e.Fragment,null,e.createElement("input",{type:"hidden",name:C,value:P,disabled:f}),R&&""!==P&&e.createElement("input",{type:"radio",name:C,value:P,checked:!0,onChange:function(){},disabled:f,required:!0,"aria-hidden":"true",tabIndex:-1,style:{position:"absolute",width:0,height:0,opacity:0,pointerEvents:"none",margin:0}})))}));s.displayName="RadioGroupPrimitiveRoot";var u=e.createContext({itemSelected:!1}),c=e.forwardRef((function(t,o){var s=t.value,c=t.children,m=t.disabled,p=t.required,v=void 0!==p&&p,f=t.className,h=void 0===f?"":f,R=t.asChild,b=void 0!==R&&R,C=i(t,["value","children","disabled","required","className","asChild"]),E=a(n);if(!E)throw new Error("RadioGroup.Item must be used within a RadioGroup.Root");var g=E.groupDisabled,G=E.selectedValue,N=E.setSelectedValue,w=s===G;return e.createElement(u.Provider,{value:{itemSelected:w}},e.createElement(d.Item,null,e.createElement(l,r({ref:o,role:"radio",type:"button",disabled:g||m,onClick:function(){return N(s)},onFocus:function(){return N(s)},"aria-disabled":g||m,"aria-checked":w,"aria-selected":void 0,"data-state":w?"checked":"unchecked","data-disabled":g||m?"":void 0,"aria-required":v,asChild:b,className:h},C),c)))}));c.displayName="RadioGroupPrimitiveItem";var m=e.forwardRef((function(a,d){var o=a.children,l=a.className,n=a.asChild,s=void 0!==n&&n,c=i(a,["children","className","asChild"]);return e.useContext(u).itemSelected?e.createElement(t.span,r({ref:d,className:l,asChild:s},c),o):null}));m.displayName="RadioGroupPrimitiveIndicator";var p=e.forwardRef((function(e,a){return console.warn("Direct usage of RadioGroup is not supported. Please use RadioGroup.Root, RadioGroup.Item, etc. instead."),null}));p.displayName="RadioGroupPrimitive",p.Root=s,p.Item=c,p.Indicator=m;export{p as R};