@inkeep/cxkit-theme 0.5.0 → 0.5.1
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/colors.cjs +1 -1
- package/dist/colors.d.cts +4 -0
- package/dist/colors.d.ts +4 -0
- package/dist/colors.js +23 -19
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/package.json +2 -2
package/dist/colors.cjs
CHANGED
|
@@ -1 +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(
|
|
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"},overlay:{light:"rgba(104, 112, 118, 0.5)",dark:"rgba(136, 144, 150, 0.5)"}};function l(a){return a.to("srgb").toString({format:"hex"})}function g(a,t,e){const c=a.lch,h=t.lch,s=c.l+(h.l-c.l)*e,i=c.c+(h.c-c.c)*e,n=c.h+(h.h-c.h)*e;return new r.default("lch",[s,i,n])}function o(a){return a.to("srgb")}const w=new r.default(f),b=a=>{const t=a instanceof r.default?a:new r.default(a),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=(a,t)=>{const e=Object.assign({},t?b(t):d,a);for(const n of Object.keys(e))e[n]instanceof r.default||(e[n]=new r.default(e[n]));const c=Object.keys(e).reduce((n,u)=>(n[u]=e[u].toGamut({space:"srgb",method:"lch.c"}).to("srgb").toString({format:"hex"}),n),{}),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;
|
package/dist/colors.d.cts
CHANGED
package/dist/colors.d.ts
CHANGED
package/dist/colors.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./node_modules/.pnpm/colorjs.io@0.5.2/node_modules/colorjs.io/dist/color.js";
|
|
2
2
|
import { getTextColorBasedOnBgColor as u } from "./color-utils.js";
|
|
3
3
|
const d = "#000000", C = {
|
|
4
4
|
whiteAlpha: {
|
|
@@ -61,43 +61,47 @@ const d = "#000000", C = {
|
|
|
61
61
|
200: "#7b7b7b",
|
|
62
62
|
100: "#b4b4b4",
|
|
63
63
|
50: "#eeeeee"
|
|
64
|
+
},
|
|
65
|
+
overlay: {
|
|
66
|
+
light: "rgba(104, 112, 118, 0.5)",
|
|
67
|
+
dark: "rgba(136, 144, 150, 0.5)"
|
|
64
68
|
}
|
|
65
69
|
};
|
|
66
70
|
function o(n) {
|
|
67
71
|
return n.to("srgb").toString({ format: "hex" });
|
|
68
72
|
}
|
|
69
|
-
function g(n,
|
|
70
|
-
const c = n.lch, a =
|
|
71
|
-
return new
|
|
73
|
+
function g(n, r, t) {
|
|
74
|
+
const c = n.lch, a = r.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;
|
|
75
|
+
return new e("lch", [s, b, h]);
|
|
72
76
|
}
|
|
73
77
|
function l(n) {
|
|
74
78
|
return n.to("srgb");
|
|
75
79
|
}
|
|
76
|
-
const w = new
|
|
77
|
-
const
|
|
80
|
+
const w = new e(d), m = (n) => {
|
|
81
|
+
const r = n instanceof e ? n : new e(n), t = r.lch.c < 3 ? r.lch.c : 3, c = r.lch.c < 10 ? r.lch.c : 10, a = r.lch.c < 5 ? r.lch.c : 5;
|
|
78
82
|
return {
|
|
79
|
-
textBold: new
|
|
80
|
-
textSubtle: new
|
|
81
|
-
lighter: new
|
|
82
|
-
light: new
|
|
83
|
-
lightSubtle: new
|
|
84
|
-
medium:
|
|
85
|
-
mediumSubtle: new
|
|
83
|
+
textBold: new e("lch", [10, a, r.lch.h]),
|
|
84
|
+
textSubtle: new e("lch", [30, c, r.lch.h]),
|
|
85
|
+
lighter: new e("lch", [98, r.lch.c * 1.2, r.lch.h * 0.96]),
|
|
86
|
+
light: new e("lch", [89, r.lch.c * 1.2, r.lch.h * 0.96]),
|
|
87
|
+
lightSubtle: new e("lch", [98, t, r.lch.h * 0.98]),
|
|
88
|
+
medium: r,
|
|
89
|
+
mediumSubtle: new e(
|
|
86
90
|
"lch",
|
|
87
|
-
[
|
|
91
|
+
[r.lch.l * 0.5, r.lch.c, r.lch.h],
|
|
88
92
|
0.3
|
|
89
93
|
),
|
|
90
|
-
strong: new
|
|
91
|
-
stronger: new
|
|
94
|
+
strong: new e("lch", [r.lch.l * 0.85, r.lch.c, r.lch.h]),
|
|
95
|
+
stronger: new e("lch", [r.lch.l * 0.5, r.lch.c, r.lch.h])
|
|
92
96
|
};
|
|
93
|
-
}, f = m(w), x = (n,
|
|
97
|
+
}, f = m(w), x = (n, r) => {
|
|
94
98
|
const t = Object.assign(
|
|
95
99
|
{},
|
|
96
|
-
|
|
100
|
+
r ? m(r) : f,
|
|
97
101
|
n
|
|
98
102
|
);
|
|
99
103
|
for (const h of Object.keys(t))
|
|
100
|
-
t[h] instanceof
|
|
104
|
+
t[h] instanceof e || (t[h] = new e(t[h]));
|
|
101
105
|
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
106
|
50: o(l(t.lighter)),
|
|
103
107
|
100: o(l(g(t.lighter, t.light, 0.5))),
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/cxkit-theme",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Inkeep, Inc. Customer License (IICL) v1.1",
|
|
6
6
|
"homepage": "",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"typescript": "5.7.3",
|
|
27
27
|
"vite": "5.4.11",
|
|
28
28
|
"vite-plugin-dts": "4.4.0",
|
|
29
|
-
"@inkeep/cxkit-types": "0.5.
|
|
29
|
+
"@inkeep/cxkit-types": "0.5.1"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"colorjs.io": "0.5.2"
|