@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 +1 @@
1
- {"version":3,"sources":["../../../src/components/select-field/index.tsx"],"names":["SelectFieldStyles","createContext","SelectFieldProvider","children","props","H","z","jsx","SelectField","SelectFieldContext","classNames","errorMessageProp","errorMessage","showLabel","label","AriaSelect","rest","ref","composeRenderProps","className","e","A","isInvalidProp","size","isRequired","isDisabled","isInvalid","jsxs","Fragment","v","R","labelProp","Button","trigger","T","l","AriaSelectValue","value","Icon","I","ChevronDown","B","M","descriptionProp","error","AriaPopover","E","O","w","q"],"mappings":"ufAoCyD,CAAA,CACvDA,MAGAC,EAA8D,CAAA,eAEvDC,CAAoB,CAC3B,CAAA,KAAA,CAAA,CAAA,CAAAC,KACGC,CACL,CAAA,CAAoC,CAClCC,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AA,CAAA,CAAW/C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,WAAAA,CAAAA,aAAAA,CAAAA,CAAAA,CAAAA,QAAAA,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 ChevronDown from '@accelint/icons/chevron-down';\nimport { createContext } from 'react';\nimport {\n Select as AriaSelect,\n SelectValue as AriaSelectValue,\n type ContextValue,\n FieldError,\n ListLayout,\n Text,\n Virtualizer,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Popover as AriaPopover } from 'react-aria-components';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { Label } from '../label';\nimport { Options } from '../options';\nimport { SelectFieldStyles } from './styles';\nimport type { SelectFieldProps } from './types';\n\nconst { description, error, trigger, label, field, value } =\n SelectFieldStyles();\n\nexport const SelectFieldContext =\n createContext<ContextValue<SelectFieldProps, HTMLDivElement>>(null);\n\nfunction SelectFieldProvider({\n children,\n ...props\n}: ProviderProps<SelectFieldProps>) {\n return (\n <SelectFieldContext.Provider value={props}>\n {children}\n </SelectFieldContext.Provider>\n );\n}\nSelectFieldProvider.displayName = 'SelectField.Provider';\n\n/**\n * SelectField - A dropdown selection component with comprehensive form field features\n *\n * Provides an accessible and feature-rich select dropdown with built-in validation,\n * multiple sizing options, virtualization support for large datasets, and seamless\n * integration with form libraries. Includes label, description, and error messaging\n * capabilities with customizable styling through className props.\n *\n * @example\n * // Basic select field\n * <SelectField label='Country' placeholder='Select a country'>\n * <Options.Item textValue='us'>United States</Options.Item>\n * <Options.Item textValue='ca'>Canada</Options.Item>\n * <Options.Item textValue='uk'>United Kingdom</Options.Item>\n * </SelectField>\n *\n * @example\n * // Select field with validation and description\n * <SelectField\n * label=\"Priority Level\"\n * description=\"Choose the urgency level for this task\"\n * errorMessage={errors.priority}\n * isRequired\n * isInvalid={!!errors.priority}\n * >\n * <Options.Item textValue=\"low\">Low</Options.Item>\n * <Options.Item textValue=\"medium\">Medium</Options.Item>\n * <Options.Item textValue=\"high\">High</Options.Item>\n * </SelectField>\n *\n * @example\n * // Small size select field with custom styling\n * <SelectField\n * size=\"small\"\n * placeholder=\"Quick select\"\n * classNames={{\n * field: \"custom-field-styles\",\n * trigger: \"custom-trigger-styles\"\n * }}\n * >\n * <Options.Item textValue=\"option1\">Option 1</Options.Item>\n * <Options.Item textValue=\"option2\">Option 2</Options.Item>\n * </SelectField>\n */\nexport function SelectField({ ref, ...props }: SelectFieldProps) {\n [props, ref] = useContextProps(props, ref ?? null, SelectFieldContext);\n\n const {\n size = 'medium',\n children,\n classNames,\n description: descriptionProp,\n errorMessage: errorMessageProp,\n label: labelProp,\n layoutOptions,\n isInvalid: isInvalidProp,\n ...rest\n } = props;\n const errorMessage = errorMessageProp || null; // Protect against empty string\n const isSmall = size === 'small';\n const showLabel = !isSmall && !!label;\n\n return (\n <AriaSelect\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.field, (className) =>\n field({ className }),\n )}\n isInvalid={isInvalidProp || (errorMessage ? true : undefined)}\n data-size={size}\n >\n {composeRenderProps(\n children,\n (children, { isRequired, isDisabled, isInvalid }) => (\n <>\n {showLabel && (\n <Label\n className={label({ className: classNames?.label })}\n isRequired={isRequired}\n isDisabled={isDisabled}\n >\n {labelProp}\n </Label>\n )}\n <Button\n className={composeRenderProps(classNames?.trigger, (className) =>\n trigger({ className }),\n )}\n variant='outline'\n size={size}\n >\n <AriaSelectValue\n className={value({ className: classNames?.value })}\n />\n <Icon>\n <ChevronDown className='transform group-open/select-field:rotate-180' />\n </Icon>\n </Button>\n {!!descriptionProp && !(isSmall || isInvalid) && (\n <Text\n className={description({ className: classNames?.description })}\n slot='description'\n >\n {descriptionProp}\n </Text>\n )}\n <FieldError\n className={composeRenderProps(classNames?.error, (className) =>\n error({ className }),\n )}\n >\n {errorMessage}\n </FieldError>\n <AriaPopover className='min-w-(--trigger-width)'>\n <Virtualizer layout={ListLayout} layoutOptions={layoutOptions}>\n <Options>{children}</Options>\n </Virtualizer>\n </AriaPopover>\n </>\n ),\n )}\n </AriaSelect>\n );\n}\nSelectField.displayName = 'SelectField';\nSelectField.Provider = SelectFieldProvider;\n"]}
1
+ {"version":3,"sources":["../../../src/components/select-field/index.tsx"],"names":["SelectFieldStyles","createContext","children","props","H","z","jsx","SelectFieldProvider","e","SelectField","SelectFieldContext","D","classNames","errorMessageProp","errorMessage","showLabel","label","AriaSelect","rest","ref","composeRenderProps","className","I","isInvalidProp","size","isRequired","isDisabled","isInvalid","jsxs","Fragment","v","R","labelProp","Button","trigger","T","l","AriaSelectValue","value","Icon","h","ChevronDown","B","O","descriptionProp","error","w","AriaPopover","E","M","q"],"mappings":"qeAoC4C,MAAA,CAAA,WAAa,CAAA,CACvDA,CAAAA,KAGAC,CAAAA,CAA8D,QAEhE,CAAA,CAAA,CAAA,MAA6B,CAC3B,CAAA,KAAA,CAAA,CAAA,CAAAC,KACGC,CACL,CAAA,CAAoC,CAClCC,iBAAA,EAAA,CAAA,CAAA,CAAAC,aACEC,CAAAA,IAAoB,EAAA,SAAS,CAAA,CAAA,CAAA,cAE7B,CAEJ,CACAC,CAAAA,CAAoB,OAAAC,GAAA,CAAA,CAAA,CAAA,0BA8Cb,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAASC,WAAmB,CAAGN,sBACeO,CAAkB,SAGnE,CAAA,CAAA,CAAA,GAAO,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CACP,CA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SAACa,CAAA,CACC,WAAWC,CAAM,cAAyB,CAAA,CAAA,CAAA,QAE5ChC,CAACiC,CAAAA,GAAA,CACCC,WAAA,CAAA,CAAA,SAACC,CAAA,CAAY,WAAU,CAAA,CAAA,EAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAAjC,GAAA,CAAAkC,IAAA,CAAA,CAAA,QAAA,CAAAlC,GAAA,CAAA,CAAA,CAAA,CAAA,SAAA,CAAA,8CAKE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAWI,CAAAA,CAAAA,CAAY,CAAA,CAAA,EAAA,EAAA,CAAA,EAAA,CAAA,CAAY,KAC5D,CAAA+B,IAAA,CAAA,CAAA,SAAK,CAAA,CAAA,CAAA,CAAA,SAEJ,CAAA,CAAAC,EACH,WAGA,CAAA,CAAA,CAAA,IAAWxB,CAAmBR,aAC5BiC,CAAM,WAAExB,CAAU,CAACb,GACrB,CAAAsC,UAEC,WACH,CAAAV,kBACA9B,CAAAA,CAACyC,EAAA,KAAY,CAAA,CAAA,EAAA,CAAA,CAAU,CAAA,SAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,QAAA,CAAA,CACrB,yBAAa,CAAA,kCACV,CAASvC,GAAA,CAAAwC,WAAA,CAAA,CAAA,MAAS,CAAAC,UACrB,CAAA,aAQF,CAAA,CAAA,CAAA,QAAc,CAAAzC,GAAA,CAAA0C,OAAA,CAAA,CAAA,SACd,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW3C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,WAAAA,CAAAA,aAAAA,CAAAA,CAAAA,CAAAA,QAAAA,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 ChevronDown from '@accelint/icons/chevron-down';\nimport { createContext } from 'react';\nimport {\n Popover as AriaPopover,\n Select as AriaSelect,\n SelectValue as AriaSelectValue,\n type ContextValue,\n composeRenderProps,\n FieldError,\n ListLayout,\n Text,\n useContextProps,\n Virtualizer,\n} from 'react-aria-components';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { Label } from '../label';\nimport { Options } from '../options';\nimport { SelectFieldStyles } from './styles';\nimport type { ProviderProps } from '@/lib/types';\nimport type { SelectFieldProps } from './types';\n\nconst { description, error, trigger, label, field, value } =\n SelectFieldStyles();\n\nexport const SelectFieldContext =\n createContext<ContextValue<SelectFieldProps, HTMLDivElement>>(null);\n\nfunction SelectFieldProvider({\n children,\n ...props\n}: ProviderProps<SelectFieldProps>) {\n return (\n <SelectFieldContext.Provider value={props}>\n {children}\n </SelectFieldContext.Provider>\n );\n}\nSelectFieldProvider.displayName = 'SelectField.Provider';\n\n/**\n * SelectField - A dropdown selection component with comprehensive form field features\n *\n * Provides an accessible and feature-rich select dropdown with built-in validation,\n * multiple sizing options, virtualization support for large datasets, and seamless\n * integration with form libraries. Includes label, description, and error messaging\n * capabilities with customizable styling through className props.\n *\n * @example\n * // Basic select field\n * <SelectField label='Country' placeholder='Select a country'>\n * <Options.Item textValue='us'>United States</Options.Item>\n * <Options.Item textValue='ca'>Canada</Options.Item>\n * <Options.Item textValue='uk'>United Kingdom</Options.Item>\n * </SelectField>\n *\n * @example\n * // Select field with validation and description\n * <SelectField\n * label=\"Priority Level\"\n * description=\"Choose the urgency level for this task\"\n * errorMessage={errors.priority}\n * isRequired\n * isInvalid={!!errors.priority}\n * >\n * <Options.Item textValue=\"low\">Low</Options.Item>\n * <Options.Item textValue=\"medium\">Medium</Options.Item>\n * <Options.Item textValue=\"high\">High</Options.Item>\n * </SelectField>\n *\n * @example\n * // Small size select field with custom styling\n * <SelectField\n * size=\"small\"\n * placeholder=\"Quick select\"\n * classNames={{\n * field: \"custom-field-styles\",\n * trigger: \"custom-trigger-styles\"\n * }}\n * >\n * <Options.Item textValue=\"option1\">Option 1</Options.Item>\n * <Options.Item textValue=\"option2\">Option 2</Options.Item>\n * </SelectField>\n */\nexport function SelectField({ ref, ...props }: SelectFieldProps) {\n [props, ref] = useContextProps(props, ref ?? null, SelectFieldContext);\n\n const {\n size = 'medium',\n children,\n classNames,\n description: descriptionProp,\n errorMessage: errorMessageProp,\n label: labelProp,\n layoutOptions,\n isInvalid: isInvalidProp,\n ...rest\n } = props;\n const errorMessage = errorMessageProp || null; // Protect against empty string\n const isSmall = size === 'small';\n const showLabel = !isSmall && !!label;\n\n return (\n <AriaSelect\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.field, (className) =>\n field({ className }),\n )}\n isInvalid={isInvalidProp || (errorMessage ? true : undefined)}\n data-size={size}\n >\n {composeRenderProps(\n children,\n (children, { isRequired, isDisabled, isInvalid }) => (\n <>\n {showLabel && (\n <Label\n className={label({ className: classNames?.label })}\n isRequired={isRequired}\n isDisabled={isDisabled}\n >\n {labelProp}\n </Label>\n )}\n <Button\n className={composeRenderProps(classNames?.trigger, (className) =>\n trigger({ className }),\n )}\n variant='outline'\n size={size}\n >\n <AriaSelectValue\n className={value({ className: classNames?.value })}\n />\n <Icon>\n <ChevronDown className='transform group-open/select-field:rotate-180' />\n </Icon>\n </Button>\n {!!descriptionProp && !(isSmall || isInvalid) && (\n <Text\n className={description({ className: classNames?.description })}\n slot='description'\n >\n {descriptionProp}\n </Text>\n )}\n <FieldError\n className={composeRenderProps(classNames?.error, (className) =>\n error({ className }),\n )}\n >\n {errorMessage}\n </FieldError>\n <AriaPopover className='min-w-(--trigger-width)'>\n <Virtualizer layout={ListLayout} layoutOptions={layoutOptions}>\n <Options>{children}</Options>\n </Virtualizer>\n </AriaPopover>\n </>\n ),\n )}\n </AriaSelect>\n );\n}\nSelectField.displayName = 'SelectField';\nSelectField.Provider = SelectFieldProvider;\n"]}
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';const s=tv({slots:{field:"group/select-field",trigger:["justify-between","size-medium:py-xs group-size-medium/select-field:min-w-[220px]","group-size-small/select-field:fit-content size-small:py-xxs","group-invalid/select-field:enabled:outline-serious","group-focus-visible/select-field:enabled:outline-highlight-bold"],label:"",description:"fg-default-dark group-disabled/select-field:fg-disabled text-body-xs",error:"fg-serious text-body-xs",value:["flex grow items-center font-display","group-size-small/select-field:gap-xs group-size-small/select-field:text-body-xs","group-size-medium/select-field:gap-s group-size-medium/select-field:text-body-s"]}});export{s as SelectFieldStyles};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const s=tv({slots:{field:"group/select-field",trigger:["justify-between","size-medium:py-xs group-size-medium/select-field:min-w-[220px]","group-size-small/select-field:fit-content size-small:py-xxs","group-invalid/select-field:enabled:outline-serious-bold","group-focus-visible/select-field:enabled:outline-accent-primary-bold"],label:"",description:"fg-primary-muted group-disabled/select-field:fg-disabled text-body-xs",error:"fg-serious-bold text-body-xs",value:["flex grow items-center font-display","group-size-small/select-field:gap-xs group-size-small/select-field:text-body-xs","group-size-medium/select-field:gap-s group-size-medium/select-field:text-body-s"]}});export{s as SelectFieldStyles};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/select-field/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KAAO,CAAA,CAAA,KAAA,CAAA,oBAEL,2BACA,CAAA,gEACA,CAAA,6DACA,CAAA,oDACA,CAAA,iEAEK,CACP,CAAA,KAAA,CAAA,EAAA,CAAA,kFAEO,CAAA,KAAA,CAAA,yBAEL,CAAA,KAAA,CAAA,CAAA,qCACA,CAAA,iFACA,CAAA,iFAGL,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 SelectFieldStyles = tv({\n slots: {\n field: 'group/select-field',\n trigger: [\n 'justify-between',\n 'size-medium:py-xs group-size-medium/select-field:min-w-[220px]',\n 'group-size-small/select-field:fit-content size-small:py-xxs',\n 'group-invalid/select-field:enabled:outline-serious',\n 'group-focus-visible/select-field:enabled:outline-highlight-bold',\n ],\n label: '',\n description:\n 'fg-default-dark group-disabled/select-field:fg-disabled text-body-xs',\n error: 'fg-serious text-body-xs',\n value: [\n 'flex grow items-center font-display',\n 'group-size-small/select-field:gap-xs group-size-small/select-field:text-body-xs',\n 'group-size-medium/select-field:gap-s group-size-medium/select-field:text-body-s',\n ],\n },\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/select-field/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KAAO,CAAA,CAAA,KAAA,CAAA,oBAEL,2BACA,CAAA,gEACA,CAAA,6DACA,CAAA,yDACA,CAAA,sEAEK,CACP,CAAA,KAAA,CAAA,EAAA,CAAA,mFAEO,CAAA,KAAA,CAAA,8BAEL,CAAA,KAAA,CAAA,CAAA,qCACA,CAAA,iFACA,CAAA,iFAGL,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 SelectFieldStyles = tv({\n slots: {\n field: 'group/select-field',\n trigger: [\n 'justify-between',\n 'size-medium:py-xs group-size-medium/select-field:min-w-[220px]',\n 'group-size-small/select-field:fit-content size-small:py-xxs',\n 'group-invalid/select-field:enabled:outline-serious-bold',\n 'group-focus-visible/select-field:enabled:outline-accent-primary-bold',\n ],\n label: '',\n description:\n 'fg-primary-muted group-disabled/select-field:fg-disabled text-body-xs',\n error: 'fg-serious-bold text-body-xs',\n value: [\n 'flex grow items-center font-display',\n 'group-size-small/select-field:gap-xs group-size-small/select-field:text-body-xs',\n 'group-size-medium/select-field:gap-s group-size-medium/select-field:text-body-s',\n ],\n },\n});\n"]}
@@ -2,8 +2,8 @@ import { RefAttributes } from 'react';
2
2
  import { SelectProps, VirtualizerProps, ListLayoutOptions, FieldErrorProps } from 'react-aria-components';
