kineto 0.1.1 → 0.2.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.
package/README.md CHANGED
@@ -1,283 +1,72 @@
1
1
  # Kineto
2
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`).
3
+ Kineto is a React component library with built-in motion. Buttons respond to a
4
+ press, dialogs animate open, and charts animate in. Use the same presets in your
5
+ own components to keep those interactions consistent.
6
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**.
7
+ [Browse components and live previews](https://kineto-theta.vercel.app/docs)
10
8
 
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.
9
+ ## Get started
56
10
 
57
- ### 2. npm package (install the built library)
11
+ In a React app with Tailwind CSS v4, install Kineto and Motion.
58
12
 
59
- ```bash
60
- npm i kineto
13
+ ```sh
14
+ npm install kineto motion
61
15
  ```
62
16
 
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:
17
+ Add the theme and register Kineto's compiled components in your Tailwind entry
18
+ file. Adjust both paths relative to that file.
67
19
 
68
20
  ```css
69
- /* index.css / globals.css */
70
21
  @import "tailwindcss";
71
-
72
22
  @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. */
23
+ @source "../node_modules/kineto/dist";
79
24
  ```
80
25
 
81
26
  ```tsx
82
- import { Button } from "kineto"; // root import — tree-shakes
83
- import { Card } from "kineto/card"; // subpath — identical output, zero config
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.
27
+ import { Button } from "kineto/button";
88
28
 
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
- **One exception — a Next.js Server Component importing the barrel.** Next registers a client entry
95
- for every `"use client"` module a Server Component can reach through a barrel, and client entries are
96
- graph roots webpack will not shake away. This is a Next limitation that applies to any component
97
- library, not something specific to kineto. Client Components are unaffected — they shake normally.
98
-
99
- Measured, Next 14.2 App Router, page rendering one component (First Load JS):
100
-
101
- | | plain | with `optimizePackageImports` |
102
- | --- | --- | --- |
103
- | **Server** Component, `from "kineto"` | 476 kB | **130 kB** |
104
- | **Client** Component, `from "kineto"` | 130 kB | 130 kB |
105
- | any component, `from "kineto/button"` | 130 kB | 130 kB |
106
-
107
- Next's own remedy rewrites barrel imports to subpath imports at compile time — add it once and the
108
- root import is optimal everywhere:
109
-
110
- ```js
111
- // next.config.mjs (top-level `optimizePackageImports` in Next 15+)
112
- export default { experimental: { optimizePackageImports: ["kineto"] } };
29
+ <Button variant="brand">Save changes</Button>
113
30
  ```
114
31
 
115
- Everywhere else — Vite, Rollup, plain webpack outside the RSC pipeline — no configuration is needed:
116
- the barrel and the subpath emit byte-identical output (3,085 B for one `Button`, vendor external).
117
- The subpath import is simply the form that is optimal in every case with no setup.
118
-
119
- All peers (`react`, `react-dom`, `motion`) are external; Radix/lucide/etc. ship as deps.
120
-
121
- ### 3. Manual copy
32
+ ## Use Kineto’s motion in your own components
122
33
 
123
- 1. Copy `src/lib/cn.ts`, `src/lib/motion-presets.ts`, and (optionally) `use-reduced-motion.ts`.
124
- 2. Copy any component file from `src/components/**`.
125
- 3. Copy the design tokens from `src/styles/theme.css` into your global stylesheet (and
126
- `src/styles/base.css` if you want the document-level styles too).
34
+ Kineto exports shared springs, reveal variants, stagger helpers, and press
35
+ feedback. For example, use the same press feedback as Kineto’s Button.
127
36
 
128
- Each component imports only from `react`, `motion/react`, `@/lib/cn`, `@/lib/motion-presets`,
129
- Radix (where applicable), and `lucide-react`. Drop it in and it renders and animates — no wiring.
130
-
131
- Tailwind CSS **v4** is used for styling (CSS-first config — see below).
132
-
133
- ## Theming with CSS variables
134
-
135
- All colors, radii, and shadows read from HSL CSS variables (like shadcn). Components never
136
- hardcode a hex value, so the entire library re-skins when you change the tokens or toggle
137
- the `.dark` class.
138
-
139
- ```css
140
- /* globals.css */
141
- :root {
142
- --background: 38 36% 97%; /* warm near-white */
143
- --foreground: 24 12% 12%; /* warm near-black */
144
- --primary: 24 14% 13%; /* ink — buttons & controls */
145
- --brand: 22 92% 52%; /* the one orange accent */
146
- --success: 142 58% 37%;
147
- --warning: 36 95% 46%;
148
- /* ...etc */
149
- --radius: 0.85rem;
150
- }
37
+ ```tsx
38
+ import { motion } from "motion/react";
39
+ import { interaction, spring } from "kineto/motion-presets";
151
40
 
152
- .dark { /* dark is the default theme */
153
- --background: 24 14% 7%; /* warm charcoal */
154
- --foreground: 40 18% 92%;
155
- --primary: 40 30% 96%; /* near-white ink */
156
- --brand: 22 95% 57%;
157
- /* ...etc */
158
- }
41
+ <motion.button whileTap={interaction.tap} transition={spring.snappy}>
42
+ Save changes
43
+ </motion.button>
159
44
  ```
160
45
 
161
- The identity keeps **ink** (near-black / near-white) as the primary for buttons and controls,
162
- and reserves a single **orange `--brand`** accent for emphasis, focus rings, and data. Beyond
163
- the shadcn base tokens it adds **status** colors (`--success`, `--warning`), a 5-stop
164
- **chart palette** (`--chart-1` … `--chart-5` — orange + warm greys) so data-display
165
- components stay on-theme in both modes, and a **gradient** layer (see below). Use the `brand`
166
- Button/Badge variants for orange CTAs.
167
-
168
- ### Gradients
46
+ For entrances, try `fadeUp` with `initial="hidden"` and `animate="visible"`.
47
+ Wrap your app in `<MotionConfig reducedMotion="user">` to respect the user's
48
+ reduced-motion preference for Motion animations.
169
49
 
170
- Gradients are part of the token system, not one-off `linear-gradient(...)` calls sprinkled through
171
- components. **Two stops and one angle** compose every gradient the library ships:
50
+ ## Change the theme with CSS
172
51
 
