@accelint/design-toolkit 4.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/dist/components/accordion/index.d.ts +1 -1
  2. package/dist/components/accordion/index.js +3 -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 +4 -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 +3 -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 +2 -0
  24. package/dist/components/badge/index.js.map +1 -1
  25. package/dist/components/badge/styles.js +1 -1
  26. package/dist/components/badge/styles.js.map +1 -1
  27. package/dist/components/button/index.d.ts +1 -1
  28. package/dist/components/button/index.js +2 -0
  29. package/dist/components/button/index.js.map +1 -1
  30. package/dist/components/button/styles.js +1 -1
  31. package/dist/components/button/styles.js.map +1 -1
  32. package/dist/components/button/types.d.ts +1 -1
  33. package/dist/components/checkbox/index.js +2 -0
  34. package/dist/components/checkbox/styles.js +1 -1
  35. package/dist/components/checkbox/styles.js.map +1 -1
  36. package/dist/components/chip/index.d.ts +1 -1
  37. package/dist/components/chip/index.js +2 -0
  38. package/dist/components/chip/index.js.map +1 -1
  39. package/dist/components/chip/styles.js +1 -1
  40. package/dist/components/chip/styles.js.map +1 -1
  41. package/dist/components/classification-badge/index.d.ts +1 -1
  42. package/dist/components/classification-badge/index.js +3 -1
  43. package/dist/components/classification-badge/index.js.map +1 -1
  44. package/dist/components/classification-badge/styles.d.ts +1 -1
  45. package/dist/components/classification-badge/styles.js +1 -1
  46. package/dist/components/classification-badge/styles.js.map +1 -1
  47. package/dist/components/classification-banner/index.d.ts +1 -1
  48. package/dist/components/classification-banner/index.js +3 -1
  49. package/dist/components/classification-banner/index.js.map +1 -1
  50. package/dist/components/classification-banner/styles.d.ts +1 -1
  51. package/dist/components/classification-banner/styles.js +1 -1
  52. package/dist/components/classification-banner/styles.js.map +1 -1
  53. package/dist/components/color-picker/index.js +2 -0
  54. package/dist/components/color-picker/styles.js +1 -1
  55. package/dist/components/color-picker/styles.js.map +1 -1
  56. package/dist/components/combobox-field/index.d.ts +1 -1
  57. package/dist/components/combobox-field/index.js +2 -0
  58. package/dist/components/combobox-field/index.js.map +1 -1
  59. package/dist/components/combobox-field/styles.d.ts +1 -1
  60. package/dist/components/combobox-field/styles.js +1 -1
  61. package/dist/components/combobox-field/styles.js.map +1 -1
  62. package/dist/components/combobox-field/types.d.ts +1 -1
  63. package/dist/components/date-field/index.js +2 -0
  64. package/dist/components/date-field/index.js.map +1 -1
  65. package/dist/components/date-field/styles.d.ts +1 -1
  66. package/dist/components/date-field/styles.js +1 -1
  67. package/dist/components/date-field/styles.js.map +1 -1
  68. package/dist/components/details-list/index.d.ts +1 -1
  69. package/dist/components/details-list/index.js +3 -1
  70. package/dist/components/details-list/index.js.map +1 -1
  71. package/dist/components/details-list/styles.js +1 -1
  72. package/dist/components/details-list/styles.js.map +1 -1
  73. package/dist/components/dialog/index.js +3 -1
  74. package/dist/components/dialog/index.js.map +1 -1
  75. package/dist/components/dialog/styles.d.ts +1 -1
  76. package/dist/components/dialog/styles.js +1 -1
  77. package/dist/components/dialog/styles.js.map +1 -1
  78. package/dist/components/drawer/index.d.ts +1 -1
  79. package/dist/components/drawer/index.js +3 -1
  80. package/dist/components/drawer/index.js.map +1 -1
  81. package/dist/components/drawer/styles.d.ts +4 -4
  82. package/dist/components/drawer/styles.js +1 -1
  83. package/dist/components/drawer/styles.js.map +1 -1
  84. package/dist/components/drawer/types.d.ts +1 -1
  85. package/dist/components/hero/index.js +3 -1
  86. package/dist/components/hero/index.js.map +1 -1
  87. package/dist/components/hero/styles.js +1 -1
  88. package/dist/components/hero/styles.js.map +1 -1
  89. package/dist/components/hotkey/index.d.ts +1 -1
  90. package/dist/components/hotkey/index.js +2 -0
  91. package/dist/components/hotkey/index.js.map +1 -1
  92. package/dist/components/hotkey/styles.js +1 -1
  93. package/dist/components/hotkey/styles.js.map +1 -1
  94. package/dist/components/icon/index.d.ts +1 -1
  95. package/dist/components/icon/index.js +3 -1
  96. package/dist/components/icon/index.js.map +1 -1
  97. package/dist/components/input/index.d.ts +1 -1
  98. package/dist/components/input/index.js +2 -0
  99. package/dist/components/input/index.js.map +1 -1
  100. package/dist/components/input/styles.js +1 -1
  101. package/dist/components/input/styles.js.map +1 -1
  102. package/dist/components/label/index.d.ts +1 -1
  103. package/dist/components/label/index.js +2 -0
  104. package/dist/components/label/index.js.map +1 -1
  105. package/dist/components/label/styles.js +1 -1
  106. package/dist/components/label/styles.js.map +1 -1
  107. package/dist/components/lines/index.d.ts +9 -0
  108. package/dist/components/lines/index.js +2 -0
  109. package/dist/components/lines/index.js.map +1 -0
  110. package/dist/components/lines/styles.d.ts +32 -0
  111. package/dist/components/lines/styles.js +2 -0
  112. package/dist/components/lines/styles.js.map +1 -0
  113. package/dist/components/lines/types.d.ts +10 -0
  114. package/dist/components/lines/types.js +2 -0
  115. package/dist/components/lines/types.js.map +1 -0
  116. package/dist/components/link/index.d.ts +17 -0
  117. package/dist/components/link/index.js +4 -0
  118. package/dist/components/link/index.js.map +1 -0
  119. package/dist/components/link/styles.d.ts +5 -0
  120. package/dist/components/link/styles.js +2 -0
  121. package/dist/components/link/styles.js.map +1 -0
  122. package/dist/components/link/types.d.ts +9 -0
  123. package/dist/components/link/types.js +2 -0
  124. package/dist/components/link/types.js.map +1 -0
  125. package/dist/components/menu/index.js +3 -1
  126. package/dist/components/menu/index.js.map +1 -1
  127. package/dist/components/menu/styles.js +1 -1
  128. package/dist/components/menu/styles.js.map +1 -1
  129. package/dist/components/options/index.js +2 -0
  130. package/dist/components/options/index.js.map +1 -1
  131. package/dist/components/options/styles.d.ts +1 -1
  132. package/dist/components/options/styles.js +1 -1
  133. package/dist/components/options/styles.js.map +1 -1
  134. package/dist/components/popover/index.js +2 -0
  135. package/dist/components/popover/index.js.map +1 -1
  136. package/dist/components/popover/styles.js +1 -1
  137. package/dist/components/popover/styles.js.map +1 -1
  138. package/dist/components/query-builder/action-element.js +2 -0
  139. package/dist/components/query-builder/action-element.js.map +1 -1
  140. package/dist/components/query-builder/group.js +3 -1
  141. package/dist/components/query-builder/group.js.map +1 -1
  142. package/dist/components/query-builder/index.js +1 -1
  143. package/dist/components/query-builder/index.js.map +1 -1
  144. package/dist/components/query-builder/rule.js +2 -0
  145. package/dist/components/query-builder/value-editor.js +2 -0
  146. package/dist/components/query-builder/value-editor.js.map +1 -1
  147. package/dist/components/query-builder/value-selector.js.map +1 -1
  148. package/dist/components/radio/index.js +2 -0
  149. package/dist/components/radio/styles.js +1 -1
  150. package/dist/components/radio/styles.js.map +1 -1
  151. package/dist/components/search-field/index.d.ts +3 -3
  152. package/dist/components/search-field/index.js +2 -0
  153. package/dist/components/search-field/index.js.map +1 -1
  154. package/dist/components/search-field/styles.js +1 -1
  155. package/dist/components/search-field/styles.js.map +1 -1
  156. package/dist/components/select-field/index.d.ts +1 -1
  157. package/dist/components/select-field/index.js +3 -1
  158. package/dist/components/select-field/index.js.map +1 -1
  159. package/dist/components/select-field/styles.js +1 -1
  160. package/dist/components/select-field/styles.js.map +1 -1
  161. package/dist/components/select-field/types.d.ts +1 -1
  162. package/dist/components/sidenav/events.d.ts +8 -0
  163. package/dist/components/sidenav/events.js +2 -0
  164. package/dist/components/sidenav/events.js.map +1 -0
  165. package/dist/components/sidenav/index.d.ts +64 -0
  166. package/dist/components/sidenav/index.js +4 -0
  167. package/dist/components/sidenav/index.js.map +1 -0
  168. package/dist/components/sidenav/styles.d.ts +156 -0
  169. package/dist/components/sidenav/styles.js +2 -0
  170. package/dist/components/sidenav/styles.js.map +1 -0
  171. package/dist/components/sidenav/types.d.ts +70 -0
  172. package/dist/components/sidenav/types.js +2 -0
  173. package/dist/components/sidenav/types.js.map +1 -0
  174. package/dist/components/skeleton/styles.d.ts +2 -2
  175. package/dist/components/skeleton/styles.js +1 -1
  176. package/dist/components/skeleton/styles.js.map +1 -1
  177. package/dist/components/slider/index.js +2 -0
  178. package/dist/components/slider/index.js.map +1 -1
  179. package/dist/components/slider/styles.d.ts +1 -1
  180. package/dist/components/slider/styles.js +1 -1
  181. package/dist/components/slider/styles.js.map +1 -1
  182. package/dist/components/switch/index.d.ts +1 -1
  183. package/dist/components/switch/index.js +2 -0
  184. package/dist/components/switch/index.js.map +1 -1
  185. package/dist/components/switch/styles.js +1 -1
  186. package/dist/components/switch/styles.js.map +1 -1
  187. package/dist/components/tabs/index.d.ts +37 -36
  188. package/dist/components/tabs/index.js +3 -1
  189. package/dist/components/tabs/index.js.map +1 -1
  190. package/dist/components/tabs/styles.d.ts +48 -0
  191. package/dist/components/tabs/styles.js +2 -0
  192. package/dist/components/tabs/styles.js.map +1 -0
  193. package/dist/components/tabs/types.d.ts +6 -0
  194. package/dist/components/tabs/types.js +2 -0
  195. package/dist/components/tabs/types.js.map +1 -0
  196. package/dist/components/text-area-field/index.d.ts +1 -1
  197. package/dist/components/text-area-field/index.js +2 -0
  198. package/dist/components/text-area-field/index.js.map +1 -1
  199. package/dist/components/text-area-field/styles.js +1 -1
  200. package/dist/components/text-area-field/styles.js.map +1 -1
  201. package/dist/components/text-field/index.js +2 -0
  202. package/dist/components/text-field/index.js.map +1 -1
  203. package/dist/components/text-field/styles.js +1 -1
  204. package/dist/components/text-field/styles.js.map +1 -1
  205. package/dist/components/tooltip/index.d.ts +1 -1
  206. package/dist/components/tooltip/index.js +3 -1
  207. package/dist/components/tooltip/index.js.map +1 -1
  208. package/dist/components/tooltip/styles.d.ts +1 -1
  209. package/dist/components/tooltip/styles.js +1 -1
  210. package/dist/components/tooltip/styles.js.map +1 -1
  211. package/dist/components/tooltip/types.d.ts +3 -1
  212. package/dist/components/tree/index.d.ts +51 -0
  213. package/dist/components/tree/index.js +4 -0
  214. package/dist/components/tree/index.js.map +1 -0
  215. package/dist/components/tree/styles.d.ts +128 -0
  216. package/dist/components/tree/styles.js +2 -0
  217. package/dist/components/tree/styles.js.map +1 -0
  218. package/dist/components/tree/types.d.ts +41 -0
  219. package/dist/components/tree/types.js +2 -0
  220. package/dist/components/tree/types.js.map +1 -0
  221. package/dist/components/view-stack/index.js +2 -0
  222. package/dist/components/view-stack/index.js.map +1 -1
  223. package/dist/foundation/token-data.d.ts +17 -0
  224. package/dist/foundation/token-data.js +2 -0
  225. package/dist/foundation/token-data.js.map +1 -0
  226. package/dist/hooks/use-tree/actions/cache.d.ts +78 -0
  227. package/dist/hooks/use-tree/actions/cache.js +2 -0
  228. package/dist/hooks/use-tree/actions/cache.js.map +1 -0
  229. package/dist/hooks/use-tree/actions/index.d.ts +38 -0
  230. package/dist/hooks/use-tree/actions/index.js +4 -0
  231. package/dist/hooks/use-tree/actions/index.js.map +1 -0
  232. package/dist/hooks/use-tree/state/index.d.ts +8 -0
  233. package/dist/hooks/use-tree/state/index.js +2 -0
  234. package/dist/hooks/use-tree/state/index.js.map +1 -0
  235. package/dist/hooks/use-tree/state/utils.d.ts +7 -0
  236. package/dist/hooks/use-tree/state/utils.js +2 -0
  237. package/dist/hooks/use-tree/state/utils.js.map +1 -0
  238. package/dist/hooks/use-tree/types.d.ts +171 -0
  239. package/dist/hooks/use-tree/types.js +2 -0
  240. package/dist/hooks/use-tree/types.js.map +1 -0
  241. package/dist/icons/catalog.js +1 -1
  242. package/dist/icons/catalog.js.map +1 -1
  243. package/dist/index.css +9 -15
  244. package/dist/index.d.ts +26 -3
  245. package/dist/index.js +1 -1
  246. package/dist/lib/react.d.ts +22 -8
  247. package/dist/lib/react.js +8 -4
  248. package/dist/lib/react.js.map +1 -1
  249. package/dist/lib/utils.d.ts +2 -2
  250. package/dist/lib/utils.js +1 -1
  251. package/dist/lib/utils.js.map +1 -1
  252. package/dist/metafile-esm.json +1 -1
  253. package/dist/providers/theme-provider.d.ts +22 -0
  254. package/dist/providers/theme-provider.js +4 -0
  255. package/dist/providers/theme-provider.js.map +1 -0
  256. package/dist/styles.css +1663 -920
  257. package/dist/tokens/themes.css +729 -53
  258. package/dist/tokens/tokens.css +121 -65
  259. package/dist/tokens/tokens.d.ts +449 -1
  260. package/dist/tokens/tokens.js +2 -0
  261. package/dist/tokens/tokens.js.map +1 -0
  262. package/dist/tokens/types.d.ts +299 -0
  263. package/dist/tokens/types.js +2 -0
  264. package/dist/tokens/types.js.map +1 -0
  265. package/dist/variants/variants.css +6 -1
  266. package/package.json +13 -8
  267. package/dist/tokens/index.d.ts +0 -123
  268. package/dist/tokens/index.js +0 -2
  269. package/dist/tokens/index.js.map +0 -1
