@hai-dev/ui-kit 1.1.9 → 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.
Files changed (33) hide show
  1. package/dist/{Box-CykjCaXY.js → Box-TrgOqpYk.js} +2 -2
  2. package/dist/{Button-CcvrOEKV.js → Button-BN3fv8kr.js} +7 -7
  3. package/dist/{ButtonBase-DPLf5-lz.js → ButtonBase-CSWuFxUv.js} +3 -3
  4. package/dist/{CircularProgress-CrHaMZDC.js → CircularProgress-sPARyPfh.js} +7 -7
  5. package/dist/{Dialog-DnhJBaR4.js → Dialog-Cf0d7zi7.js} +18 -45
  6. package/dist/{DialogTitle-CeM_Z851.js → DialogTitle-BtvmXSZP.js} +10 -10
  7. package/dist/{Typography-DDVoglvI.js → Typography-Bjd6ZHeX.js} +6 -6
  8. package/dist/assets/upload-dialog.css +1 -1
  9. package/dist/chainPropTypes-DiJb1lGa.js +568 -0
  10. package/dist/components/button/button-content.js +1 -1
  11. package/dist/components/button/button.js +2 -2
  12. package/dist/components/button/utils/get-button-classnames.js +1 -1
  13. package/dist/components/circular-progress-loader/circular-progress-loader.js +4 -4
  14. package/dist/components/code-input/code-input.js +8 -8
  15. package/dist/components/index.js +10 -10
  16. package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +9 -9
  17. package/dist/components/photo-crop-uploader/components/index.js +4 -4
  18. package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +2 -2
  19. package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +2 -2
  20. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +3 -3
  21. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +11 -11
  22. package/dist/components/photo-crop-uploader/photo-crop-uploader.js +1 -1
  23. package/dist/{createTheme-RRQUOQoF.js → createTheme-D8R2Cz2N.js} +265 -310
  24. package/dist/{extendSxProp-VC2-7DJw.js → extendSxProp-Cw_ym9sl.js} +6 -6
  25. package/dist/{index-BMkXyDFs.js → index-CL3JU48X.js} +5 -5
  26. package/dist/{index-B2JRaoNz.js → index-YnD2EP-S.js} +0 -5
  27. package/dist/index.js +8 -8
  28. package/dist/{memoTheme-5A7c_y33.js → memoTheme-D5VCpQCz.js} +1 -1
  29. package/dist/refType-CUEs_vK5.js +61 -0
  30. package/dist/{upload-dialog-errors-Bxun25O-.js → upload-dialog-errors-Cyz6_7n4.js} +5 -5
  31. package/package.json +67 -40
  32. package/dist/chainPropTypes-C04Ex8aP.js +0 -413
  33. package/dist/refType-CCKoQjVR.js +0 -61