173
- | Token | Default | Notes |
174
- | --- | --- | --- |
175
- | `--gradient-from` | *unset* → `--brand` | Bare `H S% L%` triple, like every other color token. |
176
- | `--gradient-to` | *unset* → `--chart-3` | The accent's lighter sibling in every preset. |
177
- | `--gradient-angle` | `135deg` | Applies to the linear ramps. |
178
-
179
- Leaving the stops unset is the intended default: the utilities read them as
180
- `var(--gradient-from, var(--brand))`, so **the ramp follows whatever accent is in scope** — light,
181
- dark, a preset, or a subtree that re-colors `--brand`. That fallback is deliberate. Declaring
182
- `--gradient-from: var(--brand)` on `:root` would substitute *there* and keep serving the light
183
- accent to a nested `.dark` section. Pin the stops only when the ramp shouldn't track the accent:
52
+ Add your overrides after the theme import. Change `--brand` to update the accent
53
+ and `--radius` to adjust corner rounding across components. Color tokens use
54
+ plain HSL channels.
184
55
 
185
56
  ```css
186
57
  :root {
187
- --gradient-from: 265 85% 58%; /* violet → cyan, regardless of --brand */
188
- --gradient-to: 190 90% 55%;
189
- --gradient-angle: 100deg;
58
+ --brand: 260 70% 48%;
59
+ --radius: 0.5rem;
190
60
  }
191
- ```
192
-
193
- The utilities (all set `background-image` only, so they stack with `text-*` / `border-*`):
194
61
 
195
- | Utility | Use |
196
- | --- | --- |
197
- | `bg-gradient-brand` | The accent ramp at full strength. Pair with `text-brand-foreground`. |
198
- | `bg-gradient-brand-soft` | Same ramp at wash strength, under readable foreground text. |
199
- | `bg-gradient-brand-loop` | Seamless double-width ramp for panning animations. |
200
- | `bg-gradient-surface` | Neutral top-lit sheen for raised surfaces. |
201
- | `bg-gradient-hairline` | A 1px border that fades along its run. |
202
- | `bg-gradient-mesh` | Atmospheric multi-blob backdrop for heroes and empty states. |
203
- | `bg-gradient-fade` | Surface → transparent, for scroll edges. |
204
- | `text-gradient-brand` | Gradient-filled text (static). |
205
-
206
- For one-off directions the stops are also exposed as real colors, so Tailwind's own gradient
207
- utilities work off the themed ramp: `bg-linear-to-r from-gradient-from to-gradient-to`.
208
-
209
- Two components add motion on top of the same tokens — `GradientText` (pans the ramp across the
210
- glyphs) and `GradientBorder` (a masked gradient hairline with an optional rotating sweep) — and
211
- `Button`, `Badge`, and `FeaturedIcon` each gained a `gradient` variant.
212
-
213
- In Tailwind v4 the old `tailwind.config.ts` is replaced by a CSS-first `@theme` block that
214
- maps those tokens to utilities (`bg-background`, `text-primary`, `rounded-lg`,
215
- `font-display`, `shadow-lift`, …):
216
-
217
- ```css
218
- @theme inline {
219
- --color-background: hsl(var(--background));
220
- --color-primary: hsl(var(--primary));
221
- --radius-lg: var(--radius);
222
- /* ...etc */
62
+ .dark {
63
+ --brand: 260 80% 74%;
223
64
  }
224
65
  ```
225
66
 
226
- To re-theme: change the token values. To go dark: add `dark` to the `<html>` class. That's
227
- the whole story — no component edits.
228
-
229
- ## The animation system
230
-
231
- Motion is **systematic, not improvised.** Everything references
232
- [`lib/motion-presets.ts`](src/lib/motion-presets.ts):
233
-
234
- - **Transition tokens** — `spring.snappy`, `spring.soft`, `spring.bouncy`, `tween.smooth`,
235
- `tween.quick`.
236
- - **Reveal variants** — `fadeUp`, `fadeIn`, `scaleIn`, `slideInLeft/Right`, `blurIn`.
237
- - **Stagger helpers** — `staggerContainer(stagger, delay)` + `staggerItem`.
238
- - **Interaction presets** — `interaction.hover`, `interaction.tap`, `interaction.cardHover`.
239
- - **Viewport** — `viewportOnce` for scroll-triggered reveals.
240
-
241
- Principles baked in:
242
-
243
- - **Respects `prefers-reduced-motion`.** Wrap your app once in
244
- `<MotionConfig reducedMotion="user">` (see `src/components/site/providers.tsx`) and all
245
- declarative reveals collapse to instant/opacity-only. Imperative loops like the marquee
246
- branch on `useReducedMotion()` and stop entirely.
247
- - **Scroll reveals** use `whileInView` with `viewport={{ once: true, margin: "-15%" }}`.
248
- - **Transform & opacity only** (plus an occasional `filter: blur`) — never layout-thrashing
249
- properties.
250
- - **One engine.** No CSS keyframes for component motion; even the accordion height reveal
251
- runs through Motion.
252
-
253
- ## Repo scripts
254
-
255
- The library lives at the repo root; the Next.js (App Router) docs site is a workspace member in
256
- `site/` that imports the library *source* (via the `@/* → ["../src/*","./src/*"]` alias), so edits
257
- show up instantly with no rebuild.
258
-
259
- ```bash
260
- pnpm install # one hoisted install for the whole workspace
261
-
262
- # docs site
263
- pnpm dev # runs site/ (Next dev)
264
- pnpm site:build # production build of the docs site (also generates /r/*.json)
265
-
266
- # library
267
- pnpm build:lib # type-check (strict) + tsup → dist/ (what npm publishes)
268
- pnpm typecheck:lib
269
- ```
270
-
271
- - `/` — a live showcase built from the real blocks.
272
- - `/docs/<slug>` — each component with install tabs (shadcn CLI + npm), an interactive props
273
- **Playground**, a live preview, the prop table, and one-click copy of the exact source file
274
- (read straight from disk, so it never drifts).
275
- - `/r/<name>.json` — the shadcn registry endpoint (set `NEXT_PUBLIC_SITE_URL` in production so
276
- cross-item `registryDependencies` URLs point at your deployed origin).
277
-
278
- ## Stack
279
-
280
- React 18 · TypeScript (strict) · Tailwind CSS v4 · Motion · Radix UI · lucide-react ·
281
- Next.js (docs site). Fonts: **Fraunces** (editorial serif display) + **Inter** (body) + **JetBrains Mono**.
67
+ Add the `dark` class to `<html>` to switch the page to dark mode. For inline
68
+ styles and chart props, import `{ tokens }` from `kineto/tokens`. For example,
69
+ `tokens.color.brand` resolves to `hsl(var(--brand))` and follows the same theme
70
+ overrides.
282
71
 
