@hai-dev/ui-kit 1.0.1 → 1.0.3
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/{Button-0AB7oP6Y.js → Button-DDlVTM6i.js} +3 -2
- package/dist/ButtonBase-CXGZ-DBC.js +1346 -0
- package/dist/{CircularProgress-BD6BPlN2.js → CircularProgress-CscJm1An.js} +9 -8
- package/dist/{DialogTitle-iOQ7wKEt.js → DialogTitle-KN1sayHD.js} +453 -555
- package/dist/assets/photo-list.css +1 -0
- package/dist/assets/upload-dialog.css +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +87 -23
- package/dist/components/photo-crop-uploader/components/photo-list/constants.d.ts +1 -0
- package/dist/components/photo-crop-uploader/components/photo-list/constants.js +4 -0
- package/dist/components/photo-crop-uploader/components/photo-list/index.d.ts +1 -0
- package/dist/components/photo-crop-uploader/components/photo-list/index.js +4 -0
- package/dist/components/photo-crop-uploader/components/photo-list/photo-list.d.ts +3 -0
- package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +88 -0
- package/dist/components/photo-crop-uploader/components/photo-list/types.d.ts +8 -0
- package/dist/components/photo-crop-uploader/components/photo-list/types.js +1 -0
- package/dist/components/photo-crop-uploader/components/upload-button/types.d.ts +3 -1
- package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +72 -62
- package/dist/components/photo-crop-uploader/components/upload-dialog/constants.d.ts +1 -0
- package/dist/components/photo-crop-uploader/components/upload-dialog/constants.js +4 -0
- package/dist/components/photo-crop-uploader/components/upload-dialog/types.d.ts +5 -2
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +172 -135
- package/dist/components/photo-crop-uploader/constants.d.ts +3 -0
- package/dist/components/photo-crop-uploader/constants.js +36 -33
- package/dist/components/photo-crop-uploader/locale.js +8 -2
- package/dist/components/photo-crop-uploader/photo-crop-uploader.js +163 -112
- package/dist/components/photo-crop-uploader/types.d.ts +3 -1
- package/dist/components/photo-crop-uploader/utils/get-default-cropped-photo.d.ts +3 -0
- package/dist/components/photo-crop-uploader/utils/get-default-cropped-photo.js +32 -0
- package/dist/components/photo-crop-uploader/utils/get-photo-crop.d.ts +1 -1
- package/dist/components/photo-crop-uploader/utils/get-photo-crop.js +12 -12
- package/dist/components/photo-crop-uploader/utils/index.d.ts +1 -0
- package/dist/components/photo-crop-uploader/utils/index.js +4 -2
- package/dist/components/photo-crop-uploader/utils/read-photo.js +33 -30
- package/dist/createTheme-DSHGFfg6.js +4124 -0
- package/dist/extendSxProp-CzeED7BH.js +49 -0
- package/package.json +1 -1
- package/dist/ButtonBase-Bw_3RZmN.js +0 -5453
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { T as u, c as f, i as a, d as m } from "./createTheme-DSHGFfg6.js";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
function h(t) {
|
|
4
|
+
return Object.keys(t).length === 0;
|
|
5
|
+
}
|
|
6
|
+
function x(t = null) {
|
|
7
|
+
const e = l.useContext(u);
|
|
8
|
+
return !e || h(e) ? t : e;
|
|
9
|
+
}
|
|
10
|
+
const y = f();
|
|
11
|
+
function b(t = y) {
|
|
12
|
+
return x(t);
|
|
13
|
+
}
|
|
14
|
+
const P = (t) => {
|
|
15
|
+
const e = {
|
|
16
|
+
systemProps: {},
|
|
17
|
+
otherProps: {}
|
|
18
|
+
}, r = t?.theme?.unstable_sxConfig ?? m;
|
|
19
|
+
return Object.keys(t).forEach((s) => {
|
|
20
|
+
r[s] ? e.systemProps[s] = t[s] : e.otherProps[s] = t[s];
|
|
21
|
+
}), e;
|
|
22
|
+
};
|
|
23
|
+
function g(t) {
|
|
24
|
+
const {
|
|
25
|
+
sx: e,
|
|
26
|
+
...r
|
|
27
|
+
} = t, {
|
|
28
|
+
systemProps: s,
|
|
29
|
+
otherProps: c
|
|
30
|
+
} = P(r);
|
|
31
|
+
let n;
|
|
32
|
+
return Array.isArray(e) ? n = [s, ...e] : typeof e == "function" ? n = (...i) => {
|
|
33
|
+
const o = e(...i);
|
|
34
|
+
return a(o) ? {
|
|
35
|
+
...s,
|
|
36
|
+
...o
|
|
37
|
+
} : s;
|
|
38
|
+
} : n = {
|
|
39
|
+
...s,
|
|
40
|
+
...e
|
|
41
|
+
}, {
|
|
42
|
+
...c,
|
|
43
|
+
sx: n
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
g as e,
|
|
48
|
+
b as u
|
|
49
|
+
};
|