@inkeep/cxkit-theme 0.0.0-dev-20250221234142
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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/color-utils.cjs +1 -0
- package/dist/color-utils.d.cts +1 -0
- package/dist/color-utils.d.ts +1 -0
- package/dist/color-utils.js +20 -0
- package/dist/colors.cjs +1 -0
- package/dist/colors.d.cts +100 -0
- package/dist/colors.d.ts +100 -0
- package/dist/colors.js +137 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +120 -0
- package/dist/index.d.ts +120 -0
- package/dist/index.js +57 -0
- package/dist/node_modules/.pnpm/colorjs.io@0.5.2/node_modules/colorjs.io/dist/color.cjs +1 -0
- package/dist/node_modules/.pnpm/colorjs.io@0.5.2/node_modules/colorjs.io/dist/color.js +2839 -0
- package/dist/utils/create-css-variables.cjs +1 -0
- package/dist/utils/create-css-variables.d.cts +2 -0
- package/dist/utils/create-css-variables.d.ts +2 -0
- package/dist/utils/create-css-variables.js +23 -0
- package/dist/utils/generate-theme-variables.cjs +1 -0
- package/dist/utils/generate-theme-variables.d.cts +3 -0
- package/dist/utils/generate-theme-variables.d.ts +3 -0
- package/dist/utils/generate-theme-variables.js +33 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Chakra UI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# @inkeep
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function s(t){return Number.parseInt(t,16)||0}function u(t){return s(t)/255<=.03928?s(t)/255/12.92:((s(t)/255+.055)/1.055)**2.4}function c(t){return .2126*u(t.slice(1,3))+.7152*u(t.slice(3,5))+.0722*u(t.slice(-2))}function o(t,e){const n=c(t),r=c(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function a(t,e,n){const r=o(t,e),i=o(t,n);return r>i?e:n}exports.getTextColorBasedOnBgColor=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getTextColorBasedOnBgColor(bgColor: string, lightColor: string, darkColor: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getTextColorBasedOnBgColor(bgColor: string, lightColor: string, darkColor: string): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function c(t) {
|
|
2
|
+
return Number.parseInt(t, 16) || 0;
|
|
3
|
+
}
|
|
4
|
+
function r(t) {
|
|
5
|
+
return c(t) / 255 <= 0.03928 ? c(t) / 255 / 12.92 : ((c(t) / 255 + 0.055) / 1.055) ** 2.4;
|
|
6
|
+
}
|
|
7
|
+
function u(t) {
|
|
8
|
+
return 0.2126 * r(t.slice(1, 3)) + 0.7152 * r(t.slice(3, 5)) + 0.0722 * r(t.slice(-2));
|
|
9
|
+
}
|
|
10
|
+
function i(t, e) {
|
|
11
|
+
const n = u(t), s = u(e);
|
|
12
|
+
return (Math.max(n, s) + 0.05) / (Math.min(n, s) + 0.05);
|
|
13
|
+
}
|
|
14
|
+
function o(t, e, n) {
|
|
15
|
+
const s = i(t, e), a = i(t, n);
|
|
16
|
+
return s > a ? e : n;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
o as getTextColorBasedOnBgColor
|
|
20
|
+
};
|
package/dist/colors.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./node_modules/.pnpm/colorjs.io@0.5.2/node_modules/colorjs.io/dist/color.cjs"),C=require("./color-utils.cjs"),f="#000000",S={whiteAlpha:{50:"rgba(255, 255, 255, 0.05)",100:"rgba(255, 255, 255, 0.1)",200:"rgba(255, 255, 255, 0.15)",300:"rgba(255, 255, 255, 0.2)",400:"rgba(255, 255, 255, 0.3)",500:"rgba(255, 255, 255, 0.4)",600:"rgba(255, 255, 255, 0.5)",700:"rgba(255, 255, 255, 0.6)",800:"rgba(255, 255, 255, 0.7)",900:"rgba(255, 255, 255, 0.8)",950:"rgba(255, 255, 255, 0.9)",1e3:"rgba(255, 255, 255, 0.95)"},blackAlpha:{50:"rgba(0, 0, 0, 0.05)",100:"rgba(0, 0, 0, 0.1)",200:"rgba(0, 0, 0, 0.15)",300:"rgba(0, 0, 0, 0.2)",400:"rgba(0, 0, 0, 0.3)",500:"rgba(0, 0, 0, 0.4)",600:"rgba(0, 0, 0, 0.5)",700:"rgba(0, 0, 0, 0.6)",800:"rgba(0, 0, 0, 0.7)",900:"rgba(0, 0, 0, 0.8)",950:"rgba(0, 0, 0, 0.9)",1e3:"rgba(0, 0, 0, 0.95)"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#eaecf1",300:"#d8dce2",400:"#c4c9d2",500:"#9ca3af",600:"#6b7280",700:"#4b5563",800:"#374151",900:"#1f2937",950:"#111827",1e3:"#030712"},grayDark:{1e3:"#111111",950:"#191919",900:"#222222",800:"#2a2a2a",700:"#313131",600:"#3a3a3a",500:"#484848",400:"#606060",300:"#6e6e6e",200:"#7b7b7b",100:"#b4b4b4",50:"#eeeeee"}};function l(n){return n.to("srgb").toString({format:"hex"})}function g(n,t,e){const c=n.lch,h=t.lch,s=c.l+(h.l-c.l)*e,i=c.c+(h.c-c.c)*e,a=c.h+(h.h-c.h)*e;return new r.default("lch",[s,i,a])}function o(n){return n.to("srgb")}const w=new r.default(f),b=n=>{const t=n instanceof r.default?n:new r.default(n),e=t.lch.c<3?t.lch.c:3,c=t.lch.c<10?t.lch.c:10,h=t.lch.c<5?t.lch.c:5;return{textBold:new r.default("lch",[10,h,t.lch.h]),textSubtle:new r.default("lch",[30,c,t.lch.h]),lighter:new r.default("lch",[98,t.lch.c*1.2,t.lch.h*.96]),light:new r.default("lch",[89,t.lch.c*1.2,t.lch.h*.96]),lightSubtle:new r.default("lch",[98,e,t.lch.h*.98]),medium:t,mediumSubtle:new r.default("lch",[t.lch.l*.5,t.lch.c,t.lch.h],.3),strong:new r.default("lch",[t.lch.l*.85,t.lch.c,t.lch.h]),stronger:new r.default("lch",[t.lch.l*.5,t.lch.c,t.lch.h])}},d=b(w),m=(n,t)=>{const e=Object.assign({},t?b(t):d,n);for(const a of Object.keys(e))e[a]instanceof r.default||(e[a]=new r.default(e[a]));const c=Object.keys(e).reduce((a,u)=>(a[u]=e[u].toGamut({space:"srgb",method:"lch.c"}).to("srgb").toString({format:"hex"}),a),{}),h={50:l(o(e.lighter)),100:l(o(g(e.lighter,e.light,.5))),200:l(o(e.light)),300:l(o(g(e.light,e.medium,.5))),400:l(o(g(e.light,e.medium,.75))),500:l(o(e.medium)),600:l(o(g(e.medium,e.strong,.75))),700:l(o(e.strong)),800:l(o(g(e.strong,e.stronger,.5))),900:l(o(e.stronger)),950:l(o(g(e.stronger,e.textBold,.5))),1e3:l(o(g(e.stronger,e.textBold,.75)))},s=c.textColorOnPrimary||C.getTextColorBasedOnBgColor(c.medium,"#ffffff",c.textBold);return{inkeepPrimary:{...c,textColorOnPrimary:s},inkeepExpandedPrimary:h}},x=m(d),y={...x,...S};exports.DEFAULT_PRIMARY_BRAND_COLOR=f;exports.colors=y;exports.createColorDict=b;exports.createColorScheme=m;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { default as Color } from 'colorjs.io';
|
|
2
|
+
import { UserProvidedColorScheme } from '@inkeep/cxkit-types';
|
|
3
|
+
export declare const DEFAULT_PRIMARY_BRAND_COLOR = "#000000";
|
|
4
|
+
export type ColorDict = Record<string, Color>;
|
|
5
|
+
export declare const createColorDict: (color: Color | string) => Record<string, Color>;
|
|
6
|
+
export declare const createColorScheme: (userScheme?: UserProvidedColorScheme, primaryColor?: Color | string) => InkeepColorScheme;
|
|
7
|
+
export interface InkeepColorScheme {
|
|
8
|
+
inkeepPrimary: {
|
|
9
|
+
textColorOnPrimary: string;
|
|
10
|
+
};
|
|
11
|
+
inkeepExpandedPrimary: {
|
|
12
|
+
'50': string;
|
|
13
|
+
'100': string;
|
|
14
|
+
'200': string;
|
|
15
|
+
'300': string;
|
|
16
|
+
'400': string;
|
|
17
|
+
'500': string;
|
|
18
|
+
'600': string;
|
|
19
|
+
'700': string;
|
|
20
|
+
'800': string;
|
|
21
|
+
'900': string;
|
|
22
|
+
'950': string;
|
|
23
|
+
'1000': string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export declare const colors: {
|
|
27
|
+
whiteAlpha: {
|
|
28
|
+
50: string;
|
|
29
|
+
100: string;
|
|
30
|
+
200: string;
|
|
31
|
+
300: string;
|
|
32
|
+
400: string;
|
|
33
|
+
500: string;
|
|
34
|
+
600: string;
|
|
35
|
+
700: string;
|
|
36
|
+
800: string;
|
|
37
|
+
900: string;
|
|
38
|
+
950: string;
|
|
39
|
+
1000: string;
|
|
40
|
+
};
|
|
41
|
+
blackAlpha: {
|
|
42
|
+
50: string;
|
|
43
|
+
100: string;
|
|
44
|
+
200: string;
|
|
45
|
+
300: string;
|
|
46
|
+
400: string;
|
|
47
|
+
500: string;
|
|
48
|
+
600: string;
|
|
49
|
+
700: string;
|
|
50
|
+
800: string;
|
|
51
|
+
900: string;
|
|
52
|
+
950: string;
|
|
53
|
+
1000: string;
|
|
54
|
+
};
|
|
55
|
+
gray: {
|
|
56
|
+
50: string;
|
|
57
|
+
100: string;
|
|
58
|
+
200: string;
|
|
59
|
+
300: string;
|
|
60
|
+
400: string;
|
|
61
|
+
500: string;
|
|
62
|
+
600: string;
|
|
63
|
+
700: string;
|
|
64
|
+
800: string;
|
|
65
|
+
900: string;
|
|
66
|
+
950: string;
|
|
67
|
+
1000: string;
|
|
68
|
+
};
|
|
69
|
+
grayDark: {
|
|
70
|
+
1000: string;
|
|
71
|
+
950: string;
|
|
72
|
+
900: string;
|
|
73
|
+
800: string;
|
|
74
|
+
700: string;
|
|
75
|
+
600: string;
|
|
76
|
+
500: string;
|
|
77
|
+
400: string;
|
|
78
|
+
300: string;
|
|
79
|
+
200: string;
|
|
80
|
+
100: string;
|
|
81
|
+
50: string;
|
|
82
|
+
};
|
|
83
|
+
inkeepPrimary: {
|
|
84
|
+
textColorOnPrimary: string;
|
|
85
|
+
};
|
|
86
|
+
inkeepExpandedPrimary: {
|
|
87
|
+
"50": string;
|
|
88
|
+
"100": string;
|
|
89
|
+
"200": string;
|
|
90
|
+
"300": string;
|
|
91
|
+
"400": string;
|
|
92
|
+
"500": string;
|
|
93
|
+
"600": string;
|
|
94
|
+
"700": string;
|
|
95
|
+
"800": string;
|
|
96
|
+
"900": string;
|
|
97
|
+
"950": string;
|
|
98
|
+
"1000": string;
|
|
99
|
+
};
|
|
100
|
+
};
|
package/dist/colors.d.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { default as Color } from 'colorjs.io';
|
|
2
|
+
import { UserProvidedColorScheme } from '@inkeep/cxkit-types';
|
|
3
|
+
export declare const DEFAULT_PRIMARY_BRAND_COLOR = "#000000";
|
|
4
|
+
export type ColorDict = Record<string, Color>;
|
|
5
|
+
export declare const createColorDict: (color: Color | string) => Record<string, Color>;
|
|
6
|
+
export declare const createColorScheme: (userScheme?: UserProvidedColorScheme, primaryColor?: Color | string) => InkeepColorScheme;
|
|
7
|
+
export interface InkeepColorScheme {
|
|
8
|
+
inkeepPrimary: {
|
|
9
|
+
textColorOnPrimary: string;
|
|
10
|
+
};
|
|
11
|
+
inkeepExpandedPrimary: {
|
|
12
|
+
'50': string;
|
|
13
|
+
'100': string;
|
|
14
|
+
'200': string;
|
|
15
|
+
'300': string;
|
|
16
|
+
'400': string;
|
|
17
|
+
'500': string;
|
|
18
|
+
'600': string;
|
|
19
|
+
'700': string;
|
|
20
|
+
'800': string;
|
|
21
|
+
'900': string;
|
|
22
|
+
'950': string;
|
|
23
|
+
'1000': string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export declare const colors: {
|
|
27
|
+
whiteAlpha: {
|
|
28
|
+
50: string;
|
|
29
|
+
100: string;
|
|
30
|
+
200: string;
|
|
31
|
+
300: string;
|
|
32
|
+
400: string;
|
|
33
|
+
500: string;
|
|
34
|
+
600: string;
|
|
35
|
+
700: string;
|
|
36
|
+
800: string;
|
|
37
|
+
900: string;
|
|
38
|
+
950: string;
|
|
39
|
+
1000: string;
|
|
40
|
+
};
|
|
41
|
+
blackAlpha: {
|
|
42
|
+
50: string;
|
|
43
|
+
100: string;
|
|
44
|
+
200: string;
|
|
45
|
+
300: string;
|
|
46
|
+
400: string;
|
|
47
|
+
500: string;
|
|
48
|
+
600: string;
|
|
49
|
+
700: string;
|
|
50
|
+
800: string;
|
|
51
|
+
900: string;
|
|
52
|
+
950: string;
|
|
53
|
+
1000: string;
|
|
54
|
+
};
|
|
55
|
+
gray: {
|
|
56
|
+
50: string;
|
|
57
|
+
100: string;
|
|
58
|
+
200: string;
|
|
59
|
+
300: string;
|
|
60
|
+
400: string;
|
|
61
|
+
500: string;
|
|
62
|
+
600: string;
|
|
63
|
+
700: string;
|
|
64
|
+
800: string;
|
|
65
|
+
900: string;
|
|
66
|
+
950: string;
|
|
67
|
+
1000: string;
|
|
68
|
+
};
|
|
69
|
+
grayDark: {
|
|
70
|
+
1000: string;
|
|
71
|
+
950: string;
|
|
72
|
+
900: string;
|
|
73
|
+
800: string;
|
|
74
|
+
700: string;
|
|
75
|
+
600: string;
|
|
76
|
+
500: string;
|
|
77
|
+
400: string;
|
|
78
|
+
300: string;
|
|
79
|
+
200: string;
|
|
80
|
+
100: string;
|
|
81
|
+
50: string;
|
|
82
|
+
};
|
|
83
|
+
inkeepPrimary: {
|
|
84
|
+
textColorOnPrimary: string;
|
|
85
|
+
};
|
|
86
|
+
inkeepExpandedPrimary: {
|
|
87
|
+
"50": string;
|
|
88
|
+
"100": string;
|
|
89
|
+
"200": string;
|
|
90
|
+
"300": string;
|
|
91
|
+
"400": string;
|
|
92
|
+
"500": string;
|
|
93
|
+
"600": string;
|
|
94
|
+
"700": string;
|
|
95
|
+
"800": string;
|
|
96
|
+
"900": string;
|
|
97
|
+
"950": string;
|
|
98
|
+
"1000": string;
|
|
99
|
+
};
|
|
100
|
+
};
|
package/dist/colors.js
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import r from "./node_modules/.pnpm/colorjs.io@0.5.2/node_modules/colorjs.io/dist/color.js";
|
|
2
|
+
import { getTextColorBasedOnBgColor as u } from "./color-utils.js";
|
|
3
|
+
const d = "#000000", C = {
|
|
4
|
+
whiteAlpha: {
|
|
5
|
+
50: "rgba(255, 255, 255, 0.05)",
|
|
6
|
+
100: "rgba(255, 255, 255, 0.1)",
|
|
7
|
+
200: "rgba(255, 255, 255, 0.15)",
|
|
8
|
+
300: "rgba(255, 255, 255, 0.2)",
|
|
9
|
+
400: "rgba(255, 255, 255, 0.3)",
|
|
10
|
+
500: "rgba(255, 255, 255, 0.4)",
|
|
11
|
+
600: "rgba(255, 255, 255, 0.5)",
|
|
12
|
+
700: "rgba(255, 255, 255, 0.6)",
|
|
13
|
+
800: "rgba(255, 255, 255, 0.7)",
|
|
14
|
+
900: "rgba(255, 255, 255, 0.8)",
|
|
15
|
+
950: "rgba(255, 255, 255, 0.9)",
|
|
16
|
+
1e3: "rgba(255, 255, 255, 0.95)"
|
|
17
|
+
},
|
|
18
|
+
blackAlpha: {
|
|
19
|
+
50: "rgba(0, 0, 0, 0.05)",
|
|
20
|
+
100: "rgba(0, 0, 0, 0.1)",
|
|
21
|
+
200: "rgba(0, 0, 0, 0.15)",
|
|
22
|
+
300: "rgba(0, 0, 0, 0.2)",
|
|
23
|
+
400: "rgba(0, 0, 0, 0.3)",
|
|
24
|
+
500: "rgba(0, 0, 0, 0.4)",
|
|
25
|
+
600: "rgba(0, 0, 0, 0.5)",
|
|
26
|
+
700: "rgba(0, 0, 0, 0.6)",
|
|
27
|
+
800: "rgba(0, 0, 0, 0.7)",
|
|
28
|
+
900: "rgba(0, 0, 0, 0.8)",
|
|
29
|
+
950: "rgba(0, 0, 0, 0.9)",
|
|
30
|
+
1e3: "rgba(0, 0, 0, 0.95)"
|
|
31
|
+
},
|
|
32
|
+
gray: {
|
|
33
|
+
// tailwind modified gray scheme
|
|
34
|
+
50: "#f9fafb",
|
|
35
|
+
100: "#f3f4f6",
|
|
36
|
+
200: "#eaecf1",
|
|
37
|
+
// Slightly lightened
|
|
38
|
+
300: "#d8dce2",
|
|
39
|
+
// Slightly lightened
|
|
40
|
+
400: "#c4c9d2",
|
|
41
|
+
// New color (the rest of the colors are shifted accordingly)
|
|
42
|
+
500: "#9ca3af",
|
|
43
|
+
600: "#6b7280",
|
|
44
|
+
700: "#4b5563",
|
|
45
|
+
800: "#374151",
|
|
46
|
+
900: "#1f2937",
|
|
47
|
+
950: "#111827",
|
|
48
|
+
1e3: "#030712"
|
|
49
|
+
},
|
|
50
|
+
// radix neutral gray for dark mode ('grayDark')
|
|
51
|
+
grayDark: {
|
|
52
|
+
1e3: "#111111",
|
|
53
|
+
950: "#191919",
|
|
54
|
+
900: "#222222",
|
|
55
|
+
800: "#2a2a2a",
|
|
56
|
+
700: "#313131",
|
|
57
|
+
600: "#3a3a3a",
|
|
58
|
+
500: "#484848",
|
|
59
|
+
400: "#606060",
|
|
60
|
+
300: "#6e6e6e",
|
|
61
|
+
200: "#7b7b7b",
|
|
62
|
+
100: "#b4b4b4",
|
|
63
|
+
50: "#eeeeee"
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
function o(n) {
|
|
67
|
+
return n.to("srgb").toString({ format: "hex" });
|
|
68
|
+
}
|
|
69
|
+
function g(n, e, t) {
|
|
70
|
+
const c = n.lch, a = e.lch, s = c.l + (a.l - c.l) * t, b = c.c + (a.c - c.c) * t, h = c.h + (a.h - c.h) * t;
|
|
71
|
+
return new r("lch", [s, b, h]);
|
|
72
|
+
}
|
|
73
|
+
function l(n) {
|
|
74
|
+
return n.to("srgb");
|
|
75
|
+
}
|
|
76
|
+
const w = new r(d), m = (n) => {
|
|
77
|
+
const e = n instanceof r ? n : new r(n), t = e.lch.c < 3 ? e.lch.c : 3, c = e.lch.c < 10 ? e.lch.c : 10, a = e.lch.c < 5 ? e.lch.c : 5;
|
|
78
|
+
return {
|
|
79
|
+
textBold: new r("lch", [10, a, e.lch.h]),
|
|
80
|
+
textSubtle: new r("lch", [30, c, e.lch.h]),
|
|
81
|
+
lighter: new r("lch", [98, e.lch.c * 1.2, e.lch.h * 0.96]),
|
|
82
|
+
light: new r("lch", [89, e.lch.c * 1.2, e.lch.h * 0.96]),
|
|
83
|
+
lightSubtle: new r("lch", [98, t, e.lch.h * 0.98]),
|
|
84
|
+
medium: e,
|
|
85
|
+
mediumSubtle: new r(
|
|
86
|
+
"lch",
|
|
87
|
+
[e.lch.l * 0.5, e.lch.c, e.lch.h],
|
|
88
|
+
0.3
|
|
89
|
+
),
|
|
90
|
+
strong: new r("lch", [e.lch.l * 0.85, e.lch.c, e.lch.h]),
|
|
91
|
+
stronger: new r("lch", [e.lch.l * 0.5, e.lch.c, e.lch.h])
|
|
92
|
+
};
|
|
93
|
+
}, f = m(w), x = (n, e) => {
|
|
94
|
+
const t = Object.assign(
|
|
95
|
+
{},
|
|
96
|
+
e ? m(e) : f,
|
|
97
|
+
n
|
|
98
|
+
);
|
|
99
|
+
for (const h of Object.keys(t))
|
|
100
|
+
t[h] instanceof r || (t[h] = new r(t[h]));
|
|
101
|
+
const c = Object.keys(t).reduce((h, i) => (h[i] = t[i].toGamut({ space: "srgb", method: "lch.c" }).to("srgb").toString({ format: "hex" }), h), {}), a = {
|
|
102
|
+
50: o(l(t.lighter)),
|
|
103
|
+
100: o(l(g(t.lighter, t.light, 0.5))),
|
|
104
|
+
200: o(l(t.light)),
|
|
105
|
+
300: o(l(g(t.light, t.medium, 0.5))),
|
|
106
|
+
400: o(l(g(t.light, t.medium, 0.75))),
|
|
107
|
+
500: o(l(t.medium)),
|
|
108
|
+
600: o(l(g(t.medium, t.strong, 0.75))),
|
|
109
|
+
700: o(l(t.strong)),
|
|
110
|
+
800: o(l(g(t.strong, t.stronger, 0.5))),
|
|
111
|
+
900: o(l(t.stronger)),
|
|
112
|
+
950: o(l(g(t.stronger, t.textBold, 0.5))),
|
|
113
|
+
1e3: o(
|
|
114
|
+
l(g(t.stronger, t.textBold, 0.75))
|
|
115
|
+
)
|
|
116
|
+
}, s = c.textColorOnPrimary || u(
|
|
117
|
+
c.medium,
|
|
118
|
+
"#ffffff",
|
|
119
|
+
c.textBold
|
|
120
|
+
);
|
|
121
|
+
return {
|
|
122
|
+
inkeepPrimary: {
|
|
123
|
+
...c,
|
|
124
|
+
textColorOnPrimary: s
|
|
125
|
+
},
|
|
126
|
+
inkeepExpandedPrimary: a
|
|
127
|
+
};
|
|
128
|
+
}, S = x(f), B = {
|
|
129
|
+
...S,
|
|
130
|
+
...C
|
|
131
|
+
};
|
|
132
|
+
export {
|
|
133
|
+
d as DEFAULT_PRIMARY_BRAND_COLOR,
|
|
134
|
+
B as colors,
|
|
135
|
+
m as createColorDict,
|
|
136
|
+
x as createColorScheme
|
|
137
|
+
};
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./colors.cjs"),r=require("./utils/create-css-variables.cjs"),o=require("./utils/generate-theme-variables.cjs"),a={heading:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},t={"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem","1sm":"0.8125rem",sm:"0.875rem","2sm":"0.9375rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"},s={hide:-1,auto:"auto",base:0,start:1,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},l={colors:e.colors,fontFamily:a,fontSize:t,zIndex:s};exports.DEFAULT_PRIMARY_BRAND_COLOR=e.DEFAULT_PRIMARY_BRAND_COLOR;exports.colors=e.colors;exports.createColorDict=e.createColorDict;exports.createColorScheme=e.createColorScheme;exports.createCSSVariables=r.createCSSVariables;exports.generateThemeVariables=o.generateThemeVariables;exports.themeMappings=o.themeMappings;exports.theme=l;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
export declare const theme: {
|
|
2
|
+
colors: {
|
|
3
|
+
whiteAlpha: {
|
|
4
|
+
50: string;
|
|
5
|
+
100: string;
|
|
6
|
+
200: string;
|
|
7
|
+
300: string;
|
|
8
|
+
400: string;
|
|
9
|
+
500: string;
|
|
10
|
+
600: string;
|
|
11
|
+
700: string;
|
|
12
|
+
800: string;
|
|
13
|
+
900: string;
|
|
14
|
+
950: string;
|
|
15
|
+
1000: string;
|
|
16
|
+
};
|
|
17
|
+
blackAlpha: {
|
|
18
|
+
50: string;
|
|
19
|
+
100: string;
|
|
20
|
+
200: string;
|
|
21
|
+
300: string;
|
|
22
|
+
400: string;
|
|
23
|
+
500: string;
|
|
24
|
+
600: string;
|
|
25
|
+
700: string;
|
|
26
|
+
800: string;
|
|
27
|
+
900: string;
|
|
28
|
+
950: string;
|
|
29
|
+
1000: string;
|
|
30
|
+
};
|
|
31
|
+
gray: {
|
|
32
|
+
50: string;
|
|
33
|
+
100: string;
|
|
34
|
+
200: string;
|
|
35
|
+
300: string;
|
|
36
|
+
400: string;
|
|
37
|
+
500: string;
|
|
38
|
+
600: string;
|
|
39
|
+
700: string;
|
|
40
|
+
800: string;
|
|
41
|
+
900: string;
|
|
42
|
+
950: string;
|
|
43
|
+
1000: string;
|
|
44
|
+
};
|
|
45
|
+
grayDark: {
|
|
46
|
+
1000: string;
|
|
47
|
+
950: string;
|
|
48
|
+
900: string;
|
|
49
|
+
800: string;
|
|
50
|
+
700: string;
|
|
51
|
+
600: string;
|
|
52
|
+
500: string;
|
|
53
|
+
400: string;
|
|
54
|
+
300: string;
|
|
55
|
+
200: string;
|
|
56
|
+
100: string;
|
|
57
|
+
50: string;
|
|
58
|
+
};
|
|
59
|
+
inkeepPrimary: {
|
|
60
|
+
textColorOnPrimary: string;
|
|
61
|
+
};
|
|
62
|
+
inkeepExpandedPrimary: {
|
|
63
|
+
"50": string;
|
|
64
|
+
"100": string;
|
|
65
|
+
"200": string;
|
|
66
|
+
"300": string;
|
|
67
|
+
"400": string;
|
|
68
|
+
"500": string;
|
|
69
|
+
"600": string;
|
|
70
|
+
"700": string;
|
|
71
|
+
"800": string;
|
|
72
|
+
"900": string;
|
|
73
|
+
"950": string;
|
|
74
|
+
"1000": string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
fontFamily: {
|
|
78
|
+
heading: string;
|
|
79
|
+
body: string;
|
|
80
|
+
mono: string;
|
|
81
|
+
};
|
|
82
|
+
fontSize: {
|
|
83
|
+
'3xs': string;
|
|
84
|
+
'2xs': string;
|
|
85
|
+
xs: string;
|
|
86
|
+
'1sm': string;
|
|
87
|
+
sm: string;
|
|
88
|
+
'2sm': string;
|
|
89
|
+
md: string;
|
|
90
|
+
lg: string;
|
|
91
|
+
xl: string;
|
|
92
|
+
'2xl': string;
|
|
93
|
+
'3xl': string;
|
|
94
|
+
'4xl': string;
|
|
95
|
+
'5xl': string;
|
|
96
|
+
'6xl': string;
|
|
97
|
+
'7xl': string;
|
|
98
|
+
'8xl': string;
|
|
99
|
+
'9xl': string;
|
|
100
|
+
};
|
|
101
|
+
zIndex: {
|
|
102
|
+
hide: number;
|
|
103
|
+
auto: string;
|
|
104
|
+
base: number;
|
|
105
|
+
start: number;
|
|
106
|
+
docked: number;
|
|
107
|
+
dropdown: number;
|
|
108
|
+
sticky: number;
|
|
109
|
+
banner: number;
|
|
110
|
+
overlay: number;
|
|
111
|
+
modal: number;
|
|
112
|
+
popover: number;
|
|
113
|
+
skipLink: number;
|
|
114
|
+
toast: number;
|
|
115
|
+
tooltip: number;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
export * from './utils/create-css-variables';
|
|
119
|
+
export * from './utils/generate-theme-variables';
|
|
120
|
+
export * from './colors';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
export declare const theme: {
|
|
2
|
+
colors: {
|
|
3
|
+
whiteAlpha: {
|
|
4
|
+
50: string;
|
|
5
|
+
100: string;
|
|
6
|
+
200: string;
|
|
7
|
+
300: string;
|
|
8
|
+
400: string;
|
|
9
|
+
500: string;
|
|
10
|
+
600: string;
|
|
11
|
+
700: string;
|
|
12
|
+
800: string;
|
|
13
|
+
900: string;
|
|
14
|
+
950: string;
|
|
15
|
+
1000: string;
|
|
16
|
+
};
|
|
17
|
+
blackAlpha: {
|
|
18
|
+
50: string;
|
|
19
|
+
100: string;
|
|
20
|
+
200: string;
|
|
21
|
+
300: string;
|
|
22
|
+
400: string;
|
|
23
|
+
500: string;
|
|
24
|
+
600: string;
|
|
25
|
+
700: string;
|
|
26
|
+
800: string;
|
|
27
|
+
900: string;
|
|
28
|
+
950: string;
|
|
29
|
+
1000: string;
|
|
30
|
+
};
|
|
31
|
+
gray: {
|
|
32
|
+
50: string;
|
|
33
|
+
100: string;
|
|
34
|
+
200: string;
|
|
35
|
+
300: string;
|
|
36
|
+
400: string;
|
|
37
|
+
500: string;
|
|
38
|
+
600: string;
|
|
39
|
+
700: string;
|
|
40
|
+
800: string;
|
|
41
|
+
900: string;
|
|
42
|
+
950: string;
|
|
43
|
+
1000: string;
|
|
44
|
+
};
|
|
45
|
+
grayDark: {
|
|
46
|
+
1000: string;
|
|
47
|
+
950: string;
|
|
48
|
+
900: string;
|
|
49
|
+
800: string;
|
|
50
|
+
700: string;
|
|
51
|
+
600: string;
|
|
52
|
+
500: string;
|
|
53
|
+
400: string;
|
|
54
|
+
300: string;
|
|
55
|
+
200: string;
|
|
56
|
+
100: string;
|
|
57
|
+
50: string;
|
|
58
|
+
};
|
|
59
|
+
inkeepPrimary: {
|
|
60
|
+
textColorOnPrimary: string;
|
|
61
|
+
};
|
|
62
|
+
inkeepExpandedPrimary: {
|
|
63
|
+
"50": string;
|
|
64
|
+
"100": string;
|
|
65
|
+
"200": string;
|
|
66
|
+
"300": string;
|
|
67
|
+
"400": string;
|
|
68
|
+
"500": string;
|
|
69
|
+
"600": string;
|
|
70
|
+
"700": string;
|
|
71
|
+
"800": string;
|
|
72
|
+
"900": string;
|
|
73
|
+
"950": string;
|
|
74
|
+
"1000": string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
fontFamily: {
|
|
78
|
+
heading: string;
|
|
79
|
+
body: string;
|
|
80
|
+
mono: string;
|
|
81
|
+
};
|
|
82
|
+
fontSize: {
|
|
83
|
+
'3xs': string;
|
|
84
|
+
'2xs': string;
|
|
85
|
+
xs: string;
|
|
86
|
+
'1sm': string;
|
|
87
|
+
sm: string;
|
|
88
|
+
'2sm': string;
|
|
89
|
+
md: string;
|
|
90
|
+
lg: string;
|
|
91
|
+
xl: string;
|
|
92
|
+
'2xl': string;
|
|
93
|
+
'3xl': string;
|
|
94
|
+
'4xl': string;
|
|
95
|
+
'5xl': string;
|
|
96
|
+
'6xl': string;
|
|
97
|
+
'7xl': string;
|
|
98
|
+
'8xl': string;
|
|
99
|
+
'9xl': string;
|
|
100
|
+
};
|
|
101
|
+
zIndex: {
|
|
102
|
+
hide: number;
|
|
103
|
+
auto: string;
|
|
104
|
+
base: number;
|
|
105
|
+
start: number;
|
|
106
|
+
docked: number;
|
|
107
|
+
dropdown: number;
|
|
108
|
+
sticky: number;
|
|
109
|
+
banner: number;
|
|
110
|
+
overlay: number;
|
|
111
|
+
modal: number;
|
|
112
|
+
popover: number;
|
|
113
|
+
skipLink: number;
|
|
114
|
+
toast: number;
|
|
115
|
+
tooltip: number;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
export * from './utils/create-css-variables';
|
|
119
|
+
export * from './utils/generate-theme-variables';
|
|
120
|
+
export * from './colors';
|