@kumix/ui 0.3.13 → 0.3.15

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 (541) hide show
  1. package/README.md +12 -12
  2. package/dist/components/agents/agent-activity/activity-row.js +1 -1
  3. package/dist/components/agents/agent-activity/activity-row.js.map +1 -1
  4. package/dist/components/agents/agent-activity/index.js +1 -1
  5. package/dist/components/agents/agent-activity/index.js.map +1 -1
  6. package/dist/components/agents/agent-code.d.ts.map +1 -1
  7. package/dist/components/agents/agent-code.js +1 -1
  8. package/dist/components/agents/agent-code.js.map +1 -1
  9. package/dist/components/agents/agent-disclosure.js +1 -1
  10. package/dist/components/agents/agent-disclosure.js.map +1 -1
  11. package/dist/components/agents/ai-sidebar.js +1 -1
  12. package/dist/components/agents/ai-sidebar.js.map +1 -1
  13. package/dist/components/agents/approval-card/index.js +1 -1
  14. package/dist/components/agents/approval-card/index.js.map +1 -1
  15. package/dist/components/agents/chat-app.js +1 -1
  16. package/dist/components/agents/chat-app.js.map +1 -1
  17. package/dist/components/agents/citations.js +1 -1
  18. package/dist/components/agents/citations.js.map +1 -1
  19. package/dist/components/agents/code-block.js +1 -1
  20. package/dist/components/agents/code-block.js.map +1 -1
  21. package/dist/components/agents/file-diff.js +1 -1
  22. package/dist/components/agents/file-diff.js.map +1 -1
  23. package/dist/components/agents/image-generation.js +1 -1
  24. package/dist/components/agents/image-generation.js.map +1 -1
  25. package/dist/components/agents/loading-states/agent-progress.js +1 -1
  26. package/dist/components/agents/loading-states/agent-progress.js.map +1 -1
  27. package/dist/components/agents/loading-states/reasoning-text.js +1 -1
  28. package/dist/components/agents/loading-states/reasoning-text.js.map +1 -1
  29. package/dist/components/agents/loading-states/thinking-shimmer.js +1 -1
  30. package/dist/components/agents/loading-states/thinking-shimmer.js.map +1 -1
  31. package/dist/components/agents/message-bubble.js +1 -1
  32. package/dist/components/agents/message-bubble.js.map +1 -1
  33. package/dist/components/agents/message-scroller.js +1 -1
  34. package/dist/components/agents/message-scroller.js.map +1 -1
  35. package/dist/components/agents/message.js +1 -1
  36. package/dist/components/agents/message.js.map +1 -1
  37. package/dist/components/agents/prompt-input.js +1 -1
  38. package/dist/components/agents/prompt-input.js.map +1 -1
  39. package/dist/components/agents/streaming-response.js +1 -1
  40. package/dist/components/agents/streaming-response.js.map +1 -1
  41. package/dist/components/agents/todo-list.js +1 -1
  42. package/dist/components/agents/todo-list.js.map +1 -1
  43. package/dist/components/agents/tool-approval.js +1 -1
  44. package/dist/components/agents/tool-approval.js.map +1 -1
  45. package/dist/components/agents/tool-result.js +1 -1
  46. package/dist/components/agents/tool-result.js.map +1 -1
  47. package/dist/components/motion/action-swap.js +1 -1
  48. package/dist/components/motion/action-swap.js.map +1 -1
  49. package/dist/components/motion/adaptive-stepper.js +1 -1
  50. package/dist/components/motion/adaptive-stepper.js.map +1 -1
  51. package/dist/components/motion/animated-badge.js +1 -1
  52. package/dist/components/motion/animated-badge.js.map +1 -1
  53. package/dist/components/motion/animated-number.js +1 -1
  54. package/dist/components/motion/animated-number.js.map +1 -1
  55. package/dist/components/motion/animated-sidebar.js +1 -1
  56. package/dist/components/motion/animated-sidebar.js.map +1 -1
  57. package/dist/components/motion/animated-toast-stack.js +5 -4
  58. package/dist/components/motion/animated-toast-stack.js.map +1 -1
  59. package/dist/components/motion/attachment-upload.js +1 -1
  60. package/dist/components/motion/attachment-upload.js.map +1 -1
  61. package/dist/components/motion/availability-scheduler/icon-button.js +1 -1
  62. package/dist/components/motion/availability-scheduler/icon-button.js.map +1 -1
  63. package/dist/components/motion/availability-scheduler/index.js +1 -1
  64. package/dist/components/motion/availability-scheduler/index.js.map +1 -1
  65. package/dist/components/motion/bloom-menu.js +1 -1
  66. package/dist/components/motion/bloom-menu.js.map +1 -1
  67. package/dist/components/motion/bottom-sheet.js +1 -1
  68. package/dist/components/motion/bottom-sheet.js.map +1 -1
  69. package/dist/components/motion/bounce-sidebar.d.ts.map +1 -1
  70. package/dist/components/motion/bounce-sidebar.js +1 -1
  71. package/dist/components/motion/bounce-sidebar.js.map +1 -1
  72. package/dist/components/motion/bouncy-accordion.js +1 -1
  73. package/dist/components/motion/bouncy-accordion.js.map +1 -1
  74. package/dist/components/motion/button/base.js +1 -1
  75. package/dist/components/motion/button/base.js.map +1 -1
  76. package/dist/components/motion/button/metallic.js +1 -1
  77. package/dist/components/motion/button/metallic.js.map +1 -1
  78. package/dist/components/motion/card-folder.js +1 -1
  79. package/dist/components/motion/card-folder.js.map +1 -1
  80. package/dist/components/motion/center-morph-modal.js +1 -1
  81. package/dist/components/motion/center-morph-modal.js.map +1 -1
  82. package/dist/components/motion/checkbox.js +1 -1
  83. package/dist/components/motion/checkbox.js.map +1 -1
  84. package/dist/components/motion/chromatic-text-reveal.js +1 -1
  85. package/dist/components/motion/chromatic-text-reveal.js.map +1 -1
  86. package/dist/components/motion/combobox/content.js +1 -1
  87. package/dist/components/motion/combobox/content.js.map +1 -1
  88. package/dist/components/motion/combobox/context.js +1 -1
  89. package/dist/components/motion/combobox/context.js.map +1 -1
  90. package/dist/components/motion/combobox/list.js +1 -1
  91. package/dist/components/motion/combobox/list.js.map +1 -1
  92. package/dist/components/motion/combobox/trigger.js +1 -1
  93. package/dist/components/motion/combobox/trigger.js.map +1 -1
  94. package/dist/components/motion/command-palette.d.ts.map +1 -1
  95. package/dist/components/motion/command-palette.js +3 -22
  96. package/dist/components/motion/command-palette.js.map +1 -1
  97. package/dist/components/motion/context-menu.js +1 -1
  98. package/dist/components/motion/context-menu.js.map +1 -1
  99. package/dist/components/motion/cylinder-carousel.js +1 -1
  100. package/dist/components/motion/cylinder-carousel.js.map +1 -1
  101. package/dist/components/motion/digit-swap.js +1 -1
  102. package/dist/components/motion/digit-swap.js.map +1 -1
  103. package/dist/components/motion/dock.js +1 -1
  104. package/dist/components/motion/dock.js.map +1 -1
  105. package/dist/components/motion/drawer.js +1 -1
  106. package/dist/components/motion/drawer.js.map +1 -1
  107. package/dist/components/motion/dynamic-island.js +1 -1
  108. package/dist/components/motion/dynamic-island.js.map +1 -1
  109. package/dist/components/motion/expandable-action-bar.js +1 -1
  110. package/dist/components/motion/expandable-action-bar.js.map +1 -1
  111. package/dist/components/motion/expandable-control.d.ts.map +1 -1
  112. package/dist/components/motion/expandable-control.js +1 -1
  113. package/dist/components/motion/expandable-control.js.map +1 -1
  114. package/dist/components/motion/expandable-tabs.js +1 -1
  115. package/dist/components/motion/expandable-tabs.js.map +1 -1
  116. package/dist/components/motion/expanding-arrow-button.js +1 -1
  117. package/dist/components/motion/expanding-arrow-button.js.map +1 -1
  118. package/dist/components/motion/feedback-widget.js +1 -1
  119. package/dist/components/motion/feedback-widget.js.map +1 -1
  120. package/dist/components/motion/file-tree.js +1 -1
  121. package/dist/components/motion/file-tree.js.map +1 -1
  122. package/dist/components/motion/file-upload.js +1 -1
  123. package/dist/components/motion/file-upload.js.map +1 -1
  124. package/dist/components/motion/hold-action-button.js +1 -1
  125. package/dist/components/motion/hold-action-button.js.map +1 -1
  126. package/dist/components/motion/infinite-masonry.js +1 -1
  127. package/dist/components/motion/infinite-masonry.js.map +1 -1
  128. package/dist/components/motion/input.d.ts.map +1 -1
  129. package/dist/components/motion/input.js +1 -1
  130. package/dist/components/motion/input.js.map +1 -1
  131. package/dist/components/motion/liquid.js +1 -1
  132. package/dist/components/motion/liquid.js.map +1 -1
  133. package/dist/components/motion/loader.js +1 -1
  134. package/dist/components/motion/loader.js.map +1 -1
  135. package/dist/components/motion/magnetic.js +1 -1
  136. package/dist/components/motion/magnetic.js.map +1 -1
  137. package/dist/components/motion/marquee.d.ts.map +1 -1
  138. package/dist/components/motion/marquee.js +1 -1
  139. package/dist/components/motion/marquee.js.map +1 -1
  140. package/dist/components/motion/morphing-modal.js +1 -1
  141. package/dist/components/motion/morphing-modal.js.map +1 -1
  142. package/dist/components/motion/morphing-search.js +1 -1
  143. package/dist/components/motion/morphing-search.js.map +1 -1
  144. package/dist/components/motion/morphing-tabs.js +1 -1
  145. package/dist/components/motion/morphing-tabs.js.map +1 -1
  146. package/dist/components/motion/multi-select/content.js +1 -1
  147. package/dist/components/motion/multi-select/content.js.map +1 -1
  148. package/dist/components/motion/multi-select/context.js +1 -1
  149. package/dist/components/motion/multi-select/context.js.map +1 -1
  150. package/dist/components/motion/multi-select/list.js +1 -1
  151. package/dist/components/motion/multi-select/list.js.map +1 -1
  152. package/dist/components/motion/multi-select/trigger.js +1 -1
  153. package/dist/components/motion/multi-select/trigger.js.map +1 -1
  154. package/dist/components/motion/not-found/magnetic.d.ts.map +1 -1
  155. package/dist/components/motion/not-found/magnetic.js +1 -1
  156. package/dist/components/motion/not-found/magnetic.js.map +1 -1
  157. package/dist/components/motion/not-found/shared.js +1 -1
  158. package/dist/components/motion/not-found/shared.js.map +1 -1
  159. package/dist/components/motion/not-found/spotlight.js +1 -1
  160. package/dist/components/motion/not-found/spotlight.js.map +1 -1
  161. package/dist/components/motion/notification-stack.js +1 -1
  162. package/dist/components/motion/notification-stack.js.map +1 -1
  163. package/dist/components/motion/number-ticker.js +1 -1
  164. package/dist/components/motion/number-ticker.js.map +1 -1
  165. package/dist/components/motion/otp-input.js +1 -1
  166. package/dist/components/motion/otp-input.js.map +1 -1
  167. package/dist/components/motion/overflow-actions.js +1 -1
  168. package/dist/components/motion/overflow-actions.js.map +1 -1
  169. package/dist/components/motion/parallax.d.ts.map +1 -1
  170. package/dist/components/motion/parallax.js +1 -1
  171. package/dist/components/motion/parallax.js.map +1 -1
  172. package/dist/components/motion/popover-morph.js +1 -1
  173. package/dist/components/motion/popover-morph.js.map +1 -1
  174. package/dist/components/motion/popover.js +1 -1
  175. package/dist/components/motion/popover.js.map +1 -1
  176. package/dist/components/motion/preview-rail.js +1 -1
  177. package/dist/components/motion/preview-rail.js.map +1 -1
  178. package/dist/components/motion/project-folder.js +1 -1
  179. package/dist/components/motion/project-folder.js.map +1 -1
  180. package/dist/components/motion/pull-to-refresh.js +1 -1
  181. package/dist/components/motion/pull-to-refresh.js.map +1 -1
  182. package/dist/components/motion/radio.js +1 -1
  183. package/dist/components/motion/radio.js.map +1 -1
  184. package/dist/components/motion/range-slider-bubble.js +1 -1
  185. package/dist/components/motion/range-slider-bubble.js.map +1 -1
  186. package/dist/components/motion/range-slider-fluid.js +1 -1
  187. package/dist/components/motion/range-slider-fluid.js.map +1 -1
  188. package/dist/components/motion/range-slider-inline.d.ts +18 -0
  189. package/dist/components/motion/range-slider-inline.d.ts.map +1 -0
  190. package/dist/components/motion/range-slider-inline.js +267 -0
  191. package/dist/components/motion/range-slider-inline.js.map +1 -0
  192. package/dist/components/motion/range-slider-ruler.js +1 -1
  193. package/dist/components/motion/range-slider-ruler.js.map +1 -1
  194. package/dist/components/motion/range-slider-wave.js +1 -1
  195. package/dist/components/motion/range-slider-wave.js.map +1 -1
  196. package/dist/components/motion/range-slider.d.ts.map +1 -1
  197. package/dist/components/motion/range-slider.js +27 -11
  198. package/dist/components/motion/range-slider.js.map +1 -1
  199. package/dist/components/motion/scroll-progress.js +1 -1
  200. package/dist/components/motion/scroll-progress.js.map +1 -1
  201. package/dist/components/motion/scroll-reveal.js +1 -1
  202. package/dist/components/motion/scroll-reveal.js.map +1 -1
  203. package/dist/components/motion/scroll-to.js +1 -1
  204. package/dist/components/motion/scroll-to.js.map +1 -1
  205. package/dist/components/motion/select-morph.d.ts.map +1 -1
  206. package/dist/components/motion/select-morph.js +1 -1
  207. package/dist/components/motion/select-morph.js.map +1 -1
  208. package/dist/components/motion/select.js +1 -1
  209. package/dist/components/motion/select.js.map +1 -1
  210. package/dist/components/motion/shader-background.d.ts.map +1 -1
  211. package/dist/components/motion/shader-background.js +1 -1
  212. package/dist/components/motion/shader-background.js.map +1 -1
  213. package/dist/components/motion/shared-layout-bg.js +1 -1
  214. package/dist/components/motion/shared-layout-bg.js.map +1 -1
  215. package/dist/components/motion/signup-form.js +1 -1
  216. package/dist/components/motion/signup-form.js.map +1 -1
  217. package/dist/components/motion/slide-action-button.js +1 -1
  218. package/dist/components/motion/slide-action-button.js.map +1 -1
  219. package/dist/components/motion/swipeable-list.js +1 -1
  220. package/dist/components/motion/swipeable-list.js.map +1 -1
  221. package/dist/components/motion/switch.d.ts.map +1 -1
  222. package/dist/components/motion/switch.js +1 -1
  223. package/dist/components/motion/switch.js.map +1 -1
  224. package/dist/components/motion/table/index.js +1 -1
  225. package/dist/components/motion/table/index.js.map +1 -1
  226. package/dist/components/motion/table/skeleton-rows.d.ts.map +1 -1
  227. package/dist/components/motion/table/skeleton-rows.js +1 -1
  228. package/dist/components/motion/table/skeleton-rows.js.map +1 -1
  229. package/dist/components/motion/table/table-header.js +1 -1
  230. package/dist/components/motion/table/table-header.js.map +1 -1
  231. package/dist/components/motion/table/table-menu.js +1 -1
  232. package/dist/components/motion/table/table-menu.js.map +1 -1
  233. package/dist/components/motion/tabs.js +2 -2
  234. package/dist/components/motion/tabs.js.map +1 -1
  235. package/dist/components/motion/text-reveal.js +1 -1
  236. package/dist/components/motion/text-reveal.js.map +1 -1
  237. package/dist/components/motion/text-scramble.d.ts.map +1 -1
  238. package/dist/components/motion/text-scramble.js +1 -1
  239. package/dist/components/motion/text-scramble.js.map +1 -1
  240. package/dist/components/motion/text-shimmer.js +1 -1
  241. package/dist/components/motion/text-shimmer.js.map +1 -1
  242. package/dist/components/motion/theme-toggle.js +1 -1
  243. package/dist/components/motion/theme-toggle.js.map +1 -1
  244. package/dist/components/motion/tilt-card.js +1 -1
  245. package/dist/components/motion/tilt-card.js.map +1 -1
  246. package/dist/components/motion/tooltip-surface.d.ts +12 -0
  247. package/dist/components/motion/tooltip-surface.d.ts.map +1 -0
  248. package/dist/components/motion/tooltip-surface.js +97 -0
  249. package/dist/components/motion/tooltip-surface.js.map +1 -0
  250. package/dist/components/motion/tooltip.d.ts +13 -3
  251. package/dist/components/motion/tooltip.d.ts.map +1 -1
  252. package/dist/components/motion/tooltip.js +75 -104
  253. package/dist/components/motion/tooltip.js.map +1 -1
  254. package/dist/components/motion/wheel-picker.js +1 -1
  255. package/dist/components/motion/wheel-picker.js.map +1 -1
  256. package/dist/components/reui/alert.d.ts +1 -1
  257. package/dist/components/reui/alert.d.ts.map +1 -1
  258. package/dist/components/reui/alert.js +1 -1
  259. package/dist/components/reui/alert.js.map +1 -1
  260. package/dist/components/reui/autocomplete.d.ts +1 -1
  261. package/dist/components/reui/autocomplete.d.ts.map +1 -1
  262. package/dist/components/reui/autocomplete.js +2 -2
  263. package/dist/components/reui/autocomplete.js.map +1 -1
  264. package/dist/components/reui/badge.d.ts +2 -2
  265. package/dist/components/reui/badge.d.ts.map +1 -1
  266. package/dist/components/reui/badge.js +1 -1
  267. package/dist/components/reui/badge.js.map +1 -1
  268. package/dist/components/reui/cascader/cascader-columns.js +1 -1
  269. package/dist/components/reui/cascader/cascader-columns.js.map +1 -1
  270. package/dist/components/reui/cascader/cascader-footer.js +1 -1
  271. package/dist/components/reui/cascader/cascader-footer.js.map +1 -1
  272. package/dist/components/reui/cascader/cascader-item.js +1 -1
  273. package/dist/components/reui/cascader/cascader-item.js.map +1 -1
  274. package/dist/components/reui/cascader/cascader-nav.js +1 -1
  275. package/dist/components/reui/cascader/cascader-nav.js.map +1 -1
  276. package/dist/components/reui/cascader/cascader.js +1 -1
  277. package/dist/components/reui/cascader/cascader.js.map +1 -1
  278. package/dist/components/reui/code-block/code-block.js +1 -1
  279. package/dist/components/reui/code-block/code-block.js.map +1 -1
  280. package/dist/components/reui/data-grid/data-grid-cell-selection.js +1 -1
  281. package/dist/components/reui/data-grid/data-grid-cell-selection.js.map +1 -1
  282. package/dist/components/reui/data-grid/data-grid-column-filter.js +1 -1
  283. package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -1
  284. package/dist/components/reui/data-grid/data-grid-column-header.js +1 -1
  285. package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -1
  286. package/dist/components/reui/data-grid/data-grid-pagination.js +1 -1
  287. package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -1
  288. package/dist/components/reui/data-grid/data-grid-scroll-area.js +1 -1
  289. package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -1
  290. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +1 -1
  291. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -1
  292. package/dist/components/reui/data-grid/data-grid-table-virtual.js +1 -1
  293. package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -1
  294. package/dist/components/reui/data-grid/data-grid-table.js +1 -1
  295. package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
  296. package/dist/components/reui/data-grid/data-grid.js +1 -1
  297. package/dist/components/reui/data-grid/data-grid.js.map +1 -1
  298. package/dist/components/reui/date-selector.js +1 -1
  299. package/dist/components/reui/date-selector.js.map +1 -1
  300. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +1 -1
  301. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -1
  302. package/dist/components/reui/event-calendar/event-calendar-content.js +1 -1
  303. package/dist/components/reui/event-calendar/event-calendar-content.js.map +1 -1
  304. package/dist/components/reui/event-calendar/event-calendar-event.js +1 -1
  305. package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -1
  306. package/dist/components/reui/event-calendar/event-calendar-month-view.js +1 -1
  307. package/dist/components/reui/event-calendar/event-calendar-month-view.js.map +1 -1
  308. package/dist/components/reui/event-calendar/event-calendar-nav.js +1 -1
  309. package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -1
  310. package/dist/components/reui/event-calendar/event-calendar-resource-view.js +1 -1
  311. package/dist/components/reui/event-calendar/event-calendar-resource-view.js.map +1 -1
  312. package/dist/components/reui/event-calendar/event-calendar-time-grid.js +1 -1
  313. package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -1
  314. package/dist/components/reui/event-calendar/event-calendar.js +1 -1
  315. package/dist/components/reui/event-calendar/event-calendar.js.map +1 -1
  316. package/dist/components/reui/filters/filters-advanced.js +1 -1
  317. package/dist/components/reui/filters/filters-advanced.js.map +1 -1
  318. package/dist/components/reui/filters/filters-builder.js +1 -1
  319. package/dist/components/reui/filters/filters-builder.js.map +1 -1
  320. package/dist/components/reui/filters/filters-chip.js +1 -1
  321. package/dist/components/reui/filters/filters-chip.js.map +1 -1
  322. package/dist/components/reui/filters/filters-editors.js +1 -1
  323. package/dist/components/reui/filters/filters-editors.js.map +1 -1
  324. package/dist/components/reui/filters/filters.js +1 -1
  325. package/dist/components/reui/filters/filters.js.map +1 -1
  326. package/dist/components/reui/frame.d.ts +6 -12
  327. package/dist/components/reui/frame.d.ts.map +1 -1
  328. package/dist/components/reui/frame.js +10 -17
  329. package/dist/components/reui/frame.js.map +1 -1
  330. package/dist/components/reui/gantt/gantt-bar.js +1 -1
  331. package/dist/components/reui/gantt/gantt-bar.js.map +1 -1
  332. package/dist/components/reui/gantt/gantt-nav.js +1 -1
  333. package/dist/components/reui/gantt/gantt-nav.js.map +1 -1
  334. package/dist/components/reui/gantt/gantt-view.js +1 -1
  335. package/dist/components/reui/gantt/gantt-view.js.map +1 -1
  336. package/dist/components/reui/gantt/gantt.js +1 -1
  337. package/dist/components/reui/gantt/gantt.js.map +1 -1
  338. package/dist/components/reui/icon-stack.js +1 -1
  339. package/dist/components/reui/icon-stack.js.map +1 -1
  340. package/dist/components/reui/icon-tile.d.ts +2 -2
  341. package/dist/components/reui/icon-tile.d.ts.map +1 -1
  342. package/dist/components/reui/icon-tile.js +1 -1
  343. package/dist/components/reui/icon-tile.js.map +1 -1
  344. package/dist/components/reui/kanban.d.ts.map +1 -1
  345. package/dist/components/reui/kanban.js +1 -1
  346. package/dist/components/reui/kanban.js.map +1 -1
  347. package/dist/components/reui/number-field.d.ts +3 -3
  348. package/dist/components/reui/number-field.d.ts.map +1 -1
  349. package/dist/components/reui/number-field.js +4 -4
  350. package/dist/components/reui/number-field.js.map +1 -1
  351. package/dist/components/reui/phone-input.js +1 -1
  352. package/dist/components/reui/phone-input.js.map +1 -1
  353. package/dist/components/reui/rating.d.ts +1 -1
  354. package/dist/components/reui/rating.d.ts.map +1 -1
  355. package/dist/components/reui/rating.js +1 -1
  356. package/dist/components/reui/rating.js.map +1 -1
  357. package/dist/components/reui/sortable.d.ts.map +1 -1
  358. package/dist/components/reui/sortable.js +1 -1
  359. package/dist/components/reui/sortable.js.map +1 -1
  360. package/dist/components/reui/stepper.d.ts.map +1 -1
  361. package/dist/components/reui/stepper.js +1 -1
  362. package/dist/components/reui/stepper.js.map +1 -1
  363. package/dist/components/reui/timeline.d.ts.map +1 -1
  364. package/dist/components/reui/timeline.js +1 -1
  365. package/dist/components/reui/timeline.js.map +1 -1
  366. package/dist/components/reui/tree.d.ts.map +1 -1
  367. package/dist/components/reui/tree.js +1 -1
  368. package/dist/components/reui/tree.js.map +1 -1
  369. package/dist/components/ui/accordion.d.ts.map +1 -1
  370. package/dist/components/ui/accordion.js +1 -1
  371. package/dist/components/ui/accordion.js.map +1 -1
  372. package/dist/components/ui/alert-dialog.js +1 -1
  373. package/dist/components/ui/alert-dialog.js.map +1 -1
  374. package/dist/components/ui/alert.d.ts.map +1 -1
  375. package/dist/components/ui/alert.js +1 -1
  376. package/dist/components/ui/alert.js.map +1 -1
  377. package/dist/components/ui/aspect-ratio.js +1 -1
  378. package/dist/components/ui/aspect-ratio.js.map +1 -1
  379. package/dist/components/ui/attachment.d.ts +1 -1
  380. package/dist/components/ui/attachment.js +1 -1
  381. package/dist/components/ui/attachment.js.map +1 -1
  382. package/dist/components/ui/avatar.d.ts.map +1 -1
  383. package/dist/components/ui/avatar.js +1 -1
  384. package/dist/components/ui/avatar.js.map +1 -1
  385. package/dist/components/ui/badge.d.ts +1 -1
  386. package/dist/components/ui/badge.d.ts.map +1 -1
  387. package/dist/components/ui/badge.js +1 -1
  388. package/dist/components/ui/badge.js.map +1 -1
  389. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  390. package/dist/components/ui/breadcrumb.js +1 -1
  391. package/dist/components/ui/breadcrumb.js.map +1 -1
  392. package/dist/components/ui/bubble.d.ts +1 -1
  393. package/dist/components/ui/bubble.d.ts.map +1 -1
  394. package/dist/components/ui/bubble.js +1 -1
  395. package/dist/components/ui/bubble.js.map +1 -1
  396. package/dist/components/ui/button-group.js +1 -1
  397. package/dist/components/ui/button-group.js.map +1 -1
  398. package/dist/components/ui/button.d.ts +2 -2
  399. package/dist/components/ui/button.d.ts.map +1 -1
  400. package/dist/components/ui/button.js +1 -1
  401. package/dist/components/ui/button.js.map +1 -1
  402. package/dist/components/ui/calendar.js +1 -1
  403. package/dist/components/ui/calendar.js.map +1 -1
  404. package/dist/components/ui/card.d.ts.map +1 -1
  405. package/dist/components/ui/card.js +1 -1
  406. package/dist/components/ui/card.js.map +1 -1
  407. package/dist/components/ui/carousel.js +1 -1
  408. package/dist/components/ui/carousel.js.map +1 -1
  409. package/dist/components/ui/chart.d.ts.map +1 -1
  410. package/dist/components/ui/chart.js +1 -1
  411. package/dist/components/ui/chart.js.map +1 -1
  412. package/dist/components/ui/checkbox.d.ts.map +1 -1
  413. package/dist/components/ui/checkbox.js +1 -1
  414. package/dist/components/ui/checkbox.js.map +1 -1
  415. package/dist/components/ui/combobox.js +1 -1
  416. package/dist/components/ui/combobox.js.map +1 -1
  417. package/dist/components/ui/command.js +1 -1
  418. package/dist/components/ui/command.js.map +1 -1
  419. package/dist/components/ui/context-menu.d.ts.map +1 -1
  420. package/dist/components/ui/context-menu.js +1 -1
  421. package/dist/components/ui/context-menu.js.map +1 -1
  422. package/dist/components/ui/dialog.js +1 -1
  423. package/dist/components/ui/dialog.js.map +1 -1
  424. package/dist/components/ui/drawer.d.ts.map +1 -1
  425. package/dist/components/ui/drawer.js +1 -1
  426. package/dist/components/ui/drawer.js.map +1 -1
  427. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  428. package/dist/components/ui/dropdown-menu.js +1 -1
  429. package/dist/components/ui/dropdown-menu.js.map +1 -1
  430. package/dist/components/ui/empty.d.ts.map +1 -1
  431. package/dist/components/ui/empty.js +1 -1
  432. package/dist/components/ui/empty.js.map +1 -1
  433. package/dist/components/ui/field.js +1 -1
  434. package/dist/components/ui/field.js.map +1 -1
  435. package/dist/components/ui/hover-card.d.ts.map +1 -1
  436. package/dist/components/ui/hover-card.js +1 -1
  437. package/dist/components/ui/hover-card.js.map +1 -1
  438. package/dist/components/ui/input-group.d.ts +1 -1
  439. package/dist/components/ui/input-group.js +1 -1
  440. package/dist/components/ui/input-group.js.map +1 -1
  441. package/dist/components/ui/input-otp.d.ts.map +1 -1
  442. package/dist/components/ui/input-otp.js +1 -1
  443. package/dist/components/ui/input-otp.js.map +1 -1
  444. package/dist/components/ui/input.d.ts.map +1 -1
  445. package/dist/components/ui/input.js +1 -1
  446. package/dist/components/ui/input.js.map +1 -1
  447. package/dist/components/ui/item.d.ts +2 -2
  448. package/dist/components/ui/item.js +1 -1
  449. package/dist/components/ui/item.js.map +1 -1
  450. package/dist/components/ui/kbd.js +1 -1
  451. package/dist/components/ui/kbd.js.map +1 -1
  452. package/dist/components/ui/label.d.ts.map +1 -1
  453. package/dist/components/ui/label.js +1 -1
  454. package/dist/components/ui/label.js.map +1 -1
  455. package/dist/components/ui/marker.d.ts +1 -1
  456. package/dist/components/ui/marker.d.ts.map +1 -1
  457. package/dist/components/ui/marker.js +1 -1
  458. package/dist/components/ui/marker.js.map +1 -1
  459. package/dist/components/ui/menubar.js +1 -1
  460. package/dist/components/ui/menubar.js.map +1 -1
  461. package/dist/components/ui/message-scroller.js +1 -1
  462. package/dist/components/ui/message-scroller.js.map +1 -1
  463. package/dist/components/ui/message.d.ts.map +1 -1
  464. package/dist/components/ui/message.js +1 -1
  465. package/dist/components/ui/message.js.map +1 -1
  466. package/dist/components/ui/native-select.d.ts.map +1 -1
  467. package/dist/components/ui/native-select.js +1 -1
  468. package/dist/components/ui/native-select.js.map +1 -1
  469. package/dist/components/ui/navigation-menu.d.ts.map +1 -1
  470. package/dist/components/ui/navigation-menu.js +1 -1
  471. package/dist/components/ui/navigation-menu.js.map +1 -1
  472. package/dist/components/ui/pagination.js +1 -1
  473. package/dist/components/ui/pagination.js.map +1 -1
  474. package/dist/components/ui/popover.d.ts.map +1 -1
  475. package/dist/components/ui/popover.js +1 -1
  476. package/dist/components/ui/popover.js.map +1 -1
  477. package/dist/components/ui/progress.d.ts.map +1 -1
  478. package/dist/components/ui/progress.js +1 -1
  479. package/dist/components/ui/progress.js.map +1 -1
  480. package/dist/components/ui/questionnaire.js +1 -1
  481. package/dist/components/ui/questionnaire.js.map +1 -1
  482. package/dist/components/ui/radio-group.d.ts.map +1 -1
  483. package/dist/components/ui/radio-group.js +1 -1
  484. package/dist/components/ui/radio-group.js.map +1 -1
  485. package/dist/components/ui/resizable.d.ts.map +1 -1
  486. package/dist/components/ui/resizable.js +1 -1
  487. package/dist/components/ui/resizable.js.map +1 -1
  488. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  489. package/dist/components/ui/scroll-area.js +1 -1
  490. package/dist/components/ui/scroll-area.js.map +1 -1
  491. package/dist/components/ui/select.d.ts.map +1 -1
  492. package/dist/components/ui/select.js +1 -1
  493. package/dist/components/ui/select.js.map +1 -1
  494. package/dist/components/ui/separator.d.ts.map +1 -1
  495. package/dist/components/ui/separator.js +1 -1
  496. package/dist/components/ui/separator.js.map +1 -1
  497. package/dist/components/ui/sheet.js +1 -1
  498. package/dist/components/ui/sheet.js.map +1 -1
  499. package/dist/components/ui/sidebar.d.ts +1 -1
  500. package/dist/components/ui/sidebar.js +1 -1
  501. package/dist/components/ui/sidebar.js.map +1 -1
  502. package/dist/components/ui/skeleton.js +1 -1
  503. package/dist/components/ui/skeleton.js.map +1 -1
  504. package/dist/components/ui/slider.d.ts.map +1 -1
  505. package/dist/components/ui/slider.js +1 -1
  506. package/dist/components/ui/slider.js.map +1 -1
  507. package/dist/components/ui/spinner.d.ts.map +1 -1
  508. package/dist/components/ui/spinner.js +1 -1
  509. package/dist/components/ui/spinner.js.map +1 -1
  510. package/dist/components/ui/switch.d.ts.map +1 -1
  511. package/dist/components/ui/switch.js +1 -1
  512. package/dist/components/ui/switch.js.map +1 -1
  513. package/dist/components/ui/table.d.ts.map +1 -1
  514. package/dist/components/ui/table.js +1 -1
  515. package/dist/components/ui/table.js.map +1 -1
  516. package/dist/components/ui/tabs.d.ts +1 -1
  517. package/dist/components/ui/tabs.d.ts.map +1 -1
  518. package/dist/components/ui/tabs.js +1 -1
  519. package/dist/components/ui/tabs.js.map +1 -1
  520. package/dist/components/ui/textarea.d.ts.map +1 -1
  521. package/dist/components/ui/textarea.js +1 -1
  522. package/dist/components/ui/textarea.js.map +1 -1
  523. package/dist/components/ui/toast.js +1 -1
  524. package/dist/components/ui/toast.js.map +1 -1
  525. package/dist/components/ui/toggle-group.js +1 -1
  526. package/dist/components/ui/toggle-group.js.map +1 -1
  527. package/dist/components/ui/toggle.d.ts +1 -1
  528. package/dist/components/ui/toggle.d.ts.map +1 -1
  529. package/dist/components/ui/toggle.js +1 -1
  530. package/dist/components/ui/toggle.js.map +1 -1
  531. package/dist/components/ui/tooltip.d.ts.map +1 -1
  532. package/dist/components/ui/tooltip.js +1 -1
  533. package/dist/components/ui/tooltip.js.map +1 -1
  534. package/dist/hooks/use-dismiss.d.ts +1 -1
  535. package/dist/hooks/use-dismiss.d.ts.map +1 -1
  536. package/dist/hooks/use-dismiss.js.map +1 -1
  537. package/dist/lib/command-search.d.ts +10 -0
  538. package/dist/lib/command-search.d.ts.map +1 -0
  539. package/dist/lib/command-search.js +52 -0
  540. package/dist/lib/command-search.js.map +1 -0
  541. package/package.json +10 -12
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.js","names":[],"sources":["../../../src/components/motion/tabs.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useId,\n useMemo,\n useState,\n} from \"react\";\nimport { cn } from \"cn\";\nimport { MotionConfig, motion, type Transition, useReducedMotion } from \"motion/react\";\n\nimport { EASE_OUT } from \"../../lib/ease\";\n\ntype Variant = \"pill\" | \"underline\" | \"segment\";\n\ntype Ctx = {\n value: string;\n setValue: (v: string) => void;\n layoutId: string;\n variant: Variant;\n};\n\nconst TabsCtx = createContext<Ctx | null>(null);\n\nfunction useTabs() {\n const ctx = useContext(TabsCtx);\n if (!ctx) throw new Error(\"Tabs.* must be used inside <Tabs>\");\n return ctx;\n}\n\n// Weighty spring for the active-tab indicator: a touch of overshoot so it\n// settles with life instead of snapping.\nconst transition: Transition = {\n type: \"spring\",\n stiffness: 170,\n damping: 24,\n mass: 1.2,\n};\n\nexport function Tabs({\n defaultValue,\n value,\n onValueChange,\n variant = \"pill\",\n children,\n className,\n}: {\n defaultValue?: string;\n value?: string;\n onValueChange?: (v: string) => void;\n variant?: Variant;\n children: ReactNode;\n className?: string;\n}) {\n const [internal, setInternal] = useState(defaultValue ?? \"\");\n const layoutId = useId();\n const reduce = useReducedMotion();\n const controlled = value !== undefined;\n const current = controlled ? value : internal;\n const setValue = useCallback(\n (v: string) => {\n if (!controlled) setInternal(v);\n onValueChange?.(v);\n },\n [controlled, onValueChange],\n );\n const contextValue = useMemo(\n () => ({ value: current, setValue, layoutId, variant }),\n [current, layoutId, setValue, variant],\n );\n return (\n <MotionConfig transition={reduce ? { duration: 0 } : transition}>\n <TabsCtx.Provider value={contextValue}>\n {/* layoutRoot: the indicator's layoutId measures in page coordinates, so\n inside fixed/scrolled containers it would replay scroll offsets as\n movement. The pill only ever travels within the list, so scoping\n projection to the Tabs wrapper is always correct. */}\n <motion.div layoutRoot className={className}>\n {children}\n </motion.div>\n </TabsCtx.Provider>\n </MotionConfig>\n );\n}\n\nconst listClasses: Record<Variant, string> = {\n pill: \"inline-flex items-center gap-1 rounded-full bg-card p-1\",\n underline: \"inline-flex items-center gap-1 border-b border-border\",\n segment: \"inline-flex items-center gap-0 rounded-lg bg-card p-0.5\",\n};\n\nexport function TabsList({ children, className }: { children: ReactNode; className?: string }) {\n const { variant } = useTabs();\n return (\n <div role=\"tablist\" className={cn(listClasses[variant], className)}>\n {children}\n </div>\n );\n}\n\nexport function TabsTrigger({\n value,\n children,\n className,\n indicatorClassName,\n}: {\n value: string;\n children: ReactNode;\n className?: string;\n indicatorClassName?: string;\n}) {\n const { value: current, setValue, layoutId, variant } = useTabs();\n const active = current === value;\n\n if (variant === \"underline\") {\n return (\n <button\n type=\"button\"\n role=\"tab\"\n aria-selected={active}\n onClick={() => setValue(value)}\n className={cn(\n \"relative isolate -mb-px inline-flex min-h-[44px] items-center px-3 pt-1 pb-2.5 font-medium text-sm transition-colors\",\n active ? \"text-foreground\" : \"text-muted-foreground hover:text-foreground\",\n className,\n )}\n >\n {children}\n {active ? (\n <motion.span\n layoutId={layoutId}\n layout=\"position\"\n className={cn(\"absolute right-0 -bottom-px left-0 h-px bg-primary\", indicatorClassName)}\n />\n ) : null}\n </button>\n );\n }\n\n const radius = variant === \"pill\" ? \"rounded-full\" : \"rounded-md\";\n\n return (\n <div className=\"relative\">\n {active ? (\n <motion.span\n layoutId={layoutId}\n layout=\"position\"\n style={{ borderRadius: variant === \"pill\" ? 9999 : 8 }}\n className={cn(\"absolute inset-0 bg-primary\", radius, indicatorClassName)}\n />\n ) : null}\n <button\n type=\"button\"\n role=\"tab\"\n aria-selected={active}\n onClick={() => setValue(value)}\n className={cn(\n \"relative z-10 inline-flex items-center justify-center whitespace-nowrap bg-transparent px-3.5 py-1.5 font-medium text-sm outline-none\",\n \"transition-colors\",\n active ? \"text-primary-foreground\" : \"text-muted-foreground hover:text-foreground\",\n radius,\n className,\n )}\n >\n {children}\n </button>\n </div>\n );\n}\n\nexport function TabsContent({\n value,\n children,\n className,\n}: {\n value: string;\n children: ReactNode;\n className?: string;\n}) {\n const { value: current } = useTabs();\n const reduce = useReducedMotion();\n const active = current === value;\n // Inactive panels stay mounted but hidden, so their content (e.g. source\n // code) is present in the server-rendered HTML for crawlers and assistive\n // tech, instead of being dropped from the DOM.\n if (!active) {\n return (\n <div hidden className={className}>\n {children}\n </div>\n );\n }\n return (\n <motion.div\n key={value}\n initial={{ opacity: 0, y: reduce ? 0 : 4 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.18, ease: EASE_OUT }}\n className={cn(\"mt-4\", className)}\n >\n {children}\n </motion.div>\n );\n}\n"],"mappings":";;;;;;;AAyBA,MAAM,UAAU,cAA0B,IAAI;AAE9C,SAAS,UAAU;CACjB,MAAM,MAAM,WAAW,OAAO;CAC9B,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,mCAAmC;CAC7D,OAAO;AACT;AAIA,MAAM,aAAyB;CAC7B,MAAM;CACN,WAAW;CACX,SAAS;CACT,MAAM;AACR;AAEA,SAAgB,KAAK,EACnB,cACA,OACA,eACA,UAAU,QACV,UACA,aAQC;CACD,MAAM,CAAC,UAAU,eAAe,SAAS,gBAAgB,EAAE;CAC3D,MAAM,WAAW,MAAM;CACvB,MAAM,SAAS,iBAAiB;CAChC,MAAM,aAAa,UAAU,KAAA;CAC7B,MAAM,UAAU,aAAa,QAAQ;CACrC,MAAM,WAAW,aACd,MAAc;EACb,IAAI,CAAC,YAAY,YAAY,CAAC;EAC9B,gBAAgB,CAAC;CACnB,GACA,CAAC,YAAY,aAAa,CAC5B;CACA,MAAM,eAAe,eACZ;EAAE,OAAO;EAAS;EAAU;EAAU;CAAQ,IACrD;EAAC;EAAS;EAAU;EAAU;CAAO,CACvC;CACA,OACE,oBAAC,cAAD;EAAc,YAAY,SAAS,EAAE,UAAU,EAAE,IAAI;EACnD,UAAA,oBAAC,QAAQ,UAAT;GAAkB,OAAO;GAKvB,UAAA,oBAAC,OAAO,KAAR;IAAY,YAAA;IAAsB;IAC/B;GACS,CAAA;EACI,CAAA;CACN,CAAA;AAElB;AAEA,MAAM,cAAuC;CAC3C,MAAM;CACN,WAAW;CACX,SAAS;AACX;AAEA,SAAgB,SAAS,EAAE,UAAU,aAA0D;CAC7F,MAAM,EAAE,YAAY,QAAQ;CAC5B,OACE,oBAAC,OAAD;EAAK,MAAK;EAAU,WAAW,GAAG,YAAY,UAAU,SAAS;EAC9D;CACE,CAAA;AAET;AAEA,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file":"tabs.js","names":[],"sources":["../../../src/components/motion/tabs.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useId,\n useMemo,\n useState,\n} from \"react\";\nimport { MotionConfig, motion, type Transition, useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT } from \"../../lib/ease\";\n\ntype Variant = \"pill\" | \"underline\" | \"segment\";\n\ntype Ctx = {\n value: string;\n setValue: (v: string) => void;\n layoutId: string;\n variant: Variant;\n};\n\nconst TabsCtx = createContext<Ctx | null>(null);\n\nfunction useTabs() {\n const ctx = useContext(TabsCtx);\n if (!ctx) throw new Error(\"Tabs.* must be used inside <Tabs>\");\n return ctx;\n}\n\n// Settle without overshoot: a scrollable tab list would turn even a small\n// overshoot into a transient scrollbar and layout shift.\nconst transition: Transition = {\n type: \"spring\",\n stiffness: 170,\n damping: 30,\n mass: 1.2,\n};\n\nexport function Tabs({\n defaultValue,\n value,\n onValueChange,\n variant = \"pill\",\n children,\n className,\n}: {\n defaultValue?: string;\n value?: string;\n onValueChange?: (v: string) => void;\n variant?: Variant;\n children: ReactNode;\n className?: string;\n}) {\n const [internal, setInternal] = useState(defaultValue ?? \"\");\n const layoutId = useId();\n const reduce = useReducedMotion();\n const controlled = value !== undefined;\n const current = controlled ? value : internal;\n const setValue = useCallback(\n (v: string) => {\n if (!controlled) setInternal(v);\n onValueChange?.(v);\n },\n [controlled, onValueChange],\n );\n const contextValue = useMemo(\n () => ({ value: current, setValue, layoutId, variant }),\n [current, layoutId, setValue, variant],\n );\n return (\n <MotionConfig transition={reduce ? { duration: 0 } : transition}>\n <TabsCtx.Provider value={contextValue}>\n {/* layoutRoot: the indicator's layoutId measures in page coordinates, so\n inside fixed/scrolled containers it would replay scroll offsets as\n movement. The pill only ever travels within the list, so scoping\n projection to the Tabs wrapper is always correct. */}\n <motion.div layoutRoot className={className}>\n {children}\n </motion.div>\n </TabsCtx.Provider>\n </MotionConfig>\n );\n}\n\nconst listClasses: Record<Variant, string> = {\n pill: \"inline-flex items-center gap-1 rounded-full bg-card p-1\",\n underline: \"inline-flex items-center gap-1 border-b border-border\",\n segment: \"inline-flex items-center gap-0 rounded-lg bg-card p-0.5\",\n};\n\nexport function TabsList({ children, className }: { children: ReactNode; className?: string }) {\n const { variant } = useTabs();\n return (\n <div role=\"tablist\" className={cn(listClasses[variant], className)}>\n {children}\n </div>\n );\n}\n\nexport function TabsTrigger({\n value,\n children,\n className,\n indicatorClassName,\n}: {\n value: string;\n children: ReactNode;\n className?: string;\n indicatorClassName?: string;\n}) {\n const { value: current, setValue, layoutId, variant } = useTabs();\n const active = current === value;\n\n if (variant === \"underline\") {\n return (\n <button\n type=\"button\"\n role=\"tab\"\n aria-selected={active}\n onClick={() => setValue(value)}\n className={cn(\n \"relative isolate -mb-px inline-flex min-h-[44px] items-center px-3 pt-1 pb-2.5 font-medium text-sm transition-colors\",\n active ? \"text-foreground\" : \"text-muted-foreground hover:text-foreground\",\n className,\n )}\n >\n {children}\n {active ? (\n <motion.span\n layoutId={layoutId}\n layout=\"position\"\n className={cn(\"absolute right-0 -bottom-px left-0 h-px bg-primary\", indicatorClassName)}\n />\n ) : null}\n </button>\n );\n }\n\n const radius = variant === \"pill\" ? \"rounded-full\" : \"rounded-md\";\n\n return (\n <div className=\"relative\">\n {active ? (\n <motion.span\n layoutId={layoutId}\n layout=\"position\"\n style={{ borderRadius: variant === \"pill\" ? 9999 : 8 }}\n className={cn(\"absolute inset-0 bg-primary\", radius, indicatorClassName)}\n />\n ) : null}\n <button\n type=\"button\"\n role=\"tab\"\n aria-selected={active}\n onClick={() => setValue(value)}\n className={cn(\n \"relative z-10 inline-flex items-center justify-center whitespace-nowrap bg-transparent px-3.5 py-1.5 font-medium text-sm outline-none\",\n \"transition-colors\",\n active ? \"text-primary-foreground\" : \"text-muted-foreground hover:text-foreground\",\n radius,\n className,\n )}\n >\n {children}\n </button>\n </div>\n );\n}\n\nexport function TabsContent({\n value,\n children,\n className,\n}: {\n value: string;\n children: ReactNode;\n className?: string;\n}) {\n const { value: current } = useTabs();\n const reduce = useReducedMotion();\n const active = current === value;\n // Inactive panels stay mounted but hidden, so their content (e.g. source\n // code) is present in the server-rendered HTML for crawlers and assistive\n // tech, instead of being dropped from the DOM.\n if (!active) {\n return (\n <div hidden className={className}>\n {children}\n </div>\n );\n }\n return (\n <motion.div\n key={value}\n initial={{ opacity: 0, y: reduce ? 0 : 4 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.18, ease: EASE_OUT }}\n className={cn(\"mt-4\", className)}\n >\n {children}\n </motion.div>\n );\n}\n"],"mappings":";;;;;;;AAyBA,MAAM,UAAU,cAA0B,IAAI;AAE9C,SAAS,UAAU;CACjB,MAAM,MAAM,WAAW,OAAO;CAC9B,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,mCAAmC;CAC7D,OAAO;AACT;AAIA,MAAM,aAAyB;CAC7B,MAAM;CACN,WAAW;CACX,SAAS;CACT,MAAM;AACR;AAEA,SAAgB,KAAK,EACnB,cACA,OACA,eACA,UAAU,QACV,UACA,aAQC;CACD,MAAM,CAAC,UAAU,eAAe,SAAS,gBAAgB,EAAE;CAC3D,MAAM,WAAW,MAAM;CACvB,MAAM,SAAS,iBAAiB;CAChC,MAAM,aAAa,UAAU,KAAA;CAC7B,MAAM,UAAU,aAAa,QAAQ;CACrC,MAAM,WAAW,aACd,MAAc;EACb,IAAI,CAAC,YAAY,YAAY,CAAC;EAC9B,gBAAgB,CAAC;CACnB,GACA,CAAC,YAAY,aAAa,CAC5B;CACA,MAAM,eAAe,eACZ;EAAE,OAAO;EAAS;EAAU;EAAU;CAAQ,IACrD;EAAC;EAAS;EAAU;EAAU;CAAO,CACvC;CACA,OACE,oBAAC,cAAD;EAAc,YAAY,SAAS,EAAE,UAAU,EAAE,IAAI;EACnD,UAAA,oBAAC,QAAQ,UAAT;GAAkB,OAAO;GAKvB,UAAA,oBAAC,OAAO,KAAR;I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AAC,OAAD;EAAK,QAAA;EAAkB;EACpB;CACE,CAAA;CAGT,OACE,oBAAC,OAAO,KAAR;EAEE,SAAS;GAAE,SAAS;GAAG,GAAG,SAAS,IAAI;EAAE;EACzC,SAAS;GAAE,SAAS;GAAG,GAAG;EAAE;EAC5B,YAAY;GAAE,UAAU;GAAM,MAAM;EAAS;EAC7C,WAAW,GAAG,QAAQ,SAAS;EAE9B;CACS,GAPL,KAOK;AAEhB"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { EASE_OUT } from "../../lib/ease.js";
3
3
  import { useRef } from "react";
