@payfit/unity-themes 2.47.5 → 2.47.6
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/esm/components/unity-theme-provider.js +26 -30
- package/dist/esm/index.js +6 -15
- package/dist/esm/utils/cn.js +9 -11
- package/dist/esm/utils/merge-config.js +151 -171
- package/dist/esm/utils/tailwind-merge.js +6 -8
- package/dist/esm/utils/tailwind-variants.js +7 -7
- package/package.json +4 -4
|
@@ -1,34 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
8
|
-
setTheme: () => {
|
|
9
|
-
}
|
|
1
|
+
import { createContext as e, useContext as t, useEffect as n, useState as r } from "react";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/unity-theme-provider.tsx
|
|
4
|
+
var a = e({
|
|
5
|
+
theme: "legacy",
|
|
6
|
+
setTheme: () => {}
|
|
10
7
|
});
|
|
11
|
-
function
|
|
12
|
-
|
|
8
|
+
function o(e) {
|
|
9
|
+
return e === void 0 ? document.documentElement : typeof e == "string" ? document.querySelector(e) : e.current;
|
|
13
10
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
11
|
+
function s({ theme: e = "legacy", target: t, children: s }) {
|
|
12
|
+
let [c, l] = r(e);
|
|
13
|
+
return n(() => {
|
|
14
|
+
let e = o(t);
|
|
15
|
+
if (e) return e.dataset.uyTheme = c, () => {
|
|
16
|
+
delete e.dataset.uyTheme;
|
|
17
|
+
};
|
|
18
|
+
}, [c, t]), /* @__PURE__ */ i(a.Provider, {
|
|
19
|
+
value: {
|
|
20
|
+
theme: c,
|
|
21
|
+
setTheme: l
|
|
22
|
+
},
|
|
23
|
+
children: s
|
|
24
|
+
});
|
|
27
25
|
}
|
|
28
|
-
function
|
|
29
|
-
|
|
26
|
+
function c() {
|
|
27
|
+
return t(a);
|
|
30
28
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
a as useUnityTheme
|
|
34
|
-
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { s as UnityThemeProvider, c as useUnityTheme };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { UnityThemeProvider as
|
|
6
|
-
export {
|
|
7
|
-
c as UnityThemeProvider,
|
|
8
|
-
o as classNames,
|
|
9
|
-
m as clsx,
|
|
10
|
-
t as cn,
|
|
11
|
-
n as twMergeConfig,
|
|
12
|
-
g as useUnityTheme,
|
|
13
|
-
x as uyMerge,
|
|
14
|
-
s as uyTv
|
|
15
|
-
};
|
|
1
|
+
import { twMergeConfig as e } from "./utils/merge-config.js";
|
|
2
|
+
import { classNames as t, clsx as n, cn as r } from "./utils/cn.js";
|
|
3
|
+
import { uyMerge as i } from "./utils/tailwind-merge.js";
|
|
4
|
+
import { uyTv as a } from "./utils/tailwind-variants.js";
|
|
5
|
+
import { UnityThemeProvider as o, useUnityTheme as s } from "./components/unity-theme-provider.js";
|
|
6
|
+
export { o as UnityThemeProvider, t as classNames, n as clsx, r as cn, e as twMergeConfig, s as useUnityTheme, i as uyMerge, a as uyTv };
|
package/dist/esm/utils/cn.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
s as cn
|
|
11
|
-
};
|
|
1
|
+
import { twMergeConfig as e } from "./merge-config.js";
|
|
2
|
+
import { cnMerge as t } from "tailwind-variants";
|
|
3
|
+
//#region src/utils/cn.ts
|
|
4
|
+
var n = (...n) => t(...n)({
|
|
5
|
+
twMerge: !0,
|
|
6
|
+
twMergeConfig: e
|
|
7
|
+
}), r = n, i = n, a = n;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { i as classNames, a as clsx, r as cn };
|
|
@@ -1,172 +1,152 @@
|
|
|
1
|
-
import { validators as
|
|
2
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
rounded: [{ rounded: o }],
|
|
151
|
-
"rounded-s": [{ "rounded-s": o }],
|
|
152
|
-
"rounded-e": [{ "rounded-e": o }],
|
|
153
|
-
"rounded-t": [{ "rounded-t": o }],
|
|
154
|
-
"rounded-r": [{ "rounded-r": o }],
|
|
155
|
-
"rounded-b": [{ "rounded-b": o }],
|
|
156
|
-
"rounded-l": [{ "rounded-l": o }],
|
|
157
|
-
"rounded-ss": [{ "rounded-ss": o }],
|
|
158
|
-
"rounded-se": [{ "rounded-se": o }],
|
|
159
|
-
"rounded-ee": [{ "rounded-ee": o }],
|
|
160
|
-
"rounded-es": [{ "rounded-es": o }],
|
|
161
|
-
"rounded-tl": [{ "rounded-tl": o }],
|
|
162
|
-
"rounded-tr": [{ "rounded-tr": o }],
|
|
163
|
-
"rounded-br": [{ "rounded-br": o }],
|
|
164
|
-
"rounded-bl": [{ "rounded-bl": o }],
|
|
165
|
-
// Shadows
|
|
166
|
-
shadow: [{ shadow: n }]
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
export {
|
|
171
|
-
a as twMergeConfig
|
|
1
|
+
import { validators as e } from "tailwind-merge";
|
|
2
|
+
//#region src/utils/merge-config.ts
|
|
3
|
+
var t = [
|
|
4
|
+
"0",
|
|
5
|
+
"25",
|
|
6
|
+
"50",
|
|
7
|
+
"75",
|
|
8
|
+
"100",
|
|
9
|
+
"125",
|
|
10
|
+
"150",
|
|
11
|
+
"200",
|
|
12
|
+
"250",
|
|
13
|
+
"300",
|
|
14
|
+
"400",
|
|
15
|
+
"500",
|
|
16
|
+
"600",
|
|
17
|
+
"800",
|
|
18
|
+
"1000"
|
|
19
|
+
], n = [
|
|
20
|
+
"display-heading",
|
|
21
|
+
"h1",
|
|
22
|
+
"h2",
|
|
23
|
+
"h3",
|
|
24
|
+
"h4",
|
|
25
|
+
"overline",
|
|
26
|
+
"subtitle",
|
|
27
|
+
"display-title",
|
|
28
|
+
"display-body",
|
|
29
|
+
"body",
|
|
30
|
+
"body-strong",
|
|
31
|
+
"body-small",
|
|
32
|
+
"body-small-strong",
|
|
33
|
+
"body-large",
|
|
34
|
+
"body-large-strong",
|
|
35
|
+
"action",
|
|
36
|
+
"action-small",
|
|
37
|
+
"action-large"
|
|
38
|
+
], r = [
|
|
39
|
+
"50",
|
|
40
|
+
"75",
|
|
41
|
+
"100",
|
|
42
|
+
"200",
|
|
43
|
+
"300",
|
|
44
|
+
"400",
|
|
45
|
+
"500",
|
|
46
|
+
"600",
|
|
47
|
+
"800",
|
|
48
|
+
"1000",
|
|
49
|
+
"1200",
|
|
50
|
+
"1400",
|
|
51
|
+
"1600"
|
|
52
|
+
], i = [
|
|
53
|
+
"0",
|
|
54
|
+
"25",
|
|
55
|
+
"50",
|
|
56
|
+
"75",
|
|
57
|
+
"100",
|
|
58
|
+
"125",
|
|
59
|
+
"150",
|
|
60
|
+
"200",
|
|
61
|
+
"300",
|
|
62
|
+
"400",
|
|
63
|
+
"xs",
|
|
64
|
+
"sm",
|
|
65
|
+
"md",
|
|
66
|
+
"lg",
|
|
67
|
+
"xl",
|
|
68
|
+
"circle",
|
|
69
|
+
"pill"
|
|
70
|
+
], a = [
|
|
71
|
+
"canvas",
|
|
72
|
+
"raising",
|
|
73
|
+
"floating",
|
|
74
|
+
"flying",
|
|
75
|
+
"soaring"
|
|
76
|
+
], o = (e) => !!(/^[a-z]+-l\d+$/.test(e) || /^(?:canvas|surface|content|border|utility)-.+$/.test(e)), s = {
|
|
77
|
+
prefix: "uy",
|
|
78
|
+
extend: { classGroups: {
|
|
79
|
+
"bg-color": [{ bg: [e.isArbitraryValue, o] }],
|
|
80
|
+
"text-color": [{ text: [e.isArbitraryValue, o] }],
|
|
81
|
+
"border-color": [{ border: [e.isArbitraryValue, o] }],
|
|
82
|
+
"outline-color": [{ outline: [e.isArbitraryValue, o] }],
|
|
83
|
+
"ring-color": [{ ring: [e.isArbitraryValue, o] }],
|
|
84
|
+
"ring-offset-color": [{ "ring-offset": [e.isArbitraryValue, o] }],
|
|
85
|
+
"divide-color": [{ divide: [e.isArbitraryValue, o] }],
|
|
86
|
+
"text-decoration-color": [{ decoration: [e.isArbitraryValue, o] }],
|
|
87
|
+
"gradient-color-from": [{ from: [e.isArbitraryValue, o] }],
|
|
88
|
+
"gradient-color-via": [{ via: [e.isArbitraryValue, o] }],
|
|
89
|
+
"gradient-color-to": [{ to: [e.isArbitraryValue, o] }],
|
|
90
|
+
p: [{ p: t }],
|
|
91
|
+
px: [{ px: t }],
|
|
92
|
+
py: [{ py: t }],
|
|
93
|
+
ps: [{ ps: t }],
|
|
94
|
+
pe: [{ pe: t }],
|
|
95
|
+
pt: [{ pt: t }],
|
|
96
|
+
pr: [{ pr: t }],
|
|
97
|
+
pb: [{ pb: t }],
|
|
98
|
+
pl: [{ pl: t }],
|
|
99
|
+
m: [{ m: t }],
|
|
100
|
+
mx: [{ mx: t }],
|
|
101
|
+
my: [{ my: t }],
|
|
102
|
+
ms: [{ ms: t }],
|
|
103
|
+
me: [{ me: t }],
|
|
104
|
+
mt: [{ mt: t }],
|
|
105
|
+
mr: [{ mr: t }],
|
|
106
|
+
mb: [{ mb: t }],
|
|
107
|
+
ml: [{ ml: t }],
|
|
108
|
+
gap: [{ gap: t }],
|
|
109
|
+
"gap-x": [{ "gap-x": t }],
|
|
110
|
+
"gap-y": [{ "gap-y": t }],
|
|
111
|
+
"space-x": [{ "space-x": t }],
|
|
112
|
+
"space-y": [{ "space-y": t }],
|
|
113
|
+
"scroll-p": [{ "scroll-p": t }],
|
|
114
|
+
"scroll-px": [{ "scroll-px": t }],
|
|
115
|
+
"scroll-py": [{ "scroll-py": t }],
|
|
116
|
+
"scroll-ps": [{ "scroll-ps": t }],
|
|
117
|
+
"scroll-pe": [{ "scroll-pe": t }],
|
|
118
|
+
"scroll-pt": [{ "scroll-pt": t }],
|
|
119
|
+
"scroll-pr": [{ "scroll-pr": t }],
|
|
120
|
+
"scroll-pb": [{ "scroll-pb": t }],
|
|
121
|
+
"scroll-pl": [{ "scroll-pl": t }],
|
|
122
|
+
"scroll-m": [{ "scroll-m": t }],
|
|
123
|
+
"scroll-mx": [{ "scroll-mx": t }],
|
|
124
|
+
"scroll-my": [{ "scroll-my": t }],
|
|
125
|
+
"scroll-ms": [{ "scroll-ms": t }],
|
|
126
|
+
"scroll-me": [{ "scroll-me": t }],
|
|
127
|
+
"scroll-mt": [{ "scroll-mt": t }],
|
|
128
|
+
"scroll-mr": [{ "scroll-mr": t }],
|
|
129
|
+
"scroll-mb": [{ "scroll-mb": t }],
|
|
130
|
+
"scroll-ml": [{ "scroll-ml": t }],
|
|
131
|
+
typography: [{ typography: n }],
|
|
132
|
+
"font-size": [{ text: r }],
|
|
133
|
+
rounded: [{ rounded: i }],
|
|
134
|
+
"rounded-s": [{ "rounded-s": i }],
|
|
135
|
+
"rounded-e": [{ "rounded-e": i }],
|
|
136
|
+
"rounded-t": [{ "rounded-t": i }],
|
|
137
|
+
"rounded-r": [{ "rounded-r": i }],
|
|
138
|
+
"rounded-b": [{ "rounded-b": i }],
|
|
139
|
+
"rounded-l": [{ "rounded-l": i }],
|
|
140
|
+
"rounded-ss": [{ "rounded-ss": i }],
|
|
141
|
+
"rounded-se": [{ "rounded-se": i }],
|
|
142
|
+
"rounded-ee": [{ "rounded-ee": i }],
|
|
143
|
+
"rounded-es": [{ "rounded-es": i }],
|
|
144
|
+
"rounded-tl": [{ "rounded-tl": i }],
|
|
145
|
+
"rounded-tr": [{ "rounded-tr": i }],
|
|
146
|
+
"rounded-br": [{ "rounded-br": i }],
|
|
147
|
+
"rounded-bl": [{ "rounded-bl": i }],
|
|
148
|
+
shadow: [{ shadow: a }]
|
|
149
|
+
} }
|
|
172
150
|
};
|
|
151
|
+
//#endregion
|
|
152
|
+
export { s as twMergeConfig };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
f as uyMerge
|
|
8
|
-
};
|
|
1
|
+
import { twMergeConfig as e } from "./merge-config.js";
|
|
2
|
+
import { createTailwindMerge as t, getDefaultConfig as n, mergeConfigs as r } from "tailwind-merge";
|
|
3
|
+
//#region src/utils/tailwind-merge.ts
|
|
4
|
+
var i = t(() => r(n(), e));
|
|
5
|
+
//#endregion
|
|
6
|
+
export { i as uyMerge };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createTV as r } from "tailwind-variants";
|
|
2
1
|
import { twMergeConfig as e } from "./merge-config.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { createTV as t } from "tailwind-variants";
|
|
3
|
+
//#region src/utils/tailwind-variants.ts
|
|
4
|
+
var n = t({
|
|
5
|
+
twMerge: !0,
|
|
6
|
+
twMergeConfig: e
|
|
6
7
|
});
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as uyTv };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-themes",
|
|
3
|
-
"version": "2.47.
|
|
3
|
+
"version": "2.47.6",
|
|
4
4
|
"main": "./dist/esm/index.js",
|
|
5
5
|
"types": "./dist/esm/index.d.ts",
|
|
6
6
|
"style": "./dist/css/unity.css",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@types/react": "18.3.18",
|
|
52
52
|
"@types/react-dom": "18.3.5",
|
|
53
53
|
"@types/tinycolor2": "1.4.6",
|
|
54
|
-
"@vitest/browser": "4.1.
|
|
54
|
+
"@vitest/browser": "4.1.9",
|
|
55
55
|
"msw": "2.14.6",
|
|
56
56
|
"msw-storybook-addon": "2.0.7",
|
|
57
57
|
"playwright": "1.55.1",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"storybook": "10.4.4",
|
|
63
63
|
"tsx": "4.20.5",
|
|
64
64
|
"typescript": "6.0.3",
|
|
65
|
-
"vite": "
|
|
66
|
-
"vitest": "4.1.
|
|
65
|
+
"vite": "8.0.16",
|
|
66
|
+
"vitest": "4.1.9",
|
|
67
67
|
"@payfit/hr-app-eslint": "0.0.0-use.local",
|
|
68
68
|
"@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
|
|
69
69
|
"@payfit/storybook-config": "0.0.0-use.local",
|