@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/details-list/index.tsx"],"names":["label","value","DetailsListContext","y","props","jsx","l","DetailsListProvider","Text","r","useContextProps","ref","v","classNames","rest","D","DetailsList","TextContext","P","d","align","children","DetailsListValue"],"mappings":"2SA+Bc,MAAAA,CAAAA,IAAO,CAAA,CAAA,CAAAC,KAA4B,CAAA,CAEpCC,CAAAA,KACqD,CAAA,CAAI,CAAA,CAEtEC,wCACE,EAAA,SACA,CAAA,CAAA,CAAGC,QAEH,CAAA,CAAA,CACEC,GAACH,CAAmB,CAAA,CAAA,CAAA,OAASI,GAAA,CAAA,CAAA,CAAA,QAC1B,CAAA,CAAA,KACH,CAEJ,CACAC,CAAAA,QAAoB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A,gBAA0B,CAAE,CAAA,SAAWP,CAAAA,CAAAA,CAAY,CAAA,SAAO,CAAA,CAAAO,EAAO,KAIrE,CAAA,KAAA,CAAA,CAAA,CAAAf,CAAAA,CAAC,WAAa,CAAAC,GAAA,CAAA,IAAA,CAAA,CAAA,GAAgB,CAAE,CAAA,SAAWO,CAAAA,CAAAA,CAAY,CAAA,SAAM,CAAAO,CAAM,EAAC,IACjE,CAAA,KAAAC,CAAAA,CACH,EACF,CAEJ,QACY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAC1BL,aACAA,CAAAA,CAAY,CAAA,QACZA,CAAY,CAAA,CAAA,CAAA,CAAA,KAAQM,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,KAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { containsExactChildren } from '@/lib/react';\nimport type { ProviderProps } from '@/lib/types';\nimport { createContext } from 'react';\nimport {\n type ContextValue,\n DEFAULT_SLOT,\n Text,\n TextContext,\n useContextProps,\n} from 'react-aria-components';\nimport { DetailsListStyles, DetailsListStylesDefaults } from './styles';\nimport type {\n DetailsListLabelProps,\n DetailsListProps,\n DetailsListValueProps,\n} from './types';\n\nconst { list, label, value } = DetailsListStyles();\n\nexport const DetailsListContext =\n createContext<ContextValue<DetailsListProps, HTMLDListElement>>(null);\n\nfunction DetailsListProvider({\n children,\n ...props\n}: ProviderProps<DetailsListProps>) {\n return (\n <DetailsListContext.Provider value={props}>\n {children}\n </DetailsListContext.Provider>\n );\n}\nDetailsListProvider.displayName = 'DetailsListProvider.Provider';\n\nfunction DetailsListLabel(props: DetailsListLabelProps) {\n return <Text {...props} elementType='dt' slot='label' />;\n}\nDetailsListLabel.displayName = 'DetailsList.Label';\n\nfunction DetailsListValue(props: DetailsListValueProps) {\n return <Text {...props} elementType='dd' slot='value' />;\n}\nDetailsListValue.displayName = 'DetailsList.Value';\n\n/**\n * A semantic details list component for displaying metadata in key-value pairs.\n * Uses CSS Grid layout with labels in the first column and values in the second column.\n * Perfect for map object details, user profiles, or any structured information.\n *\n * @example\n * ```tsx\n * <DetailsList align=\"left\">\n * <DetailsList.Label>Key</DetailsList.Label>\n * <DetailsList.Value>Value</DetailsList.Value>\n *\n * <DetailsList.Label>Ships</DetailsList.Label>\n * <DetailsList.Value>Millennium Falcon</DetailsList.Value>\n * <DetailsList.Value>USS Enterprise NCC-1701</DetailsList.Value>\n * <DetailsList.Value>Serenity</DetailsList.Value>\n *\n * <DetailsList.Label>Coordinates</DetailsList.Label>\n * <DetailsList.Value>\n * <div>Great Pyramid of Giza: 29°58'44\" N 31°08'02\" E</div>\n * <div>Machu Picchu: 13°09'47\" S 72°32'41\" W</div>\n * <div>Colosseum: 41°53'24\" N 12°29'32\" E</div>\n * <div>Taj Mahal: 27°10'30\" N 78°02'31\" E</div>\n * </DetailsList.Value>\n * </DetailsList>\n * ```\n * ## Child Component Behavior\n * - **DetailsList.Label**: Minimum of 1\n * - **DetailsList.Value**: Minimum of 1\n */\nexport function DetailsList({ ref, ...props }: DetailsListProps) {\n [props, ref] = useContextProps(props, ref ?? null, DetailsListContext);\n\n const {\n children,\n classNames,\n align = DetailsListStylesDefaults.align,\n ...rest\n } = props;\n\n containsExactChildren({\n children,\n componentName: DetailsList.displayName,\n restrictions: [\n [DetailsList.Label, { min: 1 }],\n [DetailsList.Value, { min: 1 }],\n ],\n });\n\n return (\n <TextContext\n value={{\n slots: {\n [DEFAULT_SLOT]: {},\n label: { className: label({ className: classNames?.label, align }) },\n value: { className: value({ className: classNames?.value, align }) },\n },\n }}\n >\n <dl {...rest} className={list({ className: classNames?.list, align })}>\n {children}\n </dl>\n </TextContext>\n );\n}\nDetailsList.displayName = 'DetailsList';\nDetailsList.Provider = DetailsListProvider;\nDetailsList.Label = DetailsListLabel;\nDetailsList.Value = DetailsListValue;\n"]}
1
+ {"version":3,"sources":["../../../src/components/details-list/index.tsx"],"names":["label","value","DetailsListContext","y","props","jsx","l","DetailsListProvider","Text","r","useContextProps","ref","P","classNames","rest","v","DetailsList","TextContext","d","c","align","children","DetailsListValue"],"mappings":"2SA+Bc,MAAAA,CAAAA,IAAO,CAAA,CAAA,CAAAC,KAA4B,CAAA,CAEpCC,CAAAA,KACqD,CAAA,CAAI,CAAA,CAEtEC,wCACE,EAAA,SACA,CAAA,CAAA,CAAGC,QAEH,CAAA,CAAA,CACEC,GAACH,CAAmB,CAAA,CAAA,CAAA,OAASI,GAAA,CAAA,CAAA,CAAA,QAC1B,CAAA,CAAA,KACH,CAEJ,CACAC,CAAAA,QAAoB,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,8BAEsB,CACtD,SAAQC,CAAAA,CAAA,CAAM,CAAA,CAAA,OAAUF,GAAA,CAAAG,IAAA,CAAA,CAAA,GAAY,CAAA,CAAA,WAAU,CAAA,IAAQ,CACxD,IACiB,CAAA,OAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,mBAEyB,CACtD,SAAQD,CAAAA,CAAA,CAAM,CAAA,CAAA,OAAUF,GAAA,CAAAG,IAAA,CAAA,CAAA,GAAY,CAAA,CAAA,WAAU,CAAA,IAAQ,CACxD,IACiB,CAAA,OAAA,CAAA,CAAA,CAAc,iCA+BD,CAAA,SAAc,CAAqB,CAC/D,CAACL,GAAU,CAAA,CAAIM,CAAAA,GAAuBC,CAAAA,CAAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAMT,CAAkB,CAA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.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport {\n type ContextValue,\n DEFAULT_SLOT,\n Text,\n TextContext,\n useContextProps,\n} from 'react-aria-components';\nimport { containsExactChildren } from '@/lib/react';\nimport { DetailsListStyles, DetailsListStylesDefaults } from './styles';\nimport type { ProviderProps } from '@/lib/types';\nimport type {\n DetailsListLabelProps,\n DetailsListProps,\n DetailsListValueProps,\n} from './types';\n\nconst { list, label, value } = DetailsListStyles();\n\nexport const DetailsListContext =\n createContext<ContextValue<DetailsListProps, HTMLDListElement>>(null);\n\nfunction DetailsListProvider({\n children,\n ...props\n}: ProviderProps<DetailsListProps>) {\n return (\n <DetailsListContext.Provider value={props}>\n {children}\n </DetailsListContext.Provider>\n );\n}\nDetailsListProvider.displayName = 'DetailsListProvider.Provider';\n\nfunction DetailsListLabel(props: DetailsListLabelProps) {\n return <Text {...props} elementType='dt' slot='label' />;\n}\nDetailsListLabel.displayName = 'DetailsList.Label';\n\nfunction DetailsListValue(props: DetailsListValueProps) {\n return <Text {...props} elementType='dd' slot='value' />;\n}\nDetailsListValue.displayName = 'DetailsList.Value';\n\n/**\n * A semantic details list component for displaying metadata in key-value pairs.\n * Uses CSS Grid layout with labels in the first column and values in the second column.\n * Perfect for map object details, user profiles, or any structured information.\n *\n * @example\n * ```tsx\n * <DetailsList align=\"left\">\n * <DetailsList.Label>Key</DetailsList.Label>\n * <DetailsList.Value>Value</DetailsList.Value>\n *\n * <DetailsList.Label>Ships</DetailsList.Label>\n * <DetailsList.Value>Millennium Falcon</DetailsList.Value>\n * <DetailsList.Value>USS Enterprise NCC-1701</DetailsList.Value>\n * <DetailsList.Value>Serenity</DetailsList.Value>\n *\n * <DetailsList.Label>Coordinates</DetailsList.Label>\n * <DetailsList.Value>\n * <div>Great Pyramid of Giza: 29°58'44\" N 31°08'02\" E</div>\n * <div>Machu Picchu: 13°09'47\" S 72°32'41\" W</div>\n * <div>Colosseum: 41°53'24\" N 12°29'32\" E</div>\n * <div>Taj Mahal: 27°10'30\" N 78°02'31\" E</div>\n * </DetailsList.Value>\n * </DetailsList>\n * ```\n * ## Child Component Behavior\n * - **DetailsList.Label**: Minimum of 1\n * - **DetailsList.Value**: Minimum of 1\n */\nexport function DetailsList({ ref, ...props }: DetailsListProps) {\n [props, ref] = useContextProps(props, ref ?? null, DetailsListContext);\n\n const {\n children,\n classNames,\n align = DetailsListStylesDefaults.align,\n ...rest\n } = props;\n\n containsExactChildren({\n children,\n componentName: DetailsList.displayName,\n restrictions: [\n [DetailsList.Label, { min: 1 }],\n [DetailsList.Value, { min: 1 }],\n ],\n });\n\n return (\n <TextContext\n value={{\n slots: {\n [DEFAULT_SLOT]: {},\n label: { className: label({ className: classNames?.label, align }) },\n value: { className: value({ className: classNames?.value, align }) },\n },\n }}\n >\n <dl {...rest} className={list({ className: classNames?.list, align })}>\n {children}\n </dl>\n </TextContext>\n );\n}\nDetailsList.displayName = 'DetailsList';\nDetailsList.Provider = DetailsListProvider;\nDetailsList.Label = DetailsListLabel;\nDetailsList.Value = DetailsListValue;\n"]}
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';const l={align:"justify"},a=tv({slots:{list:"grid grid-cols-[auto_1fr] gap-x-m font-display text-body-m",label:"fg-default-dark col-start-1",value:"fg-default-light col-start-2"},variants:{align:{left:{label:"text-left",value:"text-left"},center:{label:"text-right",value:"text-left"},justify:{label:"text-left",value:"text-right"}}},defaultVariants:l});export{a as DetailsListStyles,l as DetailsListStylesDefaults};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const l={align:"justify"},a=tv({slots:{list:"grid grid-cols-[auto_1fr] gap-x-m font-display text-body-m",label:"fg-primary-muted col-start-1",value:"fg-primary-bold col-start-2"},variants:{align:{left:{label:"text-left",value:"text-left"},center:{label:"text-right",value:"text-left"},justify:{label:"text-left",value:"text-right"}}},defaultVariants:l});export{a as DetailsListStyles,l as DetailsListStylesDefaults};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/details-list/styles.ts"],"names":["t"],"mappings":"sCAeS,MAAA,CAAA,CAAA,CAAA,KACT,CAAA,SAGE,CAAA,CAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KAAM,CAAA,CAAA,IAAA,CAAA,4DACC,CAAA,KAAA,CAAA,6BACA,CAAA,KAAA,CAAA,8BAET,CAAU,CACR,eACU,CAAA,CAAA,uBAA2B,CAAA,KAAA,CAAA,WACzB,CAAA,CAAA,MAAO,CAAA,CAAA,KAAA,CAAA,YAAqB,CAAA,KAAA,CAAA,WAC7B,CAAE,CAAA,OAAO,CAAA,CAAA,KAAA,CAAA,WAAoB,CAAA,KAAA,CAAA,YAG1C,CAAA,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const DetailsListStylesDefaults = {\n align: 'justify',\n} as const;\n\nexport const DetailsListStyles = tv({\n slots: {\n list: 'grid grid-cols-[auto_1fr] gap-x-m font-display text-body-m',\n label: 'fg-default-dark col-start-1',\n value: 'fg-default-light col-start-2',\n },\n variants: {\n align: {\n left: { label: 'text-left', value: 'text-left' },\n center: { label: 'text-right', value: 'text-left' },\n justify: { label: 'text-left', value: 'text-right' },\n },\n },\n defaultVariants: DetailsListStylesDefaults,\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/details-list/styles.ts"],"names":["t"],"mappings":"sCAeS,MAAA,CAAA,CAAA,CAAA,KACT,CAAA,SAGE,CAAA,CAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KAAM,CAAA,CAAA,IAAA,CAAA,4DACC,CAAA,KAAA,CAAA,8BACA,CAAA,KAAA,CAAA,6BAET,CAAU,CACR,eACU,CAAA,CAAA,uBAA2B,CAAA,KAAA,CAAA,WACzB,CAAA,CAAA,MAAO,CAAA,CAAA,KAAA,CAAA,YAAqB,CAAA,KAAA,CAAA,WAC7B,CAAE,CAAA,OAAO,CAAA,CAAA,KAAA,CAAA,WAAoB,CAAA,KAAA,CAAA,YAG1C,CAAA,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const DetailsListStylesDefaults = {\n align: 'justify',\n} as const;\n\nexport const DetailsListStyles = tv({\n slots: {\n list: 'grid grid-cols-[auto_1fr] gap-x-m font-display text-body-m',\n label: 'fg-primary-muted col-start-1',\n value: 'fg-primary-bold col-start-2',\n },\n variants: {\n align: {\n left: { label: 'text-left', value: 'text-left' },\n center: { label: 'text-right', value: 'text-left' },\n justify: { label: 'text-left', value: 'text-right' },\n },\n },\n defaultVariants: DetailsListStylesDefaults,\n});\n"]}
@@ -1,2 +1,4 @@
1
- import {jsx}from'react/jsx-runtime';import'client-only';import {isSlottedContextValue}from'./../../lib/utils.js';import {UNSAFE_PortalProvider}from'@react-aria/overlays';import {useIsSSR}from'@react-aria/ssr';import {createContext,useState,useEffect,useContext}from'react';import {useContextProps,ModalOverlay,composeRenderProps,Modal,Dialog,DialogTrigger,Heading,OverlayTriggerStateContext}from'react-aria-components';import {ButtonContext}from'../button/index.js';import {DialogStyles}from'./styles.js';const {overlay:h,modal:B,dialog:U,title:_,content:I,footer:L}=DialogStyles(),d=createContext(null);function g({children:e,className:o}){return jsx(Heading,{slot:"title",className:_({className:o}),children:e})}g.displayName="Dialog.Title";function f({children:e,className:o}){return jsx("div",{className:I({className:o}),children:e})}f.displayName="Dialog.Content";function P({children:e,className:o}){const a=useContext(d),s=(isSlottedContextValue(a)?null:a?.size)??"small",n=useContext(OverlayTriggerStateContext);return jsx("footer",{className:L({className:o}),children:jsx(ButtonContext.Provider,{value:{size:s,onPress:n?.close??(()=>{})},children:e})})}P.displayName="Dialog.Footer";function r({ref:e,...o}){[o,e]=useContextProps(o,e??null,d);const a=useIsSSR(),[s,n]=useState(a?null:document.body),{children:v,classNames:m,parentRef:c,size:C="small",...D}=o;return useEffect(()=>{const l=c?.current,i=a?null:document.createElement("div");return l&&i&&(l.appendChild(i),n(i)),()=>{i?.remove(),n(a?null:document.body);}},[a,c]),jsx(d.Provider,{value:o,children:jsx(UNSAFE_PortalProvider,{getContainer:()=>s,children:jsx(ModalOverlay,{...D,ref:e,className:composeRenderProps(m?.overlay,l=>h({className:l})),"data-size":C,children:jsx(Modal,{className:composeRenderProps(m?.modal,l=>B({className:l})),children:jsx(Dialog,{className:U({className:m?.dialog}),children:v})})})})})}r.displayName="Dialog",r.Trigger=DialogTrigger,r.Title=g,r.Content=f,r.Footer=P;export{r as Dialog,d as DialogContext};//# sourceMappingURL=index.js.map
1
+ 'use client';
2
+
3
+ import {jsx}from'react/jsx-runtime';import'client-only';import {UNSAFE_PortalProvider}from'@react-aria/overlays';import {useIsSSR}from'@react-aria/ssr';import {createContext,useState,useEffect,useContext}from'react';import {useContextProps,ModalOverlay,composeRenderProps,Modal,Dialog,DialogTrigger,Heading,OverlayTriggerStateContext}from'react-aria-components';import {isSlottedContextValue}from'./../../lib/utils.js';import {ButtonContext}from'../button/index.js';import {DialogStyles}from'./styles.js';const {overlay:h,modal:B,dialog:U,title:_,content:I,footer:L}=DialogStyles(),d=createContext(null);function g({children:e,className:o}){return jsx(Heading,{slot:"title",className:_({className:o}),children:e})}g.displayName="Dialog.Title";function f({children:e,className:o}){return jsx("div",{className:I({className:o}),children:e})}f.displayName="Dialog.Content";function P({children:e,className:o}){const a=useContext(d),s=(isSlottedContextValue(a)?null:a?.size)??"small",n=useContext(OverlayTriggerStateContext);return jsx("footer",{className:L({className:o}),children:jsx(ButtonContext.Provider,{value:{size:s,onPress:n?.close??(()=>{})},children:e})})}P.displayName="Dialog.Footer";function r({ref:e,...o}){[o,e]=useContextProps(o,e??null,d);const a=useIsSSR(),[s,n]=useState(a?null:document.body),{children:v,classNames:m,parentRef:c,size:C="small",...D}=o;return useEffect(()=>{const l=c?.current,i=a?null:document.createElement("div");return l&&i&&(l.appendChild(i),n(i)),()=>{i?.remove(),n(a?null:document.body);}},[a,c]),jsx(d.Provider,{value:o,children:jsx(UNSAFE_PortalProvider,{getContainer:()=>s,children:jsx(ModalOverlay,{...D,ref:e,className:composeRenderProps(m?.overlay,l=>h({className:l})),"data-size":C,children:jsx(Modal,{className:composeRenderProps(m?.modal,l=>B({className:l})),children:jsx(Dialog,{className:U({className:m?.dialog}),children:v})})})})})}r.displayName="Dialog",r.Trigger=DialogTrigger,r.Title=g,r.Content=f,r.Footer=P;export{r as Dialog,d as DialogContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/dialog/index.tsx"],"names":["title","DialogStyles","DialogContext","DialogTitle","S","className","jsx","Heading","t","M","children","DialogContent","context","useContext","y","state","p","R","size","DialogFooter","props","ref","isSSR","useIsSSR","portal","x","E","classNames","parentRef","useEffect","node","T","port","setPortal","N","rest","composeRenderProps","modal","u","dialog","F","Dialog"],"mappings":"yfAwCwB,MAAA,CAAA,SAAQA,CAAAA,KAAO,CAAA,CAAA,CAAA,MAAS,CAAA,CAAA,CAAA,KAAWC,CAAa,EAE3DC,QACkD,CAAA,CAE/D,MAAA,CAAA,CAAA,CAASC,aAAY,EAAE,CAAA,CAAA,CAAAC,aAAA,CAAA,MAAU,SAAAC,CAAU,EAAiB,QAExDC,EAACC,CAAAA,SAAa,CAAA,CAAA,CAAA,CAAA,CAAA,OAAQC,GAAA,CAAAC,OAAA,CAAWT,CAAAA,YAAQK,CAAU,SAChD,CAAA,CAAA,CAAAK,CAAAA,SAIK,CAAA,CAAA,CAAA,CAAA,CAAA,QAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,YAEjBC,cAA0B,CAAA,SAAAN,CAAU,CAAA,CAA0B,QAC9DC,CAAAA,CAAC,UAAI,CAAA,CAAA,CAAA,CAAA,CAAA,OAAqBE,GAAA,CAAA,KAAA,CAAAH,CAAU,SAAK,CAAA,CAAA,CAAAK,UAEpC,CAAA,CAAA,CAAA,CAAA,CAAA,QAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,4BAEM,CAAA,SAAAL,CAAU,CAAA,CAA6B,QACjEO,CAAUC,EAAWX,SAEK,EAAI,CAAA,CAAA,CAAA,qBAAyB,CAAA,CAAA,CAAA,CAAAY,qBAAA,CAAA,CAAA,CACvDC,CAAAA,IAA6C,CAAA,CAEnD,SACG,OAAA,CAAA,CAAA,CAAOC,UAAA,CAAAC,0BAAA,CAAA,CAAA,OAAkBT,GAAE,CAAA,QAAA,CAAAH,CAAU,SACpC,CAAA,CAAA,CAA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,iCACxCA,OAEZ,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,SAEA,CAAA,CAAA,CAAA,CAAA,CAAAC,CAAAA,WACE,CAAA,CAAA,CAAW8B,aAAuC/B,KAAAA,CAAAA,CAChDgC,SAAQ,CAAAC,kBAAA,CAAA,CAAAjC,EAAW,YAGrBC,SAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAWiC,QAAS,CAAA/B,GAAA,CAAAgC,MAAA,CAAWb,CAAAA,SAAoB,CAAA,CAC5D,CAAA,CAAA,SACH,EACF,EACF,MAKRc,EAAO,CAAA,QAAA,CAAA,CAAA,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACrBA,EAAO,CAAA,WACA,CAAA,SACA,CAAA,CAAA,OAAU9B,CACjB8B,cAAO,CAAA,CAAA,KAAStB,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,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 { isSlottedContextValue } from '@/lib/utils';\nimport { UNSAFE_PortalProvider } from '@react-aria/overlays';\nimport { useIsSSR } from '@react-aria/ssr';\nimport {\n type ComponentProps,\n createContext,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport {\n Dialog as AriaDialog,\n type ContextValue,\n DialogTrigger,\n Heading,\n type HeadingProps,\n Modal,\n ModalOverlay,\n OverlayTriggerStateContext,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { ButtonContext } from '../button';\nimport { DialogStyles } from './styles';\nimport type { DialogProps } from './types';\n\nconst { overlay, modal, dialog, title, content, footer } = DialogStyles();\n\nexport const DialogContext =\n createContext<ContextValue<DialogProps, HTMLDivElement>>(null);\n\nfunction DialogTitle({ children, className }: HeadingProps) {\n return (\n <Heading slot='title' className={title({ className })}>\n {children}\n </Heading>\n );\n}\nDialogTitle.displayName = 'Dialog.Title';\n\nfunction DialogContent({ children, className }: ComponentProps<'div'>) {\n return <div className={content({ className })}>{children}</div>;\n}\nDialogContent.displayName = 'Dialog.Content';\n\nfunction DialogFooter({ children, className }: ComponentProps<'footer'>) {\n const context = useContext(DialogContext);\n const size =\n (isSlottedContextValue(context) ? null : context?.size) ?? 'small';\n const state = useContext(OverlayTriggerStateContext);\n\n return (\n <footer className={footer({ className })}>\n <ButtonContext.Provider\n value={{\n size,\n onPress: state?.close ?? (() => undefined),\n }}\n >\n {children}\n </ButtonContext.Provider>\n </footer>\n );\n}\n\nDialogFooter.displayName = 'Dialog.Footer';\n\n/**\n * Dialog - A modal dialog component for important content and interactions\n *\n * Provides accessible modal functionality with focus management, backdrop handling,\n * and keyboard navigation. Supports multiple sizes and customizable dismissal behavior.\n * Perfect for confirmations, forms, or any content requiring user focus.\n *\n * @example\n * // Basic dialog with trigger\n * <Dialog.Trigger>\n * <Button>Open Dialog</Button>\n * <Dialog>\n * {({ close }) => (\n * <>\n * <Dialog.Title>Confirm Action</Dialog.Title>\n * <p>Are you sure you want to continue?</p>\n * <Dialog.Footer>\n * <Dialog.Button onPress={close}>Confirm</Dialog.Button>\n * </Dialog.Footer>\n * </>\n * )}\n * </Dialog>\n * </Dialog.Trigger>\n */\nexport function Dialog({ ref, ...props }: DialogProps) {\n [props, ref] = useContextProps(props, ref ?? null, DialogContext);\n\n const isSSR = useIsSSR();\n const [portal, setPortal] = useState(isSSR ? null : document.body);\n const { children, classNames, parentRef, size = 'small', ...rest } = props;\n\n useEffect(() => {\n const node = parentRef?.current;\n // TODO: Ensure proper ssr hydration\n const port = isSSR ? null : document.createElement('div');\n\n if (node && port) {\n node.appendChild(port);\n\n setPortal(port);\n }\n\n return () => {\n port?.remove();\n\n setPortal(isSSR ? null : document.body);\n };\n }, [isSSR, parentRef]);\n\n return (\n <DialogContext.Provider value={props}>\n <UNSAFE_PortalProvider getContainer={() => portal}>\n <ModalOverlay\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.overlay, (className) =>\n overlay({ className }),\n )}\n data-size={size}\n >\n <Modal\n className={composeRenderProps(classNames?.modal, (className) =>\n modal({ className }),\n )}\n >\n <AriaDialog className={dialog({ className: classNames?.dialog })}>\n {children}\n </AriaDialog>\n </Modal>\n </ModalOverlay>\n </UNSAFE_PortalProvider>\n </DialogContext.Provider>\n );\n}\nDialog.displayName = 'Dialog';\nDialog.Trigger = DialogTrigger;\nDialog.Title = DialogTitle;\nDialog.Content = DialogContent;\nDialog.Footer = DialogFooter;\n"]}
1
+ {"version":3,"sources":["../../../src/components/dialog/index.tsx"],"names":["title","DialogStyles","DialogContext","DialogTitle","x","className","jsx","Heading","t","H","children","DialogContent","context","useContext","O","state","p","A","size","DialogFooter","props","ref","isSSR","useIsSSR","portal","N","T","classNames","parentRef","useEffect","node","S","port","setPortal","y","rest","composeRenderProps","modal","u","dialog","E","Dialog"],"mappings":"yfAwCwB,MAAA,CAAA,SAAQA,CAAAA,KAAO,CAAA,CAAA,CAAA,MAAS,CAAA,CAAA,CAAA,KAAWC,CAAa,EAE3DC,QACkD,CAAA,CAE/D,MAAA,CAAA,CAAA,CAASC,aAAY,EAAE,CAAA,CAAA,CAAAC,aAAA,CAAA,MAAU,SAAAC,CAAU,EAAiB,QAExDC,EAACC,CAAAA,SAAa,CAAA,CAAA,CAAA,CAAA,CAAA,OAAQC,GAAA,CAAAC,OAAA,CAAWT,CAAAA,YAAQK,CAAU,SAChD,CAAA,CAAA,CAAAK,CAAAA,SAIK,CAAA,CAAA,CAAA,C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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 { UNSAFE_PortalProvider } from '@react-aria/overlays';\nimport { useIsSSR } from '@react-aria/ssr';\nimport {\n type ComponentProps,\n createContext,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport {\n Dialog as AriaDialog,\n type ContextValue,\n composeRenderProps,\n DialogTrigger,\n Heading,\n type HeadingProps,\n Modal,\n ModalOverlay,\n OverlayTriggerStateContext,\n useContextProps,\n} from 'react-aria-components';\nimport { isSlottedContextValue } from '@/lib/utils';\nimport { ButtonContext } from '../button';\nimport { DialogStyles } from './styles';\nimport type { DialogProps } from './types';\n\nconst { overlay, modal, dialog, title, content, footer } = DialogStyles();\n\nexport const DialogContext =\n createContext<ContextValue<DialogProps, HTMLDivElement>>(null);\n\nfunction DialogTitle({ children, className }: HeadingProps) {\n return (\n <Heading slot='title' className={title({ className })}>\n {children}\n </Heading>\n );\n}\nDialogTitle.displayName = 'Dialog.Title';\n\nfunction DialogContent({ children, className }: ComponentProps<'div'>) {\n return <div className={content({ className })}>{children}</div>;\n}\nDialogContent.displayName = 'Dialog.Content';\n\nfunction DialogFooter({ children, className }: ComponentProps<'footer'>) {\n const context = useContext(DialogContext);\n const size =\n (isSlottedContextValue(context) ? null : context?.size) ?? 'small';\n const state = useContext(OverlayTriggerStateContext);\n\n return (\n <footer className={footer({ className })}>\n <ButtonContext.Provider\n value={{\n size,\n onPress: state?.close ?? (() => undefined),\n }}\n >\n {children}\n </ButtonContext.Provider>\n </footer>\n );\n}\n\nDialogFooter.displayName = 'Dialog.Footer';\n\n/**\n * Dialog - A modal dialog component for important content and interactions\n *\n * Provides accessible modal functionality with focus management, backdrop handling,\n * and keyboard navigation. Supports multiple sizes and customizable dismissal behavior.\n * Perfect for confirmations, forms, or any content requiring user focus.\n *\n * @example\n * // Basic dialog with trigger\n * <Dialog.Trigger>\n * <Button>Open Dialog</Button>\n * <Dialog>\n * {({ close }) => (\n * <>\n * <Dialog.Title>Confirm Action</Dialog.Title>\n * <p>Are you sure you want to continue?</p>\n * <Dialog.Footer>\n * <Dialog.Button onPress={close}>Confirm</Dialog.Button>\n * </Dialog.Footer>\n * </>\n * )}\n * </Dialog>\n * </Dialog.Trigger>\n */\nexport function Dialog({ ref, ...props }: DialogProps) {\n [props, ref] = useContextProps(props, ref ?? null, DialogContext);\n\n const isSSR = useIsSSR();\n const [portal, setPortal] = useState(isSSR ? null : document.body);\n const { children, classNames, parentRef, size = 'small', ...rest } = props;\n\n useEffect(() => {\n const node = parentRef?.current;\n // TODO: Ensure proper ssr hydration\n const port = isSSR ? null : document.createElement('div');\n\n if (node && port) {\n node.appendChild(port);\n\n setPortal(port);\n }\n\n return () => {\n port?.remove();\n\n setPortal(isSSR ? null : document.body);\n };\n }, [isSSR, parentRef]);\n\n return (\n <DialogContext.Provider value={props}>\n <UNSAFE_PortalProvider getContainer={() => portal}>\n <ModalOverlay\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.overlay, (className) =>\n overlay({ className }),\n )}\n data-size={size}\n >\n <Modal\n className={composeRenderProps(classNames?.modal, (className) =>\n modal({ className }),\n )}\n >\n <AriaDialog className={dialog({ className: classNames?.dialog })}>\n {children}\n </AriaDialog>\n </Modal>\n </ModalOverlay>\n </UNSAFE_PortalProvider>\n </DialogContext.Provider>\n );\n}\nDialog.displayName = 'Dialog';\nDialog.Trigger = DialogTrigger;\nDialog.Title = DialogTitle;\nDialog.Content = DialogContent;\nDialog.Footer = DialogFooter;\n"]}
@@ -55,6 +55,6 @@ declare const DialogStyles: tailwind_variants.TVReturnType<{
55
55
  title: string[];
56
56
  content: string[];
57
57
  footer: string[];
58
- }, undefined, unknown, unknown, undefined>>;
58
+ }, undefined, unknown, unknown>>;
59
59
 
60
60
  export { DialogStyles };
@@ -1,2 +1,2 @@
1
- import {tv}from'tailwind-variants';const o=tv({slots:{overlay:"group/dialog absolute inset-0 flex items-center justify-center",modal:["flex flex-col justify-center bg-surface-overlay align-start","group-size-small/dialog:rounded-medium","group-size-large/dialog:rounded-large","shadow-elevation-overlay"],dialog:["focus-visible:outline-none","flex flex-col align-end font-light text-body-m text-default-dark","group-size-small/dialog:w-[280px] group-size-small/dialog:rounded-medium group-size-small/dialog:p-l","group-size-large/dialog:min-w-[320px] group-size-small/dialog:max-w-[720px] group-size-large/dialog:rounded-medium group-size-large/dialog:p-xl"],title:["text-default-light","group-size-small/dialog:mb-s group-size-small/dialog:text-header-m","group-size-large/dialog:mb-m group-size-large/dialog:text-header-l"],content:["flex flex-col","foreground-primary-muted","group-size-small/dialog:gap-xs","group-size-large/dialog:gap-l"],footer:["flex justify-end gap-xs","group-size-small/dialog:mt-l","group-size-large/dialog:mt-xl"]}});export{o as DialogStyles};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const o=tv({slots:{overlay:"group/dialog absolute inset-0 flex items-center justify-center",modal:["flex flex-col justify-center bg-surface-overlay align-start","group-size-small/dialog:rounded-medium","group-size-large/dialog:rounded-large","shadow-elevation-overlay"],dialog:["focus-visible:outline-none","fg-primary-muted flex flex-col align-end font-light text-body-m","group-size-small/dialog:w-[280px] group-size-small/dialog:rounded-medium group-size-small/dialog:p-l","group-size-large/dialog:min-w-[320px] group-size-small/dialog:max-w-[720px] group-size-large/dialog:rounded-medium group-size-large/dialog:p-xl"],title:["fg-primary-bold","group-size-small/dialog:mb-s group-size-small/dialog:text-header-m","group-size-large/dialog:mb-m group-size-large/dialog:text-header-l"],content:["flex flex-col","fg-primary-muted","group-size-small/dialog:gap-xs","group-size-large/dialog:gap-l"],footer:["flex justify-end gap-xs","group-size-small/dialog:mt-l","group-size-large/dialog:mt-xl"]}});export{o as DialogStyles};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/dialog/styles.ts"],"names":["DialogStyles","tv"],"mappings":"mCAcO,MAAMA,EAAeC,EAAAA,CAAG,CAC7B,MAAO,CACL,OAAA,CAAS,iEACT,KAAA,CAAO,CACL,8DACA,wCAAA,CACA,uCAAA,CACA,0BACF,CAAA,CACA,MAAA,CAAQ,CACN,4BAAA,CACA,kEAAA,CACA,uGACA,iJACF,CAAA,CACA,MAAO,CACL,oBAAA,CACA,qEACA,oEACF,CAAA,CACA,QAAS,CACP,eAAA,CACA,2BACA,gCAAA,CACA,+BACF,EACA,MAAA,CAAQ,CACN,0BACA,8BAAA,CACA,+BACF,CACF,CACF,CAAC","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from 'tailwind-variants';\n\nexport const DialogStyles = tv({\n slots: {\n overlay: 'group/dialog absolute inset-0 flex items-center justify-center',\n modal: [\n 'flex flex-col justify-center bg-surface-overlay align-start',\n 'group-size-small/dialog:rounded-medium',\n 'group-size-large/dialog:rounded-large',\n 'shadow-elevation-overlay',\n ],\n dialog: [\n 'focus-visible:outline-none',\n 'flex flex-col align-end font-light text-body-m text-default-dark',\n 'group-size-small/dialog:w-[280px] group-size-small/dialog:rounded-medium group-size-small/dialog:p-l',\n 'group-size-large/dialog:min-w-[320px] group-size-small/dialog:max-w-[720px] group-size-large/dialog:rounded-medium group-size-large/dialog:p-xl',\n ],\n title: [\n 'text-default-light',\n 'group-size-small/dialog:mb-s group-size-small/dialog:text-header-m',\n 'group-size-large/dialog:mb-m group-size-large/dialog:text-header-l',\n ],\n content: [\n 'flex flex-col',\n 'foreground-primary-muted',\n 'group-size-small/dialog:gap-xs',\n 'group-size-large/dialog:gap-l',\n ],\n footer: [\n 'flex justify-end gap-xs',\n 'group-size-small/dialog:mt-l',\n 'group-size-large/dialog:mt-xl',\n ],\n },\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/dialog/styles.ts"],"names":["l"],"mappings":"6CAeS,CACLA,EAAA,CAAA,CAAA,KAAS,+IAGP,CAAA,wCACA,CAAA,kEAIA,CAAA,CAAA,MAAA,CAAA,CAAA,4BACA,CAAA,wKAEA,CAAA,iJAGA,CAAA,CAAA,KAAA,CAAA,CAAA,sFAEA,CAAA,oEAEO,CACP,CAAA,OAAA,CAAA,CAAA,kCAEA,CAAA,gCACA,CAAA,+BAGA,mCACA,CAAA,8BACA,CAAA,+BAGL,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 DialogStyles = tv({\n slots: {\n overlay: 'group/dialog absolute inset-0 flex items-center justify-center',\n modal: [\n 'flex flex-col justify-center bg-surface-overlay align-start',\n 'group-size-small/dialog:rounded-medium',\n 'group-size-large/dialog:rounded-large',\n 'shadow-elevation-overlay',\n ],\n dialog: [\n 'focus-visible:outline-none',\n 'fg-primary-muted flex flex-col align-end font-light text-body-m',\n 'group-size-small/dialog:w-[280px] group-size-small/dialog:rounded-medium group-size-small/dialog:p-l',\n 'group-size-large/dialog:min-w-[320px] group-size-small/dialog:max-w-[720px] group-size-large/dialog:rounded-medium group-size-large/dialog:p-xl',\n ],\n title: [\n 'fg-primary-bold',\n 'group-size-small/dialog:mb-s group-size-small/dialog:text-header-m',\n 'group-size-large/dialog:mb-m group-size-large/dialog:text-header-l',\n ],\n content: [\n 'flex flex-col',\n 'fg-primary-muted',\n 'group-size-small/dialog:gap-xs',\n 'group-size-large/dialog:gap-l',\n ],\n footer: [\n 'flex justify-end gap-xs',\n 'group-size-small/dialog:mt-l',\n 'group-size-large/dialog:mt-xl',\n ],\n },\n});\n"]}
@@ -7,9 +7,9 @@ import { DrawerProps, DrawerLayoutProps, DrawerMenuProps, DrawerMenuItemProps, D
7
7
  import '@accelint/bus';
8
8
  import 'react-aria-components';
9
9
  import '../view-stack/events.js';
10
- import '../../lib/types.js';
11
10
  import '@react-types/shared';
12
11
  import 'tailwind-variants';
12
+ import '../../lib/types.js';
13
13
  import '../button/types.js';
14
14
  import '../button/styles.js';
15
15
  import 'tailwind-merge';
@@ -1,2 +1,4 @@
1
- import {jsx}from'react/jsx-runtime';import'client-only';import {containsExactChildren}from'./../../lib/react.js';import {Broadcast}from'@accelint/bus';import {isUUID}from'@accelint/core';import {Pressable}from'@react-aria/interactions';import {createContext,useRef,useState,useCallback,useEffect,useContext}from'react';import {composeRenderProps,Heading,Header}from'react-aria-components';import {ToggleButton}from'../button/index.js';import {Icon}from'../icon/index.js';import {ViewStackEventHandlers,ViewStack,ViewStackContext}from'../view-stack/index.js';import {ViewStackEventTypes}from'../view-stack/events.js';import {DrawerEventTypes}from'./events.js';import {DrawerStyles,DrawerMenuStyles,DrawerTitleStyles}from'./styles.js';const {layout:j,main:ee,drawer:re,panel:te,view:ae,header:ne,content:oe,footer:ie}=DrawerStyles(),{menu:se,item:pe}=DrawerMenuStyles(),l=Broadcast.getInstance(),R=createContext({register:()=>{},unregister:()=>{}}),le={...ViewStackEventHandlers,close:ViewStackEventHandlers.clear,open:e=>l.emit(DrawerEventTypes.open,{view:e}),toggle:e=>l.emit(DrawerEventTypes.toggle,{view:e})};function g({children:e,for:r}){const{parent:n}=useContext(ViewStackContext);function o(){for(const i of Array.isArray(r)?r:[r]){let[p,m]=isUUID(i)?["push",i]:i.split(":");m??=n,m&&le[p](m);}}return jsx(Pressable,{onPress:o,children:e})}g.displayName="Drawer.Trigger";function q({className:e,...r}){return jsx("main",{...r,className:ee({className:e})})}q.displayName="Drawer.Layout.Main";function P({className:e,extend:r="left right",push:n,...o}){return jsx("div",{...o,className:j({className:e}),"data-extend":r,"data-push":n})}P.displayName="Drawer.Layout",P.Main=q;function N({for:e,children:r,className:n,toggle:o,views:i,...p}){const{parent:m,stack:y}=useContext(ViewStackContext),c=y.at(-1),w=o?"toggle":"open";return m?jsx(g,{for:`${w}:${e}`,children:jsx(ToggleButton,{...p,className:composeRenderProps(n,u=>pe({className:u})),role:"tab",variant:"icon",isSelected:e===c||!!i?.some(u=>e===u),children:composeRenderProps(r,u=>jsx(Icon,{children:u}))})}):null}N.displayName="Drawer.Menu.Item";function d({className:e,position:r="center",children:n,...o}){return containsExactChildren({children:n,componentName:d.displayName,restrictions:[[N,{min:1}],[g,{min:0,max:0}]]}),jsx("nav",{...o,className:se({position:r,className:e}),children:n})}d.displayName="Drawer.Menu",d.Item=N;function h({className:e,...r}){return jsx("div",{...r,className:te({className:e})})}h.displayName="Drawer.Panel";function H({id:e,children:r,className:n,...o}){const{register:i,unregister:p}=useContext(R);return useEffect(()=>{i(e);},[i,p,e]),jsx(ViewStack.View,{id:e,children:jsx("div",{...o,className:ae({className:n}),role:"tabpanel",children:r})})}H.displayName="Drawer.View";function b({className:e,level:r,...n}){return jsx(Heading,{...n,className:DrawerTitleStyles({className:e,level:r}),level:r})}b.displayName="Drawer.Title";function C({className:e,...r}){return jsx(Header,{...r,className:ne({className:e})})}C.displayName="Drawer.Header",C.Title=b;function L({className:e,...r}){return jsx("div",{...r,className:oe({className:e})})}L.displayName="Drawer.Content";function W({className:e,...r}){return jsx("footer",{...r,className:ie({className:e})})}W.displayName="Drawer.Footer";function s({id:e,children:r,className:n,defaultView:o,placement:i="left",size:p="medium",onChange:m,...y}){containsExactChildren({children:r,componentName:s.displayName,restrictions:[[d,{min:0,max:1}],[h,{min:1,max:1}]]});const c=useRef(new Set),[w,u]=useState(o||null),T=useCallback(a=>{c.current.has(a?.payload?.view)&&(l.emit(ViewStackEventTypes.clear,{stack:e}),l.emit(ViewStackEventTypes.push,a.payload));},[e]),V=useCallback(a=>{c.current.has(a?.payload?.view)&&(l.emit(ViewStackEventTypes.clear,{stack:e}),w!==a?.payload?.view&&l.emit(ViewStackEventTypes.push,a.payload));},[e,w]);return useEffect(()=>{const a=[l.on(DrawerEventTypes.open,T),l.on(DrawerEventTypes.toggle,V)];return ()=>{for(const A of a)A();}},[T,V]),jsx(R.Provider,{value:{register:a=>c.current.add(a),unregister:a=>c.current.delete(a)},children:jsx(ViewStack,{id:e,defaultView:o,onChange:a=>{u(a),m?.(a);},children:jsx("div",{...y,className:re({className:n}),"data-open":!!w||null,"data-placement":i,"data-size":p,children:r})})})}s.displayName="Drawer",s.Layout=P,s.Menu=d,s.Panel=h,s.View=H,s.Header=C,s.Content=L,s.Footer=W,s.Trigger=g;export{s as Drawer,R as DrawerContext,le as DrawerEventHandlers};//# sourceMappingURL=index.js.map
1
+ 'use client';
2
+
3
+ import {jsx}from'react/jsx-runtime';import'client-only';import {Broadcast}from'@accelint/bus';import {isUUID}from'@accelint/core';import {Pressable}from'@react-aria/interactions';import {createContext,useRef,useState,useCallback,useEffect,useContext}from'react';import {composeRenderProps,Heading,Header}from'react-aria-components';import {containsExactChildren}from'./../../lib/react.js';import {ToggleButton}from'../button/index.js';import {Icon}from'../icon/index.js';import {ViewStackEventHandlers,ViewStack,ViewStackContext}from'../view-stack/index.js';import {ViewStackEventTypes}from'../view-stack/events.js';import {DrawerEventTypes}from'./events.js';import {DrawerStyles,DrawerMenuStyles,DrawerTitleStyles}from'./styles.js';const {layout:j,main:ee,drawer:re,panel:te,view:ae,header:ne,content:oe,footer:ie}=DrawerStyles(),{menu:se,item:pe}=DrawerMenuStyles(),l=Broadcast.getInstance(),R=createContext({register:()=>{},unregister:()=>{}}),le={...ViewStackEventHandlers,close:ViewStackEventHandlers.clear,open:e=>l.emit(DrawerEventTypes.open,{view:e}),toggle:e=>l.emit(DrawerEventTypes.toggle,{view:e})};function g({children:e,for:r}){const{parent:n}=useContext(ViewStackContext);function o(){for(const i of Array.isArray(r)?r:[r]){let[p,m]=isUUID(i)?["push",i]:i.split(":");m??=n,m&&le[p](m);}}return jsx(Pressable,{onPress:o,children:e})}g.displayName="Drawer.Trigger";function q({className:e,...r}){return jsx("main",{...r,className:ee({className:e})})}q.displayName="Drawer.Layout.Main";function P({className:e,extend:r="left right",push:n,...o}){return jsx("div",{...o,className:j({className:e}),"data-extend":r,"data-push":n})}P.displayName="Drawer.Layout",P.Main=q;function N({for:e,children:r,className:n,toggle:o,views:i,...p}){const{parent:m,stack:y}=useContext(ViewStackContext),c=y.at(-1),w=o?"toggle":"open";return m?jsx(g,{for:`${w}:${e}`,children:jsx(ToggleButton,{...p,className:composeRenderProps(n,u=>pe({className:u})),role:"tab",variant:"icon",isSelected:e===c||!!i?.some(u=>e===u),children:composeRenderProps(r,u=>jsx(Icon,{children:u}))})}):null}N.displayName="Drawer.Menu.Item";function d({className:e,position:r="center",children:n,...o}){return containsExactChildren({children:n,componentName:d.displayName,restrictions:[[N,{min:1}],[g,{min:0,max:0}]]}),jsx("nav",{...o,className:se({position:r,className:e}),children:n})}d.displayName="Drawer.Menu",d.Item=N;function h({className:e,...r}){return jsx("div",{...r,className:te({className:e})})}h.displayName="Drawer.Panel";function H({id:e,children:r,className:n,...o}){const{register:i,unregister:p}=useContext(R);return useEffect(()=>{i(e);},[i,p,e]),jsx(ViewStack.View,{id:e,children:jsx("div",{...o,className:ae({className:n}),role:"tabpanel",children:r})})}H.displayName="Drawer.View";function b({className:e,level:r,...n}){return jsx(Heading,{...n,className:DrawerTitleStyles({className:e,level:r}),level:r})}b.displayName="Drawer.Title";function C({className:e,...r}){return jsx(Header,{...r,className:ne({className:e})})}C.displayName="Drawer.Header",C.Title=b;function L({className:e,...r}){return jsx("div",{...r,className:oe({className:e})})}L.displayName="Drawer.Content";function W({className:e,...r}){return jsx("footer",{...r,className:ie({className:e})})}W.displayName="Drawer.Footer";function s({id:e,children:r,className:n,defaultView:o,placement:i="left",size:p="medium",onChange:m,...y}){containsExactChildren({children:r,componentName:s.displayName,restrictions:[[d,{min:0,max:1}],[h,{min:1,max:1}]]});const c=useRef(new Set),[w,u]=useState(o||null),T=useCallback(a=>{c.current.has(a?.payload?.view)&&(l.emit(ViewStackEventTypes.clear,{stack:e}),l.emit(ViewStackEventTypes.push,a.payload));},[e]),V=useCallback(a=>{c.current.has(a?.payload?.view)&&(l.emit(ViewStackEventTypes.clear,{stack:e}),w!==a?.payload?.view&&l.emit(ViewStackEventTypes.push,a.payload));},[e,w]);return useEffect(()=>{const a=[l.on(DrawerEventTypes.open,T),l.on(DrawerEventTypes.toggle,V)];return ()=>{for(const A of a)A();}},[T,V]),jsx(R.Provider,{value:{register:a=>c.current.add(a),unregister:a=>c.current.delete(a)},children:jsx(ViewStack,{id:e,defaultView:o,onChange:a=>{u(a),m?.(a);},children:jsx("div",{...y,className:re({className:n}),"data-open":!!w||null,"data-placement":i,"data-size":p,children:r})})})}s.displayName="Drawer",s.Layout=P,s.Menu=d,s.Panel=h,s.View=H,s.Header=C,s.Content=L,s.Footer=W,s.Trigger=g;export{s as Drawer,R as DrawerContext,le as DrawerEventHandlers};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/drawer/index.tsx"],"names":["header","DrawerStyles","item","bus","Broadcast","createContext","Z","Y","B","ViewStackEventHandlers","$","view","U","D","DrawerTrigger","children","events","useContext","ViewStackContext","handlePress","type","v","E","isUUID","id","parent","DrawerEventHandlers","event","jsx","Pressable","t","O","className","rest","main","DrawerLayoutMain","DrawerLayout","extend","push","DrawerMenuItem","toggle","action","composeRenderProps","Q","S","views","X","DrawerMenu","position","I","DrawerPanel","panel","register","DrawerContext","useEffect","ViewStack","x","M","DrawerHeaderTitle","level","K","_","DrawerHeader","J","DrawerContent","content","defaultView","placement","size","activeView","setActiveView","useState","useCallback","data","G","ViewStackEventTypes","k","handleToggle","f","listeners","DrawerEventTypes","off","handleOpen","onChange","drawer","Drawer","DrawerFooter"],"mappings":"6tBAoD2C,MAAAA,CAAAA,MAAQ,CAAA,CAAA,CAAA,IAAS,UAAO,CACjEC,EAAa,CAAA,KACP,CAAA,OAAM,CAAA,EAAAC,CAAK,MACbC,CAAAA,EAAMC,CAAU,OAAA,CAAA,EAAA,CAAA,MAEOC,CAAkC,EAC7D,CAAA,CAAAC,YAAA,EAAA,CAAA,CAAA,IAAU,CAAG,GACb,IAAA,CAAA,EAAA,CAAA,CAAAC,gBAAA,EAAY,CAAA,CAAA,CAAGC,SAAA,CACjB,WAGKC,EACH,CAAA,CAAA,CAAAC,aAAA,CAAOD,CAAAA,QACP,CAAA,MAA0BN,CAAAA,UAA0B,CAAA,IAAQ,CAAA,CAAA,CAAA,CAAAQ,CAAK,EAAC,CAClE,CAAA,GAAAC,sBAAA,CAAA,KAA4BT,CAAIS,sBAAA,CAAA,KAAsB,CAAA,IAAA,CAAA,CAAQ,EAAE,CAAA,CAAA,IAAM,CACxEC,iBAEA,IAAA,CAAA,CAAA,IAASC,CAAc,CAAE,CAAA,CAAA,CAAA,MAAAC,CAAAA,CAAU,EAAA,CAAA,CAAKC,IACtC,CAAAH,gBAAA,CAAA,MAAQ,CAAA,CAAA,IAAO,CAAII,CAAAA,CAAWC,CAAgB,EAE9C,SAASC,CAA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,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { containsExactChildren } from '@/lib/react';\nimport { Broadcast } from '@accelint/bus';\nimport { type UniqueId, isUUID } from '@accelint/core';\nimport { Pressable } from '@react-aria/interactions';\nimport {\n type ComponentPropsWithRef,\n createContext,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { Header, Heading, composeRenderProps } from 'react-aria-components';\nimport { ToggleButton } from '../button';\nimport { Icon } from '../icon';\nimport {\n ViewStack,\n ViewStackContext,\n ViewStackEventHandlers,\n} from '../view-stack';\nimport { ViewStackEventTypes } from '../view-stack/events';\nimport type { ViewStackViewProps } from '../view-stack/types';\nimport { DrawerEventTypes } from './events';\nimport { DrawerMenuStyles, DrawerStyles, DrawerTitleStyles } from './styles';\nimport type {\n DrawerContextValue,\n DrawerEvent,\n DrawerLayoutProps,\n DrawerMenuItemProps,\n DrawerMenuProps,\n DrawerOpenEvent,\n DrawerProps,\n DrawerTitleProps,\n DrawerToggleEvent,\n DrawerTriggerProps,\n} from './types';\n\nconst { layout, main, drawer, panel, view, header, content, footer } =\n DrawerStyles();\nconst { menu, item } = DrawerMenuStyles();\nconst bus = Broadcast.getInstance<DrawerEvent>();\n\nexport const DrawerContext = createContext<DrawerContextValue>({\n register: () => undefined,\n unregister: () => undefined,\n});\n\nexport const DrawerEventHandlers = {\n ...ViewStackEventHandlers,\n close: ViewStackEventHandlers.clear,\n open: (view: UniqueId) => bus.emit(DrawerEventTypes.open, { view }),\n toggle: (view: UniqueId) => bus.emit(DrawerEventTypes.toggle, { view }),\n} as const;\n\nfunction DrawerTrigger({ children, for: events }: DrawerTriggerProps) {\n const { parent } = useContext(ViewStackContext);\n\n function handlePress() {\n for (const type of Array.isArray(events) ? events : [events]) {\n let [event, id] = (isUUID(type) ? ['push', type] : type.split(':')) as [\n 'back' | 'clear' | 'close' | 'open' | 'push' | 'reset' | 'toggle',\n UniqueId | undefined | null,\n ];\n\n id ??= parent;\n\n if (!id) {\n continue;\n }\n\n DrawerEventHandlers[event](id);\n }\n }\n\n return <Pressable onPress={handlePress}>{children}</Pressable>;\n}\nDrawerTrigger.displayName = 'Drawer.Trigger';\n\nfunction DrawerLayoutMain({\n className,\n ...rest\n}: ComponentPropsWithRef<'main'>) {\n return <main {...rest} className={main({ className })} />;\n}\nDrawerLayoutMain.displayName = 'Drawer.Layout.Main';\n\nfunction DrawerLayout({\n className,\n extend = 'left right',\n push,\n ...rest\n}: DrawerLayoutProps) {\n return (\n <div\n {...rest}\n className={layout({ className })}\n data-extend={extend}\n data-push={push}\n />\n );\n}\nDrawerLayout.displayName = 'Drawer.Layout';\nDrawerLayout.Main = DrawerLayoutMain;\n\nfunction DrawerMenuItem({\n for: id,\n children,\n className,\n toggle,\n views,\n ...rest\n}: DrawerMenuItemProps) {\n const { parent, stack } = useContext(ViewStackContext);\n const view = stack.at(-1);\n const action = toggle ? 'toggle' : 'open';\n\n if (!parent) {\n return null;\n }\n\n return (\n <DrawerTrigger for={`${action}:${id}`}>\n <ToggleButton\n {...rest}\n className={composeRenderProps(className, (className) =>\n item({ className }),\n )}\n role='tab'\n variant='icon'\n isSelected={id === view || !!views?.some((view) => id === view)}\n >\n {composeRenderProps(children, (children) => (\n <Icon>{children}</Icon>\n ))}\n </ToggleButton>\n </DrawerTrigger>\n );\n}\nDrawerMenuItem.displayName = 'Drawer.Menu.Item';\n\nfunction DrawerMenu({\n className,\n position = 'center',\n children,\n ...rest\n}: DrawerMenuProps) {\n containsExactChildren({\n children,\n componentName: DrawerMenu.displayName,\n restrictions: [\n [DrawerMenuItem, { min: 1 }],\n [DrawerTrigger, { min: 0, max: 0 }],\n ],\n });\n return (\n <nav\n {...rest}\n className={menu({\n position,\n className,\n })}\n >\n {children}\n </nav>\n );\n}\nDrawerMenu.displayName = 'Drawer.Menu';\nDrawerMenu.Item = DrawerMenuItem;\n\nfunction DrawerPanel({ className, ...rest }: ComponentPropsWithRef<'div'>) {\n return <div {...rest} className={panel({ className })} />;\n}\nDrawerPanel.displayName = 'Drawer.Panel';\n\nfunction DrawerView({\n id,\n children,\n className,\n ...rest\n}: ViewStackViewProps & ComponentPropsWithRef<'div'>) {\n const { register, unregister } = useContext(DrawerContext);\n\n useEffect(() => {\n register(id);\n\n () => unregister(id);\n }, [register, unregister, id]);\n\n return (\n <ViewStack.View id={id}>\n <div {...rest} className={view({ className })} role='tabpanel'>\n {children}\n </div>\n </ViewStack.View>\n );\n}\nDrawerView.displayName = 'Drawer.View';\n\n/**\n * To change size of title, use the `level` prop: `1`-`3` (large), `4`-`6` (medium).\n *\n * `level` also changes the semantic heading tag number `h1`-`h6`\n */\nfunction DrawerHeaderTitle({ className, level, ...rest }: DrawerTitleProps) {\n return (\n <Heading\n {...rest}\n className={DrawerTitleStyles({ className, level })}\n level={level}\n />\n );\n}\nDrawerHeaderTitle.displayName = 'Drawer.Title';\n\nfunction DrawerHeader({ className, ...rest }: ComponentPropsWithRef<'header'>) {\n return <Header {...rest} className={header({ className })} />;\n}\nDrawerHeader.displayName = 'Drawer.Header';\nDrawerHeader.Title = DrawerHeaderTitle;\n\nfunction DrawerContent({ className, ...rest }: ComponentPropsWithRef<'div'>) {\n return <div {...rest} className={content({ className })} />;\n}\nDrawerContent.displayName = 'Drawer.Content';\n\nfunction DrawerFooter({ className, ...rest }: ComponentPropsWithRef<'footer'>) {\n return <footer {...rest} className={footer({ className })} />;\n}\nDrawerFooter.displayName = 'Drawer.Footer';\n\nexport function Drawer({\n id,\n children,\n className,\n defaultView,\n placement = 'left',\n size = 'medium',\n onChange,\n ...rest\n}: DrawerProps) {\n containsExactChildren({\n children,\n componentName: Drawer.displayName,\n restrictions: [\n [DrawerMenu, { min: 0, max: 1 }],\n [DrawerPanel, { min: 1, max: 1 }],\n ],\n });\n\n const views = useRef(new Set<UniqueId>());\n const [activeView, setActiveView] = useState<UniqueId | null>(\n defaultView || null,\n );\n\n const handleOpen = useCallback(\n (data: DrawerOpenEvent) => {\n if (views.current.has(data?.payload?.view)) {\n bus.emit(ViewStackEventTypes.clear, { stack: id });\n bus.emit(ViewStackEventTypes.push, data.payload);\n }\n },\n [id],\n );\n const handleToggle = useCallback(\n (data: DrawerToggleEvent) => {\n if (views.current.has(data?.payload?.view)) {\n bus.emit(ViewStackEventTypes.clear, { stack: id });\n if (activeView !== data?.payload?.view) {\n bus.emit(ViewStackEventTypes.push, data.payload);\n }\n }\n },\n [id, activeView],\n );\n\n useEffect(() => {\n const listeners = [\n bus.on(DrawerEventTypes.open, handleOpen),\n bus.on(DrawerEventTypes.toggle, handleToggle),\n ];\n\n return () => {\n for (const off of listeners) {\n off();\n }\n };\n }, [handleOpen, handleToggle]);\n\n return (\n <DrawerContext.Provider\n value={{\n register: (view: UniqueId) => views.current.add(view),\n unregister: (view: UniqueId) => views.current.delete(view),\n }}\n >\n <ViewStack\n id={id}\n defaultView={defaultView}\n onChange={(view) => {\n setActiveView(view);\n onChange?.(view);\n }}\n >\n <div\n {...rest}\n className={drawer({ className })}\n data-open={!!activeView || null}\n data-placement={placement}\n data-size={size}\n >\n {children}\n </div>\n </ViewStack>\n </DrawerContext.Provider>\n );\n}\nDrawer.displayName = 'Drawer';\n\nDrawer.Layout = DrawerLayout;\nDrawer.Menu = DrawerMenu;\nDrawer.Panel = DrawerPanel;\nDrawer.View = DrawerView;\nDrawer.Header = DrawerHeader;\nDrawer.Content = DrawerContent;\nDrawer.Footer = DrawerFooter;\nDrawer.Trigger = DrawerTrigger;\n"]}
1
+ {"version":3,"sources":["../../../src/components/drawer/index.tsx"],"names":["header","DrawerStyles","item","bus","Broadcast","createContext","Z","Y","B","ViewStackEventHandlers","$","view","U","D","DrawerTrigger","children","events","useContext","ViewStackContext","handlePress","type","v","E","isUUID","id","parent","DrawerEventHandlers","event","jsx","Pressable","t","O","className","rest","main","DrawerLayoutMain","DrawerLayout","extend","push","DrawerMenuItem","toggle","action","composeRenderProps","Q","x","views","X","DrawerMenu","position","S","DrawerPanel","panel","register","DrawerContext","useEffect","ViewStack","k","M","DrawerHeaderTitle","level","K","_","DrawerHeader","J","DrawerContent","content","defaultView","placement","size","activeView","setActiveView","useState","useCallback","data","G","ViewStackEventTypes","I","handleToggle","f","listeners","DrawerEventTypes","off","handleOpen","onChange","drawer","Drawer","DrawerFooter"],"mappings":"6tBAoD2C,MAAAA,CAAAA,MAAQ,CAAA,CAAA,CAAA,IAAS,UAAO,CACjEC,EAAa,CAAA,KACP,CAAA,OAAM,CAAA,EAAAC,CAAK,MACbC,CAAAA,EAAMC,CAAU,OAAA,CAAA,EAAA,CAAA,MAEOC,CAAkC,EAC7D,CAAA,CAAAC,YAAA,EAAA,CAAA,CAAA,IAAU,CAAG,GACb,IAAA,CAAA,EAAA,CAAA,CAAAC,gBAAA,EAAY,CAAA,CAAA,CAAGC,SAAA,CACjB,WAGKC,EACH,CAAA,CAAA,CAAAC,aAAA,CAAOD,CAAAA,QACP,CAAA,MAA0BN,CAAAA,UAA0B,CAAA,IAAQ,CAAA,CAAA,CAAA,CAAAQ,CAAK,EAAC,CAClE,CAAA,GAAAC,sBAAA,CAAA,KAA4BT,CAAIS,sBAAA,CAAA,KAAsB,CAAA,IAAA,CAAA,CAAQ,EAAE,CAAA,CAAA,IAAM,CACxEC,iBAEA,IAAA,CAAA,CAAA,IAASC,CAAc,CAAE,CAAA,CAAA,CAAA,MAAAC,CAAAA,CAAU,EAAA,CAAA,CAAKC,IACtC,CAAAH,gB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A,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { Broadcast } from '@accelint/bus';\nimport { isUUID, type UniqueId } from '@accelint/core';\nimport { Pressable } from '@react-aria/interactions';\nimport {\n type ComponentPropsWithRef,\n createContext,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { composeRenderProps, Header, Heading } from 'react-aria-components';\nimport { containsExactChildren } from '@/lib/react';\nimport { ToggleButton } from '../button';\nimport { Icon } from '../icon';\nimport {\n ViewStack,\n ViewStackContext,\n ViewStackEventHandlers,\n} from '../view-stack';\nimport { ViewStackEventTypes } from '../view-stack/events';\nimport { DrawerEventTypes } from './events';\nimport { DrawerMenuStyles, DrawerStyles, DrawerTitleStyles } from './styles';\nimport type { ViewStackViewProps } from '../view-stack/types';\nimport type {\n DrawerContextValue,\n DrawerEvent,\n DrawerLayoutProps,\n DrawerMenuItemProps,\n DrawerMenuProps,\n DrawerOpenEvent,\n DrawerProps,\n DrawerTitleProps,\n DrawerToggleEvent,\n DrawerTriggerProps,\n} from './types';\n\nconst { layout, main, drawer, panel, view, header, content, footer } =\n DrawerStyles();\nconst { menu, item } = DrawerMenuStyles();\nconst bus = Broadcast.getInstance<DrawerEvent>();\n\nexport const DrawerContext = createContext<DrawerContextValue>({\n register: () => undefined,\n unregister: () => undefined,\n});\n\nexport const DrawerEventHandlers = {\n ...ViewStackEventHandlers,\n close: ViewStackEventHandlers.clear,\n open: (view: UniqueId) => bus.emit(DrawerEventTypes.open, { view }),\n toggle: (view: UniqueId) => bus.emit(DrawerEventTypes.toggle, { view }),\n} as const;\n\nfunction DrawerTrigger({ children, for: events }: DrawerTriggerProps) {\n const { parent } = useContext(ViewStackContext);\n\n function handlePress() {\n for (const type of Array.isArray(events) ? events : [events]) {\n let [event, id] = (isUUID(type) ? ['push', type] : type.split(':')) as [\n 'back' | 'clear' | 'close' | 'open' | 'push' | 'reset' | 'toggle',\n UniqueId | undefined | null,\n ];\n\n id ??= parent;\n\n if (!id) {\n continue;\n }\n\n DrawerEventHandlers[event](id);\n }\n }\n\n return <Pressable onPress={handlePress}>{children}</Pressable>;\n}\nDrawerTrigger.displayName = 'Drawer.Trigger';\n\nfunction DrawerLayoutMain({\n className,\n ...rest\n}: ComponentPropsWithRef<'main'>) {\n return <main {...rest} className={main({ className })} />;\n}\nDrawerLayoutMain.displayName = 'Drawer.Layout.Main';\n\nfunction DrawerLayout({\n className,\n extend = 'left right',\n push,\n ...rest\n}: DrawerLayoutProps) {\n return (\n <div\n {...rest}\n className={layout({ className })}\n data-extend={extend}\n data-push={push}\n />\n );\n}\nDrawerLayout.displayName = 'Drawer.Layout';\nDrawerLayout.Main = DrawerLayoutMain;\n\nfunction DrawerMenuItem({\n for: id,\n children,\n className,\n toggle,\n views,\n ...rest\n}: DrawerMenuItemProps) {\n const { parent, stack } = useContext(ViewStackContext);\n const view = stack.at(-1);\n const action = toggle ? 'toggle' : 'open';\n\n if (!parent) {\n return null;\n }\n\n return (\n <DrawerTrigger for={`${action}:${id}`}>\n <ToggleButton\n {...rest}\n className={composeRenderProps(className, (className) =>\n item({ className }),\n )}\n role='tab'\n variant='icon'\n isSelected={id === view || !!views?.some((view) => id === view)}\n >\n {composeRenderProps(children, (children) => (\n <Icon>{children}</Icon>\n ))}\n </ToggleButton>\n </DrawerTrigger>\n );\n}\nDrawerMenuItem.displayName = 'Drawer.Menu.Item';\n\nfunction DrawerMenu({\n className,\n position = 'center',\n children,\n ...rest\n}: DrawerMenuProps) {\n containsExactChildren({\n children,\n componentName: DrawerMenu.displayName,\n restrictions: [\n [DrawerMenuItem, { min: 1 }],\n [DrawerTrigger, { min: 0, max: 0 }],\n ],\n });\n return (\n <nav\n {...rest}\n className={menu({\n position,\n className,\n })}\n >\n {children}\n </nav>\n );\n}\nDrawerMenu.displayName = 'Drawer.Menu';\nDrawerMenu.Item = DrawerMenuItem;\n\nfunction DrawerPanel({ className, ...rest }: ComponentPropsWithRef<'div'>) {\n return <div {...rest} className={panel({ className })} />;\n}\nDrawerPanel.displayName = 'Drawer.Panel';\n\nfunction DrawerView({\n id,\n children,\n className,\n ...rest\n}: ViewStackViewProps & ComponentPropsWithRef<'div'>) {\n const { register, unregister } = useContext(DrawerContext);\n\n useEffect(() => {\n register(id);\n\n () => unregister(id);\n }, [register, unregister, id]);\n\n return (\n <ViewStack.View id={id}>\n <div {...rest} className={view({ className })} role='tabpanel'>\n {children}\n </div>\n </ViewStack.View>\n );\n}\nDrawerView.displayName = 'Drawer.View';\n\n/**\n * To change size of title, use the `level` prop: `1`-`3` (large), `4`-`6` (medium).\n *\n * `level` also changes the semantic heading tag number `h1`-`h6`\n */\nfunction DrawerHeaderTitle({ className, level, ...rest }: DrawerTitleProps) {\n return (\n <Heading\n {...rest}\n className={DrawerTitleStyles({ className, level })}\n level={level}\n />\n );\n}\nDrawerHeaderTitle.displayName = 'Drawer.Title';\n\nfunction DrawerHeader({ className, ...rest }: ComponentPropsWithRef<'header'>) {\n return <Header {...rest} className={header({ className })} />;\n}\nDrawerHeader.displayName = 'Drawer.Header';\nDrawerHeader.Title = DrawerHeaderTitle;\n\nfunction DrawerContent({ className, ...rest }: ComponentPropsWithRef<'div'>) {\n return <div {...rest} className={content({ className })} />;\n}\nDrawerContent.displayName = 'Drawer.Content';\n\nfunction DrawerFooter({ className, ...rest }: ComponentPropsWithRef<'footer'>) {\n return <footer {...rest} className={footer({ className })} />;\n}\nDrawerFooter.displayName = 'Drawer.Footer';\n\nexport function Drawer({\n id,\n children,\n className,\n defaultView,\n placement = 'left',\n size = 'medium',\n onChange,\n ...rest\n}: DrawerProps) {\n containsExactChildren({\n children,\n componentName: Drawer.displayName,\n restrictions: [\n [DrawerMenu, { min: 0, max: 1 }],\n [DrawerPanel, { min: 1, max: 1 }],\n ],\n });\n\n const views = useRef(new Set<UniqueId>());\n const [activeView, setActiveView] = useState<UniqueId | null>(\n defaultView || null,\n );\n\n const handleOpen = useCallback(\n (data: DrawerOpenEvent) => {\n if (views.current.has(data?.payload?.view)) {\n bus.emit(ViewStackEventTypes.clear, { stack: id });\n bus.emit(ViewStackEventTypes.push, data.payload);\n }\n },\n [id],\n );\n const handleToggle = useCallback(\n (data: DrawerToggleEvent) => {\n if (views.current.has(data?.payload?.view)) {\n bus.emit(ViewStackEventTypes.clear, { stack: id });\n if (activeView !== data?.payload?.view) {\n bus.emit(ViewStackEventTypes.push, data.payload);\n }\n }\n },\n [id, activeView],\n );\n\n useEffect(() => {\n const listeners = [\n bus.on(DrawerEventTypes.open, handleOpen),\n bus.on(DrawerEventTypes.toggle, handleToggle),\n ];\n\n return () => {\n for (const off of listeners) {\n off();\n }\n };\n }, [handleOpen, handleToggle]);\n\n return (\n <DrawerContext.Provider\n value={{\n register: (view: UniqueId) => views.current.add(view),\n unregister: (view: UniqueId) => views.current.delete(view),\n }}\n >\n <ViewStack\n id={id}\n defaultView={defaultView}\n onChange={(view) => {\n setActiveView(view);\n onChange?.(view);\n }}\n >\n <div\n {...rest}\n className={drawer({ className })}\n data-open={!!activeView || null}\n data-placement={placement}\n data-size={size}\n >\n {children}\n </div>\n </ViewStack>\n </DrawerContext.Provider>\n );\n}\nDrawer.displayName = 'Drawer';\n\nDrawer.Layout = DrawerLayout;\nDrawer.Menu = DrawerMenu;\nDrawer.Panel = DrawerPanel;\nDrawer.View = DrawerView;\nDrawer.Header = DrawerHeader;\nDrawer.Content = DrawerContent;\nDrawer.Footer = DrawerFooter;\nDrawer.Trigger = DrawerTrigger;\n"]}
@@ -67,7 +67,7 @@ declare const DrawerStyles: tailwind_variants.TVReturnType<{
67
67
  content: string[];
68
68
  header: string[];
69
69
  footer: string;
70
- }, undefined, unknown, unknown, undefined>>;
70
+ }, undefined, unknown, unknown>>;
71
71
  declare const DrawerTitleStylesDefaults: {
72
72
  readonly level: 2;
73
73
  };
@@ -80,7 +80,7 @@ declare const DrawerTitleStyles: tailwind_variants.TVReturnType<{
80
80
  5: string;
81
81
  6: string;
82
82
  };
83
- }, undefined, "w-full text-default-light", {
83
+ }, undefined, "fg-primary-bold w-full", {
84
84
  level: {
85
85
  1: string;
86
86
  2: string;
@@ -98,7 +98,7 @@ declare const DrawerTitleStyles: tailwind_variants.TVReturnType<{
98
98
  5: string;
99
99
  6: string;
100
100
  };
101
- }, undefined, "w-full text-default-light", unknown, unknown, undefined>>;
101
+ }, undefined, "fg-primary-bold w-full", unknown, unknown>>;
102
102
  declare const DrawerMenuStylesDefaults: {
103
103
  readonly position: "center";
104
104
  };
@@ -147,6 +147,6 @@ declare const DrawerMenuStyles: tailwind_variants.TVReturnType<{
147
147
  }, {
148
148
  menu: string[];
149
149
  item: string[];
150
- }, undefined, unknown, unknown, undefined>>;
150
+ }, undefined, unknown, unknown>>;
151
151
 
152
152
  export { DrawerMenuStyles, DrawerMenuStylesDefaults, DrawerStyles, DrawerTitleStyles, DrawerTitleStylesDefaults };
@@ -1,2 +1,2 @@
1
- import {tv}from'tailwind-variants';const o=tv({slots:{layout:["[--drawer-main-row-start:1]","data-[push~=top]:[--drawer-main-row-start:2]","[--drawer-main-row-end:4]","data-[push~=bottom]:[--drawer-main-row-end:3]","[--drawer-main-col-start:1]","data-[push~=left]:[--drawer-main-col-start:2]","[--drawer-main-col-end:4]","data-[push~=right]:[--drawer-main-col-end:3]","[--drawer-menu-size:40px]","[--drawer-size-small:100px]","[--drawer-size-medium:200px]","[--drawer-size-large:400px]","[--route-layout-grid-cols:auto_1fr_auto]","[--route-layout-grid-rows:auto_1fr_auto]","[--drawer-main-cols:var(--drawer-main-col-start)/var(--drawer-main-col-end)]","[--drawer-main-rows:var(--drawer-main-row-start)/var(--drawer-main-row-end)]","group/layout relative top-[var(--classification-banner-height)]","grid grid-cols-[var(--route-layout-grid-cols)] grid-rows-[var(--route-layout-grid-rows)]","transition-[grid-template-columns,grid-template-rows]","h-full max-h-full w-full"],main:"relative z-1 col-[var(--drawer-main-cols)] row-[var(--drawer-main-rows)]",drawer:["group/drawer","bg-surface-default text-body-m","relative z-5 flex h-full min-h-0 flex-col","pointer-events-none [&>*]:pointer-events-auto","placement-top:col-start-2 placement-top:col-end-3 placement-top:row-start-1 placement-top:row-end-2","placement-bottom:col-start-2 placement-bottom:col-end-3 placement-bottom:row-start-3 placement-bottom:row-end-4","placement-left:col-start-1 placement-left:col-end-2 placement-left:row-start-2 placement-left:row-end-3","placement-right:col-start-3 placement-right:col-end-4 placement-right:row-start-2 placement-right:row-end-3","group-data-[extend~=top]/layout:placement-top:col-span-full","group-data-[extend~=bottom]/layout:placement-bottom:col-span-full","group-data-[extend~=left]/layout:placement-left:row-span-full","group-data-[extend~=right]/layout:placement-right:row-span-full","group-data-[extend=top]/layout:placement-left:row-end-4 group-data-[extend=top]/layout:placement-right:row-end-4","group-data-[extend=bottom]/layout:placement-left:row-start-1 group-data-[extend=bottom]/layout:placement-right:row-start-1","group-data-[extend=left]/layout:placement-bottom:col-end-4 group-data-[extend=left]/layout:placement-top:col-end-4","group-data-[extend=right]/layout:placement-bottom:col-start-1 group-data-[extend=right]/layout:placement-top:col-start-1"],panel:["hidden h-full min-h-0 flex-col gap-s p-l","group-open/drawer:flex","group-placement-left/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-left/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-left/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]","group-placement-right/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-right/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-right/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]","group-placement-top/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-top/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-top/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]","group-placement-bottom/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-bottom/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-bottom/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]"],view:"flex h-full flex-col",content:["flex max-h-full flex-1 flex-col overflow-y-auto text-default-light"],header:["mb-s flex flex-row items-center justify-between pt-px pr-px"],footer:"mt-s flex flex-row items-center justify-end text-default-light"}}),r={level:2},l=tv({base:"w-full text-default-light",variants:{level:{1:"",2:"",3:"",4:"",5:"",6:""}},compoundVariants:[{level:[1,2,3],className:"text-header-l"},{level:[4,5,6],className:"text-header-m"}],defaultVariants:r}),t={position:"center"},p=tv({slots:{menu:["absolute flex rounded-large bg-surface-default p-s","group-placement-top/drawer:transform-[translateX(-50%)] group-placement-top/drawer:left-[50%] group-placement-top/drawer:h-[var(--drawer-menu-size)] group-placement-top/drawer:flex-row","group-placement-bottom/drawer:transform-[translateX(-50%)] group-placement-bottom/drawer:left-[50%] group-placement-bottom/drawer:h-[var(--drawer-menu-size)] group-placement-bottom/drawer:flex-row","group-placement-bottom/drawer:-translate-y-[var(--drawer-menu-size)] group-placement-bottom/drawer:rounded-b-none","group-placement-top/drawer:bottom-0 group-placement-top/drawer:translate-y-[var(--drawer-menu-size)] group-placement-top/drawer:rounded-t-none","group-placement-left/drawer:left-full group-placement-left/drawer:rounded-l-none","group-placement-left/drawer:w-[var(--drawer-menu-size)] group-placement-left/drawer:flex-col group-placement-left/drawer:items-center","group-placement-right/drawer:-left-[var(--drawer-menu-size)] group-placement-right/drawer:rounded-r-none","group-placement-right/drawer:w-[var(--drawer-menu-size)] group-placement-right/drawer:flex-col group-placement-right/drawer:items-center"],item:["flex flex-col items-center justify-center","fg-default-dark !p-xs cursor-pointer outline-none","rounded-medium","hover:fg-default-light hover:!bg-transparent","selected:fg-highlight selected:bg-highlight-subtle","focus:fg-default-light","disabled:fg-disabled disabled:cursor-not-allowed"]},variants:{position:{start:{menu:["group-placement-left/drawer:-translate-y-1/2 group-placement-left/drawer:top-1/8","group-placement-right/drawer:-translate-y-1/2 group-placement-right/drawer:top-1/8","group-placement-top/drawer:left-1/8 group-placement-top/drawer:translate-x-1/4","group-placement-bottom/drawer:left-1/8 group-placement-bottom/drawer:translate-x-1/4"]},center:{menu:["group-placement-left/drawer:-translate-y-1/2 group-placement-left/drawer:top-1/2","group-placement-right/drawer:-translate-y-1/2 group-placement-right/drawer:top-1/2","group-placement-top/drawer:-translate-x-1/8 group-placement-top/drawer:left-1/2","group-placement-bottom/drawer:-translate-x-1/8 group-placement-bottom/drawer:left-1/2"]},end:{menu:["group-placement-left/drawer:-translate-y-7/2 group-placement-left/drawer:top-7/8","group-placement-right/drawer:-translate-y-7/8 group-placement-right/drawer:top-7/8","group-placement-top/drawer:-translate-x-1/2 group-placement-top/drawer:left-7/8","group-placement-bottom/drawer:-translate-x-1/2 group-placement-bottom/drawer:left-7/8"]}}},defaultVariants:t});export{p as DrawerMenuStyles,t as DrawerMenuStylesDefaults,o as DrawerStyles,l as DrawerTitleStyles,r as DrawerTitleStylesDefaults};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const o=tv({slots:{layout:["[--drawer-main-row-start:1]","data-[push~=top]:[--drawer-main-row-start:2]","[--drawer-main-row-end:4]","data-[push~=bottom]:[--drawer-main-row-end:3]","[--drawer-main-col-start:1]","data-[push~=left]:[--drawer-main-col-start:2] has-[.group\\/sidenav]:[--drawer-main-col-start:2]","[--drawer-main-col-end:4]","data-[push~=right]:[--drawer-main-col-end:3]","[--drawer-menu-size:40px]","[--drawer-size-small:100px]","[--drawer-size-medium:200px]","[--drawer-size-large:400px]","[--route-layout-grid-cols:auto_1fr_auto]","[--route-layout-grid-rows:auto_1fr_auto]","[--drawer-main-cols:var(--drawer-main-col-start)/var(--drawer-main-col-end)]","[--drawer-main-rows:var(--drawer-main-row-start)/var(--drawer-main-row-end)]","group/layout relative top-[var(--classification-banner-height)]","grid grid-cols-[var(--route-layout-grid-cols)] grid-rows-[var(--route-layout-grid-rows)]","transition-[grid-template-columns,grid-template-rows]","h-full max-h-full w-full"],main:"relative col-[var(--drawer-main-cols)] row-[var(--drawer-main-rows)]",drawer:["group/drawer","bg-surface-default text-body-m","relative flex h-full min-h-0 flex-col","pointer-events-none [&>*]:pointer-events-auto","placement-top:col-start-2 placement-top:col-end-3 placement-top:row-start-1 placement-top:row-end-2","placement-bottom:col-start-2 placement-bottom:col-end-3 placement-bottom:row-start-3 placement-bottom:row-end-4","placement-left:col-start-1 placement-left:col-end-2 placement-left:row-start-2 placement-left:row-end-3","placement-right:col-start-3 placement-right:col-end-4 placement-right:row-start-2 placement-right:row-end-3","group-data-[extend~=top]/layout:placement-top:col-span-full","group-data-[extend~=bottom]/layout:placement-bottom:col-span-full","group-data-[extend~=left]/layout:placement-left:row-span-full","group-data-[extend~=right]/layout:placement-right:row-span-full","group-data-[extend=top]/layout:placement-left:row-end-4 group-data-[extend=top]/layout:placement-right:row-end-4","group-data-[extend=bottom]/layout:placement-left:row-start-1 group-data-[extend=bottom]/layout:placement-right:row-start-1","group-data-[extend=left]/layout:placement-bottom:col-end-4 group-data-[extend=left]/layout:placement-top:col-end-4","group-data-[extend=right]/layout:placement-bottom:col-start-1 group-data-[extend=right]/layout:placement-top:col-start-1"],panel:["hidden h-full min-h-0 flex-col gap-s p-l","group-open/drawer:flex","group-placement-left/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-left/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-left/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]","group-placement-right/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-right/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-right/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]","group-placement-top/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-top/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-top/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]","group-placement-bottom/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-bottom/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-bottom/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]"],view:"flex h-full flex-col",content:["fg-primary-bold flex max-h-full flex-1 flex-col overflow-y-auto"],header:["mb-s flex flex-row items-center justify-between pt-px pr-px"],footer:"fg-primary-bold mt-s flex flex-row items-center justify-end"}}),r={level:2},l=tv({base:"fg-primary-bold w-full",variants:{level:{1:"",2:"",3:"",4:"",5:"",6:""}},compoundVariants:[{level:[1,2,3],className:"text-header-l"},{level:[4,5,6],className:"text-header-m"}],defaultVariants:r}),t={position:"center"},p=tv({slots:{menu:["absolute flex rounded-large bg-surface-default p-s","group-placement-top/drawer:transform-[translateX(-50%)] group-placement-top/drawer:left-[50%] group-placement-top/drawer:h-[var(--drawer-menu-size)] group-placement-top/drawer:flex-row","group-placement-bottom/drawer:transform-[translateX(-50%)] group-placement-bottom/drawer:left-[50%] group-placement-bottom/drawer:h-[var(--drawer-menu-size)] group-placement-bottom/drawer:flex-row","group-placement-bottom/drawer:-translate-y-[var(--drawer-menu-size)] group-placement-bottom/drawer:rounded-b-none","group-placement-top/drawer:bottom-0 group-placement-top/drawer:translate-y-[var(--drawer-menu-size)] group-placement-top/drawer:rounded-t-none","group-placement-left/drawer:left-full group-placement-left/drawer:rounded-l-none","group-placement-left/drawer:w-[var(--drawer-menu-size)] group-placement-left/drawer:flex-col group-placement-left/drawer:items-center","group-placement-right/drawer:-left-[var(--drawer-menu-size)] group-placement-right/drawer:rounded-r-none","group-placement-right/drawer:w-[var(--drawer-menu-size)] group-placement-right/drawer:flex-col group-placement-right/drawer:items-center"],item:["flex flex-col items-center justify-center","sudo:fg-primary-muted !p-xs cursor-pointer outline-none","rounded-medium","sudo:hover:fg-primary-bold hover:!bg-transparent","selected:fg-accent-primary-bold selected:bg-accent-primary-muted","focus:fg-primary-bold","disabled:fg-disabled disabled:cursor-not-allowed"]},variants:{position:{start:{menu:["group-placement-left/drawer:-translate-y-1/2 group-placement-left/drawer:top-1/8","group-placement-right/drawer:-translate-y-1/2 group-placement-right/drawer:top-1/8","group-placement-top/drawer:left-1/8 group-placement-top/drawer:translate-x-1/4","group-placement-bottom/drawer:left-1/8 group-placement-bottom/drawer:translate-x-1/4"]},center:{menu:["group-placement-left/drawer:-translate-y-1/2 group-placement-left/drawer:top-1/2","group-placement-right/drawer:-translate-y-1/2 group-placement-right/drawer:top-1/2","group-placement-top/drawer:-translate-x-1/8 group-placement-top/drawer:left-1/2","group-placement-bottom/drawer:-translate-x-1/8 group-placement-bottom/drawer:left-1/2"]},end:{menu:["group-placement-left/drawer:-translate-y-7/2 group-placement-left/drawer:top-7/8","group-placement-right/drawer:-translate-y-7/8 group-placement-right/drawer:top-7/8","group-placement-top/drawer:-translate-x-1/2 group-placement-top/drawer:left-7/8","group-placement-bottom/drawer:-translate-x-1/2 group-placement-bottom/drawer:left-7/8"]}}},defaultVariants:t});export{p as DrawerMenuStyles,t as DrawerMenuStylesDefaults,o as DrawerStyles,l as DrawerTitleStyles,r as DrawerTitleStylesDefaults};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/drawer/styles.ts"],"names":["DrawerStyles","tv","DrawerTitleStylesDefaults","DrawerTitleStyles","DrawerMenuStylesDefaults","DrawerMenuStyles"],"mappings":"mCAcO,MAAMA,EAAeC,EAAAA,CAAG,CAC7B,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,CAAmBJ,EAAAA,CAAG,CACjC,MAAO,CACL,IAAA,CAAM,CACJ,oDAAA,CAGA,0LAAA,CACA,uMACA,mHAAA,CACA,gJAAA,CAEA,kFAAA,CACA,uIAAA,CACA,0GAAA,CACA,0IACF,EACA,IAAA,CAAM,CACJ,4CACA,mDAAA,CACA,gBAAA,CAEA,+CAEA,oDAAA,CAEA,wBAAA,CAEA,kDACF,CACF,CAAA,CACA,QAAA,CAAU,CACR,QAAA,CAAU,CACR,MAAO,CACL,IAAA,CAAM,CACJ,kFAAA,CACA,oFAAA,CACA,gFAAA,CACA,sFACF,CACF,CAAA,CACA,OAAQ,CACN,IAAA,CAAM,CACJ,kFAAA,CACA,oFAAA,CACA,kFACA,uFACF,CACF,CAAA,CACA,GAAA,CAAK,CACH,IAAA,CAAM,CACJ,kFAAA,CACA,oFAAA,CACA,kFACA,uFACF,CACF,CACF,CACF,CAAA,CACA,eAAA,CAAiBG,CACnB,CAAC","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from 'tailwind-variants';\n\nexport const DrawerStyles = tv({\n slots: {\n layout: [\n //properties\n '[--drawer-main-row-start:1]', //top overlay\n 'data-[push~=top]:[--drawer-main-row-start:2]',\n '[--drawer-main-row-end:4]', //bottom overlay\n 'data-[push~=bottom]:[--drawer-main-row-end:3]',\n '[--drawer-main-col-start:1]', //left overlay\n 'data-[push~=left]:[--drawer-main-col-start:2]',\n '[--drawer-main-col-end:4]', //right overlay\n 'data-[push~=right]:[--drawer-main-col-end:3]',\n\n '[--drawer-menu-size:40px]',\n '[--drawer-size-small:100px]',\n '[--drawer-size-medium:200px]',\n '[--drawer-size-large:400px]',\n\n //Grid template definitions\n '[--route-layout-grid-cols:auto_1fr_auto]',\n '[--route-layout-grid-rows:auto_1fr_auto]',\n '[--drawer-main-cols:var(--drawer-main-col-start)/var(--drawer-main-col-end)]',\n '[--drawer-main-rows:var(--drawer-main-row-start)/var(--drawer-main-row-end)]',\n\n //container\n 'group/layout relative top-[var(--classification-banner-height)]',\n 'grid grid-cols-[var(--route-layout-grid-cols)] grid-rows-[var(--route-layout-grid-rows)]',\n 'transition-[grid-template-columns,grid-template-rows]',\n 'h-full max-h-full w-full',\n ],\n main: 'relative z-1 col-[var(--drawer-main-cols)] row-[var(--drawer-main-rows)]',\n drawer: [\n 'group/drawer',\n 'bg-surface-default text-body-m',\n 'relative z-5 flex h-full min-h-0 flex-col',\n 'pointer-events-none [&>*]:pointer-events-auto',\n\n //Base positioning\n 'placement-top:col-start-2 placement-top:col-end-3 placement-top:row-start-1 placement-top:row-end-2',\n 'placement-bottom:col-start-2 placement-bottom:col-end-3 placement-bottom:row-start-3 placement-bottom:row-end-4',\n 'placement-left:col-start-1 placement-left:col-end-2 placement-left:row-start-2 placement-left:row-end-3',\n 'placement-right:col-start-3 placement-right:col-end-4 placement-right:row-start-2 placement-right:row-end-3',\n\n //Extend positioning\n 'group-data-[extend~=top]/layout:placement-top:col-span-full',\n 'group-data-[extend~=bottom]/layout:placement-bottom:col-span-full',\n 'group-data-[extend~=left]/layout:placement-left:row-span-full',\n 'group-data-[extend~=right]/layout:placement-right:row-span-full',\n\n //Extend fitment\n 'group-data-[extend=top]/layout:placement-left:row-end-4 group-data-[extend=top]/layout:placement-right:row-end-4',\n 'group-data-[extend=bottom]/layout:placement-left:row-start-1 group-data-[extend=bottom]/layout:placement-right:row-start-1',\n 'group-data-[extend=left]/layout:placement-bottom:col-end-4 group-data-[extend=left]/layout:placement-top:col-end-4',\n 'group-data-[extend=right]/layout:placement-bottom:col-start-1 group-data-[extend=right]/layout:placement-top:col-start-1',\n ],\n panel: [\n 'hidden h-full min-h-0 flex-col gap-s p-l',\n 'group-open/drawer:flex',\n 'group-placement-left/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-left/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-left/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]',\n 'group-placement-right/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-right/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-right/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]',\n 'group-placement-top/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-top/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-top/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]',\n 'group-placement-bottom/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-bottom/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-bottom/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]',\n ],\n view: 'flex h-full flex-col',\n content: [\n 'flex max-h-full flex-1 flex-col overflow-y-auto text-default-light',\n ],\n header: ['mb-s flex flex-row items-center justify-between pt-px pr-px'],\n footer: 'mt-s flex flex-row items-center justify-end text-default-light',\n },\n});\n\nexport const DrawerTitleStylesDefaults = {\n level: 2,\n} as const;\n\nexport const DrawerTitleStyles = tv({\n base: 'w-full text-default-light',\n variants: {\n level: {\n [1]: '',\n [2]: '',\n [3]: '',\n [4]: '',\n [5]: '',\n [6]: '',\n },\n },\n compoundVariants: [\n {\n level: [1, 2, 3],\n className: 'text-header-l',\n },\n {\n level: [4, 5, 6],\n className: 'text-header-m',\n },\n ],\n defaultVariants: DrawerTitleStylesDefaults,\n});\n\nexport const DrawerMenuStylesDefaults = {\n position: 'center',\n} as const;\n\nexport const DrawerMenuStyles = tv({\n slots: {\n menu: [\n 'absolute flex rounded-large bg-surface-default p-s',\n\n //horizontal\n 'group-placement-top/drawer:transform-[translateX(-50%)] group-placement-top/drawer:left-[50%] group-placement-top/drawer:h-[var(--drawer-menu-size)] group-placement-top/drawer:flex-row',\n 'group-placement-bottom/drawer:transform-[translateX(-50%)] group-placement-bottom/drawer:left-[50%] group-placement-bottom/drawer:h-[var(--drawer-menu-size)] group-placement-bottom/drawer:flex-row',\n 'group-placement-bottom/drawer:-translate-y-[var(--drawer-menu-size)] group-placement-bottom/drawer:rounded-b-none',\n 'group-placement-top/drawer:bottom-0 group-placement-top/drawer:translate-y-[var(--drawer-menu-size)] group-placement-top/drawer:rounded-t-none',\n //vertical\n 'group-placement-left/drawer:left-full group-placement-left/drawer:rounded-l-none',\n 'group-placement-left/drawer:w-[var(--drawer-menu-size)] group-placement-left/drawer:flex-col group-placement-left/drawer:items-center',\n 'group-placement-right/drawer:-left-[var(--drawer-menu-size)] group-placement-right/drawer:rounded-r-none',\n 'group-placement-right/drawer:w-[var(--drawer-menu-size)] group-placement-right/drawer:flex-col group-placement-right/drawer:items-center',\n ],\n item: [\n 'flex flex-col items-center justify-center',\n 'fg-default-dark !p-xs cursor-pointer outline-none',\n 'rounded-medium',\n //hover\n 'hover:fg-default-light hover:!bg-transparent',\n //selected\n 'selected:fg-highlight selected:bg-highlight-subtle',\n //focused\n 'focus:fg-default-light',\n //disabled\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n },\n variants: {\n position: {\n start: {\n menu: [\n 'group-placement-left/drawer:-translate-y-1/2 group-placement-left/drawer:top-1/8',\n 'group-placement-right/drawer:-translate-y-1/2 group-placement-right/drawer:top-1/8',\n 'group-placement-top/drawer:left-1/8 group-placement-top/drawer:translate-x-1/4',\n 'group-placement-bottom/drawer:left-1/8 group-placement-bottom/drawer:translate-x-1/4',\n ],\n },\n center: {\n menu: [\n 'group-placement-left/drawer:-translate-y-1/2 group-placement-left/drawer:top-1/2',\n 'group-placement-right/drawer:-translate-y-1/2 group-placement-right/drawer:top-1/2',\n 'group-placement-top/drawer:-translate-x-1/8 group-placement-top/drawer:left-1/2',\n 'group-placement-bottom/drawer:-translate-x-1/8 group-placement-bottom/drawer:left-1/2',\n ],\n },\n end: {\n menu: [\n 'group-placement-left/drawer:-translate-y-7/2 group-placement-left/drawer:top-7/8',\n 'group-placement-right/drawer:-translate-y-7/8 group-placement-right/drawer:top-7/8',\n 'group-placement-top/drawer:-translate-x-1/2 group-placement-top/drawer:left-7/8',\n 'group-placement-bottom/drawer:-translate-x-1/2 group-placement-bottom/drawer:left-7/8',\n ],\n },\n },\n },\n defaultVariants: DrawerMenuStylesDefaults,\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/drawer/styles.ts"],"names":["e","DrawerTitleStyles","DrawerMenuStyles"],"mappings":"6CAeS,CACLA,EAAA,CAAA,CAAA,KAEE,CAAA,CAAA,MAAA,CAAA,CAAA,6BACA,CAAA,0EAEA,CAAA,+CACA,CAAA,gIAGA,CAAA,2BACA,CAAA,8CAEA,CAAA,2BACA,CAAA,6BACA,CAAA,8BACA,CAAA,wEAIA,CAAA,0CACA,CAAA,6JAIA,CAAA,iEACA,CAAA,kJAEA,CAAA,0BAEI,CAAA,CAAA,IAAA,CAAA,6FAGJ,CAAA,gCACA,CAAA,uFAIA,CAAA,qGACA,CAAA,2NAEA,CAAA,6GAGA,CAAA,6DACA,CAAA,mEACA,CAAA,+DACA,CAAA,iEAGA,CAAA,+OAEA,CAAA,oHACA,CAAA,6KAIA,CAAA,wBACA,CAAA,sPACA,CAAA,yPACA,CAAA,mPACA,CAAA,4PAEI,CAAA,CAAA,IAAA,CAAA,sBAEJ,CAAA,OAAA,CAAA,CAAA,iEAEO,CAAA,CAAA,MAAA,CAAA,CAAA,6DACD,CAAA,CAAA,MAAA,CAAA,6DAKV,CAAA,CAAA,CAAO,CACT,EAEaC,CAAAA,KACX,CAAA,CAAA,CAAA,CAAM,CAAA,CAAAD,EAAA,CAAA,CAAA,IAAA,CAAA,wBACI,CACR,SACK,CAAA,OAEH,CAAA,CAAG,EAAA,CACH,CAAA,CAAG,EAAA,CACH,CAAA,CAAG,EAAA,CACH,EAAG,EACL,CACF,EACA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,gBAEY,CAAA,CAAG,CAAA,cACA,SAAA,CAAA,eAGH,EAAG,CAAA,KACX,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,SAAA,CAAA,eAGf,CAAA,CAAA,CAAA,eAIA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,QACZ,CAEaE,WACJ,CACLF,EAAA,CAAA,CAAA,KACE,CAAA,CAAA,IAAA,CAAA,CAAA,oDAGA,CAAA,iYAEA,CAAA,mHACA,CAAA,gJAEA,CAAA,kFACA,CAAA,uIACA,CAAA,0GACA,CAAA,6LAIA,CAAA,yDACA,CAAA,mEAIA,CAAA,kEAEA,CAAA,uBAEA,CAAA,kDAGJ,CAAA,CAAU,CACR,QAAA,CAAU,CACR,QACE,CAAA,CAAA,KACE,CAAA,CAAA,IAAA,CAAA,CAAA,kFACA,CAAA,oFACA,CAAA,gFACA,CAAA,sFAGI,CACN,CAAA,CAAA,MACE,CAAA,CAAA,IAAA,CAAA,CAAA,kFACA,CAAA,sKAEA,CAAA,uFAIF,CAAA,CAAA,CAAM,GACJ,CAAA,CAAA,IAAA,CAAA,CAAA,kFACA,CAAA,sKAEA,CAAA,uFAKR,CAAA,CAAA,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const DrawerStyles = tv({\n slots: {\n layout: [\n //properties\n '[--drawer-main-row-start:1]', //top overlay\n 'data-[push~=top]:[--drawer-main-row-start:2]',\n '[--drawer-main-row-end:4]', //bottom overlay\n 'data-[push~=bottom]:[--drawer-main-row-end:3]',\n '[--drawer-main-col-start:1]', //left overlay\n // biome-ignore lint/style/noUnusedTemplateLiteral: This is necessary to properly evaulate \\/\n `data-[push~=left]:[--drawer-main-col-start:2] has-[.group\\\\/sidenav]:[--drawer-main-col-start:2]`,\n '[--drawer-main-col-end:4]', //right overlay\n 'data-[push~=right]:[--drawer-main-col-end:3]',\n\n '[--drawer-menu-size:40px]',\n '[--drawer-size-small:100px]',\n '[--drawer-size-medium:200px]',\n '[--drawer-size-large:400px]',\n\n //Grid template definitions\n '[--route-layout-grid-cols:auto_1fr_auto]',\n '[--route-layout-grid-rows:auto_1fr_auto]',\n '[--drawer-main-cols:var(--drawer-main-col-start)/var(--drawer-main-col-end)]',\n '[--drawer-main-rows:var(--drawer-main-row-start)/var(--drawer-main-row-end)]',\n\n //container\n 'group/layout relative top-[var(--classification-banner-height)]',\n 'grid grid-cols-[var(--route-layout-grid-cols)] grid-rows-[var(--route-layout-grid-rows)]',\n 'transition-[grid-template-columns,grid-template-rows]',\n 'h-full max-h-full w-full',\n ],\n main: 'relative col-[var(--drawer-main-cols)] row-[var(--drawer-main-rows)]',\n drawer: [\n 'group/drawer',\n 'bg-surface-default text-body-m',\n 'relative flex h-full min-h-0 flex-col',\n 'pointer-events-none [&>*]:pointer-events-auto',\n\n //Base positioning\n 'placement-top:col-start-2 placement-top:col-end-3 placement-top:row-start-1 placement-top:row-end-2',\n 'placement-bottom:col-start-2 placement-bottom:col-end-3 placement-bottom:row-start-3 placement-bottom:row-end-4',\n 'placement-left:col-start-1 placement-left:col-end-2 placement-left:row-start-2 placement-left:row-end-3',\n 'placement-right:col-start-3 placement-right:col-end-4 placement-right:row-start-2 placement-right:row-end-3',\n\n //Extend positioning\n 'group-data-[extend~=top]/layout:placement-top:col-span-full',\n 'group-data-[extend~=bottom]/layout:placement-bottom:col-span-full',\n 'group-data-[extend~=left]/layout:placement-left:row-span-full',\n 'group-data-[extend~=right]/layout:placement-right:row-span-full',\n\n //Extend fitment\n 'group-data-[extend=top]/layout:placement-left:row-end-4 group-data-[extend=top]/layout:placement-right:row-end-4',\n 'group-data-[extend=bottom]/layout:placement-left:row-start-1 group-data-[extend=bottom]/layout:placement-right:row-start-1',\n 'group-data-[extend=left]/layout:placement-bottom:col-end-4 group-data-[extend=left]/layout:placement-top:col-end-4',\n 'group-data-[extend=right]/layout:placement-bottom:col-start-1 group-data-[extend=right]/layout:placement-top:col-start-1',\n ],\n panel: [\n 'hidden h-full min-h-0 flex-col gap-s p-l',\n 'group-open/drawer:flex',\n 'group-placement-left/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-left/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-left/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]',\n 'group-placement-right/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-right/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-right/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]',\n 'group-placement-top/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-top/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-top/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]',\n 'group-placement-bottom/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-bottom/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-bottom/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]',\n ],\n view: 'flex h-full flex-col',\n content: [\n 'fg-primary-bold flex max-h-full flex-1 flex-col overflow-y-auto',\n ],\n header: ['mb-s flex flex-row items-center justify-between pt-px pr-px'],\n footer: 'fg-primary-bold mt-s flex flex-row items-center justify-end',\n },\n});\n\nexport const DrawerTitleStylesDefaults = {\n level: 2,\n} as const;\n\nexport const DrawerTitleStyles = tv({\n base: 'fg-primary-bold w-full',\n variants: {\n level: {\n 1: '',\n 2: '',\n 3: '',\n 4: '',\n 5: '',\n 6: '',\n },\n },\n compoundVariants: [\n {\n level: [1, 2, 3],\n className: 'text-header-l',\n },\n {\n level: [4, 5, 6],\n className: 'text-header-m',\n },\n ],\n defaultVariants: DrawerTitleStylesDefaults,\n});\n\nexport const DrawerMenuStylesDefaults = {\n position: 'center',\n} as const;\n\nexport const DrawerMenuStyles = tv({\n slots: {\n menu: [\n 'absolute flex rounded-large bg-surface-default p-s',\n\n //horizontal\n 'group-placement-top/drawer:transform-[translateX(-50%)] group-placement-top/drawer:left-[50%] group-placement-top/drawer:h-[var(--drawer-menu-size)] group-placement-top/drawer:flex-row',\n 'group-placement-bottom/drawer:transform-[translateX(-50%)] group-placement-bottom/drawer:left-[50%] group-placement-bottom/drawer:h-[var(--drawer-menu-size)] group-placement-bottom/drawer:flex-row',\n 'group-placement-bottom/drawer:-translate-y-[var(--drawer-menu-size)] group-placement-bottom/drawer:rounded-b-none',\n 'group-placement-top/drawer:bottom-0 group-placement-top/drawer:translate-y-[var(--drawer-menu-size)] group-placement-top/drawer:rounded-t-none',\n //vertical\n 'group-placement-left/drawer:left-full group-placement-left/drawer:rounded-l-none',\n 'group-placement-left/drawer:w-[var(--drawer-menu-size)] group-placement-left/drawer:flex-col group-placement-left/drawer:items-center',\n 'group-placement-right/drawer:-left-[var(--drawer-menu-size)] group-placement-right/drawer:rounded-r-none',\n 'group-placement-right/drawer:w-[var(--drawer-menu-size)] group-placement-right/drawer:flex-col group-placement-right/drawer:items-center',\n ],\n item: [\n 'flex flex-col items-center justify-center',\n 'sudo:fg-primary-muted !p-xs cursor-pointer outline-none',\n 'rounded-medium',\n //hover\n 'sudo:hover:fg-primary-bold hover:!bg-transparent',\n //selected\n 'selected:fg-accent-primary-bold selected:bg-accent-primary-muted',\n //focused\n 'focus:fg-primary-bold',\n //disabled\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n },\n variants: {\n position: {\n start: {\n menu: [\n 'group-placement-left/drawer:-translate-y-1/2 group-placement-left/drawer:top-1/8',\n 'group-placement-right/drawer:-translate-y-1/2 group-placement-right/drawer:top-1/8',\n 'group-placement-top/drawer:left-1/8 group-placement-top/drawer:translate-x-1/4',\n 'group-placement-bottom/drawer:left-1/8 group-placement-bottom/drawer:translate-x-1/4',\n ],\n },\n center: {\n menu: [\n 'group-placement-left/drawer:-translate-y-1/2 group-placement-left/drawer:top-1/2',\n 'group-placement-right/drawer:-translate-y-1/2 group-placement-right/drawer:top-1/2',\n 'group-placement-top/drawer:-translate-x-1/8 group-placement-top/drawer:left-1/2',\n 'group-placement-bottom/drawer:-translate-x-1/8 group-placement-bottom/drawer:left-1/2',\n ],\n },\n end: {\n menu: [\n 'group-placement-left/drawer:-translate-y-7/2 group-placement-left/drawer:top-7/8',\n 'group-placement-right/drawer:-translate-y-7/8 group-placement-right/drawer:top-7/8',\n 'group-placement-top/drawer:-translate-x-1/2 group-placement-top/drawer:left-7/8',\n 'group-placement-bottom/drawer:-translate-x-1/2 group-placement-bottom/drawer:left-7/8',\n ],\n },\n },\n },\n defaultVariants: DrawerMenuStylesDefaults,\n});\n"]}
@@ -1,10 +1,10 @@
1
- import { AriaAttributesWithRef } from '../../lib/types.js';
2
1
  import { Payload } from '@accelint/bus';
3
2
  import { UniqueId } from '@accelint/core';
4
3
  import { FocusableElement } from '@react-types/shared';
5
4
  import { ComponentPropsWithRef, ReactElement, DOMAttributes } from 'react';
6
5
  import { HeadingProps } from 'react-aria-components';
7
6
  import { VariantProps } from 'tailwind-variants';
7
+ import { AriaAttributesWithRef } from '../../lib/types.js';
8
8
  import { ToggleButtonProps } from '../button/types.js';
9
9
  import { ViewStackEvent } from '../view-stack/types.js';
10
10
  import { DrawerEventTypes } from './events.js';
@@ -1,2 +1,4 @@
1
- import {jsx}from'react/jsx-runtime';import'client-only';import {containsExactChildren}from'./../../lib/react.js';import {createContext}from'react';import {Text,useContextProps,Provider,HeadingContext,TextContext,Header,Heading}from'react-aria-components';import {Icon,IconContext}from'../icon/index.js';import {HeroStyles}from'./styles.js';const {hero:b,icon:f,title:P,subtitle:S}=HeroStyles(),g=createContext(null);function e({ref:o,...a}){[a,o]=useContextProps(a,o??null,g);const{children:l,classNames:t,compact:i,...s}=a;return containsExactChildren({children:l,componentName:e.displayName,restrictions:[[Icon,{min:1,max:1}],[e.Title,{min:1,max:1}],[e.Subtitle,{min:0}]]}),jsx(Provider,{values:[[IconContext,{className:f({className:t?.icon}),size:"large"}],[HeadingContext,{className:P({className:t?.title}),level:2}],[TextContext,{className:S({className:t?.subtitle})}]],children:jsx(Header,{...s,ref:o,className:b({className:t?.hero}),"data-layout":i?"grid":"stack",children:l})})}e.displayName="Hero",e.Title=Heading,e.Title.displayName="Hero.Title",e.Subtitle=Text,e.Subtitle.displayName="Hero.Subtitle";export{e as Hero,g as HeroContext};//# sourceMappingURL=index.js.map
1
+ 'use client';
2
+
3
+ import {jsx}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {Text,useContextProps,Provider,HeadingContext,TextContext,Header,Heading}from'react-aria-components';import {containsExactChildren}from'./../../lib/react.js';import {Icon,IconContext}from'../icon/index.js';import {HeroStyles}from'./styles.js';const {hero:b,icon:f,title:P,subtitle:S}=HeroStyles(),g=createContext(null);function e({ref:o,...a}){[a,o]=useContextProps(a,o??null,g);const{children:l,classNames:t,compact:i,...s}=a;return containsExactChildren({children:l,componentName:e.displayName,restrictions:[[Icon,{min:1,max:1}],[e.Title,{min:1,max:1}],[e.Subtitle,{min:0}]]}),jsx(Provider,{values:[[IconContext,{className:f({className:t?.icon}),size:"large"}],[HeadingContext,{className:P({className:t?.title}),level:2}],[TextContext,{className:S({className:t?.subtitle})}]],children:jsx(Header,{...s,ref:o,className:b({className:t?.hero}),"data-layout":i?"grid":"stack",children:l})})}e.displayName="Hero",e.Title=Heading,e.Title.displayName="Hero.Title",e.Subtitle=Text,e.Subtitle.displayName="Hero.Subtitle";export{e as Hero,g as HeroContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/hero/index.tsx"],"names":["subtitle","HeroStyles","HeroContext","Hero","ref","props","N","children","compact","m","jsx","Provider","icon","C","classNames","HeadingContext","title","u","H","rest","r","hero","p","Text","x"],"mappings":"oVA8B2B,MAAA,CAAA,IAAA,CAAA,CAAA,CAAAA,IAAaC,CAAW,CAAA,CAEtCC,KACyC,CAAA,CAAA,CAAI,WAgC1CC,CAAAA,UAAK,KAAEC,aAAAA,CAAK,IAAS,EAAc,SAClBC,CAAAA,CAAOD,CAAAA,GAAO,CAAA,CAAA,CAAA,GAAiB,CAE9D,CAAA,CAAA,CAAA,CAAA,CAAM,CAAE,CAAA,CAAA,CAAAE,eAAA,CAAA,CAAA,CAAA,CAAA,EAAAC,IAAU,CAAA,CAAA,CAAA,CAAA,MAAY,QAAAC,CAAAA,CAAS,CAAA,oBAGrC,CAAA,CAAA,CAAA,GAAAD,CAAAA,CACA,CAAA,CAAA,CAAA,OAAAE,qBAAA,CAAA,CAAA,wBACA,CAAA,CAAA,CAAA,YACmB,oBACJ,CAAE,GAAA,CAAK,EAAG,GAAA,CAAK,CAAE,CAAC,CAAA,CAC/B,CAACN,CAAAA,CAAK,KAAA,CAAA,CAAA,GAAY,CAAA,CAAA,CAAA,GAAQ,CAC5B,CACF,CAAC,CAAA,CAGCO,CAAAA,CAACC,SACC,CAAQ,CACN,GAEE,CAAE,mBAAWC,CAAAA,CAAK,MAAE,CAAA,CAAA,CAAAC,WAAA,CAAWC,CAAAA,SAAqB,CAAA,CAAA,CAAA,CAAA,SACtD,CAAA,CACA,EACEC,IACE,CAAA,CAAA,CAAA,IAAA,CAAWC,OAAQ,CAAA,CAAA,CAAA,CAAAC,cAAA,CAAWH,CAAAA,SAAmB,CAAG,CAAA,CAAA,CAAA,UAItD,CAAE,EAAA,KAAA,CAAA,CAAA,CAAWd,KAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAkB,WAAA,CAAWJ,UAAY,CAAS,CAAC,CAAE,CAC7D,aAGFJ,QACMS,CACJ,CAAA,CAAA,CAAA,CAAKf,SACL,CAAAgB,GAAA,CAAWC,MAAAA,CAAK,CAAE,GAAA,CAAA,CAAA,GAAA,CAAA,CAAWP,CAAAA,SAC7B,CAAA,CAAA,CAAA,CAAA,SAAA,CAAaN,CAAAA,EAAU,IAAA,CAAA,CAAS,CAAA,aAE/B,CAAA,CAAA,CAAAD,MAKTJ,CAAAA,OAAK,CAAA,QAAc,CAAA,CAAA,CAAA,CACnBA,EAAK,CAAA,CAAA,CAAA,WACA,CAAA,MAAM,CAAA,CAAA,CAAA,KAAc,CAAAmB,OAAA,CAAA,CAAA,CAAA,KAAA,CAAA,WACpB,CAAWC,YACX,CAAS,CAAA,CAAA,QAAA,CAAAC,IAAc,CAAA,CAAA,CAAA,QAAA,CAAA,WAAA,CAAA,eAAA","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 { containsExactChildren } from '@/lib/react';\nimport { createContext } from 'react';\nimport {\n type ContextValue,\n Header,\n Heading,\n HeadingContext,\n Provider,\n Text,\n TextContext,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon, IconContext } from '../icon';\nimport { HeroStyles } from './styles';\nimport type { HeroProps } from './types';\n\nconst { hero, icon, title, subtitle } = HeroStyles();\n\nexport const HeroContext =\n createContext<ContextValue<HeroProps, HTMLElement>>(null);\n\n/**\n * A versatile hero component that displays an icon alongside primary and secondary content.\n * Automatically organizes child components by type and supports both stacked and grid layouts.\n *\n * @example\n * ```tsx\n * // Basic hero with icon and content\n * <Hero>\n * <Icon><Placeholder /></Icon>\n * <Hero.Title>Primary Title</Hero.Title>\n * <Hero.Subtitle>Secondary information</Hero.Subtitle>\n * </Hero>\n *\n * // Grid layout for compact display\n * <Hero compact>\n * <Icon><Settings /></Icon>\n * <Hero.Title>Settings</Hero.Title>\n * <Hero.Subtitle>Configure your preferences</Hero.Subtitle>\n * </Hero>\n * ```\n *\n * ## Child Component Behavior\n * - **Icon**: Only one allowed\n * - **Hero.Title**: Only one allowed\n * - **Hero.Subtitle**: Any number allowed as secondary content\n *\n * ## Layout Modes\n * - **Stack** (default): Vertical layout with larger icon and stacked content\n * - **Grid** (compact=true): Horizontal layout with smaller icon beside content\n */\nexport function Hero({ ref, ...props }: HeroProps) {\n [props, ref] = useContextProps(props, ref ?? null, HeroContext);\n\n const { children, classNames, compact, ...rest } = props;\n\n containsExactChildren({\n children,\n componentName: Hero.displayName,\n restrictions: [\n [Icon, { min: 1, max: 1 }],\n [Hero.Title, { min: 1, max: 1 }],\n [Hero.Subtitle, { min: 0 }],\n ],\n });\n\n return (\n <Provider\n values={[\n [\n IconContext,\n { className: icon({ className: classNames?.icon }), size: 'large' },\n ],\n [\n HeadingContext,\n { className: title({ className: classNames?.title }), level: 2 },\n ],\n [\n TextContext,\n { className: subtitle({ className: classNames?.subtitle }) },\n ],\n ]}\n >\n <Header\n {...rest}\n ref={ref}\n className={hero({ className: classNames?.hero })}\n data-layout={compact ? 'grid' : 'stack'}\n >\n {children}\n </Header>\n </Provider>\n );\n}\nHero.displayName = 'Hero';\nHero.Title = Heading;\nHero.Title.displayName = 'Hero.Title';\nHero.Subtitle = Text;\nHero.Subtitle.displayName = 'Hero.Subtitle';\n"]}
1
+ {"version":3,"sources":["../../../src/components/hero/index.tsx"],"names":["subtitle","HeroStyles","HeroContext","Hero","ref","props","H","children","compact","N","jsx","Provider","icon","C","classNames","HeadingContext","title","p","x","rest","r","hero","c","Text","d"],"mappings":"oVA8B2B,MAAA,CAAA,IAAA,CAAA,CAAA,CAAAA,IAAaC,CAAW,CAAA,CAEtCC,KACyC,CAAA,CAAA,CAAI,WAgC1CC,CAAAA,UAAK,KAAEC,aAAAA,CAAK,IAAS,EAAc,SAClBC,CAAAA,CAAOD,CAAAA,GAAO,CAAA,CAAA,CAAA,GAAiB,CAE9D,CAAA,CAAA,CAAA,CAAA,CAAM,CAAE,CAAA,CAAA,CAAAE,eAAA,CAAA,CAAA,CAAA,CAAA,EAAAC,IAAU,CAAA,CAAA,CAAA,CAAA,MAAY,QAAAC,CAAAA,CAAS,CAAA,oBAGrC,CAAA,CAAA,CAAA,GAAAD,CAAAA,CACA,CAAA,CAAA,CAAA,OAAAE,qBAAA,CAAA,CAAA,wBACA,CAAA,CAAA,CAAA,YACmB,oBACJ,CAAE,GAAA,CAAK,EAAG,GAAA,CAAK,CAAE,CAAC,CAAA,CAC/B,CAACN,CAAAA,CAAK,KAAA,CAAA,CAAA,GAAY,CAAA,CAAA,CAAA,GAAQ,CAC5B,CACF,CAAC,CAAA,CAGCO,CAAAA,CAACC,SACC,CAAQ,CACN,GAEE,CAAE,mBAAWC,CAAAA,CAAK,MAAE,CAAA,CAAA,CAAAC,WAAA,CAAWC,CAAAA,SAAqB,CAAA,CAAA,CAAA,CAAA,SACtD,CAAA,CACA,EACEC,IACE,CAAA,CAAA,CAAA,IAAA,CAAWC,OAAQ,CAAA,CAAA,CAAA,CAAAC,cAAA,CAAWH,CAAAA,SAAmB,CAAG,CAAA,CAAA,CAAA,UAItD,CAAE,EAAA,KAAA,CAAA,CAAA,CAAWd,KAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAkB,WAAA,CAAWJ,UAAY,CAAS,CAAC,CAAE,CAC7D,aAGFJ,QACMS,CACJ,CAAA,CAAA,CAAA,CAAKf,SACL,CAAAgB,GAAA,CAAWC,MAAAA,CAAK,CAAE,GAAA,CAAA,CAAA,GAAA,CAAA,CAAWP,CAAAA,SAC7B,CAAA,CAAA,CAAA,CAAA,SAAA,CAAaN,CAAAA,EAAU,IAAA,CAAA,CAAS,CAAA,aAE/B,CAAA,CAAA,CAAAD,MAKTJ,CAAAA,OAAK,CAAA,QAAc,CAAA,CAAA,CAAA,CACnBA,EAAK,CAAA,CAAA,CAAA,WACA,CAAA,MAAM,CAAA,CAAA,CAAA,KAAc,CAAAmB,OAAA,CAAA,CAAA,CAAA,KAAA,CAAA,WACpB,CAAWC,YACX,CAAS,CAAA,CAAA,QAAA,CAAAC,IAAc,CAAA,CAAA,CAAA,QAAA,CAAA,WAAA,CAAA,eAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport {\n type ContextValue,\n Header,\n Heading,\n HeadingContext,\n Provider,\n Text,\n TextContext,\n useContextProps,\n} from 'react-aria-components';\nimport { containsExactChildren } from '@/lib/react';\nimport { Icon, IconContext } from '../icon';\nimport { HeroStyles } from './styles';\nimport type { HeroProps } from './types';\n\nconst { hero, icon, title, subtitle } = HeroStyles();\n\nexport const HeroContext =\n createContext<ContextValue<HeroProps, HTMLElement>>(null);\n\n/**\n * A versatile hero component that displays an icon alongside primary and secondary content.\n * Automatically organizes child components by type and supports both stacked and grid layouts.\n *\n * @example\n * ```tsx\n * // Basic hero with icon and content\n * <Hero>\n * <Icon><Placeholder /></Icon>\n * <Hero.Title>Primary Title</Hero.Title>\n * <Hero.Subtitle>Secondary information</Hero.Subtitle>\n * </Hero>\n *\n * // Grid layout for compact display\n * <Hero compact>\n * <Icon><Settings /></Icon>\n * <Hero.Title>Settings</Hero.Title>\n * <Hero.Subtitle>Configure your preferences</Hero.Subtitle>\n * </Hero>\n * ```\n *\n * ## Child Component Behavior\n * - **Icon**: Only one allowed\n * - **Hero.Title**: Only one allowed\n * - **Hero.Subtitle**: Any number allowed as secondary content\n *\n * ## Layout Modes\n * - **Stack** (default): Vertical layout with larger icon and stacked content\n * - **Grid** (compact=true): Horizontal layout with smaller icon beside content\n */\nexport function Hero({ ref, ...props }: HeroProps) {\n [props, ref] = useContextProps(props, ref ?? null, HeroContext);\n\n const { children, classNames, compact, ...rest } = props;\n\n containsExactChildren({\n children,\n componentName: Hero.displayName,\n restrictions: [\n [Icon, { min: 1, max: 1 }],\n [Hero.Title, { min: 1, max: 1 }],\n [Hero.Subtitle, { min: 0 }],\n ],\n });\n\n return (\n <Provider\n values={[\n [\n IconContext,\n { className: icon({ className: classNames?.icon }), size: 'large' },\n ],\n [\n HeadingContext,\n { className: title({ className: classNames?.title }), level: 2 },\n ],\n [\n TextContext,\n { className: subtitle({ className: classNames?.subtitle }) },\n ],\n ]}\n >\n <Header\n {...rest}\n ref={ref}\n className={hero({ className: classNames?.hero })}\n data-layout={compact ? 'grid' : 'stack'}\n >\n {children}\n </Header>\n </Provider>\n );\n}\nHero.displayName = 'Hero';\nHero.Title = Heading;\nHero.Title.displayName = 'Hero.Title';\nHero.Subtitle = Text;\nHero.Subtitle.displayName = 'Hero.Subtitle';\n"]}
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';const l=tv({slots:{hero:"group/hero relative flex flex-col layout-stack:rounded-large layout-stack:bg-transparent-light layout-stack:px-l layout-stack:py-xl layout-grid:pl-xxl",icon:"fg-default-dark -order-3 group-layout-grid/hero:absolute group-layout-grid/hero:top-xxs group-layout-grid/hero:left-xs group-layout-stack/hero:mb-l group-layout-stack/hero:size-[48px]",title:"fg-default-light -order-2 mb-xs font-display text-header-l",subtitle:"fg-default-dark -order-1 block font-display text-body-s"}});export{l as HeroStyles};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const r=tv({slots:{hero:"group/hero relative flex flex-col layout-stack:rounded-large layout-stack:bg-interactive-disabled layout-stack:px-l layout-stack:py-xl layout-grid:pl-xxl",icon:"fg-primary-muted -order-3 group-layout-grid/hero:absolute group-layout-grid/hero:top-xxs group-layout-grid/hero:left-xs group-layout-stack/hero:mb-l group-layout-stack/hero:size-[48px]",title:"fg-primary-bold -order-2 mb-xs font-display text-header-l",subtitle:"fg-primary-muted -order-1 block font-display text-body-s"}});export{r as HeroStyles};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/hero/styles.ts"],"names":["t"],"mappings":"sCAeE,MAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KAAM,CAAA,CAAA,IAAA,CAAA,wJACA,CAAA,IAAA,CAAA,4PAEI,CAAA,QAAA,CAAA,yDAEb,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 HeroStyles = tv({\n slots: {\n hero: 'group/hero relative flex flex-col layout-stack:rounded-large layout-stack:bg-transparent-light layout-stack:px-l layout-stack:py-xl layout-grid:pl-xxl',\n icon: 'fg-default-dark -order-3 group-layout-grid/hero:absolute group-layout-grid/hero:top-xxs group-layout-grid/hero:left-xs group-layout-stack/hero:mb-l group-layout-stack/hero:size-[48px]',\n title: 'fg-default-light -order-2 mb-xs font-display text-header-l',\n subtitle: 'fg-default-dark -order-1 block font-display text-body-s',\n },\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/hero/styles.ts"],"names":["o"],"mappings":"sCAeE,MAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KAAM,CAAA,CAAA,IAAA,CAAA,2JACA,CAAA,IAAA,CAAA,4PAEI,CAAA,QAAA,CAAA,0DAEb,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 HeroStyles = tv({\n slots: {\n hero: 'group/hero relative flex flex-col layout-stack:rounded-large layout-stack:bg-interactive-disabled layout-stack:px-l layout-stack:py-xl layout-grid:pl-xxl',\n icon: 'fg-primary-muted -order-3 group-layout-grid/hero:absolute group-layout-grid/hero:top-xxs group-layout-grid/hero:left-xs group-layout-stack/hero:mb-l group-layout-stack/hero:size-[48px]',\n title: 'fg-primary-bold -order-2 mb-xs font-display text-header-l',\n subtitle: 'fg-primary-muted -order-1 block font-display text-body-s',\n },\n});\n"]}
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ProviderProps } from '../../lib/types.js';
4
3
  import { ContextValue } from 'react-aria-components';
4
+ import { ProviderProps } from '../../lib/types.js';
5
5
  import { HotkeyProps, HotkeySetProps } from './types.js';
6
6
  import 'tailwind-variants';
7
7
  import './styles.js';
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsx}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps,Keyboard}from'react-aria-components';import {Icon}from'../icon/index.js';import {HotkeyStyles,HotkeyStylesDefaults}from'./styles.js';const {key:c,set:v}=HotkeyStyles(),y=createContext(null);function i({children:e,...o}){return jsx(y.Provider,{value:o,children:e})}i.displayName="Hotkey.Provider";function s({ref:e,children:o,...t}){[t,e]=useContextProps(t,e??null,y);const{className:a,variant:l=HotkeyStylesDefaults.variant}=t;return jsx(Keyboard,{ref:e,...t,className:c({className:a,variant:l}),children:o})}s.displayName="Hotkey";function n({children:e,...o}){const{className:t}=o;return jsx("div",{className:v({className:t}),children:jsx(Icon.Provider,{size:"large",children:e})})}n.displayName="Hotkey.Set",s.Set=n,s.Provider=i;export{s as Hotkey,y as HotkeyContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/hotkey/index.tsx"],"names":["HotkeyStyles","HotkeyContext","createContext","H","m","props","jsx","r","HotkeyProvider","useContextProps","ref","P","HotkeyStylesDefaults","Keyboard","p","className","children","Hotkey","Icon","k"],"mappings":"6PA0BqBA,CAAAA,GAERC,CAAAA,CACXC,CAAAA,KAA0D,CAAA,CAE5DC,YAAA,EAAA,CAAA,CAAA,CAAAC,aAAA,CAAA,IAA0B,WAAU,CAAA,CAAA,CAAGC,QACrC,CAAA,CAAA,CACEC,GAACL,CAAc,CAAA,CAAA,CAAA,OAASM,GAAA,CAAA,CAAA,CAAA,QAAe,CAAA,CAAA,KAAS,CAEpD,CACAC,CAAAA,QAAe,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,iBAiCJ,CAAA,eAAe,CAAA,CAAA,CAAGH,QAC9B,CAAA,CAAII,CAAAA,GAAuBC,CAAAA,CAAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAMT,CAAa,CAAAU,eAChE,MAAQ,IAAA,CAAA,CAAA,CAAA,CAAA,KAAW,CAAA,SAAUC,CAAqB,CAAA,CAAA,OAAYP,CAAAA,CAE9D,6BACGQ,CAAA,CAAS,CAAA,CAAA,OAAcR,GAAAA,CAAOS,QAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,GAAe,CAAE,CAAA,SAAAC,CAAAA,CAAW,CAAA,CAAA,SAAS,CACjE,CAAA,CAAA,OAAAC,CAAAA,CACH,CAEJ,CACAC,CAAAA,QAAO,CAAA,CAAA,CAAA,CAAA,CAAc,aAErB,CAAA,QAAqB,CAAA,SAAU,CAAA,CAAA,CAAGZ,QAChC,CAAM,CAAE,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,KAAcA,CAAAA,SAGpBC,CAAC,YAAIC,GAAA,CAAA,KAAe,CAAE,CAAA,SAAAQ,CAAU,CAAC,CAAA,CAC/B,SAAAT,CAAAA,CAACY,EAAK,CAAA,QAAL,CAAcX,GAAA,CAAAY,IAAA,CAAA,QAAK,CAAS,aAC/B,CAEJ,QACU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAExBF,aACO,CAAA,CAAA,CAAA,GAAWT,CAAAA,CAAAA,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\n'use client';\n\nimport 'client-only';\nimport type { ProviderProps } from '@/lib/types';\nimport { createContext } from 'react';\nimport {\n type ContextValue,\n Keyboard,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\nimport { HotkeyStyles, HotkeyStylesDefaults } from './styles';\nimport type { HotkeyProps, HotkeySetProps } from './types';\n\nconst { key, set } = HotkeyStyles();\n\nexport const HotkeyContext =\n createContext<ContextValue<HotkeyProps, HTMLElement>>(null);\n\nfunction HotkeyProvider({ children, ...props }: ProviderProps<HotkeyProps>) {\n return (\n <HotkeyContext.Provider value={props}>{children}</HotkeyContext.Provider>\n );\n}\nHotkeyProvider.displayName = 'Hotkey.Provider';\n\n/**\n * Hotkey - A visual representation of keyboard shortcuts and key combinations\n *\n * Displays keyboard keys and shortcuts in a consistent, accessible format.\n * Perfect for documentation, help systems, or UI elements that need to show\n * keyboard shortcuts. Supports multiple visual styles including outlined keys,\n * flat presentation, and icon-specific formatting.\n *\n * @example\n * // Basic hotkey display\n * <Hotkey>Ctrl</Hotkey>\n *\n * @example\n * // Hotkey combination with different variants\n * <Hotkey.Set>\n * <Hotkey variant=\"outline\">Cmd</Hotkey>\n * <span>+</span>\n * <Hotkey variant=\"outline\">K</Hotkey>\n * </Hotkey.Set>\n *\n * @example\n * // Flat style for inline text\n * <p>Press <Hotkey variant=\"flat\">Enter</Hotkey> to submit</p>\n *\n * @example\n * // Icon variant for special keys\n * <Hotkey.Set>\n * <Hotkey variant=\"icon\">⌘</Hotkey>\n * <Hotkey>Space</Hotkey>\n * </Hotkey.Set>\n */\nexport function Hotkey({ ref, children, ...props }: HotkeyProps) {\n [props, ref] = useContextProps(props, ref ?? null, HotkeyContext);\n const { className, variant = HotkeyStylesDefaults.variant } = props;\n\n return (\n <Keyboard ref={ref} {...props} className={key({ className, variant })}>\n {children}\n </Keyboard>\n );\n}\nHotkey.displayName = 'Hotkey';\n\nfunction HotkeySet({ children, ...props }: HotkeySetProps) {\n const { className } = props;\n\n return (\n <div className={set({ className })}>\n <Icon.Provider size='large'>{children}</Icon.Provider>\n </div>\n );\n}\nHotkeySet.displayName = 'Hotkey.Set';\n\nHotkey.Set = HotkeySet;\nHotkey.Provider = HotkeyProvider;\n"]}
1
+ {"version":3,"sources":["../../../src/components/hotkey/index.tsx"],"names":["HotkeyStyles","HotkeyContext","createContext","H","m","props","jsx","r","HotkeyProvider","useContextProps","ref","P","HotkeyStylesDefaults","Keyboard","p","className","children","Hotkey","Icon","k"],"mappings":"6PA0BqBA,CAAAA,GAERC,CAAAA,CACXC,CAAAA,KAA0D,CAAA,CAE5DC,YAAA,EAAA,CAAA,CAAA,CAAAC,aAAA,CAAA,IAA0B,WAAU,CAAA,CAAA,CAAGC,QACrC,CAAA,CAAA,CACEC,GAACL,CAAc,CAAA,CAAA,CAAA,OAASM,GAAA,CAAA,CAAA,CAAA,QAAe,CAAA,CAAA,KAAS,CAEpD,CACAC,CAAAA,QAAe,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,iBAiCJ,CAAA,eAAe,CAAA,CAAA,CAAGH,QAC9B,CAAA,CAAII,CAAAA,GAAuBC,CAAAA,CAAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAMT,CAAa,CAAAU,eAChE,MAAQ,IAAA,CAAA,CAAA,CAAA,CAAA,KAAW,CAAA,SAAUC,CAAqB,CAAA,CAAA,OAAYP,CAAAA,CAE9D,6BACGQ,CAAA,CAAS,CAAA,CAAA,OAAcR,GAAAA,CAAOS,QAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,GAAe,CAAE,CAAA,SAAAC,CAAAA,CAAW,CAAA,CAAA,SAAS,CACjE,CAAA,CAAA,OAAAC,CAAAA,CACH,CAEJ,CACAC,CAAAA,QAAO,CAAA,CAAA,CAAA,CAAA,CAAc,aAErB,CAAA,QAAqB,CAAA,SAAU,CAAA,CAAA,CAAGZ,QAChC,CAAM,CAAE,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,KAAcA,CAAAA,SAGpBC,CAAC,YAAIC,GAAA,CAAA,KAAe,CAAE,CAAA,SAAAQ,CAAU,CAAC,CAAA,CAC/B,SAAAT,CAAAA,CAACY,EAAK,CAAA,QAAL,CAAcX,GAAA,CAAAY,IAAA,CAAA,QAAK,CAAS,aAC/B,CAEJ,QACU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAExBF,aACO,CAAA,CAAA,CAAA,GAAWT,CAAAA,CAAAA,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\n'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport {\n type ContextValue,\n Keyboard,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\nimport { HotkeyStyles, HotkeyStylesDefaults } from './styles';\nimport type { ProviderProps } from '@/lib/types';\nimport type { HotkeyProps, HotkeySetProps } from './types';\n\nconst { key, set } = HotkeyStyles();\n\nexport const HotkeyContext =\n createContext<ContextValue<HotkeyProps, HTMLElement>>(null);\n\nfunction HotkeyProvider({ children, ...props }: ProviderProps<HotkeyProps>) {\n return (\n <HotkeyContext.Provider value={props}>{children}</HotkeyContext.Provider>\n );\n}\nHotkeyProvider.displayName = 'Hotkey.Provider';\n\n/**\n * Hotkey - A visual representation of keyboard shortcuts and key combinations\n *\n * Displays keyboard keys and shortcuts in a consistent, accessible format.\n * Perfect for documentation, help systems, or UI elements that need to show\n * keyboard shortcuts. Supports multiple visual styles including outlined keys,\n * flat presentation, and icon-specific formatting.\n *\n * @example\n * // Basic hotkey display\n * <Hotkey>Ctrl</Hotkey>\n *\n * @example\n * // Hotkey combination with different variants\n * <Hotkey.Set>\n * <Hotkey variant=\"outline\">Cmd</Hotkey>\n * <span>+</span>\n * <Hotkey variant=\"outline\">K</Hotkey>\n * </Hotkey.Set>\n *\n * @example\n * // Flat style for inline text\n * <p>Press <Hotkey variant=\"flat\">Enter</Hotkey> to submit</p>\n *\n * @example\n * // Icon variant for special keys\n * <Hotkey.Set>\n * <Hotkey variant=\"icon\">⌘</Hotkey>\n * <Hotkey>Space</Hotkey>\n * </Hotkey.Set>\n */\nexport function Hotkey({ ref, children, ...props }: HotkeyProps) {\n [props, ref] = useContextProps(props, ref ?? null, HotkeyContext);\n const { className, variant = HotkeyStylesDefaults.variant } = props;\n\n return (\n <Keyboard ref={ref} {...props} className={key({ className, variant })}>\n {children}\n </Keyboard>\n );\n}\nHotkey.displayName = 'Hotkey';\n\nfunction HotkeySet({ children, ...props }: HotkeySetProps) {\n const { className } = props;\n\n return (\n <div className={set({ className })}>\n <Icon.Provider size='large'>{children}</Icon.Provider>\n </div>\n );\n}\nHotkeySet.displayName = 'Hotkey.Set';\n\nHotkey.Set = HotkeySet;\nHotkey.Provider = HotkeyProvider;\n"]}
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';const t={variant:"outline"},r=tv({slots:{key:"fg-default-light w-fit min-w-xl p-xs text-header-s uppercase",set:"fg-default-dark flex items-center gap-xs text-header-m"},variants:{variant:{flat:{key:"bg-transparent"},outline:{key:"rounded-medium border border-info border-b-[3px] bg-surface-default"},icon:{key:"-mx-xs bg-transparent px-0"}}},defaultVariants:t});export{r as HotkeyStyles,t as HotkeyStylesDefaults};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const e={variant:"outline"},o=tv({slots:{key:"fg-primary-bold w-fit min-w-xl p-xs text-header-s uppercase",set:"fg-primary-muted flex items-center gap-xs text-header-m"},variants:{variant:{flat:{key:"bg-transparent"},outline:{key:"rounded-medium bg-surface-default shadow-[0_3px] shadow-[color:var(--outline-info-bold)] outline outline-info-bold"},icon:{key:"-mx-xs bg-transparent px-0"}}},defaultVariants:e});export{o as HotkeyStyles,e as HotkeyStylesDefaults};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/hotkey/styles.ts"],"names":["e"],"mappings":"6CAeW,CAAA,CAAA,OACX,CAAA,YAGS,CACLA,EAAA,CAAA,CAAA,yEACK,CAAA,GAAA,CAAA,wDAEP,CAAU,CACR,QAAS,CACP,QACE,CAAA,CAAK,0BAEE,CACP,CAAA,OAAK,CAAA,CAAA,GAAA,CAAA,uEAGA,IAAA,CAAA,CAAA,GAAA,CAAA,4BAIX,CAAA,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const HotkeyStylesDefaults = {\n variant: 'outline',\n} as const;\n\nexport const HotkeyStyles = tv({\n slots: {\n key: 'fg-default-light w-fit min-w-xl p-xs text-header-s uppercase',\n set: 'fg-default-dark flex items-center gap-xs text-header-m',\n },\n variants: {\n variant: {\n flat: {\n key: 'bg-transparent',\n },\n outline: {\n key: 'rounded-medium border border-info border-b-[3px] bg-surface-default',\n },\n icon: {\n key: '-mx-xs bg-transparent px-0',\n },\n },\n },\n defaultVariants: HotkeyStylesDefaults,\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/hotkey/styles.ts"],"names":["t"],"mappings":"6CAeW,CAAA,CAAA,OACX,CAAA,YAGS,CACLA,EAAA,CAAA,CAAA,wEACK,CAAA,GAAA,CAAA,yDAEP,CAAU,CACR,QAAS,CACP,QACE,CAAA,CAAK,0BAEE,CACP,CAAA,OAAK,CAAA,CAAA,GAAA,CAAA,sHAGA,IAAA,CAAA,CAAA,GAAA,CAAA,4BAIX,CAAA,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const HotkeyStylesDefaults = {\n variant: 'outline',\n} as const;\n\nexport const HotkeyStyles = tv({\n slots: {\n key: 'fg-primary-bold w-fit min-w-xl p-xs text-header-s uppercase',\n set: 'fg-primary-muted flex items-center gap-xs text-header-m',\n },\n variants: {\n variant: {\n flat: {\n key: 'bg-transparent',\n },\n outline: {\n key: 'rounded-medium bg-surface-default shadow-[0_3px] shadow-[color:var(--outline-info-bold)] outline outline-info-bold',\n },\n icon: {\n key: '-mx-xs bg-transparent px-0',\n },\n },\n },\n defaultVariants: HotkeyStylesDefaults,\n});\n"]}
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ProviderProps } from '../../lib/types.js';
4
3
  import { ContextValue } from 'react-aria-components';
4
+ import { ProviderProps } from '../../lib/types.js';
5
5
  import { IconProps } from './types.js';
6
6
 
7
7
  declare const IconContext: react.Context<ContextValue<IconProps, HTMLSpanElement>>;