@cognite/aura 0.2.0 → 0.3.1

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 (239) hide show
  1. package/DESIGN.md +869 -870
  2. package/README.md +143 -9
  3. package/dist/colors.css +30 -0
  4. package/dist/components/index.d.ts +7 -36
  5. package/dist/components/index.js +319 -350
  6. package/dist/components/ui/core/accordion/accordion.d.ts +7 -7
  7. package/dist/components/ui/core/accordion/accordion.js +49 -47
  8. package/dist/components/ui/core/action-toolbar/action-toolbar.d.ts +41 -0
  9. package/dist/components/ui/core/action-toolbar/action-toolbar.js +176 -0
  10. package/dist/components/ui/core/alert/alert.d.ts +23 -12
  11. package/dist/components/ui/core/alert/alert.js +123 -120
  12. package/dist/components/ui/core/avatar/avatar.d.ts +12 -8
  13. package/dist/components/ui/core/badge/badge.d.ts +11 -8
  14. package/dist/components/ui/core/banner/banner.d.ts +18 -28
  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 +32 -28
  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 +48 -44
  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-picker/date-picker.d.ts +15 -0
  35. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +84 -0
  36. package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -0
  37. package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +18 -0
  38. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +3 -0
  39. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +63 -0
  40. package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.d.ts +15 -0
  41. package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +99 -0
  42. package/dist/components/ui/core/date-time-pickers/date-range-picker/index.d.ts +3 -0
  43. package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +25 -0
  44. package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.d.ts +4 -0
  45. package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +82 -0
  46. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.d.ts +17 -0
  47. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +190 -0
  48. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.d.ts +3 -0
  49. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +42 -0
  50. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.d.ts +3 -0
  51. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +161 -0
  52. package/dist/components/ui/core/date-time-pickers/index.d.ts +8 -0
  53. package/dist/components/ui/core/date-time-pickers/index.js +8 -0
  54. package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +7 -0
  55. package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +57 -0
  56. package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.d.ts +13 -0
  57. package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +119 -0
  58. package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.d.ts +10 -0
  59. package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +93 -0
  60. package/dist/components/ui/core/date-time-pickers/shared/constants.d.ts +20 -0
  61. package/dist/components/ui/core/date-time-pickers/shared/constants.js +14 -0
  62. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +19 -0
  63. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +99 -0
  64. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.d.ts +12 -0
  65. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +68 -0
  66. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +12 -0
  67. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +40 -0
  68. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.d.ts +29 -0
  69. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +63 -0
  70. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.d.ts +8 -0
  71. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +19 -0
  72. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.d.ts +23 -0
  73. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +32 -0
  74. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.d.ts +17 -0
  75. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +34 -0
  76. package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.d.ts +8 -0
  77. package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +7 -0
  78. package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.d.ts +13 -0
  79. package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +31 -0
  80. package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.d.ts +10 -0
  81. package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +52 -0
  82. package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.d.ts +48 -0
  83. package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +52 -0
  84. package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.d.ts +26 -0
  85. package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +37 -0
  86. package/dist/components/ui/core/date-time-pickers/utils/segment-utils.d.ts +34 -0
  87. package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +43 -0
  88. package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +15 -0
  89. package/dist/components/ui/core/date-time-pickers/utils/time-validation.d.ts +23 -0
  90. package/dist/components/ui/core/dialog/dialog.d.ts +10 -10
  91. package/dist/components/ui/core/dialog/dialog.js +12 -3
  92. package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +24 -47
  93. package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +125 -123
  94. package/dist/components/ui/core/empty-state/empty-state.context.d.ts +10 -0
  95. package/dist/components/ui/core/empty-state/empty-state.context.js +8 -0
  96. package/dist/components/ui/core/empty-state/empty-state.d.ts +18 -0
  97. package/dist/components/ui/core/empty-state/empty-state.js +139 -0
  98. package/dist/components/ui/core/helper-text/helper-text.d.ts +7 -5
  99. package/dist/components/ui/core/hover-card/hover-card.d.ts +5 -7
  100. package/dist/components/ui/core/hover-card/hover-card.js +23 -22
  101. package/dist/components/ui/core/inline-citation/inline-citation.d.ts +10 -10
  102. package/dist/components/ui/core/inline-citation/inline-citation.js +57 -49
  103. package/dist/components/ui/core/input/input.d.ts +2 -1
  104. package/dist/components/ui/core/input/input.js +1 -1
  105. package/dist/components/ui/core/input-group/input-group.d.ts +17 -13
  106. package/dist/components/ui/core/input-group/input-group.js +35 -36
  107. package/dist/components/ui/core/kbd/kbd.d.ts +3 -2
  108. package/dist/components/ui/core/label/label.d.ts +3 -2
  109. package/dist/components/ui/core/loader/loader.d.ts +2 -2
  110. package/dist/components/ui/core/message/message.d.ts +18 -17
  111. package/dist/components/ui/core/message/message.js +387 -99
  112. package/dist/components/ui/core/pagination/pagination-size-context.d.ts +5 -0
  113. package/dist/components/ui/core/pagination/pagination-size-context.js +6 -0
  114. package/dist/components/ui/core/pagination/pagination-teleport.d.ts +11 -0
  115. package/dist/components/ui/core/pagination/pagination-teleport.js +108 -0
  116. package/dist/components/ui/core/pagination/pagination-teleport.utils.d.ts +1 -0
  117. package/dist/components/ui/core/pagination/pagination-teleport.utils.js +7 -0
  118. package/dist/components/ui/core/pagination/pagination.d.ts +41 -0
  119. package/dist/components/ui/core/pagination/pagination.js +337 -0
  120. package/dist/components/ui/core/popover/popover.d.ts +12 -16
  121. package/dist/components/ui/core/popover/popover.js +52 -51
  122. package/dist/components/ui/core/progress/progress.d.ts +7 -4
  123. package/dist/components/ui/core/prompt-input/prompt-input.d.ts +36 -103
  124. package/dist/components/ui/core/prompt-input/prompt-input.js +180 -167
  125. package/dist/components/ui/core/radio-group/radio-group.d.ts +12 -8
  126. package/dist/components/ui/core/radio-group/radio-group.js +56 -53
  127. package/dist/components/ui/core/reasoning/reasoning.d.ts +5 -5
  128. package/dist/components/ui/core/scroll-area/scroll-area.d.ts +4 -2
  129. package/dist/components/ui/core/search/search.d.ts +10 -0
  130. package/dist/components/ui/core/search/search.js +99 -0
  131. package/dist/components/ui/core/segmented-control/segmented-control.d.ts +15 -11
  132. package/dist/components/ui/core/segmented-control/segmented-control.js +4 -1
  133. package/dist/components/ui/core/select/select.d.ts +15 -14
  134. package/dist/components/ui/core/select/select.js +135 -108
  135. package/dist/components/ui/core/separator/separator.d.ts +2 -4
  136. package/dist/components/ui/core/separator/separator.js +4 -5
  137. package/dist/components/ui/core/shimmer/shimmer.d.ts +5 -5
  138. package/dist/components/ui/core/shimmer/shimmer.js +91 -52
  139. package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -1
  140. package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +2 -1
  141. package/dist/components/ui/core/sources/sources.d.ts +3 -3
  142. package/dist/components/ui/core/sources/sources.js +6 -1
  143. package/dist/components/ui/core/switch/switch.d.ts +11 -0
  144. package/dist/components/ui/core/{button/button.metadata.d.ts → switch/switch.metadata.d.ts} +1 -1
  145. package/dist/components/ui/core/tabs/tabs.d.ts +21 -17
  146. package/dist/components/ui/core/tabs/tabs.js +11 -9
  147. package/dist/components/ui/core/textarea/textarea.d.ts +2 -1
  148. package/dist/components/ui/core/textarea/textarea.js +20 -18
  149. package/dist/components/ui/core/toggle/toggle.d.ts +15 -0
  150. package/dist/components/ui/core/toggle/toggle.js +74 -0
  151. package/dist/components/ui/core/tool/tool.d.ts +7 -6
  152. package/dist/components/ui/core/tool/tool.js +47 -43
  153. package/dist/components/ui/core/tooltip/tooltip.d.ts +6 -5
  154. package/dist/components/ui/core/tooltip/tooltip.js +10 -8
  155. package/dist/components/ui/core/topbar/topbar.d.ts +11 -13
  156. package/dist/eslint/index.d.ts +2 -1
  157. package/dist/index.d.ts +1 -1
  158. package/dist/lib/portal-container-context.d.ts +2 -1
  159. package/dist/lib/portal-container-context.js +3 -5
  160. package/dist/lib/utils.d.ts +1 -1
  161. package/dist/lib/utils.js +7 -7
  162. package/dist/styles.css +1 -1
  163. package/dist/styles.source.css +12 -1
  164. package/package.json +217 -14
  165. package/dist/components/ui/core/accordion/accordion.metadata.d.ts +0 -2
  166. package/dist/components/ui/core/accordion/accordion.metadata.js +0 -9
  167. package/dist/components/ui/core/alert/alert.metadata.d.ts +0 -2
  168. package/dist/components/ui/core/alert/alert.metadata.js +0 -9
  169. package/dist/components/ui/core/avatar/avatar.metadata.d.ts +0 -8
  170. package/dist/components/ui/core/avatar/avatar.metadata.js +0 -9
  171. package/dist/components/ui/core/badge/badge.metadata.d.ts +0 -2
  172. package/dist/components/ui/core/badge/badge.metadata.js +0 -8
  173. package/dist/components/ui/core/banner/banner.metadata.d.ts +0 -2
  174. package/dist/components/ui/core/banner/banner.metadata.js +0 -9
  175. package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.d.ts +0 -2
  176. package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.js +0 -9
  177. package/dist/components/ui/core/button/button.metadata.js +0 -9
  178. package/dist/components/ui/core/button-group/button-group.metadata.d.ts +0 -2
  179. package/dist/components/ui/core/button-group/button-group.metadata.js +0 -8
  180. package/dist/components/ui/core/card/card.metadata.d.ts +0 -8
  181. package/dist/components/ui/core/card/card.metadata.js +0 -9
  182. package/dist/components/ui/core/code-block/code-block.metadata.d.ts +0 -2
  183. package/dist/components/ui/core/code-block/code-block.metadata.js +0 -8
  184. package/dist/components/ui/core/collapsible/collapsible.metadata.d.ts +0 -2
  185. package/dist/components/ui/core/collapsible/collapsible.metadata.js +0 -9
  186. package/dist/components/ui/core/combobox/combobox.metadata.d.ts +0 -2
  187. package/dist/components/ui/core/command/command.metadata.d.ts +0 -2
  188. package/dist/components/ui/core/command/command.metadata.js +0 -9
  189. package/dist/components/ui/core/dialog/dialog.metadata.d.ts +0 -2
  190. package/dist/components/ui/core/dialog/dialog.metadata.js +0 -9
  191. package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.d.ts +0 -2
  192. package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.js +0 -9
  193. package/dist/components/ui/core/helper-text/helper-text.metadata.d.ts +0 -2
  194. package/dist/components/ui/core/helper-text/helper-text.metadata.js +0 -9
  195. package/dist/components/ui/core/hover-card/hover-card.metadata.d.ts +0 -2
  196. package/dist/components/ui/core/hover-card/hover-card.metadata.js +0 -8
  197. package/dist/components/ui/core/inline-citation/inline-citation.metadata.d.ts +0 -2
  198. package/dist/components/ui/core/inline-citation/inline-citation.metadata.js +0 -8
  199. package/dist/components/ui/core/input/input.metadata.d.ts +0 -2
  200. package/dist/components/ui/core/input/input.metadata.js +0 -9
  201. package/dist/components/ui/core/input-group/input-group.metadata.d.ts +0 -2
  202. package/dist/components/ui/core/input-group/input-group.metadata.js +0 -9
  203. package/dist/components/ui/core/kbd/kbd.metadata.d.ts +0 -2
  204. package/dist/components/ui/core/kbd/kbd.metadata.js +0 -9
  205. package/dist/components/ui/core/label/label.metadata.d.ts +0 -2
  206. package/dist/components/ui/core/label/label.metadata.js +0 -9
  207. package/dist/components/ui/core/loader/loader.metadata.d.ts +0 -2
  208. package/dist/components/ui/core/loader/loader.metadata.js +0 -9
  209. package/dist/components/ui/core/message/message.metadata.d.ts +0 -2
  210. package/dist/components/ui/core/popover/popover.metadata.d.ts +0 -2
  211. package/dist/components/ui/core/popover/popover.metadata.js +0 -9
  212. package/dist/components/ui/core/progress/progress.metadata.d.ts +0 -2
  213. package/dist/components/ui/core/progress/progress.metadata.js +0 -9
  214. package/dist/components/ui/core/prompt-input/prompt-input.metadata.d.ts +0 -2
  215. package/dist/components/ui/core/prompt-input/prompt-input.metadata.js +0 -9
  216. package/dist/components/ui/core/radio-group/radio-group.metadata.d.ts +0 -2
  217. package/dist/components/ui/core/radio-group/radio-group.metadata.js +0 -9
  218. package/dist/components/ui/core/reasoning/reasoning.metadata.d.ts +0 -2
  219. package/dist/components/ui/core/reasoning/reasoning.metadata.js +0 -8
  220. package/dist/components/ui/core/scroll-area/scroll-area.metadata.d.ts +0 -2
  221. package/dist/components/ui/core/scroll-area/scroll-area.metadata.js +0 -9
  222. package/dist/components/ui/core/select/select.metadata.d.ts +0 -2
  223. package/dist/components/ui/core/select/select.metadata.js +0 -9
  224. package/dist/components/ui/core/separator/separator.metadata.d.ts +0 -2
  225. package/dist/components/ui/core/separator/separator.metadata.js +0 -8
  226. package/dist/components/ui/core/shimmer/shimmer.metadata.d.ts +0 -2
  227. package/dist/components/ui/core/shimmer/shimmer.metadata.js +0 -9
  228. package/dist/components/ui/core/skeleton/skeleton.metadata.d.ts +0 -2
  229. package/dist/components/ui/core/skeleton/skeleton.metadata.js +0 -9
  230. package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.d.ts +0 -2
  231. package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.js +0 -9
  232. package/dist/components/ui/core/sources/sources.metadata.d.ts +0 -2
  233. package/dist/components/ui/core/textarea/textarea.metadata.d.ts +0 -2
  234. package/dist/components/ui/core/textarea/textarea.metadata.js +0 -9
  235. package/dist/components/ui/core/tool/tool.metadata.d.ts +0 -2
  236. package/dist/components/ui/core/tool/tool.metadata.js +0 -8
  237. package/dist/components/ui/core/tooltip/tooltip.metadata.d.ts +0 -8
  238. package/dist/components/ui/core/tooltip/tooltip.metadata.js +0 -9
  239. package/dist/index.js +0 -342
