kineto 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +279 -0
  3. package/base.css +46 -0
  4. package/dist/accordion.d.ts +13 -0
  5. package/dist/accordion.js +161 -0
  6. package/dist/accordion.js.map +1 -0
  7. package/dist/alert.d.ts +20 -0
  8. package/dist/alert.js +137 -0
  9. package/dist/alert.js.map +1 -0
  10. package/dist/animated-number.d.ts +16 -0
  11. package/dist/animated-number.js +40 -0
  12. package/dist/animated-number.js.map +1 -0
  13. package/dist/area-chart.d.ts +16 -0
  14. package/dist/area-chart.js +138 -0
  15. package/dist/area-chart.js.map +1 -0
  16. package/dist/aspect-ratio.d.ts +6 -0
  17. package/dist/aspect-ratio.js +9 -0
  18. package/dist/aspect-ratio.js.map +1 -0
  19. package/dist/avatar.d.ts +18 -0
  20. package/dist/avatar.js +202 -0
  21. package/dist/avatar.js.map +1 -0
  22. package/dist/badge.d.ts +14 -0
  23. package/dist/badge.js +54 -0
  24. package/dist/badge.js.map +1 -0
  25. package/dist/bar-chart.d.ts +19 -0
  26. package/dist/bar-chart.js +139 -0
  27. package/dist/bar-chart.js.map +1 -0
  28. package/dist/bento-grid.d.ts +24 -0
  29. package/dist/bento-grid.js +129 -0
  30. package/dist/bento-grid.js.map +1 -0
  31. package/dist/breadcrumbs.d.ts +13 -0
  32. package/dist/breadcrumbs.js +50 -0
  33. package/dist/breadcrumbs.js.map +1 -0
  34. package/dist/button-group.d.ts +9 -0
  35. package/dist/button-group.js +29 -0
  36. package/dist/button-group.js.map +1 -0
  37. package/dist/button.d.ts +16 -0
  38. package/dist/button.js +131 -0
  39. package/dist/button.js.map +1 -0
  40. package/dist/calendar.d.ts +11 -0
  41. package/dist/calendar.js +185 -0
  42. package/dist/calendar.js.map +1 -0
  43. package/dist/card.d.ts +15 -0
  44. package/dist/card.js +131 -0
  45. package/dist/card.js.map +1 -0
  46. package/dist/carousel.d.ts +14 -0
  47. package/dist/carousel.js +143 -0
  48. package/dist/carousel.js.map +1 -0
  49. package/dist/chart-tooltip.d.ts +18 -0
  50. package/dist/chart-tooltip.js +30 -0
  51. package/dist/chart-tooltip.js.map +1 -0
  52. package/dist/checkbox.d.ts +6 -0
  53. package/dist/checkbox.js +88 -0
  54. package/dist/checkbox.js.map +1 -0
  55. package/dist/cn.d.ts +10 -0
  56. package/dist/cn.js +10 -0
  57. package/dist/cn.js.map +1 -0
  58. package/dist/code-block.d.ts +25 -0
  59. package/dist/code-block.js +155 -0
  60. package/dist/code-block.js.map +1 -0
  61. package/dist/collapsible.d.ts +12 -0
  62. package/dist/collapsible.js +125 -0
  63. package/dist/collapsible.js.map +1 -0
  64. package/dist/color-picker.d.ts +12 -0
  65. package/dist/color-picker.js +180 -0
  66. package/dist/color-picker.js.map +1 -0
  67. package/dist/command.d.ts +88 -0
  68. package/dist/command.js +277 -0
  69. package/dist/command.js.map +1 -0
  70. package/dist/confetti.d.ts +25 -0
  71. package/dist/confetti.js +109 -0
  72. package/dist/confetti.js.map +1 -0
  73. package/dist/container.d.ts +19 -0
  74. package/dist/container.js +41 -0
  75. package/dist/container.js.map +1 -0
  76. package/dist/content-divider.d.ts +7 -0
  77. package/dist/content-divider.js +35 -0
  78. package/dist/content-divider.js.map +1 -0
  79. package/dist/context-menu.d.ts +30 -0
  80. package/dist/context-menu.js +213 -0
  81. package/dist/context-menu.js.map +1 -0
  82. package/dist/copy-button.d.ts +17 -0
  83. package/dist/copy-button.js +107 -0
  84. package/dist/copy-button.js.map +1 -0
  85. package/dist/dashboard-showcase.d.ts +7 -0
  86. package/dist/dashboard-showcase.js +2560 -0
  87. package/dist/dashboard-showcase.js.map +1 -0
  88. package/dist/data-table.d.ts +130 -0
  89. package/dist/data-table.js +1620 -0
  90. package/dist/data-table.js.map +1 -0
  91. package/dist/date-picker.d.ts +12 -0
  92. package/dist/date-picker.js +261 -0
  93. package/dist/date-picker.js.map +1 -0
  94. package/dist/dialog.d.ts +23 -0
  95. package/dist/dialog.js +188 -0
  96. package/dist/dialog.js.map +1 -0
  97. package/dist/dock.d.ts +17 -0
  98. package/dist/dock.js +77 -0
  99. package/dist/dock.js.map +1 -0
  100. package/dist/donut-chart.d.ts +18 -0
  101. package/dist/donut-chart.js +92 -0
  102. package/dist/donut-chart.js.map +1 -0
  103. package/dist/drawer.d.ts +26 -0
  104. package/dist/drawer.js +166 -0
  105. package/dist/drawer.js.map +1 -0
  106. package/dist/dropdown-menu.d.ts +22 -0
  107. package/dist/dropdown-menu.js +163 -0
  108. package/dist/dropdown-menu.js.map +1 -0
  109. package/dist/empty-state.d.ts +13 -0
  110. package/dist/empty-state.js +149 -0
  111. package/dist/empty-state.js.map +1 -0
  112. package/dist/featured-icon.d.ts +16 -0
  113. package/dist/featured-icon.js +56 -0
  114. package/dist/featured-icon.js.map +1 -0
  115. package/dist/file-uploader.d.ts +11 -0
  116. package/dist/file-uploader.js +212 -0
  117. package/dist/file-uploader.js.map +1 -0
  118. package/dist/flex.d.ts +30 -0
  119. package/dist/flex.js +89 -0
  120. package/dist/flex.js.map +1 -0
  121. package/dist/form.d.ts +28 -0
  122. package/dist/form.js +139 -0
  123. package/dist/form.js.map +1 -0
  124. package/dist/format-time.d.ts +18 -0
  125. package/dist/format-time.js +54 -0
  126. package/dist/format-time.js.map +1 -0
  127. package/dist/gap.d.ts +9 -0
  128. package/dist/gap.js +34 -0
  129. package/dist/gap.js.map +1 -0
  130. package/dist/gradient-border.d.ts +15 -0
  131. package/dist/gradient-border.js +79 -0
  132. package/dist/gradient-border.js.map +1 -0
  133. package/dist/gradient-text.d.ts +12 -0
  134. package/dist/gradient-text.js +43 -0
  135. package/dist/gradient-text.js.map +1 -0
  136. package/dist/grid.d.ts +25 -0
  137. package/dist/grid.js +77 -0
  138. package/dist/grid.js.map +1 -0
  139. package/dist/hover-card.d.ts +8 -0
  140. package/dist/hover-card.js +93 -0
  141. package/dist/hover-card.js.map +1 -0
  142. package/dist/index.d.ts +93 -0
  143. package/dist/index.js +93 -0
  144. package/dist/inline-edit.d.ts +20 -0
  145. package/dist/inline-edit.js +107 -0
  146. package/dist/inline-edit.js.map +1 -0
  147. package/dist/input.d.ts +6 -0
  148. package/dist/input.js +31 -0
  149. package/dist/input.js.map +1 -0
  150. package/dist/kbd.d.ts +16 -0
  151. package/dist/kbd.js +35 -0
  152. package/dist/kbd.js.map +1 -0
  153. package/dist/label.d.ts +6 -0
  154. package/dist/label.js +31 -0
  155. package/dist/label.js.map +1 -0
  156. package/dist/line-chart.d.ts +17 -0
  157. package/dist/line-chart.js +120 -0
  158. package/dist/line-chart.js.map +1 -0
  159. package/dist/logo-cloud.d.ts +14 -0
  160. package/dist/logo-cloud.js +106 -0
  161. package/dist/logo-cloud.js.map +1 -0
  162. package/dist/masonry.d.ts +15 -0
  163. package/dist/masonry.js +63 -0
  164. package/dist/masonry.js.map +1 -0
  165. package/dist/menubar.d.ts +31 -0
  166. package/dist/menubar.js +250 -0
  167. package/dist/menubar.js.map +1 -0
  168. package/dist/motion-presets.d.ts +70 -0
  169. package/dist/motion-presets.js +71 -0
  170. package/dist/motion-presets.js.map +1 -0
  171. package/dist/navigation-menu.d.ts +15 -0
  172. package/dist/navigation-menu.js +181 -0
  173. package/dist/navigation-menu.js.map +1 -0
  174. package/dist/notification-center.d.ts +35 -0
  175. package/dist/notification-center.js +384 -0
  176. package/dist/notification-center.js.map +1 -0
  177. package/dist/page-header.d.ts +13 -0
  178. package/dist/page-header.js +37 -0
  179. package/dist/page-header.js.map +1 -0
  180. package/dist/pagination.d.ts +13 -0
  181. package/dist/pagination.js +103 -0
  182. package/dist/pagination.js.map +1 -0
  183. package/dist/popover.d.ts +9 -0
  184. package/dist/popover.js +93 -0
  185. package/dist/popover.js.map +1 -0
  186. package/dist/progress-steps.d.ts +17 -0
  187. package/dist/progress-steps.js +158 -0
  188. package/dist/progress-steps.js.map +1 -0
  189. package/dist/progress.d.ts +13 -0
  190. package/dist/progress.js +98 -0
  191. package/dist/progress.js.map +1 -0
  192. package/dist/radio-group.d.ts +7 -0
  193. package/dist/radio-group.js +94 -0
  194. package/dist/radio-group.js.map +1 -0
  195. package/dist/rating.d.ts +18 -0
  196. package/dist/rating.js +122 -0
  197. package/dist/rating.js.map +1 -0
  198. package/dist/relative-time.d.ts +19 -0
  199. package/dist/relative-time.js +187 -0
  200. package/dist/relative-time.js.map +1 -0
  201. package/dist/resizable.d.ts +27 -0
  202. package/dist/resizable.js +50 -0
  203. package/dist/resizable.js.map +1 -0
  204. package/dist/scroll-area.d.ts +20 -0
  205. package/dist/scroll-area.js +94 -0
  206. package/dist/scroll-area.js.map +1 -0
  207. package/dist/segmented-control.d.ts +16 -0
  208. package/dist/segmented-control.js +139 -0
  209. package/dist/segmented-control.js.map +1 -0
  210. package/dist/select.d.ts +13 -0
  211. package/dist/select.js +153 -0
  212. package/dist/select.js.map +1 -0
  213. package/dist/separator.d.ts +6 -0
  214. package/dist/separator.js +36 -0
  215. package/dist/separator.js.map +1 -0
  216. package/dist/sidebar.d.ts +24 -0
  217. package/dist/sidebar.js +150 -0
  218. package/dist/sidebar.js.map +1 -0
  219. package/dist/skeleton.d.ts +6 -0
  220. package/dist/skeleton.js +42 -0
  221. package/dist/skeleton.js.map +1 -0
  222. package/dist/slider.d.ts +6 -0
  223. package/dist/slider.js +44 -0
  224. package/dist/slider.js.map +1 -0
  225. package/dist/social-button.d.ts +14 -0
  226. package/dist/social-button.js +203 -0
  227. package/dist/social-button.js.map +1 -0
  228. package/dist/spacer.d.ts +19 -0
  229. package/dist/spacer.js +52 -0
  230. package/dist/spacer.js.map +1 -0
  231. package/dist/spinner.d.ts +15 -0
  232. package/dist/spinner.js +48 -0
  233. package/dist/spinner.js.map +1 -0
  234. package/dist/stack.d.ts +27 -0
  235. package/dist/stack.js +77 -0
  236. package/dist/stack.js.map +1 -0
  237. package/dist/stat-card.d.ts +26 -0
  238. package/dist/stat-card.js +198 -0
  239. package/dist/stat-card.js.map +1 -0
  240. package/dist/status-dot.d.ts +26 -0
  241. package/dist/status-dot.js +68 -0
  242. package/dist/status-dot.js.map +1 -0
  243. package/dist/switch.d.ts +6 -0
  244. package/dist/switch.js +108 -0
  245. package/dist/switch.js.map +1 -0
  246. package/dist/tabs.d.ts +13 -0
  247. package/dist/tabs.js +167 -0
  248. package/dist/tabs.js.map +1 -0
  249. package/dist/tag.d.ts +16 -0
  250. package/dist/tag.js +53 -0
  251. package/dist/tag.js.map +1 -0
  252. package/dist/textarea.d.ts +6 -0
  253. package/dist/textarea.js +30 -0
  254. package/dist/textarea.js.map +1 -0
  255. package/dist/theme-switcher.d.ts +16 -0
  256. package/dist/theme-switcher.js +170 -0
  257. package/dist/theme-switcher.js.map +1 -0
  258. package/dist/toast.d.ts +20 -0
  259. package/dist/toast.js +162 -0
  260. package/dist/toast.js.map +1 -0
  261. package/dist/tooltip.d.ts +14 -0
  262. package/dist/tooltip.js +98 -0
  263. package/dist/tooltip.js.map +1 -0
  264. package/dist/tree-view.d.ts +16 -0
  265. package/dist/tree-view.js +123 -0
  266. package/dist/tree-view.js.map +1 -0
  267. package/dist/truncate.d.ts +16 -0
  268. package/dist/truncate.js +151 -0
  269. package/dist/truncate.js.map +1 -0
  270. package/dist/use-reduced-motion.d.ts +15 -0
  271. package/dist/use-reduced-motion.js +11 -0
  272. package/dist/use-reduced-motion.js.map +1 -0
  273. package/dist/verification-code-input.d.ts +12 -0
  274. package/dist/verification-code-input.js +90 -0
  275. package/dist/verification-code-input.js.map +1 -0
  276. package/package.json +131 -0
  277. package/theme.css +343 -0
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
3
+
4
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
5
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
7
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+
9
+ export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
@@ -0,0 +1,93 @@
1
+ "use client";
2
+
3
+ // src/components/ui/popover.tsx
4
+ import * as React from "react";
5
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
6
+ import { motion } from "motion/react";
7
+
8
+ // src/lib/cn.ts
9
+ import { clsx } from "clsx";
10
+ import { twMerge } from "tailwind-merge";
11
+ function cn(...inputs) {
12
+ return twMerge(clsx(inputs));
13
+ }
14
+
15
+ // src/lib/motion-presets.ts
16
+ var spring = {
17
+ /** Quick, decisive — buttons, indicators, dropdowns. */
18
+ snappy: { type: "spring", stiffness: 420, damping: 32, mass: 0.8 },
19
+ /** Calm and weighty — dialogs, cards, larger surfaces. */
20
+ soft: { type: "spring", stiffness: 180, damping: 26 },
21
+ /** Playful overshoot — badges, toggles, delight moments. Use sparingly. */
22
+ bouncy: { type: "spring", stiffness: 480, damping: 18, mass: 0.9 }
23
+ };
24
+ var tween = {
25
+ /** The signature easing — an expressive ease-out for orchestrated reveals. */
26
+ smooth: { type: "tween", duration: 0.45, ease: [0.22, 1, 0.36, 1] },
27
+ /** Faster variant for small elements. */
28
+ quick: { type: "tween", duration: 0.28, ease: [0.22, 1, 0.36, 1] },
29
+ /** Longer, settled curve for drawing charts, count-ups, and progress fills. */
30
+ draw: { type: "tween", duration: 1.1, ease: [0.16, 1, 0.3, 1] }
31
+ };
32
+ var fadeUp = {
33
+ hidden: { opacity: 0, y: 18 },
34
+ visible: { opacity: 1, y: 0, transition: tween.smooth }
35
+ };
36
+ var fadeIn = {
37
+ hidden: { opacity: 0 },
38
+ visible: { opacity: 1, transition: tween.smooth }
39
+ };
40
+ var scaleIn = {
41
+ hidden: { opacity: 0, scale: 0.96 },
42
+ visible: { opacity: 1, scale: 1, transition: spring.soft }
43
+ };
44
+ var slideInLeft = {
45
+ hidden: { opacity: 0, x: -28 },
46
+ visible: { opacity: 1, x: 0, transition: tween.smooth }
47
+ };
48
+ var slideInRight = {
49
+ hidden: { opacity: 0, x: 28 },
50
+ visible: { opacity: 1, x: 0, transition: tween.smooth }
51
+ };
52
+ var blurIn = {
53
+ hidden: { opacity: 0, filter: "blur(12px)" },
54
+ visible: { opacity: 1, filter: "blur(0px)", transition: tween.smooth }
55
+ };
56
+
57
+ // src/components/ui/popover.tsx
58
+ import { jsx } from "react/jsx-runtime";
59
+ var Popover = PopoverPrimitive.Root;
60
+ var PopoverTrigger = PopoverPrimitive.Trigger;
61
+ var PopoverAnchor = PopoverPrimitive.Anchor;
62
+ var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 8, children, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
63
+ PopoverPrimitive.Content,
64
+ {
65
+ ref,
66
+ align,
67
+ sideOffset,
68
+ className: "z-50",
69
+ ...props,
70
+ children: /* @__PURE__ */ jsx(
71
+ motion.div,
72
+ {
73
+ initial: { opacity: 0, scale: 0.97 },
74
+ animate: { opacity: 1, scale: 1 },
75
+ transition: tween.quick,
76
+ style: { transformOrigin: "var(--radix-popover-content-transform-origin)" },
77
+ className: cn(
78
+ "w-72 rounded-xl border border-border bg-popover p-4 text-popover-foreground shadow-lift outline-none",
79
+ className
80
+ ),
81
+ children
82
+ }
83
+ )
84
+ }
85
+ ) }));
86
+ PopoverContent.displayName = "PopoverContent";
87
+ export {
88
+ Popover,
89
+ PopoverAnchor,
90
+ PopoverContent,
91
+ PopoverTrigger
92
+ };
93
+ //# sourceMappingURL=popover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/popover.tsx","../src/lib/cn.ts","../src/lib/motion-presets.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { motion } from \"motion/react\";\n\nimport { cn } from \"@/lib/cn\";\nimport { tween } from \"@/lib/motion-presets\";\n\nconst Popover = PopoverPrimitive.Root;\nconst PopoverTrigger = PopoverPrimitive.Trigger;\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 8, children, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className=\"z-50\"\n {...props}\n >\n <motion.div\n initial={{ opacity: 0, scale: 0.97 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={tween.quick}\n style={{ transformOrigin: \"var(--radix-popover-content-transform-origin)\" }}\n className={cn(\n \"w-72 rounded-xl border border-border bg-popover p-4 text-popover-foreground shadow-lift outline-none\",\n className\n )}\n >\n {children}\n </motion.div>\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = \"PopoverContent\";\n\nexport { Popover, PopoverTrigger, PopoverAnchor, PopoverContent };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind-aware conflict resolution.\n * Every Kineto component accepts `className` and merges it through `cn()`,\n * so consumer overrides always win over the component's defaults.\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import type { Transition, Variants, Target } from \"motion/react\";\n\n/* -------------------------------------------------------------------------------------------------\n * Transition tokens\n * The named physics every component references. Tune these in one place and the whole\n * library re-tunes. Prefer springs for anything interactive; reserve tweens for orchestrated\n * entrances where you want a precise, repeatable curve.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const spring = {\n /** Quick, decisive — buttons, indicators, dropdowns. */\n snappy: { type: \"spring\", stiffness: 420, damping: 32, mass: 0.8 },\n /** Calm and weighty — dialogs, cards, larger surfaces. */\n soft: { type: \"spring\", stiffness: 180, damping: 26 },\n /** Playful overshoot — badges, toggles, delight moments. Use sparingly. */\n bouncy: { type: \"spring\", stiffness: 480, damping: 18, mass: 0.9 },\n} satisfies Record<string, Transition>;\n\nexport const tween = {\n /** The signature easing — an expressive ease-out for orchestrated reveals. */\n smooth: { type: \"tween\", duration: 0.45, ease: [0.22, 1, 0.36, 1] },\n /** Faster variant for small elements. */\n quick: { type: \"tween\", duration: 0.28, ease: [0.22, 1, 0.36, 1] },\n /** Longer, settled curve for drawing charts, count-ups, and progress fills. */\n draw: { type: \"tween\", duration: 1.1, ease: [0.16, 1, 0.3, 1] },\n} satisfies Record<string, Transition>;\n\n/* -------------------------------------------------------------------------------------------------\n * Reveal variants\n * Named hidden→visible pairs. Pair with `initial=\"hidden\"` + `animate=\"visible\"`, or with\n * `whileInView=\"visible\"` for scroll-triggered sections (see `viewportOnce`).\n * ----------------------------------------------------------------------------------------------- */\n\nexport const fadeUp: Variants = {\n hidden: { opacity: 0, y: 18 },\n visible: { opacity: 1, y: 0, transition: tween.smooth },\n};\n\nexport const fadeIn: Variants = {\n hidden: { opacity: 0 },\n visible: { opacity: 1, transition: tween.smooth },\n};\n\nexport const scaleIn: Variants = {\n hidden: { opacity: 0, scale: 0.96 },\n visible: { opacity: 1, scale: 1, transition: spring.soft },\n};\n\nexport const slideInLeft: Variants = {\n hidden: { opacity: 0, x: -28 },\n visible: { opacity: 1, x: 0, transition: tween.smooth },\n};\n\nexport const slideInRight: Variants = {\n hidden: { opacity: 0, x: 28 },\n visible: { opacity: 1, x: 0, transition: tween.smooth },\n};\n\nexport const blurIn: Variants = {\n hidden: { opacity: 0, filter: \"blur(12px)\" },\n visible: { opacity: 1, filter: \"blur(0px)\", transition: tween.smooth },\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Stagger helpers\n * Wrap a list/grid in a container using `staggerContainer()` and give each child `staggerItem`\n * (or any reveal variant). One wrapper orchestrates the whole sequence.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const staggerContainer = (stagger = 0.08, delay = 0): Variants => ({\n hidden: {},\n visible: {\n transition: { staggerChildren: stagger, delayChildren: delay },\n },\n});\n\n/** The default child for a stagger container. Aliased to `fadeUp` so sequences feel cohesive. */\nexport const staggerItem: Variants = fadeUp;\n\n/* -------------------------------------------------------------------------------------------------\n * Interaction presets\n * Standardized tap/hover targets. Note: controls (buttons, selects, anything that can act as a\n * trigger/anchor) should NOT shift on hover — moving a trigger while its popover/tooltip animates\n * in reads as two competing motions. Use color + press feedback there instead. A very subtle\n * scale-up is reserved for non-anchored content surfaces (cards/tiles) via `cardHover`.\n * Spread into `whileHover` / `whileTap`.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const interaction = {\n /** Press feedback for buttons and clickable chips. */\n tap: { scale: 0.97 } satisfies Target,\n /** Very subtle scale-up for non-anchored content surfaces (cards/tiles) — never for triggers.\n * A gentle swell reads calmer than a positional lift and doesn't nudge neighbouring content. */\n cardHover: { scale: 1.02 } satisfies Target,\n} as const;\n\n/* -------------------------------------------------------------------------------------------------\n * Viewport config\n * The shared `whileInView` viewport so every scroll reveal triggers at the same threshold,\n * exactly once.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const viewportOnce = { once: true, margin: \"-15%\" } as const;\n"],"mappings":";;;AAEA,YAAY,WAAW;AACvB,YAAY,sBAAsB;AAClC,SAAS,cAAc;;;ACJvB,SAAS,YAA6B;AACtC,SAAS,eAAe;AAOjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACDO,IAAM,SAAS;AAAA;AAAA,EAEpB,QAAQ,EAAE,MAAM,UAAU,WAAW,KAAK,SAAS,IAAI,MAAM,IAAI;AAAA;AAAA,EAEjE,MAAM,EAAE,MAAM,UAAU,WAAW,KAAK,SAAS,GAAG;AAAA;AAAA,EAEpD,QAAQ,EAAE,MAAM,UAAU,W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M,iBAAkC;AACxC,IAAM,gBAAiC;AAEvC,IAAM,iBAAuB,iBAG3B,CAAC,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,UAAU,GAAG,MAAM,GAAG,QACtE,oBAAkB,yBAAjB,EACC;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAU;AAAA,IACT,GAAG;AAAA,IAEJ;AAAA,MAAC,OAAO;AAAA,MAAP;AAAA,QACC,SAAS,EAAE,SAAS,GAAG,OAAO,KAAK;AAAA,QACnC,SAAS,EAAE,SAAS,GAAG,OAAO,EAAE;AAAA,QAChC,YAAY,MAAM;AAAA,QAClB,OAAO,EAAE,iBAAiB,gDAAgD;AAAA,QAC1E,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QAEC;AAAA;AAAA,IACH;AAAA;AACF,GACF,CACD;AACD,eAAe,cAAc;","names":[]}
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ import { LucideIcon } from 'lucide-react';
3
+
4
+ interface Step {
5
+ title: string;
6
+ description?: string;
7
+ icon?: LucideIcon;
8
+ }
9
+ interface ProgressStepsProps extends React.HTMLAttributes<HTMLElement> {
10
+ steps: Step[];
11
+ /** Index of the active step (0-based). Earlier steps render as complete. */
12
+ current: number;
13
+ orientation?: "horizontal" | "vertical";
14
+ }
15
+ declare const ProgressSteps: React.ForwardRefExoticComponent<ProgressStepsProps & React.RefAttributes<HTMLElement>>;
16
+
17
+ export { ProgressSteps, type ProgressStepsProps, type Step };
@@ -0,0 +1,158 @@
1
+ "use client";
2
+
3
+ // src/components/ui/progress-steps.tsx
4
+ import * as React from "react";
5
+ import { Check } from "lucide-react";
6
+ import { motion, useReducedMotion } from "motion/react";
7
+
8
+ // src/lib/cn.ts
9
+ import { clsx } from "clsx";
10
+ import { twMerge } from "tailwind-merge";
11
+ function cn(...inputs) {
12
+ return twMerge(clsx(inputs));
13
+ }
14
+
15
+ // src/lib/motion-presets.ts
16
+ var spring = {
17
+ /** Quick, decisive — buttons, indicators, dropdowns. */
18
+ snappy: { type: "spring", stiffness: 420, damping: 32, mass: 0.8 },
19
+ /** Calm and weighty — dialogs, cards, larger surfaces. */
20
+ soft: { type: "spring", stiffness: 180, damping: 26 },
21
+ /** Playful overshoot — badges, toggles, delight moments. Use sparingly. */
22
+ bouncy: { type: "spring", stiffness: 480, damping: 18, mass: 0.9 }
23
+ };
24
+ var tween = {
25
+ /** The signature easing — an expressive ease-out for orchestrated reveals. */
26
+ smooth: { type: "tween", duration: 0.45, ease: [0.22, 1, 0.36, 1] },
27
+ /** Faster variant for small elements. */
28
+ quick: { type: "tween", duration: 0.28, ease: [0.22, 1, 0.36, 1] },
29
+ /** Longer, settled curve for drawing charts, count-ups, and progress fills. */
30
+ draw: { type: "tween", duration: 1.1, ease: [0.16, 1, 0.3, 1] }
31
+ };
32
+ var fadeUp = {
33
+ hidden: { opacity: 0, y: 18 },
34
+ visible: { opacity: 1, y: 0, transition: tween.smooth }
35
+ };
36
+ var fadeIn = {
37
+ hidden: { opacity: 0 },
38
+ visible: { opacity: 1, transition: tween.smooth }
39
+ };
40
+ var scaleIn = {
41
+ hidden: { opacity: 0, scale: 0.96 },
42
+ visible: { opacity: 1, scale: 1, transition: spring.soft }
43
+ };
44
+ var slideInLeft = {
45
+ hidden: { opacity: 0, x: -28 },
46
+ visible: { opacity: 1, x: 0, transition: tween.smooth }
47
+ };
48
+ var slideInRight = {
49
+ hidden: { opacity: 0, x: 28 },
50
+ visible: { opacity: 1, x: 0, transition: tween.smooth }
51
+ };
52
+ var blurIn = {
53
+ hidden: { opacity: 0, filter: "blur(12px)" },
54
+ visible: { opacity: 1, filter: "blur(0px)", transition: tween.smooth }
55
+ };
56
+
57
+ // src/components/ui/progress-steps.tsx
58
+ import { jsx, jsxs } from "react/jsx-runtime";
59
+ function StepCircle({
60
+ state,
61
+ index,
62
+ icon: Icon,
63
+ reduced
64
+ }) {
65
+ return /* @__PURE__ */ jsx(
66
+ "span",
67
+ {
68
+ className: cn(
69
+ "flex size-9 shrink-0 items-center justify-center rounded-full text-sm font-medium",
70
+ state === "complete" && "bg-brand text-brand-foreground",
71
+ state === "current" && "border-2 border-brand bg-brand/10 text-brand",
72
+ state === "upcoming" && "border border-border bg-card text-muted-foreground"
73
+ ),
74
+ children: state === "complete" ? /* @__PURE__ */ jsx(
75
+ motion.span,
76
+ {
77
+ initial: reduced ? false : { scale: 0.5, opacity: 0 },
78
+ animate: { scale: 1, opacity: 1 },
79
+ transition: spring.bouncy,
80
+ children: /* @__PURE__ */ jsx(Check, { className: "size-4", strokeWidth: 3 })
81
+ }
82
+ ) : Icon ? /* @__PURE__ */ jsx(Icon, { className: "size-4" }) : index + 1
83
+ }
84
+ );
85
+ }
86
+ var ProgressSteps = React.forwardRef(
87
+ ({ className, steps, current, orientation = "horizontal", ...props }, ref) => {
88
+ const reduced = useReducedMotion() ?? false;
89
+ const stateOf = (i) => i < current ? "complete" : i === current ? "current" : "upcoming";
90
+ if (orientation === "vertical") {
91
+ return /* @__PURE__ */ jsx("nav", { ref, "aria-label": "Progress", className, ...props, children: /* @__PURE__ */ jsx("ol", { className: "flex flex-col", children: steps.map((step, i) => {
92
+ const last = i === steps.length - 1;
93
+ return /* @__PURE__ */ jsxs("li", { className: "flex gap-3", children: [
94
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
95
+ /* @__PURE__ */ jsx(StepCircle, { state: stateOf(i), index: i, icon: step.icon, reduced }),
96
+ !last ? /* @__PURE__ */ jsx(
97
+ "div",
98
+ {
99
+ className: cn(
100
+ "my-1 min-h-8 w-0.5 flex-1 rounded-full",
101
+ i < current ? "bg-brand" : "bg-border"
102
+ )
103
+ }
104
+ ) : null
105
+ ] }),
106
+ /* @__PURE__ */ jsxs("div", { className: cn(last ? "" : "pb-6"), children: [
107
+ /* @__PURE__ */ jsx(
108
+ "p",
109
+ {
110
+ className: cn(
111
+ "text-sm font-medium",
112
+ i <= current ? "text-foreground" : "text-muted-foreground"
113
+ ),
114
+ children: step.title
115
+ }
116
+ ),
117
+ step.description ? /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-sm text-muted-foreground", children: step.description }) : null
118
+ ] })
119
+ ] }, i);
120
+ }) }) });
121
+ }
122
+ return /* @__PURE__ */ jsx("nav", { ref, "aria-label": "Progress", className, ...props, children: /* @__PURE__ */ jsx("ol", { className: "flex w-full", children: steps.map((step, i) => {
123
+ const last = i === steps.length - 1;
124
+ return /* @__PURE__ */ jsxs("li", { className: cn(last ? "flex-none" : "flex-1"), children: [
125
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
126
+ /* @__PURE__ */ jsx(StepCircle, { state: stateOf(i), index: i, icon: step.icon, reduced }),
127
+ !last ? /* @__PURE__ */ jsx(
128
+ "div",
129
+ {
130
+ className: cn(
131
+ "mx-2 h-0.5 flex-1 rounded-full",
132
+ i < current ? "bg-brand" : "bg-border"
133
+ )
134
+ }
135
+ ) : null
136
+ ] }),
137
+ /* @__PURE__ */ jsxs("div", { className: "mt-2 pr-4", children: [
138
+ /* @__PURE__ */ jsx(
139
+ "p",
140
+ {
141
+ className: cn(
142
+ "text-sm font-medium",
143
+ i <= current ? "text-foreground" : "text-muted-foreground"
144
+ ),
145
+ children: step.title
146
+ }
147
+ ),
148
+ step.description ? /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: step.description }) : null
149
+ ] })
150
+ ] }, i);
151
+ }) }) });
152
+ }
153
+ );
154
+ ProgressSteps.displayName = "ProgressSteps";
155
+ export {
156
+ ProgressSteps
157
+ };
158
+ //# sourceMappingURL=progress-steps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/progress-steps.tsx","../src/lib/cn.ts","../src/lib/motion-presets.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Check, type LucideIcon } from \"lucide-react\";\nimport { motion, useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@/lib/cn\";\nimport { spring } from \"@/lib/motion-presets\";\n\nexport interface Step {\n title: string;\n description?: string;\n icon?: LucideIcon;\n}\n\nexport interface ProgressStepsProps extends React.HTMLAttributes<HTMLElement> {\n steps: Step[];\n /** Index of the active step (0-based). Earlier steps render as complete. */\n current: number;\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nfunction StepCircle({\n state,\n index,\n icon: Icon,\n reduced,\n}: {\n state: \"complete\" | \"current\" | \"upcoming\";\n index: number;\n icon?: LucideIcon;\n reduced: boolean;\n}) {\n return (\n <span\n className={cn(\n \"flex size-9 shrink-0 items-center justify-center rounded-full text-sm font-medium\",\n state === \"complete\" && \"bg-brand text-brand-foreground\",\n state === \"current\" && \"border-2 border-brand bg-brand/10 text-brand\",\n state === \"upcoming\" && \"border border-border bg-card text-muted-foreground\"\n )}\n >\n {state === \"complete\" ? (\n <motion.span\n initial={reduced ? false : { scale: 0.5, opacity: 0 }}\n animate={{ scale: 1, opacity: 1 }}\n transition={spring.bouncy}\n >\n <Check className=\"size-4\" strokeWidth={3} />\n </motion.span>\n ) : Icon ? (\n <Icon className=\"size-4\" />\n ) : (\n index + 1\n )}\n </span>\n );\n}\n\nconst ProgressSteps = React.forwardRef<HTMLElement, ProgressStepsProps>(\n ({ className, steps, current, orientation = \"horizontal\", ...props }, ref) => {\n const reduced = useReducedMotion() ?? false;\n\n const stateOf = (i: number): \"complete\" | \"current\" | \"upcoming\" =>\n i < current ? \"complete\" : i === current ? \"current\" : \"upcoming\";\n\n if (orientation === \"vertical\") {\n return (\n <nav ref={ref} aria-label=\"Progress\" className={className} {...props}>\n <ol className=\"flex flex-col\">\n {steps.map((step, i) => {\n const last = i === steps.length - 1;\n return (\n <li key={i} className=\"flex gap-3\">\n <div className=\"flex flex-col items-center\">\n <StepCircle state={stateOf(i)} index={i} icon={step.icon} reduced={reduced} />\n {!last ? (\n <div\n className={cn(\n \"my-1 min-h-8 w-0.5 flex-1 rounded-full\",\n i < current ? \"bg-brand\" : \"bg-border\"\n )}\n />\n ) : null}\n </div>\n <div className={cn(last ? \"\" : \"pb-6\")}>\n <p\n className={cn(\n \"text-sm font-medium\",\n i <= current ? \"text-foreground\" : \"text-muted-foreground\"\n )}\n >\n {step.title}\n </p>\n {step.description ? (\n <p className=\"mt-0.5 text-sm text-muted-foreground\">\n {step.description}\n </p>\n ) : null}\n </div>\n </li>\n );\n })}\n </ol>\n </nav>\n );\n }\n\n return (\n <nav ref={ref} aria-label=\"Progress\" className={className} {...props}>\n <ol className=\"flex w-full\">\n {steps.map((step, i) => {\n const last = i === steps.length - 1;\n return (\n <li key={i} className={cn(last ? \"flex-none\" : \"flex-1\")}>\n <div className=\"flex items-center\">\n <StepCircle state={stateOf(i)} index={i} icon={step.icon} reduced={reduced} />\n {!last ? (\n <div\n className={cn(\n \"mx-2 h-0.5 flex-1 rounded-full\",\n i < current ? \"bg-brand\" : \"bg-border\"\n )}\n />\n ) : null}\n </div>\n <div className=\"mt-2 pr-4\">\n <p\n className={cn(\n \"text-sm font-medium\",\n i <= current ? \"text-foreground\" : \"text-muted-foreground\"\n )}\n >\n {step.title}\n </p>\n {step.description ? (\n <p className=\"mt-0.5 text-xs text-muted-foreground\">\n {step.description}\n </p>\n ) : null}\n </div>\n </li>\n );\n })}\n </ol>\n </nav>\n );\n }\n);\nProgressSteps.displayName = \"ProgressSteps\";\n\nexport { ProgressSteps };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind-aware conflict resolution.\n * Every Kineto component accepts `className` and merges it through `cn()`,\n * so consumer overrides always win over the component's defaults.\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import type { Transition, Variants, Target } from \"motion/react\";\n\n/* -------------------------------------------------------------------------------------------------\n * Transition tokens\n * The named physics every component references. Tune these in one place and the whole\n * library re-tunes. Prefer springs for anything interactive; reserve tweens for orchestrated\n * entrances where you want a precise, repeatable curve.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const spring = {\n /** Quick, decisive — buttons, indicators, dropdowns. */\n snappy: { type: \"spring\", stiffness: 420, damping: 32, mass: 0.8 },\n /** Calm and weighty — dialogs, cards, larger surfaces. */\n soft: { type: \"spring\", stiffness: 180, damping: 26 },\n /** Playful overshoot — badges, toggles, delight moments. Use sparingly. */\n bouncy: { type: \"spring\", stiffness: 480, damping: 18, mass: 0.9 },\n} satisfies Record<string, Transition>;\n\nexport const tween = {\n /** The signature easing — an expressive ease-out for orchestrated reveals. */\n smooth: { type: \"tween\", duration: 0.45, ease: [0.22, 1, 0.36, 1] },\n /** Faster variant for small elements. */\n quick: { type: \"tween\", duration: 0.28, ease: [0.22, 1, 0.36, 1] },\n /** Longer, settled curve for drawing charts, count-ups, and progress fills. */\n draw: { type: \"tween\", duration: 1.1, ease: [0.16, 1, 0.3, 1] },\n} satisfies Record<string, Transition>;\n\n/* -------------------------------------------------------------------------------------------------\n * Reveal variants\n * Named hidden→visible pairs. Pair with `initial=\"hidden\"` + `animate=\"visible\"`, or with\n * `whileInView=\"visible\"` for scroll-triggered sections (see `viewportOnce`).\n * ----------------------------------------------------------------------------------------------- */\n\nexport const fadeUp: Variants = {\n hidden: { opacity: 0, y: 18 },\n visible: { opacity: 1, y: 0, transition: tween.smooth },\n};\n\nexport const fadeIn: Variants = {\n hidden: { opacity: 0 },\n visible: { opacity: 1, transition: tween.smooth },\n};\n\nexport const scaleIn: Variants = {\n hidden: { opacity: 0, scale: 0.96 },\n visible: { opacity: 1, scale: 1, transition: spring.soft },\n};\n\nexport const slideInLeft: Variants = {\n hidden: { opacity: 0, x: -28 },\n visible: { opacity: 1, x: 0, transition: tween.smooth },\n};\n\nexport const slideInRight: Variants = {\n hidden: { opacity: 0, x: 28 },\n visible: { opacity: 1, x: 0, transition: tween.smooth },\n};\n\nexport const blurIn: Variants = {\n hidden: { opacity: 0, filter: \"blur(12px)\" },\n visible: { opacity: 1, filter: \"blur(0px)\", transition: tween.smooth },\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Stagger helpers\n * Wrap a list/grid in a container using `staggerContainer()` and give each child `staggerItem`\n * (or any reveal variant). One wrapper orchestrates the whole sequence.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const staggerContainer = (stagger = 0.08, delay = 0): Variants => ({\n hidden: {},\n visible: {\n transition: { staggerChildren: stagger, delayChildren: delay },\n },\n});\n\n/** The default child for a stagger container. Aliased to `fadeUp` so sequences feel cohesive. */\nexport const staggerItem: Variants = fadeUp;\n\n/* -------------------------------------------------------------------------------------------------\n * Interaction presets\n * Standardized tap/hover targets. Note: controls (buttons, selects, anything that can act as a\n * trigger/anchor) should NOT shift on hover — moving a trigger while its popover/tooltip animates\n * in reads as two competing motions. Use color + press feedback there instead. A very subtle\n * scale-up is reserved for non-anchored content surfaces (cards/tiles) via `cardHover`.\n * Spread into `whileHover` / `whileTap`.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const interaction = {\n /** Press feedback for buttons and clickable chips. */\n tap: { scale: 0.97 } satisfies Target,\n /** Very subtle scale-up for non-anchored content surfaces (cards/tiles) — never for triggers.\n * A gentle swell reads calmer than a positional lift and doesn't nudge neighbouring content. */\n cardHover: { scale: 1.02 } satisfies Target,\n} as const;\n\n/* -------------------------------------------------------------------------------------------------\n * Viewport config\n * The shared `whileInView` viewport so every scroll reveal triggers at the same threshold,\n * exactly once.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const viewportOnce = { once: true, margin: \"-15%\" } as const;\n"],"mappings":";;;AAEA,YAAY,WAAW;AACvB,SAAS,aAA8B;AACvC,SAAS,QAAQ,wBAAwB;;;ACJzC,SAAS,YAA6B;AACtC,SAAS,eAAe;AAOjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACDO,IAAM,SAAS;AAAA;AAAA,EAEpB,QAAQ,EAAE,MAAM,UAAU,WAAW,KAAK,SAAS,IAAI,MAAM,IAAI;AAAA;AAAA,EAEjE,MAAM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,13 @@
1
+ import * as React from 'react';
2
+
3
+ interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ /** 0–100. */
5
+ value?: number;
6
+ /** Class applied to the filled indicator (e.g. a status color). */
7
+ indicatorClassName?: string;
8
+ /** Add a diagonal striped texture to the indicator. */
9
+ striped?: boolean;
10
+ }
11
+ declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
12
+
13
+ export { Progress, type ProgressProps };
@@ -0,0 +1,98 @@
1
+ "use client";
2
+
3
+ // src/components/ui/progress.tsx
4
+ import * as React from "react";
5
+ import { motion, useReducedMotion } from "motion/react";
6
+
7
+ // src/lib/cn.ts
8
+ import { clsx } from "clsx";
9
+ import { twMerge } from "tailwind-merge";
10
+ function cn(...inputs) {
11
+ return twMerge(clsx(inputs));
12
+ }
13
+
14
+ // src/lib/motion-presets.ts
15
+ var spring = {
16
+ /** Quick, decisive — buttons, indicators, dropdowns. */
17
+ snappy: { type: "spring", stiffness: 420, damping: 32, mass: 0.8 },
18
+ /** Calm and weighty — dialogs, cards, larger surfaces. */
19
+ soft: { type: "spring", stiffness: 180, damping: 26 },
20
+ /** Playful overshoot — badges, toggles, delight moments. Use sparingly. */
21
+ bouncy: { type: "spring", stiffness: 480, damping: 18, mass: 0.9 }
22
+ };
23
+ var tween = {
24
+ /** The signature easing — an expressive ease-out for orchestrated reveals. */
25
+ smooth: { type: "tween", duration: 0.45, ease: [0.22, 1, 0.36, 1] },
26
+ /** Faster variant for small elements. */
27
+ quick: { type: "tween", duration: 0.28, ease: [0.22, 1, 0.36, 1] },
28
+ /** Longer, settled curve for drawing charts, count-ups, and progress fills. */
29
+ draw: { type: "tween", duration: 1.1, ease: [0.16, 1, 0.3, 1] }
30
+ };
31
+ var fadeUp = {
32
+ hidden: { opacity: 0, y: 18 },
33
+ visible: { opacity: 1, y: 0, transition: tween.smooth }
34
+ };
35
+ var fadeIn = {
36
+ hidden: { opacity: 0 },
37
+ visible: { opacity: 1, transition: tween.smooth }
38
+ };
39
+ var scaleIn = {
40
+ hidden: { opacity: 0, scale: 0.96 },
41
+ visible: { opacity: 1, scale: 1, transition: spring.soft }
42
+ };
43
+ var slideInLeft = {
44
+ hidden: { opacity: 0, x: -28 },
45
+ visible: { opacity: 1, x: 0, transition: tween.smooth }
46
+ };
47
+ var slideInRight = {
48
+ hidden: { opacity: 0, x: 28 },
49
+ visible: { opacity: 1, x: 0, transition: tween.smooth }
50
+ };
51
+ var blurIn = {
52
+ hidden: { opacity: 0, filter: "blur(12px)" },
53
+ visible: { opacity: 1, filter: "blur(0px)", transition: tween.smooth }
54
+ };
55
+ var viewportOnce = { once: true, margin: "-15%" };
56
+
57
+ // src/components/ui/progress.tsx
58
+ import { jsx } from "react/jsx-runtime";
59
+ var Progress = React.forwardRef(
60
+ ({ className, value = 0, indicatorClassName, striped = false, ...props }, ref) => {
61
+ const reduced = useReducedMotion();
62
+ const clamped = Math.min(100, Math.max(0, value));
63
+ return /* @__PURE__ */ jsx(
64
+ "div",
65
+ {
66
+ ref,
67
+ role: "progressbar",
68
+ "aria-valuenow": clamped,
69
+ "aria-valuemin": 0,
70
+ "aria-valuemax": 100,
71
+ className: cn(
72
+ "relative h-2 w-full overflow-hidden rounded-full bg-muted",
73
+ className
74
+ ),
75
+ ...props,
76
+ children: /* @__PURE__ */ jsx(
77
+ motion.div,
78
+ {
79
+ className: cn(
80
+ "h-full rounded-full bg-primary",
81
+ striped && "bg-[repeating-linear-gradient(45deg,hsl(var(--primary)),hsl(var(--primary))_8px,hsl(var(--primary)/0.7)_8px,hsl(var(--primary)/0.7)_16px)]",
82
+ indicatorClassName
83
+ ),
84
+ initial: { width: 0 },
85
+ whileInView: { width: `${clamped}%` },
86
+ viewport: viewportOnce,
87
+ transition: reduced ? { duration: 0 } : tween.draw
88
+ }
89
+ )
90
+ }
91
+ );
92
+ }
93
+ );
94
+ Progress.displayName = "Progress";
95
+ export {
96
+ Progress
97
+ };
98
+ //# sourceMappingURL=progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/progress.tsx","../src/lib/cn.ts","../src/lib/motion-presets.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { motion, useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@/lib/cn\";\nimport { tween, viewportOnce } from \"@/lib/motion-presets\";\n\nexport interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {\n /** 0–100. */\n value?: number;\n /** Class applied to the filled indicator (e.g. a status color). */\n indicatorClassName?: string;\n /** Add a diagonal striped texture to the indicator. */\n striped?: boolean;\n}\n\nconst Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n ({ className, value = 0, indicatorClassName, striped = false, ...props }, ref) => {\n const reduced = useReducedMotion();\n const clamped = Math.min(100, Math.max(0, value));\n\n return (\n <div\n ref={ref}\n role=\"progressbar\"\n aria-valuenow={clamped}\n aria-valuemin={0}\n aria-valuemax={100}\n className={cn(\n \"relative h-2 w-full overflow-hidden rounded-full bg-muted\",\n className\n )}\n {...props}\n >\n <motion.div\n className={cn(\n \"h-full rounded-full bg-primary\",\n striped &&\n \"bg-[repeating-linear-gradient(45deg,hsl(var(--primary)),hsl(var(--primary))_8px,hsl(var(--primary)/0.7)_8px,hsl(var(--primary)/0.7)_16px)]\",\n indicatorClassName\n )}\n initial={{ width: 0 }}\n whileInView={{ width: `${clamped}%` }}\n viewport={viewportOnce}\n transition={reduced ? { duration: 0 } : tween.draw}\n />\n </div>\n );\n }\n);\nProgress.displayName = \"Progress\";\n\nexport { Progress };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind-aware conflict resolution.\n * Every Kineto component accepts `className` and merges it through `cn()`,\n * so consumer overrides always win over the component's defaults.\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import type { Transition, Variants, Target } from \"motion/react\";\n\n/* -------------------------------------------------------------------------------------------------\n * Transition tokens\n * The named physics every component references. Tune these in one place and the whole\n * library re-tunes. Prefer springs for anything interactive; reserve tweens for orchestrated\n * entrances where you want a precise, repeatable curve.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const spring = {\n /** Quick, decisive — buttons, indicators, dropdowns. */\n snappy: { type: \"spring\", stiffness: 420, damping: 32, mass: 0.8 },\n /** Calm and weighty — dialogs, cards, larger surfaces. */\n soft: { type: \"spring\", stiffness: 180, damping: 26 },\n /** Playful overshoot — badges, toggles, delight moments. Use sparingly. */\n bouncy: { type: \"spring\", stiffness: 480, damping: 18, mass: 0.9 },\n} satisfies Record<string, Transition>;\n\nexport const tween = {\n /** The signature easing — an expressive ease-out for orchestrated reveals. */\n smooth: { type: \"tween\", duration: 0.45, ease: [0.22, 1, 0.36, 1] },\n /** Faster variant for small elements. */\n quick: { type: \"tween\", duration: 0.28, ease: [0.22, 1, 0.36, 1] },\n /** Longer, settled curve for drawing charts, count-ups, and progress fills. */\n draw: { type: \"tween\", duration: 1.1, ease: [0.16, 1, 0.3, 1] },\n} satisfies Record<string, Transition>;\n\n/* -------------------------------------------------------------------------------------------------\n * Reveal variants\n * Named hidden→visible pairs. Pair with `initial=\"hidden\"` + `animate=\"visible\"`, or with\n * `whileInView=\"visible\"` for scroll-triggered sections (see `viewportOnce`).\n * ----------------------------------------------------------------------------------------------- */\n\nexport const fadeUp: Variants = {\n hidden: { opacity: 0, y: 18 },\n visible: { opacity: 1, y: 0, transition: tween.smooth },\n};\n\nexport const fadeIn: Variants = {\n hidden: { opacity: 0 },\n visible: { opacity: 1, transition: tween.smooth },\n};\n\nexport const scaleIn: Variants = {\n hidden: { opacity: 0, scale: 0.96 },\n visible: { opacity: 1, scale: 1, transition: spring.soft },\n};\n\nexport const slideInLeft: Variants = {\n hidden: { opacity: 0, x: -28 },\n visible: { opacity: 1, x: 0, transition: tween.smooth },\n};\n\nexport const slideInRight: Variants = {\n hidden: { opacity: 0, x: 28 },\n visible: { opacity: 1, x: 0, transition: tween.smooth },\n};\n\nexport const blurIn: Variants = {\n hidden: { opacity: 0, filter: \"blur(12px)\" },\n visible: { opacity: 1, filter: \"blur(0px)\", transition: tween.smooth },\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Stagger helpers\n * Wrap a list/grid in a container using `staggerContainer()` and give each child `staggerItem`\n * (or any reveal variant). One wrapper orchestrates the whole sequence.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const staggerContainer = (stagger = 0.08, delay = 0): Variants => ({\n hidden: {},\n visible: {\n transition: { staggerChildren: stagger, delayChildren: delay },\n },\n});\n\n/** The default child for a stagger container. Aliased to `fadeUp` so sequences feel cohesive. */\nexport const staggerItem: Variants = fadeUp;\n\n/* -------------------------------------------------------------------------------------------------\n * Interaction presets\n * Standardized tap/hover targets. Note: controls (buttons, selects, anything that can act as a\n * trigger/anchor) should NOT shift on hover — moving a trigger while its popover/tooltip animates\n * in reads as two competing motions. Use color + press feedback there instead. A very subtle\n * scale-up is reserved for non-anchored content surfaces (cards/tiles) via `cardHover`.\n * Spread into `whileHover` / `whileTap`.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const interaction = {\n /** Press feedback for buttons and clickable chips. */\n tap: { scale: 0.97 } satisfies Target,\n /** Very subtle scale-up for non-anchored content surfaces (cards/tiles) — never for triggers.\n * A gentle swell reads calmer than a positional lift and doesn't nudge neighbouring content. */\n cardHover: { scale: 1.02 } satisfies Target,\n} as const;\n\n/* -------------------------------------------------------------------------------------------------\n * Viewport config\n * The shared `whileInView` viewport so every scroll reveal triggers at the same threshold,\n * exactly once.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const viewportOnce = { once: true, margin: \"-15%\" } as const;\n"],"mappings":";;;AAEA,YAAY,WAAW;AACvB,SAAS,QAAQ,wBAAwB;;;ACHzC,SAAS,YAA6B;AACtC,SAAS,eAAe;AAOjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACDO,IAAM,SAAS;AAAA;AAAA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EO,IAAM,SAAmB;AAAA,EAC9B,QAAQ,EAAE,SAAS,GAAG,QAAQ,aAAa;AAAA,EAC3C,SAAS,EAAE,SAAS,GAAG,QAAQ,aAAa,YAAY,MAAM,OAAO;AACvE;AAyCO,IAAM,eAAe,EAAE,MAAM,MAAM,QAAQ,OAAO;;;AFnEjD;AAlBR,IAAM,WAAiB;AAAA,EACrB,CAAC,EAAE,WAAW,QAAQ,GAAG,oBAAoB,UAAU,OAAO,GAAG,MAAM,GAAG,QAAQ;AAChF,UAAM,UAAU,iBAAiB;AACjC,UAAM,UAAU,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC;AAEhD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL,iBAAe;AAAA,QACf,iBAAe;AAAA,QACf,iBAAe;AAAA,QACf,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEJ;AAAA,UAAC,OAAO;AAAA,UAAP;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,WACE;AAAA,cACF;AAAA,YACF;AAAA,YACA,SAAS,EAAE,OAAO,EAAE;AAAA,YACpB,aAAa,EAAE,OAAO,GAAG,OAAO,IAAI;AAAA,YACpC,UAAU;AAAA,YACV,YAAY,UAAU,EAAE,UAAU,EAAE,IAAI,MAAM;AAAA;AAAA,QAChD;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AACA,SAAS,cAAc;","names":[]}
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
+
4
+ declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+
7
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,94 @@
1
+ "use client";
2
+
3
+ // src/components/ui/radio-group.tsx
4
+ import * as React from "react";
5
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
6
+ import { motion } from "motion/react";
7
+
8
+ // src/lib/cn.ts
9
+ import { clsx } from "clsx";
10
+ import { twMerge } from "tailwind-merge";
11
+ function cn(...inputs) {
12
+ return twMerge(clsx(inputs));
13
+ }
14
+
15
+ // src/lib/motion-presets.ts
16
+ var spring = {
17
+ /** Quick, decisive — buttons, indicators, dropdowns. */
18
+ snappy: { type: "spring", stiffness: 420, damping: 32, mass: 0.8 },
19
+ /** Calm and weighty — dialogs, cards, larger surfaces. */
20
+ soft: { type: "spring", stiffness: 180, damping: 26 },
21
+ /** Playful overshoot — badges, toggles, delight moments. Use sparingly. */
22
+ bouncy: { type: "spring", stiffness: 480, damping: 18, mass: 0.9 }
23
+ };
24
+ var tween = {
25
+ /** The signature easing — an expressive ease-out for orchestrated reveals. */
26
+ smooth: { type: "tween", duration: 0.45, ease: [0.22, 1, 0.36, 1] },
27
+ /** Faster variant for small elements. */
28
+ quick: { type: "tween", duration: 0.28, ease: [0.22, 1, 0.36, 1] },
29
+ /** Longer, settled curve for drawing charts, count-ups, and progress fills. */
30
+ draw: { type: "tween", duration: 1.1, ease: [0.16, 1, 0.3, 1] }
31
+ };
32
+ var fadeUp = {
33
+ hidden: { opacity: 0, y: 18 },
34
+ visible: { opacity: 1, y: 0, transition: tween.smooth }
35
+ };
36
+ var fadeIn = {
37
+ hidden: { opacity: 0 },
38
+ visible: { opacity: 1, transition: tween.smooth }
39
+ };
40
+ var scaleIn = {
41
+ hidden: { opacity: 0, scale: 0.96 },
42
+ visible: { opacity: 1, scale: 1, transition: spring.soft }
43
+ };
44
+ var slideInLeft = {
45
+ hidden: { opacity: 0, x: -28 },
46
+ visible: { opacity: 1, x: 0, transition: tween.smooth }
47
+ };
48
+ var slideInRight = {
49
+ hidden: { opacity: 0, x: 28 },
50
+ visible: { opacity: 1, x: 0, transition: tween.smooth }
51
+ };
52
+ var blurIn = {
53
+ hidden: { opacity: 0, filter: "blur(12px)" },
54
+ visible: { opacity: 1, filter: "blur(0px)", transition: tween.smooth }
55
+ };
56
+
57
+ // src/components/ui/radio-group.tsx
58
+ import { jsx } from "react/jsx-runtime";
59
+ var RadioGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
60
+ RadioGroupPrimitive.Root,
61
+ {
62
+ ref,
63
+ className: cn("grid gap-2.5", className),
64
+ ...props
65
+ }
66
+ ));
67
+ RadioGroup.displayName = "RadioGroup";
68
+ var RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
69
+ RadioGroupPrimitive.Item,
70
+ {
71
+ ref,
72
+ className: cn(
73
+ "aspect-square size-5 rounded-full border border-input bg-card shadow-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-brand",
74
+ className
75
+ ),
76
+ ...props,
77
+ children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ jsx(
78
+ motion.span,
79
+ {
80
+ initial: { scale: 0.5, opacity: 0 },
81
+ animate: { scale: 1, opacity: 1 },
82
+ transition: spring.bouncy,
83
+ className: "flex h-full items-center justify-center",
84
+ children: /* @__PURE__ */ jsx("span", { className: "size-2.5 rounded-full bg-brand" })
85
+ }
86
+ ) })
87
+ }
88
+ ));
89
+ RadioGroupItem.displayName = "RadioGroupItem";
90
+ export {
91
+ RadioGroup,
92
+ RadioGroupItem
93
+ };
94
+ //# sourceMappingURL=radio-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/radio-group.tsx","../src/lib/cn.ts","../src/lib/motion-presets.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { motion } from \"motion/react\";\n\nimport { cn } from \"@/lib/cn\";\nimport { spring } from \"@/lib/motion-presets\";\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Root\n ref={ref}\n className={cn(\"grid gap-2.5\", className)}\n {...props}\n />\n));\nRadioGroup.displayName = \"RadioGroup\";\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square size-5 rounded-full border border-input bg-card shadow-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-brand\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator asChild>\n <motion.span\n initial={{ scale: 0.5, opacity: 0 }}\n animate={{ scale: 1, opacity: 1 }}\n transition={spring.bouncy}\n className=\"flex h-full items-center justify-center\"\n >\n <span className=\"size-2.5 rounded-full bg-brand\" />\n </motion.span>\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n));\nRadioGroupItem.displayName = \"RadioGroupItem\";\n\nexport { RadioGroup, RadioGroupItem };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind-aware conflict resolution.\n * Every Kineto component accepts `className` and merges it through `cn()`,\n * so consumer overrides always win over the component's defaults.\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import type { Transition, Variants, Target } from \"motion/react\";\n\n/* -------------------------------------------------------------------------------------------------\n * Transition tokens\n * The named physics every component references. Tune these in one place and the whole\n * library re-tunes. Prefer springs for anything interactive; reserve tweens for orchestrated\n * entrances where you want a precise, repeatable curve.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const spring = {\n /** Quick, decisive — buttons, indicators, dropdowns. */\n snappy: { type: \"spring\", stiffness: 420, damping: 32, mass: 0.8 },\n /** Calm and weighty — dialogs, cards, larger surfaces. */\n soft: { type: \"spring\", stiffness: 180, damping: 26 },\n /** Playful overshoot — badges, toggles, delight moments. Use sparingly. */\n bouncy: { type: \"spring\", stiffness: 480, damping: 18, mass: 0.9 },\n} satisfies Record<string, Transition>;\n\nexport const tween = {\n /** The signature easing — an expressive ease-out for orchestrated reveals. */\n smooth: { type: \"tween\", duration: 0.45, ease: [0.22, 1, 0.36, 1] },\n /** Faster variant for small elements. */\n quick: { type: \"tween\", duration: 0.28, ease: [0.22, 1, 0.36, 1] },\n /** Longer, settled curve for drawing charts, count-ups, and progress fills. */\n draw: { type: \"tween\", duration: 1.1, ease: [0.16, 1, 0.3, 1] },\n} satisfies Record<string, Transition>;\n\n/* -------------------------------------------------------------------------------------------------\n * Reveal variants\n * Named hidden→visible pairs. Pair with `initial=\"hidden\"` + `animate=\"visible\"`, or with\n * `whileInView=\"visible\"` for scroll-triggered sections (see `viewportOnce`).\n * ----------------------------------------------------------------------------------------------- */\n\nexport const fadeUp: Variants = {\n hidden: { opacity: 0, y: 18 },\n visible: { opacity: 1, y: 0, transition: tween.smooth },\n};\n\nexport const fadeIn: Variants = {\n hidden: { opacity: 0 },\n visible: { opacity: 1, transition: tween.smooth },\n};\n\nexport const scaleIn: Variants = {\n hidden: { opacity: 0, scale: 0.96 },\n visible: { opacity: 1, scale: 1, transition: spring.soft },\n};\n\nexport const slideInLeft: Variants = {\n hidden: { opacity: 0, x: -28 },\n visible: { opacity: 1, x: 0, transition: tween.smooth },\n};\n\nexport const slideInRight: Variants = {\n hidden: { opacity: 0, x: 28 },\n visible: { opacity: 1, x: 0, transition: tween.smooth },\n};\n\nexport const blurIn: Variants = {\n hidden: { opacity: 0, filter: \"blur(12px)\" },\n visible: { opacity: 1, filter: \"blur(0px)\", transition: tween.smooth },\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Stagger helpers\n * Wrap a list/grid in a container using `staggerContainer()` and give each child `staggerItem`\n * (or any reveal variant). One wrapper orchestrates the whole sequence.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const staggerContainer = (stagger = 0.08, delay = 0): Variants => ({\n hidden: {},\n visible: {\n transition: { staggerChildren: stagger, delayChildren: delay },\n },\n});\n\n/** The default child for a stagger container. Aliased to `fadeUp` so sequences feel cohesive. */\nexport const staggerItem: Variants = fadeUp;\n\n/* -------------------------------------------------------------------------------------------------\n * Interaction presets\n * Standardized tap/hover targets. Note: controls (buttons, selects, anything that can act as a\n * trigger/anchor) should NOT shift on hover — moving a trigger while its popover/tooltip animates\n * in reads as two competing motions. Use color + press feedback there instead. A very subtle\n * scale-up is reserved for non-anchored content surfaces (cards/tiles) via `cardHover`.\n * Spread into `whileHover` / `whileTap`.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const interaction = {\n /** Press feedback for buttons and clickable chips. */\n tap: { scale: 0.97 } satisfies Target,\n /** Very subtle scale-up for non-anchored content surfaces (cards/tiles) — never for triggers.\n * A gentle swell reads calmer than a positional lift and doesn't nudge neighbouring content. */\n cardHover: { scale: 1.02 } satisfies Target,\n} as const;\n\n/* -------------------------------------------------------------------------------------------------\n * Viewport config\n * The shared `whileInView` viewport so every scroll reveal triggers at the same threshold,\n * exactly once.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const viewportOnce = { once: true, margin: \"-15%\" } as const;\n"],"mappings":";;;AAEA,YAAY,WAAW;AACvB,YAAY,yBAAyB;AACrC,SAAS,cAAc;;;ACJvB,SAAS,YAA6B;AACtC,SAAS,eAAe;AAOjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B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GAAG,YAAY,MAAM,OAAO;AACxD;AAEO,IAAM,SAAmB;AAAA,EAC9B,QAAQ,EAAE,SAAS,GAAG,QAAQ,aAAa;AAAA,EAC3C,SAAS,EAAE,SAAS,GAAG,QAAQ,aAAa,YAAY,MAAM,OAAO;AACvE;;;AFhDE;AAJF,IAAM,aAAmB,iBAGvB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAqB;AAAA,EAApB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,gBAAgB,SAAS;AAAA,IACtC,GAAG;AAAA;AACN,CACD;AACD,WAAW,cAAc;AAEzB,IAAM,iBAAuB,iBAG3B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAqB;AAAA,EAApB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,8BAAqB,+BAApB,EAA8B,SAAO,MACpC;AAAA,MAAC,OAAO;AAAA,MAAP;AAAA,QACC,SAAS,EAAE,OAAO,KAAK,SAAS,EAAE;AAAA,QAClC,SAAS,EAAE,OAAO,GAAG,SAAS,EAAE;AAAA,QAChC,YAAY,OAAO;AAAA,QACnB,WAAU;AAAA,QAEV,8BAAC,UAAK,WAAU,kCAAiC;AAAA;AAAA,IACnD,GACF;AAAA;AACF,CACD;AACD,eAAe,cAAc;","names":[]}
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+
3
+ declare const sizeClasses: {
4
+ readonly sm: "size-4";
5
+ readonly md: "size-5";
6
+ readonly lg: "size-7";
7
+ };
8
+ interface RatingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
9
+ value?: number;
10
+ defaultValue?: number;
11
+ onValueChange?: (value: number) => void;
12
+ max?: number;
13
+ readOnly?: boolean;
14
+ size?: keyof typeof sizeClasses;
15
+ }
16
+ declare const Rating: React.ForwardRefExoticComponent<RatingProps & React.RefAttributes<HTMLDivElement>>;
17
+
18
+ export { Rating, type RatingProps };