@fangzsx/component-library 0.0.14 → 0.0.16

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 (27) hide show
  1. package/dist/{ButtonBase-qMhxbNdC.js → ButtonBase-DxZEqM87.js} +15 -14
  2. package/dist/{FormLabel-DKoCtSGZ.js → FormLabel-DLyFlUyL.js} +7 -6
  3. package/dist/{Paper-DyRh03We.js → Paper-DZg6u5tT.js} +50 -77
  4. package/dist/{SwitchBase-DStPyUhD.js → SwitchBase-BPRcMkqu.js} +23 -21
  5. package/dist/{Typography-B0rSrz7H.js → Typography-DMROEdKW.js} +5 -4
  6. package/dist/components/AppBarPublic/index.js +8 -7
  7. package/dist/components/Button/index.js +1 -1
  8. package/dist/components/Checkbox/index.js +23 -22
  9. package/dist/components/CheckboxGroup/index.js +47 -34
  10. package/dist/components/MediaCardWithAction/index.js +7 -6
  11. package/dist/components/RadioButtonGroup/index.js +20 -18
  12. package/dist/components/Stepper/index.d.ts +11 -0
  13. package/dist/components/Stepper/index.js +607 -0
  14. package/dist/components/TextFieldInput/index.js +503 -482
  15. package/dist/{createSvgIcon-Dj0SJuc1.js → createSvgIcon-ChKzptBc.js} +2 -1
  16. package/dist/{index-o1i1vy-V.js → index-1CH5DDiw.js} +1 -1
  17. package/dist/{index-CoBGCD2e.js → index-B08hLYdM.js} +24 -23
  18. package/dist/integerPropType-BihGt2aU.js +31 -0
  19. package/dist/main.d.ts +1 -0
  20. package/dist/main.js +7 -5
  21. package/dist/{mergeSlotProps-C-n2ing7.js → mergeSlotProps-CADAqXOb.js} +1 -1
  22. package/dist/{useTimeout-BWi4JTOH.js → useForkRef-gLJikozA.js} +170 -277
  23. package/dist/useFormControl-BGLuGvqS.js +38 -0
  24. package/dist/useSlot-jPRhj-MO.js +125 -0
  25. package/dist/useTimeout-DmOXPFt0.js +111 -0
  26. package/package.json +1 -1
  27. package/dist/useSlot-S2pEBHE8.js +0 -161
@@ -1,7 +1,7 @@
1
1
  import * as a from "react";
2
2
  import { jsxs as b, jsx as g } from "react/jsx-runtime";
3
3
  import { g as w, a as N, c, P as e } from "./generateUtilityClasses-BCID9NF1.js";
4
- import { u as C, s as O, c as T, a as R, m as E } from "./useTimeout-BWi4JTOH.js";
4
+ import { u as C, s as O, c as T, a as R, m as E } from "./useForkRef-gLJikozA.js";
5
5
  function j(o) {
6
6
  return w("MuiSvgIcon", o);
7
7
  }
@@ -239,5 +239,6 @@ function M(o, r) {
239
239
  return process.env.NODE_ENV !== "production" && (n.displayName = `${r}Icon`), n.muiName = l.muiName, /* @__PURE__ */ a.memo(/* @__PURE__ */ a.forwardRef(n));
240
240
  }
