@hai-dev/ui-kit 1.2.1 → 1.2.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.
Files changed (56) hide show
  1. package/dist/assets/button.css +1 -1
  2. package/dist/assets/circular-progress-loader.css +1 -1
  3. package/dist/assets/code-input.css +1 -1
  4. package/dist/assets/error-upload-dialog.css +1 -1
  5. package/dist/assets/upload-dialog-errors.css +1 -1
  6. package/dist/button.module-BnTmlu-U.js +40 -0
  7. package/dist/components/button/button-content.js +8 -8
  8. package/dist/components/button/button.js +21 -22
  9. package/dist/components/button/utils/get-button-classnames.js +10 -10
  10. package/dist/components/circular-progress-loader/circular-progress-loader.js +25 -28
  11. package/dist/components/code-input/code-input.js +129 -912
  12. package/dist/components/code-input/constants.d.ts +1 -0
  13. package/dist/components/code-input/constants.js +9 -8
  14. package/dist/components/code-input/types.d.ts +1 -0
  15. package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +46 -94
  16. package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +38 -120
  17. package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +16 -16
  18. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +4 -4
  19. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +113 -404
  20. package/dist/components/photo-crop-uploader/constants.d.ts +2 -2
  21. package/dist/components/photo-crop-uploader/constants.js +1 -1
  22. package/dist/components/photo-crop-uploader/errors/photo-size.error.d.ts +1 -1
  23. package/dist/components/photo-crop-uploader/errors/photo-size.error.js +17 -12
  24. package/dist/components/photo-crop-uploader/locale.js +2 -2
  25. package/dist/components/photo-crop-uploader/photo-crop-uploader.js +45 -38
  26. package/dist/components/photo-crop-uploader/utils/draw-cropped-image.js +8 -8
  27. package/dist/components/photo-crop-uploader/utils/get-cropped-source.js +10 -10
  28. package/dist/components/photo-crop-uploader/utils/get-default-cropped-photo.js +10 -10
  29. package/dist/components/photo-crop-uploader/utils/get-photo-crop.js +18 -18
  30. package/dist/components/photo-crop-uploader/utils/read-photo.d.ts +1 -1
  31. package/dist/components/photo-crop-uploader/utils/read-photo.js +39 -39
  32. package/dist/raw-cross-BhC4FBfp.js +4 -0
  33. package/dist/upload-dialog-errors-BIwMA_MN.js +89 -0
  34. package/package.json +1 -1
  35. package/dist/Box-BgNAyP2L.js +0 -56
  36. package/dist/Button-DTV8ztWw.js +0 -660
  37. package/dist/ButtonBase-C4krg_zd.js +0 -913
  38. package/dist/CircularProgress-BoaEg4rF.js +0 -274
  39. package/dist/Dialog-BK9lMUKV.js +0 -2632
  40. package/dist/DialogTitle-ByUfLB5M.js +0 -254
  41. package/dist/Typography-BMyz0ZCh.js +0 -255
  42. package/dist/assets/inter.css +0 -1
  43. package/dist/button.module-C0UNQnBk.js +0 -40
  44. package/dist/chainPropTypes-DgqFdXGi.js +0 -532
  45. package/dist/createSimplePaletteValueFilter-B7--0ryQ.js +0 -17
  46. package/dist/createTheme-BoOmbNvy.js +0 -4119
  47. package/dist/extendSxProp-BaUCVMKV.js +0 -50
  48. package/dist/index-CcueJ2sD.js +0 -432
  49. package/dist/index-YnD2EP-S.js +0 -43
  50. package/dist/index-h5oTv8GF.js +0 -91
  51. package/dist/isHostComponent-Dm_U9uOy.js +0 -14
  52. package/dist/memoTheme-BYBJ2Fe6.js +0 -15
  53. package/dist/refType-CsohaiiT.js +0 -60
  54. package/dist/upload-dialog-errors-BwQsTOc3.js +0 -367
  55. package/dist/useEnhancedEffect-CJGo-L3B.js +0 -5
  56. package/dist/useId-CK6Kn3Tn.js +0 -21
