@accelint/design-toolkit 4.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 (237) 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.js +1 -1
  5. package/dist/components/accordion/styles.js.map +1 -1
  6. package/dist/components/accordion/types.d.ts +1 -1
  7. package/dist/components/action-bar/index.d.ts +10 -0
  8. package/dist/components/action-bar/index.js +2 -0
  9. package/dist/components/action-bar/index.js.map +1 -0
  10. package/dist/components/action-bar/styles.d.ts +5 -0
  11. package/dist/components/action-bar/styles.js +2 -0
  12. package/dist/components/action-bar/styles.js.map +1 -0
  13. package/dist/components/action-bar/types.d.ts +5 -0
  14. package/dist/components/action-bar/types.js +2 -0
  15. package/dist/components/action-bar/types.js.map +1 -0
  16. package/dist/components/avatar/index.d.ts +1 -1
  17. package/dist/components/avatar/index.js +1 -1
  18. package/dist/components/avatar/index.js.map +1 -1
  19. package/dist/components/avatar/styles.js +1 -1
  20. package/dist/components/avatar/styles.js.map +1 -1
  21. package/dist/components/avatar/types.d.ts +1 -1
  22. package/dist/components/badge/index.d.ts +1 -1
  23. package/dist/components/badge/index.js.map +1 -1
  24. package/dist/components/badge/styles.js +1 -1
  25. package/dist/components/badge/styles.js.map +1 -1
  26. package/dist/components/button/index.d.ts +1 -1
  27. package/dist/components/button/index.js.map +1 -1
  28. package/dist/components/button/styles.js +1 -1
  29. package/dist/components/button/styles.js.map +1 -1
  30. package/dist/components/button/types.d.ts +1 -1
  31. package/dist/components/checkbox/styles.js +1 -1
  32. package/dist/components/checkbox/styles.js.map +1 -1
  33. package/dist/components/chip/index.d.ts +1 -1
  34. package/dist/components/chip/index.js.map +1 -1
  35. package/dist/components/chip/styles.js +1 -1
  36. package/dist/components/chip/styles.js.map +1 -1
  37. package/dist/components/classification-badge/index.d.ts +1 -1
  38. package/dist/components/classification-badge/index.js.map +1 -1
  39. package/dist/components/classification-badge/styles.js +1 -1
  40. package/dist/components/classification-badge/styles.js.map +1 -1
  41. package/dist/components/classification-banner/index.d.ts +1 -1
  42. package/dist/components/classification-banner/index.js.map +1 -1
  43. package/dist/components/classification-banner/styles.js +1 -1
  44. package/dist/components/classification-banner/styles.js.map +1 -1
  45. package/dist/components/color-picker/styles.js +1 -1
  46. package/dist/components/color-picker/styles.js.map +1 -1
  47. package/dist/components/combobox-field/index.d.ts +1 -1
  48. package/dist/components/combobox-field/index.js.map +1 -1
  49. package/dist/components/combobox-field/styles.js +1 -1
  50. package/dist/components/combobox-field/styles.js.map +1 -1
  51. package/dist/components/combobox-field/types.d.ts +1 -1
  52. package/dist/components/date-field/index.js.map +1 -1
  53. package/dist/components/date-field/styles.js +1 -1
  54. package/dist/components/date-field/styles.js.map +1 -1
  55. package/dist/components/details-list/index.d.ts +1 -1
  56. package/dist/components/details-list/index.js +1 -1
  57. package/dist/components/details-list/index.js.map +1 -1
  58. package/dist/components/details-list/styles.js +1 -1
  59. package/dist/components/details-list/styles.js.map +1 -1
  60. package/dist/components/dialog/index.js +1 -1
  61. package/dist/components/dialog/index.js.map +1 -1
  62. package/dist/components/dialog/styles.js +1 -1
  63. package/dist/components/dialog/styles.js.map +1 -1
  64. package/dist/components/drawer/index.d.ts +1 -1
  65. package/dist/components/drawer/index.js +1 -1
  66. package/dist/components/drawer/index.js.map +1 -1
  67. package/dist/components/drawer/styles.d.ts +2 -2
  68. package/dist/components/drawer/styles.js +1 -1
  69. package/dist/components/drawer/styles.js.map +1 -1
  70. package/dist/components/drawer/types.d.ts +1 -1
  71. package/dist/components/hero/index.js +1 -1
  72. package/dist/components/hero/index.js.map +1 -1
  73. package/dist/components/hero/styles.js +1 -1
  74. package/dist/components/hero/styles.js.map +1 -1
  75. package/dist/components/hotkey/index.d.ts +1 -1
  76. package/dist/components/hotkey/index.js.map +1 -1
  77. package/dist/components/hotkey/styles.js +1 -1
  78. package/dist/components/hotkey/styles.js.map +1 -1
  79. package/dist/components/icon/index.d.ts +1 -1
  80. package/dist/components/icon/index.js.map +1 -1
  81. package/dist/components/input/index.d.ts +1 -1
  82. package/dist/components/input/index.js.map +1 -1
  83. package/dist/components/input/styles.js +1 -1
  84. package/dist/components/input/styles.js.map +1 -1
  85. package/dist/components/label/index.d.ts +1 -1
  86. package/dist/components/label/index.js.map +1 -1
  87. package/dist/components/label/styles.js +1 -1
  88. package/dist/components/label/styles.js.map +1 -1
  89. package/dist/components/lines/index.d.ts +9 -0
  90. package/dist/components/lines/index.js +2 -0
  91. package/dist/components/lines/index.js.map +1 -0
  92. package/dist/components/lines/styles.d.ts +32 -0
  93. package/dist/components/lines/styles.js +2 -0
  94. package/dist/components/lines/styles.js.map +1 -0
  95. package/dist/components/lines/types.d.ts +10 -0
  96. package/dist/components/lines/types.js +2 -0
  97. package/dist/components/lines/types.js.map +1 -0
  98. package/dist/components/link/index.d.ts +17 -0
  99. package/dist/components/link/index.js +2 -0
  100. package/dist/components/link/index.js.map +1 -0
  101. package/dist/components/link/styles.d.ts +5 -0
  102. package/dist/components/link/styles.js +2 -0
  103. package/dist/components/link/styles.js.map +1 -0
  104. package/dist/components/link/types.d.ts +9 -0
  105. package/dist/components/link/types.js +2 -0
  106. package/dist/components/link/types.js.map +1 -0
  107. package/dist/components/menu/index.js +1 -1
  108. package/dist/components/menu/index.js.map +1 -1
  109. package/dist/components/menu/styles.js +1 -1
  110. package/dist/components/menu/styles.js.map +1 -1
  111. package/dist/components/options/index.js.map +1 -1
  112. package/dist/components/options/styles.js +1 -1
  113. package/dist/components/options/styles.js.map +1 -1
  114. package/dist/components/popover/index.js.map +1 -1
  115. package/dist/components/popover/styles.js +1 -1
  116. package/dist/components/popover/styles.js.map +1 -1
  117. package/dist/components/query-builder/action-element.js.map +1 -1
  118. package/dist/components/query-builder/group.js +1 -1
  119. package/dist/components/query-builder/group.js.map +1 -1
  120. package/dist/components/query-builder/index.js +1 -1
  121. package/dist/components/query-builder/index.js.map +1 -1
  122. package/dist/components/query-builder/value-editor.js.map +1 -1
  123. package/dist/components/query-builder/value-selector.js.map +1 -1
  124. package/dist/components/radio/styles.js +1 -1
  125. package/dist/components/radio/styles.js.map +1 -1
  126. package/dist/components/search-field/index.d.ts +3 -3
  127. package/dist/components/search-field/index.js.map +1 -1
  128. package/dist/components/search-field/styles.js +1 -1
  129. package/dist/components/search-field/styles.js.map +1 -1
  130. package/dist/components/select-field/index.d.ts +1 -1
  131. package/dist/components/select-field/index.js +1 -1
  132. package/dist/components/select-field/index.js.map +1 -1
  133. package/dist/components/select-field/styles.js +1 -1
  134. package/dist/components/select-field/styles.js.map +1 -1
  135. package/dist/components/select-field/types.d.ts +1 -1
  136. package/dist/components/sidenav/events.d.ts +8 -0
  137. package/dist/components/sidenav/events.js +2 -0
  138. package/dist/components/sidenav/events.js.map +1 -0
  139. package/dist/components/sidenav/index.d.ts +51 -0
  140. package/dist/components/sidenav/index.js +2 -0
  141. package/dist/components/sidenav/index.js.map +1 -0
  142. package/dist/components/sidenav/styles.d.ts +114 -0
  143. package/dist/components/sidenav/styles.js +2 -0
  144. package/dist/components/sidenav/styles.js.map +1 -0
  145. package/dist/components/sidenav/types.d.ts +38 -0
  146. package/dist/components/sidenav/types.js +2 -0
  147. package/dist/components/sidenav/types.js.map +1 -0
  148. package/dist/components/skeleton/styles.d.ts +2 -2
  149. package/dist/components/skeleton/styles.js +1 -1
  150. package/dist/components/skeleton/styles.js.map +1 -1
  151. package/dist/components/slider/index.js.map +1 -1
  152. package/dist/components/slider/styles.js +1 -1
  153. package/dist/components/slider/styles.js.map +1 -1
  154. package/dist/components/switch/index.d.ts +1 -1
  155. package/dist/components/switch/index.js.map +1 -1
  156. package/dist/components/switch/styles.js +1 -1
  157. package/dist/components/switch/styles.js.map +1 -1
  158. package/dist/components/tabs/index.d.ts +37 -36
  159. package/dist/components/tabs/index.js +1 -1
  160. package/dist/components/tabs/index.js.map +1 -1
  161. package/dist/components/tabs/styles.d.ts +48 -0
  162. package/dist/components/tabs/styles.js +2 -0
  163. package/dist/components/tabs/styles.js.map +1 -0
  164. package/dist/components/tabs/types.d.ts +6 -0
  165. package/dist/components/tabs/types.js +2 -0
  166. package/dist/components/tabs/types.js.map +1 -0
  167. package/dist/components/text-area-field/index.d.ts +1 -1
  168. package/dist/components/text-area-field/index.js.map +1 -1
  169. package/dist/components/text-area-field/styles.js +1 -1
  170. package/dist/components/text-area-field/styles.js.map +1 -1
  171. package/dist/components/text-field/index.js.map +1 -1
  172. package/dist/components/text-field/styles.js +1 -1
  173. package/dist/components/text-field/styles.js.map +1 -1
  174. package/dist/components/tooltip/index.d.ts +1 -1
  175. package/dist/components/tooltip/index.js +1 -1
  176. package/dist/components/tooltip/index.js.map +1 -1
  177. package/dist/components/tooltip/styles.d.ts +1 -1
  178. package/dist/components/tooltip/styles.js +1 -1
  179. package/dist/components/tooltip/styles.js.map +1 -1
  180. package/dist/components/tooltip/types.d.ts +3 -1
  181. package/dist/components/tree/index.d.ts +51 -0
  182. package/dist/components/tree/index.js +2 -0
  183. package/dist/components/tree/index.js.map +1 -0
  184. package/dist/components/tree/styles.d.ts +128 -0
  185. package/dist/components/tree/styles.js +2 -0
  186. package/dist/components/tree/styles.js.map +1 -0
  187. package/dist/components/tree/types.d.ts +41 -0
  188. package/dist/components/tree/types.js +2 -0
  189. package/dist/components/tree/types.js.map +1 -0
  190. package/dist/components/view-stack/index.js.map +1 -1
  191. package/dist/foundation/token-data.d.ts +17 -0
  192. package/dist/foundation/token-data.js +2 -0
  193. package/dist/foundation/token-data.js.map +1 -0
  194. package/dist/hooks/use-tree/actions/cache.d.ts +78 -0
  195. package/dist/hooks/use-tree/actions/cache.js +2 -0
  196. package/dist/hooks/use-tree/actions/cache.js.map +1 -0
  197. package/dist/hooks/use-tree/actions/index.d.ts +38 -0
  198. package/dist/hooks/use-tree/actions/index.js +2 -0
  199. package/dist/hooks/use-tree/actions/index.js.map +1 -0
  200. package/dist/hooks/use-tree/state/index.d.ts +8 -0
  201. package/dist/hooks/use-tree/state/index.js +2 -0
  202. package/dist/hooks/use-tree/state/index.js.map +1 -0
  203. package/dist/hooks/use-tree/state/utils.d.ts +7 -0
  204. package/dist/hooks/use-tree/state/utils.js +2 -0
  205. package/dist/hooks/use-tree/state/utils.js.map +1 -0
  206. package/dist/hooks/use-tree/types.d.ts +171 -0
  207. package/dist/hooks/use-tree/types.js +2 -0
  208. package/dist/hooks/use-tree/types.js.map +1 -0
  209. package/dist/icons/catalog.js +1 -1
  210. package/dist/icons/catalog.js.map +1 -1
  211. package/dist/index.css +9 -15
  212. package/dist/index.d.ts +26 -3
  213. package/dist/index.js +1 -1
  214. package/dist/lib/react.d.ts +22 -8
  215. package/dist/lib/react.js +8 -4
  216. package/dist/lib/react.js.map +1 -1
  217. package/dist/lib/utils.d.ts +2 -2
  218. package/dist/lib/utils.js +1 -1
  219. package/dist/lib/utils.js.map +1 -1
  220. package/dist/metafile-esm.json +1 -1
  221. package/dist/providers/theme-provider.d.ts +22 -0
  222. package/dist/providers/theme-provider.js +2 -0
  223. package/dist/providers/theme-provider.js.map +1 -0
  224. package/dist/styles.css +1606 -904
  225. package/dist/tokens/themes.css +729 -53
  226. package/dist/tokens/tokens.css +121 -65
  227. package/dist/tokens/tokens.d.ts +449 -1
  228. package/dist/tokens/tokens.js +2 -0
  229. package/dist/tokens/tokens.js.map +1 -0
  230. package/dist/tokens/types.d.ts +299 -0
  231. package/dist/tokens/types.js +2 -0
  232. package/dist/tokens/types.js.map +1 -0
  233. package/dist/variants/variants.css +6 -1
  234. package/package.json +10 -6
  235. package/dist/tokens/index.d.ts +0 -123
  236. package/dist/tokens/index.js +0 -2
  237. package/dist/tokens/index.js.map +0 -1
