@accelint/design-toolkit 3.0.0 → 5.0.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 (276) hide show
  1. package/dist/components/accordion/index.d.ts +1 -1
  2. package/dist/components/accordion/index.js +1 -1
  3. package/dist/components/accordion/index.js.map +1 -1
  4. package/dist/components/accordion/styles.d.ts +1 -1
  5. package/dist/components/accordion/styles.js +1 -1
  6. package/dist/components/accordion/styles.js.map +1 -1
  7. package/dist/components/accordion/types.d.ts +1 -1
  8. package/dist/components/action-bar/index.d.ts +10 -0
  9. package/dist/components/action-bar/index.js +2 -0
  10. package/dist/components/action-bar/index.js.map +1 -0
  11. package/dist/components/action-bar/styles.d.ts +5 -0
  12. package/dist/components/action-bar/styles.js +2 -0
  13. package/dist/components/action-bar/styles.js.map +1 -0
  14. package/dist/components/action-bar/types.d.ts +5 -0
  15. package/dist/components/action-bar/types.js +2 -0
  16. package/dist/components/action-bar/types.js.map +1 -0
  17. package/dist/components/avatar/index.d.ts +1 -1
  18. package/dist/components/avatar/index.js +1 -1
  19. package/dist/components/avatar/index.js.map +1 -1
  20. package/dist/components/avatar/styles.d.ts +1 -1
  21. package/dist/components/avatar/styles.js +1 -1
  22. package/dist/components/avatar/styles.js.map +1 -1
  23. package/dist/components/avatar/types.d.ts +1 -1
  24. package/dist/components/badge/index.d.ts +1 -1
  25. package/dist/components/badge/index.js.map +1 -1
  26. package/dist/components/badge/styles.d.ts +1 -1
  27. package/dist/components/badge/styles.js +1 -1
  28. package/dist/components/badge/styles.js.map +1 -1
  29. package/dist/components/button/index.d.ts +1 -1
  30. package/dist/components/button/index.js.map +1 -1
  31. package/dist/components/button/styles.d.ts +3 -3
  32. package/dist/components/button/styles.js +1 -1
  33. package/dist/components/button/styles.js.map +1 -1
  34. package/dist/components/button/types.d.ts +1 -1
  35. package/dist/components/checkbox/styles.d.ts +1 -1
  36. package/dist/components/checkbox/styles.js +1 -1
  37. package/dist/components/checkbox/styles.js.map +1 -1
  38. package/dist/components/chip/index.d.ts +1 -1
  39. package/dist/components/chip/index.js.map +1 -1
  40. package/dist/components/chip/styles.d.ts +4 -4
  41. package/dist/components/chip/styles.js +1 -1
  42. package/dist/components/chip/styles.js.map +1 -1
  43. package/dist/components/classification-badge/index.d.ts +1 -1
  44. package/dist/components/classification-badge/index.js.map +1 -1
  45. package/dist/components/classification-badge/styles.js +1 -1
  46. package/dist/components/classification-badge/styles.js.map +1 -1
  47. package/dist/components/classification-banner/index.d.ts +1 -1
  48. package/dist/components/classification-banner/index.js.map +1 -1
  49. package/dist/components/classification-banner/styles.js +1 -1
  50. package/dist/components/classification-banner/styles.js.map +1 -1
  51. package/dist/components/color-picker/styles.d.ts +1 -1
  52. package/dist/components/color-picker/styles.js +1 -1
  53. package/dist/components/color-picker/styles.js.map +1 -1
  54. package/dist/components/combobox-field/index.d.ts +1 -1
  55. package/dist/components/combobox-field/index.js.map +1 -1
  56. package/dist/components/combobox-field/styles.d.ts +3 -3
  57. package/dist/components/combobox-field/styles.js +1 -1
  58. package/dist/components/combobox-field/styles.js.map +1 -1
  59. package/dist/components/combobox-field/types.d.ts +1 -1
  60. package/dist/components/date-field/index.d.ts +1 -3
  61. package/dist/components/date-field/index.js +1 -1
  62. package/dist/components/date-field/index.js.map +1 -1
  63. package/dist/components/date-field/styles.d.ts +41 -51
  64. package/dist/components/date-field/styles.js +1 -1
  65. package/dist/components/date-field/styles.js.map +1 -1
  66. package/dist/components/date-field/types.d.ts +12 -15
  67. package/dist/components/details-list/index.d.ts +1 -1
  68. package/dist/components/details-list/index.js +1 -1
  69. package/dist/components/details-list/index.js.map +1 -1
  70. package/dist/components/details-list/styles.d.ts +1 -1
  71. package/dist/components/details-list/styles.js +1 -1
  72. package/dist/components/details-list/styles.js.map +1 -1
  73. package/dist/components/dialog/index.d.ts +28 -38
  74. package/dist/components/dialog/index.js +1 -1
  75. package/dist/components/dialog/index.js.map +1 -1
  76. package/dist/components/dialog/styles.d.ts +60 -0
  77. package/dist/components/dialog/styles.js +2 -0
  78. package/dist/components/dialog/styles.js.map +1 -0
  79. package/dist/components/dialog/types.d.ts +14 -0
  80. package/dist/components/dialog/types.js +2 -0
  81. package/dist/components/dialog/types.js.map +1 -0
  82. package/dist/components/drawer/index.d.ts +1 -1
  83. package/dist/components/drawer/index.js +1 -1
  84. package/dist/components/drawer/index.js.map +1 -1
  85. package/dist/components/drawer/styles.d.ts +2 -2
  86. package/dist/components/drawer/styles.js +1 -1
  87. package/dist/components/drawer/styles.js.map +1 -1
  88. package/dist/components/drawer/types.d.ts +1 -1
  89. package/dist/components/hero/index.js +1 -1
  90. package/dist/components/hero/index.js.map +1 -1
  91. package/dist/components/hero/styles.d.ts +1 -1
  92. package/dist/components/hero/styles.js +1 -1
  93. package/dist/components/hero/styles.js.map +1 -1
  94. package/dist/components/hotkey/index.d.ts +1 -1
  95. package/dist/components/hotkey/index.js.map +1 -1
  96. package/dist/components/hotkey/styles.d.ts +1 -1
  97. package/dist/components/hotkey/styles.js +1 -1
  98. package/dist/components/hotkey/styles.js.map +1 -1
  99. package/dist/components/icon/index.d.ts +1 -1
  100. package/dist/components/icon/index.js.map +1 -1
  101. package/dist/components/icon/styles.d.ts +1 -1
  102. package/dist/components/input/index.d.ts +1 -1
  103. package/dist/components/input/index.js.map +1 -1
  104. package/dist/components/input/styles.d.ts +1 -1
  105. package/dist/components/input/styles.js +1 -1
  106. package/dist/components/input/styles.js.map +1 -1
  107. package/dist/components/label/index.d.ts +1 -1
  108. package/dist/components/label/index.js.map +1 -1
  109. package/dist/components/label/styles.d.ts +1 -1
  110. package/dist/components/label/styles.js +1 -1
  111. package/dist/components/label/styles.js.map +1 -1
  112. package/dist/components/lines/index.d.ts +9 -0
  113. package/dist/components/lines/index.js +2 -0
  114. package/dist/components/lines/index.js.map +1 -0
  115. package/dist/components/lines/styles.d.ts +32 -0
  116. package/dist/components/lines/styles.js +2 -0
  117. package/dist/components/lines/styles.js.map +1 -0
  118. package/dist/components/lines/types.d.ts +10 -0
  119. package/dist/components/lines/types.js +2 -0
  120. package/dist/components/lines/types.js.map +1 -0
  121. package/dist/components/link/index.d.ts +17 -0
  122. package/dist/components/link/index.js +2 -0
  123. package/dist/components/link/index.js.map +1 -0
  124. package/dist/components/link/styles.d.ts +5 -0
  125. package/dist/components/link/styles.js +2 -0
  126. package/dist/components/link/styles.js.map +1 -0
  127. package/dist/components/link/types.d.ts +9 -0
  128. package/dist/components/link/types.js +2 -0
  129. package/dist/components/link/types.js.map +1 -0
  130. package/dist/components/menu/index.js +1 -1
  131. package/dist/components/menu/index.js.map +1 -1
  132. package/dist/components/menu/styles.d.ts +1 -1
  133. package/dist/components/menu/styles.js +1 -1
  134. package/dist/components/menu/styles.js.map +1 -1
  135. package/dist/components/options/index.js.map +1 -1
  136. package/dist/components/options/styles.d.ts +3 -3
  137. package/dist/components/options/styles.js +1 -1
  138. package/dist/components/options/styles.js.map +1 -1
  139. package/dist/components/options/types.d.ts +1 -1
  140. package/dist/components/popover/index.js.map +1 -1
  141. package/dist/components/popover/styles.d.ts +1 -1
  142. package/dist/components/popover/styles.js +1 -1
  143. package/dist/components/popover/styles.js.map +1 -1
  144. package/dist/components/query-builder/action-element.js.map +1 -1
  145. package/dist/components/query-builder/group.js +1 -1
  146. package/dist/components/query-builder/group.js.map +1 -1
  147. package/dist/components/query-builder/index.js +1 -1
  148. package/dist/components/query-builder/index.js.map +1 -1
  149. package/dist/components/query-builder/value-editor.js.map +1 -1
  150. package/dist/components/query-builder/value-selector.js.map +1 -1
  151. package/dist/components/radio/styles.d.ts +1 -1
  152. package/dist/components/radio/styles.js +1 -1
  153. package/dist/components/radio/styles.js.map +1 -1
  154. package/dist/components/search-field/index.d.ts +3 -3
  155. package/dist/components/search-field/index.js.map +1 -1
  156. package/dist/components/search-field/styles.d.ts +1 -1
  157. package/dist/components/search-field/styles.js +1 -1
  158. package/dist/components/search-field/styles.js.map +1 -1
  159. package/dist/components/select-field/index.d.ts +1 -1
  160. package/dist/components/select-field/index.js +1 -1
  161. package/dist/components/select-field/index.js.map +1 -1
  162. package/dist/components/select-field/styles.d.ts +4 -4
  163. package/dist/components/select-field/styles.js +1 -1
  164. package/dist/components/select-field/styles.js.map +1 -1
  165. package/dist/components/select-field/types.d.ts +1 -1
  166. package/dist/components/sidenav/events.d.ts +8 -0
  167. package/dist/components/sidenav/events.js +2 -0
  168. package/dist/components/sidenav/events.js.map +1 -0
  169. package/dist/components/sidenav/index.d.ts +51 -0
  170. package/dist/components/sidenav/index.js +2 -0
  171. package/dist/components/sidenav/index.js.map +1 -0
  172. package/dist/components/sidenav/styles.d.ts +114 -0
  173. package/dist/components/sidenav/styles.js +2 -0
  174. package/dist/components/sidenav/styles.js.map +1 -0
  175. package/dist/components/sidenav/types.d.ts +38 -0
  176. package/dist/components/sidenav/types.js +2 -0
  177. package/dist/components/sidenav/types.js.map +1 -0
  178. package/dist/components/skeleton/styles.d.ts +2 -2
  179. package/dist/components/skeleton/styles.js +1 -1
  180. package/dist/components/skeleton/styles.js.map +1 -1
  181. package/dist/components/slider/index.d.ts +4 -43
  182. package/dist/components/slider/index.js +1 -1
  183. package/dist/components/slider/index.js.map +1 -1
  184. package/dist/components/slider/styles.d.ts +84 -0
  185. package/dist/components/slider/styles.js +2 -0
  186. package/dist/components/slider/styles.js.map +1 -0
  187. package/dist/components/slider/types.d.ts +22 -0
  188. package/dist/components/slider/types.js +2 -0
  189. package/dist/components/slider/types.js.map +1 -0
  190. package/dist/components/switch/index.d.ts +1 -1
  191. package/dist/components/switch/index.js.map +1 -1
  192. package/dist/components/switch/styles.d.ts +1 -1
  193. package/dist/components/switch/styles.js +1 -1
  194. package/dist/components/switch/styles.js.map +1 -1
  195. package/dist/components/tabs/index.d.ts +37 -36
  196. package/dist/components/tabs/index.js +1 -1
  197. package/dist/components/tabs/index.js.map +1 -1
  198. package/dist/components/tabs/styles.d.ts +48 -0
  199. package/dist/components/tabs/styles.js +2 -0
  200. package/dist/components/tabs/styles.js.map +1 -0
  201. package/dist/components/tabs/types.d.ts +6 -0
  202. package/dist/components/tabs/types.js +2 -0
  203. package/dist/components/tabs/types.js.map +1 -0
  204. package/dist/components/text-area-field/index.d.ts +1 -1
  205. package/dist/components/text-area-field/index.js.map +1 -1
  206. package/dist/components/text-area-field/styles.d.ts +4 -4
  207. package/dist/components/text-area-field/styles.js +1 -1
  208. package/dist/components/text-area-field/styles.js.map +1 -1
  209. package/dist/components/text-field/index.js.map +1 -1
  210. package/dist/components/text-field/styles.d.ts +4 -4
  211. package/dist/components/text-field/styles.js +1 -1
  212. package/dist/components/text-field/styles.js.map +1 -1
  213. package/dist/components/tooltip/index.d.ts +1 -1
  214. package/dist/components/tooltip/index.js +1 -1
  215. package/dist/components/tooltip/index.js.map +1 -1
  216. package/dist/components/tooltip/styles.d.ts +1 -1
  217. package/dist/components/tooltip/styles.js +1 -1
  218. package/dist/components/tooltip/styles.js.map +1 -1
  219. package/dist/components/tooltip/types.d.ts +3 -1
  220. package/dist/components/tree/index.d.ts +51 -0
  221. package/dist/components/tree/index.js +2 -0
  222. package/dist/components/tree/index.js.map +1 -0
  223. package/dist/components/tree/styles.d.ts +128 -0
  224. package/dist/components/tree/styles.js +2 -0
  225. package/dist/components/tree/styles.js.map +1 -0
  226. package/dist/components/tree/types.d.ts +41 -0
  227. package/dist/components/tree/types.js +2 -0
  228. package/dist/components/tree/types.js.map +1 -0
  229. package/dist/components/view-stack/index.js.map +1 -1
  230. package/dist/foundation/token-data.d.ts +17 -0
  231. package/dist/foundation/token-data.js +2 -0
  232. package/dist/foundation/token-data.js.map +1 -0
  233. package/dist/hooks/use-tree/actions/cache.d.ts +78 -0
  234. package/dist/hooks/use-tree/actions/cache.js +2 -0
  235. package/dist/hooks/use-tree/actions/cache.js.map +1 -0
  236. package/dist/hooks/use-tree/actions/index.d.ts +38 -0
  237. package/dist/hooks/use-tree/actions/index.js +2 -0
  238. package/dist/hooks/use-tree/actions/index.js.map +1 -0
  239. package/dist/hooks/use-tree/state/index.d.ts +8 -0
  240. package/dist/hooks/use-tree/state/index.js +2 -0
  241. package/dist/hooks/use-tree/state/index.js.map +1 -0
  242. package/dist/hooks/use-tree/state/utils.d.ts +7 -0
  243. package/dist/hooks/use-tree/state/utils.js +2 -0
  244. package/dist/hooks/use-tree/state/utils.js.map +1 -0
  245. package/dist/hooks/use-tree/types.d.ts +171 -0
  246. package/dist/hooks/use-tree/types.js +2 -0
  247. package/dist/hooks/use-tree/types.js.map +1 -0
  248. package/dist/icons/catalog.js +1 -1
  249. package/dist/icons/catalog.js.map +1 -1
  250. package/dist/index.css +12 -18
  251. package/dist/index.d.ts +35 -8
  252. package/dist/index.js +1 -1
  253. package/dist/lib/react.d.ts +22 -8
  254. package/dist/lib/react.js +8 -4
  255. package/dist/lib/react.js.map +1 -1
  256. package/dist/lib/utils.d.ts +15 -5
  257. package/dist/lib/utils.js +1 -1
  258. package/dist/lib/utils.js.map +1 -1
  259. package/dist/metafile-esm.json +1 -1
  260. package/dist/providers/theme-provider.d.ts +22 -0
  261. package/dist/providers/theme-provider.js +2 -0
  262. package/dist/providers/theme-provider.js.map +1 -0
  263. package/dist/styles.css +2071 -1007
  264. package/dist/tokens/themes.css +741 -53
  265. package/dist/tokens/tokens.css +133 -65
  266. package/dist/tokens/tokens.d.ts +449 -1
  267. package/dist/tokens/tokens.js +2 -0
  268. package/dist/tokens/tokens.js.map +1 -0
  269. package/dist/tokens/types.d.ts +299 -0
  270. package/dist/tokens/types.js +2 -0
  271. package/dist/tokens/types.js.map +1 -0
  272. package/dist/variants/variants.css +19 -1
  273. package/package.json +20 -9
  274. package/dist/tokens/index.d.ts +0 -123
  275. package/dist/tokens/index.js +0 -2
  276. package/dist/tokens/index.js.map +0 -1
