@cognite/aura 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/README.md +36 -3
  2. package/dist/colors.css +30 -0
  3. package/dist/components/index.d.ts +6 -36
  4. package/dist/components/index.js +311 -347
  5. package/dist/components/ui/core/accordion/accordion.d.ts +7 -7
  6. package/dist/components/ui/core/accordion/accordion.js +49 -47
  7. package/dist/components/ui/core/action-toolbar/action-toolbar.d.ts +41 -0
  8. package/dist/components/ui/core/action-toolbar/action-toolbar.js +176 -0
  9. package/dist/components/ui/core/alert/alert.d.ts +23 -12
  10. package/dist/components/ui/core/alert/alert.js +123 -120
  11. package/dist/components/ui/core/avatar/avatar.d.ts +12 -8
  12. package/dist/components/ui/core/badge/badge.d.ts +11 -8
  13. package/dist/components/ui/core/banner/banner.d.ts +18 -28
  14. package/dist/components/ui/core/banner/banner.js +6 -6
  15. package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +10 -9
  16. package/dist/components/ui/core/breadcrumb/breadcrumb.js +98 -88
  17. package/dist/components/ui/core/button/button.d.ts +8 -5
  18. package/dist/components/ui/core/button/button.js +22 -19
  19. package/dist/components/ui/core/button-group/button-group.d.ts +7 -6
  20. package/dist/components/ui/core/card/card.d.ts +17 -16
  21. package/dist/components/ui/core/chart/chart.d.ts +69 -0
  22. package/dist/components/ui/core/chart/chart.js +215 -0
  23. package/dist/components/ui/core/chart/index.d.ts +2 -0
  24. package/dist/components/ui/core/chart/index.js +8 -0
  25. package/dist/components/ui/core/checkbox/checkbox.d.ts +13 -9
  26. package/dist/components/ui/core/checkbox/checkbox.js +38 -34
  27. package/dist/components/ui/core/code-block/code-block.d.ts +6 -9
  28. package/dist/components/ui/core/code-block/code-block.js +52 -48
  29. package/dist/components/ui/core/collapsible/collapsible.d.ts +5 -3
  30. package/dist/components/ui/core/combobox/combobox.d.ts +2 -2
  31. package/dist/components/ui/core/command/command.d.ts +11 -78
  32. package/dist/components/ui/core/command/command.js +53 -52
  33. package/dist/components/ui/core/count/count.d.ts +7 -6
  34. package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.d.ts +15 -0
  35. package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +99 -0
  36. package/dist/components/ui/core/date-time-pickers/date-range-picker/index.d.ts +3 -0
  37. package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +25 -0
  38. package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.d.ts +4 -0
  39. package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +82 -0
  40. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.d.ts +17 -0
  41. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +190 -0
  42. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.d.ts +3 -0
  43. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +42 -0
  44. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.d.ts +3 -0
  45. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +161 -0
  46. package/dist/components/ui/core/date-time-pickers/index.d.ts +6 -0
  47. package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +7 -0
  48. package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +57 -0
  49. package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.d.ts +13 -0
  50. package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +119 -0
  51. package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.d.ts +10 -0
  52. package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +93 -0
  53. package/dist/components/ui/core/date-time-pickers/shared/constants.d.ts +20 -0
  54. package/dist/components/ui/core/date-time-pickers/shared/constants.js +14 -0
  55. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +19 -0
  56. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +99 -0
  57. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.d.ts +12 -0
  58. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +68 -0
  59. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +12 -0
  60. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +40 -0
  61. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.d.ts +29 -0
  62. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +63 -0
  63. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.d.ts +8 -0
  64. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +19 -0
  65. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.d.ts +17 -0
  66. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +34 -0
  67. package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.d.ts +8 -0
  68. package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +7 -0
  69. package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.d.ts +13 -0
  70. package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +31 -0
  71. package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.d.ts +10 -0
  72. package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +52 -0
  73. package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.d.ts +48 -0
  74. package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +52 -0
  75. package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.d.ts +26 -0
  76. package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +37 -0
  77. package/dist/components/ui/core/date-time-pickers/utils/segment-utils.d.ts +34 -0
  78. package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +43 -0
  79. package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +15 -0
  80. package/dist/components/ui/core/date-time-pickers/utils/time-validation.d.ts +23 -0
  81. package/dist/components/ui/core/dialog/dialog.d.ts +10 -10
  82. package/dist/components/ui/core/dialog/dialog.js +12 -3
  83. package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +24 -47
  84. package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +125 -123
  85. package/dist/components/ui/core/empty-state/empty-state.context.d.ts +10 -0
  86. package/dist/components/ui/core/empty-state/empty-state.context.js +8 -0
  87. package/dist/components/ui/core/empty-state/empty-state.d.ts +18 -0
  88. package/dist/components/ui/core/empty-state/empty-state.js +139 -0
  89. package/dist/components/ui/core/helper-text/helper-text.d.ts +7 -5
  90. package/dist/components/ui/core/hover-card/hover-card.d.ts +5 -7
  91. package/dist/components/ui/core/hover-card/hover-card.js +26 -25
  92. package/dist/components/ui/core/inline-citation/inline-citation.d.ts +10 -10
  93. package/dist/components/ui/core/inline-citation/inline-citation.js +57 -49
  94. package/dist/components/ui/core/input/input.d.ts +2 -1
  95. package/dist/components/ui/core/input-group/input-group.d.ts +17 -13
  96. package/dist/components/ui/core/input-group/input-group.js +35 -36
  97. package/dist/components/ui/core/kbd/kbd.d.ts +3 -2
  98. package/dist/components/ui/core/label/label.d.ts +3 -2
  99. package/dist/components/ui/core/loader/loader.d.ts +2 -2
  100. package/dist/components/ui/core/message/message.d.ts +18 -17
  101. package/dist/components/ui/core/message/message.js +15 -13
  102. package/dist/components/ui/core/pagination/pagination-size-context.d.ts +5 -0
  103. package/dist/components/ui/core/pagination/pagination-size-context.js +6 -0
  104. package/dist/components/ui/core/pagination/pagination-teleport.d.ts +11 -0
  105. package/dist/components/ui/core/pagination/pagination-teleport.js +108 -0
  106. package/dist/components/ui/core/pagination/pagination-teleport.utils.d.ts +1 -0
  107. package/dist/components/ui/core/pagination/pagination-teleport.utils.js +7 -0
  108. package/dist/components/ui/core/pagination/pagination.d.ts +41 -0
  109. package/dist/components/ui/core/pagination/pagination.js +335 -0
  110. package/dist/components/ui/core/popover/popover.d.ts +12 -16
  111. package/dist/components/ui/core/popover/popover.js +52 -51
  112. package/dist/components/ui/core/progress/progress.d.ts +7 -4
  113. package/dist/components/ui/core/prompt-input/prompt-input.d.ts +36 -103
  114. package/dist/components/ui/core/prompt-input/prompt-input.js +193 -180
  115. package/dist/components/ui/core/radio-group/radio-group.d.ts +12 -8
  116. package/dist/components/ui/core/radio-group/radio-group.js +58 -55
  117. package/dist/components/ui/core/reasoning/reasoning.d.ts +5 -5
  118. package/dist/components/ui/core/reasoning/reasoning.js +1 -1
  119. package/dist/components/ui/core/scroll-area/scroll-area.d.ts +4 -2
  120. package/dist/components/ui/core/search/search.d.ts +10 -0
  121. package/dist/components/ui/core/search/search.js +99 -0
  122. package/dist/components/ui/core/segmented-control/segmented-control.d.ts +15 -11
  123. package/dist/components/ui/core/segmented-control/segmented-control.js +7 -4
  124. package/dist/components/ui/core/select/select.d.ts +13 -13
  125. package/dist/components/ui/core/select/select.js +13 -10
  126. package/dist/components/ui/core/separator/separator.d.ts +2 -4
  127. package/dist/components/ui/core/separator/separator.js +4 -5
  128. package/dist/components/ui/core/shimmer/shimmer.d.ts +3 -5
  129. package/dist/components/ui/core/shimmer/shimmer.js +25 -26
  130. package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -1
  131. package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +2 -1
  132. package/dist/components/ui/core/sources/sources.d.ts +3 -3
  133. package/dist/components/ui/core/sources/sources.js +6 -1
  134. package/dist/components/ui/core/switch/switch.d.ts +11 -0
  135. package/dist/components/ui/core/{button/button.metadata.d.ts → switch/switch.metadata.d.ts} +1 -1
  136. package/dist/components/ui/core/tabs/tabs.d.ts +21 -17
  137. package/dist/components/ui/core/tabs/tabs.js +14 -12
  138. package/dist/components/ui/core/textarea/textarea.d.ts +2 -1
  139. package/dist/components/ui/core/textarea/textarea.js +20 -18
  140. package/dist/components/ui/core/tool/tool.d.ts +7 -6
  141. package/dist/components/ui/core/tool/tool.js +48 -44
  142. package/dist/components/ui/core/tooltip/tooltip.d.ts +6 -5
  143. package/dist/components/ui/core/tooltip/tooltip.js +10 -8
  144. package/dist/components/ui/core/topbar/topbar.d.ts +11 -13
  145. package/dist/eslint/index.d.ts +2 -1
  146. package/dist/index.d.ts +1 -1
  147. package/dist/index.js +302 -336
  148. package/dist/lib/portal-container-context.d.ts +2 -1
  149. package/dist/lib/portal-container-context.js +1 -3
  150. package/dist/styles.css +1 -1
  151. package/dist/styles.source.css +9 -1
  152. package/package.json +22 -1
  153. package/dist/components/ui/core/accordion/accordion.metadata.d.ts +0 -2
  154. package/dist/components/ui/core/accordion/accordion.metadata.js +0 -9
  155. package/dist/components/ui/core/alert/alert.metadata.d.ts +0 -2
  156. package/dist/components/ui/core/alert/alert.metadata.js +0 -9
  157. package/dist/components/ui/core/avatar/avatar.metadata.d.ts +0 -8
  158. package/dist/components/ui/core/avatar/avatar.metadata.js +0 -9
  159. package/dist/components/ui/core/badge/badge.metadata.d.ts +0 -2
  160. package/dist/components/ui/core/badge/badge.metadata.js +0 -8
  161. package/dist/components/ui/core/banner/banner.metadata.d.ts +0 -2
  162. package/dist/components/ui/core/banner/banner.metadata.js +0 -9
  163. package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.d.ts +0 -2
  164. package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.js +0 -9
  165. package/dist/components/ui/core/button/button.metadata.js +0 -9
  166. package/dist/components/ui/core/button-group/button-group.metadata.d.ts +0 -2
  167. package/dist/components/ui/core/button-group/button-group.metadata.js +0 -8
  168. package/dist/components/ui/core/card/card.metadata.d.ts +0 -8
  169. package/dist/components/ui/core/card/card.metadata.js +0 -9
  170. package/dist/components/ui/core/code-block/code-block.metadata.d.ts +0 -2
  171. package/dist/components/ui/core/code-block/code-block.metadata.js +0 -8
  172. package/dist/components/ui/core/collapsible/collapsible.metadata.d.ts +0 -2
  173. package/dist/components/ui/core/collapsible/collapsible.metadata.js +0 -9
  174. package/dist/components/ui/core/combobox/combobox.metadata.d.ts +0 -2
  175. package/dist/components/ui/core/command/command.metadata.d.ts +0 -2
  176. package/dist/components/ui/core/command/command.metadata.js +0 -9
  177. package/dist/components/ui/core/dialog/dialog.metadata.d.ts +0 -2
  178. package/dist/components/ui/core/dialog/dialog.metadata.js +0 -9
  179. package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.d.ts +0 -2
  180. package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.js +0 -9
  181. package/dist/components/ui/core/helper-text/helper-text.metadata.d.ts +0 -2
  182. package/dist/components/ui/core/helper-text/helper-text.metadata.js +0 -9
  183. package/dist/components/ui/core/hover-card/hover-card.metadata.d.ts +0 -2
  184. package/dist/components/ui/core/hover-card/hover-card.metadata.js +0 -8
  185. package/dist/components/ui/core/inline-citation/inline-citation.metadata.d.ts +0 -2
  186. package/dist/components/ui/core/inline-citation/inline-citation.metadata.js +0 -8
  187. package/dist/components/ui/core/input/input.metadata.d.ts +0 -2
  188. package/dist/components/ui/core/input/input.metadata.js +0 -9
  189. package/dist/components/ui/core/input-group/input-group.metadata.d.ts +0 -2
  190. package/dist/components/ui/core/input-group/input-group.metadata.js +0 -9
  191. package/dist/components/ui/core/kbd/kbd.metadata.d.ts +0 -2
  192. package/dist/components/ui/core/kbd/kbd.metadata.js +0 -9
  193. package/dist/components/ui/core/label/label.metadata.d.ts +0 -2
  194. package/dist/components/ui/core/label/label.metadata.js +0 -9
  195. package/dist/components/ui/core/loader/loader.metadata.d.ts +0 -2
  196. package/dist/components/ui/core/loader/loader.metadata.js +0 -9
  197. package/dist/components/ui/core/message/message.metadata.d.ts +0 -2
  198. package/dist/components/ui/core/popover/popover.metadata.d.ts +0 -2
  199. package/dist/components/ui/core/popover/popover.metadata.js +0 -9
  200. package/dist/components/ui/core/progress/progress.metadata.d.ts +0 -2
  201. package/dist/components/ui/core/progress/progress.metadata.js +0 -9
  202. package/dist/components/ui/core/prompt-input/prompt-input.metadata.d.ts +0 -2
  203. package/dist/components/ui/core/prompt-input/prompt-input.metadata.js +0 -9
  204. package/dist/components/ui/core/radio-group/radio-group.metadata.d.ts +0 -2
  205. package/dist/components/ui/core/radio-group/radio-group.metadata.js +0 -9
  206. package/dist/components/ui/core/reasoning/reasoning.metadata.d.ts +0 -2
  207. package/dist/components/ui/core/reasoning/reasoning.metadata.js +0 -8
  208. package/dist/components/ui/core/scroll-area/scroll-area.metadata.d.ts +0 -2
  209. package/dist/components/ui/core/scroll-area/scroll-area.metadata.js +0 -9
  210. package/dist/components/ui/core/select/select.metadata.d.ts +0 -2
  211. package/dist/components/ui/core/select/select.metadata.js +0 -9
  212. package/dist/components/ui/core/separator/separator.metadata.d.ts +0 -2
  213. package/dist/components/ui/core/separator/separator.metadata.js +0 -8
  214. package/dist/components/ui/core/shimmer/shimmer.metadata.d.ts +0 -2
  215. package/dist/components/ui/core/shimmer/shimmer.metadata.js +0 -9
  216. package/dist/components/ui/core/skeleton/skeleton.metadata.d.ts +0 -2
  217. package/dist/components/ui/core/skeleton/skeleton.metadata.js +0 -9
  218. package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.d.ts +0 -2
  219. package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.js +0 -9
  220. package/dist/components/ui/core/sources/sources.metadata.d.ts +0 -2
  221. package/dist/components/ui/core/textarea/textarea.metadata.d.ts +0 -2
  222. package/dist/components/ui/core/textarea/textarea.metadata.js +0 -9
  223. package/dist/components/ui/core/tool/tool.metadata.d.ts +0 -2
  224. package/dist/components/ui/core/tool/tool.metadata.js +0 -8
  225. package/dist/components/ui/core/tooltip/tooltip.metadata.d.ts +0 -8
  226. package/dist/components/ui/core/tooltip/tooltip.metadata.js +0 -9
