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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sakti Kumar Chourasia
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,279 @@
1
+ # Kineto
2
+
3
+ A drop-in library of beautifully animated, copy-paste React components — in the spirit of
4
+ [shadcn/ui](https://ui.shadcn.com), but with **motion as a first-class concern**, powered by
5
+ [Motion](https://motion.dev) (package `motion`).
6
+
7
+ The defining idea is the same as shadcn: **components are source you own, not an installed
8
+ black box.** Every component is self-contained, readable, themeable via CSS variables, and
9
+ droppable into any React + Tailwind project with **zero custom runtime or provider required**.
10
+
11
+ ```
12
+ . # repo root = the published `kineto` npm package
13
+ src/
14
+ lib/
15
+ cn.ts # cn() = twMerge(clsx(...))
16
+ gap.ts # spacing scale helper
17
+ format-time.ts # relative/absolute time formatting
18
+ motion-presets.ts # variants + transition tokens (single source of truth)
19
+ use-reduced-motion.ts
20
+ components/
21
+ ui/ # primitives: button, badge, card, input, label, separator,
22
+ # switch, tooltip, avatar, select, dropdown-menu, progress,
23
+ # segmented-control, skeleton, dialog, tabs, accordion, …
24
+ application/ # app surfaces: stat-card, data-table, sidebar, logo-cloud, …
25
+ charts/ # data viz: area, bar, line, donut + chart-tooltip
26
+ styles/
27
+ theme.css # SHIPPED: tokens (:root + .dark) + Tailwind v4 @theme + @utility
28
+ base.css # SHIPPED (optional): opinionated document styles
29
+ kineto.css # docs-site aggregator — imports both; not published
30
+ index.ts # public barrel for the npm package
31
+ tsup.config.ts # library build → dist/ (ESM, per-component + barrel)
32
+ site/ # the docs site (separate Next.js app; imports the library source)
33
+ ```
34
+
35
+ ## Installation — three ways to consume
36
+
37
+ kineto is both a published library **and** a copy-the-source registry. Pick whichever fits.
38
+
39
+ ### 1. shadcn CLI (copy the source into your project — the community default)
40
+
41
+ Every component is served as a [shadcn](https://ui.shadcn.com/docs/cli)-spec registry item, so
42
+ the CLI writes the real source (plus its internal deps like `cn` and `motion-presets`) into your
43
+ own `components/` and installs the npm deps it needs:
44
+
45
+ ```bash
46
+ # add the tokens once, then any component(s)
47
+ npx shadcn@latest add https://<your-site>/r/kineto-theme.json
48
+ npx shadcn@latest add https://<your-site>/r/button.json
49
+ ```
50
+
51
+ `registryDependencies` resolve automatically (e.g. `date-picker` pulls in `button`, `calendar`,
52
+ and `popover`). Browse the index at `https://<your-site>/r/registry.json`. The theme item carries
53
+ the color tokens; the utility layer it doesn't cover — `bg-dots`/`bg-grid`/`bg-grain`, the
54
+ `bg-gradient-*` set, `shadow-soft`/`shadow-lift`, font mappings — comes from
55
+ `@import "kineto/theme.css"`. `GradientText` and `GradientBorder` need that import specifically.
56
+
57
+ ### 2. npm package (install the built library)
58
+
59
+ ```bash
60
+ npm i kineto
61
+ ```
62
+
63
+ Then wire it into your Tailwind entry. **Both lines are required** — the `@import` defines the
64
+ tokens, and the `@source` is what makes Tailwind generate CSS for the classes inside our compiled
65
+ components. Tailwind v4 never scans `node_modules` on its own, so without the `@source` you get a
66
+ clean build and completely unstyled components:
67
+
68
+ ```css
69
+ /* index.css / globals.css */
70
+ @import "tailwindcss";
71
+
72
+ @import "../node_modules/kineto/theme.css";
73
+ @source "../node_modules/kineto/**/*.js";
74
+
75
+ /* Optional — opinionated document styles (body, selection, focus ring, scrollbars). */
76
+ @import "../node_modules/kineto/base.css";
77
+
78
+ /* Your customizations go after this: redefine any token on :root / .dark to re-skin. */
79
+ ```
80
+
81
+ ```tsx
82
+ import { Card } from "kineto/card"; // subpath — always tree-shakes, always server-safe
83
+ import { Button } from "kineto"; // barrel — fine, but see the Next note below
84
+ ```
85
+
86
+ We ship **no pre-built CSS**. Every class resolves in your Tailwind build from your own config, so
87
+ you get only the utilities you actually use and your overrides win normally.
88
+
89
+ Both forms are tree-shakeable. `dist/index.js` is a re-export map over the per-component files, not
90
+ a bundle, so each component stays its own module and keeps its own `"use client"` boundary — the 20
91
+ directive-free primitives (`badge`, `input`, `container`, …) render on the server through the barrel
92
+ too.
93
+
94
+ **Next.js users: add one line.** Next turns every `"use client"` module reachable from a barrel into
95
+ a client entry, and client entries are graph roots that webpack will not shake away. Next's own
96
+ remedy rewrites barrel imports to subpath imports at compile time:
97
+
98
+ ```js
99
+ // next.config.mjs
100
+ export default { experimental: { optimizePackageImports: ["kineto"] } };
101
+ ```
102
+
103
+ Measured, Next 14 App Router, page rendering one `<Button>` (First Load JS):
104
+
105
+ | import | plain | with `optimizePackageImports` |
106
+ | --- | --- | --- |
107
+ | `from "kineto"` | 476 kB | **131 kB** |
108
+ | `from "kineto/button"` | 131 kB | 131 kB |
109
+
110
+ Bundlers that shake on the module graph directly — Vite, Rollup, plain webpack outside the RSC
111
+ pipeline — need no configuration: there the barrel and the subpath emit byte-identical output
112
+ (3,085 B for one `Button`, vendor external). If you would rather not touch `next.config.mjs`, use
113
+ the subpath import; it is the one form that is optimal everywhere.
114
+
115
+ All peers (`react`, `react-dom`, `motion`) are external; Radix/lucide/etc. ship as deps.
116
+
117
+ ### 3. Manual copy
118
+
119
+ 1. Copy `src/lib/cn.ts`, `src/lib/motion-presets.ts`, and (optionally) `use-reduced-motion.ts`.
120
+ 2. Copy any component file from `src/components/**`.
121
+ 3. Copy the design tokens from `src/styles/theme.css` into your global stylesheet (and
122
+ `src/styles/base.css` if you want the document-level styles too).
123
+
124
+ Each component imports only from `react`, `motion/react`, `@/lib/cn`, `@/lib/motion-presets`,
125
+ Radix (where applicable), and `lucide-react`. Drop it in and it renders and animates — no wiring.
126
+
127
+ Tailwind CSS **v4** is used for styling (CSS-first config — see below).
128
+
129
+ ## Theming with CSS variables
130
+
131
+ All colors, radii, and shadows read from HSL CSS variables (like shadcn). Components never
132
+ hardcode a hex value, so the entire library re-skins when you change the tokens or toggle
133
+ the `.dark` class.
134
+
135
+ ```css
136
+ /* globals.css */
137
+ :root {
138
+ --background: 38 36% 97%; /* warm near-white */
139
+ --foreground: 24 12% 12%; /* warm near-black */
140
+ --primary: 24 14% 13%; /* ink — buttons & controls */
141
+ --brand: 22 92% 52%; /* the one orange accent */
142
+ --success: 142 58% 37%;
143
+ --warning: 36 95% 46%;
144
+ /* ...etc */
145
+ --radius: 0.85rem;
146
+ }
147
+
148
+ .dark { /* dark is the default theme */
149
+ --background: 24 14% 7%; /* warm charcoal */
150
+ --foreground: 40 18% 92%;
151
+ --primary: 40 30% 96%; /* near-white ink */
152
+ --brand: 22 95% 57%;
153
+ /* ...etc */
154
+ }
155
+ ```
156
+
157
+ The identity keeps **ink** (near-black / near-white) as the primary for buttons and controls,
158
+ and reserves a single **orange `--brand`** accent for emphasis, focus rings, and data. Beyond
159
+ the shadcn base tokens it adds **status** colors (`--success`, `--warning`), a 5-stop
160
+ **chart palette** (`--chart-1` … `--chart-5` — orange + warm greys) so data-display
161
+ components stay on-theme in both modes, and a **gradient** layer (see below). Use the `brand`
162
+ Button/Badge variants for orange CTAs.
163
+
164
+ ### Gradients
165
+
166
+ Gradients are part of the token system, not one-off `linear-gradient(...)` calls sprinkled through
167
+ components. **Two stops and one angle** compose every gradient the library ships:
168
+
169
+ | Token | Default | Notes |
170
+ | --- | --- | --- |
171
+ | `--gradient-from` | *unset* → `--brand` | Bare `H S% L%` triple, like every other color token. |
172
+ | `--gradient-to` | *unset* → `--chart-3` | The accent's lighter sibling in every preset. |
173
+ | `--gradient-angle` | `135deg` | Applies to the linear ramps. |
174
+
175
+ Leaving the stops unset is the intended default: the utilities read them as
176
+ `var(--gradient-from, var(--brand))`, so **the ramp follows whatever accent is in scope** — light,
177
+ dark, a preset, or a subtree that re-colors `--brand`. That fallback is deliberate. Declaring
178
+ `--gradient-from: var(--brand)` on `:root` would substitute *there* and keep serving the light
179
+ accent to a nested `.dark` section. Pin the stops only when the ramp shouldn't track the accent:
180
+
181
+ ```css
182
+ :root {
183
+ --gradient-from: 265 85% 58%; /* violet → cyan, regardless of --brand */
184
+ --gradient-to: 190 90% 55%;
185
+ --gradient-angle: 100deg;
186
+ }
187
+ ```
188
+
189
+ The utilities (all set `background-image` only, so they stack with `text-*` / `border-*`):
190
+
191
+ | Utility | Use |
192
+ | --- | --- |
193
+ | `bg-gradient-brand` | The accent ramp at full strength. Pair with `text-brand-foreground`. |
194
+ | `bg-gradient-brand-soft` | Same ramp at wash strength, under readable foreground text. |
195
+ | `bg-gradient-brand-loop` | Seamless double-width ramp for panning animations. |
196
+ | `bg-gradient-surface` | Neutral top-lit sheen for raised surfaces. |
197
+ | `bg-gradient-hairline` | A 1px border that fades along its run. |
198
+ | `bg-gradient-mesh` | Atmospheric multi-blob backdrop for heroes and empty states. |
199
+ | `bg-gradient-fade` | Surface → transparent, for scroll edges. |
200
+ | `text-gradient-brand` | Gradient-filled text (static). |
201
+
202
+ For one-off directions the stops are also exposed as real colors, so Tailwind's own gradient
203
+ utilities work off the themed ramp: `bg-linear-to-r from-gradient-from to-gradient-to`.
204
+
205
+ Two components add motion on top of the same tokens — `GradientText` (pans the ramp across the
206
+ glyphs) and `GradientBorder` (a masked gradient hairline with an optional rotating sweep) — and
207
+ `Button`, `Badge`, and `FeaturedIcon` each gained a `gradient` variant.
208
+
209
+ In Tailwind v4 the old `tailwind.config.ts` is replaced by a CSS-first `@theme` block that
210
+ maps those tokens to utilities (`bg-background`, `text-primary`, `rounded-lg`,
211
+ `font-display`, `shadow-lift`, …):
212
+
213
+ ```css
214
+ @theme inline {
215
+ --color-background: hsl(var(--background));
216
+ --color-primary: hsl(var(--primary));
217
+ --radius-lg: var(--radius);
218
+ /* ...etc */
219
+ }
220
+ ```
221
+
222
+ To re-theme: change the token values. To go dark: add `dark` to the `<html>` class. That's
223
+ the whole story — no component edits.
224
+
225
+ ## The animation system
226
+
227
+ Motion is **systematic, not improvised.** Everything references
228
+ [`lib/motion-presets.ts`](src/lib/motion-presets.ts):
229
+
230
+ - **Transition tokens** — `spring.snappy`, `spring.soft`, `spring.bouncy`, `tween.smooth`,
231
+ `tween.quick`.
232
+ - **Reveal variants** — `fadeUp`, `fadeIn`, `scaleIn`, `slideInLeft/Right`, `blurIn`.
233
+ - **Stagger helpers** — `staggerContainer(stagger, delay)` + `staggerItem`.
234
+ - **Interaction presets** — `interaction.hover`, `interaction.tap`, `interaction.cardHover`.
235
+ - **Viewport** — `viewportOnce` for scroll-triggered reveals.
236
+
237
+ Principles baked in:
238
+
239
+ - **Respects `prefers-reduced-motion`.** Wrap your app once in
240
+ `<MotionConfig reducedMotion="user">` (see `src/components/site/providers.tsx`) and all
241
+ declarative reveals collapse to instant/opacity-only. Imperative loops like the marquee
242
+ branch on `useReducedMotion()` and stop entirely.
243
+ - **Scroll reveals** use `whileInView` with `viewport={{ once: true, margin: "-15%" }}`.
244
+ - **Transform & opacity only** (plus an occasional `filter: blur`) — never layout-thrashing
245
+ properties.
246
+ - **One engine.** No CSS keyframes for component motion; even the accordion height reveal
247
+ runs through Motion.
248
+
249
+ ## Repo scripts
250
+
251
+ The library lives at the repo root; the Next.js (App Router) docs site is a workspace member in
252
+ `site/` that imports the library *source* (via the `@/* → ["../src/*","./src/*"]` alias), so edits
253
+ show up instantly with no rebuild.
254
+
255
+ ```bash
256
+ pnpm install # one hoisted install for the whole workspace
257
+
258
+ # docs site
259
+ pnpm dev # runs site/ (Next dev)
260
+ pnpm site:build # production build of the docs site (also generates /r/*.json)
261
+
262
+ # library
263
+ pnpm build:lib # type-check (strict) + tsup → dist/ (what npm publishes)
264
+ pnpm typecheck:lib
265
+ ```
266
+
267
+ - `/` — a live showcase built from the real blocks.
268
+ - `/docs/<slug>` — each component with install tabs (shadcn CLI + npm), an interactive props
269
+ **Playground**, a live preview, the prop table, and one-click copy of the exact source file
270
+ (read straight from disk, so it never drifts).
271
+ - `/r/<name>.json` — the shadcn registry endpoint (set `NEXT_PUBLIC_SITE_URL` in production so
272
+ cross-item `registryDependencies` URLs point at your deployed origin).
273
+
274
+ ## Stack
275
+
276
+ React 18 · TypeScript (strict) · Tailwind CSS v4 · Motion · Radix UI · lucide-react ·
277
+ Next.js (docs site). Fonts: **Fraunces** (editorial serif display) + **Inter** (body) + **JetBrains Mono**.
278
+
279
+ MIT licensed. The components are yours.
package/base.css ADDED
@@ -0,0 +1,46 @@
1
+ /* -------------------------------------------------------------------------------------------------
2
+ * kineto/base.css — OPTIONAL opinionated global styles.
3
+ *
4
+ * Import this only if you want kineto to style your document, not just your components: body
5
+ * background/foreground/font, smooth scrolling, the display-serif optical tweak, selection
6
+ * color, focus-visible ring, and thin themed scrollbars.
7
+ *
8
+ * @import "../node_modules/kineto/theme.css";
9
+ * @import "../node_modules/kineto/base.css";
10
+ *
11
+ * Requires theme.css (it reads --brand, --ring, --border). Skipping this file costs you nothing
12
+ * structural — every component still renders correctly; the page around them just stays yours.
13
+ * ----------------------------------------------------------------------------------------------- */
14
+
15
+ @layer base {
16
+ html {
17
+ -webkit-text-size-adjust: 100%;
18
+ scroll-behavior: smooth;
19
+ }
20
+
21
+ body {
22
+ @apply bg-background text-foreground font-sans antialiased;
23
+ font-feature-settings: "ss01", "cv01", "cv11";
24
+ text-rendering: optimizeLegibility;
25
+ }
26
+
27
+ /* Editorial serif display: optical sizing on, restrained tracking. */
28
+ .font-display {
29
+ font-optical-sizing: auto;
30
+ letter-spacing: -0.015em;
31
+ }
32
+
33
+ ::selection {
34
+ background-color: hsl(var(--brand) / 0.24);
35
+ }
36
+
37
+ :focus-visible {
38
+ outline: 2px solid hsl(var(--ring));
39
+ outline-offset: 2px;
40
+ }
41
+
42
+ * {
43
+ scrollbar-width: thin;
44
+ scrollbar-color: hsl(var(--border)) transparent;
45
+ }
46
+ }
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
4
+
5
+ declare const Accordion: {
6
+ ({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): react_jsx_runtime.JSX.Element;
7
+ displayName: string;
8
+ };
9
+ declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
11
+ declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+
13
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
@@ -0,0 +1,161 @@
1
+ "use client";
2
+
3
+ // src/components/ui/accordion.tsx
4
+ import * as React from "react";
5
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
6
+ import { motion, useReducedMotion } from "motion/react";
7
+ import { ChevronDown } from "lucide-react";
8
+
9
+ // src/lib/cn.ts
10
+ import { clsx } from "clsx";
11
+ import { twMerge } from "tailwind-merge";
12
+ function cn(...inputs) {
13
+ return twMerge(clsx(inputs));
14
+ }
15
+
16
+ // src/lib/motion-presets.ts
17
+ var spring = {
18
+ /** Quick, decisive — buttons, indicators, dropdowns. */
19
+ snappy: { type: "spring", stiffness: 420, damping: 32, mass: 0.8 },
20
+ /** Calm and weighty — dialogs, cards, larger surfaces. */
21
+ soft: { type: "spring", stiffness: 180, damping: 26 },
22
+ /** Playful overshoot — badges, toggles, delight moments. Use sparingly. */
23
+ bouncy: { type: "spring", stiffness: 480, damping: 18, mass: 0.9 }
24
+ };
25
+ var tween = {
26
+ /** The signature easing — an expressive ease-out for orchestrated reveals. */
27
+ smooth: { type: "tween", duration: 0.45, ease: [0.22, 1, 0.36, 1] },
28
+ /** Faster variant for small elements. */
29
+ quick: { type: "tween", duration: 0.28, ease: [0.22, 1, 0.36, 1] },
30
+ /** Longer, settled curve for drawing charts, count-ups, and progress fills. */
31
+ draw: { type: "tween", duration: 1.1, ease: [0.16, 1, 0.3, 1] }
32
+ };
33
+ var fadeUp = {
34
+ hidden: { opacity: 0, y: 18 },
35
+ visible: { opacity: 1, y: 0, transition: tween.smooth }
36
+ };
37
+ var fadeIn = {
38
+ hidden: { opacity: 0 },
39
+ visible: { opacity: 1, transition: tween.smooth }
40
+ };
41
+ var scaleIn = {
42
+ hidden: { opacity: 0, scale: 0.96 },
43
+ visible: { opacity: 1, scale: 1, transition: spring.soft }
44
+ };
45
+ var slideInLeft = {
46
+ hidden: { opacity: 0, x: -28 },
47
+ visible: { opacity: 1, x: 0, transition: tween.smooth }
48
+ };
49
+ var slideInRight = {
50
+ hidden: { opacity: 0, x: 28 },
51
+ visible: { opacity: 1, x: 0, transition: tween.smooth }
52
+ };
53
+ var blurIn = {
54
+ hidden: { opacity: 0, filter: "blur(12px)" },
55
+ visible: { opacity: 1, filter: "blur(0px)", transition: tween.smooth }
56
+ };
57
+
58
+ // src/components/ui/accordion.tsx
59
+ import { jsx, jsxs } from "react/jsx-runtime";
60
+ var AccordionOpenContext = React.createContext([]);
61
+ var AccordionItemContext = React.createContext("");
62
+ function toArray(value) {
63
+ if (value == null) return [];
64
+ return Array.isArray(value) ? value : [value];
65
+ }
66
+ var Accordion = ({
67
+ className,
68
+ children,
69
+ ...props
70
+ }) => {
71
+ const radixProps = props;
72
+ const [open, setOpen] = React.useState(
73
+ () => toArray(radixProps.defaultValue ?? radixProps.value)
74
+ );
75
+ React.useEffect(() => {
76
+ if (radixProps.value !== void 0) setOpen(toArray(radixProps.value));
77
+ }, [radixProps.value]);
78
+ const handleValueChange = (value) => {
79
+ setOpen(toArray(value));
80
+ radixProps.onValueChange?.(value);
81
+ };
82
+ return /* @__PURE__ */ jsx(AccordionOpenContext.Provider, { value: open, children: /* @__PURE__ */ jsx(
83
+ AccordionPrimitive.Root,
84
+ {
85
+ ...props,
86
+ onValueChange: handleValueChange,
87
+ className: cn("w-full", className),
88
+ children
89
+ }
90
+ ) });
91
+ };
92
+ Accordion.displayName = "Accordion";
93
+ var AccordionItem = React.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value, children: /* @__PURE__ */ jsx(
94
+ AccordionPrimitive.Item,
95
+ {
96
+ ref,
97
+ value,
98
+ className: cn("border-b border-border", className),
99
+ ...props
100
+ }
101
+ ) }));
102
+ AccordionItem.displayName = "AccordionItem";
103
+ var AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => {
104
+ const open = React.useContext(AccordionOpenContext);
105
+ const itemValue = React.useContext(AccordionItemContext);
106
+ const reduced = useReducedMotion();
107
+ const isOpen = open.includes(itemValue);
108
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
109
+ AccordionPrimitive.Trigger,
110
+ {
111
+ ref,
112
+ className: cn(
113
+ "flex flex-1 items-center justify-between gap-4 py-4 text-left text-base font-medium transition-colors hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
114
+ className
115
+ ),
116
+ ...props,
117
+ children: [
118
+ children,
119
+ /* @__PURE__ */ jsx(
120
+ motion.span,
121
+ {
122
+ "aria-hidden": true,
123
+ className: "shrink-0 text-muted-foreground",
124
+ animate: { rotate: isOpen ? 180 : 0 },
125
+ transition: reduced ? { duration: 0 } : spring.snappy,
126
+ children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4" })
127
+ }
128
+ )
129
+ ]
130
+ }
131
+ ) });
132
+ });
133
+ AccordionTrigger.displayName = "AccordionTrigger";
134
+ var AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => {
135
+ const open = React.useContext(AccordionOpenContext);
136
+ const itemValue = React.useContext(AccordionItemContext);
137
+ const reduced = useReducedMotion();
138
+ const isOpen = open.includes(itemValue);
139
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Content, { asChild: true, forceMount: true, ref, ...props, children: /* @__PURE__ */ jsx(
140
+ motion.div,
141
+ {
142
+ className: "overflow-hidden",
143
+ initial: false,
144
+ animate: isOpen ? "open" : "closed",
145
+ variants: reduced ? { open: { opacity: 1 }, closed: { opacity: 0 } } : {
146
+ open: { height: "auto", opacity: 1 },
147
+ closed: { height: 0, opacity: 0 }
148
+ },
149
+ transition: reduced ? { duration: 0 } : tween.quick,
150
+ children: /* @__PURE__ */ jsx("div", { className: cn("pb-4 pt-0 text-muted-foreground", className), children })
151
+ }
152
+ ) });
153
+ });
154
+ AccordionContent.displayName = "AccordionContent";
155
+ export {
156
+ Accordion,
157
+ AccordionContent,
158
+ AccordionItem,
159
+ AccordionTrigger
160
+ };
161
+ //# sourceMappingURL=accordion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/accordion.tsx","../src/lib/cn.ts","../src/lib/motion-presets.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\";\nimport { motion, useReducedMotion } from \"motion/react\";\nimport { ChevronDown } from \"lucide-react\";\n\nimport { cn } from \"@/lib/cn\";\nimport { spring, tween } from \"@/lib/motion-presets\";\n\n/* Tracks which items are open so the trigger chevron and the content height\n reveal can be driven by Motion rather than CSS keyframes. */\nconst AccordionOpenContext = React.createContext<string[]>([]);\nconst AccordionItemContext = React.createContext<string>(\"\");\n\nfunction toArray(value: string | string[] | undefined): string[] {\n if (value == null) return [];\n return Array.isArray(value) ? value : [value];\n}\n\nconst Accordion = ({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Root>) => {\n // Radix's value type is a `single | multiple` union; cast through `any` to read it\n // uniformly while keeping the public prop types intact for consumers.\n const radixProps = props as {\n value?: string | string[];\n defaultValue?: string | string[];\n onValueChange?: (value: string | string[]) => void;\n };\n\n const [open, setOpen] = React.useState<string[]>(() =>\n toArray(radixProps.defaultValue ?? radixProps.value)\n );\n\n React.useEffect(() => {\n if (radixProps.value !== undefined) setOpen(toArray(radixProps.value));\n }, [radixProps.value]);\n\n const handleValueChange = (value: string | string[]) => {\n setOpen(toArray(value));\n radixProps.onValueChange?.(value);\n };\n\n return (\n <AccordionOpenContext.Provider value={open}>\n <AccordionPrimitive.Root\n {...(props as React.ComponentProps<typeof AccordionPrimitive.Root>)}\n onValueChange={handleValueChange as never}\n className={cn(\"w-full\", className)}\n >\n {children}\n </AccordionPrimitive.Root>\n </AccordionOpenContext.Provider>\n );\n};\nAccordion.displayName = \"Accordion\";\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, value, ...props }, ref) => (\n <AccordionItemContext.Provider value={value}>\n <AccordionPrimitive.Item\n ref={ref}\n value={value}\n className={cn(\"border-b border-border\", className)}\n {...props}\n />\n </AccordionItemContext.Provider>\n));\nAccordionItem.displayName = \"AccordionItem\";\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => {\n const open = React.useContext(AccordionOpenContext);\n const itemValue = React.useContext(AccordionItemContext);\n const reduced = useReducedMotion();\n const isOpen = open.includes(itemValue);\n\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex flex-1 items-center justify-between gap-4 py-4 text-left text-base font-medium transition-colors hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n className\n )}\n {...props}\n >\n {children}\n <motion.span\n aria-hidden\n className=\"shrink-0 text-muted-foreground\"\n animate={{ rotate: isOpen ? 180 : 0 }}\n transition={reduced ? { duration: 0 } : spring.snappy}\n >\n <ChevronDown className=\"size-4\" />\n </motion.span>\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n );\n});\nAccordionTrigger.displayName = \"AccordionTrigger\";\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => {\n const open = React.useContext(AccordionOpenContext);\n const itemValue = React.useContext(AccordionItemContext);\n const reduced = useReducedMotion();\n const isOpen = open.includes(itemValue);\n\n return (\n <AccordionPrimitive.Content asChild forceMount ref={ref} {...props}>\n <motion.div\n className=\"overflow-hidden\"\n initial={false}\n animate={isOpen ? \"open\" : \"closed\"}\n variants={\n reduced\n ? { open: { opacity: 1 }, closed: { opacity: 0 } }\n : {\n open: { height: \"auto\", opacity: 1 },\n closed: { height: 0, opacity: 0 },\n }\n }\n transition={reduced ? { duration: 0 } : tween.quick}\n >\n <div className={cn(\"pb-4 pt-0 text-muted-foreground\", className)}>\n {children}\n </div>\n </motion.div>\n </AccordionPrimitive.Content>\n );\n});\nAccordionContent.displayName = \"AccordionContent\";\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent };\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,wBAAwB;AACpC,SAAS,QAAQ,wBAAwB;AACzC,SAAS,mBAAmB;;;ACL5B,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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,MAClC;AAAA,MAEN,YAAY,UAAU,EAAE,UAAU,EAAE,IAAI,MAAM;AAAA,MAE9C,8BAAC,SAAI,WAAW,GAAG,mCAAmC,SAAS,GAC5D,UACH;AAAA;AAAA,EACF,GACF;AAEJ,CAAC;AACD,iBAAiB,cAAc;","names":[]}
@@ -0,0 +1,20 @@
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 { HTMLMotionProps } from 'motion/react';
5
+ import { LucideIcon } from 'lucide-react';
6
+
7
+ declare const alertVariants: (props?: ({
8
+ variant?: "default" | "brand" | "success" | "warning" | "destructive" | null | undefined;
9
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
10
+ interface AlertProps extends Omit<HTMLMotionProps<"div">, "title">, VariantProps<typeof alertVariants> {
11
+ title?: React.ReactNode;
12
+ /** Override the leading icon, or pass `null` to hide it. */
13
+ icon?: LucideIcon | null;
14
+ /** Render a trailing close button; the alert animates out on dismiss. */
15
+ onClose?: () => void;
16
+ children?: React.ReactNode;
17
+ }
18
+ declare const Alert: React.ForwardRefExoticComponent<Omit<AlertProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+
20
+ export { Alert, type AlertProps, alertVariants };