@tokis/tokens 1.0.1 → 1.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.
- package/README.md +5 -5
- package/dist/cjs/css/generate-css-vars.js +242 -39
- package/dist/cjs/primitives/breakpoints.js +10 -0
- package/dist/cjs/primitives/colors.js +64 -16
- package/dist/cjs/primitives/motion.js +16 -3
- package/dist/cjs/primitives/radius.js +9 -2
- package/dist/cjs/primitives/shadows.js +12 -3
- package/dist/cjs/primitives/spacing.js +28 -0
- package/dist/cjs/primitives/typography.js +35 -7
- package/dist/cjs/primitives/zIndex.js +15 -2
- package/dist/css/generate-css-vars.d.ts +46 -1
- package/dist/css/generate-css-vars.d.ts.map +1 -1
- package/dist/css/generate-css-vars.js +239 -39
- package/dist/css/generate-css-vars.js.map +1 -1
- package/dist/primitives/breakpoints.d.ts +10 -0
- package/dist/primitives/breakpoints.d.ts.map +1 -1
- package/dist/primitives/breakpoints.js +10 -0
- package/dist/primitives/breakpoints.js.map +1 -1
- package/dist/primitives/colors.d.ts +52 -16
- package/dist/primitives/colors.d.ts.map +1 -1
- package/dist/primitives/colors.js +64 -16
- package/dist/primitives/colors.js.map +1 -1
- package/dist/primitives/motion.d.ts +14 -3
- package/dist/primitives/motion.d.ts.map +1 -1
- package/dist/primitives/motion.js +16 -3
- package/dist/primitives/motion.js.map +1 -1
- package/dist/primitives/radius.d.ts +9 -2
- package/dist/primitives/radius.d.ts.map +1 -1
- package/dist/primitives/radius.js +9 -2
- package/dist/primitives/radius.js.map +1 -1
- package/dist/primitives/shadows.d.ts +12 -3
- package/dist/primitives/shadows.d.ts.map +1 -1
- package/dist/primitives/shadows.js +12 -3
- package/dist/primitives/shadows.js.map +1 -1
- package/dist/primitives/spacing.d.ts +26 -0
- package/dist/primitives/spacing.d.ts.map +1 -1
- package/dist/primitives/spacing.js +28 -0
- package/dist/primitives/spacing.js.map +1 -1
- package/dist/primitives/typography.d.ts +25 -2
- package/dist/primitives/typography.d.ts.map +1 -1
- package/dist/primitives/typography.js +35 -7
- package/dist/primitives/typography.js.map +1 -1
- package/dist/primitives/zIndex.d.ts +15 -2
- package/dist/primitives/zIndex.d.ts.map +1 -1
- package/dist/primitives/zIndex.js +15 -2
- package/dist/primitives/zIndex.js.map +1 -1
- package/dist/semantic/border.d.ts +1 -1
- package/dist/semantic/color.d.ts +5 -5
- package/dist/semantic/surface.d.ts +1 -1
- package/dist/semantic/text.d.ts +4 -4
- package/dist/themes/dark.d.ts +44 -15
- package/dist/themes/dark.d.ts.map +1 -1
- package/dist/themes/light.d.ts +50 -21
- package/dist/themes/light.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/primitives/motion.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/primitives/motion.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAgBT,CAAC"}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis motion tokens — durations and easing functions.
|
|
3
|
+
* These map to `--tokis-duration-{key}` and `--tokis-ease-{key}` CSS variables.
|
|
4
|
+
*
|
|
5
|
+
* Always reference via CSS variables rather than importing at runtime to
|
|
6
|
+
* preserve zero-runtime guarantee.
|
|
7
|
+
*/
|
|
1
8
|
export const motion = {
|
|
9
|
+
// ── Durations ─────────────────────────────────────────────────────────
|
|
2
10
|
duration: {
|
|
3
|
-
fast: '
|
|
4
|
-
normal: '
|
|
5
|
-
slow: '
|
|
11
|
+
fast: '100ms', // micro-interactions (hover, focus ring)
|
|
12
|
+
normal: '200ms', // most transitions (color, opacity)
|
|
13
|
+
slow: '300ms', // larger state changes (dropdown, tooltip)
|
|
14
|
+
slower: '500ms', // complex animations (page-level, charts)
|
|
6
15
|
},
|
|
16
|
+
// ── Easing curves ─────────────────────────────────────────────────────
|
|
7
17
|
easing: {
|
|
18
|
+
easeIn: 'cubic-bezier(0.4, 0, 1, 1)',
|
|
19
|
+
easeOut: 'cubic-bezier(0, 0, 0.2, 1)',
|
|
8
20
|
easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
21
|
+
spring: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)',
|
|
9
22
|
},
|
|
10
23
|
};
|
|
11
24
|
//# sourceMappingURL=motion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion.js","sourceRoot":"","sources":["../../src/primitives/motion.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,QAAQ,EAAE;QACR,IAAI,
|
|
1
|
+
{"version":3,"file":"motion.js","sourceRoot":"","sources":["../../src/primitives/motion.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,yEAAyE;IACzE,QAAQ,EAAE;QACR,IAAI,EAAI,OAAO,EAAG,yCAAyC;QAC3D,MAAM,EAAE,OAAO,EAAG,oCAAoC;QACtD,IAAI,EAAI,OAAO,EAAG,2CAA2C;QAC7D,MAAM,EAAE,OAAO,EAAG,0CAA0C;KAC7D;IAED,yEAAyE;IACzE,MAAM,EAAE;QACN,MAAM,EAAK,4BAA4B;QACvC,OAAO,EAAI,4BAA4B;QACvC,SAAS,EAAE,8BAA8B;QACzC,MAAM,EAAK,yCAAyC;KACrD;CACO,CAAC"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis border-radius tokens.
|
|
3
|
+
* These map to `--tokis-radius-{key}` CSS variables.
|
|
4
|
+
*/
|
|
1
5
|
export declare const radius: {
|
|
2
6
|
readonly none: "0px";
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
7
|
+
readonly xs: "2px";
|
|
8
|
+
readonly sm: "4px";
|
|
9
|
+
readonly md: "6px";
|
|
5
10
|
readonly lg: "8px";
|
|
11
|
+
readonly xl: "12px";
|
|
12
|
+
readonly '2xl': "16px";
|
|
6
13
|
readonly full: "9999px";
|
|
7
14
|
};
|
|
8
15
|
//# sourceMappingURL=radius.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radius.d.ts","sourceRoot":"","sources":["../../src/primitives/radius.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"radius.d.ts","sourceRoot":"","sources":["../../src/primitives/radius.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;;;;CAST,CAAC"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis border-radius tokens.
|
|
3
|
+
* These map to `--tokis-radius-{key}` CSS variables.
|
|
4
|
+
*/
|
|
1
5
|
export const radius = {
|
|
2
6
|
none: '0px',
|
|
3
|
-
|
|
4
|
-
|
|
7
|
+
xs: '2px',
|
|
8
|
+
sm: '4px',
|
|
9
|
+
md: '6px',
|
|
5
10
|
lg: '8px',
|
|
11
|
+
xl: '12px',
|
|
12
|
+
'2xl': '16px',
|
|
6
13
|
full: '9999px',
|
|
7
14
|
};
|
|
8
15
|
//# sourceMappingURL=radius.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radius.js","sourceRoot":"","sources":["../../src/primitives/radius.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,KAAK;IACX,EAAE,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"radius.js","sourceRoot":"","sources":["../../src/primitives/radius.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,KAAK;IACX,EAAE,EAAI,KAAK;IACX,EAAE,EAAI,KAAK;IACX,EAAE,EAAI,KAAK;IACX,EAAE,EAAI,KAAK;IACX,EAAE,EAAI,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,QAAQ;CACN,CAAC"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis box-shadow tokens.
|
|
3
|
+
* These map to `--tokis-shadow-{key}` CSS variables.
|
|
4
|
+
* All shadows use modern `rgb()` with `/` alpha syntax for correct rendering.
|
|
5
|
+
*/
|
|
1
6
|
export declare const shadows: {
|
|
2
|
-
readonly
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
7
|
+
readonly xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
8
|
+
readonly sm: "0 1px 3px 0 rgb(0 0 0 / 0.10), 0 1px 2px -1px rgb(0 0 0 / 0.10)";
|
|
9
|
+
readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.10), 0 2px 4px -2px rgb(0 0 0 / 0.10)";
|
|
10
|
+
readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.10), 0 4px 6px -4px rgb(0 0 0 / 0.10)";
|
|
11
|
+
readonly xl: "0 20px 25px -5px rgb(0 0 0 / 0.10), 0 8px 10px -6px rgb(0 0 0 / 0.10)";
|
|
12
|
+
readonly '2xl': "0 25px 50px -12px rgb(0 0 0 / 0.25)";
|
|
13
|
+
readonly inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)";
|
|
5
14
|
};
|
|
6
15
|
//# sourceMappingURL=shadows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../src/primitives/shadows.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../src/primitives/shadows.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,OAAO;;;;;;;;CAQV,CAAC"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis box-shadow tokens.
|
|
3
|
+
* These map to `--tokis-shadow-{key}` CSS variables.
|
|
4
|
+
* All shadows use modern `rgb()` with `/` alpha syntax for correct rendering.
|
|
5
|
+
*/
|
|
1
6
|
export const shadows = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
7
|
+
xs: '0 1px 2px 0 rgb(0 0 0 / 0.05)',
|
|
8
|
+
sm: '0 1px 3px 0 rgb(0 0 0 / 0.10), 0 1px 2px -1px rgb(0 0 0 / 0.10)',
|
|
9
|
+
md: '0 4px 6px -1px rgb(0 0 0 / 0.10), 0 2px 4px -2px rgb(0 0 0 / 0.10)',
|
|
10
|
+
lg: '0 10px 15px -3px rgb(0 0 0 / 0.10), 0 4px 6px -4px rgb(0 0 0 / 0.10)',
|
|
11
|
+
xl: '0 20px 25px -5px rgb(0 0 0 / 0.10), 0 8px 10px -6px rgb(0 0 0 / 0.10)',
|
|
12
|
+
'2xl': '0 25px 50px -12px rgb(0 0 0 / 0.25)',
|
|
13
|
+
inner: 'inset 0 2px 4px 0 rgb(0 0 0 / 0.05)',
|
|
5
14
|
};
|
|
6
15
|
//# sourceMappingURL=shadows.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadows.js","sourceRoot":"","sources":["../../src/primitives/shadows.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"shadows.js","sourceRoot":"","sources":["../../src/primitives/shadows.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,EAAE,EAAK,+BAA+B;IACtC,EAAE,EAAK,iEAAiE;IACxE,EAAE,EAAK,oEAAoE;IAC3E,EAAE,EAAK,sEAAsE;IAC7E,EAAE,EAAK,uEAAuE;IAC9E,KAAK,EAAE,qCAAqC;IAC5C,KAAK,EAAE,qCAAqC;CACpC,CAAC"}
|
|
@@ -1,8 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis spacing tokens.
|
|
3
|
+
* Uses a 4px base unit with numeric keys that map directly to
|
|
4
|
+
* `--tokis-spacing-{key}` CSS variables (e.g. `spacing[4]` → `--tokis-spacing-4`).
|
|
5
|
+
*
|
|
6
|
+
* Named aliases (xs/sm/md/lg/xl) are preserved for backward compatibility
|
|
7
|
+
* but numeric keys are the preferred form in component code.
|
|
8
|
+
*/
|
|
1
9
|
export declare const spacing: {
|
|
10
|
+
readonly 0: "0px";
|
|
11
|
+
readonly 1: "4px";
|
|
12
|
+
readonly 2: "8px";
|
|
13
|
+
readonly 3: "12px";
|
|
14
|
+
readonly 4: "16px";
|
|
15
|
+
readonly 5: "20px";
|
|
16
|
+
readonly 6: "24px";
|
|
17
|
+
readonly 8: "32px";
|
|
18
|
+
readonly 10: "40px";
|
|
19
|
+
readonly 12: "48px";
|
|
20
|
+
readonly 16: "64px";
|
|
21
|
+
readonly 20: "80px";
|
|
22
|
+
readonly 24: "96px";
|
|
23
|
+
/** @deprecated Use numeric key `1` → 4px */
|
|
2
24
|
readonly xs: "4px";
|
|
25
|
+
/** @deprecated Use numeric key `2` → 8px */
|
|
3
26
|
readonly sm: "8px";
|
|
27
|
+
/** @deprecated Use numeric key `4` → 16px */
|
|
4
28
|
readonly md: "16px";
|
|
29
|
+
/** @deprecated Use numeric key `6` → 24px */
|
|
5
30
|
readonly lg: "24px";
|
|
31
|
+
/** @deprecated Use numeric key `8` → 32px */
|
|
6
32
|
readonly xl: "32px";
|
|
7
33
|
};
|
|
8
34
|
//# sourceMappingURL=spacing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/primitives/spacing.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/primitives/spacing.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;IAiBlB,4CAA4C;;IAE5C,4CAA4C;;IAE5C,6CAA6C;;IAE7C,6CAA6C;;IAE7C,6CAA6C;;CAErC,CAAC"}
|
|
@@ -1,8 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis spacing tokens.
|
|
3
|
+
* Uses a 4px base unit with numeric keys that map directly to
|
|
4
|
+
* `--tokis-spacing-{key}` CSS variables (e.g. `spacing[4]` → `--tokis-spacing-4`).
|
|
5
|
+
*
|
|
6
|
+
* Named aliases (xs/sm/md/lg/xl) are preserved for backward compatibility
|
|
7
|
+
* but numeric keys are the preferred form in component code.
|
|
8
|
+
*/
|
|
1
9
|
export const spacing = {
|
|
10
|
+
// ── Numeric scale (4 px base) ─────────────────────────────────────────
|
|
11
|
+
0: '0px',
|
|
12
|
+
1: '4px',
|
|
13
|
+
2: '8px',
|
|
14
|
+
3: '12px',
|
|
15
|
+
4: '16px',
|
|
16
|
+
5: '20px',
|
|
17
|
+
6: '24px',
|
|
18
|
+
8: '32px',
|
|
19
|
+
10: '40px',
|
|
20
|
+
12: '48px',
|
|
21
|
+
16: '64px',
|
|
22
|
+
20: '80px',
|
|
23
|
+
24: '96px',
|
|
24
|
+
// ── Named aliases (legacy / semantic) ────────────────────────────────
|
|
25
|
+
/** @deprecated Use numeric key `1` → 4px */
|
|
2
26
|
xs: '4px',
|
|
27
|
+
/** @deprecated Use numeric key `2` → 8px */
|
|
3
28
|
sm: '8px',
|
|
29
|
+
/** @deprecated Use numeric key `4` → 16px */
|
|
4
30
|
md: '16px',
|
|
31
|
+
/** @deprecated Use numeric key `6` → 24px */
|
|
5
32
|
lg: '24px',
|
|
33
|
+
/** @deprecated Use numeric key `8` → 32px */
|
|
6
34
|
xl: '32px',
|
|
7
35
|
};
|
|
8
36
|
//# sourceMappingURL=spacing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spacing.js","sourceRoot":"","sources":["../../src/primitives/spacing.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"spacing.js","sourceRoot":"","sources":["../../src/primitives/spacing.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,yEAAyE;IACzE,CAAC,EAAG,KAAK;IACT,CAAC,EAAG,KAAK;IACT,CAAC,EAAG,KAAK;IACT,CAAC,EAAG,MAAM;IACV,CAAC,EAAG,MAAM;IACV,CAAC,EAAG,MAAM;IACV,CAAC,EAAG,MAAM;IACV,CAAC,EAAG,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IAEV,wEAAwE;IACxE,4CAA4C;IAC5C,EAAE,EAAE,KAAK;IACT,4CAA4C;IAC5C,EAAE,EAAE,KAAK;IACT,6CAA6C;IAC7C,EAAE,EAAE,MAAM;IACV,6CAA6C;IAC7C,EAAE,EAAE,MAAM;IACV,6CAA6C;IAC7C,EAAE,EAAE,MAAM;CACF,CAAC"}
|
|
@@ -1,16 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis typography tokens.
|
|
3
|
+
* These map to `--tokis-font-*` CSS variables.
|
|
4
|
+
*/
|
|
1
5
|
export declare const typography: {
|
|
2
|
-
readonly fontFamily:
|
|
6
|
+
readonly fontFamily: {
|
|
7
|
+
readonly sans: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', Helvetica, Arial, sans-serif";
|
|
8
|
+
readonly mono: "'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace";
|
|
9
|
+
};
|
|
3
10
|
readonly fontSize: {
|
|
4
11
|
readonly xs: "0.75rem";
|
|
5
12
|
readonly sm: "0.875rem";
|
|
6
13
|
readonly md: "1rem";
|
|
7
14
|
readonly lg: "1.125rem";
|
|
8
15
|
readonly xl: "1.25rem";
|
|
16
|
+
readonly '2xl': "1.5rem";
|
|
17
|
+
readonly '3xl': "1.875rem";
|
|
18
|
+
readonly '4xl': "2.25rem";
|
|
9
19
|
};
|
|
10
20
|
readonly fontWeight: {
|
|
11
|
-
readonly
|
|
21
|
+
readonly regular: 400;
|
|
12
22
|
readonly medium: 500;
|
|
23
|
+
readonly semibold: 600;
|
|
13
24
|
readonly bold: 700;
|
|
25
|
+
/** @deprecated Use `semibold` (600) or `bold` (700) */
|
|
26
|
+
readonly normal: 400;
|
|
27
|
+
};
|
|
28
|
+
readonly lineHeight: {
|
|
29
|
+
readonly tight: 1.25;
|
|
30
|
+
readonly normal: 1.5;
|
|
31
|
+
readonly relaxed: 1.75;
|
|
32
|
+
};
|
|
33
|
+
readonly letterSpacing: {
|
|
34
|
+
readonly tight: "-0.025em";
|
|
35
|
+
readonly normal: "0em";
|
|
36
|
+
readonly wide: "0.025em";
|
|
14
37
|
};
|
|
15
38
|
};
|
|
16
39
|
//# sourceMappingURL=typography.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/primitives/typography.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/primitives/typography.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;QAyBnB,uDAAuD;;;;;;;;;;;;;CAiBjD,CAAC"}
|
|
@@ -1,16 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis typography tokens.
|
|
3
|
+
* These map to `--tokis-font-*` CSS variables.
|
|
4
|
+
*/
|
|
1
5
|
export const typography = {
|
|
2
|
-
|
|
6
|
+
// ── Font families ─────────────────────────────────────────────────────
|
|
7
|
+
fontFamily: {
|
|
8
|
+
sans: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', Helvetica, Arial, sans-serif",
|
|
9
|
+
mono: "'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace",
|
|
10
|
+
},
|
|
11
|
+
// ── Font sizes ────────────────────────────────────────────────────────
|
|
3
12
|
fontSize: {
|
|
4
|
-
xs: '0.75rem',
|
|
5
|
-
sm: '0.875rem',
|
|
6
|
-
md: '1rem',
|
|
7
|
-
lg: '1.125rem',
|
|
8
|
-
xl: '1.25rem',
|
|
13
|
+
xs: '0.75rem', // 12px
|
|
14
|
+
sm: '0.875rem', // 14px
|
|
15
|
+
md: '1rem', // 16px
|
|
16
|
+
lg: '1.125rem', // 18px
|
|
17
|
+
xl: '1.25rem', // 20px
|
|
18
|
+
'2xl': '1.5rem', // 24px
|
|
19
|
+
'3xl': '1.875rem', // 30px
|
|
20
|
+
'4xl': '2.25rem', // 36px
|
|
9
21
|
},
|
|
22
|
+
// ── Font weights ──────────────────────────────────────────────────────
|
|
10
23
|
fontWeight: {
|
|
11
|
-
|
|
24
|
+
regular: 400,
|
|
12
25
|
medium: 500,
|
|
26
|
+
semibold: 600,
|
|
13
27
|
bold: 700,
|
|
28
|
+
/** @deprecated Use `semibold` (600) or `bold` (700) */
|
|
29
|
+
normal: 400,
|
|
30
|
+
},
|
|
31
|
+
// ── Line heights ──────────────────────────────────────────────────────
|
|
32
|
+
lineHeight: {
|
|
33
|
+
tight: 1.25,
|
|
34
|
+
normal: 1.5,
|
|
35
|
+
relaxed: 1.75,
|
|
36
|
+
},
|
|
37
|
+
// ── Letter spacing ────────────────────────────────────────────────────
|
|
38
|
+
letterSpacing: {
|
|
39
|
+
tight: '-0.025em',
|
|
40
|
+
normal: '0em',
|
|
41
|
+
wide: '0.025em',
|
|
14
42
|
},
|
|
15
43
|
};
|
|
16
44
|
//# sourceMappingURL=typography.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.js","sourceRoot":"","sources":["../../src/primitives/typography.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"typography.js","sourceRoot":"","sources":["../../src/primitives/typography.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,yEAAyE;IACzE,UAAU,EAAE;QACV,IAAI,EAAE,8FAA8F;QACpG,IAAI,EAAE,8DAA8D;KACrE;IAED,yEAAyE;IACzE,QAAQ,EAAE;QACR,EAAE,EAAI,SAAS,EAAI,OAAO;QAC1B,EAAE,EAAI,UAAU,EAAG,OAAO;QAC1B,EAAE,EAAI,MAAM,EAAO,OAAO;QAC1B,EAAE,EAAI,UAAU,EAAG,OAAO;QAC1B,EAAE,EAAI,SAAS,EAAI,OAAO;QAC1B,KAAK,EAAE,QAAQ,EAAI,OAAO;QAC1B,KAAK,EAAE,UAAU,EAAE,OAAO;QAC1B,KAAK,EAAE,SAAS,EAAG,OAAO;KAC3B;IAED,yEAAyE;IACzE,UAAU,EAAE;QACV,OAAO,EAAG,GAAG;QACb,MAAM,EAAI,GAAG;QACb,QAAQ,EAAE,GAAG;QACb,IAAI,EAAM,GAAG;QACb,uDAAuD;QACvD,MAAM,EAAE,GAAG;KACZ;IAED,yEAAyE;IACzE,UAAU,EAAE;QACV,KAAK,EAAI,IAAI;QACb,MAAM,EAAG,GAAG;QACZ,OAAO,EAAE,IAAI;KACd;IAED,yEAAyE;IACzE,aAAa,EAAE;QACb,KAAK,EAAG,UAAU;QAClB,MAAM,EAAE,KAAK;QACb,IAAI,EAAI,SAAS;KAClB;CACO,CAAC"}
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis z-index tokens — layering scale.
|
|
3
|
+
* These map to `--tokis-z-{key}` CSS variables.
|
|
4
|
+
*
|
|
5
|
+
* Layers are ordered by increasing elevation. Each layer is intentionally
|
|
6
|
+
* spaced to allow insertion of custom layers without breaking the scale.
|
|
7
|
+
*/
|
|
1
8
|
export declare const zIndex: {
|
|
9
|
+
readonly base: 0;
|
|
10
|
+
readonly raised: 1;
|
|
2
11
|
readonly dropdown: 1000;
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
12
|
+
readonly sticky: 1100;
|
|
13
|
+
readonly overlay: 1200;
|
|
14
|
+
readonly modal: 1300;
|
|
15
|
+
readonly popover: 1400;
|
|
16
|
+
readonly tooltip: 1500;
|
|
17
|
+
readonly toast: 1600;
|
|
5
18
|
};
|
|
6
19
|
//# sourceMappingURL=zIndex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zIndex.d.ts","sourceRoot":"","sources":["../../src/primitives/zIndex.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"zIndex.d.ts","sourceRoot":"","sources":["../../src/primitives/zIndex.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;CAUT,CAAC"}
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokis z-index tokens — layering scale.
|
|
3
|
+
* These map to `--tokis-z-{key}` CSS variables.
|
|
4
|
+
*
|
|
5
|
+
* Layers are ordered by increasing elevation. Each layer is intentionally
|
|
6
|
+
* spaced to allow insertion of custom layers without breaking the scale.
|
|
7
|
+
*/
|
|
1
8
|
export const zIndex = {
|
|
9
|
+
base: 0,
|
|
10
|
+
raised: 1,
|
|
2
11
|
dropdown: 1000,
|
|
3
|
-
|
|
4
|
-
|
|
12
|
+
sticky: 1100,
|
|
13
|
+
overlay: 1200,
|
|
14
|
+
modal: 1300,
|
|
15
|
+
popover: 1400,
|
|
16
|
+
tooltip: 1500,
|
|
17
|
+
toast: 1600,
|
|
5
18
|
};
|
|
6
19
|
//# sourceMappingURL=zIndex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zIndex.js","sourceRoot":"","sources":["../../src/primitives/zIndex.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,QAAQ,EAAE,IAAI;IACd,KAAK,
|
|
1
|
+
{"version":3,"file":"zIndex.js","sourceRoot":"","sources":["../../src/primitives/zIndex.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAM,CAAC;IACX,MAAM,EAAI,CAAC;IACX,QAAQ,EAAE,IAAI;IACd,MAAM,EAAI,IAAI;IACd,OAAO,EAAG,IAAI;IACd,KAAK,EAAK,IAAI;IACd,OAAO,EAAG,IAAI;IACd,OAAO,EAAG,IAAI;IACd,KAAK,EAAK,IAAI;CACN,CAAC"}
|
package/dist/semantic/color.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const semanticColors: {
|
|
2
2
|
readonly primary: "#0066ff";
|
|
3
|
-
readonly secondary: "#
|
|
3
|
+
readonly secondary: "#7c3aed";
|
|
4
4
|
readonly background: "#ffffff";
|
|
5
|
-
readonly surface: "#
|
|
6
|
-
readonly error: "#
|
|
5
|
+
readonly surface: "#f8f9fa";
|
|
6
|
+
readonly error: "#dc2626";
|
|
7
7
|
readonly onPrimary: "#ffffff";
|
|
8
8
|
readonly onSecondary: "#ffffff";
|
|
9
|
-
readonly onBackground: "#
|
|
10
|
-
readonly onSurface: "#
|
|
9
|
+
readonly onBackground: "#0f172a";
|
|
10
|
+
readonly onSurface: "#475569";
|
|
11
11
|
readonly onError: "#ffffff";
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=color.d.ts.map
|
package/dist/semantic/text.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const text: {
|
|
2
|
-
readonly primary: "#
|
|
3
|
-
readonly secondary: "#
|
|
4
|
-
readonly disabled: "#
|
|
5
|
-
readonly error: "#
|
|
2
|
+
readonly primary: "#0f172a";
|
|
3
|
+
readonly secondary: "#475569";
|
|
4
|
+
readonly disabled: "#64748b";
|
|
5
|
+
readonly error: "#dc2626";
|
|
6
6
|
readonly onPrimary: "#ffffff";
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=text.d.ts.map
|
package/dist/themes/dark.d.ts
CHANGED
|
@@ -5,22 +5,51 @@ export declare const darkTheme: {
|
|
|
5
5
|
readonly onBackground: "#f5f5f5";
|
|
6
6
|
readonly onSurface: "#e0e0e0";
|
|
7
7
|
readonly primary: "#0066ff";
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
8
|
+
readonly primaryHover: "#0052cc";
|
|
9
|
+
readonly primaryActive: "#003d99";
|
|
10
|
+
readonly primarySubtle: "#e6f0ff";
|
|
11
|
+
readonly secondary: "#7c3aed";
|
|
12
|
+
readonly secondaryHover: "#6d28d9";
|
|
13
|
+
readonly secondarySubtle: "#ede9fe";
|
|
14
|
+
readonly surfaceRaised: "#ffffff";
|
|
15
|
+
readonly surfaceOverlay: "#ffffff";
|
|
16
|
+
readonly surfaceHover: "#f1f5f9";
|
|
17
|
+
readonly surfaceActive: "#e2e8f0";
|
|
18
|
+
readonly border: "#e2e8f0";
|
|
19
|
+
readonly borderStrong: "#cbd5e1";
|
|
20
|
+
readonly error: "#dc2626";
|
|
21
|
+
readonly errorSubtle: "#fef2f2";
|
|
22
|
+
readonly warning: "#d97706";
|
|
23
|
+
readonly warningSubtle: "#fffbeb";
|
|
24
|
+
readonly success: "#16a34a";
|
|
25
|
+
readonly successSubtle: "#f0fdf4";
|
|
26
|
+
readonly info: "#0284c7";
|
|
27
|
+
readonly infoSubtle: "#f0f9ff";
|
|
28
|
+
readonly textPrimary: "#0f172a";
|
|
29
|
+
readonly textSecondary: "#475569";
|
|
30
|
+
readonly textTertiary: "#94a3b8";
|
|
31
|
+
readonly textDisabled: "#cbd5e1";
|
|
32
|
+
readonly textInverse: "#ffffff";
|
|
33
|
+
readonly textOnPrimary: "#ffffff";
|
|
34
|
+
readonly textLink: "#0066ff";
|
|
35
|
+
readonly textError: "#dc2626";
|
|
36
|
+
readonly textSuccess: "#16a34a";
|
|
37
|
+
readonly textWarning: "#d97706";
|
|
38
|
+
readonly neutral50: "#f8fafc";
|
|
39
|
+
readonly neutral100: "#f1f5f9";
|
|
40
|
+
readonly neutral200: "#e2e8f0";
|
|
41
|
+
readonly neutral300: "#cbd5e1";
|
|
42
|
+
readonly neutral400: "#94a3b8";
|
|
43
|
+
readonly neutral500: "#64748b";
|
|
44
|
+
readonly neutral600: "#475569";
|
|
45
|
+
readonly neutral700: "#334155";
|
|
46
|
+
readonly neutral800: "#1e293b";
|
|
47
|
+
readonly neutral900: "#0f172a";
|
|
21
48
|
readonly onPrimary: "#ffffff";
|
|
22
49
|
readonly onSecondary: "#ffffff";
|
|
23
50
|
readonly onError: "#ffffff";
|
|
51
|
+
readonly focusRing: "rgb(0 102 255 / 0.15)";
|
|
52
|
+
readonly focusRingError: "rgb(220 38 38 / 0.15)";
|
|
24
53
|
};
|
|
25
54
|
readonly semanticColors: {
|
|
26
55
|
readonly background: "#121212";
|
|
@@ -28,8 +57,8 @@ export declare const darkTheme: {
|
|
|
28
57
|
readonly onBackground: "#f5f5f5";
|
|
29
58
|
readonly onSurface: "#e0e0e0";
|
|
30
59
|
readonly primary: "#0066ff";
|
|
31
|
-
readonly secondary: "#
|
|
32
|
-
readonly error: "#
|
|
60
|
+
readonly secondary: "#7c3aed";
|
|
61
|
+
readonly error: "#dc2626";
|
|
33
62
|
readonly onPrimary: "#ffffff";
|
|
34
63
|
readonly onSecondary: "#ffffff";
|
|
35
64
|
readonly onError: "#ffffff";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dark.d.ts","sourceRoot":"","sources":["../../src/themes/dark.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"dark.d.ts","sourceRoot":"","sources":["../../src/themes/dark.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUZ,CAAC"}
|
package/dist/themes/light.d.ts
CHANGED
|
@@ -1,37 +1,66 @@
|
|
|
1
1
|
export declare const lightTheme: {
|
|
2
2
|
readonly colors: {
|
|
3
3
|
readonly primary: "#0066ff";
|
|
4
|
-
readonly
|
|
4
|
+
readonly primaryHover: "#0052cc";
|
|
5
|
+
readonly primaryActive: "#003d99";
|
|
6
|
+
readonly primarySubtle: "#e6f0ff";
|
|
7
|
+
readonly secondary: "#7c3aed";
|
|
8
|
+
readonly secondaryHover: "#6d28d9";
|
|
9
|
+
readonly secondarySubtle: "#ede9fe";
|
|
5
10
|
readonly background: "#ffffff";
|
|
6
|
-
readonly surface: "#
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
11
|
+
readonly surface: "#f8f9fa";
|
|
12
|
+
readonly surfaceRaised: "#ffffff";
|
|
13
|
+
readonly surfaceOverlay: "#ffffff";
|
|
14
|
+
readonly surfaceHover: "#f1f5f9";
|
|
15
|
+
readonly surfaceActive: "#e2e8f0";
|
|
16
|
+
readonly border: "#e2e8f0";
|
|
17
|
+
readonly borderStrong: "#cbd5e1";
|
|
18
|
+
readonly error: "#dc2626";
|
|
19
|
+
readonly errorSubtle: "#fef2f2";
|
|
20
|
+
readonly warning: "#d97706";
|
|
21
|
+
readonly warningSubtle: "#fffbeb";
|
|
22
|
+
readonly success: "#16a34a";
|
|
23
|
+
readonly successSubtle: "#f0fdf4";
|
|
24
|
+
readonly info: "#0284c7";
|
|
25
|
+
readonly infoSubtle: "#f0f9ff";
|
|
26
|
+
readonly textPrimary: "#0f172a";
|
|
27
|
+
readonly textSecondary: "#475569";
|
|
28
|
+
readonly textTertiary: "#94a3b8";
|
|
29
|
+
readonly textDisabled: "#cbd5e1";
|
|
30
|
+
readonly textInverse: "#ffffff";
|
|
31
|
+
readonly textOnPrimary: "#ffffff";
|
|
32
|
+
readonly textLink: "#0066ff";
|
|
33
|
+
readonly textError: "#dc2626";
|
|
34
|
+
readonly textSuccess: "#16a34a";
|
|
35
|
+
readonly textWarning: "#d97706";
|
|
36
|
+
readonly neutral50: "#f8fafc";
|
|
37
|
+
readonly neutral100: "#f1f5f9";
|
|
38
|
+
readonly neutral200: "#e2e8f0";
|
|
39
|
+
readonly neutral300: "#cbd5e1";
|
|
40
|
+
readonly neutral400: "#94a3b8";
|
|
41
|
+
readonly neutral500: "#64748b";
|
|
42
|
+
readonly neutral600: "#475569";
|
|
43
|
+
readonly neutral700: "#334155";
|
|
44
|
+
readonly neutral800: "#1e293b";
|
|
45
|
+
readonly neutral900: "#0f172a";
|
|
19
46
|
readonly onPrimary: "#ffffff";
|
|
20
47
|
readonly onSecondary: "#ffffff";
|
|
21
|
-
readonly onBackground: "#
|
|
22
|
-
readonly onSurface: "#
|
|
48
|
+
readonly onBackground: "#0f172a";
|
|
49
|
+
readonly onSurface: "#475569";
|
|
23
50
|
readonly onError: "#ffffff";
|
|
51
|
+
readonly focusRing: "rgb(0 102 255 / 0.15)";
|
|
52
|
+
readonly focusRingError: "rgb(220 38 38 / 0.15)";
|
|
24
53
|
};
|
|
25
54
|
readonly semanticColors: {
|
|
26
55
|
readonly primary: "#0066ff";
|
|
27
|
-
readonly secondary: "#
|
|
56
|
+
readonly secondary: "#7c3aed";
|
|
28
57
|
readonly background: "#ffffff";
|
|
29
|
-
readonly surface: "#
|
|
30
|
-
readonly error: "#
|
|
58
|
+
readonly surface: "#f8f9fa";
|
|
59
|
+
readonly error: "#dc2626";
|
|
31
60
|
readonly onPrimary: "#ffffff";
|
|
32
61
|
readonly onSecondary: "#ffffff";
|
|
33
|
-
readonly onBackground: "#
|
|
34
|
-
readonly onSurface: "#
|
|
62
|
+
readonly onBackground: "#0f172a";
|
|
63
|
+
readonly onSurface: "#475569";
|
|
35
64
|
readonly onError: "#ffffff";
|
|
36
65
|
};
|
|
37
66
|
readonly mode: "light";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../src/themes/light.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../src/themes/light.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokis/tokens",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Design token engine for Tokis — color primitives, semantic scales, spacing, typography, shadows, motion, and CSS variable generation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|