@@ -1,413 +0,0 @@
1
- import { r as Z, m as G, w as z, f as ee, u as W, n as te, o as re, E as ne, p as se, q as H, k as P, h as oe, t as ie, s as ae, d as J, i as ue, b as le, c as fe, P as D, e as ce, T as ye } from "./createTheme-RRQUOQoF.js";
2
- import * as E from "react";
3
- import "react/jsx-runtime";
4
- var L, X;
5
- function de() {
6
- if (X) return L;
7
- X = 1;
8
- var e = Z(), t = {
9
- childContextTypes: !0,
10
- contextType: !0,
11
- contextTypes: !0,
12
- defaultProps: !0,
13
- displayName: !0,
14
- getDefaultProps: !0,
15
- getDerivedStateFromError: !0,
16
- getDerivedStateFromProps: !0,
17
- mixins: !0,
18
- propTypes: !0,
19
- type: !0
20
- }, n = {
21
- name: !0,
22
- length: !0,
23
- prototype: !0,
24
- caller: !0,
25
- callee: !0,
26
- arguments: !0,
27
- arity: !0
28
- }, r = {
29
- $$typeof: !0,
30
- render: !0,
31
- defaultProps: !0,
32
- displayName: !0,
33
- propTypes: !0
34
- }, i = {
35
- $$typeof: !0,
36
- compare: !0,
37
- defaultProps: !0,
38
- displayName: !0,
39
- propTypes: !0,
40
- type: !0
41
- }, s = {};
42
- s[e.ForwardRef] = r, s[e.Memo] = i;
43
- function o(p) {
44
- return e.isMemo(p) ? i : s[p.$$typeof] || t;
45
- }
46
- var a = Object.defineProperty, f = Object.getOwnPropertyNames, u = Object.getOwnPropertySymbols, y = Object.getOwnPropertyDescriptor, N = Object.getPrototypeOf, A = Object.prototype;
47
- function b(p, m, R) {
48
- if (typeof m != "string") {
49
- if (A) {
50
- var x = N(m);
51
- x && x !== A && b(p, x, R);
52
- }
53
- var v = f(m);
54
- u && (v = v.concat(u(m)));
55
- for (var O = o(p), _ = o(m), T = 0; T < v.length; ++T) {
56
- var l = v[T];
57
- if (!n[l] && !(R && R[l]) && !(_ && _[l]) && !(O && O[l])) {
58
- var c = y(m, l);
59
- try {
60
- a(p, l, c);
61
- } catch {
62
- }
63
- }
64
- }
65
- }
66
- return p;
67
- }
68
- return L = b, L;
69
- }
70
- de();
71
- var k = function(t, n) {
72
- var r = arguments;
73
- if (n == null || !re.call(n, "css"))
74
- return E.createElement.apply(void 0, r);
75
- var i = r.length, s = new Array(i);
76
- s[0] = ne, s[1] = se(t, n);
77
- for (var o = 2; o < i; o++)
78
- s[o] = r[o];
79
- return E.createElement.apply(null, s);
80
- };
81
- (function(e) {
82
- var t;
83
- t || (t = e.JSX || (e.JSX = {}));
84
- })(k || (k = {}));
85
- var Fe = /* @__PURE__ */ z(function(e, t) {
86
- var n = e.styles, r = G([n], void 0, E.useContext(ee)), i = E.useRef();
87
- return W(function() {
88
- var s = t.key + "-global", o = new t.sheet.constructor({
89
- key: s,
90
- nonce: t.sheet.nonce,
91
- container: t.sheet.container,
92
- speedy: t.sheet.isSpeedy
93
- }), a = !1, f = document.querySelector('style[data-emotion="' + s + " " + r.name + '"]');
94
- return t.sheet.tags.length && (o.before = t.sheet.tags[0]), f !== null && (a = !0, f.setAttribute("data-emotion", s), o.hydrate([f])), i.current = [o, a], function() {
95
- o.flush();
96
- };
97
- }, [t]), W(function() {
98
- var s = i.current, o = s[0], a = s[1];
99
- if (a) {
100
- s[1] = !1;
101
- return;
102
- }
103
- if (r.next !== void 0 && te(t, r.next, !0), o.tags.length) {
104
- var f = o.tags[o.tags.length - 1].nextElementSibling;
105
- o.before = f, o.flush();
106
- }
107
- t.insert("", r, o, !1);
108
- }, [t, r.name]), null;
109
- });
110
- function me() {
111
- for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
112
- t[n] = arguments[n];
113
- return G(t);
114
- }
115
- function De() {
116
- var e = me.apply(void 0, arguments), t = "animation-" + e.name;
117
- return {
118
- name: t,
119
- styles: "@keyframes " + t + "{" + e.styles + "}",
120
- anim: 1,
121
- toString: function() {
122
- return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
123
- }
124
- };
125
- }
126
- function B(e, t = "") {
127
- return e.displayName || e.name || t;
128
- }
129
- function K(e, t, n) {
130
- const r = B(t);
131
- return e.displayName || (r !== "" ? `${n}(${r})` : n);
132
- }
133
- function he(e) {
134
- if (e != null) {
135
- if (typeof e == "string")
136
- return e;
137
- if (typeof e == "function")
138
- return B(e, "Component");
139
- if (typeof e == "object")
140
- switch (e.$$typeof) {
141
- case H.ForwardRef:
142
- return K(e, e.render, "ForwardRef");
143
- case H.Memo:
144
- return K(e, e.type, "memo");
145
- default:
146
- return;
147
- }
148
- }
149
- }
150
- function pe(e) {
151
- const {
152
- variants: t,
153
- ...n
154
- } = e, r = {
155
- variants: t,
156
- style: P(n),
157
- isProcessed: !0
158
- };
159
- return r.style === n || t && t.forEach((i) => {
160
- typeof i.style != "function" && (i.style = P(i.style));
161
- }), r;
162
- }
163
- const ve = oe();
164
- function V(e) {
165
- return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as";
166
- }
167
- function w(e, t) {
168
- return t && e && typeof e == "object" && e.styles && !e.styles.startsWith("@layer") && (e.styles = `@layer ${t}{${String(e.styles)}}`), e;
169
- }
170
- function Se(e) {
171
- return e ? (t, n) => n[e] : null;
172
- }
173
- function ge(e, t, n) {
174
- e.theme = Te(e.theme) ? n : e.theme[t] || e.theme;
175
- }
176
- function F(e, t, n) {
177
- const r = typeof t == "function" ? t(e) : t;
178
- if (Array.isArray(r))
179
- return r.flatMap((i) => F(e, i, n));
180
- if (Array.isArray(r?.variants)) {
181
- let i;
182
- if (r.isProcessed)
183
- i = n ? w(r.style, n) : r.style;
184
- else {
185
- const {
186
- variants: s,
187
- ...o
188
- } = r;
189
- i = n ? w(P(o), n) : o;
190
- }
191
- return Y(e, r.variants, [i], n);
192
- }
193
- return r?.isProcessed ? n ? w(P(r.style), n) : r.style : n ? w(P(r), n) : r;
194
- }
195
- function Y(e, t, n = [], r = void 0) {
196
- let i;
197
- e: for (let s = 0; s < t.length; s += 1) {
198
- const o = t[s];
199
- if (typeof o.props == "function") {
200
- if (i ??= {
201
- ...e,
202
- ...e.ownerState,
203
- ownerState: e.ownerState
204
- }, !o.props(i))
205
- continue;
206
- } else
207
- for (const a in o.props)
208
- if (e[a] !== o.props[a] && e.ownerState?.[a] !== o.props[a])
209
- continue e;
210
- typeof o.style == "function" ? (i ??= {
211
- ...e,
212
- ...e.ownerState,
213
- ownerState: e.ownerState
214
- }, n.push(r ? w(P(o.style(i)), r) : o.style(i))) : n.push(r ? w(P(o.style), r) : o.style);
215
- }
216
- return n;
217
- }
218
- function we(e = {}) {
219
- const {
220
- themeId: t,
221
- defaultTheme: n = ve,
222
- rootShouldForwardProp: r = V,
223
- slotShouldForwardProp: i = V
224
- } = e;
225
- function s(a) {
226
- ge(a, t, n);
227
- }
228
- return (a, f = {}) => {
229
- ie(a, (l) => l.filter((c) => c !== J));
230
- const {
231
- name: u,
232
- slot: y,
233
- skipVariantsResolver: N,
234
- skipSx: A,
235
- // TODO v6: remove `lowercaseFirstLetter()` in the next major release
236
- // For more details: https://github.com/mui/material-ui/pull/37908
237
- overridesResolver: b = Se(Q(y)),
238
- ...p
239
- } = f, m = u && u.startsWith("Mui") || y ? "components" : "custom", R = N !== void 0 ? N : (
240
- // TODO v6: remove `Root` in the next major release
241
- // For more details: https://github.com/mui/material-ui/pull/37908
242
- y && y !== "Root" && y !== "root" || !1
243
- ), x = A || !1;
244
- let v = V;
245
- y === "Root" || y === "root" ? v = r : y ? v = i : Ee(a) && (v = void 0);
246
- const O = ae(a, {
247
- shouldForwardProp: v,
248
- label: Oe(u, y),
249
- ...p
250
- }), _ = (l) => {
251
- if (l.__emotion_real === l)
252
- return l;
253
- if (typeof l == "function")
254
- return function(g) {
255
- return F(g, l, g.theme.modularCssLayers ? m : void 0);
256
- };
257
- if (ue(l)) {
258
- const c = pe(l);
259
- return function(S) {
260
- return c.variants ? F(S, c, S.theme.modularCssLayers ? m : void 0) : S.theme.modularCssLayers ? w(c.style, m) : c.style;
261
- };
262
- }
263
- return l;
264
- }, T = (...l) => {
265
- const c = [], g = l.map(_), S = [];
266
- if (c.push(s), u && b && S.push(function(d) {
267
- const h = d.theme.components?.[u]?.styleOverrides;
268
- if (!h)
269
- return null;
270
- const C = {};
271
- for (const q in h)
272
- C[q] = F(d, h[q], d.theme.modularCssLayers ? "theme" : void 0);
273
- return b(d, C);
274
- }), u && !R && S.push(function(d) {
275
- const h = d.theme?.components?.[u]?.variants;
276
- return h ? Y(d, h, [], d.theme.modularCssLayers ? "theme" : void 0) : null;
277
- }), x || S.push(J), Array.isArray(g[0])) {
278
- const $ = g.shift(), d = new Array(c.length).fill(""), j = new Array(S.length).fill("");
279
- let h;
280
- h = [...d, ...$, ...j], h.raw = [...d, ...$.raw, ...j], c.unshift(h);
281
- }
282
- const U = [...c, ...g, ...S], I = O(...U);
283
- return a.muiName && (I.muiName = a.muiName), process.env.NODE_ENV !== "production" && (I.displayName = Pe(u, y, a)), I;
284
- };
285
- return O.withConfig && (T.withConfig = O.withConfig), T;
286
- };
287
- }
288
- function Pe(e, t, n) {
289
- return e ? `${e}${le(t || "")}` : `Styled(${he(n)})`;
290
- }
291
- function Oe(e, t) {
292
- let n;
293
- return process.env.NODE_ENV !== "production" && e && (n = `${e}-${Q(t || "Root")}`), n;
294
- }
295
- function Te(e) {
296
- for (const t in e)
297
- return !1;
298
- return !0;
299
- }
300
- function Ee(e) {
301
- return typeof e == "string" && // 96 is one less than the char code
302
- // for "a" so this is checking that
303
- // it's a lowercase character
304
- e.charCodeAt(0) > 96;
305
- }
306
- function Q(e) {
307
- return e && e.charAt(0).toLowerCase() + e.slice(1);
308
- }
309
- function M(e, t, n = !1) {
310
- const r = {
311
- ...t
312
- };
313
- for (const i in e)
314
- if (Object.prototype.hasOwnProperty.call(e, i)) {
315
- const s = i;
316
- if (s === "components" || s === "slots")
317
- r[s] = {
318
- ...e[s],
319
- ...r[s]
320
- };
321
- else if (s === "componentsProps" || s === "slotProps") {
322
- const o = e[s], a = t[s];
323
- if (!a)
324
- r[s] = o || {};
325
- else if (!o)
326
- r[s] = a;
327
- else {
328
- r[s] = {
329
- ...a
330
- };
331
- for (const f in o)
332
- if (Object.prototype.hasOwnProperty.call(o, f)) {
333
- const u = f;
334
- r[s][u] = M(o[u], a[u], n);
335
- }
336
- }
337
- } else s === "className" && n && t.className ? r.className = fe(e?.className, t?.className) : s === "style" && n && t.style ? r.style = {
338
- ...e?.style,
339
- ...t?.style
340
- } : r[s] === void 0 && (r[s] = e[s]);
341
- }
342
- return r;
343
- }
344
- const be = /* @__PURE__ */ E.createContext(void 0);
345
- process.env.NODE_ENV !== "production" && (D.node, D.object);
346
- function Re(e) {
347
- const {
348
- theme: t,
349
- name: n,
350
- props: r
351
- } = e;
352
- if (!t || !t.components || !t.components[n])
353
- return r;
354
- const i = t.components[n];
355
- return i.defaultProps ? M(i.defaultProps, r, t.components.mergeClassNameAndStyle) : !i.styleOverrides && !i.variants ? M(i, r, t.components.mergeClassNameAndStyle) : r;
356
- }
357
- function xe({
358
- props: e,
359
- name: t
360
- }) {
361
- const n = E.useContext(be);
362
- return Re({
363
- props: e,
364
- name: t,
365
- theme: {
366
- components: n
367
- }
368
- });
369
- }
370
- function Ie(e, t, n = void 0) {
371
- const r = {};
372
- for (const i in e) {
373
- const s = e[i];
374
- let o = "", a = !0;
375
- for (let f = 0; f < s.length; f += 1) {
376
- const u = s[f];
377
- u && (o += (a === !0 ? "" : " ") + t(u), a = !1, n && n[u] && (o += " " + n[u]));
378
- }
379
- r[i] = o;
380
- }
381
- return r;
382
- }
383
- const Ne = ce();
384
- function Ae(e) {
385
- return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as";
386
- }
387
- const _e = (e) => Ae(e) && e !== "classes", Le = we({
388
- themeId: ye,
389
- defaultTheme: Ne,
390
- rootShouldForwardProp: _e
391
- });
392
- process.env.NODE_ENV !== "production" && (D.node, D.object.isRequired);
393
- function Ve(e) {
394
- return xe(e);
395
- }
396
- function Me(e, t) {
397
- return process.env.NODE_ENV === "production" ? () => null : function(...r) {
398
- return e(...r) || t(...r);
399
- };
400
- }
401
- export {
402
- Fe as G,
403
- me as a,
404
- Me as b,
405
- Ie as c,
406
- M as d,
407
- Ne as e,
408
- De as k,
409
- pe as p,
410
- _e as r,
411
- Le as s,
412
- Ve as u
413
- };
@@ -1,61 +0,0 @@
1
- import * as u from "react";
2
- import { P as i } from "./createTheme-RRQUOQoF.js";
3
- import { b as a } from "./chainPropTypes-C04Ex8aP.js";
4
- const s = typeof window < "u" ? u.useLayoutEffect : u.useEffect;
5
- function E(n) {
6
- const e = u.useRef(n);
7
- return s(() => {
8
- e.current = n;
9
- }), u.useRef((...c) => (
10
- // @ts-expect-error hide `this`
11
- (0, e.current)(...c)
12
- )).current;
13
- }
14
- function R(...n) {
15
- const e = u.useRef(void 0), c = u.useCallback((r) => {
16
- const l = n.map((t) => {
17
- if (t == null)
18
- return null;
19
- if (typeof t == "function") {
20
- const f = t, o = f(r);
21
- return typeof o == "function" ? o : () => {
22
- f(null);
23
- };
24
- }
25
- return t.current = r, () => {
26
- t.current = null;
27
- };
28
- });
29
- return () => {
30
- l.forEach((t) => t?.());
31
- };
32
- }, n);
33
- return u.useMemo(() => n.every((r) => r == null) ? null : (r) => {
34
- e.current && (e.current(), e.current = void 0), r != null && (e.current = c(r));
35
- }, n);
36
- }
37
- function p(n) {
38
- const {
39
- prototype: e = {}
40
- } = n;
41
- return !!e.isReactComponent;
42
- }
43
- function d(n, e, c, r, l) {
44
- const t = n[e], f = l || e;
45
- if (t == 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 t == "function" && !p(t) && (o = "Did you accidentally provide a plain function component instead?"), o !== void 0 ? new Error(`Invalid ${r} \`${f}\` supplied to \`${c}\`. Expected an element type that can hold a ref. ${o} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
53
- }
54
- const h = a(i.elementType, d), w = i.oneOfType([i.func, i.object]);
55
- export {
56
- E as a,
57
- s as b,
58
- h as e,
59
- w as r,
60
- R as u
61
- };