@radui/ui 0.1.2 → 0.1.4

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 (129) hide show
  1. package/dist/components/Accordion.d.ts +36 -0
  2. package/dist/components/Accordion.js +1 -0
  3. package/dist/components/AlertDialog.d.ts +116 -0
  4. package/dist/components/AlertDialog.js +1 -0
  5. package/dist/components/AspectRatio.d.ts +13 -0
  6. package/dist/components/AspectRatio.js +1 -0
  7. package/dist/components/Avatar.d.ts +31 -0
  8. package/dist/components/Avatar.js +1 -0
  9. package/dist/components/AvatarGroup.d.ts +45 -0
  10. package/dist/components/AvatarGroup.js +1 -0
  11. package/dist/components/AvatarPrimitiveFallback-BV0bK5Qg.js +1 -0
  12. package/dist/components/Badge.d.ts +17 -0
  13. package/dist/components/Badge.js +1 -0
  14. package/dist/components/BlockQuote.d.ts +17 -0
  15. package/dist/components/BlockQuote.js +1 -0
  16. package/dist/components/Button.d.ts +24 -0
  17. package/dist/components/Button.js +1 -0
  18. package/dist/components/Callout.d.ts +30 -0
  19. package/dist/components/Callout.js +1 -0
  20. package/dist/components/Card.d.ts +20 -0
  21. package/dist/components/Card.js +1 -0
  22. package/dist/components/Checkbox.d.ts +33 -0
  23. package/dist/components/Checkbox.js +1 -0
  24. package/dist/components/CheckboxCards.d.ts +34 -0
  25. package/dist/components/CheckboxCards.js +1 -0
  26. package/dist/components/CheckboxGroup.d.ts +38 -0
  27. package/dist/components/CheckboxGroup.js +1 -0
  28. package/dist/components/CheckboxGroupPrimitive-DrGqSxi3.js +1 -0
  29. package/dist/components/Code.d.ts +17 -0
  30. package/dist/components/Code.js +1 -0
  31. package/dist/components/Collapsible.d.ts +24 -0
  32. package/dist/components/Collapsible.js +1 -0
  33. package/dist/components/ContextMenu.d.ts +95 -0
  34. package/dist/components/ContextMenu.js +1 -0
  35. package/dist/components/DataList.d.ts +16 -0
  36. package/dist/components/DataList.js +1 -0
  37. package/dist/components/Dialog.d.ts +97 -0
  38. package/dist/components/Dialog.js +1 -0
  39. package/dist/components/Disclosure.d.ts +35 -0
  40. package/dist/components/Disclosure.js +1 -0
  41. package/dist/components/DropdownMenu.d.ts +95 -0
  42. package/dist/components/DropdownMenu.js +1 -0
  43. package/dist/components/Em.d.ts +11 -0
  44. package/dist/components/Em.js +1 -0
  45. package/dist/components/Heading.d.ts +25 -0
  46. package/dist/components/Heading.js +1 -0
  47. package/dist/components/HoverCard.d.ts +38 -0
  48. package/dist/components/HoverCard.js +1 -0
  49. package/dist/components/Kbd.d.ts +11 -0
  50. package/dist/components/Kbd.js +1 -0
  51. package/dist/components/Link.d.ts +11 -0
  52. package/dist/components/Link.js +1 -0
  53. package/dist/components/MenuPrimitive-DuUPySFO.js +1 -0
  54. package/dist/components/Menubar.d.ts +83 -0
  55. package/dist/components/Menubar.js +1 -0
  56. package/dist/components/Minimap.d.ts +48 -0
  57. package/dist/components/Minimap.js +1 -0
  58. package/dist/components/NavigationMenu.d.ts +35 -0
  59. package/dist/components/NavigationMenu.js +1 -0
  60. package/dist/components/NumberField.d.ts +23 -0
  61. package/dist/components/NumberField.js +1 -0
  62. package/dist/components/Progress.d.ts +27 -0
  63. package/dist/components/Progress.js +1 -0
  64. package/dist/components/Quote.d.ts +11 -0
  65. package/dist/components/Quote.js +1 -0
  66. package/dist/components/Radio.d.ts +21 -0
  67. package/dist/components/Radio.js +1 -0
  68. package/dist/components/RadioCards.d.ts +38 -0
  69. package/dist/components/RadioCards.js +1 -0
  70. package/dist/components/RadioGroup.d.ts +51 -0
  71. package/dist/components/RadioGroup.js +1 -0
  72. package/dist/components/RadioGroupPrimitive-D9grAL7G.js +1 -0
  73. package/dist/components/ScrollArea.d.ts +26 -0
  74. package/dist/components/ScrollArea.js +1 -0
  75. package/dist/components/Select.d.ts +90 -0
  76. package/dist/components/Select.js +1 -0
  77. package/dist/components/Separator.d.ts +14 -0
  78. package/dist/components/Separator.js +1 -0
  79. package/dist/components/Skeleton.d.ts +19 -0
  80. package/dist/components/Skeleton.js +1 -0
  81. package/dist/components/Slider.d.ts +81 -0
  82. package/dist/components/Slider.js +1 -0
  83. package/dist/components/Splitter.d.ts +57 -0
  84. package/dist/components/Splitter.js +1 -0
  85. package/dist/components/Steps.d.ts +38 -0
  86. package/dist/components/Steps.js +1 -0
  87. package/dist/components/Strong.d.ts +13 -0
  88. package/dist/components/Strong.js +1 -0
  89. package/dist/components/Switch.d.ts +57 -0
  90. package/dist/components/Switch.js +1 -0
  91. package/dist/components/TabNav.d.ts +21 -0
  92. package/dist/components/TabNav.js +1 -0
  93. package/dist/components/Table.d.ts +31 -0
  94. package/dist/components/Table.js +1 -0
  95. package/dist/components/Tabs.d.ts +43 -0
  96. package/dist/components/Tabs.js +1 -0
  97. package/dist/components/Text.d.ts +17 -0
  98. package/dist/components/Text.js +1 -0
  99. package/dist/components/TextArea.d.ts +19 -0
  100. package/dist/components/TextArea.js +1 -0
  101. package/dist/components/Theme.d.ts +17 -0
  102. package/dist/components/Theme.js +1 -0
  103. package/dist/components/Toggle.d.ts +34 -0
  104. package/dist/components/Toggle.js +1 -0
  105. package/dist/components/ToggleGroup.d.ts +63 -0
  106. package/dist/components/ToggleGroup.js +1 -0
  107. package/dist/components/Tooltip.d.ts +35 -0
  108. package/dist/components/Tooltip.js +1 -0
  109. package/dist/components/Tree.d.ts +37 -0
  110. package/dist/components/Tree.js +1 -0
  111. package/dist/components/VisuallyHidden.d.ts +12 -0
  112. package/dist/components/VisuallyHidden.js +1 -0
  113. package/dist/components/clsx-BaVHROc5.js +1 -0
  114. package/dist/components/floating-ui.react-CLbXmKZY.js +5 -0
  115. package/dist/components/index-BRmT6kl7.js +1 -0
  116. package/dist/components/index-BVxS3Ixi.js +1 -0
  117. package/dist/components/index-Bf4LVEjJ.js +1 -0
  118. package/dist/components/index-BtoPzkH9.js +1 -0
  119. package/dist/components/index-DBZNt4Em.js +1 -0
  120. package/dist/components/index-Dc5Cm9z0.js +1 -0
  121. package/dist/components/index-Di6TooPD.js +1 -0
  122. package/dist/components/index-DnCiOYxZ.js +1 -0
  123. package/dist/components/index-XqbKa2D2.js +1 -0
  124. package/dist/components/index-YgKcfT__.js +1 -0
  125. package/dist/components/index-fkj4Fdgt.js +1 -0
  126. package/dist/components/tslib.es6-BtVxab8e.js +1 -0
  127. package/dist/themes/default.css +1 -0
  128. package/dist/themes/tailwind-presets/default.js +1 -0
  129. package/package.json +119 -3
