@inkeep/cxkit-theme 0.5.112 → 0.5.114
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/index.cjs +1 -1
- package/dist/index.d.cts +48 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +65 -17
- package/dist/utils/create-css-variables.cjs +1 -1
- package/dist/utils/create-css-variables.js +4 -4
- package/dist/utils/generate-theme-variables.cjs +1 -1
- package/dist/utils/generate-theme-variables.js +25 -20
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./colors.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./colors.cjs"),m=require("./utils/create-css-variables.cjs"),r=require("./utils/generate-theme-variables.cjs"),o={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'},l={"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={0:"0px",px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},a={none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},t={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},n={colors:e.colors,fontFamily:o,fontSize:l,spacing:s,borderRadius:a,zIndex:t};exports.DEFAULT_PRIMARY_BRAND_COLOR=e.DEFAULT_PRIMARY_BRAND_COLOR;exports.colors=e.colors;exports.createColorDict=e.createColorDict;exports.createColorScheme=e.createColorScheme;exports.createCSSVariables=m.createCSSVariables;exports.generateThemeVariables=r.generateThemeVariables;exports.themeMappings=r.themeMappings;exports.theme=n;
|
package/dist/index.d.cts
CHANGED
|
@@ -219,6 +219,54 @@ export declare const theme: {
|
|
|
219
219
|
'8xl': string;
|
|
220
220
|
'9xl': string;
|
|
221
221
|
};
|
|
222
|
+
spacing: {
|
|
223
|
+
0: string;
|
|
224
|
+
px: string;
|
|
225
|
+
0.5: string;
|
|
226
|
+
1: string;
|
|
227
|
+
1.5: string;
|
|
228
|
+
2: string;
|
|
229
|
+
2.5: string;
|
|
230
|
+
3: string;
|
|
231
|
+
3.5: string;
|
|
232
|
+
4: string;
|
|
233
|
+
5: string;
|
|
234
|
+
6: string;
|
|
235
|
+
7: string;
|
|
236
|
+
8: string;
|
|
237
|
+
9: string;
|
|
238
|
+
10: string;
|
|
239
|
+
11: string;
|
|
240
|
+
12: string;
|
|
241
|
+
14: string;
|
|
242
|
+
16: string;
|
|
243
|
+
20: string;
|
|
244
|
+
24: string;
|
|
245
|
+
28: string;
|
|
246
|
+
32: string;
|
|
247
|
+
36: string;
|
|
248
|
+
40: string;
|
|
249
|
+
44: string;
|
|
250
|
+
48: string;
|
|
251
|
+
52: string;
|
|
252
|
+
56: string;
|
|
253
|
+
60: string;
|
|
254
|
+
64: string;
|
|
255
|
+
72: string;
|
|
256
|
+
80: string;
|
|
257
|
+
96: string;
|
|
258
|
+
};
|
|
259
|
+
borderRadius: {
|
|
260
|
+
none: string;
|
|
261
|
+
sm: string;
|
|
262
|
+
DEFAULT: string;
|
|
263
|
+
md: string;
|
|
264
|
+
lg: string;
|
|
265
|
+
xl: string;
|
|
266
|
+
'2xl': string;
|
|
267
|
+
'3xl': string;
|
|
268
|
+
full: string;
|
|
269
|
+
};
|
|
222
270
|
zIndex: {
|
|
223
271
|
hide: number;
|
|
224
272
|
auto: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -219,6 +219,54 @@ export declare const theme: {
|
|
|
219
219
|
'8xl': string;
|
|
220
220
|
'9xl': string;
|
|
221
221
|
};
|
|
222
|
+
spacing: {
|
|
223
|
+
0: string;
|
|
224
|
+
px: string;
|
|
225
|
+
0.5: string;
|
|
226
|
+
1: string;
|
|
227
|
+
1.5: string;
|
|
228
|
+
2: string;
|
|
229
|
+
2.5: string;
|
|
230
|
+
3: string;
|
|
231
|
+
3.5: string;
|
|
232
|
+
4: string;
|
|
233
|
+
5: string;
|
|
234
|
+
6: string;
|
|
235
|
+
7: string;
|
|
236
|
+
8: string;
|
|
237
|
+
9: string;
|
|
238
|
+
10: string;
|
|
239
|
+
11: string;
|
|
240
|
+
12: string;
|
|
241
|
+
14: string;
|
|
242
|
+
16: string;
|
|
243
|
+
20: string;
|
|
244
|
+
24: string;
|
|
245
|
+
28: string;
|
|
246
|
+
32: string;
|
|
247
|
+
36: string;
|
|
248
|
+
40: string;
|
|
249
|
+
44: string;
|
|
250
|
+
48: string;
|
|
251
|
+
52: string;
|
|
252
|
+
56: string;
|
|
253
|
+
60: string;
|
|
254
|
+
64: string;
|
|
255
|
+
72: string;
|
|
256
|
+
80: string;
|
|
257
|
+
96: string;
|
|
258
|
+
};
|
|
259
|
+
borderRadius: {
|
|
260
|
+
none: string;
|
|
261
|
+
sm: string;
|
|
262
|
+
DEFAULT: string;
|
|
263
|
+
md: string;
|
|
264
|
+
lg: string;
|
|
265
|
+
xl: string;
|
|
266
|
+
'2xl': string;
|
|
267
|
+
'3xl': string;
|
|
268
|
+
full: string;
|
|
269
|
+
};
|
|
222
270
|
zIndex: {
|
|
223
271
|
hide: number;
|
|
224
272
|
auto: string;
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { colors as e } from "./colors.js";
|
|
2
|
-
import { DEFAULT_PRIMARY_BRAND_COLOR as
|
|
3
|
-
import { createCSSVariables as
|
|
4
|
-
import { generateThemeVariables as
|
|
5
|
-
const
|
|
2
|
+
import { DEFAULT_PRIMARY_BRAND_COLOR as p, createColorDict as x, createColorScheme as c } from "./colors.js";
|
|
3
|
+
import { createCSSVariables as d } from "./utils/create-css-variables.js";
|
|
4
|
+
import { generateThemeVariables as y, themeMappings as I } from "./utils/generate-theme-variables.js";
|
|
5
|
+
const r = {
|
|
6
6
|
heading: 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
7
7
|
body: 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
8
8
|
mono: 'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'
|
|
9
|
-
},
|
|
9
|
+
}, m = {
|
|
10
10
|
"3xs": "0.45rem",
|
|
11
11
|
"2xs": "0.625rem",
|
|
12
12
|
xs: "0.75rem",
|
|
@@ -24,7 +24,53 @@ const o = {
|
|
|
24
24
|
"7xl": "4.5rem",
|
|
25
25
|
"8xl": "6rem",
|
|
26
26
|
"9xl": "8rem"
|
|
27
|
-
},
|
|
27
|
+
}, o = {
|
|
28
|
+
0: "0px",
|
|
29
|
+
px: "1px",
|
|
30
|
+
0.5: "0.125rem",
|
|
31
|
+
1: "0.25rem",
|
|
32
|
+
1.5: "0.375rem",
|
|
33
|
+
2: "0.5rem",
|
|
34
|
+
2.5: "0.625rem",
|
|
35
|
+
3: "0.75rem",
|
|
36
|
+
3.5: "0.875rem",
|
|
37
|
+
4: "1rem",
|
|
38
|
+
5: "1.25rem",
|
|
39
|
+
6: "1.5rem",
|
|
40
|
+
7: "1.75rem",
|
|
41
|
+
8: "2rem",
|
|
42
|
+
9: "2.25rem",
|
|
43
|
+
10: "2.5rem",
|
|
44
|
+
11: "2.75rem",
|
|
45
|
+
12: "3rem",
|
|
46
|
+
14: "3.5rem",
|
|
47
|
+
16: "4rem",
|
|
48
|
+
20: "5rem",
|
|
49
|
+
24: "6rem",
|
|
50
|
+
28: "7rem",
|
|
51
|
+
32: "8rem",
|
|
52
|
+
36: "9rem",
|
|
53
|
+
40: "10rem",
|
|
54
|
+
44: "11rem",
|
|
55
|
+
48: "12rem",
|
|
56
|
+
52: "13rem",
|
|
57
|
+
56: "14rem",
|
|
58
|
+
60: "15rem",
|
|
59
|
+
64: "16rem",
|
|
60
|
+
72: "18rem",
|
|
61
|
+
80: "20rem",
|
|
62
|
+
96: "24rem"
|
|
63
|
+
}, l = {
|
|
64
|
+
none: "0px",
|
|
65
|
+
sm: "0.125rem",
|
|
66
|
+
DEFAULT: "0.25rem",
|
|
67
|
+
md: "0.375rem",
|
|
68
|
+
lg: "0.5rem",
|
|
69
|
+
xl: "0.75rem",
|
|
70
|
+
"2xl": "1rem",
|
|
71
|
+
"3xl": "1.5rem",
|
|
72
|
+
full: "9999px"
|
|
73
|
+
}, t = {
|
|
28
74
|
hide: -1,
|
|
29
75
|
auto: "auto",
|
|
30
76
|
base: 0,
|
|
@@ -39,19 +85,21 @@ const o = {
|
|
|
39
85
|
skipLink: 1600,
|
|
40
86
|
toast: 1700,
|
|
41
87
|
tooltip: 1800
|
|
42
|
-
},
|
|
88
|
+
}, a = {
|
|
43
89
|
colors: e,
|
|
44
|
-
fontFamily:
|
|
45
|
-
fontSize:
|
|
46
|
-
|
|
90
|
+
fontFamily: r,
|
|
91
|
+
fontSize: m,
|
|
92
|
+
spacing: o,
|
|
93
|
+
borderRadius: l,
|
|
94
|
+
zIndex: t
|
|
47
95
|
};
|
|
48
96
|
export {
|
|
49
|
-
|
|
97
|
+
p as DEFAULT_PRIMARY_BRAND_COLOR,
|
|
50
98
|
e as colors,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
99
|
+
d as createCSSVariables,
|
|
100
|
+
x as createColorDict,
|
|
101
|
+
c as createColorScheme,
|
|
102
|
+
y as generateThemeVariables,
|
|
103
|
+
a as theme,
|
|
104
|
+
I as themeMappings
|
|
57
105
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./generate-theme-variables.cjs"),y="ikp";function S(s){const t={};for(const[r,a]of Object.entries(s)){const n=g.themeMappings[r]||r,o=(i,l=[])=>{for(const[u,e]of Object.entries(i)){const c=[...l,u];if(typeof e=="object"&&e!==null)o(e,c);else{const b=c.map(p=>p.replace(/([A-Z])/g,"-$1").replace(/\./g,"_").toLowerCase()).join("-"),f=`--${y}-${n}-${b}`;t[f]=e}}};o(a)}return t}exports.createCSSVariables=S;
|
|
@@ -3,13 +3,13 @@ const g = "ikp";
|
|
|
3
3
|
function j(s) {
|
|
4
4
|
const t = {};
|
|
5
5
|
for (const [o, n] of Object.entries(s)) {
|
|
6
|
-
const a = b[o] || o, r = (i,
|
|
7
|
-
for (const [
|
|
8
|
-
const c = [...
|
|
6
|
+
const a = b[o] || o, r = (i, p = []) => {
|
|
7
|
+
for (const [f, e] of Object.entries(i)) {
|
|
8
|
+
const c = [...p, f];
|
|
9
9
|
if (typeof e == "object" && e !== null)
|
|
10
10
|
r(e, c);
|
|
11
11
|
else {
|
|
12
|
-
const l = c.map((y) => y.replace(/([A-Z])/g, "-$1").toLowerCase()).join("-"), u = `--${g}-${a}-${l}`;
|
|
12
|
+
const l = c.map((y) => y.replace(/([A-Z])/g, "-$1").replace(/\./g, "_").toLowerCase()).join("-"), u = `--${g}-${a}-${l}`;
|
|
13
13
|
t[u] = e;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p="ikp",
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p="ikp",l={colors:"color",fontFamily:"font-family",fontSize:"font-size",spacing:"spacing",borderRadius:"border-radius",zIndex:"z-index"};function y(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function i(e){return e.replace(/([A-Z])/g,"-$1").replace(/\./g,"_").toLowerCase()}function b(e){const n={};for(const[r,u]of Object.entries(e)){const f=i(l[r]||r),s=(o,a=[])=>{if(typeof o!="object"||o===null){const t=a.map(i).join("-");return`var(--${p}-${f}-${t})`}const c={};for(const[t,g]of Object.entries(o))c[y(t)]=s(g,[...a,t]);return c};n[r]=s(u)}return n}exports.generateThemeVariables=b;exports.themeMappings=l;
|
|
@@ -1,33 +1,38 @@
|
|
|
1
|
-
const p = "ikp",
|
|
1
|
+
const p = "ikp", g = {
|
|
2
2
|
colors: "color",
|
|
3
3
|
fontFamily: "font-family",
|
|
4
4
|
fontSize: "font-size",
|
|
5
|
+
spacing: "spacing",
|
|
6
|
+
borderRadius: "border-radius",
|
|
5
7
|
zIndex: "z-index"
|
|
6
8
|
};
|
|
7
|
-
function
|
|
8
|
-
return
|
|
9
|
+
function y(e) {
|
|
10
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
9
11
|
}
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
function i(e) {
|
|
13
|
+
return e.replace(/([A-Z])/g, "-$1").replace(/\./g, "_").toLowerCase();
|
|
14
|
+
}
|
|
15
|
+
function d(e) {
|
|
16
|
+
const n = {};
|
|
17
|
+
for (const [r, f] of Object.entries(e)) {
|
|
18
|
+
const u = i(g[r] || r), s = (t, c = []) => {
|
|
19
|
+
if (typeof t != "object" || t === null) {
|
|
20
|
+
const o = c.map(i).join("-");
|
|
21
|
+
return `var(--${p}-${u}-${o})`;
|
|
17
22
|
}
|
|
18
|
-
const
|
|
19
|
-
for (const [
|
|
20
|
-
|
|
21
|
-
...
|
|
22
|
-
|
|
23
|
+
const a = {};
|
|
24
|
+
for (const [o, l] of Object.entries(t))
|
|
25
|
+
a[y(o)] = s(l, [
|
|
26
|
+
...c,
|
|
27
|
+
o
|
|
23
28
|
]);
|
|
24
|
-
return
|
|
29
|
+
return a;
|
|
25
30
|
};
|
|
26
|
-
|
|
31
|
+
n[r] = s(f);
|
|
27
32
|
}
|
|
28
|
-
return
|
|
33
|
+
return n;
|
|
29
34
|
}
|
|
30
35
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
d as generateThemeVariables,
|
|
37
|
+
g as themeMappings
|
|
33
38
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/cxkit-theme",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.114",
|
|
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.114"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"colorjs.io": "0.5.2"
|