@@ -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>>;
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 +1 @@
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":"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","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 Input,\n Label,\n SliderThumb,\n Text,\n composeRenderProps,\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"]}
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":"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","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"]}
@@ -1,2 +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:["order-1 text-default-light","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:"w-[50px] rounded-medium border border-interactive px-s py-xs font-display text-body-m text-default-light",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-default-light/40","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-highlight","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-highlight-bold outline-highlight-bold/40","focus-visible:outline-4","hover:outline-4","group-orientation-horizontal/slider:top-1/2","group-orientation-vertical/slider:left-1/2"],minValue:["flex items-center font-display text-body-m text-default-dark","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:["order-4 flex items-center font-display text-body-m text-default-dark","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
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
2
  //# sourceMappingURL=styles.js.map
@@ -1 +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,4BAAA,CACA,sCAAA,CACA,uEACF,CAAA,CACA,MAAA,CAAQ,CACN,oBAAA,CACA,2EAAA,CACA,+CACA,oDAAA,CACA,wEACF,EACA,KAAA,CACE,0GAAA,CACF,MAAO,CACL,yBAAA,CACA,0FACA,kJAAA,CACA,qFAAA,CACA,qNACF,CAAA,CACA,gBAAiB,CACf,2CAAA,CACA,wLACA,gLACF,CAAA,CACA,WAAY,CACV,oCAAA,CACA,iSACA,uRACF,CAAA,CACA,MAAO,CACL,kEAAA,CACA,0BACA,iBAAA,CACA,6CAAA,CACA,4CACF,CAAA,CACA,QAAA,CAAU,CACR,8DAAA,CACA,8FACA,0EAAA,CACA,0EAAA,CACA,8CACA,qEAAA,CACA,6EAAA,CACA,2CACF,CAAA,CACA,QAAA,CAAU,CACR,sEAAA,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 'order-1 text-default-light',\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 'w-[50px] rounded-medium border border-interactive px-s py-xs font-display text-body-m text-default-light',\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-default-light/40',\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-highlight',\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-highlight-bold outline-highlight-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 'flex items-center font-display text-body-m text-default-dark',\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 'order-4 flex items-center font-display text-body-m text-default-dark',\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"]}
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"]}
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ProviderProps } from '../../lib/types.js';
4
3
  import { ContextValue } from 'react-aria-components';