4
- import { cn } from "cn";
4
+ import { cn } from "@kumix/utils";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { motion, useInView, useReducedMotion } from "motion/react";
7
7
  //#region src/components/motion/text-reveal.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"text-reveal.js","names":[],"sources":["../../../src/components/motion/text-reveal.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ElementType, type ReactNode, useRef } from \"react\";\nimport { cn } from \"cn\";\nimport { motion, type Transition, useInView, useReducedMotion } from \"motion/react\";\n\nimport { EASE_OUT } from \"../../lib/ease\";\n\ntype SplitMode = \"word\" | \"char\";\n\nexport interface TextRevealProps {\n text: string | string[];\n as?: ElementType;\n className?: string;\n split?: SplitMode;\n stagger?: number;\n delay?: number;\n blur?: number;\n yOffset?: string | number;\n spring?: { stiffness?: number; damping?: number; mass?: number };\n once?: boolean;\n whileInView?: boolean;\n children?: ReactNode;\n}\n\nconst DEFAULT_SPRING = { stiffness: 140, damping: 26, mass: 1.2 };\n\ntype WordGroup = { text: string; trailing: string };\n\n/**\n * One tokenizer for both modes: a line becomes the words it is made of, each\n * carrying the whitespace that follows it. Word mode animates a group at a\n * time, char mode the characters inside one — so the two can't drift apart on\n * what counts as a word or where a space belongs. Runs of whitespace and tabs\n * survive as their own group rather than collapsing.\n */\nfunction toWordGroups(line: string): WordGroup[] {\n const chunks = line.match(/\\S+\\s*|\\s+/g) ?? [];\n return chunks.map((chunk) => {\n const text = chunk.replace(/\\s+$/, \"\");\n return { text, trailing: chunk.slice(text.length) };\n });\n}\n\nexport function TextReveal({\n text,\n as: Comp = \"span\",\n className,\n split = \"word\",\n stagger = 0.09,\n delay = 0,\n blur = 12,\n yOffset = \"40%\",\n spring,\n once = true,\n whileInView = false,\n children,\n}: TextRevealProps) {\n const ref = useRef<HTMLElement>(null);\n const inView = useInView(ref, { once, amount: 0.4 });\n const reduce = useReducedMotion();\n const shouldAnimate = whileInView ? inView : true;\n\n const lines = Array.isArray(text) ? text : [text];\n const s = { ...DEFAULT_SPRING, ...spring };\n\n let unitIndex = 0;\n const lineCounts = new Map<string, number>();\n\n return (\n <Comp ref={ref} className={cn(\"block\", className)}>\n {lines.map((line) => {\n const lineCount = lineCounts.get(line) ?? 0;\n lineCounts.set(line, lineCount + 1);\n const lineKey = `${line}-${lineCount}`;\n const unitCounts = new Map<string, number>();\n\n const renderUnit = (unit: string) => {\n const d = delay + unitIndex * stagger;\n unitIndex += 1;\n const unitCount = unitCounts.get(unit) ?? 0;\n unitCounts.set(unit, unitCount + 1);\n const unitKey = `${unit}-${unitCount}`;\n const initial = reduce\n ? { opacity: 0 }\n : { y: yOffset, opacity: 0, filter: `blur(${blur}px)` };\n const animate = shouldAnimate\n ? reduce\n ? { opacity: 1 }\n : { y: 0, opacity: 1, filter: \"blur(0px)\" }\n : initial;\n const transition: Transition = reduce\n ? { opacity: { duration: 0.25, ease: EASE_OUT, delay: d * 0.3 } }\n : {\n y: { type: \"spring\" as const, ...s, delay: d },\n opacity: { duration: 0.7, ease: EASE_OUT, delay: d },\n filter: { duration: 0.9, ease: EASE_OUT, delay: d },\n };\n return (\n <motion.span\n key={unitKey}\n initial={initial}\n animate={animate}\n transition={transition}\n // `whitespace-pre` is load-bearing: a unit's trailing space is\n // inside an inline-block and would otherwise collapse to zero\n // width, running every word together.\n className=\"inline-block whitespace-pre will-change-transform\"\n >\n {unit}\n </motion.span>\n );\n };\n\n const groups = toWordGroups(line);\n const groupCounts = new Map<string, number>();\n\n return (\n <span key={lineKey} className=\"block\">\n {groups.map((group) => {\n const whole = group.text + group.trailing;\n // Characters animate one at a time, but each word (plus the\n // space that follows it) sits in its own inline-block so a long\n // line wraps between words instead of mid-word.\n if (split !== \"char\") return renderUnit(whole);\n\n const groupCount = groupCounts.get(whole) ?? 0;\n groupCounts.set(whole, groupCount + 1);\n return (\n <span key={`${whole}-${groupCount}`} className=\"inline-block whitespace-pre\">\n {Array.from(whole).map((char) => renderUnit(char))}\n </span>\n );\n })}\n </span>\n );\n })}\n {children}\n </Comp>\n );\n}\n"],"mappings":";;;;;;;AAyBA,MAAM,iBAAiB;CAAE,WAAW;CAAK,SAAS;CAAI,MAAM;AAAI;;;;;;;;AAWhE,SAAS,aAAa,MAA2B;CAE/C,QADe,KAAK,MAAM,aAAa,KAAK,CAAC,EAAA,CAC/B,KAAK,UAAU;EAC3B,MAAM,OAAO,MAAM,QAAQ,QAAQ,EAAE;EACrC,OAAO;GAAE;GAAM,UAAU,MAAM,MAAM,KAAK,MAAM;EAAE;CACpD,CAAC;AACH;AAEA,SAAgB,WAAW,EACzB,MACA,IAAI,OAAO,QACX,WACA,QAAQ,QACR,UAAU,KACV,QAAQ,GACR,OAAO,IACP,UAAU,OACV,QACA,OAAO,MACP,cAAc,OACd,YACkB;CAClB,MAAM,MAAM,OAAoB,IAAI;CACpC,MAAM,SAAS,UAAU,KAAK;EAAE;EAAM,QAAQ;CAAI,CAAC;CACnD,MAAM,SAAS,iBAAiB;CAChC,MAAM,gBAAgB,cAAc,SAAS;CAE7C,MAAM,QAAQ,MAAM,QAAQ,IAAI,IAAI,OAAO,CAAC,IAAI;CAChD,MAAM,IAAI;EAAE,GAAG;EAAgB,GAAG;CAAO;CAEzC,IAAI,YAAY;CAChB,MAAM,6BAAa,IAAI,IAAoB;CAE3C,OACE,qBAAC,MAAD;EAAW;EAAK,WAAW,GAAG,SAAS,SAAS;EAAhD,UAA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,OACE,oBAAC,QAAD;MAAqC,WAAU;MAC5C,UAAA,MAAM,KAAK,KAAK,CAAC,CAAC,KAAK,SAAS,WAAW,IAAI,CAAC;KAC7C,GAFK,GAAG,MAAM,GAAG,YAEjB;IAEV,CAAC;GACG,GAhBK,OAgBL;EAEV,CAAC,GACA,QACG;;AAEV"}
