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