@@ -0,0 +1,51 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { SidenavProps, SidenavTriggerProps, SidenavHeaderProps, SidenavItemProps, SidenavLinkProps, SidenavDividerProps, SidenavAvatarProps, SidenavFooterProps, SidenavContentProps } from './types.js';
3
+ import 'react';
4
+ import 'react-aria-components';
5
+
6
+ declare function Sidenav({ className, isHiddenWhenClosed, children, ...rest }: SidenavProps): react_jsx_runtime.JSX.Element | null;
7
+ declare namespace Sidenav {
8
+ var displayName: string;
9
+ var Trigger: typeof SidenavTrigger;
10
+ var Header: typeof SidenavHeader;
11
+ var Item: typeof SidenavItem;
12
+ var Link: typeof SidenavLink;
13
+ var Divider: typeof SidenavDivider;
14
+ var Avatar: typeof SidenavAvatar;
15
+ var Footer: typeof SidenavFooter;
16
+ var Content: typeof SidenavContent;
17
+ }
18
+ declare function SidenavContent({ className, children, ...rest }: SidenavContentProps): react_jsx_runtime.JSX.Element;
19
+ declare namespace SidenavContent {
20
+ var displayName: string;
21
+ }
22
+ declare function SidenavHeader({ children, classNames, ...rest }: SidenavHeaderProps): react_jsx_runtime.JSX.Element;
23
+ declare namespace SidenavHeader {
24
+ var displayName: string;
25
+ }
26
+ declare function SidenavFooter(props: SidenavFooterProps): react_jsx_runtime.JSX.Element;
27
+ declare namespace SidenavFooter {
28
+ var displayName: string;
29
+ }
30
+ declare function SidenavTrigger({ children, ...rest }: SidenavTriggerProps): react_jsx_runtime.JSX.Element;
31
+ declare namespace SidenavTrigger {
32
+ var displayName: string;
33
+ }
34
+ declare function SidenavItem({ children, classNames, textValue, ...rest }: SidenavItemProps): react_jsx_runtime.JSX.Element;
35
+ declare namespace SidenavItem {
36
+ var displayName: string;
37
+ }
38
+ declare function SidenavLink({ children, classNames, textValue, ...rest }: SidenavLinkProps): react_jsx_runtime.JSX.Element;
39
+ declare namespace SidenavLink {
40
+ var displayName: string;
41
+ }
42
+ declare function SidenavDivider({ className, ...rest }: SidenavDividerProps): react_jsx_runtime.JSX.Element;
43
+ declare namespace SidenavDivider {
44
+ var displayName: string;
45
+ }
46
+ declare function SidenavAvatar({ children, className, ...rest }: SidenavAvatarProps): react_jsx_runtime.JSX.Element;
47
+ declare namespace SidenavAvatar {
48
+ var displayName: string;
49
+ }
50
+
51
+ export { Sidenav };
@@ -0,0 +1,2 @@
1
+ import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'client-only';import {useOn,useEmit}from'@accelint/bus/react';import {ChevronLeft,ArrowNortheast}from'@accelint/icons';import {createContext,useState,useContext,useRef}from'react';import {Provider,HeadingContext,Header,Button,Pressable,Text,TextContext,ToggleButton,Link,composeRenderProps,Heading}from'react-aria-components';import {containsExactChildren,containsAnyOfExactChildren}from'./../../lib/react.js';import {Icon,IconContext}from'../icon/index.js';import {Tooltip}from'../tooltip/index.js';import {SidenavEventTypes}from'./events.js';import {SidenavStyles}from'./styles.js';const{sidenav:X,content:Y,header:Z,toggle:_,heading:$,divider:j,item:ee,text:D,transient:m,avatar:ae,avatarHeading:ne,avatarIcon:ie,avatarText:te,link:oe,tooltip:h}=SidenavStyles(),x=createContext({open:false});function t({className:a,isHiddenWhenClosed:n,children:i,...o}){containsExactChildren({children:i,componentName:t.displayName,restrictions:[[T,{min:1,max:1}],[y,{min:1,max:1}],[C,{min:0,max:1}]]});const[r,s]=useState(false);return useOn(SidenavEventTypes.toggle,()=>s(u=>!u)),n&&!r?null:jsx(Provider,{values:[[HeadingContext,{className:$({className:m()})}],[x,{open:r}]],children:jsx("nav",{...o,className:X({className:a}),"data-open":r||null,children:i})})}t.displayName="Sidenav";function y({className:a,children:n,...i}){return jsx("div",{...i,className:Y({className:a}),children:n})}y.displayName="Sidenav.Content";function T({children:a,classNames:n,...i}){const o=useEmit(SidenavEventTypes.toggle);return jsx(Header,{...i,className:Z({className:n?.header}),children:jsxs(Button,{className:_({className:n?.button}),onPress:()=>o(),children:[a,jsx(Icon,{className:m(),children:jsx(ChevronLeft,{})})]})})}T.displayName="Sidenav.Header";function C(a){return jsx("footer",{...a})}C.displayName="Sidenav.Footer";function z({children:a,...n}){const i=useEmit(SidenavEventTypes.toggle);return jsx(Pressable,{...n,onPress:()=>i(),children:a})}z.displayName="Sidenav.Trigger";function I({children:a,classNames:n,textValue:i,...o}){containsAnyOfExactChildren({children:a,componentName:I.displayName,restrictions:[[[c,{min:1,max:1}]],[[Icon,{min:1,max:1}],[Text,{min:1,max:1}]]]});const{open:r}=useContext(x),s=useRef(null);return jsx(Provider,{values:[[IconContext,{size:"medium"}],[TextContext,{className:D({className:m()})}]],children:jsxs(Tooltip,{isDisabled:r,children:[jsx(Tooltip.Trigger,{children:jsx(ToggleButton,{...o,ref:s,className:ee({className:n?.button}),children:a})}),jsx(Tooltip.Body,{parentRef:s,placement:"right",className:h(),children:i})]})})}I.displayName="Sidenav.Item";function H({children:a,classNames:n,textValue:i,...o}){containsExactChildren({children:a,componentName:H.displayName,restrictions:[[Icon,{min:1,max:1}],[Text,{min:1,max:1}]]});const{open:r}=useContext(x),s=useRef(null);return jsx(Provider,{values:[[IconContext,{size:"medium",slot:"icon"}],[TextContext,{className:D({className:m()})}]],children:jsxs(Tooltip,{isDisabled:r,children:[jsx(Tooltip.Trigger,{children:jsx(Link,{...o,ref:s,className:oe({className:n?.button}),children:composeRenderProps(a,u=>jsxs(Fragment,{children:[u,jsx(Icon,{size:"medium",className:m(),children:jsx(ArrowNortheast,{})})]}))})}),jsxs(Tooltip.Body,{parentRef:s,placement:"right",className:h(),children:[i,jsx(Icon,{size:"medium",children:jsx(ArrowNortheast,{})})]})]})})}H.displayName="Sidenav.Link";function F({className:a,...n}){return jsx("hr",{...n,className:j({className:a})})}F.displayName="Sidenav.Divider";function c({children:a,className:n,...i}){return containsExactChildren({children:a,componentName:c.displayName,restrictions:[[Icon,{min:1,max:1}],[Heading,{min:1,max:1}],[Text,{min:1,max:1}]]}),jsx(Provider,{values:[[IconContext,{size:"large",className:ie()}],[HeadingContext,{className:ne({className:m()})}],[TextContext,{className:te({className:m()})}]],children:jsx("div",{...i,className:ae({className:n}),children:a})})}c.displayName="Sidenav.Avatar",t.Trigger=z,t.Header=T,t.Item=I,t.Link=H,t.Divider=F,t.Avatar=c,t.Footer=C,t.Content=y;export{t as Sidenav};//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/sidenav/index.tsx"],"names":["toggle","heading","divider","item","transient","avatar","avatarHeading","avatarIcon","link","SidenavContext","W","className","rest","Sidenav","g","SidenavFooter","open","setOpen","useState","useOn","SidenavEventTypes","prev","isHiddenWhenClosed","Provider","P","e","A","sidenav","SidenavContent","jsx","content","children","emit","Header","k","header","G","Button","classNames","v","w","SidenavHeader","R","SidenavTrigger","useEmit","Pressable","textValue","SidenavItem","U","Icon","Text","d","useContext","N","ref","IconContext","L","b","f","S","l","ToggleButton","SidenavLink","useRef","p","text","Link","jsxs","q","re","B","SidenavDivider","containsExactChildren","SidenavAvatar","HeadingContext","TextContext","avatarText"],"mappings":"goBAoDE,KAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,EACA,MAAAC,CAAAA,CACA,CAAA,MACA,CAAA,CAAA,CAAA,OAAAC,CAAAA,CACA,QAAAC,CAAAA,CACA,CAAA,IAAA,CAAA,EAAA,CAAA,IAAA,CAAAC,CAAAA,CAAAA,SACA,CAAA,CAAA,CAAAC,MACA,CAAA,EAAA,CAAA,aACAC,CAAAA,cAEgB,EAEZC,CAAAA,UAA4D,CAAM,EAAC,CAElE,IAAA,CAAA,EAAA,CAAA,OACL,CAAA,CAAA,CAAA,CAAAC,aAAA,EAAAC,CAAAA,CACA,sCACA,CAAA,CAAA,CAAA,SACGC,CACL,CAAA,CAAiB,kBAGb,CAAA,CAAA,CAAA,QAAeC,EAAQ,CAAA,GAAA,CAAA,CAAA,CAAA,CAAAC,qBAAA,CAAA,CAAA,QACvB,CAAA,CAAA,CAAA,aACyB,CAAG,CAAA,CAAA,WACP,CAAA,YACnB,CAACC,CAAAA,CAAe,CAAE,CAAA,CAAA,GAAK,CAAG,KAAO,CAAC,CACpC,CACF,CAAC,CAAA,CACD,MAAOC,CAAAA,CAAMC,CAAO,GAAIC,CAAS,CAAA,CAAK,EAItC,CAAA,CAAA,CAA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,KACT,CAAA,CAAA,CAAA,CAAA,CAAA,IACR5D,CAAQ,CAAA,CAAA,CAAA,CAAA,OAAUe,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { useEmit, useOn } from '@accelint/bus/react';\nimport { ArrowNortheast, ChevronLeft } from '@accelint/icons';\nimport { createContext, useContext, useRef, useState } from 'react';\nimport {\n Button,\n composeRenderProps,\n Header,\n Heading,\n HeadingContext,\n Link,\n Pressable,\n Provider,\n Text,\n TextContext,\n ToggleButton,\n} from 'react-aria-components';\nimport { containsAnyOfExactChildren, containsExactChildren } from '@/lib/react';\nimport { Icon, IconContext } from '../icon';\nimport { Tooltip } from '../tooltip';\nimport { SidenavEventTypes } from './events';\nimport { SidenavStyles } from './styles';\nimport type {\n SidenavAvatarProps,\n SidenavContentProps,\n SidenavContextValue,\n SidenavDividerProps,\n SidenavFooterProps,\n SidenavHeaderProps,\n SidenavItemProps,\n SidenavLinkProps,\n SidenavProps,\n SidenavTriggerProps,\n} from './types';\n\nconst {\n sidenav,\n content,\n header,\n toggle,\n heading,\n divider,\n item,\n text,\n transient,\n avatar,\n avatarHeading,\n avatarIcon,\n avatarText,\n link,\n tooltip,\n} = SidenavStyles();\n\nconst SidenavContext = createContext<SidenavContextValue>({ open: false });\n\nexport function Sidenav({\n className,\n isHiddenWhenClosed,\n children,\n ...rest\n}: SidenavProps) {\n containsExactChildren({\n children,\n componentName: Sidenav.displayName,\n restrictions: [\n [SidenavHeader, { min: 1, max: 1 }],\n [SidenavContent, { min: 1, max: 1 }],\n [SidenavFooter, { min: 0, max: 1 }],\n ],\n });\n const [open, setOpen] = useState(false);\n\n useOn(SidenavEventTypes.toggle, () => setOpen((prev) => !prev));\n\n if (isHiddenWhenClosed && !open) {\n return null;\n }\n\n return (\n <Provider\n values={[\n [HeadingContext, { className: heading({ className: transient() }) }],\n [SidenavContext, { open }],\n ]}\n >\n <nav\n {...rest}\n className={sidenav({ className })}\n data-open={open || null}\n >\n {children}\n </nav>\n </Provider>\n );\n}\nSidenav.displayName = 'Sidenav';\n\nfunction SidenavContent({ className, children, ...rest }: SidenavContentProps) {\n return (\n <div {...rest} className={content({ className })}>\n {children}\n </div>\n );\n}\nSidenavContent.displayName = 'Sidenav.Content';\n\nfunction SidenavHeader({ children, classNames, ...rest }: SidenavHeaderProps) {\n const emit = useEmit(SidenavEventTypes.toggle);\n\n return (\n <Header {...rest} className={header({ className: classNames?.header })}>\n <Button\n className={toggle({ className: classNames?.button })}\n onPress={() => emit()}\n >\n {children}\n <Icon className={transient()}>\n <ChevronLeft />\n </Icon>\n </Button>\n </Header>\n );\n}\nSidenavHeader.displayName = 'Sidenav.Header';\n\nfunction SidenavFooter(props: SidenavFooterProps) {\n return <footer {...props} />;\n}\nSidenavFooter.displayName = 'Sidenav.Footer';\n\nfunction SidenavTrigger({ children, ...rest }: SidenavTriggerProps) {\n const emit = useEmit(SidenavEventTypes.toggle);\n\n return (\n <Pressable {...rest} onPress={() => emit()}>\n {children}\n </Pressable>\n );\n}\nSidenavTrigger.displayName = 'Sidenav.Trigger';\n\nfunction SidenavItem({\n children,\n classNames,\n textValue,\n ...rest\n}: SidenavItemProps) {\n containsAnyOfExactChildren({\n children,\n componentName: SidenavItem.displayName,\n restrictions: [\n [[SidenavAvatar, { min: 1, max: 1 }]],\n [\n [Icon, { min: 1, max: 1 }],\n [Text, { min: 1, max: 1 }],\n ],\n ],\n });\n\n const { open } = useContext(SidenavContext);\n\n // Implement ref to place tooltip inside Button DOM to enable contextual styling\n const ref = useRef(null);\n\n return (\n <Provider\n values={[\n [IconContext, { size: 'medium' }],\n [TextContext, { className: text({ className: transient() }) }],\n ]}\n >\n <Tooltip isDisabled={open}>\n <Tooltip.Trigger>\n <ToggleButton\n {...rest}\n ref={ref}\n className={item({ className: classNames?.button })}\n >\n {children}\n </ToggleButton>\n </Tooltip.Trigger>\n <Tooltip.Body parentRef={ref} placement='right' className={tooltip()}>\n {textValue}\n </Tooltip.Body>\n </Tooltip>\n </Provider>\n );\n}\nSidenavItem.displayName = 'Sidenav.Item';\n\nfunction SidenavLink({\n children,\n classNames,\n textValue,\n ...rest\n}: SidenavLinkProps) {\n containsExactChildren({\n children,\n componentName: SidenavLink.displayName,\n restrictions: [\n [Icon, { min: 1, max: 1 }],\n [Text, { min: 1, max: 1 }],\n ],\n });\n\n const { open } = useContext(SidenavContext);\n\n // Implement ref to place tooltip inside Link DOM to enable contextual styling\n const ref = useRef(null);\n\n return (\n <Provider\n values={[\n [IconContext, { size: 'medium', slot: 'icon' }],\n [TextContext, { className: text({ className: transient() }) }],\n ]}\n >\n <Tooltip isDisabled={open}>\n <Tooltip.Trigger>\n <Link\n {...rest}\n ref={ref}\n className={link({ className: classNames?.button })}\n >\n {composeRenderProps(children, (children) => (\n <>\n {children}\n <Icon size='medium' className={transient()}>\n <ArrowNortheast />\n </Icon>\n </>\n ))}\n </Link>\n </Tooltip.Trigger>\n <Tooltip.Body parentRef={ref} placement='right' className={tooltip()}>\n {textValue}\n <Icon size='medium'>\n <ArrowNortheast />\n </Icon>\n </Tooltip.Body>\n </Tooltip>\n </Provider>\n );\n}\nSidenavLink.displayName = 'Sidenav.Link';\n\nfunction SidenavDivider({ className, ...rest }: SidenavDividerProps) {\n return <hr {...rest} className={divider({ className })} />;\n}\nSidenavDivider.displayName = 'Sidenav.Divider';\n\nfunction SidenavAvatar({ children, className, ...rest }: SidenavAvatarProps) {\n containsExactChildren({\n children,\n componentName: SidenavAvatar.displayName,\n restrictions: [\n [Icon, { min: 1, max: 1 }],\n [Heading, { min: 1, max: 1 }],\n [Text, { min: 1, max: 1 }],\n ],\n });\n\n return (\n <Provider\n values={[\n [IconContext, { size: 'large', className: avatarIcon() }],\n [\n HeadingContext,\n { className: avatarHeading({ className: transient() }) },\n ],\n [TextContext, { className: avatarText({ className: transient() }) }],\n ]}\n >\n <div {...rest} className={avatar({ className })}>\n {children}\n </div>\n </Provider>\n );\n}\nSidenavAvatar.displayName = 'Sidenav.Avatar';\n\nSidenav.Trigger = SidenavTrigger;\nSidenav.Header = SidenavHeader;\nSidenav.Item = SidenavItem;\nSidenav.Link = SidenavLink;\nSidenav.Divider = SidenavDivider;\nSidenav.Avatar = SidenavAvatar;\nSidenav.Footer = SidenavFooter;\nSidenav.Content = SidenavContent;\n"]}
@@ -0,0 +1,114 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import * as tailwind_merge from 'tailwind-merge';
3
+
4
+ declare const SidenavStyles: tailwind_variants.TVReturnType<{
5
+ [key: string]: {
6
+ [key: string]: tailwind_merge.ClassNameValue | {
7
+ content?: tailwind_merge.ClassNameValue;
8
+ text?: tailwind_merge.ClassNameValue;
9
+ link?: tailwind_merge.ClassNameValue;
10
+ heading?: tailwind_merge.ClassNameValue;
11
+ tooltip?: tailwind_merge.ClassNameValue;
12
+ header?: tailwind_merge.ClassNameValue;
13
+ toggle?: tailwind_merge.ClassNameValue;
14
+ avatar?: tailwind_merge.ClassNameValue;
15
+ item?: tailwind_merge.ClassNameValue;
16
+ avatarIcon?: tailwind_merge.ClassNameValue;
17
+ avatarHeading?: tailwind_merge.ClassNameValue;
18
+ avatarText?: tailwind_merge.ClassNameValue;
19
+ divider?: tailwind_merge.ClassNameValue;
20
+ transient?: tailwind_merge.ClassNameValue;
21
+ sidenav?: tailwind_merge.ClassNameValue;
22
+ };
23
+ };
24
+ } | {
25
+ [x: string]: {
26
+ [x: string]: tailwind_merge.ClassNameValue | {
27
+ content?: tailwind_merge.ClassNameValue;
28
+ text?: tailwind_merge.ClassNameValue;
29
+ link?: tailwind_merge.ClassNameValue;
30
+ heading?: tailwind_merge.ClassNameValue;
31
+ tooltip?: tailwind_merge.ClassNameValue;
32
+ header?: tailwind_merge.ClassNameValue;
33
+ toggle?: tailwind_merge.ClassNameValue;
34
+ avatar?: tailwind_merge.ClassNameValue;
35
+ item?: tailwind_merge.ClassNameValue;
36
+ avatarIcon?: tailwind_merge.ClassNameValue;
37
+ avatarHeading?: tailwind_merge.ClassNameValue;
38
+ avatarText?: tailwind_merge.ClassNameValue;
39
+ divider?: tailwind_merge.ClassNameValue;
40
+ transient?: tailwind_merge.ClassNameValue;
41
+ sidenav?: tailwind_merge.ClassNameValue;
42
+ };
43
+ };
44
+ } | {}, {
45
+ sidenav: string[];
46
+ content: string;
47
+ header: string;
48
+ avatar: string[];
49
+ avatarIcon: string;
50
+ avatarHeading: string;
51
+ avatarText: string;
52
+ toggle: string[];
53
+ divider: string;
54
+ heading: string;
55
+ item: string[];
56
+ text: string;
57
+ transient: string;
58
+ link: string[];
59
+ tooltip: string[];
60
+ }, undefined, {
61
+ [key: string]: {
62
+ [key: string]: tailwind_merge.ClassNameValue | {
63
+ content?: tailwind_merge.ClassNameValue;
64
+ text?: tailwind_merge.ClassNameValue;
65
+ link?: tailwind_merge.ClassNameValue;
66
+ heading?: tailwind_merge.ClassNameValue;
67
+ tooltip?: tailwind_merge.ClassNameValue;
68
+ header?: tailwind_merge.ClassNameValue;
69
+ toggle?: tailwind_merge.ClassNameValue;
70
+ avatar?: tailwind_merge.ClassNameValue;
71
+ item?: tailwind_merge.ClassNameValue;
72
+ avatarIcon?: tailwind_merge.ClassNameValue;
73
+ avatarHeading?: tailwind_merge.ClassNameValue;
74
+ avatarText?: tailwind_merge.ClassNameValue;
75
+ divider?: tailwind_merge.ClassNameValue;
76
+ transient?: tailwind_merge.ClassNameValue;
77
+ sidenav?: tailwind_merge.ClassNameValue;
78
+ };
79
+ };
80
+ } | {}, {
81
+ sidenav: string[];
82
+ content: string;
83
+ header: string;
84
+ avatar: string[];
85
+ avatarIcon: string;
86
+ avatarHeading: string;
87
+ avatarText: string;
88
+ toggle: string[];
89
+ divider: string;
90
+ heading: string;
91
+ item: string[];
92
+ text: string;
93
+ transient: string;
94
+ link: string[];
95
+ tooltip: string[];
96
+ }, tailwind_variants.TVReturnType<unknown, {
97
+ sidenav: string[];
98
+ content: string;
99
+ header: string;
100
+ avatar: string[];
101
+ avatarIcon: string;
102
+ avatarHeading: string;
103
+ avatarText: string;
104
+ toggle: string[];
105
+ divider: string;
106
+ heading: string;
107
+ item: string[];
108
+ text: string;
109
+ transient: string;
110
+ link: string[];
111
+ tooltip: string[];
112
+ }, undefined, unknown, unknown, undefined>>;
113
+
114
+ export { SidenavStyles };
@@ -0,0 +1,2 @@
1
+ import {tv}from'tailwind-variants';const r=tv({slots:{sidenav:["group/sidenav fg-a11y-on-accent absolute left-0 row-span-full flex h-full flex-col gap-xs bg-surface-default p-m","closed:items-center","group-data-[push~=left]/layout:relative"],content:"flex h-full max-h-full flex-col gap-xs overflow-y-auto",header:"mb-m flex justify-center",avatar:['grid grid-cols-[auto_1fr] grid-rows-2 items-center gap-x-m [grid-template-areas:"icon_heading"_"icon_text"] group-closed/sidenav:flex'],avatarIcon:"[grid-area:icon]",avatarHeading:"fg-primary-bold text-body-m [grid-area:heading]",avatarText:"fg-primary-muted grow-1 text-left text-body-s [grid-area:text]",toggle:["flex cursor-pointer items-center gap-s rounded-medium p-xs group-open/sidenav:px-s","enabled:hover:bg-interactive-muted-hover","enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none","enabled:pressed:bg-interactive-muted-pressed"],divider:"my-s h-[1px] w-full shrink-0 grow-0 border-0 bg-[var(--outline-static)]",heading:"text-body-xs uppercase",item:["group/item flex w-full cursor-pointer items-center gap-s rounded-medium p-xs text-body-m","group-open/sidenav:px-s","enabled:hover:bg-interactive-muted-hover","enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none","enabled:pressed:bg-accent-primary-pressed","enabled:selected:bg-accent-primary-bold","enabled:selected:hover:bg-accent-primary-hover","enabled:selected:focus-visible:bg-accent-primary-hover","enabled:selected:pressed:bg-accent-primary-pressed","disabled:fg-disabled disabled:cursor-not-allowed"],text:"grow-1 text-left text-body-s",transient:"group-closed/sidenav:hidden",link:["group/link flex w-full cursor-pointer items-center gap-s rounded-medium p-xs text-body-m","group-open/sidenav:w-full","enabled:hover:bg-interactive-muted-hover","enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none","enabled:pressed:bg-accent-primary-pressed","disabled:fg-disabled disabled:cursor-not-allowed"],tooltip:["absolute flex items-center gap-s whitespace-nowrap text-body-s","group-disabled/item:fg-disabled group-disabled/link:fg-disabled"]}});export{r as SidenavStyles};//# sourceMappingURL=styles.js.map
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/sidenav/styles.ts"],"names":["SidenavStyles","tv"],"mappings":"mCAcO,MAAMA,EAAgBC,EAAAA,CAAG,CAC9B,KAAA,CAAO,CACL,QAAS,CACP,kHAAA,CACA,qBAAA,CACA,yCACF,EACA,OAAA,CAAS,wDAAA,CACT,MAAA,CAAQ,0BAAA,CACR,MAAA,CAAQ,CACN,uIACF,CAAA,CACA,WAAY,kBAAA,CACZ,aAAA,CAAe,iDAAA,CACf,UAAA,CACE,iEACF,MAAA,CAAQ,CACN,oFAAA,CACA,0CAAA,CACA,sFACA,8CACF,CAAA,CACA,OAAA,CACE,yEAAA,CACF,OAAA,CAAS,wBAAA,CACT,IAAA,CAAM,CACJ,2FACA,yBAAA,CACA,0CAAA,CACA,qFAAA,CACA,2CAAA,CACA,0CACA,gDAAA,CACA,wDAAA,CACA,oDAAA,CACA,kDACF,EACA,IAAA,CAAM,8BAAA,CACN,SAAA,CAAW,6BAAA,CACX,IAAA,CAAM,CACJ,0FAAA,CACA,2BAAA,CACA,2CACA,qFAAA,CACA,2CAAA,CACA,kDACF,CAAA,CACA,QAAS,CACP,gEAAA,CACA,iEACF,CACF,CACF,CAAC","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from 'tailwind-variants';\n\nexport const SidenavStyles = tv({\n slots: {\n sidenav: [\n 'group/sidenav fg-a11y-on-accent absolute left-0 row-span-full flex h-full flex-col gap-xs bg-surface-default p-m',\n 'closed:items-center',\n 'group-data-[push~=left]/layout:relative',\n ],\n content: 'flex h-full max-h-full flex-col gap-xs overflow-y-auto',\n header: 'mb-m flex justify-center',\n avatar: [\n 'grid grid-cols-[auto_1fr] grid-rows-2 items-center gap-x-m [grid-template-areas:\"icon_heading\"_\"icon_text\"] group-closed/sidenav:flex',\n ],\n avatarIcon: '[grid-area:icon]',\n avatarHeading: 'fg-primary-bold text-body-m [grid-area:heading]',\n avatarText:\n 'fg-primary-muted grow-1 text-left text-body-s [grid-area:text]',\n toggle: [\n 'flex cursor-pointer items-center gap-s rounded-medium p-xs group-open/sidenav:px-s',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n 'enabled:pressed:bg-interactive-muted-pressed',\n ],\n divider:\n 'my-s h-[1px] w-full shrink-0 grow-0 border-0 bg-[var(--outline-static)]',\n heading: 'text-body-xs uppercase',\n item: [\n 'group/item flex w-full cursor-pointer items-center gap-s rounded-medium p-xs text-body-m',\n 'group-open/sidenav:px-s',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n 'enabled:pressed:bg-accent-primary-pressed',\n 'enabled:selected:bg-accent-primary-bold',\n 'enabled:selected:hover:bg-accent-primary-hover',\n 'enabled:selected:focus-visible:bg-accent-primary-hover',\n 'enabled:selected:pressed:bg-accent-primary-pressed',\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n text: 'grow-1 text-left text-body-s',\n transient: 'group-closed/sidenav:hidden',\n link: [\n 'group/link flex w-full cursor-pointer items-center gap-s rounded-medium p-xs text-body-m',\n 'group-open/sidenav:w-full',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n 'enabled:pressed:bg-accent-primary-pressed',\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n tooltip: [\n 'absolute flex items-center gap-s whitespace-nowrap text-body-s',\n 'group-disabled/item:fg-disabled group-disabled/link:fg-disabled',\n ],\n },\n});\n"]}
@@ -0,0 +1,38 @@
1
+ import { ComponentPropsWithRef, PropsWithChildren } from 'react';
2
+ import { Pressable, ToggleButtonProps, LinkProps } from 'react-aria-components';
3
+
4
+ type SidenavProps = ComponentPropsWithRef<'nav'> & {
5
+ isHiddenWhenClosed?: boolean;
6
+ };
7
+ type SidenavHeaderProps = PropsWithChildren<{
8
+ classNames?: {
9
+ header?: string;
10
+ button?: string;
11
+ container?: string;
12
+ icon?: string;
13
+ };
14
+ }>;
15
+ type SidenavContentProps = ComponentPropsWithRef<'div'>;
16
+ type SidenavItemProps = ToggleButtonProps & {
17
+ classNames?: {
18
+ button?: string;
19
+ icon?: string;
20
+ };
21
+ textValue: string;
22
+ };
23
+ type SidenavLinkProps = LinkProps & {
24
+ classNames?: {
25
+ button?: string;
26
+ icon?: string;
27
+ };
28
+ textValue: string;
29
+ };
30
+ type SidenavAvatarProps = ComponentPropsWithRef<'div'>;
31
+ type SidenavDividerProps = ComponentPropsWithRef<'hr'>;
32
+ type SidenavFooterProps = ComponentPropsWithRef<'footer'>;
33
+ type SidenavTriggerProps = ComponentPropsWithRef<typeof Pressable>;
34
+ type SidenavContextValue = {
35
+ open: boolean;
36
+ };
37
+
38
+ export type { SidenavAvatarProps, SidenavContentProps, SidenavContextValue, SidenavDividerProps, SidenavFooterProps, SidenavHeaderProps, SidenavItemProps, SidenavLinkProps, SidenavProps, SidenavTriggerProps };
@@ -0,0 +1,2 @@
1
+ //# sourceMappingURL=types.js.map
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
@@ -8,7 +8,7 @@ declare const SkeletonStyles: tailwind_variants.TVReturnType<{
8
8
  circ: string;
9
9
  rect: string;
10
10
  };
11
- }, undefined, "fg-default-light bg-transparent-light px-l py-s motion-safe:animate-pulse", {
11
+ }, undefined, "fg-primary-bold bg-interactive-disabled px-l py-s motion-safe:animate-pulse", {
12
12
  shape: {
13
13
  circ: string;
14
14
  rect: string;
@@ -18,6 +18,6 @@ declare const SkeletonStyles: tailwind_variants.TVReturnType<{
18
18
  circ: string;
19
19
  rect: string;
20
20
  };
21
- }, undefined, "fg-default-light bg-transparent-light px-l py-s motion-safe:animate-pulse", unknown, unknown, undefined>>;
21
+ }, undefined, "fg-primary-bold bg-interactive-disabled px-l py-s motion-safe:animate-pulse", unknown, unknown>>;
22
22
 
23
23
  export { SkeletonStyles, SkeletonStylesDefaults };
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';const e={shape:"rect"},l=tv({base:"fg-default-light bg-transparent-light px-l py-s motion-safe:animate-pulse",variants:{shape:{circ:"aspect-square w-[1lh] rounded-full",rect:"min-h-[1lh] w-full rounded-small"}},defaultVariants:e});export{l as SkeletonStyles,e as SkeletonStylesDefaults};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const t={shape:"rect"},s=tv({base:"fg-primary-bold bg-interactive-disabled px-l py-s motion-safe:animate-pulse",variants:{shape:{circ:"aspect-square w-[1lh] rounded-full",rect:"min-h-[1lh] w-full rounded-small"}},defaultVariants:t});export{s as SkeletonStyles,t as SkeletonStylesDefaults};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/skeleton/styles.ts"],"names":["SkeletonStyles","tv"],"mappings":"sCAeS,MAAA,CAAA,CAAA,CAAA,KAGIA,CAAiBC,MAC5B,CAAA,CAAM,sFACI,CACR,QACE,CAAA,CAAA,KAAM,CAAA,CAAA,IAAA,CAAA,oCACA,CAAA,IAAA,CAAA,kCAGV,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const SkeletonStylesDefaults = {\n shape: 'rect',\n} as const;\n\nexport const SkeletonStyles = tv({\n base: 'fg-default-light bg-transparent-light px-l py-s motion-safe:animate-pulse',\n variants: {\n shape: {\n circ: 'aspect-square w-[1lh] rounded-full',\n rect: 'min-h-[1lh] w-full rounded-small',\n },\n },\n defaultVariants: SkeletonStylesDefaults,\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/skeleton/styles.ts"],"names":["SkeletonStyles","tv"],"mappings":"sCAeS,MAAA,CAAA,CAAA,CAAA,KAGIA,CAAiBC,MAC5B,CAAA,CAAM,wFACI,CACR,QACE,CAAA,CAAA,KAAM,CAAA,CAAA,IAAA,CAAA,oCACA,CAAA,IAAA,CAAA,kCAGV,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const SkeletonStylesDefaults = {\n shape: 'rect',\n} as const;\n\nexport const SkeletonStyles = tv({\n base: 'fg-primary-bold bg-interactive-disabled px-l py-s motion-safe:animate-pulse',\n variants: {\n shape: {\n circ: 'aspect-square w-[1lh] rounded-full',\n rect: 'min-h-[1lh] w-full rounded-small',\n },\n },\n defaultVariants: SkeletonStylesDefaults,\n});\n"]}
@@ -1,18 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { SliderProps as SliderProps$1 } from 'react-aria-components';
2
+ import { SliderProps } from './types.js';
3
+ import 'react-aria-components';
3
4
 
4
- interface SliderProps extends Omit<SliderProps$1, 'value' | 'defaultValue' | 'showOutput' | 'slot' | 'style' | 'formatOptions'> {
5
- className?: string;
6
- showInput?: boolean;
7
- showLabel?: boolean;
8
- layout?: 'stacked' | 'inline';
9
- value?: number;
10
- defaultValue?: number;
11
- rangeValue?: [number, number];
12
- defaultRangeValue?: [number, number];
13
- isRange?: boolean;
14
- label: string;
15
- }
16
5
  /**
17
6
  * Slider - An interactive range input component for numeric value selection
18
7
  *
@@ -24,34 +13,6 @@ interface SliderProps extends Omit<SliderProps$1, 'value' | 'defaultValue' | 'sh
24
13
  * // Basic slider
25
14
  * <Slider label="Volume" defaultValue={50} />
26
15
  */
27
- declare const Slider: ({ children, className, showInput, showLabel, layout, value, defaultValue, label, defaultRangeValue, rangeValue, minValue, maxValue, isRange, orientation, ...props }: SliderProps) => react_jsx_runtime.JSX.Element;
28
- type RangeSliderProps = Omit<SliderProps, 'isRange' | 'defaultRangeValue' | 'rangeValue' | 'defaultValue' | 'value'> & {
29
- defaultValue?: SliderProps['defaultRangeValue'];
30
- value: SliderProps['rangeValue'];
31
- };
32
- /**
33
- * RangeSlider - A dual-handle slider component for selecting a range of numeric values
34
- *
35
- * Extends the base Slider component to provide range selection functionality with two thumbs,
36
- * allowing users to define both minimum and maximum values within a specified range.
37
- * Maintains all accessibility features and layout options of the base slider while
38
- * providing intuitive range selection controls.
39
- *
40
- * @example
41
- * // Basic range slider
42
- * <RangeSlider label="Price Range" defaultValue={[20, 80]} minValue={0} maxValue={100} />
43
- *
44
- * @example
45
- * // Controlled range slider with input fields
46
- * <RangeSlider
47
- * label="Temperature Range"
48
- * value={tempRange}
49
- * onChange={setTempRange}
50
- * showInput
51
- * minValue={-10}
52
- * maxValue={40}
53
- * />
54
- */
55
- declare const RangeSlider: ({ defaultValue, value, ...props }: RangeSliderProps) => react_jsx_runtime.JSX.Element;
16
+ declare const Slider: ({ classNames, label: labelProp, layout, maxValue: maxValueProp, minValue: minValueProp, orientation, showInput, showLabel, ...rest }: SliderProps) => react_jsx_runtime.JSX.Element;
56
17
 
57
- export { RangeSlider, type RangeSliderProps, Slider, type SliderProps };
18
+ export { Slider };
@@ -1,2 +1,2 @@
1
- import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {cn}from'./../../lib/utils.js';import'client-only';import {cva}from'class-variance-authority';import {useContext}from'react';import {Slider,Label,SliderTrack,SliderThumb,Text,SliderStateContext,useSlottedContext,LabelContext,NumberField,Input}from'react-aria-components';import {Tooltip}from'../tooltip/index.js';const D=cva("grid gap-s",{variants:{layout:{stacked:"",inline:""},orientation:{vertical:"h-full w-fit",horizontal:"h-xl w-full"}},compoundVariants:[{layout:"stacked",orientation:"horizontal",className:"grid-cols-[auto_1fr_auto] grid-rows-[auto_auto_auto]"},{layout:"inline",orientation:"horizontal",className:"grid-cols-[auto_auto_1fr_auto_auto] grid-rows-1 items-center"},{layout:"stacked",orientation:"vertical",className:"grid-cols-[auto_auto_auto] grid-rows-[auto_auto_1fr_auto]"},{layout:"inline",orientation:"vertical",className:"grid-cols-[auto_1fr_auto] grid-rows-[auto_auto_1fr_auto]"}]}),M=cva("font-display text-body-m text-default-dark",{variants:{orientation:{horizontal:"",vertical:"col-start-1 row-start-4"},layout:{inline:"",stacked:""}},compoundVariants:[{layout:"stacked",orientation:"horizontal",className:"col-start-1 row-start-3"},{layout:"inline",orientation:"horizontal",className:"order-2"},{layout:"stacked",orientation:"vertical",className:"self-end justify-self-end"},{layout:"inline",orientation:"vertical",className:"justify-self-center"}]}),q=cva("font-display text-body-m text-default-dark",{variants:{orientation:{horizontal:"",vertical:"col-start-1 row-start-2"},layout:{inline:"",stacked:""}},compoundVariants:[{layout:"stacked",orientation:"horizontal",className:"col-start-3 row-start-3 justify-self-end"},{layout:"inline",orientation:"horizontal",className:"order-4"},{layout:"stacked",orientation:"vertical",className:"justify-self-end"}]}),E=cva("relative",{variants:{orientation:{horizontal:"h-s w-full",vertical:"h-full w-s"},layout:{inline:"",stacked:""}},compoundVariants:[{orientation:"horizontal",layout:"stacked",className:"col-span-3 row-start-2"},{orientation:"horizontal",layout:"inline",className:"order-3"},{orientation:"vertical",layout:"stacked",className:"col-start-2 row-span-3 row-start-2"},{orientation:"vertical",layout:"inline",className:"col-start-1 row-start-3 justify-self-center"}]}),G=cva("flex gap-s",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col-reverse"},layout:{inline:"order-5",stacked:"col-start-3 row-start-1"}},compoundVariants:[{layout:"inline",orientation:"horizontal",className:"order-5"},{layout:"inline",orientation:"vertical",className:"col-span-3 col-start-1"},{layout:"stacked",orientation:"vertical",className:"row-start-4"}]}),H=cva("text-default-light",{variants:{orientation:{horizontal:"",vertical:""},layout:{inline:"order-1",stacked:"col-start-1"}},compoundVariants:[{layout:"stacked",orientation:"vertical",className:"col-span-2"},{layout:"inline",orientation:"vertical",className:"col-span-3"}]}),J=cva("h-m w-m rounded-full bg-highlight-bold outline-highlight-bold/40 hover:outline-4 focus-visible:outline-4",{variants:{orientation:{horizontal:"translate-y-[50%]",vertical:"translate-x-[40%]"}}}),K=cva("absolute rounded-full bg-default-light/40",{variants:{orientation:{horizontal:"top-[50%] h-xxs w-full translate-y-[50%]",vertical:"left-[50%] h-full w-xxs "}}}),Q=cva("absolute rounded-full bg-highlight",{variants:{orientation:{horizontal:"top-1/2 h-xxs translate-y-1/2",vertical:"left-1/2 w-xxs"}}}),U=({children:s,className:i,showInput:o=false,showLabel:d=true,layout:l="stacked",value:m,defaultValue:N,label:k,defaultRangeValue:w,rangeValue:S,minValue:p=0,maxValue:g=100,isRange:v=false,orientation:t="horizontal",...z})=>{const T=v?S:m,_=v?w:N;return jsxs(Slider,{className:cn(D({orientation:t,layout:l})),minValue:p,maxValue:g,orientation:t,value:T,defaultValue:_,...z,children:[d&&jsx(Label,{className:H({orientation:t,layout:l}),children:k}),o&&jsx("div",{className:G({orientation:t,layout:l}),children:jsx(W,{})}),jsx(SliderTrack,{className:E({layout:l,orientation:t}),children:({state:r})=>{const n=r.getThumbPercent(0),P=r.getThumbPercent(1)||n,y=`${(r.values.length===2?P-n:n)*100}%`,b=r.values.length===2?`${Math.floor(n*100)}%`:"0";return jsxs(Fragment,{children:[jsx("div",{className:K({orientation:t})}),r.values.map((X,u)=>jsxs(Fragment,{children:[jsx("div",{className:Q({orientation:t}),style:t==="horizontal"?{left:b,width:y}:{bottom:b,height:y}},`slider-${u===0?"min":"max"}`),jsx(SliderThumb,{index:u,className:J({orientation:t}),children:!o&&jsxs(Tooltip,{children:[jsx(Tooltip.Trigger,{children:jsx("div",{className:"size-full outline-none"})}),jsx(Tooltip.Body,{placement:"top",children:r.getThumbValue(u)})]})},`slider-thumb-${u===0?"min":"max"}`)]}))]})}}),jsx(Text,{slot:"min",className:M({layout:l,orientation:t}),children:p}),jsx(Text,{slot:"max",className:q({layout:l,orientation:t}),children:g})]})},oa=({defaultValue:s,value:i,...o})=>jsx(U,{...o,isRange:true,defaultRangeValue:s,rangeValue:i});function W({className:s}){const i=useContext(SliderStateContext),o=useSlottedContext(LabelContext);return jsx(Fragment,{children:i?.values.map((d,l)=>jsx(NumberField,{"aria-labelledby":o?.id,value:d,onChange:m=>i.setThumbValue(0,m),children:jsx(Input,{className:cn("w-[50px] rounded-medium border border-interactive px-s py-xs font-display text-body-m text-default-light",s)})},`number-field-${l===0?"min":"max"}`))})}export{oa as RangeSlider,U as Slider};//# sourceMappingURL=index.js.map
1
+ import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'client-only';import {Fragment as Fragment$1}from'react';import {Slider,composeRenderProps,Label,Input,SliderTrack,SliderThumb,Text}from'react-aria-components';import {Tooltip}from'../tooltip/index.js';import {SliderStyles}from'./styles.js';const {slider:x,label:A,inputs:B,input:F,thumb:D,track:P,trackBackground:$,trackValue:z,minValue:C,maxValue:L}=SliderStyles(),I=({classNames:r,label:n,layout:T="grid",maxValue:d=100,minValue:c=0,orientation:b="horizontal",showInput:p,showLabel:s=true,...k})=>jsx(Slider,{...k,className:composeRenderProps(r?.slider,a=>x({className:a})),maxValue:d,minValue:c,orientation:b,"aria-label":s?void 0:n,"data-layout":T,children:({state:a})=>jsxs(Fragment,{children:[s&&jsx(Label,{className:A({className:r?.label}),children:n}),p&&jsx("div",{className:B({className:r?.inputs}),children:a.values.map((m,l)=>jsx(Input,{className:composeRenderProps(r?.input,i=>F({className:i})),value:m,onChange:i=>a.setThumbValue(l,Number.parseFloat(i.target.value))},`number-field-${l===0?"min":"max"}`))}),jsxs(SliderTrack,{className:composeRenderProps(r?.track,m=>P({className:m})),children:[jsx("div",{className:$({className:r?.trackBackground})}),a.values.map((m,l)=>jsxs(Fragment$1,{children:[jsx("div",{className:z({className:r?.trackValue}),"data-start":a.values.length===1?0:a.getThumbPercent(0),"data-end":a.getThumbPercent(a.values.length===1?0:1)}),jsxs(Tooltip,{isDisabled:!p||a.isThumbDragging(l),children:[jsx(Tooltip.Trigger,{children:jsx(SliderThumb,{index:l,className:composeRenderProps(r?.thumb,i=>D({className:i}))})}),jsx(Tooltip.Body,{placement:"top",children:a.getThumbValue(l)})]})]},`slider-${l===0?"min":"max"}`))]}),jsx(Text,{slot:"min",className:C({className:r?.minValue}),children:c}),jsx(Text,{slot:"max",className:L({className:r?.maxValue}),children:d})]})});export{I as Slider};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/slider/index.tsx"],"names":["e","labelVariants","cva","value","defaultRangeValue","rangeValue","sliderDefaultValue","isRange","defaultValue","jsxs","RACSlider","c","x","maxValue","sliderValue","props","jsx","Label","a","A","label","inputVariants","O","layout","state","minValue","startPercent","h","sliderTrackBackgroundVariants","_","index","Fragment","sliderTrackValueVariants","sizeInPercent","SliderThumb","sliderThumbVariants","Tooltip","f","Text","V","RangeSlider","Slider","useSlottedContext","LabelContext","NumberField","j","labelProps","v","C"],"mappings":"kXAiCE,MAAA,CAAA,CAAAA,GAAA,CAAA,YAEI,CAAA,CAAA,SACA,CAAA,MAAQ,CAAA,CACV,OACA,CAAA,EAAA,CAAA,sBACY,CAAA,CAAA,QACV,CAAA,yBAGJ,CAAA,aAAkB,CAChB,CACE,CAAA,gBACA,CAAA,CAAA,CAAA,MAAA,CAAA,SAAa,CAAA,wBACF,CAAA,SAAA,CAAA,sDAIX,CAAA,CAAA,CAAA,MAAA,CAAA,QAAa,CAAA,WACb,CAAA,YAAW,CAAA,SAAA,CAAA,8DAIX,CAAA,CAAA,CAAA,MAAA,CAAA,SAAa,CAAA,sBACF,CAAA,SAAA,CAAA,2DAIX,CAAA,CAAA,CAAA,MAAA,CAAA,oBACA,CAAA,UAA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AAiB,EAYnD,CAAA,GAGP,CAAA,CAAA,KAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\nimport { cn } from '@/lib/utils';\nimport 'client-only';\nimport { cva } from 'class-variance-authority';\nimport { useContext } from 'react';\nimport {\n Input,\n Label,\n LabelContext,\n NumberField,\n Slider as RACSlider,\n type SliderProps as RACSliderProps,\n SliderTrack as RACSliderTrack,\n SliderStateContext,\n SliderThumb,\n Text,\n useSlottedContext,\n} from 'react-aria-components';\nimport { Tooltip } from '../tooltip';\n\nconst sliderVariants = cva('grid gap-s', {\n variants: {\n layout: {\n stacked: '',\n inline: '',\n },\n orientation: {\n vertical: 'h-full w-fit',\n horizontal: 'h-xl w-full',\n },\n },\n compoundVariants: [\n {\n layout: 'stacked',\n orientation: 'horizontal',\n className: 'grid-cols-[auto_1fr_auto] grid-rows-[auto_auto_auto]',\n },\n {\n layout: 'inline',\n orientation: 'horizontal',\n className: 'grid-cols-[auto_auto_1fr_auto_auto] grid-rows-1 items-center',\n },\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'grid-cols-[auto_auto_auto] grid-rows-[auto_auto_1fr_auto]',\n },\n {\n layout: 'inline',\n orientation: 'vertical',\n className: 'grid-cols-[auto_1fr_auto] grid-rows-[auto_auto_1fr_auto]',\n },\n ],\n});\n\nconst minValueVariants = cva('font-display text-body-m text-default-dark', {\n variants: {\n orientation: {\n horizontal: '',\n vertical: 'col-start-1 row-start-4',\n },\n layout: {\n inline: '',\n stacked: '',\n },\n },\n compoundVariants: [\n {\n layout: 'stacked',\n orientation: 'horizontal',\n className: 'col-start-1 row-start-3',\n },\n {\n layout: 'inline',\n orientation: 'horizontal',\n className: 'order-2',\n },\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'self-end justify-self-end',\n },\n {\n layout: 'inline',\n orientation: 'vertical',\n className: 'justify-self-center',\n },\n ],\n});\n\nconst maxValueVariants = cva('font-display text-body-m text-default-dark', {\n variants: {\n orientation: {\n horizontal: '',\n vertical: 'col-start-1 row-start-2',\n },\n layout: {\n inline: '',\n stacked: '',\n },\n },\n compoundVariants: [\n {\n layout: 'stacked',\n orientation: 'horizontal',\n className: 'col-start-3 row-start-3 justify-self-end',\n },\n {\n layout: 'inline',\n orientation: 'horizontal',\n className: 'order-4',\n },\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'justify-self-end',\n },\n ],\n});\n\nconst sliderTrackVariants = cva('relative', {\n variants: {\n orientation: {\n horizontal: 'h-s w-full',\n vertical: 'h-full w-s',\n },\n layout: {\n inline: '',\n stacked: '',\n },\n },\n compoundVariants: [\n {\n orientation: 'horizontal',\n layout: 'stacked',\n className: 'col-span-3 row-start-2',\n },\n {\n orientation: 'horizontal',\n layout: 'inline',\n className: 'order-3',\n },\n {\n orientation: 'vertical',\n layout: 'stacked',\n className: 'col-start-2 row-span-3 row-start-2',\n },\n {\n orientation: 'vertical',\n layout: 'inline',\n className: 'col-start-1 row-start-3 justify-self-center',\n },\n ],\n});\n\nconst inputVariants = cva('flex gap-s', {\n variants: {\n orientation: {\n horizontal: 'flex-row',\n vertical: 'flex-col-reverse',\n },\n layout: {\n inline: 'order-5',\n stacked: 'col-start-3 row-start-1',\n },\n },\n compoundVariants: [\n {\n layout: 'inline',\n orientation: 'horizontal',\n className: 'order-5',\n },\n {\n layout: 'inline',\n orientation: 'vertical',\n className: 'col-span-3 col-start-1',\n },\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'row-start-4',\n },\n ],\n});\n\nconst labelVariants = cva('text-default-light', {\n variants: {\n orientation: {\n horizontal: '',\n vertical: '',\n },\n layout: {\n inline: 'order-1',\n stacked: 'col-start-1',\n },\n },\n compoundVariants: [\n {\n layout: 'stacked',\n orientation: 'vertical',\n className: 'col-span-2',\n },\n {\n layout: 'inline',\n orientation: 'vertical',\n className: 'col-span-3',\n },\n ],\n});\n\nconst sliderThumbVariants = cva(\n 'h-m w-m rounded-full bg-highlight-bold outline-highlight-bold/40 hover:outline-4 focus-visible:outline-4',\n {\n variants: {\n orientation: {\n horizontal: 'translate-y-[50%]',\n vertical: 'translate-x-[40%]',\n },\n },\n },\n);\n\nconst sliderTrackBackgroundVariants = cva(\n 'absolute rounded-full bg-default-light/40',\n {\n variants: {\n orientation: {\n horizontal: 'top-[50%] h-xxs w-full translate-y-[50%]',\n vertical: 'left-[50%] h-full w-xxs ',\n },\n },\n },\n);\n\nconst sliderTrackValueVariants = cva('absolute rounded-full bg-highlight', {\n variants: {\n orientation: {\n horizontal: 'top-1/2 h-xxs translate-y-1/2',\n vertical: 'left-1/2 w-xxs',\n },\n },\n});\n\nexport interface SliderProps\n extends Omit<\n RACSliderProps,\n 'value' | 'defaultValue' | 'showOutput' | 'slot' | 'style' | 'formatOptions'\n > {\n className?: string;\n showInput?: boolean;\n showLabel?: boolean;\n layout?: 'stacked' | 'inline';\n value?: number;\n defaultValue?: number;\n rangeValue?: [number, number];\n defaultRangeValue?: [number, number];\n isRange?: boolean;\n label: string;\n}\n\n/**\n * Slider - An interactive range input component for numeric value selection\n *\n * Provides accessible slider functionality with optional input field integration,\n * flexible layouts, and comprehensive keyboard and mouse interaction support.\n * Perfect for settings, filters, or any numeric input requiring visual feedback.\n *\n * @example\n * // Basic slider\n * <Slider label=\"Volume\" defaultValue={50} />\n */\nexport const Slider = ({\n children,\n className,\n showInput = false,\n showLabel = true,\n layout = 'stacked',\n value,\n defaultValue,\n label,\n defaultRangeValue,\n rangeValue,\n minValue = 0,\n maxValue = 100,\n isRange = false,\n orientation = 'horizontal',\n ...props\n}: SliderProps) => {\n const sliderValue = isRange ? rangeValue : value;\n const sliderDefaultValue = isRange ? defaultRangeValue : defaultValue;\n\n return (\n <RACSlider\n className={cn(sliderVariants({ orientation, layout }))}\n minValue={minValue}\n maxValue={maxValue}\n orientation={orientation}\n value={sliderValue}\n defaultValue={sliderDefaultValue}\n {...props}\n >\n {showLabel && (\n <Label className={labelVariants({ orientation, layout })}>\n {label}\n </Label>\n )}\n {showInput && (\n <div className={inputVariants({ orientation, layout })}>\n <SliderInput />\n </div>\n )}\n <RACSliderTrack className={sliderTrackVariants({ layout, orientation })}>\n {({ state }) => {\n const minValue = state.getThumbPercent(0);\n const maxValue = state.getThumbPercent(1) || minValue;\n const sizeInPercent = `${(state.values.length === 2 ? maxValue - minValue : minValue) * 100}%`;\n const startPercent =\n state.values.length === 2 ? `${Math.floor(minValue * 100)}%` : '0';\n return (\n <>\n <div className={sliderTrackBackgroundVariants({ orientation })} />\n {state.values.map((_, index) => {\n return (\n <>\n <div\n key={`slider-${index === 0 ? 'min' : 'max'}`}\n className={sliderTrackValueVariants({ orientation })}\n style={\n orientation === 'horizontal'\n ? {\n left: startPercent,\n width: sizeInPercent,\n }\n : {\n bottom: startPercent,\n height: sizeInPercent,\n }\n }\n />\n\n <SliderThumb\n key={`slider-thumb-${index === 0 ? 'min' : 'max'}`}\n index={index}\n className={sliderThumbVariants({ orientation })}\n >\n {!showInput && (\n <Tooltip>\n <Tooltip.Trigger>\n <div className='size-full outline-none' />\n </Tooltip.Trigger>\n <Tooltip.Body placement='top'>\n {state.getThumbValue(index)}\n </Tooltip.Body>\n </Tooltip>\n )}\n </SliderThumb>\n </>\n );\n })}\n </>\n );\n }}\n </RACSliderTrack>\n <Text slot='min' className={minValueVariants({ layout, orientation })}>\n {minValue}\n </Text>\n <Text slot='max' className={maxValueVariants({ layout, orientation })}>\n {maxValue}\n </Text>\n </RACSlider>\n );\n};\n\nexport type RangeSliderProps = Omit<\n SliderProps,\n 'isRange' | 'defaultRangeValue' | 'rangeValue' | 'defaultValue' | 'value'\n> & {\n defaultValue?: SliderProps['defaultRangeValue'];\n value: SliderProps['rangeValue'];\n};\n\n/**\n * RangeSlider - A dual-handle slider component for selecting a range of numeric values\n *\n * Extends the base Slider component to provide range selection functionality with two thumbs,\n * allowing users to define both minimum and maximum values within a specified range.\n * Maintains all accessibility features and layout options of the base slider while\n * providing intuitive range selection controls.\n *\n * @example\n * // Basic range slider\n * <RangeSlider label=\"Price Range\" defaultValue={[20, 80]} minValue={0} maxValue={100} />\n *\n * @example\n * // Controlled range slider with input fields\n * <RangeSlider\n * label=\"Temperature Range\"\n * value={tempRange}\n * onChange={setTempRange}\n * showInput\n * minValue={-10}\n * maxValue={40}\n * />\n */\nexport const RangeSlider = ({\n defaultValue,\n value,\n ...props\n}: RangeSliderProps) => {\n return (\n <Slider\n {...props}\n isRange\n defaultRangeValue={defaultValue}\n rangeValue={value}\n />\n );\n};\n\nfunction SliderInput({ className }: { className?: string }) {\n const state = useContext(SliderStateContext);\n const labelProps = useSlottedContext(LabelContext);\n return (\n <>\n {state?.values.map((value: number, index: number) => (\n <NumberField\n key={`number-field-${index === 0 ? 'min' : 'max'}`}\n aria-labelledby={labelProps?.id}\n value={value}\n onChange={(v) => state.setThumbValue(0, v)}\n >\n <Input\n className={cn(\n 'w-[50px] rounded-medium border border-interactive px-s py-xs font-display text-body-m text-default-light',\n className,\n )}\n />\n </NumberField>\n ))}\n </>\n );\n}\n"]}
1
+ {"version":3,"sources":["../../../src/components/slider/index.tsx"],"names":["thumb","track","trackValue","SliderStyles","f","classNames","minValueProp","orientation","showLabel","jsx","AriaSlider","e","h","className","slider","maxValueProp","layout","jsxs","Fragment","o","label","showInput","value","index","Input","composeRenderProps","input","event","state","AriaSliderTrack","_","Tooltip","u","N","g"],"mappings":"ySA8BE,MAAA,CAAA,MACA,CAAA,CAAA,CAAA,cAEA,CAAA,CAAA,CAAAA,KACA,CAAA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AA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAAE,GAAA,CACLuB,gBAAsB,UAAW7B,CAAAA,CAAAA,CAAY,CAAA,SAAU,CAEtD,WACH,CAAA,CACAI,UACO,CAAA,CAAA,CAAA,CAAAE,GAAA,CACLuB,IAAA,CAAA,CAAA,IAAA,CAAA,KAAsB,CAAA,SAAW7B,GAAY,CAAA,UAE5C,CAAA,EAAA,QACH,GACF,QAEJ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { Fragment } from 'react';\nimport {\n Slider as AriaSlider,\n SliderTrack as AriaSliderTrack,\n composeRenderProps,\n Input,\n Label,\n SliderThumb,\n Text,\n} from 'react-aria-components';\nimport { Tooltip } from '../tooltip';\nimport { SliderStyles } from './styles';\nimport type { SliderProps } from './types';\n\nconst {\n slider,\n label,\n inputs,\n input,\n thumb,\n track,\n trackBackground,\n trackValue,\n minValue,\n maxValue,\n} = SliderStyles();\n\n/**\n * Slider - An interactive range input component for numeric value selection\n *\n * Provides accessible slider functionality with optional input field integration,\n * flexible layouts, and comprehensive keyboard and mouse interaction support.\n * Perfect for settings, filters, or any numeric input requiring visual feedback.\n *\n * @example\n * // Basic slider\n * <Slider label=\"Volume\" defaultValue={50} />\n */\nexport const Slider = ({\n classNames,\n label: labelProp,\n layout = 'grid',\n maxValue: maxValueProp = 100,\n minValue: minValueProp = 0,\n orientation = 'horizontal',\n showInput,\n showLabel = true,\n ...rest\n}: SliderProps) => {\n return (\n <AriaSlider\n {...rest}\n className={composeRenderProps(classNames?.slider, (className) =>\n slider({ className }),\n )}\n maxValue={maxValueProp}\n minValue={minValueProp}\n orientation={orientation}\n aria-label={showLabel ? undefined : labelProp}\n data-layout={layout}\n >\n {({ state }) => (\n <>\n {showLabel && (\n <Label className={label({ className: classNames?.label })}>\n {labelProp}\n </Label>\n )}\n {showInput && (\n <div\n className={inputs({\n className: classNames?.inputs,\n })}\n >\n {state.values.map((value, index) => (\n <Input\n key={`number-field-${index === 0 ? 'min' : 'max'}`}\n className={composeRenderProps(\n classNames?.input,\n (className) => input({ className }),\n )}\n value={value}\n onChange={(event) =>\n state.setThumbValue(\n index,\n Number.parseFloat(event.target.value),\n )\n }\n />\n ))}\n </div>\n )}\n <AriaSliderTrack\n className={composeRenderProps(classNames?.track, (className) =>\n track({ className }),\n )}\n >\n <div\n className={trackBackground({\n className: classNames?.trackBackground,\n })}\n />\n {state.values.map((_, index) => (\n <Fragment key={`slider-${index === 0 ? 'min' : 'max'}`}>\n <div\n className={trackValue({\n className: classNames?.trackValue,\n })}\n data-start={\n state.values.length === 1 ? 0 : state.getThumbPercent(0)\n }\n data-end={state.getThumbPercent(\n state.values.length === 1 ? 0 : 1,\n )}\n />\n <Tooltip\n isDisabled={!showInput || state.isThumbDragging(index)}\n >\n <Tooltip.Trigger>\n <SliderThumb\n index={index}\n className={composeRenderProps(\n classNames?.thumb,\n (className) => thumb({ className }),\n )}\n />\n </Tooltip.Trigger>\n <Tooltip.Body placement='top'>\n {state.getThumbValue(index)}\n </Tooltip.Body>\n </Tooltip>\n </Fragment>\n ))}\n </AriaSliderTrack>\n <Text\n slot='min'\n className={minValue({ className: classNames?.minValue })}\n >\n {minValueProp}\n </Text>\n <Text\n slot='max'\n className={maxValue({ className: classNames?.maxValue })}\n >\n {maxValueProp}\n </Text>\n </>\n )}\n </AriaSlider>\n );\n};\n"]}
@@ -0,0 +1,84 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import * as tailwind_merge from 'tailwind-merge';
3
+
4
+ declare const SliderStyles: tailwind_variants.TVReturnType<{
5
+ [key: string]: {
6
+ [key: string]: tailwind_merge.ClassNameValue | {
7
+ slider?: tailwind_merge.ClassNameValue;
8
+ input?: tailwind_merge.ClassNameValue;
9
+ label?: tailwind_merge.ClassNameValue;
10
+ track?: tailwind_merge.ClassNameValue;
11
+ minValue?: tailwind_merge.ClassNameValue;
12
+ maxValue?: tailwind_merge.ClassNameValue;
13
+ inputs?: tailwind_merge.ClassNameValue;
14
+ trackBackground?: tailwind_merge.ClassNameValue;
15
+ trackValue?: tailwind_merge.ClassNameValue;
16
+ thumb?: tailwind_merge.ClassNameValue;
17
+ };
18
+ };
19
+ } | {
20
+ [x: string]: {
21
+ [x: string]: tailwind_merge.ClassNameValue | {
22
+ slider?: tailwind_merge.ClassNameValue;
23
+ input?: tailwind_merge.ClassNameValue;
24
+ label?: tailwind_merge.ClassNameValue;
25
+ track?: tailwind_merge.ClassNameValue;
26
+ minValue?: tailwind_merge.ClassNameValue;
27
+ maxValue?: tailwind_merge.ClassNameValue;
28
+ inputs?: tailwind_merge.ClassNameValue;
29
+ trackBackground?: tailwind_merge.ClassNameValue;
30
+ trackValue?: tailwind_merge.ClassNameValue;
31
+ thumb?: tailwind_merge.ClassNameValue;
32
+ };
33
+ };
34
+ } | {}, {
35
+ slider: string[];
36
+ label: string[];
37
+ inputs: string[];
38
+ input: string;
39
+ track: string[];
40
+ trackBackground: string[];
41
+ trackValue: string[];
42
+ thumb: string[];
43
+ minValue: string[];
44
+ maxValue: string[];
45
+ }, undefined, {
46
+ [key: string]: {
47
+ [key: string]: tailwind_merge.ClassNameValue | {
48
+ slider?: tailwind_merge.ClassNameValue;
49
+ input?: tailwind_merge.ClassNameValue;
50
+ label?: tailwind_merge.ClassNameValue;
51
+ track?: tailwind_merge.ClassNameValue;
52
+ minValue?: tailwind_merge.ClassNameValue;
53
+ maxValue?: tailwind_merge.ClassNameValue;
54
+ inputs?: tailwind_merge.ClassNameValue;
55
+ trackBackground?: tailwind_merge.ClassNameValue;
56
+ trackValue?: tailwind_merge.ClassNameValue;
57
+ thumb?: tailwind_merge.ClassNameValue;
58
+ };
59
+ };
60
+ } | {}, {
61
+ slider: string[];
62
+ label: string[];
63
+ inputs: string[];
64
+ input: string;
65
+ track: string[];
66
+ trackBackground: string[];
67
+ trackValue: string[];
68
+ thumb: string[];
69
+ minValue: string[];
70
+ maxValue: string[];
71
+ }, tailwind_variants.TVReturnType<unknown, {
72
+ slider: string[];
73
+ label: string[];
74
+ inputs: string[];
75
+ input: string;
76
+ track: string[];
77
+ trackBackground: string[];
78
+ trackValue: string[];
79
+ thumb: string[];
80
+ minValue: string[];
81
+ maxValue: string[];
82
+ }, undefined, unknown, unknown, undefined>>;
83
+
84
+ export { SliderStyles };
@@ -0,0 +1,2 @@
1
+ import {tv}from'tailwind-variants';const t=tv({slots:{slider:["group/slider flex gap-s","layout-grid:grid","layout-stack:flex","orientation-vertical:h-full orientation-vertical:w-fit","orientation-vertical:layout-grid:grid-cols-[auto_auto_auto] orientation-vertical:layout-grid:grid-rows-[auto_auto_1fr_auto]","orientation-vertical:layout-stack:flex-col","orientation-horizontal:h-xl","orientation-horizontal:layout-grid:grid-cols-[auto_1fr_auto] orientation-horizontal:layout-grid:grid-rows-[auto_auto_auto]","orientation-horizontal:layout-stack:w-full orientation-horizontal:layout-stack:items-center"],label:["fg-primary-bold order-1","group-layout-grid/slider:col-start-1","group-orientation-vertical/slider:group-layout-grid/slider:col-span-2"],inputs:["order-5 flex gap-s","group-layout-grid/slider:col-start-3 group-layout-grid/slider:row-start-1","group-orientation-horizontal/slider:flex-row","group-orientation-vertical/slider:flex-col-reverse","group-orientation-vertical/slider:group-layout-grid/slider:row-start-4"],input:"fg-primary-bold w-[50px] rounded-medium px-s py-xs font-display text-body-m outline outline-interactive",track:["relative order-3 h-full","group-orientation-horizontal/slider:h-[20px] group-orientation-horizontal/slider:w-full","group-orientation-horizontal/slider:group-layout-grid/slider:col-span-3 group-orientation-horizontal/slider:group-layout-grid/slider:row-start-2","group-orientation-vertical/slider:h-full group-orientation-vertical/slider:w-[20px]","group-orientation-vertical/slider:group-layout-grid/slider:col-start-2 group-orientation-vertical/slider:group-layout-grid/slider:row-span-3 group-orientation-vertical/slider:group-layout-grid/slider:row-start-2"],trackBackground:["absolute rounded-full bg-surface-muted","group-orientation-horizontal/slider:-translate-y-1/2 group-orientation-horizontal/slider:top-1/2 group-orientation-horizontal/slider:h-xxs group-orientation-horizontal/slider:w-full","group-orientation-vertical/slider:-translate-x-1/2 group-orientation-vertical/slider:left-1/2 group-orientation-vertical/slider:h-full group-orientation-vertical/slider:w-xxs"],trackValue:["absolute rounded-full bg-accent-primary-bold","group-orientation-horizontal/slider:-translate-y-1/2 group-orientation-horizontal/slider:top-1/2 group-orientation-horizontal/slider:right-[calc(100%-attr(data-end_%)*100)] group-orientation-horizontal/slider:left-[calc(attr(data-start_%)*100)] group-orientation-horizontal/slider:h-xxs","group-orientation-vertical/slider:-translate-x-1/2 group-orientation-vertical/slider:top-[calc(100%-attr(data-end_%)*100)] group-orientation-vertical/slider:bottom-[calc(attr(data-start_%)*100)] group-orientation-vertical/slider:left-1/2 group-orientation-vertical/slider:w-xxs"],thumb:["h-m w-m rounded-full bg-accent-primary-bold outline-accent-primary-bold/40","focus-visible:outline-4","hover:outline-4","group-orientation-horizontal/slider:top-1/2","group-orientation-vertical/slider:left-1/2"],minValue:["fg-primary-muted flex items-center font-display text-body-m","group-orientation-vertical/slider:col-start-1 group-orientation-vertical/slider:row-start-4","group-orientation-horizontal/slider:group-layout-grid/slider:col-start-1","group-orientation-horizontal/slider:group-layout-grid/slider:row-start-3","group-orientation-horizontal/slider:order-2","group-orientation-vertical/slider:group-layout-grid/slider:self-end","group-orientation-vertical/slider:group-layout-grid/slider:justify-self-end","group-orientation-vertical/slider:order-4"],maxValue:["fg-primary-muted order-4 flex items-center font-display text-body-m","group-orientation-vertical/slider:order-2","group-orientation-vertical/slider:group-layout-grid/slider:col-start-1 group-orientation-vertical/slider:group-layout-grid/slider:row-start-2","group-orientation-vertical/slider:group-layout-grid/slider:justify-self-end","group-orientation-horizontal/slider:group-layout-grid/slider:col-start-3","group-orientation-horizontal/slider:group-layout-grid/slider:row-start-3","group-orientation-horizontal/slider:group-layout-grid/slider:justify-self-end"]}});export{t as SliderStyles};//# sourceMappingURL=styles.js.map
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/slider/styles.ts"],"names":["SliderStyles","tv"],"mappings":"yCAcaA,CAAAA,CAAeC,EAAAA,CAAG,CAC7B,KAAA,CAAO,CACL,MAAA,CAAQ,CACN,0BACA,kBAAA,CACA,mBAAA,CACA,yDACA,6HAAA,CACA,4CAAA,CACA,8BACA,4HAAA,CACA,6FACF,CAAA,CACA,KAAA,CAAO,CACL,yBAAA,CACA,sCAAA,CACA,uEACF,CAAA,CACA,MAAA,CAAQ,CACN,oBAAA,CACA,2EAAA,CACA,+CACA,oDAAA,CACA,wEACF,EACA,KAAA,CACE,yGAAA,CACF,MAAO,CACL,yBAAA,CACA,0FACA,kJAAA,CACA,qFAAA,CACA,qNACF,CAAA,CACA,gBAAiB,CACf,wCAAA,CACA,wLACA,gLACF,CAAA,CACA,WAAY,CACV,8CAAA,CACA,iSACA,uRACF,CAAA,CACA,MAAO,CACL,4EAAA,CACA,0BACA,iBAAA,CACA,6CAAA,CACA,4CACF,CAAA,CACA,QAAA,CAAU,CACR,6DAAA,CACA,8FACA,0EAAA,CACA,0EAAA,CACA,8CACA,qEAAA,CACA,6EAAA,CACA,2CACF,CAAA,CACA,QAAA,CAAU,CACR,qEAAA,CACA,2CAAA,CACA,gJACA,6EAAA,CACA,0EAAA,CACA,2EACA,+EACF,CACF,CACF,CAAC","file":"styles.js","sourcesContent":["import { tv } from 'tailwind-variants';\n\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport const SliderStyles = tv({\n slots: {\n slider: [\n 'group/slider flex gap-s',\n 'layout-grid:grid',\n 'layout-stack:flex',\n 'orientation-vertical:h-full orientation-vertical:w-fit',\n 'orientation-vertical:layout-grid:grid-cols-[auto_auto_auto] orientation-vertical:layout-grid:grid-rows-[auto_auto_1fr_auto]',\n 'orientation-vertical:layout-stack:flex-col',\n 'orientation-horizontal:h-xl',\n 'orientation-horizontal:layout-grid:grid-cols-[auto_1fr_auto] orientation-horizontal:layout-grid:grid-rows-[auto_auto_auto]',\n 'orientation-horizontal:layout-stack:w-full orientation-horizontal:layout-stack:items-center',\n ],\n label: [\n 'fg-primary-bold order-1',\n 'group-layout-grid/slider:col-start-1',\n 'group-orientation-vertical/slider:group-layout-grid/slider:col-span-2',\n ],\n inputs: [\n 'order-5 flex gap-s',\n 'group-layout-grid/slider:col-start-3 group-layout-grid/slider:row-start-1',\n 'group-orientation-horizontal/slider:flex-row',\n 'group-orientation-vertical/slider:flex-col-reverse',\n 'group-orientation-vertical/slider:group-layout-grid/slider:row-start-4',\n ],\n input:\n 'fg-primary-bold w-[50px] rounded-medium px-s py-xs font-display text-body-m outline outline-interactive',\n track: [\n 'relative order-3 h-full',\n 'group-orientation-horizontal/slider:h-[20px] group-orientation-horizontal/slider:w-full',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:col-span-3 group-orientation-horizontal/slider:group-layout-grid/slider:row-start-2',\n 'group-orientation-vertical/slider:h-full group-orientation-vertical/slider:w-[20px]',\n 'group-orientation-vertical/slider:group-layout-grid/slider:col-start-2 group-orientation-vertical/slider:group-layout-grid/slider:row-span-3 group-orientation-vertical/slider:group-layout-grid/slider:row-start-2',\n ],\n trackBackground: [\n 'absolute rounded-full bg-surface-muted',\n 'group-orientation-horizontal/slider:-translate-y-1/2 group-orientation-horizontal/slider:top-1/2 group-orientation-horizontal/slider:h-xxs group-orientation-horizontal/slider:w-full',\n 'group-orientation-vertical/slider:-translate-x-1/2 group-orientation-vertical/slider:left-1/2 group-orientation-vertical/slider:h-full group-orientation-vertical/slider:w-xxs',\n ],\n trackValue: [\n 'absolute rounded-full bg-accent-primary-bold',\n 'group-orientation-horizontal/slider:-translate-y-1/2 group-orientation-horizontal/slider:top-1/2 group-orientation-horizontal/slider:right-[calc(100%-attr(data-end_%)*100)] group-orientation-horizontal/slider:left-[calc(attr(data-start_%)*100)] group-orientation-horizontal/slider:h-xxs',\n 'group-orientation-vertical/slider:-translate-x-1/2 group-orientation-vertical/slider:top-[calc(100%-attr(data-end_%)*100)] group-orientation-vertical/slider:bottom-[calc(attr(data-start_%)*100)] group-orientation-vertical/slider:left-1/2 group-orientation-vertical/slider:w-xxs',\n ],\n thumb: [\n 'h-m w-m rounded-full bg-accent-primary-bold outline-accent-primary-bold/40',\n 'focus-visible:outline-4',\n 'hover:outline-4',\n 'group-orientation-horizontal/slider:top-1/2',\n 'group-orientation-vertical/slider:left-1/2',\n ],\n minValue: [\n 'fg-primary-muted flex items-center font-display text-body-m',\n 'group-orientation-vertical/slider:col-start-1 group-orientation-vertical/slider:row-start-4',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:col-start-1',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:row-start-3',\n 'group-orientation-horizontal/slider:order-2',\n 'group-orientation-vertical/slider:group-layout-grid/slider:self-end',\n 'group-orientation-vertical/slider:group-layout-grid/slider:justify-self-end',\n 'group-orientation-vertical/slider:order-4',\n ],\n maxValue: [\n 'fg-primary-muted order-4 flex items-center font-display text-body-m',\n 'group-orientation-vertical/slider:order-2',\n 'group-orientation-vertical/slider:group-layout-grid/slider:col-start-1 group-orientation-vertical/slider:group-layout-grid/slider:row-start-2',\n 'group-orientation-vertical/slider:group-layout-grid/slider:justify-self-end',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:col-start-3',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:row-start-3',\n 'group-orientation-horizontal/slider:group-layout-grid/slider:justify-self-end',\n ],\n },\n});\n"]}
@@ -0,0 +1,22 @@
1
+ import { SliderProps as SliderProps$1, LabelProps, InputProps, SliderTrackProps, SliderThumbProps } from 'react-aria-components';
2
+
3
+ type SliderProps = Omit<SliderProps$1, 'children' | 'className'> & {
4
+ classNames?: {
5
+ slider?: SliderProps$1['className'];
6
+ label?: LabelProps['className'];
7
+ inputs?: string;
8
+ input?: InputProps['className'];
9
+ track?: SliderTrackProps['className'];
10
+ trackBackground?: string;
11
+ trackValue?: string;
12
+ thumb?: SliderThumbProps['className'];
13
+ minValue?: string;
14
+ maxValue?: string;
15
+ };
16
+ label: string;
17
+ layout?: 'grid' | 'stack';
18
+ showInput?: boolean;
19
+ showLabel?: boolean;
20
+ };
21
+
22
+ export type { SliderProps };
@@ -0,0 +1,2 @@
1
+ //# sourceMappingURL=types.js.map
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}