@hai-dev/ui-kit 1.1.8 → 1.1.10
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/{Box-CykjCaXY.js → Box-TrgOqpYk.js} +2 -2
- package/dist/{Button-CcvrOEKV.js → Button-BN3fv8kr.js} +7 -7
- package/dist/{ButtonBase-DPLf5-lz.js → ButtonBase-CSWuFxUv.js} +3 -3
- package/dist/{CircularProgress-CrHaMZDC.js → CircularProgress-sPARyPfh.js} +7 -7
- package/dist/{Dialog-DqFOpJyx.js → Dialog-Cf0d7zi7.js} +20 -47
- package/dist/{DialogTitle-CeM_Z851.js → DialogTitle-BtvmXSZP.js} +10 -10
- package/dist/{Typography-DDVoglvI.js → Typography-Bjd6ZHeX.js} +6 -6
- package/dist/assets/upload-dialog.css +1 -1
- package/dist/chainPropTypes-DiJb1lGa.js +568 -0
- package/dist/components/button/button-content.js +1 -1
- package/dist/components/button/button.js +2 -2
- package/dist/components/button/utils/get-button-classnames.js +1 -1
- package/dist/components/circular-progress-loader/circular-progress-loader.js +4 -4
- package/dist/components/code-input/code-input.js +8 -8
- package/dist/components/index.js +10 -10
- package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +9 -9
- package/dist/components/photo-crop-uploader/components/index.js +4 -4
- package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +2 -2
- package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +2 -2
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +3 -3
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +11 -11
- package/dist/components/photo-crop-uploader/photo-crop-uploader.js +1 -1
- package/dist/{createTheme-RRQUOQoF.js → createTheme-D8R2Cz2N.js} +265 -310
- package/dist/{extendSxProp-VC2-7DJw.js → extendSxProp-Cw_ym9sl.js} +6 -6
- package/dist/{index-BMkXyDFs.js → index-CL3JU48X.js} +5 -5
- package/dist/{index-B2JRaoNz.js → index-YnD2EP-S.js} +0 -5
- package/dist/index.js +8 -8
- package/dist/{memoTheme-5A7c_y33.js → memoTheme-D5VCpQCz.js} +1 -1
- package/dist/refType-CUEs_vK5.js +61 -0
- package/dist/{upload-dialog-errors-Bxun25O-.js → upload-dialog-errors-Cyz6_7n4.js} +5 -5
- package/package.json +67 -40
- package/dist/chainPropTypes-C04Ex8aP.js +0 -413
- package/dist/refType-CCKoQjVR.js +0 -61
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import { f, h as a, i as m, j as l } from "./createTheme-D8R2Cz2N.js";
|
|
3
3
|
function h(t) {
|
|
4
4
|
return Object.keys(t).length === 0;
|
|
5
5
|
}
|
|
6
6
|
function x(t = null) {
|
|
7
|
-
const e =
|
|
7
|
+
const e = u.useContext(f);
|
|
8
8
|
return !e || h(e) ? t : e;
|
|
9
9
|
}
|
|
10
|
-
const y =
|
|
10
|
+
const y = a();
|
|
11
11
|
function b(t = y) {
|
|
12
12
|
return x(t);
|
|
13
13
|
}
|
|
@@ -15,7 +15,7 @@ const P = (t) => {
|
|
|
15
15
|
const e = {
|
|
16
16
|
systemProps: {},
|
|
17
17
|
otherProps: {}
|
|
18
|
-
}, r = t?.theme?.unstable_sxConfig ??
|
|
18
|
+
}, r = t?.theme?.unstable_sxConfig ?? l;
|
|
19
19
|
return Object.keys(t).forEach((s) => {
|
|
20
20
|
r[s] ? e.systemProps[s] = t[s] : e.otherProps[s] = t[s];
|
|
21
21
|
}), e;
|
|
@@ -31,7 +31,7 @@ function j(t) {
|
|
|
31
31
|
let n;
|
|
32
32
|
return Array.isArray(e) ? n = [s, ...e] : typeof e == "function" ? n = (...i) => {
|
|
33
33
|
const o = e(...i);
|
|
34
|
-
return
|
|
34
|
+
return m(o) ? {
|
|
35
35
|
...s,
|
|
36
36
|
...o
|
|
37
37
|
} : s;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import { u as y, e as m } from "./extendSxProp-
|
|
4
|
-
import { P as e, k as
|
|
5
|
-
import { G as T,
|
|
3
|
+
import { u as y, e as m } from "./extendSxProp-Cw_ym9sl.js";
|
|
4
|
+
import { P as e, k as d, T as b } from "./createTheme-D8R2Cz2N.js";
|
|
5
|
+
import { G as T, d as h } from "./chainPropTypes-DiJb1lGa.js";
|
|
6
6
|
function E(t) {
|
|
7
7
|
return t == null || Object.keys(t).length === 0;
|
|
8
8
|
}
|
|
@@ -20,7 +20,7 @@ process.env.NODE_ENV !== "production" && (p.propTypes = {
|
|
|
20
20
|
styles: e.oneOfType([e.array, e.string, e.object, e.func])
|
|
21
21
|
});
|
|
22
22
|
function u(t) {
|
|
23
|
-
const r =
|
|
23
|
+
const r = d(t);
|
|
24
24
|
return t !== r && r.styles ? (r.styles.match(/^@layer\s+[^{]*$/) || (r.styles = `@layer global{${r.styles}}`), r) : t;
|
|
25
25
|
}
|
|
26
26
|
function f({
|
|
@@ -56,7 +56,7 @@ function c(t) {
|
|
|
56
56
|
return /* @__PURE__ */ a(f, {
|
|
57
57
|
...t,
|
|
58
58
|
defaultTheme: h,
|
|
59
|
-
themeId:
|
|
59
|
+
themeId: b
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
process.env.NODE_ENV !== "production" && (c.propTypes = {
|
|
@@ -2,11 +2,6 @@ function c(e) {
|
|
|
2
2
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
3
3
|
}
|
|
4
4
|
var o = { exports: {} };
|
|
5
|
-
/*!
|
|
6
|
-
Copyright (c) 2018 Jed Watson.
|
|
7
|
-
Licensed under the MIT License (MIT), see
|
|
8
|
-
http://jedwatson.github.io/classnames
|
|
9
|
-
*/
|
|
10
5
|
var i;
|
|
11
6
|
function p() {
|
|
12
7
|
return i || (i = 1, (function(e) {
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { BYTE_TO_KILOBYTE as G, EN_LOCALE as I, RU_LOCALE as o } from "./constants.js";
|
|
2
2
|
import { BMP_IMAGE_EXT as P, BMP_IMAGE_TYPE as T, GIF_IMAGE_EXT as M, GIF_IMAGE_TYPE as A, ICO_IMAGE_EXT as e, ICO_IMAGE_TYPE as p, JPEG_IMAGE_EXT as t, JPEG_IMAGE_TYPE as Y, JPG_IMAGE_EXT as C, JPG_IMAGE_TYPE as O, MICROSOFT_ICO_IMAGE_TYPE as m, PNG_IMAGE_EXT as X, PNG_IMAGE_TYPE as f, SVG_IMAGE_EXT as x, SVG_IMAGE_TYPE as B, WEBP_IMAGE_EXT as L, WEBP_IMAGE_TYPE as a } from "./components/photo-crop-uploader/constants.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { Button as J } from "./components/button/button.js";
|
|
4
|
+
import { CircularProgressLoader as F } from "./components/circular-progress-loader/circular-progress-loader.js";
|
|
5
|
+
import { CodeInput as S } from "./components/code-input/code-input.js";
|
|
6
|
+
import { PhotoCropUploader as l } from "./components/photo-crop-uploader/photo-crop-uploader.js";
|
|
7
7
|
import { drawCroppedImage as s } from "./components/photo-crop-uploader/utils/draw-cropped-image.js";
|
|
8
8
|
export {
|
|
9
9
|
P as BMP_IMAGE_EXT,
|
|
10
10
|
T as BMP_IMAGE_TYPE,
|
|
11
11
|
G as BYTE_TO_KILOBYTE,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
J as Button,
|
|
13
|
+
F as CircularProgressLoader,
|
|
14
|
+
S as CodeInput,
|
|
15
15
|
I as EN_LOCALE,
|
|
16
16
|
M as GIF_IMAGE_EXT,
|
|
17
17
|
A as GIF_IMAGE_TYPE,
|
|
@@ -24,7 +24,7 @@ export {
|
|
|
24
24
|
m as MICROSOFT_ICO_IMAGE_TYPE,
|
|
25
25
|
X as PNG_IMAGE_EXT,
|
|
26
26
|
f as PNG_IMAGE_TYPE,
|
|
27
|
-
|
|
27
|
+
l as PhotoCropUploader,
|
|
28
28
|
o as RU_LOCALE,
|
|
29
29
|
x as SVG_IMAGE_EXT,
|
|
30
30
|
B as SVG_IMAGE_TYPE,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { P as i } from "./createTheme-D8R2Cz2N.js";
|
|
3
|
+
import { b as l } from "./chainPropTypes-DiJb1lGa.js";
|
|
4
|
+
const s = typeof window < "u" ? o.useLayoutEffect : o.useEffect;
|
|
5
|
+
function R(t) {
|
|
6
|
+
const e = o.useRef(t);
|
|
7
|
+
return s(() => {
|
|
8
|
+
e.current = t;
|
|
9
|
+
}), o.useRef((...c) => (
|
|
10
|
+
// @ts-expect-error hide `this`
|
|
11
|
+
(0, e.current)(...c)
|
|
12
|
+
)).current;
|
|
13
|
+
}
|
|
14
|
+
function E(...t) {
|
|
15
|
+
const e = o.useRef(void 0), c = o.useCallback((r) => {
|
|
16
|
+
const a = t.map((n) => {
|
|
17
|
+
if (n == null)
|
|
18
|
+
return null;
|
|
19
|
+
if (typeof n == "function") {
|
|
20
|
+
const f = n, u = f(r);
|
|
21
|
+
return typeof u == "function" ? u : () => {
|
|
22
|
+
f(null);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return n.current = r, () => {
|
|
26
|
+
n.current = null;
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
return () => {
|
|
30
|
+
a.forEach((n) => n?.());
|
|
31
|
+
};
|
|
32
|
+
}, t);
|
|
33
|
+
return o.useMemo(() => t.every((r) => r == null) ? null : (r) => {
|
|
34
|
+
e.current && (e.current(), e.current = void 0), r != null && (e.current = c(r));
|
|
35
|
+
}, t);
|
|
36
|
+
}
|
|
37
|
+
function p(t) {
|
|
38
|
+
const {
|
|
39
|
+
prototype: e = {}
|
|
40
|
+
} = t;
|
|
41
|
+
return !!e.isReactComponent;
|
|
42
|
+
}
|
|
43
|
+
function d(t, e, c, r, a) {
|
|
44
|
+
const n = t[e], f = a || e;
|
|
45
|
+
if (n == null || // When server-side rendering React doesn't warn either.
|
|
46
|
+
// This is not an accurate check for SSR.
|
|
47
|
+
// This is only in place for emotion compat.
|
|
48
|
+
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
|
|
49
|
+
typeof window > "u")
|
|
50
|
+
return null;
|
|
51
|
+
let u;
|
|
52
|
+
return typeof n == "function" && !p(n) && (u = "Did you accidentally provide a plain function component instead?"), n === o.Fragment && (u = "Did you accidentally provide a React.Fragment instead?"), u !== void 0 ? new Error(`Invalid ${r} \`${f}\` supplied to \`${c}\`. Expected an element type that can hold a ref. ${u} For more information see https://v7.mui.com/r/caveat-with-refs-guide`) : null;
|
|
53
|
+
}
|
|
54
|
+
const h = l(i.elementType, d), w = i.oneOfType([i.func, i.object]);
|
|
55
|
+
export {
|
|
56
|
+
R as a,
|
|
57
|
+
s as b,
|
|
58
|
+
h as e,
|
|
59
|
+
w as r,
|
|
60
|
+
E as u
|
|
61
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as s, jsxs as g, Fragment as x } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "./index-
|
|
2
|
+
import { c } from "./index-YnD2EP-S.js";
|
|
3
3
|
import { localizedText as f } from "./components/photo-crop-uploader/locale.js";
|
|
4
4
|
import { EN_LOCALE as S, DASH_SYMBOL as L } from "./constants.js";
|
|
5
|
-
import { D as I, a as R, b as W } from "./DialogTitle-
|
|
5
|
+
import { D as I, a as R, b as W } from "./DialogTitle-BtvmXSZP.js";
|
|
6
6
|
import * as O from "react";
|
|
7
|
-
import { g as V, a as B, c as $, P as r } from "./createTheme-
|
|
8
|
-
import { m as C } from "./memoTheme-
|
|
9
|
-
import { u as z,
|
|
7
|
+
import { g as V, a as B, c as $, P as r } from "./createTheme-D8R2Cz2N.js";
|
|
8
|
+
import { m as C } from "./memoTheme-D5VCpQCz.js";
|
|
9
|
+
import { u as z, c as E, s as w } from "./chainPropTypes-DiJb1lGa.js";
|
|
10
10
|
import { Button as y } from "./components/button/button.js";
|
|
11
11
|
import './assets/upload-dialog-errors.css';function M(e) {
|
|
12
12
|
return V("MuiDivider", e);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hai-dev/ui-kit",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.10",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Vladislav Knitrunov",
|
|
@@ -25,47 +25,74 @@
|
|
|
25
25
|
"prepare": "husky"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@emotion/react": "
|
|
29
|
-
"@emotion/styled": "
|
|
30
|
-
"@mui/material": "
|
|
31
|
-
"classnames": "
|
|
32
|
-
"react": "
|
|
33
|
-
"react-dom": "
|
|
34
|
-
"react-image-crop": "
|
|
35
|
-
"sass": "
|
|
28
|
+
"@emotion/react": "11.14.0",
|
|
29
|
+
"@emotion/styled": "11.14.1",
|
|
30
|
+
"@mui/material": "7.3.4",
|
|
31
|
+
"classnames": "2.5.1",
|
|
32
|
+
"react": "19.2.3",
|
|
33
|
+
"react-dom": "19.2.3",
|
|
34
|
+
"react-image-crop": "11.0.10",
|
|
35
|
+
"sass": "1.93.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@commitlint/cli": "
|
|
39
|
-
"@commitlint/config-conventional": "
|
|
40
|
-
"@emotion/react": "
|
|
41
|
-
"@emotion/styled": "
|
|
42
|
-
"@eslint/js": "
|
|
43
|
-
"@mui/material": "
|
|
44
|
-
"@storybook/addon-docs": "9.1.
|
|
45
|
-
"@storybook/addon-onboarding": "9.1.
|
|
46
|
-
"@storybook/react-vite": "9.1.
|
|
47
|
-
"@types/node": "
|
|
48
|
-
"@types/react": "
|
|
49
|
-
"@types/react-dom": "
|
|
50
|
-
"@vitejs/plugin-react": "
|
|
51
|
-
"classnames": "
|
|
52
|
-
"eslint": "
|
|
53
|
-
"eslint-plugin-react-hooks": "
|
|
54
|
-
"eslint-plugin-react-refresh": "
|
|
55
|
-
"eslint-plugin-storybook": "9.1.
|
|
56
|
-
"glob": "
|
|
57
|
-
"globals": "
|
|
58
|
-
"husky": "
|
|
59
|
-
"react": "
|
|
60
|
-
"react-dom": "
|
|
61
|
-
"react-image-crop": "
|
|
62
|
-
"sass": "
|
|
63
|
-
"storybook": "9.1.
|
|
64
|
-
"typescript": "
|
|
65
|
-
"typescript-eslint": "
|
|
66
|
-
"vite": "
|
|
67
|
-
"vite-plugin-dts": "
|
|
68
|
-
"vite-plugin-lib-inject-css": "
|
|
38
|
+
"@commitlint/cli": "20.0.0",
|
|
39
|
+
"@commitlint/config-conventional": "20.0.0",
|
|
40
|
+
"@emotion/react": "11.14.0",
|
|
41
|
+
"@emotion/styled": "11.14.1",
|
|
42
|
+
"@eslint/js": "9.36.0",
|
|
43
|
+
"@mui/material": "7.3.4",
|
|
44
|
+
"@storybook/addon-docs": "9.1.20",
|
|
45
|
+
"@storybook/addon-onboarding": "9.1.20",
|
|
46
|
+
"@storybook/react-vite": "9.1.20",
|
|
47
|
+
"@types/node": "20.19.0",
|
|
48
|
+
"@types/react": "19.1.6",
|
|
49
|
+
"@types/react-dom": "19.1.6",
|
|
50
|
+
"@vitejs/plugin-react": "5.0.3",
|
|
51
|
+
"classnames": "2.5.1",
|
|
52
|
+
"eslint": "9.36.0",
|
|
53
|
+
"eslint-plugin-react-hooks": "5.2.0",
|
|
54
|
+
"eslint-plugin-react-refresh": "0.4.20",
|
|
55
|
+
"eslint-plugin-storybook": "9.1.20",
|
|
56
|
+
"glob": "11.1.0",
|
|
57
|
+
"globals": "16.4.0",
|
|
58
|
+
"husky": "9.1.7",
|
|
59
|
+
"react": "19.2.3",
|
|
60
|
+
"react-dom": "19.2.3",
|
|
61
|
+
"react-image-crop": "11.0.10",
|
|
62
|
+
"sass": "1.93.1",
|
|
63
|
+
"storybook": "9.1.20",
|
|
64
|
+
"typescript": "5.9.3",
|
|
65
|
+
"typescript-eslint": "8.44.0",
|
|
66
|
+
"vite": "7.3.2",
|
|
67
|
+
"vite-plugin-dts": "4.5.4",
|
|
68
|
+
"vite-plugin-lib-inject-css": "2.2.2"
|
|
69
|
+
},
|
|
70
|
+
"resolutions": {
|
|
71
|
+
"@xmldom/xmldom": "0.8.13",
|
|
72
|
+
"cross-spawn": "7.0.5",
|
|
73
|
+
"glob": "11.1.0",
|
|
74
|
+
"immutable": "5.1.5",
|
|
75
|
+
"@eslint/eslintrc/minimatch": "3.1.4",
|
|
76
|
+
"minimatch": "9.0.7",
|
|
77
|
+
"picomatch": "4.0.4",
|
|
78
|
+
"postcss": "8.5.10",
|
|
79
|
+
"rollup": "4.59.1",
|
|
80
|
+
"tar": "7.5.11",
|
|
81
|
+
"underscore": "1.13.8"
|
|
82
|
+
},
|
|
83
|
+
"overrides": {
|
|
84
|
+
"@xmldom/xmldom": "0.8.13",
|
|
85
|
+
"cross-spawn": "7.0.5",
|
|
86
|
+
"immutable": "5.1.5",
|
|
87
|
+
"@eslint/eslintrc": {
|
|
88
|
+
"minimatch": "3.1.4"
|
|
89
|
+
},
|
|
90
|
+
"minimatch": "9.0.7",
|
|
91
|
+
"picomatch": "4.0.4",
|
|
92
|
+
"postcss": "8.5.10",
|
|
93
|
+
"tar": "7.5.11",
|
|
94
|
+
"underscore": "1.13.8",
|
|
95
|
+
"rollup": "4.59.1"
|
|
69
96
|
},
|
|
70
97
|
"sideEffects": [
|
|
71
98
|
"**/*.css"
|