@hai-dev/ui-kit 1.1.11 → 1.2.0
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-TrgOqpYk.js → Box-BgNAyP2L.js} +2 -2
- package/dist/{Button-BN3fv8kr.js → Button-DTV8ztWw.js} +5 -5
- package/dist/{ButtonBase-CSWuFxUv.js → ButtonBase-C4krg_zd.js} +3 -3
- package/dist/{CircularProgress-sPARyPfh.js → CircularProgress-BoaEg4rF.js} +3 -3
- package/dist/{Dialog-Cf0d7zi7.js → Dialog-BK9lMUKV.js} +12 -11
- package/dist/{DialogTitle-BtvmXSZP.js → DialogTitle-ByUfLB5M.js} +4 -4
- package/dist/{Typography-Bjd6ZHeX.js → Typography-BMyz0ZCh.js} +4 -4
- package/dist/assets/button.css +1 -1
- package/dist/assets/circular-progress-loader.css +1 -1
- package/dist/assets/code-input.css +1 -1
- package/dist/assets/error-upload-dialog.css +1 -1
- package/dist/assets/inter.css +1 -0
- package/dist/assets/photo-list.css +1 -1
- package/dist/assets/upload-dialog-errors.css +1 -1
- package/dist/button.module-C0UNQnBk.js +40 -0
- package/dist/chainPropTypes-DgqFdXGi.js +532 -0
- package/dist/components/button/button-content.js +11 -11
- package/dist/components/button/button.d.ts +18 -0
- package/dist/components/button/button.js +42 -35
- package/dist/components/button/constants.d.ts +17 -0
- package/dist/components/button/constants.js +28 -11
- package/dist/components/button/types.d.ts +11 -8
- package/dist/components/button/utils/get-button-classnames.d.ts +6 -0
- package/dist/components/button/utils/get-button-classnames.js +22 -10
- package/dist/components/circular-progress-loader/circular-progress-loader.js +14 -13
- package/dist/components/code-input/code-input.js +114 -112
- package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +37 -34
- package/dist/components/photo-crop-uploader/components/error-upload-dialog/types.d.ts +2 -1
- package/dist/components/photo-crop-uploader/components/photo-list/constants.d.ts +5 -1
- package/dist/components/photo-crop-uploader/components/photo-list/constants.js +6 -2
- package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +136 -33
- package/dist/components/photo-crop-uploader/components/photo-list/types.d.ts +2 -0
- package/dist/components/photo-crop-uploader/components/photo-list/use-container-size.d.ts +4 -0
- package/dist/components/photo-crop-uploader/components/photo-list/use-container-size.js +22 -0
- package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +1 -1
- package/dist/components/photo-crop-uploader/components/upload-dialog/constants.d.ts +1 -1
- package/dist/components/photo-crop-uploader/components/upload-dialog/constants.js +1 -1
- package/dist/components/photo-crop-uploader/components/upload-dialog/types.d.ts +2 -1
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +4 -3
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +159 -147
- package/dist/components/photo-crop-uploader/components/upload-dialog/use-scaled-min-dimension.d.ts +4 -0
- package/dist/components/photo-crop-uploader/components/upload-dialog/use-scaled-min-dimension.js +31 -0
- package/dist/components/photo-crop-uploader/locale.js +6 -2
- package/dist/components/photo-crop-uploader/photo-crop-uploader.js +131 -128
- package/dist/components/photo-crop-uploader/types.d.ts +2 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +5 -3
- package/dist/{createTheme-D8R2Cz2N.js → createTheme-BoOmbNvy.js} +426 -390
- package/dist/{extendSxProp-Cw_ym9sl.js → extendSxProp-BaUCVMKV.js} +2 -1
- package/dist/{index-CL3JU48X.js → index-h5oTv8GF.js} +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +26 -24
- package/dist/{memoTheme-D5VCpQCz.js → memoTheme-BYBJ2Fe6.js} +1 -1
- package/dist/refType-CsohaiiT.js +60 -0
- package/dist/types.d.ts +2 -1
- package/dist/{upload-dialog-errors-Cyz6_7n4.js → upload-dialog-errors-CCRxzIZp.js} +69 -67
- package/dist/useEnhancedEffect-CJGo-L3B.js +5 -0
- package/dist/utils/debounce.d.ts +5 -0
- package/dist/utils/debounce.js +12 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +4 -0
- package/package.json +10 -2
- package/dist/button.module-BZPPmSAS.js +0 -21
- package/dist/chainPropTypes-DiJb1lGa.js +0 -568
- package/dist/refType-CUEs_vK5.js +0 -61
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as u from "react";
|
|
2
|
-
import { f, h as a, i as m, j as l } from "./createTheme-
|
|
2
|
+
import { f, h as a, i as m, j as l } from "./createTheme-BoOmbNvy.js";
|
|
3
3
|
function h(t) {
|
|
4
4
|
return Object.keys(t).length === 0;
|
|
5
5
|
}
|
|
@@ -44,6 +44,7 @@ function j(t) {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
export {
|
|
47
|
+
x as a,
|
|
47
48
|
j as e,
|
|
48
49
|
b as u
|
|
49
50
|
};
|
|
@@ -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 d, T as b } from "./createTheme-
|
|
5
|
-
import { G as T, d as h } from "./chainPropTypes-
|
|
3
|
+
import { u as y, e as m } from "./extendSxProp-BaUCVMKV.js";
|
|
4
|
+
import { P as e, k as d, T as b } from "./createTheme-BoOmbNvy.js";
|
|
5
|
+
import { G as T, d as h } from "./chainPropTypes-DgqFdXGi.js";
|
|
6
6
|
function E(t) {
|
|
7
7
|
return t == null || Object.keys(t).length === 0;
|
|
8
8
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { PhotoCropUploader, Button, CircularProgressLoader, CodeInput } from './components';
|
|
1
|
+
export { PhotoCropUploader, Button, CircularProgressLoader, CodeInput, } from './components';
|
|
2
2
|
export { drawCroppedImage } from './components';
|
|
3
3
|
export type { Crop, PercentCrop, PixelCrop } from 'react-image-crop';
|
|
4
4
|
export type { CodeInputProps } from './components';
|
|
5
|
-
export type { Locale } from './types';
|
|
5
|
+
export type { Locale, Theme } from './types';
|
|
6
6
|
export type { PhotoDataUrl, PhotoFileSize, PhotoExtension, PhotoMimeType, PhotoFileOptions, PhotoCropUploaderProps, } from './components/photo-crop-uploader/types';
|
|
7
|
-
export { EN_LOCALE, RU_LOCALE, BYTE_TO_KILOBYTE } from './constants';
|
|
7
|
+
export { EN_LOCALE, RU_LOCALE, BYTE_TO_KILOBYTE, LIGHT_THEME, DARK_THEME, } from './constants';
|
|
8
8
|
export { JPG_IMAGE_EXT, JPEG_IMAGE_EXT, PNG_IMAGE_EXT, SVG_IMAGE_EXT, BMP_IMAGE_EXT, GIF_IMAGE_EXT, WEBP_IMAGE_EXT, ICO_IMAGE_EXT, BMP_IMAGE_TYPE, GIF_IMAGE_TYPE, ICO_IMAGE_TYPE, JPEG_IMAGE_TYPE, JPG_IMAGE_TYPE, MICROSOFT_ICO_IMAGE_TYPE, PNG_IMAGE_TYPE, SVG_IMAGE_TYPE, WEBP_IMAGE_TYPE, } from './components/photo-crop-uploader/constants';
|
package/dist/index.js
CHANGED
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import { BYTE_TO_KILOBYTE as G,
|
|
2
|
-
import { BMP_IMAGE_EXT as P, BMP_IMAGE_TYPE as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { CircularProgressLoader as
|
|
1
|
+
import { BYTE_TO_KILOBYTE as G, DARK_THEME as I, EN_LOCALE as T, LIGHT_THEME as o, RU_LOCALE as r } from "./constants.js";
|
|
2
|
+
import { BMP_IMAGE_EXT as P, BMP_IMAGE_TYPE as A, GIF_IMAGE_EXT as e, GIF_IMAGE_TYPE as p, ICO_IMAGE_EXT as t, ICO_IMAGE_TYPE as Y, JPEG_IMAGE_EXT as C, JPEG_IMAGE_TYPE as O, JPG_IMAGE_EXT as m, JPG_IMAGE_TYPE as X, MICROSOFT_ICO_IMAGE_TYPE as f, PNG_IMAGE_EXT as x, PNG_IMAGE_TYPE as B, SVG_IMAGE_EXT as L, SVG_IMAGE_TYPE as a, WEBP_IMAGE_EXT as d, WEBP_IMAGE_TYPE as J } from "./components/photo-crop-uploader/constants.js";
|
|
3
|
+
import { Button as F } from "./components/button/button.js";
|
|
4
|
+
import { CircularProgressLoader as N } from "./components/circular-progress-loader/circular-progress-loader.js";
|
|
5
5
|
import { CodeInput as S } from "./components/code-input/code-input.js";
|
|
6
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
|
+
A as BMP_IMAGE_TYPE,
|
|
11
11
|
G as BYTE_TO_KILOBYTE,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
F as Button,
|
|
13
|
+
N as CircularProgressLoader,
|
|
14
14
|
S as CodeInput,
|
|
15
|
-
I as
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
f as
|
|
15
|
+
I as DARK_THEME,
|
|
16
|
+
T as EN_LOCALE,
|
|
17
|
+
e as GIF_IMAGE_EXT,
|
|
18
|
+
p as GIF_IMAGE_TYPE,
|
|
19
|
+
t as ICO_IMAGE_EXT,
|
|
20
|
+
Y as ICO_IMAGE_TYPE,
|
|
21
|
+
C as JPEG_IMAGE_EXT,
|
|
22
|
+
O as JPEG_IMAGE_TYPE,
|
|
23
|
+
m as JPG_IMAGE_EXT,
|
|
24
|
+
X as JPG_IMAGE_TYPE,
|
|
25
|
+
o as LIGHT_THEME,
|
|
26
|
+
f as MICROSOFT_ICO_IMAGE_TYPE,
|
|
27
|
+
x as PNG_IMAGE_EXT,
|
|
28
|
+
B as PNG_IMAGE_TYPE,
|
|
27
29
|
l as PhotoCropUploader,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
r as RU_LOCALE,
|
|
31
|
+
L as SVG_IMAGE_EXT,
|
|
32
|
+
a as SVG_IMAGE_TYPE,
|
|
33
|
+
d as WEBP_IMAGE_EXT,
|
|
34
|
+
J as WEBP_IMAGE_TYPE,
|
|
33
35
|
s as drawCroppedImage
|
|
34
36
|
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import { u as l } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
3
|
+
import { P as a } from "./createTheme-BoOmbNvy.js";
|
|
4
|
+
import { b as p } from "./chainPropTypes-DgqFdXGi.js";
|
|
5
|
+
function h(t) {
|
|
6
|
+
const e = u.useRef(t);
|
|
7
|
+
return l(() => {
|
|
8
|
+
e.current = t;
|
|
9
|
+
}), u.useRef((...c) => (
|
|
10
|
+
// @ts-expect-error hide `this`
|
|
11
|
+
(0, e.current)(...c)
|
|
12
|
+
)).current;
|
|
13
|
+
}
|
|
14
|
+
function C(...t) {
|
|
15
|
+
const e = u.useRef(void 0), c = u.useCallback((r) => {
|
|
16
|
+
const f = t.map((n) => {
|
|
17
|
+
if (n == null)
|
|
18
|
+
return null;
|
|
19
|
+
if (typeof n == "function") {
|
|
20
|
+
const i = n, o = i(r);
|
|
21
|
+
return typeof o == "function" ? o : () => {
|
|
22
|
+
i(null);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return n.current = r, () => {
|
|
26
|
+
n.current = null;
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
return () => {
|
|
30
|
+
f.forEach((n) => n?.());
|
|
31
|
+
};
|
|
32
|
+
}, t);
|
|
33
|
+
return u.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 s(t) {
|
|
38
|
+
const {
|
|
39
|
+
prototype: e = {}
|
|
40
|
+
} = t;
|
|
41
|
+
return !!e.isReactComponent;
|
|
42
|
+
}
|
|
43
|
+
function d(t, e, c, r, f) {
|
|
44
|
+
const n = t[e], i = f || 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 o;
|
|
52
|
+
return typeof n == "function" && !s(n) && (o = "Did you accidentally provide a plain function component instead?"), n === u.Fragment && (o = "Did you accidentally provide a React.Fragment instead?"), o !== void 0 ? new Error(`Invalid ${r} \`${i}\` supplied to \`${c}\`. Expected an element type that can hold a ref. ${o} For more information see https://v7.mui.com/r/caveat-with-refs-guide`) : null;
|
|
53
|
+
}
|
|
54
|
+
const E = p(a.elementType, d), T = a.oneOfType([a.func, a.object]);
|
|
55
|
+
export {
|
|
56
|
+
h as a,
|
|
57
|
+
E as e,
|
|
58
|
+
T as r,
|
|
59
|
+
C as u
|
|
60
|
+
};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
1
|
+
import { jsx as s, jsxs as h, Fragment as y } from "react/jsx-runtime";
|
|
2
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
|
|
5
|
+
import './assets/inter.css';import './assets/upload-dialog-errors.css';/* empty css */
|
|
6
|
+
import { D as I, a as R, b as W } from "./DialogTitle-ByUfLB5M.js";
|
|
6
7
|
import * as O from "react";
|
|
7
|
-
import { g as V, a as
|
|
8
|
-
import { m as C } from "./memoTheme-
|
|
9
|
-
import { u as
|
|
10
|
-
import { Button as
|
|
11
|
-
|
|
8
|
+
import { g as V, a as k, c as B, P as r } from "./createTheme-BoOmbNvy.js";
|
|
9
|
+
import { m as C } from "./memoTheme-BYBJ2Fe6.js";
|
|
10
|
+
import { u as $, c as z, s as w } from "./chainPropTypes-DgqFdXGi.js";
|
|
11
|
+
import { Button as x } from "./components/button/button.js";
|
|
12
|
+
function E(e) {
|
|
12
13
|
return V("MuiDivider", e);
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
-
const
|
|
15
|
+
k("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]);
|
|
16
|
+
const M = (e) => {
|
|
16
17
|
const {
|
|
17
18
|
absolute: t,
|
|
18
19
|
children: o,
|
|
19
20
|
classes: p,
|
|
20
|
-
flexItem:
|
|
21
|
+
flexItem: g,
|
|
21
22
|
light: i,
|
|
22
23
|
orientation: n,
|
|
23
|
-
textAlign:
|
|
24
|
-
variant:
|
|
24
|
+
textAlign: l,
|
|
25
|
+
variant: a
|
|
25
26
|
} = e;
|
|
26
|
-
return
|
|
27
|
-
root: ["root", t && "absolute",
|
|
27
|
+
return z({
|
|
28
|
+
root: ["root", t && "absolute", a, i && "light", n === "vertical" && "vertical", g && "flexItem", o && "withChildren", o && n === "vertical" && "withChildrenVertical", l === "right" && n !== "vertical" && "textAlignRight", l === "left" && n !== "vertical" && "textAlignLeft"],
|
|
28
29
|
wrapper: ["wrapper", n === "vertical" && "wrapperVertical"]
|
|
29
|
-
},
|
|
30
|
-
},
|
|
30
|
+
}, E, p);
|
|
31
|
+
}, U = w("div", {
|
|
31
32
|
name: "MuiDivider",
|
|
32
33
|
slot: "Root",
|
|
33
34
|
overridesResolver: (e, t) => {
|
|
@@ -168,7 +169,7 @@ const U = (e) => {
|
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
171
|
}]
|
|
171
|
-
}))),
|
|
172
|
+
}))), j = w("span", {
|
|
172
173
|
name: "MuiDivider",
|
|
173
174
|
slot: "Wrapper",
|
|
174
175
|
overridesResolver: (e, t) => {
|
|
@@ -193,50 +194,50 @@ const U = (e) => {
|
|
|
193
194
|
paddingBottom: `calc(${e.spacing(1)} * 1.2)`
|
|
194
195
|
}
|
|
195
196
|
}]
|
|
196
|
-
}))),
|
|
197
|
-
const p =
|
|
197
|
+
}))), m = /* @__PURE__ */ O.forwardRef(function(t, o) {
|
|
198
|
+
const p = $({
|
|
198
199
|
props: t,
|
|
199
200
|
name: "MuiDivider"
|
|
200
201
|
}), {
|
|
201
|
-
absolute:
|
|
202
|
+
absolute: g = !1,
|
|
202
203
|
children: i,
|
|
203
204
|
className: n,
|
|
204
|
-
orientation:
|
|
205
|
-
component:
|
|
205
|
+
orientation: l = "horizontal",
|
|
206
|
+
component: a = i || l === "vertical" ? "div" : "hr",
|
|
206
207
|
flexItem: b = !1,
|
|
207
208
|
light: A = !1,
|
|
208
|
-
role:
|
|
209
|
+
role: u = a !== "hr" ? "separator" : void 0,
|
|
209
210
|
textAlign: D = "center",
|
|
210
211
|
variant: N = "fullWidth",
|
|
211
212
|
...T
|
|
212
|
-
} = p,
|
|
213
|
+
} = p, v = {
|
|
213
214
|
...p,
|
|
214
|
-
absolute:
|
|
215
|
-
component:
|
|
215
|
+
absolute: g,
|
|
216
|
+
component: a,
|
|
216
217
|
flexItem: b,
|
|
217
218
|
light: A,
|
|
218
|
-
orientation:
|
|
219
|
-
role:
|
|
219
|
+
orientation: l,
|
|
220
|
+
role: u,
|
|
220
221
|
textAlign: D,
|
|
221
222
|
variant: N
|
|
222
|
-
}, _ =
|
|
223
|
-
return /* @__PURE__ */ s(
|
|
224
|
-
as:
|
|
225
|
-
className:
|
|
226
|
-
role:
|
|
223
|
+
}, _ = M(v);
|
|
224
|
+
return /* @__PURE__ */ s(U, {
|
|
225
|
+
as: a,
|
|
226
|
+
className: B(_.root, n),
|
|
227
|
+
role: u,
|
|
227
228
|
ref: o,
|
|
228
|
-
ownerState:
|
|
229
|
-
"aria-orientation":
|
|
229
|
+
ownerState: v,
|
|
230
|
+
"aria-orientation": u === "separator" && (a !== "hr" || l === "vertical") ? l : void 0,
|
|
230
231
|
...T,
|
|
231
|
-
children: i ? /* @__PURE__ */ s(
|
|
232
|
+
children: i ? /* @__PURE__ */ s(j, {
|
|
232
233
|
className: _.wrapper,
|
|
233
|
-
ownerState:
|
|
234
|
+
ownerState: v,
|
|
234
235
|
children: i
|
|
235
236
|
}) : null
|
|
236
237
|
});
|
|
237
238
|
});
|
|
238
|
-
|
|
239
|
-
process.env.NODE_ENV !== "production" && (
|
|
239
|
+
m && (m.muiSkipListHighlight = !0);
|
|
240
|
+
process.env.NODE_ENV !== "production" && (m.propTypes = {
|
|
240
241
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
241
242
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
242
243
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -299,44 +300,45 @@ process.env.NODE_ENV !== "production" && (v.propTypes = {
|
|
|
299
300
|
*/
|
|
300
301
|
variant: r.oneOfType([r.oneOf(["fullWidth", "inset", "middle"]), r.string])
|
|
301
302
|
});
|
|
302
|
-
const H = "
|
|
303
|
+
const H = "_dialog_1y4gd_1", P = "_dark_1y4gd_4", F = "_errorContent_1y4gd_8", Y = "_errorItem_1y4gd_60", q = "_fileName_1y4gd_67", G = "_topActions_1y4gd_70", J = "_close_1y4gd_76", K = "_botActions_1y4gd_84", Q = "_button_1y4gd_90", X = "_title_1y4gd_95", Z = "_content_1y4gd_102", tt = "_many_1y4gd_124", et = "_crop_1y4gd_128", ot = "_dialogText_1y4gd_176", d = {
|
|
303
304
|
dialog: H,
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
305
|
+
dark: P,
|
|
306
|
+
errorContent: F,
|
|
307
|
+
errorItem: Y,
|
|
308
|
+
fileName: q,
|
|
309
|
+
topActions: G,
|
|
310
|
+
close: J,
|
|
311
|
+
botActions: K,
|
|
312
|
+
button: Q,
|
|
313
|
+
title: X,
|
|
314
|
+
content: Z,
|
|
315
|
+
many: tt,
|
|
316
|
+
crop: et,
|
|
317
|
+
dialogText: ot
|
|
318
|
+
}, ht = (e) => {
|
|
317
319
|
const {
|
|
318
320
|
photoSources: t,
|
|
319
321
|
errors: o = [],
|
|
320
322
|
onCloseDialogHandler: p,
|
|
321
|
-
onClearErrors:
|
|
323
|
+
onClearErrors: g,
|
|
322
324
|
locale: i = S
|
|
323
325
|
} = e;
|
|
324
|
-
return /* @__PURE__ */
|
|
326
|
+
return /* @__PURE__ */ h(y, { children: [
|
|
325
327
|
/* @__PURE__ */ s(I, { className: c(d.title), children: t.length ? f[i]["some-not-uploaded"] : f[i]["not-uploaded"] }),
|
|
326
|
-
/* @__PURE__ */ s(R, { className: c(d.errorContent), children: o.map(({ photoName: n, errorMessage:
|
|
327
|
-
!!
|
|
328
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ s(R, { className: c(d.errorContent), children: o.map(({ photoName: n, errorMessage: l }, a) => /* @__PURE__ */ h(y, { children: [
|
|
329
|
+
!!a && /* @__PURE__ */ s(m, {}),
|
|
330
|
+
/* @__PURE__ */ h("div", { className: c(d.errorItem), children: [
|
|
329
331
|
/* @__PURE__ */ s("span", { className: c(d.fileName), children: n }),
|
|
330
332
|
" ",
|
|
331
|
-
` ${L} ${
|
|
333
|
+
` ${L} ${l}`
|
|
332
334
|
] })
|
|
333
|
-
] },
|
|
334
|
-
/* @__PURE__ */
|
|
335
|
+
] }, a)) }),
|
|
336
|
+
/* @__PURE__ */ h(W, { className: c(d.botActions), children: [
|
|
335
337
|
/* @__PURE__ */ s(
|
|
336
|
-
|
|
338
|
+
x,
|
|
337
339
|
{
|
|
338
340
|
buttonSize: "small",
|
|
339
|
-
buttonColor: "
|
|
341
|
+
buttonColor: "red",
|
|
340
342
|
buttonVariant: "outlined",
|
|
341
343
|
buttonWeight: 500,
|
|
342
344
|
onClick: p,
|
|
@@ -345,13 +347,13 @@ const H = "_dialog_1h5av_1", P = "_errorContent_1h5av_7", F = "_errorItem_1h5av_
|
|
|
345
347
|
}
|
|
346
348
|
),
|
|
347
349
|
!!t.length && /* @__PURE__ */ s(
|
|
348
|
-
|
|
350
|
+
x,
|
|
349
351
|
{
|
|
350
352
|
buttonSize: "small",
|
|
351
353
|
buttonColor: "blue",
|
|
352
|
-
buttonVariant: "
|
|
354
|
+
buttonVariant: "outlined",
|
|
353
355
|
buttonWeight: 500,
|
|
354
|
-
onClick:
|
|
356
|
+
onClick: g,
|
|
355
357
|
className: c(d.button),
|
|
356
358
|
children: f[i].continue
|
|
357
359
|
}
|
|
@@ -360,6 +362,6 @@ const H = "_dialog_1h5av_1", P = "_errorContent_1h5av_7", F = "_errorItem_1h5av_
|
|
|
360
362
|
] });
|
|
361
363
|
};
|
|
362
364
|
export {
|
|
363
|
-
|
|
365
|
+
ht as U,
|
|
364
366
|
d as s
|
|
365
367
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { debounce } from './debounce';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hai-dev/ui-kit",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Vladislav Knitrunov",
|
|
@@ -22,7 +22,15 @@
|
|
|
22
22
|
"preview": "vite preview",
|
|
23
23
|
"storybook": "storybook dev -p 6006",
|
|
24
24
|
"build-storybook": "storybook build",
|
|
25
|
-
"prepare": "husky"
|
|
25
|
+
"prepare": "husky",
|
|
26
|
+
"sync:setup": "node scripts/sync.cjs setup",
|
|
27
|
+
"sync:update": "node scripts/sync.cjs update",
|
|
28
|
+
"sync:pull:all": "node scripts/sync.cjs pull:all",
|
|
29
|
+
"sync:pull:existing": "node scripts/sync.cjs pull:existing",
|
|
30
|
+
"sync:pull:new": "node scripts/sync.cjs pull:new",
|
|
31
|
+
"sync:push:all": "node scripts/sync.cjs push:all",
|
|
32
|
+
"sync:push:new": "node scripts/sync.cjs push:new",
|
|
33
|
+
"sync:push:existing": "node scripts/sync.cjs push:existing"
|
|
26
34
|
},
|
|
27
35
|
"peerDependencies": {
|
|
28
36
|
"@emotion/react": "11.14.0",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import './assets/button.css';const t = "_button_fufd7_1", _ = "_startContent_fufd7_9", n = "_endContent_fufd7_12", e = "_link_fufd7_15", f = "_description_fufd7_24", s = "_text_fufd7_29", d = "_withDescription_fufd7_33", i = "_specific_fufd7_36", o = "_small_fufd7_46", c = "_filled_fufd7_51", l = "_white_fufd7_51", u = "_blue_fufd7_61", a = "_gray_fufd7_68", r = "_outlined_fufd7_72", p = "_disabled_fufd7_97", b = {
|
|
2
|
-
button: t,
|
|
3
|
-
startContent: _,
|
|
4
|
-
endContent: n,
|
|
5
|
-
link: e,
|
|
6
|
-
description: f,
|
|
7
|
-
text: s,
|
|
8
|
-
withDescription: d,
|
|
9
|
-
specific: i,
|
|
10
|
-
default: "_default_fufd7_40",
|
|
11
|
-
small: o,
|
|
12
|
-
filled: c,
|
|
13
|
-
white: l,
|
|
14
|
-
blue: u,
|
|
15
|
-
gray: a,
|
|
16
|
-
outlined: r,
|
|
17
|
-
disabled: p
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
b as s
|
|
21
|
-
};
|