@kvell-group/ui 1.9.0 → 1.9.2
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/README.md +0 -0
- package/dist/components/Button/Button.js +9 -555
- package/dist/components/CardInput/CardInput.js +1675 -2376
- package/dist/components/MainProvider/MantineProvider.js +9 -425
- package/dist/components/Text/Text.js +7 -82
- package/dist/components/theme.js +3 -5
- package/dist/main.js +13 -50
- package/package.json +10 -12
- package/dist/MantineThemeProvider-kHsOfZUW.js +0 -705
- package/dist/UnstyledButton-D2QHft3M.js +0 -44
- package/dist/polymorphic-factory-Bvt8Is5k.js +0 -770
- package/dist/use-isomorphic-effect-TT0F1lfC.js +0 -5
|
@@ -1,431 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function X(r) {
|
|
10
|
-
const o = Q(r);
|
|
11
|
-
return typeof o == "number" ? o : typeof o == "string" ? o.includes("calc") || o.includes("var") ? o : o.includes("px") ? Number(o.replace("px", "")) : o.includes("rem") ? Number(o.replace("rem", "")) * 16 : o.includes("em") ? Number(o.replace("em", "")) * 16 : Number(o) : NaN;
|
|
12
|
-
}
|
|
13
|
-
function x(r) {
|
|
14
|
-
return r === "auto" || r === "dark" || r === "light";
|
|
15
|
-
}
|
|
16
|
-
function Y({
|
|
17
|
-
key: r = "mantine-color-scheme-value"
|
|
18
|
-
} = {}) {
|
|
19
|
-
let o;
|
|
20
|
-
return {
|
|
21
|
-
get: (a) => {
|
|
22
|
-
if (typeof window > "u")
|
|
23
|
-
return a;
|
|
24
|
-
try {
|
|
25
|
-
const n = window.localStorage.getItem(r);
|
|
26
|
-
return x(n) ? n : a;
|
|
27
|
-
} catch {
|
|
28
|
-
return a;
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
set: (a) => {
|
|
32
|
-
try {
|
|
33
|
-
window.localStorage.setItem(r, a);
|
|
34
|
-
} catch (n) {
|
|
35
|
-
console.warn(
|
|
36
|
-
"[@mantine/core] Local storage color scheme manager was unable to save color scheme.",
|
|
37
|
-
n
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
subscribe: (a) => {
|
|
42
|
-
o = (n) => {
|
|
43
|
-
n.storageArea === window.localStorage && n.key === r && x(n.newValue) && a(n.newValue);
|
|
44
|
-
}, window.addEventListener("storage", o);
|
|
45
|
-
},
|
|
46
|
-
unsubscribe: () => {
|
|
47
|
-
window.removeEventListener("storage", o);
|
|
48
|
-
},
|
|
49
|
-
clear: () => {
|
|
50
|
-
window.localStorage.removeItem(r);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
function Z() {
|
|
55
|
-
const r = E(), o = j(), a = d(r.breakpoints).reduce((n, t) => {
|
|
56
|
-
const i = r.breakpoints[t].includes("px"), e = X(r.breakpoints[t]), l = i ? `${e - 0.1}px` : k(e - 0.1), c = i ? `${e}px` : k(e);
|
|
57
|
-
return `${n}@media (max-width: ${l}) {.mantine-visible-from-${t} {display: none !important;}}@media (min-width: ${c}) {.mantine-hidden-from-${t} {display: none !important;}}`;
|
|
58
|
-
}, "");
|
|
59
|
-
return /* @__PURE__ */ v(
|
|
60
|
-
"style",
|
|
61
|
-
{
|
|
62
|
-
"data-mantine-styles": "classes",
|
|
63
|
-
nonce: o == null ? void 0 : o(),
|
|
64
|
-
dangerouslySetInnerHTML: { __html: a }
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
function w(r) {
|
|
69
|
-
return Object.entries(r).map(([o, a]) => `${o}: ${a};`).join("");
|
|
70
|
-
}
|
|
71
|
-
function h(r, o) {
|
|
72
|
-
return (Array.isArray(r) ? r : [r]).reduce((n, t) => `${t}{${n}}`, o);
|
|
73
|
-
}
|
|
74
|
-
function rr(r, o) {
|
|
75
|
-
const a = w(r.variables), n = a ? h(o, a) : "", t = w(r.dark), i = w(r.light), e = t ? h(o === ":host" ? `${o}([data-mantine-color-scheme="dark"])` : `${o}[data-mantine-color-scheme="dark"]`, t) : "", l = i ? h(o === ":host" ? `${o}([data-mantine-color-scheme="light"])` : `${o}[data-mantine-color-scheme="light"]`, i) : "";
|
|
76
|
-
return `${n}${e}${l}`;
|
|
77
|
-
}
|
|
78
|
-
function or({ color: r, theme: o, autoContrast: a }) {
|
|
79
|
-
return o.autoContrast && z({ color: r || o.primaryColor, theme: o }).isLight ? "var(--mantine-color-black)" : "var(--mantine-color-white)";
|
|
80
|
-
}
|
|
81
|
-
function V(r, o) {
|
|
82
|
-
return or({
|
|
83
|
-
color: r.colors[r.primaryColor][p(r, o)],
|
|
84
|
-
theme: r,
|
|
85
|
-
autoContrast: null
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
function b({
|
|
89
|
-
theme: r,
|
|
90
|
-
color: o,
|
|
91
|
-
colorScheme: a,
|
|
92
|
-
name: n = o,
|
|
93
|
-
withColorValues: t = !0
|
|
94
|
-
}) {
|
|
95
|
-
if (!r.colors[o])
|
|
96
|
-
return {};
|
|
97
|
-
if (a === "light") {
|
|
98
|
-
const l = p(r, "light"), c = {
|
|
99
|
-
[`--mantine-color-${n}-text`]: `var(--mantine-color-${n}-filled)`,
|
|
100
|
-
[`--mantine-color-${n}-filled`]: `var(--mantine-color-${n}-${l})`,
|
|
101
|
-
[`--mantine-color-${n}-filled-hover`]: `var(--mantine-color-${n}-${l === 9 ? 8 : l + 1})`,
|
|
102
|
-
[`--mantine-color-${n}-light`]: f(r.colors[o][l], 0.1),
|
|
103
|
-
[`--mantine-color-${n}-light-hover`]: f(r.colors[o][l], 0.12),
|
|
104
|
-
[`--mantine-color-${n}-light-color`]: `var(--mantine-color-${n}-${l})`,
|
|
105
|
-
[`--mantine-color-${n}-outline`]: `var(--mantine-color-${n}-${l})`,
|
|
106
|
-
[`--mantine-color-${n}-outline-hover`]: f(r.colors[o][l], 0.05)
|
|
107
|
-
};
|
|
108
|
-
return t ? {
|
|
109
|
-
[`--mantine-color-${n}-0`]: r.colors[o][0],
|
|
110
|
-
[`--mantine-color-${n}-1`]: r.colors[o][1],
|
|
111
|
-
[`--mantine-color-${n}-2`]: r.colors[o][2],
|
|
112
|
-
[`--mantine-color-${n}-3`]: r.colors[o][3],
|
|
113
|
-
[`--mantine-color-${n}-4`]: r.colors[o][4],
|
|
114
|
-
[`--mantine-color-${n}-5`]: r.colors[o][5],
|
|
115
|
-
[`--mantine-color-${n}-6`]: r.colors[o][6],
|
|
116
|
-
[`--mantine-color-${n}-7`]: r.colors[o][7],
|
|
117
|
-
[`--mantine-color-${n}-8`]: r.colors[o][8],
|
|
118
|
-
[`--mantine-color-${n}-9`]: r.colors[o][9],
|
|
119
|
-
...c
|
|
120
|
-
} : c;
|
|
121
|
-
}
|
|
122
|
-
const i = p(r, "dark"), e = {
|
|
123
|
-
[`--mantine-color-${n}-text`]: `var(--mantine-color-${n}-4)`,
|
|
124
|
-
[`--mantine-color-${n}-filled`]: `var(--mantine-color-${n}-${i})`,
|
|
125
|
-
[`--mantine-color-${n}-filled-hover`]: `var(--mantine-color-${n}-${i === 9 ? 8 : i + 1})`,
|
|
126
|
-
[`--mantine-color-${n}-light`]: f(
|
|
127
|
-
r.colors[o][Math.max(0, i - 2)],
|
|
128
|
-
0.15
|
|
129
|
-
),
|
|
130
|
-
[`--mantine-color-${n}-light-hover`]: f(
|
|
131
|
-
r.colors[o][Math.max(0, i - 2)],
|
|
132
|
-
0.2
|
|
133
|
-
),
|
|
134
|
-
[`--mantine-color-${n}-light-color`]: `var(--mantine-color-${n}-${Math.max(i - 5, 0)})`,
|
|
135
|
-
[`--mantine-color-${n}-outline`]: `var(--mantine-color-${n}-${Math.max(i - 4, 0)})`,
|
|
136
|
-
[`--mantine-color-${n}-outline-hover`]: f(
|
|
137
|
-
r.colors[o][Math.max(i - 4, 0)],
|
|
138
|
-
0.05
|
|
139
|
-
)
|
|
140
|
-
};
|
|
141
|
-
return t ? {
|
|
142
|
-
[`--mantine-color-${n}-0`]: r.colors[o][0],
|
|
143
|
-
[`--mantine-color-${n}-1`]: r.colors[o][1],
|
|
144
|
-
[`--mantine-color-${n}-2`]: r.colors[o][2],
|
|
145
|
-
[`--mantine-color-${n}-3`]: r.colors[o][3],
|
|
146
|
-
[`--mantine-color-${n}-4`]: r.colors[o][4],
|
|
147
|
-
[`--mantine-color-${n}-5`]: r.colors[o][5],
|
|
148
|
-
[`--mantine-color-${n}-6`]: r.colors[o][6],
|
|
149
|
-
[`--mantine-color-${n}-7`]: r.colors[o][7],
|
|
150
|
-
[`--mantine-color-${n}-8`]: r.colors[o][8],
|
|
151
|
-
[`--mantine-color-${n}-9`]: r.colors[o][9],
|
|
152
|
-
...e
|
|
153
|
-
} : e;
|
|
154
|
-
}
|
|
155
|
-
function nr(r) {
|
|
156
|
-
return !!r && typeof r == "object" && "mantine-virtual-color" in r;
|
|
157
|
-
}
|
|
158
|
-
function $(r, o, a) {
|
|
159
|
-
d(o).forEach(
|
|
160
|
-
(n) => Object.assign(r, { [`--mantine-${a}-${n}`]: o[n] })
|
|
161
|
-
);
|
|
162
|
-
}
|
|
163
|
-
const N = (r) => {
|
|
164
|
-
const o = p(r, "light"), a = r.defaultRadius in r.radius ? r.radius[r.defaultRadius] : D(r.defaultRadius), n = {
|
|
165
|
-
variables: {
|
|
166
|
-
"--mantine-scale": r.scale.toString(),
|
|
167
|
-
"--mantine-cursor-type": r.cursorType,
|
|
168
|
-
"--mantine-color-scheme": "light dark",
|
|
169
|
-
"--mantine-webkit-font-smoothing": r.fontSmoothing ? "antialiased" : "unset",
|
|
170
|
-
"--mantine-moz-font-smoothing": r.fontSmoothing ? "grayscale" : "unset",
|
|
171
|
-
"--mantine-color-white": r.white,
|
|
172
|
-
"--mantine-color-black": r.black,
|
|
173
|
-
"--mantine-line-height": r.lineHeights.md,
|
|
174
|
-
"--mantine-font-family": r.fontFamily,
|
|
175
|
-
"--mantine-font-family-monospace": r.fontFamilyMonospace,
|
|
176
|
-
"--mantine-font-family-headings": r.headings.fontFamily,
|
|
177
|
-
"--mantine-heading-font-weight": r.headings.fontWeight,
|
|
178
|
-
"--mantine-heading-text-wrap": r.headings.textWrap,
|
|
179
|
-
"--mantine-radius-default": a,
|
|
180
|
-
// Primary colors
|
|
181
|
-
"--mantine-primary-color-filled": `var(--mantine-color-${r.primaryColor}-filled)`,
|
|
182
|
-
"--mantine-primary-color-filled-hover": `var(--mantine-color-${r.primaryColor}-filled-hover)`,
|
|
183
|
-
"--mantine-primary-color-light": `var(--mantine-color-${r.primaryColor}-light)`,
|
|
184
|
-
"--mantine-primary-color-light-hover": `var(--mantine-color-${r.primaryColor}-light-hover)`,
|
|
185
|
-
"--mantine-primary-color-light-color": `var(--mantine-color-${r.primaryColor}-light-color)`
|
|
186
|
-
},
|
|
187
|
-
light: {
|
|
188
|
-
"--mantine-primary-color-contrast": V(r, "light"),
|
|
189
|
-
"--mantine-color-bright": "var(--mantine-color-black)",
|
|
190
|
-
"--mantine-color-text": r.black,
|
|
191
|
-
"--mantine-color-body": r.white,
|
|
192
|
-
"--mantine-color-error": "var(--mantine-color-red-6)",
|
|
193
|
-
"--mantine-color-placeholder": "var(--mantine-color-gray-5)",
|
|
194
|
-
"--mantine-color-anchor": `var(--mantine-color-${r.primaryColor}-${o})`,
|
|
195
|
-
"--mantine-color-default": "var(--mantine-color-white)",
|
|
196
|
-
"--mantine-color-default-hover": "var(--mantine-color-gray-0)",
|
|
197
|
-
"--mantine-color-default-color": "var(--mantine-color-black)",
|
|
198
|
-
"--mantine-color-default-border": "var(--mantine-color-gray-4)",
|
|
199
|
-
"--mantine-color-dimmed": "var(--mantine-color-gray-6)"
|
|
200
|
-
},
|
|
201
|
-
dark: {
|
|
202
|
-
"--mantine-primary-color-contrast": V(r, "dark"),
|
|
203
|
-
"--mantine-color-bright": "var(--mantine-color-white)",
|
|
204
|
-
"--mantine-color-text": "var(--mantine-color-dark-0)",
|
|
205
|
-
"--mantine-color-body": "var(--mantine-color-dark-7)",
|
|
206
|
-
"--mantine-color-error": "var(--mantine-color-red-8)",
|
|
207
|
-
"--mantine-color-placeholder": "var(--mantine-color-dark-3)",
|
|
208
|
-
"--mantine-color-anchor": `var(--mantine-color-${r.primaryColor}-4)`,
|
|
209
|
-
"--mantine-color-default": "var(--mantine-color-dark-6)",
|
|
210
|
-
"--mantine-color-default-hover": "var(--mantine-color-dark-5)",
|
|
211
|
-
"--mantine-color-default-color": "var(--mantine-color-white)",
|
|
212
|
-
"--mantine-color-default-border": "var(--mantine-color-dark-4)",
|
|
213
|
-
"--mantine-color-dimmed": "var(--mantine-color-dark-2)"
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
$(n.variables, r.breakpoints, "breakpoint"), $(n.variables, r.spacing, "spacing"), $(n.variables, r.fontSizes, "font-size"), $(n.variables, r.lineHeights, "line-height"), $(n.variables, r.shadows, "shadow"), $(n.variables, r.radius, "radius"), r.colors[r.primaryColor].forEach((i, e) => {
|
|
217
|
-
n.variables[`--mantine-primary-color-${e}`] = `var(--mantine-color-${r.primaryColor}-${e})`;
|
|
218
|
-
}), d(r.colors).forEach((i) => {
|
|
219
|
-
const e = r.colors[i];
|
|
220
|
-
if (nr(e)) {
|
|
221
|
-
Object.assign(
|
|
222
|
-
n.light,
|
|
223
|
-
b({
|
|
224
|
-
theme: r,
|
|
225
|
-
name: e.name,
|
|
226
|
-
color: e.light,
|
|
227
|
-
colorScheme: "light",
|
|
228
|
-
withColorValues: !0
|
|
229
|
-
})
|
|
230
|
-
), Object.assign(
|
|
231
|
-
n.dark,
|
|
232
|
-
b({
|
|
233
|
-
theme: r,
|
|
234
|
-
name: e.name,
|
|
235
|
-
color: e.dark,
|
|
236
|
-
colorScheme: "dark",
|
|
237
|
-
withColorValues: !0
|
|
238
|
-
})
|
|
239
|
-
);
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
e.forEach((l, c) => {
|
|
243
|
-
n.variables[`--mantine-color-${i}-${c}`] = l;
|
|
244
|
-
}), Object.assign(
|
|
245
|
-
n.light,
|
|
246
|
-
b({
|
|
247
|
-
theme: r,
|
|
248
|
-
color: i,
|
|
249
|
-
colorScheme: "light",
|
|
250
|
-
withColorValues: !1
|
|
251
|
-
})
|
|
252
|
-
), Object.assign(
|
|
253
|
-
n.dark,
|
|
254
|
-
b({
|
|
255
|
-
theme: r,
|
|
256
|
-
color: i,
|
|
257
|
-
colorScheme: "dark",
|
|
258
|
-
withColorValues: !1
|
|
259
|
-
})
|
|
260
|
-
);
|
|
261
|
-
});
|
|
262
|
-
const t = r.headings.sizes;
|
|
263
|
-
return d(t).forEach((i) => {
|
|
264
|
-
n.variables[`--mantine-${i}-font-size`] = t[i].fontSize, n.variables[`--mantine-${i}-line-height`] = t[i].lineHeight, n.variables[`--mantine-${i}-font-weight`] = t[i].fontWeight || r.headings.fontWeight;
|
|
265
|
-
}), n;
|
|
266
|
-
};
|
|
267
|
-
function ar({ theme: r, generator: o }) {
|
|
268
|
-
const a = N(r), n = o == null ? void 0 : o(r);
|
|
269
|
-
return n ? R(a, n) : a;
|
|
270
|
-
}
|
|
271
|
-
const C = N(B);
|
|
272
|
-
function ir(r) {
|
|
273
|
-
const o = {
|
|
274
|
-
variables: {},
|
|
275
|
-
light: {},
|
|
276
|
-
dark: {}
|
|
277
|
-
};
|
|
278
|
-
return d(r.variables).forEach((a) => {
|
|
279
|
-
C.variables[a] !== r.variables[a] && (o.variables[a] = r.variables[a]);
|
|
280
|
-
}), d(r.light).forEach((a) => {
|
|
281
|
-
C.light[a] !== r.light[a] && (o.light[a] = r.light[a]);
|
|
282
|
-
}), d(r.dark).forEach((a) => {
|
|
283
|
-
C.dark[a] !== r.dark[a] && (o.dark[a] = r.dark[a]);
|
|
284
|
-
}), o;
|
|
285
|
-
}
|
|
286
|
-
function tr(r) {
|
|
287
|
-
return `
|
|
288
|
-
${r}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; }
|
|
289
|
-
${r}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; }
|
|
290
|
-
`;
|
|
291
|
-
}
|
|
292
|
-
function P({
|
|
293
|
-
cssVariablesSelector: r,
|
|
294
|
-
deduplicateCssVariables: o
|
|
295
|
-
}) {
|
|
296
|
-
const a = E(), n = j(), t = G(), i = ar({ theme: a, generator: t }), e = r === ":root" && o, l = e ? ir(i) : i, c = rr(l, r);
|
|
297
|
-
return c ? /* @__PURE__ */ v(
|
|
298
|
-
"style",
|
|
299
|
-
{
|
|
300
|
-
"data-mantine-styles": !0,
|
|
301
|
-
nonce: n == null ? void 0 : n(),
|
|
302
|
-
dangerouslySetInnerHTML: {
|
|
303
|
-
__html: `${c}${e ? "" : tr(r)}`
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
) : null;
|
|
307
|
-
}
|
|
308
|
-
P.displayName = "@mantine/CssVariables";
|
|
309
|
-
function er() {
|
|
310
|
-
const r = console.error;
|
|
311
|
-
console.error = (...o) => {
|
|
312
|
-
o.length > 1 && typeof o[0] == "string" && o[0].toLowerCase().includes("extra attributes from the server") && typeof o[1] == "string" && o[1].toLowerCase().includes("data-mantine-color-scheme") || r(...o);
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
function g(r, o) {
|
|
316
|
-
var t, i;
|
|
317
|
-
const a = typeof window < "u" && "matchMedia" in window && ((t = window.matchMedia("(prefers-color-scheme: dark)")) == null ? void 0 : t.matches), n = r !== "auto" ? r : a ? "dark" : "light";
|
|
318
|
-
(i = o()) == null || i.setAttribute("data-mantine-color-scheme", n);
|
|
319
|
-
}
|
|
320
|
-
function lr({
|
|
321
|
-
manager: r,
|
|
322
|
-
defaultColorScheme: o,
|
|
323
|
-
getRootElement: a,
|
|
324
|
-
forceColorScheme: n
|
|
325
|
-
}) {
|
|
326
|
-
const t = J(null), [i, e] = K(() => r.get(o)), l = n || i, c = M(
|
|
327
|
-
(s) => {
|
|
328
|
-
n || (g(s, a), e(s), r.set(s));
|
|
329
|
-
},
|
|
330
|
-
[r.set, l, n]
|
|
331
|
-
), y = M(() => {
|
|
332
|
-
e(o), g(o, a), r.clear();
|
|
333
|
-
}, [r.clear, o]);
|
|
334
|
-
return S(() => (r.subscribe(c), r.unsubscribe), [r.subscribe, r.unsubscribe]), L(() => {
|
|
335
|
-
g(r.get(o), a);
|
|
336
|
-
}, []), S(() => {
|
|
337
|
-
var u;
|
|
338
|
-
if (n)
|
|
339
|
-
return g(n, a), () => {
|
|
340
|
-
};
|
|
341
|
-
n === void 0 && g(i, a), typeof window < "u" && "matchMedia" in window && (t.current = window.matchMedia("(prefers-color-scheme: dark)"));
|
|
342
|
-
const s = (m) => {
|
|
343
|
-
i === "auto" && g(m.matches ? "dark" : "light", a);
|
|
344
|
-
};
|
|
345
|
-
return (u = t.current) == null || u.addEventListener("change", s), () => {
|
|
346
|
-
var m;
|
|
347
|
-
return (m = t.current) == null ? void 0 : m.removeEventListener("change", s);
|
|
348
|
-
};
|
|
349
|
-
}, [i, n]), { colorScheme: l, setColorScheme: c, clearColorScheme: y };
|
|
350
|
-
}
|
|
351
|
-
function cr({
|
|
352
|
-
respectReducedMotion: r,
|
|
353
|
-
getRootElement: o
|
|
354
|
-
}) {
|
|
355
|
-
L(() => {
|
|
356
|
-
var a;
|
|
357
|
-
r && ((a = o()) == null || a.setAttribute("data-respect-reduced-motion", "true"));
|
|
358
|
-
}, [r]);
|
|
359
|
-
}
|
|
360
|
-
er();
|
|
361
|
-
function T({
|
|
362
|
-
theme: r,
|
|
363
|
-
children: o,
|
|
364
|
-
getStyleNonce: a,
|
|
365
|
-
withStaticClasses: n = !0,
|
|
366
|
-
withGlobalClasses: t = !0,
|
|
367
|
-
deduplicateCssVariables: i = !0,
|
|
368
|
-
withCssVariables: e = !0,
|
|
369
|
-
cssVariablesSelector: l = ":root",
|
|
370
|
-
classNamesPrefix: c = "mantine",
|
|
371
|
-
colorSchemeManager: y = Y(),
|
|
372
|
-
defaultColorScheme: s = "light",
|
|
373
|
-
getRootElement: u = () => document.documentElement,
|
|
374
|
-
cssVariablesResolver: m,
|
|
375
|
-
forceColorScheme: _,
|
|
376
|
-
stylesTransform: W,
|
|
377
|
-
env: A
|
|
378
|
-
}) {
|
|
379
|
-
const { colorScheme: O, setColorScheme: F, clearColorScheme: H } = lr({
|
|
380
|
-
defaultColorScheme: s,
|
|
381
|
-
forceColorScheme: _,
|
|
382
|
-
manager: y,
|
|
383
|
-
getRootElement: u
|
|
384
|
-
});
|
|
385
|
-
return cr({
|
|
386
|
-
respectReducedMotion: (r == null ? void 0 : r.respectReducedMotion) || !1,
|
|
387
|
-
getRootElement: u
|
|
388
|
-
}), /* @__PURE__ */ v(
|
|
389
|
-
U.Provider,
|
|
390
|
-
{
|
|
391
|
-
value: {
|
|
392
|
-
colorScheme: O,
|
|
393
|
-
setColorScheme: F,
|
|
394
|
-
clearColorScheme: H,
|
|
395
|
-
getRootElement: u,
|
|
396
|
-
classNamesPrefix: c,
|
|
397
|
-
getStyleNonce: a,
|
|
398
|
-
cssVariablesResolver: m,
|
|
399
|
-
cssVariablesSelector: l,
|
|
400
|
-
withStaticClasses: n,
|
|
401
|
-
stylesTransform: W,
|
|
402
|
-
env: A
|
|
403
|
-
},
|
|
404
|
-
children: /* @__PURE__ */ I(q, { theme: r, children: [
|
|
405
|
-
e && /* @__PURE__ */ v(
|
|
406
|
-
P,
|
|
407
|
-
{
|
|
408
|
-
cssVariablesSelector: l,
|
|
409
|
-
deduplicateCssVariables: i
|
|
410
|
-
}
|
|
411
|
-
),
|
|
412
|
-
t && /* @__PURE__ */ v(Z, {}),
|
|
413
|
-
o
|
|
414
|
-
] })
|
|
415
|
-
}
|
|
416
|
-
);
|
|
417
|
-
}
|
|
418
|
-
T.displayName = "@mantine/core/MantineProvider";
|
|
419
|
-
function fr({ children: r, theme: o, ...a }) {
|
|
420
|
-
return /* @__PURE__ */ v(
|
|
421
|
-
T,
|
|
422
|
-
{
|
|
423
|
-
theme: o,
|
|
424
|
-
...a,
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { MantineProvider as e } from "@mantine/core";
|
|
3
|
+
function m({ children: r, theme: i, ...n }) {
|
|
4
|
+
return /* @__PURE__ */ o(
|
|
5
|
+
e,
|
|
6
|
+
{
|
|
7
|
+
theme: i,
|
|
8
|
+
...n,
|
|
425
9
|
children: r
|
|
426
10
|
}
|
|
427
11
|
);
|
|
428
12
|
}
|
|
429
13
|
export {
|
|
430
|
-
|
|
14
|
+
m as MantineProvider
|
|
431
15
|
};
|
|
@@ -1,88 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var c = { root: "m_b6d8b162" };
|
|
7
|
-
function H(t) {
|
|
8
|
-
if (t === "start")
|
|
9
|
-
return "start";
|
|
10
|
-
if (t === "end" || t)
|
|
11
|
-
return "end";
|
|
12
|
-
}
|
|
13
|
-
const L = {
|
|
14
|
-
inherit: !1
|
|
15
|
-
}, V = P(
|
|
16
|
-
(t, { variant: r, lineClamp: e, gradient: o, size: s, color: a }) => ({
|
|
17
|
-
root: {
|
|
18
|
-
"--text-fz": j(s),
|
|
19
|
-
"--text-lh": R(s),
|
|
20
|
-
"--text-gradient": r === "gradient" ? G(o, t) : void 0,
|
|
21
|
-
"--text-line-clamp": typeof e == "number" ? e.toString() : void 0,
|
|
22
|
-
"--text-color": a ? C(a, t) : void 0
|
|
23
|
-
}
|
|
24
|
-
})
|
|
25
|
-
), n = _((t, r) => {
|
|
26
|
-
const e = z("Text", L, t), {
|
|
27
|
-
lineClamp: o,
|
|
28
|
-
truncate: s,
|
|
29
|
-
inline: a,
|
|
30
|
-
inherit: l,
|
|
31
|
-
gradient: $,
|
|
32
|
-
span: m,
|
|
33
|
-
__staticSelector: d,
|
|
34
|
-
vars: p,
|
|
35
|
-
className: u,
|
|
36
|
-
style: x,
|
|
37
|
-
classNames: f,
|
|
38
|
-
styles: g,
|
|
39
|
-
unstyled: v,
|
|
40
|
-
variant: y,
|
|
41
|
-
mod: T,
|
|
42
|
-
size: h,
|
|
43
|
-
...b
|
|
44
|
-
} = e, N = B({
|
|
45
|
-
name: ["Text", d],
|
|
46
|
-
props: e,
|
|
47
|
-
classes: c,
|
|
48
|
-
className: u,
|
|
49
|
-
style: x,
|
|
50
|
-
classNames: f,
|
|
51
|
-
styles: g,
|
|
52
|
-
unstyled: v,
|
|
53
|
-
vars: p,
|
|
54
|
-
varsResolver: V
|
|
55
|
-
});
|
|
56
|
-
return /* @__PURE__ */ i(
|
|
57
|
-
F,
|
|
58
|
-
{
|
|
59
|
-
...N("root", { focusable: !0 }),
|
|
60
|
-
ref: r,
|
|
61
|
-
component: m ? "span" : "p",
|
|
62
|
-
variant: y,
|
|
63
|
-
mod: [
|
|
64
|
-
{
|
|
65
|
-
"data-truncate": H(s),
|
|
66
|
-
"data-line-clamp": typeof o == "number",
|
|
67
|
-
"data-inline": a,
|
|
68
|
-
"data-inherit": l
|
|
69
|
-
},
|
|
70
|
-
T
|
|
71
|
-
],
|
|
72
|
-
size: h,
|
|
73
|
-
...b
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
});
|
|
77
|
-
n.classes = c;
|
|
78
|
-
n.displayName = "@mantine/core/Text";
|
|
79
|
-
const E = (t) => /* @__PURE__ */ i(
|
|
80
|
-
n,
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { Text as o } from "@mantine/core";
|
|
3
|
+
import { c as a } from "../../Text.module-R-XLggXY.js";
|
|
4
|
+
const x = (t) => /* @__PURE__ */ s(
|
|
5
|
+
o,
|
|
81
6
|
{
|
|
82
7
|
...t,
|
|
83
|
-
classNames: { root:
|
|
8
|
+
classNames: { root: a[t.variant || "text"] }
|
|
84
9
|
}
|
|
85
10
|
);
|
|
86
11
|
export {
|
|
87
|
-
|
|
12
|
+
x as Text
|
|
88
13
|
};
|
package/dist/components/theme.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
const a = {
|
|
1
|
+
import { colorsTuple as e } from "@mantine/core";
|
|
2
|
+
const m = {
|
|
5
3
|
focusRing: "never",
|
|
6
4
|
scale: 1,
|
|
7
5
|
//default value
|
|
@@ -154,5 +152,5 @@ const a = {
|
|
|
154
152
|
}
|
|
155
153
|
};
|
|
156
154
|
export {
|
|
157
|
-
|
|
155
|
+
m as theme
|
|
158
156
|
};
|
package/dist/main.js
CHANGED
|
@@ -1,52 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const a = ({
|
|
8
|
-
defaultColorScheme: e,
|
|
9
|
-
localStorageKey: o,
|
|
10
|
-
forceColorScheme: t
|
|
11
|
-
}) => t ? `document.documentElement.setAttribute("data-mantine-color-scheme", '${t}');` : `try {
|
|
12
|
-
var _colorScheme = window.localStorage.getItem("${o}");
|
|
13
|
-
var colorScheme = _colorScheme === "light" || _colorScheme === "dark" || _colorScheme === "auto" ? _colorScheme : "${e}";
|
|
14
|
-
var computedColorScheme = colorScheme !== "auto" ? colorScheme : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
15
|
-
document.documentElement.setAttribute("data-mantine-color-scheme", computedColorScheme);
|
|
16
|
-
} catch (e) {}
|
|
17
|
-
`;
|
|
18
|
-
function l({
|
|
19
|
-
defaultColorScheme: e = "light",
|
|
20
|
-
localStorageKey: o = "mantine-color-scheme-value",
|
|
21
|
-
forceColorScheme: t,
|
|
22
|
-
...r
|
|
23
|
-
}) {
|
|
24
|
-
const c = ["light", "dark", "auto"].includes(e) ? e : "light";
|
|
25
|
-
return /* @__PURE__ */ m(
|
|
26
|
-
"script",
|
|
27
|
-
{
|
|
28
|
-
...r,
|
|
29
|
-
"data-mantine-script": !0,
|
|
30
|
-
dangerouslySetInnerHTML: {
|
|
31
|
-
__html: a({
|
|
32
|
-
defaultColorScheme: c,
|
|
33
|
-
localStorageKey: o,
|
|
34
|
-
forceColorScheme: t
|
|
35
|
-
})
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
const i = {
|
|
41
|
-
suppressHydrationWarning: !0,
|
|
42
|
-
"data-mantine-color-scheme": "light"
|
|
43
|
-
};
|
|
1
|
+
import { ColorSchemeScript as t, mantineHtmlProps as e } from "@mantine/core";
|
|
2
|
+
import { MantineProvider as p } from "./components/MainProvider/MantineProvider.js";
|
|
3
|
+
import { theme as f } from "./components/theme.js";
|
|
4
|
+
import { Button as i } from "./components/Button/Button.js";
|
|
5
|
+
import { CardInput as c } from "./components/CardInput/CardInput.js";
|
|
6
|
+
import { Text as h } from "./components/Text/Text.js";
|
|
44
7
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
8
|
+
i as Button,
|
|
9
|
+
c as CardInput,
|
|
10
|
+
t as ColorSchemeScript,
|
|
11
|
+
p as MantineProvider,
|
|
12
|
+
h as Text,
|
|
13
|
+
e as mantineHtmlProps,
|
|
14
|
+
f as theme
|
|
52
15
|
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@kvell-group/ui",
|
|
3
3
|
"author": "Kvell Group",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "1.9.
|
|
5
|
+
"version": "1.9.2",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
@@ -21,19 +21,12 @@
|
|
|
21
21
|
"format:fix": "prettier --write .",
|
|
22
22
|
"build-storybook": "storybook build"
|
|
23
23
|
},
|
|
24
|
-
"
|
|
24
|
+
"peerDependencies": {
|
|
25
25
|
"@mantine/core": "^7.17.3",
|
|
26
26
|
"@mantine/hooks": "^7.17.3",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"react-imask": "^7.6.1"
|
|
30
|
-
"semantic-release": "^24.2.3",
|
|
31
|
-
"vite-plugin-svgr": "^4.3.0",
|
|
32
|
-
"vite-tsconfig-paths": "^5.1.4"
|
|
33
|
-
},
|
|
34
|
-
"peerDependencies ": {
|
|
35
|
-
"react-dom": "^19.0.0",
|
|
36
|
-
"react": "^19.0.0"
|
|
27
|
+
"react": "^18.0.0",
|
|
28
|
+
"react-dom": "^18.0.0",
|
|
29
|
+
"react-imask": "^7.6.1"
|
|
37
30
|
},
|
|
38
31
|
"devDependencies": {
|
|
39
32
|
"@chromatic-com/storybook": "^3.2.6",
|
|
@@ -53,17 +46,20 @@
|
|
|
53
46
|
"@vitest/browser": "^3.1.1",
|
|
54
47
|
"@vitest/coverage-v8": "^3.1.1",
|
|
55
48
|
"autoprefixer": "^10.4.21",
|
|
49
|
+
"classnames": "^2.5.1",
|
|
56
50
|
"eslint": "^9.21.0",
|
|
57
51
|
"eslint-config-prettier": "^10.1.1",
|
|
58
52
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
59
53
|
"eslint-plugin-react-refresh": "^0.4.19",
|
|
60
54
|
"eslint-plugin-storybook": "^0.12.0",
|
|
55
|
+
"glob": "^11.0.1",
|
|
61
56
|
"globals": "^15.15.0",
|
|
62
57
|
"playwright": "^1.51.1",
|
|
63
58
|
"postcss": "^8.5.3",
|
|
64
59
|
"postcss-preset-mantine": "^1.17.0",
|
|
65
60
|
"postcss-simple-vars": "^7.0.1",
|
|
66
61
|
"prettier": "^3.5.3",
|
|
62
|
+
"semantic-release": "^24.2.3",
|
|
67
63
|
"storybook": "^8.6.12",
|
|
68
64
|
"stylelint": "^16.17.0",
|
|
69
65
|
"stylelint-config-standard": "^37.0.0",
|
|
@@ -72,6 +68,8 @@
|
|
|
72
68
|
"vite": "^6.2.0",
|
|
73
69
|
"vite-plugin-dts": "^4.5.3",
|
|
74
70
|
"vite-plugin-lib-inject-css": "^2.2.1",
|
|
71
|
+
"vite-plugin-svgr": "^4.3.0",
|
|
72
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
75
73
|
"vitest": "^3.1.1"
|
|
76
74
|
},
|
|
77
75
|
"publishConfig": {
|