toku-ui 5.3.0 → 5.4.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/TSelect/TSelect.d.ts +2 -2
- package/dist/components/TThemeProvider/BrandRampComparison.stories.d.ts +33 -0
- package/dist/components/TThemeProvider/BrandRampComparison.stories.d.ts.map +1 -0
- package/dist/index.es.js +2020 -573
- package/dist/index.es.js.map +1 -1
- package/dist/theme/brandRamp.d.ts +12 -0
- package/dist/theme/brandRamp.d.ts.map +1 -0
- package/dist/theme/color.d.ts +19 -0
- package/dist/theme/color.d.ts.map +1 -0
- package/dist/theme/radixScales.d.ts +3 -0
- package/dist/theme/radixScales.d.ts.map +1 -0
- package/dist/theme/utils.d.ts +3 -3
- package/dist/theme/utils.d.ts.map +1 -1
- package/package.json +6 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface BrandRamp {
|
|
2
|
+
/** Steps 1-12, index 0 is step 1. */
|
|
3
|
+
solid: string[];
|
|
4
|
+
/** Alpha twin of `solid` over a white background. */
|
|
5
|
+
alpha: string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Generates the 12-step brand ramp from a seed color. Step 9 is the seed itself, so primary
|
|
9
|
+
* buttons render the tenant color literally.
|
|
10
|
+
*/
|
|
11
|
+
export declare function generateBrandRamp(seed: string): BrandRamp;
|
|
12
|
+
//# sourceMappingURL=brandRamp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brandRamp.d.ts","sourceRoot":"","sources":["../../src/theme/brandRamp.ts"],"names":[],"mappings":"AA0IA,MAAM,WAAW,SAAS;IACxB,qCAAqC;IACrC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,qDAAqD;IACrD,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAKD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAsCzD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The color math the brand ramp needs, ported from colorjs.io (MIT) so the library does not
|
|
3
|
+
* ship all of it: OKLCH, CIE Lab D50, sRGB and Display P3, plus CSS Color 4 gamut mapping.
|
|
4
|
+
* Matrices and thresholds are colorjs.io's, so results match `colorjs.io/fn` to the hex digit.
|
|
5
|
+
*/
|
|
6
|
+
type Vector = [number, number, number];
|
|
7
|
+
/** Lightness, chroma, hue. A powerless hue is `null`, as in colorjs.io. */
|
|
8
|
+
export type Oklch = [number, number, number | null];
|
|
9
|
+
export declare const srgbToOklch: (rgb: Vector) => Oklch;
|
|
10
|
+
export declare const p3ToOklch: (rgb: Vector) => Oklch;
|
|
11
|
+
export declare function hexToSrgb(hex: string): Vector;
|
|
12
|
+
export declare const hexToOklch: (hex: string) => Oklch;
|
|
13
|
+
export declare function deltaEOK(a: Oklch, b: Oklch): number;
|
|
14
|
+
/** Interpolates in CIE Lab, colorjs.io's default interpolation space. */
|
|
15
|
+
export declare function mixLab(a: Oklch, b: Oklch, amount: number): Oklch;
|
|
16
|
+
export declare function srgbToHex(rgb: Vector, alpha?: number): string;
|
|
17
|
+
export declare const oklchToHex: (color: Oklch) => string;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=color.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/theme/color.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,KAAK,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAGvC,2EAA2E;AAC3E,MAAM,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;AAuFpD,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,UAAqD,CAAC;AAG7F,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,UAAmD,CAAC;AAEzF,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO7C;AAED,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,UAAgC,CAAC;AAEvE,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,CAInD;AAoBD,yEAAyE;AACzE,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAIhE;AAyDD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,MAAM,CAGxD;AAED,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,WAAkC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radixScales.d.ts","sourceRoot":"","sources":["../../src/theme/radixScales.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAAwD,CAAC;AAExG,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CA8BpD,CAAC"}
|
package/dist/theme/utils.d.ts
CHANGED
|
@@ -40,9 +40,9 @@ export type TThemeOverride = DeepPartial<typeof baseTheme> & {
|
|
|
40
40
|
* (`--color-primary-alpha-1` through `--color-primary-alpha-12`) automatically. The
|
|
41
41
|
* deprecated `--color-brand-*` twins are emitted alongside them.
|
|
42
42
|
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* states, subtle backgrounds, focus rings, etc.
|
|
43
|
+
* The ramp follows Radix's custom palette algorithm. Step 9 anchors to the input
|
|
44
|
+
* exact, so primary buttons and headers render the tenant color literally — the rest
|
|
45
|
+
* of the ramp is derived around it for hover states, subtle backgrounds, focus rings, etc.
|
|
46
46
|
*/
|
|
47
47
|
brand?: {
|
|
48
48
|
base?: string;
|
|
@@ -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;
|
|
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;AAGnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,OAAO,SAAS,CAAC,GAAG;IAC3D,MAAM,CAAC,EAAE;QACP;;;;;;;;;;;WAWG;QACH,KAAK,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAC3B,CAAC;CACH,CAAC;AAWF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CAAC,KAAK,GAAE,cAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CrD"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toku-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.4.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"dev": "vite",
|
|
25
25
|
"build": "pnpm build:tokens && vite build && cp src/styles/tokens.css dist/tokens.css && vue-tsc --project tsconfig.build.json --emitDeclarationOnly --declaration",
|
|
26
26
|
"build:tokens": "style-dictionary build --config style-dictionary.config.ts",
|
|
27
|
+
"build:radix-scales": "tsx scripts/generate-radix-scales.ts",
|
|
27
28
|
"preview": "vite preview",
|
|
28
29
|
"prepare": "simple-git-hooks",
|
|
29
30
|
"lint": "pnpm lint:eslint && pnpm lint:stylelint",
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
{
|
|
54
55
|
"name": "ESM bundle",
|
|
55
56
|
"path": "dist/index.es.js",
|
|
56
|
-
"limit": "
|
|
57
|
+
"limit": "49 KB",
|
|
57
58
|
"gzip": true
|
|
58
59
|
},
|
|
59
60
|
{
|
|
@@ -83,6 +84,7 @@
|
|
|
83
84
|
"@chromatic-com/storybook": "5.2.1",
|
|
84
85
|
"@emotion/css": "11.11.2",
|
|
85
86
|
"@iconify/vue": "4.1.1",
|
|
87
|
+
"@radix-ui/colors": "3.0.0",
|
|
86
88
|
"@size-limit/preset-small-lib": "12.1.0",
|
|
87
89
|
"@storybook/addon-a11y": "10.4.1",
|
|
88
90
|
"@storybook/addon-docs": "10.4.1",
|
|
@@ -99,7 +101,9 @@
|
|
|
99
101
|
"@vitest/coverage-v8": "4.1.6",
|
|
100
102
|
"@vitest/ui": "4.1.6",
|
|
101
103
|
"@vue/test-utils": "2.4.4",
|
|
104
|
+
"bezier-easing": "3.2.0",
|
|
102
105
|
"chromatic": "17.0.0",
|
|
106
|
+
"colorjs.io": "0.7.1",
|
|
103
107
|
"es-toolkit": "1.46.1",
|
|
104
108
|
"eslint": "9.13.0",
|
|
105
109
|
"happy-dom": "20.9.0",
|