@@ -1,2 +1,4 @@
1
- import {jsx}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps}from'react-aria-components';import {IconStyles}from'./styles.js';const r=createContext(null);function t({children:o,...e}){return jsx(r.Provider,{value:e,children:o})}t.displayName="Icon.Provider";function n({ref:o,...e}){[e,o]=useContextProps(e,o??null,r);const{children:p,className:s,size:c="medium",...m}=e;return jsx("span",{...m,ref:o,className:IconStyles({className:s}),"data-size":c,children:p})}n.displayName="Icon",n.Provider=t;export{n as Icon,r as IconContext};//# sourceMappingURL=index.js.map
1
+ 'use client';
2
+
3
+ import {jsx}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps}from'react-aria-components';import {IconStyles}from'./styles.js';const r=createContext(null);function t({children:o,...e}){return jsx(r.Provider,{value:e,children:o})}t.displayName="Icon.Provider";function n({ref:o,...e}){[e,o]=useContextProps(e,o??null,r);const{children:s,className:p,size:c="medium",...m}=e;return jsx("span",{...m,ref:o,className:IconStyles({className:p}),"data-size":c,children:s})}n.displayName="Icon",n.Provider=t;export{n as Icon,r as IconContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/icon/index.tsx"],"names":["createContext","a","props","i","IconProvider","ref","useContextProps","rest","P","Icon"],"mappings":"mLAoBEA,MAAwD,CAAA,CAAAC,aAAA,CAAI,IAE9D,EAAA,oBAAkC,CAAA,CAAGC,CAAM,GACzC,WAAoBC,GAAA,CAAA,CAAA,CAAA,QAAS,CAAA,CAAA,gBAC/B,CACAC,CAAAA,CAAa,CAAA,CAAA,CAAA,CAAA,2BA+BN,CAAA,SAAgB,CAAA,CAAA,CAAAC,GAAK,CAAA,CAAGH,CAAM,GACnC,CAACA,CAAAA,CAAOG,CAAG,EAAIC,CAAAA,CAAgBJ,CAAAA,CAAOG,eAAAA,CAAAA,CAAO,CAAA,CAAA,EAAA,IAE7C,SAAQ,CAAA,QAAU,CAAA,CAAA,CAAA,gBAAkB,CAAA,CAAA,CAAA,QAAaE,CAAK,GAAIL,CAE1D,WACGC,GAAA,CAAA,OACKI,CAAAA,GACJ,CAAA,CAAKF,GACL,CAAA,CAAA,CAAA,SAAwB,CAAAG,UAAA,CAAA,CAAA,UACxB,CAAA,CAAA,CAAA,CAAA,sBAKN,CACAC,CAAAA,CAAK,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,MACd,CAAA,CAAA,CAAA,QAAWL,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\nimport 'client-only';\nimport type { ProviderProps } from '@/lib/types';\nimport { createContext } from 'react';\nimport { type ContextValue, useContextProps } from 'react-aria-components';\nimport { IconStyles } from './styles';\nimport type { IconProps } from './types';\n\nexport const IconContext =\n createContext<ContextValue<IconProps, HTMLSpanElement>>(null);\n\nfunction IconProvider({ children, ...props }: ProviderProps<IconProps>) {\n return <IconContext.Provider value={props}>{children}</IconContext.Provider>;\n}\nIconProvider.displayName = 'Icon.Provider';\n\n/**\n * Icon - A wrapper component for displaying SVG icons with consistent sizing\n *\n * Provides a standardized container for SVG icons with built-in size variants and\n * proper accessibility support. Works seamlessly with the Accelint icon library\n * and supports custom SVG elements with consistent styling and alignment.\n *\n * @example\n * // Basic icon usage\n * <Icon>\n * <Settings />\n * </Icon>\n *\n * @example\n * // Icon with different sizes\n * <Icon size=\"small\">\n * <User />\n * </Icon>\n * <Icon size=\"large\">\n * <Dashboard />\n * </Icon>\n *\n * @example\n * // Icon in button context (automatically inherits sizing)\n * <Button>\n * <Icon><Plus /></Icon>\n * Add Item\n * </Button>\n */\nexport function Icon({ ref, ...props }: IconProps) {\n [props, ref] = useContextProps(props, ref ?? null, IconContext);\n\n const { children, className, size = 'medium', ...rest } = props;\n\n return (\n <span\n {...rest}\n ref={ref}\n className={IconStyles({ className })}\n data-size={size}\n >\n {children}\n </span>\n );\n}\nIcon.displayName = 'Icon';\nIcon.Provider = IconProvider;\n"]}
1
+ {"version":3,"sources":["../../../src/components/icon/index.tsx"],"names":["createContext","a","props","i","IconProvider","ref","useContextProps","rest","P","Icon"],"mappings":"mLAqBEA,MAAwD,CAAA,CAAAC,aAAA,CAAI,IAE9D,EAAA,oBAAkC,CAAA,CAAGC,CAAM,GACzC,WAAoBC,GAAA,CAAA,CAAA,CAAA,QAAS,CAAA,CAAA,gBAC/B,CACAC,CAAAA,CAAa,CAAA,CAAA,CAAA,CAAA,2BA+BN,CAAA,SAAgB,CAAA,CAAA,CAAAC,GAAK,CAAA,CAAGH,CAAM,GACnC,CAACA,CAAAA,CAAOG,CAAG,EAAIC,CAAAA,CAAgBJ,CAAAA,CAAOG,eAAAA,CAAAA,CAAO,CAAA,CAAA,EAAA,IAE7C,SAAQ,CAAA,QAAU,CAAA,CAAA,CAAA,gBAAkB,CAAA,CAAA,CAAA,QAAaE,CAAK,GAAIL,CAE1D,WACGC,GAAA,CAAA,OACKI,CAAAA,GACJ,CAAA,CAAKF,GACL,CAAA,CAAA,CAAA,SAAwB,CAAAG,UAAA,CAAA,CAAA,UACxB,CAAA,CAAA,CAAA,CAAA,sBAKN,CACAC,CAAAA,CAAK,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,MACd,CAAA,CAAA,CAAA,QAAWL,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 { type ContextValue, useContextProps } from 'react-aria-components';\nimport { IconStyles } from './styles';\nimport type { ProviderProps } from '@/lib/types';\nimport type { IconProps } from './types';\n\nexport const IconContext =\n createContext<ContextValue<IconProps, HTMLSpanElement>>(null);\n\nfunction IconProvider({ children, ...props }: ProviderProps<IconProps>) {\n return <IconContext.Provider value={props}>{children}</IconContext.Provider>;\n}\nIconProvider.displayName = 'Icon.Provider';\n\n/**\n * Icon - A wrapper component for displaying SVG icons with consistent sizing\n *\n * Provides a standardized container for SVG icons with built-in size variants and\n * proper accessibility support. Works seamlessly with the Accelint icon library\n * and supports custom SVG elements with consistent styling and alignment.\n *\n * @example\n * // Basic icon usage\n * <Icon>\n * <Settings />\n * </Icon>\n *\n * @example\n * // Icon with different sizes\n * <Icon size=\"small\">\n * <User />\n * </Icon>\n * <Icon size=\"large\">\n * <Dashboard />\n * </Icon>\n *\n * @example\n * // Icon in button context (automatically inherits sizing)\n * <Button>\n * <Icon><Plus /></Icon>\n * Add Item\n * </Button>\n */\nexport function Icon({ ref, ...props }: IconProps) {\n [props, ref] = useContextProps(props, ref ?? null, IconContext);\n\n const { children, className, size = 'medium', ...rest } = props;\n\n return (\n <span\n {...rest}\n ref={ref}\n className={IconStyles({ className })}\n data-size={size}\n >\n {children}\n </span>\n );\n}\nIcon.displayName = 'Icon';\nIcon.Provider = IconProvider;\n"]}
@@ -25,7 +25,7 @@ declare const InputContext: react.Context<ContextValue<InputProps, HTMLInputElem
25
25
  * // Input with clear button
26
26
  * <Input
27
27
  * defaultValue="Clearable text"
28
- * classNames={{ clear: "hover:bg-gray-100" }}
28
+ * classNames={{ clear: "hover:bg-info-bold" }}
29
29
  * />
30
30
  */