@@ -1,274 +0,0 @@
1
- import * as O from "react";
2
- import { g as N, a as j, c as R, b as l, P as e } from "./createTheme-BoOmbNvy.js";
3
- import { m as g } from "./memoTheme-BYBJ2Fe6.js";
4
- import { c as U } from "./createSimplePaletteValueFilter-B7--0ryQ.js";
5
- import { jsx as y, jsxs as E } from "react/jsx-runtime";
6
- import { u as I, c as z, s as p, k as w, a as T, b as F } from "./chainPropTypes-DgqFdXGi.js";
7
- function V(r) {
8
- return N("MuiCircularProgress", r);
9
- }
10
- j("MuiCircularProgress", ["root", "determinate", "indeterminate", "colorPrimary", "colorSecondary", "svg", "track", "circle", "circleDeterminate", "circleIndeterminate", "circleDisableShrink"]);
11
- const a = 44, k = w`
12
- 0% {
13
- transform: rotate(0deg);
14
- }
15
-
16
- 100% {
17
- transform: rotate(360deg);
18
- }
19
- `, v = w`
20
- 0% {
21
- stroke-dasharray: 1px, 200px;
22
- stroke-dashoffset: 0;
23
- }
24
-
25
- 50% {
26
- stroke-dasharray: 100px, 200px;
27
- stroke-dashoffset: -15px;
28
- }
29
-
30
- 100% {
31
- stroke-dasharray: 1px, 200px;
32
- stroke-dashoffset: -126px;
33
- }
34
- `, A = typeof k != "string" ? T`
35
- animation: ${k} 1.4s linear infinite;
36
- ` : null, K = typeof v != "string" ? T`
37
- animation: ${v} 1.4s ease-in-out infinite;
38
- ` : null, W = (r) => {
39
- const {
40
- classes: t,
41
- variant: s,
42
- color: n,
43
- disableShrink: m
44
- } = r, u = {
45
- root: ["root", s, `color${l(n)}`],
46
- svg: ["svg"],
47
- track: ["track"],
48
- circle: ["circle", `circle${l(s)}`, m && "circleDisableShrink"]
49
- };
50
- return z(u, V, t);
51
- }, B = p("span", {
52
- name: "MuiCircularProgress",
53
- slot: "Root",
54
- overridesResolver: (r, t) => {
55
- const {
56
- ownerState: s
57
- } = r;
58
- return [t.root, t[s.variant], t[`color${l(s.color)}`]];
59
- }
60
- })(g(({
61
- theme: r
62
- }) => ({
63
- display: "inline-block",
64
- variants: [{
65
- props: {
66
- variant: "determinate"
67
- },
68
- style: {
69
- transition: r.transitions.create("transform")
70
- }
71
- }, {
72
- props: {
73
- variant: "indeterminate"
74
- },
75
- style: A || {
76
- animation: `${k} 1.4s linear infinite`
77
- }
78
- }, ...Object.entries(r.palette).filter(U()).map(([t]) => ({
79
- props: {
80
- color: t
81
- },
82
- style: {
83
- color: (r.vars || r).palette[t].main
84
- }
85
- }))]
86
- }))), G = p("svg", {
87
- name: "MuiCircularProgress",
88
- slot: "Svg"
89
- })({
90
- display: "block"
91
- // Keeps the progress centered
92
- }), Y = p("circle", {
93
- name: "MuiCircularProgress",
94
- slot: "Circle",
95
- overridesResolver: (r, t) => {
96
- const {
97
- ownerState: s
98
- } = r;
99
- return [t.circle, t[`circle${l(s.variant)}`], s.disableShrink && t.circleDisableShrink];
100
- }
101
- })(g(({
102
- theme: r
103
- }) => ({
104
- stroke: "currentColor",
105
- variants: [{
106
- props: {
107
- variant: "determinate"
108
- },
109
- style: {
110
- transition: r.transitions.create("stroke-dashoffset")
111
- }
112
- }, {
113
- props: {
114
- variant: "indeterminate"
115
- },
116
- style: {
117
- // Some default value that looks fine waiting for the animation to kicks in.
118
- strokeDasharray: "80px, 200px",
119
- strokeDashoffset: 0
120
- // Add the unit to fix a Edge 16 and below bug.
121
- }
122
- }, {
123
- props: ({
124
- ownerState: t
125
- }) => t.variant === "indeterminate" && !t.disableShrink,
126
- style: K || {
127
- // At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
128
- animation: `${v} 1.4s ease-in-out infinite`
129
- }
130
- }]
131
- }))), Z = p("circle", {
132
- name: "MuiCircularProgress",
133
- slot: "Track"
134
- })(g(({
135
- theme: r
136
- }) => ({
137
- stroke: "currentColor",
138
- opacity: (r.vars || r).palette.action.activatedOpacity
139
- }))), _ = /* @__PURE__ */ O.forwardRef(function(t, s) {
140
- const n = I({
141
- props: t,
142
- name: "MuiCircularProgress"
143
- }), {
144
- className: m,
145
- color: u = "primary",
146
- disableShrink: $ = !1,
147
- enableTrackSlot: b = !1,
148
- size: f = 40,
149
- style: D,
150
- thickness: o = 3.6,
151
- value: d = 0,
152
- variant: S = "indeterminate",
153
- ...M
154
- } = n, i = {
155
- ...n,
156
- color: u,
157
- disableShrink: $,
158
- size: f,
159
- thickness: o,
160
- value: d,
161
- variant: S,
162
- enableTrackSlot: b
163
- }, c = W(i), h = {}, C = {}, P = {};
164
- if (S === "determinate") {
165
- const x = 2 * Math.PI * ((a - o) / 2);
166
- h.strokeDasharray = x.toFixed(3), P["aria-valuenow"] = Math.round(d), h.strokeDashoffset = `${((100 - d) / 100 * x).toFixed(3)}px`, C.transform = "rotate(-90deg)";
167
- }
168
- return /* @__PURE__ */ y(B, {
169
- className: R(c.root, m),
170
- style: {
171
- width: f,
172
- height: f,
173
- ...C,
174
- ...D
175
- },
176
- ownerState: i,
177
- ref: s,
178
- role: "progressbar",
179
- ...P,
180
- ...M,
181
- children: /* @__PURE__ */ E(G, {
182
- className: c.svg,
183
- ownerState: i,
184
- viewBox: `${a / 2} ${a / 2} ${a} ${a}`,
185
- children: [b ? /* @__PURE__ */ y(Z, {
186
- className: c.track,
187
- ownerState: i,
188
- cx: a,
189
- cy: a,
190
- r: (a - o) / 2,
191
- fill: "none",
192
- strokeWidth: o,
193
- "aria-hidden": "true"
194
- }) : null, /* @__PURE__ */ y(Y, {
195
- className: c.circle,
196
- style: h,
197
- ownerState: i,
198
- cx: a,
199
- cy: a,
200
- r: (a - o) / 2,
201
- fill: "none",
202
- strokeWidth: o
203
- })]
204
- })
205
- });
206
- });
207
- process.env.NODE_ENV !== "production" && (_.propTypes = {
208
- // ┌────────────────────────────── Warning ──────────────────────────────┐
209
- // │ These PropTypes are generated from the TypeScript type definitions. │
210
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
211
- // └─────────────────────────────────────────────────────────────────────┘
212
- /**
213
- * Override or extend the styles applied to the component.
214
- */
215
- classes: e.object,
216
- /**
217
- * @ignore
218
- */
219
- className: e.string,
220
- /**
221
- * The color of the component.
222
- * It supports both default and custom theme colors, which can be added as shown in the
223
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
224
- * @default 'primary'
225
- */
226
- color: e.oneOfType([e.oneOf(["inherit", "primary", "secondary", "error", "info", "success", "warning"]), e.string]),
227
- /**
228
- * If `true`, the shrink animation is disabled.
229
- * This only works if variant is `indeterminate`.
230
- * @default false
231
- */
232
- disableShrink: F(e.bool, (r) => r.disableShrink && r.variant && r.variant !== "indeterminate" ? new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect.") : null),
233
- /**
234
- * If `true`, a track circle slot is mounted to show a subtle background for the progress.
235
- * The `size` and `thickness` apply to the track slot to be consistent with the progress circle.
236
- * @default false
237
- */
238
- enableTrackSlot: e.bool,
239
- /**
240
- * The size of the component.
241
- * If using a number, the pixel unit is assumed.
242
- * If using a string, you need to provide the CSS unit, for example '3rem'.
243
- * @default 40
244
- */
245
- size: e.oneOfType([e.number, e.string]),
246
- /**
247
- * @ignore
248
- */
249
- style: e.object,
250
- /**
251
- * The system prop that allows defining system overrides as well as additional CSS styles.
252
- */
253
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
254
- /**
255
- * The thickness of the circle.
256
- * @default 3.6
257
- */
258
- thickness: e.number,
259
- /**
260
- * The value of the progress indicator for the determinate variant.
261
- * Value between 0 and 100.
262
- * @default 0
263
- */
264
- value: e.number,
265
- /**
266
- * The variant to use.
267
- * Use indeterminate when there is no progress value.
268
- * @default 'indeterminate'
269
- */
270
- variant: e.oneOf(["determinate", "indeterminate"])
271
- });
272
- export {
273
- _ as C
274
- };