@koide-labs/ui 0.0.0 → 0.0.2

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 (383) hide show
  1. package/README.md +53 -3
  2. package/{src/-types.ts → dist/-types.d.ts} +1 -6
  3. package/dist/-types.js +1 -0
  4. package/dist/-utils.d.ts +19 -0
  5. package/dist/-utils.js +33 -0
  6. package/dist/Button-DrPFFzo7.js +31 -0
  7. package/dist/CompositeRoot-CVk5a-pR.js +233 -0
  8. package/dist/DirectionContext-C2o_MF_i.js +9 -0
  9. package/dist/FieldItemContext-DAvk99to.js +11 -0
  10. package/dist/FloatingPortal-tWyuKRSN.js +435 -0
  11. package/dist/FloatingPortalLite-DVyq6YhV.js +28 -0
  12. package/dist/InternalBackdrop-jYAiOJ8v.js +574 -0
  13. package/dist/LabelableContext-BMvjVwor.js +169 -0
  14. package/dist/ToolbarRootContext-CvvL0Tk1.js +9 -0
  15. package/dist/clamp-D0KDAQIz.js +6 -0
  16. package/dist/clsx-OuTLNxxd.js +16 -0
  17. package/dist/components/accordion/index.d.ts +12 -0
  18. package/dist/components/accordion/index.js +699 -0
  19. package/dist/components/alert-dialog/index.d.ts +26 -0
  20. package/dist/components/alert-dialog/index.js +136 -0
  21. package/dist/components/anchor/index.d.ts +8 -0
  22. package/dist/components/anchor/index.js +38 -0
  23. package/dist/components/avatar/index.d.ts +21 -0
  24. package/dist/components/avatar/index.js +161 -0
  25. package/dist/components/badge/index.d.ts +16 -0
  26. package/dist/components/badge/index.js +40 -0
  27. package/dist/components/button/index.d.ts +24 -0
  28. package/dist/components/button/index.js +47 -0
  29. package/dist/components/checkbox/index.d.ts +9 -0
  30. package/dist/components/checkbox/index.js +269 -0
  31. package/dist/components/code/index.d.ts +9 -0
  32. package/dist/components/code/index.js +10 -0
  33. package/dist/components/collapse/index.d.ts +11 -0
  34. package/dist/components/collapse/index.js +41 -0
  35. package/dist/components/command/index.d.ts +14 -0
  36. package/dist/components/command/index.js +1695 -0
  37. package/dist/components/context-menu/index.d.ts +42 -0
  38. package/dist/components/context-menu/index.js +1444 -0
  39. package/dist/components/dialog/index.d.ts +48 -0
  40. package/dist/components/dialog/index.js +138 -0
  41. package/dist/components/heading/index.d.ts +44 -0
  42. package/dist/components/heading/index.js +56 -0
  43. package/dist/components/icon/icon-names.d.ts +1 -0
  44. package/dist/components/icon/icon-names.js +1 -0
  45. package/dist/components/icon/index.d.ts +24 -0
  46. package/dist/components/icon/index.js +43 -0
  47. package/dist/components/icon-button/index.d.ts +12 -0
  48. package/dist/components/icon-button/index.js +45 -0
  49. package/dist/components/inline-code/index.d.ts +6 -0
  50. package/dist/components/inline-code/index.js +22 -0
  51. package/dist/components/input/index.d.ts +3 -0
  52. package/dist/components/input/index.js +119 -0
  53. package/dist/components/meter/index.d.ts +18 -0
  54. package/dist/components/meter/index.js +165 -0
  55. package/dist/components/multiline-input/index.d.ts +6 -0
  56. package/dist/components/multiline-input/index.js +100 -0
  57. package/dist/components/number-input/index.d.ts +10 -0
  58. package/dist/components/number-input/index.js +1169 -0
  59. package/dist/components/password-input/index.d.ts +2 -0
  60. package/dist/components/password-input/index.js +29 -0
  61. package/dist/components/pill/index.d.ts +13 -0
  62. package/dist/components/pill/index.js +38 -0
  63. package/dist/components/popover/index.d.ts +21 -0
  64. package/dist/components/popover/index.js +636 -0
  65. package/dist/components/preview-card/index.d.ts +17 -0
  66. package/dist/components/preview-card/index.js +402 -0
  67. package/dist/components/radio/index.d.ts +13 -0
  68. package/dist/components/radio/index.js +404 -0
  69. package/dist/components/search-bar/index.d.ts +12 -0
  70. package/dist/components/search-bar/index.js +48 -0
  71. package/dist/components/select/index.d.ts +16 -0
  72. package/dist/components/select/index.js +1263 -0
  73. package/dist/components/separator/index.d.ts +7 -0
  74. package/dist/components/separator/index.js +6 -0
  75. package/dist/components/slider/index.d.ts +5 -0
  76. package/dist/components/slider/index.js +902 -0
  77. package/dist/components/spinner/index.d.ts +2 -0
  78. package/dist/components/spinner/index.js +13 -0
  79. package/dist/components/stacked-avatars/index.d.ts +14 -0
  80. package/dist/components/stacked-avatars/index.js +92 -0
  81. package/dist/components/status-banner/index.d.ts +17 -0
  82. package/dist/components/status-banner/index.js +69 -0
  83. package/dist/components/surface/index.d.ts +27 -0
  84. package/dist/components/surface/index.js +41 -0
  85. package/dist/components/switch/index.d.ts +5 -0
  86. package/dist/components/switch/index.js +196 -0
  87. package/dist/components/tabs/index.d.ts +18 -0
  88. package/dist/components/tabs/index.js +509 -0
  89. package/dist/components/text/index.d.ts +26 -0
  90. package/dist/components/text/index.js +51 -0
  91. package/dist/components/theme-provider/index.d.ts +2 -0
  92. package/dist/components/theme-provider/index.js +6 -0
  93. package/dist/components/theme-provider/theme-context.d.ts +9 -0
  94. package/dist/components/theme-provider/theme-context.js +13 -0
  95. package/dist/components/theme-provider/theme-provider.d.ts +17 -0
  96. package/dist/components/theme-provider/theme-provider.js +30 -0
  97. package/dist/components/timestamp/index.d.ts +23 -0
  98. package/dist/components/timestamp/index.js +1392 -0
  99. package/dist/components/toast/index.d.ts +2 -0
  100. package/dist/components/toast/index.js +7 -0
  101. package/dist/components/toast/toast.d.ts +2 -0
  102. package/dist/components/toast/toast.js +878 -0
  103. package/dist/components/toast/use-toast-manager.d.ts +27 -0
  104. package/dist/components/toast/use-toast-manager.js +4 -0
  105. package/dist/components/tooltip/index.d.ts +14 -0
  106. package/dist/components/tooltip/index.js +712 -0
  107. package/dist/components/tooltip/tooltip-arrow.d.ts +3 -0
  108. package/dist/components/tooltip/tooltip-arrow.js +6 -0
  109. package/dist/components/view/index.d.ts +30 -0
  110. package/dist/components/view/index.js +84 -0
  111. package/dist/components/visually-hidden/index.d.ts +1 -0
  112. package/dist/components/visually-hidden/index.js +4 -0
  113. package/dist/composite-Bx7Szd_T.js +208 -0
  114. package/dist/composite-C9L5QmZL.js +66 -0
  115. package/dist/createBaseUIEventDetails-D8M2Yl-a.js +59 -0
  116. package/dist/detectBrowser-I-s3yzIE.js +43 -0
  117. package/dist/dialog.css +1 -0
  118. package/dist/dialog.module-BeF-6XAo.js +415 -0
  119. package/dist/element-CZEOj04G.js +80 -0
  120. package/dist/event-CKoGyQEJ.js +30 -0
  121. package/dist/floating-ui.utils-C7pRWMZ_.js +128 -0
  122. package/dist/floating-ui.utils.dom-C7FS5id0.js +135 -0
  123. package/dist/formatErrorMessage-BqPuTBN-.js +7 -0
  124. package/dist/formatNumber-1UNwjeqf.js +25 -0
  125. package/dist/getDisabledMountTransitionStyles-YfHPge6T.js +1510 -0
  126. package/dist/index-BX1XbbRk.js +1206 -0
  127. package/dist/index-CeuccO-T.js +109 -0
  128. package/dist/index-DN9Bn1qm.js +29 -0
  129. package/dist/index-FMoPxlJ2.js +52 -0
  130. package/dist/index.css +1 -0
  131. package/dist/index.d.ts +42 -0
  132. package/dist/index.js +108 -0
  133. package/dist/index10.css +1 -0
  134. package/dist/index11.css +1 -0
  135. package/dist/index12.css +1 -0
  136. package/dist/index13.css +1 -0
  137. package/dist/index14.css +1 -0
  138. package/dist/index15.css +1 -0
  139. package/dist/index16.css +1 -0
  140. package/dist/index17.css +1 -0
  141. package/dist/index18.css +1 -0
  142. package/dist/index19.css +1 -0
  143. package/dist/index2.css +1 -0
  144. package/dist/index20.css +1 -0
  145. package/dist/index21.css +1 -0
  146. package/dist/index22.css +1 -0
  147. package/dist/index23.css +1 -0
  148. package/dist/index24.css +1 -0
  149. package/dist/index25.css +1 -0
  150. package/dist/index26.css +1 -0
  151. package/dist/index27.css +1 -0
  152. package/dist/index28.css +1 -0
  153. package/dist/index29.css +1 -0
  154. package/dist/index3.css +1 -0
  155. package/dist/index30.css +1 -0
  156. package/dist/index31.css +1 -0
  157. package/dist/index32.css +1 -0
  158. package/dist/index33.css +1 -0
  159. package/dist/index34.css +1 -0
  160. package/dist/index35.css +1 -0
  161. package/dist/index36.css +1 -0
  162. package/dist/index37.css +1 -0
  163. package/dist/index4.css +1 -0
  164. package/dist/index5.css +1 -0
  165. package/dist/index6.css +1 -0
  166. package/dist/index7.css +1 -0
  167. package/dist/index8.css +1 -0
  168. package/dist/index9.css +1 -0
  169. package/dist/inertValue-BCYGsdmf.js +7 -0
  170. package/dist/input.css +1 -0
  171. package/dist/input.module-DDQY_Ij6.js +7 -0
  172. package/dist/integrations/react-markdown/index.d.ts +5 -0
  173. package/dist/integrations/react-markdown/index.js +6895 -0
  174. package/dist/integrations/remix/index.d.ts +9 -0
  175. package/{src/integrations/remix.ts → dist/integrations/remix/index.js} +7 -4
  176. package/dist/integrations/tailwind.css +1 -0
  177. package/dist/integrations/twemoij/index.d.ts +3 -0
  178. package/dist/integrations/twemoij/index.js +18 -0
  179. package/dist/isElementDisabled-Cbd8W9kH.js +6 -0
  180. package/dist/owner-rKN292Q9.js +6 -0
  181. package/dist/safePolygon-DWy1dGKJ.js +308 -0
  182. package/dist/styles/core.css +1 -0
  183. package/dist/styles/tokens.d.ts +400 -0
  184. package/{src/styles/tokens.ts → dist/styles/tokens.js} +54 -96
  185. package/dist/toast.css +1 -0
  186. package/dist/tooltip-arrow-C1qXdi5T.js +24 -0
  187. package/dist/tooltip-arrow.css +1 -0
  188. package/dist/transitions.css +1 -0
  189. package/dist/transitions.module-CWX8e5cx.js +1343 -0
  190. package/dist/use-toast-manager-Dq-44AuW.js +37 -0
  191. package/dist/useAnimationFrame-451ugS_6.js +68 -0
  192. package/dist/useBaseUiId-B7WyxtIE.js +7 -0
  193. package/dist/useButton-DfIwsdb8.js +127 -0
  194. package/dist/useCompositeListItem-OkcAim_1.js +148 -0
  195. package/dist/useControlled-Du4sJyMj.js +31 -0
  196. package/dist/useHoverReferenceInteraction-SfOBPoXM.js +264 -0
  197. package/dist/useId-C5kyn6tA.js +22 -0
  198. package/dist/useIsoLayoutEffect-CIDbvm3Q.js +6 -0
  199. package/dist/useLabelableId-Ci_jDvmv.js +29 -0
  200. package/dist/useOnMount-VRW6CK2u.js +8 -0
  201. package/dist/useOpenChangeComplete-Dse9kY9E.js +61 -0
  202. package/dist/usePopupAutoResize-CNR6Ekmx.js +85 -0
  203. package/dist/useRender-CLx7dR_1.js +7 -0
  204. package/dist/useRenderElement-DwToLA61.js +244 -0
  205. package/dist/useRole-oDBdbuwQ.js +77 -0
  206. package/dist/useStableCallback-CkTrVkNX.js +29 -0
  207. package/dist/useSyncedFloatingRootContext-Dorsv-jf.js +167 -0
  208. package/dist/useTimeout-CflX-kz3.js +32 -0
  209. package/dist/useTransitionStatus-CUfcuGAV.js +42 -0
  210. package/dist/useTypeahead-D85V2IUx.js +333 -0
  211. package/dist/useValueAsRef-HURLzret.js +19 -0
  212. package/dist/useValueChanged-DL757-yD.js +14 -0
  213. package/dist/valueToPercent-DaP9qN4u.js +6 -0
  214. package/dist/view.css +1 -0
  215. package/dist/view.module-DfDLgJE0.js +6 -0
  216. package/dist/visuallyHidden-CpJ-mhai.js +16 -0
  217. package/dist/warn-CKtX8MLJ.js +11 -0
  218. package/package.json +18 -2
  219. package/.husky/pre-commit +0 -1
  220. package/.storybook/main.ts +0 -25
  221. package/.storybook/preview-head.html +0 -6
  222. package/.storybook/preview.tsx +0 -48
  223. package/.storybook/vitest.setup.ts +0 -8
  224. package/eslint.config.mjs +0 -29
  225. package/lint-staged.config.js +0 -15
  226. package/pnpm-workspace.yaml +0 -2
  227. package/postcss.config.mjs +0 -7
  228. package/prettier.config.mjs +0 -24
  229. package/scripts/build-icon-types.ts +0 -38
  230. package/src/-utils.tsx +0 -64
  231. package/src/components/accordion/accordion.module.css +0 -44
  232. package/src/components/accordion/accordion.stories.tsx +0 -36
  233. package/src/components/accordion/index.tsx +0 -67
  234. package/src/components/alert-dialog/alert-dialog.module.css +0 -5
  235. package/src/components/alert-dialog/alert-dialog.stories.tsx +0 -53
  236. package/src/components/alert-dialog/index.tsx +0 -138
  237. package/src/components/anchor/anchor.module.css +0 -18
  238. package/src/components/anchor/anchor.stories.tsx +0 -28
  239. package/src/components/anchor/index.tsx +0 -45
  240. package/src/components/avatar/avatar.module.css +0 -56
  241. package/src/components/avatar/avatar.stories.tsx +0 -61
  242. package/src/components/avatar/index.tsx +0 -82
  243. package/src/components/badge/badge.module.css +0 -35
  244. package/src/components/badge/badge.stories.tsx +0 -60
  245. package/src/components/badge/index.tsx +0 -71
  246. package/src/components/button/button.module.css +0 -42
  247. package/src/components/button/button.stories.tsx +0 -108
  248. package/src/components/button/index.tsx +0 -63
  249. package/src/components/checkbox/checkbox.module.css +0 -36
  250. package/src/components/checkbox/checkbox.stories.tsx +0 -21
  251. package/src/components/checkbox/index.tsx +0 -41
  252. package/src/components/code/code.module.css +0 -20
  253. package/src/components/code/code.stories.tsx +0 -42
  254. package/src/components/code/index.tsx +0 -73
  255. package/src/components/collapse/collapse.module.css +0 -27
  256. package/src/components/collapse/collapse.stories.tsx +0 -27
  257. package/src/components/collapse/index.tsx +0 -59
  258. package/src/components/command/command.module.css +0 -95
  259. package/src/components/command/command.stories.tsx +0 -38
  260. package/src/components/command/index.tsx +0 -108
  261. package/src/components/context-menu/context-menu.module.css +0 -36
  262. package/src/components/context-menu/context-menu.stories.tsx +0 -99
  263. package/src/components/context-menu/index.tsx +0 -242
  264. package/src/components/dialog/dialog.module.css +0 -71
  265. package/src/components/dialog/dialog.stories.tsx +0 -29
  266. package/src/components/dialog/index.tsx +0 -148
  267. package/src/components/heading/heading.module.css +0 -3
  268. package/src/components/heading/heading.stories.tsx +0 -52
  269. package/src/components/heading/index.tsx +0 -112
  270. package/src/components/icon/icon-names.ts +0 -3189
  271. package/src/components/icon/icon.module.css +0 -36
  272. package/src/components/icon/icon.stories.tsx +0 -40
  273. package/src/components/icon/index.tsx +0 -60
  274. package/src/components/icon-button/icon-button.module.css +0 -33
  275. package/src/components/icon-button/icon-button.stories.tsx +0 -59
  276. package/src/components/icon-button/index.tsx +0 -48
  277. package/src/components/inline-code/index.tsx +0 -29
  278. package/src/components/inline-code/inline-code.module.css +0 -13
  279. package/src/components/inline-code/inline-code.stories.tsx +0 -31
  280. package/src/components/input/index.tsx +0 -22
  281. package/src/components/input/input.module.css +0 -23
  282. package/src/components/input/input.stories.tsx +0 -52
  283. package/src/components/meter/index.tsx +0 -55
  284. package/src/components/meter/meter.module.css +0 -23
  285. package/src/components/meter/meter.stories.tsx +0 -31
  286. package/src/components/multiline-input/index.tsx +0 -58
  287. package/src/components/multiline-input/multiline-input.stories.tsx +0 -26
  288. package/src/components/number-input/index.tsx +0 -74
  289. package/src/components/number-input/number-input.module.css +0 -41
  290. package/src/components/number-input/number-input.stories.tsx +0 -24
  291. package/src/components/password-input/index.tsx +0 -24
  292. package/src/components/password-input/password-input.module.css +0 -10
  293. package/src/components/password-input/password-input.stories.tsx +0 -24
  294. package/src/components/pill/index.tsx +0 -45
  295. package/src/components/pill/pill.module.css +0 -22
  296. package/src/components/pill/pill.stories.tsx +0 -83
  297. package/src/components/popover/index.tsx +0 -94
  298. package/src/components/popover/popover.module.css +0 -8
  299. package/src/components/popover/popover.stories.tsx +0 -53
  300. package/src/components/preview-card/index.tsx +0 -68
  301. package/src/components/preview-card/preview-card.module.css +0 -5
  302. package/src/components/preview-card/preview-card.stories.tsx +0 -58
  303. package/src/components/radio/index.tsx +0 -67
  304. package/src/components/radio/radio-group.module.css +0 -5
  305. package/src/components/radio/radio.module.css +0 -36
  306. package/src/components/radio/radio.stories.tsx +0 -27
  307. package/src/components/search-bar/index.tsx +0 -60
  308. package/src/components/search-bar/search-bar.module.css +0 -29
  309. package/src/components/search-bar/search-bar.stories.tsx +0 -37
  310. package/src/components/select/index.tsx +0 -132
  311. package/src/components/select/select.module.css +0 -63
  312. package/src/components/select/select.stories.tsx +0 -49
  313. package/src/components/separator/index.tsx +0 -28
  314. package/src/components/separator/separator.module.css +0 -24
  315. package/src/components/separator/separator.stories.tsx +0 -40
  316. package/src/components/slider/index.tsx +0 -28
  317. package/src/components/slider/slider.module.css +0 -52
  318. package/src/components/slider/slider.stories.tsx +0 -53
  319. package/src/components/spinner/index.tsx +0 -14
  320. package/src/components/spinner/spinner.module.css +0 -13
  321. package/src/components/spinner/spinner.stories.tsx +0 -17
  322. package/src/components/stacked-avatars/index.tsx +0 -88
  323. package/src/components/stacked-avatars/stacked-avatars.module.css +0 -79
  324. package/src/components/stacked-avatars/stacked-avatars.stories.tsx +0 -48
  325. package/src/components/status-banner/index.tsx +0 -96
  326. package/src/components/status-banner/status-banner.module.css +0 -52
  327. package/src/components/status-banner/status-banner.stories.tsx +0 -44
  328. package/src/components/surface/index.tsx +0 -83
  329. package/src/components/surface/surface.module.css +0 -35
  330. package/src/components/surface/surface.stories.tsx +0 -84
  331. package/src/components/switch/index.tsx +0 -23
  332. package/src/components/switch/switch.module.css +0 -45
  333. package/src/components/switch/switch.stories.tsx +0 -48
  334. package/src/components/tabs/index.tsx +0 -126
  335. package/src/components/tabs/tabs.module.css +0 -134
  336. package/src/components/tabs/tabs.stories.tsx +0 -88
  337. package/src/components/text/index.tsx +0 -69
  338. package/src/components/text/text.module.css +0 -76
  339. package/src/components/text/text.stories.tsx +0 -107
  340. package/src/components/theme-provider/index.ts +0 -2
  341. package/src/components/theme-provider/theme-context.tsx +0 -18
  342. package/src/components/theme-provider/theme-provider.stories.tsx +0 -47
  343. package/src/components/theme-provider/theme-provider.tsx +0 -77
  344. package/src/components/timestamp/index.tsx +0 -131
  345. package/src/components/timestamp/timestamp.module.css +0 -8
  346. package/src/components/timestamp/timestamp.stories.tsx +0 -37
  347. package/src/components/toast/index.ts +0 -2
  348. package/src/components/toast/toast.module.css +0 -163
  349. package/src/components/toast/toast.stories.tsx +0 -53
  350. package/src/components/toast/toast.tsx +0 -104
  351. package/src/components/toast/use-toast-manager.ts +0 -63
  352. package/src/components/tooltip/index.tsx +0 -61
  353. package/src/components/tooltip/tooltip-arrow.tsx +0 -17
  354. package/src/components/tooltip/tooltip.module.css +0 -44
  355. package/src/components/tooltip/tooltip.stories.tsx +0 -76
  356. package/src/components/view/index.tsx +0 -137
  357. package/src/components/view/view.module.css +0 -11
  358. package/src/components/view/view.stories.tsx +0 -131
  359. package/src/components/view/view_colorway.module.css +0 -280
  360. package/src/components/view/view_interactive.module.css +0 -127
  361. package/src/components/view/view_loading.module.css +0 -58
  362. package/src/components/visually-hidden/index.ts +0 -1
  363. package/src/index.ts +0 -49
  364. package/src/integrations/react-markdown/index.tsx +0 -134
  365. package/src/integrations/react-markdown/react-markdown.module.css +0 -62
  366. package/src/integrations/react-markdown/react-markdown.stories.tsx +0 -31
  367. package/src/integrations/tailwind.css +0 -173
  368. package/src/integrations/twemoij/index.tsx +0 -13
  369. package/src/integrations/twemoij/twemoji.module.css +0 -7
  370. package/src/integrations/twemoij/twemoji.stories.tsx +0 -40
  371. package/src/stories/components/all-variants.tsx +0 -40
  372. package/src/stories/data.ts +0 -72
  373. package/src/stories/utils.ts +0 -20
  374. package/src/styles/core.css +0 -153
  375. package/src/styles/themes/dark.css +0 -86
  376. package/src/styles/themes/light.css +0 -86
  377. package/src/styles/transitions.module.css +0 -31
  378. package/stylelint.config.mjs +0 -29
  379. package/tsconfig.app.json +0 -35
  380. package/tsconfig.json +0 -7
  381. package/tsconfig.node.json +0 -26
  382. package/vite.config.ts +0 -103
  383. package/vitest.shims.d.ts +0 -1