31
31
  declare function Input({ ref, ...props }: InputProps): react_jsx_runtime.JSX.Element;
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsxs,jsx}from'react/jsx-runtime';import'client-only';import {CancelFill}from'@accelint/icons';import {useControlledState}from'@react-stately/utils';import {createContext}from'react';import {useContextProps,InputContext,Input,composeRenderProps}from'react-aria-components';import {Button}from'../button/index.js';import {Icon}from'../icon/index.js';import {InputStyles,InputStylesDefaults}from'./styles.js';const {container:w,sizer:A,input:B,clear:F}=InputStyles(),v={target:{value:""}},K=createContext(null);function k({ref:t,...a}){[a,t]=useContextProps(a,t??null,InputContext),[a,t]=useContextProps({...a},t??null,K);const{classNames:u,autoSize:r,defaultValue:h="",disabled:i,placeholder:d,readOnly:c,required:m,size:f="medium",type:l=InputStylesDefaults.type,value:g,isClearable:n,isInvalid:x,onChange:E,onKeyDown:P,...N}=a,[s,b]=useControlledState(g,h),z=(`${s??""}`.length||d?.length)??0,I=s==null||s==="";function p(e){E?.(e),e.defaultPrevented||b(e.target.value);}return jsxs("div",{className:w({className:u?.container,autoSize:r,type:l,isClearable:n}),"data-disabled":i||null,"data-empty":I||null,"data-invalid":x||null,"data-length":z,"data-placeholder":!!d&&I||null,"data-readonly":c||null,"data-required":m||null,"data-size":f,children:[jsx("div",{className:A({className:u?.sizer,autoSize:r,type:l,isClearable:n}),children:jsx(Input,{...N,ref:t,className:composeRenderProps(u?.input,e=>B({className:e,autoSize:r,type:l,isClearable:n})),disabled:i,placeholder:d,readOnly:c,required:m,type:l,value:s,onChange:p,onKeyDown:e=>{P?.(e),n&&!e.defaultPrevented&&e.key==="Escape"&&p(v);}})}),n&&jsx(Button,{className:composeRenderProps(u?.clear,e=>F({className:e,autoSize:r,type:l,isClearable:n})),excludeFromTabOrder:true,size:"small",variant:"icon",isDisabled:i,onPress:()=>{p(v),t?.current?.focus();},children:jsx(Icon,{children:jsx(CancelFill,{})})})]})}k.displayName="Input";export{k as Input,K as InputContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/input/index.tsx"],"names":["clear","clearInputEvent","M","InputContext","createContext","Input","ref","props","useContextProps","C","q","defaultValue","placeholder","readOnly","type","InputStylesDefaults","O","isInvalid","onChange","onKeyDown","value","setValue","length","S","isEmpty","handleChange","event","jsxs","R","classNames","autoSize","required","jsx","composeRenderProps","className","input","y","isClearable","o","D"],"mappings":"8ZA8B0B,MAAA,CAAA,SAAO,CAAAA,CAAM,CAAA,KAGjCC,CAAAA,CAAkB,CACtB,OAAQ,CAAE,KAAA,CAAO,EAAG,CACtBC,WAAA,EAEaC,CACXC,CAAAA,CAA0D,OAoBrD,CAAA,CAAA,KA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AAA,QACF,CACFM,QAEJ,CAEJ,CACAjC,QAAM,CAAAiC,GAAA,CAAAC,UAAA,CAAA,EAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,WAAA,CAAA,OAAA","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 { CancelFill } from '@accelint/icons';\nimport { useControlledState } from '@react-stately/utils';\nimport { type ChangeEvent, createContext } from 'react';\nimport {\n Input as AriaInput,\n InputContext as AriaInputContext,\n type ContextValue,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { InputStyles, InputStylesDefaults } from './styles';\nimport type { InputProps } from './types';\n\nconst { container, sizer, input, clear } = InputStyles();\n\n// TODO: Improve this implementation so it is more of a realistic event\nconst clearInputEvent = {\n target: { value: '' },\n} as ChangeEvent<HTMLInputElement>;\n\nexport const InputContext =\n createContext<ContextValue<InputProps, HTMLInputElement>>(null);\n\n/**\n * Input - A flexible text input component with enhanced features\n *\n * Provides a customizable text input with automatic sizing, clear functionality,\n * and integrated validation states. Supports various styling options and integrates\n * seamlessly with form field components for comprehensive form experiences.\n *\n * @example\n * // Basic input\n * <Input placeholder=\"Enter text...\" />\n *\n * @example\n * // Input with clear button\n * <Input\n * defaultValue=\"Clearable text\"\n * classNames={{ clear: \"hover:bg-gray-100\" }}\n * />\n */\nexport function Input({ ref, ...props }: InputProps) {\n /**\n * It is necessary to pull in the AriaInputContext to capture defaultValue,\n * value & onChange props that may be supplied by a Field component\n *\n * These are necessary due to the implementation of useControlledState for\n * the purposes of supporting the clear button and to capture the length\n * of the current value for the autoSize feature\n */\n [props, ref] = useContextProps(props, ref ?? null, AriaInputContext);\n [props, ref] = useContextProps({ ...props }, ref ?? null, InputContext);\n\n const {\n classNames,\n autoSize,\n defaultValue = '',\n disabled,\n placeholder,\n readOnly,\n required,\n size = 'medium',\n type = InputStylesDefaults.type,\n value: valueProp,\n isClearable,\n isInvalid,\n onChange,\n onKeyDown,\n ...rest\n } = props;\n\n const [value, setValue] = useControlledState(valueProp, defaultValue);\n const length = (`${value ?? ''}`.length || placeholder?.length) ?? 0;\n const isEmpty = value == null || value === '';\n\n function handleChange(event: ChangeEvent<HTMLInputElement>) {\n onChange?.(event);\n\n if (!event.defaultPrevented) {\n setValue(event.target.value);\n }\n }\n\n return (\n <div\n className={container({\n className: classNames?.container,\n autoSize,\n type,\n isClearable,\n })}\n data-disabled={disabled || null}\n data-empty={isEmpty || null}\n data-invalid={isInvalid || null}\n data-length={length}\n data-placeholder={(!!placeholder && isEmpty) || null}\n data-readonly={readOnly || null}\n data-required={required || null}\n data-size={size}\n >\n <div\n className={sizer({\n className: classNames?.sizer,\n autoSize,\n type,\n isClearable,\n })}\n >\n <AriaInput\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.input, (className) =>\n input({ className, autoSize, type, isClearable }),\n )}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n required={required}\n type={type}\n value={value}\n onChange={handleChange}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n\n if (\n isClearable &&\n !event.defaultPrevented &&\n event.key === 'Escape'\n ) {\n handleChange(clearInputEvent);\n }\n }}\n />\n </div>\n {isClearable && (\n <Button\n className={composeRenderProps(classNames?.clear, (className) =>\n clear({ className, autoSize, type, isClearable }),\n )}\n excludeFromTabOrder\n size='small'\n variant='icon'\n isDisabled={disabled}\n onPress={() => {\n handleChange(clearInputEvent);\n\n ref?.current?.focus();\n }}\n >\n <Icon>\n <CancelFill />\n </Icon>\n </Button>\n )}\n </div>\n );\n}\nInput.displayName = 'Input';\n"]}
1
+ {"version":3,"sources":["../../../src/components/input/index.tsx"],"names":["clear","clearInputEvent","M","InputContext","createContext","Input","ref","props","useContextProps","C","q","defaultValue","placeholder","readOnly","type","InputStylesDefaults","O","isInvalid","onChange","onKeyDown","value","setValue","length","S","isEmpty","handleChange","event","jsxs","R","classNames","autoSize","required","jsx","composeRenderProps","className","input","y","isClearable","o","D"],"mappings":"8ZA8B0B,MAAA,CAAA,SAAO,CAAAA,CAAM,CAAA,KAGjCC,CAAAA,CAAkB,CACtB,OAAQ,CAAE,KAAA,CAAO,EAAG,CACtBC,WAAA,EAEaC,CACXC,CAAAA,CAA0D,OAoBrD,CAAA,CAAA,KAAA,CAASC,EAAM,CAAE,CAAA,CAAA,CAAA,CAAAC,cAAK,IAAS,EAAe,SASpBC,CAAAA,CAAOD,IAAO,CAAA,CAAA,CAAA,GAAsB,CACnE,CAACC,EAAOD,CAAG,CAAA,CAAIE,EAAgB,CAAEC,eAAA,CAAA,CAAGF,CAAM,CAAA,EAAGD,IAAO,CAAAI,YAAA,CAAMP,CAAY,EAEtE,CAAA,CAAA,CAAA,CAAAM,eAAM,CACJ,cACA,CAAA,CAAA,CAAA,CAAA,MACA,UAAA,CAAA,CAAA,CAAAE,QACA,CAAA,CAAA,CAAA,YACA,CAAA,CAAA,CAAA,EAAAC,CAAAA,UACAC,CAAAA,YAEA,CAAA,CAAA,QAAO,CAAA,CAAA,CAAA,QACPC,EAAOC,CAAAA,IAAoB,CAAA,CAC3B,SACA,CAAA,IAAA,CAAA,CAAA,CAAAC,mBAAA,CAAA,IACA,CAAA,KAAA,CAAA,CAAA,CAAAC,WACAC,CAAAA,CACA,UAAAC,CAAAA,CACA,CAAA,QAGKC,CAAAA,CAAOC,CAAQ,SAChBC,GAAU,GAAGF,CAAAA,CAAAA,CAAS,EAAE,CAAA,CAAA,CAAG,C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,CAAA,CACPX,CAAAA,EAAM,CAAA,CAAA,CAAA,gBAIV,EACF,CAAA,CACF,GACCW,GACCL,eACaC,CAAAA,CAAmBJ,CAAAA,CAAAA,CAAY,QAAQK,MAAAA,CAAAA,CAChDlC,SAAQ,CAAAoC,kBAAA,CAAA,CAAAF,EAAW,KAAA,CAAA,CAAA,EAAAJ,CAAAA,CAAU,UAAM,CAAA,CAAA,CAAA,QAAa,CAClD,EACA,IAAA,CAAA,CAAA,CAAA,WAAA,CAAA,CAAmB,CAAA,CAAA,CACnB,CAAA,oBACQ,IAAA,CAAA,IACR,CAAA,OAAA,CAAA,OACA,CAAA,MAAS,CAAA,UAGF,UAAS,CAAA,IAAM,CACtB,EAEA,CAAA,CAAA,CAAA,CAAA,EAAA,OAAC,EACC,KAAA,GAAA,CAAAE,CAAAA,QACF,CACFM,QAEJ,CAEJ,CACAjC,QAAM,CAAAiC,GAAA,CAAAC,UAAA,CAAA,EAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,WAAA,CAAA,OAAA","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 { CancelFill } from '@accelint/icons';\nimport { useControlledState } from '@react-stately/utils';\nimport { type ChangeEvent, createContext } from 'react';\nimport {\n Input as AriaInput,\n InputContext as AriaInputContext,\n type ContextValue,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { InputStyles, InputStylesDefaults } from './styles';\nimport type { InputProps } from './types';\n\nconst { container, sizer, input, clear } = InputStyles();\n\n// TODO: Improve this implementation so it is more of a realistic event\nconst clearInputEvent = {\n target: { value: '' },\n} as ChangeEvent<HTMLInputElement>;\n\nexport const InputContext =\n createContext<ContextValue<InputProps, HTMLInputElement>>(null);\n\n/**\n * Input - A flexible text input component with enhanced features\n *\n * Provides a customizable text input with automatic sizing, clear functionality,\n * and integrated validation states. Supports various styling options and integrates\n * seamlessly with form field components for comprehensive form experiences.\n *\n * @example\n * // Basic input\n * <Input placeholder=\"Enter text...\" />\n *\n * @example\n * // Input with clear button\n * <Input\n * defaultValue=\"Clearable text\"\n * classNames={{ clear: \"hover:bg-info-bold\" }}\n * />\n */\nexport function Input({ ref, ...props }: InputProps) {\n /**\n * It is necessary to pull in the AriaInputContext to capture defaultValue,\n * value & onChange props that may be supplied by a Field component\n *\n * These are necessary due to the implementation of useControlledState for\n * the purposes of supporting the clear button and to capture the length\n * of the current value for the autoSize feature\n */\n [props, ref] = useContextProps(props, ref ?? null, AriaInputContext);\n [props, ref] = useContextProps({ ...props }, ref ?? null, InputContext);\n\n const {\n classNames,\n autoSize,\n defaultValue = '',\n disabled,\n placeholder,\n readOnly,\n required,\n size = 'medium',\n type = InputStylesDefaults.type,\n value: valueProp,\n isClearable,\n isInvalid,\n onChange,\n onKeyDown,\n ...rest\n } = props;\n\n const [value, setValue] = useControlledState(valueProp, defaultValue);\n const length = (`${value ?? ''}`.length || placeholder?.length) ?? 0;\n const isEmpty = value == null || value === '';\n\n function handleChange(event: ChangeEvent<HTMLInputElement>) {\n onChange?.(event);\n\n if (!event.defaultPrevented) {\n setValue(event.target.value);\n }\n }\n\n return (\n <div\n className={container({\n className: classNames?.container,\n autoSize,\n type,\n isClearable,\n })}\n data-disabled={disabled || null}\n data-empty={isEmpty || null}\n data-invalid={isInvalid || null}\n data-length={length}\n data-placeholder={(!!placeholder && isEmpty) || null}\n data-readonly={readOnly || null}\n data-required={required || null}\n data-size={size}\n >\n <div\n className={sizer({\n className: classNames?.sizer,\n autoSize,\n type,\n isClearable,\n })}\n >\n <AriaInput\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.input, (className) =>\n input({ className, autoSize, type, isClearable }),\n )}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n required={required}\n type={type}\n value={value}\n onChange={handleChange}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n\n if (\n isClearable &&\n !event.defaultPrevented &&\n event.key === 'Escape'\n ) {\n handleChange(clearInputEvent);\n }\n }}\n />\n </div>\n {isClearable && (\n <Button\n className={composeRenderProps(classNames?.clear, (className) =>\n clear({ className, autoSize, type, isClearable }),\n )}\n excludeFromTabOrder\n size='small'\n variant='icon'\n isDisabled={disabled}\n onPress={() => {\n handleChange(clearInputEvent);\n\n ref?.current?.focus();\n }}\n >\n <Icon>\n <CancelFill />\n </Icon>\n </Button>\n )}\n </div>\n );\n}\nInput.displayName = 'Input';\n"]}
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';const t={autoSize:false,type:"text",isClearable:false},a=tv({slots:{container:"group/input grid items-center [--length:attr(data-length_type(<number>),0)] [grid-template-columns:minmax(0,1fr)_min-content]",sizer:["font-display [grid-column:1/-1] [grid-row:1]","group-size-medium/input:text-body-s group-size-small/input:text-body-xs"],input:["block w-full rounded-medium py-xs pr-[calc(var(--room)+var(--spacing-s))] pl-s font-display text-default-light outline outline-interactive","enabled:group-focus-visible-within/input:outline-highlight","enabled:group-hover/input:outline-interactive-hover","enabled:group-invalid/input:outline-serious","disabled:cursor-not-allowed disabled:text-disabled disabled:outline-interactive-disabled disabled:placeholder:text-disabled"],clear:["[grid-column:2/-1] [grid-row:1]","group-size-medium/input:mr-xs group-size-small/input:mr-xxs","enabled:fg-interactive enabled:bg-transparent","enabled:focus-visible:fg-interactive-hover enabled:focus-visible:bg-transparent","enabled:hover:fg-interactive-hover enabled:hover:bg-transparent","group-empty/input:invisible","group-not-empty/input:group-not-focus-within/input:invisible"]},variants:{autoSize:{false:"",true:""},type:{button:"",checkbox:"",color:"",date:"","datetime-local":"",email:"",file:"",hidden:"",image:"",month:"",number:{input:"[appearance:textfield] placeholder:text-default-dark [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"},password:"",radio:"",range:"",reset:"",search:"",submit:"",tel:"",text:"",time:"",url:"",week:""},isClearable:{false:{container:"[--room:0px]"},true:{container:"[--room:20px]"}}},compoundVariants:[{type:["color","date","datetime-local","email","number","password","search","tel","text","time","url"],className:{sizer:["group-size-medium/input:min-w-[160px] group-size-medium/input:max-w-[400px]","group-size-small/input:min-w-[80px] group-size-small/input:max-w-[200px]"]}},{autoSize:true,type:["number","text"],className:{sizer:["group-size-medium/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-s-spacing))+(var(--spacing-s)*2)+var(--room))]","group-size-small/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))] group-size-small/input:min-w-[calc(2ch+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))]"]}}],defaultVariants:t});export{a as InputStyles,t as InputStylesDefaults};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const t={autoSize:false,type:"text",isClearable:false},a=tv({slots:{container:"group/input grid items-center [--length:attr(data-length_type(<number>),0)] [grid-template-columns:minmax(0,1fr)_min-content]",sizer:["font-display [grid-column:1/-1] [grid-row:1]","group-size-medium/input:text-body-s group-size-small/input:text-body-xs"],input:["fg-primary-bold block w-full rounded-medium py-xs pr-[calc(var(--room)+var(--spacing-s))] pl-s font-display outline outline-interactive","enabled:group-focus-visible-within/input:outline-accent-primary-bold","enabled:group-hover/input:outline-interactive-hover","enabled:group-invalid/input:outline-serious-bold","disabled:cursor-not-allowed disabled:text-disabled disabled:outline-interactive-disabled disabled:placeholder:text-disabled"],clear:["[grid-column:2/-1] [grid-row:1]","group-size-medium/input:mr-xs group-size-small/input:mr-xxs","enabled:fg-info-bold enabled:bg-transparent","enabled:focus-visible:fg-info-hover enabled:focus-visible:bg-transparent","enabled:hover:fg-info-hover enabled:hover:bg-transparent","group-empty/input:invisible","group-not-empty/input:group-not-focus-within/input:invisible"]},variants:{autoSize:{false:"",true:""},type:{button:"",checkbox:"",color:"",date:"","datetime-local":"",email:"",file:"",hidden:"",image:"",month:"",number:{input:"placeholder:fg-primary-muted [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"},password:"",radio:"",range:"",reset:"",search:"",submit:"",tel:"",text:"",time:"",url:"",week:""},isClearable:{false:{container:"[--room:0px]"},true:{container:"[--room:20px]"}}},compoundVariants:[{type:["color","date","datetime-local","email","number","password","search","tel","text","time","url"],className:{sizer:["group-size-medium/input:min-w-[160px] group-size-medium/input:max-w-[400px]","group-size-small/input:min-w-[80px] group-size-small/input:max-w-[200px]"]}},{autoSize:true,type:["number","text"],className:{sizer:["group-size-medium/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-s-spacing))+(var(--spacing-s)*2)+var(--room))]","group-size-small/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))] group-size-small/input:min-w-[calc(2ch+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))]"]}}],defaultVariants:t});export{a as InputStyles,t as InputStylesDefaults};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/input/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAA,CAAA,CAAU,CAAA,QACJ,CAAA,KAAA,CAAA,uBAKN,CAAA,KAAA,CAAA,CAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KAAA,CAAA,CACE,SAAA,CAAA,+HAEA,CAAA,KAAA,CAAA,CAAA,8CACA,CAAA,yEAGA,CAAA,CAAA,KAAA,CAAA,CAAA,4IACA,CAAA,4DACA,CAAA,mGAEA,CAAA,6HAGA,CAAA,CAAA,KAAA,CAAA,CAAA,+FAEA,CAAA,+CACA,CAAA,iFACA,CAAA,iEACA,CAAA,4FAIJ,CAAA,CAAU,CACR,SAAU,CACR,QAAO,CACP,CAAA,MACF,EACA,CAAA,IAAM,CACJ,EAAA,CAAA,CAAA,IAAQ,CAAA,CACR,SAAU,CAAA,QACH,CAAA,EACP,CAAA,QACA,CAAA,IAAA,CAAA,EAAA,CAAA,gBACO,CAAA,EACP,MAAM,CAAA,EACN,CAAA,IAAA,CAAQ,EAAA,CACR,MAAO,GACP,CAAA,KAAO,CAAA,EACP,OAAQ,EACN,CAAA,kKAGF,CAAU,CAAA,QACH,GACP,CAAA,KAAO,CAAA,EACP,CAAA,KAAO,CAAA,EACP,OAAQ,EAAA,CACR,MAAA,CAAQ,EAAA,CACR,OACA,EAAA,CAAA,GAAM,CAAA,OACA,CAAA,EACN,CAAA,KACA,EAAA,CAAA,GAAM,CACR,EACA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA,WAEI,CAAA,CAAA,KAAA,CAAA,CAAW,SAAA,CAAA,cAGX,CAAA,CAAA,IAAA,CAAA,CAAW,SAAA,CAAA,mCAOX,CAAA,CAAA,CAAA,IACA,CAAA,CAAA,OACA,CAAA,MAAA,CAAA,gBAEA,CAAA,OACA,CAAA,QAAA,CAAA,UAEA,CAAA,cAEA,CAAA,MACA,CAAA,MAEF,CAAA,KAAA,CAAA,CAAW,+FAGP,CAAA,0EAKJ,CAAA,CAAA,CAAA,CAAU,CAAA,QACH,CAAA,IAAA,CAAA,IAAA,CAAU,CAAA,iBACN,SAEP,CAAA,CAAA,KAAA,CAAA,CAAA,2ZAMR,CAAA,CAAA,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 InputStylesDefaults = {\n autoSize: false,\n type: 'text',\n isClearable: false,\n} as const;\n\nexport const InputStyles = tv({\n slots: {\n container:\n 'group/input grid items-center [--length:attr(data-length_type(<number>),0)] [grid-template-columns:minmax(0,1fr)_min-content]',\n sizer: [\n 'font-display [grid-column:1/-1] [grid-row:1]',\n 'group-size-medium/input:text-body-s group-size-small/input:text-body-xs',\n ],\n input: [\n 'block w-full rounded-medium py-xs pr-[calc(var(--room)+var(--spacing-s))] pl-s font-display text-default-light outline outline-interactive',\n 'enabled:group-focus-visible-within/input:outline-highlight',\n 'enabled:group-hover/input:outline-interactive-hover',\n 'enabled:group-invalid/input:outline-serious',\n 'disabled:cursor-not-allowed disabled:text-disabled disabled:outline-interactive-disabled disabled:placeholder:text-disabled',\n ],\n clear: [\n '[grid-column:2/-1] [grid-row:1]',\n 'group-size-medium/input:mr-xs group-size-small/input:mr-xxs',\n 'enabled:fg-interactive enabled:bg-transparent',\n 'enabled:focus-visible:fg-interactive-hover enabled:focus-visible:bg-transparent',\n 'enabled:hover:fg-interactive-hover enabled:hover:bg-transparent',\n 'group-empty/input:invisible',\n 'group-not-empty/input:group-not-focus-within/input:invisible',\n ],\n },\n variants: {\n autoSize: {\n false: '',\n true: '',\n },\n type: {\n button: '',\n checkbox: '',\n color: '',\n date: '',\n 'datetime-local': '',\n email: '',\n file: '',\n hidden: '',\n image: '',\n month: '',\n number: {\n input:\n '[appearance:textfield] placeholder:text-default-dark [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none',\n },\n password: '',\n radio: '',\n range: '',\n reset: '',\n search: '',\n submit: '',\n tel: '',\n text: '',\n time: '',\n url: '',\n week: '',\n },\n isClearable: {\n false: {\n container: '[--room:0px]',\n },\n true: {\n container: '[--room:20px]',\n },\n },\n },\n compoundVariants: [\n {\n type: [\n 'color',\n 'date',\n 'datetime-local',\n 'email',\n 'number',\n 'password',\n 'search',\n 'tel',\n 'text',\n 'time',\n 'url',\n ],\n className: {\n sizer: [\n 'group-size-medium/input:min-w-[160px] group-size-medium/input:max-w-[400px]',\n 'group-size-small/input:min-w-[80px] group-size-small/input:max-w-[200px]',\n ],\n },\n },\n {\n autoSize: true,\n type: ['number', 'text'],\n className: {\n sizer: [\n 'group-size-medium/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-s-spacing))+(var(--spacing-s)*2)+var(--room))]',\n 'group-size-small/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))] group-size-small/input:min-w-[calc(2ch+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))]',\n ],\n },\n },\n ],\n defaultVariants: InputStylesDefaults,\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/input/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAA,CAAA,CAAU,CAAA,QACJ,CAAA,KAAA,CAAA,uBAKN,CAAA,KAAA,CAAA,CAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KAAA,CAAA,CACE,SAAA,CAAA,+HAEA,CAAA,KAAA,CAAA,CAAA,8CACA,CAAA,yEAGA,CAAA,CAAA,KAAA,CAAA,CAAA,yIACA,CAAA,sEACA,CAAA,wGAEA,CAAA,6HAGA,CAAA,CAAA,KAAA,CAAA,CAAA,+FAEA,CAAA,6CACA,CAAA,0EACA,CAAA,0DACA,CAAA,4FAIJ,CAAA,CAAU,CACR,SAAU,CACR,QAAO,CACP,CAAA,MACF,EACA,CAAA,IAAM,CACJ,EAAA,CAAA,CAAA,IAAQ,CAAA,CACR,SAAU,CAAA,QACH,CAAA,EACP,CAAA,QACA,CAAA,IAAA,CAAA,EAAA,CAAA,gBACO,CAAA,EACP,MAAM,CAAA,EACN,CAAA,IAAA,CAAQ,EAAA,CACR,MAAO,GACP,CAAA,KAAO,CAAA,EACP,OAAQ,EACN,CAAA,iKAGF,CAAU,CAAA,QACH,GACP,CAAA,KAAO,CAAA,EACP,CAAA,KAAO,CAAA,EACP,OAAQ,EAAA,CACR,MAAA,CAAQ,EAAA,CACR,OACA,EAAA,CAAA,GAAM,CAAA,OACA,CAAA,EACN,CAAA,KACA,EAAA,CAAA,GAAM,CACR,EACA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA,WAEI,CAAA,CAAA,KAAA,CAAA,CAAW,SAAA,CAAA,cAGX,CAAA,CAAA,IAAA,CAAA,CAAW,SAAA,CAAA,mCAOX,CAAA,CAAA,CAAA,IACA,CAAA,CAAA,OACA,CAAA,MAAA,CAAA,gBAEA,CAAA,OACA,CAAA,QAAA,CAAA,UAEA,CAAA,cAEA,CAAA,MACA,CAAA,MAEF,CAAA,KAAA,CAAA,CAAW,+FAGP,CAAA,0EAKJ,CAAA,CAAA,CAAA,CAAU,CAAA,QACH,CAAA,IAAA,CAAA,IAAA,CAAU,CAAA,iBACN,SAEP,CAAA,CAAA,KAAA,CAAA,CAAA,2ZAMR,CAAA,CAAA,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 InputStylesDefaults = {\n autoSize: false,\n type: 'text',\n isClearable: false,\n} as const;\n\nexport const InputStyles = tv({\n slots: {\n container:\n 'group/input grid items-center [--length:attr(data-length_type(<number>),0)] [grid-template-columns:minmax(0,1fr)_min-content]',\n sizer: [\n 'font-display [grid-column:1/-1] [grid-row:1]',\n 'group-size-medium/input:text-body-s group-size-small/input:text-body-xs',\n ],\n input: [\n 'fg-primary-bold block w-full rounded-medium py-xs pr-[calc(var(--room)+var(--spacing-s))] pl-s font-display outline outline-interactive',\n 'enabled:group-focus-visible-within/input:outline-accent-primary-bold',\n 'enabled:group-hover/input:outline-interactive-hover',\n 'enabled:group-invalid/input:outline-serious-bold',\n 'disabled:cursor-not-allowed disabled:text-disabled disabled:outline-interactive-disabled disabled:placeholder:text-disabled',\n ],\n clear: [\n '[grid-column:2/-1] [grid-row:1]',\n 'group-size-medium/input:mr-xs group-size-small/input:mr-xxs',\n 'enabled:fg-info-bold enabled:bg-transparent',\n 'enabled:focus-visible:fg-info-hover enabled:focus-visible:bg-transparent',\n 'enabled:hover:fg-info-hover enabled:hover:bg-transparent',\n 'group-empty/input:invisible',\n 'group-not-empty/input:group-not-focus-within/input:invisible',\n ],\n },\n variants: {\n autoSize: {\n false: '',\n true: '',\n },\n type: {\n button: '',\n checkbox: '',\n color: '',\n date: '',\n 'datetime-local': '',\n email: '',\n file: '',\n hidden: '',\n image: '',\n month: '',\n number: {\n input:\n 'placeholder:fg-primary-muted [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none',\n },\n password: '',\n radio: '',\n range: '',\n reset: '',\n search: '',\n submit: '',\n tel: '',\n text: '',\n time: '',\n url: '',\n week: '',\n },\n isClearable: {\n false: {\n container: '[--room:0px]',\n },\n true: {\n container: '[--room:20px]',\n },\n },\n },\n compoundVariants: [\n {\n type: [\n 'color',\n 'date',\n 'datetime-local',\n 'email',\n 'number',\n 'password',\n 'search',\n 'tel',\n 'text',\n 'time',\n 'url',\n ],\n className: {\n sizer: [\n 'group-size-medium/input:min-w-[160px] group-size-medium/input:max-w-[400px]',\n 'group-size-small/input:min-w-[80px] group-size-small/input:max-w-[200px]',\n ],\n },\n },\n {\n autoSize: true,\n type: ['number', 'text'],\n className: {\n sizer: [\n 'group-size-medium/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-s-spacing))+(var(--spacing-s)*2)+var(--room))]',\n 'group-size-small/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))] group-size-small/input:min-w-[calc(2ch+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))]',\n ],\n },\n },\n ],\n defaultVariants: InputStylesDefaults,\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 { LabelProps } from './types.js';
6
6
 
