@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.
Files changed (41) hide show
  1. package/dist/Box-CiYPzbPd.js +56 -0
  2. package/dist/{Button-DDlVTM6i.js → Button-chJUX25I.js} +26 -24
  3. package/dist/ButtonBase-DZwhOh56.js +966 -0
  4. package/dist/{CircularProgress-CscJm1An.js → CircularProgress-BCrSQadM.js} +113 -105
  5. package/dist/{DialogTitle-KN1sayHD.js → DialogTitle-BUcXvkzd.js} +638 -884
  6. package/dist/Typography-BmYEfS8y.js +257 -0
  7. package/dist/assets/circular-progress-loader.css +1 -0
  8. package/dist/chainPropTypes-HYSaT0L0.js +387 -0
  9. package/dist/components/button/button.js +1 -1
  10. package/dist/components/circular-progress-loader/circular-progress-loader.d.ts +3 -0
  11. package/dist/components/circular-progress-loader/circular-progress-loader.js +44 -0
  12. package/dist/components/circular-progress-loader/circular-progress-loader.stories.d.ts +7 -0
  13. package/dist/components/circular-progress-loader/constants.d.ts +2 -0
  14. package/dist/components/circular-progress-loader/constants.js +5 -0
  15. package/dist/components/circular-progress-loader/index.d.ts +1 -0
  16. package/dist/components/circular-progress-loader/index.js +4 -0
  17. package/dist/components/circular-progress-loader/types.d.ts +6 -0
  18. package/dist/components/circular-progress-loader/types.js +1 -0
  19. package/dist/components/index.d.ts +1 -0
  20. package/dist/components/index.js +6 -4
  21. package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +30 -29
  22. package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +22 -73
  23. package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +1 -1
  24. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +13 -11
  25. package/dist/components/photo-crop-uploader/photo-crop-uploader.js +30 -30
  26. package/dist/components/photo-crop-uploader/types.d.ts +1 -4
  27. package/dist/constants.d.ts +1 -0
  28. package/dist/constants.js +2 -1
  29. package/dist/{createTheme-DSHGFfg6.js → createTheme-BfVKUMHQ.js} +10 -10
  30. package/dist/decorators/centered-decorator.d.ts +3 -0
  31. package/dist/decorators/centered-decorator.js +16 -0
  32. package/dist/decorators/index.d.ts +1 -0
  33. package/dist/decorators/index.js +4 -0
  34. package/dist/decorators/types.d.ts +4 -0
  35. package/dist/decorators/types.js +1 -0
  36. package/dist/{extendSxProp-CzeED7BH.js → extendSxProp-bpz0eCso.js} +3 -3
  37. package/dist/index.d.ts +1 -1
  38. package/dist/index.js +16 -14
  39. package/dist/useId-CK6Kn3Tn.js +21 -0
  40. package/package.json +8 -8
  41. package/dist/ButtonBase-CXGZ-DBC.js +0 -1346