@@ -0,0 +1,712 @@
1
+ import { jsx as O, jsxs as ne } from "react/jsx-runtime";
2
+ import { c as Ee } from "../../clsx-OuTLNxxd.js";
3
+ import { textify as Se } from "../../-utils.js";
4
+ import { Surface as xe } from "../surface/index.js";
5
+ import { t as oe, T as be } from "../../tooltip-arrow-C1qXdi5T.js";
6
+ import { R as Oe, P as we, c as N, d as Me, e as Ie, f as Ne, p as $, t as De } from "../../transitions.module-CWX8e5cx.js";
7
+ import * as o from "react";
8
+ import { u as le, T as Ae } from "../../useTimeout-CflX-kz3.js";
9
+ import { u as D } from "../../useIsoLayoutEffect-CIDbvm3Q.js";
10
+ import { g as ke, s as Ve } from "../../safePolygon-DWy1dGKJ.js";
11
+ import { c as _, n as ce, b as W, a as pe, e as de, t as se, i as Le, g as _e } from "../../createBaseUIEventDetails-D8M2Yl-a.js";
12
+ import { f as F } from "../../formatErrorMessage-BqPuTBN-.js";
13
+ import * as He from "react-dom";
14
+ import { a as Ue, u as B } from "../../useRenderElement-DwToLA61.js";
15
+ import { p as Fe, b as Be, c as je, u as Ge, a as Xe, d as Ye } from "../../useSyncedFloatingRootContext-Dorsv-jf.js";
16
+ import { d as fe, a as re, i as We } from "../../floating-ui.utils.dom-C7FS5id0.js";
17
+ import { e as ze, b as $e } from "../../detectBrowser-I-s3yzIE.js";
18
+ import { c as Ke, P as qe } from "../../FloatingPortal-tWyuKRSN.js";
19
+ import { e as me, f as z, h as ie, j as Je, m as Qe, d as Ze } from "../../element-CZEOj04G.js";
20
+ import { u as ae } from "../../useStableCallback-CkTrVkNX.js";
21
+ import { i as et } from "../../event-CKoGyQEJ.js";
22
+ import { u as tt } from "../../useBaseUiId-B7WyxtIE.js";
23
+ import { u as nt, a as ot } from "../../useHoverReferenceInteraction-SfOBPoXM.js";
24
+ import { F as st } from "../../FloatingPortalLite-DVyq6YhV.js";
25
+ import { a as rt, b as it, g as ge } from "../../getDisabledMountTransitionStyles-YfHPge6T.js";
26
+ import { a as at, t as ut } from "../../useOpenChangeComplete-Dse9kY9E.js";
27
+ import { u as lt } from "../../usePopupAutoResize-CNR6Ekmx.js";
28
+ import { u as ct } from "../../DirectionContext-C2o_MF_i.js";
29
+ const K = /* @__PURE__ */ o.createContext({
30
+ hasProvider: !1,
31
+ timeoutMs: 0,
32
+ delayRef: {
33
+ current: 0
34
+ },
35
+ initialDelayRef: {
36
+ current: 0
37
+ },
38
+ timeout: new Ae(),
39
+ currentIdRef: {
40
+ current: null
41
+ },
42
+ currentContextRef: {
43
+ current: null
44
+ }
45
+ });
46
+ process.env.NODE_ENV !== "production" && (K.displayName = "FloatingDelayGroupContext");
47
+ function pt(s) {
48
+ const {
49
+ children: e,
50
+ delay: t,
51
+ timeoutMs: r = 0
52
+ } = s, f = o.useRef(t), a = o.useRef(t), c = o.useRef(null), u = o.useRef(null), d = le();
53
+ return /* @__PURE__ */ O(K.Provider, {
54
+ value: o.useMemo(() => ({
55
+ hasProvider: !0,
56
+ delayRef: f,
57
+ initialDelayRef: a,
58
+ currentIdRef: c,
59
+ timeoutMs: r,
60
+ currentContextRef: u,
61
+ timeout: d
62
+ }), [r, d]),
63
+ children: e
64
+ });
65
+ }
66
+ function dt(s, e = {
67
+ open: !1
68
+ }) {
69
+ const t = "rootStore" in s ? s.rootStore : s, r = t.useState("floatingId"), {
70
+ enabled: f = !0,
71
+ open: a
72
+ } = e, c = o.useContext(K), {
73
+ currentIdRef: u,
74
+ delayRef: d,
75
+ timeoutMs: p,
76
+ initialDelayRef: m,
77
+ currentContextRef: i,
78
+ hasProvider: l,
79
+ timeout: n
80
+ } = c, [y, g] = o.useState(!1);
81
+ return D(() => {
82
+ function T() {
83
+ g(!1), i.current?.setIsInstantPhase(!1), u.current = null, i.current = null, d.current = m.current;
84
+ }
85
+ if (f && u.current && !a && u.current === r) {
86
+ if (g(!1), p) {
87
+ const h = r;
88
+ return n.start(p, () => {
89
+ t.select("open") || u.current && u.current !== h || T();
90
+ }), () => {
91
+ n.clear();
92
+ };
93
+ }
94
+ T();
95
+ }
96
+ }, [f, a, r, u, d, p, m, i, n, t]), D(() => {
97
+ if (!f || !a)
98
+ return;
99
+ const T = i.current, h = u.current;
100
+ n.clear(), i.current = {
101
+ onOpenChange: t.setOpen,
102
+ setIsInstantPhase: g
103
+ }, u.current = r, d.current = {
104
+ open: 0,
105
+ close: ke(m.current, "close")
106
+ }, h !== null && h !== r ? (g(!0), T?.setIsInstantPhase(!0), T?.onOpenChange(!1, _(ce))) : (g(!1), T?.setIsInstantPhase(!1));
107
+ }, [f, a, r, t, u, d, p, m, i, n]), D(() => () => {
108
+ i.current = null;
109
+ }, [i]), o.useMemo(() => ({
110
+ hasProvider: l,
111
+ delayRef: d,
112
+ isInstantPhase: y
113
+ }), [l, d, y]);
114
+ }
115
+ function ft(s, e) {
116
+ let t = null, r = null, f = !1;
117
+ return {
118
+ contextElement: s || void 0,
119
+ getBoundingClientRect() {
120
+ const a = s?.getBoundingClientRect() || {
121
+ width: 0,
122
+ height: 0,
123
+ x: 0,
124
+ y: 0
125
+ }, c = e.axis === "x" || e.axis === "both", u = e.axis === "y" || e.axis === "both", d = ["mouseenter", "mousemove"].includes(e.dataRef.current.openEvent?.type || "") && e.pointerType !== "touch";
126
+ let p = a.width, m = a.height, i = a.x, l = a.y;
127
+ return t == null && e.x && c && (t = a.x - e.x), r == null && e.y && u && (r = a.y - e.y), i -= t || 0, l -= r || 0, p = 0, m = 0, !f || d ? (p = e.axis === "y" ? a.width : 0, m = e.axis === "x" ? a.height : 0, i = c && e.x != null ? e.x : i, l = u && e.y != null ? e.y : l) : f && !d && (m = e.axis === "x" ? a.height : m, p = e.axis === "y" ? a.width : p), f = !0, {
128
+ width: p,
129
+ height: m,
130
+ x: i,
131
+ y: l,
132
+ top: l,
133
+ right: i + p,
134
+ bottom: l + m,
135
+ left: i
136
+ };
137
+ }
138
+ };
139
+ }
140
+ function ue(s) {
141
+ return s != null && s.clientX != null;
142
+ }
143
+ function mt(s, e = {}) {
144
+ const t = "rootStore" in s ? s.rootStore : s, r = t.useState("open"), f = t.useState("floatingElement"), a = t.useState("domReferenceElement"), c = t.context.dataRef, {
145
+ enabled: u = !0,
146
+ axis: d = "both",
147
+ x: p = null,
148
+ y: m = null
149
+ } = e, i = o.useRef(!1), l = o.useRef(null), [n, y] = o.useState(), [g, T] = o.useState([]), h = ae((v, R) => {
150
+ i.current || c.current.openEvent && !ue(c.current.openEvent) || t.set("positionReference", ft(a, {
151
+ x: v,
152
+ y: R,
153
+ axis: d,
154
+ dataRef: c,
155
+ pointerType: n
156
+ }));
157
+ }), C = ae((v) => {
158
+ p != null || m != null || (r ? l.current || T([]) : h(v.clientX, v.clientY));
159
+ }), b = et(n) ? f : r, S = o.useCallback(() => {
160
+ if (!b || !u || p != null || m != null)
161
+ return;
162
+ const v = fe(f);
163
+ function R(E) {
164
+ const w = me(E);
165
+ z(f, w) ? (v.removeEventListener("mousemove", R), l.current = null) : h(E.clientX, E.clientY);
166
+ }
167
+ if (!c.current.openEvent || ue(c.current.openEvent)) {
168
+ v.addEventListener("mousemove", R);
169
+ const E = () => {
170
+ v.removeEventListener("mousemove", R), l.current = null;
171
+ };
172
+ return l.current = E, E;
173
+ }
174
+ t.set("positionReference", a);
175
+ }, [b, u, p, m, f, c, a, t, h]);
176
+ o.useEffect(() => S(), [S, g]), o.useEffect(() => {
177
+ u && !f && (i.current = !1);
178
+ }, [u, f]), o.useEffect(() => {
179
+ !u && r && (i.current = !0);
180
+ }, [u, r]), D(() => {
181
+ u && (p != null || m != null) && (i.current = !1, h(p, m));
182
+ }, [u, p, m, h]);
183
+ const x = o.useMemo(() => {
184
+ function v(R) {
185
+ y(R.pointerType);
186
+ }
187
+ return {
188
+ onPointerDown: v,
189
+ onPointerEnter: v,
190
+ onMouseMove: C,
191
+ onMouseEnter: C
192
+ };
193
+ }, [C]);
194
+ return o.useMemo(() => u ? {
195
+ reference: x
196
+ } : {}, [u, x]);
197
+ }
198
+ const Y = ze && $e;
199
+ function gt(s, e = {}) {
200
+ const t = "rootStore" in s ? s.rootStore : s, {
201
+ events: r,
202
+ dataRef: f
203
+ } = t.context, {
204
+ enabled: a = !0,
205
+ visibleOnly: c = !0
206
+ } = e, u = o.useRef(!1), d = le(), p = o.useRef(!0);
207
+ o.useEffect(() => {
208
+ const i = t.select("domReferenceElement");
209
+ if (!a)
210
+ return;
211
+ const l = fe(i);
212
+ function n() {
213
+ !t.select("open") && We(i) && i === ie(Ze(i)) && (u.current = !0);
214
+ }
215
+ function y() {
216
+ p.current = !0;
217
+ }
218
+ function g() {
219
+ p.current = !1;
220
+ }
221
+ return l.addEventListener("blur", n), Y && (l.addEventListener("keydown", y, !0), l.addEventListener("pointerdown", g, !0)), () => {
222
+ l.removeEventListener("blur", n), Y && (l.removeEventListener("keydown", y, !0), l.removeEventListener("pointerdown", g, !0));
223
+ };
224
+ }, [t, a]), o.useEffect(() => {
225
+ if (!a)
226
+ return;
227
+ function i(l) {
228
+ (l.reason === pe || l.reason === de) && (u.current = !0);
229
+ }
230
+ return r.on("openchange", i), () => {
231
+ r.off("openchange", i);
232
+ };
233
+ }, [r, a]);
234
+ const m = o.useMemo(() => ({
235
+ onMouseLeave() {
236
+ u.current = !1;
237
+ },
238
+ onFocus(i) {
239
+ if (u.current)
240
+ return;
241
+ const l = me(i.nativeEvent);
242
+ if (c && re(l)) {
243
+ if (Y && !i.relatedTarget) {
244
+ if (!p.current && !Je(l))
245
+ return;
246
+ } else if (!Qe(l))
247
+ return;
248
+ }
249
+ t.setOpen(!0, _(W, i.nativeEvent, i.currentTarget));
250
+ },
251
+ onBlur(i) {
252
+ u.current = !1;
253
+ const l = i.relatedTarget, n = i.nativeEvent, y = re(l) && l.hasAttribute(Ke("focus-guard")) && l.getAttribute("data-type") === "outside";
254
+ d.start(0, () => {
255
+ const g = t.select("domReferenceElement"), T = ie(g ? g.ownerDocument : document);
256
+ !l && T === g || z(f.current.floatingContext?.refs.floating.current, T) || z(g, T) || y || t.context.triggerElements.hasElement(i.relatedTarget) || t.setOpen(!1, _(W, n));
257
+ });
258
+ }
259
+ }), [f, t, c, d]);
260
+ return o.useMemo(() => a ? {
261
+ reference: m,
262
+ trigger: m
263
+ } : {}, [a, m]);
264
+ }
265
+ const q = /* @__PURE__ */ o.createContext(void 0);
266
+ process.env.NODE_ENV !== "production" && (q.displayName = "TooltipRootContext");
267
+ function H(s) {
268
+ const e = o.useContext(q);
269
+ if (e === void 0 && !s)
270
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : F(72));
271
+ return e;
272
+ }
273
+ const yt = {
274
+ ...Fe,
275
+ disabled: N((s) => s.disabled),
276
+ instantType: N((s) => s.instantType),
277
+ isInstantPhase: N((s) => s.isInstantPhase),
278
+ trackCursorAxis: N((s) => s.trackCursorAxis),
279
+ disableHoverablePopup: N((s) => s.disableHoverablePopup),
280
+ lastOpenChangeReason: N((s) => s.openChangeReason),
281
+ closeDelay: N((s) => s.closeDelay)
282
+ };
283
+ class J extends Oe {
284
+ constructor(e) {
285
+ super({
286
+ ...ht(),
287
+ ...e
288
+ }, {
289
+ popupRef: /* @__PURE__ */ o.createRef(),
290
+ onOpenChange: void 0,
291
+ onOpenChangeComplete: void 0,
292
+ triggerElements: new we()
293
+ }, yt);
294
+ }
295
+ setOpen = (e, t) => {
296
+ const r = t.reason, f = r === se, a = e && r === W, c = !e && (r === pe || r === de);
297
+ if (t.preventUnmountOnClose = () => {
298
+ this.set("preventUnmountingOnClose", !0);
299
+ }, this.context.onOpenChange?.(e, t), t.isCanceled)
300
+ return;
301
+ const u = () => {
302
+ const d = {
303
+ open: e,
304
+ openChangeReason: r
305
+ };
306
+ a ? d.instantType = "focus" : c ? d.instantType = "dismiss" : r === se && (d.instantType = void 0);
307
+ const p = t.trigger?.id ?? null;
308
+ (p || e) && (d.activeTriggerId = p, d.activeTriggerElement = t.trigger ?? null), this.update(d);
309
+ };
310
+ f ? He.flushSync(u) : u();
311
+ };
312
+ static useStore(e, t) {
313
+ const r = Ue(() => e ?? new J(t)).current, f = Be({
314
+ popupStore: r,
315
+ onOpenChange: r.setOpen
316
+ });
317
+ return r.state.floatingRootContext = f, r;
318
+ }
319
+ }
320
+ function ht() {
321
+ return {
322
+ ...je(),
323
+ disabled: !1,
324
+ instantType: void 0,
325
+ isInstantPhase: !1,
326
+ trackCursorAxis: "none",
327
+ disableHoverablePopup: !1,
328
+ openChangeReason: null,
329
+ closeDelay: 0
330
+ };
331
+ }
332
+ function vt(s) {
333
+ const {
334
+ disabled: e = !1,
335
+ defaultOpen: t = !1,
336
+ open: r,
337
+ disableHoverablePopup: f = !1,
338
+ trackCursorAxis: a = "none",
339
+ actionsRef: c,
340
+ onOpenChange: u,
341
+ onOpenChangeComplete: d,
342
+ handle: p,
343
+ triggerId: m,
344
+ defaultTriggerId: i = null,
345
+ children: l
346
+ } = s, n = J.useStore(p?.store, {
347
+ open: r ?? t,
348
+ activeTriggerId: m !== void 0 ? m : i
349
+ });
350
+ n.useControlledProp("open", r, t), n.useControlledProp("activeTriggerId", m, i), n.useContextCallback("onOpenChange", u), n.useContextCallback("onOpenChangeComplete", d);
351
+ const y = n.useState("open"), g = n.useState("activeTriggerId"), T = n.useState("payload");
352
+ n.useSyncedValues({
353
+ trackCursorAxis: a,
354
+ disableHoverablePopup: f
355
+ });
356
+ const h = !e && y;
357
+ D(() => {
358
+ y && e && n.setOpen(!1, _(_e));
359
+ }, [y, e, n]), n.useSyncedValue("disabled", e), Ge(n);
360
+ const {
361
+ forceUnmount: C,
362
+ transitionStatus: b
363
+ } = Xe(h, n), S = n.useState("isInstantPhase"), x = n.useState("instantType"), v = n.useState("lastOpenChangeReason"), R = o.useRef(null);
364
+ D(() => {
365
+ b === "ending" && v === ce || b !== "ending" && S ? (x !== "delay" && (R.current = x), n.set("instantType", "delay")) : R.current !== null && (n.set("instantType", R.current), R.current = null);
366
+ }, [b, S, v, x, n]), D(() => {
367
+ h && g == null && n.set("payload", void 0);
368
+ }, [n, g, h]);
369
+ const E = o.useCallback(() => {
370
+ n.setOpen(!1, Tt(n, Le));
371
+ }, [n]);
372
+ o.useImperativeHandle(c, () => ({
373
+ unmount: C,
374
+ close: E
375
+ }), [C, E]);
376
+ const w = n.useState("floatingRootContext"), M = gt(w, {
377
+ enabled: !e
378
+ }), P = Me(w, {
379
+ enabled: !e,
380
+ referencePress: !0
381
+ }), L = mt(w, {
382
+ enabled: !e && a !== "none",
383
+ axis: a === "none" ? void 0 : a
384
+ }), {
385
+ getReferenceProps: I,
386
+ getFloatingProps: A,
387
+ getTriggerProps: k
388
+ } = Ie([M, P, L]), V = o.useMemo(() => I(), [I]), j = o.useMemo(() => k(), [k]), te = o.useMemo(() => A(), [A]);
389
+ return n.useSyncedValues({
390
+ floatingRootContext: w,
391
+ activeTriggerProps: V,
392
+ inactiveTriggerProps: j,
393
+ popupProps: te
394
+ }), /* @__PURE__ */ O(q.Provider, {
395
+ value: n,
396
+ children: typeof l == "function" ? l({
397
+ payload: T
398
+ }) : l
399
+ });
400
+ }
401
+ function Tt(s, e) {
402
+ const t = _(e);
403
+ return t.preventUnmountOnClose = () => {
404
+ s.set("preventUnmountingOnClose", !0);
405
+ }, t;
406
+ }
407
+ const Q = /* @__PURE__ */ o.createContext(void 0);
408
+ process.env.NODE_ENV !== "production" && (Q.displayName = "TooltipProviderContext");
409
+ function Ct() {
410
+ return o.useContext(Q);
411
+ }
412
+ const Pt = 600, ye = /* @__PURE__ */ o.forwardRef(function(e, t) {
413
+ const {
414
+ className: r,
415
+ render: f,
416
+ handle: a,
417
+ payload: c,
418
+ disabled: u,
419
+ delay: d,
420
+ closeDelay: p,
421
+ id: m,
422
+ ...i
423
+ } = e, l = H(!0), n = a?.store ?? l;
424
+ if (!n)
425
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle." : F(82));
426
+ const y = tt(m), g = n.useState("isTriggerActive", y), T = n.useState("floatingRootContext"), h = n.useState("isOpenedByTrigger", y), C = o.useRef(null), b = d ?? Pt, S = p ?? 0, {
427
+ registerTrigger: x,
428
+ isMountedByThisTrigger: v
429
+ } = Ye(y, C, n, {
430
+ payload: c,
431
+ closeDelay: S
432
+ }), R = Ct(), {
433
+ delayRef: E,
434
+ isInstantPhase: w,
435
+ hasProvider: M
436
+ } = dt(T, {
437
+ open: h
438
+ });
439
+ n.useSyncedValue("isInstantPhase", w);
440
+ const P = n.useState("disabled"), L = u ?? P, I = n.useState("trackCursorAxis"), A = n.useState("disableHoverablePopup"), k = nt(T, {
441
+ enabled: !L,
442
+ mouseOnly: !0,
443
+ move: !1,
444
+ handleClose: !A && I !== "both" ? Ve() : null,
445
+ restMs() {
446
+ const G = R?.delay, U = typeof E.current == "object" ? E.current.open : void 0;
447
+ let X = b;
448
+ return M && (U !== 0 ? X = d ?? G ?? b : X = 0), X;
449
+ },
450
+ delay() {
451
+ const G = typeof E.current == "object" ? E.current.close : void 0;
452
+ let U = S;
453
+ return p == null && M && (U = G), {
454
+ close: U
455
+ };
456
+ },
457
+ triggerElementRef: C,
458
+ isActiveTrigger: g
459
+ }), V = o.useMemo(() => ({
460
+ open: h
461
+ }), [h]), j = n.useState("triggerProps", v);
462
+ return B("button", e, {
463
+ state: V,
464
+ ref: [t, x, C],
465
+ props: [k, j, {
466
+ id: y
467
+ }, i],
468
+ stateAttributesMapping: Ne
469
+ });
470
+ });
471
+ process.env.NODE_ENV !== "production" && (ye.displayName = "TooltipTrigger");
472
+ const Z = /* @__PURE__ */ o.createContext(void 0);
473
+ process.env.NODE_ENV !== "production" && (Z.displayName = "TooltipPortalContext");
474
+ function Rt() {
475
+ const s = o.useContext(Z);
476
+ if (s === void 0)
477
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: <Tooltip.Portal> is missing." : F(70));
478
+ return s;
479
+ }
480
+ const he = /* @__PURE__ */ o.forwardRef(function(e, t) {
481
+ const {
482
+ keepMounted: r = !1,
483
+ ...f
484
+ } = e;
485
+ return H().useState("mounted") || r ? /* @__PURE__ */ O(Z.Provider, {
486
+ value: r,
487
+ children: /* @__PURE__ */ O(st, {
488
+ ref: t,
489
+ ...f
490
+ })
491
+ }) : null;
492
+ });
493
+ process.env.NODE_ENV !== "production" && (he.displayName = "TooltipPortal");
494
+ const ee = /* @__PURE__ */ o.createContext(void 0);
495
+ process.env.NODE_ENV !== "production" && (ee.displayName = "TooltipPositionerContext");
496
+ function ve() {
497
+ const s = o.useContext(ee);
498
+ if (s === void 0)
499
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : F(71));
500
+ return s;
501
+ }
502
+ const Te = /* @__PURE__ */ o.forwardRef(function(e, t) {
503
+ const {
504
+ render: r,
505
+ className: f,
506
+ anchor: a,
507
+ positionMethod: c = "absolute",
508
+ side: u = "top",
509
+ align: d = "center",
510
+ sideOffset: p = 0,
511
+ alignOffset: m = 0,
512
+ collisionBoundary: i = "clipping-ancestors",
513
+ collisionPadding: l = 5,
514
+ arrowPadding: n = 5,
515
+ sticky: y = !1,
516
+ disableAnchorTracking: g = !1,
517
+ collisionAvoidance: T = qe,
518
+ ...h
519
+ } = e, C = H(), b = Rt(), S = C.useState("open"), x = C.useState("mounted"), v = C.useState("trackCursorAxis"), R = C.useState("disableHoverablePopup"), E = C.useState("floatingRootContext"), w = C.useState("instantType"), M = C.useState("transitionStatus"), P = rt({
520
+ anchor: a,
521
+ positionMethod: c,
522
+ floatingRootContext: E,
523
+ mounted: x,
524
+ side: u,
525
+ sideOffset: p,
526
+ align: d,
527
+ alignOffset: m,
528
+ collisionBoundary: i,
529
+ collisionPadding: l,
530
+ sticky: y,
531
+ arrowPadding: n,
532
+ disableAnchorTracking: g,
533
+ keepMounted: b,
534
+ collisionAvoidance: T,
535
+ adaptiveOrigin: it
536
+ }), L = o.useMemo(() => {
537
+ const V = {};
538
+ return (!S || v === "both" || R) && (V.pointerEvents = "none"), {
539
+ role: "presentation",
540
+ hidden: !x,
541
+ style: {
542
+ ...P.positionerStyles,
543
+ ...V
544
+ }
545
+ };
546
+ }, [S, v, R, x, P.positionerStyles]), I = o.useMemo(() => ({
547
+ open: S,
548
+ side: P.side,
549
+ align: P.align,
550
+ anchorHidden: P.anchorHidden,
551
+ instant: v !== "none" ? "tracking-cursor" : w
552
+ }), [S, P.side, P.align, P.anchorHidden, v, w]), A = o.useMemo(() => ({
553
+ ...I,
554
+ arrowRef: P.arrowRef,
555
+ arrowStyles: P.arrowStyles,
556
+ arrowUncentered: P.arrowUncentered
557
+ }), [I, P.arrowRef, P.arrowStyles, P.arrowUncentered]), k = B("div", e, {
558
+ state: I,
559
+ props: [L, ge(M), h],
560
+ ref: [t, C.useStateSetter("positionerElement")],
561
+ stateAttributesMapping: $
562
+ });
563
+ return /* @__PURE__ */ O(ee.Provider, {
564
+ value: A,
565
+ children: k
566
+ });
567
+ });
568
+ process.env.NODE_ENV !== "production" && (Te.displayName = "TooltipPositioner");
569
+ const Et = {
570
+ ...$,
571
+ ...ut
572
+ }, Ce = /* @__PURE__ */ o.forwardRef(function(e, t) {
573
+ const {
574
+ className: r,
575
+ render: f,
576
+ ...a
577
+ } = e, c = H(), {
578
+ side: u,
579
+ align: d
580
+ } = ve(), p = c.useState("open"), m = c.useState("mounted"), i = c.useState("instantType"), l = c.useState("transitionStatus"), n = c.useState("popupProps"), y = c.useState("payload"), g = c.useState("popupElement"), T = c.useState("positionerElement"), h = c.useState("floatingRootContext"), C = ct();
581
+ at({
582
+ open: p,
583
+ ref: c.context.popupRef,
584
+ onComplete() {
585
+ p && c.context.onOpenChangeComplete?.(!0);
586
+ }
587
+ });
588
+ function b() {
589
+ h.context.events.emit("measure-layout");
590
+ }
591
+ function S(M, P) {
592
+ h.context.events.emit("measure-layout-complete", {
593
+ previousDimensions: M,
594
+ nextDimensions: P
595
+ });
596
+ }
597
+ const x = o.useCallback(() => c.context.triggerElements.size > 1, [c]);
598
+ lt({
599
+ popupElement: g,
600
+ positionerElement: T,
601
+ mounted: m,
602
+ content: y,
603
+ enabled: x,
604
+ onMeasureLayout: b,
605
+ onMeasureLayoutComplete: S,
606
+ side: u,
607
+ direction: C
608
+ });
609
+ const v = c.useState("disabled"), R = c.useState("closeDelay");
610
+ ot(h, {
611
+ enabled: !v,
612
+ closeDelay: R
613
+ });
614
+ const E = o.useMemo(() => ({
615
+ open: p,
616
+ side: u,
617
+ align: d,
618
+ instant: i,
619
+ transitionStatus: l
620
+ }), [p, u, d, i, l]);
621
+ return B("div", e, {
622
+ state: E,
623
+ ref: [t, c.context.popupRef, c.useStateSetter("popupElement")],
624
+ props: [n, ge(l), a],
625
+ stateAttributesMapping: Et
626
+ });
627
+ });
628
+ process.env.NODE_ENV !== "production" && (Ce.displayName = "TooltipPopup");
629
+ const Pe = /* @__PURE__ */ o.forwardRef(function(e, t) {
630
+ const {
631
+ className: r,
632
+ render: f,
633
+ ...a
634
+ } = e, u = H().useState("instantType"), {
635
+ open: d,
636
+ arrowRef: p,
637
+ side: m,
638
+ align: i,
639
+ arrowUncentered: l,
640
+ arrowStyles: n
641
+ } = ve(), y = o.useMemo(() => ({
642
+ open: d,
643
+ side: m,
644
+ align: i,
645
+ uncentered: l,
646
+ instant: u
647
+ }), [d, m, i, l, u]);
648
+ return B("div", e, {
649
+ state: y,
650
+ ref: [t, p],
651
+ props: [{
652
+ style: n,
653
+ "aria-hidden": !0
654
+ }, a],
655
+ stateAttributesMapping: $
656
+ });
657
+ });
658
+ process.env.NODE_ENV !== "production" && (Pe.displayName = "TooltipArrow");
659
+ const Re = function(e) {
660
+ const {
661
+ delay: t,
662
+ closeDelay: r,
663
+ timeout: f = 400
664
+ } = e, a = o.useMemo(() => ({
665
+ delay: t,
666
+ closeDelay: r
667
+ }), [t, r]), c = o.useMemo(() => ({
668
+ open: t,
669
+ close: r
670
+ }), [t, r]);
671
+ return /* @__PURE__ */ O(Q.Provider, {
672
+ value: a,
673
+ children: /* @__PURE__ */ O(pt, {
674
+ delay: c,
675
+ timeoutMs: f,
676
+ children: e.children
677
+ })
678
+ });
679
+ };
680
+ process.env.NODE_ENV !== "production" && (Re.displayName = "TooltipProvider");
681
+ const qt = Re;
682
+ function Jt({
683
+ children: s,
684
+ trigger: e,
685
+ align: t,
686
+ side: r,
687
+ className: f,
688
+ ...a
689
+ }) {
690
+ return /* @__PURE__ */ ne(vt, { ...a, children: [
691
+ e ? /* @__PURE__ */ O(ye, { render: e }) : null,
692
+ /* @__PURE__ */ O(he, { children: /* @__PURE__ */ O(Te, { align: t, side: r, sideOffset: 8, children: /* @__PURE__ */ ne(
693
+ Ce,
694
+ {
695
+ render: /* @__PURE__ */ O(xe, { background: "highest" }),
696
+ className: Ee(
697
+ oe.tooltip,
698
+ De.transition_scale,
699
+ f
700
+ ),
701
+ children: [
702
+ /* @__PURE__ */ O(Pe, { className: oe.tooltip__arrow, children: /* @__PURE__ */ O(be, {}) }),
703
+ Se(s)
704
+ ]
705
+ }
706
+ ) }) })
707
+ ] });
708
+ }
709
+ export {
710
+ Jt as Tooltip,
711
+ qt as TooltipProvider
712
+ };
@@ -0,0 +1,3 @@
1
+ export declare function TooltipArrow(props: {
2
+ className?: string;
3
+ }): import("react/jsx-runtime").JSX.Element;