3
3
  import { ButtonProps } from '../button/types.js';
4
4
  import { LabelProps } from '../label/types.js';
5
- import '../../lib/types.js';
6
5
  import 'tailwind-variants';
6
+ import '../../lib/types.js';
7
7
  import '../button/styles.js';
8
8
  import 'tailwind-merge';
9
9
 
@@ -0,0 +1,8 @@
1
+ declare const SidenavEventNamespace = "Sidenav";
2
+ declare const SidenavEventTypes: {
3
+ readonly toggle: "Sidenav:toggle";
4
+ readonly open: "Sidenav:open";
5
+ readonly close: "Sidenav:close";
6
+ };
7
+
8
+ export { SidenavEventNamespace, SidenavEventTypes };
@@ -0,0 +1,2 @@
1
+ const e="Sidenav",o={toggle:`${e}:toggle`,open:`${e}:open`,close:`${e}:close`};export{e as SidenavEventNamespace,o as SidenavEventTypes};//# sourceMappingURL=events.js.map
2
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/sidenav/events.ts"],"names":["SidenavEventNamespace","SidenavEventTypes"],"mappings":"AAYO,MAAMA,CAAAA,CAAwB,SAAA,CAExBC,CAAAA,CAAoB,CAC/B,OAAQ,CAAA,EAAGD,CAAqB,CAAA,OAAA,CAAA,CAChC,IAAA,CAAM,GAAGA,CAAqB,CAAA,KAAA,CAAA,CAC9B,KAAA,CAAO,CAAA,EAAGA,CAAqB,CAAA,MAAA,CACjC","file":"events.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\nexport const SidenavEventNamespace = 'Sidenav';\n\nexport const SidenavEventTypes = {\n toggle: `${SidenavEventNamespace}:toggle`,\n open: `${SidenavEventNamespace}:open`,\n close: `${SidenavEventNamespace}:close`,\n} as const;\n"]}
@@ -0,0 +1,64 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { SidenavProps, SidenavTriggerProps, SidenavHeaderProps, SidenavItemProps, SidenavLinkProps, SidenavDividerProps, SidenavAvatarProps, SidenavFooterProps, SidenavContentProps, SidenavMenuProps, SidenavMenuItemProps } from './types.js';
3
+ import '@accelint/bus';
4
+ import '@accelint/core';
5
+ import 'react';
6
+ import 'react-aria-components';
7
+ import './events.js';
8
+
9
+ declare function Sidenav({ id, className, isHiddenWhenClosed, children, ...rest }: SidenavProps): react_jsx_runtime.JSX.Element | null;
10
+ declare namespace Sidenav {
11
+ var displayName: string;
12
+ var Trigger: typeof SidenavTrigger;
13
+ var Header: typeof SidenavHeader;
14
+ var Item: typeof SidenavItem;
15
+ var Link: typeof SidenavLink;
16
+ var Divider: typeof SidenavDivider;
17
+ var Avatar: typeof SidenavAvatar;
18
+ var Footer: typeof SidenavFooter;
19
+ var Content: typeof SidenavContent;
20
+ var Menu: typeof SidenavMenu;
21
+ }
22
+ declare function SidenavContent({ className, children, ...rest }: SidenavContentProps): react_jsx_runtime.JSX.Element;
23
+ declare namespace SidenavContent {
24
+ var displayName: string;
25
+ }
26
+ declare function SidenavHeader({ children, classNames, ...rest }: SidenavHeaderProps): react_jsx_runtime.JSX.Element;
27
+ declare namespace SidenavHeader {
28
+ var displayName: string;
29
+ }
30
+ declare function SidenavFooter(props: SidenavFooterProps): react_jsx_runtime.JSX.Element;
31
+ declare namespace SidenavFooter {
32
+ var displayName: string;
33
+ }
34
+ declare function SidenavTrigger({ children, for: type, ...rest }: SidenavTriggerProps): react_jsx_runtime.JSX.Element;
35
+ declare namespace SidenavTrigger {
36
+ var displayName: string;
37
+ }
38
+ declare function SidenavItem({ children, classNames, textValue, ...rest }: SidenavItemProps): react_jsx_runtime.JSX.Element;
39
+ declare namespace SidenavItem {
40
+ var displayName: string;
41
+ }
42
+ declare function SidenavLink({ children, classNames, textValue, ...rest }: SidenavLinkProps): react_jsx_runtime.JSX.Element;
43
+ declare namespace SidenavLink {
44
+ var displayName: string;
45
+ }
46
+ declare function SidenavDivider({ className, ...rest }: SidenavDividerProps): react_jsx_runtime.JSX.Element;
47
+ declare namespace SidenavDivider {
48
+ var displayName: string;
49
+ }
50
+ declare function SidenavAvatar({ children, className, ...rest }: SidenavAvatarProps): react_jsx_runtime.JSX.Element;
51
+ declare namespace SidenavAvatar {
52
+ var displayName: string;
53
+ }
54
+ declare function SidenavMenu({ icon, title, classNames, children, ...rest }: SidenavMenuProps): react_jsx_runtime.JSX.Element;
55
+ declare namespace SidenavMenu {
56
+ var displayName: string;
57
+ var Item: typeof SidenavMenuItem;
58
+ }
59
+ declare function SidenavMenuItem({ className, children, ...rest }: SidenavMenuItemProps): react_jsx_runtime.JSX.Element;
60
+ declare namespace SidenavMenuItem {
61
+ var displayName: string;
62
+ }
63
+
64
+ export { Sidenav };
@@ -0,0 +1,4 @@
1
+ 'use client';
2
+
3
+ import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'client-only';import {useOn,useEmit}from'@accelint/bus/react';import {uuid,isUUID}from'@accelint/core';import {ChevronLeft,ArrowNortheast,ChevronDown}from'@accelint/icons';import {createContext,useState,useContext,useRef}from'react';import {Provider,HeadingContext,DEFAULT_SLOT,Header,Button,composeRenderProps,Pressable,Text,TextContext,ToggleButton,Link,Heading,Disclosure,DisclosurePanel,DialogTrigger,Popover}from'react-aria-components';import {containsExactChildren,containsAnyOfExactChildren}from'./../../lib/react.js';import {Avatar,AvatarContext}from'../avatar/index.js';import {Icon,IconContext}from'../icon/index.js';import {Tooltip}from'../tooltip/index.js';import {SidenavEventTypes}from'./events.js';import {SidenavStyles}from'./styles.js';const{sidenav:ve,content:pe,header:ce,toggle:ue,heading:ge,divider:Se,item:Ne,text:z,transient:c,avatar:fe,avatarHeading:Pe,avatarIcon:V,avatarText:Te,link:xe,tooltip:O,menu:ye,menuButton:_,menuHeading:Ce,menuPanel:Ie,menuItem:De,panelHeading:Be,panelContent:G}=SidenavStyles(),N=createContext({id:uuid(),isOpen:false});function d({id:a,className:n,isHiddenWhenClosed:i,children:t,...r}){containsExactChildren({children:t,componentName:d.displayName,restrictions:[[A,{min:1,max:1}],[b,{min:1,max:1}],[L,{min:0,max:1}]]});const[o,m]=useState(false);return useOn(SidenavEventTypes.toggle,s=>{s.payload.id===a&&m(Q=>!Q);}),useOn(SidenavEventTypes.open,s=>{!o&&s.payload.id===a&&m(true);}),useOn(SidenavEventTypes.close,s=>{o&&s.payload.id===a&&m(false);}),i&&!o?null:jsx(Provider,{values:[[HeadingContext,{slots:{[DEFAULT_SLOT]:{className:ge({className:c()})},menu:{className:Ce({className:c()})},panel:{className:Be()}}}],[N,{id:a,isOpen:o}]],children:jsx("nav",{...r,className:ve({className:n}),"data-open":o||null,children:t})})}d.displayName="Sidenav";function b({className:a,children:n,...i}){return jsx("div",{...i,className:pe({className:a}),children:n})}b.displayName="Sidenav.Content";function A({children:a,classNames:n,...i}){const t=useEmit(SidenavEventTypes.toggle),{id:r}=useContext(N);return jsx(Header,{...i,className:ce({className:n?.header}),children:jsxs(Button,{className:composeRenderProps(n?.button,o=>ue({className:o})),onPress:()=>t({id:r}),children:[a,jsx(Icon,{className:c(),children:jsx(ChevronLeft,{})})]})})}A.displayName="Sidenav.Header";function L(a){return jsx("footer",{...a})}L.displayName="Sidenav.Footer";function J({children:a,for:n,...i}){const[t,r]=isUUID(n)?["toggle",n]:n.split(":"),o=useEmit(SidenavEventTypes[t]);return jsx(Pressable,{...i,onPress:()=>o({id:r}),children:a})}J.displayName="Sidenav.Trigger";function M({children:a,classNames:n,textValue:i,...t}){containsAnyOfExactChildren({children:a,componentName:M.displayName,restrictions:[[[y,{min:1,max:1}]],[[Icon,{min:1,max:1}],[Text,{min:1,max:1}]]]});const{isOpen:r}=useContext(N),o=useRef(null);return jsx(Provider,{values:[[IconContext,{size:"medium"}],[TextContext,{className:z({className:c()})}]],children:jsxs(Tooltip,{isDisabled:r,children:[jsx(Tooltip.Trigger,{children:jsx(ToggleButton,{...t,ref:o,className:composeRenderProps(n?.button,m=>Ne({className:m})),children:a})}),jsx(Tooltip.Body,{parentRef:o,placement:"right",className:O(),children:i})]})})}M.displayName="Sidenav.Item";function k({children:a,classNames:n,textValue:i,...t}){containsExactChildren({children:a,componentName:k.displayName,restrictions:[[Icon,{min:1,max:1}],[Text,{min:1,max:1}]]});const{isOpen:r}=useContext(N),o=useRef(null);return jsx(Provider,{values:[[TextContext,{className:z({className:c()})}]],children:jsxs(Tooltip,{isDisabled:r,children:[jsx(Tooltip.Trigger,{children:jsx(Link,{...t,ref:o,className:composeRenderProps(n?.button,m=>xe({className:m})),children:composeRenderProps(a,m=>jsxs(Fragment,{children:[m,jsx(Icon,{className:c(),children:jsx(ArrowNortheast,{})})]}))})}),jsxs(Tooltip.Body,{parentRef:o,placement:"right",className:O(),children:[i,jsx(Icon,{children:jsx(ArrowNortheast,{})})]})]})})}k.displayName="Sidenav.Link";function K({className:a,...n}){return jsx("hr",{...n,className:Se({className:a})})}K.displayName="Sidenav.Divider";function y({children:a,className:n,...i}){return containsAnyOfExactChildren({children:a,componentName:y.displayName,restrictions:[[[Avatar,{min:1,max:1}],[Heading,{min:1,max:1}],[Text,{min:0,max:1}]],[[Icon,{min:1,max:1}],[Heading,{min:1,max:1}],[Text,{min:0,max:1}]]]}),jsx(Provider,{values:[[IconContext,{size:"large",className:V()}],[HeadingContext,{className:Pe({className:c()})}],[TextContext,{className:Te({className:c()})}],[AvatarContext,{classNames:{avatar:V()}}]],children:jsx("div",{...i,className:fe({className:n}),children:a})})}y.displayName="Sidenav.Avatar";function C({icon:a,title:n,classNames:i,children:t,...r}){containsExactChildren({children:t,componentName:C.displayName,restrictions:[[I,{min:2}]]});const{isOpen:o}=useContext(N),m=useRef(null);return o?jsxs(Disclosure,{className:composeRenderProps(i?.menu,s=>ye({className:s})),children:[jsxs(Button,{...r,slot:"trigger",className:composeRenderProps(i?.button,s=>_({className:s})),children:[a,jsx(Heading,{slot:"menu",children:n}),jsx(Icon,{className:c({className:i?.icon}),children:jsx(ChevronDown,{className:"transform group-expanded/menu:rotate-180"})})]}),jsx(DisclosurePanel,{className:composeRenderProps(i?.disclosurePanel,s=>s??""),children:jsx("div",{className:G({className:i?.panelContent}),children:t})})]}):jsxs(DialogTrigger,{children:[jsxs(Tooltip,{isDisabled:o,children:[jsx(Tooltip.Trigger,{children:jsx(Button,{...r,ref:m,className:composeRenderProps(i?.button,s=>_({className:s})),children:a})}),jsx(Tooltip.Body,{parentRef:m,placement:"right",className:O(),children:n})]}),jsxs(Popover,{className:composeRenderProps(i?.popoverPanel,s=>Ie({className:s})),placement:"right top",shouldFlip:false,children:[jsx(Heading,{slot:"panel",children:n}),jsx("div",{className:G({className:i?.panelContent}),children:t})]})]})}C.displayName="Sidenav.Menu";function I({className:a,children:n,...i}){return containsExactChildren({children:n,componentName:I.displayName,restrictions:[[Text,{min:1,max:1}]]}),jsx(ToggleButton,{...i,className:composeRenderProps(a,t=>De({className:t})),children:n})}I.displayName="Sidenav.Menu.Item",C.Item=I,d.Trigger=J,d.Header=A,d.Item=M,d.Link=k,d.Divider=K,d.Avatar=y,d.Footer=L,d.Content=b,d.Menu=C;export{d as Sidenav};//# sourceMappingURL=index.js.map
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/sidenav/index.tsx"],"names":["item","text","transient","avatar","tooltip","menuHeading","menuPanel","SidenavStyles","uuid","id","le","$","className","X","isHiddenWhenClosed","children","rest","Sidenav","SidenavContent","isOpen","setIsOpen","useState","useOn","SidenavEventTypes","data","prev","D","S","Provider","DEFAULT_SLOT","heading","e","T","ee","panelHeading","SidenavContext","sidenav","useContext","jsx","Header","h","header","classNames","oe","Button","composeRenderProps","toggle","v","E","emit","l","ChevronLeft","SidenavHeader","u","Z","SidenavFooter","props","SidenavTrigger","isUUID","useEmit","event","Pressable","re","SidenavItem","q","SidenavAvatar","Icon","ref","useRef","g","IconContext","f","B","TextContext","w","jsxs","Tooltip","H","ToggleButton","SidenavLink","textValue","x","Text","Link","te","ArrowNortheast","Ee","F","SidenavDivider","Heading","me","P","avatarIcon","HeadingContext","avatarHeading","R","avatarText","AvatarContext","SidenavMenu","icon","containsExactChildren","Disclosure","menu","menuButton","ChevronDown","Y","ie","DialogTrigger","ae","se","panelContent","SidenavMenuItem","menuItem","U"],"mappings":"yyBAkEE,KAAA,CAAA,kBAEA,CAAA,EAAAA,OACA,CAAAC,EACA,UAAAC,CAAAA,OACA,CAAAC,EAAAA,CACA,OAAA,CAAA,EAAA,CAAA,OACA,CAAA,IAAA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,M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AA1D,GAAA,CAAW+E,OAAAA,CAAa,CAAE,IAAA,CAAA,QAAuB,QAAA,CAAA,CAAA,CAAA,CAAa,CAAC/E,GAAA,CACjE,KAAA,CAAA,CAAA,SAEL,CACF,CAEJ,CACAmE,CAAAA,aAA0B,YAAA,CAAA,CAAA,CAE1B,QAAA,CAASa,CAAAA,CAAgB,CACvB,oBACA,CAAAhG,cAGA,CAAA,SACE,CAAA,CAAA,CAAA,oBAC+B,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,sCACT,CAAE,eACzB,CAAA,CAGCuB,CAAAA,WAEE,CAAA,YAA0C1B,CAAAA,CACxCoG,CAAAA,IAAAA,CAAS,CAAE,GAAA,CAAA,CAAA,CAAA,GAAA,CAAApG,CAAU,CAAC,CACxB,CAAA,CAEC,CAAA,CAAAmB,GAAA,CAAAkF,YAAA,CAAA,CAAA,IACH,CAEJ,SACgB,CAAA/D,kBAAA,CAAA,CAAA,CAAA,CAAc,oBAE9BgD,CAAAA,QAEAjF,CAAAA,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,WACA,CAAA,oBAEO8D,CAAAA,CACf9D,gBACQ,CAAA,CAAA,CAAA,CAAA,CAASgD,MACT,CAAA,CAAA,CAAA,CAAA,CAASV,IACT,CAAA,CAAA,CAAA,CAAA,CAAA,IAAUrC,CAClBD,EAAQ,CAAA,CAAA,OAAOiF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { useEmit, useOn } from '@accelint/bus/react';\nimport { isUUID, type UniqueId, uuid } from '@accelint/core';\nimport { ArrowNortheast, ChevronDown, ChevronLeft } from '@accelint/icons';\nimport { createContext, useContext, useRef, useState } from 'react';\nimport {\n Button,\n composeRenderProps,\n DEFAULT_SLOT,\n DialogTrigger,\n Disclosure,\n DisclosurePanel,\n Header,\n Heading,\n HeadingContext,\n Link,\n Popover,\n Pressable,\n Provider,\n Text,\n TextContext,\n ToggleButton,\n} from 'react-aria-components';\nimport { containsAnyOfExactChildren, containsExactChildren } from '@/lib/react';\nimport { Avatar, AvatarContext } from '../avatar';\nimport { Icon, IconContext } from '../icon';\nimport { Tooltip } from '../tooltip';\nimport { SidenavEventTypes } from './events';\nimport { SidenavStyles } from './styles';\nimport type {\n SidenavAvatarProps,\n SidenavCloseEvent,\n SidenavContentProps,\n SidenavContextValue,\n SidenavDividerProps,\n SidenavEvent,\n SidenavFooterProps,\n SidenavHeaderProps,\n SidenavItemProps,\n SidenavLinkProps,\n SidenavMenuItemProps,\n SidenavMenuProps,\n SidenavOpenEvent,\n SidenavProps,\n SidenavToggleEvent,\n SidenavTriggerProps,\n} from './types';\n\nconst {\n sidenav,\n content,\n header,\n toggle,\n heading,\n divider,\n item,\n text,\n transient,\n avatar,\n avatarHeading,\n avatarIcon,\n avatarText,\n link,\n tooltip,\n menu,\n menuButton,\n menuHeading,\n menuPanel,\n menuItem,\n panelHeading,\n panelContent,\n} = SidenavStyles();\n\nconst SidenavContext = createContext<SidenavContextValue>({\n id: uuid(),\n isOpen: false,\n});\n\nexport function Sidenav({\n id,\n className,\n isHiddenWhenClosed,\n children,\n ...rest\n}: SidenavProps) {\n containsExactChildren({\n children,\n componentName: Sidenav.displayName,\n restrictions: [\n [SidenavHeader, { min: 1, max: 1 }],\n [SidenavContent, { min: 1, max: 1 }],\n [SidenavFooter, { min: 0, max: 1 }],\n ],\n });\n const [isOpen, setIsOpen] = useState(false);\n\n useOn(SidenavEventTypes.toggle, (data: SidenavToggleEvent) => {\n if (data.payload.id === id) {\n setIsOpen((prev) => !prev);\n }\n });\n\n useOn(SidenavEventTypes.open, (data: SidenavOpenEvent) => {\n if (!isOpen && data.payload.id === id) {\n setIsOpen(true);\n }\n });\n\n useOn(SidenavEventTypes.close, (data: SidenavCloseEvent) => {\n if (isOpen && data.payload.id === id) {\n setIsOpen(false);\n }\n });\n\n if (isHiddenWhenClosed && !isOpen) {\n return null;\n }\n\n return (\n <Provider\n values={[\n [\n HeadingContext,\n {\n slots: {\n [DEFAULT_SLOT]: {\n className: heading({ className: transient() }),\n },\n menu: { className: menuHeading({ className: transient() }) },\n panel: { className: panelHeading() },\n },\n },\n ],\n [SidenavContext, { id, isOpen }],\n ]}\n >\n <nav\n {...rest}\n className={sidenav({ className })}\n data-open={isOpen || null}\n >\n {children}\n </nav>\n </Provider>\n );\n}\nSidenav.displayName = 'Sidenav';\n\nfunction SidenavContent({ className, children, ...rest }: SidenavContentProps) {\n return (\n <div {...rest} className={content({ className })}>\n {children}\n </div>\n );\n}\nSidenavContent.displayName = 'Sidenav.Content';\n\nfunction SidenavHeader({ children, classNames, ...rest }: SidenavHeaderProps) {\n const emit = useEmit<SidenavToggleEvent>(SidenavEventTypes.toggle);\n const { id } = useContext(SidenavContext);\n\n return (\n <Header {...rest} className={header({ className: classNames?.header })}>\n <Button\n className={composeRenderProps(classNames?.button, (className) =>\n toggle({ className }),\n )}\n onPress={() => emit({ id })}\n >\n {children}\n <Icon className={transient()}>\n <ChevronLeft />\n </Icon>\n </Button>\n </Header>\n );\n}\nSidenavHeader.displayName = 'Sidenav.Header';\n\nfunction SidenavFooter(props: SidenavFooterProps) {\n return <footer {...props} />;\n}\nSidenavFooter.displayName = 'Sidenav.Footer';\n\nfunction SidenavTrigger({ children, for: type, ...rest }: SidenavTriggerProps) {\n const [event, id] = (isUUID(type) ? ['toggle', type] : type.split(':')) as [\n 'close' | 'open' | 'toggle',\n UniqueId,\n ];\n const emit = useEmit<SidenavEvent>(SidenavEventTypes[event]);\n\n return (\n <Pressable {...rest} onPress={() => emit({ id })}>\n {children}\n </Pressable>\n );\n}\nSidenavTrigger.displayName = 'Sidenav.Trigger';\n\nfunction SidenavItem({\n children,\n classNames,\n textValue,\n ...rest\n}: SidenavItemProps) {\n containsAnyOfExactChildren({\n children,\n componentName: SidenavItem.displayName,\n restrictions: [\n [[SidenavAvatar, { min: 1, max: 1 }]],\n [\n [Icon, { min: 1, max: 1 }],\n [Text, { min: 1, max: 1 }],\n ],\n ],\n });\n\n const { isOpen } = useContext(SidenavContext);\n\n // Implement ref to place tooltip inside Button DOM to enable contextual styling\n const ref = useRef(null);\n\n return (\n <Provider\n values={[\n [IconContext, { size: 'medium' }],\n [TextContext, { className: text({ className: transient() }) }],\n ]}\n >\n <Tooltip isDisabled={isOpen}>\n <Tooltip.Trigger>\n <ToggleButton\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.button, (className) =>\n item({ className }),\n )}\n >\n {children}\n </ToggleButton>\n </Tooltip.Trigger>\n <Tooltip.Body parentRef={ref} placement='right' className={tooltip()}>\n {textValue}\n </Tooltip.Body>\n </Tooltip>\n </Provider>\n );\n}\nSidenavItem.displayName = 'Sidenav.Item';\n\nfunction SidenavLink({\n children,\n classNames,\n textValue,\n ...rest\n}: SidenavLinkProps) {\n containsExactChildren({\n children,\n componentName: SidenavLink.displayName,\n restrictions: [\n [Icon, { min: 1, max: 1 }],\n [Text, { min: 1, max: 1 }],\n ],\n });\n\n const { isOpen } = useContext(SidenavContext);\n\n // Implement ref to place tooltip inside Link DOM to enable contextual styling\n const ref = useRef(null);\n\n return (\n <Provider\n values={[[TextContext, { className: text({ className: transient() }) }]]}\n >\n <Tooltip isDisabled={isOpen}>\n <Tooltip.Trigger>\n <Link\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.button, (className) =>\n link({ className }),\n )}\n >\n {composeRenderProps(children, (children) => (\n <>\n {children}\n <Icon className={transient()}>\n <ArrowNortheast />\n </Icon>\n </>\n ))}\n </Link>\n </Tooltip.Trigger>\n <Tooltip.Body parentRef={ref} placement='right' className={tooltip()}>\n {textValue}\n <Icon>\n <ArrowNortheast />\n </Icon>\n </Tooltip.Body>\n </Tooltip>\n </Provider>\n );\n}\nSidenavLink.displayName = 'Sidenav.Link';\n\nfunction SidenavDivider({ className, ...rest }: SidenavDividerProps) {\n return <hr {...rest} className={divider({ className })} />;\n}\nSidenavDivider.displayName = 'Sidenav.Divider';\n\nfunction SidenavAvatar({ children, className, ...rest }: SidenavAvatarProps) {\n containsAnyOfExactChildren({\n children,\n componentName: SidenavAvatar.displayName,\n restrictions: [\n [\n [Avatar, { min: 1, max: 1 }],\n [Heading, { min: 1, max: 1 }],\n [Text, { min: 0, max: 1 }],\n ],\n [\n [Icon, { min: 1, max: 1 }],\n [Heading, { min: 1, max: 1 }],\n [Text, { min: 0, max: 1 }],\n ],\n ],\n });\n\n return (\n <Provider\n values={[\n [IconContext, { size: 'large', className: avatarIcon() }],\n [\n HeadingContext,\n { className: avatarHeading({ className: transient() }) },\n ],\n [TextContext, { className: avatarText({ className: transient() }) }],\n [AvatarContext, { classNames: { avatar: avatarIcon() } }],\n ]}\n >\n <div {...rest} className={avatar({ className })}>\n {children}\n </div>\n </Provider>\n );\n}\nSidenavAvatar.displayName = 'Sidenav.Avatar';\n\nfunction SidenavMenu({\n icon,\n title,\n classNames,\n children,\n ...rest\n}: SidenavMenuProps) {\n containsExactChildren({\n children,\n componentName: SidenavMenu.displayName,\n restrictions: [[SidenavMenuItem, { min: 2 }]],\n });\n\n const { isOpen } = useContext(SidenavContext);\n const ref = useRef(null);\n\n return isOpen ? (\n <Disclosure\n className={composeRenderProps(classNames?.menu, (className) =>\n menu({ className }),\n )}\n >\n <Button\n {...rest}\n slot='trigger'\n className={composeRenderProps(classNames?.button, (className) =>\n menuButton({ className }),\n )}\n >\n {icon}\n <Heading slot='menu'>{title}</Heading>\n <Icon className={transient({ className: classNames?.icon })}>\n <ChevronDown className='transform group-expanded/menu:rotate-180' />\n </Icon>\n </Button>\n <DisclosurePanel\n className={composeRenderProps(\n classNames?.disclosurePanel,\n (className) => className ?? '',\n )}\n >\n <div className={panelContent({ className: classNames?.panelContent })}>\n {children}\n </div>\n </DisclosurePanel>\n </Disclosure>\n ) : (\n <DialogTrigger>\n <Tooltip isDisabled={isOpen}>\n <Tooltip.Trigger>\n <Button\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.button, (className) =>\n menuButton({ className }),\n )}\n >\n {icon}\n </Button>\n </Tooltip.Trigger>\n <Tooltip.Body parentRef={ref} placement='right' className={tooltip()}>\n {title}\n </Tooltip.Body>\n </Tooltip>\n <Popover\n className={composeRenderProps(classNames?.popoverPanel, (className) =>\n menuPanel({ className }),\n )}\n placement='right top'\n shouldFlip={false}\n >\n <Heading slot='panel'>{title}</Heading>\n <div className={panelContent({ className: classNames?.panelContent })}>\n {children}\n </div>\n </Popover>\n </DialogTrigger>\n );\n}\nSidenavMenu.displayName = 'Sidenav.Menu';\n\nfunction SidenavMenuItem({\n className,\n children,\n ...rest\n}: SidenavMenuItemProps) {\n containsExactChildren({\n children,\n componentName: SidenavMenuItem.displayName,\n restrictions: [[Text, { min: 1, max: 1 }]],\n });\n\n return (\n <ToggleButton\n {...rest}\n className={composeRenderProps(className, (className) =>\n menuItem({ className }),\n )}\n >\n {children}\n </ToggleButton>\n );\n}\nSidenavMenuItem.displayName = 'Sidenav.Menu.Item';\n\nSidenavMenu.Item = SidenavMenuItem;\n\nSidenav.Trigger = SidenavTrigger;\nSidenav.Header = SidenavHeader;\nSidenav.Item = SidenavItem;\nSidenav.Link = SidenavLink;\nSidenav.Divider = SidenavDivider;\nSidenav.Avatar = SidenavAvatar;\nSidenav.Footer = SidenavFooter;\nSidenav.Content = SidenavContent;\nSidenav.Menu = SidenavMenu;\n"]}
@@ -0,0 +1,156 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import * as tailwind_merge from 'tailwind-merge';
3
+
4
+ declare const SidenavStyles: tailwind_variants.TVReturnType<{
5
+ [key: string]: {
6
+ [key: string]: tailwind_merge.ClassNameValue | {
7
+ content?: tailwind_merge.ClassNameValue;
8
+ text?: tailwind_merge.ClassNameValue;
9
+ link?: tailwind_merge.ClassNameValue;
10
+ heading?: tailwind_merge.ClassNameValue;
11
+ menu?: tailwind_merge.ClassNameValue;
12
+ tooltip?: tailwind_merge.ClassNameValue;
13
+ header?: tailwind_merge.ClassNameValue;
14
+ toggle?: tailwind_merge.ClassNameValue;
15
+ avatar?: tailwind_merge.ClassNameValue;
16
+ item?: tailwind_merge.ClassNameValue;
17
+ avatarIcon?: tailwind_merge.ClassNameValue;
18
+ avatarHeading?: tailwind_merge.ClassNameValue;
19
+ avatarText?: tailwind_merge.ClassNameValue;
20
+ divider?: tailwind_merge.ClassNameValue;
21
+ transient?: tailwind_merge.ClassNameValue;
22
+ menuHeading?: tailwind_merge.ClassNameValue;
23
+ panelHeading?: tailwind_merge.ClassNameValue;
24
+ panelContent?: tailwind_merge.ClassNameValue;
25
+ sidenav?: tailwind_merge.ClassNameValue;
26
+ menuButton?: tailwind_merge.ClassNameValue;
27
+ menuPanel?: tailwind_merge.ClassNameValue;
28
+ menuItem?: tailwind_merge.ClassNameValue;
29
+ };
30
+ };
31
+ } | {
32
+ [x: string]: {
33
+ [x: string]: tailwind_merge.ClassNameValue | {
34
+ content?: tailwind_merge.ClassNameValue;
35
+ text?: tailwind_merge.ClassNameValue;
36
+ link?: tailwind_merge.ClassNameValue;
37
+ heading?: tailwind_merge.ClassNameValue;
38
+ menu?: tailwind_merge.ClassNameValue;
39
+ tooltip?: tailwind_merge.ClassNameValue;
40
+ header?: tailwind_merge.ClassNameValue;
41
+ toggle?: tailwind_merge.ClassNameValue;
42
+ avatar?: tailwind_merge.ClassNameValue;
43
+ item?: tailwind_merge.ClassNameValue;
44
+ avatarIcon?: tailwind_merge.ClassNameValue;
45
+ avatarHeading?: tailwind_merge.ClassNameValue;
46
+ avatarText?: tailwind_merge.ClassNameValue;
47
+ divider?: tailwind_merge.ClassNameValue;
48
+ transient?: tailwind_merge.ClassNameValue;
49
+ menuHeading?: tailwind_merge.ClassNameValue;
50
+ panelHeading?: tailwind_merge.ClassNameValue;
51
+ panelContent?: tailwind_merge.ClassNameValue;
52
+ sidenav?: tailwind_merge.ClassNameValue;
53
+ menuButton?: tailwind_merge.ClassNameValue;
54
+ menuPanel?: tailwind_merge.ClassNameValue;
55
+ menuItem?: tailwind_merge.ClassNameValue;
56
+ };
57
+ };
58
+ } | {}, {
59
+ sidenav: string[];
60
+ content: string;
61
+ header: string;
62
+ avatar: string[];
63
+ avatarIcon: string;
64
+ avatarHeading: string;
65
+ avatarText: string;
66
+ toggle: string[];
67
+ divider: string;
68
+ heading: string;
69
+ item: string[];
70
+ text: string;
71
+ transient: string;
72
+ link: string[];
73
+ tooltip: string[];
74
+ menu: string;
75
+ menuButton: string[];
76
+ menuHeading: string;
77
+ menuPanel: string[];
78
+ menuItem: string[];
79
+ panelHeading: string;
80
+ panelContent: string;
81
+ }, undefined, {
82
+ [key: string]: {
83
+ [key: string]: tailwind_merge.ClassNameValue | {
84
+ content?: tailwind_merge.ClassNameValue;
85
+ text?: tailwind_merge.ClassNameValue;
86
+ link?: tailwind_merge.ClassNameValue;
87
+ heading?: tailwind_merge.ClassNameValue;
88
+ menu?: tailwind_merge.ClassNameValue;
89
+ tooltip?: tailwind_merge.ClassNameValue;
90
+ header?: tailwind_merge.ClassNameValue;
91
+ toggle?: tailwind_merge.ClassNameValue;
92
+ avatar?: tailwind_merge.ClassNameValue;
93
+ item?: tailwind_merge.ClassNameValue;
94
+ avatarIcon?: tailwind_merge.ClassNameValue;
95
+ avatarHeading?: tailwind_merge.ClassNameValue;
96
+ avatarText?: tailwind_merge.ClassNameValue;
97
+ divider?: tailwind_merge.ClassNameValue;
98
+ transient?: tailwind_merge.ClassNameValue;
99
+ menuHeading?: tailwind_merge.ClassNameValue;
100
+ panelHeading?: tailwind_merge.ClassNameValue;
101
+ panelContent?: tailwind_merge.ClassNameValue;
102
+ sidenav?: tailwind_merge.ClassNameValue;
103
+ menuButton?: tailwind_merge.ClassNameValue;
104
+ menuPanel?: tailwind_merge.ClassNameValue;
105
+ menuItem?: tailwind_merge.ClassNameValue;
106
+ };
107
+ };
108
+ } | {}, {
109
+ sidenav: string[];
110
+ content: string;
111
+ header: string;
112
+ avatar: string[];
113
+ avatarIcon: string;
114
+ avatarHeading: string;
115
+ avatarText: string;
116
+ toggle: string[];
117
+ divider: string;
118
+ heading: string;
119
+ item: string[];
120
+ text: string;
121
+ transient: string;
122
+ link: string[];
123
+ tooltip: string[];
124
+ menu: string;
125
+ menuButton: string[];
126
+ menuHeading: string;
127
+ menuPanel: string[];
128
+ menuItem: string[];
129
+ panelHeading: string;
130
+ panelContent: string;
131
+ }, tailwind_variants.TVReturnType<unknown, {
132
+ sidenav: string[];
133
+ content: string;
134
+ header: string;
135
+ avatar: string[];
136
+ avatarIcon: string;
137
+ avatarHeading: string;
138
+ avatarText: string;
139
+ toggle: string[];
140
+ divider: string;
141
+ heading: string;
142
+ item: string[];
143
+ text: string;
144
+ transient: string;
145
+ link: string[];
146
+ tooltip: string[];
147
+ menu: string;
148
+ menuButton: string[];
149
+ menuHeading: string;
150
+ menuPanel: string[];
151
+ menuItem: string[];
152
+ panelHeading: string;
153
+ panelContent: string;
154
+ }, undefined, unknown, unknown>>;
155
+
156
+ export { SidenavStyles };
@@ -0,0 +1,2 @@
1
+ import {tv}from'./../../lib/utils.js';const r=tv({slots:{sidenav:["group/sidenav fg-a11y-on-accent absolute left-0 row-span-full flex h-full flex-col gap-xs bg-surface-default p-m","closed:items-center","group-data-[push~=left]/layout:relative"],content:"flex h-full max-h-full w-fit flex-col gap-xs group-open/sidenav:w-full group-closed/sidenav:items-center",header:"mb-m flex justify-center",avatar:['grid w-full grid-cols-[auto_1fr] grid-rows-2 items-center gap-x-m [grid-template-areas:"content_heading"_"content_text"] group-closed/sidenav:flex'],avatarIcon:"[grid-area:content]",avatarHeading:"fg-primary-bold text-left text-body-m [grid-area:heading]",avatarText:"fg-primary-muted grow-1 text-left text-body-s [grid-area:text]",toggle:["flex cursor-pointer items-center gap-s rounded-medium p-xs group-open/sidenav:px-s","enabled:hover:bg-interactive-muted-hover","enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none","enabled:pressed:bg-interactive-muted-pressed"],divider:"my-s h-[1px] w-full shrink-0 grow-0 border-0 bg-[var(--outline-static)]",heading:"text-body-xs uppercase",item:["group/item flex w-full cursor-pointer items-center justify-center gap-s rounded-medium p-xs text-body-m","group-open/sidenav:px-s group-closed/sidenav:max-w-fit","enabled:hover:bg-interactive-muted-hover","enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none","enabled:pressed:bg-accent-primary-pressed","enabled:selected:bg-accent-primary-bold","enabled:selected:hover:bg-accent-primary-hover","enabled:selected:focus-visible:bg-accent-primary-hover","enabled:selected:pressed:bg-accent-primary-pressed","disabled:fg-disabled disabled:cursor-not-allowed"],text:"grow-1 text-left text-body-s",transient:"group-closed/sidenav:hidden",link:["group/link flex w-full cursor-pointer items-center justify-center gap-s rounded-medium p-xs text-body-m","group-open/sidenav:w-full group-closed/sidenav:max-w-fit","enabled:hover:bg-interactive-muted-hover","enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none","enabled:pressed:bg-accent-primary-pressed","disabled:fg-disabled disabled:cursor-not-allowed"],tooltip:["absolute flex items-center gap-s whitespace-nowrap text-body-s","group-disabled/item:fg-disabled group-disabled/link:fg-disabled"],menu:"group/menu relative text-body-s",menuButton:["flex w-full cursor-pointer items-center justify-center gap-s rounded-medium p-xs","group-closed/sidenav:max-w-fit","enabled:hover:bg-interactive-muted-hover","enabled:pressed:bg-interactive-muted-hover enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none"],menuHeading:"flex-1 text-left",menuPanel:["fg-primary-bold rounded-medium bg-surface-raised outline outline-static"],menuItem:["flex w-full cursor-pointer items-center gap-s rounded-medium p-s text-left text-body-s","group-expanded/menu:block group-open/sidenav:group-expanded/menu:pl-[32px]","enabled:hover:bg-interactive-muted-hover","enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none","enabled:pressed:bg-accent-primary-pressed","enabled:selected:bg-accent-primary-bold","enabled:selected:hover:bg-accent-primary-hover","enabled:selected:focus-visible:bg-accent-primary-hover","enabled:selected:pressed:bg-accent-primary-pressed","disabled:fg-disabled disabled:cursor-not-allowed"],panelHeading:"min-w-[172px] rounded-t-medium bg-surface-overlay px-m py-s text-body-s",panelContent:"flex flex-col gap-xs bg-surface-default px-xs py-xs"}});export{r as SidenavStyles};//# sourceMappingURL=styles.js.map
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/sidenav/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KAAS,CACP,4HACA,CAAA,qBACA,CAAA,yCAGA,CAAA,CAAA,OAAA,CAAA,4IAGA,CAAA,MAAA,CAAA,CAAA,oJAEF,CAAA,CAAA,UAAY,CAAA,mCACG,CAAA,2DACf,CAAA,wKAIE,CAAA,0CACA,CAAA,qFACA,CAAA,8CAGA,CAAA,CAAA,OAAA,CAAA,yEACO,CAAA,OAAA,CAAA,wBAEP,CAAA,IAAA,CAAA,CAAA,yGACA,CAAA,wDACA,CAAA,gIAEA,CAAA,2CACA,CAAA,yCACA,CAAA,gDACA,CAAA,wDACA,CAAA,oDACA,CAAA,kDAEI,CAAA,CAAA,IAAA,CAAA,+BACK,SAAA,CAAA,6BAET,CAAA,IAAA,CAAA,CAAA,yGACA,CAAA,0DACA,CAAA,0CACA,CAAA,qFACA,CAAA,2CACA,CAAA,kDAEO,CACP,CAAA,OAAA,CAAA,CAAA,gEACA,CAAA,yGAGF,CAAA,UACE,CAAA,CAAA,kFACA,CAAA,gCACA,CAAA,0CACA,CAAA,gIAEF,CAAA,CAAA,WAAa,CAAA,mBACF,SACT,CAAA,CAAA,yEAEF,CAAU,CACR,QAAA,CAAA,CAAA,wFACA,CAAA,4EACA,CAAA,0CACA,CAAA,iIAEA,CAAA,yCACA,CAAA,gDACA,CAAA,wDACA,CAAA,oDACA,CAAA,gEAGA,CAAA,yEACF,CAAA,YAAc,CAAA,qDAEjB,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 SidenavStyles = tv({\n slots: {\n sidenav: [\n 'group/sidenav fg-a11y-on-accent absolute left-0 row-span-full flex h-full flex-col gap-xs bg-surface-default p-m',\n 'closed:items-center',\n 'group-data-[push~=left]/layout:relative',\n ],\n content:\n 'flex h-full max-h-full w-fit flex-col gap-xs group-open/sidenav:w-full group-closed/sidenav:items-center',\n header: 'mb-m flex justify-center',\n avatar: [\n 'grid w-full grid-cols-[auto_1fr] grid-rows-2 items-center gap-x-m [grid-template-areas:\"content_heading\"_\"content_text\"] group-closed/sidenav:flex',\n ],\n avatarIcon: '[grid-area:content]',\n avatarHeading: 'fg-primary-bold text-left text-body-m [grid-area:heading]',\n avatarText:\n 'fg-primary-muted grow-1 text-left text-body-s [grid-area:text]',\n toggle: [\n 'flex cursor-pointer items-center gap-s rounded-medium p-xs group-open/sidenav:px-s',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n 'enabled:pressed:bg-interactive-muted-pressed',\n ],\n divider:\n 'my-s h-[1px] w-full shrink-0 grow-0 border-0 bg-[var(--outline-static)]',\n heading: 'text-body-xs uppercase',\n item: [\n 'group/item flex w-full cursor-pointer items-center justify-center gap-s rounded-medium p-xs text-body-m',\n 'group-open/sidenav:px-s group-closed/sidenav:max-w-fit',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n 'enabled:pressed:bg-accent-primary-pressed',\n 'enabled:selected:bg-accent-primary-bold',\n 'enabled:selected:hover:bg-accent-primary-hover',\n 'enabled:selected:focus-visible:bg-accent-primary-hover',\n 'enabled:selected:pressed:bg-accent-primary-pressed',\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n text: 'grow-1 text-left text-body-s',\n transient: 'group-closed/sidenav:hidden',\n link: [\n 'group/link flex w-full cursor-pointer items-center justify-center gap-s rounded-medium p-xs text-body-m',\n 'group-open/sidenav:w-full group-closed/sidenav:max-w-fit',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n 'enabled:pressed:bg-accent-primary-pressed',\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n tooltip: [\n 'absolute flex items-center gap-s whitespace-nowrap text-body-s',\n 'group-disabled/item:fg-disabled group-disabled/link:fg-disabled',\n ],\n menu: 'group/menu relative text-body-s',\n menuButton: [\n 'flex w-full cursor-pointer items-center justify-center gap-s rounded-medium p-xs',\n 'group-closed/sidenav:max-w-fit',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:pressed:bg-interactive-muted-hover enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n ],\n menuHeading: 'flex-1 text-left',\n menuPanel: [\n 'fg-primary-bold rounded-medium bg-surface-raised outline outline-static',\n ],\n menuItem: [\n 'flex w-full cursor-pointer items-center gap-s rounded-medium p-s text-left text-body-s',\n 'group-expanded/menu:block group-open/sidenav:group-expanded/menu:pl-[32px]',\n 'enabled:hover:bg-interactive-muted-hover',\n 'enabled:focus-visible:bg-interactive-muted-hover enabled:focus-visible:outline-none',\n 'enabled:pressed:bg-accent-primary-pressed',\n 'enabled:selected:bg-accent-primary-bold',\n 'enabled:selected:hover:bg-accent-primary-hover',\n 'enabled:selected:focus-visible:bg-accent-primary-hover',\n 'enabled:selected:pressed:bg-accent-primary-pressed',\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n panelHeading:\n 'min-w-[172px] rounded-t-medium bg-surface-overlay px-m py-s text-body-s',\n panelContent: 'flex flex-col gap-xs bg-surface-default px-xs py-xs',\n },\n});\n"]}
@@ -0,0 +1,70 @@
1
+ import { Payload } from '@accelint/bus';
2
+ import { UniqueId } from '@accelint/core';
3
+ import { ComponentPropsWithRef, PropsWithChildren } from 'react';
4
+ import { Pressable, ButtonProps, ToggleButtonProps, LinkProps, DisclosureProps, DisclosurePanelProps, PopoverProps } from 'react-aria-components';
5
+ import { SidenavEventTypes } from './events.js';
6
+
7
+ type SidenavProps = ComponentPropsWithRef<'nav'> & {
8
+ id: UniqueId;
9
+ isHiddenWhenClosed?: boolean;
10
+ };
11
+ type SidenavHeaderProps = PropsWithChildren<{
12
+ classNames?: {
13
+ header?: string;
14
+ button?: ButtonProps['className'];
15
+ container?: string;
16
+ icon?: string;
17
+ };
18
+ }>;
19
+ type SidenavContentProps = ComponentPropsWithRef<'div'>;
20
+ type SidenavItemProps = ToggleButtonProps & {
21
+ classNames?: {
22
+ button?: ToggleButtonProps['className'];
23
+ icon?: string;
24
+ };
25
+ textValue?: string;
26
+ };
27
+ type SidenavLinkProps = LinkProps & {
28
+ classNames?: {
29
+ button?: LinkProps['className'];
30
+ icon?: string;
31
+ };
32
+ textValue: string;
33
+ };
34
+ type SidenavAvatarProps = ComponentPropsWithRef<'div'>;
35
+ type SidenavDividerProps = ComponentPropsWithRef<'hr'>;
36
+ type SidenavFooterProps = ComponentPropsWithRef<'footer'>;
37
+ type SidenavCloseEvent = Payload<typeof SidenavEventTypes.close, {
38
+ id: UniqueId;
39
+ }>;
40
+ type SidenavOpenEvent = Payload<typeof SidenavEventTypes.open, {
41
+ id: UniqueId;
42
+ }>;
43
+ type SidenavToggleEvent = Payload<typeof SidenavEventTypes.toggle, {
44
+ id: UniqueId;
45
+ }>;
46
+ type SidenavEvent = SidenavOpenEvent | SidenavToggleEvent | SidenavCloseEvent;
47
+ type TargetedEvents = `close:${UniqueId}` | `open:${UniqueId}` | `toggle:${UniqueId}`;
48
+ type SidenavTriggerProps = ComponentPropsWithRef<typeof Pressable> & {
49
+ for: TargetedEvents | UniqueId;
50
+ };
51
+ type SidenavContextValue = {
52
+ id: UniqueId;
53
+ isOpen: boolean;
54
+ };
55
+ type SidenavMenuProps = {
56
+ title: string;
57
+ icon: React.ReactNode;
58
+ children: React.ReactNode;
59
+ classNames?: {
60
+ menu?: DisclosureProps['className'];
61
+ button?: ButtonProps['className'];
62
+ icon?: string;
63
+ disclosurePanel?: DisclosurePanelProps['className'];
64
+ popoverPanel?: PopoverProps['className'];
65
+ panelContent?: string;
66
+ };
67
+ };
68
+ type SidenavMenuItemProps = ToggleButtonProps;
69
+
70
+ export type { SidenavAvatarProps, SidenavCloseEvent, SidenavContentProps, SidenavContextValue, SidenavDividerProps, SidenavEvent, SidenavFooterProps, SidenavHeaderProps, SidenavItemProps, SidenavLinkProps, SidenavMenuItemProps, SidenavMenuProps, SidenavOpenEvent, SidenavProps, SidenavToggleEvent, SidenavTriggerProps };
@@ -0,0 +1,2 @@
1
+ //# sourceMappingURL=types.js.map
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
@@ -8,7 +8,7 @@ declare const SkeletonStyles: tailwind_variants.TVReturnType<{
8
8
  circ: string;
9
9
  rect: string;
10
10
  };
11
- }, undefined, "fg-default-light bg-transparent-light px-l py-s motion-safe:animate-pulse", {
11
+ }, undefined, "fg-primary-bold bg-interactive-disabled px-l py-s motion-safe:animate-pulse", {
12
12
  shape: {
13
13
  circ: string;
14
14
  rect: string;
@@ -18,6 +18,6 @@ declare const SkeletonStyles: tailwind_variants.TVReturnType<{
18
18
  circ: string;
19
19
  rect: string;
20
20
  };
21
- }, undefined, "fg-default-light bg-transparent-light px-l py-s motion-safe:animate-pulse", unknown, unknown>>;
21
+ }, undefined, "fg-primary-bold bg-interactive-disabled px-l py-s motion-safe:animate-pulse", unknown, unknown>>;
22
22
 
23
23
  export { SkeletonStyles, SkeletonStylesDefaults };
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';const e={shape:"rect"},l=tv({base:"fg-default-light bg-transparent-light px-l py-s motion-safe:animate-pulse",variants:{shape:{circ:"aspect-square w-[1lh] rounded-full",rect:"min-h-[1lh] w-full rounded-small"}},defaultVariants:e});export{l as SkeletonStyles,e as SkeletonStylesDefaults};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const t={shape:"rect"},s=tv({base:"fg-primary-bold bg-interactive-disabled px-l py-s motion-safe:animate-pulse",variants:{shape:{circ:"aspect-square w-[1lh] rounded-full",rect:"min-h-[1lh] w-full rounded-small"}},defaultVariants:t});export{s as SkeletonStyles,t as SkeletonStylesDefaults};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/skeleton/styles.ts"],"names":["SkeletonStyles","tv"],"mappings":"sCAeS,MAAA,CAAA,CAAA,CAAA,KAGIA,CAAiBC,MAC5B,CAAA,CAAM,sFACI,CACR,QACE,CAAA,CAAA,KAAM,CAAA,CAAA,IAAA,CAAA,oCACA,CAAA,IAAA,CAAA,kCAGV,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const SkeletonStylesDefaults = {\n shape: 'rect',\n} as const;\n\nexport const SkeletonStyles = tv({\n base: 'fg-default-light bg-transparent-light px-l py-s motion-safe:animate-pulse',\n variants: {\n shape: {\n circ: 'aspect-square w-[1lh] rounded-full',\n rect: 'min-h-[1lh] w-full rounded-small',\n },\n },\n defaultVariants: SkeletonStylesDefaults,\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/skeleton/styles.ts"],"names":["SkeletonStyles","tv"],"mappings":"sCAeS,MAAA,CAAA,CAAA,CAAA,KAGIA,CAAiBC,MAC5B,CAAA,CAAM,wFACI,CACR,QACE,CAAA,CAAA,KAAM,CAAA,CAAA,IAAA,CAAA,oCACA,CAAA,IAAA,CAAA,kCAGV,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const SkeletonStylesDefaults = {\n shape: 'rect',\n} as const;\n\nexport const SkeletonStyles = tv({\n base: 'fg-primary-bold bg-interactive-disabled px-l py-s motion-safe:animate-pulse',\n variants: {\n shape: {\n circ: 'aspect-square w-[1lh] rounded-full',\n rect: 'min-h-[1lh] w-full rounded-small',\n },\n },\n defaultVariants: SkeletonStylesDefaults,\n});\n"]}
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'client-only';import {Fragment as Fragment$1}from'react';import {Slider,composeRenderProps,Label,Input,SliderTrack,SliderThumb,Text}from'react-aria-components';import {Tooltip}from'../tooltip/index.js';import {SliderStyles}from'./styles.js';const {slider:x,label:A,inputs:B,input:F,thumb:D,track:P,trackBackground:$,trackValue:z,minValue:C,maxValue:L}=SliderStyles(),I=({classNames:r,label:n,layout:T="grid",maxValue:d=100,minValue:c=0,orientation:b="horizontal",showInput:p,showLabel:s=true,...k})=>jsx(Slider,{...k,className:composeRenderProps(r?.slider,a=>x({className:a})),maxValue:d,minValue:c,orientation:b,"aria-label":s?void 0:n,"data-layout":T,children:({state:a})=>jsxs(Fragment,{children:[s&&jsx(Label,{className:A({className:r?.label}),children:n}),p&&jsx("div",{className:B({className:r?.inputs}),children:a.values.map((m,l)=>jsx(Input,{className:composeRenderProps(r?.input,i=>F({className:i})),value:m,onChange:i=>a.setThumbValue(l,Number.parseFloat(i.target.value))},`number-field-${l===0?"min":"max"}`))}),jsxs(SliderTrack,{className:composeRenderProps(r?.track,m=>P({className:m})),children:[jsx("div",{className:$({className:r?.trackBackground})}),a.values.map((m,l)=>jsxs(Fragment$1,{children:[jsx("div",{className:z({className:r?.trackValue}),"data-start":a.values.length===1?0:a.getThumbPercent(0),"data-end":a.getThumbPercent(a.values.length===1?0:1)}),jsxs(Tooltip,{isDisabled:!p||a.isThumbDragging(l),children:[jsx(Tooltip.Trigger,{children:jsx(SliderThumb,{index:l,className:composeRenderProps(r?.thumb,i=>D({className:i}))})}),jsx(Tooltip.Body,{placement:"top",children:a.getThumbValue(l)})]})]},`slider-${l===0?"min":"max"}`))]}),jsx(Text,{slot:"min",className:C({className:r?.minValue}),children:c}),jsx(Text,{slot:"max",className:L({className:r?.maxValue}),children:d})]})});export{I as Slider};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/slider/index.tsx"],"names":["thumb","track","trackValue","SliderStyles","f","classNames","minValueProp","orientation","showLabel","jsx","AriaSlider","e","h","className","slider","maxValueProp","layout","jsxs","Fragment","o","label","showInput","value","index","Input","composeRenderProps","input","event","state","AriaSliderTrack","_","Tooltip","u","N","g"],"mappings":"ySA8BE,MAAA,CAAA,MACA,CAAA,CAAA,CAAA,cAEA,CAAA,CAAA,CAAAA,KACA,CAAA,CAAA,CAAAC,+BAEAC,CAAAA,CACA,CAAA,UACA,CAAA,CAAA,CAAA,SACEC,CAAAA,CAAa,QAcf,CAAA,CAAA,CAAA,CAAAC,YAAA,EAAA,CAAA,CAAAC,CAAAA,CACA,WACA,CAAA,CAAA,CAAA,KAAS,CAAA,CAAA,CAAA,MACT,CAAA,CAAA,CAAA,MAAyB,CAAA,QACzB,CAAA,CAAUC,IACV,CAAA,QAAA,CAAA,CAAA,CAAAC,EAAc,WAAA,CAAA,CACd,CAAA,YACA,CAAA,SAAAC,CAAY,WAIVC,CAAAA,CAACC,KACE,CAAA,IACD,CAAA,GAAAC,GAAA,CAAAC,MAAA,CAAA,CAAA,GAA8BP,WAAqBQ,CAAAA,kBACjDC,CAAAA,CAAO,YAAY,CAAC,CACtB,CAAA,SACA,CAAUC,EACV,CAAA,CAAA,CAAA,QACA,CAAA,CAAA,CAAA,QAAA,CAAaR,CAAAA,CACb,aAAYC,CAAAA,YACZ,CAAA,CAAA,CAAA,MAAA,CAAA,CAAA,CAAaQ,aAET,CAAA,CAAA,CAAA,QACFC,CAAAA,CAAAC,MACG,CAAA,CAAA,CAAA,GAAAC,IAAAX,UACCC,CAAAA,QAAO,CAAA,CAAA,CAAA,EAAAE,GAAWS,CAAA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CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,eAEhCZ,CAAAA,CAACsB,CAAAA,CAAQ,QAAR,CACC,CAAApB,GAAA,CAAAqB,OAAA,CAAA,QAAC,CACC,QACA,CAAArB,GAAA,CAAAsB,WAAA,CAAA,CAAA,KAAWR,CACTpB,CAAAA,CAAAA,UACeL,kBAAAA,CAAM,CAAE,WAAU,CAAC,CACpC,CAAA,SAGK,KAAR,CAAa,CAAA,CAAA,CAAA,CAAAW,GAAA,CAAAqB,OAAA,CAAA,eACX,CAAA,iBAAoBT,oBAzBFA,CAAAA,CAAAA,CAAAA,CAAU,CAAA,OAAY,EAAA,CAAA,GAAK,CA4BpD,CACD,KAEHd,CAAAA,KACE,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAAE,GAAA,CACLuB,gBAAsB,UAAW7B,CAAAA,CAAAA,CAAY,CAAA,SAAU,CAEtD,WACH,CAAA,CACAI,UACO,CAAA,CAAA,CAAA,CAAAE,GAAA,CACLuB,IAAA,CAAA,CAAA,IAAA,CAAA,KAAsB,CAAA,SAAW7B,GAAY,CAAA,UAE5C,CAAA,EAAA,QACH,GACF,QAEJ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { Fragment } from 'react';\nimport {\n Slider as AriaSlider,\n SliderTrack as AriaSliderTrack,\n Input,\n Label,\n SliderThumb,\n Text,\n composeRenderProps,\n} from 'react-aria-components';\nimport { Tooltip } from '../tooltip';\nimport { SliderStyles } from './styles';\nimport type { SliderProps } from './types';\n\nconst {\n slider,\n label,\n inputs,\n input,\n thumb,\n track,\n trackBackground,\n trackValue,\n minValue,\n maxValue,\n} = SliderStyles();\n\n/**\n * Slider - An interactive range input component for numeric value selection\n *\n * Provides accessible slider functionality with optional input field integration,\n * flexible layouts, and comprehensive keyboard and mouse interaction support.\n * Perfect for settings, filters, or any numeric input requiring visual feedback.\n *\n * @example\n * // Basic slider\n * <Slider label=\"Volume\" defaultValue={50} />\n */\nexport const Slider = ({\n classNames,\n label: labelProp,\n layout = 'grid',\n maxValue: maxValueProp = 100,\n minValue: minValueProp = 0,\n orientation = 'horizontal',\n showInput,\n showLabel = true,\n ...rest\n}: SliderProps) => {\n return (\n <AriaSlider\n {...rest}\n className={composeRenderProps(classNames?.slider, (className) =>\n slider({ className }),\n )}\n maxValue={maxValueProp}\n minValue={minValueProp}\n orientation={orientation}\n aria-label={showLabel ? undefined : labelProp}\n data-layout={layout}\n >\n {({ state }) => (\n <>\n {showLabel && (\n <Label className={label({ className: classNames?.label })}>\n {labelProp}\n </Label>\n )}\n {showInput && (\n <div\n className={inputs({\n className: classNames?.inputs,\n })}\n >\n {state.values.map((value, index) => (\n <Input\n key={`number-field-${index === 0 ? 'min' : 'max'}`}\n className={composeRenderProps(\n classNames?.input,\n (className) => input({ className }),\n )}\n value={value}\n onChange={(event) =>\n state.setThumbValue(\n index,\n Number.parseFloat(event.target.value),\n )\n }\n />\n ))}\n </div>\n )}\n <AriaSliderTrack\n className={composeRenderProps(classNames?.track, (className) =>\n track({ className }),\n )}\n >\n <div\n className={trackBackground({\n className: classNames?.trackBackground,\n })}\n />\n {state.values.map((_, index) => (\n <Fragment key={`slider-${index === 0 ? 'min' : 'max'}`}>\n <div\n className={trackValue({\n className: classNames?.trackValue,\n })}\n data-start={\n state.values.length === 1 ? 0 : state.getThumbPercent(0)\n }\n data-end={state.getThumbPercent(\n state.values.length === 1 ? 0 : 1,\n )}\n />\n <Tooltip\n isDisabled={!showInput || state.isThumbDragging(index)}\n >\n <Tooltip.Trigger>\n <SliderThumb\n index={index}\n className={composeRenderProps(\n classNames?.thumb,\n (className) => thumb({ className }),\n )}\n />\n </Tooltip.Trigger>\n <Tooltip.Body placement='top'>\n {state.getThumbValue(index)}\n </Tooltip.Body>\n </Tooltip>\n </Fragment>\n ))}\n </AriaSliderTrack>\n <Text\n slot='min'\n className={minValue({ className: classNames?.minValue })}\n >\n {minValueProp}\n </Text>\n <Text\n slot='max'\n className={maxValue({ className: classNames?.maxValue })}\n >\n {maxValueProp}\n </Text>\n </>\n )}\n </AriaSlider>\n );\n};\n"]}
1
+ {"version":3,"sources":["../../../src/components/slider/index.tsx"],"names":["thumb","track","trackValue","SliderStyles","f","classNames","minValueProp","orientation","showLabel","jsx","AriaSlider","e","h","className","slider","maxValueProp","layout","jsxs","Fragment","o","label","showInput","value","index","Input","composeRenderProps","input","event","state","AriaSliderTrack","_","Tooltip","u","N","g"],"mappings":"ySA8BE,MAAA,CAAA,MACA,CAAA,CAAA,CAAA,cAEA,CAAA,CAAA,CAAAA,KACA,CAAA,CAAA,CAAAC,+BAEAC,CAAAA,CACA,CAAA,UACA,CAAA,CAAA,CAAA,SACEC,CAAAA,CAAa,QAcf,CAAA,CAAA,CAAA,CAAAC,YAAA,EAAA,CAAA,CAAAC,CAAAA,CACA,WACA,CAAA,CAAA,CAAA,KAAS,CAAA,CAAA,CAAA,MACT,CAAA,CAAA,CAAA,MAAyB,CAAA,QACzB,CAAA,CAAUC,IACV,CAAA,QAAA,CAAA,CAAA,CAAAC,EAAc,WAAA,CAAA,CACd,CAAA,YACA,CAAA,SAAAC,CAAY,WAIVC,CAAAA,CAACC,KACE,CAAA,IACD,CAAA,GAAAC,GAAA,CAAAC,MAAA,CAAA,CAAA,GAA8BP,WAAqBQ,CAAAA,kBACjDC,CAAAA,CAAO,YAAY,CAAC,CACtB,CAAA,SACA,CAAUC,EACV,CAAA,CAAA,CAAA,Q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,CACpB,CAAA,SAAWN,GAAY,CAAA,SACzB,CAAC,CAAA,EACD,UAAA,CAAA,CACEuB,aAAa,CAAA,CAAA,CAAA,MAAmBA,CAAAA,+BAExBA,CAAAA,CAAM,CAAA,UAAA,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA,MAAmB,CAClC,MAEDG,GACC,cAAYC,OAACX,CAAAA,CAAAA,UAAmB,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,eAEhCZ,CAAAA,CAACsB,CAAAA,CAAQ,QAAR,CACC,CAAApB,GAAA,CAAAqB,OAAA,CAAA,QAAC,CACC,QACA,CAAArB,GAAA,CAAAsB,WAAA,CAAA,CAAA,KAAWR,CACTpB,CAAAA,CAAAA,UACeL,kBAAAA,CAAM,CAAE,WAAU,CAAC,CACpC,CAAA,SAGK,KAAR,CAAa,CAAA,CAAA,CAAA,CAAAW,GAAA,CAAAqB,OAAA,CAAA,eACX,CAAA,iBAAoBT,oBAzBFA,CAAAA,CAAAA,CAAAA,CAAU,CAAA,OAAY,EAAA,CAAA,GAAK,CA4BpD,CACD,KAEHd,CAAAA,KACE,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAAE,GAAA,CACLuB,gBAAsB,UAAW7B,CAAAA,CAAAA,CAAY,CAAA,SAAU,CAEtD,WACH,CAAA,CACAI,UACO,CAAA,CAAA,CAAA,CAAAE,GAAA,CACLuB,IAAA,CAAA,CAAA,IAAA,CAAA,KAAsB,CAAA,SAAW7B,GAAY,CAAA,UAE5C,CAAA,EAAA,QACH,GACF,QAEJ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { Fragment } from 'react';\nimport {\n Slider as AriaSlider,\n SliderTrack as AriaSliderTrack,\n composeRenderProps,\n Input,\n Label,\n SliderThumb,\n Text,\n} from 'react-aria-components';\nimport { Tooltip } from '../tooltip';\nimport { SliderStyles } from './styles';\nimport type { SliderProps } from './types';\n\nconst {\n slider,\n label,\n inputs,\n input,\n thumb,\n track,\n trackBackground,\n trackValue,\n minValue,\n maxValue,\n} = SliderStyles();\n\n/**\n * Slider - An interactive range input component for numeric value selection\n *\n * Provides accessible slider functionality with optional input field integration,\n * flexible layouts, and comprehensive keyboard and mouse interaction support.\n * Perfect for settings, filters, or any numeric input requiring visual feedback.\n *\n * @example\n * // Basic slider\n * <Slider label=\"Volume\" defaultValue={50} />\n */\nexport const Slider = ({\n classNames,\n label: labelProp,\n layout = 'grid',\n maxValue: maxValueProp = 100,\n minValue: minValueProp = 0,\n orientation = 'horizontal',\n showInput,\n showLabel = true,\n ...rest\n}: SliderProps) => {\n return (\n <AriaSlider\n {...rest}\n className={composeRenderProps(classNames?.slider, (className) =>\n slider({ className }),\n )}\n maxValue={maxValueProp}\n minValue={minValueProp}\n orientation={orientation}\n aria-label={showLabel ? undefined : labelProp}\n data-layout={layout}\n >\n {({ state }) => (\n <>\n {showLabel && (\n <Label className={label({ className: classNames?.label })}>\n {labelProp}\n </Label>\n )}\n {showInput && (\n <div\n className={inputs({\n className: classNames?.inputs,\n })}\n >\n {state.values.map((value, index) => (\n <Input\n key={`number-field-${index === 0 ? 'min' : 'max'}`}\n className={composeRenderProps(\n classNames?.input,\n (className) => input({ className }),\n )}\n value={value}\n onChange={(event) =>\n state.setThumbValue(\n index,\n Number.parseFloat(event.target.value),\n )\n }\n />\n ))}\n </div>\n )}\n <AriaSliderTrack\n className={composeRenderProps(classNames?.track, (className) =>\n track({ className }),\n )}\n >\n <div\n className={trackBackground({\n className: classNames?.trackBackground,\n })}\n />\n {state.values.map((_, index) => (\n <Fragment key={`slider-${index === 0 ? 'min' : 'max'}`}>\n <div\n className={trackValue({\n className: classNames?.trackValue,\n })}\n data-start={\n state.values.length === 1 ? 0 : state.getThumbPercent(0)\n }\n data-end={state.getThumbPercent(\n state.values.length === 1 ? 0 : 1,\n )}\n />\n <Tooltip\n isDisabled={!showInput || state.isThumbDragging(index)}\n >\n <Tooltip.Trigger>\n <SliderThumb\n index={index}\n className={composeRenderProps(\n classNames?.thumb,\n (className) => thumb({ className }),\n )}\n />\n </Tooltip.Trigger>\n <Tooltip.Body placement='top'>\n {state.getThumbValue(index)}\n </Tooltip.Body>\n </Tooltip>\n </Fragment>\n ))}\n </AriaSliderTrack>\n <Text\n slot='min'\n className={minValue({ className: classNames?.minValue })}\n >\n {minValueProp}\n </Text>\n <Text\n slot='max'\n className={maxValue({ className: classNames?.maxValue })}\n >\n {maxValueProp}\n </Text>\n </>\n )}\n </AriaSlider>\n );\n};\n"]}
@@ -79,6 +79,6 @@ declare const SliderStyles: tailwind_variants.TVReturnType<{
79
79
  thumb: string[];
80
80
  minValue: string[];
81
81
  maxValue: string[];
82
- }, undefined, unknown, unknown, undefined>>;
82
+ }, undefined, unknown, unknown>>;
83
83
 
84
84
  export { SliderStyles };