7
7
  declare const LabelContext: react.Context<ContextValue<LabelProps, HTMLLabelElement>>;
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsxs,jsx}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps,Label}from'react-aria-components';import {LabelStyles}from'./styles.js';const o=createContext(null);function t({children:r,...e}){return jsx(o.Provider,{value:e,children:r})}t.displayName="Label.Provider";function a({ref:r,...e}){[e,r]=useContextProps(e,r??null,o);const{children:i,className:s,isDisabled:n,isRequired:l,...p}=e;return jsxs(Label,{...p,className:LabelStyles({className:s}),"data-disabled":n||null,"data-required":l||null,children:[i,!l&&" (optional)"]})}a.displayName="Label",a.Provider=t;export{a as Label,o as LabelContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/label/index.tsx"],"names":["createContext","b","props","u","LabelProvider","ref","useContextProps","rest","P","d","m","isRequired","Label"],"mappings":"+LAyBEA,MAA0D,CAAA,CAAAC,aAAA,CAAI,IAEhE,EAAA,SAAyB,CAAA,CAAA,CAAA,QAAU,CAAA,CAAGC,CAAM,GAC1C,CAAA,CAAA,CAAA,CAAA,OACgBC,GAAA,CAAA,CAAA,CAAA,QAAS,CAAA,CAAA,KAAe,CAAA,CAAA,CAAA,QAE1C,CACAC,CAAAA,CAAc,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,gBAqBrB,CAAA,SAAiB,CAAA,CAAA,CAAAC,GAAK,CAAA,CAAGH,CAAM,GACpC,CAACA,CAAAA,CAAOG,CAAG,CAAA,CAAIC,CAAAA,CAAgBJ,EAAOG,eAAAA,CAAAA,CAAO,CAAA,CAAA,EAAA,IAE7C,CAAA,CAAA,CAAA,CAAA,cAAkB,CAAA,CAAA,CAAA,SAAW,CAAA,CAAA,CAAA,UAAY,CAAA,CAAA,CAAA,UAAY,CAAA,CAAGE,CAAK,GAAIL,CAEjE,CAAA,CAAA,CAAA,CAAA,OACGM,IACE,CAAAC,KAAA,CAAGF,CAAAA,GACJ,CAAA,CAAA,SAAyB,CAAAG,WAAA,CAAA,CAAA,SAAW,CACpC,CAAA,CAAA,CAAA,CAAA,eAA6B,CAAA,CAAA,EAAA,IAC7B,CAAA,eAA6B,CAAA,CAAA,EAAA,IAE5B,CAAA,QACA,CAACC,CAAAA,CAAAA,CAAc,CAAA,CAAA,EAAA,aAItBC,CAAAA,CAAM,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,OACd,CAAA,CAAA,CAAA,QAAWR,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 Label as AriaLabel,\n type ContextValue,\n useContextProps,\n} from 'react-aria-components';\nimport { LabelStyles } from './styles';\nimport type { LabelProps } from './types';\n\nexport const LabelContext =\n createContext<ContextValue<LabelProps, HTMLLabelElement>>(null);\n\nfunction LabelProvider({ children, ...props }: ProviderProps<LabelProps>) {\n return (\n <LabelContext.Provider value={props}>{children}</LabelContext.Provider>\n );\n}\nLabelProvider.displayName = 'Label.Provider';\n\n/**\n * Label - A semantic label component for form elements and content\n *\n * Provides accessible labeling for form controls with automatic handling of\n * required/optional states. Integrates with React Aria form components to\n * ensure proper accessibility and screen reader support.\n *\n * @example\n * // Basic label\n * <Label>Username</Label>\n *\n * @example\n * // Required field label\n * <Label isRequired>Email Address</Label>\n *\n * @example\n * // Disabled label\n * <Label isDisabled>Inactive Field</Label>\n */\nexport function Label({ ref, ...props }: LabelProps) {\n [props, ref] = useContextProps(props, ref ?? null, LabelContext);\n\n const { children, className, isDisabled, isRequired, ...rest } = props;\n\n return (\n <AriaLabel\n {...rest}\n className={LabelStyles({ className })}\n data-disabled={isDisabled || null}\n data-required={isRequired || null}\n >\n {children}\n {!isRequired && ' (optional)'}\n </AriaLabel>\n );\n}\nLabel.displayName = 'Label';\nLabel.Provider = LabelProvider;\n"]}
1
+ {"version":3,"sources":["../../../src/components/label/index.tsx"],"names":["createContext","b","props","u","LabelProvider","ref","useContextProps","rest","P","d","m","isRequired","Label"],"mappings":"+LAyBEA,MAA0D,CAAA,CAAAC,aAAA,CAAI,IAEhE,EAAA,SAAyB,CAAA,CAAA,CAAA,QAAU,CAAA,CAAGC,CAAM,GAC1C,CAAA,CAAA,CAAA,CAAA,OACgBC,GAAA,CAAA,CAAA,CAAA,QAAS,CAAA,CAAA,KAAe,CAAA,CAAA,CAAA,QAE1C,CACAC,CAAAA,CAAc,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,gBAqBrB,CAAA,SAAiB,CAAA,CAAA,CAAAC,GAAK,CAAA,CAAGH,CAAM,GACpC,CAACA,CAAAA,CAAOG,CAAG,CAAA,CAAIC,CAAAA,CAAgBJ,EAAOG,eAAAA,CAAAA,CAAO,CAAA,CAAA,EAAA,IAE7C,CAAA,CAAA,CAAA,CAAA,cAAkB,CAAA,CAAA,CAAA,SAAW,CAAA,CAAA,CAAA,UAAY,CAAA,CAAA,CAAA,UAAY,CAAA,CAAGE,CAAK,GAAIL,CAEjE,CAAA,CAAA,CAAA,CAAA,OACGM,IACE,CAAAC,KAAA,CAAGF,CAAAA,GACJ,CAAA,CAAA,SAAyB,CAAAG,WAAA,CAAA,CAAA,SAAW,CACpC,CAAA,CAAA,CAAA,CAAA,eAA6B,CAAA,CAAA,EAAA,IAC7B,CAAA,eAA6B,CAAA,CAAA,EAAA,IAE5B,CAAA,QACA,CAACC,CAAAA,CAAAA,CAAc,CAAA,CAAA,EAAA,aAItBC,CAAAA,CAAM,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,OACd,CAAA,CAAA,CAAA,QAAWR,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 Label as AriaLabel,\n type ContextValue,\n useContextProps,\n} from 'react-aria-components';\nimport { LabelStyles } from './styles';\nimport type { ProviderProps } from '@/lib/types';\nimport type { LabelProps } from './types';\n\nexport const LabelContext =\n createContext<ContextValue<LabelProps, HTMLLabelElement>>(null);\n\nfunction LabelProvider({ children, ...props }: ProviderProps<LabelProps>) {\n return (\n <LabelContext.Provider value={props}>{children}</LabelContext.Provider>\n );\n}\nLabelProvider.displayName = 'Label.Provider';\n\n/**\n * Label - A semantic label component for form elements and content\n *\n * Provides accessible labeling for form controls with automatic handling of\n * required/optional states. Integrates with React Aria form components to\n * ensure proper accessibility and screen reader support.\n *\n * @example\n * // Basic label\n * <Label>Username</Label>\n *\n * @example\n * // Required field label\n * <Label isRequired>Email Address</Label>\n *\n * @example\n * // Disabled label\n * <Label isDisabled>Inactive Field</Label>\n */\nexport function Label({ ref, ...props }: LabelProps) {\n [props, ref] = useContextProps(props, ref ?? null, LabelContext);\n\n const { children, className, isDisabled, isRequired, ...rest } = props;\n\n return (\n <AriaLabel\n {...rest}\n className={LabelStyles({ className })}\n data-disabled={isDisabled || null}\n data-required={isRequired || null}\n >\n {children}\n {!isRequired && ' (optional)'}\n </AriaLabel>\n );\n}\nLabel.displayName = 'Label';\nLabel.Provider = LabelProvider;\n"]}
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';const t=tv({base:["group/label text-header-s","enabled:fg-default-light","disabled:fg-disabled"]});export{t as LabelStyles};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const l=tv({base:["group/label text-header-s","enabled:fg-primary-bold","disabled:fg-disabled"]});export{l as LabelStyles};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/label/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAM,CACJ,CAAAA,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,2BACA,CAAA,0BACA,CAAA,sBAEH,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 LabelStyles = tv({\n base: [\n 'group/label text-header-s',\n 'enabled:fg-default-light',\n 'disabled:fg-disabled',\n ],\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/label/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAM,CACJ,CAAAA,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,2BACA,CAAA,yBACA,CAAA,sBAEH,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 LabelStyles = tv({\n base: [\n 'group/label text-header-s',\n 'enabled:fg-primary-bold',\n 'disabled:fg-disabled',\n ],\n});\n"]}
@@ -0,0 +1,9 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { LinesProps } from './types.js';
3
+ import 'react';
4
+ import 'tailwind-variants';
5
+ import './styles.js';
6
+
7
+ declare function Lines({ className, size, variant, isVisible, }: LinesProps): react_jsx_runtime.JSX.Element;
8
+
9
+ export { Lines };
@@ -0,0 +1,2 @@
1
+ import {jsx}from'react/jsx-runtime';import {LinesStyles}from'./styles.js';function m({className:e,size:s="medium",variant:i,isVisible:o=true}){return jsx("div",{className:LinesStyles({className:e,variant:i,isVisible:o}),"data-size":s})}export{m as Lines};//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/lines/index.tsx"],"names":["t","r"],"mappings":"0EAeO,SACL,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,IAAO,CAAA,CAAA,CAAA,QACP,CAAA,OACA,CAAA,CAAA,CAAA,SAAY,CACd,CAAA,CAAe,IACb,CAAA,CAAA,CAAA,OACGA,GAAA,CAAA,KACC,CAAA,CAAA,SAAyB,CAAAC,WAAA,CAAA,CAAA,SAAW,CAAA,CAAA,CAAA,OAAS,CAAA,CAAA,CAAA,SAAW,CACxD,CAAA,CAAA,CAAA,CAAA,WAGN,CAAA,CAAA,CAAA,CAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { LinesStyles } from './styles';\nimport type { LinesProps } from './types';\n\nexport function Lines({\n className,\n size = 'medium',\n variant,\n isVisible = true,\n}: LinesProps) {\n return (\n <div\n className={LinesStyles({ className, variant, isVisible })}\n data-size={size}\n />\n );\n}\n"]}
@@ -0,0 +1,32 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+
3
+ declare const LinesStyles: tailwind_variants.TVReturnType<{
4
+ variant: {
5
+ branch: string[];
6
+ vert: string[];
7
+ last: string[];
8
+ };
9
+ isVisible: {
10
+ false: string;
11
+ };
12
+ }, undefined, "size-large:h-xxl size-medium:min-h-xl size-small:min-h-l", {
13
+ variant: {
14
+ branch: string[];
15
+ vert: string[];
16
+ last: string[];
17
+ };
18
+ isVisible: {
19
+ false: string;
20
+ };
21
+ }, undefined, tailwind_variants.TVReturnType<{
22
+ variant: {
23
+ branch: string[];
24
+ vert: string[];
25
+ last: string[];
26
+ };
27
+ isVisible: {
28
+ false: string;
29
+ };
30
+ }, undefined, "size-large:h-xxl size-medium:min-h-xl size-small:min-h-l", unknown, unknown>>;
31
+
32
+ export { LinesStyles };
@@ -0,0 +1,2 @@
1
+ import {tv}from'./../../lib/utils.js';const a=tv({base:"size-large:h-xxl size-medium:min-h-xl size-small:min-h-l",variants:{variant:{branch:["bg-position-[center,center_right] [background-repeat:repeat-y,no-repeat] [background-size:1px_4px,50%_1px]","bg-[repeating-linear-gradient(to_bottom,var(--outline-static)_0%,var(--outline-static)_1px,transparent_1px,transparent_4px),repeating-linear-gradient(to_right,var(--outline-static)_0%,var(--outline-static)_1px,transparent_1px,transparent_4px)]"],vert:["bg-center bg-size-[1px_4px] bg-repeat-y","bg-[repeating-linear-gradient(to_bottom,var(--outline-static)_0%,var(--outline-static)_1px,transparent_1px,transparent_4px)]"],last:["bg-position-[center_top,center_right] [background-repeat:no-repeat] [background-size:1px_50%,50%_1px]","bg-[repeating-linear-gradient(to_bottom,var(--outline-static)_0%,var(--outline-static)_1px,transparent_1px,transparent_4px),repeating-linear-gradient(to_right,var(--outline-static)_0%,var(--outline-static)_1px,transparent_1px,transparent_4px)]"]},isVisible:{false:"bg-none"}}});export{a as LinesStyles};//# sourceMappingURL=styles.js.map
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/lines/styles.ts"],"names":["t"],"mappings":"sCAeE,MAAM,CAAA,CAAAA,EAAA,CAAA,CAAA,IAAA,CAAA,0DACI,CACR,QAAS,CACP,CAAA,OACE,CAAA,CAAA,MAAA,CAAA,CAAA,4GACA,CAAA,qPAGA,CAAA,CAAA,IAAA,CAAA,CAAA,yCACA,CAAA,8HAGA,CAAA,CAAA,IAAA,CAAA,CAAA,uGACA,CAAA,wPAGO,SACF,CAAA,CAAA,KACT,CACF,SACD,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 LinesStyles = tv({\n base: 'size-large:h-xxl size-medium:min-h-xl size-small:min-h-l',\n variants: {\n variant: {\n branch: [\n 'bg-position-[center,center_right] [background-repeat:repeat-y,no-repeat] [background-size:1px_4px,50%_1px]',\n 'bg-[repeating-linear-gradient(to_bottom,var(--outline-static)_0%,var(--outline-static)_1px,transparent_1px,transparent_4px),repeating-linear-gradient(to_right,var(--outline-static)_0%,var(--outline-static)_1px,transparent_1px,transparent_4px)]',\n ],\n vert: [\n 'bg-center bg-size-[1px_4px] bg-repeat-y',\n 'bg-[repeating-linear-gradient(to_bottom,var(--outline-static)_0%,var(--outline-static)_1px,transparent_1px,transparent_4px)]',\n ],\n last: [\n 'bg-position-[center_top,center_right] [background-repeat:no-repeat] [background-size:1px_50%,50%_1px]',\n 'bg-[repeating-linear-gradient(to_bottom,var(--outline-static)_0%,var(--outline-static)_1px,transparent_1px,transparent_4px),repeating-linear-gradient(to_right,var(--outline-static)_0%,var(--outline-static)_1px,transparent_1px,transparent_4px)]',\n ],\n },\n isVisible: {\n false: 'bg-none',\n },\n },\n});\n"]}
@@ -0,0 +1,10 @@
1
+ import { ComponentProps } from 'react';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import { LinesStyles } from './styles.js';
4
+
5
+ type LinesProps = Omit<ComponentProps<'div'>, 'size'> & LinesStylesVariants & {
6
+ size?: 'large' | 'medium' | 'small';
7
+ };
8
+ type LinesStylesVariants = VariantProps<typeof LinesStyles>;
9
+
10
+ export type { LinesProps, LinesStylesVariants };
@@ -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"}
@@ -0,0 +1,17 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ProviderProps } from '../../lib/types.js';
3
+ import { LinkProps } from './types.js';
4
+ import 'react';
5
+ import 'react-aria-components';
6
+
7
+ declare function LinkProvider({ children, ...props }: ProviderProps<LinkProps>): react_jsx_runtime.JSX.Element;
8
+ declare namespace LinkProvider {
9
+ var displayName: string;
10
+ }
11
+ declare function Link({ ref, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
12
+ declare namespace Link {
13
+ var displayName: string;
14
+ var Provider: typeof LinkProvider;
15
+ }
16
+
17
+ export { Link };
@@ -0,0 +1,4 @@
1
+ 'use client';
2
+
3
+ import {jsx}from'react/jsx-runtime';import'client-only';import {useContextProps,LinkContext,Link,composeRenderProps}from'react-aria-components';import {LinkStyles}from'./styles.js';function o({children:i,...r}){return jsx(LinkContext.Provider,{value:r,children:i})}o.displayName="Link.Provider";function s({ref:i,...r}){[r,i]=useContextProps(r,i??null,LinkContext);const{allowsVisited:n=false,className:l,isVisited:p=false,...a}=r;return jsx(Link,{...a,ref:i,className:composeRenderProps(l,d=>LinkStyles({className:d})),"data-visited":n&&p||null})}s.displayName="Link",s.Provider=o;export{s as Link};//# sourceMappingURL=index.js.map
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/link/index.tsx"],"names":["props","t","LinkProvider","ref","useContextProps","e","rest","className","LinkStyles","L","isVisited","Link"],"mappings":"qLAwBA,SAAwB,CAAA,CAAA,CAAA,QAAU,CAAA,CAAGA,CAAM,GACzC,WAAoBC,wBAAS,CAAA,CAAA,KAAe,CAAA,CAAA,CAAA,QAC9C,CACAC,CAAAA,CAAa,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,eAEpB,CAAA,YAAgBC,GAAK,CAAA,CAAGH,CAAM,GACnC,CAACA,EAAOG,CAAG,CAAA,CAAIC,EAAgBJ,CAAAA,CAAOG,eAAAA,CAAAA,CAAO,QAE7C,CAAAE,WAAA,CAAA,CAAA,KACE,CAAA,eACA,CAAA,KAAA,CAAA,SACA,CAAA,CAAA,CAAA,SAAY,CAAA,CACZ,CAAA,KAAGC,CACL,GAAIN,CAEJ,CAAA,CAAA,CAAA,CAAA,OACGC,GACE,MAAGK,CAAAA,GACJ,CAAA,CAAKH,GACL,CAAA,CAAA,CAAA,UAA0CI,kBAAAA,CAAAA,CACxCC,CAAAA,CAAW,EAAEC,UAAA,CAAA,CAAA,SACf,CAAA,CACA,CAAA,CAAA,CAAA,CAAA,cAAgCC,CAAAA,CAAAA,EAAc,CAAA,EAAA,IAIpDC,CAAK,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,MACd,CAAA,CAAA,CAAA,QAAWT,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 {\n Link as AriaLink,\n composeRenderProps,\n LinkContext,\n useContextProps,\n} from 'react-aria-components';\nimport { LinkStyles } from './styles';\nimport type { ProviderProps } from '@/lib/types';\nimport type { LinkProps } from './types';\n\nfunction LinkProvider({ children, ...props }: ProviderProps<LinkProps>) {\n return <LinkContext.Provider value={props}>{children}</LinkContext.Provider>;\n}\nLinkProvider.displayName = 'Link.Provider';\n\nexport function Link({ ref, ...props }: LinkProps) {\n [props, ref] = useContextProps(props, ref ?? null, LinkContext);\n\n const {\n allowsVisited = false,\n className,\n isVisited = false,\n ...rest\n } = props;\n\n return (\n <AriaLink\n {...rest}\n ref={ref}\n className={composeRenderProps(className, (className) =>\n LinkStyles({ className }),\n )}\n data-visited={(allowsVisited && isVisited) || null}\n />\n );\n}\nLink.displayName = 'Link';\nLink.Provider = LinkProvider;\n"]}
@@ -0,0 +1,5 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+
3
+ declare const LinkStyles: tailwind_variants.TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, string[], unknown, unknown>>;
4
+
5
+ export { LinkStyles };
@@ -0,0 +1,2 @@
1
+ import {tv}from'./../../lib/utils.js';const a=tv({base:["inline-flex cursor-pointer items-center gap-[0.5ch] px-[0.5ch] align-bottom","enabled:fg-accent-primary-bold","enabled:hover:fg-accent-primary-hover enabled:hover:bg-interactive-bold-hover","enabled:focus-visible:fg-accent-primary-hover enabled:focus-visible:bg-interactive-bold-hover","enabled:pressed:fg-accent-primary-pressed enabled:pressed:bg-interactive-bold-pressed","disabled:fg-disabled disabled:cursor-not-allowed"]});export{a as LinkStyles};//# sourceMappingURL=styles.js.map
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/link/styles.tsx"],"names":["e"],"mappings":"sCAeE,MAAM,CACJ,CAAAA,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,8GAEA,CAAA,+EACA,CAAA,+FACA,CAAA,uFACA,CAAA,kDAEH,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 LinkStyles = tv({\n base: [\n 'inline-flex cursor-pointer items-center gap-[0.5ch] px-[0.5ch] align-bottom',\n 'enabled:fg-accent-primary-bold',\n 'enabled:hover:fg-accent-primary-hover enabled:hover:bg-interactive-bold-hover',\n 'enabled:focus-visible:fg-accent-primary-hover enabled:focus-visible:bg-interactive-bold-hover',\n 'enabled:pressed:fg-accent-primary-pressed enabled:pressed:bg-interactive-bold-pressed',\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n});\n"]}
@@ -0,0 +1,9 @@
1
+ import { RefAttributes } from 'react';
2
+ import { LinkProps as LinkProps$1 } from 'react-aria-components';
3
+
4
+ type LinkProps = LinkProps$1 & RefAttributes<HTMLAnchorElement> & {
5
+ allowsVisited?: boolean;
6
+ isVisited?: boolean;
7
+ };
8
+
9
+ export type { LinkProps };
@@ -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"}
@@ -1,2 +1,4 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';import'client-only';import {isSlottedContextValue}from'./../../lib/utils.js';import f from'@accelint/icons/chevron-right';import {createContext,useContext}from'react';import {useContextProps,Popover,composeRenderProps,Menu,MenuTrigger,SubmenuTrigger,MenuSection,Header,Collection,Separator,Text,MenuItem,Provider,KeyboardContext,DEFAULT_SLOT}from'react-aria-components';import {IconContext,Icon}from'../icon/index.js';import {MenuStyles,MenuStylesDefaults}from'./styles.js';const {menu:U,icon:_,item:q,label:z,description:B,more:G,section:J,header:Q,separator:W,hotkey:X,popover:Y}=MenuStyles(),d=createContext(null);function P({children:t,classNames:e,items:n,title:a,...s}){return jsxs(MenuSection,{...s,className:J({className:e?.section}),children:[a&&jsx(Header,{className:Q({className:e?.header}),children:a}),jsx(Collection,{items:n,children:t})]})}P.displayName="Menu.Section";function S({className:t,...e}){return jsx(Separator,{...e,className:W({className:t})})}S.displayName="Menu.Separator";function N({children:t,className:e,...n}){return jsx(Text,{...n,slot:"label",className:z({className:e}),children:t})}N.displayName="Menu.Item.Label";function v({children:t,className:e,...n}){return jsx(Text,{...n,slot:"description",className:B({className:e}),children:t})}v.displayName="Menu.Item.Description";function m({children:t,classNames:e,color:n="info",...a}){const s=useContext(d),l=(isSlottedContextValue(s)?void 0:s?.variant)??MenuStylesDefaults.variant;return jsx(MenuItem,{...a,className:composeRenderProps(e?.item,r=>q({className:r,variant:l})),"data-color":n,children:composeRenderProps(t,(r,{hasSubmenu:p})=>jsxs(Provider,{values:[[KeyboardContext,{className:X({className:e?.hotkey})}],[IconContext,{slots:{[DEFAULT_SLOT]:{className:_({className:e?.icon})},submenu:{className:G({className:e?.more})}}}]],children:[typeof r=="string"?jsx(Text,{slot:"label",className:e?.text,children:r}):r,p&&jsx(Icon,{slot:"submenu",children:jsx(f,{})})]}))})}m.displayName="Menu.Item",m.Label=N,m.Description=v;function i({ref:t,...e}){[e,t]=useContextProps(e,t??null,d);const{children:n,classNames:a,popoverProps:s,selectionMode:l="single",variant:r=MenuStylesDefaults.variant,...p}=e;return jsx(Popover,{...s,className:composeRenderProps(a?.popover,c=>Y({className:c})),children:jsx(d.Provider,{value:{variant:r},children:jsx(Menu,{...p,ref:t,className:composeRenderProps(a?.menu,c=>U({className:c,variant:r})),selectionMode:l,children:n})})})}i.displayName="Menu",i.Trigger=MenuTrigger,i.Submenu=SubmenuTrigger,i.Item=m,i.Separator=S,i.Section=P;export{i as Menu,d as MenuContext};//# sourceMappingURL=index.js.map
1
+ 'use client';
2
+
3
+ import {jsx,jsxs}from'react/jsx-runtime';import'client-only';import T from'@accelint/icons/chevron-right';import {createContext,useContext}from'react';import {useContextProps,Popover,composeRenderProps,Menu,MenuTrigger,SubmenuTrigger,MenuSection,Header,Collection,Separator,Text,MenuItem,Provider,KeyboardContext,DEFAULT_SLOT}from'react-aria-components';import {isSlottedContextValue}from'./../../lib/utils.js';import {IconContext,Icon}from'../icon/index.js';import {MenuStyles,MenuStylesDefaults}from'./styles.js';const {menu:U,icon:_,item:q,label:z,description:B,more:G,section:J,header:Q,separator:W,hotkey:X,popover:Y}=MenuStyles(),d=createContext(null);function P({children:t,classNames:e,items:n,title:a,...s}){return jsxs(MenuSection,{...s,className:J({className:e?.section}),children:[a&&jsx(Header,{className:Q({className:e?.header}),children:a}),jsx(Collection,{items:n,children:t})]})}P.displayName="Menu.Section";function S({className:t,...e}){return jsx(Separator,{...e,className:W({className:t})})}S.displayName="Menu.Separator";function N({children:t,className:e,...n}){return jsx(Text,{...n,slot:"label",className:z({className:e}),children:t})}N.displayName="Menu.Item.Label";function v({children:t,className:e,...n}){return jsx(Text,{...n,slot:"description",className:B({className:e}),children:t})}v.displayName="Menu.Item.Description";function m({children:t,classNames:e,color:n="info",...a}){const s=useContext(d),l=(isSlottedContextValue(s)?void 0:s?.variant)??MenuStylesDefaults.variant;return jsx(MenuItem,{...a,className:composeRenderProps(e?.item,r=>q({className:r,variant:l})),"data-color":n,children:composeRenderProps(t,(r,{hasSubmenu:p})=>jsxs(Provider,{values:[[KeyboardContext,{className:X({className:e?.hotkey})}],[IconContext,{slots:{[DEFAULT_SLOT]:{className:_({className:e?.icon})},submenu:{className:G({className:e?.more})}}}]],children:[typeof r=="string"?jsx(Text,{slot:"label",className:e?.text,children:r}):r,p&&jsx(Icon,{slot:"submenu",children:jsx(T,{})})]}))})}m.displayName="Menu.Item",m.Label=N,m.Description=v;function i({ref:t,...e}){[e,t]=useContextProps(e,t??null,d);const{children:n,classNames:a,popoverProps:s,selectionMode:l="single",variant:r=MenuStylesDefaults.variant,...p}=e;return jsx(Popover,{...s,className:composeRenderProps(a?.popover,c=>Y({className:c})),children:jsx(d.Provider,{value:{variant:r},children:jsx(Menu,{...p,ref:t,className:composeRenderProps(a?.menu,c=>U({className:c,variant:r})),selectionMode:l,children:n})})})}i.displayName="Menu",i.Trigger=MenuTrigger,i.Submenu=SubmenuTrigger,i.Item=m,i.Separator=S,i.Section=P;export{i as Menu,d as MenuContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/menu/index.tsx"],"names":["label","description","header","MenuStyles","MenuContext","MenuSection","b","children","classNames","jsxs","AriaMenuSection","rest","y","A","title","jsx","o","h","Collection","items","D","MenuSeparator","className","R","M","context","useContext","isSlottedContextValue","C","T","MenuStylesDefaults","x","g","item","u","composeRenderProps","Provider","E","hotkey","k","K","icon","L","more","Text","hasSubmenu","F","MenuItem","MenuDescription","Menu","props","ref","w","popoverProps","V","AriaMenu","menu","SubmenuTrigger"],"mappings":"mgBA8CE,MAAA,CAAA,IAAAA,CACA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,IAAAC,CACA,CAAA,CAAA,KACA,CAAA,CAAA,CAAA,WACA,CAAA,CAAA,CAAAC,IACA,CAAA,CAAA,CAAA,OACA,CAAA,CAAA,CAAA,MACA,CAAA,CAAA,CAAA,SACEC,CAAW,CAAA,CAEFC,MACqD,CAAA,CAAI,CAAA,OAEtE,CAAA,CAAA,CAASC,CAAAA,UAA8B,EACrC,CAAA,CAAA,CAAAC,aAAA,CAAA,IAAAC,EACA,SAAA,CAAAC,CAAAA,CACA,QACA,CAAA,CAAA,CAAA,UAEF,CAAwB,CACtB,CAAA,KAAA,CACEC,CAAAA,CAACC,KACE,CAAGC,CAAAA,CACJ,GAAA,CAAA,CAAA,CAAA,CAAA,OAAqBC,IAAA,CAAAC,WAAA,CAA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AAA,CAAA,CAAKJ,CAAAA,QACL,CAAAnC,GAAA,CAAWmB,IAAAA,CAAmB3B,CAAAA,GAAY,CAAA,CAAA,GAAOc,CAAAA,CAC/CkC,CAAAA,SAAO,CAAAtB,kBAAA,CAAAZ,CAAAA,EAAW,IAAA,CAAA,CAAA,EAAQ,CAAC,CAC7B,CAAA,SACA,CAAA,CAAA,CAAA,OAEC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,aAMN,CAAA,CAAA,CAAA,QAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CACnB2B,CAAAA,CAAK,CAAA,CAAA,CAAA,WACA,CAAA,MAAUQ,CACfR,CAAAA,CAAK,OACLA,CAAAA,WAAK,CAAA,CAAA,CAAA,OAAY5B,CAAAA,cACjB4B,CAAAA,CAAK,CAAA,IAAA,CAAA,CAAA,CAAU5C,CAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\n\nimport 'client-only';\nimport { isSlottedContextValue } from '@/lib/utils';\nimport ChevronRight from '@accelint/icons/chevron-right';\nimport { createContext, useContext } from 'react';\nimport {\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n MenuSection as AriaMenuSection,\n Collection,\n type ContextValue,\n DEFAULT_SLOT,\n Header,\n KeyboardContext,\n MenuTrigger,\n Popover,\n Provider,\n Separator,\n type SeparatorProps,\n SubmenuTrigger,\n Text,\n type TextProps,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon, IconContext } from '../icon';\nimport { MenuStyles, MenuStylesDefaults } from './styles';\nimport type { MenuItemProps, MenuProps, MenuSectionProps } from './types';\n\nconst {\n menu,\n icon,\n item,\n label,\n description,\n more,\n section,\n header,\n separator,\n hotkey,\n popover,\n} = MenuStyles();\n\nexport const MenuContext =\n createContext<ContextValue<MenuProps<unknown>, HTMLDivElement>>(null);\n\nfunction MenuSection<T extends object>({\n children,\n classNames,\n items,\n title,\n ...rest\n}: MenuSectionProps<T>) {\n return (\n <AriaMenuSection\n {...rest}\n className={section({ className: classNames?.section })}\n >\n {title && (\n <Header className={header({ className: classNames?.header })}>\n {title}\n </Header>\n )}\n <Collection items={items}>{children}</Collection>\n </AriaMenuSection>\n );\n}\nMenuSection.displayName = 'Menu.Section';\n\nfunction MenuSeparator({ className, ...rest }: SeparatorProps) {\n return <Separator {...rest} className={separator({ className })} />;\n}\nMenuSeparator.displayName = 'Menu.Separator';\n\nfunction MenuLabel({ children, className, ...rest }: TextProps) {\n return (\n <Text {...rest} slot='label' className={label({ className })}>\n {children}\n </Text>\n );\n}\nMenuLabel.displayName = 'Menu.Item.Label';\n\nfunction MenuDescription({ children, className, ...rest }: TextProps) {\n return (\n <Text {...rest} slot='description' className={description({ className })}>\n {children}\n </Text>\n );\n}\nMenuDescription.displayName = 'Menu.Item.Description';\n\nfunction MenuItem({\n children,\n classNames,\n color = 'info',\n ...rest\n}: MenuItemProps) {\n const context = useContext(MenuContext);\n const variant =\n (isSlottedContextValue(context) ? undefined : context?.variant) ??\n MenuStylesDefaults.variant;\n\n return (\n <AriaMenuItem\n {...rest}\n className={composeRenderProps(classNames?.item, (className) =>\n item({ className, variant }),\n )}\n data-color={color}\n >\n {composeRenderProps(children, (children, { hasSubmenu }) => (\n <Provider\n values={[\n [\n KeyboardContext,\n { className: hotkey({ className: classNames?.hotkey }) },\n ],\n [\n IconContext,\n {\n slots: {\n [DEFAULT_SLOT]: {\n className: icon({ className: classNames?.icon }),\n },\n submenu: { className: more({ className: classNames?.more }) },\n },\n },\n ],\n ]}\n >\n {typeof children === 'string' ? (\n <Text slot='label' className={classNames?.text}>\n {children}\n </Text>\n ) : (\n children\n )}\n {hasSubmenu && (\n <Icon slot='submenu'>\n <ChevronRight />\n </Icon>\n )}\n </Provider>\n ))}\n </AriaMenuItem>\n );\n}\nMenuItem.displayName = 'Menu.Item';\nMenuItem.Label = MenuLabel;\nMenuItem.Description = MenuDescription;\n\n/**\n * Menu - A dropdown menu component with keyboard navigation and selection\n *\n * Provides accessible dropdown menu functionality with support for single and\n * multiple selection modes. Includes sections, separators, and submenu support\n * with comprehensive keyboard navigation and ARIA compliance.\n *\n * @example\n * // Basic menu with trigger\n * <Menu.Trigger>\n * <Button>Open Menu</Button>\n * <Menu>\n * <Menu.Item>Edit</Menu.Item>\n * <Menu.Item>Copy</Menu.Item>\n * <Menu.Item>Delete</Menu.Item>\n * </Menu>\n * </Menu.Trigger>\n *\n * @example\n * // Menu with sections and separators\n * <Menu.Trigger>\n * <Button>Open</Button>\n * <Menu>\n * <Menu.Section>\n * <Menu.Item>New File</Menu.Item>\n * <Menu.Item>Open File</Menu.Item>\n * </Menu.Section>\n *\n * <Menu.Separator />\n *\n * <Menu.Item>Settings</Menu.Item>\n * </Menu>\n * </Menu.Trigger>\n *\n * @example\n * // Menu with selection\n * <Menu.Trigger>\n * <Button>Group</Button>\n * <Menu selectionMode='multiple'>\n * <Menu.Item>Option 1</Menu.Item>\n * <Menu.Item>Option 2</Menu.Item>\n * </Menu>\n * </Menu.Trigger>\n *\n * @example\n * // Menu with submenu\n * <Menu.Trigger>\n * <Button>Actions</Button>\n * <Menu>\n * <Menu.Item>New File</Menu.Item>\n * <Menu.Submenu>\n * <Menu.Item>Export</Menu.Item>\n * <Menu>\n * <Menu.Item>Export as PDF</Menu.Item>\n * <Menu.Item>Export as CSV</Menu.Item>\n * <Menu.Item>Export as JSON</Menu.Item>\n * </Menu>\n * </Menu.Submenu>\n * <Menu.Item>Delete</Menu.Item>\n * </Menu>\n * </Menu.Trigger>\n */\nexport function Menu<T extends object>({ ref, ...props }: MenuProps<T>) {\n [props, ref] = useContextProps(props, ref ?? null, MenuContext);\n\n const {\n children,\n classNames,\n popoverProps,\n selectionMode = 'single',\n variant = MenuStylesDefaults.variant,\n ...rest\n } = props;\n\n return (\n <Popover\n {...popoverProps}\n className={composeRenderProps(classNames?.popover, (className) =>\n popover({ className }),\n )}\n >\n <MenuContext.Provider value={{ variant }}>\n <AriaMenu\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.menu, (className) =>\n menu({ className, variant }),\n )}\n selectionMode={selectionMode}\n >\n {children}\n </AriaMenu>\n </MenuContext.Provider>\n </Popover>\n );\n}\nMenu.displayName = 'Menu';\nMenu.Trigger = MenuTrigger;\nMenu.Submenu = SubmenuTrigger;\nMenu.Item = MenuItem;\nMenu.Separator = MenuSeparator;\nMenu.Section = MenuSection;\n"]}
1
+ {"version":3,"sources":["../../../src/components/menu/index.tsx"],"names":["label","description","header","MenuStyles","MenuContext","MenuSection","f","children","classNames","jsxs","AriaMenuSection","rest","y","g","title","jsx","o","L","Collection","items","A","MenuSeparator","className","E","M","context","useContext","isSlottedContextValue","b","w","MenuStylesDefaults","x","I","item","u","composeRenderProps","Provider","V","hotkey","h","K","icon","D","more","Text","hasSubmenu","F","MenuItem","MenuDescription","Menu","props","ref","j","popoverProps","H","AriaMenu","menu","SubmenuTrigger"],"mappings":"mgBA8CE,MAAA,CAAA,IAAAA,CACA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,IAAAC,CACA,CAAA,CAAA,KACA,CAAA,CAAA,CAAA,WACA,CAAA,CAAA,CAAAC,IACA,CAAA,CAAA,CAAA,OACA,CAAA,CAAA,CAAA,MACA,CAAA,CAAA,CAAA,SACEC,CAAW,CAAA,CAEFC,MACqD,CAAA,CAAI,CAAA,OAEtE,CAAA,CAAA,CAASC,CAAAA,UAA8B,EACrC,CAAA,CAAA,CAAAC,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,CAAAY,kBAAA,CAAA,CAAA,EAAAZ,OAGZ,CAAA,CAAA,EAAA,CAAA,CAAA,CAAAP,SAAa,CAAA,CAAA,CAAA,CAAZ,CAAqB,CAAA,QAAS,CAAAC,GAAA,CAAA,CAAA,CAAA,QAC7B,CAAA,CAAA,KAACuC,CAAAA,CAAA,OAEC,CAAA,CAAA,CAAKJ,CAAAA,QACL,CAAAnC,GAAA,CAAWmB,IAAAA,CAAmB3B,CAAAA,GAAY,CAAA,CAAA,GAAOc,CAAAA,CAC/CkC,CAAAA,SAAO,CAAAtB,kBAAA,CAAAZ,CAAAA,EAAW,IAAA,CAAA,CAAA,EAAQ,CAAC,CAC7B,CAAA,SACA,CAAA,CAAA,CAAA,OAEC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,aAMN,CAAA,CAAA,CAAA,QAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CACnB2B,CAAAA,CAAK,CAAA,CAAA,CAAA,WACA,CAAA,MAAUQ,CACfR,CAAAA,CAAK,OACLA,CAAAA,WAAK,CAAA,CAAA,CAAA,OAAY5B,CAAAA,cACjB4B,CAAAA,CAAK,CAAA,IAAA,CAAA,CAAA,CAAU5C,CAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\n\nimport 'client-only';\nimport ChevronRight from '@accelint/icons/chevron-right';\nimport { createContext, useContext } from 'react';\nimport {\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n MenuSection as AriaMenuSection,\n Collection,\n type ContextValue,\n composeRenderProps,\n DEFAULT_SLOT,\n Header,\n KeyboardContext,\n MenuTrigger,\n Popover,\n Provider,\n Separator,\n type SeparatorProps,\n SubmenuTrigger,\n Text,\n type TextProps,\n useContextProps,\n} from 'react-aria-components';\nimport { isSlottedContextValue } from '@/lib/utils';\nimport { Icon, IconContext } from '../icon';\nimport { MenuStyles, MenuStylesDefaults } from './styles';\nimport type { MenuItemProps, MenuProps, MenuSectionProps } from './types';\n\nconst {\n menu,\n icon,\n item,\n label,\n description,\n more,\n section,\n header,\n separator,\n hotkey,\n popover,\n} = MenuStyles();\n\nexport const MenuContext =\n createContext<ContextValue<MenuProps<unknown>, HTMLDivElement>>(null);\n\nfunction MenuSection<T extends object>({\n children,\n classNames,\n items,\n title,\n ...rest\n}: MenuSectionProps<T>) {\n return (\n <AriaMenuSection\n {...rest}\n className={section({ className: classNames?.section })}\n >\n {title && (\n <Header className={header({ className: classNames?.header })}>\n {title}\n </Header>\n )}\n <Collection items={items}>{children}</Collection>\n </AriaMenuSection>\n );\n}\nMenuSection.displayName = 'Menu.Section';\n\nfunction MenuSeparator({ className, ...rest }: SeparatorProps) {\n return <Separator {...rest} className={separator({ className })} />;\n}\nMenuSeparator.displayName = 'Menu.Separator';\n\nfunction MenuLabel({ children, className, ...rest }: TextProps) {\n return (\n <Text {...rest} slot='label' className={label({ className })}>\n {children}\n </Text>\n );\n}\nMenuLabel.displayName = 'Menu.Item.Label';\n\nfunction MenuDescription({ children, className, ...rest }: TextProps) {\n return (\n <Text {...rest} slot='description' className={description({ className })}>\n {children}\n </Text>\n );\n}\nMenuDescription.displayName = 'Menu.Item.Description';\n\nfunction MenuItem({\n children,\n classNames,\n color = 'info',\n ...rest\n}: MenuItemProps) {\n const context = useContext(MenuContext);\n const variant =\n (isSlottedContextValue(context) ? undefined : context?.variant) ??\n MenuStylesDefaults.variant;\n\n return (\n <AriaMenuItem\n {...rest}\n className={composeRenderProps(classNames?.item, (className) =>\n item({ className, variant }),\n )}\n data-color={color}\n >\n {composeRenderProps(children, (children, { hasSubmenu }) => (\n <Provider\n values={[\n [\n KeyboardContext,\n { className: hotkey({ className: classNames?.hotkey }) },\n ],\n [\n IconContext,\n {\n slots: {\n [DEFAULT_SLOT]: {\n className: icon({ className: classNames?.icon }),\n },\n submenu: { className: more({ className: classNames?.more }) },\n },\n },\n ],\n ]}\n >\n {typeof children === 'string' ? (\n <Text slot='label' className={classNames?.text}>\n {children}\n </Text>\n ) : (\n children\n )}\n {hasSubmenu && (\n <Icon slot='submenu'>\n <ChevronRight />\n </Icon>\n )}\n </Provider>\n ))}\n </AriaMenuItem>\n );\n}\nMenuItem.displayName = 'Menu.Item';\nMenuItem.Label = MenuLabel;\nMenuItem.Description = MenuDescription;\n\n/**\n * Menu - A dropdown menu component with keyboard navigation and selection\n *\n * Provides accessible dropdown menu functionality with support for single and\n * multiple selection modes. Includes sections, separators, and submenu support\n * with comprehensive keyboard navigation and ARIA compliance.\n *\n * @example\n * // Basic menu with trigger\n * <Menu.Trigger>\n * <Button>Open Menu</Button>\n * <Menu>\n * <Menu.Item>Edit</Menu.Item>\n * <Menu.Item>Copy</Menu.Item>\n * <Menu.Item>Delete</Menu.Item>\n * </Menu>\n * </Menu.Trigger>\n *\n * @example\n * // Menu with sections and separators\n * <Menu.Trigger>\n * <Button>Open</Button>\n * <Menu>\n * <Menu.Section>\n * <Menu.Item>New File</Menu.Item>\n * <Menu.Item>Open File</Menu.Item>\n * </Menu.Section>\n *\n * <Menu.Separator />\n *\n * <Menu.Item>Settings</Menu.Item>\n * </Menu>\n * </Menu.Trigger>\n *\n * @example\n * // Menu with selection\n * <Menu.Trigger>\n * <Button>Group</Button>\n * <Menu selectionMode='multiple'>\n * <Menu.Item>Option 1</Menu.Item>\n * <Menu.Item>Option 2</Menu.Item>\n * </Menu>\n * </Menu.Trigger>\n *\n * @example\n * // Menu with submenu\n * <Menu.Trigger>\n * <Button>Actions</Button>\n * <Menu>\n * <Menu.Item>New File</Menu.Item>\n * <Menu.Submenu>\n * <Menu.Item>Export</Menu.Item>\n * <Menu>\n * <Menu.Item>Export as PDF</Menu.Item>\n * <Menu.Item>Export as CSV</Menu.Item>\n * <Menu.Item>Export as JSON</Menu.Item>\n * </Menu>\n * </Menu.Submenu>\n * <Menu.Item>Delete</Menu.Item>\n * </Menu>\n * </Menu.Trigger>\n */\nexport function Menu<T extends object>({ ref, ...props }: MenuProps<T>) {\n [props, ref] = useContextProps(props, ref ?? null, MenuContext);\n\n const {\n children,\n classNames,\n popoverProps,\n selectionMode = 'single',\n variant = MenuStylesDefaults.variant,\n ...rest\n } = props;\n\n return (\n <Popover\n {...popoverProps}\n className={composeRenderProps(classNames?.popover, (className) =>\n popover({ className }),\n )}\n >\n <MenuContext.Provider value={{ variant }}>\n <AriaMenu\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.menu, (className) =>\n menu({ className, variant }),\n )}\n selectionMode={selectionMode}\n >\n {children}\n </AriaMenu>\n </MenuContext.Provider>\n </Popover>\n );\n}\nMenu.displayName = 'Menu';\nMenu.Trigger = MenuTrigger;\nMenu.Submenu = SubmenuTrigger;\nMenu.Item = MenuItem;\nMenu.Separator = MenuSeparator;\nMenu.Section = MenuSection;\n"]}
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';const o={variant:"cozy"},l=tv({slots:{menu:"group/menu overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static-light",item:["group/menu-item flex items-center gap-x-s px-s text-body-s outline outline-transparent",'grid grid-cols-[auto_auto_1fr_auto] [grid-template-areas:"icon_label_space_action"_"icon_description_space_action"]',"enabled:focus-visible:outline-interactive-hover","color-info:enabled:fg-default-light","color-info:enabled:focus-visible:fg-inverse-light color-info:enabled:focus-visible:bg-highlight-bold","color-info:enabled:hover:fg-inverse-light color-info:enabled:hover:bg-highlight-bold","color-info:enabled:open:fg-inverse-light color-info:enabled:open:bg-highlight-bold","color-info:enabled:selected:fg-inverse-light color-info:enabled:selected:bg-highlight-bold","color-serious:enabled:fg-serious","color-serious:enabled:focus-visible:fg-inverse-light color-serious:enabled:focus-visible:bg-serious-bold","color-serious:enabled:hover:fg-inverse-light color-serious:enabled:hover:bg-serious-bold","color-serious:enabled:open:fg-inverse-light color-serious:enabled:open:bg-serious-bold","color-serious:enabled:selected:fg-inverse-light color-serious:enabled:selected:bg-serious-bold","disabled:fg-disabled disabled:bg-transparent"],icon:"[grid-area:icon]",label:"truncate [grid-area:label] group-not-has-[>_[slot=description]]/menu-item:row-span-full",description:["[grid-area:description]","fg-default-dark truncate text-body-xs","group-hover/menu-item:fg-inverse-light group-focus-visible/menu-item:fg-inverse-light","group-disabled/menu-item:fg-disabled"],more:"[grid-area:action]",section:"",header:"fg-default-dark px-s py-xs text-header-xs",separator:"mx-3 my-1 border border-static-light",hotkey:["[grid-area:action]","group-hover/menu-item:fg-inverse-light group-focus-visible/menu-item:fg-inverse-light","group-disabled/menu-item:fg-disabled"],popover:"outline-none"},variants:{variant:{cozy:{item:"pt-s pb-s"},compact:{item:"pt-xs pb-xs"}}},defaultVariants:o});export{l as MenuStyles,o as MenuStylesDefaults};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const o={variant:"cozy"},i=tv({slots:{menu:"group/menu overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static",item:["group/menu-item flex items-center gap-x-s px-s text-body-s outline outline-transparent",'grid grid-cols-[auto_auto_1fr_auto] [grid-template-areas:"icon_label_space_action"_"icon_description_space_action"]',"enabled:focus-visible:outline-interactive-hover","color-info:enabled:fg-primary-bold","color-info:enabled:focus-visible:fg-a11y-on-accent color-info:enabled:focus-visible:bg-accent-primary-bold","color-info:enabled:hover:fg-a11y-on-accent color-info:enabled:hover:bg-accent-primary-bold","color-info:enabled:open:fg-a11y-on-accent color-info:enabled:open:bg-accent-primary-bold","color-info:enabled:selected:fg-a11y-on-accent color-info:enabled:selected:bg-accent-primary-bold","color-serious:enabled:fg-serious-bold","color-serious:enabled:focus-visible:fg-a11y-on-utility color-serious:enabled:focus-visible:bg-serious-bold","color-serious:enabled:hover:fg-a11y-on-utility color-serious:enabled:hover:bg-serious-bold","color-serious:enabled:open:fg-a11y-on-utility color-serious:enabled:open:bg-serious-bold","color-serious:enabled:selected:fg-a11y-on-utility color-serious:enabled:selected:bg-serious-bold","disabled:fg-disabled disabled:bg-transparent"],icon:"[grid-area:icon]",label:"truncate [grid-area:label] group-not-has-[>_[slot=description]]/menu-item:row-span-full",description:["[grid-area:description]","fg-primary-muted truncate text-body-xs","group-hover/menu-item:fg-a11y-on-accent group-focus-visible/menu-item:fg-a11y-on-accent","group-disabled/menu-item:fg-disabled"],more:"[grid-area:action]",section:"",header:"fg-primary-muted px-s py-xs text-header-xs",separator:"mx-3 my-1 outline outline-static",hotkey:["[grid-area:action]","group-hover/menu-item:fg-a11y-on-accent group-focus-visible/menu-item:fg-a11y-on-accent","group-disabled/menu-item:fg-disabled"],popover:"outline-none"},variants:{variant:{cozy:{item:"pt-s pb-s"},compact:{item:"pt-xs pb-xs"}}},defaultVariants:o});export{i as MenuStyles,o as MenuStylesDefaults};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/menu/styles.ts"],"names":["MenuStyles","tv","e"],"mappings":"sCAeE,MAAA,CAAS,CAAA,CAAA,OAGEA,CAAaC,MACxB,CAAA,CAAA,CAAO,CACLC,EAAA,CAAA,CAAA,gJAEE,CAAA,IAAA,CAAA,CAAA,wFACA,CAAA,uKAIA,CAAA,qCACA,CAAA,sGACA,CAAA,sFACA,CAAA,iLAIA,CAAA,kCACA,CAAA,0GACA,CAAA,0FACA,CAAA,yLAGA,CAAA,8CAEI,CAAA,CAAA,IAAA,CAAA,kHAGN,CAAA,WACE,CAAA,CAAA,yBACA,CAAA,+HAEA,CAAA,sCAEI,CAAA,CAAA,IAAA,CAAA,oBACG,CAAA,OACT,CAAQ,EAAA,CAAA,MAAA,CAAA,2CACR,CAAW,6EAGT,CAAA,uFACA,CAAA,sCAEO,CAAA,CAAA,OAAA,CAAA,cAEX,CAAU,CACR,QAAS,CACP,CAAA,aACQ,CAAA,CAAA,IAAA,CAAA,WAEC,CACP,QAAM,CAAA,CAAA,IAAA,CAAA,aAIZ,CAAA,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 MenuStylesDefaults = {\n variant: 'cozy',\n} as const;\n\nexport const MenuStyles = tv({\n slots: {\n menu: 'group/menu overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static-light',\n item: [\n 'group/menu-item flex items-center gap-x-s px-s text-body-s outline outline-transparent',\n 'grid grid-cols-[auto_auto_1fr_auto] [grid-template-areas:\"icon_label_space_action\"_\"icon_description_space_action\"]',\n 'enabled:focus-visible:outline-interactive-hover',\n\n // Info\n 'color-info:enabled:fg-default-light',\n 'color-info:enabled:focus-visible:fg-inverse-light color-info:enabled:focus-visible:bg-highlight-bold',\n 'color-info:enabled:hover:fg-inverse-light color-info:enabled:hover:bg-highlight-bold',\n 'color-info:enabled:open:fg-inverse-light color-info:enabled:open:bg-highlight-bold',\n 'color-info:enabled:selected:fg-inverse-light color-info:enabled:selected:bg-highlight-bold',\n\n // Serious\n 'color-serious:enabled:fg-serious',\n 'color-serious:enabled:focus-visible:fg-inverse-light color-serious:enabled:focus-visible:bg-serious-bold',\n 'color-serious:enabled:hover:fg-inverse-light color-serious:enabled:hover:bg-serious-bold',\n 'color-serious:enabled:open:fg-inverse-light color-serious:enabled:open:bg-serious-bold',\n 'color-serious:enabled:selected:fg-inverse-light color-serious:enabled:selected:bg-serious-bold',\n\n 'disabled:fg-disabled disabled:bg-transparent',\n ],\n icon: '[grid-area:icon]',\n label:\n 'truncate [grid-area:label] group-not-has-[>_[slot=description]]/menu-item:row-span-full',\n description: [\n '[grid-area:description]',\n 'fg-default-dark truncate text-body-xs',\n 'group-hover/menu-item:fg-inverse-light group-focus-visible/menu-item:fg-inverse-light',\n 'group-disabled/menu-item:fg-disabled',\n ],\n more: '[grid-area:action]',\n section: '',\n header: 'fg-default-dark px-s py-xs text-header-xs',\n separator: 'mx-3 my-1 border border-static-light',\n hotkey: [\n '[grid-area:action]',\n 'group-hover/menu-item:fg-inverse-light group-focus-visible/menu-item:fg-inverse-light',\n 'group-disabled/menu-item:fg-disabled',\n ],\n popover: 'outline-none',\n },\n variants: {\n variant: {\n cozy: {\n item: 'pt-s pb-s',\n },\n compact: {\n item: 'pt-xs pb-xs',\n },\n },\n },\n defaultVariants: MenuStylesDefaults,\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/menu/styles.ts"],"names":["MenuStyles","tv","e"],"mappings":"sCAeE,MAAA,CAAS,CAAA,CAAA,OAGEA,CAAaC,MACxB,CAAA,CAAA,CAAO,CACLC,EAAA,CAAA,CAAA,0IAEE,CAAA,IAAA,CAAA,CAAA,wFACA,CAAA,uKAIA,CAAA,oCACA,CAAA,4GACA,CAAA,4FACA,CAAA,6LAIA,CAAA,uCACA,CAAA,4GACA,CAAA,4FACA,CAAA,6LAGA,CAAA,8CAEI,CAAA,CAAA,IAAA,CAAA,kHAGN,CAAA,WACE,CAAA,CAAA,yBACA,CAAA,kIAEA,CAAA,sCAEI,CAAA,CAAA,IAAA,CAAA,oBACG,CAAA,OACT,CAAQ,EAAA,CAAA,MAAA,CAAA,4CACR,CAAW,yEAGT,CAAA,yFACA,CAAA,sCAEO,CAAA,CAAA,OAAA,CAAA,cAEX,CAAU,CACR,QAAS,CACP,CAAA,aACQ,CAAA,CAAA,IAAA,CAAA,WAEC,CACP,QAAM,CAAA,CAAA,IAAA,CAAA,aAIZ,CAAA,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 MenuStylesDefaults = {\n variant: 'cozy',\n} as const;\n\nexport const MenuStyles = tv({\n slots: {\n menu: 'group/menu overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static',\n item: [\n 'group/menu-item flex items-center gap-x-s px-s text-body-s outline outline-transparent',\n 'grid grid-cols-[auto_auto_1fr_auto] [grid-template-areas:\"icon_label_space_action\"_\"icon_description_space_action\"]',\n 'enabled:focus-visible:outline-interactive-hover',\n\n // Info\n 'color-info:enabled:fg-primary-bold',\n 'color-info:enabled:focus-visible:fg-a11y-on-accent color-info:enabled:focus-visible:bg-accent-primary-bold',\n 'color-info:enabled:hover:fg-a11y-on-accent color-info:enabled:hover:bg-accent-primary-bold',\n 'color-info:enabled:open:fg-a11y-on-accent color-info:enabled:open:bg-accent-primary-bold',\n 'color-info:enabled:selected:fg-a11y-on-accent color-info:enabled:selected:bg-accent-primary-bold',\n\n // Serious\n 'color-serious:enabled:fg-serious-bold',\n 'color-serious:enabled:focus-visible:fg-a11y-on-utility color-serious:enabled:focus-visible:bg-serious-bold',\n 'color-serious:enabled:hover:fg-a11y-on-utility color-serious:enabled:hover:bg-serious-bold',\n 'color-serious:enabled:open:fg-a11y-on-utility color-serious:enabled:open:bg-serious-bold',\n 'color-serious:enabled:selected:fg-a11y-on-utility color-serious:enabled:selected:bg-serious-bold',\n\n 'disabled:fg-disabled disabled:bg-transparent',\n ],\n icon: '[grid-area:icon]',\n label:\n 'truncate [grid-area:label] group-not-has-[>_[slot=description]]/menu-item:row-span-full',\n description: [\n '[grid-area:description]',\n 'fg-primary-muted truncate text-body-xs',\n 'group-hover/menu-item:fg-a11y-on-accent group-focus-visible/menu-item:fg-a11y-on-accent',\n 'group-disabled/menu-item:fg-disabled',\n ],\n more: '[grid-area:action]',\n section: '',\n header: 'fg-primary-muted px-s py-xs text-header-xs',\n separator: 'mx-3 my-1 outline outline-static',\n hotkey: [\n '[grid-area:action]',\n 'group-hover/menu-item:fg-a11y-on-accent group-focus-visible/menu-item:fg-a11y-on-accent',\n 'group-disabled/menu-item:fg-disabled',\n ],\n popover: 'outline-none',\n },\n variants: {\n variant: {\n cozy: {\n item: 'pt-s pb-s',\n },\n compact: {\n item: 'pt-xs pb-xs',\n },\n },\n },\n defaultVariants: MenuStylesDefaults,\n});\n"]}
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsx,jsxs}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps,ListBox,composeRenderProps,ListBoxSection,Header,Collection,Text,ListBoxItem}from'react-aria-components';import {Icon}from'../icon/index.js';import {OptionsStyles}from'./styles.js';const {list:S,section:b,header:B,item:v,content:z,icon:H,label:V,description:g}=OptionsStyles(),E=createContext(null);function O({children:t,classNames:e,header:n,items:i}){return jsxs(ListBoxSection,{id:n,className:b({className:e?.section}),children:[jsx(Header,{className:B({className:e?.header}),children:n}),jsx(Collection,{items:i,children:t})]})}O.displayName="Options.Section";function I({className:t,...e}){return jsx("div",{...e,className:z({className:t})})}I.displayName="Options.Item.Content";function r({className:t,...e}){return jsx(Text,{...e,slot:"label",className:V({className:t})})}r.displayName="Options.Item.Label";function x({className:t,...e}){return jsx(Text,{...e,slot:"description",className:g({className:t})})}x.displayName="Options.Item.Description";function p({children:t,classNames:e,color:n="info",textValue:i=typeof t=="string"?t:"",...a}){return jsx(ListBoxItem,{...a,className:composeRenderProps(e?.item,s=>v({className:s})),textValue:i,"data-color":n,children:composeRenderProps(t,s=>jsx(Icon.Provider,{className:H({className:e?.icon}),size:"small",children:typeof s=="string"?jsx(r,{children:s}):s}))})}p.displayName="Options.Item",p.Label=r,p.Content=I,p.Description=x;function l({ref:t,...e}){[e,t]=useContextProps(e,t??null,E);const{children:n,className:i,size:a,...s}=e;return jsx(ListBox,{...s,ref:t,className:composeRenderProps(i,d=>S({className:d})),"data-size":a,children:n})}l.displayName="Options",l.Item=p,l.Section=O;export{l as Options,E as OptionsContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/options/index.tsx"],"names":["item","label","description","D","u","classNames","ListBoxSection","M","y","section","jsx","Header","o","headerClassNames","items","N","className","c","T","textValue","color","children","m","OptionsItemLabel","OptionsItemContent","OptionsItem","OptionsItemDescription","props","useContextProps","ref","OptionsContext","C","ListBox","f","composeRenderProps","size","Options","OptionsSection"],"mappings":"4SAsCE,MAAA,CAAA,IACA,CAAA,CAAA,CAAA,OACA,CAAA,CAAA,CAAAA,aAEA,CAAA,CAAA,CAAA,OACA,CAAA,CAAAC,CAAAA,IACA,CAAA,CAAA,CAAA,KAAA,CAAAC,CACF,YAII,CAAA,CACF,EAEFC,aAAA,EAAA,CAAA,CAAA,CAAAC,aAAA,CAAA,IACE,EAAA,SACA,CAAA,CAAA,CAAA,QAAAC,CAAAA,CACA,WACA,CAAA,CAAA,CAAA,MAEA,CAAA,CAAA,CAAA,KACGC,EAAA,CACC,CAAA,CAAA,OACAC,IAAA,CAAAC,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\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 Collection,\n type ContextValue,\n Header,\n ListBox,\n ListBoxItem,\n ListBoxSection,\n Text,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\nimport { OptionsStyles } from './styles';\nimport type {\n OptionsDataItem,\n OptionsItemProps,\n OptionsItemTextProps,\n OptionsProps,\n OptionsSectionProps,\n} from './types';\n\nconst {\n list,\n section,\n header: headerClassNames,\n item,\n content,\n icon,\n label,\n description,\n} = OptionsStyles();\n\nexport const OptionsContext =\n createContext<ContextValue<OptionsProps<OptionsDataItem>, HTMLDivElement>>(\n null,\n );\n\nfunction OptionsSection<T extends OptionsDataItem>({\n children,\n classNames,\n header,\n items,\n}: OptionsSectionProps<T>) {\n return (\n <ListBoxSection\n id={header}\n className={section({ className: classNames?.section })}\n >\n <Header className={headerClassNames({ className: classNames?.header })}>\n {header}\n </Header>\n <Collection items={items}>{children}</Collection>\n </ListBoxSection>\n );\n}\nOptionsSection.displayName = 'Options.Section';\n\nfunction OptionsItemContent({ className, ...rest }: OptionsItemTextProps) {\n return <div {...rest} className={content({ className })} />;\n}\nOptionsItemContent.displayName = 'Options.Item.Content';\n\nfunction OptionsItemLabel({ className, ...rest }: OptionsItemTextProps) {\n return <Text {...rest} slot='label' className={label({ className })} />;\n}\nOptionsItemLabel.displayName = 'Options.Item.Label';\n\nfunction OptionsItemDescription({ className, ...rest }: OptionsItemTextProps) {\n return (\n <Text {...rest} slot='description' className={description({ className })} />\n );\n}\nOptionsItemDescription.displayName = 'Options.Item.Description';\n\nfunction OptionsItem<T extends OptionsDataItem>({\n children,\n classNames,\n color = 'info',\n textValue = typeof children === 'string' ? children : '',\n ...rest\n}: OptionsItemProps<T>) {\n return (\n <ListBoxItem\n {...rest}\n className={composeRenderProps(classNames?.item, (className) =>\n item({ className }),\n )}\n textValue={textValue}\n data-color={color}\n >\n {composeRenderProps(children, (children) => (\n <Icon.Provider\n className={icon({ className: classNames?.icon })}\n size='small'\n >\n {typeof children === 'string' ? (\n <OptionsItemLabel>{children}</OptionsItemLabel>\n ) : (\n children\n )}\n </Icon.Provider>\n ))}\n </ListBoxItem>\n );\n}\nOptionsItem.displayName = 'Options.Item';\nOptionsItem.Label = OptionsItemLabel;\nOptionsItem.Content = OptionsItemContent;\nOptionsItem.Description = OptionsItemDescription;\n\n/**\n * Options - A flexible list component for selectable items with rich content\n *\n * Provides accessible list functionality with support for selection, sections,\n * and rich item content including labels, descriptions, and icons. Perfect for\n * dropdown lists, menu items, or any selectable list interface.\n *\n * @example\n * // Basic options list\n * <Options>\n * <Options.Item>\n * <Options.Item.Label>Option 1</Options.Item.Label>\n * </Options.Item>\n * <Options.Item>\n * <Options.Item.Label>Option 2</Options.Item.Label>\n * </Options.Item>\n * </Options>\n *\n * @example\n * // Options with descriptions and icons\n * <Options>\n * <Options.Item>\n * <Icon><User /></Icon>\n * <Options.Item.Content>\n * <Options.Item.Label>John Doe</Options.Item.Label>\n * <Options.Item.Description>Senior Developer</Options.Item.Description>\n * </Options.Item.Content>\n * </Options.Item>\n * </Options>\n *\n * @example\n * // Sectioned options\n * <Options>\n * <Options.Section header=\"Recent\">\n * <Options.Item>Recent Item 1</Options.Item>\n * </Options.Section>\n * <Options.Section header=\"All Items\">\n * <Options.Item>All Items 1</Options.Item>\n * </Options.Section>\n * </Options>\n */\nexport function Options<T extends OptionsDataItem>({\n ref,\n ...props\n}: OptionsProps<T>) {\n [props, ref] = useContextProps(props, ref ?? null, OptionsContext);\n\n const { children, className, size, ...rest } = props;\n\n return (\n <ListBox<T>\n {...rest}\n ref={ref}\n className={composeRenderProps(className, (className) =>\n list({ className }),\n )}\n data-size={size}\n >\n {children}\n </ListBox>\n );\n}\nOptions.displayName = 'Options';\nOptions.Item = OptionsItem;\nOptions.Section = OptionsSection;\n"]}
1
+ {"version":3,"sources":["../../../src/components/options/index.tsx"],"names":["item","label","description","D","u","classNames","ListBoxSection","M","y","section","jsx","Header","o","headerClassNames","items","N","className","c","T","textValue","color","children","m","OptionsItemLabel","OptionsItemContent","OptionsItem","OptionsItemDescription","props","useContextProps","ref","OptionsContext","C","ListBox","f","composeRenderProps","size","Options","OptionsSection"],"mappings":"4SAsCE,MAAA,CAAA,IACA,CAAA,CAAA,CAAA,OACA,CAAA,CAAA,CAAAA,aAEA,CAAA,CAAA,CAAA,OACA,CAAA,CAAAC,CAAAA,IACA,CAAA,CAAA,CAAA,KAAA,CAAAC,CACF,YAII,CAAA,CACF,EAEFC,aAAA,EAAA,CAAA,CAAA,CAAAC,aAAA,CAAA,IACE,EAAA,SACA,CAAA,CAAA,CAAA,QAAAC,CAAAA,CACA,WACA,CAAA,CAAA,CAAA,MAEA,CAAA,CAAA,CAAA,KACGC,EAAA,CACC,CAAA,CAAA,OACAC,IAAA,CAAAC,cAAA,CAAA,CAAA,EAAWC,CAAQ,CAAE,CAAA,SAAWJ,CAAAA,CAAAA,CAAY,CAAA,SAE5C,CAAA,CAAA,EAAA,OAAAK,CAACC,EAAA,QAAO,CAAA,CAAAC,GAAWC,OAAiB,CAAE,CAAA,SAAWR,CAAAA,CAAAA,CAAY,CAAA,SAC1D,CAAA,CAAA,EAAA,MACH,CAAA,CACAK,CAAAA,QAAY,CAAA,CAAOI,CAAAA,CAAQ,CAAAF,GAAA,CAAAG,UAAA,CAAA,CAAA,KAAS,CAAA,CAAA,CACtC,QAGW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,+BAEC,CAAA,UAAW,CAAA,CAAA,SACvC,CAAA,CAAA,CAAOL,GAAC,CAAA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BAEJG,CACtBC,CAAAA,CAAY,CAAA,CAAA,OAAA,CAAA,CAAA,CAAcC,CAAAA,CA2CnB,WAA4C,CACjD,WAEF,CAAoB,CAClB,CAACC,GAAU,CAAA,CAAIC,CAAAA,GAAuBC,CAAAA,CAAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAMC,CAAc,CAAAC,eAEjE,CAAA,CAAA,CAAA,CAAA,EAAQ,IAAA,CAAA,CAAA,CAAA,CAAA,KAAU,CAAA,QAAAf,CAAW,WAAc,CAAA,CAAIW,CAAAA,IAE/C,CAAA,CAAA,CAAA,GACGK,EAAA,CACE,CAAA,CAAA,OACIH,GAAAA,CACLI,iBAAWC,CAAmBlB,CAAAA,CAAYA,SACjC,CAAAM,kBAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAC,CACpB,CAAA,aACWa,CAAAA,CAEV,WACH,CAEJ,CACAC,SAAQ,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WACd,CAAA,SACA,CAAA,CAAA,CAAA,IAAUC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport {\n Collection,\n type ContextValue,\n composeRenderProps,\n Header,\n ListBox,\n ListBoxItem,\n ListBoxSection,\n Text,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\nimport { OptionsStyles } from './styles';\nimport type {\n OptionsDataItem,\n OptionsItemProps,\n OptionsItemTextProps,\n OptionsProps,\n OptionsSectionProps,\n} from './types';\n\nconst {\n list,\n section,\n header: headerClassNames,\n item,\n content,\n icon,\n label,\n description,\n} = OptionsStyles();\n\nexport const OptionsContext =\n createContext<ContextValue<OptionsProps<OptionsDataItem>, HTMLDivElement>>(\n null,\n );\n\nfunction OptionsSection<T extends OptionsDataItem>({\n children,\n classNames,\n header,\n items,\n}: OptionsSectionProps<T>) {\n return (\n <ListBoxSection\n id={header}\n className={section({ className: classNames?.section })}\n >\n <Header className={headerClassNames({ className: classNames?.header })}>\n {header}\n </Header>\n <Collection items={items}>{children}</Collection>\n </ListBoxSection>\n );\n}\nOptionsSection.displayName = 'Options.Section';\n\nfunction OptionsItemContent({ className, ...rest }: OptionsItemTextProps) {\n return <div {...rest} className={content({ className })} />;\n}\nOptionsItemContent.displayName = 'Options.Item.Content';\n\nfunction OptionsItemLabel({ className, ...rest }: OptionsItemTextProps) {\n return <Text {...rest} slot='label' className={label({ className })} />;\n}\nOptionsItemLabel.displayName = 'Options.Item.Label';\n\nfunction OptionsItemDescription({ className, ...rest }: OptionsItemTextProps) {\n return (\n <Text {...rest} slot='description' className={description({ className })} />\n );\n}\nOptionsItemDescription.displayName = 'Options.Item.Description';\n\nfunction OptionsItem<T extends OptionsDataItem>({\n children,\n classNames,\n color = 'info',\n textValue = typeof children === 'string' ? children : '',\n ...rest\n}: OptionsItemProps<T>) {\n return (\n <ListBoxItem\n {...rest}\n className={composeRenderProps(classNames?.item, (className) =>\n item({ className }),\n )}\n textValue={textValue}\n data-color={color}\n >\n {composeRenderProps(children, (children) => (\n <Icon.Provider\n className={icon({ className: classNames?.icon })}\n size='small'\n >\n {typeof children === 'string' ? (\n <OptionsItemLabel>{children}</OptionsItemLabel>\n ) : (\n children\n )}\n </Icon.Provider>\n ))}\n </ListBoxItem>\n );\n}\nOptionsItem.displayName = 'Options.Item';\nOptionsItem.Label = OptionsItemLabel;\nOptionsItem.Content = OptionsItemContent;\nOptionsItem.Description = OptionsItemDescription;\n\n/**\n * Options - A flexible list component for selectable items with rich content\n *\n * Provides accessible list functionality with support for selection, sections,\n * and rich item content including labels, descriptions, and icons. Perfect for\n * dropdown lists, menu items, or any selectable list interface.\n *\n * @example\n * // Basic options list\n * <Options>\n * <Options.Item>\n * <Options.Item.Label>Option 1</Options.Item.Label>\n * </Options.Item>\n * <Options.Item>\n * <Options.Item.Label>Option 2</Options.Item.Label>\n * </Options.Item>\n * </Options>\n *\n * @example\n * // Options with descriptions and icons\n * <Options>\n * <Options.Item>\n * <Icon><User /></Icon>\n * <Options.Item.Content>\n * <Options.Item.Label>John Doe</Options.Item.Label>\n * <Options.Item.Description>Senior Developer</Options.Item.Description>\n * </Options.Item.Content>\n * </Options.Item>\n * </Options>\n *\n * @example\n * // Sectioned options\n * <Options>\n * <Options.Section header=\"Recent\">\n * <Options.Item>Recent Item 1</Options.Item>\n * </Options.Section>\n * <Options.Section header=\"All Items\">\n * <Options.Item>All Items 1</Options.Item>\n * </Options.Section>\n * </Options>\n */\nexport function Options<T extends OptionsDataItem>({\n ref,\n ...props\n}: OptionsProps<T>) {\n [props, ref] = useContextProps(props, ref ?? null, OptionsContext);\n\n const { children, className, size, ...rest } = props;\n\n return (\n <ListBox<T>\n {...rest}\n ref={ref}\n className={composeRenderProps(className, (className) =>\n list({ className }),\n )}\n data-size={size}\n >\n {children}\n </ListBox>\n );\n}\nOptions.displayName = 'Options';\nOptions.Item = OptionsItem;\nOptions.Section = OptionsSection;\n"]}
@@ -67,6 +67,6 @@ declare const OptionsStyles: tailwind_variants.TVReturnType<{
67
67
  icon: string[];
68
68
  label: string[];
69
69
  description: string[];
70
- }, undefined, unknown, unknown, undefined>>;
70
+ }, undefined, unknown, unknown>>;
71
71
 
