@epilot/spark-ui 1.0.0-alpha.2 → 1.0.0-alpha.3

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 (549) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +2 -0
  3. package/README.md +7 -1
  4. package/dist/chunk-aJGBMT86.cjs +29 -0
  5. package/dist/components/accordion.cjs +57 -0
  6. package/dist/components/accordion.cjs.map +1 -0
  7. package/dist/components/accordion.d.cts +45 -0
  8. package/dist/components/accordion.d.ts +45 -0
  9. package/dist/components/accordion.js +51 -0
  10. package/dist/components/accordion.js.map +1 -0
  11. package/dist/components/alert-dialog.cjs +137 -0
  12. package/dist/components/alert-dialog.cjs.map +1 -0
  13. package/dist/components/alert-dialog.d.cts +63 -0
  14. package/dist/components/alert-dialog.d.ts +63 -0
  15. package/dist/components/alert-dialog.js +123 -0
  16. package/dist/components/alert-dialog.js.map +1 -0
  17. package/dist/components/attachment.cjs +119 -0
  18. package/dist/components/attachment.cjs.map +1 -0
  19. package/dist/components/attachment.d.cts +67 -0
  20. package/dist/components/attachment.d.ts +67 -0
  21. package/dist/components/attachment.js +108 -0
  22. package/dist/components/attachment.js.map +1 -0
  23. package/dist/components/badge.cjs +20 -0
  24. package/dist/components/badge.cjs.map +1 -0
  25. package/dist/components/badge.d.cts +12 -0
  26. package/dist/components/badge.d.ts +12 -0
  27. package/dist/components/badge.js +17 -0
  28. package/dist/components/badge.js.map +1 -0
  29. package/dist/components/bar-chart.cjs +519 -0
  30. package/dist/components/bar-chart.cjs.map +1 -0
  31. package/dist/components/bar-chart.d.cts +83 -0
  32. package/dist/components/bar-chart.d.ts +83 -0
  33. package/dist/components/bar-chart.js +517 -0
  34. package/dist/components/bar-chart.js.map +1 -0
  35. package/dist/components/battery-progress-row.cjs +140 -0
  36. package/dist/components/battery-progress-row.cjs.map +1 -0
  37. package/dist/components/battery-progress-row.d.cts +78 -0
  38. package/dist/components/battery-progress-row.d.ts +78 -0
  39. package/dist/components/battery-progress-row.js +129 -0
  40. package/dist/components/battery-progress-row.js.map +1 -0
  41. package/dist/components/breadcrumbs.cjs +65 -0
  42. package/dist/components/breadcrumbs.cjs.map +1 -0
  43. package/dist/components/breadcrumbs.d.cts +44 -0
  44. package/dist/components/breadcrumbs.d.ts +44 -0
  45. package/dist/components/breadcrumbs.js +58 -0
  46. package/dist/components/breadcrumbs.js.map +1 -0
  47. package/dist/components/bubble.cjs +84 -0
  48. package/dist/components/bubble.cjs.map +1 -0
  49. package/dist/components/bubble.d.cts +41 -0
  50. package/dist/components/bubble.d.ts +41 -0
  51. package/dist/components/bubble.js +78 -0
  52. package/dist/components/bubble.js.map +1 -0
  53. package/dist/components/button.cjs +54 -0
  54. package/dist/components/button.cjs.map +1 -0
  55. package/dist/components/button.d.cts +34 -0
  56. package/dist/components/button.d.ts +34 -0
  57. package/dist/components/button.js +50 -0
  58. package/dist/components/button.js.map +1 -0
  59. package/dist/components/calendar.cjs +58 -0
  60. package/dist/components/calendar.cjs.map +1 -0
  61. package/dist/components/calendar.d.cts +17 -0
  62. package/dist/components/calendar.d.ts +17 -0
  63. package/dist/components/calendar.js +55 -0
  64. package/dist/components/calendar.js.map +1 -0
  65. package/dist/components/callout.cjs +95 -0
  66. package/dist/components/callout.cjs.map +1 -0
  67. package/dist/components/callout.d.cts +39 -0
  68. package/dist/components/callout.d.ts +39 -0
  69. package/dist/components/callout.js +88 -0
  70. package/dist/components/callout.js.map +1 -0
  71. package/dist/components/card.cjs +86 -0
  72. package/dist/components/card.cjs.map +1 -0
  73. package/dist/components/card.d.cts +28 -0
  74. package/dist/components/card.d.ts +28 -0
  75. package/dist/components/card.js +76 -0
  76. package/dist/components/card.js.map +1 -0
  77. package/dist/components/chart.cjs +93 -0
  78. package/dist/components/chart.cjs.map +1 -0
  79. package/dist/components/chart.d.cts +83 -0
  80. package/dist/components/chart.d.ts +83 -0
  81. package/dist/components/chart.js +88 -0
  82. package/dist/components/chart.js.map +1 -0
  83. package/dist/components/checkbox.cjs +37 -0
  84. package/dist/components/checkbox.cjs.map +1 -0
  85. package/dist/components/checkbox.d.cts +22 -0
  86. package/dist/components/checkbox.d.ts +22 -0
  87. package/dist/components/checkbox.js +34 -0
  88. package/dist/components/checkbox.js.map +1 -0
  89. package/dist/components/circular-gauge.cjs +74 -0
  90. package/dist/components/circular-gauge.cjs.map +1 -0
  91. package/dist/components/circular-gauge.d.cts +38 -0
  92. package/dist/components/circular-gauge.d.ts +38 -0
  93. package/dist/components/circular-gauge.js +71 -0
  94. package/dist/components/circular-gauge.js.map +1 -0
  95. package/dist/components/day-of-week-picker.cjs +123 -0
  96. package/dist/components/day-of-week-picker.cjs.map +1 -0
  97. package/dist/components/day-of-week-picker.d.cts +39 -0
  98. package/dist/components/day-of-week-picker.d.ts +39 -0
  99. package/dist/components/day-of-week-picker.js +119 -0
  100. package/dist/components/day-of-week-picker.js.map +1 -0
  101. package/dist/components/device-card.cjs +118 -0
  102. package/dist/components/device-card.cjs.map +1 -0
  103. package/dist/components/device-card.d.cts +71 -0
  104. package/dist/components/device-card.d.ts +71 -0
  105. package/dist/components/device-card.js +104 -0
  106. package/dist/components/device-card.js.map +1 -0
  107. package/dist/components/dialog.cjs +115 -0
  108. package/dist/components/dialog.cjs.map +1 -0
  109. package/dist/components/dialog.d.cts +45 -0
  110. package/dist/components/dialog.d.ts +45 -0
  111. package/dist/components/dialog.js +103 -0
  112. package/dist/components/dialog.js.map +1 -0
  113. package/dist/components/donut-chart.cjs +71 -0
  114. package/dist/components/donut-chart.cjs.map +1 -0
  115. package/dist/components/donut-chart.d.cts +22 -0
  116. package/dist/components/donut-chart.d.ts +22 -0
  117. package/dist/components/donut-chart.js +69 -0
  118. package/dist/components/donut-chart.js.map +1 -0
  119. package/dist/components/drawer.cjs +95 -0
  120. package/dist/components/drawer.cjs.map +1 -0
  121. package/dist/components/drawer.d.cts +46 -0
  122. package/dist/components/drawer.d.ts +46 -0
  123. package/dist/components/drawer.js +83 -0
  124. package/dist/components/drawer.js.map +1 -0
  125. package/dist/components/dropdown-menu.cjs +165 -0
  126. package/dist/components/dropdown-menu.cjs.map +1 -0
  127. package/dist/components/dropdown-menu.d.cts +93 -0
  128. package/dist/components/dropdown-menu.d.ts +93 -0
  129. package/dist/components/dropdown-menu.js +148 -0
  130. package/dist/components/dropdown-menu.js.map +1 -0
  131. package/dist/components/empty-state.cjs +35 -0
  132. package/dist/components/empty-state.cjs.map +1 -0
  133. package/dist/components/empty-state.d.cts +22 -0
  134. package/dist/components/empty-state.d.ts +22 -0
  135. package/dist/components/empty-state.js +33 -0
  136. package/dist/components/empty-state.js.map +1 -0
  137. package/dist/components/energy-bar-chart.cjs +23 -0
  138. package/dist/components/energy-bar-chart.cjs.map +1 -0
  139. package/dist/components/energy-bar-chart.d.cts +43 -0
  140. package/dist/components/energy-bar-chart.d.ts +43 -0
  141. package/dist/components/energy-bar-chart.js +21 -0
  142. package/dist/components/energy-bar-chart.js.map +1 -0
  143. package/dist/components/energy-breakdown.cjs +81 -0
  144. package/dist/components/energy-breakdown.cjs.map +1 -0
  145. package/dist/components/energy-breakdown.d.cts +26 -0
  146. package/dist/components/energy-breakdown.d.ts +26 -0
  147. package/dist/components/energy-breakdown.js +79 -0
  148. package/dist/components/energy-breakdown.js.map +1 -0
  149. package/dist/components/energy-history-chart.cjs +56 -0
  150. package/dist/components/energy-history-chart.cjs.map +1 -0
  151. package/dist/components/energy-history-chart.d.cts +58 -0
  152. package/dist/components/energy-history-chart.d.ts +58 -0
  153. package/dist/components/energy-history-chart.js +54 -0
  154. package/dist/components/energy-history-chart.js.map +1 -0
  155. package/dist/components/feed-in-hero.cjs +56 -0
  156. package/dist/components/feed-in-hero.cjs.map +1 -0
  157. package/dist/components/feed-in-hero.d.cts +33 -0
  158. package/dist/components/feed-in-hero.d.ts +33 -0
  159. package/dist/components/feed-in-hero.js +51 -0
  160. package/dist/components/feed-in-hero.js.map +1 -0
  161. package/dist/components/field.cjs +257 -0
  162. package/dist/components/field.cjs.map +1 -0
  163. package/dist/components/field.d.cts +104 -0
  164. package/dist/components/field.d.ts +104 -0
  165. package/dist/components/field.js +243 -0
  166. package/dist/components/field.js.map +1 -0
  167. package/dist/components/icon.cjs +35 -0
  168. package/dist/components/icon.cjs.map +1 -0
  169. package/dist/components/icon.d.cts +27 -0
  170. package/dist/components/icon.d.ts +27 -0
  171. package/dist/components/icon.js +32 -0
  172. package/dist/components/icon.js.map +1 -0
  173. package/dist/components/info-block.cjs +75 -0
  174. package/dist/components/info-block.cjs.map +1 -0
  175. package/dist/components/info-block.d.cts +20 -0
  176. package/dist/components/info-block.d.ts +20 -0
  177. package/dist/components/info-block.js +65 -0
  178. package/dist/components/info-block.js.map +1 -0
  179. package/dist/components/input-group.cjs +164 -0
  180. package/dist/components/input-group.cjs.map +1 -0
  181. package/dist/components/input-group.d.cts +32 -0
  182. package/dist/components/input-group.d.ts +32 -0
  183. package/dist/components/input-group.js +158 -0
  184. package/dist/components/input-group.js.map +1 -0
  185. package/dist/components/input-otp.cjs +113 -0
  186. package/dist/components/input-otp.cjs.map +1 -0
  187. package/dist/components/input-otp.d.cts +22 -0
  188. package/dist/components/input-otp.d.ts +22 -0
  189. package/dist/components/input-otp.js +111 -0
  190. package/dist/components/input-otp.js.map +1 -0
  191. package/dist/components/input.cjs +112 -0
  192. package/dist/components/input.cjs.map +1 -0
  193. package/dist/components/input.d.cts +21 -0
  194. package/dist/components/input.d.ts +21 -0
  195. package/dist/components/input.js +109 -0
  196. package/dist/components/input.js.map +1 -0
  197. package/dist/components/label.cjs +18 -0
  198. package/dist/components/label.cjs.map +1 -0
  199. package/dist/components/label.d.cts +10 -0
  200. package/dist/components/label.d.ts +10 -0
  201. package/dist/components/label.js +15 -0
  202. package/dist/components/label.js.map +1 -0
  203. package/dist/components/layout.cjs +15 -0
  204. package/dist/components/layout.cjs.map +1 -0
  205. package/dist/components/layout.d.cts +12 -0
  206. package/dist/components/layout.d.ts +13 -0
  207. package/dist/components/layout.js +14 -0
  208. package/dist/components/layout.js.map +1 -0
  209. package/dist/components/line-chart.cjs +310 -0
  210. package/dist/components/line-chart.cjs.map +1 -0
  211. package/dist/components/line-chart.d.cts +71 -0
  212. package/dist/components/line-chart.d.ts +71 -0
  213. package/dist/components/line-chart.js +307 -0
  214. package/dist/components/line-chart.js.map +1 -0
  215. package/dist/components/list.cjs +132 -0
  216. package/dist/components/list.cjs.map +1 -0
  217. package/dist/components/list.d.cts +72 -0
  218. package/dist/components/list.d.ts +72 -0
  219. package/dist/components/list.js +122 -0
  220. package/dist/components/list.js.map +1 -0
  221. package/dist/components/marker.cjs +52 -0
  222. package/dist/components/marker.cjs.map +1 -0
  223. package/dist/components/marker.d.cts +29 -0
  224. package/dist/components/marker.d.ts +29 -0
  225. package/dist/components/marker.js +46 -0
  226. package/dist/components/marker.js.map +1 -0
  227. package/dist/components/message-scroller.cjs +73 -0
  228. package/dist/components/message-scroller.cjs.map +1 -0
  229. package/dist/components/message-scroller.d.cts +39 -0
  230. package/dist/components/message-scroller.d.ts +39 -0
  231. package/dist/components/message-scroller.js +62 -0
  232. package/dist/components/message-scroller.js.map +1 -0
  233. package/dist/components/message.cjs +60 -0
  234. package/dist/components/message.cjs.map +1 -0
  235. package/dist/components/message.d.cts +36 -0
  236. package/dist/components/message.d.ts +36 -0
  237. package/dist/components/message.js +52 -0
  238. package/dist/components/message.js.map +1 -0
  239. package/dist/components/metering-row.cjs +43 -0
  240. package/dist/components/metering-row.cjs.map +1 -0
  241. package/dist/components/metering-row.d.cts +32 -0
  242. package/dist/components/metering-row.d.ts +32 -0
  243. package/dist/components/metering-row.js +38 -0
  244. package/dist/components/metering-row.js.map +1 -0
  245. package/dist/components/money-saved-block.cjs +87 -0
  246. package/dist/components/money-saved-block.cjs.map +1 -0
  247. package/dist/components/money-saved-block.d.cts +57 -0
  248. package/dist/components/money-saved-block.d.ts +57 -0
  249. package/dist/components/money-saved-block.js +79 -0
  250. package/dist/components/money-saved-block.js.map +1 -0
  251. package/dist/components/number-flow.cjs +44 -0
  252. package/dist/components/number-flow.cjs.map +1 -0
  253. package/dist/components/number-flow.d.cts +4 -0
  254. package/dist/components/number-flow.d.ts +4 -0
  255. package/dist/components/number-flow.js +42 -0
  256. package/dist/components/number-flow.js.map +1 -0
  257. package/dist/components/on-off-button.cjs +36 -0
  258. package/dist/components/on-off-button.cjs.map +1 -0
  259. package/dist/components/on-off-button.d.cts +20 -0
  260. package/dist/components/on-off-button.d.ts +20 -0
  261. package/dist/components/on-off-button.js +34 -0
  262. package/dist/components/on-off-button.js.map +1 -0
  263. package/dist/components/onboarding-layout.cjs +68 -0
  264. package/dist/components/onboarding-layout.cjs.map +1 -0
  265. package/dist/components/onboarding-layout.d.cts +46 -0
  266. package/dist/components/onboarding-layout.d.ts +46 -0
  267. package/dist/components/onboarding-layout.js +60 -0
  268. package/dist/components/onboarding-layout.js.map +1 -0
  269. package/dist/components/page-header.cjs +50 -0
  270. package/dist/components/page-header.cjs.map +1 -0
  271. package/dist/components/page-header.d.cts +26 -0
  272. package/dist/components/page-header.d.ts +26 -0
  273. package/dist/components/page-header.js +44 -0
  274. package/dist/components/page-header.js.map +1 -0
  275. package/dist/components/page-spinner.cjs +19 -0
  276. package/dist/components/page-spinner.cjs.map +1 -0
  277. package/dist/components/page-spinner.d.cts +14 -0
  278. package/dist/components/page-spinner.d.ts +14 -0
  279. package/dist/components/page-spinner.js +17 -0
  280. package/dist/components/page-spinner.js.map +1 -0
  281. package/dist/components/period-tabs.cjs +79 -0
  282. package/dist/components/period-tabs.cjs.map +1 -0
  283. package/dist/components/period-tabs.d.cts +51 -0
  284. package/dist/components/period-tabs.d.ts +51 -0
  285. package/dist/components/period-tabs.js +73 -0
  286. package/dist/components/period-tabs.js.map +1 -0
  287. package/dist/components/popover.cjs +62 -0
  288. package/dist/components/popover.cjs.map +1 -0
  289. package/dist/components/popover.d.cts +29 -0
  290. package/dist/components/popover.d.ts +29 -0
  291. package/dist/components/popover.js +56 -0
  292. package/dist/components/popover.js.map +1 -0
  293. package/dist/components/power-history-chart.cjs +358 -0
  294. package/dist/components/power-history-chart.cjs.map +1 -0
  295. package/dist/components/power-history-chart.d.cts +54 -0
  296. package/dist/components/power-history-chart.d.ts +54 -0
  297. package/dist/components/power-history-chart.js +355 -0
  298. package/dist/components/power-history-chart.js.map +1 -0
  299. package/dist/components/power-history.cjs +115 -0
  300. package/dist/components/power-history.cjs.map +1 -0
  301. package/dist/components/power-history.d.cts +42 -0
  302. package/dist/components/power-history.d.ts +43 -0
  303. package/dist/components/power-history.js +114 -0
  304. package/dist/components/power-history.js.map +1 -0
  305. package/dist/components/power-network.cjs +530 -0
  306. package/dist/components/power-network.cjs.map +1 -0
  307. package/dist/components/power-network.d.cts +77 -0
  308. package/dist/components/power-network.d.ts +77 -0
  309. package/dist/components/power-network.js +523 -0
  310. package/dist/components/power-network.js.map +1 -0
  311. package/dist/components/progress.cjs +34 -0
  312. package/dist/components/progress.cjs.map +1 -0
  313. package/dist/components/progress.d.cts +17 -0
  314. package/dist/components/progress.d.ts +17 -0
  315. package/dist/components/progress.js +31 -0
  316. package/dist/components/progress.js.map +1 -0
  317. package/dist/components/radio-card-group.cjs +69 -0
  318. package/dist/components/radio-card-group.cjs.map +1 -0
  319. package/dist/components/radio-card-group.d.cts +21 -0
  320. package/dist/components/radio-card-group.d.ts +21 -0
  321. package/dist/components/radio-card-group.js +65 -0
  322. package/dist/components/radio-card-group.js.map +1 -0
  323. package/dist/components/radio.cjs +34 -0
  324. package/dist/components/radio.cjs.map +1 -0
  325. package/dist/components/radio.d.cts +21 -0
  326. package/dist/components/radio.d.ts +21 -0
  327. package/dist/components/radio.js +30 -0
  328. package/dist/components/radio.js.map +1 -0
  329. package/dist/components/reparent.cjs +55 -0
  330. package/dist/components/reparent.cjs.map +1 -0
  331. package/dist/components/reparent.d.cts +29 -0
  332. package/dist/components/reparent.d.ts +29 -0
  333. package/dist/components/reparent.js +49 -0
  334. package/dist/components/reparent.js.map +1 -0
  335. package/dist/components/sankey-chart.cjs +221 -0
  336. package/dist/components/sankey-chart.cjs.map +1 -0
  337. package/dist/components/sankey-chart.d.cts +58 -0
  338. package/dist/components/sankey-chart.d.ts +58 -0
  339. package/dist/components/sankey-chart.js +218 -0
  340. package/dist/components/sankey-chart.js.map +1 -0
  341. package/dist/components/schedule-editor.cjs +82 -0
  342. package/dist/components/schedule-editor.cjs.map +1 -0
  343. package/dist/components/schedule-editor.d.cts +25 -0
  344. package/dist/components/schedule-editor.d.ts +25 -0
  345. package/dist/components/schedule-editor.js +72 -0
  346. package/dist/components/schedule-editor.js.map +1 -0
  347. package/dist/components/schedule-list.cjs +110 -0
  348. package/dist/components/schedule-list.cjs.map +1 -0
  349. package/dist/components/schedule-list.d.cts +29 -0
  350. package/dist/components/schedule-list.d.ts +29 -0
  351. package/dist/components/schedule-list.js +99 -0
  352. package/dist/components/schedule-list.js.map +1 -0
  353. package/dist/components/scroll-area.cjs +53 -0
  354. package/dist/components/scroll-area.cjs.map +1 -0
  355. package/dist/components/scroll-area.d.cts +26 -0
  356. package/dist/components/scroll-area.d.ts +26 -0
  357. package/dist/components/scroll-area.js +44 -0
  358. package/dist/components/scroll-area.js.map +1 -0
  359. package/dist/components/select.cjs +136 -0
  360. package/dist/components/select.cjs.map +1 -0
  361. package/dist/components/select.d.cts +63 -0
  362. package/dist/components/select.d.ts +63 -0
  363. package/dist/components/select.js +124 -0
  364. package/dist/components/select.js.map +1 -0
  365. package/dist/components/separator.cjs +38 -0
  366. package/dist/components/separator.cjs.map +1 -0
  367. package/dist/components/separator.d.cts +13 -0
  368. package/dist/components/separator.d.ts +13 -0
  369. package/dist/components/separator.js +35 -0
  370. package/dist/components/separator.js.map +1 -0
  371. package/dist/components/series-legend.cjs +39 -0
  372. package/dist/components/series-legend.cjs.map +1 -0
  373. package/dist/components/series-legend.d.cts +31 -0
  374. package/dist/components/series-legend.d.ts +31 -0
  375. package/dist/components/series-legend.js +37 -0
  376. package/dist/components/series-legend.js.map +1 -0
  377. package/dist/components/sheet.cjs +102 -0
  378. package/dist/components/sheet.cjs.map +1 -0
  379. package/dist/components/sheet.d.cts +46 -0
  380. package/dist/components/sheet.d.ts +46 -0
  381. package/dist/components/sheet.js +90 -0
  382. package/dist/components/sheet.js.map +1 -0
  383. package/dist/components/skeleton.cjs +24 -0
  384. package/dist/components/skeleton.cjs.map +1 -0
  385. package/dist/components/skeleton.d.cts +24 -0
  386. package/dist/components/skeleton.d.ts +24 -0
  387. package/dist/components/skeleton.js +21 -0
  388. package/dist/components/skeleton.js.map +1 -0
  389. package/dist/components/slider.cjs +276 -0
  390. package/dist/components/slider.cjs.map +1 -0
  391. package/dist/components/slider.d.cts +150 -0
  392. package/dist/components/slider.d.ts +150 -0
  393. package/dist/components/slider.js +266 -0
  394. package/dist/components/slider.js.map +1 -0
  395. package/dist/components/smart-toggle-button.cjs +28 -0
  396. package/dist/components/smart-toggle-button.cjs.map +1 -0
  397. package/dist/components/smart-toggle-button.d.cts +18 -0
  398. package/dist/components/smart-toggle-button.d.ts +18 -0
  399. package/dist/components/smart-toggle-button.js +26 -0
  400. package/dist/components/smart-toggle-button.js.map +1 -0
  401. package/dist/components/solar-forecast-chart.cjs +105 -0
  402. package/dist/components/solar-forecast-chart.cjs.map +1 -0
  403. package/dist/components/solar-forecast-chart.d.cts +66 -0
  404. package/dist/components/solar-forecast-chart.d.ts +66 -0
  405. package/dist/components/solar-forecast-chart.js +99 -0
  406. package/dist/components/solar-forecast-chart.js.map +1 -0
  407. package/dist/components/sortable-list.cjs +69 -0
  408. package/dist/components/sortable-list.cjs.map +1 -0
  409. package/dist/components/sortable-list.d.cts +46 -0
  410. package/dist/components/sortable-list.d.ts +46 -0
  411. package/dist/components/sortable-list.js +67 -0
  412. package/dist/components/sortable-list.js.map +1 -0
  413. package/dist/components/spinner.cjs +42 -0
  414. package/dist/components/spinner.cjs.map +1 -0
  415. package/dist/components/spinner.d.cts +15 -0
  416. package/dist/components/spinner.d.ts +15 -0
  417. package/dist/components/spinner.js +39 -0
  418. package/dist/components/spinner.js.map +1 -0
  419. package/dist/components/stat-card.cjs +58 -0
  420. package/dist/components/stat-card.cjs.map +1 -0
  421. package/dist/components/stat-card.d.cts +36 -0
  422. package/dist/components/stat-card.d.ts +36 -0
  423. package/dist/components/stat-card.js +50 -0
  424. package/dist/components/stat-card.js.map +1 -0
  425. package/dist/components/stepper.cjs +79 -0
  426. package/dist/components/stepper.cjs.map +1 -0
  427. package/dist/components/stepper.d.cts +33 -0
  428. package/dist/components/stepper.d.ts +33 -0
  429. package/dist/components/stepper.js +76 -0
  430. package/dist/components/stepper.js.map +1 -0
  431. package/dist/components/switch.cjs +22 -0
  432. package/dist/components/switch.cjs.map +1 -0
  433. package/dist/components/switch.d.cts +28 -0
  434. package/dist/components/switch.d.ts +28 -0
  435. package/dist/components/switch.js +20 -0
  436. package/dist/components/switch.js.map +1 -0
  437. package/dist/components/tabs.cjs +175 -0
  438. package/dist/components/tabs.cjs.map +1 -0
  439. package/dist/components/tabs.d.cts +45 -0
  440. package/dist/components/tabs.d.ts +45 -0
  441. package/dist/components/tabs.js +167 -0
  442. package/dist/components/tabs.js.map +1 -0
  443. package/dist/components/theme.cjs +6 -0
  444. package/dist/components/theme.d.cts +38 -0
  445. package/dist/components/theme.d.ts +38 -0
  446. package/dist/components/theme.js +4 -0
  447. package/dist/components/thumbnail.cjs +54 -0
  448. package/dist/components/thumbnail.cjs.map +1 -0
  449. package/dist/components/thumbnail.d.cts +34 -0
  450. package/dist/components/thumbnail.d.ts +34 -0
  451. package/dist/components/thumbnail.js +51 -0
  452. package/dist/components/thumbnail.js.map +1 -0
  453. package/dist/components/time-picker.cjs +55 -0
  454. package/dist/components/time-picker.cjs.map +1 -0
  455. package/dist/components/time-picker.d.cts +41 -0
  456. package/dist/components/time-picker.d.ts +41 -0
  457. package/dist/components/time-picker.js +51 -0
  458. package/dist/components/time-picker.js.map +1 -0
  459. package/dist/components/toast.cjs +99 -0
  460. package/dist/components/toast.cjs.map +1 -0
  461. package/dist/components/toast.d.cts +18 -0
  462. package/dist/components/toast.d.ts +18 -0
  463. package/dist/components/toast.js +95 -0
  464. package/dist/components/toast.js.map +1 -0
  465. package/dist/components/tooltip.cjs +75 -0
  466. package/dist/components/tooltip.cjs.map +1 -0
  467. package/dist/components/tooltip.d.cts +47 -0
  468. package/dist/components/tooltip.d.ts +47 -0
  469. package/dist/components/tooltip.js +67 -0
  470. package/dist/components/tooltip.js.map +1 -0
  471. package/dist/components/typography.cjs +52 -0
  472. package/dist/components/typography.cjs.map +1 -0
  473. package/dist/components/typography.d.cts +32 -0
  474. package/dist/components/typography.d.ts +32 -0
  475. package/dist/components/typography.js +45 -0
  476. package/dist/components/typography.js.map +1 -0
  477. package/dist/hooks/use-container-width.cjs +22 -0
  478. package/dist/hooks/use-container-width.cjs.map +1 -0
  479. package/dist/hooks/use-container-width.d.cts +7 -0
  480. package/dist/hooks/use-container-width.d.ts +7 -0
  481. package/dist/hooks/use-container-width.js +20 -0
  482. package/dist/hooks/use-container-width.js.map +1 -0
  483. package/dist/icons/index.cjs +7 -0
  484. package/dist/icons/index.d.cts +4 -0
  485. package/dist/icons/index.d.ts +4 -0
  486. package/dist/icons/index.js +3 -0
  487. package/dist/icons/material-symbol.cjs +105 -0
  488. package/dist/icons/material-symbol.cjs.map +1 -0
  489. package/dist/icons/material-symbol.d.cts +23 -0
  490. package/dist/icons/material-symbol.d.ts +23 -0
  491. package/dist/icons/material-symbol.js +100 -0
  492. package/dist/icons/material-symbol.js.map +1 -0
  493. package/dist/input-box-variants-BMDdwvqg.cjs +40 -0
  494. package/dist/input-box-variants-BMDdwvqg.cjs.map +1 -0
  495. package/dist/input-box-variants-Dr1K7uYE.js +28 -0
  496. package/dist/input-box-variants-Dr1K7uYE.js.map +1 -0
  497. package/dist/number-flow-DMJouddg.d.cts +15 -0
  498. package/dist/number-flow-DSbucQ_K.d.ts +15 -0
  499. package/dist/styles/index.css +223 -0
  500. package/dist/styles/internal.css +5 -0
  501. package/dist/styles/material-symbol.css +22 -0
  502. package/dist/styles/spark-default.css +883 -0
  503. package/dist/styles/theme.css +542 -0
  504. package/dist/styles/utilities.css +557 -0
  505. package/dist/theme-B3WtiByA.js +574 -0
  506. package/dist/theme-B3WtiByA.js.map +1 -0
  507. package/dist/theme-C9_OSe0S.cjs +592 -0
  508. package/dist/theme-C9_OSe0S.cjs.map +1 -0
  509. package/dist/theme-types-DoROIXpi.d.ts +30 -0
  510. package/dist/theme-types-r20EJfEC.d.cts +30 -0
  511. package/dist/tones-DjgKOX3s.d.cts +8 -0
  512. package/dist/tones-DyCkL71h.d.ts +8 -0
  513. package/dist/utils/build-sankey-nodes.cjs +59 -0
  514. package/dist/utils/build-sankey-nodes.cjs.map +1 -0
  515. package/dist/utils/build-sankey-nodes.d.cts +27 -0
  516. package/dist/utils/build-sankey-nodes.d.ts +27 -0
  517. package/dist/utils/build-sankey-nodes.js +58 -0
  518. package/dist/utils/build-sankey-nodes.js.map +1 -0
  519. package/dist/utils/chars.cjs +18 -0
  520. package/dist/utils/chars.cjs.map +1 -0
  521. package/dist/utils/chars.d.cts +10 -0
  522. package/dist/utils/chars.d.ts +10 -0
  523. package/dist/utils/chars.js +14 -0
  524. package/dist/utils/chars.js.map +1 -0
  525. package/dist/utils/cn.cjs +10 -0
  526. package/dist/utils/cn.d.cts +4 -0
  527. package/dist/utils/cn.d.ts +4 -0
  528. package/dist/utils/cn.js +3 -0
  529. package/dist/utils/date-mask.cjs +45 -0
  530. package/dist/utils/date-mask.cjs.map +1 -0
  531. package/dist/utils/date-mask.d.cts +17 -0
  532. package/dist/utils/date-mask.d.ts +17 -0
  533. package/dist/utils/date-mask.js +41 -0
  534. package/dist/utils/date-mask.js.map +1 -0
  535. package/dist/utils/format.cjs +57 -0
  536. package/dist/utils/format.cjs.map +1 -0
  537. package/dist/utils/format.d.cts +23 -0
  538. package/dist/utils/format.d.ts +23 -0
  539. package/dist/utils/format.js +47 -0
  540. package/dist/utils/format.js.map +1 -0
  541. package/package.json +78 -63
  542. package/dist/index.cjs +0 -1631
  543. package/dist/index.cjs.map +0 -1
  544. package/dist/index.css +0 -1
  545. package/dist/index.d.cts +0 -299
  546. package/dist/index.d.ts +0 -299
  547. package/dist/index.js +0 -1518
  548. package/dist/index.js.map +0 -1
  549. package/dist/styles.js +0 -1