@@ -47,101 +47,111 @@ const f = o(
47
47
  )
48
48
  );
49
49
  f.displayName = "BreadcrumbItem";
50
- const x = o(({ className: e, render: t, children: r, ...s }, d) => l({
51
- defaultTagName: "a",
52
- ref: d,
53
- props: m(
54
- {
55
- ...{
56
- "data-slot": "breadcrumb-link"
50
+ const x = o(
51
+ ({ className: e, render: t, children: r, ...s }, d) => l({
52
+ defaultTagName: "a",
53
+ ref: d,
54
+ props: m(
55
+ {
56
+ ...{
57
+ "data-slot": "breadcrumb-link"
58
+ },
59
+ className: n(
60
+ "inline-flex h-7 items-center justify-center gap-2 rounded-md px-[6px] py-1",
61
+ "text-muted-foreground text-sm leading-[18px] tracking-tight font-normal",
62
+ "transition-colors hover:bg-accent-background hover:text-foreground",
63
+ "aria-[current=page]:font-medium aria-[current=page]:text-foreground",
64
+ e
65
+ )
57
66
  },
67
+ { ...s, children: r }
68
+ ),
69
+ render: t,
70
+ state: {
71
+ slot: "breadcrumb-link"
72
+ }
73
+ })
74
+ );
75
+ x.displayName = "BreadcrumbLink";
76
+ const h = o(
77
+ ({ className: e, ...t }, r) => /* @__PURE__ */ a(
78
+ "span",
79
+ {
80
+ ref: r,
81
+ "data-slot": "breadcrumb-page",
82
+ role: "link",
83
+ "aria-disabled": "true",
84
+ "aria-current": "page",
85
+ tabIndex: -1,
58
86
  className: n(
59
87
  "inline-flex h-7 items-center justify-center gap-2 rounded-md px-[6px] py-1",
60
- "text-muted-foreground text-sm leading-[18px] tracking-tight font-normal",
61
- "transition-colors hover:bg-accent-background hover:text-foreground",
62
- "aria-[current=page]:font-medium aria-[current=page]:text-foreground",
88
+ "cursor-default hover:bg-transparent dark:hover:bg-transparent",
89
+ "text-sm leading-[18px] tracking-tight font-medium text-foreground",
63
90
  e
64
- )
65
- },
66
- { ...s, children: r }
67
- ),
68
- render: t,
69
- state: {
70
- slot: "breadcrumb-link"
71
- }
72
- }));
73
- x.displayName = "BreadcrumbLink";
74
- const h = o(({ className: e, ...t }, r) => /* @__PURE__ */ a(
75
- "span",
76
- {
77
- ref: r,
78
- "data-slot": "breadcrumb-page",
79
- role: "link",
80
- "aria-disabled": "true",
81
- "aria-current": "page",
82
- tabIndex: -1,
83
- className: n(
84
- "inline-flex h-7 items-center justify-center gap-2 rounded-md px-[6px] py-1",
85
- "cursor-default hover:bg-transparent dark:hover:bg-transparent",
86
- "text-sm leading-[18px] tracking-tight font-medium text-foreground",
87
- e
88
- ),
89
- ...t
90
- }
91
- ));
91
+ ),
92
+ ...t
93
+ }
94
+ )
95
+ );
92
96
  h.displayName = "BreadcrumbPage";
