@kumix/ui 0.2.4 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. package/README.md +45 -10
  2. package/dist/components/custom/confirm-dialog.d.ts +16 -0
  3. package/dist/components/custom/confirm-dialog.d.ts.map +1 -0
  4. package/dist/components/custom/confirm-dialog.js +93 -0
  5. package/dist/components/custom/confirm-dialog.js.map +1 -0
  6. package/dist/components/custom/toast.d.ts +20 -0
  7. package/dist/components/custom/toast.d.ts.map +1 -0
  8. package/dist/components/custom/toast.js +73 -0
  9. package/dist/components/custom/toast.js.map +1 -0
  10. package/dist/components/motion/action-swap-blur.d.ts +11 -0
  11. package/dist/components/motion/action-swap-blur.d.ts.map +1 -0
  12. package/dist/components/motion/action-swap-blur.js +26 -0
  13. package/dist/components/motion/action-swap-blur.js.map +1 -0
  14. package/dist/components/motion/action-swap-cascade.d.ts +11 -0
  15. package/dist/components/motion/action-swap-cascade.d.ts.map +1 -0
  16. package/dist/components/motion/action-swap-cascade.js +26 -0
  17. package/dist/components/motion/action-swap-cascade.js.map +1 -0
  18. package/dist/components/motion/action-swap-roll.d.ts +11 -0
  19. package/dist/components/motion/action-swap-roll.d.ts.map +1 -0
  20. package/dist/components/motion/action-swap-roll.js +26 -0
  21. package/dist/components/motion/action-swap-roll.js.map +1 -0
  22. package/dist/components/motion/action-swap.d.ts +41 -0
  23. package/dist/components/motion/action-swap.d.ts.map +1 -0
  24. package/dist/components/motion/action-swap.js +261 -0
  25. package/dist/components/motion/action-swap.js.map +1 -0
  26. package/dist/components/motion/animated-badge.d.ts +18 -0
  27. package/dist/components/motion/animated-badge.d.ts.map +1 -0
  28. package/dist/components/motion/animated-badge.js +206 -0
  29. package/dist/components/motion/animated-badge.js.map +1 -0
  30. package/dist/components/motion/animated-number.d.ts +12 -0
  31. package/dist/components/motion/animated-number.d.ts.map +1 -0
  32. package/dist/components/motion/animated-number.js +47 -0
  33. package/dist/components/motion/animated-number.js.map +1 -0
  34. package/dist/components/motion/animated-sidebar.d.ts +97 -0
  35. package/dist/components/motion/animated-sidebar.d.ts.map +1 -0
  36. package/dist/components/motion/animated-sidebar.js +611 -0
  37. package/dist/components/motion/animated-sidebar.js.map +1 -0
  38. package/dist/components/motion/animated-toast-stack.d.ts +65 -0
  39. package/dist/components/motion/animated-toast-stack.d.ts.map +1 -0
  40. package/dist/components/motion/animated-toast-stack.js +303 -0
  41. package/dist/components/motion/animated-toast-stack.js.map +1 -0
  42. package/dist/components/motion/attachment-upload.d.ts +47 -0
  43. package/dist/components/motion/attachment-upload.d.ts.map +1 -0
  44. package/dist/components/motion/attachment-upload.js +737 -0
  45. package/dist/components/motion/attachment-upload.js.map +1 -0
  46. package/dist/components/motion/availability-scheduler/copy-menu.d.ts +10 -0
  47. package/dist/components/motion/availability-scheduler/copy-menu.d.ts.map +1 -0
  48. package/dist/components/motion/availability-scheduler/copy-menu.js +3 -0
  49. package/dist/components/motion/availability-scheduler/day-row.d.ts +15 -0
  50. package/dist/components/motion/availability-scheduler/day-row.d.ts.map +1 -0
  51. package/dist/components/motion/availability-scheduler/day-row.js +181 -0
  52. package/dist/components/motion/availability-scheduler/day-row.js.map +1 -0
  53. package/dist/components/motion/availability-scheduler/icon-button.d.ts +15 -0
  54. package/dist/components/motion/availability-scheduler/icon-button.d.ts.map +1 -0
  55. package/dist/components/motion/availability-scheduler/icon-button.js +24 -0
  56. package/dist/components/motion/availability-scheduler/icon-button.js.map +1 -0
  57. package/dist/components/motion/availability-scheduler/index.d.ts +14 -0
  58. package/dist/components/motion/availability-scheduler/index.d.ts.map +1 -0
  59. package/dist/components/motion/availability-scheduler/index.js +59 -0
  60. package/dist/components/motion/availability-scheduler/index.js.map +1 -0
  61. package/dist/components/motion/availability-scheduler/time-select.d.ts +10 -0
  62. package/dist/components/motion/availability-scheduler/time-select.d.ts.map +1 -0
  63. package/dist/components/motion/availability-scheduler/time-select.js +26 -0
  64. package/dist/components/motion/availability-scheduler/time-select.js.map +1 -0
  65. package/dist/components/motion/bloom-menu.d.ts +17 -0
  66. package/dist/components/motion/bloom-menu.d.ts.map +1 -0
  67. package/dist/components/motion/bloom-menu.js +170 -0
  68. package/dist/components/motion/bloom-menu.js.map +1 -0
  69. package/dist/components/motion/bottom-sheet.d.ts +19 -0
  70. package/dist/components/motion/bottom-sheet.d.ts.map +1 -0
  71. package/dist/components/motion/bottom-sheet.js +146 -0
  72. package/dist/components/motion/bottom-sheet.js.map +1 -0
  73. package/dist/components/motion/bounce-sidebar.d.ts +26 -0
  74. package/dist/components/motion/bounce-sidebar.d.ts.map +1 -0
  75. package/dist/components/motion/bounce-sidebar.js +164 -0
  76. package/dist/components/motion/bounce-sidebar.js.map +1 -0
  77. package/dist/components/motion/bouncy-accordion.d.ts +32 -0
  78. package/dist/components/motion/bouncy-accordion.d.ts.map +1 -0
  79. package/dist/components/motion/bouncy-accordion.js +172 -0
  80. package/dist/components/motion/bouncy-accordion.js.map +1 -0
  81. package/dist/components/motion/button/base.d.ts +17 -0
  82. package/dist/components/motion/button/base.d.ts.map +1 -0
  83. package/dist/components/motion/button/base.js +86 -0
  84. package/dist/components/motion/button/base.js.map +1 -0
  85. package/dist/components/motion/button/index.d.ts +4 -0
  86. package/dist/components/motion/button/index.js +5 -0
  87. package/dist/components/motion/button/magnetic.d.ts +12 -0
  88. package/dist/components/motion/button/magnetic.d.ts.map +1 -0
  89. package/dist/components/motion/button/magnetic.js +21 -0
  90. package/dist/components/motion/button/magnetic.js.map +1 -0
  91. package/dist/components/motion/button/stateful.d.ts +16 -0
  92. package/dist/components/motion/button/stateful.d.ts.map +1 -0
  93. package/dist/components/motion/button/stateful.js +190 -0
  94. package/dist/components/motion/button/stateful.js.map +1 -0
  95. package/dist/components/motion/center-morph-modal.d.ts +43 -0
  96. package/dist/components/motion/center-morph-modal.d.ts.map +1 -0
  97. package/dist/components/motion/center-morph-modal.js +238 -0
  98. package/dist/components/motion/center-morph-modal.js.map +1 -0
  99. package/dist/components/motion/checkbox.d.ts +15 -0
  100. package/dist/components/motion/checkbox.d.ts.map +1 -0
  101. package/dist/components/motion/checkbox.js +81 -0
  102. package/dist/components/motion/checkbox.js.map +1 -0
  103. package/dist/components/motion/chromatic-text-reveal.d.ts +31 -0
  104. package/dist/components/motion/chromatic-text-reveal.d.ts.map +1 -0
  105. package/dist/components/motion/chromatic-text-reveal.js +132 -0
  106. package/dist/components/motion/chromatic-text-reveal.js.map +1 -0
  107. package/dist/components/motion/command-palette.d.ts +26 -0
  108. package/dist/components/motion/command-palette.d.ts.map +1 -0
  109. package/dist/components/motion/command-palette.js +246 -0
  110. package/dist/components/motion/command-palette.js.map +1 -0
  111. package/dist/components/motion/context-menu.d.ts +71 -0
  112. package/dist/components/motion/context-menu.d.ts.map +1 -0
  113. package/dist/components/motion/context-menu.js +454 -0
  114. package/dist/components/motion/context-menu.js.map +1 -0
  115. package/dist/components/motion/cylinder-carousel.d.ts +40 -0
  116. package/dist/components/motion/cylinder-carousel.d.ts.map +1 -0
  117. package/dist/components/motion/cylinder-carousel.js +274 -0
  118. package/dist/components/motion/cylinder-carousel.js.map +1 -0
  119. package/dist/components/motion/dock.d.ts +24 -0
  120. package/dist/components/motion/dock.d.ts.map +1 -0
  121. package/dist/components/motion/dock.js +62 -0
  122. package/dist/components/motion/dock.js.map +1 -0
  123. package/dist/components/motion/drawer.d.ts +19 -0
  124. package/dist/components/motion/drawer.d.ts.map +1 -0
  125. package/dist/components/motion/drawer.js +58 -0
  126. package/dist/components/motion/drawer.js.map +1 -0
  127. package/dist/components/motion/dynamic-island.d.ts +22 -0
  128. package/dist/components/motion/dynamic-island.d.ts.map +1 -0
  129. package/dist/components/motion/dynamic-island.js +143 -0
  130. package/dist/components/motion/dynamic-island.js.map +1 -0
  131. package/dist/components/motion/expandable-action-bar.d.ts +52 -0
  132. package/dist/components/motion/expandable-action-bar.d.ts.map +1 -0
  133. package/dist/components/motion/expandable-action-bar.js +191 -0
  134. package/dist/components/motion/expandable-action-bar.js.map +1 -0
  135. package/dist/components/motion/expandable-tabs.d.ts +33 -0
  136. package/dist/components/motion/expandable-tabs.d.ts.map +1 -0
  137. package/dist/components/motion/expandable-tabs.js +291 -0
  138. package/dist/components/motion/expandable-tabs.js.map +1 -0
  139. package/dist/components/motion/feedback-widget.d.ts +18 -0
  140. package/dist/components/motion/feedback-widget.d.ts.map +1 -0
  141. package/dist/components/motion/feedback-widget.js +413 -0
  142. package/dist/components/motion/feedback-widget.js.map +1 -0
  143. package/dist/components/motion/file-upload.d.ts +48 -0
  144. package/dist/components/motion/file-upload.d.ts.map +1 -0
  145. package/dist/components/motion/file-upload.js +382 -0
  146. package/dist/components/motion/file-upload.js.map +1 -0
  147. package/dist/components/motion/hold-action-button.d.ts +17 -0
  148. package/dist/components/motion/hold-action-button.d.ts.map +1 -0
  149. package/dist/components/motion/hold-action-button.js +158 -0
  150. package/dist/components/motion/hold-action-button.js.map +1 -0
  151. package/dist/components/motion/infinite-masonry.d.ts +31 -0
  152. package/dist/components/motion/infinite-masonry.d.ts.map +1 -0
  153. package/dist/components/motion/infinite-masonry.js +223 -0
  154. package/dist/components/motion/infinite-masonry.js.map +1 -0
  155. package/dist/components/motion/input.d.ts +29 -0
  156. package/dist/components/motion/input.d.ts.map +1 -0
  157. package/dist/components/motion/input.js +126 -0
  158. package/dist/components/motion/input.js.map +1 -0
  159. package/dist/components/motion/loader.d.ts +17 -0
  160. package/dist/components/motion/loader.d.ts.map +1 -0
  161. package/dist/components/motion/loader.js +791 -0
  162. package/dist/components/motion/loader.js.map +1 -0
  163. package/dist/components/motion/magnetic.d.ts +11 -0
  164. package/dist/components/motion/magnetic.d.ts.map +1 -0
  165. package/dist/components/motion/magnetic.js +44 -0
  166. package/dist/components/motion/magnetic.js.map +1 -0
  167. package/dist/components/motion/marquee.d.ts +15 -0
  168. package/dist/components/motion/marquee.d.ts.map +1 -0
  169. package/dist/components/motion/marquee.js +35 -0
  170. package/dist/components/motion/marquee.js.map +1 -0
  171. package/dist/components/motion/morphing-modal.d.ts +15 -0
  172. package/dist/components/motion/morphing-modal.d.ts.map +1 -0
  173. package/dist/components/motion/morphing-modal.js +117 -0
  174. package/dist/components/motion/morphing-modal.js.map +1 -0
  175. package/dist/components/motion/not-found/glitch.d.ts +6 -0
  176. package/dist/components/motion/not-found/glitch.d.ts.map +1 -0
  177. package/dist/components/motion/not-found/glitch.js +90 -0
  178. package/dist/components/motion/not-found/glitch.js.map +1 -0
  179. package/dist/components/motion/not-found/magnetic.d.ts +6 -0
  180. package/dist/components/motion/not-found/magnetic.d.ts.map +1 -0
  181. package/dist/components/motion/not-found/magnetic.js +47 -0
  182. package/dist/components/motion/not-found/magnetic.js.map +1 -0
  183. package/dist/components/motion/not-found/shared.d.ts +32 -0
  184. package/dist/components/motion/not-found/shared.d.ts.map +1 -0
  185. package/dist/components/motion/not-found/shared.js +52 -0
  186. package/dist/components/motion/not-found/shared.js.map +1 -0
  187. package/dist/components/motion/not-found/spotlight.d.ts +6 -0
  188. package/dist/components/motion/not-found/spotlight.d.ts.map +1 -0
  189. package/dist/components/motion/not-found/spotlight.js +70 -0
  190. package/dist/components/motion/not-found/spotlight.js.map +1 -0
  191. package/dist/components/motion/not-found/stacked.d.ts +6 -0
  192. package/dist/components/motion/not-found/stacked.d.ts.map +1 -0
  193. package/dist/components/motion/not-found/stacked.js +95 -0
  194. package/dist/components/motion/not-found/stacked.js.map +1 -0
  195. package/dist/components/motion/not-found/terminal.d.ts +6 -0
  196. package/dist/components/motion/not-found/terminal.d.ts.map +1 -0
  197. package/dist/components/motion/not-found/terminal.js +90 -0
  198. package/dist/components/motion/not-found/terminal.js.map +1 -0
  199. package/dist/components/motion/notification-stack.d.ts +35 -0
  200. package/dist/components/motion/notification-stack.d.ts.map +1 -0
  201. package/dist/components/motion/notification-stack.js +187 -0
  202. package/dist/components/motion/notification-stack.js.map +1 -0
  203. package/dist/components/motion/number-ticker.d.ts +26 -0
  204. package/dist/components/motion/number-ticker.d.ts.map +1 -0
  205. package/dist/components/motion/number-ticker.js +129 -0
  206. package/dist/components/motion/number-ticker.js.map +1 -0
  207. package/dist/components/motion/otp-input.d.ts +32 -0
  208. package/dist/components/motion/otp-input.d.ts.map +1 -0
  209. package/dist/components/motion/otp-input.js +272 -0
  210. package/dist/components/motion/otp-input.js.map +1 -0
  211. package/dist/components/motion/overflow-actions.d.ts +39 -0
  212. package/dist/components/motion/overflow-actions.d.ts.map +1 -0
  213. package/dist/components/motion/overflow-actions.js +220 -0
  214. package/dist/components/motion/overflow-actions.js.map +1 -0
  215. package/dist/components/motion/parallax.d.ts +21 -0
  216. package/dist/components/motion/parallax.d.ts.map +1 -0
  217. package/dist/components/motion/parallax.js +35 -0
  218. package/dist/components/motion/parallax.js.map +1 -0
  219. package/dist/components/motion/popover-morph.d.ts +38 -0
  220. package/dist/components/motion/popover-morph.d.ts.map +1 -0
  221. package/dist/components/motion/popover-morph.js +167 -0
  222. package/dist/components/motion/popover-morph.js.map +1 -0
  223. package/dist/components/motion/popover.d.ts +40 -0
  224. package/dist/components/motion/popover.d.ts.map +1 -0
  225. package/dist/components/motion/popover.js +393 -0
  226. package/dist/components/motion/popover.js.map +1 -0
  227. package/dist/components/motion/preview-rail.d.ts +26 -0
  228. package/dist/components/motion/preview-rail.d.ts.map +1 -0
  229. package/dist/components/motion/preview-rail.js +134 -0
  230. package/dist/components/motion/preview-rail.js.map +1 -0
  231. package/dist/components/motion/pull-to-refresh.d.ts +28 -0
  232. package/dist/components/motion/pull-to-refresh.d.ts.map +1 -0
  233. package/dist/components/motion/pull-to-refresh.js +389 -0
  234. package/dist/components/motion/pull-to-refresh.js.map +1 -0
  235. package/dist/components/motion/radio.d.ts +22 -0
  236. package/dist/components/motion/radio.d.ts.map +1 -0
  237. package/dist/components/motion/radio.js +79 -0
  238. package/dist/components/motion/radio.js.map +1 -0
  239. package/dist/components/motion/range-slider-bubble.d.ts +16 -0
  240. package/dist/components/motion/range-slider-bubble.d.ts.map +1 -0
  241. package/dist/components/motion/range-slider-bubble.js +117 -0
  242. package/dist/components/motion/range-slider-bubble.js.map +1 -0
  243. package/dist/components/motion/range-slider-fluid.d.ts +18 -0
  244. package/dist/components/motion/range-slider-fluid.d.ts.map +1 -0
  245. package/dist/components/motion/range-slider-fluid.js +63 -0
  246. package/dist/components/motion/range-slider-fluid.js.map +1 -0
  247. package/dist/components/motion/range-slider-ruler.d.ts +19 -0
  248. package/dist/components/motion/range-slider-ruler.d.ts.map +1 -0
  249. package/dist/components/motion/range-slider-ruler.js +142 -0
  250. package/dist/components/motion/range-slider-ruler.js.map +1 -0
  251. package/dist/components/motion/range-slider-wave.d.ts +16 -0
  252. package/dist/components/motion/range-slider-wave.d.ts.map +1 -0
  253. package/dist/components/motion/range-slider-wave.js +57 -0
  254. package/dist/components/motion/range-slider-wave.js.map +1 -0
  255. package/dist/components/motion/range-slider.d.ts +11 -0
  256. package/dist/components/motion/range-slider.d.ts.map +1 -0
  257. package/dist/components/motion/range-slider.js +63 -0
  258. package/dist/components/motion/range-slider.js.map +1 -0
  259. package/dist/components/motion/scroll-progress.d.ts +29 -0
  260. package/dist/components/motion/scroll-progress.d.ts.map +1 -0
  261. package/dist/components/motion/scroll-progress.js +71 -0
  262. package/dist/components/motion/scroll-progress.js.map +1 -0
  263. package/dist/components/motion/scroll-reveal.d.ts +23 -0
  264. package/dist/components/motion/scroll-reveal.d.ts.map +1 -0
  265. package/dist/components/motion/scroll-reveal.js +42 -0
  266. package/dist/components/motion/scroll-reveal.js.map +1 -0
  267. package/dist/components/motion/scroll-to.d.ts +21 -0
  268. package/dist/components/motion/scroll-to.d.ts.map +1 -0
  269. package/dist/components/motion/scroll-to.js +27 -0
  270. package/dist/components/motion/scroll-to.js.map +1 -0
  271. package/dist/components/motion/select-morph.d.ts +41 -0
  272. package/dist/components/motion/select-morph.d.ts.map +1 -0
  273. package/dist/components/motion/select-morph.js +251 -0
  274. package/dist/components/motion/select-morph.js.map +1 -0
  275. package/dist/components/motion/select.d.ts +36 -0
  276. package/dist/components/motion/select.d.ts.map +1 -0
  277. package/dist/components/motion/select.js +319 -0
  278. package/dist/components/motion/select.js.map +1 -0
  279. package/dist/components/motion/shader-background.d.ts +38 -0
  280. package/dist/components/motion/shader-background.d.ts.map +1 -0
  281. package/dist/components/motion/shader-background.js +49 -0
  282. package/dist/components/motion/shader-background.js.map +1 -0
  283. package/dist/components/motion/shared-layout-bg.d.ts +17 -0
  284. package/dist/components/motion/shared-layout-bg.d.ts.map +1 -0
  285. package/dist/components/motion/shared-layout-bg.js +88 -0
  286. package/dist/components/motion/shared-layout-bg.js.map +1 -0
  287. package/dist/components/motion/slide-action-button.d.ts +15 -0
  288. package/dist/components/motion/slide-action-button.d.ts.map +1 -0
  289. package/dist/components/motion/slide-action-button.js +146 -0
  290. package/dist/components/motion/slide-action-button.js.map +1 -0
  291. package/dist/components/motion/smooth-scroll.d.ts +47 -0
  292. package/dist/components/motion/smooth-scroll.d.ts.map +1 -0
  293. package/dist/components/motion/smooth-scroll.js +182 -0
  294. package/dist/components/motion/smooth-scroll.js.map +1 -0
  295. package/dist/components/motion/swipeable-list.d.ts +60 -0
  296. package/dist/components/motion/swipeable-list.d.ts.map +1 -0
  297. package/dist/components/motion/swipeable-list.js +254 -0
  298. package/dist/components/motion/swipeable-list.js.map +1 -0
  299. package/dist/components/motion/switch.d.ts +13 -0
  300. package/dist/components/motion/switch.d.ts.map +1 -0
  301. package/dist/components/motion/switch.js +76 -0
  302. package/dist/components/motion/switch.js.map +1 -0
  303. package/dist/components/motion/table/editable-cell.d.ts +9 -0
  304. package/dist/components/motion/table/editable-cell.d.ts.map +1 -0
  305. package/dist/components/motion/table/editable-cell.js +17 -0
  306. package/dist/components/motion/table/editable-cell.js.map +1 -0
  307. package/dist/components/motion/table/index.d.ts +6 -0
  308. package/dist/components/motion/table/index.d.ts.map +1 -0
  309. package/dist/components/motion/table/index.js +420 -0
  310. package/dist/components/motion/table/index.js.map +1 -0
  311. package/dist/components/motion/table/row-handle.d.ts +15 -0
  312. package/dist/components/motion/table/row-handle.d.ts.map +1 -0
  313. package/dist/components/motion/table/row-handle.js +51 -0
  314. package/dist/components/motion/table/row-handle.js.map +1 -0
  315. package/dist/components/motion/table/skeleton-rows.d.ts +11 -0
  316. package/dist/components/motion/table/skeleton-rows.d.ts.map +1 -0
  317. package/dist/components/motion/table/skeleton-rows.js +23 -0
  318. package/dist/components/motion/table/skeleton-rows.js.map +1 -0
  319. package/dist/components/motion/table/table-header.d.ts +35 -0
  320. package/dist/components/motion/table/table-header.d.ts.map +1 -0
  321. package/dist/components/motion/table/table-header.js +167 -0
  322. package/dist/components/motion/table/table-header.js.map +1 -0
  323. package/dist/components/motion/table/table-menu.d.ts +17 -0
  324. package/dist/components/motion/table/table-menu.d.ts.map +1 -0
  325. package/dist/components/motion/table/table-menu.js +92 -0
  326. package/dist/components/motion/table/table-menu.js.map +1 -0
  327. package/dist/components/motion/tabs.d.ts +29 -0
  328. package/dist/components/motion/tabs.d.ts.map +1 -0
  329. package/dist/components/motion/tabs.js +125 -0
  330. package/dist/components/motion/tabs.js.map +1 -0
  331. package/dist/components/motion/text-cascade.d.ts +15 -0
  332. package/dist/components/motion/text-cascade.d.ts.map +1 -0
  333. package/dist/components/motion/text-cascade.js +21 -0
  334. package/dist/components/motion/text-cascade.js.map +1 -0
  335. package/dist/components/motion/text-reveal.d.ts +25 -0
  336. package/dist/components/motion/text-reveal.d.ts.map +1 -0
  337. package/dist/components/motion/text-reveal.js +94 -0
  338. package/dist/components/motion/text-reveal.js.map +1 -0
  339. package/dist/components/motion/text-shimmer.d.ts +12 -0
  340. package/dist/components/motion/text-shimmer.d.ts.map +1 -0
  341. package/dist/components/motion/text-shimmer.js +15 -0
  342. package/dist/components/motion/text-shimmer.js.map +1 -0
  343. package/dist/components/motion/theme-toggle.d.ts +23 -0
  344. package/dist/components/motion/theme-toggle.d.ts.map +1 -0
  345. package/dist/components/motion/theme-toggle.js +160 -0
  346. package/dist/components/motion/theme-toggle.js.map +1 -0
  347. package/dist/components/motion/tilt-card.d.ts +12 -0
  348. package/dist/components/motion/tilt-card.d.ts.map +1 -0
  349. package/dist/components/motion/tilt-card.js +56 -0
  350. package/dist/components/motion/tilt-card.js.map +1 -0
  351. package/dist/components/motion/tooltip.d.ts +17 -0
  352. package/dist/components/motion/tooltip.d.ts.map +1 -0
  353. package/dist/components/motion/tooltip.js +194 -0
  354. package/dist/components/motion/tooltip.js.map +1 -0
  355. package/dist/components/motion/wheel-picker.d.ts +24 -0
  356. package/dist/components/motion/wheel-picker.d.ts.map +1 -0
  357. package/dist/components/motion/wheel-picker.js +442 -0
  358. package/dist/components/motion/wheel-picker.js.map +1 -0
  359. package/dist/components/reui/alert.d.ts +1 -1
  360. package/dist/components/reui/autocomplete.js +1 -1
  361. package/dist/components/reui/badge.d.ts +2 -2
  362. package/dist/components/reui/badge.js +10 -9
  363. package/dist/components/reui/badge.js.map +1 -1
  364. package/dist/components/reui/data-grid/data-grid-column-filter.js +2 -2
  365. package/dist/components/reui/data-grid/data-grid-column-header.js +1 -1
  366. package/dist/components/reui/data-grid/data-grid-pagination.js +1 -1
  367. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +1 -1
  368. package/dist/components/reui/data-grid/data-grid-table-dnd.js +22 -20
  369. package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -1
  370. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts +1 -1
  371. package/dist/components/reui/data-grid/data-grid-table-virtual.js +1 -1
  372. package/dist/components/reui/data-grid/data-grid-table.js +5 -3
  373. package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
  374. package/dist/components/reui/date-selector.js +2 -2
  375. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +3 -2
  376. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -1
  377. package/dist/components/reui/event-calendar/event-calendar-content.js +8 -7
  378. package/dist/components/reui/event-calendar/event-calendar-content.js.map +1 -1
  379. package/dist/components/reui/event-calendar/event-calendar-dnd.js +7 -4
  380. package/dist/components/reui/event-calendar/event-calendar-dnd.js.map +1 -1
  381. package/dist/components/reui/event-calendar/event-calendar-event.js +50 -48
  382. package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -1
  383. package/dist/components/reui/event-calendar/event-calendar-lib.js +3 -2
  384. package/dist/components/reui/event-calendar/event-calendar-lib.js.map +1 -1
  385. package/dist/components/reui/event-calendar/event-calendar-month-view.js +1 -1
  386. package/dist/components/reui/event-calendar/event-calendar-nav.js +38 -32
  387. package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -1
  388. package/dist/components/reui/event-calendar/event-calendar-time-grid.js +2 -1
  389. package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -1
  390. package/dist/components/reui/event-calendar/event-calendar.js +2 -1
  391. package/dist/components/reui/event-calendar/event-calendar.js.map +1 -1
  392. package/dist/components/reui/filters.js +6 -4
  393. package/dist/components/reui/filters.js.map +1 -1
  394. package/dist/components/reui/frame.d.ts +1 -1
  395. package/dist/components/reui/gantt/gantt-bar.js +53 -52
  396. package/dist/components/reui/gantt/gantt-bar.js.map +1 -1
  397. package/dist/components/reui/gantt/gantt-lib.js +3 -2
  398. package/dist/components/reui/gantt/gantt-lib.js.map +1 -1
  399. package/dist/components/reui/gantt/gantt-nav.js +35 -31
  400. package/dist/components/reui/gantt/gantt-nav.js.map +1 -1
  401. package/dist/components/reui/gantt/gantt-recurrence.js +2 -2
  402. package/dist/components/reui/gantt/gantt-recurrence.js.map +1 -1
  403. package/dist/components/reui/gantt/gantt-view.js +177 -173
  404. package/dist/components/reui/gantt/gantt-view.js.map +1 -1
  405. package/dist/components/reui/icon-tile.d.ts +1 -1
  406. package/dist/components/reui/icon-tile.js +12 -11
  407. package/dist/components/reui/icon-tile.js.map +1 -1
  408. package/dist/components/reui/kanban.js +42 -37
  409. package/dist/components/reui/kanban.js.map +1 -1
  410. package/dist/components/reui/number-field.js +1 -1
  411. package/dist/components/reui/phone-input.js +2 -2
  412. package/dist/components/reui/rating.js +1 -1
  413. package/dist/components/reui/sortable.js +10 -9
  414. package/dist/components/reui/sortable.js.map +1 -1
  415. package/dist/components/reui/stepper.js +16 -16
  416. package/dist/components/reui/stepper.js.map +1 -1
  417. package/dist/components/reui/timeline.js +45 -38
  418. package/dist/components/reui/timeline.js.map +1 -1
  419. package/dist/components/reui/tree.js +3 -2
  420. package/dist/components/reui/tree.js.map +1 -1
  421. package/dist/components/ui/accordion.js +1 -1
  422. package/dist/components/ui/alert-dialog.js +1 -1
  423. package/dist/components/ui/attachment.d.ts +2 -2
  424. package/dist/components/ui/badge.d.ts +1 -1
  425. package/dist/components/ui/breadcrumb.js +1 -1
  426. package/dist/components/ui/bubble.d.ts +1 -1
  427. package/dist/components/ui/button-group.d.ts +1 -1
  428. package/dist/components/ui/button.d.ts +3 -3
  429. package/dist/components/ui/button.js +1 -1
  430. package/dist/components/ui/calendar.js +1 -1
  431. package/dist/components/ui/carousel.js +1 -1
  432. package/dist/components/ui/checkbox.js +1 -1
  433. package/dist/components/ui/combobox.js +1 -1
  434. package/dist/components/ui/command.js +1 -1
  435. package/dist/components/ui/context-menu.js +1 -1
  436. package/dist/components/ui/dialog.js +1 -1
  437. package/dist/components/ui/dropdown-menu.js +1 -1
  438. package/dist/components/ui/empty.d.ts +1 -1
  439. package/dist/components/ui/field.d.ts +1 -1
  440. package/dist/components/ui/input-otp.js +1 -1
  441. package/dist/components/ui/item.d.ts +1 -1
  442. package/dist/components/ui/marker.d.ts +1 -1
  443. package/dist/components/ui/menubar.js +1 -1
  444. package/dist/components/ui/message-scroller.js +1 -1
  445. package/dist/components/ui/native-select.js +1 -1
  446. package/dist/components/ui/navigation-menu.js +1 -1
  447. package/dist/components/ui/pagination.js +1 -1
  448. package/dist/components/ui/select.js +1 -1
  449. package/dist/components/ui/sheet.js +1 -1
  450. package/dist/components/ui/sidebar.js +2 -2
  451. package/dist/components/ui/sidebar.js.map +1 -1
  452. package/dist/components/ui/sonner.js +1 -1
  453. package/dist/components/ui/spinner.js +1 -1
  454. package/dist/components/ui/toast.js +1 -1
  455. package/dist/copy-menu-BJ-MXnkN.js +201 -0
  456. package/dist/copy-menu-BJ-MXnkN.js.map +1 -0
  457. package/dist/hooks/use-hover-capable.d.ts +10 -0
  458. package/dist/hooks/use-hover-capable.d.ts.map +1 -0
  459. package/dist/hooks/use-hover-capable.js +24 -0
  460. package/dist/hooks/use-hover-capable.js.map +1 -0
  461. package/dist/hooks/use-mobile.js +1 -1
  462. package/dist/hooks/use-mobile.js.map +1 -1
  463. package/dist/hooks/use-slider.d.ts +58 -0
  464. package/dist/hooks/use-slider.d.ts.map +1 -0
  465. package/dist/hooks/use-slider.js +133 -0
  466. package/dist/hooks/use-slider.js.map +1 -0
  467. package/dist/lib/ease.d.ts +50 -0
  468. package/dist/lib/ease.d.ts.map +1 -0
  469. package/dist/lib/ease.js +66 -0
  470. package/dist/lib/ease.js.map +1 -0
  471. package/dist/lib/tick-sound.d.ts +17 -0
  472. package/dist/lib/tick-sound.d.ts.map +1 -0
  473. package/dist/lib/tick-sound.js +120 -0
  474. package/dist/lib/tick-sound.js.map +1 -0
  475. package/dist/popover-position-BUqYCq8X.js +54 -0
  476. package/dist/popover-position-BUqYCq8X.js.map +1 -0
  477. package/dist/types-Bah5NY44.d.ts +81 -0
  478. package/dist/types-Bah5NY44.d.ts.map +1 -0
  479. package/dist/types-smkWN_7x.d.ts +20 -0
  480. package/dist/types-smkWN_7x.d.ts.map +1 -0
  481. package/dist/utils-DQ7OpbYQ.js +25 -0
  482. package/dist/utils-DQ7OpbYQ.js.map +1 -0
  483. package/package.json +17 -6
