@fangzsx/component-library 0.0.11 → 0.0.13

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