toku-ui 3.1.0 → 4.0.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/dist/components/TThemeProvider/TThemeProvider.d.ts +56 -62
- package/dist/components/TThemeProvider/TThemeProvider.d.ts.map +1 -1
- package/dist/components/TThemeProvider/TThemeProvider.stories.d.ts +44 -0
- package/dist/components/TThemeProvider/TThemeProvider.stories.d.ts.map +1 -0
- package/dist/index.es.js +426 -379
- package/dist/index.es.js.map +1 -1
- package/dist/stories/DesignTokens.stories.d.ts +16 -0
- package/dist/stories/DesignTokens.stories.d.ts.map +1 -0
- package/dist/theme/utils.d.ts +70 -56
- package/dist/theme/utils.d.ts.map +1 -1
- package/dist/tokens.css +220 -0
- package/package.json +13 -6
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: string;
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof meta>;
|
|
15
|
+
export declare const Overview: Story;
|
|
16
|
+
//# sourceMappingURL=DesignTokens.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesignTokens.stories.d.ts","sourceRoot":"","sources":["../../src/stories/DesignTokens.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAuS3D,QAAA,MAAM,IAAI;;;;;;;;;;CAqBM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KA2PtB,CAAC"}
|
package/dist/theme/utils.d.ts
CHANGED
|
@@ -1,62 +1,74 @@
|
|
|
1
1
|
import type { DeepPartial } from '../types';
|
|
2
2
|
import { baseTheme } from './base';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Theme override accepted by `createTheme` and `<TThemeProvider>`.
|
|
5
|
+
*
|
|
6
|
+
* Provide a partial theme — only the keys you want to change. The brand color seed
|
|
7
|
+
* regenerates the full 12-step ramp (plus the 12-step alpha twin) automatically.
|
|
8
|
+
*
|
|
9
|
+
* ## Two accepted shapes
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* // Canonical — matches the `color.brand.*` token vocabulary:
|
|
13
|
+
* createTheme({ colors: { brand: { base: '#FF6600' } } });
|
|
14
|
+
*
|
|
15
|
+
* // Legacy — kept working for drop-in compatibility with pre-migration consumers:
|
|
16
|
+
* createTheme({ colors: { primary: { main: '#FF6600' } } });
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* When both are passed, `colors.brand.base` wins. Prefer the canonical shape in new code.
|
|
20
|
+
*
|
|
21
|
+
* ## Multi-tenant usage
|
|
22
|
+
*
|
|
23
|
+
* Pass the tenant's brand hex per request to retheme an entire subtree. The brand ramp
|
|
24
|
+
* regenerates from the hex; every semantic token that references `color.brand.*` re-resolves
|
|
25
|
+
* via CSS-variable cascade — no Vue re-renders.
|
|
26
|
+
*
|
|
27
|
+
* ```vue
|
|
28
|
+
* <TThemeProvider :theme="{ colors: { brand: { base: tenantBrandHex } } }">
|
|
29
|
+
* <App />
|
|
30
|
+
* </TThemeProvider>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export type TThemeOverride = DeepPartial<typeof baseTheme> & {
|
|
34
|
+
colors?: {
|
|
35
|
+
/**
|
|
36
|
+
* The tenant brand color seed.
|
|
37
|
+
*
|
|
38
|
+
* Pass a single hex string — `createTheme` derives the 12-step ramp
|
|
39
|
+
* (`--color-brand-1` through `--color-brand-12`) plus the 12-step alpha twin
|
|
40
|
+
* (`--color-brand-a-1` through `--color-brand-a-12`) automatically.
|
|
41
|
+
*
|
|
42
|
+
* Step 9 anchors to the input exact, so primary buttons and headers render the
|
|
43
|
+
* tenant color literally — the rest of the ramp is derived around it for hover
|
|
44
|
+
* states, subtle backgrounds, focus rings, etc.
|
|
45
|
+
*/
|
|
46
|
+
brand?: {
|
|
47
|
+
base?: string;
|
|
44
48
|
};
|
|
45
49
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Builds a theme object from a partial override.
|
|
53
|
+
*
|
|
54
|
+
* Returns the merged theme (drop-in compatible with the legacy theme shape via
|
|
55
|
+
* `useTheme()`) plus a `cssVars` record suitable for inline `style` injection by
|
|
56
|
+
* `<TThemeProvider>`. The cssVars contain the 12-step brand ramp + 12-step alpha twin
|
|
57
|
+
* regenerated from the seed hex; they only exist when a brand override was provided.
|
|
58
|
+
*
|
|
59
|
+
* Typically you don't call this directly — pass the override prop to `<TThemeProvider>`
|
|
60
|
+
* which calls `createTheme` internally. Call it directly only when you need the resolved
|
|
61
|
+
* theme object outside the Vue component tree (e.g. for SSR or for non-Vue consumers).
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* const theme = createTheme({ colors: { brand: { base: '#FF6600' } } });
|
|
66
|
+
*
|
|
67
|
+
* theme.colors.primary.main; // '#FF6600' (legacy key, still populated)
|
|
68
|
+
* theme.cssVars; // { '--color-brand-9': '#FF6600', ... }
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export declare function createTheme(theme?: TThemeOverride): {
|
|
60
72
|
colors: {
|
|
61
73
|
primary: {
|
|
62
74
|
main: string;
|
|
@@ -112,5 +124,7 @@ export declare const createTheme: (theme: DeepPartial<typeof baseTheme>) => {
|
|
|
112
124
|
};
|
|
113
125
|
iconSet: string;
|
|
114
126
|
parseMarkdown: boolean;
|
|
115
|
-
}
|
|
127
|
+
} & {
|
|
128
|
+
cssVars: Record<string, string> | undefined;
|
|
129
|
+
};
|
|
116
130
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/theme/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/theme/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,OAAO,SAAS,CAAC,GAAG;IAC3D,MAAM,CAAC,EAAE;QACP;;;;;;;;;;WAUG;QACH,KAAK,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAC3B,CAAC;CACH,CAAC;AAsBF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CAAC,KAAK,GAAE,cAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCrD"}
|
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
:root, .toku-theme {
|
|
6
|
+
--color-brand-1: #f7f3fa; /** App background. Was primary.light5. */
|
|
7
|
+
--color-brand-2: #ede8f0; /** Subtle background. Was primary.light4. */
|
|
8
|
+
--color-brand-3: #e3d2ed; /** UI element background. Was primary.light3. */
|
|
9
|
+
--color-brand-4: #c297db; /** Hovered UI element background. Was primary.light2. */
|
|
10
|
+
--color-brand-5: #a94be0; /** Active / selected UI element background. Was primary.light1. */
|
|
11
|
+
--color-brand-6: #9638ca; /** TBD: design — subtle borders / separators. Placeholder is linear interpolation between brand.5 and brand.9; not perceptually uniform. */
|
|
12
|
+
--color-brand-7: #8226b4; /** TBD: design — UI element borders / focused inputs. Placeholder is linear interpolation; design refines. */
|
|
13
|
+
--color-brand-8: #6f139d; /** TBD: design — hovered UI element borders. Placeholder is linear interpolation; design refines. */
|
|
14
|
+
--color-brand-9: #5c0087; /** Solid background (brand buttons, header). The anchor — exact input hex. Was primary.main / primary.dark. */
|
|
15
|
+
--color-brand-10: #7f00b2; /** Hovered solid background. Was primary.toku. WARNING: lighter than step 9, which is reversed from Radix's usual convention (step 10 is normally slightly darker than 9). Design to confirm: keep as-is or pick a darker hover. */
|
|
16
|
+
--color-brand-11: #5d0882; /** TBD: design — low-contrast text (secondary text). Placeholder is linear interpolation between brand.10 and brand.12; design refines. */
|
|
17
|
+
--color-brand-12: #3c1053; /** High-contrast text (headings, primary text). Was primary.ultraDark. */
|
|
18
|
+
--color-brand-a-1: rgba(92, 0, 135, 0.03); /** ≈3% opacity. Faintest brand tint. */
|
|
19
|
+
--color-brand-a-2: rgba(92, 0, 135, 0.05); /** ≈5% opacity. */
|
|
20
|
+
--color-brand-a-3: rgba(92, 0, 135, 0.1); /** ≈10% opacity. */
|
|
21
|
+
--color-brand-a-4: rgba(92, 0, 135, 0.15); /** ≈15% opacity. */
|
|
22
|
+
--color-brand-a-5: rgba(92, 0, 135, 0.2); /** ≈20% opacity. Common for focus ring halos. */
|
|
23
|
+
--color-brand-a-6: rgba(92, 0, 135, 0.3); /** ≈30% opacity. */
|
|
24
|
+
--color-brand-a-7: rgba(92, 0, 135, 0.4); /** ≈40% opacity. */
|
|
25
|
+
--color-brand-a-8: rgba(92, 0, 135, 0.5); /** ≈50% opacity. */
|
|
26
|
+
--color-brand-a-9: rgba(92, 0, 135, 0.6); /** ≈60% opacity. */
|
|
27
|
+
--color-brand-a-10: rgba(92, 0, 135, 0.7); /** ≈70% opacity. */
|
|
28
|
+
--color-brand-a-11: rgba(92, 0, 135, 0.8); /** ≈80% opacity. */
|
|
29
|
+
--color-brand-a-12: rgba(92, 0, 135, 0.9); /** ≈90% opacity. Near-opaque brand. */
|
|
30
|
+
--color-gray-1: #fafafa; /** App background neutral. Was gray.light4. */
|
|
31
|
+
--color-gray-2: #f2f2f2; /** Subtle background. Was gray.light3. */
|
|
32
|
+
--color-gray-3: #e2e2e2; /** UI element background / disabled fill. Was gray.light2. */
|
|
33
|
+
--color-gray-4: #c6c6c6; /** Hovered UI background / default border. Was gray.light1. */
|
|
34
|
+
--color-gray-5: #a9a9a9; /** Active selected / disabled text. Was gray.medium2. */
|
|
35
|
+
--color-gray-6: #8d8d8d; /** Subtle borders. Was gray.medium1. */
|
|
36
|
+
--color-gray-7: #707070; /** UI element borders / muted text. Was gray.dark3. */
|
|
37
|
+
--color-gray-8: #545454; /** Hovered borders. Was gray.dark2. */
|
|
38
|
+
--color-gray-9: #373737; /** Solid neutral / default text. Was gray.main. */
|
|
39
|
+
--color-gray-10: #2a2a2a; /** TBD: design — hovered solid neutral. Placeholder; design picks. */
|
|
40
|
+
--color-gray-11: #1d1d1d; /** TBD: design — low-contrast text. Placeholder; design picks. */
|
|
41
|
+
--color-gray-12: #111111; /** TBD: design — high-contrast text (near-black). Placeholder; design picks. */
|
|
42
|
+
--color-gray-a-1: rgba(0, 0, 0, 0.02); /** ≈2% opacity. */
|
|
43
|
+
--color-gray-a-2: rgba(0, 0, 0, 0.04); /** ≈4% opacity. */
|
|
44
|
+
--color-gray-a-3: rgba(0, 0, 0, 0.06); /** ≈6% opacity. Subtle dividers. */
|
|
45
|
+
--color-gray-a-4: rgba(0, 0, 0, 0.1); /** ≈10% opacity. */
|
|
46
|
+
--color-gray-a-5: rgba(0, 0, 0, 0.14); /** ≈14% opacity. */
|
|
47
|
+
--color-gray-a-6: rgba(0, 0, 0, 0.2); /** ≈20% opacity. */
|
|
48
|
+
--color-gray-a-7: rgba(0, 0, 0, 0.3); /** ≈30% opacity. */
|
|
49
|
+
--color-gray-a-8: rgba(0, 0, 0, 0.4); /** ≈40% opacity. Modal backdrops. */
|
|
50
|
+
--color-gray-a-9: rgba(0, 0, 0, 0.6); /** ≈60% opacity. */
|
|
51
|
+
--color-gray-a-10: rgba(0, 0, 0, 0.75); /** ≈75% opacity. */
|
|
52
|
+
--color-gray-a-11: rgba(0, 0, 0, 0.85); /** ≈85% opacity. */
|
|
53
|
+
--color-gray-a-12: rgba(0, 0, 0, 0.95); /** ≈95% opacity. */
|
|
54
|
+
--color-red-7: #b72e29; /** Solid danger color. Was colors.error. */
|
|
55
|
+
--color-green-7: #408645; /** Solid success color. Was colors.success. */
|
|
56
|
+
--color-amber-7: #ffb038; /** Solid in-process color. Was colors.inProcess. */
|
|
57
|
+
--color-amber-8: #a37500; /** Darker amber for text/contrast on amber backgrounds. Was colors.inProcessDark. */
|
|
58
|
+
--color-orange-7: #d06b35; /** Solid warning color. Was colors.warning. */
|
|
59
|
+
--color-blue-7: #3070dd; /** Solid info color. Was colors.info. */
|
|
60
|
+
--color-white: #ffffff; /** Pure white. Was typography.buttonTextColor (inline). */
|
|
61
|
+
--color-black: #000000; /** Pure black. Add as primitive if needed; otherwise reach color.gray.12. See proposal §8 Q27. */
|
|
62
|
+
--space-0: 0; /** Zero spacing. */
|
|
63
|
+
--space-1: 4px; /** Base unit. Was theme.spacing. */
|
|
64
|
+
--space-2: 8px;
|
|
65
|
+
--space-3: 12px;
|
|
66
|
+
--space-4: 16px;
|
|
67
|
+
--space-5: 20px;
|
|
68
|
+
--space-6: 24px;
|
|
69
|
+
--space-7: 28px;
|
|
70
|
+
--space-8: 32px;
|
|
71
|
+
--space-9: 36px;
|
|
72
|
+
--space-10: 40px;
|
|
73
|
+
--space-11: 44px;
|
|
74
|
+
--space-12: 48px;
|
|
75
|
+
--space-13: 52px;
|
|
76
|
+
--space-14: 56px;
|
|
77
|
+
--space-16: 64px;
|
|
78
|
+
--space-20: 80px;
|
|
79
|
+
--space-24: 96px;
|
|
80
|
+
--radius-none: 0;
|
|
81
|
+
--radius-xs: 2px; /** TBD: design — smallest non-zero radius. */
|
|
82
|
+
--radius-sm: 0.375rem; /** Small radius. Was input.borderRadius. */
|
|
83
|
+
--radius-md: 0.5rem; /** Medium radius. Was button.borderRadius. */
|
|
84
|
+
--radius-lg: 12px; /** TBD: design — large radius (cards, modals). */
|
|
85
|
+
--radius-xl: 16px; /** TBD: design — extra large radius. */
|
|
86
|
+
--radius-2xl: 24px; /** TBD: design — 2xl radius. */
|
|
87
|
+
--radius-full: 9999px; /** Pill / circular shape. */
|
|
88
|
+
--font-family-base: 'Manrope', sans-serif; /** Default UI font. Mirrors baseTheme.typography.fontFamily exactly so components migrating from useTheme() to CSS tokens keep rendering the same font. */
|
|
89
|
+
--font-weight-regular: 400;
|
|
90
|
+
--font-weight-medium: 500;
|
|
91
|
+
--font-weight-semibold: 600;
|
|
92
|
+
--font-weight-bold: 700;
|
|
93
|
+
--font-h1-font-size: 3.25rem; /** 52px */
|
|
94
|
+
--font-h1-line-height: 3.75rem; /** 60px — see warning above */
|
|
95
|
+
--font-h2-font-size: 3rem; /** 48px */
|
|
96
|
+
--font-h2-line-height: 3.5rem; /** 56px */
|
|
97
|
+
--font-h3-font-size: 2.5rem; /** 40px */
|
|
98
|
+
--font-h3-line-height: 3rem; /** 48px */
|
|
99
|
+
--font-h4-font-size: 2rem; /** 32px */
|
|
100
|
+
--font-h4-line-height: 2.5rem; /** 40px */
|
|
101
|
+
--font-s1-font-size: 1.75rem; /** 28px */
|
|
102
|
+
--font-s1-line-height: 2.25rem; /** 36px */
|
|
103
|
+
--font-s2-font-size: 1.5rem; /** 24px */
|
|
104
|
+
--font-s2-line-height: 2rem; /** 32px */
|
|
105
|
+
--font-s3-font-size: 1.125rem; /** 18px */
|
|
106
|
+
--font-s3-line-height: 1.625rem; /** 26px */
|
|
107
|
+
--font-s4-font-size: 1rem; /** 16px */
|
|
108
|
+
--font-s4-line-height: 1.5rem; /** 24px */
|
|
109
|
+
--font-b0-font-size: 1.25rem; /** 20px */
|
|
110
|
+
--font-b0-line-height: 1.625rem; /** 26px */
|
|
111
|
+
--font-b1-font-size: 1.125rem; /** 18px */
|
|
112
|
+
--font-b1-line-height: 1.5rem; /** 24px */
|
|
113
|
+
--font-b2-font-size: 1rem; /** 16px */
|
|
114
|
+
--font-b2-line-height: 1.375rem; /** 22px */
|
|
115
|
+
--font-b3-font-size: 0.875rem; /** 14px */
|
|
116
|
+
--font-b3-line-height: 1.25rem; /** 20px */
|
|
117
|
+
--font-b4-font-size: 0.75rem; /** 12px */
|
|
118
|
+
--font-b4-line-height: 1.125rem; /** 18px */
|
|
119
|
+
--font-b5-font-size: 0.625rem; /** 10px */
|
|
120
|
+
--font-b5-line-height: 1rem; /** 16px */
|
|
121
|
+
--font-b6-font-size: 0.5rem; /** 8px */
|
|
122
|
+
--font-b6-line-height: 0.875rem; /** 14px */
|
|
123
|
+
--shadow-none: none; /** No shadow. */
|
|
124
|
+
--shadow-sm: 0 1px 2px 0 #0000000D; /** TBD: design — subtle ambient shadow. */
|
|
125
|
+
--shadow-md: 0 4px 6px -1px #0000001A, 0 2px 4px -2px #0000001A; /** TBD: design — card-level shadow. */
|
|
126
|
+
--shadow-lg: 0 10px 15px -3px #0000001A, 0 4px 6px -4px #0000001A; /** TBD: design — floating elements (popovers, dropdowns). */
|
|
127
|
+
--shadow-xl: 0 20px 25px -5px #0000001A, 0 8px 10px -6px #0000001A; /** TBD: design — modals, large overlays. */
|
|
128
|
+
--motion-duration-instant: 0ms; /** No animation (e.g. prefers-reduced-motion overrides). */
|
|
129
|
+
--motion-duration-fast: 150ms; /** TBD: design — quick control interactions (hover, focus). */
|
|
130
|
+
--motion-duration-base: 250ms; /** TBD: design — default transition duration. */
|
|
131
|
+
--motion-duration-slow: 400ms; /** TBD: design — large layout shifts, modal entrances. */
|
|
132
|
+
--motion-easing-linear: cubic-bezier(0, 0, 1, 1); /** Constant velocity. For loading indicators. */
|
|
133
|
+
--motion-easing-standard: cubic-bezier(0.2, 0, 0, 1); /** TBD: design — default easing (Material 3 standard). */
|
|
134
|
+
--motion-easing-emphasized: cubic-bezier(0.2, 0, 0, 1); /** TBD: design — emphasized motion for hero transitions (Material 3 emphasized). */
|
|
135
|
+
--motion-easing-decelerated: cubic-bezier(0, 0, 0, 1); /** TBD: design — for entering elements (Material 3 standard decelerate). */
|
|
136
|
+
--motion-easing-accelerated: cubic-bezier(0.3, 0, 1, 1); /** TBD: design — for exiting elements (Material 3 standard accelerate). */
|
|
137
|
+
--z-base: 1; /** Default content layer. */
|
|
138
|
+
--z-sticky: 100; /** Sticky headers, footers. */
|
|
139
|
+
--z-fixed: 200; /** Fixed navigation. */
|
|
140
|
+
--z-overlay: 300; /** Backdrops, scrims. */
|
|
141
|
+
--z-modal: 400; /** Modal dialogs, drawers. */
|
|
142
|
+
--z-popover: 500; /** Popovers, menus, dropdowns. */
|
|
143
|
+
--z-toast: 600; /** Notifications. */
|
|
144
|
+
--z-tooltip: 700; /** Always-on-top tooltips. */
|
|
145
|
+
--opacity-0: 0; /** Fully transparent. */
|
|
146
|
+
--opacity-50: 0.5;
|
|
147
|
+
--opacity-75: 0.75;
|
|
148
|
+
--opacity-disabled: 0.5; /** TBD: design — disabled state opacity. */
|
|
149
|
+
--opacity-muted: 0.6; /** TBD: design — muted / de-emphasized opacity. */
|
|
150
|
+
--opacity-full: 1; /** Fully opaque. */
|
|
151
|
+
--border-width-0: 0; /** No border. */
|
|
152
|
+
--border-width-thin: 1px; /** Default UI border width. */
|
|
153
|
+
--border-width-thick: 2px; /** Emphasized border (focused inputs, selected items). */
|
|
154
|
+
--border-width-heavy: 4px; /** Heavy border — used for focus ring outline. */
|
|
155
|
+
--focus-ring-width: 2px; /** TBD: design — width of the primary focus outline. */
|
|
156
|
+
--focus-ring-offset: 2px; /** TBD: design — gap between element and outline. */
|
|
157
|
+
--focus-ring-halo-width: 4px; /** TBD: design — width of the translucent halo. */
|
|
158
|
+
--breakpoint-mobile: 0px;
|
|
159
|
+
--breakpoint-desktop: 769px;
|
|
160
|
+
--color-bg-surface-default: var(--color-gray-1); /** Default app surface. Was colors.background. */
|
|
161
|
+
--color-bg-surface-subtle-default: var(--color-gray-2);
|
|
162
|
+
--color-bg-surface-raised-default: var(--color-white); /** Elevated surfaces (cards on a non-white app bg). */
|
|
163
|
+
--color-bg-surface-sunken-default: var(--color-gray-3); /** Inset surfaces (input bg on a card). */
|
|
164
|
+
--color-bg-primary-default: var(--color-brand-9); /** Primary action fill — buttons, headers. Resolves to the tenant's exact brand color. */
|
|
165
|
+
--color-bg-primary-hover: var(--color-brand-10);
|
|
166
|
+
--color-bg-primary-disabled: var(--color-gray-3); /** Disabled primary button bg. TBD: design may prefer color.brand.3 instead for tinted disabled state. */
|
|
167
|
+
--color-bg-primary-subtle-default: var(--color-brand-2); /** Tinted brand background — selected rows, pill backgrounds, soft tags. */
|
|
168
|
+
--color-bg-primary-subtle-hover: var(--color-brand-3);
|
|
169
|
+
--color-bg-danger-default: var(--color-red-7);
|
|
170
|
+
--color-bg-success-default: var(--color-green-7);
|
|
171
|
+
--color-bg-warning-default: var(--color-orange-7);
|
|
172
|
+
--color-bg-info-default: var(--color-blue-7);
|
|
173
|
+
--color-bg-overlay-default: var(--color-gray-a-8); /** Modal backdrop / scrim. ~40% black over the page. */
|
|
174
|
+
--color-bg-disabled-default: var(--color-gray-3); /** Generic disabled surface. */
|
|
175
|
+
--color-text-default-default: var(--color-gray-9); /** Default body text. Preserves the current typography.color value (#373737, gray.9) for byte-identical migration. If design later wants higher contrast per Radix layout, swap this alias to #111111. */
|
|
176
|
+
--color-text-muted-default: var(--color-gray-7); /** Secondary / supporting text. */
|
|
177
|
+
--color-text-primary-default: var(--color-brand-11); /** Brand-tinted text (e.g. links inside a brand-primary surface). */
|
|
178
|
+
--color-text-on-primary-default: var(--color-white); /** Text on top of color.bg.primary. Was typography.buttonTextColor. */
|
|
179
|
+
--color-text-danger-default: var(--color-red-7); /** Error text. Will move to color.red.11 once full red ramp lands. */
|
|
180
|
+
--color-text-success-default: var(--color-green-7);
|
|
181
|
+
--color-text-warning-default: var(--color-orange-7);
|
|
182
|
+
--color-text-info-default: var(--color-blue-7);
|
|
183
|
+
--color-text-link-default: var(--color-brand-9); /** TBD: design — link color. May want a dedicated blue for inline links rather than reusing brand. */
|
|
184
|
+
--color-text-disabled-default: var(--color-gray-5);
|
|
185
|
+
--color-text-inverse-default: var(--color-white); /** Text on dark surfaces. */
|
|
186
|
+
--color-border-default-default: var(--color-gray-4); /** Default UI border (inputs, cards). */
|
|
187
|
+
--color-border-subtle-default: var(--color-gray-3);
|
|
188
|
+
--color-border-strong-default: var(--color-gray-7);
|
|
189
|
+
--color-border-primary-default: var(--color-brand-7);
|
|
190
|
+
--color-border-danger-default: var(--color-red-7);
|
|
191
|
+
--color-border-focus-default: var(--color-brand-7); /** Focus ring color. TBD: design may want a dedicated focus color for higher contrast. */
|
|
192
|
+
--color-border-disabled-default: var(--color-gray-3);
|
|
193
|
+
--color-icon-default-default: var(--color-gray-9);
|
|
194
|
+
--color-icon-muted-default: var(--color-gray-7);
|
|
195
|
+
--color-icon-primary-default: var(--color-brand-9);
|
|
196
|
+
--color-icon-danger-default: var(--color-red-7);
|
|
197
|
+
--color-icon-success-default: var(--color-green-7);
|
|
198
|
+
--color-icon-warning-default: var(--color-orange-7);
|
|
199
|
+
--color-icon-info-default: var(--color-blue-7);
|
|
200
|
+
--color-icon-on-primary-default: var(--color-white);
|
|
201
|
+
--color-icon-disabled-default: var(--color-gray-5);
|
|
202
|
+
--color-ring-focus-default: var(--color-brand-7); /** Solid focus outline color. */
|
|
203
|
+
--color-ring-focus-halo-default: var(--color-brand-a-5); /** Translucent focus halo. Uses brand alpha so it tints over any background without obscuring it. */
|
|
204
|
+
--radius-control-default: var(--radius-md); /** Buttons, selects, switches — interactive controls. */
|
|
205
|
+
--radius-control-sm-default: var(--radius-sm); /** Inputs, smaller controls. */
|
|
206
|
+
--radius-surface-default: var(--radius-lg); /** Cards, panels, modals. TBD: design confirms radius.lg is the right anchor. */
|
|
207
|
+
--radius-pill-default: var(--radius-full); /** Chips, badges, avatars. */
|
|
208
|
+
--shadow-raised-default: var(--shadow-md); /** Cards, raised panels. */
|
|
209
|
+
--shadow-overlay-default: var(--shadow-lg); /** Popovers, dropdowns, menus. */
|
|
210
|
+
--shadow-dialog-default: var(--shadow-xl); /** Modals, drawers, large overlays. */
|
|
211
|
+
--shadow-sticky-default: var(--shadow-sm); /** Sticky headers, footers — subtle elevation cue. */
|
|
212
|
+
--motion-control-duration: var(--motion-duration-fast);
|
|
213
|
+
--motion-control-easing: var(--motion-easing-standard);
|
|
214
|
+
--motion-layout-duration: var(--motion-duration-base);
|
|
215
|
+
--motion-layout-easing: var(--motion-easing-emphasized);
|
|
216
|
+
--motion-enter-duration: var(--motion-duration-base);
|
|
217
|
+
--motion-enter-easing: var(--motion-easing-decelerated);
|
|
218
|
+
--motion-exit-duration: var(--motion-duration-fast);
|
|
219
|
+
--motion-exit-easing: var(--motion-easing-accelerated);
|
|
220
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toku-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"import": "./dist/index.es.js"
|
|
11
11
|
},
|
|
12
|
-
"./dist/style.css": "./dist/style.css"
|
|
12
|
+
"./dist/style.css": "./dist/style.css",
|
|
13
|
+
"./tokens.css": "./dist/tokens.css"
|
|
13
14
|
},
|
|
14
15
|
"module": "dist/index.es.js",
|
|
15
16
|
"types": "./dist/index.d.ts",
|
|
@@ -21,7 +22,8 @@
|
|
|
21
22
|
},
|
|
22
23
|
"scripts": {
|
|
23
24
|
"dev": "vite",
|
|
24
|
-
"build": "vite build && vue-tsc --project tsconfig.build.json --emitDeclarationOnly --declaration",
|
|
25
|
+
"build": "pnpm build:tokens && vite build && cp src/styles/tokens.css dist/tokens.css && vue-tsc --project tsconfig.build.json --emitDeclarationOnly --declaration",
|
|
26
|
+
"build:tokens": "style-dictionary build --config style-dictionary.config.ts",
|
|
25
27
|
"preview": "vite preview",
|
|
26
28
|
"prepare": "simple-git-hooks",
|
|
27
29
|
"lint": "pnpm lint:eslint && pnpm lint:stylelint",
|
|
@@ -36,9 +38,11 @@
|
|
|
36
38
|
"test:stories": "vitest run --project stories",
|
|
37
39
|
"test:stories:watch": "vitest --project stories",
|
|
38
40
|
"test:stories:ui": "vitest --project stories --ui",
|
|
41
|
+
"test:stories:coverage": "vitest run --project stories --coverage",
|
|
42
|
+
"test:coverage:all": "vitest run --coverage",
|
|
39
43
|
"test:watch": "vitest --project unit",
|
|
40
|
-
"storybook": "storybook dev -p 6006",
|
|
41
|
-
"build-storybook": "storybook build",
|
|
44
|
+
"storybook": "pnpm build:tokens && storybook dev -p 6006",
|
|
45
|
+
"build-storybook": "pnpm build:tokens && storybook build",
|
|
42
46
|
"chromatic": "npx chromatic",
|
|
43
47
|
"knip": "knip",
|
|
44
48
|
"publint": "publint",
|
|
@@ -64,7 +68,7 @@
|
|
|
64
68
|
},
|
|
65
69
|
"lint-staged": {
|
|
66
70
|
"*.{ts,tsx,vue}": "eslint --fix",
|
|
67
|
-
"*.{vue,css,scss}": "stylelint --fix"
|
|
71
|
+
"*.{vue,css,scss}": "stylelint --fix --allow-empty-input"
|
|
68
72
|
},
|
|
69
73
|
"peerDependencies": {
|
|
70
74
|
"@emotion/css": ">=11.0.0",
|
|
@@ -77,6 +81,7 @@
|
|
|
77
81
|
"@emotion/css": "11.11.2",
|
|
78
82
|
"@iconify/vue": "4.1.1",
|
|
79
83
|
"@size-limit/preset-small-lib": "12.1.0",
|
|
84
|
+
"@storybook/addon-a11y": "10.4.1",
|
|
80
85
|
"@storybook/addon-docs": "10.4.1",
|
|
81
86
|
"@storybook/addon-links": "10.4.1",
|
|
82
87
|
"@storybook/addon-vitest": "10.4.1",
|
|
@@ -107,9 +112,11 @@
|
|
|
107
112
|
"size-limit": "12.1.0",
|
|
108
113
|
"storybook": "10.4.1",
|
|
109
114
|
"storybook-addon-pseudo-states": "10.4.0",
|
|
115
|
+
"style-dictionary": "5.4.1",
|
|
110
116
|
"stylelint": "17.11.1",
|
|
111
117
|
"stylelint-config-recommended-vue": "1.6.1",
|
|
112
118
|
"stylelint-config-standard-scss": "17.0.0",
|
|
119
|
+
"stylelint-value-no-unknown-custom-properties": "6.1.1",
|
|
113
120
|
"tsx": "4.22.3",
|
|
114
121
|
"typescript": "6.0.3",
|
|
115
122
|
"unplugin-icons": "23.0.1",
|