4
+ import { ProviderProps } from '../../lib/types.js';
5
5
  import { SwitchProps } from './types.js';
6
6
 
7
7
  declare const SwitchContext: react.Context<ContextValue<SwitchProps, HTMLLabelElement>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/switch/index.tsx"],"names":["SwitchStyles","SwitchContext","createContext","h","props","r","SwitchProvider","ref","useContextProps","rest","w","classNames","switchClassNames","children","jsxs","Fragment","y","v","jsx","Switch"],"mappings":"6NA0BQ,MAAA,CAAA,MAA0B,CAAA,CAAA,CAAA,OAAS,CAAA,CAAA,CAAA,KAAUA,CAAAA,CAAa,EAErDC,YAAAA,EACXC,CAA2D,CAAA,CAAAC,aAAA,CAAI,eAEvC,CAAA,CAAA,CAAA,UAAaC,CAAM,GAC3C,CAAA,CAAA,CAAA,CAAA,OACiBC,GAAA,CAAA,CAAA,CAAA,QAAS,CAAA,CAAA,KAAe,CAAA,CAAA,CAAA,QAE3C,CACAC,EAAe,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,iBAsCtB,CAAA,SAAkB,CAAA,CAAA,CAAAC,GAAK,CAAA,CAAGH,CAAM,GACrC,CAACA,EAAOG,CAAG,CAAA,CAAIC,EAAgBJ,CAAAA,CAAOG,eAAAA,CAAAA,CAAO,CAAA,CAAA,EAAA,IAE7C,CAAA,CAAA,CAAA,CAAA,KAAQ,CAAA,qBAAsB,CAAA,CAAA,CAAA,aAAgB,CAAA,CAAA,CAAA,KAAUE,CAAK,GAAIL,CAEjE,CAAA,CAAA,CAAA,CAAA,OACGC,GACE,CAAAK,MAAA,CAAGD,CAAAA,KACCF,GACL,CAAA,CAAA,CAAA,SAA8BI,CAAAA,kBAAY,UACxCC,CAAAA,CAAiB,EAAE,CAAA,CAAA,CAAA,SAAW,CAAA,CAAA,CAAA,aAChC,EAEC,CAAA,CAAA,CAAA,CAAA,QAAmBC,CAAWA,kBAAAA,CAAAA,CAC7BC,EAAAC,EAAAC,IACE,CAAAC,QAAA,CAAA,CAAA,QAAC,YAAK,CAAA,CAAA,SAAqB,CAAA,CAAA,CAAA,CAAA,SAAuB,CAAA,CAAA,EAAA,OAAY,CAC7DJ,GACCK,CAAAA,CAAC,EAAAb,GAAA,CAAA,MAAK,CAAA,CAAA,SAAmB,CAAA,CAAA,CAAA,CAAA,SAAuB,CAAA,CAAA,EAAA,KAC7C,CAAA,CAAA,CAAA,QACH,CAAA,CAEJ,CACD,EACH,CAEJ,CACAc,EAAO,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,QACd,CAAA,CAAA,CAAA,QAAWb,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 type { ProviderProps } from '@/lib/types';\nimport { createContext } from 'react';\nimport {\n Switch as AriaSwitch,\n type ContextValue,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { SwitchStyles } from './styles';\nimport type { SwitchProps } from './types';\n\n// \"switch\" is a reserved term in JS\nconst { switch: switchClassNames, control, label } = SwitchStyles();\n\nexport const SwitchContext =\n createContext<ContextValue<SwitchProps, HTMLLabelElement>>(null);\n\nfunction SwitchProvider({ children, ...props }: ProviderProps<SwitchProps>) {\n return (\n <SwitchContext.Provider value={props}>{children}</SwitchContext.Provider>\n );\n}\nSwitchProvider.displayName = 'Switch.Provider';\n\n/**\n * Switch - A toggle control for binary state changes\n *\n * Provides an accessible toggle switch component for enabling/disabling features\n * or settings. Offers clear visual feedback for on/off states with smooth transitions\n * and proper keyboard and screen reader support.\n *\n * @example\n * // Basic switch\n * <Switch>Enable notifications</Switch>\n *\n * @example\n * // Controlled switch\n * <Switch\n * isSelected={isEnabled}\n * onChange={setIsEnabled}\n * >\n * Dark mode\n * </Switch>\n *\n * @example\n * // Switch with default state\n * <Switch defaultSelected>\n * Auto-save documents\n * </Switch>\n *\n * @example\n * // Disabled switch\n * <Switch isDisabled>\n * Premium feature (upgrade required)\n * </Switch>\n *\n * @example\n * // Switch without label (icon-only)\n * <Switch aria-label=\"Toggle sidebar\" />\n */\nexport function Switch({ ref, ...props }: SwitchProps) {\n [props, ref] = useContextProps(props, ref ?? null, SwitchContext);\n\n const { children, classNames, labelPosition = 'end', ...rest } = props;\n\n return (\n <AriaSwitch\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.switch, (className) =>\n switchClassNames({ className, labelPosition }),\n )}\n >\n {composeRenderProps(children, (children) => (\n <>\n <span className={control({ className: classNames?.control })} />\n {children && (\n <span className={label({ className: classNames?.label })}>\n {children}\n </span>\n )}\n </>\n ))}\n </AriaSwitch>\n );\n}\nSwitch.displayName = 'Switch';\nSwitch.Provider = SwitchProvider;\n"]}
1
+ {"version":3,"sources":["../../../src/components/switch/index.tsx"],"names":["SwitchStyles","SwitchContext","createContext","h","props","r","SwitchProvider","ref","useContextProps","rest","w","classNames","switchClassNames","children","jsxs","Fragment","y","v","jsx","Switch"],"mappings":"6NA0BQ,MAAA,CAAA,MAA0B,CAAA,CAAA,CAAA,OAAS,CAAA,CAAA,CAAA,KAAUA,CAAAA,CAAa,EAErDC,YAAAA,EACXC,CAA2D,CAAA,CAAAC,aAAA,CAAI,eAEvC,CAAA,CAAA,CAAA,UAAaC,CAAM,GAC3C,CAAA,CAAA,CAAA,CAAA,OACiBC,GAAA,CAAA,CAAA,CAAA,QAAS,CAAA,CAAA,KAAe,CAAA,CAAA,CAAA,QAE3C,CACAC,EAAe,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,iBAsCtB,CAAA,SAAkB,CAAA,CAAA,CAAAC,GAAK,CAAA,CAAGH,CAAM,GACrC,CAACA,EAAOG,CAAG,CAAA,CAAIC,EAAgBJ,CAAAA,CAAOG,eAAAA,CAAAA,CAAO,CAAA,CAAA,EAAA,IAE7C,CAAA,CAAA,CAAA,CAAA,KAAQ,CAAA,qBAAsB,CAAA,CAAA,CAAA,aAAgB,CAAA,CAAA,CAAA,KAAUE,CAAK,GAAIL,CAEjE,CAAA,CAAA,CAAA,CAAA,OACGC,GACE,CAAAK,MAAA,CAAGD,CAAAA,KACCF,GACL,CAAA,CAAA,CAAA,SAA8BI,CAAAA,kBAAY,UACxCC,CAAAA,CAAiB,EAAE,CAAA,CAAA,CAAA,SAAW,CAAA,CAAA,CAAA,aAChC,EAEC,CAAA,CAAA,CAAA,CAAA,QAAmBC,CAAWA,kBAAAA,CAAAA,CAC7BC,EAAAC,EAAAC,IACE,CAAAC,QAAA,CAAA,CAAA,QAAC,YAAK,CAAA,CAAA,SAAqB,CAAA,CAAA,CAAA,CAAA,SAAuB,CAAA,CAAA,EAAA,OAAY,CAC7DJ,GACCK,CAAAA,CAAC,EAAAb,GAAA,CAAA,MAAK,CAAA,CAAA,SAAmB,CAAA,CAAA,CAAA,CAAA,SAAuB,CAAA,CAAA,EAAA,KAC7C,CAAA,CAAA,CAAA,QACH,CAAA,CAEJ,CACD,EACH,CAEJ,CACAc,EAAO,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,QACd,CAAA,CAAA,CAAA,QAAWb,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 { createContext } from 'react';\nimport {\n Switch as AriaSwitch,\n type ContextValue,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { SwitchStyles } from './styles';\nimport type { ProviderProps } from '@/lib/types';\nimport type { SwitchProps } from './types';\n\n// \"switch\" is a reserved term in JS\nconst { switch: switchClassNames, control, label } = SwitchStyles();\n\nexport const SwitchContext =\n createContext<ContextValue<SwitchProps, HTMLLabelElement>>(null);\n\nfunction SwitchProvider({ children, ...props }: ProviderProps<SwitchProps>) {\n return (\n <SwitchContext.Provider value={props}>{children}</SwitchContext.Provider>\n );\n}\nSwitchProvider.displayName = 'Switch.Provider';\n\n/**\n * Switch - A toggle control for binary state changes\n *\n * Provides an accessible toggle switch component for enabling/disabling features\n * or settings. Offers clear visual feedback for on/off states with smooth transitions\n * and proper keyboard and screen reader support.\n *\n * @example\n * // Basic switch\n * <Switch>Enable notifications</Switch>\n *\n * @example\n * // Controlled switch\n * <Switch\n * isSelected={isEnabled}\n * onChange={setIsEnabled}\n * >\n * Dark mode\n * </Switch>\n *\n * @example\n * // Switch with default state\n * <Switch defaultSelected>\n * Auto-save documents\n * </Switch>\n *\n * @example\n * // Disabled switch\n * <Switch isDisabled>\n * Premium feature (upgrade required)\n * </Switch>\n *\n * @example\n * // Switch without label (icon-only)\n * <Switch aria-label=\"Toggle sidebar\" />\n */\nexport function Switch({ ref, ...props }: SwitchProps) {\n [props, ref] = useContextProps(props, ref ?? null, SwitchContext);\n\n const { children, classNames, labelPosition = 'end', ...rest } = props;\n\n return (\n <AriaSwitch\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.switch, (className) =>\n switchClassNames({ className, labelPosition }),\n )}\n >\n {composeRenderProps(children, (children) => (\n <>\n <span className={control({ className: classNames?.control })} />\n {children && (\n <span className={label({ className: classNames?.label })}>\n {children}\n </span>\n )}\n </>\n ))}\n </AriaSwitch>\n );\n}\nSwitch.displayName = 'Switch';\nSwitch.Provider = SwitchProvider;\n"]}
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';const i=tv({slots:{switch:"group/switch flex cursor-pointer items-center gap-s disabled:cursor-not-allowed",control:["flex rounded-round bg-transparent p-xxs outline outline-interactive before:mr-l before:block before:size-m before:rounded-full before:bg-default-dark","group-enabled/switch:group-focus-visible/switch:bg-interactive-hover-dark group-enabled/switch:group-focus-visible/switch:outline-interactive-hover group-enabled/switch:group-focus-visible/switch:before:bg-interactive-hover","group-enabled/switch:group-hover/switch:bg-interactive-hover-dark group-enabled/switch:group-hover/switch:outline-interactive-hover group-enabled/switch:group-hover/switch:before:bg-interactive-hover","group-enabled/switch:group-selected/switch:outline-highlight group-selected/switch:before:mr-0 group-selected/switch:before:ml-l group-enabled/switch:group-selected/switch:before:bg-highlight","group-enabled/switch:group-selected/switch:group-focus-visible/switch:bg-highlight-subtle group-enabled/switch:group-selected/switch:group-focus-visible/switch:outline-interactive-hover group-enabled/switch:group-selected/switch:group-focus-visible/switch:before:bg-highlight","group-enabled/switch:group-selected/switch:group-hover/switch:bg-highlight-subtle group-enabled/switch:group-selected/switch:group-hover/switch:outline-highlight group-enabled/switch:group-selected/switch:group-hover/switch:before:bg-highlight","group-disabled/switch:bg-interactive-disabled group-disabled/switch:outline-interactive-disabled group-disabled/switch:before:bg-disabled"],label:["text-body-s text-interactive-default","group-disabled/switch:text-interactive-disabled"]},variants:{labelPosition:{start:{switch:"flex-row-reverse"},end:{switch:"flex-row"}}}});export{i as SwitchStyles};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const t=tv({slots:{switch:"group/switch flex cursor-pointer items-center gap-s disabled:cursor-not-allowed",control:["flex rounded-round bg-transparent p-xxs outline outline-interactive before:mr-l before:block before:size-m before:rounded-full before:bg-info-bold","group-enabled/switch:group-focus-visible/switch:bg-interactive-muted-hover group-enabled/switch:group-focus-visible/switch:outline-interactive-hover group-enabled/switch:group-focus-visible/switch:before:bg-interactive-bold-hover","group-enabled/switch:group-hover/switch:bg-interactive-muted-hover group-enabled/switch:group-hover/switch:outline-interactive-hover group-enabled/switch:group-hover/switch:before:bg-interactive-bold-hover","group-enabled/switch:group-selected/switch:outline-accent-primary-bold group-selected/switch:before:mr-0 group-selected/switch:before:ml-l group-enabled/switch:group-selected/switch:before:bg-accent-primary-bold","group-enabled/switch:group-selected/switch:group-focus-visible/switch:bg-accent-primary-muted group-enabled/switch:group-selected/switch:group-focus-visible/switch:outline-interactive-hover group-enabled/switch:group-selected/switch:group-focus-visible/switch:before:bg-accent-primary-bold","group-enabled/switch:group-selected/switch:group-hover/switch:bg-accent-primary-muted group-enabled/switch:group-selected/switch:group-hover/switch:outline-accent-primary-bold group-enabled/switch:group-selected/switch:group-hover/switch:before:bg-accent-primary-bold","group-disabled/switch:bg-interactive-disabled group-disabled/switch:outline-interactive-disabled group-disabled/switch:before:bg-interactive-disabled"],label:["fg-primary-bold text-body-s","group-disabled/switch:fg-disabled"]},variants:{labelPosition:{start:{switch:"flex-row-reverse"},end:{switch:"flex-row"}}}});export{t as SwitchStyles};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/switch/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAA,CAAO,CACLA,SACE,CAAA,CAAA,MAAA,CAAA,iFAEA,CAAA,OAAA,CAAA,CAAA,uJACA,CAAA,2aAEA,CAAA,iMACA,CAAA,2gBAEA,CAAA,2IAGA,CAAA,CAAA,KAAA,CAAA,CAAA,0FAIM,CACR,QAAA,CAAA,CAAA,oBAEY,CAAA,CAAA,MAAA,CAAA,kBAGR,CAAA,CAAA,YACF,UAGL,CAAA,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 SwitchStyles = tv({\n slots: {\n switch:\n 'group/switch flex cursor-pointer items-center gap-s disabled:cursor-not-allowed',\n control: [\n 'flex rounded-round bg-transparent p-xxs outline outline-interactive before:mr-l before:block before:size-m before:rounded-full before:bg-default-dark',\n 'group-enabled/switch:group-focus-visible/switch:bg-interactive-hover-dark group-enabled/switch:group-focus-visible/switch:outline-interactive-hover group-enabled/switch:group-focus-visible/switch:before:bg-interactive-hover',\n 'group-enabled/switch:group-hover/switch:bg-interactive-hover-dark group-enabled/switch:group-hover/switch:outline-interactive-hover group-enabled/switch:group-hover/switch:before:bg-interactive-hover',\n 'group-enabled/switch:group-selected/switch:outline-highlight group-selected/switch:before:mr-0 group-selected/switch:before:ml-l group-enabled/switch:group-selected/switch:before:bg-highlight',\n 'group-enabled/switch:group-selected/switch:group-focus-visible/switch:bg-highlight-subtle group-enabled/switch:group-selected/switch:group-focus-visible/switch:outline-interactive-hover group-enabled/switch:group-selected/switch:group-focus-visible/switch:before:bg-highlight',\n 'group-enabled/switch:group-selected/switch:group-hover/switch:bg-highlight-subtle group-enabled/switch:group-selected/switch:group-hover/switch:outline-highlight group-enabled/switch:group-selected/switch:group-hover/switch:before:bg-highlight',\n 'group-disabled/switch:bg-interactive-disabled group-disabled/switch:outline-interactive-disabled group-disabled/switch:before:bg-disabled',\n ],\n label: [\n 'text-body-s text-interactive-default',\n 'group-disabled/switch:text-interactive-disabled',\n ],\n },\n variants: {\n labelPosition: {\n start: {\n switch: 'flex-row-reverse',\n },\n end: {\n switch: 'flex-row',\n },\n },\n },\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/switch/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAA,CAAO,CACLA,SACE,CAAA,CAAA,MAAA,CAAA,iFAEA,CAAA,OAAA,CAAA,CAAA,oJACA,CAAA,ubAEA,CAAA,qNACA,CAAA,ijBAEA,CAAA,uJAEM,CAAA,CAAA,KAAA,CAAA,CAAA,mEAEA,CACR,QAAA,CAAA,CAAA,oBAEY,CAAA,CAAA,MAAA,CAAA,kBAGR,CAAA,CAAA,YACF,UAGL,CAAA,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 SwitchStyles = tv({\n slots: {\n switch:\n 'group/switch flex cursor-pointer items-center gap-s disabled:cursor-not-allowed',\n control: [\n 'flex rounded-round bg-transparent p-xxs outline outline-interactive before:mr-l before:block before:size-m before:rounded-full before:bg-info-bold',\n 'group-enabled/switch:group-focus-visible/switch:bg-interactive-muted-hover group-enabled/switch:group-focus-visible/switch:outline-interactive-hover group-enabled/switch:group-focus-visible/switch:before:bg-interactive-bold-hover',\n 'group-enabled/switch:group-hover/switch:bg-interactive-muted-hover group-enabled/switch:group-hover/switch:outline-interactive-hover group-enabled/switch:group-hover/switch:before:bg-interactive-bold-hover',\n 'group-enabled/switch:group-selected/switch:outline-accent-primary-bold group-selected/switch:before:mr-0 group-selected/switch:before:ml-l group-enabled/switch:group-selected/switch:before:bg-accent-primary-bold',\n 'group-enabled/switch:group-selected/switch:group-focus-visible/switch:bg-accent-primary-muted group-enabled/switch:group-selected/switch:group-focus-visible/switch:outline-interactive-hover group-enabled/switch:group-selected/switch:group-focus-visible/switch:before:bg-accent-primary-bold',\n 'group-enabled/switch:group-selected/switch:group-hover/switch:bg-accent-primary-muted group-enabled/switch:group-selected/switch:group-hover/switch:outline-accent-primary-bold group-enabled/switch:group-selected/switch:group-hover/switch:before:bg-accent-primary-bold',\n 'group-disabled/switch:bg-interactive-disabled group-disabled/switch:outline-interactive-disabled group-disabled/switch:before:bg-interactive-disabled',\n ],\n label: ['fg-primary-bold text-body-s', 'group-disabled/switch:fg-disabled'],\n },\n variants: {\n labelPosition: {\n start: {\n switch: 'flex-row-reverse',\n },\n end: {\n switch: 'flex-row',\n },\n },\n },\n});\n"]}
@@ -1,7 +1,25 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { TabsProps as TabsProps$1, TabListProps as TabListProps$1, TabProps as TabProps$1, TabPanelProps as TabPanelProps$1 } from 'react-aria-components';
2
+ import * as react from 'react';
3
+ import { TabListProps, TabProps, TabPanelProps, ContextValue } from 'react-aria-components';
4
+ import { ProviderProps } from '../../lib/types.js';
5
+ import { TabsProps } from './types.js';
3
6
 