283
- MIT licensed. The components are yours.
72
+ [MIT License](LICENSE)
package/dist/badge.d.ts CHANGED
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
 
5
5
  declare const badgeVariants: (props?: ({
6
- variant?: "outline" | "default" | "solid" | "brand" | "success" | "warning" | "destructive" | "gradient" | "secondary" | null | undefined;
6
+ variant?: "default" | "brand" | "success" | "warning" | "destructive" | "outline" | "solid" | "gradient" | "secondary" | null | undefined;
7
7
  } & class_variance_authority_types.ClassProp) | undefined) => string;
8
8
  interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
9
9
  /** Show a leading status dot in the current text color. */
package/dist/button.d.ts CHANGED
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
 
5
5
  declare const buttonVariants: (props?: ({
6
- variant?: "link" | "outline" | "default" | "brand" | "destructive" | "gradient" | "secondary" | "ghost" | null | undefined;
6
+ variant?: "default" | "brand" | "destructive" | "link" | "outline" | "gradient" | "secondary" | "ghost" | null | undefined;
7
7
  size?: "default" | "icon" | "sm" | "lg" | "pill" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  type NativeButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onAnimationStart" | "onAnimationEnd" | "onAnimationIteration" | "onDrag" | "onDragStart" | "onDragEnd" | "onDragEnter" | "onDragLeave" | "onDragOver" | "onDrop">;
package/dist/command.d.ts CHANGED
@@ -29,7 +29,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
29
29
  ref?: React.Ref<HTMLInputElement>;
30
30
  } & {
31
31
  asChild?: boolean;
32
- }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "value" | "type"> & {
32
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "onChange" | "value"> & {
33
33
  value?: string;
34
34
  onValueChange?: (search: string) => void;
35
35
  } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -55,7 +55,7 @@ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
55
55
  ref?: React.Ref<HTMLDivElement>;
56
56
  } & {
57
57
  asChild?: boolean;
58
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
58
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
59
59
  heading?: React.ReactNode;
60
60
  value?: string;
61
61
  forceMount?: boolean;
@@ -66,7 +66,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
66
66
  ref?: React.Ref<HTMLDivElement>;
67
67
  } & {
68
68
  asChild?: boolean;
69
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "value" | "disabled"> & {
69
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
70
70
  disabled?: boolean;
71
71
  onSelect?: (value: string) => void;
72
72
  value?: string;
@@ -5,8 +5,8 @@ import { LucideIcon } from 'lucide-react';
5
5
 
6
6
  declare const featuredIconVariants: (props?: ({
7
7
  size?: "sm" | "md" | "lg" | null | undefined;
8
- shape?: "square" | "circle" | null | undefined;
9
- variant?: "outline" | "gray" | "brand" | "success" | "warning" | "destructive" | "gradient" | null | undefined;
8
+ shape?: "circle" | "square" | null | undefined;
9
+ variant?: "brand" | "success" | "warning" | "destructive" | "outline" | "gray" | "gradient" | null | undefined;
10
10
  } & class_variance_authority_types.ClassProp) | undefined) => string;
11
11
  interface FeaturedIconProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof featuredIconVariants> {
12
12
  icon: LucideIcon;
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ type FieldControlProps = Pick<React.InputHTMLAttributes<HTMLInputElement>, "id" | "aria-describedby" | "aria-invalid">;
5
+ interface FieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
6
+ label: React.ReactNode;
7
+ description?: React.ReactNode;
8
+ error?: React.ReactNode;
9
+ children: React.ReactElement<FieldControlProps>;
10
+ }
11
+ declare function Field({ label, description, error, children, className, ...props }: FieldProps): react_jsx_runtime.JSX.Element;
12
+
13
+ export { Field, type FieldProps };
package/dist/field.js ADDED
@@ -0,0 +1,33 @@
1
+ // src/components/ui/field.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/components/ui/field.tsx
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+ function Field({ label, description, error, children, className, ...props }) {
14
+ const id = React.useId();
15
+ const controlId = children.props.id ?? id;
16
+ const descriptionId = description == null ? void 0 : `${id}-description`;
17
+ const errorId = error == null ? void 0 : `${id}-error`;
18
+ const describedBy = [children.props["aria-describedby"], descriptionId, errorId].filter(Boolean).join(" ");
19
+ return /* @__PURE__ */ jsxs("div", { className: cn("grid gap-2", className), ...props, children: [
20
+ /* @__PURE__ */ jsx("label", { htmlFor: controlId, className: "text-sm font-medium text-foreground", children: label }),
21
+ React.cloneElement(children, {
22
+ id: controlId,
23
+ "aria-describedby": describedBy || void 0,
24
+ "aria-invalid": errorId ? true : children.props["aria-invalid"]
25
+ }),
26
+ descriptionId && /* @__PURE__ */ jsx("p", { id: descriptionId, className: "text-sm text-muted-foreground", children: description }),
27
+ errorId && /* @__PURE__ */ jsx("p", { id: errorId, className: "text-sm text-destructive", children: error })
28
+ ] });
29
+ }
30
+ export {
31
+ Field
32
+ };
33
+ //# sourceMappingURL=field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/field.tsx","../src/lib/cn.ts"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/lib/cn\";\n\ntype FieldControlProps = Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n \"id\" | \"aria-describedby\" | \"aria-invalid\"\n>;\n\nexport interface FieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n label: React.ReactNode;\n description?: React.ReactNode;\n error?: React.ReactNode;\n children: React.ReactElement<FieldControlProps>;\n}\n\nexport function Field({ label, description, error, children, className, ...props }: FieldProps) {\n const id = React.useId();\n const controlId = children.props.id ?? id;\n const descriptionId = description == null ? undefined : `${id}-description`;\n const errorId = error == null ? undefined : `${id}-error`;\n const describedBy = [children.props[\"aria-describedby\"], descriptionId, errorId]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <div className={cn(\"grid gap-2\", className)} {...props}>\n <label htmlFor={controlId} className=\"text-sm font-medium text-foreground\">{label}</label>\n {React.cloneElement(children, {\n id: controlId,\n \"aria-describedby\": describedBy || undefined,\n \"aria-invalid\": errorId ? true : children.props[\"aria-invalid\"],\n })}\n {descriptionId && <p id={descriptionId} className=\"text-sm text-muted-foreground\">{description}</p>}\n {errorId && <p id={errorId} className=\"text-sm text-destructive\">{error}</p>}\n </div>\n );\n}\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":";AAAA,YAAY,WAAW;;;ACAvB,SAAS,YAA6B;AACtC,SAAS,eAAe;AAOjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADeI,SACE,KADF;AAVG,SAAS,MAAM,EAAE,OAAO,aAAa,OAAO,UAAU,WAAW,GAAG,MAAM,GAAe;AAC9F,QAAM,KAAW,YAAM;AACvB,QAAM,YAAY,SAAS,MAAM,MAAM;AACvC,QAAM,gBAAgB,eAAe,OAAO,SAAY,GAAG,EAAE;AAC7D,QAAM,UAAU,SAAS,OAAO,SAAY,GAAG,EAAE;AACjD,QAAM,cAAc,CAAC,SAAS,MAAM,kBAAkB,GAAG,eAAe,OAAO,EAC5E,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,qBAAC,SAAI,WAAW,GAAG,cAAc,SAAS,GAAI,GAAG,OAC/C;AAAA,wBAAC,WAAM,SAAS,WAAW,WAAU,uCAAuC,iBAAM;AAAA,IAC3E,mBAAa,UAAU;AAAA,MAC5B,IAAI;AAAA,MACJ,oBAAoB,eAAe;AAAA,MACnC,gBAAgB,UAAU,OAAO,SAAS,MAAM,cAAc;AAAA,IAChE,CAAC;AAAA,IACA,iBAAiB,oBAAC,OAAE,IAAI,eAAe,WAAU,iCAAiC,uBAAY;AAAA,IAC9F,WAAW,oBAAC,OAAE,IAAI,SAAS,WAAU,4BAA4B,iBAAM;AAAA,KAC1E;AAEJ;","names":[]}
package/dist/flex.d.ts CHANGED
@@ -4,9 +4,9 @@ import { VariantProps } from 'class-variance-authority';
4
4
  import { Gap } from './gap.js';
5
5
 
6
6
  declare const flexVariants: (props?: ({
7
- direction?: "row" | "row-reverse" | "col" | "col-reverse" | null | undefined;
8
- align?: "baseline" | "end" | "start" | "center" | "stretch" | null | undefined;
9
- justify?: "end" | "start" | "center" | "between" | "around" | "evenly" | null | undefined;
7
+ direction?: "col" | "row" | "row-reverse" | "col-reverse" | null | undefined;
8
+ align?: "end" | "center" | "baseline" | "start" | "stretch" | null | undefined;
9
+ justify?: "end" | "center" | "start" | "between" | "around" | "evenly" | null | undefined;
10
10
  wrap?: boolean | null | undefined;
11
11
  inline?: boolean | null | undefined;
12
12
  } & class_variance_authority_types.ClassProp) | undefined) => string;
package/dist/grid.d.ts CHANGED
@@ -4,10 +4,10 @@ import { VariantProps } from 'class-variance-authority';
4
4
  import { Gap } from './gap.js';
5
5
 
6
6
  declare const gridVariants: (props?: ({
7
- cols?: 2 | 1 | 4 | 6 | 3 | 12 | 5 | null | undefined;
8
- align?: "end" | "start" | "center" | "stretch" | null | undefined;
9
- justify?: "end" | "start" | "center" | "stretch" | null | undefined;
10
- flow?: "row" | "dense" | "col" | null | undefined;
7
+ cols?: 1 | 2 | 4 | 6 | 3 | 12 | 5 | null | undefined;
8
+ align?: "end" | "center" | "start" | "stretch" | null | undefined;
9
+ justify?: "end" | "center" | "start" | "stretch" | null | undefined;
10
+ flow?: "col" | "row" | "dense" | null | undefined;
11
11
  } & class_variance_authority_types.ClassProp) | undefined) => string;
12
12
  interface GridProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridVariants> {
13
13
  /** Space between cells, from the shared gap scale. */
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  /* Re-export barrel: keeps each component its own module so bundlers can tree-shake, and
3
3
  lets each file keep its own "use client" directive. See writeBarrel() for the numbers. */
4
4
  export * from "./cn.js";
5
+ export * from "./tokens.js";
5
6
  export * from "./use-reduced-motion.js";
6
7
  export * from "./gap.js";
7
8
  export * from "./format-time.js";
@@ -36,6 +37,7 @@ export * from "./drawer.js";
36
37
  export * from "./dropdown-menu.js";
37
38
  export * from "./empty-state.js";
38
39
  export * from "./featured-icon.js";
40
+ export * from "./field.js";
39
41
  export * from "./file-uploader.js";
40
42
  export * from "./flex.js";
41
43
  export * from "./form.js";
@@ -44,6 +46,7 @@ export * from "./gradient-text.js";
44
46
  export * from "./grid.js";
45
47
  export * from "./hover-card.js";
46
48
  export * from "./inline-edit.js";
49
+ export * from "./input-group.js";
47
50
  export * from "./input.js";
48
51
  export * from "./kbd.js";
49
52
  export * from "./label.js";
@@ -80,6 +83,7 @@ export * from "./toast.js";
80
83
  export * from "./tooltip.js";
81
84
  export * from "./tree-view.js";
82
85
  export * from "./truncate.js";
86
+ export * from "./typography.js";
83
87
  export * from "./verification-code-input.js";
84
88
  export * from "./logo-cloud.js";
85
89
  export * from "./area-chart.js";
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  /* Re-export barrel: keeps each component its own module so bundlers can tree-shake, and
3
3
  lets each file keep its own "use client" directive. See writeBarrel() for the numbers. */
4
4
  export * from "./cn.js";
5
+ export * from "./tokens.js";
5
6
  export * from "./use-reduced-motion.js";
6
7
  export * from "./gap.js";
7
8
  export * from "./format-time.js";
@@ -36,6 +37,7 @@ export * from "./drawer.js";
36
37
  export * from "./dropdown-menu.js";
37
38
  export * from "./empty-state.js";
38
39
  export * from "./featured-icon.js";
40
+ export * from "./field.js";
39
41
  export * from "./file-uploader.js";
40
42
  export * from "./flex.js";
41
43
  export * from "./form.js";
@@ -44,6 +46,7 @@ export * from "./gradient-text.js";
44
46
  export * from "./grid.js";
45
47
  export * from "./hover-card.js";
46
48
  export * from "./inline-edit.js";
49
+ export * from "./input-group.js";
47
50
  export * from "./input.js";
48
51
  export * from "./kbd.js";
49
52
  export * from "./label.js";
@@ -80,6 +83,7 @@ export * from "./toast.js";
80
83
  export * from "./tooltip.js";
81
84
  export * from "./tree-view.js";
82
85
  export * from "./truncate.js";
86
+ export * from "./typography.js";
83
87
  export * from "./verification-code-input.js";
84
88
  export * from "./logo-cloud.js";
85
89
  export * from "./area-chart.js";
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { InputProps } from './input.js';
3
+
4
+ interface InputGroupProps extends InputProps {
5
+ startAdornment?: React.ReactNode;
6
+ endAdornment?: React.ReactNode;
7
+ containerClassName?: string;
8
+ }
9
+ declare const InputGroup: React.ForwardRefExoticComponent<InputGroupProps & React.RefAttributes<HTMLInputElement>>;
10
+
11
+ export { InputGroup, type InputGroupProps };
@@ -0,0 +1,65 @@
1
+ // src/components/ui/input-group.tsx
2
+ import * as React2 from "react";
3
+
4
+ // src/components/ui/input.tsx
5
+ import * as React from "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/input.tsx
15
+ import { jsx } from "react/jsx-runtime";
16
+ var Input = React.forwardRef(
17
+ ({ className, type = "text", ...props }, ref) => /* @__PURE__ */ jsx(
18
+ "input",
19
+ {
20
+ ref,
21
+ type,
22
+ className: cn(
23
+ "flex h-10 w-full rounded-lg border border-input bg-card px-3.5 py-2 text-sm text-foreground shadow-xs transition-colors placeholder:text-muted-foreground focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:text-sm file:font-medium",
24
+ className
25
+ ),
26
+ ...props
27
+ }
28
+ )
29
+ );
30
+ Input.displayName = "Input";
31
+
32
+ // src/components/ui/input-group.tsx
33
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
34
+ var InputGroup = React2.forwardRef(
35
+ ({ startAdornment, endAdornment, containerClassName, className, ...props }, ref) => /* @__PURE__ */ jsxs(
36
+ "div",
37
+ {
38
+ className: cn(
39
+ "flex min-h-10 items-center rounded-lg border border-input bg-card shadow-xs",
40
+ "has-[:focus-visible]:border-ring has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-ring/40",
41
+ containerClassName
42
+ ),
43
+ children: [
44
+ startAdornment != null && /* @__PURE__ */ jsx2("div", { className: "flex shrink-0 items-center ps-3 text-sm text-muted-foreground", children: startAdornment }),
45
+ /* @__PURE__ */ jsx2(
46
+ Input,
47
+ {
48
+ ...props,
49
+ ref,
50
+ className: cn(
51
+ "min-w-0 flex-1 border-0 bg-transparent shadow-none focus-visible:ring-0",
52
+ className
53
+ )
54
+ }
55
+ ),
56
+ endAdornment != null && /* @__PURE__ */ jsx2("div", { className: "flex shrink-0 items-center pe-3 text-sm text-muted-foreground", children: endAdornment })
57
+ ]
58
+ }
59
+ )
60
+ );
61
+ InputGroup.displayName = "InputGroup";
62
+ export {
63
+ InputGroup
64
+ };
65
+ //# sourceMappingURL=input-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/input-group.tsx","../src/components/ui/input.tsx","../src/lib/cn.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Input, type InputProps } from \"@/components/ui/input\";\nimport { cn } from \"@/lib/cn\";\n\nexport interface InputGroupProps extends InputProps {\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n containerClassName?: string;\n}\n\nconst InputGroup = React.forwardRef<HTMLInputElement, InputGroupProps>(\n ({ startAdornment, endAdornment, containerClassName, className, ...props }, ref) => (\n <div\n className={cn(\n \"flex min-h-10 items-center rounded-lg border border-input bg-card shadow-xs\",\n \"has-[:focus-visible]:border-ring has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-ring/40\",\n containerClassName,\n )}\n >\n {startAdornment != null && (\n <div className=\"flex shrink-0 items-center ps-3 text-sm text-muted-foreground\">{startAdornment}</div>\n )}\n <Input\n {...props}\n ref={ref}\n className={cn(\n \"min-w-0 flex-1 border-0 bg-transparent shadow-none focus-visible:ring-0\",\n className,\n )}\n />\n {endAdornment != null && (\n <div className=\"flex shrink-0 items-center pe-3 text-sm text-muted-foreground\">{endAdornment}</div>\n )}\n </div>\n ),\n);\nInputGroup.displayName = \"InputGroup\";\n\nexport { InputGroup };\n","import * as React from \"react\";\n\nimport { cn } from \"@/lib/cn\";\n\nexport type InputProps = React.InputHTMLAttributes<HTMLInputElement>;\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type = \"text\", ...props }, ref) => (\n <input\n ref={ref}\n type={type}\n className={cn(\n \"flex h-10 w-full rounded-lg border border-input bg-card px-3.5 py-2 text-sm text-foreground shadow-xs transition-colors placeholder:text-muted-foreground focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:text-sm file:font-medium\",\n className\n )}\n {...props}\n />\n )\n);\nInput.displayName = \"Input\";\n\nexport { Input };\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":";AAAA,YAAYA,YAAW;;;ACAvB,YAAY,WAAW;;;ACAvB,SAAS,YAA6B;AACtC,SAAS,eAAe;AAOjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADFI;AAFJ,IAAM,QAAc;AAAA,EAClB,CAAC,EAAE,WAAW,OAAO,QAAQ,GAAG,MAAM,GAAG,QACvC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,MAAM,cAAc;;;ADPhB,SAQI,OAAAC,MARJ;AAFJ,IAAM,aAAmB;AAAA,EACvB,CAAC,EAAE,gBAAgB,cAAc,oBAAoB,WAAW,GAAG,MAAM,GAAG,QAC1E;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEC;AAAA,0BAAkB,QACjB,gBAAAA,KAAC,SAAI,WAAU,iEAAiE,0BAAe;AAAA,QAEjG,gBAAAA;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA,YACJ;AAAA,YACA,WAAW;AAAA,cACT;AAAA,cACA;AAAA,YACF;AAAA;AAAA,QACF;AAAA,QACC,gBAAgB,QACf,gBAAAA,KAAC,SAAI,WAAU,iEAAiE,wBAAa;AAAA;AAAA;AAAA,EAEjG;AAEJ;AACA,WAAW,cAAc;","names":["React","jsx"]}
package/dist/masonry.d.ts CHANGED
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
4
4
  import { Gap } from './gap.js';
5
5
 
6
6
  declare const masonryVariants: (props?: ({
7
- columns?: 2 | 1 | 4 | 3 | 5 | null | undefined;
7
+ columns?: 1 | 2 | 4 | 3 | 5 | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface MasonryProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof masonryVariants> {
10
10
  /** Space between items (column gap + matching row gap), from the shared scale. */
@@ -3,7 +3,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import * as ResizablePrimitive from 'react-resizable-panels';
4
4
 
5
5
  declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => react_jsx_runtime.JSX.Element;
6
- declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLSpanElement | HTMLElement | HTMLDivElement | HTMLButtonElement | HTMLParagraphElement | HTMLObjectElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLLinkElement | HTMLDialogElement | HTMLFormElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLTimeElement | HTMLProgressElement | HTMLEmbedElement | HTMLMeterElement | HTMLTextAreaElement | HTMLPreElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLFieldSetElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLMapElement | HTMLMetaElement | HTMLOListElement | HTMLOptGroupElement | HTMLOutputElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
6
+ declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLParagraphElement | HTMLSpanElement | HTMLObjectElement | HTMLStyleElement | HTMLSlotElement | HTMLTitleElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
7
7
  className?: string | undefined;
8
8
  collapsedSize?: number | undefined;
9
9
  collapsible?: boolean | undefined;
package/dist/stack.d.ts CHANGED
@@ -5,8 +5,8 @@ import { Gap } from './gap.js';
5
5
 
6
6
  declare const stackVariants: (props?: ({
7
7
  direction?: "horizontal" | "vertical" | null | undefined;
8
- align?: "baseline" | "end" | "start" | "center" | "stretch" | null | undefined;
9
- justify?: "end" | "start" | "center" | "between" | "around" | "evenly" | null | undefined;
8
+ align?: "end" | "center" | "baseline" | "start" | "stretch" | null | undefined;
9
+ justify?: "end" | "center" | "start" | "between" | "around" | "evenly" | null | undefined;
10
10
  wrap?: boolean | null | undefined;
11
11
  } & class_variance_authority_types.ClassProp) | undefined) => string;
12
12
  interface StackProps extends React.HTMLAttributes<HTMLDivElement>, Omit<VariantProps<typeof stackVariants>, "wrap"> {
@@ -0,0 +1,48 @@
1
+ declare const tokens: {
2
+ readonly color: {
3
+ readonly background: "hsl(var(--background))";
4
+ readonly foreground: "hsl(var(--foreground))";
5
+ readonly card: "hsl(var(--card))";
6
+ readonly cardForeground: "hsl(var(--card-foreground))";
7
+ readonly popover: "hsl(var(--popover))";
8
+ readonly popoverForeground: "hsl(var(--popover-foreground))";
9
+ readonly primary: "hsl(var(--primary))";
10
+ readonly primaryForeground: "hsl(var(--primary-foreground))";
11
+ readonly secondary: "hsl(var(--secondary))";
12
+ readonly secondaryForeground: "hsl(var(--secondary-foreground))";
13
+ readonly muted: "hsl(var(--muted))";
14
+ readonly mutedForeground: "hsl(var(--muted-foreground))";
15
+ readonly accent: "hsl(var(--accent))";
16
+ readonly accentForeground: "hsl(var(--accent-foreground))";
17
+ readonly brand: "hsl(var(--brand))";
18
+ readonly brandForeground: "hsl(var(--brand-foreground))";
19
+ readonly destructive: "hsl(var(--destructive))";
20
+ readonly destructiveForeground: "hsl(var(--destructive-foreground))";
21
+ readonly success: "hsl(var(--success))";
22
+ readonly successForeground: "hsl(var(--success-foreground))";
23
+ readonly warning: "hsl(var(--warning))";
24
+ readonly warningForeground: "hsl(var(--warning-foreground))";
25
+ readonly info: "hsl(var(--info))";
26
+ readonly infoForeground: "hsl(var(--info-foreground))";
27
+ readonly link: "hsl(var(--link))";
28
+ readonly border: "hsl(var(--border))";
29
+ readonly input: "hsl(var(--input))";
30
+ readonly ring: "hsl(var(--ring))";
31
+ readonly shadow: "hsl(var(--shadow-color))";
32
+ readonly chart1: "hsl(var(--chart-1))";
33
+ readonly chart2: "hsl(var(--chart-2))";
34
+ readonly chart3: "hsl(var(--chart-3))";
35
+ readonly chart4: "hsl(var(--chart-4))";
36
+ readonly chart5: "hsl(var(--chart-5))";
37
+ readonly gradientFrom: "hsl(var(--gradient-from, var(--brand)))";
38
+ readonly gradientTo: "hsl(var(--gradient-to, var(--chart-3)))";
39
+ };
40
+ readonly radius: {
41
+ readonly base: "var(--radius)";
42
+ };
43
+ readonly gradient: {
44
+ readonly angle: "var(--gradient-angle)";
45
+ };
46
+ };
47
+
48
+ export { tokens };
package/dist/tokens.js ADDED
@@ -0,0 +1,50 @@
1
+ // src/lib/tokens.ts
2
+ function color(name) {
3
+ return `hsl(var(--${name}))`;
4
+ }
5
+ var tokens = {
6
+ color: {
7
+ background: color("background"),
8
+ foreground: color("foreground"),
9
+ card: color("card"),
10
+ cardForeground: color("card-foreground"),
11
+ popover: color("popover"),
12
+ popoverForeground: color("popover-foreground"),
13
+ primary: color("primary"),
14
+ primaryForeground: color("primary-foreground"),
15
+ secondary: color("secondary"),
16
+ secondaryForeground: color("secondary-foreground"),
17
+ muted: color("muted"),
18
+ mutedForeground: color("muted-foreground"),
19
+ accent: color("accent"),
20
+ accentForeground: color("accent-foreground"),
21
+ brand: color("brand"),
22
+ brandForeground: color("brand-foreground"),
23
+ destructive: color("destructive"),
24
+ destructiveForeground: color("destructive-foreground"),
25
+ success: color("success"),
26
+ successForeground: color("success-foreground"),
27
+ warning: color("warning"),
28
+ warningForeground: color("warning-foreground"),
29
+ info: color("info"),
30
+ infoForeground: color("info-foreground"),
31
+ link: color("link"),
32
+ border: color("border"),
33
+ input: color("input"),
34
+ ring: color("ring"),
35
+ shadow: color("shadow-color"),
36
+ chart1: color("chart-1"),
37
+ chart2: color("chart-2"),
38
+ chart3: color("chart-3"),
39
+ chart4: color("chart-4"),
40
+ chart5: color("chart-5"),
41
+ gradientFrom: "hsl(var(--gradient-from, var(--brand)))",
42
+ gradientTo: "hsl(var(--gradient-to, var(--chart-3)))"
43
+ },
44
+ radius: { base: "var(--radius)" },
45
+ gradient: { angle: "var(--gradient-angle)" }
46
+ };
47
+ export {
48
+ tokens
49
+ };
50
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/tokens.ts"],"sourcesContent":["function color<Name extends string>(name: Name): `hsl(var(--${Name}))` {\n return `hsl(var(--${name}))`;\n}\n\nexport const tokens = {\n color: {\n background: color(\"background\"),\n foreground: color(\"foreground\"),\n card: color(\"card\"),\n cardForeground: color(\"card-foreground\"),\n popover: color(\"popover\"),\n popoverForeground: color(\"popover-foreground\"),\n primary: color(\"primary\"),\n primaryForeground: color(\"primary-foreground\"),\n secondary: color(\"secondary\"),\n secondaryForeground: color(\"secondary-foreground\"),\n muted: color(\"muted\"),\n mutedForeground: color(\"muted-foreground\"),\n accent: color(\"accent\"),\n accentForeground: color(\"accent-foreground\"),\n brand: color(\"brand\"),\n brandForeground: color(\"brand-foreground\"),\n destructive: color(\"destructive\"),\n destructiveForeground: color(\"destructive-foreground\"),\n success: color(\"success\"),\n successForeground: color(\"success-foreground\"),\n warning: color(\"warning\"),\n warningForeground: color(\"warning-foreground\"),\n info: color(\"info\"),\n infoForeground: color(\"info-foreground\"),\n link: color(\"link\"),\n border: color(\"border\"),\n input: color(\"input\"),\n ring: color(\"ring\"),\n shadow: color(\"shadow-color\"),\n chart1: color(\"chart-1\"),\n chart2: color(\"chart-2\"),\n chart3: color(\"chart-3\"),\n chart4: color(\"chart-4\"),\n chart5: color(\"chart-5\"),\n gradientFrom: \"hsl(var(--gradient-from, var(--brand)))\",\n gradientTo: \"hsl(var(--gradient-to, var(--chart-3)))\",\n },\n radius: { base: \"var(--radius)\" },\n gradient: { angle: \"var(--gradient-angle)\" },\n} as const;\n"],"mappings":";AAAA,SAAS,MAA2B,MAAmC;AACrE,SAAO,aAAa,IAAI;AAC1B;AAEO,IAAM,SAAS;AAAA,EACpB,OAAO;AAAA,IACL,YAAY,MAAM,YAAY;AAAA,IAC9B,YAAY,MAAM,YAAY;AAAA,IAC9B,MAAM,MAAM,MAAM;AAAA,IAClB,gBAAgB,MAAM,iBAAiB;AAAA,IACvC,SAAS,MAAM,SAAS;AAAA,IACxB,mBAAmB,MAAM,oBAAoB;AAAA,IAC7C,SAAS,MAAM,SAAS;AAAA,IACxB,mBAAmB,MAAM,oBAAoB;AAAA,IAC7C,WAAW,MAAM,WAAW;AAAA,IAC5B,qBAAqB,MAAM,sBAAsB;AAAA,IACjD,OAAO,MAAM,OAAO;AAAA,IACpB,iBAAiB,MAAM,kBAAkB;AAAA,IACzC,QAAQ,MAAM,QAAQ;AAAA,IACtB,kBAAkB,MAAM,mBAAmB;AAAA,IAC3C,OAAO,MAAM,OAAO;AAAA,IACpB,iBAAiB,MAAM,kBAAkB;AAAA,IACzC,aAAa,MAAM,aAAa;AAAA,IAChC,uBAAuB,MAAM,wBAAwB;AAAA,IACrD,SAAS,MAAM,SAAS;AAAA,IACxB,mBAAmB,MAAM,oBAAoB;AAAA,IAC7C,SAAS,MAAM,SAAS;AAAA,IACxB,mBAAmB,MAAM,oBAAoB;AAAA,IAC7C,MAAM,MAAM,MAAM;AAAA,IAClB,gBAAgB,MAAM,iBAAiB;AAAA,IACvC,MAAM,MAAM,MAAM;AAAA,IAClB,QAAQ,MAAM,QAAQ;AAAA,IACtB,OAAO,MAAM,OAAO;AAAA,IACpB,MAAM,MAAM,MAAM;AAAA,IAClB,QAAQ,MAAM,cAAc;AAAA,IAC5B,QAAQ,MAAM,SAAS;AAAA,IACvB,QAAQ,MAAM,SAAS;AAAA,IACvB,QAAQ,MAAM,SAAS;AAAA,IACvB,QAAQ,MAAM,SAAS;AAAA,IACvB,QAAQ,MAAM,SAAS;AAAA,IACvB,cAAc;AAAA,IACd,YAAY;AAAA,EACd;AAAA,EACA,QAAQ,EAAE,MAAM,gBAAgB;AAAA,EAChC,UAAU,EAAE,OAAO,wBAAwB;AAC7C;","names":[]}
@@ -0,0 +1,30 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ declare const textSizes: {
5
+ sm: string;
6
+ base: string;
7
+ lg: string;
8
+ };
9
+ declare const titleSizes: {
10
+ sm: string;
11
+ md: string;
12
+ lg: string;
13
+ };
14
+ declare const tones: {
15
+ default: string;
16
+ muted: string;
17
+ };
18
+ interface TextProps extends React.HTMLAttributes<HTMLElement> {
19
+ as?: "p" | "span" | "div";
20
+ size?: keyof typeof textSizes;
21
+ tone?: keyof typeof tones;
22
+ }
23
+ declare function Text({ as: Element, size, tone, className, ...props }: TextProps): react_jsx_runtime.JSX.Element;
24
+ interface TitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
25
+ as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
26
+ size?: keyof typeof titleSizes;
27
+ }
28
+ declare function Title({ as: Heading, size, className, ...props }: TitleProps): react_jsx_runtime.JSX.Element;
29
+
30
+ export { Text, type TextProps, Title, type TitleProps };
@@ -0,0 +1,40 @@
1
+ // src/lib/cn.ts
2
+ import { clsx } from "clsx";
3
+ import { twMerge } from "tailwind-merge";
4
+ function cn(...inputs) {
5
+ return twMerge(clsx(inputs));
6
+ }
7
+
8
+ // src/components/ui/typography.tsx
9
+ import { jsx } from "react/jsx-runtime";
10
+ var textSizes = {
11
+ sm: "text-sm",
12
+ base: "text-base",
13
+ lg: "text-lg"
14
+ };
15
+ var titleSizes = {
16
+ sm: "text-lg",
17
+ md: "text-2xl",
18
+ lg: "text-3xl sm:text-4xl"
19
+ };
20
+ var tones = {
21
+ default: "text-foreground",
22
+ muted: "text-muted-foreground"
23
+ };
24
+ function Text({ as: Element = "p", size = "base", tone = "default", className, ...props }) {
25
+ return /* @__PURE__ */ jsx(Element, { className: cn("font-sans", textSizes[size], tones[tone], className), ...props });
26
+ }
27
+ function Title({ as: Heading = "h2", size = "md", className, ...props }) {
28
+ return /* @__PURE__ */ jsx(
29
+ Heading,
30
+ {
31
+ className: cn("font-display font-semibold tracking-tight text-foreground", titleSizes[size], className),
32
+ ...props
33
+ }
34
+ );
35
+ }
36
+ export {
37
+ Text,
38
+ Title
39
+ };
40
+ //# sourceMappingURL=typography.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/cn.ts","../src/components/ui/typography.tsx"],"sourcesContent":["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 * as React from \"react\";\nimport { cn } from \"@/lib/cn\";\n\nconst textSizes = {\n sm: \"text-sm\",\n base: \"text-base\",\n lg: \"text-lg\",\n};\n\nconst titleSizes = {\n sm: \"text-lg\",\n md: \"text-2xl\",\n lg: \"text-3xl sm:text-4xl\",\n};\n\nconst tones = {\n default: \"text-foreground\",\n muted: \"text-muted-foreground\",\n};\n\nexport interface TextProps extends React.HTMLAttributes<HTMLElement> {\n as?: \"p\" | \"span\" | \"div\";\n size?: keyof typeof textSizes;\n tone?: keyof typeof tones;\n}\n\nexport function Text({ as: Element = \"p\", size = \"base\", tone = \"default\", className, ...props }: TextProps) {\n return <Element className={cn(\"font-sans\", textSizes[size], tones[tone], className)} {...props} />;\n}\n\nexport interface TitleProps extends React.HTMLAttributes<HTMLHeadingElement> {\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n size?: keyof typeof titleSizes;\n}\n\nexport function Title({ as: Heading = \"h2\", size = \"md\", className, ...props }: TitleProps) {\n return (\n <Heading\n className={cn(\"font-display font-semibold tracking-tight text-foreground\", titleSizes[size], className)}\n {...props}\n />\n );\n}\n"],"mappings":";AAAA,SAAS,YAA6B;AACtC,SAAS,eAAe;AAOjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACiBS;AAxBT,IAAM,YAAY;AAAA,EAChB,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,IAAI;AACN;AAEA,IAAM,aAAa;AAAA,EACjB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,IAAM,QAAQ;AAAA,EACZ,SAAS;AAAA,EACT,OAAO;AACT;AAQO,SAAS,KAAK,EAAE,IAAI,UAAU,KAAK,OAAO,QAAQ,OAAO,WAAW,WAAW,GAAG,MAAM,GAAc;AAC3G,SAAO,oBAAC,WAAQ,WAAW,GAAG,aAAa,UAAU,IAAI,GAAG,MAAM,IAAI,GAAG,SAAS,GAAI,GAAG,OAAO;AAClG;AAOO,SAAS,MAAM,EAAE,IAAI,UAAU,MAAM,OAAO,MAAM,WAAW,GAAG,MAAM,GAAe;AAC1F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,6DAA6D,WAAW,IAAI,GAAG,SAAS;AAAA,MACrG,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kineto",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "A drop-in library of beautifully animated, copy-paste React components — shadcn DNA, motion-first.",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -125,6 +125,7 @@
125
125
  "motion": "^11.15.0",
126
126
  "react": "^18.3.1",
127
127
  "react-dom": "^18.3.1",
128
+ "semantic-release": "25.0.5",
128
129
  "tsup": "^8.5.1",
129
130
  "typescript": "^5.6.3"
130
131
  }
package/theme.css CHANGED
@@ -55,6 +55,10 @@
55
55
  --warning: 36 95% 46%;
56
56
  --warning-foreground: 24 30% 12%;
57
57
 
58
+ --info: 214 72% 37%;
59
+ --info-foreground: 0 0% 100%;
60
+ --link: 211 83% 35%;
61
+
58
62
  --border: 32 16% 87%;
59
63
  --input: 32 16% 85%;
60
64
  --ring: 22 92% 52%;
@@ -124,6 +128,10 @@
124
128
  --warning: 38 95% 58%;
125
129
  --warning-foreground: 36 90% 8%;
126
130
 
131
+ --info: 210 92% 68%;
132
+ --info-foreground: 216 60% 9%;
133
+ --link: 211 95% 75%;
134
+
127
135
  --border: 28 10% 20%;
128
136
  --input: 28 10% 22%;
129
137
  --ring: 22 95% 57%;
@@ -175,6 +183,10 @@
175
183
  --color-warning: hsl(var(--warning));
176
184
  --color-warning-foreground: hsl(var(--warning-foreground));
177
185
 
186
+ --color-info: hsl(var(--info));
187
+ --color-info-foreground: hsl(var(--info-foreground));
188
+ --color-link: hsl(var(--link));
189
+
178
190
  --color-border: hsl(var(--border));
179
191
  --color-input: hsl(var(--input));
180
192
  --color-ring: hsl(var(--ring));