72
72
  export { OptionsStyles };
@@ -1,2 +1,2 @@
1
- import {tv}from'tailwind-variants';const i=tv({slots:{list:"group/options max-h-[200px] overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static-light",section:"mt-s",header:"m-xs my-s text-default-dark text-header-xs",item:["group/options-item fg-default-light flex items-center gap-s p-s text-body-s outline outline-transparent","group-size-small/options:pt-xs group-size-small/options:pb-xs","group-size-large/options:pt-s group-size-large/options:pb-s","enabled:cursor-pointer","enabled:hover:fg-inverse-light","enabled:focus-visible:fg-inverse-light enabled:focus-visible:outline-interactive-hover","enabled:focus-visible:color-info:bg-highlight-bold","enabled:hover:color-info:bg-highlight-bold","enabled:hover:color-serious:bg-serious-bold","enabled:focus-visible:color-serious:bg-serious-bold","disabled:fg-disabled disabled:cursor-not-allowed disabled:bg-transparent"],content:"flex min-w-0 flex-auto flex-col gap-xxs",icon:["group-enabled/options-item:group-color-info/options-item:fg-default-light","group-enabled/options-item:group-hover/options-item:group-color-info/options-item:fg-inverse-light","group-enabled/options-item:group-focus-visible/options-item:group-color-info/options-item:fg-inverse-light","group-enabled/options-item:group-color-serious/options-item:fg-serious","group-enabled/options-item:group-hover/options-item:group-color-serious/options-item:fg-inverse-light","group-enabled/options-item:group-focus-visible/options-item:group-color-serious/options-item:fg-inverse-light"],label:["truncate","group-enabled/options-item:group-color-info/options-item:fg-default-light","group-enabled/options-item:group-hover/options-item:group-color-info/options-item:fg-inverse-light","group-enabled/options-item:group-focus-visible/options-item:group-color-info/options-item:fg-inverse-light","group-enabled/options-item:group-color-serious/options-item:fg-serious","group-enabled/options-item:group-hover/options-item:group-color-serious/options-item:fg-inverse-light","group-enabled/options-item:group-focus-visible/options-item:group-color-serious/options-item:fg-inverse-light"],description:["group-enabled/options-item:fg-default-dark truncate text-body-xs","group-enabled/options-item:group-hover/options-item:fg-inverse-light","group-enabled/options-item:group-focus-visible/options-item:fg-inverse-light","group-disabled/options-item:fg-disabled"]}});export{i as OptionsStyles};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const i=tv({slots:{list:"group/options max-h-[200px] overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static",section:"mt-s",header:"fg-primary-muted m-xs my-s text-header-xs",item:["group/options-item fg-primary-bold flex items-center gap-s p-s text-body-s outline outline-transparent","group-size-small/options:pt-xs group-size-small/options:pb-xs","group-size-large/options:pt-s group-size-large/options:pb-s","enabled:cursor-pointer","enabled:hover:fg-a11y-on-accent","enabled:focus-visible:fg-a11y-on-accent enabled:focus-visible:outline-interactive-hover","enabled:focus-visible:color-info:bg-accent-primary-bold","enabled:hover:color-info:bg-accent-primary-bold","enabled:hover:color-serious:bg-serious-bold","enabled:focus-visible:color-serious:bg-serious-bold","disabled:fg-disabled disabled:cursor-not-allowed disabled:bg-transparent"],content:"flex min-w-0 flex-auto flex-col gap-xxs",icon:["group-enabled/options-item:group-color-info/options-item:fg-primary-bold","group-enabled/options-item:group-hover/options-item:group-color-info/options-item:fg-a11y-on-accent","group-enabled/options-item:group-focus-visible/options-item:group-color-info/options-item:fg-a11y-on-accent","group-enabled/options-item:group-color-serious/options-item:fg-serious-bold","group-enabled/options-item:group-hover/options-item:group-color-serious/options-item:fg-a11y-on-accent","group-enabled/options-item:group-focus-visible/options-item:group-color-serious/options-item:fg-a11y-on-accent"],label:["truncate","group-enabled/options-item:group-color-info/options-item:fg-primary-bold","group-enabled/options-item:group-hover/options-item:group-color-info/options-item:fg-a11y-on-accent","group-enabled/options-item:group-focus-visible/options-item:group-color-info/options-item:fg-a11y-on-accent","group-enabled/options-item:group-color-serious/options-item:fg-serious-bold","group-enabled/options-item:group-hover/options-item:group-color-serious/options-item:fg-a11y-on-accent","group-enabled/options-item:group-focus-visible/options-item:group-color-serious/options-item:fg-a11y-on-accent"],description:["group-enabled/options-item:fg-primary-muted truncate text-body-xs","group-enabled/options-item:group-hover/options-item:fg-a11y-on-accent","group-enabled/options-item:group-focus-visible/options-item:fg-a11y-on-accent","group-disabled/options-item:fg-disabled"]}});export{i as OptionsStyles};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map