93
- const N = o(({ className: e, ...t }, r) => /* @__PURE__ */ a(
94
- "button",
95
- {
96
- ref: r,
97
- "data-slot": "breadcrumb-page-button",
98
- type: "button",
99
- "aria-current": "page",
100
- className: n(
101
- "inline-flex h-7 items-center justify-center gap-2 rounded-md px-[6px] py-1",
102
- "text-sm leading-[18px] tracking-tight font-medium text-foreground",
103
- "transition-colors hover:bg-accent-background",
104
- e
105
- ),
106
- ...t
107
- }
108
- ));
97
+ const N = o(
98
+ ({ className: e, ...t }, r) => /* @__PURE__ */ a(
99
+ "button",
100
+ {
101
+ ref: r,
102
+ "data-slot": "breadcrumb-page-button",
103
+ type: "button",
104
+ "aria-current": "page",
105
+ className: n(
106
+ "inline-flex h-7 items-center justify-center gap-2 rounded-md px-[6px] py-1",
107
+ "text-sm leading-[18px] tracking-tight font-medium text-foreground",
108
+ "transition-colors hover:bg-accent-background",
109
+ e
110
+ ),
111
+ ...t
112
+ }
113
+ )
114
+ );
109
115
  N.displayName = "BreadcrumbPageButton";
