@radui/ui 0.0.46 → 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 (130) 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/clsx-BaVHROc5.js +1 -0
  115. package/dist/components/floating-ui.react-CLbXmKZY.js +5 -0
  116. package/dist/components/index-BRmT6kl7.js +1 -0
  117. package/dist/components/index-BVxS3Ixi.js +1 -0
  118. package/dist/components/index-Bf4LVEjJ.js +1 -0
  119. package/dist/components/index-BtoPzkH9.js +1 -0
  120. package/dist/components/index-DBZNt4Em.js +1 -0
  121. package/dist/components/index-Dc5Cm9z0.js +1 -0
  122. package/dist/components/index-Di6TooPD.js +1 -0
  123. package/dist/components/index-DnCiOYxZ.js +1 -0
  124. package/dist/components/index-XqbKa2D2.js +1 -0
  125. package/dist/components/index-YgKcfT__.js +1 -0
  126. package/dist/components/index-fkj4Fdgt.js +1 -0
  127. package/dist/components/tslib.es6-BtVxab8e.js +1 -0
  128. package/dist/themes/default.css +1 -1
  129. package/package.json +21 -3
  130. package/dist/components/setupTests.d.ts +0 -3
@@ -1,37 +1,90 @@
1
- import * as React from 'react';
2
- import React__default from 'react';
1
+ import React from 'react';
2
+ import SelectPrimitive from '~/core/primitives/Select/Select';
3
+ import * as _floating_ui_react from '@floating-ui/react';
3
4
 
4
- type SelectPortalProps = {
5
- children: React__default.ReactNode;
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;
6
34
  };
7
35
 
8
- declare function SelectContent({ customRootClass, children, position, ...props }: any): React__default.JSX.Element;
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>>;
9
48
 
10
- declare function SelectItem({ customRootClass, children, value, disabled, ...props }: any): React__default.JSX.Element;
49
+ type SelectRootProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Root> & {
50
+ customRootClass?: string;
51
+ };
52
+ declare const SelectRoot: React.ForwardRefExoticComponent<SelectRootProps & React.RefAttributes<HTMLElement>>;
11
53
 
12
- declare function SelectTrigger({ customRootClass, children, disabled, placeholder, ...props }: any): React__default.JSX.Element;
54
+ declare const SelectIndicator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
55
 
14
- declare function SelectRoot({ customRootClass, children, defaultValue, value, onValueChange, shift, ...props }: any): React__default.JSX.Element;
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>>;
15
64
 
16
- declare function SelectIndicator(): React__default.JSX.Element;
65
+ type SelectPrimitiveGroupProps = {
66
+ children: React.ReactNode;
67
+ className?: string;
68
+ };
17
69
 
18
70
  type SelectGroupProps = {
19
- children: React__default.ReactNode;
71
+ children: React.ReactNode;
20
72
  };
21
- declare function SelectGroup({ children }: SelectGroupProps): React__default.JSX.Element;
73
+ declare const SelectGroup: React.ForwardRefExoticComponent<Omit<SelectPrimitiveGroupProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
22
74
 
23
- declare function SelectSearch(): React__default.JSX.Element;
75
+ type SelectSearchProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Search>;
76
+ declare const SelectSearch: React.ForwardRefExoticComponent<SelectSearchProps & React.RefAttributes<HTMLElement>>;
24
77
 
25
- declare const Select: {
26
- (): null;
78
+ interface SelectComponent extends React.ForwardRefExoticComponent<React.RefAttributes<unknown>> {
27
79
  Root: typeof SelectRoot;
28
80
  Content: typeof SelectContent;
29
81
  Item: typeof SelectItem;
30
82
  Trigger: typeof SelectTrigger;
31
- Portal: ({ children }: SelectPortalProps) => React.JSX.Element;
83
+ Portal: typeof SelectPortal;
32
84
  Group: typeof SelectGroup;
33
85
  Indicator: typeof SelectIndicator;
34
86
  Search: typeof SelectSearch;
35
- };
87
+ }
88
+ declare const Select: SelectComponent;
36
89
 
37
90
  export { Select as default };
@@ -1 +1 @@
1
- 'use client';import e from"./Select/fragments/SelectContent.js";import t from"./Select/fragments/SelectItem.js";import r from"./Select/fragments/SelectTrigger.js";import o from"./Select/fragments/SelectRoot.js";import c from"./Select/fragments/SelectIndicator.js";import l from"./Select/fragments/SelectPortal.js";import m from"./Select/fragments/SelectGroup.js";import n from"./Select/fragments/SelectSearch.js";var s=function(){return console.warn("Direct usage of Select is not supported. Please use Select.Root, Select.Content, etc. instead."),null};s.Root=o,s.Content=e,s.Item=t,s.Trigger=r,s.Portal=l,s.Group=m,s.Indicator=c,s.Search=n;export{s as default};
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};
@@ -1,18 +1,14 @@
1
- import React from 'react';
1
+ import React, { ComponentPropsWithoutRef } from 'react';
2
+ import Primitive from '~/core/primitives/Primitive';
2
3
 
4
+ type PrimitiveDivProps = ComponentPropsWithoutRef<typeof Primitive.div>;
3
5
  type SeparatorProps = {
4
6
  orientation?: 'horizontal' | 'vertical';
5
- className?: string;
6
7
  customRootClass?: string;
7
8
  color?: string;
8
- asChild?: boolean;
9
9
  decorative?: boolean;
10
- props?: any;
11
- } & React.ComponentProps<'div'>;
12
- declare const Separator: {
13
- ({ orientation, className, customRootClass, color, asChild, decorative, ...props }: SeparatorProps): React.JSX.Element;
14
- displayName: string;
15
- };
10
+ } & PrimitiveDivProps;
11
+ declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLElement>>;
16
12
 
17
13
  export { Separator as default };
18
14
  export type { SeparatorProps };
@@ -1 +1 @@
1
- 'use client';import{__rest as o,__assign as r}from"./node_modules/tslib/tslib.es6.js";import a from"react";import{customClassSwitcher as i}from"./src/core/customClassSwitcher/index.js";import{clsx as t}from"./node_modules/clsx/dist/clsx.js";import e from"./src/core/primitives/Primitive/index.js";var s="Separator",c=function(c){var l=c.orientation,d=void 0===l?"horizontal":l,m=c.className,n=c.customRootClass,v=c.color,p=void 0===v?"":v,u=c.asChild,f=void 0!==u&&u,h=c.decorative,C=void 0!==h&&h,x=o(c,["orientation","className","customRootClass","color","asChild","decorative"]),j=i(n,s),N="".concat(j,"vertical"===d?"-vertical":"-horizontal"),b={};return b["data-orientation"]=d,p&&(b["data-rad-ui-accent-color"]=p),C&&(b.role="separator",b["aria-hidden"]="true"),a.createElement(e.div,r({className:t(j,N,m),asChild:f},b,x))};c.displayName=s;export{c as default};
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};
@@ -1,18 +1,19 @@
1
1
  import React from 'react';