241
241
  export {
242
+ l as S,
242
243
  M as c
243
244
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { GlobalStyles as c } from "@mui/system";
3
3
  import { i as m, d as y, T as p, P as o } from "./generateUtilityClasses-BCID9NF1.js";
4
- import { e as x } from "./useTimeout-BWi4JTOH.js";
4
+ import { d as x } from "./useForkRef-gLJikozA.js";
5
5
  const P = (e) => {
6
6
  const r = {
7
7
  systemProps: {},
@@ -2,9 +2,10 @@ import { jsx as c, jsxs as U } from "react/jsx-runtime";
2
2
  import { c as P } from "./colors-BYtTt7gN.js";
3
3
  import * as k from "react";
4
4
  import { g as G, a as _, c as i, P as t } from "./generateUtilityClasses-BCID9NF1.js";
5
- import { u as A, s as f, c as R, a as H, m as O, b as K, f as so, g as lo, r as co } from "./useTimeout-BWi4JTOH.js";
5
+ import { u as A, s as f, c as R, a as H, m as O, e as so, r as lo } from "./useForkRef-gLJikozA.js";
6
+ import { c as K, a as co } from "./useTimeout-DmOXPFt0.js";
6
7
  import { u as po } from "./useId-CK6Kn3Tn.js";
7
- import { B as uo } from "./ButtonBase-qMhxbNdC.js";
8
+ import { B as uo } from "./ButtonBase-DxZEqM87.js";
8
9
  import { css as Y, keyframes as Z } from "@mui/system";
9
10
  function go(o) {
10
11
  return G("MuiCircularProgress", o);
@@ -130,7 +131,7 @@ const l = 44, T = Z`
130
131
  animation: `${E} 1.4s ease-in-out infinite`
131
132
  }
132
133
  }]
133
- }))), ho = f("circle", {
134
+ }))), mo = f("circle", {
134
135
  name: "MuiCircularProgress",
135
136
  slot: "Track"
136
137
  })(O(({
@@ -148,9 +149,9 @@ const l = 44, T = Z`
148
149
  disableShrink: g = !1,
149
150
  enableTrackSlot: d = !1,
150
151
  size: y = 40,
151
- style: h,
152
+ style: m,
152
153
  thickness: p = 3.6,
153
- value: m = 0,
154
+ value: h = 0,
154
155
  variant: w = "indeterminate",
155
156
  ...$
156
157
  } = n, b = {
@@ -159,13 +160,13 @@ const l = 44, T = Z`
159
160
  disableShrink: g,
160
161
  size: y,
161
162
  thickness: p,
162
- value: m,
163
+ value: h,
163
164
  variant: w,
164
165
  enableTrackSlot: d
165
166
  }, C = yo(b), z = {}, I = {}, u = {};
166
167
  if (w === "determinate") {
167
168
  const N = 2 * Math.PI * ((l - p) / 2);
168
- z.strokeDasharray = N.toFixed(3), u["aria-valuenow"] = Math.round(m), z.strokeDashoffset = `${((100 - m) / 100 * N).toFixed(3)}px`, I.transform = "rotate(-90deg)";
169
+ z.strokeDasharray = N.toFixed(3), u["aria-valuenow"] = Math.round(h), z.strokeDashoffset = `${((100 - h) / 100 * N).toFixed(3)}px`, I.transform = "rotate(-90deg)";
169
170
  }
170
171
  return /* @__PURE__ */ c(bo, {
171
172
  className: R(C.root, e),
@@ -173,7 +174,7 @@ const l = 44, T = Z`
173
174
  width: y,
174
175
  height: y,
175
176
  ...I,
176
- ...h
177
+ ...m
177
178
  },
178
179
  ownerState: b,
179
180
  ref: a,
@@ -184,7 +185,7 @@ const l = 44, T = Z`
184
185
  className: C.svg,
185
186
  ownerState: b,
186
187
  viewBox: `${l / 2} ${l / 2} ${l} ${l}`,
187
- children: [d ? /* @__PURE__ */ c(ho, {
188
+ children: [d ? /* @__PURE__ */ c(mo, {
188
189
  className: C.track,
189
190
  ownerState: b,
190
191
  cx: l,
@@ -231,7 +232,7 @@ process.env.NODE_ENV !== "production" && (q.propTypes = {
231
232
  * This only works if variant is `indeterminate`.
232
233
  * @default false
233
234
  */
234
- disableShrink: so(t.bool, (o) => o.disableShrink && o.variant && o.variant !== "indeterminate" ? new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect.") : null),
235
+ disableShrink: co(t.bool, (o) => o.disableShrink && o.variant && o.variant !== "indeterminate" ? new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect.") : null),
235
236
  /**
236
237
  * If `true`, a track circle slot is mounted to show a subtle background for the progress.
237
238
  * The `size` and `thickness` apply to the track slot to be consistent with the progress circle.
@@ -271,7 +272,7 @@ process.env.NODE_ENV !== "production" && (q.propTypes = {
271
272
  */
272
273
  variant: t.oneOf(["determinate", "indeterminate"])
273
274
  });
274
- function mo(o) {
275
+ function ho(o) {
275
276
  return G("MuiButton", o);
276
277
  }
277
278
  const S = _("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorSuccess", "colorError", "colorInfo", "colorWarning", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "icon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge", "loading", "loadingWrapper", "loadingIconPlaceholder", "loadingIndicator", "loadingPositionCenter", "loadingPositionStart", "loadingPositionEnd"]), J = /* @__PURE__ */ k.createContext({});
@@ -288,13 +289,13 @@ const Co = (o) => {
288
289
  loading: g,
289
290
  loadingPosition: d,
290
291
  classes: y
291
- } = o, h = {
292
+ } = o, m = {
292
293
  root: ["root", g && "loading", s, `${s}${i(r)}`, `size${i(e)}`, `${s}Size${i(e)}`, `color${i(r)}`, a && "disableElevation", n && "fullWidth", g && `loadingPosition${i(d)}`],
293
294
  startIcon: ["icon", "startIcon", `iconSize${i(e)}`],
294
295
  endIcon: ["icon", "endIcon", `iconSize${i(e)}`],
295
296
  loadingIndicator: ["loadingIndicator"],
296
297
  loadingWrapper: ["loadingWrapper"]
297
- }, p = H(h, mo, y);
298
+ }, p = H(m, ho, y);
298
299
  return {
299
300
  ...y,
300
301
  // forward the focused, disabled, etc. classes to the ButtonBase
@@ -328,7 +329,7 @@ const Co = (o) => {
328
329
  }
329
330
  }
330
331
  }], Po = f(uo, {
331
- shouldForwardProp: (o) => co(o) || o === "classes",
332
+ shouldForwardProp: (o) => lo(o) || o === "classes",
332
333
  name: "MuiButton",
333
334
  slot: "Root",
334
335
  overridesResolver: (o, r) => {
@@ -719,15 +720,15 @@ const Co = (o) => {
719
720
  width: "1em",
720
721
  height: "1em"
721
722
  }), oo = /* @__PURE__ */ k.forwardRef(function(r, a) {
722
- const n = k.useContext(J), e = k.useContext(Q), s = lo(n, r), g = A({
723
+ const n = k.useContext(J), e = k.useContext(Q), s = so(n, r), g = A({
723
724
  props: s,
724
725
  name: "MuiButton"
725
726
  }), {
726
727
  children: d,
727
728
  color: y = "primary",
728
- component: h = "button",
729
+ component: m = "button",
729
730
  className: p,
730
- disabled: m = !1,
731
+ disabled: h = !1,
731
732
  disableElevation: w = !1,
732
733
  disableFocusRipple: $ = !1,
733
734
  endIcon: b,
@@ -749,8 +750,8 @@ const Co = (o) => {
749
750
  }), x = {
750
751
  ...g,
751
752
  color: y,
752
- component: h,
753
- disabled: m,
753
+ component: m,
754
+ disabled: h,
754
755
  disableElevation: w,
755
756
  disableFocusRipple: $,
756
757
  fullWidth: z,
@@ -791,8 +792,8 @@ const Co = (o) => {
791
792
  return /* @__PURE__ */ U(Po, {
792
793
  ownerState: x,
793
794
  className: R(n.className, v.root, p, eo),
794
- component: h,
795
- disabled: m || u,
795
+ component: m,
796
+ disabled: h || u,
796
797
  focusRipple: !$,
797
798
  focusVisibleClassName: R(v.focusVisible, C),
798
799
  ref: a,
@@ -924,7 +925,7 @@ const F = {
924
925
  clear: { backgroundColor: "", hoverColor: "", textColor: "" },
925
926
  gray: { backgroundColor: P.grey50, hoverColor: P.primary50, textColor: P.grey800 }
926
927
  };
927
- function Eo(o) {
928
+ function Wo(o) {
928
929
  const { className: r, children: a, sx: n, disabled: e, color: s = "blue", ...g } = o, d = F[s] || F.blue;
929
930
  return /* @__PURE__ */ c(
930
931
  oo,
@@ -951,6 +952,6 @@ function Eo(o) {
951
952
  );
952
953
  }
953
954
  export {
954
- Eo as B,
955
+ Wo as B,
955
956
  q as C
956
957
  };
@@ -0,0 +1,31 @@
1
+ function f(e) {
2
+ const r = typeof e;
3
+ switch (r) {
4
+ case "number":
5
+ return Number.isNaN(e) ? "NaN" : Number.isFinite(e) ? e !== Math.floor(e) ? "float" : "number" : "Infinity";
6
+ case "object":
7
+ return e === null ? "null" : e.constructor.name;
8
+ default:
9
+ return r;
10
+ }
11
+ }
12
+ function o(e, r, t, u) {
13
+ const n = e[r];
14
+ if (n == null || !Number.isInteger(n)) {
15
+ const l = f(n);
16
+ return new RangeError(`Invalid ${u} \`${r}\` of type \`${l}\` supplied to \`${t}\`, expected \`integer\`.`);
17
+ }
18
+ return null;
19
+ }
20
+ function c(e, r, t, u) {
21
+ return e[r] === void 0 ? null : o(e, r, t, u);
22
+ }
23
+ function i() {
24
+ return null;
25
+ }
26
+ c.isRequired = o;
27
+ i.isRequired = i;
28
+ const s = process.env.NODE_ENV === "production" ? i : c;
29
+ export {
30
+ s as i
31
+ };
package/dist/main.d.ts CHANGED
@@ -9,5 +9,6 @@ export { Label } from './components/Label';
9
9
  export { LinearProgress } from './components/LinearProgress';