110
- const y = o(({ className: e, children: t, ...r }, s) => /* @__PURE__ */ a(
111
- "button",
112
- {
113
- ref: s,
114
- "data-slot": "breadcrumb-ellipsis-button",
115
- type: "button",
116
- className: n(
117
- "flex size-7 items-center justify-center rounded-md",
118
- "text-muted-foreground transition-colors hover:bg-accent-background hover:text-foreground",
119
- "data-[popup-open]:bg-accent-background data-[popup-open]:text-foreground",
120
- e
121
- ),
122
- ...r,
123
- children: t ?? /* @__PURE__ */ u(c, { children: [
124
- /* @__PURE__ */ a(i, { className: "size-3" }),
125
- /* @__PURE__ */ a("span", { className: "sr-only", children: "More" })
126
- ] })
127
- }
128
- ));
116
+ const y = o(
117
+ ({ className: e, children: t, ...r }, s) => /* @__PURE__ */ a(
118
+ "button",
119
+ {
120
+ ref: s,
121
+ "data-slot": "breadcrumb-ellipsis-button",
122
+ type: "button",
123
+ className: n(
124
+ "flex size-7 items-center justify-center rounded-md",
125
+ "text-muted-foreground transition-colors hover:bg-accent-background hover:text-foreground",
126
+ "data-[popup-open]:bg-accent-background data-[popup-open]:text-foreground",
127
+ e
128
+ ),
129
+ ...r,
130
+ children: t ?? /* @__PURE__ */ u(c, { children: [
131
+ /* @__PURE__ */ a(i, { className: "size-3" }),
132
+ /* @__PURE__ */ a("span", { className: "sr-only", children: "More" })
133
+ ] })
134
+ }
135
+ )
136
+ );
129
137
  y.displayName = "BreadcrumbEllipsisButton";
