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,42 @@
1
+ "use client";
2
+
3
+ // src/components/ui/skeleton.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/components/ui/skeleton.tsx
15
+ import { jsx } from "react/jsx-runtime";
16
+ var Skeleton = React.forwardRef(
17
+ ({ className, ...props }, ref) => {
18
+ const reduced = useReducedMotion();
19
+ return /* @__PURE__ */ jsx(
20
+ "div",
21
+ {
22
+ ref,
23
+ className: cn("relative overflow-hidden rounded-md bg-muted", className),
24
+ ...props,
25
+ children: !reduced ? /* @__PURE__ */ jsx(
26
+ motion.div,
27
+ {
28
+ className: "absolute inset-0 bg-gradient-to-r from-transparent via-foreground/10 to-transparent",
29
+ initial: { x: "-100%" },
30
+ animate: { x: "100%" },
31
+ transition: { duration: 1.5, ease: "linear", repeat: Infinity }
32
+ }
33
+ ) : null
34
+ }
35
+ );
36
+ }
37
+ );
38
+ Skeleton.displayName = "Skeleton";
39
+ export {
40
+ Skeleton
41
+ };
42
+ //# sourceMappingURL=skeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/skeleton.tsx","../src/lib/cn.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { motion, useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@/lib/cn\";\n\nexport type SkeletonProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst Skeleton = React.forwardRef<HTMLDivElement, SkeletonProps>(\n ({ className, ...props }, ref) => {\n const reduced = useReducedMotion();\n\n return (\n <div\n ref={ref}\n className={cn(\"relative overflow-hidden rounded-md bg-muted\", className)}\n {...props}\n >\n {!reduced ? (\n <motion.div\n className=\"absolute inset-0 bg-gradient-to-r from-transparent via-foreground/10 to-transparent\"\n initial={{ x: \"-100%\" }}\n animate={{ x: \"100%\" }}\n transition={{ duration: 1.5, ease: \"linear\", repeat: Infinity }}\n />\n ) : null}\n </div>\n );\n }\n);\nSkeleton.displayName = \"Skeleton\";\n\nexport { Skeleton };\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"],"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;;;ADUU;AAXV,IAAM,WAAiB;AAAA,EACrB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAChC,UAAM,UAAU,iBAAiB;AAEjC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,gDAAgD,SAAS;AAAA,QACtE,GAAG;AAAA,QAEH,WAAC,UACA;AAAA,UAAC,OAAO;AAAA,UAAP;AAAA,YACC,WAAU;AAAA,YACV,SAAS,EAAE,GAAG,QAAQ;AAAA,YACtB,SAAS,EAAE,GAAG,OAAO;AAAA,YACrB,YAAY,EAAE,UAAU,KAAK,MAAM,UAAU,QAAQ,SAAS;AAAA;AAAA,QAChE,IACE;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,SAAS,cAAc;","names":[]}
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import * as SliderPrimitive from '@radix-ui/react-slider';
3
+
4
+ declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
5
+
6
+ export { Slider };
package/dist/slider.js ADDED
@@ -0,0 +1,44 @@
1
+ "use client";
2
+
3
+ // src/components/ui/slider.tsx
4
+ import * as React from "react";
5
+ import * as SliderPrimitive from "@radix-ui/react-slider";
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/components/ui/slider.tsx
15
+ import { jsx, jsxs } from "react/jsx-runtime";
16
+ var Slider = React.forwardRef(({ className, ...props }, ref) => {
17
+ const thumbs = props.value ?? props.defaultValue ?? [0];
18
+ return /* @__PURE__ */ jsxs(
19
+ SliderPrimitive.Root,
20
+ {
21
+ ref,
22
+ className: cn(
23
+ "relative flex w-full touch-none select-none items-center data-[disabled]:opacity-50",
24
+ className
25
+ ),
26
+ ...props,
27
+ children: [
28
+ /* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-muted", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-brand" }) }),
29
+ thumbs.map((_, i) => /* @__PURE__ */ jsx(
30
+ SliderPrimitive.Thumb,
31
+ {
32
+ className: "block size-4 rounded-full border-2 border-brand bg-card shadow-soft transition-transform hover:scale-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
33
+ },
34
+ i
35
+ ))
36
+ ]
37
+ }
38
+ );
39
+ });
40
+ Slider.displayName = "Slider";
41
+ export {
42
+ Slider
43
+ };
44
+ //# sourceMappingURL=slider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/slider.tsx","../src/lib/cn.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as SliderPrimitive from \"@radix-ui/react-slider\";\n\nimport { cn } from \"@/lib/cn\";\n\nconst Slider = React.forwardRef<\n React.ElementRef<typeof SliderPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>\n>(({ className, ...props }, ref) => {\n const thumbs = props.value ?? props.defaultValue ?? [0];\n\n return (\n <SliderPrimitive.Root\n ref={ref}\n className={cn(\n \"relative flex w-full touch-none select-none items-center data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <SliderPrimitive.Track className=\"relative h-1.5 w-full grow overflow-hidden rounded-full bg-muted\">\n <SliderPrimitive.Range className=\"absolute h-full bg-brand\" />\n </SliderPrimitive.Track>\n {thumbs.map((_, i) => (\n <SliderPrimitive.Thumb\n key={i}\n className=\"block size-4 rounded-full border-2 border-brand bg-card shadow-soft transition-transform hover:scale-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n />\n ))}\n </SliderPrimitive.Root>\n );\n});\nSlider.displayName = \"Slider\";\n\nexport { Slider };\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"],"mappings":";;;AAEA,YAAY,WAAW;AACvB,YAAY,qBAAqB;;;ACHjC,SAAS,YAA6B;AACtC,SAAS,eAAe;AAOjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADII,SASI,KATJ;AAPJ,IAAM,SAAe,iBAGnB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAClC,QAAM,SAAS,MAAM,SAAS,MAAM,gBAAgB,CAAC,CAAC;AAEtD,SACE;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,4BAAiB,uBAAhB,EAAsB,WAAU,oEAC/B,8BAAiB,uBAAhB,EAAsB,WAAU,4BAA2B,GAC9D;AAAA,QACC,OAAO,IAAI,CAAC,GAAG,MACd;AAAA,UAAiB;AAAA,UAAhB;AAAA,YAEC,WAAU;AAAA;AAAA,UADL;AAAA,QAEP,CACD;AAAA;AAAA;AAAA,EACH;AAEJ,CAAC;AACD,OAAO,cAAc;","names":[]}
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { ButtonProps } from './button.js';
3
+ import 'class-variance-authority/types';
4
+ import 'class-variance-authority';
5
+
6
+ type Provider = "google" | "apple" | "github" | "x";
7
+ interface SocialButtonProps extends Omit<ButtonProps, "children"> {
8
+ provider: Provider;
9
+ /** Override the default "Continue with …" label. */
10
+ label?: React.ReactNode;
11
+ }
12
+ declare const SocialButton: React.ForwardRefExoticComponent<SocialButtonProps & React.RefAttributes<HTMLButtonElement>>;
13
+
14
+ export { SocialButton, type SocialButtonProps };
@@ -0,0 +1,203 @@
1
+ "use client";
2
+
3
+ // src/components/ui/social-button.tsx
4
+ import * as React2 from "react";
5
+ import { Github } from "lucide-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/components/ui/button.tsx
15
+ import * as React from "react";
16
+ import { Slot } from "@radix-ui/react-slot";
17
+ import { cva } from "class-variance-authority";
18
+ import { motion } from "motion/react";
19
+
20
+ // src/lib/motion-presets.ts
21
+ var spring = {
22
+ /** Quick, decisive — buttons, indicators, dropdowns. */
23
+ snappy: { type: "spring", stiffness: 420, damping: 32, mass: 0.8 },
24
+ /** Calm and weighty — dialogs, cards, larger surfaces. */
25
+ soft: { type: "spring", stiffness: 180, damping: 26 },
26
+ /** Playful overshoot — badges, toggles, delight moments. Use sparingly. */
27
+ bouncy: { type: "spring", stiffness: 480, damping: 18, mass: 0.9 }
28
+ };
29
+ var tween = {
30
+ /** The signature easing — an expressive ease-out for orchestrated reveals. */
31
+ smooth: { type: "tween", duration: 0.45, ease: [0.22, 1, 0.36, 1] },
32
+ /** Faster variant for small elements. */
33
+ quick: { type: "tween", duration: 0.28, ease: [0.22, 1, 0.36, 1] },
34
+ /** Longer, settled curve for drawing charts, count-ups, and progress fills. */
35
+ draw: { type: "tween", duration: 1.1, ease: [0.16, 1, 0.3, 1] }
36
+ };
37
+ var fadeUp = {
38
+ hidden: { opacity: 0, y: 18 },
39
+ visible: { opacity: 1, y: 0, transition: tween.smooth }
40
+ };
41
+ var fadeIn = {
42
+ hidden: { opacity: 0 },
43
+ visible: { opacity: 1, transition: tween.smooth }
44
+ };
45
+ var scaleIn = {
46
+ hidden: { opacity: 0, scale: 0.96 },
47
+ visible: { opacity: 1, scale: 1, transition: spring.soft }
48
+ };
49
+ var slideInLeft = {
50
+ hidden: { opacity: 0, x: -28 },
51
+ visible: { opacity: 1, x: 0, transition: tween.smooth }
52
+ };
53
+ var slideInRight = {
54
+ hidden: { opacity: 0, x: 28 },
55
+ visible: { opacity: 1, x: 0, transition: tween.smooth }
56
+ };
57
+ var blurIn = {
58
+ hidden: { opacity: 0, filter: "blur(12px)" },
59
+ visible: { opacity: 1, filter: "blur(0px)", transition: tween.smooth }
60
+ };
61
+ var interaction = {
62
+ /** Press feedback for buttons and clickable chips. */
63
+ tap: { scale: 0.97 },
64
+ /** Very subtle scale-up for non-anchored content surfaces (cards/tiles) — never for triggers.
65
+ * A gentle swell reads calmer than a positional lift and doesn't nudge neighbouring content. */
66
+ cardHover: { scale: 1.02 }
67
+ };
68
+
69
+ // src/components/ui/button.tsx
70
+ import { jsx } from "react/jsx-runtime";
71
+ var buttonVariants = cva(
72
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium 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:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
73
+ {
74
+ variants: {
75
+ variant: {
76
+ default: "bg-primary text-primary-foreground shadow-soft hover:bg-primary/90",
77
+ brand: "bg-brand text-brand-foreground shadow-soft hover:bg-brand/90",
78
+ /* A gradient can't be dimmed with an alpha modifier the way `bg-brand/90` is, so the
79
+ hover state lifts the whole ramp with a filter instead. */
80
+ gradient: "bg-gradient-brand text-brand-foreground shadow-soft transition-[filter,box-shadow] hover:brightness-110 hover:shadow-lift",
81
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
82
+ outline: "border border-input bg-card hover:bg-accent hover:text-accent-foreground",
83
+ ghost: "hover:bg-accent hover:text-accent-foreground",
84
+ destructive: "bg-destructive text-destructive-foreground shadow-soft hover:bg-destructive/90",
85
+ link: "text-primary underline-offset-4 hover:underline"
86
+ },
87
+ size: {
88
+ sm: "h-9 px-3.5",
89
+ default: "h-10 px-5 py-2",
90
+ lg: "h-12 px-7 text-base",
91
+ pill: "h-11 rounded-full px-7",
92
+ icon: "size-10"
93
+ }
94
+ },
95
+ defaultVariants: {
96
+ variant: "default",
97
+ size: "default"
98
+ }
99
+ }
100
+ );
101
+ var Button = React.forwardRef(
102
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
103
+ if (asChild) {
104
+ return /* @__PURE__ */ jsx(
105
+ Slot,
106
+ {
107
+ ref,
108
+ className: cn(
109
+ buttonVariants({ variant, size }),
110
+ // asChild has no Motion presets — give it CSS press feedback so links feel responsive too.
111
+ "transition-[transform,color,background-color,border-color,box-shadow] duration-150 ease-out active:scale-[0.98]",
112
+ className
113
+ ),
114
+ ...props
115
+ }
116
+ );
117
+ }
118
+ return /* @__PURE__ */ jsx(
119
+ motion.button,
120
+ {
121
+ ref,
122
+ className: cn(buttonVariants({ variant, size, className })),
123
+ whileTap: interaction.tap,
124
+ transition: spring.snappy,
125
+ ...props
126
+ }
127
+ );
128
+ }
129
+ );
130
+ Button.displayName = "Button";
131
+
132
+ // src/components/ui/social-button.tsx
133
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
134
+ function GoogleIcon() {
135
+ return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", "aria-hidden": true, children: [
136
+ /* @__PURE__ */ jsx2(
137
+ "path",
138
+ {
139
+ fill: "#4285F4",
140
+ d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.27-4.74 3.27-8.1Z"
141
+ }
142
+ ),
143
+ /* @__PURE__ */ jsx2(
144
+ "path",
145
+ {
146
+ fill: "#34A853",
147
+ d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23Z"
148
+ }
149
+ ),
150
+ /* @__PURE__ */ jsx2(
151
+ "path",
152
+ {
153
+ fill: "#FBBC05",
154
+ d: "M5.84 14.1a6.6 6.6 0 0 1 0-4.2V7.06H2.18a11 11 0 0 0 0 9.88l3.66-2.84Z"
155
+ }
156
+ ),
157
+ /* @__PURE__ */ jsx2(
158
+ "path",
159
+ {
160
+ fill: "#EA4335",
161
+ d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.06l3.66 2.84C6.71 7.31 9.14 5.38 12 5.38Z"
162
+ }
163
+ )
164
+ ] });
165
+ }
166
+ function AppleIcon() {
167
+ return /* @__PURE__ */ jsx2("svg", { viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": true, children: /* @__PURE__ */ jsx2("path", { d: "M17.05 12.54c-.02-2.16 1.76-3.2 1.84-3.25-1-1.47-2.56-1.67-3.12-1.69-1.33-.13-2.6.78-3.27.78-.67 0-1.71-.76-2.82-.74-1.45.02-2.79.84-3.53 2.14-1.5 2.61-.38 6.47 1.08 8.59.71 1.04 1.56 2.2 2.67 2.16 1.07-.04 1.48-.69 2.77-.69 1.29 0 1.66.69 2.79.67 1.15-.02 1.88-1.05 2.59-2.1.82-1.2 1.16-2.36 1.18-2.42-.03-.01-2.26-.87-2.28-3.43ZM14.93 6.2c.59-.72.99-1.71.88-2.7-.85.03-1.88.57-2.49 1.28-.55.63-1.03 1.64-.9 2.6.95.08 1.92-.48 2.51-1.18Z" }) });
168
+ }
169
+ function XIcon() {
170
+ return /* @__PURE__ */ jsx2("svg", { viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": true, children: /* @__PURE__ */ jsx2("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231Zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77Z" }) });
171
+ }
172
+ var labels = {
173
+ google: "Continue with Google",
174
+ apple: "Continue with Apple",
175
+ github: "Continue with GitHub",
176
+ x: "Continue with X"
177
+ };
178
+ var icons = {
179
+ google: /* @__PURE__ */ jsx2(GoogleIcon, {}),
180
+ apple: /* @__PURE__ */ jsx2(AppleIcon, {}),
181
+ github: /* @__PURE__ */ jsx2(Github, {}),
182
+ x: /* @__PURE__ */ jsx2(XIcon, {})
183
+ };
184
+ var SocialButton = React2.forwardRef(
185
+ ({ provider, label, className, variant = "outline", ...props }, ref) => /* @__PURE__ */ jsxs(
186
+ Button,
187
+ {
188
+ ref,
189
+ variant,
190
+ className: cn("w-full gap-2.5", className),
191
+ ...props,
192
+ children: [
193
+ icons[provider],
194
+ label ?? labels[provider]
195
+ ]
196
+ }
197
+ )
198
+ );
199
+ SocialButton.displayName = "SocialButton";
200
+ export {
201
+ SocialButton
202
+ };
203
+ //# sourceMappingURL=social-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/social-button.tsx","../src/lib/cn.ts","../src/components/ui/button.tsx","../src/lib/motion-presets.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Github } from \"lucide-react\";\n\nimport { cn } from \"@/lib/cn\";\nimport { Button, type ButtonProps } from \"@/components/ui/button\";\n\nfunction GoogleIcon() {\n return (\n <svg viewBox=\"0 0 24 24\" aria-hidden>\n <path\n fill=\"#4285F4\"\n d=\"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.27-4.74 3.27-8.1Z\"\n />\n <path\n fill=\"#34A853\"\n d=\"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23Z\"\n />\n <path\n fill=\"#FBBC05\"\n d=\"M5.84 14.1a6.6 6.6 0 0 1 0-4.2V7.06H2.18a11 11 0 0 0 0 9.88l3.66-2.84Z\"\n />\n <path\n fill=\"#EA4335\"\n d=\"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.06l3.66 2.84C6.71 7.31 9.14 5.38 12 5.38Z\"\n />\n </svg>\n );\n}\n\nfunction AppleIcon() {\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden>\n <path d=\"M17.05 12.54c-.02-2.16 1.76-3.2 1.84-3.25-1-1.47-2.56-1.67-3.12-1.69-1.33-.13-2.6.78-3.27.78-.67 0-1.71-.76-2.82-.74-1.45.02-2.79.84-3.53 2.14-1.5 2.61-.38 6.47 1.08 8.59.71 1.04 1.56 2.2 2.67 2.16 1.07-.04 1.48-.69 2.77-.69 1.29 0 1.66.69 2.79.67 1.15-.02 1.88-1.05 2.59-2.1.82-1.2 1.16-2.36 1.18-2.42-.03-.01-2.26-.87-2.28-3.43ZM14.93 6.2c.59-.72.99-1.71.88-2.7-.85.03-1.88.57-2.49 1.28-.55.63-1.03 1.64-.9 2.6.95.08 1.92-.48 2.51-1.18Z\" />\n </svg>\n );\n}\n\nfunction XIcon() {\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden>\n <path d=\"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231Zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77Z\" />\n </svg>\n );\n}\n\ntype Provider = \"google\" | \"apple\" | \"github\" | \"x\";\n\nconst labels: Record<Provider, string> = {\n google: \"Continue with Google\",\n apple: \"Continue with Apple\",\n github: \"Continue with GitHub\",\n x: \"Continue with X\",\n};\n\nconst icons: Record<Provider, React.ReactNode> = {\n google: <GoogleIcon />,\n apple: <AppleIcon />,\n github: <Github />,\n x: <XIcon />,\n};\n\nexport interface SocialButtonProps extends Omit<ButtonProps, \"children\"> {\n provider: Provider;\n /** Override the default \"Continue with …\" label. */\n label?: React.ReactNode;\n}\n\nconst SocialButton = React.forwardRef<HTMLButtonElement, SocialButtonProps>(\n ({ provider, label, className, variant = \"outline\", ...props }, ref) => (\n <Button\n ref={ref}\n variant={variant}\n className={cn(\"w-full gap-2.5\", className)}\n {...props}\n >\n {icons[provider]}\n {label ?? labels[provider]}\n </Button>\n )\n);\nSocialButton.displayName = \"SocialButton\";\n\nexport { SocialButton };\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","\"use client\";\n\nimport * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { motion } from \"motion/react\";\n\nimport { cn } from \"@/lib/cn\";\nimport { interaction, spring } from \"@/lib/motion-presets\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium 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:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground shadow-soft hover:bg-primary/90\",\n brand: \"bg-brand text-brand-foreground shadow-soft hover:bg-brand/90\",\n /* A gradient can't be dimmed with an alpha modifier the way `bg-brand/90` is, so the\n hover state lifts the whole ramp with a filter instead. */\n gradient:\n \"bg-gradient-brand text-brand-foreground shadow-soft transition-[filter,box-shadow] hover:brightness-110 hover:shadow-lift\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n outline:\n \"border border-input bg-card hover:bg-accent hover:text-accent-foreground\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n destructive:\n \"bg-destructive text-destructive-foreground shadow-soft hover:bg-destructive/90\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n sm: \"h-9 px-3.5\",\n default: \"h-10 px-5 py-2\",\n lg: \"h-12 px-7 text-base\",\n pill: \"h-11 rounded-full px-7\",\n icon: \"size-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\n/* Drag/animation handlers are omitted because Motion redefines them and they would\n otherwise collide with React's native DOM event types. */\ntype NativeButtonProps = Omit<\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n | \"onAnimationStart\"\n | \"onAnimationEnd\"\n | \"onAnimationIteration\"\n | \"onDrag\"\n | \"onDragStart\"\n | \"onDragEnd\"\n | \"onDragEnter\"\n | \"onDragLeave\"\n | \"onDragOver\"\n | \"onDrop\"\n>;\n\nexport interface ButtonProps\n extends NativeButtonProps,\n VariantProps<typeof buttonVariants> {\n /** Render as the child element (e.g. an `<a>`) instead of a `<button>`. Motion presets are omitted in this mode. */\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n if (asChild) {\n return (\n <Slot\n ref={ref}\n className={cn(\n buttonVariants({ variant, size }),\n // asChild has no Motion presets — give it CSS press feedback so links feel responsive too.\n \"transition-[transform,color,background-color,border-color,box-shadow] duration-150 ease-out active:scale-[0.98]\",\n className\n )}\n {...props}\n />\n );\n }\n\n return (\n <motion.button\n ref={ref}\n className={cn(buttonVariants({ variant, size, className }))}\n whileTap={interaction.tap}\n transition={spring.snappy}\n {...props}\n />\n );\n }\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\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":";;;A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,KAAC,UAAO;AAAA,EAChB,GAAG,gBAAAA,KAAC,SAAM;AACZ;AAQA,IAAM,eAAqB;AAAA,EACzB,CAAC,EAAE,UAAU,OAAO,WAAW,UAAU,WAAW,GAAG,MAAM,GAAG,QAC9D;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW,GAAG,kBAAkB,SAAS;AAAA,MACxC,GAAG;AAAA,MAEH;AAAA,cAAM,QAAQ;AAAA,QACd,SAAS,OAAO,QAAQ;AAAA;AAAA;AAAA,EAC3B;AAEJ;AACA,aAAa,cAAc;","names":["React","jsx"]}
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ import { Gap } from './gap.js';
3
+
4
+ interface SpacerProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ /** Fixed size from the shared gap scale (ignored when `grow`). */
6
+ size?: Gap;
7
+ /** Which axis the space occupies. */
8
+ axis?: "vertical" | "horizontal";
9
+ /** Grow to fill available space in a flex parent (a push-apart spacer) instead of a fixed size. */
10
+ grow?: boolean;
11
+ }
12
+ /**
13
+ * Explicit, intentional whitespace using the shared scale — instead of a stray `mt-*` on the next
14
+ * element. Fixed by default (`size`), or set `grow` to absorb free space in a flex row/column
15
+ * (e.g. push a trailing action to the end of a toolbar).
16
+ */
17
+ declare const Spacer: React.ForwardRefExoticComponent<SpacerProps & React.RefAttributes<HTMLDivElement>>;
18
+
19
+ export { Spacer, type SpacerProps };
package/dist/spacer.js ADDED
@@ -0,0 +1,52 @@
1
+ // src/components/ui/spacer.tsx
2
+ import * as React from "react";
3
+
4
+ // src/lib/cn.ts
5
+ import { clsx } from "clsx";
6
+ import { twMerge } from "tailwind-merge";
7
+ function cn(...inputs) {
8
+ return twMerge(clsx(inputs));
9
+ }
10
+
11
+ // src/lib/gap.ts
12
+ var spacerXClass = {
13
+ none: "w-0",
14
+ xs: "w-1",
15
+ sm: "w-2",
16
+ md: "w-4",
17
+ lg: "w-6",
18
+ xl: "w-8",
19
+ "2xl": "w-12"
20
+ };
21
+ var spacerYClass = {
22
+ none: "h-0",
23
+ xs: "h-1",
24
+ sm: "h-2",
25
+ md: "h-4",
26
+ lg: "h-6",
27
+ xl: "h-8",
28
+ "2xl": "h-12"
29
+ };
30
+
31
+ // src/components/ui/spacer.tsx
32
+ import { jsx } from "react/jsx-runtime";
33
+ var Spacer = React.forwardRef(
34
+ ({ className, size = "md", axis = "vertical", grow = false, ...props }, ref) => /* @__PURE__ */ jsx(
35
+ "div",
36
+ {
37
+ ref,
38
+ "aria-hidden": "true",
39
+ className: cn(
40
+ "shrink-0",
41
+ grow ? "flex-1 self-stretch" : axis === "horizontal" ? spacerXClass[size] : spacerYClass[size],
42
+ className
43
+ ),
44
+ ...props
45
+ }
46
+ )
47
+ );
48
+ Spacer.displayName = "Spacer";
49
+ export {
50
+ Spacer
51
+ };
52
+ //# sourceMappingURL=spacer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/spacer.tsx","../src/lib/cn.ts","../src/lib/gap.ts"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@/lib/cn\";\nimport { spacerXClass, spacerYClass, type Gap } from \"@/lib/gap\";\n\nexport interface SpacerProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Fixed size from the shared gap scale (ignored when `grow`). */\n size?: Gap;\n /** Which axis the space occupies. */\n axis?: \"vertical\" | \"horizontal\";\n /** Grow to fill available space in a flex parent (a push-apart spacer) instead of a fixed size. */\n grow?: boolean;\n}\n\n/**\n * Explicit, intentional whitespace using the shared scale — instead of a stray `mt-*` on the next\n * element. Fixed by default (`size`), or set `grow` to absorb free space in a flex row/column\n * (e.g. push a trailing action to the end of a toolbar).\n */\nconst Spacer = React.forwardRef<HTMLDivElement, SpacerProps>(\n ({ className, size = \"md\", axis = \"vertical\", grow = false, ...props }, ref) => (\n <div\n ref={ref}\n aria-hidden=\"true\"\n className={cn(\n \"shrink-0\",\n grow\n ? \"flex-1 self-stretch\"\n : axis === \"horizontal\"\n ? spacerXClass[size]\n : spacerYClass[size],\n className\n )}\n {...props}\n />\n )\n);\nSpacer.displayName = \"Spacer\";\n\nexport { Spacer };\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","/* -------------------------------------------------------------------------------------------------\n * kineto — the one spacing scale\n *\n * Every layout primitive (Stack, Flex, Grid) takes its `gap` from this single token set, and Spacer\n * sizes from the same steps. Codifying the scale here is the whole point: people compose with\n * `gap=\"md\"` instead of hand-writing one-off `mt-[14px]` margins, so spacing stays consistent.\n *\n * Steps map onto Tailwind's 4px base: xs=4 · sm=8 · md=16 · lg=24 · xl=32 · 2xl=48. The class\n * strings are written out in full (not interpolated) so Tailwind's scanner can see them.\n * ----------------------------------------------------------------------------------------------- */\n\nexport type Gap = \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\n\n/** `gap-*` utility per step — shared by Stack / Flex / Grid. */\nexport const gapClass: Record<Gap, string> = {\n none: \"gap-0\",\n xs: \"gap-1\",\n sm: \"gap-2\",\n md: \"gap-4\",\n lg: \"gap-6\",\n xl: \"gap-8\",\n \"2xl\": \"gap-12\",\n};\n\n/** Horizontal Spacer size (`w-*`) per step. */\nexport const spacerXClass: Record<Gap, string> = {\n none: \"w-0\",\n xs: \"w-1\",\n sm: \"w-2\",\n md: \"w-4\",\n lg: \"w-6\",\n xl: \"w-8\",\n \"2xl\": \"w-12\",\n};\n\n/** Vertical Spacer size (`h-*`) per step. */\nexport const spacerYClass: Record<Gap, string> = {\n none: \"h-0\",\n xs: \"h-1\",\n sm: \"h-2\",\n md: \"h-4\",\n lg: \"h-6\",\n xl: \"h-8\",\n \"2xl\": \"h-12\",\n};\n"],"mappings":";AAAA,YAAY,WAAW;;;ACAvB,SAAS,YAA6B;AACtC,SAAS,eAAe;AAOjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACeO,IAAM,eAAoC;AAAA,EAC/C,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AACT;AAGO,IAAM,eAAoC;AAAA,EAC/C,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AACT;;;AFvBI;AAFJ,IAAM,SAAe;AAAA,EACnB,CAAC,EAAE,WAAW,OAAO,MAAM,OAAO,YAAY,OAAO,OAAO,GAAG,MAAM,GAAG,QACtE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAY;AAAA,MACZ,WAAW;AAAA,QACT;AAAA,QACA,OACI,wBACA,SAAS,eACP,aAAa,IAAI,IACjB,aAAa,IAAI;AAAA,QACvB;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,OAAO,cAAc;","names":[]}
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+
3
+ declare const sizeClasses: {
4
+ readonly sm: "size-4 border-2";
5
+ readonly md: "size-6 border-2";
6
+ readonly lg: "size-8 border-[3px]";
7
+ };
8
+ interface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {
9
+ size?: keyof typeof sizeClasses;
10
+ label?: string;
11
+ }
12
+ /** Indeterminate loading spinner. Animated with Motion so it shares one engine. */
13
+ declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<HTMLSpanElement>>;
14
+
15
+ export { Spinner, type SpinnerProps };
@@ -0,0 +1,48 @@
1
+ "use client";
2
+
3
+ // src/components/ui/spinner.tsx
4
+ import * as React from "react";
5
+ import { motion } 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/components/ui/spinner.tsx
15
+ import { jsx } from "react/jsx-runtime";
16
+ var sizeClasses = {
17
+ sm: "size-4 border-2",
18
+ md: "size-6 border-2",
19
+ lg: "size-8 border-[3px]"
20
+ };
21
+ var Spinner = React.forwardRef(
22
+ ({ className, size = "md", label = "Loading", ...props }, ref) => /* @__PURE__ */ jsx(
23
+ "span",
24
+ {
25
+ ref,
26
+ role: "status",
27
+ "aria-label": label,
28
+ className: cn("inline-flex text-brand", className),
29
+ ...props,
30
+ children: /* @__PURE__ */ jsx(
31
+ motion.span,
32
+ {
33
+ className: cn(
34
+ "block rounded-full border-current border-t-transparent",
35
+ sizeClasses[size]
36
+ ),
37
+ animate: { rotate: 360 },
38
+ transition: { duration: 0.6, ease: "linear", repeat: Infinity }
39
+ }
40
+ )
41
+ }
42
+ )
43
+ );
44
+ Spinner.displayName = "Spinner";
45
+ export {
46
+ Spinner
47
+ };
48
+ //# sourceMappingURL=spinner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/spinner.tsx","../src/lib/cn.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { motion } from \"motion/react\";\n\nimport { cn } from \"@/lib/cn\";\n\nconst sizeClasses = {\n sm: \"size-4 border-2\",\n md: \"size-6 border-2\",\n lg: \"size-8 border-[3px]\",\n} as const;\n\nexport interface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {\n size?: keyof typeof sizeClasses;\n label?: string;\n}\n\n/** Indeterminate loading spinner. Animated with Motion so it shares one engine. */\nconst Spinner = React.forwardRef<HTMLSpanElement, SpinnerProps>(\n ({ className, size = \"md\", label = \"Loading\", ...props }, ref) => (\n <span\n ref={ref}\n role=\"status\"\n aria-label={label}\n className={cn(\"inline-flex text-brand\", className)}\n {...props}\n >\n <motion.span\n className={cn(\n \"block rounded-full border-current border-t-transparent\",\n sizeClasses[size]\n )}\n animate={{ rotate: 360 }}\n transition={{ duration: 0.6, ease: \"linear\", repeat: Infinity }}\n />\n </span>\n )\n);\nSpinner.displayName = \"Spinner\";\n\nexport { Spinner };\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"],"mappings":";;;AAEA,YAAY,WAAW;AACvB,SAAS,cAAc;;;ACHvB,SAAS,YAA6B;AACtC,SAAS,eAAe;AAOjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADkBM;AArBN,IAAM,cAAc;AAAA,EAClB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAQA,IAAM,UAAgB;AAAA,EACpB,CAAC,EAAE,WAAW,OAAO,MAAM,QAAQ,WAAW,GAAG,MAAM,GAAG,QACxD;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,MAAK;AAAA,MACL,cAAY;AAAA,MACZ,WAAW,GAAG,0BAA0B,SAAS;AAAA,MAChD,GAAG;AAAA,MAEJ;AAAA,QAAC,OAAO;AAAA,QAAP;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA,YAAY,IAAI;AAAA,UAClB;AAAA,UACA,SAAS,EAAE,QAAQ,IAAI;AAAA,UACvB,YAAY,EAAE,UAAU,KAAK,MAAM,UAAU,QAAQ,SAAS;AAAA;AAAA,MAChE;AAAA;AAAA,EACF;AAEJ;AACA,QAAQ,cAAc;","names":[]}
@@ -0,0 +1,27 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import { Gap } from './gap.js';
5
+
6
+ declare const stackVariants: (props?: ({
7
+ direction?: "horizontal" | "vertical" | null | undefined;
8
+ align?: "center" | "end" | "start" | "baseline" | "stretch" | null | undefined;
9
+ justify?: "center" | "end" | "start" | "between" | "around" | "evenly" | null | undefined;
10
+ wrap?: boolean | null | undefined;
11
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
12
+ interface StackProps extends React.HTMLAttributes<HTMLDivElement>, Omit<VariantProps<typeof stackVariants>, "wrap"> {
13
+ /** Space between children, from the shared gap scale. */
14
+ gap?: Gap;
15
+ /** Allow children to wrap onto multiple lines. */
16
+ wrap?: boolean;
17
+ /** Render as the child element instead of a `<div>`. */
18
+ asChild?: boolean;
19
+ }
20
+ /**
21
+ * Stack things in a line with a consistent gap. Vertical by default (the common case); flip to
22
+ * `direction="horizontal"` for a row. This is the primitive that replaces a hundred ad-hoc
23
+ * `space-y-*` / `mt-*` choices — pick a `gap` from the scale and move on.
24
+ */
25
+ declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
26
+
27
+ export { Stack, type StackProps, stackVariants };
package/dist/stack.js ADDED
@@ -0,0 +1,77 @@
1
+ // src/components/ui/stack.tsx
2
+ import * as React from "react";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { cva } from "class-variance-authority";
5
+
6
+ // src/lib/cn.ts
7
+ import { clsx } from "clsx";
8
+ import { twMerge } from "tailwind-merge";
9
+ function cn(...inputs) {
10
+ return twMerge(clsx(inputs));
11
+ }
12
+
13
+ // src/lib/gap.ts
14
+ var gapClass = {
15
+ none: "gap-0",
16
+ xs: "gap-1",
17
+ sm: "gap-2",
18
+ md: "gap-4",
19
+ lg: "gap-6",
20
+ xl: "gap-8",
21
+ "2xl": "gap-12"
22
+ };
23
+
24
+ // src/components/ui/stack.tsx
25
+ import { jsx } from "react/jsx-runtime";
26
+ var stackVariants = cva("flex min-w-0", {
27
+ variants: {
28
+ direction: {
29
+ vertical: "flex-col",
30
+ horizontal: "flex-row"
31
+ },
32
+ align: {
33
+ start: "items-start",
34
+ center: "items-center",
35
+ end: "items-end",
36
+ stretch: "items-stretch",
37
+ baseline: "items-baseline"
38
+ },
39
+ justify: {
40
+ start: "justify-start",
41
+ center: "justify-center",
42
+ end: "justify-end",
43
+ between: "justify-between",
44
+ around: "justify-around",
45
+ evenly: "justify-evenly"
46
+ },
47
+ wrap: {
48
+ true: "flex-wrap",
49
+ false: "flex-nowrap"
50
+ }
51
+ },
52
+ defaultVariants: {
53
+ direction: "vertical",
54
+ align: "stretch",
55
+ justify: "start",
56
+ wrap: false
57
+ }
58
+ });
59
+ var Stack = React.forwardRef(
60
+ ({ className, direction, align, justify, wrap, gap = "md", asChild = false, ...props }, ref) => {
61
+ const Comp = asChild ? Slot : "div";
62
+ return /* @__PURE__ */ jsx(
63
+ Comp,
64
+ {
65
+ ref,
66
+ className: cn(stackVariants({ direction, align, justify, wrap }), gapClass[gap], className),
67
+ ...props
68
+ }
69
+ );
70
+ }
71
+ );
72
+ Stack.displayName = "Stack";
73
+ export {
74
+ Stack,
75
+ stackVariants
76
+ };
77
+ //# sourceMappingURL=stack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/stack.tsx","../src/lib/cn.ts","../src/lib/gap.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/cn\";\nimport { gapClass, type Gap } from \"@/lib/gap\";\n\nconst stackVariants = cva(\"flex min-w-0\", {\n variants: {\n direction: {\n vertical: \"flex-col\",\n horizontal: \"flex-row\",\n },\n align: {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n stretch: \"items-stretch\",\n baseline: \"items-baseline\",\n },\n justify: {\n start: \"justify-start\",\n center: \"justify-center\",\n end: \"justify-end\",\n between: \"justify-between\",\n around: \"justify-around\",\n evenly: \"justify-evenly\",\n },\n wrap: {\n true: \"flex-wrap\",\n false: \"flex-nowrap\",\n },\n },\n defaultVariants: {\n direction: \"vertical\",\n align: \"stretch\",\n justify: \"start\",\n wrap: false,\n },\n});\n\nexport interface StackProps\n extends React.HTMLAttributes<HTMLDivElement>,\n Omit<VariantProps<typeof stackVariants>, \"wrap\"> {\n /** Space between children, from the shared gap scale. */\n gap?: Gap;\n /** Allow children to wrap onto multiple lines. */\n wrap?: boolean;\n /** Render as the child element instead of a `<div>`. */\n asChild?: boolean;\n}\n\n/**\n * Stack things in a line with a consistent gap. Vertical by default (the common case); flip to\n * `direction=\"horizontal\"` for a row. This is the primitive that replaces a hundred ad-hoc\n * `space-y-*` / `mt-*` choices — pick a `gap` from the scale and move on.\n */\nconst Stack = React.forwardRef<HTMLDivElement, StackProps>(\n ({ className, direction, align, justify, wrap, gap = \"md\", asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"div\";\n return (\n <Comp\n ref={ref}\n className={cn(stackVariants({ direction, align, justify, wrap }), gapClass[gap], className)}\n {...props}\n />\n );\n }\n);\nStack.displayName = \"Stack\";\n\nexport { Stack, stackVariants };\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","/* -------------------------------------------------------------------------------------------------\n * kineto — the one spacing scale\n *\n * Every layout primitive (Stack, Flex, Grid) takes its `gap` from this single token set, and Spacer\n * sizes from the same steps. Codifying the scale here is the whole point: people compose with\n * `gap=\"md\"` instead of hand-writing one-off `mt-[14px]` margins, so spacing stays consistent.\n *\n * Steps map onto Tailwind's 4px base: xs=4 · sm=8 · md=16 · lg=24 · xl=32 · 2xl=48. The class\n * strings are written out in full (not interpolated) so Tailwind's scanner can see them.\n * ----------------------------------------------------------------------------------------------- */\n\nexport type Gap = \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\n\n/** `gap-*` utility per step — shared by Stack / Flex / Grid. */\nexport const gapClass: Record<Gap, string> = {\n none: \"gap-0\",\n xs: \"gap-1\",\n sm: \"gap-2\",\n md: \"gap-4\",\n lg: \"gap-6\",\n xl: \"gap-8\",\n \"2xl\": \"gap-12\",\n};\n\n/** Horizontal Spacer size (`w-*`) per step. */\nexport const spacerXClass: Record<Gap, string> = {\n none: \"w-0\",\n xs: \"w-1\",\n sm: \"w-2\",\n md: \"w-4\",\n lg: \"w-6\",\n xl: \"w-8\",\n \"2xl\": \"w-12\",\n};\n\n/** Vertical Spacer size (`h-*`) per step. */\nexport const spacerYClass: Record<Gap, string> = {\n none: \"h-0\",\n xs: \"h-1\",\n sm: \"h-2\",\n md: \"h-4\",\n lg: \"h-6\",\n xl: \"h-8\",\n \"2xl\": \"h-12\",\n};\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AACrB,SAAS,WAA8B;;;ACFvC,SAAS,YAA6B;AACtC,SAAS,eAAe;AAOjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACIO,IAAM,WAAgC;AAAA,EAC3C,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AACT;;;AFuCM;AAtDN,IAAM,gBAAgB,IAAI,gBAAgB;AAAA,EACxC,UAAU;AAAA,IACR,WAAW;AAAA,MACT,UAAU;AAAA,MACV,YAAY;AAAA,IACd;AAAA,IACA,OAAO;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,KAAK;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,IACZ;AAAA,IACA,SAAS;AAAA,MACP,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,KAAK;AAAA,MACL,SAAS;AAAA,MACT,QAAQ;AA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