@resq-sw/ui 0.2.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 (344) hide show
  1. package/LICENSE.md +20 -0
  2. package/README.md +61 -0
  3. package/lib/components/accordion/accordion.d.ts +27 -0
  4. package/lib/components/accordion/accordion.d.ts.map +1 -0
  5. package/lib/components/accordion/accordion.js +71 -0
  6. package/lib/components/accordion/accordion.js.map +1 -0
  7. package/lib/components/accordion/index.d.ts +2 -0
  8. package/lib/components/accordion/index.js +2 -0
  9. package/lib/components/alert/alert.d.ts +30 -0
  10. package/lib/components/alert/alert.d.ts.map +1 -0
  11. package/lib/components/alert/alert.js +59 -0
  12. package/lib/components/alert/alert.js.map +1 -0
  13. package/lib/components/alert/index.d.ts +2 -0
  14. package/lib/components/alert/index.js +2 -0
  15. package/lib/components/alert-dialog/alert-dialog.d.ts +61 -0
  16. package/lib/components/alert-dialog/alert-dialog.d.ts.map +1 -0
  17. package/lib/components/alert-dialog/alert-dialog.js +102 -0
  18. package/lib/components/alert-dialog/alert-dialog.js.map +1 -0
  19. package/lib/components/alert-dialog/index.d.ts +2 -0
  20. package/lib/components/alert-dialog/index.js +2 -0
  21. package/lib/components/aspect-ratio/aspect-ratio.d.ts +11 -0
  22. package/lib/components/aspect-ratio/aspect-ratio.d.ts.map +1 -0
  23. package/lib/components/aspect-ratio/aspect-ratio.js +29 -0
  24. package/lib/components/aspect-ratio/aspect-ratio.js.map +1 -0
  25. package/lib/components/aspect-ratio/index.d.ts +2 -0
  26. package/lib/components/aspect-ratio/index.js +2 -0
  27. package/lib/components/avatar/avatar.d.ts +36 -0
  28. package/lib/components/avatar/avatar.d.ts.map +1 -0
  29. package/lib/components/avatar/avatar.js +67 -0
  30. package/lib/components/avatar/avatar.js.map +1 -0
  31. package/lib/components/avatar/index.d.ts +2 -0
  32. package/lib/components/avatar/index.js +2 -0
  33. package/lib/components/badge/badge.d.ts +21 -0
  34. package/lib/components/badge/badge.d.ts.map +1 -0
  35. package/lib/components/badge/badge.js +43 -0
  36. package/lib/components/badge/badge.js.map +1 -0
  37. package/lib/components/badge/index.d.ts +2 -0
  38. package/lib/components/badge/index.js +2 -0
  39. package/lib/components/breadcrumb/breadcrumb.d.ts +40 -0
  40. package/lib/components/breadcrumb/breadcrumb.d.ts.map +1 -0
  41. package/lib/components/breadcrumb/breadcrumb.js +86 -0
  42. package/lib/components/breadcrumb/breadcrumb.js.map +1 -0
  43. package/lib/components/breadcrumb/index.d.ts +2 -0
  44. package/lib/components/breadcrumb/index.js +2 -0
  45. package/lib/components/button/button.d.ts +23 -0
  46. package/lib/components/button/button.d.ts.map +1 -0
  47. package/lib/components/button/button.js +63 -0
  48. package/lib/components/button/button.js.map +1 -0
  49. package/lib/components/button/index.d.ts +2 -0
  50. package/lib/components/button/index.js +2 -0
  51. package/lib/components/button-group/button-group.d.ts +30 -0
  52. package/lib/components/button-group/button-group.d.ts.map +1 -0
  53. package/lib/components/button-group/button-group.js +55 -0
  54. package/lib/components/button-group/button-group.js.map +1 -0
  55. package/lib/components/button-group/index.d.ts +2 -0
  56. package/lib/components/button-group/index.js +2 -0
  57. package/lib/components/calendar/calendar.d.ts +32 -0
  58. package/lib/components/calendar/calendar.d.ts.map +1 -0
  59. package/lib/components/calendar/calendar.js +126 -0
  60. package/lib/components/calendar/calendar.js.map +1 -0
  61. package/lib/components/calendar/index.d.ts +2 -0
  62. package/lib/components/calendar/index.js +2 -0
  63. package/lib/components/card/card.d.ts +39 -0
  64. package/lib/components/card/card.d.ts.map +1 -0
  65. package/lib/components/card/card.js +57 -0
  66. package/lib/components/card/card.js.map +1 -0
  67. package/lib/components/card/index.d.ts +2 -0
  68. package/lib/components/card/index.js +2 -0
  69. package/lib/components/carousel/carousel.d.ts +58 -0
  70. package/lib/components/carousel/carousel.d.ts.map +1 -0
  71. package/lib/components/carousel/carousel.js +150 -0
  72. package/lib/components/carousel/carousel.js.map +1 -0
  73. package/lib/components/carousel/index.d.ts +2 -0
  74. package/lib/components/carousel/index.js +2 -0
  75. package/lib/components/chart/chart.d.ts +70 -0
  76. package/lib/components/chart/chart.d.ts.map +1 -0
  77. package/lib/components/chart/chart.js +164 -0
  78. package/lib/components/chart/chart.js.map +1 -0
  79. package/lib/components/chart/index.d.ts +2 -0
  80. package/lib/components/chart/index.js +2 -0
  81. package/lib/components/checkbox/checkbox.d.ts +13 -0
  82. package/lib/components/checkbox/checkbox.d.ts.map +1 -0
  83. package/lib/components/checkbox/checkbox.js +37 -0
  84. package/lib/components/checkbox/checkbox.js.map +1 -0
  85. package/lib/components/checkbox/index.d.ts +2 -0
  86. package/lib/components/checkbox/index.js +2 -0
  87. package/lib/components/collapsible/collapsible.d.ts +17 -0
  88. package/lib/components/collapsible/collapsible.d.ts.map +1 -0
  89. package/lib/components/collapsible/collapsible.js +41 -0
  90. package/lib/components/collapsible/collapsible.js.map +1 -0
  91. package/lib/components/collapsible/index.d.ts +2 -0
  92. package/lib/components/collapsible/index.js +2 -0
  93. package/lib/components/combobox/combobox.d.ts +83 -0
  94. package/lib/components/combobox/combobox.d.ts.map +1 -0
  95. package/lib/components/combobox/combobox.js +180 -0
  96. package/lib/components/combobox/combobox.js.map +1 -0
  97. package/lib/components/combobox/index.d.ts +2 -0
  98. package/lib/components/combobox/index.js +2 -0
  99. package/lib/components/command/command.d.ts +56 -0
  100. package/lib/components/command/command.d.ts.map +1 -0
  101. package/lib/components/command/command.js +104 -0
  102. package/lib/components/command/command.js.map +1 -0
  103. package/lib/components/command/index.d.ts +2 -0
  104. package/lib/components/command/index.js +2 -0
  105. package/lib/components/context-menu/context-menu.d.ts +81 -0
  106. package/lib/components/context-menu/context-menu.d.ts.map +1 -0
  107. package/lib/components/context-menu/context-menu.js +139 -0
  108. package/lib/components/context-menu/context-menu.js.map +1 -0
  109. package/lib/components/context-menu/index.d.ts +2 -0
  110. package/lib/components/context-menu/index.js +2 -0
  111. package/lib/components/dialog/dialog.d.ts +52 -0
  112. package/lib/components/dialog/dialog.d.ts.map +1 -0
  113. package/lib/components/dialog/dialog.js +97 -0
  114. package/lib/components/dialog/dialog.js.map +1 -0
  115. package/lib/components/dialog/index.d.ts +2 -0
  116. package/lib/components/dialog/index.js +2 -0
  117. package/lib/components/direction/direction.d.ts +17 -0
  118. package/lib/components/direction/direction.d.ts.map +1 -0
  119. package/lib/components/direction/direction.js +30 -0
  120. package/lib/components/direction/direction.js.map +1 -0
  121. package/lib/components/direction/index.d.ts +2 -0
  122. package/lib/components/direction/index.js +2 -0
  123. package/lib/components/drawer/drawer.d.ts +46 -0
  124. package/lib/components/drawer/drawer.d.ts.map +1 -0
  125. package/lib/components/drawer/drawer.js +94 -0
  126. package/lib/components/drawer/drawer.js.map +1 -0
  127. package/lib/components/drawer/index.d.ts +2 -0
  128. package/lib/components/drawer/index.js +2 -0
  129. package/lib/components/dropdown-menu/dropdown-menu.d.ts +80 -0
  130. package/lib/components/dropdown-menu/dropdown-menu.d.ts.map +1 -0
  131. package/lib/components/dropdown-menu/dropdown-menu.js +142 -0
  132. package/lib/components/dropdown-menu/dropdown-menu.js.map +1 -0
  133. package/lib/components/dropdown-menu/index.d.ts +2 -0
  134. package/lib/components/dropdown-menu/index.js +2 -0
  135. package/lib/components/empty/empty.d.ts +37 -0
  136. package/lib/components/empty/empty.d.ts.map +1 -0
  137. package/lib/components/empty/empty.js +76 -0
  138. package/lib/components/empty/empty.js.map +1 -0
  139. package/lib/components/empty/index.d.ts +2 -0
  140. package/lib/components/empty/index.js +2 -0
  141. package/lib/components/field/field.d.ts +66 -0
  142. package/lib/components/field/field.d.ts.map +1 -0
  143. package/lib/components/field/field.js +127 -0
  144. package/lib/components/field/field.js.map +1 -0
  145. package/lib/components/field/index.d.ts +2 -0
  146. package/lib/components/field/index.js +2 -0
  147. package/lib/components/hover-card/hover-card.d.ts +21 -0
  148. package/lib/components/hover-card/hover-card.d.ts.map +1 -0
  149. package/lib/components/hover-card/hover-card.js +48 -0
  150. package/lib/components/hover-card/hover-card.js.map +1 -0
  151. package/lib/components/hover-card/index.d.ts +2 -0
  152. package/lib/components/hover-card/index.js +2 -0
  153. package/lib/components/input/index.d.ts +2 -0
  154. package/lib/components/input/index.js +2 -0
  155. package/lib/components/input/input.d.ts +13 -0
  156. package/lib/components/input/input.d.ts.map +1 -0
  157. package/lib/components/input/input.js +15 -0
  158. package/lib/components/input/input.js.map +1 -0
  159. package/lib/components/input-group/index.d.ts +2 -0
  160. package/lib/components/input-group/index.js +2 -0
  161. package/lib/components/input-group/input-group.d.ts +45 -0
  162. package/lib/components/input-group/input-group.d.ts.map +1 -0
  163. package/lib/components/input-group/input-group.js +95 -0
  164. package/lib/components/input-group/input-group.js.map +1 -0
  165. package/lib/components/input-otp/index.d.ts +2 -0
  166. package/lib/components/input-otp/index.js +2 -0
  167. package/lib/components/input-otp/input-otp.d.ts +30 -0
  168. package/lib/components/input-otp/input-otp.d.ts.map +1 -0
  169. package/lib/components/input-otp/input-otp.js +64 -0
  170. package/lib/components/input-otp/input-otp.js.map +1 -0
  171. package/lib/components/item/index.d.ts +2 -0
  172. package/lib/components/item/index.js +2 -0
  173. package/lib/components/item/item.d.ts +64 -0
  174. package/lib/components/item/item.d.ts.map +1 -0
  175. package/lib/components/item/item.js +133 -0
  176. package/lib/components/item/item.js.map +1 -0
  177. package/lib/components/kbd/index.d.ts +2 -0
  178. package/lib/components/kbd/index.js +2 -0
  179. package/lib/components/kbd/kbd.d.ts +30 -0
  180. package/lib/components/kbd/kbd.d.ts.map +1 -0
  181. package/lib/components/kbd/kbd.js +36 -0
  182. package/lib/components/kbd/kbd.js.map +1 -0
  183. package/lib/components/label/index.d.ts +2 -0
  184. package/lib/components/label/index.js +2 -0
  185. package/lib/components/label/label.d.ts +13 -0
  186. package/lib/components/label/label.d.ts.map +1 -0
  187. package/lib/components/label/label.js +31 -0
  188. package/lib/components/label/label.js.map +1 -0
  189. package/lib/components/menubar/index.d.ts +2 -0
  190. package/lib/components/menubar/index.js +2 -0
  191. package/lib/components/menubar/menubar.d.ts +86 -0
  192. package/lib/components/menubar/menubar.d.ts.map +1 -0
  193. package/lib/components/menubar/menubar.js +149 -0
  194. package/lib/components/menubar/menubar.js.map +1 -0
  195. package/lib/components/native-select/index.d.ts +2 -0
  196. package/lib/components/native-select/index.js +2 -0
  197. package/lib/components/native-select/native-select.d.ts +23 -0
  198. package/lib/components/native-select/native-select.d.ts.map +1 -0
  199. package/lib/components/native-select/native-select.js +53 -0
  200. package/lib/components/native-select/native-select.js.map +1 -0
  201. package/lib/components/navigation-menu/index.d.ts +2 -0
  202. package/lib/components/navigation-menu/index.js +2 -0
  203. package/lib/components/navigation-menu/navigation-menu.d.ts +48 -0
  204. package/lib/components/navigation-menu/navigation-menu.d.ts.map +1 -0
  205. package/lib/components/navigation-menu/navigation-menu.js +96 -0
  206. package/lib/components/navigation-menu/navigation-menu.js.map +1 -0
  207. package/lib/components/pagination/index.d.ts +2 -0
  208. package/lib/components/pagination/index.js +2 -0
  209. package/lib/components/pagination/pagination.d.ts +47 -0
  210. package/lib/components/pagination/pagination.d.ts.map +1 -0
  211. package/lib/components/pagination/pagination.js +95 -0
  212. package/lib/components/pagination/pagination.js.map +1 -0
  213. package/lib/components/popover/index.d.ts +2 -0
  214. package/lib/components/popover/index.js +2 -0
  215. package/lib/components/popover/popover.d.ts +36 -0
  216. package/lib/components/popover/popover.d.ts.map +1 -0
  217. package/lib/components/popover/popover.js +72 -0
  218. package/lib/components/popover/popover.js.map +1 -0
  219. package/lib/components/progress/index.d.ts +2 -0
  220. package/lib/components/progress/index.js +2 -0
  221. package/lib/components/progress/progress.d.ts +14 -0
  222. package/lib/components/progress/progress.d.ts.map +1 -0
  223. package/lib/components/progress/progress.js +36 -0
  224. package/lib/components/progress/progress.js.map +1 -0
  225. package/lib/components/radio-group/index.d.ts +2 -0
  226. package/lib/components/radio-group/index.js +2 -0
  227. package/lib/components/radio-group/radio-group.d.ts +17 -0
  228. package/lib/components/radio-group/radio-group.d.ts.map +1 -0
  229. package/lib/components/radio-group/radio-group.js +44 -0
  230. package/lib/components/radio-group/radio-group.js.map +1 -0
  231. package/lib/components/resizable/index.d.ts +2 -0
  232. package/lib/components/resizable/index.js +2 -0
  233. package/lib/components/resizable/resizable.d.ts +23 -0
  234. package/lib/components/resizable/resizable.d.ts.map +1 -0
  235. package/lib/components/resizable/resizable.js +45 -0
  236. package/lib/components/resizable/resizable.js.map +1 -0
  237. package/lib/components/scroll-area/index.d.ts +2 -0
  238. package/lib/components/scroll-area/index.js +2 -0
  239. package/lib/components/scroll-area/scroll-area.d.ts +19 -0
  240. package/lib/components/scroll-area/scroll-area.d.ts.map +1 -0
  241. package/lib/components/scroll-area/scroll-area.js +53 -0
  242. package/lib/components/scroll-area/scroll-area.js.map +1 -0
  243. package/lib/components/select/index.d.ts +2 -0
  244. package/lib/components/select/index.js +2 -0
  245. package/lib/components/select/select.d.ts +55 -0
  246. package/lib/components/select/select.d.ts.map +1 -0
  247. package/lib/components/select/select.js +116 -0
  248. package/lib/components/select/select.js.map +1 -0
  249. package/lib/components/separator/index.d.ts +2 -0
  250. package/lib/components/separator/index.js +2 -0
  251. package/lib/components/separator/separator.d.ts +15 -0
  252. package/lib/components/separator/separator.d.ts.map +1 -0
  253. package/lib/components/separator/separator.js +33 -0
  254. package/lib/components/separator/separator.js.map +1 -0
  255. package/lib/components/sheet/index.d.ts +2 -0
  256. package/lib/components/sheet/index.js +2 -0
  257. package/lib/components/sheet/sheet.d.ts +44 -0
  258. package/lib/components/sheet/sheet.d.ts.map +1 -0
  259. package/lib/components/sheet/sheet.js +106 -0
  260. package/lib/components/sheet/sheet.js.map +1 -0
  261. package/lib/components/sidebar/index.d.ts +2 -0
  262. package/lib/components/sidebar/index.js +2 -0
  263. package/lib/components/sidebar/sidebar.d.ts +169 -0
  264. package/lib/components/sidebar/sidebar.d.ts.map +1 -0
  265. package/lib/components/sidebar/sidebar.js +388 -0
  266. package/lib/components/sidebar/sidebar.js.map +1 -0
  267. package/lib/components/skeleton/index.d.ts +2 -0
  268. package/lib/components/skeleton/index.js +2 -0
  269. package/lib/components/skeleton/skeleton.d.ts +26 -0
  270. package/lib/components/skeleton/skeleton.d.ts.map +1 -0
  271. package/lib/components/skeleton/skeleton.js +29 -0
  272. package/lib/components/skeleton/skeleton.js.map +1 -0
  273. package/lib/components/slider/index.d.ts +2 -0
  274. package/lib/components/slider/index.js +2 -0
  275. package/lib/components/slider/slider.d.ts +17 -0
  276. package/lib/components/slider/slider.d.ts.map +1 -0
  277. package/lib/components/slider/slider.js +53 -0
  278. package/lib/components/slider/slider.js.map +1 -0
  279. package/lib/components/sonner/index.d.ts +2 -0
  280. package/lib/components/sonner/index.js +2 -0
  281. package/lib/components/sonner/sonner.d.ts +11 -0
  282. package/lib/components/sonner/sonner.d.ts.map +1 -0
  283. package/lib/components/sonner/sonner.js +47 -0
  284. package/lib/components/sonner/sonner.js.map +1 -0
  285. package/lib/components/spinner/index.d.ts +2 -0
  286. package/lib/components/spinner/index.js +2 -0
  287. package/lib/components/spinner/spinner.d.ts +26 -0
  288. package/lib/components/spinner/spinner.d.ts.map +1 -0
  289. package/lib/components/spinner/spinner.js +31 -0
  290. package/lib/components/spinner/spinner.js.map +1 -0
  291. package/lib/components/switch/index.d.ts +2 -0
  292. package/lib/components/switch/index.js +2 -0
  293. package/lib/components/switch/switch.d.ts +16 -0
  294. package/lib/components/switch/switch.d.ts.map +1 -0
  295. package/lib/components/switch/switch.js +36 -0
  296. package/lib/components/switch/switch.js.map +1 -0
  297. package/lib/components/table/index.d.ts +2 -0
  298. package/lib/components/table/index.js +2 -0
  299. package/lib/components/table/table.d.ts +40 -0
  300. package/lib/components/table/table.d.ts.map +1 -0
  301. package/lib/components/table/table.js +83 -0
  302. package/lib/components/table/table.js.map +1 -0
  303. package/lib/components/tabs/index.d.ts +2 -0
  304. package/lib/components/tabs/index.js +2 -0
  305. package/lib/components/tabs/tabs.d.ts +32 -0
  306. package/lib/components/tabs/tabs.d.ts.map +1 -0
  307. package/lib/components/tabs/tabs.js +62 -0
  308. package/lib/components/tabs/tabs.js.map +1 -0
  309. package/lib/components/textarea/index.d.ts +2 -0
  310. package/lib/components/textarea/index.js +2 -0
  311. package/lib/components/textarea/textarea.d.ts +12 -0
  312. package/lib/components/textarea/textarea.d.ts.map +1 -0
  313. package/lib/components/textarea/textarea.js +14 -0
  314. package/lib/components/textarea/textarea.js.map +1 -0
  315. package/lib/components/toggle/index.d.ts +2 -0
  316. package/lib/components/toggle/index.js +2 -0
  317. package/lib/components/toggle/toggle.d.ts +21 -0
  318. package/lib/components/toggle/toggle.d.ts.map +1 -0
  319. package/lib/components/toggle/toggle.js +53 -0
  320. package/lib/components/toggle/toggle.js.map +1 -0
  321. package/lib/components/toggle-group/index.d.ts +2 -0
  322. package/lib/components/toggle-group/index.js +2 -0
  323. package/lib/components/toggle-group/toggle-group.d.ts +30 -0
  324. package/lib/components/toggle-group/toggle-group.d.ts.map +1 -0
  325. package/lib/components/toggle-group/toggle-group.js +68 -0
  326. package/lib/components/toggle-group/toggle-group.js.map +1 -0
  327. package/lib/components/tooltip/index.d.ts +2 -0
  328. package/lib/components/tooltip/index.js +2 -0
  329. package/lib/components/tooltip/tooltip.d.ts +25 -0
  330. package/lib/components/tooltip/tooltip.d.ts.map +1 -0
  331. package/lib/components/tooltip/tooltip.js +52 -0
  332. package/lib/components/tooltip/tooltip.js.map +1 -0
  333. package/lib/hooks/use-mobile.d.ts +20 -0
  334. package/lib/hooks/use-mobile.d.ts.map +1 -0
  335. package/lib/hooks/use-mobile.js +37 -0
  336. package/lib/hooks/use-mobile.js.map +1 -0
  337. package/lib/index.d.ts +58 -0
  338. package/lib/index.js +113 -0
  339. package/lib/lib/utils.d.ts +7 -0
  340. package/lib/lib/utils.d.ts.map +1 -0
  341. package/lib/lib/utils.js +10 -0
  342. package/lib/lib/utils.js.map +1 -0
  343. package/package.json +395 -0
  344. package/src/styles/globals.css +140 -0
