@hai-dev/ui-kit 1.0.11 → 1.1.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.
Files changed (73) hide show
  1. package/dist/{Box-D8oKffw9.js → Box-CykjCaXY.js} +21 -22
  2. package/dist/{Button-BBF8hp7e.js → Button-CcvrOEKV.js} +6 -5
  3. package/dist/{ButtonBase-T2KH9jsD.js → ButtonBase-DPLf5-lz.js} +226 -279
  4. package/dist/{CircularProgress-BQQkuSse.js → CircularProgress-CrHaMZDC.js} +4 -3
  5. package/dist/{Dialog-B97c7WYP.js → Dialog-DqFOpJyx.js} +118 -125
  6. package/dist/{DialogTitle-Du4tqTs0.js → DialogTitle-CeM_Z851.js} +4 -4
  7. package/dist/{Typography-r_TXEM1e.js → Typography-DDVoglvI.js} +38 -40
  8. package/dist/assets/centered-decorator.css +1 -0
  9. package/dist/assets/circular-progress-loader.css +1 -1
  10. package/dist/assets/code-input.css +1 -0
  11. package/dist/assets/dark-decorator.css +1 -0
  12. package/dist/assets/upload-dialog-errors.css +1 -1
  13. package/dist/chainPropTypes-C04Ex8aP.js +413 -0
  14. package/dist/components/button/button.js +1 -1
  15. package/dist/components/circular-progress-loader/circular-progress-loader.js +29 -27
  16. package/dist/components/circular-progress-loader/constants.d.ts +3 -1
  17. package/dist/components/circular-progress-loader/constants.js +4 -2
  18. package/dist/components/code-input/code-input.d.ts +3 -0
  19. package/dist/components/code-input/code-input.js +934 -0
  20. package/dist/components/code-input/code-input.stories.d.ts +7 -0
  21. package/dist/components/code-input/constants.d.ts +8 -0
  22. package/dist/components/code-input/constants.js +11 -0
  23. package/dist/components/code-input/index.d.ts +1 -0
  24. package/dist/components/code-input/index.js +4 -0
  25. package/dist/components/code-input/types.d.ts +11 -0
  26. package/dist/components/code-input/utils/get-code-input-label.d.ts +2 -0
  27. package/dist/components/code-input/utils/get-code-input-label.js +5 -0
  28. package/dist/components/code-input/utils/index.d.ts +2 -0
  29. package/dist/components/code-input/utils/index.js +6 -0
  30. package/dist/components/code-input/utils/slide-down-animate.d.ts +1 -0
  31. package/dist/components/code-input/utils/slide-down-animate.js +10 -0
  32. package/dist/components/index.d.ts +1 -0
  33. package/dist/components/index.js +4 -2
  34. package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +6 -6
  35. package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +1 -1
  36. package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +1 -1
  37. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +2 -2
  38. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +12 -10
  39. package/dist/components/photo-crop-uploader/photo-crop-uploader.d.ts +2 -2
  40. package/dist/components/photo-crop-uploader/photo-crop-uploader.js +183 -168
  41. package/dist/components/photo-crop-uploader/types.d.ts +8 -7
  42. package/dist/components/photo-crop-uploader/utils/draw-cropped-image.js +28 -29
  43. package/dist/components/photo-crop-uploader/utils/get-default-cropped-photo.d.ts +4 -2
  44. package/dist/components/photo-crop-uploader/utils/get-default-cropped-photo.js +34 -32
  45. package/dist/createSimplePaletteValueFilter-B7--0ryQ.js +17 -0
  46. package/dist/{createTheme-RvzX1VSA.js → createTheme-RRQUOQoF.js} +182 -178
  47. package/dist/decorators/centered-decorator/centered-decorator.js +7 -0
  48. package/dist/decorators/centered-decorator/index.d.ts +2 -0
  49. package/dist/decorators/centered-decorator/index.js +4 -0
  50. package/dist/decorators/centered-decorator/types.js +1 -0
  51. package/dist/decorators/dark-decorator/dark-decorator.d.ts +3 -0
  52. package/dist/decorators/dark-decorator/dark-decorator.js +7 -0
  53. package/dist/decorators/dark-decorator/index.d.ts +2 -0
  54. package/dist/decorators/dark-decorator/index.js +4 -0
  55. package/dist/decorators/dark-decorator/types.d.ts +4 -0
  56. package/dist/decorators/dark-decorator/types.js +1 -0
  57. package/dist/decorators/index.d.ts +2 -1
  58. package/dist/decorators/index.js +4 -2
  59. package/dist/extendSxProp-VC2-7DJw.js +49 -0
  60. package/dist/index-BMkXyDFs.js +91 -0
  61. package/dist/isHostComponent-Dm_U9uOy.js +14 -0
  62. package/dist/memoTheme-5A7c_y33.js +15 -0
  63. package/dist/refType-CCKoQjVR.js +61 -0
  64. package/dist/{upload-dialog-errors-ku54UrUb.js → upload-dialog-errors-Bxun25O-.js} +41 -41
  65. package/package.json +1 -1
  66. package/dist/chainPropTypes-KIxDwPzf.js +0 -387
  67. package/dist/createSimplePaletteValueFilter-nb0wSOzC.js +0 -30
  68. package/dist/decorators/centered-decorator.js +0 -16
  69. package/dist/extendSxProp-BW9e6LtL.js +0 -36
  70. package/dist/useTheme-CsjkCBFJ.js +0 -16
  71. /package/dist/{decorators → components/code-input}/types.js +0 -0
  72. /package/dist/decorators/{centered-decorator.d.ts → centered-decorator/centered-decorator.d.ts} +0 -0
  73. /package/dist/decorators/{types.d.ts → centered-decorator/types.d.ts} +0 -0
