@rowkit/tokens 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 +5 -3
- package/dist/blur.d.ts +18 -0
- package/dist/color.d.ts +252 -33
- package/dist/index.d.ts +116 -23
- package/dist/index.js +267 -184
- package/dist/index.js.map +1 -1
- package/dist/radius.d.ts +61 -15
- package/dist/reference.html +231 -187
- package/dist/shadow.d.ts +12 -1
- package/dist/tokens.css +128 -81
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ npm i @rowkit/tokens
|
|
|
17
17
|
|
|
18
18
|
## Two layers
|
|
19
19
|
|
|
20
|
-
**Primitives** are the raw ramps: `--color-primary-600` is one specific blue and means nothing on its own. **Semantic** tokens name a role — `--color-
|
|
20
|
+
**Primitives** are the raw ramps: `--color-primary-600` is one specific blue and means nothing on its own. **Semantic** tokens name a role — `--color-card`, `--color-muted-foreground`, `--color-border` — and point at a primitive through `var()`.
|
|
21
21
|
|
|
22
22
|
Only the semantic layer changes under `.dark`, which is what makes dark mode a matter of repointing references rather than hunting hex codes.
|
|
23
23
|
|
|
@@ -30,13 +30,13 @@ As a Tailwind v4 theme:
|
|
|
30
30
|
@import '@rowkit/tokens/css';
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Every token becomes a theme value, so `bg-
|
|
33
|
+
Every token becomes a theme value, so `bg-card`, `text-muted-foreground`, `p-4`, `rounded-md` and `shadow-lg` resolve to the scales above.
|
|
34
34
|
|
|
35
35
|
As CSS custom properties, for anything Tailwind does not cover:
|
|
36
36
|
|
|
37
37
|
```css
|
|
38
38
|
.my-thing {
|
|
39
|
-
background: var(--color-
|
|
39
|
+
background: var(--color-muted);
|
|
40
40
|
border-radius: var(--radius-md);
|
|
41
41
|
}
|
|
42
42
|
```
|
|
@@ -66,3 +66,5 @@ const series = [tokens.color.primary[500], tokens.color.success[500]]
|
|
|
66
66
|
## License
|
|
67
67
|
|
|
68
68
|
MIT © Nikolai Kushner
|
|
69
|
+
|
|
70
|
+
Design language based on [shadcn/ui](https://ui.shadcn.com) by shadcn, adapted for Vue. shadcn/ui is MIT licensed; rowkit adopts its token values and class recipes, not its code.
|
package/dist/blur.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backdrop blur radii.
|
|
3
|
+
*
|
|
4
|
+
* One entry, and named for its job rather than a t-shirt size. Blur is not a
|
|
5
|
+
* scale rowkit designs with — it appears in exactly one place, behind a modal,
|
|
6
|
+
* and a second value would be a decision nobody has had to make yet.
|
|
7
|
+
*
|
|
8
|
+
* Deliberately small. The scrim separates the planes; the blur only stops the
|
|
9
|
+
* page behind from competing for the eye. Anything heavier reads as an effect
|
|
10
|
+
* and makes the content behind unrecognisable, which defeats the reason a
|
|
11
|
+
* modal shows its context at all.
|
|
12
|
+
*/
|
|
13
|
+
export declare const blur: {
|
|
14
|
+
/** The dialog scrim. The reference `backdrop-blur-xs`. */
|
|
15
|
+
readonly overlay: "4px";
|
|
16
|
+
};
|
|
17
|
+
/** Names of every blur token. */
|
|
18
|
+
export type BlurName = keyof typeof blur;
|
package/dist/color.d.ts
CHANGED
|
@@ -97,6 +97,171 @@ export declare const danger: {
|
|
|
97
97
|
readonly 900: "oklch(0.396 0.135 25)";
|
|
98
98
|
readonly 950: "oklch(0.282 0.086 25)";
|
|
99
99
|
};
|
|
100
|
+
/**
|
|
101
|
+
* Greys keyed by OKLCH lightness × 1000, so `gray-922` is lightness 0.922.
|
|
102
|
+
*
|
|
103
|
+
* Most steps stay zero-chroma — the reference design's quiet base. A few carry
|
|
104
|
+
* a cool cast (hue 264, the same as {@link neutral}): lighter hairlines and
|
|
105
|
+
* soft recessed surfaces. That is rowkit's own signal inside an otherwise
|
|
106
|
+
* clean, reference-shaped palette — enough to read as itself on a long session,
|
|
107
|
+
* not enough to look like a tinted theme.
|
|
108
|
+
*/
|
|
109
|
+
export declare const gray: {
|
|
110
|
+
/** Soft cool page. Slightly off pure white so a day of table work is less glare. */
|
|
111
|
+
readonly 988: "oklch(0.988 0.002 264)";
|
|
112
|
+
/** the reference `--primary-foreground`, `--foreground` (dark). */
|
|
113
|
+
readonly 985: "oklch(0.985 0 0)";
|
|
114
|
+
/**
|
|
115
|
+
* Cool recessed surface — muted toolbars, row hover, quiet chips.
|
|
116
|
+
*
|
|
117
|
+
* Lighter and cooler than the reference `--muted` (0.97 0 0): same job, less
|
|
118
|
+
* ink on the page.
|
|
119
|
+
*/
|
|
120
|
+
readonly 972: "oklch(0.972 0.003 264)";
|
|
121
|
+
/** the reference `--secondary`, `--muted`, `--accent` — kept for dark primary fill. */
|
|
122
|
+
readonly 970: "oklch(0.97 0 0)";
|
|
123
|
+
/**
|
|
124
|
+
* Cool decorative hairline. Lighter than the reference `--border` (0.922) and
|
|
125
|
+
* barely tinted — table row rules and card outlines that stay visible without
|
|
126
|
+
* dividing the page into boxes.
|
|
127
|
+
*/
|
|
128
|
+
readonly 940: "oklch(0.940 0.004 264)";
|
|
129
|
+
/** the reference `--border`. Kept for pressed fills that still need a step of weight. */
|
|
130
|
+
readonly 922: "oklch(0.922 0 0)";
|
|
131
|
+
/**
|
|
132
|
+
* Cool emphasised hairline. rowkit's; the reference design has no "strong border".
|
|
133
|
+
* Softer than the old 0.87 step so structure reads without shouting.
|
|
134
|
+
*/
|
|
135
|
+
readonly 905: "oklch(0.905 0.006 264)";
|
|
136
|
+
/** Emphasised hairline (legacy weight). Prefer {@link gray[905]} for new chrome. */
|
|
137
|
+
readonly 870: "oklch(0.87 0 0)";
|
|
138
|
+
/** the reference `--muted-foreground` (dark), where it clears AA at 7.63:1. */
|
|
139
|
+
readonly 708: "oklch(0.708 0 0)";
|
|
140
|
+
/**
|
|
141
|
+
* rowkit's correction to the reference `--ring` and `--input` in light mode.
|
|
142
|
+
*
|
|
143
|
+
* the reference design puts them at 0.708 and 0.922, which measure 2.59:1 and 1.26:1
|
|
144
|
+
* against a white page — a focus ring and a control boundary that both fail
|
|
145
|
+
* WCAG 1.4.11.
|
|
146
|
+
*
|
|
147
|
+
* Not the mathematical minimum. Solving in floating point gave 0.669 and a
|
|
148
|
+
* tidy 3.00:1; the browser paints `#959595` and axe measured **2.995:1**,
|
|
149
|
+
* because a colour is quantised to eight bits per channel before anyone sees
|
|
150
|
+
* it. Anything solved exactly onto a threshold lands on whichever side the
|
|
151
|
+
* rounding chooses. 0.635 is 3.45:1 against the page and 3.17:1 against
|
|
152
|
+
* `surface-subtle`, which clears the bar on both sides of the rounding.
|
|
153
|
+
*/
|
|
154
|
+
readonly 635: "oklch(0.635 0 0)";
|
|
155
|
+
/**
|
|
156
|
+
* Cool control boundary. Softer and cooler than the a11y floor at 0.635, still
|
|
157
|
+
* clears 3:1 on the page, a card and a recessed toolbar — so inputs speak the
|
|
158
|
+
* same language as the cool hairlines without failing WCAG 1.4.11.
|
|
159
|
+
*/
|
|
160
|
+
readonly 642: "oklch(0.642 0.012 264)";
|
|
161
|
+
/** the reference `--ring` (dark), 4.18:1 against the dark page. */
|
|
162
|
+
readonly 556: "oklch(0.556 0 0)";
|
|
163
|
+
/**
|
|
164
|
+
* rowkit's correction to the reference `--muted-foreground` in light mode.
|
|
165
|
+
*
|
|
166
|
+
* The reference design's 0.556 is 4.73:1 on white but only 4.34:1 on `--muted`, the
|
|
167
|
+
* recessed surface a table header sits on — and a table header is the single
|
|
168
|
+
* most common use this token has.
|
|
169
|
+
*
|
|
170
|
+
* 0.547 was the first attempt and shipped 4.51:1 in floating point; axe,
|
|
171
|
+
* reading the painted `#717171`, called it 4.47:1 and failed twenty-four
|
|
172
|
+
* stories. See {@link gray[635]} — same lesson, same cause. 0.535 measures
|
|
173
|
+
* 4.75:1 on `--muted` and 5.17:1 on the page.
|
|
174
|
+
*/
|
|
175
|
+
readonly 535: "oklch(0.535 0 0)";
|
|
176
|
+
/** Pressed row in dark mode. */
|
|
177
|
+
readonly 371: "oklch(0.371 0 0)";
|
|
178
|
+
/** the reference `--secondary`, `--muted`, `--accent` (dark). */
|
|
179
|
+
readonly 269: "oklch(0.269 0 0)";
|
|
180
|
+
/** the reference `--primary` (light), `--card` and `--popover` (dark). */
|
|
181
|
+
readonly 205: "oklch(0.205 0 0)";
|
|
182
|
+
/** the reference `--foreground` (light), `--background` (dark). */
|
|
183
|
+
readonly 145: "oklch(0.145 0 0)";
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* The reference design's destructive red, clamped into sRGB. Keyed by lightness, like `gray`.
|
|
187
|
+
*
|
|
188
|
+
* the reference design publishes `oklch(0.577 0.245 27.325)`, and that chroma **does not fit
|
|
189
|
+
* in sRGB** — 0.235 is the maximum at this lightness and hue. The difference is
|
|
190
|
+
* invisible; what it buys is a colour that renders identically on an sRGB
|
|
191
|
+
* monitor and a P3 laptop, instead of one each browser gamut-maps by its own
|
|
192
|
+
* rules. rowkit clamps every chromatic primitive for this reason, and
|
|
193
|
+
* `color.test.ts` enforces it.
|
|
194
|
+
*
|
|
195
|
+
* One red serves both themes. The reference design's dark `--destructive` is a lighter
|
|
196
|
+
* `oklch(0.704 …)`, which carries its white label at **2.86:1** — the single
|
|
197
|
+
* worst failure in the reference design's default set. Reusing the light value gives 4.90:1
|
|
198
|
+
* on the label in both themes and still clears 4.04:1 against the dark page.
|
|
199
|
+
*/
|
|
200
|
+
export declare const red: {
|
|
201
|
+
/** Destructive fill. The reference design's lightness, chroma clamped. */
|
|
202
|
+
readonly 577: "oklch(0.577 0.235 27.325)";
|
|
203
|
+
/** Destructive hover — darkens in both themes, so the white label improves. */
|
|
204
|
+
readonly 520: "oklch(0.52 0.212 27.325)";
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* Success and warning, at the reference design's weight. Keyed by lightness, like `gray`.
|
|
208
|
+
*
|
|
209
|
+
* the reference design has no equivalent to copy, so the rule is consistency rather than
|
|
210
|
+
* fidelity: the solid step sits at the same lightness band as `red-577` and
|
|
211
|
+
* carries a white label, so a success, a warning and a destructive button are
|
|
212
|
+
* the same perceptual weight and only differ in hue.
|
|
213
|
+
*
|
|
214
|
+
* That is a real change for warning, which used to be bright amber with dark
|
|
215
|
+
* text. Bright amber is the loudest thing on a the reference design page — the language is
|
|
216
|
+
* built on restraint, and one saturated chip undoes it. Chroma is clamped to
|
|
217
|
+
* the sRGB boundary at every step, as everywhere else.
|
|
218
|
+
*/
|
|
219
|
+
export declare const green: {
|
|
220
|
+
/** Badge fill, light. */
|
|
221
|
+
readonly 950: "oklch(0.95 0.05 152)";
|
|
222
|
+
/** Badge border, light. */
|
|
223
|
+
readonly 880: "oklch(0.88 0.05 152)";
|
|
224
|
+
/** Badge text, dark. */
|
|
225
|
+
readonly 850: "oklch(0.85 0.12 152)";
|
|
226
|
+
/** Solid fill, both themes. White label at 4.56:1. */
|
|
227
|
+
readonly 550: "oklch(0.55 0.144 152)";
|
|
228
|
+
/** Solid hover — darkens, so the white label improves. */
|
|
229
|
+
readonly 520: "oklch(0.52 0.136 152)";
|
|
230
|
+
/** Badge text, light. */
|
|
231
|
+
readonly 400: "oklch(0.4 0.105 152)";
|
|
232
|
+
/** Badge border, dark. */
|
|
233
|
+
readonly 350: "oklch(0.35 0.092 152)";
|
|
234
|
+
/** Badge fill, dark. */
|
|
235
|
+
readonly 260: "oklch(0.26 0.068 152)";
|
|
236
|
+
};
|
|
237
|
+
/** Warning, mirroring {@link green} step for step. */
|
|
238
|
+
export declare const amber: {
|
|
239
|
+
readonly 950: "oklch(0.95 0.04 75)";
|
|
240
|
+
readonly 880: "oklch(0.88 0.05 75)";
|
|
241
|
+
readonly 850: "oklch(0.85 0.12 75)";
|
|
242
|
+
/** Solid fill, both themes. White label at 4.96:1. */
|
|
243
|
+
readonly 550: "oklch(0.55 0.116 75)";
|
|
244
|
+
readonly 520: "oklch(0.52 0.109 75)";
|
|
245
|
+
readonly 400: "oklch(0.4 0.084 75)";
|
|
246
|
+
readonly 350: "oklch(0.35 0.074 75)";
|
|
247
|
+
readonly 260: "oklch(0.26 0.055 75)";
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* White at a fraction of opacity, for dark-mode borders.
|
|
251
|
+
*
|
|
252
|
+
* Alpha, not a solid grey: a grey tuned for `--background` draws too hard a
|
|
253
|
+
* line once the same border sits on `--card`. The reference uses 10% / 15%;
|
|
254
|
+
* rowkit softens the decorative hairline to 8% so dense tables stay quiet in
|
|
255
|
+
* dark mode the same way the cool light hairline does.
|
|
256
|
+
*/
|
|
257
|
+
export declare const whiteAlpha: {
|
|
258
|
+
/** Soft decorative hairline in dark mode. */
|
|
259
|
+
readonly 8: "oklch(1 0 0 / 8%)";
|
|
260
|
+
/** the reference dark `--border`. */
|
|
261
|
+
readonly 10: "oklch(1 0 0 / 10%)";
|
|
262
|
+
/** Emphasised dark hairline / the reference dark `--input`. */
|
|
263
|
+
readonly 15: "oklch(1 0 0 / 15%)";
|
|
264
|
+
};
|
|
100
265
|
/**
|
|
101
266
|
* Every primitive colour, keyed by the CSS custom property it becomes.
|
|
102
267
|
*
|
|
@@ -159,6 +324,44 @@ export declare const colorPrimitives: {
|
|
|
159
324
|
readonly "neutral-800": string;
|
|
160
325
|
readonly "neutral-900": string;
|
|
161
326
|
readonly "neutral-950": string;
|
|
327
|
+
readonly "white-alpha-8": string;
|
|
328
|
+
readonly "white-alpha-10": string;
|
|
329
|
+
readonly "white-alpha-15": string;
|
|
330
|
+
readonly "amber-400": string;
|
|
331
|
+
readonly "amber-950": string;
|
|
332
|
+
readonly "amber-520": string;
|
|
333
|
+
readonly "amber-880": string;
|
|
334
|
+
readonly "amber-850": string;
|
|
335
|
+
readonly "amber-550": string;
|
|
336
|
+
readonly "amber-350": string;
|
|
337
|
+
readonly "amber-260": string;
|
|
338
|
+
readonly "green-400": string;
|
|
339
|
+
readonly "green-950": string;
|
|
340
|
+
readonly "green-520": string;
|
|
341
|
+
readonly "green-880": string;
|
|
342
|
+
readonly "green-850": string;
|
|
343
|
+
readonly "green-550": string;
|
|
344
|
+
readonly "green-350": string;
|
|
345
|
+
readonly "green-260": string;
|
|
346
|
+
readonly "red-577": string;
|
|
347
|
+
readonly "red-520": string;
|
|
348
|
+
readonly "gray-988": string;
|
|
349
|
+
readonly "gray-985": string;
|
|
350
|
+
readonly "gray-972": string;
|
|
351
|
+
readonly "gray-970": string;
|
|
352
|
+
readonly "gray-940": string;
|
|
353
|
+
readonly "gray-922": string;
|
|
354
|
+
readonly "gray-905": string;
|
|
355
|
+
readonly "gray-870": string;
|
|
356
|
+
readonly "gray-708": string;
|
|
357
|
+
readonly "gray-635": string;
|
|
358
|
+
readonly "gray-642": string;
|
|
359
|
+
readonly "gray-556": string;
|
|
360
|
+
readonly "gray-535": string;
|
|
361
|
+
readonly "gray-371": string;
|
|
362
|
+
readonly "gray-269": string;
|
|
363
|
+
readonly "gray-205": string;
|
|
364
|
+
readonly "gray-145": string;
|
|
162
365
|
readonly white: "oklch(1 0 0)";
|
|
163
366
|
readonly black: "oklch(0 0 0)";
|
|
164
367
|
};
|
|
@@ -172,17 +375,29 @@ export type ColorRef = `var(--color-${string})`;
|
|
|
172
375
|
* hunting down hex codes. `semantic.test.ts` enforces this.
|
|
173
376
|
*/
|
|
174
377
|
export declare const semanticColorLight: {
|
|
175
|
-
/**
|
|
378
|
+
/**
|
|
379
|
+
* Page background, behind all surfaces.
|
|
380
|
+
*
|
|
381
|
+
* Soft cool off-white rather than the reference pure white — less glare over
|
|
382
|
+
* a long session, and enough lift that a white `card` still reads as a plane.
|
|
383
|
+
*/
|
|
176
384
|
readonly background: `var(--color-${string})`;
|
|
177
|
-
/** Cards, panels, table bodies — the plane content sits on. */
|
|
178
|
-
readonly
|
|
179
|
-
/**
|
|
180
|
-
|
|
385
|
+
/** Cards, panels, table bodies — the plane content sits on. The reference `--card`. */
|
|
386
|
+
readonly card: `var(--color-${string})`;
|
|
387
|
+
/**
|
|
388
|
+
* Table headers, toolbars: a surface that recedes slightly.
|
|
389
|
+
*
|
|
390
|
+
* Cool and a touch lighter than the reference `--muted`. Same role as
|
|
391
|
+
* `accent` out of the box — separate override points, not different colours.
|
|
392
|
+
*/
|
|
393
|
+
readonly muted: `var(--color-${string})`;
|
|
181
394
|
/** Row hover. */
|
|
182
|
-
readonly
|
|
183
|
-
/** Row press / active. */
|
|
395
|
+
readonly accent: `var(--color-${string})`;
|
|
396
|
+
/** Row press / active. One step past hover; the reference design has no press token. */
|
|
184
397
|
readonly 'surface-active': `var(--color-${string})`;
|
|
185
|
-
/**
|
|
398
|
+
/**
|
|
399
|
+
* Selected table row. Quiet primary wash — distinct from hover, not a shout.
|
|
400
|
+
*/
|
|
186
401
|
readonly 'surface-selected': `var(--color-${string})`;
|
|
187
402
|
/** Disabled control background. */
|
|
188
403
|
readonly 'surface-disabled': `var(--color-${string})`;
|
|
@@ -198,18 +413,17 @@ export declare const semanticColorLight: {
|
|
|
198
413
|
* reader to perceive and WCAG 1.4.11 does not apply.
|
|
199
414
|
*/
|
|
200
415
|
readonly skeleton: `var(--color-${string})`;
|
|
201
|
-
/** Primary body and heading text. */
|
|
202
|
-
readonly
|
|
416
|
+
/** Primary body and heading text. The reference `--foreground`. */
|
|
417
|
+
readonly foreground: `var(--color-${string})`;
|
|
203
418
|
/**
|
|
204
|
-
* Secondary text, column labels, help text.
|
|
419
|
+
* Secondary text, column labels, help text. The reference `--muted-foreground`.
|
|
205
420
|
*
|
|
206
|
-
* `
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
* hierarchy survives.
|
|
421
|
+
* `gray-535`, not the reference design's 0.556. The same trap the old `neutral-500` fell
|
|
422
|
+
* into: a table header is muted text on `surface-subtle`, and the reference design's value
|
|
423
|
+
* reaches 4.73:1 on white but only 4.34:1 on the recessed surface this token
|
|
424
|
+
* is most often used against. Nine thousandths of lightness buy the pass.
|
|
211
425
|
*/
|
|
212
|
-
readonly '
|
|
426
|
+
readonly 'muted-foreground': `var(--color-${string})`;
|
|
213
427
|
/** Placeholders and de-emphasised metadata. */
|
|
214
428
|
readonly 'text-subtle': `var(--color-${string})`;
|
|
215
429
|
/** Text on a disabled control. */
|
|
@@ -217,8 +431,9 @@ export declare const semanticColorLight: {
|
|
|
217
431
|
/**
|
|
218
432
|
* Decorative hairline: row separators, card outlines.
|
|
219
433
|
*
|
|
220
|
-
*
|
|
221
|
-
* of an interactive control
|
|
434
|
+
* Cool and lighter than the reference 0.922. Deliberately below 3:1 — do not
|
|
435
|
+
* use it for the boundary of an interactive control; see
|
|
436
|
+
* {@link semanticColorLight['input']}.
|
|
222
437
|
*/
|
|
223
438
|
readonly border: `var(--color-${string})`;
|
|
224
439
|
/** Emphasised decorative border: dividers that need to read as structure. */
|
|
@@ -229,14 +444,18 @@ export declare const semanticColorLight: {
|
|
|
229
444
|
* Boundary of an interactive control — text inputs, checkboxes, outlined
|
|
230
445
|
* buttons.
|
|
231
446
|
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
|
|
447
|
+
* Cooler and a touch lighter than the old pure `gray-635`, still ≥3:1 on the
|
|
448
|
+
* page, a card and a toolbar. Matches the cool hairline language without
|
|
449
|
+
* dropping below WCAG 1.4.11.
|
|
450
|
+
*/
|
|
451
|
+
readonly input: `var(--color-${string})`;
|
|
452
|
+
/**
|
|
453
|
+
* Focus ring. Never remove the ring — recolour it.
|
|
454
|
+
*
|
|
455
|
+
* Matches the brand primary so focused controls and the primary button speak
|
|
456
|
+
* one language. Clears 1.4.11 against the page and recessed surfaces.
|
|
236
457
|
*/
|
|
237
|
-
readonly
|
|
238
|
-
/** Focus ring. Never remove the ring — recolour it. */
|
|
239
|
-
readonly 'focus-ring': `var(--color-${string})`;
|
|
458
|
+
readonly ring: `var(--color-${string})`;
|
|
240
459
|
/** Base colour shadows are mixed from. */
|
|
241
460
|
readonly shadow: `var(--color-${string})`;
|
|
242
461
|
readonly 'neutral-solid': `var(--color-${string})`;
|
|
@@ -281,22 +500,22 @@ export declare const semanticColorLight: {
|
|
|
281
500
|
*/
|
|
282
501
|
export declare const semanticColorDark: {
|
|
283
502
|
readonly background: `var(--color-${string})`;
|
|
284
|
-
readonly
|
|
285
|
-
readonly
|
|
286
|
-
readonly
|
|
503
|
+
readonly card: `var(--color-${string})`;
|
|
504
|
+
readonly muted: `var(--color-${string})`;
|
|
505
|
+
readonly accent: `var(--color-${string})`;
|
|
287
506
|
readonly 'surface-active': `var(--color-${string})`;
|
|
288
507
|
readonly 'surface-selected': `var(--color-${string})`;
|
|
289
508
|
readonly 'surface-disabled': `var(--color-${string})`;
|
|
290
509
|
readonly skeleton: `var(--color-${string})`;
|
|
291
|
-
readonly
|
|
292
|
-
readonly '
|
|
510
|
+
readonly foreground: `var(--color-${string})`;
|
|
511
|
+
readonly 'muted-foreground': `var(--color-${string})`;
|
|
293
512
|
readonly 'text-subtle': `var(--color-${string})`;
|
|
294
513
|
readonly 'text-disabled': `var(--color-${string})`;
|
|
295
514
|
readonly border: `var(--color-${string})`;
|
|
296
515
|
readonly 'border-strong': `var(--color-${string})`;
|
|
297
516
|
readonly 'border-subtle': `var(--color-${string})`;
|
|
298
|
-
readonly
|
|
299
|
-
readonly
|
|
517
|
+
readonly input: `var(--color-${string})`;
|
|
518
|
+
readonly ring: `var(--color-${string})`;
|
|
300
519
|
readonly shadow: `var(--color-${string})`;
|
|
301
520
|
readonly 'neutral-solid': `var(--color-${string})`;
|
|
302
521
|
readonly 'neutral-solid-hover': `var(--color-${string})`;
|
package/dist/index.d.ts
CHANGED
|
@@ -18,11 +18,13 @@
|
|
|
18
18
|
* @import '@rowkit/tokens/css';
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export { colorPrimitives, colorSteps, danger, neutral, primary, semanticColorDark, semanticColorLight, success, warning, } from './color.js';
|
|
21
|
+
export { amber, colorPrimitives, colorSteps, danger, gray, green, neutral, primary, red, semanticColorDark, semanticColorLight, success, warning, whiteAlpha, } from './color.js';
|
|
22
22
|
export type { ColorRef, ColorStep, SemanticColorName } from './color.js';
|
|
23
|
+
export { blur } from './blur.js';
|
|
24
|
+
export type { BlurName } from './blur.js';
|
|
23
25
|
export { duration, easing } from './motion.js';
|
|
24
26
|
export type { DurationName, EasingName } from './motion.js';
|
|
25
|
-
export { radius } from './radius.js';
|
|
27
|
+
export { radius, radiusBase } from './radius.js';
|
|
26
28
|
export type { RadiusName } from './radius.js';
|
|
27
29
|
export { shadow } from './shadow.js';
|
|
28
30
|
export type { ShadowName } from './shadow.js';
|
|
@@ -41,6 +43,50 @@ export { buildThemeCss } from './css.js';
|
|
|
41
43
|
*/
|
|
42
44
|
export declare const tokens: {
|
|
43
45
|
readonly color: {
|
|
46
|
+
readonly gray: {
|
|
47
|
+
readonly 988: "oklch(0.988 0.002 264)";
|
|
48
|
+
readonly 985: "oklch(0.985 0 0)";
|
|
49
|
+
readonly 972: "oklch(0.972 0.003 264)";
|
|
50
|
+
readonly 970: "oklch(0.97 0 0)";
|
|
51
|
+
readonly 940: "oklch(0.940 0.004 264)";
|
|
52
|
+
readonly 922: "oklch(0.922 0 0)";
|
|
53
|
+
readonly 905: "oklch(0.905 0.006 264)";
|
|
54
|
+
readonly 870: "oklch(0.87 0 0)";
|
|
55
|
+
readonly 708: "oklch(0.708 0 0)";
|
|
56
|
+
readonly 635: "oklch(0.635 0 0)";
|
|
57
|
+
readonly 642: "oklch(0.642 0.012 264)";
|
|
58
|
+
readonly 556: "oklch(0.556 0 0)";
|
|
59
|
+
readonly 535: "oklch(0.535 0 0)";
|
|
60
|
+
readonly 371: "oklch(0.371 0 0)";
|
|
61
|
+
readonly 269: "oklch(0.269 0 0)";
|
|
62
|
+
readonly 205: "oklch(0.205 0 0)";
|
|
63
|
+
readonly 145: "oklch(0.145 0 0)";
|
|
64
|
+
};
|
|
65
|
+
readonly green: {
|
|
66
|
+
readonly 950: "oklch(0.95 0.05 152)";
|
|
67
|
+
readonly 880: "oklch(0.88 0.05 152)";
|
|
68
|
+
readonly 850: "oklch(0.85 0.12 152)";
|
|
69
|
+
readonly 550: "oklch(0.55 0.144 152)";
|
|
70
|
+
readonly 520: "oklch(0.52 0.136 152)";
|
|
71
|
+
readonly 400: "oklch(0.4 0.105 152)";
|
|
72
|
+
readonly 350: "oklch(0.35 0.092 152)";
|
|
73
|
+
readonly 260: "oklch(0.26 0.068 152)";
|
|
74
|
+
};
|
|
75
|
+
readonly amber: {
|
|
76
|
+
readonly 950: "oklch(0.95 0.04 75)";
|
|
77
|
+
readonly 880: "oklch(0.88 0.05 75)";
|
|
78
|
+
readonly 850: "oklch(0.85 0.12 75)";
|
|
79
|
+
readonly 550: "oklch(0.55 0.116 75)";
|
|
80
|
+
readonly 520: "oklch(0.52 0.109 75)";
|
|
81
|
+
readonly 400: "oklch(0.4 0.084 75)";
|
|
82
|
+
readonly 350: "oklch(0.35 0.074 75)";
|
|
83
|
+
readonly 260: "oklch(0.26 0.055 75)";
|
|
84
|
+
};
|
|
85
|
+
readonly whiteAlpha: {
|
|
86
|
+
readonly 8: "oklch(1 0 0 / 8%)";
|
|
87
|
+
readonly 10: "oklch(1 0 0 / 10%)";
|
|
88
|
+
readonly 15: "oklch(1 0 0 / 15%)";
|
|
89
|
+
};
|
|
44
90
|
readonly neutral: {
|
|
45
91
|
readonly 50: "oklch(0.984 0.003 264)";
|
|
46
92
|
readonly 100: "oklch(0.968 0.004 264)";
|
|
@@ -67,6 +113,10 @@ export declare const tokens: {
|
|
|
67
113
|
readonly 900: "oklch(0.396 0.135 259)";
|
|
68
114
|
readonly 950: "oklch(0.282 0.086 259)";
|
|
69
115
|
};
|
|
116
|
+
readonly red: {
|
|
117
|
+
readonly 577: "oklch(0.577 0.235 27.325)";
|
|
118
|
+
readonly 520: "oklch(0.52 0.212 27.325)";
|
|
119
|
+
};
|
|
70
120
|
readonly success: {
|
|
71
121
|
readonly 50: "oklch(0.97 0.014 152)";
|
|
72
122
|
readonly 100: "oklch(0.936 0.036 152)";
|
|
@@ -163,6 +213,44 @@ export declare const tokens: {
|
|
|
163
213
|
readonly "neutral-800": string;
|
|
164
214
|
readonly "neutral-900": string;
|
|
165
215
|
readonly "neutral-950": string;
|
|
216
|
+
readonly "white-alpha-8": string;
|
|
217
|
+
readonly "white-alpha-10": string;
|
|
218
|
+
readonly "white-alpha-15": string;
|
|
219
|
+
readonly "amber-400": string;
|
|
220
|
+
readonly "amber-950": string;
|
|
221
|
+
readonly "amber-520": string;
|
|
222
|
+
readonly "amber-880": string;
|
|
223
|
+
readonly "amber-850": string;
|
|
224
|
+
readonly "amber-550": string;
|
|
225
|
+
readonly "amber-350": string;
|
|
226
|
+
readonly "amber-260": string;
|
|
227
|
+
readonly "green-400": string;
|
|
228
|
+
readonly "green-950": string;
|
|
229
|
+
readonly "green-520": string;
|
|
230
|
+
readonly "green-880": string;
|
|
231
|
+
readonly "green-850": string;
|
|
232
|
+
readonly "green-550": string;
|
|
233
|
+
readonly "green-350": string;
|
|
234
|
+
readonly "green-260": string;
|
|
235
|
+
readonly "red-577": string;
|
|
236
|
+
readonly "red-520": string;
|
|
237
|
+
readonly "gray-988": string;
|
|
238
|
+
readonly "gray-985": string;
|
|
239
|
+
readonly "gray-972": string;
|
|
240
|
+
readonly "gray-970": string;
|
|
241
|
+
readonly "gray-940": string;
|
|
242
|
+
readonly "gray-922": string;
|
|
243
|
+
readonly "gray-905": string;
|
|
244
|
+
readonly "gray-870": string;
|
|
245
|
+
readonly "gray-708": string;
|
|
246
|
+
readonly "gray-635": string;
|
|
247
|
+
readonly "gray-642": string;
|
|
248
|
+
readonly "gray-556": string;
|
|
249
|
+
readonly "gray-535": string;
|
|
250
|
+
readonly "gray-371": string;
|
|
251
|
+
readonly "gray-269": string;
|
|
252
|
+
readonly "gray-205": string;
|
|
253
|
+
readonly "gray-145": string;
|
|
166
254
|
readonly white: "oklch(1 0 0)";
|
|
167
255
|
readonly black: "oklch(0 0 0)";
|
|
168
256
|
};
|
|
@@ -170,22 +258,22 @@ export declare const tokens: {
|
|
|
170
258
|
readonly semantic: {
|
|
171
259
|
readonly light: {
|
|
172
260
|
readonly background: `var(--color-${string})`;
|
|
173
|
-
readonly
|
|
174
|
-
readonly
|
|
175
|
-
readonly
|
|
261
|
+
readonly card: `var(--color-${string})`;
|
|
262
|
+
readonly muted: `var(--color-${string})`;
|
|
263
|
+
readonly accent: `var(--color-${string})`;
|
|
176
264
|
readonly 'surface-active': `var(--color-${string})`;
|
|
177
265
|
readonly 'surface-selected': `var(--color-${string})`;
|
|
178
266
|
readonly 'surface-disabled': `var(--color-${string})`;
|
|
179
267
|
readonly skeleton: `var(--color-${string})`;
|
|
180
|
-
readonly
|
|
181
|
-
readonly '
|
|
268
|
+
readonly foreground: `var(--color-${string})`;
|
|
269
|
+
readonly 'muted-foreground': `var(--color-${string})`;
|
|
182
270
|
readonly 'text-subtle': `var(--color-${string})`;
|
|
183
271
|
readonly 'text-disabled': `var(--color-${string})`;
|
|
184
272
|
readonly border: `var(--color-${string})`;
|
|
185
273
|
readonly 'border-strong': `var(--color-${string})`;
|
|
186
274
|
readonly 'border-subtle': `var(--color-${string})`;
|
|
187
|
-
readonly
|
|
188
|
-
readonly
|
|
275
|
+
readonly input: `var(--color-${string})`;
|
|
276
|
+
readonly ring: `var(--color-${string})`;
|
|
189
277
|
readonly shadow: `var(--color-${string})`;
|
|
190
278
|
readonly 'neutral-solid': `var(--color-${string})`;
|
|
191
279
|
readonly 'neutral-solid-hover': `var(--color-${string})`;
|
|
@@ -220,22 +308,22 @@ export declare const tokens: {
|
|
|
220
308
|
};
|
|
221
309
|
readonly dark: {
|
|
222
310
|
readonly background: `var(--color-${string})`;
|
|
223
|
-
readonly
|
|
224
|
-
readonly
|
|
225
|
-
readonly
|
|
311
|
+
readonly card: `var(--color-${string})`;
|
|
312
|
+
readonly muted: `var(--color-${string})`;
|
|
313
|
+
readonly accent: `var(--color-${string})`;
|
|
226
314
|
readonly 'surface-active': `var(--color-${string})`;
|
|
227
315
|
readonly 'surface-selected': `var(--color-${string})`;
|
|
228
316
|
readonly 'surface-disabled': `var(--color-${string})`;
|
|
229
317
|
readonly skeleton: `var(--color-${string})`;
|
|
230
|
-
readonly
|
|
231
|
-
readonly '
|
|
318
|
+
readonly foreground: `var(--color-${string})`;
|
|
319
|
+
readonly 'muted-foreground': `var(--color-${string})`;
|
|
232
320
|
readonly 'text-subtle': `var(--color-${string})`;
|
|
233
321
|
readonly 'text-disabled': `var(--color-${string})`;
|
|
234
322
|
readonly border: `var(--color-${string})`;
|
|
235
323
|
readonly 'border-strong': `var(--color-${string})`;
|
|
236
324
|
readonly 'border-subtle': `var(--color-${string})`;
|
|
237
|
-
readonly
|
|
238
|
-
readonly
|
|
325
|
+
readonly input: `var(--color-${string})`;
|
|
326
|
+
readonly ring: `var(--color-${string})`;
|
|
239
327
|
readonly shadow: `var(--color-${string})`;
|
|
240
328
|
readonly 'neutral-solid': `var(--color-${string})`;
|
|
241
329
|
readonly 'neutral-solid-hover': `var(--color-${string})`;
|
|
@@ -342,13 +430,17 @@ export declare const tokens: {
|
|
|
342
430
|
};
|
|
343
431
|
};
|
|
344
432
|
readonly radius: {
|
|
345
|
-
readonly none: "0rem";
|
|
346
|
-
readonly xs: "0.125rem";
|
|
347
|
-
readonly sm: "0.25rem";
|
|
348
|
-
readonly md: "0.375rem";
|
|
349
|
-
readonly lg: "0.5rem";
|
|
350
|
-
readonly xl: "0.75rem";
|
|
351
433
|
readonly full: "9999px";
|
|
434
|
+
readonly none: string;
|
|
435
|
+
readonly xs: string;
|
|
436
|
+
readonly sm: string;
|
|
437
|
+
readonly md: string;
|
|
438
|
+
readonly lg: string;
|
|
439
|
+
readonly xl: string;
|
|
440
|
+
};
|
|
441
|
+
readonly radiusBase: "0.625rem";
|
|
442
|
+
readonly blur: {
|
|
443
|
+
readonly overlay: "4px";
|
|
352
444
|
};
|
|
353
445
|
readonly shadow: {
|
|
354
446
|
readonly none: "none";
|
|
@@ -357,7 +449,8 @@ export declare const tokens: {
|
|
|
357
449
|
readonly md: "0 4px 6px -1px color-mix(in oklab, var(--color-shadow) 9%, transparent), 0 2px 4px -2px color-mix(in oklab, var(--color-shadow) 9%, transparent)";
|
|
358
450
|
readonly lg: "0 10px 15px -3px color-mix(in oklab, var(--color-shadow) 10%, transparent), 0 4px 6px -4px color-mix(in oklab, var(--color-shadow) 10%, transparent)";
|
|
359
451
|
readonly xl: "0 20px 25px -5px color-mix(in oklab, var(--color-shadow) 12%, transparent), 0 8px 10px -6px color-mix(in oklab, var(--color-shadow) 12%, transparent)";
|
|
360
|
-
readonly 'scroll-x': "
|
|
452
|
+
readonly 'scroll-x': "12px 0 16px -8px color-mix(in oklab, var(--color-shadow) 22%, transparent)";
|
|
453
|
+
readonly 'sticky-header': "inset 0 -1px 0 var(--color-border)";
|
|
361
454
|
};
|
|
362
455
|
readonly zIndex: {
|
|
363
456
|
readonly base: "0";
|