@@ -0,0 +1,146 @@
1
+ "use client";
2
+ import { EASE_OUT, SPRING_LAYOUT, SPRING_PRESS } from "../../lib/ease.js";
3
+ import { useEffect, useLayoutEffect, useRef, useState } from "react";
4
+ import { cn } from "@kumix/utils";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { animate, motion, useMotionValue, useReducedMotion, useTransform } from "motion/react";
7
+ //#region src/components/motion/slide-action-button.tsx
8
+ function SlideActionButton({ children, completeLabel = "Complete", threshold = .82, resetDelay = 1200, onComplete, thumbClassName, fillClassName, className, ...rest }) {
9
+ const reduce = useReducedMotion();
10
+ const trackRef = useRef(null);
11
+ const thumbRef = useRef(null);
12
+ const resetTimerRef = useRef(null);
13
+ const completedRef = useRef(false);
14
+ const x = useMotionValue(0);
15
+ const [maxDistance, setMaxDistance] = useState(0);
16
+ const [completed, setCompleted] = useState(false);
17
+ const safeDistance = Math.max(maxDistance, 1);
18
+ const dragProgress = useTransform(x, [0, safeDistance], [0, 1]);
19
+ const fillProgress = useTransform(x, [0, safeDistance], [0, 1]);
20
+ const labelOpacity = useTransform(x, [
21
+ 0,
22
+ safeDistance * .35,
23
+ safeDistance * .65
24
+ ], [
25
+ 1,
26
+ .75,
27
+ 0
28
+ ]);
29
+ const iconPath = useTransform(dragProgress, [
30
+ 0,
31
+ .5,
32
+ 1
33
+ ], [
34
+ "M 8 5 L 15 12 L 8 19",
35
+ "M 7 8 L 12 14 L 17 10",
36
+ "M 5 12 L 10 17 L 19 7"
37
+ ]);
38
+ useLayoutEffect(() => {
39
+ const track = trackRef.current;
40
+ const thumb = thumbRef.current;
41
+ if (!track || !thumb) return;
42
+ const measure = () => {
43
+ setMaxDistance(Math.max(track.clientWidth - thumb.clientWidth - 8, 0));
44
+ };
45
+ measure();
46
+ const observer = new ResizeObserver(measure);
47
+ observer.observe(track);
48
+ observer.observe(thumb);
49
+ return () => observer.disconnect();
50
+ }, []);
51
+ useEffect(() => () => {
52
+ if (resetTimerRef.current) clearTimeout(resetTimerRef.current);
53
+ }, []);
54
+ const moveTo = (target) => {
55
+ if (reduce) {
56
+ x.set(target);
57
+ return;
58
+ }
59
+ animate(x, target, SPRING_LAYOUT);
60
+ };
61
+ const reset = () => {
62
+ completedRef.current = false;
63
+ setCompleted(false);
64
+ moveTo(0);
65
+ };
66
+ const complete = () => {
67
+ if (completedRef.current || maxDistance === 0) return;
68
+ completedRef.current = true;
69
+ setCompleted(true);
70
+ moveTo(maxDistance);
71
+ onComplete?.();
72
+ if (resetTimerRef.current) clearTimeout(resetTimerRef.current);
73
+ resetTimerRef.current = setTimeout(reset, resetDelay);
74
+ };
75
+ const handleKeyDown = (event) => {
76
+ if (event.key !== "Enter" && event.key !== " ") return;
77
+ event.preventDefault();
78
+ complete();
79
+ };
80
+ return /* @__PURE__ */ jsxs("div", {
81
+ ref: trackRef,
82
+ className: cn("relative h-16 w-72 overflow-hidden rounded-[22px] bg-primary/10 p-1", "ring-1 ring-primary/10", className),
83
+ ...rest,
84
+ children: [
85
+ /* @__PURE__ */ jsx(motion.span, {
86
+ "aria-hidden": "true",
87
+ style: { scaleX: fillProgress },
88
+ className: cn("absolute inset-0 origin-left bg-primary will-change-transform", fillClassName)
89
+ }),
90
+ /* @__PURE__ */ jsx(motion.span, {
91
+ "aria-hidden": "true",
92
+ style: { opacity: labelOpacity },
93
+ className: "pointer-events-none absolute inset-0 grid place-items-center pl-10 font-medium text-foreground text-sm",
94
+ children
95
+ }),
96
+ /* @__PURE__ */ jsx(motion.span, {
97
+ "aria-live": "polite",
98
+ animate: { opacity: completed ? 1 : 0 },
99
+ transition: {
100
+ duration: reduce ? 0 : .15,
101
+ ease: EASE_OUT
102
+ },
103
+ className: "pointer-events-none absolute inset-0 grid place-items-center font-medium text-primary-foreground text-sm",
104
+ children: completed ? completeLabel : null
105
+ }),
106
+ /* @__PURE__ */ jsx(motion.button, {
107
+ ref: thumbRef,
108
+ type: "button",
109
+ "aria-label": typeof children === "string" ? children : "Slide action",
110
+ drag: completed ? false : "x",
111
+ dragConstraints: {
112
+ left: 0,
113
+ right: maxDistance
114
+ },
115
+ dragElastic: 0,
116
+ dragMomentum: false,
117
+ style: { x },
118
+ onDragEnd: () => {
119
+ if (x.get() >= maxDistance * threshold) complete();
120
+ else moveTo(0);
121
+ },
122
+ onKeyDown: handleKeyDown,
123
+ whileTap: reduce || completed ? void 0 : { scale: .94 },
124
+ transition: SPRING_PRESS,
125
+ className: cn("relative z-10 grid size-14 cursor-grab touch-none place-items-center rounded-[18px] bg-primary text-primary-foreground shadow-sm", "outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background active:cursor-grabbing", completed && "cursor-default bg-background text-foreground", thumbClassName),
126
+ children: /* @__PURE__ */ jsx(motion.svg, {
127
+ viewBox: "0 0 24 24",
128
+ "aria-hidden": "true",
129
+ className: "size-5",
130
+ children: /* @__PURE__ */ jsx(motion.path, {
131
+ d: iconPath,
132
+ fill: "none",
133
+ stroke: "currentColor",
134
+ strokeLinecap: "round",
135
+ strokeLinejoin: "round",
136
+ strokeWidth: "2"
137
+ })
138
+ })
139
+ })
140
+ ]
141
+ });
142
+ }
143
+ //#endregion
144
+ export { SlideActionButton };
145
+
146
+ //# sourceMappingURL=slide-action-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slide-action-button.js","names":[],"sources":["../../../src/components/motion/slide-action-button.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\nimport { animate, motion, useMotionValue, useReducedMotion, useTransform } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT, SPRING_LAYOUT, SPRING_PRESS } from \"../../lib/ease\";\n\nexport interface SlideActionButtonProps extends Omit<HTMLAttributes<HTMLDivElement>, \"children\"> {\n children: ReactNode;\n completeLabel?: ReactNode;\n threshold?: number;\n resetDelay?: number;\n onComplete?: () => void;\n thumbClassName?: string;\n fillClassName?: string;\n}\n\nexport function SlideActionButton({\n children,\n completeLabel = \"Complete\",\n threshold = 0.82,\n resetDelay = 1200,\n onComplete,\n thumbClassName,\n fillClassName,\n className,\n ...rest\n}: SlideActionButtonProps) {\n const reduce = useReducedMotion();\n const trackRef = useRef<HTMLDivElement>(null);\n const thumbRef = useRef<HTMLButtonElement>(null);\n const resetTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const completedRef = useRef(false);\n const x = useMotionValue(0);\n const [maxDistance, setMaxDistance] = useState(0);\n const [completed, setCompleted] = useState(false);\n const safeDistance = Math.max(maxDistance, 1);\n const dragProgress = useTransform(x, [0, safeDistance], [0, 1]);\n const fillProgress = useTransform(x, [0, safeDistance], [0, 1]);\n const labelOpacity = useTransform(x, [0, safeDistance * 0.35, safeDistance * 0.65], [1, 0.75, 0]);\n const iconPath = useTransform(\n dragProgress,\n [0, 0.5, 1],\n [\"M 8 5 L 15 12 L 8 19\", \"M 7 8 L 12 14 L 17 10\", \"M 5 12 L 10 17 L 19 7\"],\n );\n\n useLayoutEffect(() => {\n const track = trackRef.current;\n const thumb = thumbRef.current;\n if (!track || !thumb) return;\n\n const measure = () => {\n setMaxDistance(Math.max(track.clientWidth - thumb.clientWidth - 8, 0));\n };\n\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(track);\n observer.observe(thumb);\n return () => observer.disconnect();\n }, []);\n\n useEffect(\n () => () => {\n if (resetTimerRef.current) clearTimeout(resetTimerRef.current);\n },\n [],\n );\n\n const moveTo = (target: number) => {\n if (reduce) {\n x.set(target);\n return;\n }\n animate(x, target, SPRING_LAYOUT);\n };\n\n const reset = () => {\n completedRef.current = false;\n setCompleted(false);\n moveTo(0);\n };\n\n const complete = () => {\n if (completedRef.current || maxDistance === 0) return;\n completedRef.current = true;\n setCompleted(true);\n moveTo(maxDistance);\n onComplete?.();\n\n if (resetTimerRef.current) clearTimeout(resetTimerRef.current);\n resetTimerRef.current = setTimeout(reset, resetDelay);\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLButtonElement>) => {\n if (event.key !== \"Enter\" && event.key !== \" \") return;\n event.preventDefault();\n complete();\n };\n\n return (\n <div\n ref={trackRef}\n className={cn(\n \"relative h-16 w-72 overflow-hidden rounded-[22px] bg-primary/10 p-1\",\n \"ring-1 ring-primary/10\",\n className,\n )}\n {...rest}\n >\n <motion.span\n aria-hidden=\"true\"\n style={{ scaleX: fillProgress }}\n className={cn(\n \"absolute inset-0 origin-left bg-primary will-change-transform\",\n fillClassName,\n )}\n />\n\n <motion.span\n aria-hidden=\"true\"\n style={{ opacity: labelOpacity }}\n className=\"pointer-events-none absolute inset-0 grid place-items-center pl-10 font-medium text-foreground text-sm\"\n >\n {children}\n </motion.span>\n\n <motion.span\n aria-live=\"polite\"\n animate={{ opacity: completed ? 1 : 0 }}\n transition={{ duration: reduce ? 0 : 0.15, ease: EASE_OUT }}\n className=\"pointer-events-none absolute inset-0 grid place-items-center font-medium text-primary-foreground text-sm\"\n >\n {completed ? completeLabel : null}\n </motion.span>\n\n <motion.button\n ref={thumbRef}\n type=\"button\"\n aria-label={typeof children === \"string\" ? children : \"Slide action\"}\n drag={completed ? false : \"x\"}\n dragConstraints={{ left: 0, right: maxDistance }}\n dragElastic={0}\n dragMomentum={false}\n style={{ x }}\n onDragEnd={() => {\n if (x.get() >= maxDistance * threshold) complete();\n else moveTo(0);\n }}\n onKeyDown={handleKeyDown}\n whileTap={reduce || completed ? undefined : { scale: 0.94 }}\n transition={SPRING_PRESS}\n className={cn(\n \"relative z-10 grid size-14 cursor-grab touch-none place-items-center rounded-[18px] bg-primary text-primary-foreground shadow-sm\",\n \"outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background active:cursor-grabbing\",\n completed && \"cursor-default bg-background text-foreground\",\n thumbClassName,\n )}\n >\n <motion.svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" className=\"size-5\">\n <motion.path\n d={iconPath}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n />\n </motion.svg>\n </motion.button>\n </div>\n );\n}\n"],"mappings":";;;;;;;AA0BA,SAAgB,kBAAkB,EAChC,UACA,gBAAgB,YAChB,YAAY,KACZ,aAAa,MACb,YACA,gBACA,eACA,WACA,GAAG,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IACA,wJACA,aAAa,gDACb,cACF;IAEA,UAAA,oBAAC,OAAO,KAAR;KAAY,SAAQ;KAAY,eAAY;KAAO,WAAU;KAC3D,UAAA,oBAAC,OAAO,MAAR;MACE,GAAG;MACH,MAAK;MACL,QAAO;MACP,eAAc;MACd,gBAAe;MACf,aAAY;KACb,CAAA;IACS,CAAA;GACC,CAAA;EACZ;;AAET"}
@@ -0,0 +1,47 @@
1
+ import { ReactNode } from "react";
2
+ import { MotionValue } from "motion/react";
3
+ import Lenis from "lenis";
4
+ //#region src/components/motion/smooth-scroll.d.ts
5
+ type ScrollTarget = number | string | HTMLElement;
6
+ type ScrollToOptions = {
7
+ offset?: number;
8
+ immediate?: boolean;
9
+ duration?: number;
10
+ };
11
+ type SmoothScrollApi = {
12
+ /** Underlying Lenis instance, or null on the reduced-motion / native path. */
13
+ lenis: Lenis | null;
14
+ /** Current scroll offset in px. */
15
+ scrollY: MotionValue<number>;
16
+ /** Scroll position as 0..1 of the scrollable height. */
17
+ progress: MotionValue<number>;
18
+ /** Signed scroll velocity (px/frame); drives velocity-based effects. */
19
+ velocity: MotionValue<number>;
20
+ /** Programmatic smooth scroll. Respects reduced motion (jumps instantly). */
21
+ scrollTo: (target: ScrollTarget, options?: ScrollToOptions) => void;
22
+ };
23
+ interface SmoothScrollProps {
24
+ children: ReactNode;
25
+ /** Drive the page (window) when true, or a contained scroll area when false. */
26
+ root?: boolean;
27
+ /** Smoothing factor; lower is smoother and heavier. */
28
+ lerp?: number;
29
+ /** Wheel / programmatic ease duration in seconds. */
30
+ duration?: number;
31
+ orientation?: "vertical" | "horizontal";
32
+ /** Wheel scroll speed multiplier. */
33
+ wheelMultiplier?: number;
34
+ /** Smooth touch scrolling. Off by default — native momentum is good on mobile. */
35
+ touch?: boolean;
36
+ className?: string;
37
+ }
38
+ declare function SmoothScroll({ children, root, lerp, duration, orientation, wheelMultiplier, touch, className }: SmoothScrollProps): import("react").JSX.Element;
39
+ /**
40
+ * Read the page's smooth-scroll state. Inside <SmoothScroll> it returns the
41
+ * shared motion values; outside it falls back to a native window scroll
42
+ * listener so scroll-driven components still work without the provider.
43
+ */
44
+ declare function useSmoothScroll(): SmoothScrollApi;
45
+ //#endregion
46
+ export { ScrollTarget, ScrollToOptions, SmoothScroll, SmoothScrollApi, SmoothScrollProps, useSmoothScroll };
47
+ //# sourceMappingURL=smooth-scroll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smooth-scroll.d.ts","names":[],"sources":["../../../src/components/motion/smooth-scroll.tsx"],"mappings":";;;;KAoBY,iCAAiC;KAEjC;EACV;EACA;EACA;;KAGU;;EAEV,OAAO;;EAEP,SAAS;;EAET,UAAU;;EAEV,UAAU;;EAEV,WAAW,QAAQ,cAAc,UAAU;;UAK5B;EACf,UAAU;;EAEV;;EAEA;;EAEA;EACA;;EAEA;;EAEA;EACA;;iBAoFc,eACd,UACA,MACA,MACA,UACA,aACA,iBACA,OACA,aACC,oCAAiB,IAAA;;;;;;iBAmFJ,mBAAmB"}
@@ -0,0 +1,182 @@
1
+ "use client";
2
+ import { createContext, useCallback, useContext, useEffect, useMemo, useRef } from "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { useMotionValue, useReducedMotion } from "motion/react";
5
+ import { ReactLenis, useLenis } from "lenis/react";
6
+ //#region src/components/motion/smooth-scroll.tsx
7
+ const EASE_SCROLL = (t) => Math.min(1, 1.001 - 2 ** (-10 * t));
8
+ const SmoothScrollContext = createContext(null);
9
+ function readMetrics(target) {
10
+ if (target instanceof Window) {
11
+ const max = Math.max(0, document.documentElement.scrollHeight - window.innerHeight);
12
+ return {
13
+ y: window.scrollY,
14
+ max
15
+ };
16
+ }
17
+ return {
18
+ y: target.scrollTop,
19
+ max: Math.max(0, target.scrollHeight - target.clientHeight)
20
+ };
21
+ }
22
+ function resolveTop(target, source, offset = 0) {
23
+ if (typeof target === "number") return target + offset;
24
+ if (source instanceof Window) {
25
+ const el = typeof target === "string" ? document.querySelector(target) : target;
26
+ if (!el) return window.scrollY;
27
+ return el.getBoundingClientRect().top + window.scrollY + offset;
28
+ }
29
+ const el = typeof target === "string" ? source.querySelector(target) : target;
30
+ if (!(el instanceof HTMLElement)) return source.scrollTop;
31
+ return el.offsetTop + offset;
32
+ }
33
+ /** Pushes Lenis' live scroll state into the shared motion values. */
34
+ function LenisBridge({ scrollY, progress, velocity, lenisRef }) {
35
+ const lenis = useLenis((instance) => {
36
+ scrollY.set(instance.scroll);
37
+ progress.set(instance.progress);
38
+ velocity.set(instance.velocity);
39
+ });
40
+ useEffect(() => {
41
+ lenisRef.current = lenis ?? null;
42
+ return () => {
43
+ lenisRef.current = null;
44
+ };
45
+ }, [lenis, lenisRef]);
46
+ return null;
47
+ }
48
+ /** Native scroll listener for the reduced-motion path and the no-provider fallback. */
49
+ function useNativeScrollSync(enabled, getTarget, scrollY, progress, velocity) {
50
+ useEffect(() => {
51
+ if (!enabled) return;
52
+ const target = getTarget();
53
+ if (!target) return;
54
+ let lastY = readMetrics(target).y;
55
+ let lastT = performance.now();
56
+ const onScroll = () => {
57
+ const { y, max } = readMetrics(target);
58
+ const now = performance.now();
59
+ const dt = now - lastT || 16;
60
+ scrollY.set(y);
61
+ progress.set(max > 0 ? y / max : 0);
62
+ velocity.set((y - lastY) / dt * 16);
63
+ lastY = y;
64
+ lastT = now;
65
+ };
66
+ onScroll();
67
+ target.addEventListener("scroll", onScroll, { passive: true });
68
+ return () => target.removeEventListener("scroll", onScroll);
69
+ }, [
70
+ enabled,
71
+ getTarget,
72
+ scrollY,
73
+ progress,
74
+ velocity
75
+ ]);
76
+ }
77
+ function SmoothScroll({ children, root = true, lerp = .1, duration = 1.2, orientation = "vertical", wheelMultiplier = 1, touch = false, className }) {
78
+ const reduce = useReducedMotion();
79
+ const scrollY = useMotionValue(0);
80
+ const progress = useMotionValue(0);
81
+ const velocity = useMotionValue(0);
82
+ const lenisRef = useRef(null);
83
+ const containerRef = useRef(null);
84
+ const nativeSource = useCallback(() => root ? window : containerRef.current, [root]);
85
+ const scrollTo = useCallback((target, options) => {
86
+ const lenis = lenisRef.current;
87
+ if (lenis && !reduce) {
88
+ lenis.scrollTo(target, {
89
+ offset: options?.offset,
90
+ duration: options?.duration,
91
+ immediate: options?.immediate
92
+ });
93
+ return;
94
+ }
95
+ const source = nativeSource();
96
+ const behavior = reduce || options?.immediate ? "auto" : "smooth";
97
+ const top = resolveTop(target, source ?? window, options?.offset);
98
+ (source ?? window).scrollTo({
99
+ top,
100
+ behavior
101
+ });
102
+ }, [reduce, nativeSource]);
103
+ useNativeScrollSync(!!reduce, nativeSource, scrollY, progress, velocity);
104
+ const api = useMemo(() => ({
105
+ lenis: lenisRef.current,
106
+ scrollY,
107
+ progress,
108
+ velocity,
109
+ scrollTo
110
+ }), [
111
+ scrollY,
112
+ progress,
113
+ velocity,
114
+ scrollTo
115
+ ]);
116
+ if (reduce) return /* @__PURE__ */ jsx(SmoothScrollContext.Provider, {
117
+ value: api,
118
+ children: /* @__PURE__ */ jsx("div", {
119
+ ref: containerRef,
120
+ className,
121
+ children
122
+ })
123
+ });
124
+ return /* @__PURE__ */ jsx(SmoothScrollContext.Provider, {
125
+ value: api,
126
+ children: /* @__PURE__ */ jsxs(ReactLenis, {
127
+ root,
128
+ className,
129
+ options: {
130
+ lerp,
131
+ duration,
132
+ orientation,
133
+ wheelMultiplier,
134
+ smoothWheel: true,
135
+ syncTouch: touch,
136
+ easing: EASE_SCROLL
137
+ },
138
+ children: [/* @__PURE__ */ jsx(LenisBridge, {
139
+ scrollY,
140
+ progress,
141
+ velocity,
142
+ lenisRef
143
+ }), children]
144
+ })
145
+ });
146
+ }
147
+ /**
148
+ * Read the page's smooth-scroll state. Inside <SmoothScroll> it returns the
149
+ * shared motion values; outside it falls back to a native window scroll
150
+ * listener so scroll-driven components still work without the provider.
151
+ */
152
+ function useSmoothScroll() {
153
+ const ctx = useContext(SmoothScrollContext);
154
+ const scrollY = useMotionValue(0);
155
+ const progress = useMotionValue(0);
156
+ const velocity = useMotionValue(0);
157
+ const windowSource = useCallback(() => window, []);
158
+ useNativeScrollSync(ctx === null, windowSource, scrollY, progress, velocity);
159
+ const scrollTo = useCallback((target, options) => {
160
+ window.scrollTo({
161
+ top: resolveTop(target, window, options?.offset),
162
+ behavior: options?.immediate ? "auto" : "smooth"
163
+ });
164
+ }, []);
165
+ const fallback = useMemo(() => ({
166
+ lenis: null,
167
+ scrollY,
168
+ progress,
169
+ velocity,
170
+ scrollTo
171
+ }), [
172
+ scrollY,
173
+ progress,
174
+ velocity,
175
+ scrollTo
176
+ ]);
177
+ return ctx ?? fallback;
178
+ }
179
+ //#endregion
180
+ export { SmoothScroll, useSmoothScroll };
181
+
182
+ //# sourceMappingURL=smooth-scroll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smooth-scroll.js","names":[],"sources":["../../../src/components/motion/smooth-scroll.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n} from \"react\";\nimport type Lenis from \"lenis\";\nimport { ReactLenis, useLenis } from \"lenis/react\";\nimport { type MotionValue, useMotionValue, useReducedMotion } from \"motion/react\";\n\n// Lenis' own expo-out curve — the canonical smooth-scroll easing. Kept as a\n// named local fn (not a lib/ease token) because tokens are bezier control\n// points for the motion lib, while Lenis needs a (t) => number easing fn.\nconst EASE_SCROLL = (t: number) => Math.min(1, 1.001 - 2 ** (-10 * t));\n\nexport type ScrollTarget = number | string | HTMLElement;\n\nexport type ScrollToOptions = {\n offset?: number;\n immediate?: boolean;\n duration?: number;\n};\n\nexport type SmoothScrollApi = {\n /** Underlying Lenis instance, or null on the reduced-motion / native path. */\n lenis: Lenis | null;\n /** Current scroll offset in px. */\n scrollY: MotionValue<number>;\n /** Scroll position as 0..1 of the scrollable height. */\n progress: MotionValue<number>;\n /** Signed scroll velocity (px/frame); drives velocity-based effects. */\n velocity: MotionValue<number>;\n /** Programmatic smooth scroll. Respects reduced motion (jumps instantly). */\n scrollTo: (target: ScrollTarget, options?: ScrollToOptions) => void;\n};\n\nconst SmoothScrollContext = createContext<SmoothScrollApi | null>(null);\n\nexport interface SmoothScrollProps {\n children: ReactNode;\n /** Drive the page (window) when true, or a contained scroll area when false. */\n root?: boolean;\n /** Smoothing factor; lower is smoother and heavier. */\n lerp?: number;\n /** Wheel / programmatic ease duration in seconds. */\n duration?: number;\n orientation?: \"vertical\" | \"horizontal\";\n /** Wheel scroll speed multiplier. */\n wheelMultiplier?: number;\n /** Smooth touch scrolling. Off by default — native momentum is good on mobile. */\n touch?: boolean;\n className?: string;\n}\n\ntype ScrollSource = Window | HTMLElement;\n\nfunction readMetrics(target: ScrollSource) {\n if (target instanceof Window) {\n const max = Math.max(0, document.documentElement.scrollHeight - window.innerHeight);\n return { y: window.scrollY, max };\n }\n return {\n y: target.scrollTop,\n max: Math.max(0, target.scrollHeight - target.clientHeight),\n };\n}\n\nfunction resolveTop(target: ScrollTarget, source: ScrollSource, offset = 0): number {\n if (typeof target === \"number\") return target + offset;\n if (source instanceof Window) {\n const el = typeof target === \"string\" ? document.querySelector(target) : target;\n if (!el) return window.scrollY;\n return el.getBoundingClientRect().top + window.scrollY + offset;\n }\n const el = typeof target === \"string\" ? source.querySelector(target) : target;\n if (!(el instanceof HTMLElement)) return source.scrollTop;\n return el.offsetTop + offset;\n}\n\n/** Pushes Lenis' live scroll state into the shared motion values. */\nfunction LenisBridge({\n scrollY,\n progress,\n velocity,\n lenisRef,\n}: {\n scrollY: MotionValue<number>;\n progress: MotionValue<number>;\n velocity: MotionValue<number>;\n lenisRef: { current: Lenis | null };\n}) {\n const lenis = useLenis((instance) => {\n scrollY.set(instance.scroll);\n progress.set(instance.progress);\n velocity.set(instance.velocity);\n });\n useEffect(() => {\n lenisRef.current = lenis ?? null;\n return () => {\n lenisRef.current = null;\n };\n }, [lenis, lenisRef]);\n return null;\n}\n\n/** Native scroll listener for the reduced-motion path and the no-provider fallback. */\nfunction useNativeScrollSync(\n enabled: boolean,\n getTarget: () => ScrollSource | null,\n scrollY: MotionValue<number>,\n progress: MotionValue<number>,\n velocity: MotionValue<number>,\n) {\n useEffect(() => {\n if (!enabled) return;\n const target = getTarget();\n if (!target) return;\n let lastY = readMetrics(target).y;\n let lastT = performance.now();\n const onScroll = () => {\n const { y, max } = readMetrics(target);\n const now = performance.now();\n const dt = now - lastT || 16;\n scrollY.set(y);\n progress.set(max > 0 ? y / max : 0);\n velocity.set(((y - lastY) / dt) * 16);\n lastY = y;\n lastT = now;\n };\n onScroll();\n target.addEventListener(\"scroll\", onScroll, { passive: true });\n return () => target.removeEventListener(\"scroll\", onScroll);\n }, [enabled, getTarget, scrollY, progress, velocity]);\n}\n\nexport function SmoothScroll({\n children,\n root = true,\n lerp = 0.1,\n duration = 1.2,\n orientation = \"vertical\",\n wheelMultiplier = 1,\n touch = false,\n className,\n}: SmoothScrollProps) {\n const reduce = useReducedMotion();\n const scrollY = useMotionValue(0);\n const progress = useMotionValue(0);\n const velocity = useMotionValue(0);\n const lenisRef = useRef<Lenis | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const nativeSource = useCallback(\n (): ScrollSource | null => (root ? window : containerRef.current),\n [root],\n );\n\n const scrollTo = useCallback(\n (target: ScrollTarget, options?: ScrollToOptions) => {\n const lenis = lenisRef.current;\n if (lenis && !reduce) {\n lenis.scrollTo(target, {\n offset: options?.offset,\n duration: options?.duration,\n immediate: options?.immediate,\n });\n return;\n }\n const source = nativeSource();\n const behavior = reduce || options?.immediate ? \"auto\" : \"smooth\";\n const top = resolveTop(target, source ?? window, options?.offset);\n (source ?? window).scrollTo({ top, behavior });\n },\n [reduce, nativeSource],\n );\n\n // Reduced motion drives the native listener; the Lenis path leaves it\n // disabled and lets LenisBridge feed the values instead.\n useNativeScrollSync(!!reduce, nativeSource, scrollY, progress, velocity);\n\n const api = useMemo<SmoothScrollApi>(\n () => ({ lenis: lenisRef.current, scrollY, progress, velocity, scrollTo }),\n [scrollY, progress, velocity, scrollTo],\n );\n\n if (reduce) {\n return (\n <SmoothScrollContext.Provider value={api}>\n <div ref={containerRef} className={className}>\n {children}\n </div>\n </SmoothScrollContext.Provider>\n );\n }\n\n return (\n <SmoothScrollContext.Provider value={api}>\n <ReactLenis\n root={root}\n className={className}\n options={{\n lerp,\n duration,\n orientation,\n wheelMultiplier,\n smoothWheel: true,\n syncTouch: touch,\n easing: EASE_SCROLL,\n }}\n >\n <LenisBridge\n scrollY={scrollY}\n progress={progress}\n velocity={velocity}\n lenisRef={lenisRef}\n />\n {children}\n </ReactLenis>\n </SmoothScrollContext.Provider>\n );\n}\n\n/**\n * Read the page's smooth-scroll state. Inside <SmoothScroll> it returns the\n * shared motion values; outside it falls back to a native window scroll\n * listener so scroll-driven components still work without the provider.\n */\nexport function useSmoothScroll(): SmoothScrollApi {\n const ctx = useContext(SmoothScrollContext);\n const scrollY = useMotionValue(0);\n const progress = useMotionValue(0);\n const velocity = useMotionValue(0);\n\n const windowSource = useCallback((): ScrollSource => window, []);\n useNativeScrollSync(ctx === null, windowSource, scrollY, progress, velocity);\n\n const scrollTo = useCallback((target: ScrollTarget, options?: ScrollToOptions) => {\n window.scrollTo({\n top: resolveTop(target, window, options?.offset),\n behavior: options?.immediate ? \"auto\" : \"smooth\",\n });\n }, []);\n\n const fallback = useMemo<SmoothScrollApi>(\n () => ({ lenis: null, scrollY, progress, velocity, scrollTo }),\n [scrollY, progress, velocity, scrollTo],\n );\n\n return ctx ?? fallback;\n}\n"],"mappings":";;;;;;AAkBA,MAAM,eAAe,MAAc,KAAK,IAAI,GAAG,QAAQ,MAAM,MAAM,EAAE;AAuBrE,MAAM,sBAAsB,cAAsC,IAAI;AAoBtE,SAAS,YAAY,QAAsB;CACzC,IAAI,kBAAkB,QAAQ;EAC5B,MAAM,MAAM,KAAK,IAAI,GAAG,SAAS,gBAAgB,eAAe,OAAO,WAAW;EAClF,OAAO;GAAE,GAAG,OAAO;GAAS;EAAI;CAClC;CACA,OAAO;EACL,GAAG,OAAO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GAAyB;GAChC;EACE,CAAA;CACuB,CAAA;CAIlC,OACE,oBAAC,oBAAoB,UAArB;EAA8B,OAAO;EACnC,UAAA,qBAAC,YAAD;GACQ;GACK;GACX,SAAS;IACP;IACA;IACA;IACA;IACA,aAAa;IACb,WAAW;IACX,QAAQ;GACV;GAXF,UAAA,CAaE,oBAAC,aAAD;IACW;IACC;IACA;IACA;GACX,CAAA,GACA,QACS;;CACgB,CAAA;AAElC;;;;;;AAOA,SAAgB,kBAAmC;CACjD,MAAM,MAAM,WAAW,mBAAmB;CAC1C,MAAM,UAAU,eAAe,CAAC;CAChC,MAAM,WAAW,eAAe,CAAC;CACjC,MAAM,WAAW,eAAe,CAAC;CAEjC,MAAM,eAAe,kBAAgC,QAAQ,CAAC,CAAC;CAC/D,oBAAoB,QAAQ,MAAM,cAAc,SAAS,UAAU,QAAQ;CAE3E,MAAM,WAAW,aAAa,QAAsB,YAA8B;EAChF,OAAO,SAAS;GACd,KAAK,WAAW,QAAQ,QAAQ,SAAS,MAAM;GAC/C,UAAU,SAAS,YAAY,SAAS;EAC1C,CAAC;CACH,GAAG,CAAC,CAAC;CAEL,MAAM,WAAW,eACR;EAAE,OAAO;EAAM;EAAS;EAAU;EAAU;CAAS,IAC5D;EAAC;EAAS;EAAU;EAAU;CAAQ,CACxC;CAEA,OAAO,OAAO;AAChB"}
@@ -0,0 +1,60 @@
1
+ import { ReactNode } from "react";
2
+ //#region src/components/motion/swipeable-list.d.ts
3
+ type SwipeSide = "left" | "right";
4
+ type SwipeableListValue = {
5
+ id: string;
6
+ side: SwipeSide;
7
+ };
8
+ type SwipeActionTone = "neutral" | "primary" | "success" | "warning" | "danger";
9
+ type SwipeAction = {
10
+ id: string;
11
+ label: ReactNode;
12
+ icon: ReactNode;
13
+ tone?: SwipeActionTone;
14
+ disabled?: boolean;
15
+ onClick?: (item: SwipeableListItem) => void;
16
+ };
17
+ type SwipeableListItem = {
18
+ id: string;
19
+ title?: ReactNode;
20
+ description?: ReactNode;
21
+ meta?: ReactNode;
22
+ leading?: ReactNode;
23
+ content?: ReactNode;
24
+ leftActions?: SwipeAction[];
25
+ rightActions?: SwipeAction[];
26
+ disabled?: boolean;
27
+ };
28
+ type SwipeableListClassNames = {
29
+ root?: string;
30
+ item?: string;
31
+ rail?: string;
32
+ action?: string;
33
+ surface?: string;
34
+ leading?: string;
35
+ content?: string;
36
+ title?: string;
37
+ description?: string;
38
+ meta?: string;
39
+ };
40
+ interface SwipeableListProps {
41
+ items: SwipeableListItem[];
42
+ value?: SwipeableListValue | null;
43
+ defaultValue?: SwipeableListValue | null;
44
+ onValueChange?: (value: SwipeableListValue | null) => void;
45
+ onAction?: (payload: {
46
+ item: SwipeableListItem;
47
+ action: SwipeAction;
48
+ side: SwipeSide;
49
+ }) => void;
50
+ actionWidth?: number;
51
+ revealThreshold?: number;
52
+ closeOnAction?: boolean;
53
+ className?: string;
54
+ classNames?: SwipeableListClassNames;
55
+ renderItem?: (item: SwipeableListItem) => ReactNode;
56
+ }
57
+ declare function SwipeableList({ items, value, defaultValue, onValueChange, onAction, actionWidth, revealThreshold, closeOnAction, className, classNames, renderItem }: SwipeableListProps): import("react").JSX.Element;
58
+ //#endregion
59
+ export { SwipeAction, SwipeActionTone, SwipeSide, SwipeableList, SwipeableListClassNames, SwipeableListItem, SwipeableListProps, SwipeableListValue };
60
+ //# sourceMappingURL=swipeable-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swipeable-list.d.ts","names":[],"sources":["../../../src/components/motion/swipeable-list.tsx"],"mappings":";;KAOY;KAEA;EACV;EACA,MAAM;;KAGI;KAEA;EACV;EACA,OAAO;EACP,MAAM;EACN,OAAO;EACP;EACA,WAAW,MAAM;;KAGP;EACV;EACA,QAAQ;EACR,cAAc;EACd,OAAO;EACP,UAAU;EACV,UAAU;EACV,cAAc;EACd,eAAe;EACf;;KAGU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf,OAAO;EACP,QAAQ;EACR,eAAe;EACf,iBAAiB,OAAO;EACxB,YAAY;IAAW,MAAM;IAAmB,QAAQ;IAAa,MAAM;;EAC3E;EACA;EACA;EACA;EACA,aAAa;EACb,cAAc,MAAM,sBAAsB;;iBAiV5B,gBACd,OACA,OACA,cACA,eACA,UACA,aACA,iBACA,eACA,WACA,YACA,cACC,qCAAkB,IAAA"}