@@ -0,0 +1,83 @@
1
+ import * as react from 'react';
2
+ import react__default from 'react';
3
+ import * as _floating_ui_react from '@floating-ui/react';
4
+
5
+ type MenuPrimitiveItemProps = {
6
+ children: react__default.ReactNode;
7
+ className?: string;
8
+ label?: string;
9
+ };
10
+
11
+ type MenuPrimitiveContentProps = {
12
+ children: react__default.ReactNode;
13
+ className?: string;
14
+ };
15
+
16
+ type MenuPrimitiveTriggerProps = {
17
+ children: react__default.ReactNode;
18
+ className?: string;
19
+ asChild?: boolean;
20
+ };
21
+
22
+ declare const Menubar: {
23
+ (): null;
24
+ Root: react.ForwardRefExoticComponent<{
25
+ children: React.ReactNode;
26
+ customRootClass?: string;
27
+ className?: string;
28
+ } & Omit<Omit<react.HTMLProps<HTMLElement> & _floating_ui_react.CompositeProps, "ref"> & react.RefAttributes<HTMLElement>, "ref"> & react.RefAttributes<HTMLElement>>;
29
+ Menu: react.ForwardRefExoticComponent<{
30
+ children: React.ReactNode;
31
+ className?: string;
32
+ } & Omit<{
33
+ children: React.ReactNode;
34
+ className?: string;
35
+ open?: boolean;
36
+ onOpenChange?: (open: boolean) => void;
37
+ defaultOpen?: boolean;
38
+ crossAxisOffset?: number;
39
+ mainAxisOffset?: number;
40
+ } & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
41
+ Trigger: react.ForwardRefExoticComponent<{
42
+ children: React.ReactNode;
43
+ className?: string;
44
+ } & Omit<MenuPrimitiveTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
45
+ Content: react.ForwardRefExoticComponent<{
46
+ children: React.ReactNode;
47
+ className?: string;
48
+ } & Omit<MenuPrimitiveContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
49
+ Portal: react.ForwardRefExoticComponent<{
50
+ children: React.ReactNode;
51
+ } & Omit<{
52
+ children: React.ReactNode;
53
+ } & _floating_ui_react.FloatingPortalProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
54
+ Item: react.ForwardRefExoticComponent<{
55
+ children: React.ReactNode;
56
+ className?: string;
57
+ label?: string;
58
+ } & Omit<MenuPrimitiveItemProps & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
59
+ Sub: react.ForwardRefExoticComponent<{
60
+ children: React.ReactNode;
61
+ className?: string;
62
+ } & Omit<{
63
+ children: React.ReactNode;
64
+ className?: string;
65
+ open?: boolean;
66
+ onOpenChange?: (open: boolean) => void;
67
+ defaultOpen?: boolean;
68
+ } & {
69
+ children: React.ReactNode;
70
+ className?: string;
71
+ open?: boolean;
72
+ onOpenChange?: (open: boolean) => void;
73
+ defaultOpen?: boolean;
74
+ crossAxisOffset?: number;
75
+ mainAxisOffset?: number;
76
+ } & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
77
+ SubTrigger: react.ForwardRefExoticComponent<{
78
+ children: React.ReactNode;
79
+ className?: string;
80
+ } & Omit<MenuPrimitiveTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
81
+ };
82
+
83
+ export { Menubar as default };
@@ -0,0 +1 @@
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};
@@ -0,0 +1,23 @@
1
+ import * as react from 'react';
2
+
3
+ declare const NumberField: {
4
+ (): 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>>;
21
+ };
22
+
23
+ export { NumberField as default };
@@ -0,0 +1 @@
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};
@@ -0,0 +1,27 @@
1
+ import React, { ComponentPropsWithoutRef, ElementRef } from 'react';
2
+ import Primitive from '~/core/primitives/Primitive';
3
+
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>>;
17
+
18
+ declare const COMPONENT_NAME = "Progress";
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;
25
+
26
+ export { COMPONENT_NAME, Progress as default };
27
+ export type { ProgressProps };
@@ -0,0 +1 @@
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};
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+
3
+ type QuoteProps = React.ComponentPropsWithoutRef<'q'> & {
4
+ customRootClass?: string;
5
+ };
6
+ declare const Quote: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, "ref"> & {
7
+ customRootClass?: string;
8
+ } & React.RefAttributes<HTMLQuoteElement>>;
9
+
10
+ export { Quote as default };
11
+ export type { QuoteProps };
@@ -0,0 +1 @@
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};
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import RadioPrimitive, { RadioPrimitiveProps } from '~/core/primitives/Radio';
3
+
4
+ type RadioElement = React.ElementRef<typeof RadioPrimitive>;
5
+ type RadioProps = Omit<RadioPrimitiveProps, 'size'> & {
6
+ customRootClass?: string;
7
+ className?: string;
8
+ size?: string;
9
+ color?: string;
10
+ variant?: string;
11
+ };
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>>;
19
+
20
+ export { Radio as default };
21
+ export type { RadioElement, RadioProps };
@@ -0,0 +1 @@
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};
@@ -0,0 +1,38 @@
1
+ import React, { ForwardRefExoticComponent, ComponentPropsWithoutRef, RefAttributes, ElementRef } from 'react';
2
+ import { RadioGroupPrimitiveRootProps } from '~/core/primitives/RadioGroup/fragments/RadioGroupPrimitiveRoot';
3
+
4
+ type RadioCardsRootProps = RadioGroupPrimitiveRootProps & {
5
+ children: React.ReactNode;
6
+ className?: string;
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>>;
15
+
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
+ } & {
25
+ children?: React.ReactNode;
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;
36
+
37
+ export { RadioCards as default };
38
+ export type { RadioCardsElement, RadioCardsProps };
@@ -0,0 +1 @@
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};
@@ -0,0 +1,51 @@
1
+ import React from 'react';
2
+ import { RadioGroupPrimitiveProps } from '~/core/primitives/RadioGroup/RadioGroupPrimitive';
3
+ import Primitive from '~/core/primitives/Primitive';
4
+
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;
17
+ className?: string;
18
+ value: string;
19
+ } & Omit<{
20
+ label?: string;
21
+ description?: string;
22
+ asChild?: boolean;
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>>;
28
+
29
+ type RadioGroupIndicatorProps = {
30
+ children?: React.ReactNode;
31
+ className?: string;
32
+ } & RadioGroupPrimitiveProps.Indicator;
33
+ declare const RadioGroupIndicator: React.ForwardRefExoticComponent<RadioGroupIndicatorProps & React.RefAttributes<HTMLElement>>;
34
+
35
+ type RadioGroupLabelProps = React.ComponentPropsWithoutRef<typeof Primitive.label>;
36
+ declare const RadioGroupLabel: React.ForwardRefExoticComponent<RadioGroupLabelProps & React.RefAttributes<HTMLElement>>;
37
+
38
+ type RadioGroupElement = React.ElementRef<'div'>;
39
+ type RadioGroupProps = React.ComponentPropsWithoutRef<'div'> & {
40
+ children?: React.ReactNode;
41
+ };
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;
47
+ };
48
+ declare const RadioGroup: RadioGroupComponent;
49
+
50
+ export { RadioGroup as default };
51
+ export type { RadioGroupElement, RadioGroupProps };
@@ -0,0 +1 @@
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};
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+
3
+ declare const ScrollAreaRoot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
+ customRootClass?: string;
5
+ } & React.RefAttributes<HTMLDivElement>>;
6
+
7
+ declare const ScrollAreaViewport: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+
9
+ declare const ScrollAreaScrollbar: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
+ orientation?: "horizontal" | "vertical";
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+
13
+ declare const ScrollAreaThumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+
15
+ declare const ScrollAreaCorner: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
+
17
+ type ScrollAreaProps = React.ComponentPropsWithoutRef<'div'>;
18
+ declare const ScrollArea: React.ForwardRefExoticComponent<ScrollAreaProps> & {
19
+ Root: typeof ScrollAreaRoot;
20
+ Viewport: typeof ScrollAreaViewport;
21
+ Scrollbar: typeof ScrollAreaScrollbar;
22
+ Thumb: typeof ScrollAreaThumb;
23
+ Corner: typeof ScrollAreaCorner;
24
+ };
25
+
26
+ export { ScrollArea as default };
@@ -0,0 +1 @@
1
+ 'use client';import e,{createContext as r,forwardRef as n,useRef as t,useEffect as o,useContext as c,useCallback as l}from"react";import{_ as u,a as i}from"./tslib.es6-BtVxab8e.js";import{c as a}from"./clsx-BaVHROc5.js";import{c as s}from"./index-BVxS3Ixi.js";var d=r({rootClass:""}),v="ScrollArea",f=n((function(r,n){var c=r.children,l=r.className,f=void 0===l?"":l,m=r.customRootClass,p=void 0===m?"":m,h=u(r,["children","className","customRootClass"]),E=s(p,v),g=t(null),b=t(null);o((function(){y()}),[g,b]),o((function(){var e=b.current;if(e){var r=function(){y()},n=new ResizeObserver((function(n){for(var t=0,o=n;t<o.length;t++){var c=o[t];(c.target===e||e.contains(c.target))&&r()}}));n.observe(e);var t=function(e){n.observe(e),Array.from(e.children).forEach((function(e){t(e)}))};Array.from(e.children).forEach((function(e){t(e)}));var o=new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.forEach((function(e){e.nodeType===Node.ELEMENT_NODE&&t(e)}))})),r()}));return o.observe(e,{childList:!0,subtree:!0}),window.addEventListener("resize",r),function(){n.disconnect(),o.disconnect(),window.removeEventListener("resize",r)}}}),[]);var y=function(){var e,r,n=(null===(e=null==b?void 0:b.current)||void 0===e?void 0:e.clientHeight)||0,t=n/(((null===(r=null==b?void 0:b.current)||void 0===r?void 0:r.scrollHeight)||0)/n);t<24&&(t=24),g.current&&(g.current.style.height="".concat(t,"px"))},N=function(e){if(b.current){var r=b.current.scrollTop,n=e-r,t=performance.now(),o=function(e){var c=e-t,l=Math.min(c/150,1),u=1-Math.pow(1-l,3),i=r+n*u;b.current&&(b.current.scrollTop=i),l<1&&requestAnimationFrame(o)};requestAnimationFrame(o)}};return e.createElement(d.Provider,{value:{rootClass:E,scrollXThumbRef:g,scrollAreaViewportRef:b,handleScroll:function(){var e,r,n,t,o=(null===(e=b.current)||void 0===e?void 0:e.clientHeight)||0,c=(null===(r=b.current)||void 0===r?void 0:r.scrollHeight)||0,l=((null===(n=b.current)||void 0===n?void 0:n.scrollTop)||0)/(c-o)*(o-((null===(t=g.current)||void 0===t?void 0:t.clientHeight)||0));g.current&&(g.current.style.top="".concat(l,"px"))},handleScrollbarClick:function(e){!function(e){var r,n,t,o=(null===(r=null==b?void 0:b.current)||void 0===r?void 0:r.clientHeight)||0,c=((null===(n=null==b?void 0:b.current)||void 0===n?void 0:n.scrollHeight)||0)/o;if(g.current){var l=g.current.getBoundingClientRect().top,u=l+g.current.clientHeight,i=(null===(t=g.current)||void 0===t?void 0:t.clientHeight)||0;if(e>l&&e<u)return;if(e<l){var a=b.current.scrollTop-i*c;N(a)}e>u&&(a=b.current.scrollTop+i*c,N(a))}}(e.clientY)}}},e.createElement("div",i({ref:n,className:a(E,f)},h),c))}));f.displayName=v;var m=n((function(r,n){var t=r.children,o=r.className,l=void 0===o?"":o,s=u(r,["children","className"]),v=c(d),f=v.rootClass,m=v.scrollAreaViewportRef,p=v.handleScroll;return e.createElement("div",i({ref:function(e){m&&(m.current=e),"function"==typeof n?n(e):n&&(n.current=e)},className:a(f+"-viewport",l),onScroll:p},s),t)}));m.displayName="ScrollAreaViewport";var p=n((function(r,n){var o=r.children,s=r.className,v=void 0===s?"":s,f=r.orientation,m=u(r,["children","className","orientation"]),p=c(d),h=p.rootClass,E=p.handleScrollbarClick,g=p.scrollXThumbRef,b=t(null),y=t(!1),N=t(null),w=e.useState(!1),S=w[0],T=w[1],A=t(0),L=l((function(e){if(!(null==g?void 0:g.current))return!1;var r=g.current.getBoundingClientRect(),n=r.top,t=r.bottom;return!(e>=n&&e<=t)}),[g]),R=l((function(e){E&&(e.preventDefault(),A.current=e.clientY,E({clientY:e.clientY}),setTimeout((function(){y.current&&(b.current=setInterval((function(){y.current&&L(A.current)?E({clientY:A.current}):C()}),50))}),300),y.current=!0,T(!0))}),[E,L]),C=l((function(){var e;y.current=!1,null===(e=N.current)||void 0===e||e.call(N),N.current=null,b.current&&(clearInterval(b.current),b.current=null),T(!1)}),[]);return e.useEffect((function(){if(!y.current)return function(){var e;null===(e=N.current)||void 0===e||e.call(N),C()};var e=function(){return C()},r=function(){return C()};return document.addEventListener("mouseup",e),document.addEventListener("mouseleave",r),N.current=function(){document.removeEventListener("mouseup",e),document.removeEventListener("mouseleave",r)},function(){var e;null===(e=N.current)||void 0===e||e.call(N),N.current=null,C()}}),[S,C]),e.createElement("div",i({ref:n,className:a(h+"-scrollbar",v),"data-orientation":f,onMouseDown:R,onMouseUp:C,onMouseLeave:C},m),o)}));p.displayName="ScrollAreaScrollbar";var h=n((function(r,n){var o=r.children,s=r.className,v=void 0===s?"":s,f=u(r,["children","className"]),m=c(d),p=m.rootClass,h=m.scrollXThumbRef,E=m.scrollAreaViewportRef,g=t(!1),b=t({y:0,scrollTop:0}),y=l((function(e){(null==E?void 0:E.current)&&(null==h?void 0:h.current)&&(e.preventDefault(),e.stopPropagation(),g.current=!0,b.current={y:e.clientY,scrollTop:E.current.scrollTop},document.body.style.userSelect="none")}),[E,h]),N=l((function(e){var r;if(g.current&&(null==E?void 0:E.current)&&(null==h?void 0:h.current)){e.preventDefault();var n=e.clientY-b.current.y,t=null===(r=h.current.parentElement)||void 0===r?void 0:r.getBoundingClientRect();if(t){var o=E.current.clientHeight,c=E.current.scrollHeight,l=h.current.clientHeight,u=n/(t.height-l),i=c-o,a=b.current.scrollTop+u*i,s=Math.max(0,Math.min(a,i));E.current.scrollTop=s}}}),[E,h]),w=l((function(){g.current=!1,document.body.style.cursor="",document.body.style.userSelect=""}),[]);e.useEffect((function(){var e=function(e){return N(e)},r=function(){return w()};return g.current&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",r)),document.addEventListener("mousemove",e),document.addEventListener("mouseup",r),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",r),w()}}),[N,w]);return e.createElement("div",i({ref:function(e){h&&(h.current=e),"function"==typeof n?n(e):n&&(n.current=e)},className:a(p+"-thumb",v),onMouseDown:y},f),o)}));h.displayName="ScrollAreaThumb";var E=n((function(r,n){var t=r.children,o=u(r,["children"]);return e.createElement("div",i({ref:n},o),t)}));E.displayName="ScrollAreaCorner";var g=e.forwardRef((function(e,r){return console.warn("Direct usage of ScrollArea is not supported. Please use ScrollArea.Root and ScrollArea.Viewport instead."),null}));g.Root=f,g.Viewport=m,g.Scrollbar=p,g.Thumb=h,g.Corner=E,g.displayName="ScrollArea";export{g as default};
@@ -0,0 +1,90 @@
1
+ import React from 'react';
2
+ import SelectPrimitive from '~/core/primitives/Select/Select';
3
+ import * as _floating_ui_react from '@floating-ui/react';
4
+
5
+ type SelectContentProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> & {
6
+ customRootClass?: string;
7
+ };
8
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+
10
+ interface SelectPrimitiveItemProps {
11
+ children: React.ReactNode;
12
+ value: string;
13
+ disabled?: boolean;
14
+ className?: string;
15
+ [key: string]: any;
16
+ }
17
+
18
+ declare const SelectItem: React.ForwardRefExoticComponent<(Omit<Omit<Omit<SelectPrimitiveItemProps & Omit<React.InputHTMLAttributes<HTMLInputElement> & {
19
+ asChild?: boolean;
20
+ } & React.RefAttributes<HTMLElement>, "ref">, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & {
21
+ customRootClass?: string;
22
+ }, "ref"> | Omit<Omit<Omit<SelectPrimitiveItemProps & Omit<React.HTMLAttributes<HTMLElement> & {
23
+ asChild?: boolean;
24
+ children?: React.ReactNode;
25
+ } & React.RefAttributes<HTMLElement>, "ref">, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & {
26
+ customRootClass?: string;
27
+ }, "ref">) & React.RefAttributes<HTMLElement>>;
28
+
29
+ type SelectPrimitiveTriggerProps = {
30
+ children: React.ReactNode;
31
+ className?: string;
32
+ disabled?: boolean;
33
+ [key: string]: any;
34
+ };
35
+
36
+ declare const SelectTrigger: React.ForwardRefExoticComponent<(Omit<Omit<Omit<SelectPrimitiveTriggerProps & Omit<React.InputHTMLAttributes<HTMLInputElement> & {
37
+ asChild?: boolean;
38
+ } & React.RefAttributes<HTMLElement>, "ref">, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & {
39
+ customRootClass?: string;
40
+ placeholder?: boolean;
41
+ }, "ref"> | Omit<Omit<Omit<SelectPrimitiveTriggerProps & Omit<React.HTMLAttributes<HTMLElement> & {
42
+ asChild?: boolean;
43
+ children?: React.ReactNode;
44
+ } & React.RefAttributes<HTMLElement>, "ref">, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & {
45
+ customRootClass?: string;
46
+ placeholder?: boolean;
47
+ }, "ref">) & React.RefAttributes<HTMLElement>>;
48
+
49
+ type SelectRootProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Root> & {
50
+ customRootClass?: string;
51
+ };
52
+ declare const SelectRoot: React.ForwardRefExoticComponent<SelectRootProps & React.RefAttributes<HTMLElement>>;
53
+
54
+ declare const SelectIndicator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
55
+
56
+ type SelectPortalProps = {
57
+ children: React.ReactNode;
58
+ container?: HTMLElement | null;
59
+ };
60
+ declare const SelectPortal: React.ForwardRefExoticComponent<Omit<{
61
+ children: React.ReactNode;
62
+ container?: HTMLElement | null;
63
+ } & _floating_ui_react.FloatingPortalProps & React.RefAttributes<never>, "ref"> & SelectPortalProps & React.RefAttributes<never>>;
64
+
65
+ type SelectPrimitiveGroupProps = {
66
+ children: React.ReactNode;
67
+ className?: string;
68
+ };
69
+
70
+ type SelectGroupProps = {
71
+ children: React.ReactNode;
72
+ };
73
+ declare const SelectGroup: React.ForwardRefExoticComponent<Omit<SelectPrimitiveGroupProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
74
+
75
+ type SelectSearchProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Search>;
76
+ declare const SelectSearch: React.ForwardRefExoticComponent<SelectSearchProps & React.RefAttributes<HTMLElement>>;
77
+
78
+ interface SelectComponent extends React.ForwardRefExoticComponent<React.RefAttributes<unknown>> {
79
+ Root: typeof SelectRoot;
80
+ Content: typeof SelectContent;
81
+ Item: typeof SelectItem;
82
+ Trigger: typeof SelectTrigger;
83
+ Portal: typeof SelectPortal;
84
+ Group: typeof SelectGroup;
85
+ Indicator: typeof SelectIndicator;
86
+ Search: typeof SelectSearch;
87
+ }
88
+ declare const Select: SelectComponent;
89
+
90
+ export { Select as default };
@@ -0,0 +1 @@
1
+ 'use client';import e,{createContext as t,useContext as a,useState as r,useEffect as n,useLayoutEffect as l}from"react";import{_ as o,a as i}from"./tslib.es6-BtVxab8e.js";import{F as s}from"./index-Di6TooPD.js";import{P as c}from"./index-Dc5Cm9z0.js";import{c as u}from"./index-DBZNt4Em.js";import{u as d}from"./index-fkj4Fdgt.js";import{c as f}from"./index-BVxS3Ixi.js";import"./floating-ui.react-CLbXmKZY.js";import"react/jsx-runtime";import"react-dom";var m=t({}),v=e.forwardRef((function(t,r){var n=t.children,l=t.className,c=o(t,["children","className"]),u=a(m),d=u.isOpen,f=u.elementsRef,v=u.labelsRef,p=u.floatingContext,h=u.refs,g=u.getFloatingProps,R=u.floatingStyles;return e.createElement(e.Fragment,null,d&&e.createElement(s.FocusManager,{context:p},e.createElement(s.FloatingList,{elementsRef:f,labelsRef:v},e.createElement("div",i({ref:s.useMergeRefs([h.setFloating,r]),style:R,className:l,"data-state":d?"open":"closed"},g(),c),n))))}));v.displayName="SelectPrimitiveContent";var p=e.forwardRef((function(t,r){var n,l=t.children,u=t.value,d=t.disabled,f=t.className,v=o(t,["children","value","disabled","className"]),p=a(m);if(!p)return console.error("SelectPrimitiveItem must be used within a SelectPrimitive"),null;var h=p.handleSelect,g=p.isTypingRef,R=p.getItemProps,C=p.activeIndex,S=p.selectedIndex,b=p.virtualItemRef,N=p.selectedItemRef,I=p.hasSearch;p.disabledIndices;var y=p.setDisabledIndices,E=p.valuesRef,x=e.useRef(null),w=s.useListItem({label:u}),P=w.ref,k=w.index,V=e.useRef(k),L=C===k,D=S===k,F=u||"select-item-".concat(k);return e.useEffect((function(){var e=V.current;return E.current[k]=F,e!==k&&delete E.current[e],y((function(t){var a=new Set(t);return a.delete(e),d?a.add(k):a.delete(k),Array.from(a).sort((function(e,t){return e-t}))})),D&&!I&&(N.current=x.current),V.current=k,function(){y((function(e){var t=new Set(e);return t.delete(V.current),Array.from(t).sort((function(e,t){return e-t}))}))}}),[k,d,D,I,y,N,E]),e.createElement(c.div,i({ref:s.useMergeRefs([P,x,r]),id:F,role:"option",className:f,"data-value":u,"data-label":u,"data-active":I?(null===(n=b.current)||void 0===n?void 0:n.id)==F:L,"aria-selected":D,"aria-disabled":!!d||void 0,"data-disabled":d?"":void 0},R({tabIndex:d?-1:L?0:-1,onClick:function(){return!d&&h(k)},onKeyDown:function(e){d||("Enter"===e.key&&(e.preventDefault(),h(k))," "!==e.key||g.current||(e.preventDefault(),h(k)))}}),v,{tabIndex:d?-1:L?0:-1}),l)}));p.displayName="SelectPrimitiveItem";var h=e.forwardRef((function(t,r){var n=t.children,l=t.className,d=t.disabled,f=t.asChild,v=t.onClick,p=o(t,["children","className","disabled","asChild","onClick"]),h=a(m),g=h.isOpen,R=h.setIsOpen,C=h.selectedLabel,S=h.refs,b=(0,h.getReferenceProps)();b.onClick;var N=o(b,["onClick"]),I=u(v,(function(){d||R((function(e){return!e}))}));return e.createElement(c.button,i({type:f?void 0:"button",className:l,"aria-expanded":g,"data-state":g?"open":"closed","aria-disabled":!!d||void 0,disabled:!!d||void 0,ref:s.useMergeRefs([S.setReference,r]),role:"combobox",asChild:f,onClick:I},N,p),C||n)}));h.displayName="SelectPrimitiveTrigger";var g=e.forwardRef((function(t,a){var u=t.children,f=t.className,v=t.value,p=t.name,h=t.defaultValue,g=void 0===h?"":h,R=t.onValueChange;t.onClickOutside;var C=t.placement,S=void 0===C?"bottom-start":C,b=t.offsetValue,N=t.shift,I=void 0===N||N,y=o(t,["children","className","value","name","defaultValue","onValueChange","onClickOutside","placement","offsetValue","shift"]),E=e.useState(!1),x=E[0],w=E[1],P=e.useState(b),k=P[0],V=P[1],L=d(v,g,R),D=L[0],F=L[1],O=e.useRef(null),T=e.useRef([]),j=e.useRef([]),A=e.useRef([]),M=e.useState([]),G=M[0],B=M[1],q=e.useRef(!1),H=e.useRef(null),K=e.useRef(null),W=e.useState(null),_=W[0],z=W[1],J=e.useState(null),Q=J[0],U=J[1],X=e.useState(!1),Y=X[0],Z=X[1],$=function(e){var t=r(!1),a=t[0],l=t[1];return n((function(){if(e){for(var t=e;t;){if("FORM"===t.tagName)return void l(!0);t=t.parentElement}l(!1)}else l(!1)}),[e]),a}(H.current),ee=s.useFloating({middleware:[s.offset(k)],open:x,onOpenChange:w,placement:S}),te=ee.refs,ae=ee.floatingStyles,re=ee.context,ne=s.useClick(re),le=s.useDismiss(re),oe=s.useRole(re,{role:"listbox"});var ie=e.useCallback((function(e){var t;if(null!==e&&!G.includes(e)&&(U(e),w(!1),null===(t=te.reference.current)||void 0===t||t.focus(),null!==e)){var a=j.current[e];a&&F(a)}}),[G,j,U,w,F,te]),se=s.useListNavigation(re,{listRef:T,activeIndex:_,selectedIndex:Q,onNavigate:z,virtual:Y,virtualItemRef:K,disabledIndices:G}),ce=s.useTypeahead(re,{listRef:j,activeIndex:_,selectedIndex:Q,enabled:!Y,onMatch:function(e){null===e||G.includes(e)||(x?z(e):ie(e))},onTypingChange:function(e){q.current=e}}),ue=s.useInteractions([ne,le,oe,se,ce]),de=ue.getReferenceProps,fe=ue.getFloatingProps,me=ue.getItemProps;l((function(){if(I&&O&&te.floating.current&&O.current){var e=te.floating.current.getBoundingClientRect(),t=O.current.getBoundingClientRect(),a=e.top-t.bottom;V(a)}}),[O.current,I]);var ve={isOpen:x,setIsOpen:w,handleSelect:ie,floatingContext:re,refs:te,getFloatingProps:fe,getReferenceProps:de,floatingStyles:ae,getItemProps:me,activeIndex:_,selectedIndex:Q,elementsRef:T,labelsRef:j,valuesRef:A,disabledIndices:G,setDisabledIndices:B,setActiveIndex:z,selectedLabel:D,isTypingRef:q,virtualItemRef:K,hasSearch:Y,setHasSearch:Z,selectedItemRef:O};return e.createElement(m.Provider,{value:ve},e.createElement(c.div,i({},y,{className:f,ref:s.useMergeRefs([H,a]),"data-state":x?"open":"closed"}),u,$&&e.createElement("select",{name:p,value:D,hidden:!0,"aria-hidden":"true",tabIndex:-1,onChange:function(){}},e.createElement("option",{value:D},D))))}));g.displayName="SelectPrimitiveRoot";var R=e.forwardRef((function(t,l){var c=t.children,u=t.container,d=o(t,["children","container"]),f=a(m).isOpen,v=r(!1),p=v[0],h=v[1],g=u||document.querySelector("#rad-ui-theme-container")||document.body;return n((function(){g&&h(!0)}),[g]),f&&p?e.createElement(s.Portal,i({root:g},d),c):null}));R.displayName="SelectPrimitivePortal";var C=e.forwardRef((function(t,a){var r=t.children,n=t.className,l=o(t,["children","className"]);return e.createElement("div",i({className:n,ref:a},l),r)}));C.displayName="SelectPrimitiveGroup";var S=e.forwardRef((function(t,r){var n,l=t.className,u=o(t,["className"]),d=e.useState(""),f=d[0],v=d[1],p=a(m),h=e.useRef(null);if(!p||!p.refs)return e.createElement(c.input,i({type:"search",className:l,placeholder:"Search...",value:f,onChange:function(e){return v(e.target.value)},ref:r},u));var g=p.refs,R=p.handleSelect,C=p.labelsRef,S=p.valuesRef,b=p.activeIndex,N=p.elementsRef,I=p.virtualItemRef,y=p.getReferenceProps;p.isTypingRef;var E=p.setHasSearch,x=e.useRef([]);e.useEffect((function(){E(!0),p&&p.setActiveIndex(0)}),[E]),e.useEffect((function(){if(g.floating.current){var e=g.floating.current,t=Array.from(e.querySelectorAll('[role="option"]'));0===x.current.length&&(x.current=t.map((function(e){var t;return{element:e,label:e.getAttribute("data-label")||(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"",value:e.getAttribute("data-value")||e.id||"",parent:e.parentElement}}))),x.current.forEach((function(e){var t=e.element;t.parentElement&&t.parentElement.removeChild(t)}));var a=[];x.current.forEach((function(e){var t=e.element,r=e.label,n=e.value,l=e.parent;r.toLowerCase().includes(f.toLowerCase())&&l&&(l.appendChild(t),a.push({element:t,label:r,value:n}))})),p.setActiveIndex(null),N.current=a.map((function(e){return e.element})),C.current=a.map((function(e){return e.label}))}}),[f,g.floating.current]);var w=y();return e.createElement(c.input,i({type:"search",className:l,placeholder:"Search...",ref:s.useMergeRefs([h,r]),value:f,"aria-activedescendant":(null===(n=I.current)||void 0===n?void 0:n.id)||(null!==b&&S.current[b]?S.current[b]:void 0),onChange:function(e){return v(e.target.value)}},w,{onKeyDown:function(e){null!==b&&"Enter"===e.key&&(e.preventDefault(),R(b))}},u))}));S.displayName="SelectPrimitiveSearch";var b=e.forwardRef((function(e,t){return console.warn("Direct usage of Select is not supported. Please use Select.Root, Select.Content, etc. instead."),null}));b.displayName="SelectPrimitive";var N=b;N.Root=g,N.Content=v,N.Portal=R,N.Item=p,N.Trigger=h,N.Group=C,N.Search=S;var I=e.createContext({rootClass:""}),y=e.forwardRef((function(t,r){t.customRootClass;var n=t.children,l=t.position,s=void 0===l?"popper":l,c=o(t,["customRootClass","children","position"]),u=a(I).rootClass;return e.createElement(N.Content,i({className:"".concat(u,"-content"),position:s,"data-position":s,ref:r},c),n)}));y.displayName="SelectContent";var E=e.forwardRef((function(t,r){t.customRootClass;var n=t.children,l=t.value,s=t.disabled,c=o(t,["customRootClass","children","value","disabled"]),u=a(I).rootClass;return e.createElement(N.Item,i({className:"".concat(u,"-item"),value:l,disabled:s,"data-disabled":s?"":void 0,role:"option","aria-disabled":s?"true":void 0,ref:r},c),e.createElement("span",{className:"".concat(u,"-text")},n))}));E.displayName="SelectItem";var x=e.forwardRef((function(t,r){t.customRootClass;var n=t.children,l=t.disabled,s=t.placeholder,c=o(t,["customRootClass","children","disabled","placeholder"]),u=a(I).rootClass;return e.createElement(N.Trigger,i({className:"".concat(u,"-trigger"),"aria-disabled":l?"true":void 0,"data-placeholder":s?"":void 0,disabled:l,ref:r},c),n)}));x.displayName="SelectTrigger";var w=e.forwardRef((function(t,a){var r=t.customRootClass,n=t.children,l=t.defaultValue,s=t.value,c=t.onValueChange,u=t.shift,d=o(t,["customRootClass","children","defaultValue","value","onValueChange","shift"]),m=f(r,"Select");return e.createElement(I.Provider,{value:{rootClass:m}},e.createElement(N.Root,i({className:"".concat(m,"-root"),defaultValue:l,value:s,onValueChange:c,shift:u,ref:a},d),n))}));w.displayName="SelectRoot";var P=e.forwardRef((function(t,r){var n=a(I).rootClass;return e.createElement("div",i({className:"".concat(n,"-item-indicator"),ref:r},t),e.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M13.3332 4L5.99984 11.3333L2.6665 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})))}));P.displayName="SelectIndicator";var k=e.forwardRef((function(t,a){var r=t.children,n=t.container,l=o(t,["children","container"]);return e.createElement(N.Portal,i({ref:a,container:n},l),r)}));k.displayName="SelectPortal";var V=e.forwardRef((function(t,r){var n=t.children,l=o(t,["children"]),s=a(I).rootClass;return e.createElement(N.Group,i({className:"".concat(s,"-group"),ref:r},l),n)}));V.displayName="SelectGroup";var L=e.forwardRef((function(t,r){var n=a(I).rootClass;return e.createElement(N.Search,i({className:"".concat(n,"-search"),ref:r},t))}));L.displayName="SelectSearch";var D=e.forwardRef((function(e,t){return console.warn("Direct usage of Select is not supported. Please use Select.Root, Select.Content, etc. instead."),null}));D.displayName="Select";var F=D;F.Root=w,F.Content=y,F.Item=E,F.Trigger=x,F.Portal=k,F.Group=V,F.Indicator=P,F.Search=L;export{F as default};
@@ -0,0 +1,14 @@
1
+ import React, { ComponentPropsWithoutRef } from 'react';
2
+ import Primitive from '~/core/primitives/Primitive';
3
+
4
+ type PrimitiveDivProps = ComponentPropsWithoutRef<typeof Primitive.div>;
5
+ type SeparatorProps = {
6
+ orientation?: 'horizontal' | 'vertical';
7
+ customRootClass?: string;
8
+ color?: string;
9
+ decorative?: boolean;
10
+ } & PrimitiveDivProps;
11
+ declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLElement>>;
12
+
13
+ export { Separator as default };
14
+ export type { SeparatorProps };
@@ -0,0 +1 @@
1
+ 'use client';import{_ as a,a as o}from"./tslib.es6-BtVxab8e.js";import r from"react";import{c as t}from"./index-BVxS3Ixi.js";import{c as e}from"./clsx-BaVHROc5.js";import{P as i}from"./index-Dc5Cm9z0.js";var s="Separator",c=r.forwardRef((function(c,l){var m=c.orientation,n=void 0===m?"horizontal":m,d=c.className,f=c.customRootClass,v=c.color,p=void 0===v?"":v,u=c.decorative,j=void 0!==u&&u,x=a(c,["orientation","className","customRootClass","color","decorative"]),N=t(f,s),h="".concat(N,"vertical"===n?"-vertical":"-horizontal"),R={};return R["data-orientation"]=n,p&&(R["data-rad-ui-accent-color"]=p),j&&(R.role="separator",R["aria-hidden"]="true"),r.createElement(i.div,o({ref:l,className:e(N,h,d)},R,x))}));c.displayName=s;export{c as default};