package/dist/index.js DELETED
@@ -1,1518 +0,0 @@
1
- import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
- import * as React4 from 'react';
3
- import { useMemo, useCallback } from 'react';
4
- import { clsx } from 'clsx';
5
- import { twMerge } from 'tailwind-merge';
6
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
- import { Slot } from '@radix-ui/react-slot';
8
- import { cva } from 'class-variance-authority';
9
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
10
- import * as SheetPrimitive from '@radix-ui/react-dialog';
11
- import { Drawer as Drawer$1 } from 'vaul';
12
- import { curveLinear, curveStepBefore, curveStepAfter, curveStep, curveMonotoneX } from '@visx/curve';
13
- import { localPoint } from '@visx/event';
14
- import { Group } from '@visx/group';
15
- import { scaleTime, scaleLinear } from '@visx/scale';
16
- import { LinePath } from '@visx/shape';
17
- import { useTooltip, Tooltip } from '@visx/tooltip';
18
- import { bisector, extent } from '@visx/vendor/d3-array';
19
- import * as PopoverPrimitive from '@radix-ui/react-popover';
20
- import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
21
- import * as SelectPrimitive from '@radix-ui/react-select';
22
- import * as SliderPrimitive from '@radix-ui/react-slider';
23
- import * as SwitchPrimitives from '@radix-ui/react-switch';
24
- import * as TabsPrimitive from '@radix-ui/react-tabs';
25
-
26
- function cn(...inputs) {
27
- return twMerge(clsx(inputs));
28
- }
29
- var ChevronDown = (props) => /* @__PURE__ */ jsx(
30
- "svg",
31
- {
32
- fill: "none",
33
- height: "16",
34
- viewBox: "0 0 16 16",
35
- width: "16",
36
- xmlns: "http://www.w3.org/2000/svg",
37
- ...props,
38
- children: /* @__PURE__ */ jsx(
39
- "path",
40
- {
41
- d: "M8 7.19992L4.93333 10.2666L4 9.33325L8 5.33325L12 9.33325L11.0667 10.2666L8 7.19992Z",
42
- fill: "currentColor",
43
- fillOpacity: "0.934"
44
- }
45
- )
46
- }
47
- );
48
- var Accordion = AccordionPrimitive.Root;
49
- var AccordionItem = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
50
- AccordionPrimitive.Item,
51
- {
52
- className: cn("border-b border-gray", className),
53
- ref,
54
- ...props
55
- }
56
- ));
57
- AccordionItem.displayName = "AccordionItem";
58
- var AccordionTrigger = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
59
- AccordionPrimitive.Trigger,
60
- {
61
- className: cn(
62
- "flex flex-1 items-center justify-between rounded-md py-4 font-medium underline-offset-4 transition-all hover:underline focus-visible:ring [&[data-state=open]>svg]:rotate-180",
63
- className
64
- ),
65
- ref,
66
- ...props,
67
- children: [
68
- children,
69
- /* @__PURE__ */ jsx(
70
- ChevronDown,
71
- {
72
- className: "h-4 w-4 shrink-0 transition-transform duration-200",
73
- role: "presentation"
74
- }
75
- )
76
- ]
77
- }
78
- ) }));
79
- AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
80
- var AccordionContent = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
81
- AccordionPrimitive.Content,
82
- {
83
- className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
84
- ref,
85
- ...props,
86
- children: /* @__PURE__ */ jsx("div", { className: cn(className), children })
87
- }
88
- ));
89
- AccordionContent.displayName = AccordionPrimitive.Content.displayName;
90
- var Badge = React4.forwardRef(
91
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
92
- "span",
93
- {
94
- className: cn(
95
- "inline-flex h-5 min-w-5 items-center justify-center rounded-md bg-base-gray-soft px-1.5 text-center text-xs font-normal tabular-nums text-gray",
96
- className
97
- ),
98
- ref,
99
- ...props,
100
- children
101
- }
102
- )
103
- );
104
- Badge.displayName = "Badge";
105
- var buttonVariants = cva(
106
- `inline-flex items-center justify-center gap-2 whitespace-nowrap cursor-pointer text-base font-medium transition-colors focus-visible:outline-hidden focus-visible:ring focus-visible:ring-offset-2 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-6 [&_svg]:shrink-0`,
107
- {
108
- variants: {
109
- variant: {
110
- primary: "bg-spark-10 text-accent-contrast focus-visible:bg-spark-9 disabled:bg-spark-a3 disabled:text-spark-a7 hover:bg-spark-9",
111
- secondary: "bg-spark-a3 text-spark-a12 focus-visible:bg-spark-a4 disabled:bg-slate-a3 disabled:text-spark-a7 hover:bg-spark-a4",
112
- tertiary: "bg-transparent text-spark-a11 focus-visible:bg-slate-a3 disabled:bg-transparent disabled:text-spark-a7 hover:bg-slate-a3",
113
- bare: "rounded-none! text-gray outline-hidden!",
114
- icon: "rounded-md text-spark-a11 focus-visible:bg-slate-a3 hover:bg-slate-a3"
115
- },
116
- shape: {
117
- default: "rounded-[max(var(--spark-rounded-md),var(--spark-rounded-full))]"
118
- },
119
- size: {
120
- small: "min-w-9 px-3 max-sm:h-10 md:h-9",
121
- default: "h-11 min-w-10 px-3 max-sm:h-12",
122
- medium: "h-12 min-w-12 px-4"
123
- }
124
- },
125
- defaultVariants: {
126
- shape: "default",
127
- variant: "primary",
128
- size: "default"
129
- }
130
- }
131
- );
132
- var Button = React4.forwardRef(
133
- ({ className, variant, size, asChild = false, ...props }, ref) => {
134
- const Comp = asChild ? Slot : "button";
135
- return /* @__PURE__ */ jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
136
- }
137
- );
138
- Button.displayName = "Button";
139
- var InfoIcon = (props) => /* @__PURE__ */ jsx(
140
- "svg",
141
- {
142
- fill: "none",
143
- height: "24",
144
- viewBox: "0 0 24 24",
145
- width: "24",
146
- xmlns: "http://www.w3.org/2000/svg",
147
- ...props,
148
- children: /* @__PURE__ */ jsx(
149
- "path",
150
- {
151
- d: "M11 17H13V11H11V17ZM12 9C12.2833 9 12.5208 8.90417 12.7125 8.7125C12.9042 8.52083 13 8.28333 13 8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8C11 8.28333 11.0958 8.52083 11.2875 8.7125C11.4792 8.90417 11.7167 9 12 9ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",
152
- fill: "currentColor"
153
- }
154
- )
155
- }
156
- );
157
- var PendingIcon = (props) => /* @__PURE__ */ jsx(
158
- "svg",
159
- {
160
- fill: "none",
161
- height: "24",
162
- viewBox: "0 0 24 24",
163
- width: "24",
164
- xmlns: "http://www.w3.org/2000/svg",
165
- ...props,
166
- children: /* @__PURE__ */ jsx(
167
- "path",
168
- {
169
- d: "M12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20ZM12.5 7V12.25L16.5 14.65L15.75 15.85L11 13V7H12.5Z",
170
- fill: "currentColor"
171
- }
172
- )
173
- }
174
- );
175
- var WarningIcon = (props) => /* @__PURE__ */ jsx(
176
- "svg",
177
- {
178
- fill: "none",
179
- height: "24",
180
- viewBox: "0 0 24 24",
181
- width: "24",
182
- xmlns: "http://www.w3.org/2000/svg",
183
- ...props,
184
- children: /* @__PURE__ */ jsx(
185
- "path",
186
- {
187
- d: "M1 21L12 2L23 21H1ZM4.45 19H19.55L12 6L4.45 19ZM12 18C12.2833 18 12.5208 17.9042 12.7125 17.7125C12.9042 17.5208 13 17.2833 13 17C13 16.7167 12.9042 16.4792 12.7125 16.2875C12.5208 16.0958 12.2833 16 12 16C11.7167 16 11.4792 16.0958 11.2875 16.2875C11.0958 16.4792 11 16.7167 11 17C11 17.2833 11.0958 17.5208 11.2875 17.7125C11.4792 17.9042 11.7167 18 12 18ZM11 15H13V10H11V15Z",
188
- fill: "currentColor"
189
- }
190
- )
191
- }
192
- );
193
- var getIcon = (type) => {
194
- switch (type) {
195
- case "pending":
196
- return /* @__PURE__ */ jsx(PendingIcon, { className: "shrink-0 text-info-light", role: "presentation" });
197
- case "success":
198
- return /* @__PURE__ */ jsx(InfoIcon, { className: "shrink-0 text-info-light", role: "presentation" });
199
- case "warning":
200
- return /* @__PURE__ */ jsx(WarningIcon, { className: "shrink-0 text-orange-11", role: "presentation" });
201
- case "info":
202
- return /* @__PURE__ */ jsx(InfoIcon, { className: "shrink-0 text-info-light", role: "presentation" });
203
- default:
204
- return null;
205
- }
206
- };
207
- var getContainerClasses = (type) => {
208
- const baseClasses = "flex items-center gap-3 rounded-2xl p-4 text-sm transition-colors duration-500";
209
- switch (type) {
210
- case "error":
211
- return `${baseClasses} bg-base-error-soft text-error`;
212
- case "pending":
213
- case "success":
214
- return `${baseClasses} bg-base-info-soft text-info`;
215
- case "warning":
216
- return `${baseClasses} bg-orange-a3 text-orange-12`;
217
- case "info":
218
- default:
219
- return `${baseClasses} bg-base-info-soft text-info`;
220
- }
221
- };
222
- var Callout = ({ text, type = "info", title, role, className }) => {
223
- const icon = getIcon(type);
224
- return /* @__PURE__ */ jsxs("div", { className: cn(getContainerClasses(type), className), role, children: [
225
- icon,
226
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
227
- title && /* @__PURE__ */ jsx("span", { className: "text-base font-bold", children: title }),
228
- text
229
- ] })
230
- ] });
231
- };
232
- Callout.displayName = "Callout";
233
- var Card = React4.forwardRef(
234
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
235
- "div",
236
- {
237
- className: cn(
238
- "relative flex w-full flex-col gap-1 rounded-2xl bg-base-gray-soft p-4",
239
- className
240
- ),
241
- ref,
242
- ...props
243
- }
244
- )
245
- );
246
- Card.displayName = "Card";
247
- var CardHeader = React4.forwardRef(
248
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("flex items-center gap-4", className), ref, ...props })
249
- );
250
- CardHeader.displayName = "CardHeader";
251
- var CardIcon = React4.forwardRef(
252
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
253
- "div",
254
- {
255
- className: cn("flex shrink-0 items-center justify-center text-accent-active", className),
256
- ref,
257
- ...props
258
- }
259
- )
260
- );
261
- CardIcon.displayName = "CardIcon";
262
- var CardTitle = React4.forwardRef(
263
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
264
- "h3",
265
- {
266
- className: cn("text-base font-medium leading-5 text-gray", className),
267
- ref,
268
- ...props
269
- }
270
- )
271
- );
272
- CardTitle.displayName = "CardTitle";
273
- var CardDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { className: cn("text-sm leading-5 text-gray-light", className), ref, ...props }));
274
- CardDescription.displayName = "CardDescription";
275
- var CardContent = React4.forwardRef(
276
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("", className), ref, ...props })
277
- );
278
- CardContent.displayName = "CardContent";
279
- var CardFooter = React4.forwardRef(
280
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
281
- "div",
282
- {
283
- className: cn("flex items-center text-gray justify-end gap-2 pt-2", className),
284
- ref,
285
- ...props
286
- }
287
- )
288
- );
289
- CardFooter.displayName = "CardFooter";
290
- var CardSkeleton = React4.forwardRef(
291
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
292
- "div",
293
- {
294
- className: cn(
295
- "relative flex w-full items-center gap-4 rounded-2xl bg-spark-a3 p-4 opacity-80",
296
- className
297
- ),
298
- ref,
299
- ...props,
300
- children: [
301
- /* @__PURE__ */ jsx("div", { className: "size-10 shrink-0 animate-pulse rounded-full bg-base-gray-soft" }),
302
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col gap-y-2", children: [
303
- /* @__PURE__ */ jsx("div", { className: "h-5 w-1/3 max-w-32 animate-pulse rounded-md bg-base-gray-soft" }),
304
- /* @__PURE__ */ jsx("div", { className: "h-4 w-1/2 max-w-48 animate-pulse rounded-md bg-base-gray-soft" })
305
- ] })
306
- ]
307
- }
308
- )
309
- );
310
- CardSkeleton.displayName = "CardSkeleton";
311
- var CheckIcon = (props) => /* @__PURE__ */ jsx(
312
- "svg",
313
- {
314
- fill: "none",
315
- height: "12",
316
- viewBox: "0 0 12 12",
317
- width: "12",
318
- xmlns: "http://www.w3.org/2000/svg",
319
- ...props,
320
- children: /* @__PURE__ */ jsx(
321
- "path",
322
- {
323
- d: "M4.77498 7.575L9.01248 3.3375C9.11248 3.2375 9.22915 3.1875 9.36248 3.1875C9.49582 3.1875 9.61248 3.2375 9.71248 3.3375C9.81248 3.4375 9.86248 3.55625 9.86248 3.69375C9.86248 3.83125 9.81248 3.95 9.71248 4.05L5.12498 8.65C5.02498 8.75 4.90832 8.8 4.77498 8.8C4.64165 8.8 4.52498 8.75 4.42498 8.65L2.27498 6.5C2.17498 6.4 2.12706 6.28125 2.13123 6.14375C2.1354 6.00625 2.18748 5.8875 2.28748 5.7875C2.38748 5.6875 2.50623 5.6375 2.64373 5.6375C2.78123 5.6375 2.89998 5.6875 2.99998 5.7875L4.77498 7.575Z",
324
- fill: "currentColor"
325
- }
326
- )
327
- }
328
- );
329
- var Checkbox = React4.forwardRef(({ className, size = "default", bordered = false, ...props }, ref) => /* @__PURE__ */ jsx(
330
- CheckboxPrimitive.Root,
331
- {
332
- className: cn(
333
- "peer inline-flex shrink-0 cursor-pointer items-center justify-center rounded-sm transition-colors focus-visible:outline-hidden focus-visible:ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-base-accent-solid data-[state=unchecked]:bg-base-accent-soft",
334
- size === "default" && "h-4 w-4",
335
- size === "large" && "h-6 w-6",
336
- bordered ? "border-2 border-accent-ui" : "border-2 border-transparent",
337
- className
338
- ),
339
- ref,
340
- ...props,
341
- children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: "inline-flex items-center justify-center text-accent-contrast transition-none", children: /* @__PURE__ */ jsx(CheckIcon, { className: cn(size === "large" ? "size-4" : "size-3.5") }) })
342
- }
343
- ));
344
- Checkbox.displayName = "Checkbox";
345
- var Dialog = SheetPrimitive.Root;
346
- var DialogTrigger = SheetPrimitive.Trigger;
347
- var DialogPortal = SheetPrimitive.Portal;
348
- var DialogClose = SheetPrimitive.Close;
349
- var DialogOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
350
- SheetPrimitive.Overlay,
351
- {
352
- className: cn(
353
- "fixed inset-0 z-50 bg-black-a6 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 dark:bg-black-a8",
354
- className
355
- ),
356
- "data-overlay": "true",
357
- ref,
358
- ...props
359
- }
360
- ));
361
- DialogOverlay.displayName = SheetPrimitive.Overlay.displayName;
362
- var onInteractOutsideHandler = (event) => {
363
- const target = event.target;
364
- const isOverlay = target.dataset.overlay === "true";
365
- if (!isOverlay) event.preventDefault();
366
- };
367
- var DialogContent = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(Fragment, { children: [
368
- /* @__PURE__ */ jsx(DialogOverlay, {}),
369
- /* @__PURE__ */ jsx(
370
- SheetPrimitive.Content,
371
- {
372
- className: cn(
373
- "fixed left-[50%] top-[50%] z-50 grid w-[90%] min-w-80 max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl bg-slate-2 p-6 text-gray shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-50% data-[state=closed]:slide-out-to-top-48% data-[state=open]:slide-in-from-top-48% dark:bg-gray-2 sm:w-1/2",
374
- className
375
- ),
376
- onInteractOutside: onInteractOutsideHandler,
377
- ref,
378
- ...props,
379
- children
380
- }
381
- )
382
- ] }));
383
- DialogContent.displayName = SheetPrimitive.Content.displayName;
384
- var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("", className), ...props });
385
- DialogHeader.displayName = "DialogHeader";
386
- var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx(
387
- "div",
388
- {
389
- className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
390
- ...props
391
- }
392
- );
393
- DialogFooter.displayName = "DialogFooter";
394
- var DialogTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
395
- SheetPrimitive.Title,
396
- {
397
- className: cn("text-lg font-bold text-gray", className),
398
- ref,
399
- ...props
400
- }
401
- ));
402
- DialogTitle.displayName = SheetPrimitive.Title.displayName;
403
- var DialogDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
404
- SheetPrimitive.Description,
405
- {
406
- className: cn("text-md text-gray", className),
407
- ref,
408
- ...props
409
- }
410
- ));
411
- DialogDescription.displayName = SheetPrimitive.Description.displayName;
412
- var DisplayField = React4.forwardRef(
413
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
414
- "div",
415
- {
416
- className: cn(
417
- "relative flex min-h-12 w-full justify-between gap-2 rounded-2xl bg-base-gray-soft p-4",
418
- className
419
- ),
420
- ref,
421
- ...props
422
- }
423
- )
424
- );
425
- DisplayField.displayName = "DisplayField";
426
- var DisplayFieldLabel = React4.forwardRef(
427
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
428
- "span",
429
- {
430
- className: cn("text-sm font-medium leading-5 text-gray-light wrap-break-word", className),
431
- ref,
432
- ...props
433
- }
434
- )
435
- );
436
- DisplayFieldLabel.displayName = "DisplayFieldLabel";
437
- var DisplayFieldValue = React4.forwardRef(
438
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
439
- "span",
440
- {
441
- className: cn(
442
- "min-h-5 w-full whitespace-pre-wrap text-base tabular-nums leading-5 text-gray",
443
- className
444
- ),
445
- ref,
446
- ...props
447
- }
448
- )
449
- );
450
- DisplayFieldValue.displayName = "DisplayFieldValue";
451
- var DisplayFieldContent = React4.forwardRef(
452
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("", className), ref, ...props })
453
- );
454
- DisplayFieldContent.displayName = "DisplayFieldContent";
455
- var DisplayFieldSkeleton = React4.forwardRef(
456
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
457
- "div",
458
- {
459
- className: cn(
460
- "relative flex h-20 w-full flex-col gap-y-2 rounded-2xl bg-base-gray-soft p-4 opacity-80",
461
- className
462
- ),
463
- ref,
464
- ...props,
465
- children: [
466
- /* @__PURE__ */ jsx("div", { className: "h-5 w-1/2 max-w-52 animate-pulse rounded-md bg-base-gray-soft" }),
467
- /* @__PURE__ */ jsx("div", { className: "h-5 w-3/4 max-w-72 animate-pulse rounded-md bg-base-gray-soft" })
468
- ]
469
- }
470
- )
471
- );
472
- DisplayFieldSkeleton.displayName = "DisplayFieldSkeleton";
473
- var Drawer = ({
474
- shouldScaleBackground = true,
475
- ...props
476
- }) => /* @__PURE__ */ jsx(Drawer$1.Root, { shouldScaleBackground, ...props });
477
- Drawer.displayName = "Drawer";
478
- var DrawerTrigger = Drawer$1.Trigger;
479
- var DrawerPortal = Drawer$1.Portal;
480
- var DrawerClose = Drawer$1.Close;
481
- var DrawerOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
482
- Drawer$1.Overlay,
483
- {
484
- className: cn("fixed inset-0 z-50 bg-black-a6 dark:bg-black-a8", className),
485
- "data-overlay": "true",
486
- ref,
487
- ...props
488
- }
489
- ));
490
- DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
491
- var DrawerPill = ({ className }) => /* @__PURE__ */ jsx(
492
- "div",
493
- {
494
- className: cn(
495
- "mx-auto mt-2.5 h-1.5 w-16 shrink-0 rounded-[24px] bg-base-gray-soft",
496
- className
497
- )
498
- }
499
- );
500
- var DrawerContent = React4.forwardRef(({ className, pillClassName, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
501
- /* @__PURE__ */ jsx(DrawerOverlay, {}),
502
- /* @__PURE__ */ jsxs(
503
- Drawer$1.Content,
504
- {
505
- className: cn(
506
- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col gap-4 rounded-t-2xl bg-slate-2 text-gray dark:bg-gray-2",
507
- className
508
- ),
509
- ref,
510
- ...props,
511
- children: [
512
- /* @__PURE__ */ jsx(DrawerPill, { className: pillClassName }),
513
- children
514
- ]
515
- }
516
- )
517
- ] }));
518
- DrawerContent.displayName = "DrawerContent";
519
- var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-1 px-6 py-3", className), ...props });
520
- DrawerHeader.displayName = "DrawerHeader";
521
- var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("mt-auto flex flex-col gap-2 text-gray", className), ...props });
522
- DrawerFooter.displayName = "DrawerFooter";
523
- var DrawerTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
524
- Drawer$1.Title,
525
- {
526
- className: cn("text-lg font-bold text-gray", className),
527
- ref,
528
- ...props
529
- }
530
- ));
531
- DrawerTitle.displayName = Drawer$1.Title.displayName;
532
- var DrawerDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
533
- Drawer$1.Description,
534
- {
535
- className: cn("text-sm text-gray", className),
536
- ref,
537
- ...props
538
- }
539
- ));
540
- DrawerDescription.displayName = Drawer$1.Description.displayName;
541
- var POSITIONS = {
542
- solar: { x: 120, y: 70 },
543
- grid: { x: 360, y: 70 },
544
- home: { x: 240, y: 190 },
545
- battery: { x: 100, y: 330 },
546
- "heat-pump": { x: 240, y: 355 },
547
- ev: { x: 380, y: 330 }
548
- };
549
- var NODE_RADIUS = 32;
550
- var HOME_RADIUS = 38;
551
- var STYLES = {
552
- solar: { label: "Solar", bg: "var(--orange-3)", icon: "var(--orange-11)", flow: "var(--orange-9)" },
553
- battery: { label: "Battery", bg: "var(--green-3)", icon: "var(--green-11)", flow: "var(--green-9)" },
554
- grid: { label: "Grid", bg: "var(--mauve-3)", icon: "var(--mauve-11)", flow: "var(--mauve-9)" },
555
- home: { label: "Home", bg: "var(--slate-3)", icon: "var(--slate-11)", flow: "var(--slate-9)" },
556
- ev: { label: "EV Charger", bg: "var(--blue-3)", icon: "var(--blue-11)", flow: "var(--blue-9)" },
557
- "heat-pump": { label: "Heat Pump", bg: "var(--red-3)", icon: "var(--red-11)", flow: "var(--red-9)" }
558
- };
559
- var defaultFormatPower = (power) => {
560
- const abs = Math.abs(power);
561
- if (abs >= 1) return `${abs.toFixed(1)} kW`;
562
- return `${(abs * 1e3).toFixed(0)} W`;
563
- };
564
- function getFlowPath(from, to) {
565
- const mx = (from.x + to.x) / 2;
566
- return `M ${from.x} ${from.y} C ${mx} ${from.y}, ${mx} ${to.y}, ${to.x} ${to.y}`;
567
- }
568
- function getAnimDuration(power) {
569
- const clamped = Math.max(0.1, Math.min(10, Math.abs(power)));
570
- return Math.max(1, 4 - clamped * 0.3);
571
- }
572
- function SolarIcon({ color }) {
573
- return /* @__PURE__ */ jsxs("g", { style: { color }, children: [
574
- /* @__PURE__ */ jsx("rect", { fill: "none", height: "18", rx: "1.5", stroke: "currentColor", strokeWidth: "1.8", width: "18", x: "-9", y: "-9" }),
575
- /* @__PURE__ */ jsx("line", { stroke: "currentColor", strokeWidth: "1", x1: "-9", x2: "9", y1: "-3", y2: "-3" }),
576
- /* @__PURE__ */ jsx("line", { stroke: "currentColor", strokeWidth: "1", x1: "-9", x2: "9", y1: "3", y2: "3" }),
577
- /* @__PURE__ */ jsx("line", { stroke: "currentColor", strokeWidth: "1", x1: "-3", x2: "-3", y1: "-9", y2: "9" }),
578
- /* @__PURE__ */ jsx("line", { stroke: "currentColor", strokeWidth: "1", x1: "3", x2: "3", y1: "-9", y2: "9" })
579
- ] });
580
- }
581
- function BatteryIcon({ color, level = 50 }) {
582
- const h = Math.max(1, Math.min(100, level) / 100 * 16);
583
- return /* @__PURE__ */ jsxs("g", { style: { color }, children: [
584
- /* @__PURE__ */ jsx("rect", { fill: "currentColor", height: "3", rx: "1", width: "6", x: "-3", y: "-13" }),
585
- /* @__PURE__ */ jsx("rect", { fill: "none", height: "20", rx: "2.5", stroke: "currentColor", strokeWidth: "1.8", width: "14", x: "-7", y: "-10" }),
586
- /* @__PURE__ */ jsx("rect", { fill: "currentColor", height: h, opacity: 0.5, rx: "1", width: "9", x: "-4.5", y: 10 - h })
587
- ] });
588
- }
589
- function GridIcon({ color }) {
590
- return /* @__PURE__ */ jsx("g", { style: { color }, children: /* @__PURE__ */ jsx("path", { d: "M0 -12 L0 12 M-9 -5 L9 -5 M-7 1 L7 1 M-5 7 L5 7", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeWidth: "2" }) });
591
- }
592
- function HomeIcon({ color }) {
593
- return /* @__PURE__ */ jsxs("g", { style: { color }, children: [
594
- /* @__PURE__ */ jsx("path", { d: "M-12 2 L0 -11 L12 2", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2.2" }),
595
- /* @__PURE__ */ jsx("rect", { fill: "none", height: "12", rx: "1.5", stroke: "currentColor", strokeWidth: "1.8", width: "18", x: "-9", y: "2" }),
596
- /* @__PURE__ */ jsx("rect", { fill: "currentColor", height: "7", opacity: 0.35, rx: "1", width: "6", x: "-3", y: "7" })
597
- ] });
598
- }
599
- function EvIcon({ color }) {
600
- return /* @__PURE__ */ jsxs("g", { style: { color }, children: [
601
- /* @__PURE__ */ jsx("path", { d: "M-11 3 L-9 -3 L-3 -8 L7 -8 L11 -1 L11 3 Z", fill: "none", stroke: "currentColor", strokeLinejoin: "round", strokeWidth: "1.8" }),
602
- /* @__PURE__ */ jsx("circle", { cx: "-5", cy: "5", fill: "none", r: "3", stroke: "currentColor", strokeWidth: "1.5" }),
603
- /* @__PURE__ */ jsx("circle", { cx: "7", cy: "5", fill: "none", r: "3", stroke: "currentColor", strokeWidth: "1.5" }),
604
- /* @__PURE__ */ jsx("path", { d: "M1 -5 L-1 0 L2 0 L0 4", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.2" })
605
- ] });
606
- }
607
- function HeatPumpIcon({ color }) {
608
- return /* @__PURE__ */ jsxs("g", { style: { color }, children: [
609
- /* @__PURE__ */ jsx("rect", { fill: "none", height: "16", rx: "3", stroke: "currentColor", strokeWidth: "1.8", width: "22", x: "-11", y: "-8" }),
610
- /* @__PURE__ */ jsx("circle", { cx: "0", cy: "0", fill: "none", r: "5", stroke: "currentColor", strokeWidth: "1.5" }),
611
- /* @__PURE__ */ jsx("path", { d: "M0 -4 C2 -2 2 2 0 4 C-2 2 -2 -2 0 -4", fill: "currentColor", opacity: 0.3 }),
612
- /* @__PURE__ */ jsx("path", { d: "M-4 0 C-2 -2 2 -2 4 0 C2 2 -2 2 -4 0", fill: "currentColor", opacity: 0.3 })
613
- ] });
614
- }
615
- var NODE_ICONS = {
616
- solar: SolarIcon,
617
- battery: BatteryIcon,
618
- grid: GridIcon,
619
- home: HomeIcon,
620
- ev: EvIcon,
621
- "heat-pump": HeatPumpIcon
622
- };
623
- function FlowConnection({
624
- from,
625
- to,
626
- color,
627
- power
628
- }) {
629
- const d = getFlowPath(from, to);
630
- const dur = getAnimDuration(power);
631
- const dots = 3;
632
- return /* @__PURE__ */ jsxs("g", { children: [
633
- /* @__PURE__ */ jsx("path", { d, fill: "none", opacity: 0.15, stroke: color, strokeWidth: 2 }),
634
- Array.from({ length: dots }, (_, i) => /* @__PURE__ */ jsx("circle", { fill: color, opacity: 0.85, r: 3.5, children: /* @__PURE__ */ jsx("animateMotion", { begin: `${i * dur / dots}s`, dur: `${dur}s`, path: d, repeatCount: "indefinite" }) }, i))
635
- ] });
636
- }
637
- function FlowNode({
638
- node,
639
- formatPower
640
- }) {
641
- const pos = POSITIONS[node.type];
642
- const style = STYLES[node.type];
643
- const radius = node.type === "home" ? HOME_RADIUS : NODE_RADIUS;
644
- const Icon2 = NODE_ICONS[node.type];
645
- const label = node.label ?? style.label;
646
- const inactive = node.power === 0;
647
- return /* @__PURE__ */ jsxs("g", { transform: `translate(${pos.x}, ${pos.y})`, children: [
648
- /* @__PURE__ */ jsx(
649
- "circle",
650
- {
651
- fill: style.bg,
652
- opacity: inactive ? 0.5 : 1,
653
- r: radius,
654
- stroke: style.flow,
655
- strokeWidth: 2
656
- }
657
- ),
658
- /* @__PURE__ */ jsx("g", { transform: "translate(0, -2)", children: /* @__PURE__ */ jsx(Icon2, { color: style.icon, level: node.batteryLevel }) }),
659
- /* @__PURE__ */ jsx(
660
- "text",
661
- {
662
- fill: style.icon,
663
- fontSize: "11",
664
- fontWeight: "600",
665
- textAnchor: "middle",
666
- y: radius + 16,
667
- children: label
668
- }
669
- ),
670
- /* @__PURE__ */ jsx(
671
- "text",
672
- {
673
- fill: style.icon,
674
- fontSize: "12",
675
- fontWeight: "500",
676
- opacity: 0.75,
677
- textAnchor: "middle",
678
- y: radius + 30,
679
- children: formatPower(node.power)
680
- }
681
- ),
682
- node.type === "battery" && node.batteryLevel != null && /* @__PURE__ */ jsxs(Fragment, { children: [
683
- /* @__PURE__ */ jsx(
684
- "rect",
685
- {
686
- fill: style.flow,
687
- height: "16",
688
- rx: "8",
689
- width: "24",
690
- x: radius - 24,
691
- y: -radius + 2
692
- }
693
- ),
694
- /* @__PURE__ */ jsxs(
695
- "text",
696
- {
697
- fill: "white",
698
- fontSize: "9",
699
- fontWeight: "700",
700
- textAnchor: "middle",
701
- x: radius - 12,
702
- y: -radius + 13,
703
- children: [
704
- Math.round(node.batteryLevel),
705
- "%"
706
- ]
707
- }
708
- )
709
- ] })
710
- ] });
711
- }
712
- function EnergyFlowChart({
713
- nodes,
714
- flows = [],
715
- className,
716
- formatPower = defaultFormatPower
717
- }) {
718
- const nodeMap = useMemo(() => new Map(nodes.map((n) => [n.type, n])), [nodes]);
719
- const validFlows = useMemo(
720
- () => flows.filter((f) => nodeMap.has(f.from) && nodeMap.has(f.to) && f.power > 0),
721
- [flows, nodeMap]
722
- );
723
- return /* @__PURE__ */ jsx("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxs(
724
- "svg",
725
- {
726
- "aria-label": "Energy flow diagram",
727
- className: "block h-auto w-full",
728
- role: "img",
729
- viewBox: "0 0 480 420",
730
- children: [
731
- validFlows.map((f, i) => /* @__PURE__ */ jsx(
732
- FlowConnection,
733
- {
734
- color: STYLES[f.from].flow,
735
- from: POSITIONS[f.from],
736
- power: f.power,
737
- to: POSITIONS[f.to]
738
- },
739
- `${f.from}-${f.to}-${i}`
740
- )),
741
- nodes.map((node) => /* @__PURE__ */ jsx(FlowNode, { formatPower, node }, node.type))
742
- ]
743
- }
744
- ) });
745
- }
746
- EnergyFlowChart.displayName = "EnergyFlowChart";
747
- var hintIdCounter = 0;
748
- var Input = React4.forwardRef(
749
- ({ containerClassName, label, value, className, onChange, readOnly, hint, icon, ...props }, ref) => {
750
- const hintId = useMemo(() => {
751
- if (!hint) return void 0;
752
- return `input-hint-${++hintIdCounter}`;
753
- }, [hint]);
754
- const customClassName = {
755
- "border-transparent": !label?.length,
756
- "border-input-active": props["aria-invalid"] !== true && (typeof value === "string" ? value.length > 0 : typeof value === "number" ? true : false),
757
- "text-error! !focus-visible:border-input-invalid border-input-invalid!": props["aria-invalid"] === true
758
- };
759
- return /* @__PURE__ */ jsxs(
760
- "div",
761
- {
762
- className: cn(
763
- "relative flex w-full flex-col gap-y-1 rounded-2xl bg-input-base px-4 py-3",
764
- containerClassName
765
- ),
766
- children: [
767
- label && /* @__PURE__ */ jsx("label", { className: "text-sm font-normal leading-5 text-gray-light", htmlFor: label, children: label }),
768
- /* @__PURE__ */ jsxs("div", { className: "relative flex items-center justify-between gap-2", children: [
769
- /* @__PURE__ */ jsx(
770
- "input",
771
- {
772
- "aria-describedby": hintId,
773
- className: cn(
774
- "flex h-10 w-full rounded-none border-b-2 border-input bg-transparent py-2 text-base leading-5 text-gray outline-hidden transition-colors duration-100 placeholder:text-gray-disabled focus:border-input-active read-only:focus:border-transparent focus-visible:border-input-active read-only:focus-visible:border-transparent disabled:cursor-not-allowed disabled:border-input-disabled disabled:text-gray-disabled [&:user-invalid]:border-input-invalid [&:user-invalid]:text-error [&:user-invalid]:focus-visible:border-input-invalid [&:user-valid]:border-input-active",
775
- customClassName,
776
- className
777
- ),
778
- id: label,
779
- onChange,
780
- readOnly,
781
- ref,
782
- value,
783
- ...props
784
- }
785
- ),
786
- icon ? icon : null
787
- ] }),
788
- hint ? /* @__PURE__ */ jsx("div", { id: hintId, children: hint }) : null
789
- ]
790
- }
791
- );
792
- }
793
- );
794
- Input.displayName = "Input";
795
- var Label = React4.forwardRef(
796
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
797
- "label",
798
- {
799
- className: cn("text-base font-normal leading-5 text-gray-light", className),
800
- ref,
801
- ...props
802
- }
803
- )
804
- );
805
- Label.displayName = "Label";
806
- var DEFAULT_MARGIN = { top: 16, right: 16, bottom: 40, left: 48 };
807
- var CURVE_MAP = {
808
- monotone: curveMonotoneX,
809
- step: curveStep,
810
- "step-after": curveStepAfter,
811
- "step-before": curveStepBefore,
812
- linear: curveLinear
813
- };
814
- var resolveCurve = (type) => CURVE_MAP[type];
815
- var bisectDate = bisector((d) => d.date).left;
816
- var defaultFormatDate = (date) => date.toLocaleDateString(void 0, { month: "short", day: "numeric" });
817
- var defaultFormatValue = (value) => value.toLocaleString();
818
- var LINE_COLORS = [
819
- "stroke-spark-9",
820
- "stroke-green-9",
821
- "stroke-blue-9",
822
- "stroke-orange-9",
823
- "stroke-red-9"
824
- ];
825
- var DOT_COLORS = ["fill-spark-9", "fill-green-9", "fill-blue-9", "fill-orange-9", "fill-red-9"];
826
- var TEXT_COLORS = [
827
- "text-spark-a11",
828
- "text-success-light",
829
- "text-info-light",
830
- "text-warning-light",
831
- "text-error-light"
832
- ];
833
- function LineChart({
834
- series,
835
- width,
836
- height,
837
- margin = DEFAULT_MARGIN,
838
- curve: defaultCurve = "monotone",
839
- showGrid = true,
840
- showTooltip: enableTooltip = true,
841
- className,
842
- xTickCount = 5,
843
- yTickCount = 4,
844
- formatDate = defaultFormatDate,
845
- formatValue = defaultFormatValue
846
- }) {
847
- const { showTooltip, hideTooltip, tooltipData, tooltipLeft, tooltipTop, tooltipOpen } = useTooltip();
848
- const innerWidth = Math.max(0, width - margin.left - margin.right);
849
- const innerHeight = Math.max(0, height - margin.top - margin.bottom);
850
- const allData = useMemo(() => series.flatMap((s) => s.data), [series]);
851
- const xScale = useMemo(
852
- () => scaleTime({
853
- range: [0, innerWidth],
854
- domain: extent(allData, (d) => d.date)
855
- }),
856
- [allData, innerWidth]
857
- );
858
- const yScale = useMemo(
859
- () => scaleLinear({
860
- range: [innerHeight, 0],
861
- domain: [0, Math.max(...allData.map((d) => d.value)) * 1.1],
862
- nice: true
863
- }),
864
- [allData, innerHeight]
865
- );
866
- const xTicks = xScale.ticks(xTickCount);
867
- const yTicks = yScale.ticks(yTickCount);
868
- const handleTooltip = useCallback(
869
- (event) => {
870
- if (!enableTooltip) return;
871
- const point = localPoint(event);
872
- if (!point) return;
873
- const x0 = xScale.invert(point.x - margin.left);
874
- for (let i = 0; i < series.length; i++) {
875
- const s = series[i];
876
- if (!s) continue;
877
- const index = bisectDate(s.data, x0, 1);
878
- const d0 = s.data[index - 1];
879
- const d1 = s.data[index];
880
- if (!d0) continue;
881
- const d = d1 && x0.valueOf() - d0.date.valueOf() > d1.date.valueOf() - x0.valueOf() ? d1 : d0;
882
- showTooltip({
883
- tooltipData: { datum: d, seriesIndex: i },
884
- tooltipLeft: xScale(d.date) + margin.left,
885
- tooltipTop: yScale(d.value) + margin.top
886
- });
887
- break;
888
- }
889
- },
890
- [enableTooltip, margin, series, showTooltip, xScale, yScale]
891
- );
892
- if (width < 10 || height < 10) return null;
893
- return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
894
- /* @__PURE__ */ jsx("svg", { className: "block", height, width, children: /* @__PURE__ */ jsxs(Group, { left: margin.left, top: margin.top, children: [
895
- showGrid && yTicks.map((tick) => /* @__PURE__ */ jsx(
896
- "line",
897
- {
898
- className: "stroke-slate-a4",
899
- strokeDasharray: "4,4",
900
- x1: 0,
901
- x2: innerWidth,
902
- y1: yScale(tick),
903
- y2: yScale(tick)
904
- },
905
- `grid-y-${tick}`
906
- )),
907
- /* @__PURE__ */ jsx(
908
- "line",
909
- {
910
- className: "stroke-slate-a6",
911
- x1: 0,
912
- x2: innerWidth,
913
- y1: innerHeight,
914
- y2: innerHeight
915
- }
916
- ),
917
- xTicks.map((tick) => /* @__PURE__ */ jsx(
918
- "text",
919
- {
920
- className: "fill-slate-a11 text-xs",
921
- dy: "1em",
922
- textAnchor: "middle",
923
- x: xScale(tick),
924
- y: innerHeight + 8,
925
- children: formatDate(tick)
926
- },
927
- `x-${tick.valueOf()}`
928
- )),
929
- yTicks.map((tick) => /* @__PURE__ */ jsx(
930
- "text",
931
- {
932
- className: "fill-slate-a11 text-xs",
933
- dx: "-0.5em",
934
- dy: "0.32em",
935
- textAnchor: "end",
936
- x: -4,
937
- y: yScale(tick),
938
- children: formatValue(tick)
939
- },
940
- `y-${tick}`
941
- )),
942
- series.map((s, i) => /* @__PURE__ */ jsx(
943
- LinePath,
944
- {
945
- className: cn(LINE_COLORS[i % LINE_COLORS.length], s.className),
946
- curve: resolveCurve(s.curve ?? defaultCurve),
947
- data: s.data,
948
- fill: "none",
949
- strokeDasharray: s.dashed ? s.dashPattern ?? "6,4" : void 0,
950
- strokeWidth: 2,
951
- x: (d) => xScale(d.date),
952
- y: (d) => yScale(d.value)
953
- },
954
- s.id
955
- )),
956
- enableTooltip && /* @__PURE__ */ jsx(
957
- "rect",
958
- {
959
- fill: "transparent",
960
- height: innerHeight,
961
- onMouseLeave: hideTooltip,
962
- onMouseMove: handleTooltip,
963
- onTouchEnd: hideTooltip,
964
- onTouchMove: handleTooltip,
965
- width: innerWidth,
966
- x: 0,
967
- y: 0
968
- }
969
- ),
970
- tooltipOpen && tooltipData && /* @__PURE__ */ jsxs(Fragment, { children: [
971
- /* @__PURE__ */ jsx(
972
- "line",
973
- {
974
- className: "stroke-slate-a6",
975
- pointerEvents: "none",
976
- strokeDasharray: "4,4",
977
- x1: xScale(tooltipData.datum.date),
978
- x2: xScale(tooltipData.datum.date),
979
- y1: 0,
980
- y2: innerHeight
981
- }
982
- ),
983
- /* @__PURE__ */ jsx(
984
- "circle",
985
- {
986
- className: cn(DOT_COLORS[tooltipData.seriesIndex % DOT_COLORS.length]),
987
- cx: xScale(tooltipData.datum.date),
988
- cy: yScale(tooltipData.datum.value),
989
- pointerEvents: "none",
990
- r: 4,
991
- stroke: "white",
992
- strokeWidth: 2
993
- }
994
- )
995
- ] })
996
- ] }) }),
997
- tooltipOpen && !!tooltipData && /* @__PURE__ */ jsx(
998
- Tooltip,
999
- {
1000
- left: tooltipLeft,
1001
- style: {
1002
- position: "absolute",
1003
- pointerEvents: "none",
1004
- background: "transparent",
1005
- border: "none",
1006
- boxShadow: "none",
1007
- padding: 0
1008
- },
1009
- top: tooltipTop,
1010
- children: /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-slate-2 px-3 py-2 text-sm shadow-md dark:bg-gray-2", children: [
1011
- /* @__PURE__ */ jsx("div", { className: "text-xs text-gray-light", children: formatDate(tooltipData.datum.date) }),
1012
- /* @__PURE__ */ jsx(
1013
- "div",
1014
- {
1015
- className: cn(
1016
- "font-medium",
1017
- TEXT_COLORS[tooltipData.seriesIndex % TEXT_COLORS.length]
1018
- ),
1019
- children: formatValue(tooltipData.datum.value)
1020
- }
1021
- )
1022
- ] })
1023
- }
1024
- )
1025
- ] });
1026
- }
1027
- LineChart.displayName = "LineChart";
1028
- var Popover = PopoverPrimitive.Root;
1029
- var PopoverTrigger = PopoverPrimitive.Trigger;
1030
- var PopoverContent = React4.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
1031
- PopoverPrimitive.Content,
1032
- {
1033
- align,
1034
- className: cn(
1035
- "z-50 w-72 rounded-xl border bg-slate-2 p-4 shadow-xs outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 origin-(--radix-popover-content-transform-origin)",
1036
- className
1037
- ),
1038
- ref,
1039
- sideOffset,
1040
- ...props
1041
- }
1042
- ) }));
1043
- PopoverContent.displayName = PopoverPrimitive.Content.displayName;
1044
- var sizeClasses = {
1045
- sm: "h-1",
1046
- default: "h-2",
1047
- lg: "h-3"
1048
- };
1049
- var Progress = React4.forwardRef(
1050
- ({ className, value, max = 100, size = "default", ...props }, ref) => {
1051
- const percentage = Math.min(100, Math.max(0, value / max * 100));
1052
- return /* @__PURE__ */ jsx(
1053
- "div",
1054
- {
1055
- "aria-valuemax": max,
1056
- "aria-valuemin": 0,
1057
- "aria-valuenow": value,
1058
- className: cn(
1059
- "w-full overflow-hidden rounded-full bg-slate-a4",
1060
- sizeClasses[size],
1061
- className
1062
- ),
1063
- ref,
1064
- role: "progressbar",
1065
- ...props,
1066
- children: /* @__PURE__ */ jsx(
1067
- "div",
1068
- {
1069
- className: "h-full rounded-full bg-spark-9 transition-all duration-300",
1070
- style: { width: `${percentage}%` }
1071
- }
1072
- )
1073
- }
1074
- );
1075
- }
1076
- );
1077
- Progress.displayName = "Progress";
1078
- var ScrollArea = React4.forwardRef(({ className, children, direction = "vertical", ...props }, ref) => /* @__PURE__ */ jsxs(
1079
- ScrollAreaPrimitive.Root,
1080
- {
1081
- className: cn("relative overflow-hidden", className),
1082
- ref,
1083
- ...props,
1084
- children: [
1085
- /* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: "size-full rounded-[inherit]", children }),
1086
- direction !== "horizontal" && /* @__PURE__ */ jsx(ScrollBar, { orientation: "vertical" }),
1087
- direction !== "vertical" && /* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal" }),
1088
- /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
1089
- ]
1090
- }
1091
- ));
1092
- ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
1093
- var ScrollBar = React4.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
1094
- ScrollAreaPrimitive.ScrollAreaScrollbar,
1095
- {
1096
- className: cn(
1097
- "flex touch-none select-none transition-colors",
1098
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px",
1099
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-px empty:hidden",
1100
- className
1101
- ),
1102
- orientation,
1103
- ref,
1104
- ...props,
1105
- children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-[24px] bg-gray-8" })
1106
- }
1107
- ));
1108
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
1109
- var ChevronDownIcon = (props) => /* @__PURE__ */ jsx(
1110
- "svg",
1111
- {
1112
- fill: "none",
1113
- height: "24",
1114
- viewBox: "0 0 24 24",
1115
- width: "24",
1116
- xmlns: "http://www.w3.org/2000/svg",
1117
- ...props,
1118
- children: /* @__PURE__ */ jsx(
1119
- "path",
1120
- {
1121
- d: "M12 14.975C11.8667 14.975 11.7417 14.9542 11.625 14.9125C11.5083 14.8708 11.4 14.8 11.3 14.7L6.7 10.1C6.51667 9.91667 6.425 9.68334 6.425 9.4C6.425 9.11667 6.51667 8.88334 6.7 8.7C6.88334 8.51667 7.11667 8.425 7.4 8.425C7.68334 8.425 7.91667 8.51667 8.1 8.7L12 12.6L15.9 8.7C16.0833 8.51667 16.3167 8.425 16.6 8.425C16.8833 8.425 17.1167 8.51667 17.3 8.7C17.4833 8.88334 17.575 9.11667 17.575 9.4C17.575 9.68334 17.4833 9.91667 17.3 10.1L12.7 14.7C12.6 14.8 12.4917 14.8708 12.375 14.9125C12.2583 14.9542 12.1333 14.975 12 14.975Z",
1122
- fill: "currentColor"
1123
- }
1124
- )
1125
- }
1126
- );
1127
- var Select = SelectPrimitive.Root;
1128
- var SelectGroup = SelectPrimitive.Group;
1129
- var SelectValue = SelectPrimitive.Value;
1130
- var SelectTrigger = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
1131
- SelectPrimitive.Trigger,
1132
- {
1133
- className: cn(
1134
- "flex w-full items-center justify-between focus:outline-hidden focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
1135
- className
1136
- ),
1137
- ref,
1138
- ...props,
1139
- children
1140
- }
1141
- ));
1142
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
1143
- var SelectTriggerIcon = () => /* @__PURE__ */ jsx(
1144
- SelectPrimitive.Icon,
1145
- {
1146
- asChild: true,
1147
- className: "not-sr-only in-data-[state=open]:rotate-180",
1148
- role: "presentation",
1149
- children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-6 shrink-0 text-spark-a11" })
1150
- }
1151
- );
1152
- SelectTriggerIcon.displayName = "SelectTriggerIcon";
1153
- var SelectScrollUpButton = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1154
- SelectPrimitive.ScrollUpButton,
1155
- {
1156
- className: cn(
1157
- "absolute left-0 right-0 top-0 z-1 flex w-full cursor-default items-center justify-center py-1 transition-all max-sm:pointer-events-none",
1158
- className
1159
- ),
1160
- ref,
1161
- ...props,
1162
- children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-6 shrink-0 rotate-180" })
1163
- }
1164
- ));
1165
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
1166
- var SelectScrollDownButton = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1167
- SelectPrimitive.ScrollDownButton,
1168
- {
1169
- className: cn(
1170
- "absolute bottom-0 left-0 right-0 z-1 flex w-full cursor-default items-center justify-center py-1 transition-all max-sm:pointer-events-none",
1171
- className
1172
- ),
1173
- ref,
1174
- ...props,
1175
- children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-6 shrink-0" })
1176
- }
1177
- ));
1178
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
1179
- var SelectLabel = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1180
- SelectPrimitive.Label,
1181
- {
1182
- className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
1183
- ref,
1184
- ...props
1185
- }
1186
- ));
1187
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
1188
- var SelectItem = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
1189
- SelectPrimitive.Item,
1190
- {
1191
- className: cn(
1192
- "relative flex w-full cursor-default select-none items-center outline-hidden data-disabled:pointer-events-none data-disabled:opacity-50",
1193
- className
1194
- ),
1195
- ref,
1196
- ...props,
1197
- children: /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
1198
- }
1199
- ));
1200
- SelectItem.displayName = SelectPrimitive.Item.displayName;
1201
- var SelectSeparator = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1202
- SelectPrimitive.Separator,
1203
- {
1204
- className: cn("-mx-1 my-1 h-px", className),
1205
- ref,
1206
- ...props
1207
- }
1208
- ));
1209
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
1210
- var SelectContent = React4.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
1211
- SelectPrimitive.Content,
1212
- {
1213
- className: cn(
1214
- "duration-250 relative z-50 max-h-96 w-[var(--radix-select-trigger-width)] min-w-[8rem] overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-100 data-[state=open]:zoom-in-100 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 origin-(--radix-select-content-transform-origin)",
1215
- position === "popper" && "data-[side=bottom]:translate-y-0 data-[side=left]:-translate-x-0 data-[side=right]:translate-x-0 data-[side=top]:-translate-y-0",
1216
- className
1217
- ),
1218
- position,
1219
- ref,
1220
- ...props,
1221
- children: [
1222
- /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
1223
- /* @__PURE__ */ jsx(
1224
- SelectPrimitive.Viewport,
1225
- {
1226
- className: cn(
1227
- "p-0",
1228
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-[var(--radix-select-trigger-width)]"
1229
- ),
1230
- children
1231
- }
1232
- ),
1233
- /* @__PURE__ */ jsx(SelectScrollDownButton, {})
1234
- ]
1235
- }
1236
- ) }));
1237
- SelectContent.displayName = SelectPrimitive.Content.displayName;
1238
- var Separator2 = React4.forwardRef(
1239
- ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
1240
- "div",
1241
- {
1242
- className: cn(
1243
- "shrink-0 bg-gray",
1244
- orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
1245
- className
1246
- ),
1247
- "data-orientation": orientation,
1248
- ref,
1249
- role: decorative ? "none" : "separator",
1250
- ...props
1251
- }
1252
- )
1253
- );
1254
- Separator2.displayName = "Separator";
1255
- var XIcon = (props) => /* @__PURE__ */ jsx(
1256
- "svg",
1257
- {
1258
- className: "size-6",
1259
- fill: "none",
1260
- height: "24",
1261
- viewBox: "0 0 24 24",
1262
- width: "24",
1263
- xmlns: "http://www.w3.org/2000/svg",
1264
- ...props,
1265
- children: /* @__PURE__ */ jsx(
1266
- "path",
1267
- {
1268
- d: "M12 13.4L7.1 18.3C6.91667 18.4833 6.68333 18.575 6.4 18.575C6.11667 18.575 5.88333 18.4833 5.7 18.3C5.51667 18.1167 5.425 17.8833 5.425 17.6C5.425 17.3167 5.51667 17.0833 5.7 16.9L10.6 12L5.7 7.09999C5.51667 6.91665 5.425 6.68332 5.425 6.39999C5.425 6.11665 5.51667 5.88332 5.7 5.69999C5.88333 5.51665 6.11667 5.42499 6.4 5.42499C6.68333 5.42499 6.91667 5.51665 7.1 5.69999L12 10.6L16.9 5.69999C17.0833 5.51665 17.3167 5.42499 17.6 5.42499C17.8833 5.42499 18.1167 5.51665 18.3 5.69999C18.4833 5.88332 18.575 6.11665 18.575 6.39999C18.575 6.68332 18.4833 6.91665 18.3 7.09999L13.4 12L18.3 16.9C18.4833 17.0833 18.575 17.3167 18.575 17.6C18.575 17.8833 18.4833 18.1167 18.3 18.3C18.1167 18.4833 17.8833 18.575 17.6 18.575C17.3167 18.575 17.0833 18.4833 16.9 18.3L12 13.4Z",
1269
- fill: "currentColor"
1270
- }
1271
- )
1272
- }
1273
- );
1274
- var Sheet = SheetPrimitive.Root;
1275
- var SheetTrigger = SheetPrimitive.Trigger;
1276
- var SheetClose = SheetPrimitive.Close;
1277
- var SheetPortal = SheetPrimitive.Portal;
1278
- var SheetOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1279
- SheetPrimitive.Overlay,
1280
- {
1281
- className: cn(
1282
- "fixed inset-0 z-50 bg-black-a6 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
1283
- className
1284
- ),
1285
- ref,
1286
- ...props
1287
- }
1288
- ));
1289
- SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
1290
- var sheetVariants = cva(
1291
- "fixed z-50 gap-4 bg-slate-2 shadow-lg transition ease-in-out p-safe-offset-6 data-[state=closed]:duration-300 data-[state=open]:duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out",
1292
- {
1293
- variants: {
1294
- side: {
1295
- top: "inset-x-0 top-0 data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
1296
- bottom: "inset-x-0 bottom-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
1297
- left: "inset-y-0 left-0 h-full w-3/4 data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
1298
- right: "inset-y-0 right-0 h-full w-3/4 data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
1299
- }
1300
- },
1301
- defaultVariants: {
1302
- side: "right"
1303
- }
1304
- }
1305
- );
1306
- var SheetContent = React4.forwardRef(({ side = "right", className, children, closeLabel, closeClassName, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
1307
- /* @__PURE__ */ jsx(SheetOverlay, {}),
1308
- /* @__PURE__ */ jsxs(
1309
- SheetPrimitive.Content,
1310
- {
1311
- className: cn("text-gray", sheetVariants({ side }), className),
1312
- ref,
1313
- ...props,
1314
- children: [
1315
- closeLabel ? /* @__PURE__ */ jsxs(
1316
- SheetPrimitive.Close,
1317
- {
1318
- className: cn(
1319
- "inline-flex w-fit items-center gap-1 rounded-sm p-1 text-sm font-bold text-spark-a11 transition-colors focus:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-0 disabled:pointer-events-none hover:text-spark-a12",
1320
- closeClassName
1321
- ),
1322
- children: [
1323
- /* @__PURE__ */ jsx(XIcon, {}),
1324
- /* @__PURE__ */ jsx("span", { children: closeLabel })
1325
- ]
1326
- }
1327
- ) : /* @__PURE__ */ jsx(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity focus:outline-hidden focus:ring focus-visible:ring disabled:pointer-events-none data-[state=open]:bg-base-gray-soft hover:opacity-100", children: /* @__PURE__ */ jsx(XIcon, {}) }),
1328
- children
1329
- ]
1330
- }
1331
- )
1332
- ] }));
1333
- SheetContent.displayName = SheetPrimitive.Content.displayName;
1334
- var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
1335
- SheetHeader.displayName = "SheetHeader";
1336
- var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx(
1337
- "div",
1338
- {
1339
- className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
1340
- ...props
1341
- }
1342
- );
1343
- SheetFooter.displayName = "SheetFooter";
1344
- var SheetTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1345
- SheetPrimitive.Title,
1346
- {
1347
- className: cn("text-lg font-semibold text-gray", className),
1348
- ref,
1349
- ...props
1350
- }
1351
- ));
1352
- SheetTitle.displayName = SheetPrimitive.Title.displayName;
1353
- var SheetDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1354
- SheetPrimitive.Description,
1355
- {
1356
- className: cn("text-sm text-gray-light", className),
1357
- ref,
1358
- ...props
1359
- }
1360
- ));
1361
- SheetDescription.displayName = SheetPrimitive.Description.displayName;
1362
- var Slider = React4.forwardRef(
1363
- ({ className, hint, min = 0, max = 100, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center gap-2", children: [
1364
- /* @__PURE__ */ jsxs("span", { className: "inline-flex gap-0.75 pr-2 text-sm text-gray-light", children: [
1365
- min,
1366
- hint ? /* @__PURE__ */ jsx("span", { children: hint }) : null
1367
- ] }),
1368
- /* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxs(
1369
- SliderPrimitive.Root,
1370
- {
1371
- className: cn("relative flex h-5 touch-none select-none items-center", className),
1372
- max,
1373
- min,
1374
- ref,
1375
- ...props,
1376
- children: [
1377
- /* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-[5px] w-full grow rounded-md bg-slate-a7", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full rounded-md bg-base-accent-solid outline-hidden focus:outline-hidden" }) }),
1378
- /* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block size-4 rounded-circle bg-base-accent-solid outline-hidden ring-4 ring-spark-a8 ring-offset-2 ring-offset-spark-3 focus:outline-hidden dark:ring-offset-white-contrast" })
1379
- ]
1380
- }
1381
- ) }),
1382
- /* @__PURE__ */ jsxs("span", { className: "inline-flex gap-0.75 pl-2 text-sm text-gray-light", children: [
1383
- max,
1384
- hint ? /* @__PURE__ */ jsx("span", { children: hint }) : null
1385
- ] })
1386
- ] })
1387
- );
1388
- Slider.displayName = "Slider";
1389
- var CloseIcon = (props) => /* @__PURE__ */ jsx(
1390
- "svg",
1391
- {
1392
- fill: "none",
1393
- height: "12",
1394
- viewBox: "0 0 12 12",
1395
- width: "12",
1396
- xmlns: "http://www.w3.org/2000/svg",
1397
- ...props,
1398
- children: /* @__PURE__ */ jsx("g", { opacity: "0.6", children: /* @__PURE__ */ jsx(
1399
- "path",
1400
- {
1401
- d: "M6.00003 6.6999L3.55002 9.1499C3.45836 9.24157 3.34169 9.2874 3.20002 9.2874C3.05836 9.2874 2.94169 9.24157 2.85002 9.1499C2.75836 9.05824 2.71252 8.94157 2.71252 8.7999C2.71252 8.65824 2.75836 8.54157 2.85002 8.4499L5.30002 5.9999L2.85002 3.5499C2.75836 3.45824 2.71252 3.34157 2.71252 3.1999C2.71252 3.05824 2.75836 2.94157 2.85002 2.8499C2.94169 2.75824 3.05836 2.7124 3.20002 2.7124C3.34169 2.7124 3.45836 2.75824 3.55002 2.8499L6.00003 5.2999L8.45003 2.8499C8.54169 2.75824 8.65836 2.7124 8.80003 2.7124C8.94169 2.7124 9.05836 2.75824 9.15003 2.8499C9.24169 2.94157 9.28753 3.05824 9.28753 3.1999C9.28753 3.34157 9.24169 3.45824 9.15003 3.5499L6.70002 5.9999L9.15003 8.4499C9.24169 8.54157 9.28753 8.65824 9.28753 8.7999C9.28753 8.94157 9.24169 9.05824 9.15003 9.1499C9.05836 9.24157 8.94169 9.2874 8.80003 9.2874C8.65836 9.2874 8.54169 9.24157 8.45003 9.1499L6.00003 6.6999Z",
1402
- fill: "currentColor"
1403
- }
1404
- ) })
1405
- }
1406
- );
1407
- var CheckIcon2 = (props) => /* @__PURE__ */ jsx(
1408
- "svg",
1409
- {
1410
- fill: "none",
1411
- height: "12",
1412
- viewBox: "0 0 12 12",
1413
- width: "12",
1414
- xmlns: "http://www.w3.org/2000/svg",
1415
- ...props,
1416
- children: /* @__PURE__ */ jsx(
1417
- "path",
1418
- {
1419
- d: "M4.77498 7.575L9.01248 3.3375C9.11248 3.2375 9.22915 3.1875 9.36248 3.1875C9.49582 3.1875 9.61248 3.2375 9.71248 3.3375C9.81248 3.4375 9.86248 3.55625 9.86248 3.69375C9.86248 3.83125 9.81248 3.95 9.71248 4.05L5.12498 8.65C5.02498 8.75 4.90832 8.8 4.77498 8.8C4.64165 8.8 4.52498 8.75 4.42498 8.65L2.27498 6.5C2.17498 6.4 2.12706 6.28125 2.13123 6.14375C2.1354 6.00625 2.18748 5.8875 2.28748 5.7875C2.38748 5.6875 2.50623 5.6375 2.64373 5.6375C2.78123 5.6375 2.89998 5.6875 2.99998 5.7875L4.77498 7.575Z",
1420
- fill: "currentColor"
1421
- }
1422
- )
1423
- }
1424
- );
1425
- var Switch = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1426
- SwitchPrimitives.Root,
1427
- {
1428
- className: cn(
1429
- "peer inline-flex h-6 w-10 shrink-0 cursor-pointer items-center rounded-circle border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-base-accent-solid data-[state=unchecked]:bg-base-accent-soft",
1430
- className
1431
- ),
1432
- ref,
1433
- ...props,
1434
- children: /* @__PURE__ */ jsx(
1435
- SwitchPrimitives.Thumb,
1436
- {
1437
- className: cn(
1438
- "pointer-events-none inline-flex h-5 w-5 items-center justify-center rounded-circle bg-white-contrast shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
1439
- ),
1440
- children: props.checked ? /* @__PURE__ */ jsx(CheckIcon2, { className: "text-accent-active dark:text-spark-8", role: "presentation" }) : /* @__PURE__ */ jsx(CloseIcon, { className: "text-gray-light dark:text-slate-8", role: "presentation" })
1441
- }
1442
- )
1443
- }
1444
- ));
1445
- Switch.displayName = "Switch";
1446
- var Tabs = TabsPrimitive.Root;
1447
- var tabsListVariants = {
1448
- default: "inline-flex h-10 items-center justify-center gap-1",
1449
- underline: "inline-flex h-10 items-center gap-4 border-b border-gray",
1450
- pill: "inline-flex h-10 items-center gap-0 rounded-lg bg-slate-a3 p-1"
1451
- };
1452
- var TabsList = React4.forwardRef(({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx(
1453
- TabsPrimitive.List,
1454
- {
1455
- className: cn(tabsListVariants[variant], className),
1456
- "data-variant": variant,
1457
- ref,
1458
- ...props
1459
- }
1460
- ));
1461
- TabsList.displayName = TabsPrimitive.List.displayName;
1462
- var tabsTriggerBase = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-all duration-200 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-0 disabled:pointer-events-none disabled:opacity-50";
1463
- var tabsTriggerVariants = {
1464
- default: "rounded-sm px-3 py-1.5 text-gray-light data-[state=active]:text-accent-active",
1465
- underline: "relative px-1 pb-2.5 text-gray-light data-[state=active]:text-accent-active after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-full after:scale-x-0 after:bg-base-accent-solid after:transition-transform data-[state=active]:after:scale-x-100",
1466
- pill: "rounded-md px-4 py-1.5 text-gray-light data-[state=active]:bg-slate-1 data-[state=active]:text-accent-active data-[state=active]:shadow-sm"
1467
- };
1468
- var TabsTrigger = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1469
- TabsPrimitive.Trigger,
1470
- {
1471
- className: cn(
1472
- tabsTriggerBase,
1473
- // Auto-detect variant from parent via CSS — fallback to default styling.
1474
- // The variant-specific classes are applied via group selectors.
1475
- "group-data-[variant=underline]:relative group-data-[variant=underline]:px-1 group-data-[variant=underline]:pb-2.5",
1476
- tabsTriggerVariants.default,
1477
- className
1478
- ),
1479
- ref,
1480
- ...props,
1481
- children: props.children
1482
- }
1483
- ));
1484
- TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
1485
- var TabsTriggerUnderline = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1486
- TabsPrimitive.Trigger,
1487
- {
1488
- className: cn(tabsTriggerBase, tabsTriggerVariants.underline, className),
1489
- ref,
1490
- ...props
1491
- }
1492
- ));
1493
- TabsTriggerUnderline.displayName = "TabsTriggerUnderline";
1494
- var TabsTriggerPill = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1495
- TabsPrimitive.Trigger,
1496
- {
1497
- className: cn(tabsTriggerBase, tabsTriggerVariants.pill, className),
1498
- ref,
1499
- ...props
1500
- }
1501
- ));
1502
- TabsTriggerPill.displayName = "TabsTriggerPill";
1503
- var TabsContent = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1504
- TabsPrimitive.Content,
1505
- {
1506
- className: cn(
1507
- "focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-0",
1508
- className
1509
- ),
1510
- ref,
1511
- ...props
1512
- }
1513
- ));
1514
- TabsContent.displayName = TabsPrimitive.Content.displayName;
1515
-
1516
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Badge, Button, Callout, Card, CardContent, CardDescription, CardFooter, CardHeader, CardIcon, CardSkeleton, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, DisplayFieldContent, DisplayFieldLabel, DisplayFieldSkeleton, DisplayFieldValue, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, EnergyFlowChart, Input, Label, LineChart, Popover, PopoverContent, PopoverTrigger, Progress, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectTriggerIcon, SelectValue, Separator2 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Slider, Switch, Tabs, TabsContent, TabsList, TabsTrigger, TabsTriggerPill, TabsTriggerUnderline, buttonVariants, cn, sheetVariants };
1517
- //# sourceMappingURL=index.js.map
1518
- //# sourceMappingURL=index.js.map