@@ -0,0 +1,257 @@
1
+ import * as O from "react";
2
+ import { d as j, g as S, c as B, e as c, P as e } from "./createTheme-BfVKUMHQ.js";
3
+ import { jsx as P } from "react/jsx-runtime";
4
+ import { e as w } from "./extendSxProp-bpz0eCso.js";
5
+ import { m as C, c as W } from "./CircularProgress-BCrSQadM.js";
6
+ import { u as M, s as R, c as N } from "./chainPropTypes-HYSaT0L0.js";
7
+ function D() {
8
+ return w;
9
+ }
10
+ function U(o) {
11
+ return j("MuiTypography", o);
12
+ }
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 $ = {
15
+ primary: !0,
16
+ secondary: !0,
17
+ error: !0,
18
+ info: !0,
19
+ success: !0,
20
+ warning: !0,
21
+ textPrimary: !0,
22
+ textSecondary: !0,
23
+ textDisabled: !0
24
+ }, A = D(), E = (o) => {
25
+ const {
26
+ align: t,
27
+ gutterBottom: r,
28
+ noWrap: a,
29
+ paragraph: p,
30
+ variant: s,
31
+ classes: i
32
+ } = o, n = {
33
+ root: ["root", s, o.align !== "inherit" && `align${c(t)}`, r && "gutterBottom", a && "noWrap", p && "paragraph"]
34
+ };
35
+ return N(n, U, i);
36
+ }, V = R("span", {
37
+ name: "MuiTypography",
38
+ slot: "Root",
39
+ overridesResolver: (o, t) => {
40
+ const {
41
+ ownerState: r
42
+ } = 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];
44
+ }
45
+ })(C(({
46
+ theme: o
47
+ }) => ({
48
+ margin: 0,
49
+ variants: [{
50
+ props: {
51
+ variant: "inherit"
52
+ },
53
+ style: {
54
+ // Some elements, like <button> on Chrome have default font that doesn't inherit, reset this.
55
+ font: "inherit",
56
+ lineHeight: "inherit",
57
+ letterSpacing: "inherit"
58
+ }
59
+ }, ...Object.entries(o.typography).filter(([t, r]) => t !== "inherit" && r && typeof r == "object").map(([t, r]) => ({
60
+ props: {
61
+ variant: t
62
+ },
63
+ style: r
64
+ })), ...Object.entries(o.palette).filter(W()).map(([t]) => ({
65
+ props: {
66
+ color: t
67
+ },
68
+ style: {
69
+ color: (o.vars || o).palette[t].main
70
+ }
71
+ })), ...Object.entries(o.palette?.text || {}).filter(([, t]) => typeof t == "string").map(([t]) => ({
72
+ props: {
73
+ color: `text${c(t)}`
74
+ },
75
+ style: {
76
+ color: (o.vars || o).palette.text[t]
77
+ }
78
+ })), {
79
+ props: ({
80
+ ownerState: t
81
+ }) => t.align !== "inherit",
82
+ style: {
83
+ textAlign: "var(--Typography-textAlign)"
84
+ }
85
+ }, {
86
+ props: ({
87
+ ownerState: t
88
+ }) => t.noWrap,
89
+ style: {
90
+ overflow: "hidden",
91
+ textOverflow: "ellipsis",
92
+ whiteSpace: "nowrap"
93
+ }
94
+ }, {
95
+ props: ({
96
+ ownerState: t
97
+ }) => t.gutterBottom,
98
+ style: {
99
+ marginBottom: "0.35em"
100
+ }
101
+ }, {
102
+ props: ({
103
+ ownerState: t
104
+ }) => t.paragraph,
105
+ style: {
106
+ marginBottom: 16
107
+ }
108
+ }]
109
+ }))), b = {
110
+ h1: "h1",
111
+ h2: "h2",
112
+ h3: "h3",
113
+ h4: "h4",
114
+ h5: "h5",
115
+ h6: "h6",
116
+ subtitle1: "h6",
117
+ subtitle2: "h6",
118
+ body1: "p",
119
+ body2: "p",
120
+ inherit: "p"
121
+ }, _ = /* @__PURE__ */ O.forwardRef(function(t, r) {
122
+ const {
123
+ color: a,
124
+ ...p
125
+ } = M({
126
+ props: t,
127
+ name: "MuiTypography"
128
+ }), s = !$[a], i = A({
129
+ ...p,
130
+ ...s && {
131
+ color: a
132
+ }
133
+ }), {
134
+ align: n = "inherit",
135
+ className: g,
136
+ component: h,
137
+ gutterBottom: d = !1,
138
+ noWrap: x = !1,
139
+ paragraph: y = !1,
140
+ variant: l = "body1",
141
+ variantMapping: u = b,
142
+ ...m
143
+ } = i, f = {
144
+ ...i,
145
+ align: n,
146
+ color: a,
147
+ className: g,
148
+ component: h,
149
+ gutterBottom: d,
150
+ noWrap: x,
151
+ paragraph: y,
152
+ variant: l,
153
+ variantMapping: u
154
+ }, v = h || (y ? "p" : u[l] || b[l]) || "span", T = E(f);
155
+ return /* @__PURE__ */ P(V, {
156
+ as: v,
157
+ ref: r,
158
+ className: B(T.root, g),
159
+ ...m,
160
+ ownerState: f,
161
+ style: {
162
+ ...n !== "inherit" && {
163
+ "--Typography-textAlign": n
164
+ },
165
+ ...m.style
166
+ }
167
+ });
168
+ });
169
+ process.env.NODE_ENV !== "production" && (_.propTypes = {
170
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
171
+ // │ These PropTypes are generated from the TypeScript type definitions. │
172
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
173
+ // └─────────────────────────────────────────────────────────────────────┘
174
+ /**
175
+ * Set the text-align on the component.
176
+ * @default 'inherit'
177
+ */
178
+ align: e.oneOf(["center", "inherit", "justify", "left", "right"]),
179
+ /**
180
+ * The content of the component.
181
+ */
182
+ children: e.node,
183
+ /**
184
+ * Override or extend the styles applied to the component.
185
+ */
186
+ classes: e.object,
187
+ /**
188
+ * @ignore
189
+ */
190
+ className: e.string,
191
+ /**
192
+ * The color of the component.
193
+ * It supports both default and custom theme colors, which can be added as shown in the
194
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
195
+ */
196
+ color: e.oneOfType([e.oneOf(["primary", "secondary", "success", "error", "info", "warning", "textPrimary", "textSecondary", "textDisabled"]), e.string]),
197
+ /**
198
+ * The component used for the root node.
199
+ * Either a string to use a HTML element or a component.
200
+ */
201
+ component: e.elementType,
202
+ /**
203
+ * If `true`, the text will have a bottom margin.
204
+ * @default false
205
+ */
206
+ gutterBottom: e.bool,
207
+ /**
208
+ * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
209
+ *
210
+ * Note that text overflow can only happen with block or inline-block level elements
211
+ * (the element needs to have a width in order to overflow).
212
+ * @default false
213
+ */
214
+ noWrap: e.bool,
215
+ /**
216
+ * If `true`, the element will be a paragraph element.
217
+ * @default false
218
+ * @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
+ */
220
+ paragraph: e.bool,
221
+ /**
222
+ * @ignore
223
+ */
224
+ style: e.object,
225
+ /**
226
+ * The system prop that allows defining system overrides as well as additional CSS styles.
227
+ */
228
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
229
+ /**
230
+ * Applies the theme typography styles.
231
+ * @default 'body1'
232
+ */
233
+ variant: e.oneOfType([e.oneOf(["body1", "body2", "button", "caption", "h1", "h2", "h3", "h4", "h5", "h6", "inherit", "overline", "subtitle1", "subtitle2"]), e.string]),
234
+ /**
235
+ * The component maps the variant prop to a range of different HTML element types.
236
+ * For instance, subtitle1 to `<h6>`.
237
+ * If you wish to change that mapping, you can provide your own.
238
+ * Alternatively, you can use the `component` prop.
239
+ * @default {
240
+ * h1: 'h1',
241
+ * h2: 'h2',
242
+ * h3: 'h3',
243
+ * h4: 'h4',
244
+ * h5: 'h5',
245
+ * h6: 'h6',
246
+ * subtitle1: 'h6',
247
+ * subtitle2: 'h6',
248
+ * body1: 'p',
249
+ * body2: 'p',
250
+ * inherit: 'p',
251
+ * }
252
+ */
253
+ variantMapping: e.object
254
+ });
255
+ export {
256
+ _ as T
257
+ };