@hai-dev/ui-kit 1.0.5 → 1.0.7
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-D8oKffw9.js +57 -0
- package/dist/{Button-DDlVTM6i.js → Button-BBF8hp7e.js} +30 -27
- package/dist/ButtonBase-T2KH9jsD.js +966 -0
- package/dist/CircularProgress-BQQkuSse.js +273 -0
- package/dist/{DialogTitle-KN1sayHD.js → Dialog-B97c7WYP.js} +910 -1401
- package/dist/DialogTitle-Du4tqTs0.js +254 -0
- package/dist/Typography-r_TXEM1e.js +257 -0
- package/dist/assets/circular-progress-loader.css +1 -0
- package/dist/assets/upload-dialog-errors.css +1 -0
- package/dist/assets/upload-dialog.css +1 -1
- package/dist/chainPropTypes-KIxDwPzf.js +387 -0
- package/dist/components/button/button.js +1 -1
- package/dist/components/circular-progress-loader/circular-progress-loader.d.ts +3 -0
- package/dist/components/circular-progress-loader/circular-progress-loader.js +44 -0
- package/dist/components/circular-progress-loader/circular-progress-loader.stories.d.ts +7 -0
- package/dist/components/circular-progress-loader/constants.d.ts +2 -0
- package/dist/components/circular-progress-loader/constants.js +5 -0
- package/dist/components/circular-progress-loader/index.d.ts +1 -0
- package/dist/components/circular-progress-loader/index.js +4 -0
- package/dist/components/circular-progress-loader/types.d.ts +6 -0
- package/dist/components/circular-progress-loader/types.js +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +6 -4
- package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +41 -39
- package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +22 -73
- package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +17 -17
- package/dist/components/photo-crop-uploader/components/upload-dialog/types.d.ts +12 -1
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.d.ts +3 -0
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +10 -0
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +152 -127
- package/dist/components/photo-crop-uploader/constants.d.ts +3 -0
- package/dist/components/photo-crop-uploader/constants.js +35 -32
- package/dist/components/photo-crop-uploader/locale.js +8 -2
- package/dist/components/photo-crop-uploader/photo-crop-uploader.js +169 -145
- package/dist/components/photo-crop-uploader/types.d.ts +4 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +3 -1
- package/dist/createSimplePaletteValueFilter-nb0wSOzC.js +30 -0
- package/dist/{createTheme-DSHGFfg6.js → createTheme-RvzX1VSA.js} +4 -4
- package/dist/decorators/centered-decorator.d.ts +3 -0
- package/dist/decorators/centered-decorator.js +16 -0
- package/dist/decorators/index.d.ts +1 -0
- package/dist/decorators/index.js +4 -0
- package/dist/decorators/types.d.ts +4 -0
- package/dist/decorators/types.js +1 -0
- package/dist/extendSxProp-BW9e6LtL.js +36 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16 -14
- package/dist/upload-dialog-errors-ku54UrUb.js +365 -0
- package/dist/useId-CK6Kn3Tn.js +21 -0
- package/dist/useTheme-CsjkCBFJ.js +16 -0
- package/package.json +8 -8
- package/dist/ButtonBase-CXGZ-DBC.js +0 -1346
- package/dist/CircularProgress-CscJm1An.js +0 -291
- package/dist/extendSxProp-CzeED7BH.js +0 -49
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { s as x, f as p, c as h, a as T, C as y, h as B, j as N, P as e } from "./createTheme-RvzX1VSA.js";
|
|
2
|
+
import * as C from "react";
|
|
3
|
+
import { jsx as b } from "react/jsx-runtime";
|
|
4
|
+
import { u as g } from "./useTheme-CsjkCBFJ.js";
|
|
5
|
+
import { e as j } from "./extendSxProp-BW9e6LtL.js";
|
|
6
|
+
function v(n = {}) {
|
|
7
|
+
const {
|
|
8
|
+
themeId: t,
|
|
9
|
+
defaultTheme: m,
|
|
10
|
+
defaultClassName: a = "MuiBox-root",
|
|
11
|
+
generateClassName: r
|
|
12
|
+
} = n, c = x("div", {
|
|
13
|
+
shouldForwardProp: (o) => o !== "theme" && o !== "sx" && o !== "as"
|
|
14
|
+
})(p);
|
|
15
|
+
return /* @__PURE__ */ C.forwardRef(function(l, f) {
|
|
16
|
+
const s = g(m), {
|
|
17
|
+
className: d,
|
|
18
|
+
component: i = "div",
|
|
19
|
+
...u
|
|
20
|
+
} = j(l);
|
|
21
|
+
return /* @__PURE__ */ b(c, {
|
|
22
|
+
as: i,
|
|
23
|
+
ref: f,
|
|
24
|
+
className: h(d, r ? r(a) : a),
|
|
25
|
+
theme: t && s[t] || s,
|
|
26
|
+
...u
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
const E = T("MuiBox", ["root"]), O = N(), P = v({
|
|
31
|
+
themeId: B,
|
|
32
|
+
defaultTheme: O,
|
|
33
|
+
defaultClassName: E.root,
|
|
34
|
+
generateClassName: y.generate
|
|
35
|
+
});
|
|
36
|
+
process.env.NODE_ENV !== "production" && (P.propTypes = {
|
|
37
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
38
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
39
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
40
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
41
|
+
/**
|
|
42
|
+
* @ignore
|
|
43
|
+
*/
|
|
44
|
+
children: e.node,
|
|
45
|
+
/**
|
|
46
|
+
* The component used for the root node.
|
|
47
|
+
* Either a string to use a HTML element or a component.
|
|
48
|
+
*/
|
|
49
|
+
component: e.elementType,
|
|
50
|
+
/**
|
|
51
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
52
|
+
*/
|
|
53
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
54
|
+
});
|
|
55
|
+
export {
|
|
56
|
+
P as B
|
|
57
|
+
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as y from "react";
|
|
2
|
-
import { a as H, g as A,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { jsxs as
|
|
2
|
+
import { a as H, g as A, c as R, b as r, P as t } from "./createTheme-RvzX1VSA.js";
|
|
3
|
+
import { d as q, u as J, s as f, c as K, r as Q } from "./chainPropTypes-KIxDwPzf.js";
|
|
4
|
+
import { m as X, c as Y } from "./createSimplePaletteValueFilter-nb0wSOzC.js";
|
|
5
|
+
import { jsxs as Z, jsx as d } from "react/jsx-runtime";
|
|
6
|
+
import { u as oo } from "./useId-CK6Kn3Tn.js";
|
|
7
|
+
import { B as to } from "./ButtonBase-T2KH9jsD.js";
|
|
8
|
+
import { C as no } from "./CircularProgress-BQQkuSse.js";
|
|
6
9
|
function ao(o) {
|
|
7
10
|
return A("MuiButton", o);
|
|
8
11
|
}
|
|
@@ -19,16 +22,16 @@ const io = (o) => {
|
|
|
19
22
|
variant: u,
|
|
20
23
|
loading: g,
|
|
21
24
|
loadingPosition: S,
|
|
22
|
-
classes:
|
|
25
|
+
classes: b
|
|
23
26
|
} = o, x = {
|
|
24
27
|
root: ["root", g && "loading", u, `${u}${r(n)}`, `size${r(c)}`, `${u}Size${r(c)}`, `color${r(n)}`, a && "disableElevation", i && "fullWidth", g && `loadingPosition${r(S)}`],
|
|
25
28
|
startIcon: ["icon", "startIcon", `iconSize${r(c)}`],
|
|
26
29
|
endIcon: ["icon", "endIcon", `iconSize${r(c)}`],
|
|
27
30
|
loadingIndicator: ["loadingIndicator"],
|
|
28
31
|
loadingWrapper: ["loadingWrapper"]
|
|
29
|
-
}, z = K(x, ao,
|
|
32
|
+
}, z = K(x, ao, b);
|
|
30
33
|
return {
|
|
31
|
-
...
|
|
34
|
+
...b,
|
|
32
35
|
// forward the focused, disabled, etc. classes to the ButtonBase
|
|
33
36
|
...z
|
|
34
37
|
};
|
|
@@ -59,8 +62,8 @@ const io = (o) => {
|
|
|
59
62
|
fontSize: 22
|
|
60
63
|
}
|
|
61
64
|
}
|
|
62
|
-
}], ro =
|
|
63
|
-
shouldForwardProp: (o) =>
|
|
65
|
+
}], ro = f(to, {
|
|
66
|
+
shouldForwardProp: (o) => Q(o) || o === "classes",
|
|
64
67
|
name: "MuiButton",
|
|
65
68
|
slot: "Root",
|
|
66
69
|
overridesResolver: (o, n) => {
|
|
@@ -69,7 +72,7 @@ const io = (o) => {
|
|
|
69
72
|
} = o;
|
|
70
73
|
return [n.root, n[a.variant], n[`${a.variant}${r(a.color)}`], n[`size${r(a.size)}`], n[`${a.variant}Size${r(a.size)}`], a.color === "inherit" && n.colorInherit, a.disableElevation && n.disableElevation, a.fullWidth && n.fullWidth, a.loading && n.loading];
|
|
71
74
|
}
|
|
72
|
-
})(
|
|
75
|
+
})(X(({
|
|
73
76
|
theme: o
|
|
74
77
|
}) => {
|
|
75
78
|
const n = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], a = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
|
|
@@ -138,7 +141,7 @@ const io = (o) => {
|
|
|
138
141
|
color: "var(--variant-textColor)",
|
|
139
142
|
backgroundColor: "var(--variant-textBg)"
|
|
140
143
|
}
|
|
141
|
-
}, ...Object.entries(o.palette).filter(
|
|
144
|
+
}, ...Object.entries(o.palette).filter(Y()).map(([i]) => ({
|
|
142
145
|
props: {
|
|
143
146
|
color: i
|
|
144
147
|
},
|
|
@@ -267,7 +270,7 @@ const io = (o) => {
|
|
|
267
270
|
}
|
|
268
271
|
}]
|
|
269
272
|
};
|
|
270
|
-
})), eo =
|
|
273
|
+
})), eo = f("span", {
|
|
271
274
|
name: "MuiButton",
|
|
272
275
|
slot: "StartIcon",
|
|
273
276
|
overridesResolver: (o, n) => {
|
|
@@ -310,7 +313,7 @@ const io = (o) => {
|
|
|
310
313
|
marginRight: -8
|
|
311
314
|
}
|
|
312
315
|
}, ...T]
|
|
313
|
-
})), so =
|
|
316
|
+
})), so = f("span", {
|
|
314
317
|
name: "MuiButton",
|
|
315
318
|
slot: "EndIcon",
|
|
316
319
|
overridesResolver: (o, n) => {
|
|
@@ -353,7 +356,7 @@ const io = (o) => {
|
|
|
353
356
|
marginLeft: -8
|
|
354
357
|
}
|
|
355
358
|
}, ...T]
|
|
356
|
-
})), lo =
|
|
359
|
+
})), lo = f("span", {
|
|
357
360
|
name: "MuiButton",
|
|
358
361
|
slot: "LoadingIndicator"
|
|
359
362
|
})(({
|
|
@@ -443,7 +446,7 @@ const io = (o) => {
|
|
|
443
446
|
right: -10
|
|
444
447
|
}
|
|
445
448
|
}]
|
|
446
|
-
})), E =
|
|
449
|
+
})), E = f("span", {
|
|
447
450
|
name: "MuiButton",
|
|
448
451
|
slot: "LoadingIconPlaceholder"
|
|
449
452
|
})({
|
|
@@ -456,7 +459,7 @@ const io = (o) => {
|
|
|
456
459
|
name: "MuiButton"
|
|
457
460
|
}), {
|
|
458
461
|
children: S,
|
|
459
|
-
color:
|
|
462
|
+
color: b = "primary",
|
|
460
463
|
component: x = "button",
|
|
461
464
|
className: z,
|
|
462
465
|
disabled: I = !1,
|
|
@@ -470,17 +473,17 @@ const io = (o) => {
|
|
|
470
473
|
loadingIndicator: V,
|
|
471
474
|
loadingPosition: v = "center",
|
|
472
475
|
size: j = "medium",
|
|
473
|
-
startIcon:
|
|
474
|
-
type:
|
|
476
|
+
startIcon: m,
|
|
477
|
+
type: w,
|
|
475
478
|
variant: D = "text",
|
|
476
479
|
...F
|
|
477
|
-
} = g,
|
|
478
|
-
"aria-labelledby":
|
|
480
|
+
} = g, h = oo(P), $ = V ?? /* @__PURE__ */ d(no, {
|
|
481
|
+
"aria-labelledby": h,
|
|
479
482
|
color: "inherit",
|
|
480
483
|
size: 16
|
|
481
484
|
}), l = {
|
|
482
485
|
...g,
|
|
483
|
-
color:
|
|
486
|
+
color: b,
|
|
484
487
|
component: x,
|
|
485
488
|
disabled: I,
|
|
486
489
|
disableElevation: L,
|
|
@@ -490,12 +493,12 @@ const io = (o) => {
|
|
|
490
493
|
loadingIndicator: $,
|
|
491
494
|
loadingPosition: v,
|
|
492
495
|
size: j,
|
|
493
|
-
type:
|
|
496
|
+
type: w,
|
|
494
497
|
variant: D
|
|
495
|
-
}, e = io(l), G = (
|
|
498
|
+
}, e = io(l), G = (m || s && v === "start") && /* @__PURE__ */ d(eo, {
|
|
496
499
|
className: e.startIcon,
|
|
497
500
|
ownerState: l,
|
|
498
|
-
children:
|
|
501
|
+
children: m || /* @__PURE__ */ d(E, {
|
|
499
502
|
className: e.loadingIconPlaceholder,
|
|
500
503
|
ownerState: l
|
|
501
504
|
})
|
|
@@ -520,7 +523,7 @@ const io = (o) => {
|
|
|
520
523
|
})
|
|
521
524
|
})
|
|
522
525
|
) : null;
|
|
523
|
-
return /* @__PURE__ */
|
|
526
|
+
return /* @__PURE__ */ Z(ro, {
|
|
524
527
|
ownerState: l,
|
|
525
528
|
className: R(i.className, e.root, z, _),
|
|
526
529
|
component: x,
|
|
@@ -528,8 +531,8 @@ const io = (o) => {
|
|
|
528
531
|
focusRipple: !B,
|
|
529
532
|
focusVisibleClassName: R(e.focusVisible, M),
|
|
530
533
|
ref: a,
|
|
531
|
-
type:
|
|
532
|
-
id: s ?
|
|
534
|
+
type: w,
|
|
535
|
+
id: s ? h : P,
|
|
533
536
|
...F,
|
|
534
537
|
classes: e,
|
|
535
538
|
children: [G, v !== "end" && N, S, v === "end" && N, U]
|