@@ -1,9 +1,9 @@
1
1
  import * as p from "react";
2
- import { g as d, a as g, c as u, P as o } from "./createTheme-RvzX1VSA.js";
2
+ import { g as d, a as g, c as u, P as o } from "./createTheme-RRQUOQoF.js";
3
3
  import { jsx as f } from "react/jsx-runtime";
4
- import { u as m, s as D, c as v } from "./chainPropTypes-KIxDwPzf.js";
5
- import { m as b } from "./createSimplePaletteValueFilter-nb0wSOzC.js";
6
- import { T as x } from "./Typography-r_TXEM1e.js";
4
+ import { u as m, s as D, c as v } from "./chainPropTypes-C04Ex8aP.js";
5
+ import { m as b } from "./memoTheme-5A7c_y33.js";
6
+ import { T as x } from "./Typography-DDVoglvI.js";
7
7
  const y = /* @__PURE__ */ p.createContext({});
8
8
  process.env.NODE_ENV !== "production" && (y.displayName = "DialogContext");
9
9
  function C(t) {
@@ -1,17 +1,15 @@
1
1
  import * as O from "react";
2
- import { g as j, a as S, c as B, b as c, P as e } from "./createTheme-RvzX1VSA.js";
3
- import { jsx as P } from "react/jsx-runtime";
4
- import { e as w } from "./extendSxProp-BW9e6LtL.js";
5
- import { m as C, c as W } from "./createSimplePaletteValueFilter-nb0wSOzC.js";
6
- import { u as M, s as R, c as N } from "./chainPropTypes-KIxDwPzf.js";
7
- function D() {
8
- return w;
9
- }
10
- function U(o) {
2
+ import { g as j, a as B, c as S, b as c, P as r } from "./createTheme-RRQUOQoF.js";
3
+ import { i as w } from "./index-BMkXyDFs.js";
4
+ import { m as C } from "./memoTheme-5A7c_y33.js";
5
+ import { c as P } from "./createSimplePaletteValueFilter-B7--0ryQ.js";
6
+ import { jsx as W } from "react/jsx-runtime";
7
+ import { u as M, s as R, c as N } from "./chainPropTypes-C04Ex8aP.js";
8
+ function D(o) {
11
9
  return j("MuiTypography", o);
12
10
  }
13
- S("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]);
14
- const $ = {
11
+ B("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]);
12
+ const U = {
15
13
  primary: !0,
16
14
  secondary: !0,
17
15
  error: !0,
@@ -21,26 +19,26 @@ const $ = {
21
19
  textPrimary: !0,
22
20
  textSecondary: !0,
23
21
  textDisabled: !0
24
- }, A = D(), E = (o) => {
22
+ }, A = w(), E = (o) => {
25
23
  const {
26
24
  align: t,
27
- gutterBottom: r,
25
+ gutterBottom: e,
28
26
  noWrap: a,
29
27
  paragraph: p,
30
28
  variant: s,
31
29
  classes: i
32
30
  } = o, n = {
33
- root: ["root", s, o.align !== "inherit" && `align${c(t)}`, r && "gutterBottom", a && "noWrap", p && "paragraph"]
31
+ root: ["root", s, o.align !== "inherit" && `align${c(t)}`, e && "gutterBottom", a && "noWrap", p && "paragraph"]
34
32
  };
35
- return N(n, U, i);
33
+ return N(n, D, i);
36
34
  }, V = R("span", {
37
35
  name: "MuiTypography",
38
36
  slot: "Root",
39
37
  overridesResolver: (o, t) => {
40
38
  const {
41
- ownerState: r
39
+ ownerState: e
42
40
  } = o;
43
- return [t.root, r.variant && t[r.variant], r.align !== "inherit" && t[`align${c(r.align)}`], r.noWrap && t.noWrap, r.gutterBottom && t.gutterBottom, r.paragraph && t.paragraph];
41
+ return [t.root, e.variant && t[e.variant], e.align !== "inherit" && t[`align${c(e.align)}`], e.noWrap && t.noWrap, e.gutterBottom && t.gutterBottom, e.paragraph && t.paragraph];
44
42
  }
45
43
  })(C(({
46
44
  theme: o
@@ -56,12 +54,12 @@ const $ = {
56
54
  lineHeight: "inherit",
57
55
  letterSpacing: "inherit"
58
56
  }
59
- }, ...Object.entries(o.typography).filter(([t, r]) => t !== "inherit" && r && typeof r == "object").map(([t, r]) => ({
57
+ }, ...Object.entries(o.typography).filter(([t, e]) => t !== "inherit" && e && typeof e == "object").map(([t, e]) => ({
60
58
  props: {
61
59
  variant: t
62
60
  },
63
- style: r
64
- })), ...Object.entries(o.palette).filter(W()).map(([t]) => ({
61
+ style: e
62
+ })), ...Object.entries(o.palette).filter(P()).map(([t]) => ({
65
63
  props: {
66
64
  color: t
67
65
  },
@@ -118,14 +116,14 @@ const $ = {
118
116
  body1: "p",
119
117
  body2: "p",
120
118
  inherit: "p"
121
- }, _ = /* @__PURE__ */ O.forwardRef(function(t, r) {
119
+ }, $ = /* @__PURE__ */ O.forwardRef(function(t, e) {
122
120
  const {
123
121
  color: a,
124
122
  ...p
125
123
  } = M({
126
124
  props: t,
127
125
  name: "MuiTypography"
128
- }), s = !$[a], i = A({
126
+ }), s = !U[a], i = A({
129
127
  ...p,
130
128
  ...s && {
131
129
  color: a
@@ -152,10 +150,10 @@ const $ = {
152
150
  variant: l,
153
151
  variantMapping: u
154
152
  }, v = h || (y ? "p" : u[l] || b[l]) || "span", T = E(f);
155
- return /* @__PURE__ */ P(V, {
153
+ return /* @__PURE__ */ W(V, {
156
154
  as: v,
157
- ref: r,
158
- className: B(T.root, g),
155
+ ref: e,
156
+ className: S(T.root, g),
159
157
  ...m,
160
158
  ownerState: f,
161
159
  style: {
@@ -166,7 +164,7 @@ const $ = {
166
164
  }
167
165
  });
168
166
  });
169
- process.env.NODE_ENV !== "production" && (_.propTypes = {
167
+ process.env.NODE_ENV !== "production" && ($.propTypes = {
170
168
  // ┌────────────────────────────── Warning ──────────────────────────────┐
171
169
  // │ These PropTypes are generated from the TypeScript type definitions. │
172
170
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -175,35 +173,35 @@ process.env.NODE_ENV !== "production" && (_.propTypes = {
175
173
  * Set the text-align on the component.
176
174
  * @default 'inherit'
177
175
  */
178
- align: e.oneOf(["center", "inherit", "justify", "left", "right"]),
176
+ align: r.oneOf(["center", "inherit", "justify", "left", "right"]),
179
177
  /**
180
178
  * The content of the component.
181
179
  */
182
- children: e.node,
180
+ children: r.node,
183
181
  /**
184
182
  * Override or extend the styles applied to the component.
185
183
  */
186
- classes: e.object,
184
+ classes: r.object,
187
185
  /**
188
186
  * @ignore
189
187
  */
190
- className: e.string,
188
+ className: r.string,
191
189
  /**
192
190
  * The color of the component.
193
191
  * It supports both default and custom theme colors, which can be added as shown in the
194
192
  * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
195
193
  */
196
- color: e.oneOfType([e.oneOf(["primary", "secondary", "success", "error", "info", "warning", "textPrimary", "textSecondary", "textDisabled"]), e.string]),
194
+ color: r.oneOfType([r.oneOf(["primary", "secondary", "success", "error", "info", "warning", "textPrimary", "textSecondary", "textDisabled"]), r.string]),
197
195
  /**
198
196
  * The component used for the root node.
199
197
  * Either a string to use a HTML element or a component.
200
198
  */
201
- component: e.elementType,
199
+ component: r.elementType,
202
200
  /**
203
201
  * If `true`, the text will have a bottom margin.
204
202
  * @default false
205
203
  */
206
- gutterBottom: e.bool,
204
+ gutterBottom: r.bool,
207
205
  /**
208
206
  * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
209
207
  *
@@ -211,26 +209,26 @@ process.env.NODE_ENV !== "production" && (_.propTypes = {
211
209
  * (the element needs to have a width in order to overflow).
212
210
  * @default false
213
211
  */
214
- noWrap: e.bool,
212
+ noWrap: r.bool,
215
213
  /**
216
214
  * If `true`, the element will be a paragraph element.
217
215
  * @default false
218
216
  * @deprecated Use the `component` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
219
217
  */
220
- paragraph: e.bool,
218
+ paragraph: r.bool,
221
219
  /**
222
220
  * @ignore
223
221
  */
224
- style: e.object,
222
+ style: r.object,
225
223
  /**
226
224
  * The system prop that allows defining system overrides as well as additional CSS styles.
227
225
  */
228
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
226
+ sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
229
227
  /**
230
228
  * Applies the theme typography styles.
231
229
  * @default 'body1'
232
230
  */
233
- variant: e.oneOfType([e.oneOf(["body1", "body2", "button", "caption", "h1", "h2", "h3", "h4", "h5", "h6", "inherit", "overline", "subtitle1", "subtitle2"]), e.string]),
231
+ variant: r.oneOfType([r.oneOf(["body1", "body2", "button", "caption", "h1", "h2", "h3", "h4", "h5", "h6", "inherit", "overline", "subtitle1", "subtitle2"]), r.string]),
234
232
  /**
235
233
  * The component maps the variant prop to a range of different HTML element types.
236
234
  * For instance, subtitle1 to `<h6>`.
@@ -250,8 +248,8 @@ process.env.NODE_ENV !== "production" && (_.propTypes = {
250
248
  * inherit: 'p',
251
249
  * }
252
250
  */
253
- variantMapping: e.object
251
+ variantMapping: r.object
254
252
  });
255
253
  export {
256
- _ as T
254
+ $ as T
257
255
  };
@@ -0,0 +1 @@
1
+ ._centeredDecorator_jzrux_1{width:100%;display:flex;align-items:center;justify-content:center}