4
- interface TabsProps extends TabsProps$1 {
7
+ declare const TabsContext: react.Context<ContextValue<TabsProps, HTMLDivElement>>;
8
+ declare function TabsProvider({ children, ...props }: ProviderProps<TabsProps>): react_jsx_runtime.JSX.Element;
9
+ declare namespace TabsProvider {
10
+ var displayName: string;
11
+ }
12
+ declare function Tab({ children, className, ...rest }: TabProps): react_jsx_runtime.JSX.Element;
13
+ declare namespace Tab {
14
+ var displayName: string;
15
+ }
16
+ declare function TabList<T extends object>({ children, className, ...rest }: TabListProps<T>): react_jsx_runtime.JSX.Element;
17
+ declare namespace TabList {
18
+ var displayName: string;
19
+ }
20
+ declare function TabPanel({ children, className, ...rest }: TabPanelProps): react_jsx_runtime.JSX.Element;
21
+ declare namespace TabPanel {
22
+ var displayName: string;
5
23
  }
6
24
  /**
7
25
  * Tabs - A tab navigation component for organizing content into sections
@@ -14,9 +32,9 @@ interface TabsProps extends TabsProps$1 {
14
32
  * // Basic horizontal tabs
15
33
  * <Tabs>
16
34
  * <Tabs.List>
17
- * <Tabs.Tab id="overview">Overview</Tabs.Tab>
18
- * <Tabs.Tab id="details">Details</Tabs.Tab>
19
- * <Tabs.Tab id="settings">Settings</Tabs.Tab>
35
+ * <Tabs.List.Tab id="overview">Overview</Tabs.List.Tab>
36
+ * <Tabs.List.Tab id="details">Details</Tabs.List.Tab>
37
+ * <Tabs.List.Tab id="settings">Settings</Tabs.List.Tab>
20
38
  * </Tabs.List>
21
39
  * <Tabs.Panel id="overview">Overview content</Tabs.Panel>
22
40
  * <Tabs.Panel id="details">Details content</Tabs.Panel>
@@ -27,8 +45,8 @@ interface TabsProps extends TabsProps$1 {
27
45
  * // Vertical tabs
28
46
  * <Tabs orientation="vertical">
29
47
  * <Tabs.List>
30
- * <Tabs.Tab id="profile">Profile</Tabs.Tab>
31
- * <Tabs.Tab id="account">Account</Tabs.Tab>
48
+ * <Tabs.List.Tab id="profile">Profile</Tabs.List.Tab>
49
+ * <Tabs.List.Tab id="account">Account</Tabs.List.Tab>
32
50
  * </Tabs.List>
33
51
  * <Tabs.Panel id="profile">Profile settings</Tabs.Panel>
34
52
  * <Tabs.Panel id="account">Account settings</Tabs.Panel>
@@ -38,42 +56,25 @@ interface TabsProps extends TabsProps$1 {
38
56
  * // Icon tabs
39
57
  * <Tabs>
40
58
  * <Tabs.List variant="icons">
41
- * <Tabs.Tab id="home">
59
+ * <Tabs.List.Tab id="home">
42
60
  * <Icon><Home /></Icon>
43
- * </Tabs.Tab>
44
- * <Tabs.Tab id="search">
61
+ * </Tabs.List.Tab>
62
+ * <Tabs.List.Tab id="search">
45
63
  * <Icon><Search /></Icon>
46
- * </Tabs.Tab>
64
+ * </Tabs.List.Tab>
47
65
  * </Tabs.List>
48
66
  * <Tabs.Panel id="home">Home content</Tabs.Panel>
49
67
  * <Tabs.Panel id="search">Search content</Tabs.Panel>
50
68
  * </Tabs>
51
69
  */
52
- declare const Tabs: {
53
- ({ children, className, orientation, isDisabled, ...rest }: TabsProps): react_jsx_runtime.JSX.Element;
54
- displayName: string;
55
- List: {
56
- ({ children, className, variant, drawer, ...rest }: TabListProps): react_jsx_runtime.JSX.Element;
57
- displayName: string;
58
- };
59
- Tab: {
60
- ({ id, children, className, isDisabled, ...rest }: TabProps): react_jsx_runtime.JSX.Element;
61
- displayName: string;
70
+ declare function Tabs({ ref, ...props }: TabsProps): react_jsx_runtime.JSX.Element;
71
+ declare namespace Tabs {
72
+ var displayName: string;
73
+ var Provider: typeof TabsProvider;
74
+ var List: typeof TabList & {
75
+ Tab: typeof Tab;
62
76
  };
63
- Panel: {
64
- ({ id, children, className, ...rest }: TabPanelProps): react_jsx_runtime.JSX.Element;
65
- displayName: string;
66
- };
67
- };
68
- interface TabListProps extends TabListProps$1<object> {
69
- /** Whether the tabs are displaying iconography or text. */
70
- variant?: 'default' | 'icons';
71
- /** Whether the tabs are used as drawer controls. */
72
- drawer?: 'left' | 'right' | 'top' | 'bottom';
73
- }
74
- interface TabProps extends TabProps$1 {
75
- }
76
- interface TabPanelProps extends TabPanelProps$1 {
77
+ var Panel: typeof TabPanel;
77
78
  }
78
79
 
79
- export { type TabListProps, type TabPanelProps, type TabProps, Tabs, type TabsProps };
80
+ export { Tabs, TabsContext };
@@ -1,2 +1,2 @@
1
- import {jsx}from'react/jsx-runtime';import {containsExactChildren}from'./../../lib/react.js';import {cn}from'./../../lib/utils.js';import'client-only';import {cva}from'class-variance-authority';import {Tabs,TabList,Tab,TabPanel}from'react-aria-components';const s=({children:a,className:e,orientation:r="horizontal",isDisabled:t=false,...o})=>(containsExactChildren({children:a,componentName:s.displayName,restrictions:[[n,{min:1,max:1}]]}),jsx(Tabs,{orientation:r,isDisabled:t,className:cn("group flex w-content flex-row orientation-horizontal:flex-col",e),...o,children:a}));s.displayName="Tabs";const x=cva("flex orientation-horizontal:flex-row flex-col",{variants:{variant:{icons:"[&>*]:p-xs orientation-horizontal:[&>*]:pr-s orientation-horizontal:[&>*]:pl-s [&>*]:leading-[0]",default:"[&>*]:p-s [&>*]:text-header-m"},drawer:{left:"orientation-vertical:gap-xs rounded-r-large bg-surface-default p-s",right:"orientation-vertical:gap-xs rounded-l-large bg-surface-default p-s",top:"orientation-vertical:gap-xs rounded-b-large bg-surface-default p-s",bottom:"orientation-vertical:gap-xs rounded-t-large bg-surface-default p-s"}}}),n=({children:a,className:e,variant:r="default",drawer:t=void 0,...o})=>(containsExactChildren({children:a,componentName:n.displayName,restrictions:[[d,{min:1}]]}),jsx(TabList,{className:cn(x({variant:r,drawer:t}),e),...o,children:a}));n.displayName="Tabs.List",s.List=n;const z=cn("fg-default-dark cursor-pointer p-s outline-none","rounded-medium group-orientation-horizontal:rounded-small group-orientation-horizontal:rounded-b-none","group-orientation-horizontal:border-static-light group-orientation-horizontal:border-b","group-orientation-vertical:border group-orientation-vertical:border-transparent"),A=cva(z,{variants:{isSelected:{true:"fg-highlight bg-highlight-subtle group-orientation-horizontal:border-highlight"},isHovered:{true:"fg-default-light group-orientation-horizontal:border-interactive-hover"},isFocused:{true:"fg-default-light group-orientation-horizontal:border-interactive-hover"},isDisabled:{true:"fg-disabled cursor-not-allowed group-orientation-horizontal:border-interactive-disabled"}},compoundVariants:[{isSelected:true,isHovered:true,className:"fg-highlight group-orientation-horizontal:border-highlight"},{isSelected:true,isFocused:true,className:"fg-highlight group-orientation-horizontal:border-interactive-hover group-orientation-vertical:border-interactive-hover"},{isDisabled:true,isSelected:true,className:"fg-disabled bg-interactive-disabled group-orientation-horizontal:border-interactive-disabled"}]}),d=({id:a,children:e,className:r,isDisabled:t=false,...o})=>jsx(Tab,{id:a,className:({isSelected:c,isHovered:g,isFocused:h,isDisabled:f})=>cn(A({isSelected:c,isHovered:g,isFocused:h,isDisabled:f}),r),isDisabled:t,...o,children:e});d.displayName="Tabs.Tab",s.Tab=d;const u=({id:a,children:e,className:r,...t})=>jsx(TabPanel,{id:a,className:cn("fg-default-light p-s group-orientation-vertical:pt-0 group-orientation-horizontal:pl-0",r),...t,children:e});u.displayName="Tabs.Panel",s.Panel=u;export{s as Tabs};//# sourceMappingURL=index.js.map
1
+ import {jsx}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {Tab,composeRenderProps,useContextProps,Tabs,TabPanel,TabList}from'react-aria-components';import {containsExactChildren}from'./../../lib/react.js';import {TabStyles}from'./styles.js';const {tabs:v,list:A,tab:C,panel:E}=TabStyles(),l=createContext(null);function m({children:a,...s}){return jsx(l.Provider,{value:s,children:a})}m.displayName="Tabs.Provider";function b({children:a,className:s,...e}){return jsx(Tab,{...e,className:composeRenderProps(s,t=>C({className:t})),children:a})}b.displayName="Tabs.List.Tab";function n({children:a,className:s,...e}){return containsExactChildren({children:a,componentName:n.displayName,restrictions:[[b,{min:1}]]}),jsx(TabList,{...e,className:composeRenderProps(s,t=>A({className:t})),children:a})}n.displayName="Tabs.List";function T({children:a,className:s,...e}){return jsx(TabPanel,{...e,className:composeRenderProps(s,t=>E({className:t})),children:a})}T.displayName="Tabs.Panel";function r({ref:a,...s}){[s,a]=useContextProps(s,a??null,l);const{children:e,className:t,...P}=s;return containsExactChildren({children:e,componentName:r.displayName,restrictions:[[n,{min:1,max:1}],[T,{min:1}]]}),jsx(Tabs,{...P,ref:a,className:composeRenderProps(t,c=>v({className:c})),children:e})}r.displayName="Tabs",r.Provider=m,r.List=n,r.List.Tab=b,r.Panel=T;export{r as Tabs,l as TabsContext};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/tabs/index.tsx"],"names":["rest","p","jsx","AriaTabs","orientation","l","v","i","Tabs","b","variant","drawer","containsExactChildren","AriaTabList","cn","tabListStyles","m","children","TabList","id","T","tabStyles","isSelected","isDisabled","Tab","P","TabPanel"],"mappings":"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","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 { containsExactChildren } from '@/lib/react';\nimport { cn } from '@/lib/utils';\nimport 'client-only';\nimport { cva } from 'class-variance-authority';\nimport {\n Tab as AriaTab,\n TabList as AriaTabList,\n type TabListProps as AriaTabListProps,\n TabPanel as AriaTabPanel,\n type TabPanelProps as AriaTabPanelProps,\n type TabProps as AriaTabProps,\n Tabs as AriaTabs,\n type TabsProps as AriaTabsProps,\n} from 'react-aria-components';\n\nexport interface TabsProps extends AriaTabsProps {}\n\n/**\n * Tabs - A tab navigation component for organizing content into sections\n *\n * Provides accessible tab navigation with keyboard support and proper ARIA implementation.\n * Supports both horizontal and vertical orientations with icon and text variants.\n * Perfect for organizing related content into separate, focusable sections.\n *\n * @example\n * // Basic horizontal tabs\n * <Tabs>\n * <Tabs.List>\n * <Tabs.Tab id=\"overview\">Overview</Tabs.Tab>\n * <Tabs.Tab id=\"details\">Details</Tabs.Tab>\n * <Tabs.Tab id=\"settings\">Settings</Tabs.Tab>\n * </Tabs.List>\n * <Tabs.Panel id=\"overview\">Overview content</Tabs.Panel>\n * <Tabs.Panel id=\"details\">Details content</Tabs.Panel>\n * <Tabs.Panel id=\"settings\">Settings content</Tabs.Panel>\n * </Tabs>\n *\n * @example\n * // Vertical tabs\n * <Tabs orientation=\"vertical\">\n * <Tabs.List>\n * <Tabs.Tab id=\"profile\">Profile</Tabs.Tab>\n * <Tabs.Tab id=\"account\">Account</Tabs.Tab>\n * </Tabs.List>\n * <Tabs.Panel id=\"profile\">Profile settings</Tabs.Panel>\n * <Tabs.Panel id=\"account\">Account settings</Tabs.Panel>\n * </Tabs>\n *\n * @example\n * // Icon tabs\n * <Tabs>\n * <Tabs.List variant=\"icons\">\n * <Tabs.Tab id=\"home\">\n * <Icon><Home /></Icon>\n * </Tabs.Tab>\n * <Tabs.Tab id=\"search\">\n * <Icon><Search /></Icon>\n * </Tabs.Tab>\n * </Tabs.List>\n * <Tabs.Panel id=\"home\">Home content</Tabs.Panel>\n * <Tabs.Panel id=\"search\">Search content</Tabs.Panel>\n * </Tabs>\n */\nexport const Tabs = ({\n children,\n className,\n orientation = 'horizontal',\n isDisabled = false,\n ...rest\n}: TabsProps) => {\n containsExactChildren({\n children,\n componentName: Tabs.displayName,\n restrictions: [[TabList, { min: 1, max: 1 }]],\n });\n\n return (\n <AriaTabs\n orientation={orientation}\n isDisabled={isDisabled}\n className={cn(\n 'group flex w-content flex-row orientation-horizontal:flex-col',\n className,\n )}\n {...rest}\n >\n {children}\n </AriaTabs>\n );\n};\n\nTabs.displayName = 'Tabs';\n\nexport interface TabListProps extends AriaTabListProps<object> {\n /** Whether the tabs are displaying iconography or text. */\n variant?: 'default' | 'icons';\n /** Whether the tabs are used as drawer controls. */\n drawer?: 'left' | 'right' | 'top' | 'bottom';\n}\n\nconst tabListStyles = cva('flex orientation-horizontal:flex-row flex-col', {\n variants: {\n variant: {\n icons:\n '[&>*]:p-xs orientation-horizontal:[&>*]:pr-s orientation-horizontal:[&>*]:pl-s [&>*]:leading-[0]',\n default: '[&>*]:p-s [&>*]:text-header-m',\n },\n drawer: {\n left: 'orientation-vertical:gap-xs rounded-r-large bg-surface-default p-s',\n right:\n 'orientation-vertical:gap-xs rounded-l-large bg-surface-default p-s',\n top: 'orientation-vertical:gap-xs rounded-b-large bg-surface-default p-s',\n bottom:\n 'orientation-vertical:gap-xs rounded-t-large bg-surface-default p-s',\n },\n },\n});\n\nconst TabList = ({\n children,\n className,\n variant = 'default',\n drawer = undefined,\n ...rest\n}: TabListProps) => {\n containsExactChildren({\n children,\n componentName: TabList.displayName,\n restrictions: [[Tab, { min: 1 }]],\n });\n\n return (\n <AriaTabList\n className={cn(tabListStyles({ variant, drawer }), className)}\n {...rest}\n >\n {children}\n </AriaTabList>\n );\n};\n\nTabList.displayName = 'Tabs.List';\nTabs.List = TabList;\n\nconst tabBaseStyles = cn(\n 'fg-default-dark cursor-pointer p-s outline-none',\n 'rounded-medium group-orientation-horizontal:rounded-small group-orientation-horizontal:rounded-b-none',\n 'group-orientation-horizontal:border-static-light group-orientation-horizontal:border-b',\n 'group-orientation-vertical:border group-orientation-vertical:border-transparent',\n);\n\nconst tabStyles = cva(tabBaseStyles, {\n variants: {\n isSelected: {\n true: 'fg-highlight bg-highlight-subtle group-orientation-horizontal:border-highlight',\n },\n isHovered: {\n true: 'fg-default-light group-orientation-horizontal:border-interactive-hover',\n },\n isFocused: {\n true: 'fg-default-light group-orientation-horizontal:border-interactive-hover',\n },\n isDisabled: {\n true: 'fg-disabled cursor-not-allowed group-orientation-horizontal:border-interactive-disabled',\n },\n },\n compoundVariants: [\n {\n isSelected: true,\n isHovered: true,\n className: 'fg-highlight group-orientation-horizontal:border-highlight',\n },\n {\n isSelected: true,\n isFocused: true,\n className:\n 'fg-highlight group-orientation-horizontal:border-interactive-hover group-orientation-vertical:border-interactive-hover',\n },\n {\n isDisabled: true,\n isSelected: true,\n className:\n 'fg-disabled bg-interactive-disabled group-orientation-horizontal:border-interactive-disabled',\n },\n ],\n});\n\nexport interface TabProps extends AriaTabProps {}\n\nconst Tab = ({\n id,\n children,\n className,\n isDisabled = false,\n ...rest\n}: TabProps) => {\n return (\n <AriaTab\n id={id}\n className={({ isSelected, isHovered, isFocused, isDisabled }) =>\n cn(\n tabStyles({ isSelected, isHovered, isFocused, isDisabled }),\n className,\n )\n }\n isDisabled={isDisabled}\n {...rest}\n >\n {children}\n </AriaTab>\n );\n};\n\nTab.displayName = 'Tabs.Tab';\nTabs.Tab = Tab;\n\nexport interface TabPanelProps extends AriaTabPanelProps {}\n\nconst TabPanel = ({ id, children, className, ...rest }: TabPanelProps) => {\n return (\n <AriaTabPanel\n id={id}\n className={cn(\n 'fg-default-light p-s group-orientation-vertical:pt-0 group-orientation-horizontal:pl-0',\n className,\n )}\n {...rest}\n >\n {children}\n </AriaTabPanel>\n );\n};\n\nTabPanel.displayName = 'Tabs.Panel';\nTabs.Panel = TabPanel;\n"]}
1
+ {"version":3,"sources":["../../../src/components/tabs/index.tsx"],"names":["list","tab","panel","TabsContext","x","y","props","jsx","o","TabsProvider","className","AriaTab","d","i","children","Tab","containsExactChildren","p","TabList","AriaTabList","rest","AriaTabPanel","N","TabPanel","useContextProps","ref","L","Tabs","AriaTabs","f","composeRenderProps"],"mappings":"wRAiCcA,MAAAA,CAAM,IAAAC,CAAAA,CAAK,CAAA,IAAA,CAAAC,CAAM,IAAc,CAAA,CAEhCC,CAAAA,KAC4C,CAAA,CAAI,CAAA,CAE7DC,SAAA,EAAA,CAAA,CAAA,CAAAC,aAAA,CAAA,IAAwB,EAAA,SAAU,CAAA,CAAA,CAAGC,QACnC,CAAA,CAAA,CAAOC,IAAa,CAAA,CAAA,CAAA,OAASC,GAAA,CAAA,CAAA,CAAA,eAAwB,CACvD,CACAC,CAAAA,aAA2B,CAAA,CAAA,WAAA,CAAA,eAEZ,CAAA,SAAU,CAAA,CAAA,CAAA,QAAAC,CAAW,WAClC,CAAA,CAAA,CACEH,GAACI,CAAA,CACE,CAAA,CAAA,OACDH,GAAA,CAAAI,GAAA,CAAA,CAAA,GAA8BF,CAAAA,CAAYA,SAClC,CAAAG,kBAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAC,CACnB,CAAA,SAEC,CAAAC,CAAAA,CACH,CAEJ,CACAC,CAAAA,QAAI,CAAA,CAAA,CAAA,CAAA,CAAc,6BAGhB,CAAA,SACA,CAAA,CAAA,CAAA,QAAAL,CACA,CAAA,CAAA,SAEA,CAAA,CAAA,CAAAM,GACE,CAAA,CAAA,CAAA,CAAA,OACAC,qBAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAeC,aAAQ,CACvB,CAAA,CAAA,WAAc,CAAC,YACjB,CAAC,CAAA,CAGCX,EAACY,CAAAA,GACE,CAAA,CAAGC,CAAAA,CACJ,oBAA8BV,CAAAA,CAAYA,SACjC,CAAAG,kBAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAC,CACpB,CAAA,SAEC,CAAAC,CAAAA,CACH,CAEJ,CACAI,CAAAA,QAAQ,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,uBAEF,CAAA,SAAU,CAAA,CAAA,CAAA,QAAAR,CAAW,CAAA,CAAA,SACvC,CAAA,CAAA,CACEH,GAACc,CAAA,CACE,CAAA,CAAA,OACDb,GAAA,CAAAc,QAAA,CAAA,CAAA,GAA8BZ,CAAAA,CAAYA,SAChC,CAAAG,kBAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAC,CACrB,UAEC,CAAAC,CAAAA,CACH,CAEJ,CACAS,CAAAA,QAAS,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAgDhB,CAAA,YAAgB,CAAA,SAAc,CAAc,CACjD,CAACjB,GAAU,CAAA,CAAIkB,CAAAA,GAAuBC,GAAO,CAAA,CAAA,CAAA,CAAA,CAAMtB,CAAW,CAAAuB,eAE9D,CAAA,CAAA,CAAA,CAAA,EAAQ,IAAA,CAAA,CAAA,CAAA,CAAA,KAAU,CAAA,QAAAhB,CAAW,CAAA,CAAA,eAEP,CACpB,CAAA,CAAA,CAAA,CAAA,OACAO,qBAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAeU,aAAK,CACpB,CAAA,CAAA,WAAc,CACZ,YAAoB,CAAA,CAAK,CAAE,CAAC,EAC5B,GAAW,CAAE,CAAA,CAAA,GAAO,CAAC,CACvB,CACF,CAAC,CAAA,CAGCpB,CAAAA,CAACqB,CAAAA,GACE,CAAA,CAAGR,CAAAA,CACJ,CAAA,CAAA,CAAA,CAAKK,GAAAA,CACLI,cAAWC,CAAmBpB,CAAAA,CAAYA,SACjC,CAAAG,kBAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAC,CACpB,CAAA,SAEC,CAAAC,CAAAA,CACH,CAEJ,CACAa,CAAAA,QAAK,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WACd,CAAA,MAELA,CAAAA,CAAK,CAAA,QACA,CAAA,CAAA,CAAA,CAAA,CAAK,IAAMZ,CAAAA,CAChBY,EAAK,CAAA,IAAA,CAAQJ,GAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,KAAAA,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\n'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport {\n Tab as AriaTab,\n TabList as AriaTabList,\n TabPanel as AriaTabPanel,\n Tabs as AriaTabs,\n type ContextValue,\n composeRenderProps,\n type TabListProps,\n type TabPanelProps,\n type TabProps,\n useContextProps,\n} from 'react-aria-components';\nimport { containsExactChildren } from '@/lib/react';\nimport { TabStyles } from './styles';\nimport type { ProviderProps } from '@/lib/types';\nimport type { TabsProps } from './types';\n\nconst { tabs, list, tab, panel } = TabStyles();\n\nexport const TabsContext =\n createContext<ContextValue<TabsProps, HTMLDivElement>>(null);\n\nfunction TabsProvider({ children, ...props }: ProviderProps<TabsProps>) {\n return <TabsContext.Provider value={props}>{children}</TabsContext.Provider>;\n}\nTabsProvider.displayName = 'Tabs.Provider';\n\nfunction Tab({ children, className, ...rest }: TabProps) {\n return (\n <AriaTab\n {...rest}\n className={composeRenderProps(className, (className) =>\n tab({ className }),\n )}\n >\n {children}\n </AriaTab>\n );\n}\nTab.displayName = 'Tabs.List.Tab';\n\nfunction TabList<T extends object>({\n children,\n className,\n ...rest\n}: TabListProps<T>) {\n containsExactChildren({\n children,\n componentName: TabList.displayName,\n restrictions: [[Tab, { min: 1 }]],\n });\n\n return (\n <AriaTabList<T>\n {...rest}\n className={composeRenderProps(className, (className) =>\n list({ className }),\n )}\n >\n {children}\n </AriaTabList>\n );\n}\nTabList.displayName = 'Tabs.List';\n\nfunction TabPanel({ children, className, ...rest }: TabPanelProps) {\n return (\n <AriaTabPanel\n {...rest}\n className={composeRenderProps(className, (className) =>\n panel({ className }),\n )}\n >\n {children}\n </AriaTabPanel>\n );\n}\nTabPanel.displayName = 'Tabs.Panel';\n\n/**\n * Tabs - A tab navigation component for organizing content into sections\n *\n * Provides accessible tab navigation with keyboard support and proper ARIA implementation.\n * Supports both horizontal and vertical orientations with icon and text variants.\n * Perfect for organizing related content into separate, focusable sections.\n *\n * @example\n * // Basic horizontal tabs\n * <Tabs>\n * <Tabs.List>\n * <Tabs.List.Tab id=\"overview\">Overview</Tabs.List.Tab>\n * <Tabs.List.Tab id=\"details\">Details</Tabs.List.Tab>\n * <Tabs.List.Tab id=\"settings\">Settings</Tabs.List.Tab>\n * </Tabs.List>\n * <Tabs.Panel id=\"overview\">Overview content</Tabs.Panel>\n * <Tabs.Panel id=\"details\">Details content</Tabs.Panel>\n * <Tabs.Panel id=\"settings\">Settings content</Tabs.Panel>\n * </Tabs>\n *\n * @example\n * // Vertical tabs\n * <Tabs orientation=\"vertical\">\n * <Tabs.List>\n * <Tabs.List.Tab id=\"profile\">Profile</Tabs.List.Tab>\n * <Tabs.List.Tab id=\"account\">Account</Tabs.List.Tab>\n * </Tabs.List>\n * <Tabs.Panel id=\"profile\">Profile settings</Tabs.Panel>\n * <Tabs.Panel id=\"account\">Account settings</Tabs.Panel>\n * </Tabs>\n *\n * @example\n * // Icon tabs\n * <Tabs>\n * <Tabs.List variant=\"icons\">\n * <Tabs.List.Tab id=\"home\">\n * <Icon><Home /></Icon>\n * </Tabs.List.Tab>\n * <Tabs.List.Tab id=\"search\">\n * <Icon><Search /></Icon>\n * </Tabs.List.Tab>\n * </Tabs.List>\n * <Tabs.Panel id=\"home\">Home content</Tabs.Panel>\n * <Tabs.Panel id=\"search\">Search content</Tabs.Panel>\n * </Tabs>\n */\nexport function Tabs({ ref, ...props }: TabsProps) {\n [props, ref] = useContextProps(props, ref ?? null, TabsContext);\n\n const { children, className, ...rest } = props;\n\n containsExactChildren({\n children,\n componentName: Tabs.displayName,\n restrictions: [\n [TabList, { min: 1, max: 1 }],\n [TabPanel, { min: 1 }],\n ],\n });\n\n return (\n <AriaTabs\n {...rest}\n ref={ref}\n className={composeRenderProps(className, (className) =>\n tabs({ className }),\n )}\n >\n {children}\n </AriaTabs>\n );\n}\nTabs.displayName = 'Tabs';\nTabs.Provider = TabsProvider;\n// biome-ignore lint/style/useNamingConvention: Component name\nTabs.List = TabList as typeof TabList & { Tab: typeof Tab };\nTabs.List.Tab = Tab;\nTabs.Panel = TabPanel;\n"]}