@@ -0,0 +1,164 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import * as React from "react";
5
+ import * as RechartsPrimitive from "recharts";
6
+ //#region src/components/chart/chart.tsx
7
+ /**
8
+ * Copyright 2026 ResQ
9
+ *
10
+ * Licensed under the Apache License, Version 2.0 (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * http://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" BASIS,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ */
22
+ const THEMES = {
23
+ dark: ".dark",
24
+ light: ""
25
+ };
26
+ const SAFE_KEY_RE = /^[a-zA-Z0-9_-]+$/;
27
+ const SAFE_COLOR_RE = /^(#[0-9a-fA-F]{3,8}|[a-zA-Z]+|\d+(\.\d+)?\s+\d+(\.\d+)?%?\s+\d+(\.\d+)?%?|(rgb|hsl|oklch|color)\([^)]{0,100}\)|var\(--[a-zA-Z0-9_-]+\))$/;
28
+ const ChartContext = React.createContext(null);
29
+ function buildChartCss(id, colorConfig) {
30
+ return Object.entries(THEMES).map(([theme, prefix]) => `
31
+ ${prefix} [data-chart=${id}] {
32
+ ${colorConfig.map(([key, itemConfig]) => {
33
+ const color = itemConfig.theme?.[theme] || itemConfig.color;
34
+ const isSafeKey = SAFE_KEY_RE.test(key);
35
+ const isSafeColor = color ? SAFE_COLOR_RE.test(color.trim()) : false;
36
+ return isSafeKey && isSafeColor ? ` --color-${key}: ${color?.trim()};` : null;
37
+ }).join("\n")}
38
+ }
39
+ `).join("\n");
40
+ }
41
+ function ChartContainer({ children, className, config, id, ...props }) {
42
+ const uniqueId = React.useId();
43
+ const chartId = `chart-${id || uniqueId.replaceAll(/:/g, "")}`;
44
+ return /* @__PURE__ */ jsx(ChartContext.Provider, {
45
+ value: { config },
46
+ children: /* @__PURE__ */ jsxs("div", {
47
+ className: cn("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
48
+ "data-chart": chartId,
49
+ "data-slot": "chart",
50
+ ...props,
51
+ children: [/* @__PURE__ */ jsx(ChartStyle, {
52
+ config,
53
+ id: chartId
54
+ }), /* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { children })]
55
+ })
56
+ });
57
+ }
58
+ function useChart() {
59
+ const context = React.useContext(ChartContext);
60
+ if (!context) throw new Error("useChart must be used within a <ChartContainer />");
61
+ return context;
62
+ }
63
+ const ChartStyle = React.memo(function ChartStyle({ config, id }) {
64
+ const colorConfig = React.useMemo(() => Object.entries(config).filter(([, c]) => c.theme ?? c.color), [config]);
65
+ const css = React.useMemo(() => buildChartCss(id, colorConfig), [id, colorConfig]);
66
+ if (!colorConfig.length) return null;
67
+ return /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: css } });
68
+ });
69
+ const ChartTooltip = RechartsPrimitive.Tooltip;
70
+ function ChartTooltipContent({ active, className, color, formatter, hideIndicator = false, hideLabel = false, indicator = "dot", label, labelClassName, labelFormatter, labelKey, nameKey, payload }) {
71
+ const { config } = useChart();
72
+ const tooltipLabel = React.useMemo(() => {
73
+ if (hideLabel || !payload?.length) return null;
74
+ const [item] = payload;
75
+ const itemConfig = getPayloadConfigFromPayload(config, item, `${labelKey || item?.dataKey || item?.name || "value"}`);
76
+ const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
77
+ if (labelFormatter) return /* @__PURE__ */ jsx("div", {
78
+ className: cn("font-medium", labelClassName),
79
+ children: labelFormatter(value, payload)
80
+ });
81
+ if (!value) return null;
82
+ return /* @__PURE__ */ jsx("div", {
83
+ className: cn("font-medium", labelClassName),
84
+ children: value
85
+ });
86
+ }, [
87
+ label,
88
+ labelFormatter,
89
+ payload,
90
+ hideLabel,
91
+ labelClassName,
92
+ config,
93
+ labelKey
94
+ ]);
95
+ if (!active || !payload?.length) return null;
96
+ const nestLabel = payload.length === 1 && indicator !== "dot";
97
+ return /* @__PURE__ */ jsxs("div", {
98
+ className: cn("border-border/50 bg-background gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl grid min-w-[8rem] items-start", className),
99
+ children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("div", {
100
+ className: "grid gap-1.5",
101
+ children: payload.filter((item) => item.type !== "none").map((item, index) => {
102
+ const itemConfig = getPayloadConfigFromPayload(config, item, `${nameKey || item.name || item.dataKey || "value"}`);
103
+ const indicatorColor = color || item.payload.fill || item.color;
104
+ return /* @__PURE__ */ jsx("div", {
105
+ className: cn("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5", indicator === "dot" && "items-center"),
106
+ children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx("div", {
107
+ className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
108
+ "h-2.5 w-2.5": indicator === "dot",
109
+ "my-0.5": nestLabel && indicator === "dashed",
110
+ "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
111
+ "w-1": indicator === "line"
112
+ }),
113
+ style: {
114
+ "--color-bg": indicatorColor,
115
+ "--color-border": indicatorColor
116
+ }
117
+ }), /* @__PURE__ */ jsxs("div", {
118
+ className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"),
119
+ children: [/* @__PURE__ */ jsxs("div", {
120
+ className: "grid gap-1.5",
121
+ children: [nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("span", {
122
+ className: "text-muted-foreground",
123
+ children: itemConfig?.label || item.name
124
+ })]
125
+ }), item.value && /* @__PURE__ */ jsx("span", {
126
+ className: "text-foreground font-mono font-medium tabular-nums",
127
+ children: item.value.toLocaleString()
128
+ })]
129
+ })] })
130
+ }, item.dataKey);
131
+ })
132
+ })]
133
+ });
134
+ }
135
+ const ChartLegend = RechartsPrimitive.Legend;
136
+ function ChartLegendContent({ className, hideIcon = false, nameKey, payload, verticalAlign = "bottom" }) {
137
+ const { config } = useChart();
138
+ if (!payload?.length) return null;
139
+ return /* @__PURE__ */ jsx("div", {
140
+ className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className),
141
+ children: payload.filter((item) => item.type !== "none").map((item) => {
142
+ const itemConfig = getPayloadConfigFromPayload(config, item, `${nameKey || item.dataKey || "value"}`);
143
+ return /* @__PURE__ */ jsxs("div", {
144
+ className: cn("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),
145
+ children: [itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx("div", {
146
+ className: "h-2 w-2 shrink-0 rounded-[2px]",
147
+ style: { backgroundColor: item.color }
148
+ }), itemConfig?.label]
149
+ }, item.value);
150
+ })
151
+ });
152
+ }
153
+ function getPayloadConfigFromPayload(config, payload, key) {
154
+ if (typeof payload !== "object" || payload === null) return;
155
+ const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
156
+ let configLabelKey = key;
157
+ if (key in payload && typeof payload[key] === "string") configLabelKey = payload[key];
158
+ else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") configLabelKey = payloadPayload[key];
159
+ return configLabelKey in config ? config[configLabelKey] : config[key];
160
+ }
161
+ //#endregion
162
+ export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
163
+
164
+ //# sourceMappingURL=chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.js","names":[],"sources":["../../../src/components/chart/chart.tsx"],"sourcesContent":["/**\n * Copyright 2026 ResQ\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// @ts-nocheck -- recharts 3.x type exports don't align with ComponentProps inference\n\n\"use client\";\n\nimport * as React from \"react\";\nimport * as RechartsPrimitive from \"recharts\";\n\nimport { cn } from \"../../lib/utils.js\";\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { dark: \".dark\", light: \"\" } as const;\n\nconst SAFE_KEY_RE = /^[a-zA-Z0-9_-]+$/;\n// Allowlist: permit only named colors, hex, rgb/hsl/oklch values, and CSS variables.\nconst SAFE_COLOR_RE =\n\t/^(#[0-9a-fA-F]{3,8}|[a-zA-Z]+|\\d+(\\.\\d+)?\\s+\\d+(\\.\\d+)?%?\\s+\\d+(\\.\\d+)?%?|(rgb|hsl|oklch|color)\\([^)]{0,100}\\)|var\\(--[a-zA-Z0-9_-]+\\))$/;\n\nexport type ChartConfig = {\n\t[k in string]: {\n\t\ticon?: React.ComponentType;\n\t\tlabel?: React.ReactNode;\n\t} & (\n\t\t| { color?: never; theme: Record<keyof typeof THEMES, string> }\n\t\t| { color?: string; theme?: never }\n\t);\n};\n\ntype ChartContextProps = {\n\tconfig: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction buildChartCss(id: string, colorConfig: [string, ChartConfig[string]][]): string {\n\treturn Object.entries(THEMES)\n\t\t.map(\n\t\t\t([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n\t.map(([key, itemConfig]) => {\n\t\tconst color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] || itemConfig.color;\n\t\tconst isSafeKey = SAFE_KEY_RE.test(key);\n\t\tconst isSafeColor = color ? SAFE_COLOR_RE.test(color.trim()) : false;\n\t\treturn isSafeKey && isSafeColor ? ` --color-${key}: ${color?.trim()};` : null;\n\t})\n\t.join(\"\\n\")}\n}\n`,\n\t\t)\n\t\t.join(\"\\n\");\n}\n\nfunction ChartContainer({\n\tchildren,\n\tclassName,\n\tconfig,\n\tid,\n\t...props\n}: React.ComponentProps<\"div\"> & {\n\tchildren: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>[\"children\"];\n\tconfig: ChartConfig;\n}) {\n\tconst uniqueId = React.useId();\n\tconst chartId = `chart-${id || uniqueId.replaceAll(/:/g, \"\")}`;\n\n\treturn (\n\t\t<ChartContext.Provider value={{ config }}>\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tdata-chart={chartId}\n\t\t\t\tdata-slot=\"chart\"\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<ChartStyle config={config} id={chartId} />\n\t\t\t\t<RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>\n\t\t\t</div>\n\t\t</ChartContext.Provider>\n\t);\n}\n\nfunction useChart() {\n\tconst context = React.useContext(ChartContext);\n\n\tif (!context) {\n\t\tthrow new Error(\"useChart must be used within a <ChartContainer />\");\n\t}\n\n\treturn context;\n}\n\nconst ChartStyle = React.memo(function ChartStyle({\n\tconfig,\n\tid,\n}: {\n\tconfig: ChartConfig;\n\tid: string;\n}) {\n\tconst colorConfig = React.useMemo(\n\t\t() =>\n\t\t\tObject.entries(config).filter(([, c]) => c.theme ?? c.color) as [\n\t\t\t\tstring,\n\t\t\t\tChartConfig[string],\n\t\t\t][],\n\t\t[config],\n\t);\n\n\tconst css = React.useMemo(() => buildChartCss(id, colorConfig), [id, colorConfig]);\n\n\tif (!colorConfig.length) {\n\t\treturn null;\n\t}\n\n\t// css is built only from allowlisted keys/colors validated by SAFE_KEY_RE and SAFE_COLOR_RE.\n\treturn <style dangerouslySetInnerHTML={{ __html: css }} />;\n});\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\nfunction ChartTooltipContent({\n\tactive,\n\tclassName,\n\tcolor,\n\tformatter,\n\thideIndicator = false,\n\thideLabel = false,\n\tindicator = \"dot\",\n\tlabel,\n\tlabelClassName,\n\tlabelFormatter,\n\tlabelKey,\n\tnameKey,\n\tpayload,\n}: React.ComponentProps<\"div\"> &\n\tReact.ComponentProps<typeof RechartsPrimitive.Tooltip> & {\n\t\thideIndicator?: boolean;\n\t\thideLabel?: boolean;\n\t\tindicator?: \"dashed\" | \"dot\" | \"line\";\n\t\tlabelKey?: string;\n\t\tnameKey?: string;\n\t}) {\n\tconst { config } = useChart();\n\n\tconst tooltipLabel = React.useMemo(() => {\n\t\tif (hideLabel || !payload?.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst [item] = payload;\n\t\tconst key = `${labelKey || item?.dataKey || item?.name || \"value\"}`;\n\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\t\tconst value =\n\t\t\t!labelKey && typeof label === \"string\"\n\t\t\t\t? config[label as keyof typeof config]?.label || label\n\t\t\t\t: itemConfig?.label;\n\n\t\tif (labelFormatter) {\n\t\t\treturn (\n\t\t\t\t<div className={cn(\"font-medium\", labelClassName)}>{labelFormatter(value, payload)}</div>\n\t\t\t);\n\t\t}\n\n\t\tif (!value) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\n\t}, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\n\n\tif (!active || !payload?.length) {\n\t\treturn null;\n\t}\n\n\tconst nestLabel = payload.length === 1 && indicator !== \"dot\";\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"border-border/50 bg-background gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl grid min-w-[8rem] items-start\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{!nestLabel ? tooltipLabel : null}\n\t\t\t<div className=\"grid gap-1.5\">\n\t\t\t\t{payload\n\t\t\t\t\t.filter((item) => item.type !== \"none\")\n\t\t\t\t\t.map((item, index) => {\n\t\t\t\t\t\tconst key = `${nameKey || item.name || item.dataKey || \"value\"}`;\n\t\t\t\t\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\t\t\t\t\t\tconst indicatorColor = color || item.payload.fill || item.color;\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5\",\n\t\t\t\t\t\t\t\t\tindicator === \"dot\" && \"items-center\",\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tkey={item.dataKey}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{formatter && item?.value !== undefined && item.name ? (\n\t\t\t\t\t\t\t\t\tformatter(item.value, item.name, item, index, item.payload)\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{itemConfig?.icon ? (\n\t\t\t\t\t\t\t\t\t\t\t<itemConfig.icon />\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t!hideIndicator && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"h-2.5 w-2.5\": indicator === \"dot\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"my-0.5\": nestLabel && indicator === \"dashed\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-0 border-[1.5px] border-dashed bg-transparent\":\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindicator === \"dashed\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-1\": indicator === \"line\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"--color-bg\": indicatorColor,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"--color-border\": indicatorColor,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\"flex flex-1 justify-between leading-none\",\n\t\t\t\t\t\t\t\t\t\t\t\tnestLabel ? \"items-end\" : \"items-center\",\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid gap-1.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t{nestLabel ? tooltipLabel : null}\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{itemConfig?.label || item.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t{item.value && (\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-foreground font-mono font-medium tabular-nums\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{item.value.toLocaleString()}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nconst ChartLegend = RechartsPrimitive.Legend;\n\nfunction ChartLegendContent({\n\tclassName,\n\thideIcon = false,\n\tnameKey,\n\tpayload,\n\tverticalAlign = \"bottom\",\n}: Pick<RechartsPrimitive.LegendProps, \"payload\" | \"verticalAlign\"> &\n\tReact.ComponentProps<\"div\"> & {\n\t\thideIcon?: boolean;\n\t\tnameKey?: string;\n\t}) {\n\tconst { config } = useChart();\n\n\tif (!payload?.length) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"flex items-center justify-center gap-4\",\n\t\t\t\tverticalAlign === \"top\" ? \"pb-3\" : \"pt-3\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{payload\n\t\t\t\t.filter((item) => item.type !== \"none\")\n\t\t\t\t.map((item) => {\n\t\t\t\t\tconst key = `${nameKey || item.dataKey || \"value\"}`;\n\t\t\t\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3\",\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tkey={item.value}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{itemConfig?.icon && !hideIcon ? (\n\t\t\t\t\t\t\t\t<itemConfig.icon />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName=\"h-2 w-2 shrink-0 rounded-[2px]\"\n\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\tbackgroundColor: item.color,\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{itemConfig?.label}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t</div>\n\t);\n}\n\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n\tif (typeof payload !== \"object\" || payload === null) {\n\t\treturn undefined;\n\t}\n\n\tconst payloadPayload =\n\t\t\"payload\" in payload && typeof payload.payload === \"object\" && payload.payload !== null\n\t\t\t? payload.payload\n\t\t\t: undefined;\n\n\tlet configLabelKey: string = key;\n\n\tif (key in payload && typeof payload[key as keyof typeof payload] === \"string\") {\n\t\tconfigLabelKey = payload[key as keyof typeof payload] as string;\n\t} else if (\n\t\tpayloadPayload &&\n\t\tkey in payloadPayload &&\n\t\ttypeof payloadPayload[key as keyof typeof payloadPayload] === \"string\"\n\t) {\n\t\tconfigLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string;\n\t}\n\n\treturn configLabelKey in config ? config[configLabelKey] : config[key as keyof typeof config];\n}\n\nexport {\n\tChartContainer,\n\tChartLegend,\n\tChartLegendContent,\n\tChartStyle,\n\tChartTooltip,\n\tChartTooltipContent,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,MAAM,SAAS;CAAE,MAAM;CAAS,OAAO;CAAI;AAE3C,MAAM,cAAc;AAEpB,MAAM,gBACL;AAgBD,MAAM,eAAe,MAAM,cAAwC,KAAK;AAExE,SAAS,cAAc,IAAY,aAAsD;AACxF,QAAO,OAAO,QAAQ,OAAO,CAC3B,KACC,CAAC,OAAO,YAAY;EACtB,OAAO,eAAe,GAAG;EACzB,YACA,KAAK,CAAC,KAAK,gBAAgB;EAC3B,MAAM,QAAQ,WAAW,QAAQ,UAA2C,WAAW;EACvF,MAAM,YAAY,YAAY,KAAK,IAAI;EACvC,MAAM,cAAc,QAAQ,cAAc,KAAK,MAAM,MAAM,CAAC,GAAG;AAC/D,SAAO,aAAa,cAAc,aAAa,IAAI,IAAI,OAAO,MAAM,CAAC,KAAK;GACzE,CACD,KAAK,KAAK,CAAC;;EAGV,CACA,KAAK,KAAK;;AAGb,SAAS,eAAe,EACvB,UACA,WACA,QACA,IACA,GAAG,SAID;CACF,MAAM,WAAW,MAAM,OAAO;CAC9B,MAAM,UAAU,SAAS,MAAM,SAAS,WAAW,MAAM,GAAG;AAE5D,QACC,oBAAC,aAAa,UAAd;EAAuB,OAAO,EAAE,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ooltip, ChartTooltipContent } from "./chart.js";
2
+ export { ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
@@ -0,0 +1,2 @@
1
+ import { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent } from "./chart.js";
2
+ export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
@@ -0,0 +1,13 @@
1
+ import { Checkbox as Checkbox$1 } from "radix-ui";
2
+ import * as react_jsx_runtime56 from "react/jsx-runtime";
3
+ import * as React from "react";
4
+
5
+ //#region src/components/checkbox/checkbox.d.ts
6
+
7
+ declare function Checkbox({
8
+ className,
9
+ ...props
10
+ }: React.ComponentProps<typeof Checkbox$1.Root>): react_jsx_runtime56.JSX.Element;
11
+ //#endregion
12
+ export { Checkbox };
13
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","names":[],"sources":["../../../src/components/checkbox/checkbox.tsx"],"sourcesContent":[],"mappings":";;;;;;iBAwBS,QAAA;;;GAAkC,KAAA,CAAM,sBAAsB,UAAA,CAAkB,QAAK,mBAAA,CAAA,GAAA,CAAA"}
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { CheckIcon } from "lucide-react";
4
+ import { Checkbox as Checkbox$1 } from "radix-ui";
5
+ import { jsx } from "react/jsx-runtime";
6
+ //#region src/components/checkbox/checkbox.tsx
7
+ /**
8
+ * Copyright 2026 ResQ
9
+ *
10
+ * Licensed under the Apache License, Version 2.0 (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * http://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" BASIS,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ */
22
+ function Checkbox({ className, ...props }) {
23
+ return /* @__PURE__ */ jsx(Checkbox$1.Root, {
24
+ className: cn("border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-lg border transition-colors group-has-disabled/field:opacity-50 focus-visible:ring-[3px] aria-invalid:ring-[3px] peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50", className),
25
+ "data-slot": "checkbox",
26
+ ...props,
27
+ children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
28
+ className: "[&>svg]:size-3.5 grid place-content-center text-current transition-none",
29
+ "data-slot": "checkbox-indicator",
30
+ children: /* @__PURE__ */ jsx(CheckIcon, {})
31
+ })
32
+ });
33
+ }
34
+ //#endregion
35
+ export { Checkbox };
36
+
37
+ //# sourceMappingURL=checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.js","names":["CheckboxPrimitive"],"sources":["../../../src/components/checkbox/checkbox.tsx"],"sourcesContent":["/**\n * Copyright 2026 ResQ\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\"use client\";\n\nimport { CheckIcon } from \"lucide-react\";\nimport { Checkbox as CheckboxPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../lib/utils.js\";\n\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n\treturn (\n\t\t<CheckboxPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t\"border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-lg border transition-colors group-has-disabled/field:opacity-50 focus-visible:ring-[3px] aria-invalid:ring-[3px] peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"checkbox\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<CheckboxPrimitive.Indicator\n\t\t\t\tclassName=\"[&>svg]:size-3.5 grid place-content-center text-current transition-none\"\n\t\t\t\tdata-slot=\"checkbox-indicator\"\n\t\t\t>\n\t\t\t\t<CheckIcon />\n\t\t\t</CheckboxPrimitive.Indicator>\n\t\t</CheckboxPrimitive.Root>\n\t);\n}\n\nexport { Checkbox };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA8D;AAC/F,QACC,oBAACA,WAAkB,MAAnB;EACC,WAAW,GACV,0qBACA,UACA;EACD,aAAU;EACV,GAAI;YAEJ,oBAACA,WAAkB,WAAnB;GACC,WAAU;GACV,aAAU;aAEV,oBAAC,WAAD,EAAa,CAAA;GACgB,CAAA;EACN,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { Checkbox } from "./checkbox.js";
2
+ export { Checkbox };
@@ -0,0 +1,2 @@
1
+ import { Checkbox } from "./checkbox.js";
2
+ export { Checkbox };
@@ -0,0 +1,17 @@
1
+ import { Collapsible as Collapsible$1 } from "radix-ui";
2
+ import * as react_jsx_runtime57 from "react/jsx-runtime";
3
+
4
+ //#region src/components/collapsible/collapsible.d.ts
5
+
6
+ declare function Collapsible({
7
+ ...props
8
+ }: React.ComponentProps<typeof Collapsible$1.Root>): react_jsx_runtime57.JSX.Element;
9
+ declare function CollapsibleContent({
10
+ ...props
11
+ }: React.ComponentProps<typeof Collapsible$1.CollapsibleContent>): react_jsx_runtime57.JSX.Element;
12
+ declare function CollapsibleTrigger({
13
+ ...props
14
+ }: React.ComponentProps<typeof Collapsible$1.CollapsibleTrigger>): react_jsx_runtime57.JSX.Element;
15
+ //#endregion
16
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger };
17
+ //# sourceMappingURL=collapsible.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collapsible.d.ts","names":[],"sources":["../../../src/components/collapsible/collapsible.tsx"],"sourcesContent":[],"mappings":";;;;;iBAoBS,WAAA,CAYA;EAAA,GAAA;AAAA,CAAA,EAZ0B,KAAA,CAAM,cAYhC,CAAA,OAZsD,aAAA,CAAqB,IAY3E,CAAA,CAAA,EAZgF,mBAAA,CAAA,GAAA,CAAA,OAYhF;iBARA,kBAAA,CAQ8D;EAAA,GAAA;AAAA,CAAA,EANpE,KAAA,CAAM,cAM8D,CAAA,OANxC,aAAA,CAAqB,kBAMmB,CAAA,CAAA,EANA,mBAAA,CAAA,GAAA,CAAA,OAMA;iBAF9D,kBAAA,CAE8D;EAAA,GAAA;AAAA,CAAA,EAApE,KAAA,CAAM,cAA8D,CAAA,OAAxC,aAAA,CAAqB,kBAAmB,CAAA,CAAA,EAAA,mBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ import { Collapsible as Collapsible$1 } from "radix-ui";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/components/collapsible/collapsible.tsx
5
+ /**
6
+ * Copyright 2026 ResQ
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
20
+ function Collapsible({ ...props }) {
21
+ return /* @__PURE__ */ jsx(Collapsible$1.Root, {
22
+ "data-slot": "collapsible",
23
+ ...props
24
+ });
25
+ }
26
+ function CollapsibleContent({ ...props }) {
27
+ return /* @__PURE__ */ jsx(Collapsible$1.CollapsibleContent, {
28
+ "data-slot": "collapsible-content",
29
+ ...props
30
+ });
31
+ }
32
+ function CollapsibleTrigger({ ...props }) {
33
+ return /* @__PURE__ */ jsx(Collapsible$1.CollapsibleTrigger, {
34
+ "data-slot": "collapsible-trigger",
35
+ ...props
36
+ });
37
+ }
38
+ //#endregion
39
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger };
40
+
41
+ //# sourceMappingURL=collapsible.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collapsible.js","names":["CollapsiblePrimitive"],"sources":["../../../src/components/collapsible/collapsible.tsx"],"sourcesContent":["/**\n * Copyright 2026 ResQ\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\"use client\";\n\nimport { Collapsible as CollapsiblePrimitive } from \"radix-ui\";\n\nfunction Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n\treturn <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nfunction CollapsibleContent({\n\t...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n\treturn <CollapsiblePrimitive.CollapsibleContent data-slot=\"collapsible-content\" {...props} />;\n}\n\nfunction CollapsibleTrigger({\n\t...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n\treturn <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger };\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBA,SAAS,YAAY,EAAE,GAAG,SAAiE;AAC1F,QAAO,oBAACA,cAAqB,MAAtB;EAA2B,aAAU;EAAc,GAAI;EAAS,CAAA;;AAGxE,SAAS,mBAAmB,EAC3B,GAAG,SACqE;AACxE,QAAO,oBAACA,cAAqB,oBAAtB;EAAyC,aAAU;EAAsB,GAAI;EAAS,CAAA;;AAG9F,SAAS,mBAAmB,EAC3B,GAAG,SACqE;AACxE,QAAO,oBAACA,cAAqB,oBAAtB;EAAyC,aAAU;EAAsB,GAAI;EAAS,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./collapsible.js";
2
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger };
@@ -0,0 +1,2 @@
1
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./collapsible.js";
2
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger };
@@ -0,0 +1,83 @@
1
+ import * as react_jsx_runtime60 from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Combobox as Combobox$1 } from "@base-ui/react";
4
+
5
+ //#region src/components/combobox/combobox.d.ts
6
+
7
+ declare const Combobox: typeof Combobox$1.Root;
8
+ declare function ComboboxChip({
9
+ children,
10
+ className,
11
+ showRemove,
12
+ ...props
13
+ }: Combobox$1.Chip.Props & {
14
+ showRemove?: boolean;
15
+ }): react_jsx_runtime60.JSX.Element;
16
+ declare function ComboboxChips({
17
+ className,
18
+ ...props
19
+ }: Combobox$1.Chips.Props & React.ComponentPropsWithRef<typeof Combobox$1.Chips>): react_jsx_runtime60.JSX.Element;
20
+ declare function ComboboxChipsInput({
21
+ className,
22
+ ...props
23
+ }: Combobox$1.Input.Props): react_jsx_runtime60.JSX.Element;
24
+ declare function ComboboxCollection({
25
+ ...props
26
+ }: Combobox$1.Collection.Props): react_jsx_runtime60.JSX.Element;
27
+ declare function ComboboxContent({
28
+ align,
29
+ alignOffset,
30
+ anchor,
31
+ className,
32
+ side,
33
+ sideOffset,
34
+ ...props
35
+ }: Combobox$1.Popup.Props & Pick<Combobox$1.Positioner.Props, "align" | "alignOffset" | "anchor" | "side" | "sideOffset">): react_jsx_runtime60.JSX.Element;
36
+ declare function ComboboxEmpty({
37
+ className,
38
+ ...props
39
+ }: Combobox$1.Empty.Props): react_jsx_runtime60.JSX.Element;
40
+ declare function ComboboxGroup({
41
+ className,
42
+ ...props
43
+ }: Combobox$1.Group.Props): react_jsx_runtime60.JSX.Element;
44
+ declare function ComboboxInput({
45
+ children,
46
+ className,
47
+ disabled,
48
+ showClear,
49
+ showTrigger,
50
+ ...props
51
+ }: Combobox$1.Input.Props & {
52
+ showClear?: boolean;
53
+ showTrigger?: boolean;
54
+ }): react_jsx_runtime60.JSX.Element;
55
+ declare function ComboboxItem({
56
+ children,
57
+ className,
58
+ ...props
59
+ }: Combobox$1.Item.Props): react_jsx_runtime60.JSX.Element;
60
+ declare function ComboboxLabel({
61
+ className,
62
+ ...props
63
+ }: Combobox$1.GroupLabel.Props): react_jsx_runtime60.JSX.Element;
64
+ declare function ComboboxList({
65
+ className,
66
+ ...props
67
+ }: Combobox$1.List.Props): react_jsx_runtime60.JSX.Element;
68
+ declare function ComboboxSeparator({
69
+ className,
70
+ ...props
71
+ }: Combobox$1.Separator.Props): react_jsx_runtime60.JSX.Element;
72
+ declare function ComboboxTrigger({
73
+ children,
74
+ className,
75
+ ...props
76
+ }: Combobox$1.Trigger.Props): react_jsx_runtime60.JSX.Element;
77
+ declare function ComboboxValue({
78
+ ...props
79
+ }: Combobox$1.Value.Props): react_jsx_runtime60.JSX.Element;
80
+ declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
81
+ //#endregion
82
+ export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
83
+ //# sourceMappingURL=combobox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combobox.d.ts","names":[],"sources":["../../../src/components/combobox/combobox.tsx"],"sourcesContent":[],"mappings":";;;;;;cA+BM,QAoCmC,EAAA,OApC3B,UAAA,CAAA,IAoC2B;iBAlChC,YAAA,CAkCqF;EAAA,QAAA;EAAA,SAAA;EAAA,UAAA;EAAA,GAAA;AAAA,CAAA,EA7B3F,UAAA,CAAkB,IAAA,CAAK,KA6BoE,GAAA;EAAA,UAAA,CAAA,EAAA,OAAA;AAAA,CAAA,CAAA,EA3B7F,mBAAA,CAAA,GAAA,CAAA,OAwC0B;iBAhBlB,aAAA,CAgBqB;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAb3B,UAAA,CAAkB,KAAA,CAAM,KAaG,GAbK,KAAA,CAAM,qBAaX,CAAA,OAbwC,UAAA,CAAkB,KAa1D,CAAA,CAAA,EAbgE,mBAAA,CAAA,GAAA,CAAA,OAahE;iBAArB,kBAAA,CAAoE;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAAxB,UAAA,CAAkB,KAAA,CAAM,KAAA,CAAA,EAAK,mBAAA,CAAA,GAAA,CAAA,OAAL;iBAuBpE,kBAAA,CAvByE;EAAA,GAAA;AAAA,CAAA,EAuBxC,UAAA,CAAkB,UAAA,CAAW,KAvBW,CAAA,EAuBN,mBAAA,CAAA,GAA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AAA,CAhHkB;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAgHoB,UAAA,CAAkB,IAAA,CAAK,KAhH3C,CAAA,EAgHgD,mBAAA,CAAA,GAAA,CAAA,OAhHhD;iBA6HlB,iBAAA,CA3HsB;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA2HqB,UAAA,CAAkB,SAAA,CAAU,KA3HjD,CAAA,EA2HsD,mBAAA,CAAA,GAAA,CAAA,OA3HtD;iBAqItB,eAAA,CAtIR;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAsI2D,UAAA,CAAkB,OAAA,CAAQ,KAtIrF,CAAA,EAsI0F,mBAAA,CAAA,GAAA,CAAA,OAtI1F;iBAmJQ,aAAA,CAhJP;EAAA,GAAA;AAAA,CAAA,EAgJmC,UAAA,CAAkB,KAAA,CAAM,KAhJ3D,CAAA,EAgJgE,mBAAA,CAAA,GAAA,CAAA,OAhJhE;iBAoJO,iBAAA,CAAA,CApJP,EAoJwB,KAAA,CAAA,SApJxB,CAoJwB,cApJxB,GAAA,IAAA,CAAA"}
@@ -0,0 +1,180 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { Button } from "../button/button.js";
4
+ import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../input-group/input-group.js";
5
+ import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import * as React from "react";
8
+ import { Combobox as Combobox$1 } from "@base-ui/react";
9
+ //#region src/components/combobox/combobox.tsx
10
+ /**
11
+ * Copyright 2026 ResQ
12
+ *
13
+ * Licensed under the Apache License, Version 2.0 (the "License");
14
+ * you may not use this file except in compliance with the License.
15
+ * You may obtain a copy of the License at
16
+ *
17
+ * http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * Unless required by applicable law or agreed to in writing, software
20
+ * distributed under the License is distributed on an "AS IS" BASIS,
21
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
+ * See the License for the specific language governing permissions and
23
+ * limitations under the License.
24
+ */
25
+ const Combobox = Combobox$1.Root;
26
+ function ComboboxChip({ children, className, showRemove = true, ...props }) {
27
+ return /* @__PURE__ */ jsxs(Combobox$1.Chip, {
28
+ className: cn("bg-muted text-foreground flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm px-1.5 text-xs font-medium whitespace-nowrap has-data-[slot=combobox-chip-remove]:pr-0 has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50", className),
29
+ "data-slot": "combobox-chip",
30
+ ...props,
31
+ children: [children, showRemove && /* @__PURE__ */ jsx(Combobox$1.ChipRemove, {
32
+ className: "-ml-1 opacity-50 hover:opacity-100",
33
+ "data-slot": "combobox-chip-remove",
34
+ render: /* @__PURE__ */ jsx(Button, {
35
+ size: "icon-xs",
36
+ variant: "ghost"
37
+ }),
38
+ children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none" })
39
+ })]
40
+ });
41
+ }
42
+ function ComboboxChips({ className, ...props }) {
43
+ return /* @__PURE__ */ jsx(Combobox$1.Chips, {
44
+ className: cn("dark:bg-input/30 border-input focus-within:border-ring focus-within:ring-ring/50 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive dark:has-aria-invalid:border-destructive/50 flex min-h-8 flex-wrap items-center gap-1 rounded-lg border bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:ring-[3px] has-aria-invalid:ring-[3px] has-data-[slot=combobox-chip]:px-1", className),
45
+ "data-slot": "combobox-chips",
46
+ ...props
47
+ });
48
+ }
49
+ function ComboboxChipsInput({ className, ...props }) {
50
+ return /* @__PURE__ */ jsx(Combobox$1.Input, {
51
+ className: cn("min-w-16 flex-1 outline-none", className),
52
+ "data-slot": "combobox-chip-input",
53
+ ...props
54
+ });
55
+ }
56
+ function ComboboxClear({ className, ...props }) {
57
+ return /* @__PURE__ */ jsx(Combobox$1.Clear, {
58
+ className,
59
+ "data-slot": "combobox-clear",
60
+ render: /* @__PURE__ */ jsx(InputGroupButton, {
61
+ size: "icon-xs",
62
+ variant: "ghost"
63
+ }),
64
+ ...props,
65
+ children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none" })
66
+ });
67
+ }
68
+ function ComboboxCollection({ ...props }) {
69
+ return /* @__PURE__ */ jsx(Combobox$1.Collection, {
70
+ "data-slot": "combobox-collection",
71
+ ...props
72
+ });
73
+ }
74
+ function ComboboxContent({ align = "start", alignOffset = 0, anchor, className, side = "bottom", sideOffset = 6, ...props }) {
75
+ return /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
76
+ align,
77
+ alignOffset,
78
+ anchor,
79
+ className: "isolate z-50",
80
+ side,
81
+ sideOffset,
82
+ children: /* @__PURE__ */ jsx(Combobox$1.Popup, {
83
+ className: cn("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:border-input/30 max-h-72 overflow-hidden rounded-lg shadow-md ring-1 duration-100 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) data-[chips=true]:min-w-(--anchor-width)", className),
84
+ "data-chips": !!anchor,
85
+ "data-slot": "combobox-content",
86
+ ...props
87
+ })
88
+ }) });
89
+ }
90
+ function ComboboxEmpty({ className, ...props }) {
91
+ return /* @__PURE__ */ jsx(Combobox$1.Empty, {
92
+ className: cn("text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex", className),
93
+ "data-slot": "combobox-empty",
94
+ ...props
95
+ });
96
+ }
97
+ function ComboboxGroup({ className, ...props }) {
98
+ return /* @__PURE__ */ jsx(Combobox$1.Group, {
99
+ className,
100
+ "data-slot": "combobox-group",
101
+ ...props
102
+ });
103
+ }
104
+ function ComboboxInput({ children, className, disabled = false, showClear = false, showTrigger = true, ...props }) {
105
+ return /* @__PURE__ */ jsxs(InputGroup, {
106
+ className: cn("w-auto", className),
107
+ children: [
108
+ /* @__PURE__ */ jsx(Combobox$1.Input, {
109
+ render: /* @__PURE__ */ jsx(InputGroupInput, { disabled }),
110
+ ...props
111
+ }),
112
+ /* @__PURE__ */ jsxs(InputGroupAddon, {
113
+ align: "inline-end",
114
+ children: [showTrigger && /* @__PURE__ */ jsx(InputGroupButton, {
115
+ asChild: true,
116
+ className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
117
+ "data-slot": "input-group-button",
118
+ disabled,
119
+ size: "icon-xs",
120
+ variant: "ghost",
121
+ children: /* @__PURE__ */ jsx(ComboboxTrigger, {})
122
+ }), showClear && /* @__PURE__ */ jsx(ComboboxClear, { disabled })]
123
+ }),
124
+ children
125
+ ]
126
+ });
127
+ }
128
+ function ComboboxItem({ children, className, ...props }) {
129
+ return /* @__PURE__ */ jsxs(Combobox$1.Item, {
130
+ className: cn("data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
131
+ "data-slot": "combobox-item",
132
+ ...props,
133
+ children: [children, /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, {
134
+ render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
135
+ children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" })
136
+ })]
137
+ });
138
+ }
139
+ function ComboboxLabel({ className, ...props }) {
140
+ return /* @__PURE__ */ jsx(Combobox$1.GroupLabel, {
141
+ className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
142
+ "data-slot": "combobox-label",
143
+ ...props
144
+ });
145
+ }
146
+ function ComboboxList({ className, ...props }) {
147
+ return /* @__PURE__ */ jsx(Combobox$1.List, {
148
+ className: cn("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0 overscroll-contain", className),
149
+ "data-slot": "combobox-list",
150
+ ...props
151
+ });
152
+ }
153
+ function ComboboxSeparator({ className, ...props }) {
154
+ return /* @__PURE__ */ jsx(Combobox$1.Separator, {
155
+ className: cn("bg-border -mx-1 my-1 h-px", className),
156
+ "data-slot": "combobox-separator",
157
+ ...props
158
+ });
159
+ }
160
+ function ComboboxTrigger({ children, className, ...props }) {
161
+ return /* @__PURE__ */ jsxs(Combobox$1.Trigger, {
162
+ className: cn("[&_svg:not([class*='size-'])]:size-4", className),
163
+ "data-slot": "combobox-trigger",
164
+ ...props,
165
+ children: [children, /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground size-4 pointer-events-none" })]
166
+ });
167
+ }
168
+ function ComboboxValue({ ...props }) {
169
+ return /* @__PURE__ */ jsx(Combobox$1.Value, {
170
+ "data-slot": "combobox-value",
171
+ ...props
172
+ });
173
+ }
174
+ function useComboboxAnchor() {
175
+ return React.useRef(null);
176
+ }
177
+ //#endregion
178
+ export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
179
+
180
+ //# sourceMappingURL=combobox.js.map