@simoncomputing/mui-bueno-v3 0.2.6 → 0.2.7
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/CHANGELOG.md +11 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +10 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,25 +11,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
- Minor increment --> singlular/minor changes. Minimal breaking changes.
|
|
12
12
|
- Patch increment --> singlular/minor changes. Zero breaking changes.
|
|
13
13
|
|
|
14
|
+
## [0.2.7] - 2026-04-8
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Update Error to show validation messages for values inside nested objects and arrays
|
|
19
|
+
|
|
14
20
|
## [0.2.6] - 2026-03-16
|
|
15
21
|
|
|
16
22
|
### Changed
|
|
23
|
+
|
|
17
24
|
- Update Submit Button to be disabled ruing form submission
|
|
18
25
|
|
|
19
26
|
## [0.2.5] - 2026-03-05
|
|
20
27
|
|
|
21
28
|
### Changed
|
|
29
|
+
|
|
22
30
|
- Update dynamic autocomplete with debounceTimeout property (default of 400ms)
|
|
23
31
|
- Update Autocomplete and Select input components to use space bar for selecting values
|
|
24
32
|
|
|
25
33
|
## [0.1.2] - 2025-07-09
|
|
26
34
|
|
|
27
35
|
### Changed
|
|
36
|
+
|
|
28
37
|
- Update index.ts to include MForm
|
|
29
38
|
|
|
30
39
|
## [0.1.1] - 2025-07-08
|
|
31
40
|
|
|
32
41
|
### Changed
|
|
42
|
+
|
|
33
43
|
- Converting existing input components for react-hook-form
|
|
34
44
|
- Components:
|
|
35
45
|
- Inputs
|
|
@@ -39,6 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
39
49
|
## [0.1.0] - 2025-07-08
|
|
40
50
|
|
|
41
51
|
### Changed
|
|
52
|
+
|
|
42
53
|
- Converting existing input components for react-hook-form
|
|
43
54
|
- Components:
|
|
44
55
|
- Inputs
|
package/dist/index.cjs.js
CHANGED
|
@@ -77,7 +77,7 @@ theme.transitions = createTransitions(theme.transitions || {});
|
|
|
77
77
|
|
|
78
78
|
export default theme;`}function Xu(e={},...t){const{breakpoints:n,mixins:o={},spacing:s,palette:l={},transitions:c={},typography:u={},shape:d,...f}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":wr(20));const h=xd(l),b=Vs(e);let y=Qt(b,{mixins:vk(b.breakpoints,o),palette:h,shadows:Tk.slice(),typography:wk(h,u),transitions:Rk(c),zIndex:{...Mk}});if(y=Qt(y,f),y=t.reduce((C,w)=>Qt(C,w),y),process.env.NODE_ENV!=="production"){const C=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],w=(g,S)=>{let T;for(T in g){const M=g[T];if(C.includes(T)&&Object.keys(M).length>0){if(process.env.NODE_ENV!=="production"){const O=Be("",T);console.error([`MUI: The \`${S}\` component increases the CSS specificity of the \`${T}\` internal state.`,"You can not override it like this: ",JSON.stringify(g,null,2),"",`Instead, you need to use the '&.${O}' syntax:`,JSON.stringify({root:{[`&.${O}`]:M}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
79
79
|
`))}g[T]={}}}};Object.keys(y.components).forEach(g=>{const S=y.components[g].styleOverrides;S&&g.startsWith("Mui")&&w(S,g)})}return y.unstable_sxConfig={...Bs,...f==null?void 0:f.unstable_sxConfig},y.unstable_sx=function(w){return Ci({sx:w,theme:this})},y.toRuntimeSource=nb,y}function Zu(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const kk=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Zu(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function rb(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function ob(e){return e==="dark"?kk:[]}function Ik(e){const{palette:t={mode:"light"},opacity:n,overlays:o,...s}=e,l=xd(t);return{palette:l,opacity:{...rb(l.mode),...n},overlays:o||ob(l.mode),...s}}function Ak(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const jk=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],$k=e=>(t,n)=>{const o=e.rootSelector||":root",s=e.colorSchemeSelector;let l=s;if(s==="class"&&(l=".%s"),s==="data"&&(l="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(l=`[${s}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const c={};return jk(e.cssVarPrefix).forEach(u=>{c[u]=n[u],delete n[u]}),l==="media"?{[o]:n,"@media (prefers-color-scheme: dark)":{[o]:c}}:l?{[l.replace("%s",t)]:c,[`${o}, ${l.replace("%s",t)}`]:n}:{[o]:{...n,...c}}}if(l&&l!=="media")return`${o}, ${l.replace("%s",String(t))}`}else if(t){if(l==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[o]:n}};if(l)return l.replace("%s",String(t))}return o};function Nk(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function he(e,t,n){!e[t]&&n&&(e[t]=n)}function cs(e){return typeof e!="string"||!e.startsWith("hsl")?e:Qy(e)}function jr(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ls(cs(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
80
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Fk(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const mr=e=>{try{return e()}catch{}},Lk=(e="mui")=>jD(e);function $u(e,t,n,o){if(!t)return;t=t===!0?{}:t;const s=o==="dark"?"dark":"light";if(!n){e[o]=Ik({...t,palette:{mode:s,...t==null?void 0:t.palette}});return}const{palette:l,...c}=Xu({...n,palette:{mode:s,...t==null?void 0:t.palette}});return e[o]={...t,palette:l,opacity:{...rb(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||ob(s)},c}function Bk(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:o,disableCssColorScheme:s=!1,cssVarPrefix:l="mui",shouldSkipGeneratingVar:c=Ak,colorSchemeSelector:u=n.light&&n.dark?"media":void 0,rootSelector:d=":root",...f}=e,h=Object.keys(n)[0],b=o||(n.light&&h!=="light"?"light":h),y=Lk(l),{[b]:C,light:w,dark:g,...S}=n,T={...S};let M=C;if((b==="dark"&&!("dark"in n)||b==="light"&&!("light"in n))&&(M=!0),!M)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${b}\` option is either missing or invalid.`:wr(21,b));const O=$u(T,M,f,b);w&&!T.light&&$u(T,w,void 0,"light"),g&&!T.dark&&$u(T,g,void 0,"dark");let x={defaultColorScheme:b,...O,cssVarPrefix:l,colorSchemeSelector:u,rootSelector:d,getCssVar:y,colorSchemes:T,font:{...bk(O.typography),...O.font},spacing:Fk(f.spacing)};Object.keys(x.colorSchemes).forEach(N=>{const _=x.colorSchemes[N].palette,$=F=>{const B=F.split("-"),z=B[1],V=B[2];return y(F,_[z][V])};if(_.mode==="light"&&(he(_.common,"background","#fff"),he(_.common,"onBackground","#000")),_.mode==="dark"&&(he(_.common,"background","#000"),he(_.common,"onBackground","#fff")),Nk(_,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),_.mode==="light"){he(_.Alert,"errorColor",wt(_.error.light,.6)),he(_.Alert,"infoColor",wt(_.info.light,.6)),he(_.Alert,"successColor",wt(_.success.light,.6)),he(_.Alert,"warningColor",wt(_.warning.light,.6)),he(_.Alert,"errorFilledBg",$("palette-error-main")),he(_.Alert,"infoFilledBg",$("palette-info-main")),he(_.Alert,"successFilledBg",$("palette-success-main")),he(_.Alert,"warningFilledBg",$("palette-warning-main")),he(_.Alert,"errorFilledColor",mr(()=>_.getContrastText(_.error.main))),he(_.Alert,"infoFilledColor",mr(()=>_.getContrastText(_.info.main))),he(_.Alert,"successFilledColor",mr(()=>_.getContrastText(_.success.main))),he(_.Alert,"warningFilledColor",mr(()=>_.getContrastText(_.warning.main))),he(_.Alert,"errorStandardBg",St(_.error.light,.9)),he(_.Alert,"infoStandardBg",St(_.info.light,.9)),he(_.Alert,"successStandardBg",St(_.success.light,.9)),he(_.Alert,"warningStandardBg",St(_.warning.light,.9)),he(_.Alert,"errorIconColor",$("palette-error-main")),he(_.Alert,"infoIconColor",$("palette-info-main")),he(_.Alert,"successIconColor",$("palette-success-main")),he(_.Alert,"warningIconColor",$("palette-warning-main")),he(_.AppBar,"defaultBg",$("palette-grey-100")),he(_.Avatar,"defaultBg",$("palette-grey-400")),he(_.Button,"inheritContainedBg",$("palette-grey-300")),he(_.Button,"inheritContainedHoverBg",$("palette-grey-A100")),he(_.Chip,"defaultBorder",$("palette-grey-400")),he(_.Chip,"defaultAvatarColor",$("palette-grey-700")),he(_.Chip,"defaultIconColor",$("palette-grey-700")),he(_.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),he(_.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),he(_.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),he(_.LinearProgress,"primaryBg",St(_.primary.main,.62)),he(_.LinearProgress,"secondaryBg",St(_.secondary.main,.62)),he(_.LinearProgress,"errorBg",St(_.error.main,.62)),he(_.LinearProgress,"infoBg",St(_.info.main,.62)),he(_.LinearProgress,"successBg",St(_.success.main,.62)),he(_.LinearProgress,"warningBg",St(_.warning.main,.62)),he(_.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.11)`),he(_.Slider,"primaryTrack",St(_.primary.main,.62)),he(_.Slider,"secondaryTrack",St(_.secondary.main,.62)),he(_.Slider,"errorTrack",St(_.error.main,.62)),he(_.Slider,"infoTrack",St(_.info.main,.62)),he(_.Slider,"successTrack",St(_.success.main,.62)),he(_.Slider,"warningTrack",St(_.warning.main,.62));const F=Ya(_.background.default,.8);he(_.SnackbarContent,"bg",F),he(_.SnackbarContent,"color",mr(()=>_.getContrastText(F))),he(_.SpeedDialAction,"fabHoverBg",Ya(_.background.paper,.15)),he(_.StepConnector,"border",$("palette-grey-400")),he(_.StepContent,"border",$("palette-grey-400")),he(_.Switch,"defaultColor",$("palette-common-white")),he(_.Switch,"defaultDisabledColor",$("palette-grey-100")),he(_.Switch,"primaryDisabledColor",St(_.primary.main,.62)),he(_.Switch,"secondaryDisabledColor",St(_.secondary.main,.62)),he(_.Switch,"errorDisabledColor",St(_.error.main,.62)),he(_.Switch,"infoDisabledColor",St(_.info.main,.62)),he(_.Switch,"successDisabledColor",St(_.success.main,.62)),he(_.Switch,"warningDisabledColor",St(_.warning.main,.62)),he(_.TableCell,"border",St(qa(_.divider,1),.88)),he(_.Tooltip,"bg",qa(_.grey[700],.92))}if(_.mode==="dark"){he(_.Alert,"errorColor",St(_.error.light,.6)),he(_.Alert,"infoColor",St(_.info.light,.6)),he(_.Alert,"successColor",St(_.success.light,.6)),he(_.Alert,"warningColor",St(_.warning.light,.6)),he(_.Alert,"errorFilledBg",$("palette-error-dark")),he(_.Alert,"infoFilledBg",$("palette-info-dark")),he(_.Alert,"successFilledBg",$("palette-success-dark")),he(_.Alert,"warningFilledBg",$("palette-warning-dark")),he(_.Alert,"errorFilledColor",mr(()=>_.getContrastText(_.error.dark))),he(_.Alert,"infoFilledColor",mr(()=>_.getContrastText(_.info.dark))),he(_.Alert,"successFilledColor",mr(()=>_.getContrastText(_.success.dark))),he(_.Alert,"warningFilledColor",mr(()=>_.getContrastText(_.warning.dark))),he(_.Alert,"errorStandardBg",wt(_.error.light,.9)),he(_.Alert,"infoStandardBg",wt(_.info.light,.9)),he(_.Alert,"successStandardBg",wt(_.success.light,.9)),he(_.Alert,"warningStandardBg",wt(_.warning.light,.9)),he(_.Alert,"errorIconColor",$("palette-error-main")),he(_.Alert,"infoIconColor",$("palette-info-main")),he(_.Alert,"successIconColor",$("palette-success-main")),he(_.Alert,"warningIconColor",$("palette-warning-main")),he(_.AppBar,"defaultBg",$("palette-grey-900")),he(_.AppBar,"darkBg",$("palette-background-paper")),he(_.AppBar,"darkColor",$("palette-text-primary")),he(_.Avatar,"defaultBg",$("palette-grey-600")),he(_.Button,"inheritContainedBg",$("palette-grey-800")),he(_.Button,"inheritContainedHoverBg",$("palette-grey-700")),he(_.Chip,"defaultBorder",$("palette-grey-700")),he(_.Chip,"defaultAvatarColor",$("palette-grey-300")),he(_.Chip,"defaultIconColor",$("palette-grey-300")),he(_.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),he(_.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),he(_.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),he(_.LinearProgress,"primaryBg",wt(_.primary.main,.5)),he(_.LinearProgress,"secondaryBg",wt(_.secondary.main,.5)),he(_.LinearProgress,"errorBg",wt(_.error.main,.5)),he(_.LinearProgress,"infoBg",wt(_.info.main,.5)),he(_.LinearProgress,"successBg",wt(_.success.main,.5)),he(_.LinearProgress,"warningBg",wt(_.warning.main,.5)),he(_.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.13)`),he(_.Slider,"primaryTrack",wt(_.primary.main,.5)),he(_.Slider,"secondaryTrack",wt(_.secondary.main,.5)),he(_.Slider,"errorTrack",wt(_.error.main,.5)),he(_.Slider,"infoTrack",wt(_.info.main,.5)),he(_.Slider,"successTrack",wt(_.success.main,.5)),he(_.Slider,"warningTrack",wt(_.warning.main,.5));const F=Ya(_.background.default,.98);he(_.SnackbarContent,"bg",F),he(_.SnackbarContent,"color",mr(()=>_.getContrastText(F))),he(_.SpeedDialAction,"fabHoverBg",Ya(_.background.paper,.15)),he(_.StepConnector,"border",$("palette-grey-600")),he(_.StepContent,"border",$("palette-grey-600")),he(_.Switch,"defaultColor",$("palette-grey-300")),he(_.Switch,"defaultDisabledColor",$("palette-grey-600")),he(_.Switch,"primaryDisabledColor",wt(_.primary.main,.55)),he(_.Switch,"secondaryDisabledColor",wt(_.secondary.main,.55)),he(_.Switch,"errorDisabledColor",wt(_.error.main,.55)),he(_.Switch,"infoDisabledColor",wt(_.info.main,.55)),he(_.Switch,"successDisabledColor",wt(_.success.main,.55)),he(_.Switch,"warningDisabledColor",wt(_.warning.main,.55)),he(_.TableCell,"border",wt(qa(_.divider,1),.68)),he(_.Tooltip,"bg",qa(_.grey[700],.92))}jr(_.background,"default"),jr(_.background,"paper"),jr(_.common,"background"),jr(_.common,"onBackground"),jr(_,"divider"),Object.keys(_).forEach(F=>{const B=_[F];F!=="tonalOffset"&&B&&typeof B=="object"&&(B.main&&he(_[F],"mainChannel",ls(cs(B.main))),B.light&&he(_[F],"lightChannel",ls(cs(B.light))),B.dark&&he(_[F],"darkChannel",ls(cs(B.dark))),B.contrastText&&he(_[F],"contrastTextChannel",ls(cs(B.contrastText))),F==="text"&&(jr(_[F],"primary"),jr(_[F],"secondary")),F==="action"&&(B.active&&jr(_[F],"active"),B.selected&&jr(_[F],"selected")))})}),x=t.reduce((N,_)=>Qt(N,_),x);const R={prefix:l,disableCssColorScheme:s,shouldSkipGeneratingVar:c,getSelector:$k(x)},{vars:D,generateThemeVars:A,generateStyleSheets:I}=FD(x,R);return x.vars=D,Object.entries(x.colorSchemes[x.defaultColorScheme]).forEach(([N,_])=>{x[N]=_}),x.generateThemeVars=A,x.generateStyleSheets=I,x.generateSpacing=function(){return Vy(f.spacing,Ml(this))},x.getColorSchemeSelector=LD(u),x.spacing=x.generateSpacing(),x.shouldSkipGeneratingVar=c,x.unstable_sxConfig={...Bs,...f==null?void 0:f.unstable_sxConfig},x.unstable_sx=function(_){return Ci({sx:_,theme:this})},x.toRuntimeSource=nb,x}function Cm(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:xd({...n===!0?{}:n.palette,mode:t})})}function Vk(e={},...t){const{palette:n,cssVariables:o=!1,colorSchemes:s=n?void 0:{light:!0},defaultColorScheme:l=n==null?void 0:n.mode,...c}=e,u=l||"light",d=s==null?void 0:s[u],f={...s,...n?{[u]:{...typeof d!="boolean"&&d,palette:n}}:void 0};if(o===!1){if(!("colorSchemes"in e))return Xu(e,...t);let h=n;"palette"in e||f[u]&&(f[u]!==!0?h=f[u].palette:u==="dark"&&(h={mode:"dark"}));const b=Xu({...e,palette:h},...t);return b.defaultColorScheme=u,b.colorSchemes=f,b.palette.mode==="light"&&(b.colorSchemes.light={...f.light!==!0&&f.light,palette:b.palette},Cm(b,"dark",f.dark)),b.palette.mode==="dark"&&(b.colorSchemes.dark={...f.dark!==!0&&f.dark,palette:b.palette},Cm(b,"light",f.light)),b}return!n&&!("light"in f)&&u==="light"&&(f.light=!0),Bk({...c,colorSchemes:f,defaultColorScheme:u,...typeof o!="boolean"&&o},...t)}const Ll=Vk(),Ws="$$material";function Fo(){const e=$l(Ll);return process.env.NODE_ENV!=="production"&&E.useDebugValue(e),e[Ws]||e}function ib(e){return m.jsx(zy,{...e,defaultTheme:Ll,themeId:Ws})}process.env.NODE_ENV!=="production"&&(ib.propTypes={styles:r.oneOfType([r.array,r.func,r.number,r.object,r.string,r.bool])});function sb(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ur=e=>sb(e)&&e!=="classes",pe=qy({themeId:Ws,defaultTheme:Ll,rootShouldForwardProp:ur});function Wk(e){return function(n){return m.jsx(ib,{styles:typeof e=="function"?o=>e({theme:o,...n}):e})}}function zk(){return yd}const bt=AD;process.env.NODE_ENV!=="production"&&(r.node,r.object.isRequired);function at(e){return ID(e)}function Uk(e){return Be("MuiSvgIcon",e)}Ve("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Hk=e=>{const{color:t,fontSize:n,classes:o}=e,s={root:["root",t!=="inherit"&&`color${Oe(t)}`,`fontSize${Oe(n)}`]};return Le(s,Uk,o)},qk=pe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Oe(n.color)}`],t[`fontSize${Oe(n.fontSize)}`]]}})(bt(({theme:e})=>{var t,n,o,s,l,c,u,d,f,h,b,y,C,w;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(s=(t=e.transitions)==null?void 0:t.create)==null?void 0:s.call(t,"fill",{duration:(o=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:o.shorter}),variants:[{props:g=>!g.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((c=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:c.call(l,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((d=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:d.call(u,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((h=(f=e.typography)==null?void 0:f.pxToRem)==null?void 0:h.call(f,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,g])=>g&&g.main).map(([g])=>{var S,T;return{props:{color:g},style:{color:(T=(S=(e.vars??e).palette)==null?void 0:S[g])==null?void 0:T.main}}}),{props:{color:"action"},style:{color:(y=(b=(e.vars??e).palette)==null?void 0:b.action)==null?void 0:y.active}},{props:{color:"disabled"},style:{color:(w=(C=(e.vars??e).palette)==null?void 0:C.action)==null?void 0:w.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),dl=E.forwardRef(function(t,n){const o=at({props:t,name:"MuiSvgIcon"}),{children:s,className:l,color:c="inherit",component:u="svg",fontSize:d="medium",htmlColor:f,inheritViewBox:h=!1,titleAccess:b,viewBox:y="0 0 24 24",...C}=o,w=E.isValidElement(s)&&s.type==="svg",g={...o,color:c,component:u,fontSize:d,instanceFontSize:t.fontSize,inheritViewBox:h,viewBox:y,hasSvgAsChild:w},S={};h||(S.viewBox=y);const T=Hk(g);return m.jsxs(qk,{as:u,className:Re(T.root,l),focusable:"false",color:f,"aria-hidden":b?void 0:!0,role:b?"img":void 0,ref:n,...S,...C,...w&&s.props,ownerState:g,children:[w?s.props.children:s,b?m.jsx("title",{children:b}):null]})});process.env.NODE_ENV!=="production"&&(dl.propTypes={children:r.node,classes:r.object,className:r.string,color:r.oneOfType([r.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),r.string]),component:r.elementType,fontSize:r.oneOfType([r.oneOf(["inherit","large","medium","small"]),r.string]),htmlColor:r.string,inheritViewBox:r.bool,shapeRendering:r.string,sx:r.oneOfType([r.arrayOf(r.oneOfType([r.func,r.object,r.bool])),r.func,r.object]),titleAccess:r.string,viewBox:r.string});dl.muiName="SvgIcon";function Pt(e,t){function n(o,s){return m.jsx(dl,{"data-testid":`${t}Icon`,ref:s,...o,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=dl.muiName,E.memo(E.forwardRef(n))}function Yk(e,t){if(!e)return t;if(typeof e=="function"||typeof t=="function")return s=>{const l=typeof t=="function"?t(s):t,c=typeof e=="function"?e({...s,...l}):e,u=Re(s==null?void 0:s.className,l==null?void 0:l.className,c==null?void 0:c.className);return{...l,...c,...!!u&&{className:u},...(l==null?void 0:l.style)&&(c==null?void 0:c.style)&&{style:{...l.style,...c.style}},...(l==null?void 0:l.sx)&&(c==null?void 0:c.sx)&&{sx:[...Array.isArray(l.sx)?l.sx:[l.sx],...Array.isArray(c.sx)?c.sx:[c.sx]]}}};const n=t,o=Re(n==null?void 0:n.className,e==null?void 0:e.className);return{...t,...e,...!!o&&{className:o},...(n==null?void 0:n.style)&&(e==null?void 0:e.style)&&{style:{...n.style,...e.style}},...(n==null?void 0:n.sx)&&(e==null?void 0:e.sx)&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const ab=Pt(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),Xn=e=>{var l;const{name:t,id:n,className:o}=e,{formState:{errors:s}}=Ke.useFormContext();return m.jsxs(L.Typography,{id:n,variant:"caption",display:"block",color:"error",style:{visibility:s[t]?"visible":"hidden"},className:o,fontSize:".9rem",children:[m.jsx(L.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",position:"relative",top:"3px",mr:.5},children:m.jsx(ab,{fontSize:"inherit"})}),`${(l=s[t])==null?void 0:l.message}`]})},lb=e=>{const{name:t,label:n=ln(t),options:o=[],filterSelectedOptions:s=!0,variant:l="outlined",staticLabel:c=!1,staticLabelProps:u={fontSize:".9em",color:"#808080"},readOnly:d,margin:f="dense",fullWidth:h=!0,required:b,onChange:y,clearOnSelect:C=!1,onInputChange:w,getOptionLabel:g=I=>typeof I=="string"?I:String(I),isOptionEqualToValue:S=(I,N)=>JSON.stringify(I)===JSON.stringify(N),useFieldAsValue:T,...M}=e,{formState:{errors:O},control:x}=Ke.useFormContext(),[R,D]=E.useState(""),A=I=>{if(!I)return"";if(T){const N=o.find(_=>_[T]===I);return N?g(N):""}return g(I)};return m.jsx(Ke.Controller,{name:t,control:x,render:({field:I})=>{const N=T?o.find($=>$[T]===I.value)||null:I.value??null,_={...Kn(M,["useFieldAsValue","autoFocus"]),getOptionLabel:g,options:o,filterSelectedOptions:s,isOptionEqualToValue:S,renderInput:$=>{const{onKeyDown:F}=$.inputProps;return m.jsx(L.TextField,{...$,variant:l,label:c?void 0:n,error:!!O[t],required:b,autoFocus:M.autoFocus,slotProps:{input:{...$.InputProps,onKeyDown:B=>{if(B.key===" "){const z=document.querySelector(".MuiAutocomplete-option.Mui-focused");z&&(B.preventDefault(),z.click())}F&&F(B)}}}})},onChange:($,F,B,z)=>{C?(D(""),I.onChange(null)):T?I.onChange(F?F[T]:null):I.onChange(F),y&&y($,F,B,z)},onInputChange:($,F,B)=>{D(F),w&&w($,F,B)},fullWidth:!0,inputValue:R,value:N,slotProps:{paper:{elevation:8,sx:{borderRadius:2}}}};return m.jsxs(L.FormControl,{margin:f,fullWidth:h,required:b,children:[(c||d)&&m.jsx(L.Typography,{...u,children:n}),d?m.jsx(L.Typography,{children:A(I.value)}):m.jsxs(L.Box,{children:[m.jsx(L.Autocomplete,{..._}),m.jsx(Xn,{name:t,id:`${t}-err`})]})]})}})};var us={exports:{}};/**
|
|
80
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Fk(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const mr=e=>{try{return e()}catch{}},Lk=(e="mui")=>jD(e);function $u(e,t,n,o){if(!t)return;t=t===!0?{}:t;const s=o==="dark"?"dark":"light";if(!n){e[o]=Ik({...t,palette:{mode:s,...t==null?void 0:t.palette}});return}const{palette:l,...c}=Xu({...n,palette:{mode:s,...t==null?void 0:t.palette}});return e[o]={...t,palette:l,opacity:{...rb(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||ob(s)},c}function Bk(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:o,disableCssColorScheme:s=!1,cssVarPrefix:l="mui",shouldSkipGeneratingVar:c=Ak,colorSchemeSelector:u=n.light&&n.dark?"media":void 0,rootSelector:d=":root",...f}=e,h=Object.keys(n)[0],b=o||(n.light&&h!=="light"?"light":h),y=Lk(l),{[b]:C,light:w,dark:g,...S}=n,T={...S};let M=C;if((b==="dark"&&!("dark"in n)||b==="light"&&!("light"in n))&&(M=!0),!M)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${b}\` option is either missing or invalid.`:wr(21,b));const O=$u(T,M,f,b);w&&!T.light&&$u(T,w,void 0,"light"),g&&!T.dark&&$u(T,g,void 0,"dark");let x={defaultColorScheme:b,...O,cssVarPrefix:l,colorSchemeSelector:u,rootSelector:d,getCssVar:y,colorSchemes:T,font:{...bk(O.typography),...O.font},spacing:Fk(f.spacing)};Object.keys(x.colorSchemes).forEach(N=>{const _=x.colorSchemes[N].palette,$=F=>{const B=F.split("-"),z=B[1],V=B[2];return y(F,_[z][V])};if(_.mode==="light"&&(he(_.common,"background","#fff"),he(_.common,"onBackground","#000")),_.mode==="dark"&&(he(_.common,"background","#000"),he(_.common,"onBackground","#fff")),Nk(_,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),_.mode==="light"){he(_.Alert,"errorColor",wt(_.error.light,.6)),he(_.Alert,"infoColor",wt(_.info.light,.6)),he(_.Alert,"successColor",wt(_.success.light,.6)),he(_.Alert,"warningColor",wt(_.warning.light,.6)),he(_.Alert,"errorFilledBg",$("palette-error-main")),he(_.Alert,"infoFilledBg",$("palette-info-main")),he(_.Alert,"successFilledBg",$("palette-success-main")),he(_.Alert,"warningFilledBg",$("palette-warning-main")),he(_.Alert,"errorFilledColor",mr(()=>_.getContrastText(_.error.main))),he(_.Alert,"infoFilledColor",mr(()=>_.getContrastText(_.info.main))),he(_.Alert,"successFilledColor",mr(()=>_.getContrastText(_.success.main))),he(_.Alert,"warningFilledColor",mr(()=>_.getContrastText(_.warning.main))),he(_.Alert,"errorStandardBg",St(_.error.light,.9)),he(_.Alert,"infoStandardBg",St(_.info.light,.9)),he(_.Alert,"successStandardBg",St(_.success.light,.9)),he(_.Alert,"warningStandardBg",St(_.warning.light,.9)),he(_.Alert,"errorIconColor",$("palette-error-main")),he(_.Alert,"infoIconColor",$("palette-info-main")),he(_.Alert,"successIconColor",$("palette-success-main")),he(_.Alert,"warningIconColor",$("palette-warning-main")),he(_.AppBar,"defaultBg",$("palette-grey-100")),he(_.Avatar,"defaultBg",$("palette-grey-400")),he(_.Button,"inheritContainedBg",$("palette-grey-300")),he(_.Button,"inheritContainedHoverBg",$("palette-grey-A100")),he(_.Chip,"defaultBorder",$("palette-grey-400")),he(_.Chip,"defaultAvatarColor",$("palette-grey-700")),he(_.Chip,"defaultIconColor",$("palette-grey-700")),he(_.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),he(_.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),he(_.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),he(_.LinearProgress,"primaryBg",St(_.primary.main,.62)),he(_.LinearProgress,"secondaryBg",St(_.secondary.main,.62)),he(_.LinearProgress,"errorBg",St(_.error.main,.62)),he(_.LinearProgress,"infoBg",St(_.info.main,.62)),he(_.LinearProgress,"successBg",St(_.success.main,.62)),he(_.LinearProgress,"warningBg",St(_.warning.main,.62)),he(_.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.11)`),he(_.Slider,"primaryTrack",St(_.primary.main,.62)),he(_.Slider,"secondaryTrack",St(_.secondary.main,.62)),he(_.Slider,"errorTrack",St(_.error.main,.62)),he(_.Slider,"infoTrack",St(_.info.main,.62)),he(_.Slider,"successTrack",St(_.success.main,.62)),he(_.Slider,"warningTrack",St(_.warning.main,.62));const F=Ya(_.background.default,.8);he(_.SnackbarContent,"bg",F),he(_.SnackbarContent,"color",mr(()=>_.getContrastText(F))),he(_.SpeedDialAction,"fabHoverBg",Ya(_.background.paper,.15)),he(_.StepConnector,"border",$("palette-grey-400")),he(_.StepContent,"border",$("palette-grey-400")),he(_.Switch,"defaultColor",$("palette-common-white")),he(_.Switch,"defaultDisabledColor",$("palette-grey-100")),he(_.Switch,"primaryDisabledColor",St(_.primary.main,.62)),he(_.Switch,"secondaryDisabledColor",St(_.secondary.main,.62)),he(_.Switch,"errorDisabledColor",St(_.error.main,.62)),he(_.Switch,"infoDisabledColor",St(_.info.main,.62)),he(_.Switch,"successDisabledColor",St(_.success.main,.62)),he(_.Switch,"warningDisabledColor",St(_.warning.main,.62)),he(_.TableCell,"border",St(qa(_.divider,1),.88)),he(_.Tooltip,"bg",qa(_.grey[700],.92))}if(_.mode==="dark"){he(_.Alert,"errorColor",St(_.error.light,.6)),he(_.Alert,"infoColor",St(_.info.light,.6)),he(_.Alert,"successColor",St(_.success.light,.6)),he(_.Alert,"warningColor",St(_.warning.light,.6)),he(_.Alert,"errorFilledBg",$("palette-error-dark")),he(_.Alert,"infoFilledBg",$("palette-info-dark")),he(_.Alert,"successFilledBg",$("palette-success-dark")),he(_.Alert,"warningFilledBg",$("palette-warning-dark")),he(_.Alert,"errorFilledColor",mr(()=>_.getContrastText(_.error.dark))),he(_.Alert,"infoFilledColor",mr(()=>_.getContrastText(_.info.dark))),he(_.Alert,"successFilledColor",mr(()=>_.getContrastText(_.success.dark))),he(_.Alert,"warningFilledColor",mr(()=>_.getContrastText(_.warning.dark))),he(_.Alert,"errorStandardBg",wt(_.error.light,.9)),he(_.Alert,"infoStandardBg",wt(_.info.light,.9)),he(_.Alert,"successStandardBg",wt(_.success.light,.9)),he(_.Alert,"warningStandardBg",wt(_.warning.light,.9)),he(_.Alert,"errorIconColor",$("palette-error-main")),he(_.Alert,"infoIconColor",$("palette-info-main")),he(_.Alert,"successIconColor",$("palette-success-main")),he(_.Alert,"warningIconColor",$("palette-warning-main")),he(_.AppBar,"defaultBg",$("palette-grey-900")),he(_.AppBar,"darkBg",$("palette-background-paper")),he(_.AppBar,"darkColor",$("palette-text-primary")),he(_.Avatar,"defaultBg",$("palette-grey-600")),he(_.Button,"inheritContainedBg",$("palette-grey-800")),he(_.Button,"inheritContainedHoverBg",$("palette-grey-700")),he(_.Chip,"defaultBorder",$("palette-grey-700")),he(_.Chip,"defaultAvatarColor",$("palette-grey-300")),he(_.Chip,"defaultIconColor",$("palette-grey-300")),he(_.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),he(_.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),he(_.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),he(_.LinearProgress,"primaryBg",wt(_.primary.main,.5)),he(_.LinearProgress,"secondaryBg",wt(_.secondary.main,.5)),he(_.LinearProgress,"errorBg",wt(_.error.main,.5)),he(_.LinearProgress,"infoBg",wt(_.info.main,.5)),he(_.LinearProgress,"successBg",wt(_.success.main,.5)),he(_.LinearProgress,"warningBg",wt(_.warning.main,.5)),he(_.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.13)`),he(_.Slider,"primaryTrack",wt(_.primary.main,.5)),he(_.Slider,"secondaryTrack",wt(_.secondary.main,.5)),he(_.Slider,"errorTrack",wt(_.error.main,.5)),he(_.Slider,"infoTrack",wt(_.info.main,.5)),he(_.Slider,"successTrack",wt(_.success.main,.5)),he(_.Slider,"warningTrack",wt(_.warning.main,.5));const F=Ya(_.background.default,.98);he(_.SnackbarContent,"bg",F),he(_.SnackbarContent,"color",mr(()=>_.getContrastText(F))),he(_.SpeedDialAction,"fabHoverBg",Ya(_.background.paper,.15)),he(_.StepConnector,"border",$("palette-grey-600")),he(_.StepContent,"border",$("palette-grey-600")),he(_.Switch,"defaultColor",$("palette-grey-300")),he(_.Switch,"defaultDisabledColor",$("palette-grey-600")),he(_.Switch,"primaryDisabledColor",wt(_.primary.main,.55)),he(_.Switch,"secondaryDisabledColor",wt(_.secondary.main,.55)),he(_.Switch,"errorDisabledColor",wt(_.error.main,.55)),he(_.Switch,"infoDisabledColor",wt(_.info.main,.55)),he(_.Switch,"successDisabledColor",wt(_.success.main,.55)),he(_.Switch,"warningDisabledColor",wt(_.warning.main,.55)),he(_.TableCell,"border",wt(qa(_.divider,1),.68)),he(_.Tooltip,"bg",qa(_.grey[700],.92))}jr(_.background,"default"),jr(_.background,"paper"),jr(_.common,"background"),jr(_.common,"onBackground"),jr(_,"divider"),Object.keys(_).forEach(F=>{const B=_[F];F!=="tonalOffset"&&B&&typeof B=="object"&&(B.main&&he(_[F],"mainChannel",ls(cs(B.main))),B.light&&he(_[F],"lightChannel",ls(cs(B.light))),B.dark&&he(_[F],"darkChannel",ls(cs(B.dark))),B.contrastText&&he(_[F],"contrastTextChannel",ls(cs(B.contrastText))),F==="text"&&(jr(_[F],"primary"),jr(_[F],"secondary")),F==="action"&&(B.active&&jr(_[F],"active"),B.selected&&jr(_[F],"selected")))})}),x=t.reduce((N,_)=>Qt(N,_),x);const R={prefix:l,disableCssColorScheme:s,shouldSkipGeneratingVar:c,getSelector:$k(x)},{vars:D,generateThemeVars:A,generateStyleSheets:I}=FD(x,R);return x.vars=D,Object.entries(x.colorSchemes[x.defaultColorScheme]).forEach(([N,_])=>{x[N]=_}),x.generateThemeVars=A,x.generateStyleSheets=I,x.generateSpacing=function(){return Vy(f.spacing,Ml(this))},x.getColorSchemeSelector=LD(u),x.spacing=x.generateSpacing(),x.shouldSkipGeneratingVar=c,x.unstable_sxConfig={...Bs,...f==null?void 0:f.unstable_sxConfig},x.unstable_sx=function(_){return Ci({sx:_,theme:this})},x.toRuntimeSource=nb,x}function Cm(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:xd({...n===!0?{}:n.palette,mode:t})})}function Vk(e={},...t){const{palette:n,cssVariables:o=!1,colorSchemes:s=n?void 0:{light:!0},defaultColorScheme:l=n==null?void 0:n.mode,...c}=e,u=l||"light",d=s==null?void 0:s[u],f={...s,...n?{[u]:{...typeof d!="boolean"&&d,palette:n}}:void 0};if(o===!1){if(!("colorSchemes"in e))return Xu(e,...t);let h=n;"palette"in e||f[u]&&(f[u]!==!0?h=f[u].palette:u==="dark"&&(h={mode:"dark"}));const b=Xu({...e,palette:h},...t);return b.defaultColorScheme=u,b.colorSchemes=f,b.palette.mode==="light"&&(b.colorSchemes.light={...f.light!==!0&&f.light,palette:b.palette},Cm(b,"dark",f.dark)),b.palette.mode==="dark"&&(b.colorSchemes.dark={...f.dark!==!0&&f.dark,palette:b.palette},Cm(b,"light",f.light)),b}return!n&&!("light"in f)&&u==="light"&&(f.light=!0),Bk({...c,colorSchemes:f,defaultColorScheme:u,...typeof o!="boolean"&&o},...t)}const Ll=Vk(),Ws="$$material";function Fo(){const e=$l(Ll);return process.env.NODE_ENV!=="production"&&E.useDebugValue(e),e[Ws]||e}function ib(e){return m.jsx(zy,{...e,defaultTheme:Ll,themeId:Ws})}process.env.NODE_ENV!=="production"&&(ib.propTypes={styles:r.oneOfType([r.array,r.func,r.number,r.object,r.string,r.bool])});function sb(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ur=e=>sb(e)&&e!=="classes",pe=qy({themeId:Ws,defaultTheme:Ll,rootShouldForwardProp:ur});function Wk(e){return function(n){return m.jsx(ib,{styles:typeof e=="function"?o=>e({theme:o,...n}):e})}}function zk(){return yd}const bt=AD;process.env.NODE_ENV!=="production"&&(r.node,r.object.isRequired);function at(e){return ID(e)}function Uk(e){return Be("MuiSvgIcon",e)}Ve("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Hk=e=>{const{color:t,fontSize:n,classes:o}=e,s={root:["root",t!=="inherit"&&`color${Oe(t)}`,`fontSize${Oe(n)}`]};return Le(s,Uk,o)},qk=pe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Oe(n.color)}`],t[`fontSize${Oe(n.fontSize)}`]]}})(bt(({theme:e})=>{var t,n,o,s,l,c,u,d,f,h,b,y,C,w;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(s=(t=e.transitions)==null?void 0:t.create)==null?void 0:s.call(t,"fill",{duration:(o=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:o.shorter}),variants:[{props:g=>!g.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((c=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:c.call(l,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((d=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:d.call(u,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((h=(f=e.typography)==null?void 0:f.pxToRem)==null?void 0:h.call(f,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,g])=>g&&g.main).map(([g])=>{var S,T;return{props:{color:g},style:{color:(T=(S=(e.vars??e).palette)==null?void 0:S[g])==null?void 0:T.main}}}),{props:{color:"action"},style:{color:(y=(b=(e.vars??e).palette)==null?void 0:b.action)==null?void 0:y.active}},{props:{color:"disabled"},style:{color:(w=(C=(e.vars??e).palette)==null?void 0:C.action)==null?void 0:w.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),dl=E.forwardRef(function(t,n){const o=at({props:t,name:"MuiSvgIcon"}),{children:s,className:l,color:c="inherit",component:u="svg",fontSize:d="medium",htmlColor:f,inheritViewBox:h=!1,titleAccess:b,viewBox:y="0 0 24 24",...C}=o,w=E.isValidElement(s)&&s.type==="svg",g={...o,color:c,component:u,fontSize:d,instanceFontSize:t.fontSize,inheritViewBox:h,viewBox:y,hasSvgAsChild:w},S={};h||(S.viewBox=y);const T=Hk(g);return m.jsxs(qk,{as:u,className:Re(T.root,l),focusable:"false",color:f,"aria-hidden":b?void 0:!0,role:b?"img":void 0,ref:n,...S,...C,...w&&s.props,ownerState:g,children:[w?s.props.children:s,b?m.jsx("title",{children:b}):null]})});process.env.NODE_ENV!=="production"&&(dl.propTypes={children:r.node,classes:r.object,className:r.string,color:r.oneOfType([r.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),r.string]),component:r.elementType,fontSize:r.oneOfType([r.oneOf(["inherit","large","medium","small"]),r.string]),htmlColor:r.string,inheritViewBox:r.bool,shapeRendering:r.string,sx:r.oneOfType([r.arrayOf(r.oneOfType([r.func,r.object,r.bool])),r.func,r.object]),titleAccess:r.string,viewBox:r.string});dl.muiName="SvgIcon";function Pt(e,t){function n(o,s){return m.jsx(dl,{"data-testid":`${t}Icon`,ref:s,...o,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=dl.muiName,E.memo(E.forwardRef(n))}function Yk(e,t){if(!e)return t;if(typeof e=="function"||typeof t=="function")return s=>{const l=typeof t=="function"?t(s):t,c=typeof e=="function"?e({...s,...l}):e,u=Re(s==null?void 0:s.className,l==null?void 0:l.className,c==null?void 0:c.className);return{...l,...c,...!!u&&{className:u},...(l==null?void 0:l.style)&&(c==null?void 0:c.style)&&{style:{...l.style,...c.style}},...(l==null?void 0:l.sx)&&(c==null?void 0:c.sx)&&{sx:[...Array.isArray(l.sx)?l.sx:[l.sx],...Array.isArray(c.sx)?c.sx:[c.sx]]}}};const n=t,o=Re(n==null?void 0:n.className,e==null?void 0:e.className);return{...t,...e,...!!o&&{className:o},...(n==null?void 0:n.style)&&(e==null?void 0:e.style)&&{style:{...n.style,...e.style}},...(n==null?void 0:n.sx)&&(e==null?void 0:e.sx)&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const ab=Pt(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),Xn=e=>{var c,u;const{name:t,id:n,className:o}=e,{formState:{errors:s}}=Ke.useFormContext();function l(d,f){return f.split(".").reduce((h,b)=>{if(h==null)return;const y=Number(b);return!isNaN(y)&&Array.isArray(h)?h[y]:h[b]},d)}return m.jsxs(L.Typography,{id:n,variant:"caption",display:"block",color:"error",style:{visibility:((c=l(s,t))==null?void 0:c.message)??void 0?"visible":"hidden"},className:o,fontSize:".9rem",children:[m.jsx(L.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",position:"relative",top:"3px",mr:.5},children:m.jsx(ab,{fontSize:"inherit"})}),`${((u=l(s,t))==null?void 0:u.message)??""}`]})},lb=e=>{const{name:t,label:n=ln(t),options:o=[],filterSelectedOptions:s=!0,variant:l="outlined",staticLabel:c=!1,staticLabelProps:u={fontSize:".9em",color:"#808080"},readOnly:d,margin:f="dense",fullWidth:h=!0,required:b,onChange:y,clearOnSelect:C=!1,onInputChange:w,getOptionLabel:g=I=>typeof I=="string"?I:String(I),isOptionEqualToValue:S=(I,N)=>JSON.stringify(I)===JSON.stringify(N),useFieldAsValue:T,...M}=e,{formState:{errors:O},control:x}=Ke.useFormContext(),[R,D]=E.useState(""),A=I=>{if(!I)return"";if(T){const N=o.find(_=>_[T]===I);return N?g(N):""}return g(I)};return m.jsx(Ke.Controller,{name:t,control:x,render:({field:I})=>{const N=T?o.find($=>$[T]===I.value)||null:I.value??null,_={...Kn(M,["useFieldAsValue","autoFocus"]),getOptionLabel:g,options:o,filterSelectedOptions:s,isOptionEqualToValue:S,renderInput:$=>{const{onKeyDown:F}=$.inputProps;return m.jsx(L.TextField,{...$,variant:l,label:c?void 0:n,error:!!O[t],required:b,autoFocus:M.autoFocus,slotProps:{input:{...$.InputProps,onKeyDown:B=>{if(B.key===" "){const z=document.querySelector(".MuiAutocomplete-option.Mui-focused");z&&(B.preventDefault(),z.click())}F&&F(B)}}}})},onChange:($,F,B,z)=>{C?(D(""),I.onChange(null)):T?I.onChange(F?F[T]:null):I.onChange(F),y&&y($,F,B,z)},onInputChange:($,F,B)=>{D(F),w&&w($,F,B)},fullWidth:!0,inputValue:R,value:N,slotProps:{paper:{elevation:8,sx:{borderRadius:2}}}};return m.jsxs(L.FormControl,{margin:f,fullWidth:h,required:b,children:[(c||d)&&m.jsx(L.Typography,{...u,children:n}),d?m.jsx(L.Typography,{children:A(I.value)}):m.jsxs(L.Box,{children:[m.jsx(L.Autocomplete,{..._}),m.jsx(Xn,{name:t,id:`${t}-err`})]})]})}})};var us={exports:{}};/**
|
|
81
81
|
* @license
|
|
82
82
|
* Lodash <https://lodash.com/>
|
|
83
83
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
package/dist/index.es.js
CHANGED
|
@@ -5328,10 +5328,17 @@ function i$(e, t) {
|
|
|
5328
5328
|
const Kb = Pt(/* @__PURE__ */ v("path", {
|
|
5329
5329
|
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"
|
|
5330
5330
|
}), "Error"), pr = (e) => {
|
|
5331
|
-
var
|
|
5331
|
+
var c, u;
|
|
5332
5332
|
const { name: t, id: n, className: o } = e, {
|
|
5333
5333
|
formState: { errors: a }
|
|
5334
5334
|
} = Ht();
|
|
5335
|
+
function l(d, f) {
|
|
5336
|
+
return f.split(".").reduce((h, y) => {
|
|
5337
|
+
if (h == null) return;
|
|
5338
|
+
const g = Number(y);
|
|
5339
|
+
return !isNaN(g) && Array.isArray(h) ? h[g] : h[y];
|
|
5340
|
+
}, d);
|
|
5341
|
+
}
|
|
5335
5342
|
return /* @__PURE__ */ pe(
|
|
5336
5343
|
Ge,
|
|
5337
5344
|
{
|
|
@@ -5339,7 +5346,7 @@ const Kb = Pt(/* @__PURE__ */ v("path", {
|
|
|
5339
5346
|
variant: "caption",
|
|
5340
5347
|
display: "block",
|
|
5341
5348
|
color: "error",
|
|
5342
|
-
style: { visibility: a
|
|
5349
|
+
style: { visibility: ((c = l(a, t)) == null ? void 0 : c.message) ?? void 0 ? "visible" : "hidden" },
|
|
5343
5350
|
className: o,
|
|
5344
5351
|
fontSize: ".9rem",
|
|
5345
5352
|
children: [
|
|
@@ -5358,7 +5365,7 @@ const Kb = Pt(/* @__PURE__ */ v("path", {
|
|
|
5358
5365
|
children: /* @__PURE__ */ v(Kb, { fontSize: "inherit" })
|
|
5359
5366
|
}
|
|
5360
5367
|
),
|
|
5361
|
-
`${(
|
|
5368
|
+
`${((u = l(a, t)) == null ? void 0 : u.message) ?? ""}`
|
|
5362
5369
|
]
|
|
5363
5370
|
}
|
|
5364
5371
|
);
|