@fangzsx/component-library 0.0.32 → 0.0.33
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.
- package/dist/{ButtonBase-DycJOmlJ.js → ButtonBase-CSQZHD_g.js} +1 -1
- package/dist/{FormLabel-D4ON51Wt.js → FormHelperText-B-xlmRr4.js} +170 -170
- package/dist/{Paper-oafkOzNM.js → Paper-Cz0ZdEav.js} +1 -1
- package/dist/Select-BSsJnv6h.js +6168 -0
- package/dist/{SwitchBase-V2UoemN5.js → SwitchBase-DWe26Qyv.js} +2 -2
- package/dist/{Typography-CTrRb9FL.js → Typography-Cro52PHG.js} +1 -1
- package/dist/components/AppBarPublic/index.js +4 -4
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Checkbox/index.js +2 -2
- package/dist/components/DropdownOptions/index.d.ts +19 -0
- package/dist/components/DropdownOptions/index.js +370 -0
- package/dist/components/MediaCardWithAction/index.js +4 -4
- package/dist/components/RadioButtonGroup/index.js +4 -4
- package/dist/components/TextFieldInput/index.js +193 -6342
- package/dist/{index-CS-LWC7Z.js → index-Dnsx2wLn.js} +2 -2
- package/dist/main.d.ts +1 -0
- package/dist/main.js +25 -23
- package/dist/{useTimeout-DmOXPFt0.js → useTimeout-UzNJH-cm.js} +6 -6
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import W, { isValidElement as H, cloneElement as G, Children as Ve } from "react
|
|
|
3
3
|
import { P as e, a as ce, g as Se } from "./generateUtilityClasses-BCID9NF1.js";
|
|
4
4
|
import { c as v, u as pe, s as ne, a as Be } from "./DefaultPropsProvider-DVX_ssOt.js";
|
|
5
5
|
import { jsx as $, jsxs as Oe } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
6
|
+
import { b as Le, _ as je, d as ke, T as ae, e as Fe, f as J, g as Ie, r as Ue } from "./useTimeout-UzNJH-cm.js";
|
|
7
7
|
import { keyframes as oe } from "@mui/system";
|
|
8
8
|
import { u as ue } from "./useForkRef-9kN4DArm.js";
|
|
9
9
|
function le(n) {
|
|
@@ -3,7 +3,7 @@ import { g as z, a as E, c as T, P as e } from "./generateUtilityClasses-BCID9NF
|
|
|
3
3
|
import { u as L, s as N, c as $, a as A, m as H } from "./DefaultPropsProvider-DVX_ssOt.js";
|
|
4
4
|
import { F as re, a as Q } from "./useFormControl-BGLuGvqS.js";
|
|
5
5
|
import { jsx as O, jsxs as P } from "react/jsx-runtime";
|
|
6
|
-
import { c as oe } from "./useTimeout-
|
|
6
|
+
import { c as oe } from "./useTimeout-UzNJH-cm.js";
|
|
7
7
|
function he(...r) {
|
|
8
8
|
return r.reduce((o, t) => t == null ? o : function(...s) {
|
|
9
9
|
o.apply(this, s), t.apply(this, s);
|
|
@@ -264,11 +264,170 @@ function X({
|
|
|
264
264
|
return o.reduce((n, s) => (n[s] = r[s], t && typeof r[s] > "u" && (n[s] = t[s]), n), {});
|
|
265
265
|
}
|
|
266
266
|
function ae(r) {
|
|
267
|
+
return z("MuiFormLabel", r);
|
|
268
|
+
}
|
|
269
|
+
const x = E("MuiFormLabel", ["root", "colorSecondary", "focused", "disabled", "error", "filled", "required", "asterisk"]), de = (r) => {
|
|
270
|
+
const {
|
|
271
|
+
classes: o,
|
|
272
|
+
color: t,
|
|
273
|
+
focused: n,
|
|
274
|
+
disabled: s,
|
|
275
|
+
error: u,
|
|
276
|
+
filled: d,
|
|
277
|
+
required: f
|
|
278
|
+
} = r, c = {
|
|
279
|
+
root: ["root", `color${T(t)}`, s && "disabled", u && "error", d && "filled", n && "focused", f && "required"],
|
|
280
|
+
asterisk: ["asterisk", u && "error"]
|
|
281
|
+
};
|
|
282
|
+
return A(c, ae, o);
|
|
283
|
+
}, ce = N("label", {
|
|
284
|
+
name: "MuiFormLabel",
|
|
285
|
+
slot: "Root",
|
|
286
|
+
overridesResolver: (r, o) => {
|
|
287
|
+
const {
|
|
288
|
+
ownerState: t
|
|
289
|
+
} = r;
|
|
290
|
+
return [o.root, t.color === "secondary" && o.colorSecondary, t.filled && o.filled];
|
|
291
|
+
}
|
|
292
|
+
})(H(({
|
|
293
|
+
theme: r
|
|
294
|
+
}) => ({
|
|
295
|
+
color: (r.vars || r).palette.text.secondary,
|
|
296
|
+
...r.typography.body1,
|
|
297
|
+
lineHeight: "1.4375em",
|
|
298
|
+
padding: 0,
|
|
299
|
+
position: "relative",
|
|
300
|
+
variants: [...Object.entries(r.palette).filter(oe()).map(([o]) => ({
|
|
301
|
+
props: {
|
|
302
|
+
color: o
|
|
303
|
+
},
|
|
304
|
+
style: {
|
|
305
|
+
[`&.${x.focused}`]: {
|
|
306
|
+
color: (r.vars || r).palette[o].main
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
})), {
|
|
310
|
+
props: {},
|
|
311
|
+
style: {
|
|
312
|
+
[`&.${x.disabled}`]: {
|
|
313
|
+
color: (r.vars || r).palette.text.disabled
|
|
314
|
+
},
|
|
315
|
+
[`&.${x.error}`]: {
|
|
316
|
+
color: (r.vars || r).palette.error.main
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}]
|
|
320
|
+
}))), ue = N("span", {
|
|
321
|
+
name: "MuiFormLabel",
|
|
322
|
+
slot: "Asterisk"
|
|
323
|
+
})(H(({
|
|
324
|
+
theme: r
|
|
325
|
+
}) => ({
|
|
326
|
+
[`&.${x.error}`]: {
|
|
327
|
+
color: (r.vars || r).palette.error.main
|
|
328
|
+
}
|
|
329
|
+
}))), fe = /* @__PURE__ */ a.forwardRef(function(o, t) {
|
|
330
|
+
const n = L({
|
|
331
|
+
props: o,
|
|
332
|
+
name: "MuiFormLabel"
|
|
333
|
+
}), {
|
|
334
|
+
children: s,
|
|
335
|
+
className: u,
|
|
336
|
+
color: d,
|
|
337
|
+
component: f = "label",
|
|
338
|
+
disabled: c,
|
|
339
|
+
error: b,
|
|
340
|
+
filled: C,
|
|
341
|
+
focused: g,
|
|
342
|
+
required: v,
|
|
343
|
+
...h
|
|
344
|
+
} = n, y = Q(), i = X({
|
|
345
|
+
props: n,
|
|
346
|
+
muiFormControl: y,
|
|
347
|
+
states: ["color", "required", "focused", "disabled", "error", "filled"]
|
|
348
|
+
}), l = {
|
|
349
|
+
...n,
|
|
350
|
+
color: i.color || "primary",
|
|
351
|
+
component: f,
|
|
352
|
+
disabled: i.disabled,
|
|
353
|
+
error: i.error,
|
|
354
|
+
filled: i.filled,
|
|
355
|
+
focused: i.focused,
|
|
356
|
+
required: i.required
|
|
357
|
+
}, p = de(l);
|
|
358
|
+
return /* @__PURE__ */ P(ce, {
|
|
359
|
+
as: f,
|
|
360
|
+
ownerState: l,
|
|
361
|
+
className: $(p.root, u),
|
|
362
|
+
ref: t,
|
|
363
|
+
...h,
|
|
364
|
+
children: [s, i.required && /* @__PURE__ */ P(ue, {
|
|
365
|
+
ownerState: l,
|
|
366
|
+
"aria-hidden": !0,
|
|
367
|
+
className: p.asterisk,
|
|
368
|
+
children: [" ", "*"]
|
|
369
|
+
})]
|
|
370
|
+
});
|
|
371
|
+
});
|
|
372
|
+
process.env.NODE_ENV !== "production" && (fe.propTypes = {
|
|
373
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
374
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
375
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
376
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
377
|
+
/**
|
|
378
|
+
* The content of the component.
|
|
379
|
+
*/
|
|
380
|
+
children: e.node,
|
|
381
|
+
/**
|
|
382
|
+
* Override or extend the styles applied to the component.
|
|
383
|
+
*/
|
|
384
|
+
classes: e.object,
|
|
385
|
+
/**
|
|
386
|
+
* @ignore
|
|
387
|
+
*/
|
|
388
|
+
className: e.string,
|
|
389
|
+
/**
|
|
390
|
+
* The color of the component.
|
|
391
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
392
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
393
|
+
*/
|
|
394
|
+
color: e.oneOfType([e.oneOf(["error", "info", "primary", "secondary", "success", "warning"]), e.string]),
|
|
395
|
+
/**
|
|
396
|
+
* The component used for the root node.
|
|
397
|
+
* Either a string to use a HTML element or a component.
|
|
398
|
+
*/
|
|
399
|
+
component: e.elementType,
|
|
400
|
+
/**
|
|
401
|
+
* If `true`, the label should be displayed in a disabled state.
|
|
402
|
+
*/
|
|
403
|
+
disabled: e.bool,
|
|
404
|
+
/**
|
|
405
|
+
* If `true`, the label is displayed in an error state.
|
|
406
|
+
*/
|
|
407
|
+
error: e.bool,
|
|
408
|
+
/**
|
|
409
|
+
* If `true`, the label should use filled classes key.
|
|
410
|
+
*/
|
|
411
|
+
filled: e.bool,
|
|
412
|
+
/**
|
|
413
|
+
* If `true`, the input of this label is focused (used by `FormGroup` components).
|
|
414
|
+
*/
|
|
415
|
+
focused: e.bool,
|
|
416
|
+
/**
|
|
417
|
+
* If `true`, the label will indicate that the `input` is required.
|
|
418
|
+
*/
|
|
419
|
+
required: e.bool,
|
|
420
|
+
/**
|
|
421
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
422
|
+
*/
|
|
423
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
424
|
+
});
|
|
425
|
+
function pe(r) {
|
|
267
426
|
return z("MuiFormHelperText", r);
|
|
268
427
|
}
|
|
269
428
|
const J = E("MuiFormHelperText", ["root", "error", "disabled", "sizeSmall", "sizeMedium", "contained", "focused", "filled", "required"]);
|
|
270
429
|
var K;
|
|
271
|
-
const
|
|
430
|
+
const me = (r) => {
|
|
272
431
|
const {
|
|
273
432
|
classes: o,
|
|
274
433
|
contained: t,
|
|
@@ -281,8 +440,8 @@ const de = (r) => {
|
|
|
281
440
|
} = r, b = {
|
|
282
441
|
root: ["root", s && "disabled", u && "error", n && `size${T(n)}`, t && "contained", f && "focused", d && "filled", c && "required"]
|
|
283
442
|
};
|
|
284
|
-
return A(b,
|
|
285
|
-
},
|
|
443
|
+
return A(b, pe, o);
|
|
444
|
+
}, be = N("p", {
|
|
286
445
|
name: "MuiFormHelperText",
|
|
287
446
|
slot: "Root",
|
|
288
447
|
overridesResolver: (r, o) => {
|
|
@@ -323,7 +482,7 @@ const de = (r) => {
|
|
|
323
482
|
marginRight: 14
|
|
324
483
|
}
|
|
325
484
|
}]
|
|
326
|
-
}))),
|
|
485
|
+
}))), ye = /* @__PURE__ */ a.forwardRef(function(o, t) {
|
|
327
486
|
const n = L({
|
|
328
487
|
props: o,
|
|
329
488
|
name: "MuiFormHelperText"
|
|
@@ -356,8 +515,8 @@ const de = (r) => {
|
|
|
356
515
|
required: l.required
|
|
357
516
|
};
|
|
358
517
|
delete p.ownerState;
|
|
359
|
-
const S =
|
|
360
|
-
return /* @__PURE__ */ O(
|
|
518
|
+
const S = me(p);
|
|
519
|
+
return /* @__PURE__ */ O(be, {
|
|
361
520
|
as: d,
|
|
362
521
|
className: $(S.root, u),
|
|
363
522
|
ref: t,
|
|
@@ -373,7 +532,7 @@ const de = (r) => {
|
|
|
373
532
|
) : s
|
|
374
533
|
});
|
|
375
534
|
});
|
|
376
|
-
process.env.NODE_ENV !== "production" && (
|
|
535
|
+
process.env.NODE_ENV !== "production" && (ye.propTypes = {
|
|
377
536
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
378
537
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
379
538
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -431,169 +590,10 @@ process.env.NODE_ENV !== "production" && (ue.propTypes = {
|
|
|
431
590
|
*/
|
|
432
591
|
variant: e.oneOfType([e.oneOf(["filled", "outlined", "standard"]), e.string])
|
|
433
592
|
});
|
|
434
|
-
function fe(r) {
|
|
435
|
-
return z("MuiFormLabel", r);
|
|
436
|
-
}
|
|
437
|
-
const x = E("MuiFormLabel", ["root", "colorSecondary", "focused", "disabled", "error", "filled", "required", "asterisk"]), pe = (r) => {
|
|
438
|
-
const {
|
|
439
|
-
classes: o,
|
|
440
|
-
color: t,
|
|
441
|
-
focused: n,
|
|
442
|
-
disabled: s,
|
|
443
|
-
error: u,
|
|
444
|
-
filled: d,
|
|
445
|
-
required: f
|
|
446
|
-
} = r, c = {
|
|
447
|
-
root: ["root", `color${T(t)}`, s && "disabled", u && "error", d && "filled", n && "focused", f && "required"],
|
|
448
|
-
asterisk: ["asterisk", u && "error"]
|
|
449
|
-
};
|
|
450
|
-
return A(c, fe, o);
|
|
451
|
-
}, me = N("label", {
|
|
452
|
-
name: "MuiFormLabel",
|
|
453
|
-
slot: "Root",
|
|
454
|
-
overridesResolver: (r, o) => {
|
|
455
|
-
const {
|
|
456
|
-
ownerState: t
|
|
457
|
-
} = r;
|
|
458
|
-
return [o.root, t.color === "secondary" && o.colorSecondary, t.filled && o.filled];
|
|
459
|
-
}
|
|
460
|
-
})(H(({
|
|
461
|
-
theme: r
|
|
462
|
-
}) => ({
|
|
463
|
-
color: (r.vars || r).palette.text.secondary,
|
|
464
|
-
...r.typography.body1,
|
|
465
|
-
lineHeight: "1.4375em",
|
|
466
|
-
padding: 0,
|
|
467
|
-
position: "relative",
|
|
468
|
-
variants: [...Object.entries(r.palette).filter(oe()).map(([o]) => ({
|
|
469
|
-
props: {
|
|
470
|
-
color: o
|
|
471
|
-
},
|
|
472
|
-
style: {
|
|
473
|
-
[`&.${x.focused}`]: {
|
|
474
|
-
color: (r.vars || r).palette[o].main
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
})), {
|
|
478
|
-
props: {},
|
|
479
|
-
style: {
|
|
480
|
-
[`&.${x.disabled}`]: {
|
|
481
|
-
color: (r.vars || r).palette.text.disabled
|
|
482
|
-
},
|
|
483
|
-
[`&.${x.error}`]: {
|
|
484
|
-
color: (r.vars || r).palette.error.main
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
}]
|
|
488
|
-
}))), be = N("span", {
|
|
489
|
-
name: "MuiFormLabel",
|
|
490
|
-
slot: "Asterisk"
|
|
491
|
-
})(H(({
|
|
492
|
-
theme: r
|
|
493
|
-
}) => ({
|
|
494
|
-
[`&.${x.error}`]: {
|
|
495
|
-
color: (r.vars || r).palette.error.main
|
|
496
|
-
}
|
|
497
|
-
}))), ye = /* @__PURE__ */ a.forwardRef(function(o, t) {
|
|
498
|
-
const n = L({
|
|
499
|
-
props: o,
|
|
500
|
-
name: "MuiFormLabel"
|
|
501
|
-
}), {
|
|
502
|
-
children: s,
|
|
503
|
-
className: u,
|
|
504
|
-
color: d,
|
|
505
|
-
component: f = "label",
|
|
506
|
-
disabled: c,
|
|
507
|
-
error: b,
|
|
508
|
-
filled: C,
|
|
509
|
-
focused: g,
|
|
510
|
-
required: v,
|
|
511
|
-
...h
|
|
512
|
-
} = n, y = Q(), i = X({
|
|
513
|
-
props: n,
|
|
514
|
-
muiFormControl: y,
|
|
515
|
-
states: ["color", "required", "focused", "disabled", "error", "filled"]
|
|
516
|
-
}), l = {
|
|
517
|
-
...n,
|
|
518
|
-
color: i.color || "primary",
|
|
519
|
-
component: f,
|
|
520
|
-
disabled: i.disabled,
|
|
521
|
-
error: i.error,
|
|
522
|
-
filled: i.filled,
|
|
523
|
-
focused: i.focused,
|
|
524
|
-
required: i.required
|
|
525
|
-
}, p = pe(l);
|
|
526
|
-
return /* @__PURE__ */ P(me, {
|
|
527
|
-
as: f,
|
|
528
|
-
ownerState: l,
|
|
529
|
-
className: $(p.root, u),
|
|
530
|
-
ref: t,
|
|
531
|
-
...h,
|
|
532
|
-
children: [s, i.required && /* @__PURE__ */ P(be, {
|
|
533
|
-
ownerState: l,
|
|
534
|
-
"aria-hidden": !0,
|
|
535
|
-
className: p.asterisk,
|
|
536
|
-
children: [" ", "*"]
|
|
537
|
-
})]
|
|
538
|
-
});
|
|
539
|
-
});
|
|
540
|
-
process.env.NODE_ENV !== "production" && (ye.propTypes = {
|
|
541
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
542
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
543
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
544
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
545
|
-
/**
|
|
546
|
-
* The content of the component.
|
|
547
|
-
*/
|
|
548
|
-
children: e.node,
|
|
549
|
-
/**
|
|
550
|
-
* Override or extend the styles applied to the component.
|
|
551
|
-
*/
|
|
552
|
-
classes: e.object,
|
|
553
|
-
/**
|
|
554
|
-
* @ignore
|
|
555
|
-
*/
|
|
556
|
-
className: e.string,
|
|
557
|
-
/**
|
|
558
|
-
* The color of the component.
|
|
559
|
-
* It supports both default and custom theme colors, which can be added as shown in the
|
|
560
|
-
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
561
|
-
*/
|
|
562
|
-
color: e.oneOfType([e.oneOf(["error", "info", "primary", "secondary", "success", "warning"]), e.string]),
|
|
563
|
-
/**
|
|
564
|
-
* The component used for the root node.
|
|
565
|
-
* Either a string to use a HTML element or a component.
|
|
566
|
-
*/
|
|
567
|
-
component: e.elementType,
|
|
568
|
-
/**
|
|
569
|
-
* If `true`, the label should be displayed in a disabled state.
|
|
570
|
-
*/
|
|
571
|
-
disabled: e.bool,
|
|
572
|
-
/**
|
|
573
|
-
* If `true`, the label is displayed in an error state.
|
|
574
|
-
*/
|
|
575
|
-
error: e.bool,
|
|
576
|
-
/**
|
|
577
|
-
* If `true`, the label should use filled classes key.
|
|
578
|
-
*/
|
|
579
|
-
filled: e.bool,
|
|
580
|
-
/**
|
|
581
|
-
* If `true`, the input of this label is focused (used by `FormGroup` components).
|
|
582
|
-
*/
|
|
583
|
-
focused: e.bool,
|
|
584
|
-
/**
|
|
585
|
-
* If `true`, the label will indicate that the `input` is required.
|
|
586
|
-
*/
|
|
587
|
-
required: e.bool,
|
|
588
|
-
/**
|
|
589
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
590
|
-
*/
|
|
591
|
-
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
592
|
-
});
|
|
593
593
|
export {
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
594
|
+
ye as F,
|
|
595
|
+
ie as a,
|
|
596
|
+
fe as b,
|
|
597
597
|
he as c,
|
|
598
598
|
x as d,
|
|
599
599
|
X as f,
|
|
@@ -3,7 +3,7 @@ import { T as h, g as P, a as b, e as d, f as c, P as a } from "./generateUtilit
|
|
|
3
3
|
import { d as T, u as g, s as w, c as E, a as $, m as N } from "./DefaultPropsProvider-DVX_ssOt.js";
|
|
4
4
|
import { useTheme as O } from "@mui/system";
|
|
5
5
|
import { jsx as x } from "react/jsx-runtime";
|
|
6
|
-
import { a as C } from "./useTimeout-
|
|
6
|
+
import { a as C } from "./useTimeout-UzNJH-cm.js";
|
|
7
7
|
import { i as M } from "./integerPropType-BihGt2aU.js";
|
|
8
8
|
function R() {
|
|
9
9
|
const e = O(T);
|