@@ -1,14 +1,14 @@
1
+ import { MemoExoticComponent, ReactNode } from 'react';
1
2
  type TextShimmerProps = {
2
3
  children: string;
4
+ /** SVG URL or data URI used as a CSS mask. Not a React component which would require runtime SVG serialization. */
5
+ iconUrl?: string;
3
6
  as?: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3';
4
7
  className?: string;
5
8
  duration?: number;
6
9
  spread?: number;
7
10
  variant?: 'default' | 'nordic' | 'aurora' | 'dusk' | 'equinox' | 'summer' | 'spring' | 'fall';
8
11
  };
9
- declare function ShimmerComponent({ children, as: Component, className, duration, spread, variant, }: TextShimmerProps): import("react/jsx-runtime").JSX.Element;
10
- declare namespace ShimmerComponent {
11
- var displayName: string;
12
- }
13
- declare const MemoizedShimmer: import('react').MemoExoticComponent<typeof ShimmerComponent>;
12
+ declare function ShimmerComponent({ children, iconUrl, as: Tag, className, duration, spread, variant, }: TextShimmerProps): ReactNode;
13
+ declare const MemoizedShimmer: MemoExoticComponent<typeof ShimmerComponent>;
14
14
  export { MemoizedShimmer as Shimmer };
@@ -1,8 +1,8 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { memo as f, useMemo as s } from "react";
3
- import { motion as a } from "framer-motion";
4
- import { cn as v } from "../../../../lib/utils.js";
5
- const S = {
1
+ import { jsx as s, jsxs as b } from "react/jsx-runtime";
2
+ import { memo as h, useMemo as p } from "react";
3
+ import { motion as m } from "framer-motion";
4
+ import { cn as u } from "../../../../lib/utils.js";
5
+ const v = {
6
6
  nordic: "var(--gradient-nordic)",
7
7
  aurora: "var(--gradient-aurora)",
8
8
  dusk: "var(--gradient-dusk)",
@@ -10,60 +10,99 @@ const S = {
10
10
  summer: "var(--gradient-summer)",
11
11
  spring: "var(--gradient-spring)",
12
12
  fall: "var(--gradient-fall)"
13
+ }, c = {
14
+ backgroundPosition: ["100% center, center", "0% center, center"]
13
15
  };
14
- function m({
15
- children: n,
16
- as: d = "p",
17
- className: c,
18
- duration: u = 2,
19
- spread: i = 2,
20
- variant: t = "default"
16
+ function x(e, a) {
17
+ const r = e.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
18
+ return {
19
+ ...a,
20
+ WebkitMaskImage: `url("${r}")`,
21
+ maskImage: `url("${r}")`,
22
+ WebkitMaskRepeat: "no-repeat",
23
+ maskRepeat: "no-repeat",
24
+ WebkitMaskSize: "contain",
25
+ maskSize: "contain",
26
+ WebkitMaskPosition: "center",
27
+ maskPosition: "center"
28
+ };
29
+ }
30
+ function S({
31
+ children: e,
32
+ iconUrl: a,
33
+ as: r = "p",
34
+ className: l,
35
+ duration: g = 2,
36
+ spread: d = 2,
37
+ variant: n = "default"
21
38
  }) {
22
- const p = s(
23
- () => (n?.length ?? 0) * i,
24
- [n, i]
25
- ), g = s(() => {
26
- const o = "linear-gradient(90deg, transparent calc(50% - var(--spread)), rgba(255, 255, 255, 0.4), transparent calc(50% + var(--spread)))";
27
- return t === "default" ? `${o}, linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))` : `${o}, ${S[t]}`;
28
- }, [t]), l = {
29
- "--spread": `${p}px`,
30
- backgroundImage: g,
39
+ const k = p(
40
+ () => (e?.length ?? 0) * d,
41
+ [e, d]
42
+ ), f = p(() => {
43
+ const t = "linear-gradient(90deg, transparent calc(50% - var(--spread)), rgba(255, 255, 255, 0.4), transparent calc(50% + var(--spread)))";
44
+ return n === "default" ? `${t}, linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))` : `${t}, ${v[n]}`;
45
+ }, [n]), i = {
46
+ "--spread": `${k}px`,
47
+ backgroundImage: f,
31
48
  backgroundSize: "250% 100%, 100% 100%"
32
- }, h = {
49
+ }, o = {
33
50
  repeat: Number.POSITIVE_INFINITY,
34
- duration: u,
51
+ duration: g,
35
52
  ease: "linear"
36
- }, r = {
37
- "data-slot": "shimmer",
38
- animate: {
39
- backgroundPosition: ["100% center, center", "0% center, center"]
40
- },
41
- className: v(
42
- "relative inline-block bg-clip-text text-transparent rounded-md",
43
- c
44
- ),
45
- style: l,
46
- transition: h,
47
- children: n
48
53
  };
49
- switch (d) {
50
- case "span":
51
- return /* @__PURE__ */ e(a.span, { ...r });
52
- case "div":
53
- return /* @__PURE__ */ e(a.div, { ...r });
54
- case "h1":
55
- return /* @__PURE__ */ e(a.h1, { ...r });
56
- case "h2":
57
- return /* @__PURE__ */ e(a.h2, { ...r });
58
- case "h3":
59
- return /* @__PURE__ */ e(a.h3, { ...r });
60
- default:
61
- return /* @__PURE__ */ e(a.p, { ...r });
54
+ if (!a) {
55
+ const t = m[r];
56
+ return /* @__PURE__ */ s(
57
+ t,
58
+ {
59
+ "data-slot": "shimmer",
60
+ className: u(
61
+ "relative inline-block bg-clip-text text-transparent rounded-md",
62
+ l
63
+ ),
64
+ animate: c,
65
+ style: i,
66
+ transition: o,
67
+ children: e
68
+ }
69
+ );
62
70
  }
71
+ return /* @__PURE__ */ b(
72
+ r,
73
+ {
74
+ "data-slot": "shimmer",
75
+ className: u(
76
+ "relative rounded-md inline-flex items-center gap-1.5",
77
+ l
78
+ ),
79
+ children: [
80
+ /* @__PURE__ */ s(
81
+ m.span,
82
+ {
83
+ "aria-hidden": !0,
84
+ className: "inline-block size-[1em] shrink-0",
85
+ animate: c,
86
+ style: x(a, i),
87
+ transition: o
88
+ }
89
+ ),
90
+ /* @__PURE__ */ s(
91
+ m.span,
92
+ {
93
+ className: "inline-block bg-clip-text text-transparent",
94
+ animate: c,
95
+ style: i,
96
+ transition: o,
97
+ children: e
98
+ }
99
+ )
100
+ ]
101
+ }
102
+ );
63
103
  }
64
- m.displayName = "Shimmer";
65
- const b = f(m);
66
- b.displayName = "Shimmer";
104
+ const I = h(S);
105
+ I.displayName = "Shimmer";
67
106
  export {
68
- b as Shimmer
107
+ I as Shimmer
69
108
  };
@@ -1,2 +1,3 @@
1
- declare const Skeleton: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
1
+ import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from 'react';
2
+ declare const Skeleton: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
2
3
  export { Skeleton };
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  import { ToasterProps, toast } from 'sonner';
2
- declare const Toaster: ({ ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const Toaster: ({ ...props }: ToasterProps) => ReactNode;
3
4
  export { Toaster, toast };
@@ -3,14 +3,14 @@ import { InlineCitationLink } from '../inline-citation/inline-citation';
3
3
  type SourcesProps = Omit<ComponentProps<'div'>, 'title'> & {
4
4
  title?: ReactNode | boolean;
5
5
  };
6
- declare const Sources: ({ className, title, children, ...props }: SourcesProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const Sources: ({ className, title, children, ...props }: SourcesProps) => ReactNode;
7
7
  type SourcesTitleProps = ComponentProps<'div'> & {
8
8
  title?: string;
9
9
  };
10
- declare const SourcesTitle: ({ className, title, children, ...props }: SourcesTitleProps) => import("react/jsx-runtime").JSX.Element;
10
+ declare const SourcesTitle: ({ className, title, children, ...props }: SourcesTitleProps) => ReactNode;
11
11
  type SourceProps = ComponentProps<typeof InlineCitationLink> & {
12
12
  title?: string;
13
13
  url?: string;
14
14
  };
15
- declare const Source: ({ href, url, title, variant, target, icon, className, children, ...props }: SourceProps) => import("react/jsx-runtime").JSX.Element | null;
15
+ declare const Source: ({ href, url, title, variant, target, icon, className, children, ...props }: SourceProps) => ReactNode;
16
16
  export { Source, Sources, SourcesTitle };
@@ -2,7 +2,12 @@ import { jsx as s, jsxs as c } from "react/jsx-runtime";
2
2
  import { IconMist as f } from "@tabler/icons-react";
3
3
  import { cn as l } from "../../../../lib/utils.js";
4
4
  import { InlineCitation as p, InlineCitationLink as x } from "../inline-citation/inline-citation.js";
5
- const S = ({ className: r, title: e, children: t, ...o }) => {
5
+ const S = ({
6
+ className: r,
7
+ title: e,
8
+ children: t,
9
+ ...o
10
+ }) => {
6
11
  const n = e === !1 || e === "false", i = e === void 0 || e === !0 ? /* @__PURE__ */ s(h, {}) : e;
7
12
  return /* @__PURE__ */ c(
8
13
  "div",
@@ -0,0 +1,11 @@
1
+ import { ForwardRefExoticComponent, RefAttributes, ComponentRef } from 'react';
2
+ import { Switch as SwitchPrimitive } from '@base-ui/react/switch';
3
+ type SwitchProps = Omit<SwitchPrimitive.Root.Props, 'children'> & {
4
+ label?: string;
5
+ textLeft?: boolean;
6
+ textRight?: boolean;
7
+ checkedText?: string;
8
+ uncheckedText?: string;
9
+ };
10
+ declare const Switch: ForwardRefExoticComponent<Omit<SwitchProps, 'ref'> & RefAttributes<ComponentRef<typeof SwitchPrimitive.Root>>>;
11
+ export { Switch };
@@ -1,2 +1,2 @@
1
1
  import { ComponentMeta } from '../../../../lib/types';
2
- export declare const ButtonMetadata: ComponentMeta;
2
+ export declare const SwitchMetadata: ComponentMeta;
@@ -1,23 +1,27 @@
1
- import { ReactNode } from 'react';
2
- import { Tabs as TabsPrimitive } from '@base-ui/react/tabs';
1
+ import { ForwardRefExoticComponent, RefAttributes, ComponentProps, ReactNode } from 'react';
2
+ import { TabsRootProps, Tabs as TabsPrimitive } from '@base-ui/react/tabs';
3
3
  import { VariantProps } from 'class-variance-authority';
4
- declare const tabsListVariants: (props?: ({
5
- orientation?: "horizontal" | "vertical" | null | undefined;
6
- size?: "default" | "small" | null | undefined;
7
- fullWidth?: boolean | null | undefined;
8
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
- declare const tabsTriggerVariants: (props?: ({
10
- size?: "default" | "small" | null | undefined;
11
- fullWidth?: boolean | null | undefined;
12
- stateTone?: "default" | null | undefined;
13
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
14
- declare const Tabs: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').TabsRootProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
4
+ import { ClassProp } from 'class-variance-authority/types';
5
+ interface TabsListVariantProps {
6
+ orientation?: 'horizontal' | 'vertical' | null;
7
+ size?: 'small' | 'default' | null;
8
+ fullWidth?: boolean | null;
9
+ }
10
+ declare const tabsListVariants: (props?: (TabsListVariantProps & ClassProp) | undefined) => string;
11
+ interface TabsTriggerVariantProps {
12
+ size?: 'small' | 'default' | null;
13
+ fullWidth?: boolean | null;
14
+ stateTone?: 'default' | null;
15
+ }
16
+ declare const tabsTriggerVariants: (props?: (TabsTriggerVariantProps & ClassProp) | undefined) => string;
17
+ declare const Tabs: ForwardRefExoticComponent<Omit<TabsRootProps, 'ref'> & RefAttributes<HTMLDivElement>>;
15
18
  type TabsListProps = TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>;
16
- declare const TabsList: import('react').ForwardRefExoticComponent<Omit<TabsListProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
19
+ declare const TabsList: ForwardRefExoticComponent<Omit<TabsListProps, 'ref'> & RefAttributes<HTMLDivElement>>;
17
20
  type TabsTriggerProps = TabsPrimitive.Tab.Props & VariantProps<typeof tabsTriggerVariants> & {
18
21
  badge?: ReactNode;
19
22
  };
20
- declare const TabsTrigger: import('react').ForwardRefExoticComponent<Omit<TabsTriggerProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
21
- declare const TabsLabel: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
22
- declare const TabsPanel: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').TabsPanelProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
23
+ declare const TabsTrigger: ForwardRefExoticComponent<Omit<TabsTriggerProps, 'ref'> & RefAttributes<HTMLElement>>;
24
+ declare const TabsLabel: ForwardRefExoticComponent<ComponentProps<'span'> & RefAttributes<HTMLSpanElement>>;
25
+ type TabsPanelProps = TabsPrimitive.Panel.Props;
26
+ declare const TabsPanel: ForwardRefExoticComponent<Omit<TabsPanelProps, 'ref'> & RefAttributes<HTMLDivElement>>;
23
27
  export { Tabs, TabsLabel, TabsList, TabsPanel, TabsTrigger, tabsListVariants, tabsTriggerVariants, };
@@ -201,15 +201,17 @@ const k = n(
201
201
  }
202
202
  );
203
203
  k.displayName = "TabsLabel";
204
- const j = n(({ className: e, ...t }, a) => /* @__PURE__ */ i(
205
- u.Panel,
206
- {
207
- ref: a,
208
- "data-slot": "tabs-panel",
209
- className: l("outline-none", e),
210
- ...t
211
- }
212
- ));
204
+ const j = n(
205
+ ({ className: e, ...t }, a) => /* @__PURE__ */ i(
206
+ u.Panel,
207
+ {
208
+ ref: a,
209
+ "data-slot": "tabs-panel",
210
+ className: l("outline-none", e),
211
+ ...t
212
+ }
213
+ )
214
+ );
213
215
  j.displayName = "TabsPanel";
214
216
  export {
215
217
  _ as Tabs,
@@ -1,2 +1,3 @@
1
- declare const Textarea: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & import('react').RefAttributes<HTMLTextAreaElement>>;
1
+ import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from 'react';
2
+ declare const Textarea: ForwardRefExoticComponent<ComponentProps<'textarea'> & RefAttributes<HTMLTextAreaElement>>;
2
3
  export { Textarea };
@@ -1,24 +1,26 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { forwardRef as r } from "react";
3
3
  import { cn as i, disabledState as l, invalidState as n, focusState as s, filledState as d, hoverState as f, formElementBase as m } from "../../../../lib/utils.js";
4
- const c = r(({ className: e, ...t }, a) => /* @__PURE__ */ o(
5
- "textarea",
6
- {
7
- ref: a,
8
- "data-slot": "textarea",
9
- className: i(
10
- "flex field-sizing-content min-h-20 w-full transition-[color,background-color,border-color,box-shadow] resize-none",
11
- m,
12
- f,
13
- d,
14
- s,
15
- n,
16
- l,
17
- e
18
- ),
19
- ...t
20
- }
21
- ));
4
+ const c = r(
5
+ ({ className: e, ...t }, a) => /* @__PURE__ */ o(
6
+ "textarea",
7
+ {
8
+ ref: a,
9
+ "data-slot": "textarea",
10
+ className: i(
11
+ "flex field-sizing-content h-auto min-h-20 w-full transition-[color,background-color,border-color,box-shadow] resize-none",
12
+ m,
13
+ f,
14
+ d,
15
+ s,
16
+ n,
17
+ l,
18
+ e
19
+ ),
20
+ ...t
21
+ }
22
+ )
23
+ );
22
24
  c.displayName = "Textarea";
23
25
  export {
24
26
  c as Textarea
@@ -0,0 +1,15 @@
1
+ import { ComponentRef, ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
2
+ import { Toggle as TogglePrimitive } from '@base-ui/react/toggle';
3
+ import { ClassProp } from 'class-variance-authority/types';
4
+ type ToggleVariantProps = {
5
+ variant?: 'default' | 'outline';
6
+ size?: 'default' | 'sm' | 'lg';
7
+ };
8
+ declare const toggleVariants: (props?: (ToggleVariantProps & ClassProp) | undefined) => string;
9
+ type ToggleProps = TogglePrimitive.Props & ToggleVariantProps & {
10
+ icon?: ReactNode;
11
+ label?: ReactNode;
12
+ count?: number | string;
13
+ };
14
+ declare const Toggle: ForwardRefExoticComponent<Omit<ToggleProps, 'ref'> & RefAttributes<ComponentRef<typeof TogglePrimitive>>>;
15
+ export { Toggle, toggleVariants };
@@ -0,0 +1,74 @@
1
+ import { jsx as o, jsxs as m, Fragment as f } from "react/jsx-runtime";
2
+ import { forwardRef as v } from "react";
3
+ import { Toggle as b } from "@base-ui/react/toggle";
4
+ import { cva as p } from "class-variance-authority";
5
+ import { cn as s } from "../../../../lib/utils.js";
6
+ const x = p(
7
+ "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-muted-foreground hover:bg-accent-background hover:text-foreground disabled:pointer-events-none disabled:text-disabled-foreground aria-pressed:bg-active-muted-background aria-pressed:text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring-muted focus-visible:ring outline-none transition-[color,box-shadow] aria-invalid:ring-destructive-background/20 dark:aria-invalid:ring-destructive-background/40 aria-invalid:border-destructive-background whitespace-nowrap",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-transparent",
12
+ outline: "border border-muted-background bg-transparent shadow-xs hover:bg-accent-background hover:text-foreground"
13
+ },
14
+ size: {
15
+ default: "h-9 px-2 min-w-9",
16
+ sm: "h-7 px-1.5 min-w-7",
17
+ lg: "h-8 px-2.5 min-w-8"
18
+ }
19
+ },
20
+ defaultVariants: {
21
+ variant: "default",
22
+ size: "default"
23
+ }
24
+ }
25
+ ), h = (e, r) => {
26
+ if (e == null || e === "")
27
+ return null;
28
+ const t = String(e);
29
+ return /* @__PURE__ */ o(
30
+ "span",
31
+ {
32
+ "data-slot": "toggle-count",
33
+ className: s(
34
+ "inline-flex h-4 min-w-4 items-center justify-center rounded-sm px-0.5 text-xs font-medium leading-3.5 tracking-tightest",
35
+ r ? "bg-disabled-background text-disabled-foreground" : "bg-decorative-background-mountain text-decorative-foreground-mountain"
36
+ ),
37
+ children: t
38
+ }
39
+ );
40
+ }, k = v(
41
+ ({
42
+ className: e,
43
+ variant: r,
44
+ size: t,
45
+ icon: i,
46
+ label: n,
47
+ count: a,
48
+ children: g,
49
+ disabled: d,
50
+ ...u
51
+ }, l) => {
52
+ const c = i !== void 0 || n !== void 0 || a !== void 0;
53
+ return /* @__PURE__ */ o(
54
+ b,
55
+ {
56
+ ref: l,
57
+ "data-slot": "toggle",
58
+ disabled: d,
59
+ className: s(x({ variant: r, size: t, className: e })),
60
+ ...u,
61
+ children: g ?? (c && /* @__PURE__ */ m(f, { children: [
62
+ i,
63
+ n && /* @__PURE__ */ o("span", { "data-slot": "toggle-label", children: n }),
64
+ h(a, d)
65
+ ] }))
66
+ }
67
+ );
68
+ }
69
+ );
70
+ k.displayName = "Toggle";
71
+ export {
72
+ k as Toggle,
73
+ x as toggleVariants
74
+ };
@@ -1,21 +1,22 @@
1
- import { ComponentProps } from 'react';
1
+ import { ComponentProps, ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ import { CollapsibleRootProps, CollapsiblePanelProps } from '@base-ui/react';
2
3
  import { ToolUIPart } from '../../../../lib/ai/types';
3
4
  import { CollapsibleTrigger } from '../collapsible/collapsible';
4
- declare const Tool: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').CollapsibleRootProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
5
+ declare const Tool: ForwardRefExoticComponent<Omit<CollapsibleRootProps, 'ref'> & RefAttributes<HTMLDivElement>>;
5
6
  type ToolHeaderProps = Omit<ComponentProps<typeof CollapsibleTrigger>, 'type'> & {
6
7
  title?: string;
7
8
  type: ToolUIPart['type'];
8
9
  hasError?: boolean;
9
10
  };
10
- declare const ToolHeader: import('react').ForwardRefExoticComponent<Omit<ToolHeaderProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
11
- declare const ToolContent: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').CollapsiblePanelProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
11
+ declare const ToolHeader: ForwardRefExoticComponent<Omit<ToolHeaderProps, 'ref'> & RefAttributes<HTMLButtonElement>>;
12
+ declare const ToolContent: ForwardRefExoticComponent<Omit<CollapsiblePanelProps, 'ref'> & RefAttributes<HTMLDivElement>>;
12
13
  type ToolInputProps = ComponentProps<'div'> & {
13
14
  input: ToolUIPart['input'];
14
15
  };
15
- declare const ToolInput: import('react').ForwardRefExoticComponent<Omit<ToolInputProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
16
+ declare const ToolInput: ForwardRefExoticComponent<Omit<ToolInputProps, 'ref'> & RefAttributes<HTMLDivElement>>;
16
17
  type ToolOutputProps = ComponentProps<'div'> & {
17
18
  output: ToolUIPart['output'];
18
19
  errorText: ToolUIPart['errorText'];
19
20
  };
20
- declare const ToolOutput: import('react').ForwardRefExoticComponent<Omit<ToolOutputProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
21
+ declare const ToolOutput: ForwardRefExoticComponent<Omit<ToolOutputProps, 'ref'> & RefAttributes<HTMLDivElement>>;
21
22
  export { Tool, ToolHeader, ToolContent, ToolInput, ToolOutput };
@@ -21,50 +21,54 @@ const y = d(
21
21
  )
22
22
  );
23
23
  y.displayName = "Tool";
24
- const v = d(({ className: t, title: o, type: l, hasError: r = !1, ...i }, a) => /* @__PURE__ */ e(
25
- N,
26
- {
27
- ref: a,
28
- "data-slot": "tool-header",
29
- className: t,
30
- render: /* @__PURE__ */ n(
31
- h,
32
- {
33
- variant: "ghost",
34
- className: "w-full justify-between text-base leading-5 tracking-tighter",
35
- children: [
36
- /* @__PURE__ */ e("span", { children: o ?? l.substring(l.indexOf("-") + 1) }),
37
- /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
38
- r ? /* @__PURE__ */ e(
39
- g,
40
- {
41
- outline: !0,
42
- className: "bg-background text-destructive-foreground border-border",
43
- children: "Error"
44
- }
45
- ) : null,
46
- /* @__PURE__ */ e(p, { className: "h-4 w-4" })
47
- ] })
48
- ]
49
- }
50
- ),
51
- ...i
52
- }
53
- ));
24
+ const v = d(
25
+ ({ className: t, title: o, type: l, hasError: r = !1, ...i }, a) => /* @__PURE__ */ e(
26
+ N,
27
+ {
28
+ ref: a,
29
+ "data-slot": "tool-header",
30
+ className: t,
31
+ render: /* @__PURE__ */ n(
32
+ h,
33
+ {
34
+ variant: "ghost",
35
+ className: "w-full justify-between text-base leading-5 tracking-tighter",
36
+ children: [
37
+ /* @__PURE__ */ e("span", { children: o ?? l.substring(l.indexOf("-") + 1) }),
38
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
39
+ r ? /* @__PURE__ */ e(
40
+ g,
41
+ {
42
+ outline: !0,
43
+ className: "bg-background text-destructive-foreground border-border",
44
+ children: "Error"
45
+ }
46
+ ) : null,
47
+ /* @__PURE__ */ e(p, { className: "h-4 w-4" })
48
+ ] })
49
+ ]
50
+ }
51
+ ),
52
+ ...i
53
+ }
54
+ )
55
+ );
54
56
  v.displayName = "ToolHeader";
55
- const j = d(({ className: t, ...o }, l) => /* @__PURE__ */ e(
56
- b,
57
- {
58
- ref: l,
59
- "data-slot": "tool-content",
60
- className: s(
61
- /* min-h-0: flex descendants (e.g. CodeBlock max-height) may shrink */
62
- "flex min-h-0 flex-col gap-4 py-3 text-popover-foreground outline-none",
63
- t
64
- ),
65
- ...o
66
- }
67
- ));
57
+ const j = d(
58
+ ({ className: t, ...o }, l) => /* @__PURE__ */ e(
59
+ b,
60
+ {
61
+ ref: l,
62
+ "data-slot": "tool-content",
63
+ className: s(
64
+ /* min-h-0: flex descendants (e.g. CodeBlock max-height) may shrink */
65
+ "flex min-h-0 flex-col gap-4 py-3 text-popover-foreground outline-none",
66
+ t
67
+ ),
68
+ ...o
69
+ }
70
+ )
71
+ );
68
72
  j.displayName = "ToolContent";
69
73
  const w = d(
70
74
  ({ className: t, input: o, ...l }, r) => /* @__PURE__ */ n(
@@ -1,10 +1,11 @@
1
- import { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';
1
+ import { ForwardRefExoticComponent, RefAttributes, ReactNode } from 'react';
2
+ import { TooltipPopupProps, TooltipPositionerProps, Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';
2
3
  declare function TooltipProvider({ delayDuration, ...props }: Omit<TooltipPrimitive.Provider.Props, 'delay'> & {
3
4
  delayDuration?: number;
4
- }): import("react/jsx-runtime").JSX.Element;
5
+ }): ReactNode;
5
6
  declare function Tooltip({ disableHoverableContent, ...props }: TooltipPrimitive.Root.Props & {
6
7
  disableHoverableContent?: boolean;
7
- }): import("react/jsx-runtime").JSX.Element;
8
- declare const TooltipTrigger: import('react').ForwardRefExoticComponent<Omit<TooltipPrimitive.Trigger.Props<unknown>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
9
- declare const TooltipContent: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').TooltipPopupProps & Pick<import('@base-ui/react').TooltipPositionerProps, "align" | "alignOffset" | "side" | "sideOffset">, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
8
+ }): ReactNode;
9
+ declare const TooltipTrigger: ForwardRefExoticComponent<Omit<TooltipPrimitive.Trigger.Props<unknown>, 'ref'> & RefAttributes<HTMLButtonElement>>;
10
+ declare const TooltipContent: ForwardRefExoticComponent<Omit<TooltipPopupProps & Pick<TooltipPositionerProps, 'align' | 'alignOffset' | 'side' | 'sideOffset'>, 'ref'> & RefAttributes<HTMLDivElement>>;
10
11
  export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -29,14 +29,16 @@ function w({
29
29
  }
30
30
  );
31
31
  }
32
- const u = o((t, a) => /* @__PURE__ */ i(
33
- e.Trigger,
34
- {
35
- ref: a,
36
- "data-slot": "tooltip-trigger",
37
- ...t
38
- }
39
- ));
32
+ const u = o(
33
+ (t, a) => /* @__PURE__ */ i(
34
+ e.Trigger,
35
+ {
36
+ ref: a,
37
+ "data-slot": "tooltip-trigger",
38
+ ...t
39
+ }
40
+ )
41
+ );
40
42
  u.displayName = "TooltipTrigger";
41
43
  const h = o(
42
44
  ({