1
+ {"version":3,"file":"text-reveal.js","names":[],"sources":["../../../src/components/motion/text-reveal.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ElementType, type ReactNode, useRef } from \"react\";\nimport { motion, type Transition, useInView, useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT } from \"../../lib/ease\";\n\ntype SplitMode = \"word\" | \"char\";\n\nexport interface TextRevealProps {\n text: string | string[];\n as?: ElementType;\n className?: string;\n split?: SplitMode;\n stagger?: number;\n delay?: number;\n blur?: number;\n yOffset?: string | number;\n spring?: { stiffness?: number; damping?: number; mass?: number };\n once?: boolean;\n whileInView?: boolean;\n children?: ReactNode;\n}\n\nconst DEFAULT_SPRING = { stiffness: 140, damping: 26, mass: 1.2 };\n\ntype WordGroup = { text: string; trailing: string };\n\n/**\n * One tokenizer for both modes: a line becomes the words it is made of, each\n * carrying the whitespace that follows it. Word mode animates a group at a\n * time, char mode the characters inside one — so the two can't drift apart on\n * what counts as a word or where a space belongs. Runs of whitespace and tabs\n * survive as their own group rather than collapsing.\n */\nfunction toWordGroups(line: string): WordGroup[] {\n const chunks = line.match(/\\S+\\s*|\\s+/g) ?? [];\n return chunks.map((chunk) => {\n const text = chunk.replace(/\\s+$/, \"\");\n return { text, trailing: chunk.slice(text.length) };\n });\n}\n\nexport function TextReveal({\n text,\n as: Comp = \"span\",\n className,\n split = \"word\",\n stagger = 0.09,\n delay = 0,\n blur = 12,\n yOffset = \"40%\",\n spring,\n once = true,\n whileInView = false,\n children,\n}: TextRevealProps) {\n const ref = useRef<HTMLElement>(null);\n const inView = useInView(ref, { once, amount: 0.4 });\n const reduce = useReducedMotion();\n const shouldAnimate = whileInView ? inView : true;\n\n const lines = Array.isArray(text) ? text : [text];\n const s = { ...DEFAULT_SPRING, ...spring };\n\n let unitIndex = 0;\n const lineCounts = new Map<string, number>();\n\n return (\n <Comp ref={ref} className={cn(\"block\", className)}>\n {lines.map((line) => {\n const lineCount = lineCounts.get(line) ?? 0;\n lineCounts.set(line, lineCount + 1);\n const lineKey = `${line}-${lineCount}`;\n const unitCounts = new Map<string, number>();\n\n const renderUnit = (unit: string) => {\n const d = delay + unitIndex * stagger;\n unitIndex += 1;\n const unitCount = unitCounts.get(unit) ?? 0;\n unitCounts.set(unit, unitCount + 1);\n const unitKey = `${unit}-${unitCount}`;\n const initial = reduce\n ? { opacity: 0 }\n : { y: yOffset, opacity: 0, filter: `blur(${blur}px)` };\n const animate = shouldAnimate\n ? reduce\n ? { opacity: 1 }\n : { y: 0, opacity: 1, filter: \"blur(0px)\" }\n : initial;\n const transition: Transition = reduce\n ? { opacity: { duration: 0.25, ease: EASE_OUT, delay: d * 0.3 } }\n : {\n y: { type: \"spring\" as const, ...s, delay: d },\n opacity: { duration: 0.7, ease: EASE_OUT, delay: d },\n filter: { duration: 0.9, ease: EASE_OUT, delay: d },\n };\n return (\n <motion.span\n key={unitKey}\n initial={initial}\n animate={animate}\n transition={transition}\n // `whitespace-pre` is load-bearing: a unit's trailing space is\n // inside an inline-block and would otherwise collapse to zero\n // width, running every word together.\n className=\"inline-block whitespace-pre will-change-transform\"\n >\n {unit}\n </motion.span>\n );\n };\n\n const groups = toWordGroups(line);\n const groupCounts = new Map<string, number>();\n\n return (\n <span key={lineKey} className=\"block\">\n {groups.map((group) => {\n const whole = group.text + group.trailing;\n // Characters animate one at a time, but each word (plus the\n // space that follows it) sits in its own inline-block so a long\n // line wraps between words instead of mid-word.\n if (split !== \"char\") return renderUnit(whole);\n\n const groupCount = groupCounts.get(whole) ?? 0;\n groupCounts.set(whole, groupCount + 1);\n return (\n <span key={`${whole}-${groupCount}`} className=\"inline-block whitespace-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;;EAEA;;EAEA;EACA;EACA,QAAQ;;;wBAIM,eACd,MACA,UACA,QACA,WACA,SACC,oCAAiB,IAAA"}
1
+ {"version":3,"file":"text-scramble.d.ts","names":[],"sources":["../../../src/components/motion/text-scramble.tsx"],"mappings":";;iBASiB;;EAEf;;EAEA;;EAEA;EACA;EACA,QAAQ;;;wBAIM,eACd,MACA,UACA,QACA,WACA,SACC,oCAAiB,IAAA"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { useEffect, useRef, useState } from "react";
3
- import { cn } from "cn";
3
+ import { cn } from "@kumix/utils";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { useReducedMotion } from "motion/react";
6
6
  //#region src/components/motion/text-scramble.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"text-scramble.js","names":[],"sources":["../../../src/components/motion/text-scramble.tsx"],"sourcesContent":["\"use client\";\n\nimport { type CSSProperties, useEffect, useRef, useState } from \"react\";\nimport { cn } from \"cn\";\nimport { useReducedMotion } from \"motion/react\";\n\nconst DEFAULT_GLYPHS = \"ABCDEFGHJKLMNPQRSTUVWXYZ0123456789#%&@$?/\";\n\nexport interface TextScrambleProps {\n /** Final text revealed by the scramble animation. */\n text: string;\n /** Maximum animation duration in milliseconds. */\n duration?: number;\n /** Characters sampled while unresolved positions are scrambling. */\n glyphs?: string;\n className?: string;\n style?: CSSProperties;\n}\n\n/** Character scramble that resolves to `text` and respects reduced motion. */\nexport function TextScramble({\n text,\n duration,\n glyphs = DEFAULT_GLYPHS,\n className,\n style,\n}: TextScrambleProps) {\n const reduce = useReducedMotion() ?? false;\n const [display, setDisplay] = useState(text);\n const mounted = useRef(false);\n\n useEffect(() => {\n if (!mounted.current) {\n mounted.current = true;\n setDisplay(text);\n return;\n }\n\n if (reduce || !glyphs) {\n setDisplay(text);\n return;\n }\n\n const characters = text.split(\"\");\n const startedAt = performance.now();\n const animationDuration = duration ?? Math.min(760, Math.max(420, characters.length * 32));\n let frame = 0;\n let lastUpdate = 0;\n\n const animate = (now: number) => {\n if (now - lastUpdate >= 40) {\n lastUpdate = now;\n const progress = Math.min((now - startedAt) / animationDuration, 1);\n const settled = Math.floor(progress * characters.length);\n setDisplay(\n characters\n .map((character, index) => {\n if (index < settled || character === \" \") return character;\n return glyphs[Math.floor(Math.random() * glyphs.length)];\n })\n .join(\"\"),\n );\n }\n\n if (now - startedAt < animationDuration) {\n frame = requestAnimationFrame(animate);\n } else {\n setDisplay(text);\n }\n };\n\n frame = requestAnimationFrame(animate);\n return () => cancelAnimationFrame(frame);\n }, [duration, glyphs, reduce, text]);\n\n return (\n <span className={cn(\"inline-block whitespace-pre\", className)} style={style}>\n <span className=\"sr-only\">{text}</span>\n <span aria-hidden=\"true\">{reduce ? text : display}</span>\n </span>\n );\n}\n"],"mappings":";;;;;;AAMA,MAAM,iBAAiB;;AAcvB,SAAgB,aAAa,EAC3B,MACA,UACA,SAAS,gBACT,WACA,SACoB;CACpB,MAAM,SAAS,iBAAiB,KAAK;CACrC,MAAM,CAAC,SAAS,cAAc,SAAS,IAAI;CAC3C,MAAM,UAAU,OAAO,KAAK;CAE5B,gBAAgB;EACd,IAAI,CAAC,QAAQ,SAAS;GACpB,QAAQ,UAAU;GAClB,WAAW,IAAI;GACf;EACF;EAEA,IAAI,UAAU,CAAC,QAAQ;GACrB,WAAW,IAAI;GACf;EACF;EAEA,MAAM,aAAa,KAAK,MAAM,EAAE;EAChC,MAAM,YAAY,YAAY,IAAI;EAClC,MAAM,oBAAoB,YAAY,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,WAAW,SAAS,EAAE,CAAC;EACzF,IAAI,QAAQ;EACZ,IAAI,aAAa;EAEjB,MAAM,WAAW,QAAgB;GAC/B,IAAI,MAAM,cAAc,IAAI;IAC1B,aAAa;IACb,MAAM,WAAW,KAAK,KAAK,MAAM,aAAa,mBAAmB,CAAC;IAClE,MAAM,UAAU,KAAK,MAAM,WAAW,WAAW,MAAM;IACvD,WACE,WACG,KAAK,WAAW,UAAU;KACzB,IAAI,QAAQ,WAAW,cAAc,KAAK,OAAO;KACjD,OAAO,OAAO,KAAK,MAAM,KAAK,OAAO,IAAI,OAAO,MAAM;IACxD,CAAC,CAAC,CACD,KAAK,EAAE,CACZ;GACF;GAEA,IAAI,MAAM,YAAY,mBACpB,QAAQ,sBAAsB,OAAO;QAErC,WAAW,IAAI;EAEnB;EAEA,QAAQ,sBAAsB,OAAO;EACrC,aAAa,qBAAqB,KAAK;CACzC,GAAG;EAAC;EAAU;EAAQ;EAAQ;CAAI,CAAC;CAEnC,OACE,qBAAC,QAAD;EAAM,WAAW,GAAG,+BAA+B,SAAS;EAAU;EAAtE,UAAA,CACE,oBAAC,QAAD;GAAM,WAAU;GAAW,UAAA;EAAW,CAAA,GACtC,oBAAC,QAAD;GAAM,eAAY;GAAQ,UAAA,SAAS,OAAO;EAAc,CAAA,CACpD;;AAEV"}
1
+ {"version":3,"file":"text-scramble.js","names":[],"sources":["../../../src/components/motion/text-scramble.tsx"],"sourcesContent":["\"use client\";\n\nimport { type CSSProperties, useEffect, useRef, useState } from \"react\";\nimport { useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\n\nconst DEFAULT_GLYPHS = \"ABCDEFGHJKLMNPQRSTUVWXYZ0123456789#%&@$?/\";\n\nexport interface TextScrambleProps {\n /** Final text revealed by the scramble animation. */\n text: string;\n /** Maximum animation duration in milliseconds. */\n duration?: number;\n /** Characters sampled while unresolved positions are scrambling. */\n glyphs?: string;\n className?: string;\n style?: CSSProperties;\n}\n\n/** Character scramble that resolves to `text` and respects reduced motion. */\nexport function TextScramble({\n text,\n duration,\n glyphs = DEFAULT_GLYPHS,\n className,\n style,\n}: TextScrambleProps) {\n const reduce = useReducedMotion() ?? false;\n const [display, setDisplay] = useState(text);\n const mounted = useRef(false);\n\n useEffect(() => {\n if (!mounted.current) {\n mounted.current = true;\n setDisplay(text);\n return;\n }\n\n if (reduce || !glyphs) {\n setDisplay(text);\n return;\n }\n\n const characters = text.split(\"\");\n const startedAt = performance.now();\n const animationDuration = duration ?? Math.min(760, Math.max(420, characters.length * 32));\n let frame = 0;\n let lastUpdate = 0;\n\n const animate = (now: number) => {\n if (now - lastUpdate >= 40) {\n lastUpdate = now;\n const progress = Math.min((now - startedAt) / animationDuration, 1);\n const settled = Math.floor(progress * characters.length);\n setDisplay(\n characters\n .map((character, index) => {\n if (index < settled || character === \" \") return character;\n return glyphs[Math.floor(Math.random() * glyphs.length)];\n })\n .join(\"\"),\n );\n }\n\n if (now - startedAt < animationDuration) {\n frame = requestAnimationFrame(animate);\n } else {\n setDisplay(text);\n }\n };\n\n frame = requestAnimationFrame(animate);\n return () => cancelAnimationFrame(frame);\n }, [duration, glyphs, reduce, text]);\n\n return (\n <span className={cn(\"inline-block whitespace-pre\", className)} style={style}>\n <span className=\"sr-only\">{text}</span>\n <span aria-hidden=\"true\">{reduce ? text : display}</span>\n </span>\n );\n}\n"],"mappings":";;;;;;AAOA,MAAM,iBAAiB;;AAcvB,SAAgB,aAAa,EAC3B,MACA,UACA,SAAS,gBACT,WACA,SACoB;CACpB,MAAM,SAAS,iBAAiB,KAAK;CACrC,MAAM,CAAC,SAAS,cAAc,SAAS,IAAI;CAC3C,MAAM,UAAU,OAAO,KAAK;CAE5B,gBAAgB;EACd,IAAI,CAAC,QAAQ,SAAS;GACpB,QAAQ,UAAU;GAClB,WAAW,IAAI;GACf;EACF;EAEA,IAAI,UAAU,CAAC,QAAQ;GACrB,WAAW,IAAI;GACf;EACF;EAEA,MAAM,aAAa,KAAK,MAAM,EAAE;EAChC,MAAM,YAAY,YAAY,IAAI;EAClC,MAAM,oBAAoB,YAAY,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,WAAW,SAAS,EAAE,CAAC;EACzF,IAAI,QAAQ;EACZ,IAAI,aAAa;EAEjB,MAAM,WAAW,QAAgB;GAC/B,IAAI,MAAM,cAAc,IAAI;IAC1B,aAAa;IACb,MAAM,WAAW,KAAK,KAAK,MAAM,aAAa,mBAAmB,CAAC;IAClE,MAAM,UAAU,KAAK,MAAM,WAAW,WAAW,MAAM;IACvD,WACE,WACG,KAAK,WAAW,UAAU;KACzB,IAAI,QAAQ,WAAW,cAAc,KAAK,OAAO;KACjD,OAAO,OAAO,KAAK,MAAM,KAAK,OAAO,IAAI,OAAO,MAAM;IACxD,CAAC,CAAC,CACD,KAAK,EAAE,CACZ;GACF;GAEA,IAAI,MAAM,YAAY,mBACpB,QAAQ,sBAAsB,OAAO;QAErC,WAAW,IAAI;EAEnB;EAEA,QAAQ,sBAAsB,OAAO;EACrC,aAAa,qBAAqB,KAAK;CACzC,GAAG;EAAC;EAAU;EAAQ;EAAQ;CAAI,CAAC;CAEnC,OACE,qBAAC,QAAD;EAAM,WAAW,GAAG,+BAA+B,SAAS;EAAU;EAAtE,UAAA,CACE,oBAAC,QAAD;GAAM,WAAU;GAAW,UAAA;EAAW,CAAA,GACtC,oBAAC,QAAD;GAAM,eAAY;GAAQ,UAAA,SAAS,OAAO;EAAc,CAAA,CACpD;;AAEV"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { TEXT_SHIMMER_CLASS_NAME, TEXT_SHIMMER_KEYFRAMES, textShimmerStyle } from "../../lib/text-shimmer.js";
3
- import { cn } from "cn";
3
+ import { cn } from "@kumix/utils";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/components/motion/text-shimmer.tsx
6
6
  function TextShimmer({ children, as: Comp = "span", duration = 2.5, className }) {
@@ -1 +1 @@
1
- {"version":3,"file":"text-shimmer.js","names":[],"sources":["../../../src/components/motion/text-shimmer.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ElementType, ReactNode } from \"react\";\nimport { cn } from \"cn\";\n\nimport {\n TEXT_SHIMMER_CLASS_NAME,\n TEXT_SHIMMER_KEYFRAMES,\n textShimmerStyle,\n} from \"../../lib/text-shimmer\";\n\nexport interface TextShimmerProps {\n children: ReactNode;\n as?: ElementType;\n duration?: number;\n className?: string;\n}\n\nexport function TextShimmer({\n children,\n as: Comp = \"span\",\n duration = 2.5,\n className,\n}: TextShimmerProps) {\n return (\n <>\n <style>{TEXT_SHIMMER_KEYFRAMES}</style>\n <Comp\n style={textShimmerStyle(duration)}\n className={cn(\"inline-block\", TEXT_SHIMMER_CLASS_NAME, className)}\n >\n {children}\n </Comp>\n </>\n );\n}\n"],"mappings":";;;;;AAkBA,SAAgB,YAAY,EAC1B,UACA,IAAI,OAAO,QACX,WAAW,KACX,aACmB;CACnB,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,SAAD,EAAA,UAAQ,uBAA8B,CAAA,GACtC,oBAAC,MAAD;EACE,OAAO,iBAAiB,QAAQ;EAChC,WAAW,GAAG,gBAAgB,yBAAyB,SAAS;EAE/D;CACG,CAAA,CACN,EAAA,CAAA;AAEN"}
1
+ {"version":3,"file":"text-shimmer.js","names":[],"sources":["../../../src/components/motion/text-shimmer.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ElementType, ReactNode } from \"react\";\n\nimport { cn } from \"@kumix/utils\";\nimport {\n TEXT_SHIMMER_CLASS_NAME,\n TEXT_SHIMMER_KEYFRAMES,\n textShimmerStyle,\n} from \"../../lib/text-shimmer\";\n\nexport interface TextShimmerProps {\n children: ReactNode;\n as?: ElementType;\n duration?: number;\n className?: string;\n}\n\nexport function TextShimmer({\n children,\n as: Comp = \"span\",\n duration = 2.5,\n className,\n}: TextShimmerProps) {\n return (\n <>\n <style>{TEXT_SHIMMER_KEYFRAMES}</style>\n <Comp\n style={textShimmerStyle(duration)}\n className={cn(\"inline-block\", TEXT_SHIMMER_CLASS_NAME, className)}\n >\n {children}\n </Comp>\n </>\n );\n}\n"],"mappings":";;;;;AAkBA,SAAgB,YAAY,EAC1B,UACA,IAAI,OAAO,QACX,WAAW,KACX,aACmB;CACnB,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,SAAD,EAAA,UAAQ,uBAA8B,CAAA,GACtC,oBAAC,MAAD;EACE,OAAO,iBAAiB,QAAQ;EAChC,WAAW,GAAG,gBAAgB,yBAAyB,SAAS;EAE/D;CACG,CAAA,CACN,EAAA,CAAA;AAEN"}
@@ -2,8 +2,8 @@
2
2
  import { EASE_OUT_CSS } from "../../lib/ease.js";
3
3
  import { ActionSwapIcon } from "./action-swap.js";
4
4
  import { useEffect, useState } from "react";
5
+ import { cn } from "@kumix/utils";
5
6
  import { useTheme } from "next-themes";
6
- import { cn } from "cn";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  import { useReducedMotion } from "motion/react";
9
9
  import { Moon, Sun } from "lucide-react";
@@ -1 +1 @@
1
- {"version":3,"file":"theme-toggle.js","names":[],"sources":["../../../src/components/motion/theme-toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentPropsWithoutRef, useEffect, useState } from \"react\";\nimport { cn } from \"cn\";\nimport { Moon, Sun } from \"lucide-react\";\nimport { useReducedMotion } from \"motion/react\";\nimport { useTheme } from \"next-themes\";\n\nimport { EASE_OUT_CSS } from \"../../lib/ease\";\nimport { ActionSwapIcon } from \"./action-swap\";\n\nexport type ThemeVariant = \"rectangle\" | \"circle\" | \"circle-blur\" | \"blinds\";\n\nexport type RectStart =\n | \"top-left\"\n | \"top-right\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"center\"\n | \"bottom-up\";\n\nexport interface ThemeToggleProps\n extends Omit<ComponentPropsWithoutRef<\"button\">, \"children\" | \"onClick\"> {\n /** Animation variant. Default: \"rectangle\". */\n variant?: ThemeVariant;\n /** Origin direction for the reveal. Default: \"bottom-up\". */\n start?: RectStart;\n iconClassName?: string;\n}\n\nconst VT_STYLE_ID = \"beui-theme-toggle-vt\";\n\n// View transitions animate in CSS, not motion springs, so easing here is\n// either EASE_OUT_CSS or a keyword. The circle variants keep the Material\n// standard curve because their reveal expands symmetrically rather than\n// decelerating. Durations differ per variant to match native OS mode switches.\nconst VT_CSS = `\nhtml[data-beui-vt=\"rect\"]::view-transition-old(root) {\n animation: none;\n mix-blend-mode: normal;\n}\nhtml[data-beui-vt=\"rect\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n animation: beui-rect-reveal 400ms ease-out;\n}\nhtml[data-beui-vt=\"circle\"]::view-transition-old(root),\nhtml[data-beui-vt=\"circle-blur\"]::view-transition-old(root) {\n animation: none;\n mix-blend-mode: normal;\n}\nhtml[data-beui-vt=\"circle\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n animation: beui-circle-reveal 700ms cubic-bezier(0.4, 0, 0.2, 1);\n}\nhtml[data-beui-vt=\"circle-blur\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n animation: beui-circle-blur-reveal 700ms cubic-bezier(0.4, 0, 0.2, 1);\n}\nhtml[data-beui-vt=\"blinds\"]::view-transition-old(root) {\n animation: none;\n mix-blend-mode: normal;\n}\n/* Slats: a masked band widens inside every 72px tile, so the new theme opens\n across the page like a shutter. The band edge has to be a registered custom\n property — mask-image itself is not animatable, but it re-resolves every\n frame the property ticks. mask-size fixes the tile at 72px rather than\n letting a repeating gradient's last stop define it, which is what keeps the\n 20px soft edge from dragging the tile wider than the slat and leaving a\n feathered gap that never closes; it also means both ends land clean, fully\n transparent at -20px and fully opaque at 72px. Falling back to no mask\n (unregistered property, so the var is invalid) reveals the page in one\n step. */\n@property --beui-vt-slat {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 72px;\n}\nhtml[data-beui-vt=\"blinds\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n mask-image: linear-gradient(\n 90deg,\n #000 0 var(--beui-vt-slat),\n transparent calc(var(--beui-vt-slat) + 20px)\n );\n mask-size: 72px 100%;\n mask-repeat: repeat;\n animation: beui-blinds-reveal 700ms ${EASE_OUT_CSS};\n}\n@keyframes beui-rect-reveal {\n from { clip-path: var(--beui-vt-from, inset(100% 0 0 0)); }\n to { clip-path: inset(0 0 0 0); }\n}\n@keyframes beui-circle-reveal {\n from { clip-path: circle(0% at var(--beui-vt-origin, 50% 100%)); }\n to { clip-path: circle(150% at var(--beui-vt-origin, 50% 100%)); }\n}\n@keyframes beui-circle-blur-reveal {\n from { clip-path: circle(0% at var(--beui-vt-origin, 50% 100%)); filter: blur(8px); }\n to { clip-path: circle(150% at var(--beui-vt-origin, 50% 100%)); filter: blur(0px); }\n}\n@keyframes beui-blinds-reveal {\n from { --beui-vt-slat: -20px; }\n to { --beui-vt-slat: 72px; }\n}\n`;\n\nconst RECT_FROM: Record<RectStart, string> = {\n \"top-left\": \"inset(0 100% 100% 0)\",\n \"top-right\": \"inset(0 0 100% 100%)\",\n \"bottom-left\": \"inset(100% 100% 0 0)\",\n \"bottom-right\": \"inset(100% 0 0 100%)\",\n center: \"inset(50% 50% 50% 50%)\",\n \"bottom-up\": \"inset(100% 0 0 0)\",\n};\n\nconst CIRCLE_ORIGIN: Record<RectStart, string> = {\n \"top-left\": \"0% 0%\",\n \"top-right\": \"100% 0%\",\n \"bottom-left\": \"0% 100%\",\n \"bottom-right\": \"100% 100%\",\n center: \"50% 50%\",\n \"bottom-up\": \"50% 100%\",\n};\n\nexport function useThemeToggle({\n variant = \"rectangle\",\n start = \"bottom-up\",\n}: {\n variant?: ThemeVariant;\n start?: RectStart;\n} = {}) {\n const { setTheme, resolvedTheme } = useTheme();\n const reduce = useReducedMotion() ?? false;\n const [mounted, setMounted] = useState(false);\n useEffect(() => setMounted(true), []);\n useEffect(() => {\n if (document.getElementById(VT_STYLE_ID)) return;\n const el = document.createElement(\"style\");\n el.id = VT_STYLE_ID;\n el.textContent = VT_CSS;\n document.head.appendChild(el);\n }, []);\n const isDark = mounted && resolvedTheme === \"dark\";\n\n const toggle = () => {\n const next = isDark ? \"light\" : \"dark\";\n\n if (reduce || !(\"startViewTransition\" in document)) {\n setTheme(next);\n return;\n }\n\n const root = document.documentElement;\n\n if (variant === \"rectangle\") {\n root.style.setProperty(\"--beui-vt-from\", RECT_FROM[start]);\n root.dataset.beuiVt = \"rect\";\n } else if (variant === \"blinds\") {\n // Slats sweep the whole viewport; there is no origin point to set.\n root.dataset.beuiVt = \"blinds\";\n } else {\n root.style.setProperty(\"--beui-vt-origin\", CIRCLE_ORIGIN[start]);\n root.dataset.beuiVt = variant;\n }\n\n const vt = (\n document as Document & {\n startViewTransition(cb: () => void): { finished: Promise<void> };\n }\n ).startViewTransition(() => setTheme(next));\n\n vt.finished.finally(() => {\n delete root.dataset.beuiVt;\n });\n };\n\n return { isDark, mounted, toggle };\n}\n\nexport function ThemeToggle({\n variant = \"rectangle\",\n start = \"bottom-up\",\n className,\n iconClassName,\n ...rest\n}: ThemeToggleProps) {\n const { isDark, mounted, toggle } = useThemeToggle({ variant, start });\n\n return (\n <button\n type=\"button\"\n aria-label={mounted && isDark ? \"Switch to light mode\" : \"Switch to dark mode\"}\n onClick={toggle}\n className={cn(\"flex items-center justify-center\", className)}\n {...rest}\n >\n {mounted ? (\n <ActionSwapIcon\n value={isDark ? \"dark\" : \"light\"}\n animation=\"blur\"\n className={iconClassName}\n >\n {isDark ? <Sun className={iconClassName} /> : <Moon className={iconClassName} />}\n </ActionSwapIcon>\n ) : (\n <span className={iconClassName} aria-hidden=\"true\" />\n )}\n </button>\n );\n}\n"],"mappings":";;;;;;;;;;AA8BA,MAAM,cAAc;AAMpB,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAkDyB,aAAa;;;;;;;;;;;;;;;;;;;AAoBrD,MAAM,YAAuC;CAC3C,YAAY;CACZ,aAAa;CACb,eAAe;CACf,gBAAgB;CAChB,QAAQ;CACR,aAAa;AACf;AAEA,MAAM,gBAA2C;CAC/C,YAAY;CACZ,aAAa;CACb,eAAe;CACf,gBAAgB;CAChB,QAAQ;CACR,aAAa;AACf;AAEA,SAAgB,eAAe,EAC7B,UAAU,aACV,QAAQ,gBAIN,CAAC,GAAG;CACN,MAAM,EAAE,UAAU,kBAAkB,SAAS;CAC7C,MAAM,SAAS,iBAAiB,KAAK;CACrC,MAAM,CAAC,SAAS,cAAc,SAAS,K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,oBAAC,QAAD;GAAM,WAAW;GAAe,eAAY;EAAQ,CAAA;CAEhD,CAAA;AAEZ"}
1
+ {"version":3,"file":"theme-toggle.js","names":[],"sources":["../../../src/components/motion/theme-toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentPropsWithoutRef, useEffect, useState } from \"react\";\nimport { Moon, Sun } from \"lucide-react\";\nimport { useReducedMotion } from \"motion/react\";\nimport { useTheme } from \"next-themes\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT_CSS } from \"../../lib/ease\";\nimport { ActionSwapIcon } from \"./action-swap\";\n\nexport type ThemeVariant = \"rectangle\" | \"circle\" | \"circle-blur\" | \"blinds\";\n\nexport type RectStart =\n | \"top-left\"\n | \"top-right\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"center\"\n | \"bottom-up\";\n\nexport interface ThemeToggleProps\n extends Omit<ComponentPropsWithoutRef<\"button\">, \"children\" | \"onClick\"> {\n /** Animation variant. Default: \"rectangle\". */\n variant?: ThemeVariant;\n /** Origin direction for the reveal. Default: \"bottom-up\". */\n start?: RectStart;\n iconClassName?: string;\n}\n\nconst VT_STYLE_ID = \"beui-theme-toggle-vt\";\n\n// View transitions animate in CSS, not motion springs, so easing here is\n// either EASE_OUT_CSS or a keyword. The circle variants keep the Material\n// standard curve because their reveal expands symmetrically rather than\n// decelerating. Durations differ per variant to match native OS mode switches.\nconst VT_CSS = `\nhtml[data-beui-vt=\"rect\"]::view-transition-old(root) {\n animation: none;\n mix-blend-mode: normal;\n}\nhtml[data-beui-vt=\"rect\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n animation: beui-rect-reveal 400ms ease-out;\n}\nhtml[data-beui-vt=\"circle\"]::view-transition-old(root),\nhtml[data-beui-vt=\"circle-blur\"]::view-transition-old(root) {\n animation: none;\n mix-blend-mode: normal;\n}\nhtml[data-beui-vt=\"circle\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n animation: beui-circle-reveal 700ms cubic-bezier(0.4, 0, 0.2, 1);\n}\nhtml[data-beui-vt=\"circle-blur\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n animation: beui-circle-blur-reveal 700ms cubic-bezier(0.4, 0, 0.2, 1);\n}\nhtml[data-beui-vt=\"blinds\"]::view-transition-old(root) {\n animation: none;\n mix-blend-mode: normal;\n}\n/* Slats: a masked band widens inside every 72px tile, so the new theme opens\n across the page like a shutter. The band edge has to be a registered custom\n property — mask-image itself is not animatable, but it re-resolves every\n frame the property ticks. mask-size fixes the tile at 72px rather than\n letting a repeating gradient's last stop define it, which is what keeps the\n 20px soft edge from dragging the tile wider than the slat and leaving a\n feathered gap that never closes; it also means both ends land clean, fully\n transparent at -20px and fully opaque at 72px. Falling back to no mask\n (unregistered property, so the var is invalid) reveals the page in one\n step. */\n@property --beui-vt-slat {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 72px;\n}\nhtml[data-beui-vt=\"blinds\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n mask-image: linear-gradient(\n 90deg,\n #000 0 var(--beui-vt-slat),\n transparent calc(var(--beui-vt-slat) + 20px)\n );\n mask-size: 72px 100%;\n mask-repeat: repeat;\n animation: beui-blinds-reveal 700ms ${EASE_OUT_CSS};\n}\n@keyframes beui-rect-reveal {\n from { clip-path: var(--beui-vt-from, inset(100% 0 0 0)); }\n to { clip-path: inset(0 0 0 0); }\n}\n@keyframes beui-circle-reveal {\n from { clip-path: circle(0% at var(--beui-vt-origin, 50% 100%)); }\n to { clip-path: circle(150% at var(--beui-vt-origin, 50% 100%)); }\n}\n@keyframes beui-circle-blur-reveal {\n from { clip-path: circle(0% at var(--beui-vt-origin, 50% 100%)); filter: blur(8px); }\n to { clip-path: circle(150% at var(--beui-vt-origin, 50% 100%)); filter: blur(0px); }\n}\n@keyframes beui-blinds-reveal {\n from { --beui-vt-slat: -20px; }\n to { --beui-vt-slat: 72px; }\n}\n`;\n\nconst RECT_FROM: Record<RectStart, string> = {\n \"top-left\": \"inset(0 100% 100% 0)\",\n \"top-right\": \"inset(0 0 100% 100%)\",\n \"bottom-left\": \"inset(100% 100% 0 0)\",\n \"bottom-right\": \"inset(100% 0 0 100%)\",\n center: \"inset(50% 50% 50% 50%)\",\n \"bottom-up\": \"inset(100% 0 0 0)\",\n};\n\nconst CIRCLE_ORIGIN: Record<RectStart, string> = {\n \"top-left\": \"0% 0%\",\n \"top-right\": \"100% 0%\",\n \"bottom-left\": \"0% 100%\",\n \"bottom-right\": \"100% 100%\",\n center: \"50% 50%\",\n \"bottom-up\": \"50% 100%\",\n};\n\nexport function useThemeToggle({\n variant = \"rectangle\",\n start = \"bottom-up\",\n}: {\n variant?: ThemeVariant;\n start?: RectStart;\n} = {}) {\n const { setTheme, resolvedTheme } = useTheme();\n const reduce = useReducedMotion() ?? false;\n const [mounted, setMounted] = useState(false);\n useEffect(() => setMounted(true), []);\n useEffect(() => {\n if (document.getElementById(VT_STYLE_ID)) return;\n const el = document.createElement(\"style\");\n el.id = VT_STYLE_ID;\n el.textContent = VT_CSS;\n document.head.appendChild(el);\n }, []);\n const isDark = mounted && resolvedTheme === \"dark\";\n\n const toggle = () => {\n const next = isDark ? \"light\" : \"dark\";\n\n if (reduce || !(\"startViewTransition\" in document)) {\n setTheme(next);\n return;\n }\n\n const root = document.documentElement;\n\n if (variant === \"rectangle\") {\n root.style.setProperty(\"--beui-vt-from\", RECT_FROM[start]);\n root.dataset.beuiVt = \"rect\";\n } else if (variant === \"blinds\") {\n // Slats sweep the whole viewport; there is no origin point to set.\n root.dataset.beuiVt = \"blinds\";\n } else {\n root.style.setProperty(\"--beui-vt-origin\", CIRCLE_ORIGIN[start]);\n root.dataset.beuiVt = variant;\n }\n\n const vt = (\n document as Document & {\n startViewTransition(cb: () => void): { finished: Promise<void> };\n }\n ).startViewTransition(() => setTheme(next));\n\n vt.finished.finally(() => {\n delete root.dataset.beuiVt;\n });\n };\n\n return { isDark, mounted, toggle };\n}\n\nexport function ThemeToggle({\n variant = \"rectangle\",\n start = \"bottom-up\",\n className,\n iconClassName,\n ...rest\n}: ThemeToggleProps) {\n const { isDark, mounted, toggle } = useThemeToggle({ variant, start });\n\n return (\n <button\n type=\"button\"\n aria-label={mounted && isDark ? \"Switch to light mode\" : \"Switch to dark mode\"}\n onClick={toggle}\n className={cn(\"flex items-center justify-center\", className)}\n {...rest}\n >\n {mounted ? (\n <ActionSwapIcon\n value={isDark ? \"dark\" : \"light\"}\n animation=\"blur\"\n className={iconClassName}\n >\n {isDark ? <Sun className={iconClassName} /> : <Moon className={iconClassName} />}\n </ActionSwapIcon>\n ) : (\n <span className={iconClassName} aria-hidden=\"true\" />\n )}\n </button>\n );\n}\n"],"mappings":";;;;;;;;;;AA8BA,MAAM,cAAc;AAMpB,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAkDyB,aAAa;;;;;;;;;;;;;;;;;;;AAoBrD,MAAM,YAAuC;CAC3C,YAAY;CACZ,aAAa;CACb,eAAe;CACf,gBAAgB;CAChB,QAAQ;CACR,aAAa;AACf;AAEA,MAAM,gBAA2C;CAC/C,YAAY;CACZ,aAAa;CACb,eAAe;CACf,gBAAgB;CAChB,QAAQ;CACR,aAAa;AACf;AAEA,SAAgB,eAAe,EAC7B,UAAU,aACV,QAAQ,gBAIN,CAAC,GAAG;CACN,MAAM,EAAE,UAAU,kBAAkB,SAAS;CAC7C,MAAM,SAAS,iBAAiB,KAAK;CACrC,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAC5C,gBAAgB,WAAW,IAAI,GAAG,CAAC,CAAC;CACpC,gBAAgB;EACd,IAAI,SAAS,eAAe,WAAW,GAAG;EAC1C,MAAM,KAAK,SAAS,cAAc,OAAO;EACzC,GAAG,KAAK;EACR,GAAG,cAAc;EACjB,SAAS,KAAK,YAAY,EAAE;CAC9B,GAAG,CAAC,CAAC;CACL,MAAM,SAAS,WAAW,kBAAkB;CAE5C,MAAM,eAAe;EACnB,MAAM,OAAO,SAAS,UAAU;EAEhC,IAAI,UAAU,EAAE,yBAAyB,WAAW;GAClD,SAAS,IAAI;GACb;EACF;EAEA,MAAM,OAAO,SAAS;EAEtB,IAAI,YAAY,aAAa;GAC3B,KAAK,MAAM,YAAY,kBAAkB,UAAU,MAAM;GACzD,KAAK,QAAQ,SAAS;EACxB,OAAO,IAAI,YAAY,UAErB,KAAK,QAAQ,SAAS;OACjB;GACL,KAAK,MAAM,YAAY,oBAAoB,cAAc,MAAM;GAC/D,KAAK,QAAQ,SAAS;EACxB;EAQA,SAFE,0BAA0B,SAAS,IAAI,CAExC,CAAC,CAAC,SAAS,cAAc;GACxB,OAAO,KAAK,QAAQ;EACtB,CAAC;CACH;CAEA,OAAO;EAAE;EAAQ;EAAS;CAAO;AACnC;AAEA,SAAgB,YAAY,EAC1B,UAAU,aACV,QAAQ,aACR,WACA,eACA,GAAG,QACgB;CACnB,MAAM,EAAE,QAAQ,SAAS,WAAW,eAAe;EAAE;EAAS;CAAM,CAAC;CAErE,OACE,oBAAC,UAAD;EACE,MAAK;EACL,cAAY,WAAW,SAAS,yBAAyB;EACzD,SAAS;EACT,WAAW,GAAG,oCAAoC,SAAS;EAC3D,GAAI;EAEH,UAAA,UACC,oBAAC,gBAAD;GACE,OAAO,SAAS,SAAS;GACzB,WAAU;GACV,WAAW;GAEV,UAAA,SAAS,oBAAC,KAAD,EAAK,WAAW,cAAgB,CAAA,IAAI,oBAAC,MAAD,EAAM,WAAW,cAAgB,CAAA;EACjE,CAAA,IAEhB,oBAAC,QAAD;GAAM,WAAW;GAAe,eAAY;EAAQ,CAAA;CAEhD,CAAA;AAEZ"}
@@ -2,7 +2,7 @@
2
2
  import { useHoverCapable } from "../../hooks/use-hover-capable.js";
3
3
  import { SPRING_MOUSE } from "../../lib/ease.js";
4
4
  import { useRef } from "react";
5
- import { cn } from "cn";
5
+ import { cn } from "@kumix/utils";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { motion, useMotionTemplate, useMotionValue, useReducedMotion, useSpring } from "motion/react";
8
8
  //#region src/components/motion/tilt-card.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"tilt-card.js","names":[],"sources":["../../../src/components/motion/tilt-card.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactNode, useRef } from \"react\";\nimport { cn } from \"cn\";\nimport {\n motion,\n useMotionTemplate,\n useMotionValue,\n useReducedMotion,\n useSpring,\n} from \"motion/react\";\n\nimport { useHoverCapable } from \"../../hooks/use-hover-capable\";\nimport { SPRING_MOUSE } from \"../../lib/ease\";\n\nexport interface TiltCardProps {\n children: ReactNode;\n max?: number;\n glare?: boolean;\n className?: string;\n}\n\nexport function TiltCard({ children, max = 12, glare = true, className }: TiltCardProps) {\n const ref = useRef<HTMLDivElement>(null);\n const reduce = useReducedMotion();\n const canHover = useHoverCapable();\n // Decorative cursor-follow: skip on touch (phantom hover) and reduced motion.\n const enabled = !reduce && canHover;\n const rx = useMotionValue(0);\n const ry = useMotionValue(0);\n const gx = useMotionValue(50);\n const gy = useMotionValue(50);\n\n const srx = useSpring(rx, SPRING_MOUSE);\n const sry = useSpring(ry, SPRING_MOUSE);\n\n const onMove = (e: React.MouseEvent<HTMLDivElement>) => {\n const el = ref.current;\n if (!el || !enabled) return;\n const rect = el.getBoundingClientRect();\n const px = (e.clientX - rect.left) / rect.width;\n const py = (e.clientY - rect.top) / rect.height;\n ry.set((px - 0.5) * max);\n rx.set((0.5 - py) * max);\n gx.set(px * 100);\n gy.set(py * 100);\n };\n\n const onLeave = () => {\n rx.set(0);\n ry.set(0);\n };\n\n const transform = useMotionTemplate`perspective(1000px) rotateX(${srx}deg) rotateY(${sry}deg)`;\n const glareBg = useMotionTemplate`radial-gradient(circle at ${gx}% ${gy}%, var(--foreground), transparent 50%)`;\n\n return (\n <motion.div\n ref={ref}\n onMouseMove={onMove}\n onMouseLeave={onLeave}\n style={{ transform, transformStyle: \"preserve-3d\" }}\n className={cn(\"relative overflow-hidden rounded-2xl will-change-transform\", className)}\n >\n {children}\n {glare && enabled ? (\n <motion.div\n aria-hidden\n style={{ background: glareBg }}\n className=\"pointer-events-none absolute inset-0 opacity-15\"\n />\n ) : null}\n </motion.div>\n );\n}\n"],"mappings":";;;;;;;;AAsBA,SAAgB,SAAS,EAAE,UAAU,MAAM,IAAI,QAAQ,MAAM,aAA4B;CACvF,MAAM,MAAM,OAAuB,IAAI;CACvC,MAAM,SAAS,iBAAiB;CAChC,MAAM,WAAW,gBAAgB;CAEjC,MAAM,UAAU,CAAC,UAAU;CAC3B,MAAM,KAAK,eAAe,CAAC;CAC3B,MAAM,KAAK,eAAe,CAAC;CAC3B,MAAM,KAAK,eAAe,EAAE;CAC5B,MAAM,KAAK,eAAe,EAAE;CAE5B,MAAM,MAAM,UAAU,IAAI,YAAY;CACtC,MAAM,MAAM,UAAU,IAAI,YAAY;CAEtC,MAAM,UAAU,MAAwC;EACtD,MAAM,KAAK,IAAI;EACf,IAAI,CAAC,MAAM,CAAC,SAAS;EACrB,MAAM,OAAO,GAAG,sBAAsB;EACtC,MAAM,MAAM,EAAE,UAAU,KAAK,QAAQ,KAAK;EAC1C,MAAM,MAAM,EAAE,UAAU,KAAK,OAAO,KAAK;EACzC,GAAG,KAAK,KAAK,MAAO,GAAG;EACvB,GAAG,KAAK,KAAM,MAAM,GAAG;EACvB,GAAG,IAAI,KAAK,GAAG;EACf,GAAG,IAAI,KAAK,GAAG;CACjB;CAEA,MAAM,gBAAgB;EACpB,GAAG,IAAI,CAAC;EACR,GAAG,IAAI,CAAC;CACV;CAEA,MAAM,YAAY,iBAAiB,+BAA+B,IAAI,eAAe,IAAI;CACzF,MAAM,UAAU,iBAAiB,6BAA6B,GAAG,IAAI,GAAG;CAExE,OACE,qBAAC,OAAO,KAAR;EACO;EACL,aAAa;EACb,cAAc;EACd,OAAO;GAAE;GAAW,gBAAgB;EAAc;EAClD,WAAW,GAAG,8DAA8D,SAAS;EALvF,UAAA,CAOG,UACA,SAAS,UACR,oBAAC,OAAO,KAAR;GACE,eAAA;GACA,OAAO,EAAE,YAAY,QAAQ;GAC7B,WAAU;EACX,CAAA,IACC,IACM;;AAEhB"}
1
+ {"version":3,"file":"tilt-card.js","names":[],"sources":["../../../src/components/motion/tilt-card.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactNode, useRef } from \"react\";\nimport {\n motion,\n useMotionTemplate,\n useMotionValue,\n useReducedMotion,\n useSpring,\n} from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { useHoverCapable } from \"../../hooks/use-hover-capable\";\nimport { SPRING_MOUSE } from \"../../lib/ease\";\n\nexport interface TiltCardProps {\n children: ReactNode;\n max?: number;\n glare?: boolean;\n className?: string;\n}\n\nexport function TiltCard({ children, max = 12, glare = true, className }: TiltCardProps) {\n const ref = useRef<HTMLDivElement>(null);\n const reduce = useReducedMotion();\n const canHover = useHoverCapable();\n // Decorative cursor-follow: skip on touch (phantom hover) and reduced motion.\n const enabled = !reduce && canHover;\n const rx = useMotionValue(0);\n const ry = useMotionValue(0);\n const gx = useMotionValue(50);\n const gy = useMotionValue(50);\n\n const srx = useSpring(rx, SPRING_MOUSE);\n const sry = useSpring(ry, SPRING_MOUSE);\n\n const onMove = (e: React.MouseEvent<HTMLDivElement>) => {\n const el = ref.current;\n if (!el || !enabled) return;\n const rect = el.getBoundingClientRect();\n const px = (e.clientX - rect.left) / rect.width;\n const py = (e.clientY - rect.top) / rect.height;\n ry.set((px - 0.5) * max);\n rx.set((0.5 - py) * max);\n gx.set(px * 100);\n gy.set(py * 100);\n };\n\n const onLeave = () => {\n rx.set(0);\n ry.set(0);\n };\n\n const transform = useMotionTemplate`perspective(1000px) rotateX(${srx}deg) rotateY(${sry}deg)`;\n const glareBg = useMotionTemplate`radial-gradient(circle at ${gx}% ${gy}%, var(--foreground), transparent 50%)`;\n\n return (\n <motion.div\n ref={ref}\n onMouseMove={onMove}\n onMouseLeave={onLeave}\n style={{ transform, transformStyle: \"preserve-3d\" }}\n className={cn(\"relative overflow-hidden rounded-2xl will-change-transform\", className)}\n >\n {children}\n {glare && enabled ? (\n <motion.div\n aria-hidden\n style={{ background: glareBg }}\n className=\"pointer-events-none absolute inset-0 opacity-15\"\n />\n ) : null}\n </motion.div>\n );\n}\n"],"mappings":";;;;;;;;AAsBA,SAAgB,SAAS,EAAE,UAAU,MAAM,IAAI,QAAQ,MAAM,aAA4B;CACvF,MAAM,MAAM,OAAuB,IAAI;CACvC,MAAM,SAAS,iBAAiB;CAChC,MAAM,WAAW,gBAAgB;CAEjC,MAAM,UAAU,CAAC,UAAU;CAC3B,MAAM,KAAK,eAAe,CAAC;CAC3B,MAAM,KAAK,eAAe,CAAC;CAC3B,MAAM,KAAK,eAAe,EAAE;CAC5B,MAAM,KAAK,eAAe,EAAE;CAE5B,MAAM,MAAM,UAAU,IAAI,YAAY;CACtC,MAAM,MAAM,UAAU,IAAI,YAAY;CAEtC,MAAM,UAAU,MAAwC;EACtD,MAAM,KAAK,IAAI;EACf,IAAI,CAAC,MAAM,CAAC,SAAS;EACrB,MAAM,OAAO,GAAG,sBAAsB;EACtC,MAAM,MAAM,EAAE,UAAU,KAAK,QAAQ,KAAK;EAC1C,MAAM,MAAM,EAAE,UAAU,KAAK,OAAO,KAAK;EACzC,GAAG,KAAK,KAAK,MAAO,GAAG;EACvB,GAAG,KAAK,KAAM,MAAM,GAAG;EACvB,GAAG,IAAI,KAAK,GAAG;EACf,GAAG,IAAI,KAAK,GAAG;CACjB;CAEA,MAAM,gBAAgB;EACpB,GAAG,IAAI,CAAC;EACR,GAAG,IAAI,CAAC;CACV;CAEA,MAAM,YAAY,iBAAiB,+BAA+B,IAAI,eAAe,IAAI;CACzF,MAAM,UAAU,iBAAiB,6BAA6B,GAAG,IAAI,GAAG;CAExE,OACE,qBAAC,OAAO,KAAR;EACO;EACL,aAAa;EACb,cAAc;EACd,OAAO;GAAE;GAAW,gBAAgB;EAAc;EAClD,WAAW,GAAG,8DAA8D,SAAS;EALvF,UAAA,CAOG,UACA,SAAS,UACR,oBAAC,OAAO,KAAR;GACE,eAAA;GACA,OAAO,EAAE,YAAY,QAAQ;GAC7B,WAAU;EACX,CAAA,IACC,IACM;;AAEhB"}
@@ -0,0 +1,12 @@
1
+ import { ComponentProps, ReactNode, Ref } from "react";
2
+ import { motion } from "motion/react";
3
+ //#region src/components/motion/tooltip-surface.d.ts
4
+ type Side = "top" | "right" | "bottom" | "left";
5
+ /** The shared visual surface for trigger tooltips and chart readouts. Positioning belongs to the caller. */
6
+ export declare function TooltipSurface({ children, side, className, ref, ...props }: Omit<ComponentProps<typeof motion.span>, "children"> & {
7
+ children?: ReactNode;
8
+ side?: Side;
9
+ ref?: Ref<HTMLSpanElement>;
10
+ }): import("react").JSX.Element;
11
+ //#endregion
12
+ //# sourceMappingURL=tooltip-surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip-surface.d.ts","names":[],"sources":["../../../src/components/motion/tooltip-surface.tsx"],"mappings":";;;KAQK;;wBAsDW,iBACd,UACA,MACA,WACA,QACG,SACF,KAAK,sBAAsB,OAAO;EACnC,WAAW;EACX,OAAO;EACP,MAAM,IAAI;oBACX,IAAA"}
@@ -0,0 +1,97 @@
1
+ "use client";
2
+ import { EASE_OUT } from "../../lib/ease.js";
3
+ import { useMemo } from "react";
4
+ import { cn } from "@kumix/utils";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { motion, useReducedMotion } from "motion/react";
7
+ //#region src/components/motion/tooltip-surface.tsx
8
+ const offsetFrom = {
9
+ top: { y: 8 },
10
+ bottom: { y: -8 },
11
+ left: { x: 8 },
12
+ right: { x: -8 }
13
+ };
14
+ const TOOLTIP_SPRING = {
15
+ type: "spring",
16
+ stiffness: 380,
17
+ damping: 30,
18
+ mass: .7
19
+ };
20
+ function buildVariants(side) {
21
+ const o = offsetFrom[side];
22
+ return {
23
+ initial: {
24
+ opacity: 0,
25
+ scale: .9,
26
+ filter: "blur(5px)",
27
+ x: o.x ?? 0,
28
+ y: o.y ?? 0
29
+ },
30
+ animate: {
31
+ opacity: 1,
32
+ scale: 1,
33
+ filter: "blur(0px)",
34
+ x: 0,
35
+ y: 0,
36
+ transition: {
37
+ ...TOOLTIP_SPRING,
38
+ opacity: {
39
+ duration: .14,
40
+ ease: EASE_OUT
41
+ },
42
+ filter: {
43
+ duration: .18,
44
+ ease: EASE_OUT
45
+ }
46
+ }
47
+ },
48
+ exit: {
49
+ opacity: 0,
50
+ scale: .94,
51
+ filter: "blur(3px)",
52
+ x: (o.x ?? 0) * .6,
53
+ y: (o.y ?? 0) * .6,
54
+ transition: {
55
+ duration: .12,
56
+ ease: EASE_OUT
57
+ }
58
+ }
59
+ };
60
+ }
61
+ const REDUCED_VARIANTS = {
62
+ initial: { opacity: 0 },
63
+ animate: {
64
+ opacity: 1,
65
+ transition: {
66
+ duration: .14,
67
+ ease: EASE_OUT
68
+ }
69
+ },
70
+ exit: {
71
+ opacity: 0,
72
+ transition: {
73
+ duration: .1,
74
+ ease: EASE_OUT
75
+ }
76
+ }
77
+ };
78
+ /** The shared visual surface for trigger tooltips and chart readouts. Positioning belongs to the caller. */
79
+ function TooltipSurface({ children, side = "top", className, ref, ...props }) {
80
+ const reduce = useReducedMotion();
81
+ const variants = useMemo(() => reduce ? REDUCED_VARIANTS : buildVariants(side), [reduce, side]);
82
+ return /* @__PURE__ */ jsx(motion.span, {
83
+ ref,
84
+ role: "tooltip",
85
+ variants,
86
+ initial: "initial",
87
+ animate: "animate",
88
+ exit: "exit",
89
+ className: cn("block whitespace-nowrap rounded-lg border border-border bg-background px-2.5 py-1 font-medium text-foreground text-xs shadow-lg", className),
90
+ ...props,
91
+ children
92
+ });
93
+ }
94
+ //#endregion
95
+ export { TooltipSurface };
96
+
97
+ //# sourceMappingURL=tooltip-surface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip-surface.js","names":[],"sources":["../../../src/components/motion/tooltip-surface.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentProps, type ReactNode, type Ref, useMemo } from \"react\";\nimport { motion, useReducedMotion, type Variants } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT } from \"../../lib/ease\";\n\ntype Side = \"top\" | \"right\" | \"bottom\" | \"left\";\n\n// Offset is in the direction *away* from the trigger — content originates near\n// the trigger and rises into resting position.\nconst offsetFrom: Record<Side, { x?: number; y?: number }> = {\n top: { y: 8 },\n bottom: { y: -8 },\n left: { x: 8 },\n right: { x: -8 },\n};\n\n// Small tooltip surfaces need the lighter spawn used by the original Tooltip.\nconst TOOLTIP_SPRING = { type: \"spring\", stiffness: 380, damping: 30, mass: 0.7 } as const;\n\nfunction buildVariants(side: Side): Variants {\n const o = offsetFrom[side];\n return {\n initial: {\n opacity: 0,\n scale: 0.9,\n filter: \"blur(5px)\",\n x: o.x ?? 0,\n y: o.y ?? 0,\n },\n animate: {\n opacity: 1,\n scale: 1,\n filter: \"blur(0px)\",\n x: 0,\n y: 0,\n transition: {\n ...TOOLTIP_SPRING,\n opacity: { duration: 0.14, ease: EASE_OUT },\n filter: { duration: 0.18, ease: EASE_OUT },\n },\n },\n exit: {\n opacity: 0,\n scale: 0.94,\n filter: \"blur(3px)\",\n x: (o.x ?? 0) * 0.6,\n y: (o.y ?? 0) * 0.6,\n transition: { duration: 0.12, ease: EASE_OUT },\n },\n };\n}\n\nconst REDUCED_VARIANTS: Variants = {\n initial: { opacity: 0 },\n animate: { opacity: 1, transition: { duration: 0.14, ease: EASE_OUT } },\n exit: { opacity: 0, transition: { duration: 0.1, ease: EASE_OUT } },\n};\n\n/** The shared visual surface for trigger tooltips and chart readouts. Positioning belongs to the caller. */\nexport function TooltipSurface({\n children,\n side = \"top\",\n className,\n ref,\n ...props\n}: Omit<ComponentProps<typeof motion.span>, \"children\"> & {\n children?: ReactNode;\n side?: Side;\n ref?: Ref<HTMLSpanElement>;\n}) {\n const reduce = useReducedMotion();\n const variants = useMemo(() => (reduce ? REDUCED_VARIANTS : buildVariants(side)), [reduce, side]);\n return (\n <motion.span\n ref={ref}\n role=\"tooltip\"\n variants={variants}\n initial=\"initial\"\n animate=\"animate\"\n exit=\"exit\"\n className={cn(\n \"block whitespace-nowrap rounded-lg border border-border bg-background px-2.5 py-1 font-medium text-foreground text-xs shadow-lg\",\n className,\n )}\n {...props}\n >\n {children}\n </motion.span>\n );\n}\n"],"mappings":";;;;;;;AAYA,MAAM,aAAuD;CAC3D,KAAK,EAAE,GAAG,EAAE;CACZ,QAAQ,EAAE,GAAG,GAAG;CAChB,MAAM,EAAE,GAAG,EAAE;CACb,OAAO,EAAE,GAAG,GAAG;AACjB;AAGA,MAAM,iBAAiB;CAAE,MAAM;CAAU,WAAW;CAAK,SAAS;CAAI,MAAM;AAAI;AAEhF,SAAS,cAAc,MAAsB;CAC3C,MAAM,IAAI,WAAW;CACrB,OAAO;EACL,SAAS;GACP,SAAS;GACT,OAAO;GACP,QAAQ;GACR,GAAG,EAAE,KAAK;GACV,GAAG,EAAE,KAAK;EACZ;EACA,SAAS;GACP,SAAS;GACT,OAAO;GACP,QAAQ;GACR,GAAG;GACH,GAAG;GACH,YAAY;IACV,GAAG;IACH,SAAS;KAAE,UAAU;KAAM,MAAM;IAAS;IAC1C,QAAQ;KAAE,UAAU;KAAM,MAAM;IAAS;GAC3C;EACF;EACA,MAAM;GACJ,SAAS;GACT,OAAO;GACP,QAAQ;GACR,IAAI,EAAE,KAAK,KAAK;GAChB,IAAI,EAAE,KAAK,KAAK;GAChB,YAAY;IAAE,UAAU;IAAM,MAAM;GAAS;EAC/C;CACF;AACF;AAEA,MAAM,mBAA6B;CACjC,SAAS,EAAE,SAAS,EAAE;CACtB,SAAS;EAAE,SAAS;EAAG,YAAY;GAAE,UAAU;GAAM,MAAM;EAAS;CAAE;CACtE,MAAM;EAAE,SAAS;EAAG,YAAY;GAAE,UAAU;GAAK,MAAM;EAAS;CAAE;AACpE;;AAGA,SAAgB,eAAe,EAC7B,UACA,OAAO,OACP,WACA,KACA,GAAG,SAKF;CACD,MAAM,SAAS,iBAAiB;CAChC,MAAM,WAAW,cAAe,SAAS,mBAAmB,cAAc,IAAI,GAAI,CAAC,QAAQ,IAAI,CAAC;CAChG,OACE,oBAAC,OAAO,MAAR;EACO;EACL,MAAK;EACK;EACV,SAAQ;EACR,SAAQ;EACR,MAAK;EACL,WAAW,GACT,mIACA,SACF;EACA,GAAI;EAEH;CACU,CAAA;AAEjB"}
@@ -1,9 +1,19 @@
1
- import { ReactElement, ReactNode } from "react";
1
+ import { ReactElement, ReactNode, RefObject } from "react";
2
2
  //#region src/components/motion/tooltip.d.ts
3
3
  type Side = "top" | "right" | "bottom" | "left";
4
4
  export interface TooltipProps {
5
5
  content: ReactNode;
6
- children: ReactElement;
6
+ children?: ReactElement;
7
+ /** Existing trigger for controlled integrations such as chart cells. */
8
+ anchorRef?: RefObject<HTMLElement | SVGElement | null>;
9
+ /** Point within the anchor, as fractions of its rendered width and height. */
10
+ anchorPoint?: {
11
+ x: number;
12
+ y: number;
13
+ };
14
+ open?: boolean;
15
+ onOpenChange?: (open: boolean) => void;
16
+ id?: string;
7
17
  side?: Side;
8
18
  /** Delay before showing (ms). Default 120. */
9
19
  delay?: number;
@@ -11,6 +21,6 @@ export interface TooltipProps {
11
21
  /** Classes for the outer wrapper span. Use to fix baseline / fill parent. */
12
22
  wrapperClassName?: string;
13
23
  }
14
- export declare function Tooltip({ content, children, side, delay, className, wrapperClassName }: TooltipProps): import("react").JSX.Element;
24
+ export declare function Tooltip({ content, children, side, delay, className, wrapperClassName, anchorRef: externalAnchorRef, anchorPoint, open: controlledOpen, onOpenChange, id: providedId }: TooltipProps): import("react").JSX.Element | undefined;
15
25
  //#endregion
16
26
  //# sourceMappingURL=tooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","names":[],"sources":["../../../src/components/motion/tooltip.tsx"],"mappings":";;KAwBK;iBAEY;EACf,SAAS;EACT,UAAU;EACV,OAAO;;EAEP;EACA;;EAEA;;wBA6Ec,UACd,SACA,UACA,MACA,OACA,WACA,oBACC,+BAAY,IAAA"}
1
+ {"version":3,"file":"tooltip.d.ts","names":[],"sources":["../../../src/components/motion/tooltip.tsx"],"mappings":";;KAyBK;iBAEY;EACf,SAAS;EACT,WAAW;;EAEX,YAAY,UAAU,cAAc;;EAEpC;IAAgB;IAAW;;EAC3B;EACA,gBAAgB;EAChB;EACA,OAAO;;EAEP;EACA;;EAEA;;wBA0Bc,UACd,SACA,UACA,MACA,OACA,WACA,kBACA,WAAW,mBACX,aACA,MAAM,gBACN,cACA,IAAI,cACH,+BAAY,IAAA"}