10
10
  export { MediaCardWithAction } from './components/MediaCardWithAction';
11
11
  export { RadioButtonGroup } from './components/RadioButtonGroup';
12
+ export { Stepper } from './components/Stepper';
12
13
  export { Text } from './components/Text';
13
14
  export { TextFieldInput } from './components/TextFieldInput';
package/dist/main.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AppBarPublic as e } from "./components/AppBarPublic/index.js";
2
2
  import { Banner as p } from "./components/Banner/index.js";
3
- import { B as f } from "./index-CoBGCD2e.js";
3
+ import { B as f } from "./index-B08hLYdM.js";
4
4
  import { CheckBox as a } from "./components/Checkbox/index.js";
5
5
  import { CheckboxGroup as i } from "./components/CheckboxGroup/index.js";
6
6
  import { Dropdown as u } from "./components/Dropdown/index.js";
@@ -9,8 +9,9 @@ import { Label as b } from "./components/Label/index.js";
9
9
  import { LinearProgress as s } from "./components/LinearProgress/index.js";
10
10
  import { MediaCardWithAction as k } from "./components/MediaCardWithAction/index.js";
11
11
  import { RadioButtonGroup as F } from "./components/RadioButtonGroup/index.js";
12
- import { Text as L } from "./components/Text/index.js";
13
- import { TextFieldInput as T } from "./components/TextFieldInput/index.js";
12
+ import { Stepper as L } from "./components/Stepper/index.js";
13
+ import { Text as T } from "./components/Text/index.js";
14
+ import { TextFieldInput as w } from "./components/TextFieldInput/index.js";
14
15
  export {
15
16
  e as AppBarPublic,
16
17
  p as Banner,
@@ -23,6 +24,7 @@ export {
23
24
  s as LinearProgress,
24
25
  k as MediaCardWithAction,
25
26
  F as RadioButtonGroup,
26
- L as Text,
27
- T as TextFieldInput
27
+ L as Stepper,
28
+ T as Text,
29
+ w as TextFieldInput
28
30
  };
@@ -1,4 +1,4 @@
1
- import { c as t } from "./useTimeout-BWi4JTOH.js";
1
+ import { c as t } from "./useForkRef-gLJikozA.js";
2
2
  function x(s, i) {
3
3
  const a = s.charCodeAt(2);
4
4
  return s[0] === "o" && s[1] === "n" && a >= 65 && a <= 90 && typeof i == "function";