130
- const B = o(({ children: e, className: t, ...r }, s) => /* @__PURE__ */ a(
131
- "li",
132
- {
133
- ref: s,
134
- "data-slot": "breadcrumb-separator",
135
- role: "presentation",
136
- "aria-hidden": "true",
137
- className: n(
138
- "flex size-4 items-center justify-center [&>svg]:size-4",
139
- t
140
- ),
141
- ...r,
142
- children: e ?? /* @__PURE__ */ a(p, { className: "size-4 text-muted-foreground" })
143
- }
144
- ));
138
+ const B = o(
139
+ ({ children: e, className: t, ...r }, s) => /* @__PURE__ */ a(
140
+ "li",
141
+ {
142
+ ref: s,
143
+ "data-slot": "breadcrumb-separator",
144
+ role: "presentation",
145
+ "aria-hidden": "true",
146
+ className: n(
147
+ "flex size-4 items-center justify-center [&>svg]:size-4",
148
+ t
149
+ ),
150
+ ...r,
151
+ children: e ?? /* @__PURE__ */ a(p, { className: "size-4 text-muted-foreground" })
152
+ }
153
+ )
154
+ );
145
155
  B.displayName = "BreadcrumbSeparator";
146
156
  const k = o(
147
157
  ({ children: e, className: t, ...r }, s) => {
@@ -1,9 +1,12 @@
1
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
1
2
  import { Button as ButtonPrimitive } from '@base-ui/react/button';
2
3
  import { VariantProps } from 'class-variance-authority';
3
- declare const buttonVariants: (props?: ({
4
- variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
5
- size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
6
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
4
+ import { ClassProp } from 'class-variance-authority/types';
5
+ export interface ButtonVariantProps {
6
+ variant?: 'default' | 'defaultOnDark' | 'secondary' | 'secondaryOnDark' | 'outline' | 'ghost' | 'ghostOnDark' | 'destructive' | null;
7
+ size?: 'default' | 'sm' | 'lg' | 'icon' | 'icon-sm' | 'icon-lg' | null;
8
+ }
9
+ declare const buttonVariants: (props?: (ButtonVariantProps & ClassProp) | undefined) => string;
7
10
  type ButtonProps = ButtonPrimitive.Props & VariantProps<typeof buttonVariants>;
8
- declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
11
+ declare const Button: ForwardRefExoticComponent<Omit<ButtonProps, 'ref'> & RefAttributes<HTMLElement>>;
9
12
  export { Button, buttonVariants };
@@ -1,18 +1,21 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { forwardRef as c } from "react";
3
- import { Button as u } from "@base-ui/react/button";
4
- import { cva as g } from "class-variance-authority";
5
- import { focusRing as b, focusRingDestructive as v, cn as l } from "../../../../lib/utils.js";
6
- const p = g(
7
- `inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm leading-4.5 tracking-normal font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 ${b} aria-invalid:focus-visible:shadow-focus-ring-destructive`,
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as g } from "react";
3
+ import { Button as b } from "@base-ui/react/button";
4
+ import { cva as c } from "class-variance-authority";
5
+ import { cn as u, focusRing as f, focusRingDestructive as l } from "../../../../lib/utils.js";
6
+ const v = c(
7
+ `inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm leading-4.5 tracking-normal font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 ${f} aria-invalid:focus-visible:shadow-focus-ring-destructive`,
8
8
  {
9
9
  variants: {
10
10
  variant: {
11
11
  default: "bg-primary-background text-foreground-on-primary hover:bg-primary-background-hover",
12
+ defaultOnDark: "bg-primary-background-fixed-dark text-foreground-fixed-dark hover:bg-primary-background-fixed-dark-hover disabled:opacity-100 disabled:bg-disabled-background-fixed-dark disabled:text-disabled-foreground-fixed-dark",
12
13
  secondary: "bg-secondary-background text-secondary-foreground hover:bg-secondary-background-hover",
14
+ secondaryOnDark: "bg-secondary-background-fixed-dark text-foreground-fixed-light hover:bg-secondary-background-fixed-dark-hover disabled:opacity-100 disabled:bg-disabled-background-fixed-dark disabled:text-disabled-foreground-fixed-dark",
13
15
  outline: "border border-border-emphasized bg-background text-foreground hover:bg-accent-background disabled:border-transparent disabled:bg-disabled-background",
14
16
  ghost: "hover:bg-accent-background",
15
- destructive: `bg-destructive-background text-destructive-foreground-on-critical hover:bg-destructive-background-hover ${v}`
17
+ ghostOnDark: "text-foreground-fixed-light hover:bg-secondary-background-fixed-dark disabled:opacity-100 disabled:text-disabled-foreground-fixed-dark",
18
+ destructive: `bg-destructive-background text-destructive-foreground-on-critical hover:bg-destructive-background-hover ${l}`
16
19
  },
17
20
  size: {
18
21
  default: "h-9 px-3 has-[>svg]:px-3",
@@ -28,22 +31,22 @@ const p = g(
28
31
  size: "default"
29
32
  }
30
33
  }
31
- ), f = c(
32
- ({ className: r, variant: o, size: t, children: a, render: e, nativeButton: n, ...s }, i) => /* @__PURE__ */ d(
33
- u,
34
+ ), k = g(
35
+ ({ className: r, variant: d, size: a, children: o, render: e, nativeButton: t, ...i }, n) => /* @__PURE__ */ s(
36
+ b,
34
37
  {
35
- ref: i,
38
+ ref: n,
36
39
  "data-slot": "button",
37
40
  render: e,
38
- nativeButton: n ?? (e ? !1 : void 0),
39
- className: l(p({ variant: o, size: t, className: r })),
40
- ...s,
41
- children: a
41
+ nativeButton: t ?? (e ? !1 : void 0),
42
+ className: u(v({ variant: d, size: a, className: r })),
43
+ ...i,
44
+ children: o
42
45
  }
43
46
  )
44
47
  );
45
- f.displayName = "Button";
48
+ k.displayName = "Button";
46
49
  export {
47
- f as Button,
48
- p as buttonVariants
50
+ k as Button,
51
+ v as buttonVariants
49
52
  };
@@ -1,11 +1,12 @@
1
- import { ComponentProps } from 'react';
1
+ import { ComponentProps, ReactNode } from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
3
  import { VariantProps } from 'class-variance-authority';
4
+ import { ClassProp } from 'class-variance-authority/types';
4
5
  import { Separator } from '../separator/separator';
5
6
  declare const buttonGroupVariants: (props?: ({
6
- orientation?: "horizontal" | "vertical" | null | undefined;
7
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
- declare function ButtonGroup({ className, orientation, ...props }: ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>): import("react/jsx-runtime").JSX.Element;
9
- declare function ButtonGroupText({ className, render, children, ...props }: useRender.ComponentProps<'div'>): import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>>;
10
- declare function ButtonGroupSeparator({ className, orientation, ...props }: ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
7
+ orientation?: 'horizontal' | 'vertical' | null | undefined;
8
+ } & ClassProp) | undefined) => string;
9
+ declare function ButtonGroup({ className, orientation, ...props }: ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>): ReactNode;
10
+ declare function ButtonGroupText({ className, render, children, ...props }: useRender.ComponentProps<'div'>): ReactNode;
11
+ declare function ButtonGroupSeparator({ className, orientation, ...props }: ComponentProps<typeof Separator>): ReactNode;
11
12
  export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, };
@@ -1,20 +1,21 @@
1
- import { ReactNode } from 'react';
1
+ import { ForwardRefExoticComponent, RefAttributes, ComponentProps, ReactNode } from 'react';
2
+ import { MenuRoot } from '@base-ui/react';
2
3
  type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
3
- declare const Card: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
4
- declare const CardHeaderStart: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
5
- declare const CardTitle: import('react').ForwardRefExoticComponent<Omit<import('react').ClassAttributes<HTMLHeadingElement> & import('react').HTMLAttributes<HTMLHeadingElement> & {
4
+ declare const Card: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
5
+ declare const CardHeaderStart: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
6
+ declare const CardTitle: ForwardRefExoticComponent<Omit<ComponentProps<'h3'> & {
6
7
  as?: HeadingElement;
7
- }, "ref"> & import('react').RefAttributes<HTMLHeadingElement>>;
8
- declare const CardDescription: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import('react').RefAttributes<HTMLParagraphElement>>;
9
- declare const CardHeaderEnd: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
10
- declare const CardHeader: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
11
- declare const CardHeaderCenter: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
12
- declare const CardActions: import('react').ForwardRefExoticComponent<Omit<import("@base-ui/react").MenuRoot.Props<unknown>, "children"> & {
8
+ }, 'ref'> & RefAttributes<HTMLHeadingElement>>;
9
+ declare const CardDescription: ForwardRefExoticComponent<ComponentProps<'p'> & RefAttributes<HTMLParagraphElement>>;
10
+ declare const CardHeaderEnd: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
11
+ declare const CardHeader: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
12
+ declare const CardHeaderCenter: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
13
+ declare const CardActions: ForwardRefExoticComponent<Omit<MenuRoot.Props<unknown>, 'children'> & {
13
14
  children?: ReactNode;
14
- align?: "start" | "center" | "end";
15
- } & import('react').RefAttributes<HTMLElement>>;
16
- declare const CardContent: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
17
- declare const CardFooter: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
18
- declare const CardFooterStart: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
19
- declare const CardFooterEnd: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
15
+ align?: 'start' | 'center' | 'end';
16
+ } & RefAttributes<HTMLElement>>;
17
+ declare const CardContent: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
18
+ declare const CardFooter: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
19
+ declare const CardFooterStart: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
20
+ declare const CardFooterEnd: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
20
21
  export { Card, CardHeader, CardHeaderCenter, CardHeaderStart, CardHeaderEnd, CardFooter, CardFooterStart, CardFooterEnd, CardTitle, CardActions, CardDescription, CardContent, };
@@ -0,0 +1,69 @@
1
+ import { ComponentProps, CSSProperties, ReactNode } from 'react';
2
+ import { ResponsiveContainer, Tooltip, Legend } from 'recharts';
3
+ export type ChartConfig = {
4
+ [k in string]: {
5
+ label?: ReactNode;
6
+ icon?: ReactNode;
7
+ /** A CSS color or `var(--token)`. Use a token for light/dark theming. */
8
+ color?: string;
9
+ };
10
+ };
11
+ declare function colorVarsFromConfig(config: ChartConfig): CSSProperties;
12
+ type ChartA11yProps = {
13
+ 'aria-label': string;
14
+ 'aria-labelledby'?: never;
15
+ } | {
16
+ 'aria-labelledby': string;
17
+ 'aria-label'?: never;
18
+ };
19
+ type ChartContainerProps = Omit<ComponentProps<'div'>, 'aria-label' | 'aria-labelledby'> & ChartA11yProps & {
20
+ config: ChartConfig;
21
+ children: ComponentProps<typeof ResponsiveContainer>['children'];
22
+ };
23
+ declare function ChartContainer({ id, className, children, config, style, role, ...props }: ChartContainerProps): ReactNode;
24
+ declare const ChartTooltip: typeof Tooltip;
25
+ type TooltipPayloadItem = {
26
+ type?: string;
27
+ name?: string | number;
28
+ dataKey?: string | number;
29
+ value?: string | number;
30
+ color?: string;
31
+ payload?: Record<string, unknown>;
32
+ fill?: string;
33
+ [key: string]: unknown;
34
+ };
35
+ type ChartTooltipContentProps = Omit<ComponentProps<typeof Tooltip>, 'content' | 'formatter' | 'labelFormatter'> & {
36
+ className?: string;
37
+ labelClassName?: string;
38
+ hideLabel?: boolean;
39
+ hideIndicator?: boolean;
40
+ indicator?: 'line' | 'dot' | 'dashed';
41
+ nameKey?: string;
42
+ labelKey?: string;
43
+ payload?: TooltipPayloadItem[];
44
+ label?: string | number;
45
+ color?: string;
46
+ formatter?: (value: string | number, name: string | number, item: TooltipPayloadItem, index: number, payload: Record<string, unknown> | undefined) => ReactNode;
47
+ labelFormatter?: (value: ReactNode, payload: TooltipPayloadItem[]) => ReactNode;
48
+ /** Pass an i18n-aware formatter from your app's locale; defaults to the environment locale. */
49
+ valueFormatter?: (value: string | number) => string;
50
+ };
51
+ declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, valueFormatter, }: ChartTooltipContentProps): ReactNode;
52
+ declare const ChartLegend: typeof Legend;
53
+ type LegendPayloadItem = {
54
+ type?: string;
55
+ value?: string;
56
+ dataKey?: string | number;
57
+ color?: string;
58
+ [key: string]: unknown;
59
+ };
60
+ type ChartLegendContentProps = {
61
+ className?: string;
62
+ hideIcon?: boolean;
63
+ nameKey?: string;
64
+ payload?: LegendPayloadItem[];
65
+ verticalAlign?: 'top' | 'bottom' | 'middle';
66
+ };
67
+ declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: ChartLegendContentProps): ReactNode;
68
+ declare function getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string): ChartConfig[string] | undefined;
69
+ export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, colorVarsFromConfig, getPayloadConfigFromPayload, };
@@ -0,0 +1,215 @@
1
+ import { jsx as a, jsxs as g, Fragment as L } from "react/jsx-runtime";
2
+ import { useMemo as O, createContext as K, useContext as Y } from "react";
3
+ import { Legend as $, Tooltip as D, ResponsiveContainer as M } from "recharts";
4
+ import { cn as i } from "../../../../lib/utils.js";
5
+ function S(e) {
6
+ if (!e)
7
+ return;
8
+ const r = e.trim();
9
+ return { backgroundColor: r, borderColor: r };
10
+ }
11
+ const V = K(null);
12
+ function j() {
13
+ const e = Y(V);
14
+ if (!e)
15
+ throw new Error("useChart must be used within a <ChartContainer>");
16
+ return e;
17
+ }
18
+ function R(e) {
19
+ const r = {};
20
+ for (const [s, n] of Object.entries(e))
21
+ n.color && (r[`--color-${s}`] = n.color);
22
+ return r;
23
+ }
24
+ function Q({
25
+ id: e,
26
+ className: r,
27
+ children: s,
28
+ config: n,
29
+ style: d,
30
+ role: c = "img",
31
+ ...o
32
+ }) {
33
+ const l = O(() => ({ config: n }), [n]), f = R(n);
34
+ return /* @__PURE__ */ a(V.Provider, { value: l, children: /* @__PURE__ */ a(
35
+ "div",
36
+ {
37
+ role: c,
38
+ "data-slot": "chart",
39
+ "data-chart-id": e,
40
+ className: i(
41
+ "[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-chart-gridlines [&_.recharts-curve.recharts-tooltip-cursor]:stroke-chart-gridlines [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-chart-gridlines [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-chart-gridlines flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
42
+ r
43
+ ),
44
+ style: { ...f, ...d },
45
+ ...o,
46
+ children: /* @__PURE__ */ a(M, { children: s })
47
+ }
48
+ ) });
49
+ }
50
+ const U = D, G = [], H = (e) => typeof e == "number" ? e.toLocaleString() : String(e);
51
+ function W({
52
+ active: e,
53
+ payload: r = G,
54
+ className: s,
55
+ indicator: n = "dot",
56
+ hideLabel: d = !1,
57
+ hideIndicator: c = !1,
58
+ label: o,
59
+ labelFormatter: l,
60
+ labelClassName: f,
61
+ formatter: h,
62
+ color: y,
63
+ nameKey: T,
64
+ labelKey: _,
65
+ valueFormatter: A = H
66
+ }) {
67
+ const { config: x } = j(), k = (() => {
68
+ if (d || !r?.length)
69
+ return null;
70
+ const [t] = r, v = `${_ ?? t?.dataKey ?? t?.name ?? "value"}`, C = b(x, t, v), u = !_ && typeof o == "string" ? x[o]?.label ?? o : C?.label;
71
+ return l ? /* @__PURE__ */ a("div", { className: i("font-medium", f), children: l(u, r) }) : u ? /* @__PURE__ */ a("div", { className: i("font-medium", f), children: u }) : null;
72
+ })(), w = !e || !r.length, p = r.length === 1 && n !== "dot";
73
+ return /* @__PURE__ */ a(
74
+ "div",
75
+ {
76
+ className: i(
77
+ "bg-popover-background grid min-w-32 items-start gap-1 rounded-md p-2 text-sm shadow-md",
78
+ w && "invisible",
79
+ s
80
+ ),
81
+ children: w ? null : /* @__PURE__ */ g(L, { children: [
82
+ p ? null : k,
83
+ /* @__PURE__ */ a("div", { className: "grid gap-1.5", children: r.filter((t) => t.type !== "none").map((t, v) => {
84
+ const C = `${T ?? t.name ?? t.dataKey ?? "value"}`, u = b(
85
+ x,
86
+ t,
87
+ C
88
+ ), E = m(t.payload) && typeof t.payload.fill == "string" ? t.payload.fill : void 0, N = y ?? E ?? t.color, F = S(
89
+ typeof N == "string" ? N : void 0
90
+ );
91
+ return /* @__PURE__ */ a(
92
+ "div",
93
+ {
94
+ className: i(
95
+ "[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
96
+ n === "dot" && "items-center"
97
+ ),
98
+ children: h && t.value != null && t.name != null ? h(
99
+ t.value,
100
+ t.name,
101
+ t,
102
+ v,
103
+ m(t.payload) ? t.payload : void 0
104
+ ) : /* @__PURE__ */ g(L, { children: [
105
+ u?.icon ? u.icon : !c && /* @__PURE__ */ a(
106
+ "div",
107
+ {
108
+ className: i("shrink-0 rounded-xs", {
109
+ "h-2 w-2": n === "dot",
110
+ "w-1": n === "line",
111
+ "w-0 border border-dashed bg-transparent": n === "dashed",
112
+ "my-0.5": p && n === "dashed"
113
+ }),
114
+ style: F
115
+ }
116
+ ),
117
+ /* @__PURE__ */ g(
118
+ "div",
119
+ {
120
+ className: i(
121
+ "flex flex-1 justify-between gap-4 leading-none",
122
+ p ? "items-end" : "items-center"
123
+ ),
124
+ children: [
125
+ /* @__PURE__ */ g("div", { className: "grid gap-1", children: [
126
+ p ? k : null,
127
+ /* @__PURE__ */ a("span", { className: "text-muted-foreground", children: u?.label ?? t.name })
128
+ ] }),
129
+ t.value !== void 0 && t.value !== null && /* @__PURE__ */ a("span", { className: "text-foreground tabular-nums", children: A(t.value) })
130
+ ]
131
+ }
132
+ )
133
+ ] })
134
+ },
135
+ t.dataKey ?? v
136
+ );
137
+ }) })
138
+ ] })
139
+ }
140
+ );
141
+ }
142
+ const X = $, I = [];
143
+ function Z({
144
+ className: e,
145
+ hideIcon: r = !1,
146
+ payload: s = I,
147
+ verticalAlign: n = "bottom",
148
+ nameKey: d
149
+ }) {
150
+ const { config: c } = j();
151
+ return s?.length ? /* @__PURE__ */ a(
152
+ "div",
153
+ {
154
+ className: i(
155
+ "flex items-center justify-center gap-4",
156
+ n === "top" ? "pb-3" : "pt-3",
157
+ e
158
+ ),
159
+ children: s.filter((o) => o.type !== "none").map((o, l) => {
160
+ const f = `${d ?? o.dataKey ?? "value"}`, h = b(c, o, f), y = S(
161
+ typeof o.color == "string" ? o.color : void 0
162
+ );
163
+ return /* @__PURE__ */ g(
164
+ "div",
165
+ {
166
+ className: i(
167
+ "[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
168
+ ),
169
+ children: [
170
+ h?.icon && !r ? h.icon : /* @__PURE__ */ a(
171
+ "div",
172
+ {
173
+ className: "h-2 w-2 shrink-0 rounded-xs",
174
+ style: y
175
+ }
176
+ ),
177
+ h?.label ?? o.value
178
+ ]
179
+ },
180
+ o.value ?? l
181
+ );
182
+ })
183
+ }
184
+ ) : null;
185
+ }
186
+ function b(e, r, s) {
187
+ if (!m(r))
188
+ return;
189
+ const n = r, d = m(n.payload) ? n.payload : void 0;
190
+ let c = s;
191
+ const o = P(n, s);
192
+ if (o)
193
+ c = o;
194
+ else {
195
+ const l = d ? P(d, s) : void 0;
196
+ l && (c = l);
197
+ }
198
+ return e[c] ?? e[s];
199
+ }
200
+ function m(e) {
201
+ return typeof e == "object" && e !== null && !Array.isArray(e);
202
+ }
203
+ function P(e, r) {
204
+ const s = e[r];
205
+ return typeof s == "string" ? s : void 0;
206
+ }
207
+ export {
208
+ Q as ChartContainer,
209
+ X as ChartLegend,
210
+ Z as ChartLegendContent,
211
+ U as ChartTooltip,
212
+ W as ChartTooltipContent,
213
+ R as colorVarsFromConfig,
214
+ b as getPayloadConfigFromPayload
215
+ };
@@ -0,0 +1,2 @@
1
+ export { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent, } from './chart';
2
+ export type { ChartConfig } from './chart';
@@ -0,0 +1,8 @@
1
+ import { ChartContainer as e, ChartLegend as n, ChartLegendContent as r, ChartTooltip as C, ChartTooltipContent as a } from "./chart.js";
2
+ export {
3
+ e as ChartContainer,
4
+ n as ChartLegend,
5
+ r as ChartLegendContent,
6
+ C as ChartTooltip,
7
+ a as ChartTooltipContent
8
+ };