2
2
 
3
- type SkeletonProps = {
3
+ type SkeletonProps = React.ComponentPropsWithoutRef<'div'> & {
4
4
  loading: boolean;
5
- className?: string;
6
5
  customRootClass?: string;
7
- children: React.ReactNode;
8
6
  height: string;
9
7
  width: string;
10
8
  radius?: string;
11
9
  };
12
- declare const Skeleton: {
13
- ({ loading, className, customRootClass, children, height, width, radius, ...props }: SkeletonProps): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
14
- displayName: string;
15
- };
10
+ declare const Skeleton: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
11
+ loading: boolean;
12
+ customRootClass?: string;
13
+ height: string;
14
+ width: string;
15
+ radius?: string;
16
+ } & React.RefAttributes<HTMLDivElement>>;
16
17
 
17
18
  export { Skeleton as default };
18
19
  export type { SkeletonProps };
@@ -1 +1 @@
1
- 'use client';import{__rest as s,__assign as e}from"./node_modules/tslib/tslib.es6.js";import t from"react";import{customClassSwitcher as o}from"./src/core/customClassSwitcher/index.js";import{clsx as i}from"./node_modules/clsx/dist/clsx.js";var r="Skeleton",l=function(l){var a,d=l.loading,m=void 0===d||d,c=l.className,n=void 0===c?"":c,h=l.customRootClass,u=void 0===h?"":h,f=l.children,v=l.height,p=l.width,g=l.radius,k=s(l,["loading","className","customRootClass","children","height","width","radius"]);if(!m)return f;var w=o(u,r);return t.createElement("div",e({className:i(w,n)},k,{style:(a={},a["--skeleton-height"]=v,a["--skeleton-width"]=p,a["--skeleton-radius"]=g,a)}))};l.displayName=r;export{l as default};
1
+ 'use client';import{_ as e,a as s}from"./tslib.es6-BtVxab8e.js";import t from"react";import{c as a}from"./index-BVxS3Ixi.js";import{c as r}from"./clsx-BaVHROc5.js";var i="Skeleton",o=t.forwardRef((function(o,l){var d,m=o.loading,n=void 0===m||m,c=o.className,h=void 0===c?"":c,f=o.customRootClass,u=void 0===f?"":f,v=o.children,g=o.height,p=o.width,k=o.radius,w=o.style,y=e(o,["loading","className","customRootClass","children","height","width","radius","style"]);if(!n)return t.createElement(t.Fragment,null,v);var N=a(u,i);return t.createElement("div",s({ref:l,className:r(N,h),style:s(s({},w),(d={},d["--skeleton-height"]=g,d["--skeleton-width"]=p,d["--skeleton-radius"]=k,d))},y))}));o.displayName=i;export{o as default};
@@ -1,29 +1,81 @@
1
- import * as react from 'react';
2
-
3
- declare const Slider: {
4
- (): null;
5
- Root: ({ children, className, customRootClass, defaultValue, min, max, step, disabled, readOnly, orientation, valueLabelDisplay }: {
6
- children: React.ReactNode;
7
- className?: string;
8
- customRootClass?: string;
9
- defaultValue?: number;
10
- min?: number;
11
- max?: number;
12
- step?: number;
13
- disabled?: boolean;
14
- readOnly?: boolean;
15
- orientation?: "horizontal" | "vertical";
16
- valueLabelDisplay?: "auto" | "on" | "off";
17
- }) => react.JSX.Element;
18
- Track: ({ children }: {
19
- children: React.ReactNode;
20
- }) => react.JSX.Element;
21
- Range: ({ children }: {
22
- children: React.ReactNode;
23
- }) => react.JSX.Element;
24
- Thumb: ({ children }: {
25
- children: React.ReactNode;
26
- }) => react.JSX.Element;
1
+ import React, { ForwardRefExoticComponent, ComponentPropsWithoutRef, RefAttributes, ElementRef } from 'react';
2
+
3
+ declare const SliderRoot: React.ForwardRefExoticComponent<{
4
+ children: React.ReactNode;
5
+ className?: string;
6
+ customRootClass?: string;
7
+ defaultValue?: number;
8
+ value?: number;
9
+ onValueChange?: (value: number) => void;
10
+ min?: number;
11
+ max?: number;
12
+ step?: number;
13
+ disabled?: boolean;
14
+ name?: string;
15
+ orientation?: "horizontal" | "vertical";
16
+ pageStepMultiplier?: number;
17
+ showStepMarks?: boolean;
18
+ formatValue?: (value: number) => string;
19
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
+
21
+ declare const SliderTrack: React.ForwardRefExoticComponent<{
22
+ children: React.ReactNode;
23
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
24
+
25
+ declare const SliderThumb: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
26
+ children?: React.ReactNode;
27
+ asChild?: boolean;
28
+ 'aria-label'?: string;
29
+ 'aria-labelledby'?: string;
30
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLElement>>>;
31
+
32
+ declare const SliderRange: React.ForwardRefExoticComponent<{
33
+ children: React.ReactNode;
34
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
35
+
36
+ declare const SliderMarks: React.ForwardRefExoticComponent<{
37
+ children?: React.ReactNode;
38
+ customMarks?: Array<{
39
+ value: number;
40
+ label?: string;
41
+ }>;
42
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
43
+
44
+ declare const SliderRangeSlider: React.ForwardRefExoticComponent<{
45
+ children?: React.ReactNode;
46
+ 'aria-label'?: string;
47
+ 'aria-labelledby'?: string;
48
+ defaultValue?: [number, number];
49
+ value?: [number, number];
50
+ onValueChange?: (value: [number, number]) => void;
51
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
52
+
53
+ type SliderElement = ElementRef<'div'>;
54
+ type SliderProps = {
55
+ defaultValue?: number;
56
+ value?: number;
57
+ onValueChange?: (value: number) => void;
58
+ min?: number;
59
+ max?: number;
60
+ step?: number;
61
+ disabled?: boolean;
62
+ name?: string;
63
+ orientation?: 'horizontal' | 'vertical';
64
+ pageStepMultiplier?: number;
65
+ showStepMarks?: boolean;
66
+ formatValue?: (value: number) => string;
67
+ 'aria-label'?: string;
68
+ 'aria-labelledby'?: string;
69
+ } & ComponentPropsWithoutRef<'div'>;
70
+ type SliderComponent = ForwardRefExoticComponent<SliderProps & RefAttributes<SliderElement>> & {
71
+ Root: typeof SliderRoot;
72
+ Track: typeof SliderTrack;
73
+ Range: typeof SliderRange;
74
+ Thumb: typeof SliderThumb;
75
+ Marks: typeof SliderMarks;
76
+ RangeSlider: typeof SliderRangeSlider;
27
77
  };
78
+ declare const Slider: SliderComponent;
28
79
 
29
80
  export { Slider as default };
81
+ export type { SliderElement, SliderProps };
@@ -1 +1 @@
1
- 'use client';import r from"./Slider/fragments/SliderRoot.js";import e from"./Slider/fragments/SliderTrack.js";import o from"./Slider/fragments/SliderThumb.js";import t from"./Slider/fragments/SliderRange.js";var i=function(){return console.warn("Direct usage of Slider is not supported. Please use Slider.Root, Slider.Track, etc. instead."),null};i.Root=r,i.Track=e,i.Range=t,i.Thumb=o;export{i as default};
1
+ 'use client';import{_ as e,a,b as t}from"./tslib.es6-BtVxab8e.js";import r,{createContext as n,forwardRef as o}from"react";import{c as l}from"./clsx-BaVHROc5.js";import{c as i}from"./index-BVxS3Ixi.js";import{u as c}from"./index-fkj4Fdgt.js";import{P as u}from"./index-Dc5Cm9z0.js";var s=n({rootClass:"",value:0,setValue:function(){},minValue:0,maxValue:100,step:1,name:void 0,isDragging:!1,setDragging:function(){},disabled:!1,orientation:"horizontal",pageStepMultiplier:10,showStepMarks:!1,formatValue:void 0}),m="Slider",d=o((function(t,n){var o=t.children,u=t.className,d=void 0===u?"":u,v=t.customRootClass,p=void 0===v?"":v,f=t.defaultValue,h=void 0===f?0:f,b=t.value,g=t.onValueChange,w=t.min,x=void 0===w?0:w,k=t.max,y=void 0===k?100:k,M=t.step,V=void 0===M?1:M,E=t.disabled,S=void 0!==E&&E,C=t.name,N=t.orientation,D=void 0===N?"horizontal":N,P=t.pageStepMultiplier,R=void 0===P?10:P,X=t.showStepMarks,L=void 0!==X&&X,T=t.formatValue,B=e(t,["children","className","customRootClass","defaultValue","value","onValueChange","min","max","step","disabled","name","orientation","pageStepMultiplier","showStepMarks","formatValue"]),A=i(p,m),U=c(b,h,g),j=U[0],Y=U[1],z=r.useState(!1),F=z[0],I=z[1],K=r.useRef(0),q=function(e){return Math.min(y,Math.max(x,e))},H=function(e){var a,t=e.currentTarget.getBoundingClientRect();a="vertical"===D?(t.bottom-e.clientY)/t.height:(e.clientX-t.left)/t.width;var r=x+a*(y-x),n=Math.round(r/V)*V,o=q(n);Y(o)},_={rootClass:A,value:j,setValue:Y,minValue:x,maxValue:y,step:V,name:C,isDragging:F,setDragging:I,disabled:S,orientation:D,pageStepMultiplier:R,showStepMarks:L,formatValue:T};return r.createElement(s.Provider,{value:_},r.createElement("div",a({ref:n,className:l(A,d),"data-slider-root":A,"data-disabled":S,"data-orientation":D,onPointerDown:function(e){if(!S){e.stopPropagation(),I(!0),H(e);var a=function(e){e.preventDefault();var a=document.querySelector('[data-slider-root="'.concat(A,'"]'));if(a){var t,r=a.getBoundingClientRect();t="vertical"===D?(r.bottom-e.clientY)/r.height:(e.clientX-r.left)/r.width;var n=x+t*(y-x),o=Math.round(n/V)*V,l=q(o),i=performance.now();i-K.current>16&&(Y(l),K.current=i)}},t=function(){I(!1),document.removeEventListener("pointermove",a),document.removeEventListener("pointerup",t)};document.addEventListener("pointermove",a),document.addEventListener("pointerup",t)}},onPointerMove:function(e){F&&(e.preventDefault(),H(e))},onPointerUp:function(){I(!1)}},B),o))}));d.displayName=m;var v=o((function(t,n){var o=t.children,l=e(t,["children"]),i=r.useContext(s).rootClass;return r.createElement("div",a({ref:n,className:"".concat(i,"-track"),style:{position:"relative"}},l),o)}));v.displayName="SliderTrack";var p=r.memo(o((function(t,n){var o=t.children,l=t.asChild,i=void 0!==l&&l,c=t["aria-label"],m=t["aria-labelledby"],d=e(t,["children","asChild","aria-label","aria-labelledby"]),v=r.useContext(s),p=v.rootClass,f=v.value,h=v.minValue,b=v.maxValue,g=v.step,w=v.setValue,x=v.name,k=v.isDragging,y=v.setDragging,M=v.disabled,V=v.orientation,E=v.pageStepMultiplier,S=v.formatValue,C=b===h?0:(f-h)/(b-h)*100,N=r.useState(!1),D=N[0],P=N[1],R=k?"dragging":D?"active":"inactive",X=r.createElement(u.div,a({ref:n,asChild:i,className:"".concat(p,"-thumb"),role:"slider",tabIndex:M?-1:0,"aria-valuemin":h,"aria-valuemax":b,"aria-valuenow":f,"aria-valuetext":S?S(f):void 0,"aria-orientation":V,"aria-label":c,"aria-labelledby":m,"data-state":R,"data-disabled":M,onKeyDown:function(e){if(!M){var a,t=f,r=Boolean(e.currentTarget.closest('[dir="rtl"]'));switch(e.key){case"ArrowRight":t=r?f-g:f+g;break;case"ArrowLeft":t=r?f+g:f-g;break;case"ArrowUp":t=f+g;break;case"ArrowDown":t=f-g;break;case"Home":t=h;break;case"End":t=b;break;case"PageUp":t=f+g*E;break;case"PageDown":t=f-g*E;break;default:return}e.preventDefault(),w((a=t,Math.min(b,Math.max(h,a))))}},onPointerDown:function(e){M||(e.stopPropagation(),y(!0))},onPointerUp:function(){y(!1)},onFocus:function(){return P(!0)},onBlur:function(){return P(!1)},style:"vertical"===V?{bottom:"calc(".concat(C,"% - 12px)")}:{left:"calc(".concat(C,"% - 12px)")}},d),o);return r.createElement(r.Fragment,null,X,r.createElement("input",{type:"hidden",value:f,name:x}))})));p.displayName="SliderThumb";var f=o((function(t,n){var o=t.children,l=e(t,["children"]),i=r.useContext(s),c=i.rootClass,u=i.value,m=i.minValue,d=i.maxValue,v=i.orientation,p=d===m?0:(u-m)/(d-m)*100;return r.createElement("div",a({ref:n,className:"".concat(c,"-range"),style:"vertical"===v?{height:"".concat(p,"%"),bottom:0,top:"auto"}:{width:"".concat(p,"%")}},l),o)}));f.displayName="SliderRange";var h=o((function(t,n){var o=t.children,l=t.customMarks,i=e(t,["children","customMarks"]),c=r.useContext(s),u=c.rootClass,m=c.minValue,d=c.maxValue,v=c.step,p=c.orientation;if(!c.showStepMarks&&!l)return null;var f=[];if(l)l.forEach((function(e){var a=e.value,t=e.label,n=d===m?0:(a-m)/(d-m)*100;f.push(r.createElement("div",{key:a,className:"".concat(u,"-mark ").concat(u,"-mark-custom"),"data-testid":"mark-".concat(a),style:"vertical"===p?{bottom:"".concat(n,"%"),left:"50%",transform:"translateX(-50%)"}:{left:"".concat(n,"%"),top:0,transform:"translateX(-50%)"},"data-value":a},r.createElement("div",{className:"".concat(u,"-mark-line"),style:"vertical"===p?{width:"2px",height:"12px",position:"absolute",bottom:"-6px",left:"50%",transform:"translateX(-50%)"}:{width:"1px",height:"6px",position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)"}}),t&&r.createElement("span",{className:"".concat(u,"-mark-label"),style:"vertical"===p?{right:"16px",top:"50%",transform:"translateY(-50%)",whiteSpace:"nowrap"}:{top:"8px",left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap"}},t)))}));else for(var h=m;h<=d;h+=v){var b=d===m?0:(h-m)/(d-m)*100;f.push(r.createElement("div",{key:h,className:"".concat(u,"-mark"),"data-testid":"mark-".concat(h),style:"vertical"===p?{bottom:"".concat(b,"%"),left:"50%",transform:"translateX(-50%)"}:{left:"".concat(b,"%"),top:0,transform:"translateX(-50%)"},"data-value":h},r.createElement("div",{className:"".concat(u,"-mark-line"),style:"vertical"===p?{width:"2px",height:"8px",position:"absolute",bottom:"-4px",left:"50%",transform:"translateX(-50%)"}:{width:"1px",height:"4px",position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)"}})))}return r.createElement("div",a({ref:n,className:"".concat(u,"-marks"),style:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",zIndex:1}},i),f,o)}));h.displayName="SliderMarks";var b=o((function(n,o){var l=n.children,i=n["aria-label"],c=n["aria-labelledby"],m=n.defaultValue,d=void 0===m?[25,75]:m,v=n.value,p=n.onValueChange,f=e(n,["children","aria-label","aria-labelledby","defaultValue","value","onValueChange"]),h=r.useContext(s),b=h.rootClass,g=h.minValue,w=h.maxValue,x=h.step,k=h.disabled,y=h.orientation,M=r.useState(v||d),V=M[0],E=M[1],S=r.useState(null),C=S[0],N=S[1],D=r.useState(null),P=D[0],R=D[1],X=r.useRef(0),L=function(e){return Math.min(w,Math.max(g,e))},T=function(e){E(e),null==p||p(e)},B=w===g?0:(V[0]-g)/(w-g)*100,A=w===g?0:(V[1]-g)/(w-g)*100,U=function(e,a){var r,n=e.currentTarget.getBoundingClientRect();r="vertical"===y?(n.bottom-e.clientY)/n.height:(e.clientX-n.left)/n.width;var o=g+r*(w-g),l=Math.round(o/x)*x,i=L(l),c=t([],V,!0);c["lower"===a?0:1]=i,"lower"===a?c[0]=Math.min(c[0],V[1]):c[1]=Math.max(c[1],V[0]),T(c)},j=function(e,a){if(!k){e.stopPropagation(),N(a),U(e,a);var r=function(e){e.preventDefault();var r=document.querySelector('[data-slider-root="'.concat(b,'"]'));if(r){var n,o=r.getBoundingClientRect();n="vertical"===y?(o.bottom-e.clientY)/o.height:(e.clientX-o.left)/o.width;var l=g+n*(w-g),i=Math.round(l/x)*x,c=L(i),u=t([],V,!0);u["lower"===a?0:1]=c,"lower"===a?u[0]=Math.min(u[0],V[1]):u[1]=Math.max(u[1],V[0]);var s=performance.now();s-X.current>16&&(T(u),X.current=s)}},n=function(){N(null),document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",n)};document.addEventListener("pointermove",r),document.addEventListener("pointerup",n)}},Y=function(e,a){C&&C===a&&(e.preventDefault(),U(e,a))},z=function(){N(null)},F=function(e,a){if(!k){var r=t([],V,!0),n=Boolean(e.currentTarget.closest('[dir="rtl"]'));switch(e.key){case"ArrowRight":r["lower"===a?0:1]=n?V["lower"===a?0:1]-x:V["lower"===a?0:1]+x;break;case"ArrowLeft":r["lower"===a?0:1]=n?V["lower"===a?0:1]+x:V["lower"===a?0:1]-x;break;case"ArrowUp":r["lower"===a?0:1]=V["lower"===a?0:1]+x;break;case"ArrowDown":r["lower"===a?0:1]=V["lower"===a?0:1]-x;break;case"Home":r["lower"===a?0:1]=g;break;case"End":r["lower"===a?0:1]=w;break;default:return}e.preventDefault(),"lower"===a?r[0]=Math.min(r[0],V[1]):r[1]=Math.max(r[1],V[0]),r[0]=L(r[0]),r[1]=L(r[1]),T(r)}};return r.createElement("div",a({ref:o,className:"".concat(b,"-range-slider")},f),r.createElement(u.div,{className:"".concat(b,"-thumb ").concat(b,"-thumb-lower"),role:"slider",tabIndex:k?-1:0,"aria-valuemin":g,"aria-valuemax":w,"aria-valuenow":V[0],"aria-orientation":y,"aria-label":i?"".concat(i," minimum"):"Minimum value","aria-labelledby":c,"data-state":"lower"===C?"dragging":"lower"===P?"active":"inactive","data-disabled":k,onKeyDown:function(e){return F(e,"lower")},onFocus:function(){return R("lower")},onBlur:function(){return R(null)},onPointerDown:function(e){return j(e,"lower")},onPointerMove:function(e){return Y(e,"lower")},onPointerUp:z,style:"vertical"===y?{bottom:"calc(".concat(B,"% - 12px)")}:{left:"calc(".concat(B,"% - 12px)")}}),r.createElement(u.div,{className:"".concat(b,"-thumb ").concat(b,"-thumb-upper"),role:"slider",tabIndex:k?-1:0,"aria-valuemin":g,"aria-valuemax":w,"aria-valuenow":V[1],"aria-orientation":y,"aria-label":i?"".concat(i," maximum"):"Maximum value","aria-labelledby":c,"data-state":"upper"===C?"dragging":"upper"===P?"active":"inactive","data-disabled":k,onKeyDown:function(e){return F(e,"upper")},onFocus:function(){return R("upper")},onBlur:function(){return R(null)},onPointerDown:function(e){return j(e,"upper")},onPointerMove:function(e){return Y(e,"upper")},onPointerUp:z,style:"vertical"===y?{bottom:"calc(".concat(A,"% - 12px)")}:{left:"calc(".concat(A,"% - 12px)")}}),r.createElement("div",{className:"".concat(b,"-range-fill"),style:"vertical"===y?{bottom:"".concat(Math.min(B,A),"%"),height:"".concat(Math.abs(A-B),"%"),left:0,right:0}:{left:"".concat(Math.min(B,A),"%"),width:"".concat(Math.abs(A-B),"%"),top:0,bottom:0}}),l)}));b.displayName="SliderRangeSlider";var g=o((function(t,n){var o=t.defaultValue,l=void 0===o?50:o,i=t.min,c=void 0===i?0:i,u=t.max,s=void 0===u?100:u,m=t.step,d=void 0===m?1:m,v=t.orientation,p=void 0===v?"horizontal":v,f=t.formatValue,h=t["aria-label"],b=t["aria-labelledby"],w=e(t,["defaultValue","min","max","step","orientation","formatValue","aria-label","aria-labelledby"]);return r.createElement(g.Root,a({ref:n,defaultValue:l,min:c,max:s,step:d,orientation:p,formatValue:f},w),r.createElement(g.Track,null,r.createElement(g.Range,null,r.createElement(g.Thumb,{"aria-label":h,"aria-labelledby":b}))))}));g.displayName="Slider",g.Root=d,g.Track=v,g.Range=f,g.Thumb=p,g.Marks=h,g.RangeSlider=b;export{g as default};
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+
3
+ type SplitterOrientation = 'horizontal' | 'vertical';
4
+
5
+ interface SplitterRootProps extends React.ComponentPropsWithoutRef<'div'> {
6
+ orientation?: SplitterOrientation;
7
+ customRootClass?: string;
8
+ defaultSizes?: number[];
9
+ minSizes?: number[];
10
+ maxSizes?: number[];
11
+ onSizesChange?: (sizes: number[]) => void;
12
+ }
13
+ declare const SplitterRoot: React.ForwardRefExoticComponent<SplitterRootProps & React.RefAttributes<HTMLDivElement>>;
14
+
15
+ interface SplitterPanelProps extends React.ComponentPropsWithoutRef<'div'> {
16
+ index: number;
17
+ customRootClass?: string;
18
+ minSize?: number;
19
+ maxSize?: number;
20
+ }
21
+ declare const SplitterPanel: React.ForwardRefExoticComponent<SplitterPanelProps & React.RefAttributes<HTMLDivElement>>;
22
+
23
+ interface SplitterHandleProps extends React.ComponentPropsWithoutRef<'div'> {
24
+ index: number;
25
+ customRootClass?: string;
26
+ }
27
+ declare const SplitterHandle: React.ForwardRefExoticComponent<SplitterHandleProps & React.RefAttributes<HTMLDivElement>>;
28
+
29
+ /**
30
+ * Splitter Component
31
+ *
32
+ * A headless splitter component for creating resizable panel layouts.
33
+ * Supports both horizontal and vertical orientations with drag and keyboard controls.
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * <Splitter.Root orientation="horizontal" defaultSizes={[30, 70]}>
38
+ * <Splitter.Panel index={0}>
39
+ * <div>Left Panel</div>
40
+ * </Splitter.Panel>
41
+ * <Splitter.Handle index={0} />
42
+ * <Splitter.Panel index={1}>
43
+ * <div>Right Panel</div>
44
+ * </Splitter.Panel>
45
+ * </Splitter.Root>
46
+ * ```
47
+ */
48
+ type SplitterProps = React.ComponentPropsWithoutRef<'div'>;
49
+ type SplitterComponent = React.ForwardRefExoticComponent<SplitterProps & React.RefAttributes<HTMLDivElement>> & {
50
+ Root: typeof SplitterRoot;
51
+ Panel: typeof SplitterPanel;
52
+ Handle: typeof SplitterHandle;
53
+ };
54
+ declare const Splitter: SplitterComponent;
55
+
56
+ export { Splitter as default };
57
+ export type { SplitterProps };
@@ -0,0 +1 @@
1
+ 'use client';import{_ as e,b as t,a as n}from"./tslib.es6-BtVxab8e.js";import r,{createContext as a,useRef as i,useState as o,useCallback as l,useMemo as s,useEffect as c}from"react";import{c as u}from"./index-BVxS3Ixi.js";import{c as m}from"./clsx-BaVHROc5.js";var d=a(null),f=function(){var e=r.useContext(d);if(!e)throw new Error("Splitter components must be used within a Splitter.Root");return e},v=r.forwardRef((function(a,f){var v=a.orientation,h=void 0===v?"horizontal":v,p=a.children,x=a.className,S=a.customRootClass,y=void 0===S?"":S,w=a.defaultSizes,z=void 0===w?[50,50]:w,M=a.minSizes,g=void 0===M?[0,0]:M,D=a.maxSizes,E=void 0===D?[100,100]:D,N=a.onSizesChange,R=a.style,b=e(a,["orientation","children","className","customRootClass","defaultSizes","minSizes","maxSizes","onSizesChange","style"]),L=u(y,"Splitter"),C=i(null),A=o(z),H=A[0],X=A[1],Y=o(!1),k=Y[0],P=Y[1],K=o(null),T=K[0],j=K[1],F=o(null);F[0];var I=F[1],W=l((function(e){C.current=e,"function"==typeof f?f(e):f&&(f.current=e)}),[f]),q=s((function(){return{minSizes:g||[],maxSizes:E||[]}}),[g,E]),B=i(null);c((function(){return function(){B.current&&(clearTimeout(B.current),B.current=null)}}),[]);var G=i(H),U=i(q);G.current=H,U.current=q;var _="horizontal"===h,J=l((function(e,t){void 0===t&&(t=!1),X(e),B.current&&clearTimeout(B.current),N&&(t?N(e):B.current=setTimeout((function(){N(e)}),16))}),[N]),O=l((function(e,n){n.preventDefault();var r=_?"clientX"in n?n.clientX:n.touches[0].clientX:"clientY"in n?n.clientY:n.touches[0].clientY,a=t([],G.current,!0);I({position:r,sizes:a}),P(!0),j(e);var i=null,o=0,l=function(n){if(C.current){var l=Date.now();l-o<16||(i&&cancelAnimationFrame(i),i=requestAnimationFrame((function(){var i=((_?"clientX"in n?n.clientX:n.touches[0].clientX:"clientY"in n?n.clientY:n.touches[0].clientY)-r)/(_?C.current.offsetWidth:C.current.offsetHeight)*100,s=t([],a,!0),c=U.current,u=c.minSizes,m=c.maxSizes,d=e,f=e+1;s.length;var v=s[d],h=s[f],p=Math.max(u[d]||0,Math.min(m[d]||100,v+i)),x=Math.max(u[f]||0,Math.min(m[f]||100,h-i)),S=p+x,y=100-(v+h);if(Math.abs(i)>.1)if(S<=100)s[d]=p,s[f]=x;else{var w=v/(v+h),z=100-y;s[d]=Math.max(u[d]||0,Math.min(m[d]||100,z*w)),s[f]=Math.max(u[f]||0,Math.min(m[f]||100,z*(1-w)))}X(s),o=l})))}},s=function(){i&&cancelAnimationFrame(i),P(!1),j(null),I(null);var e=G.current;N&&N(e),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s),document.removeEventListener("touchmove",l),document.removeEventListener("touchend",s)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",s),document.addEventListener("touchmove",l),document.addEventListener("touchend",s)}),[_,N]),Q=l((function(e,n){var r=n.shiftKey?10:1,a=t([],G.current,!0),i=U.current,o=i.minSizes,l=i.maxSizes,s=0;if(_?("ArrowLeft"===n.key&&(s=-r),"ArrowRight"===n.key&&(s=r)):("ArrowUp"===n.key&&(s=-r),"ArrowDown"===n.key&&(s=r)),0!==s){n.preventDefault();var c=e,u=e+1,m=a[c],d=a[u],f=Math.max(o[c]||0,Math.min(l[c]||100,m+s)),v=Math.max(o[u]||0,Math.min(l[u]||100,d-s)),h=f+v,p=100-(m+d);if(Math.abs(s)>.1)if(h<=100)a[c]=f,a[u]=v;else{var x=m/(m+d),S=100-p;a[c]=Math.max(o[c]||0,Math.min(l[c]||100,S*x)),a[u]=Math.max(o[u]||0,Math.min(l[u]||100,S*(1-x)))}J(a,!0)}}),[_,J]),V={orientation:h,sizes:H,setSizes:J,startDrag:O,handleKeyDown:Q,isDragging:k,activeHandleIndex:T,rootClass:L};return r.createElement(d.Provider,{value:V},r.createElement("div",n({},b,{ref:W,className:m(L,x),style:n({display:"flex",flexDirection:_?"row":"column",width:"100%",height:"100%"},R)}),p))}));v.displayName="SplitterRoot";var h=r.forwardRef((function(t,a){var i=t.index,o=t.children,l=t.className,s=t.style,c=e(t,["index","children","className","style"]),u=f(),d=u.sizes,v=u.orientation,h=u.rootClass,p=n({flexBasis:"".concat(d[i],"%"),flexGrow:0,flexShrink:0,overflow:"auto",minWidth:"horizontal"===v?0:void 0,minHeight:"vertical"===v?0:void 0},s);return r.createElement("div",n({},c,{ref:a,className:m("".concat(h,"-panel"),l),style:p}),o)}));h.displayName="SplitterPanel";var p=r.forwardRef((function(t,a){var i=t.index,o=t.className,l=t["aria-label"],s=t.style,c=e(t,["index","className","aria-label","style"]),u=f(),d=u.startDrag,v=u.orientation;u.isDragging,u.activeHandleIndex;var h=u.handleKeyDown,p=u.rootClass;return r.createElement("div",n({},c,{ref:a,className:m("".concat(p,"-handle"),o),role:"separator","aria-orientation":v,"aria-label":l||"".concat(v," resize handle"),tabIndex:0,onMouseDown:function(e){return d(i,e)},onTouchStart:function(e){return d(i,e)},onKeyDown:function(e){return h(i,e)},style:s}))}));p.displayName="SplitterHandle";var x=r.forwardRef((function(e,t){return console.warn("Direct usage of Splitter is not supported. Please use Splitter.Root, Splitter.Panel, etc. instead."),r.createElement("div",n({ref:t},e))}));x.displayName="Splitter",x.Root=v,x.Panel=h,x.Handle=p;export{x as default};
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+
3
+ declare const StepsRoot: ({ children, className, customRootClass, ...props }: StepsRootProps) => React.JSX.Element;
4
+
5
+ type StepItemProps = React.HTMLAttributes<HTMLDivElement> & {
6
+ value?: string | null;
7
+ };
8
+ declare const StepItem: ({ children, value, className, ...props }: StepItemProps) => React.JSX.Element;
9
+
10
+ type StepTrackProps = React.HTMLAttributes<HTMLDivElement>;
11
+ declare const StepTrack: ({ children, className, ...props }: StepTrackProps) => React.JSX.Element;
12
+
13
+ declare const StepBubble: ({ children, className, ...props }: StepBubbleProps) => React.JSX.Element;
14
+
15
+ type StepLineProps = React.HTMLAttributes<HTMLDivElement>;
16
+ declare const StepLine: ({ children, className, ...props }: StepLineProps) => React.JSX.Element;
17
+
18
+ declare const StepContent: ({ children, className, ...props }: StepContentProps) => React.JSX.Element;
19
+
20
+ declare const StepTitle: ({ children, className, ...props }: StepTitleProps) => React.JSX.Element;
21
+
22
+ type StepDescriptionProps = React.HTMLAttributes<HTMLDivElement>;
23
+ declare const StepDescription: ({ children, className, ...props }: StepDescriptionProps) => React.JSX.Element;
24
+
25
+ declare const StepsComponent: () => null;
26
+ type StepsComponentType = typeof StepsComponent & {
27
+ Root: typeof StepsRoot;
28
+ Item: typeof StepItem;
29
+ Track: typeof StepTrack;
30
+ Bubble: typeof StepBubble;
31
+ Line: typeof StepLine;
32
+ Content: typeof StepContent;
33
+ Title: typeof StepTitle;
34
+ Description: typeof StepDescription;
35
+ };
36
+ declare const Steps: StepsComponentType;
37
+
38
+ export { Steps as default };
@@ -0,0 +1 @@
1
+ 'use client';import{_ as e,a as t}from"./tslib.es6-BtVxab8e.js";import s,{createContext as a,useState as r}from"react";import{c}from"./clsx-BaVHROc5.js";import{c as n}from"./index-BVxS3Ixi.js";import{P as o}from"./index-Dc5Cm9z0.js";var l=a(null),i=Object.assign((function(){return console.warn("Direct usage of Steps is not supported. Please use Steps.Root, Steps.Item, etc. instead."),null}),{Root:function(a){var i=a.children,m=a.className,u=a.customRootClass,d=e(a,["children","className","customRootClass"]),v=r(0),N=v[0],C=v[1],p=n(u,"Steps");return s.createElement(l.Provider,{value:{currentStep:N,setCurrentStep:C,rootClass:p}},s.createElement(o.div,t({className:c(p,m)},d),i))},Item:function(a){var r=a.children;a.value;var n=a.className,o=void 0===n?"":n,i=e(a,["children","value","className"]),m=s.useContext(l),u=m.rootClass;return m.currentStep,m.setCurrentStep,s.createElement("div",t({className:c("".concat(u,"-item"),o)},i),r)},Track:function(a){var r=a.children,n=a.className,o=void 0===n?"":n,i=e(a,["children","className"]),m=s.useContext(l).rootClass;return s.createElement("div",t({className:c("".concat(m,"-track"),o)},i),r)},Bubble:function(a){var r=a.children,n=a.className,o=void 0===n?"":n,i=e(a,["children","className"]),m=s.useContext(l).rootClass;return s.createElement("div",t({className:c("".concat(m,"-bubble"),o)},i),r)},Line:function(a){var r=a.children,n=a.className,o=void 0===n?"":n,i=e(a,["children","className"]),m=s.useContext(l).rootClass;return s.createElement("div",t({className:c("".concat(m,"-line"),o)},i),r)},Content:function(a){var r=a.children,n=a.className,o=void 0===n?"":n,i=e(a,["children","className"]),m=s.useContext(l).rootClass;return s.createElement("div",t({className:c("".concat(m,"-content"),o)},i),r)},Title:function(a){var r=a.children,n=a.className,o=void 0===n?"":n,i=e(a,["children","className"]),m=s.useContext(l).rootClass;return s.createElement("div",t({className:c("".concat(m,"-title"),o)},i),r)},Description:function(a){var r=a.children,n=a.className,o=void 0===n?"":n,i=e(a,["children","className"]),m=s.useContext(l).rootClass;return s.createElement("div",t({className:c("".concat(m,"-description"),o)},i),r)}});export{i as default};
@@ -1,14 +1,13 @@
1
1
  import React from 'react';
2
2
 
3
- type StrongProps = {
4
- children: React.ReactNode;
5
- className?: string;
3
+ type StrongProps = React.ComponentPropsWithoutRef<'strong'> & {
6
4
  customRootClass?: string;
7
- } & React.ComponentProps<'strong'>;
8
- declare const Strong: {
9
- ({ children, className, customRootClass, ...props }: StrongProps): React.JSX.Element;
10
- displayName: string;
5
+ className?: string;
11
6
  };
7
+ declare const Strong: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
8
+ customRootClass?: string;
9
+ className?: string;
10
+ } & React.RefAttributes<HTMLElement>>;
12
11
 
13
12
  export { Strong as default };
14
13
  export type { StrongProps };
@@ -1 +1 @@
1
- 'use client';import{__rest as s,__assign as o}from"./node_modules/tslib/tslib.es6.js";import e from"react";import{clsx as r}from"./node_modules/clsx/dist/clsx.js";import{customClassSwitcher as t}from"./src/core/customClassSwitcher/index.js";var m="Strong",a=function(a){var l=a.children,c=a.className,i=a.customRootClass,n=s(a,["children","className","customRootClass"]),d=t(i,m);return e.createElement("strong",o({className:r(d,c)},n),l)};a.displayName=m;export{a as default};
1
+ 'use client';import{_ as s,a}from"./tslib.es6-BtVxab8e.js";import r from"react";import{c as o}from"./clsx-BaVHROc5.js";import{c as e}from"./index-BVxS3Ixi.js";var t="Strong",m=r.forwardRef((function(m,c){var l=m.children,i=m.className,f=m.customRootClass,n=s(m,["children","className","customRootClass"]),d=e(f,t);return r.createElement("strong",a({ref:c,className:o(d,i)},n),l)}));m.displayName=t;export{m as default};
@@ -1,13 +1,15 @@
1
- import * as React from 'react';
2
- import React__default from 'react';
1
+ import * as React$1 from 'react';
2
+ import React__default, { ComponentPropsWithoutRef } from 'react';
3
+ import Primitive from '~/core/primitives/Primitive';
4
+ import ButtonPrimitive from '~/core/primitives/Button';
3
5
 
4
- type SwitchThumbProps = {
6
+ type SwitchThumbProps = ComponentPropsWithoutRef<typeof Primitive.span> & {
5
7
  asChild?: boolean;
6
8
  className?: string;
7
9
  children?: React__default.ReactNode;
8
10
  };
9
11
 
10
- type SwitchRootProps = {
12
+ type SwitchRootProps = ComponentPropsWithoutRef<typeof ButtonPrimitive> & {
11
13
  children: React__default.ReactNode;
12
14
  customRootClass?: string;
13
15
  color?: string;
@@ -25,8 +27,28 @@ type SwitchRootProps = {
25
27
 
26
28
  declare const Switch: {
27
29
  (): null;
28
- Root: ({ children, customRootClass, color, variant, size, defaultChecked, checked, onCheckedChange, disabled, required, name, value, asChild, ...props }: SwitchRootProps) => React.JSX.Element;
29
- Thumb: ({ asChild, className, children, ...props }: SwitchThumbProps) => React.JSX.Element;
30
+ Root: React$1.ForwardRefExoticComponent<Omit<{
31
+ label?: string;
32
+ description?: string;
33
+ asChild?: boolean;
34
+ required?: boolean;
35
+ onChange?: any;
36
+ } & Omit<React$1.DetailedHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
37
+ children: React.ReactNode;
38
+ customRootClass?: string;
39
+ color?: string;
40
+ variant?: string;
41
+ size?: string;
42
+ defaultChecked?: boolean;
43
+ checked?: boolean;
44
+ onCheckedChange?: (checked: boolean) => void;
45
+ disabled?: boolean;
46
+ required?: boolean;
47
+ name?: string;
48
+ value?: string;
49
+ asChild?: boolean;
50
+ } & React$1.RefAttributes<HTMLButtonElement>>;
51
+ Thumb: React$1.ForwardRefExoticComponent<SwitchThumbProps & React$1.RefAttributes<HTMLElement>>;
30
52
  };
31
53
  declare namespace SwitchProps {
32
54
  type Root = SwitchRootProps;
@@ -1 +1 @@
1
- 'use client';import t from"./Switch/fragments/SwitchRoot.js";import o from"./Switch/fragments/SwitchThumb.js";var e=function(){return console.warn("Direct usage of Switch is not supported. Please use Switch.Root, Switch.Thumb, etc. instead."),null};e.Root=t,e.Thumb=o;export{e as default};
1
+ 'use client';import{_ as e,a}from"./tslib.es6-BtVxab8e.js";import s,{createContext as d,forwardRef as i,useContext as c}from"react";import{B as t}from"./index-DnCiOYxZ.js";import{c as o}from"./index-BVxS3Ixi.js";import{u as r,a as l,b as n}from"./index-Bf4LVEjJ.js";import{u as h}from"./index-fkj4Fdgt.js";import{P as m}from"./index-Dc5Cm9z0.js";var u=d({checked:!1,setChecked:function(){},rootClass:"",disabled:!1}),v="Switch",C=i((function(d,i){var c=d.children,m=d.customRootClass,C=d.color,f=void 0===C?"":C,k=d.variant,b=d.size,p=d.defaultChecked,w=void 0!==p&&p,j=d.checked,x=d.onCheckedChange,N=d.disabled,S=void 0!==N&&N,R=d.required,g=void 0!==R&&R,q=d.name,z=d.value,E=d.asChild,P=void 0!==E&&E,T=e(d,["children","customRootClass","color","variant","size","defaultChecked","checked","onCheckedChange","disabled","required","name","value","asChild"]),y=h(j,w,x),B=y[0],D=y[1],_=o(m,v),A=r("switch",{variant:k,size:b}),F=l(f),G=n(A(),F()),H={checked:B,setChecked:D,rootClass:_,disabled:S},I=a(a(a({},G()),{"data-state":B?"checked":"unchecked","data-disabled":S?"":void 0,role:"switch","aria-checked":B,"aria-required":g,disabled:S}),T);return q&&(I.name=q),z&&(I.value=z),s.createElement(u.Provider,{value:H},s.createElement(t,a({ref:i,onClick:function(){S||D(!B)},className:_,asChild:P},I),c))}));C.displayName=v;var f=i((function(d,i){var t=d.asChild,o=void 0!==t&&t,r=d.className,l=d.children,n=e(d,["asChild","className","children"]),h=c(u),v=h.checked,C=h.rootClass,f=h.disabled,k={};return k["data-state"]=v?"checked":"unchecked",f&&(k["data-disabled"]=""),s.createElement(m.span,a({ref:i,role:"switch",className:"".concat(C,"-indicator ").concat(r||""),asChild:o},k,n),l)}));f.displayName="SwitchThumb";var k=function(){return console.warn("Direct usage of Switch is not supported. Please use Switch.Root, Switch.Thumb, etc. instead."),null};k.Root=C,k.Thumb=f;export{k as default};
@@ -1,31 +1,21 @@
1
- import * as React from 'react';
2
- import React__default from 'react';
3
-
4
- type TabNavLinkProps = {
5
- children: React__default.ReactNode;
6
- className?: string;
7
- href?: string;
8
- disabled?: boolean;
9
- asChild?: boolean;
10
- value?: string;
11
- };
12
-
13
- type TabNavRootProps = {
14
- className?: string;
15
- loop?: boolean;
16
- orientation?: 'horizontal' | 'vertical';
17
- children: React__default.ReactNode;
18
- customRootClass?: string;
19
- color?: string;
20
- value?: string;
21
- defaultValue?: string;
22
- onValueChange?: (value: string) => void;
23
- };
1
+ import * as react from 'react';
24
2
 
25
3
  declare const TabNav: {
26
4
  (): null;
27
- Root: ({ className, loop, orientation, children, color, customRootClass, defaultValue, onValueChange, value, ...props }: TabNavRootProps) => React.JSX.Element;
28
- Link: ({ value, className, href, children, disabled, asChild }: TabNavLinkProps) => React.JSX.Element;
5
+ Root: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
+ loop?: boolean;
7
+ orientation?: "horizontal" | "vertical";
8
+ customRootClass?: string;
9
+ color?: string;
10
+ value?: string;
11
+ defaultValue?: string;
12
+ onValueChange?: (value: string) => void;
13
+ } & react.RefAttributes<HTMLDivElement>>;
14
+ Link: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
15
+ disabled?: boolean;
16
+ asChild?: boolean;
17
+ value?: string;
18
+ } & react.RefAttributes<HTMLAnchorElement>>;
29
19
  };
30
20
 
31
21
  export { TabNav as default };
@@ -1 +1 @@
1
- 'use client';import a from"./TabNav/fragments/TabNavLink.js";import o from"./TabNav/fragments/TabNavRoot.js";var t=function(){return console.warn("Direct usage of TabNav is not supported. Please use TabNav.Root, TabNav.Link instead."),null};t.Root=o,t.Link=a;export{t as default};
1
+ 'use client';import{_ as a,a as e}from"./tslib.es6-BtVxab8e.js";import o,{createContext as n,forwardRef as r,useContext as t,useRef as l,useCallback as i,useEffect as s}from"react";import{c}from"./clsx-BaVHROc5.js";import{R as u}from"./index-BRmT6kl7.js";import{P as d}from"./index-Dc5Cm9z0.js";import{c as m}from"./index-BVxS3Ixi.js";import{u as v}from"./index-fkj4Fdgt.js";import"./index-DnCiOYxZ.js";var f=n({rootClass:"",tabValue:"",handleTabChange:function(){}}),h=r((function(n,r){var s=n.value,m=n.className,v=void 0===m?"":m,h=n.href,p=void 0===h?"#":h,b=n.children,C=n.disabled,N=n.asChild,T=a(n,["value","className","href","children","disabled","asChild"]),j=t(f),x=j.rootClass,R=j.tabValue,V=j.handleTabChange;N&&(C=!1);var g=l(null),E=i((function(a){g.current=a,"function"==typeof r?r(a):r&&(r.current=a)}),[r]),k=s===R;return o.createElement(u.Item,{onFocus:function(){return s&&!C&&function(a){var e;C||(g.current&&(null===(e=g.current)||void 0===e||e.focus()),V(a))}(s)}},o.createElement(d.a,e({ref:E,className:c("".concat(x,"-link"),v),asChild:N,"aria-disabled":C,"aria-selected":k,disabled:C},C?{}:{href:p},T),b))}));h.displayName="TabNavLink";var p=r((function(n,r){var t=n.className,l=n.loop,i=void 0===l||l,d=n.orientation,h=void 0===d?"horizontal":d,p=n.children;n.color;var b=n.customRootClass,C=void 0===b?"":b,N=n.defaultValue,T=void 0===N?"":N,j=n.onValueChange,x=void 0===j?function(){}:j,R=n.value,V=a(n,["className","loop","orientation","children","color","customRootClass","defaultValue","onValueChange","value"]),g=m(C,"TabNav"),E=v(R,T||"",x),k=E[0],y=E[1],L=function(a){y(a)};s((function(){void 0===R&&T&&L(T)}),[T,R]);var P={rootClass:g,tabValue:k,handleTabChange:L};return o.createElement(f.Provider,{value:P},o.createElement(u.Root,{loop:i,orientation:h},o.createElement(u.Group,e({},{asChild:!0}),o.createElement("div",e({ref:r,className:c(g,t)},V),p))))}));p.displayName="TabNavRoot";var b=function(){return console.warn("Direct usage of TabNav is not supported. Please use TabNav.Root, TabNav.Link instead."),null};b.Root=p,b.Link=h;export{b as default};