@s_mart/form 2.7.16 → 2.7.18
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/index.d.ts +2 -12
- package/dist/index.js +12 -12
- package/dist/index.mjs +12 -12
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -137,7 +137,7 @@ declare const _default$4: react.MemoExoticComponent<({ name, rules, defaultValue
|
|
|
137
137
|
|
|
138
138
|
type ControllerCreatable = Omit<ControllerProps, 'render' | 'control'>;
|
|
139
139
|
type CreatableOption = {
|
|
140
|
-
key?: string;
|
|
140
|
+
key?: string | number;
|
|
141
141
|
label: string;
|
|
142
142
|
value?: string | number | readonly string[] | undefined;
|
|
143
143
|
} | string;
|
|
@@ -190,19 +190,9 @@ type CreatableProps = Omit<AutocompleteProps$1<CreatableOption, true, true, true
|
|
|
190
190
|
* @memberof CreatableProps
|
|
191
191
|
*/
|
|
192
192
|
hideAddButton?: boolean;
|
|
193
|
-
/**
|
|
194
|
-
* @description Função que será executada quando o valor do input for alterado
|
|
195
|
-
* @param values Valor do input alterado
|
|
196
|
-
*
|
|
197
|
-
* @example onInputChange={(values) => console.log(values)}
|
|
198
|
-
*/
|
|
199
|
-
onInputChange?: (value: (string | {
|
|
200
|
-
label: string;
|
|
201
|
-
value?: string | number | readonly string[] | undefined;
|
|
202
|
-
})[], values: FieldValues) => void;
|
|
203
193
|
};
|
|
204
194
|
|
|
205
|
-
declare const _default$3: react.MemoExoticComponent<({ name, rules, defaultValue, shouldUnregister, label, required, options, onCreateOption, textFieldProps, hideAddButton,
|
|
195
|
+
declare const _default$3: react.MemoExoticComponent<({ name, rules, defaultValue, shouldUnregister, label, required, options, onCreateOption, textFieldProps, hideAddButton, ...rest }: CreatableProps) => JSX.Element>;
|
|
206
196
|
|
|
207
197
|
type ControllerCheckbox = Omit<ControllerProps, 'render' | 'control'>;
|
|
208
198
|
type CheckboxProps = CheckboxProps$1 & ControllerCheckbox & {
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var b3=Object.create;var J=Object.defineProperty,w3=Object.defineProperties,k3=Object.getOwnPropertyDescriptor,v3=Object.getOwnPropertyDescriptors,S3=Object.getOwnPropertyNames,i2=Object.getOwnPropertySymbols,B3=Object.getPrototypeOf,u2=Object.prototype.hasOwnProperty,k2=Object.prototype.propertyIsEnumerable;var w2=(C,i,e)=>i in C?J(C,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):C[i]=e,o=(C,i)=>{for(var e in i||(i={}))u2.call(i,e)&&w2(C,e,i[e]);if(i2)for(var e of i2(i))k2.call(i,e)&&w2(C,e,i[e]);return C},V=(C,i)=>w3(C,v3(i));var u=(C,i)=>{var e={};for(var l in C)u2.call(C,l)&&i.indexOf(l)<0&&(e[l]=C[l]);if(C!=null&&i2)for(var l of i2(C))i.indexOf(l)<0&&k2.call(C,l)&&(e[l]=C[l]);return e};var A3=(C,i)=>{for(var e in i)J(C,e,{get:i[e],enumerable:!0})},v2=(C,i,e,l)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of S3(i))!u2.call(C,r)&&r!==e&&J(C,r,{get:()=>i[r],enumerable:!(l=k3(i,r))||l.enumerable});return C};var e2=(C,i,e)=>(e=C!=null?b3(B3(C)):{},v2(i||!C||!C.__esModule?J(e,"default",{value:C,enumerable:!0}):e,C)),T3=C=>v2(J({},"__esModule",{value:!0}),C);var X3={};A3(X3,{Autocomplete:()=>F3,Checkbox:()=>X2,Creatable:()=>J2,DatePicker:()=>a3,Form:()=>B2,RadioButton:()=>i3,RadioGroup:()=>e3,Searchable:()=>N2,Select:()=>z2,Slider:()=>r3,Switch:()=>C3,TextField:()=>U2,TimePicker:()=>x3});module.exports=T3(X3);var S2=require("react"),o2=require("react-hook-form");var f2=require("react/jsx-runtime");function E3(m){var t=m,{children:C,onSubmit:i,style:e,disableDefaultValuesUpdate:l}=t,r=u(t,["children","onSubmit","style","disableDefaultValuesUpdate"]);let H=(0,o2.useForm)(r);(0,S2.useEffect)(()=>{l||H.reset(r.defaultValues)},[r.defaultValues,H.reset]);let L=()=>typeof C=="function"?C(V(o({},H),{onSubmit:H.handleSubmit(c=>i(c,H))})):C;return(0,f2.jsx)(o2.FormProvider,V(o({},H),{children:(0,f2.jsx)("form",{onSubmit:c=>{c.preventDefault(),c.stopPropagation(),H.handleSubmit(a=>i(a,H))()},style:e,children:L()})}))}var B2=E3;var r2=require("react"),l2=require("react-hook-form"),j=require("@mui/material");var A2={description:"M39.0611 23.1367C36.3276 17.015 30.4051 13.2479 24.027 13.0909C17.4971 13.2479 11.5746 17.172 8.84117 23.1367C8.68931 23.6076 8.68931 24.2355 8.84117 24.8633C11.5746 30.985 17.4971 34.7521 23.8752 34.9091C30.4051 34.7521 36.1757 30.828 38.9092 24.8633C39.3648 24.2355 39.3648 23.6076 39.0611 23.1367ZM24.027 32.0837C19.6231 31.9268 16.2822 28.1596 16.4341 23.6076C16.586 19.3695 19.9269 15.7593 24.027 15.7593C28.4309 15.9163 31.7718 19.6835 31.62 24.2355C31.4681 28.4735 28.1272 32.0837 24.027 32.0837ZM24.027 18.5847C23.5715 18.5847 23.1159 18.7417 22.6603 18.7417C23.4196 19.8404 23.2677 21.2531 22.3566 22.3519C21.4454 23.2937 20.0787 23.2937 19.0157 22.5088C18.5601 24.7063 19.3194 27.2178 21.1417 28.4735C22.964 29.7292 25.3938 29.7292 27.0642 28.3165C28.7347 26.9039 29.494 24.3924 28.7347 22.1949C28.1272 19.9974 26.1531 18.5847 24.027 18.5847Z",viewBox:"0 0 48 48",id:"line-eye-solid"},T2={description:"M23.9998 31.7412C19.9223 31.7412 16.6215 28.5851 16.3177 24.5854L10.6785 20.2272C9.93715 21.1573 9.25496 22.1405 8.70447 23.2157C8.58149 23.4589 8.51742 23.7277 8.51742 24.0003C8.51742 24.2729 8.58149 24.5416 8.70447 24.7849C11.6198 30.4731 17.3913 34.3216 23.9998 34.3216C25.4465 34.3216 26.842 34.1066 28.1871 33.7593L25.3976 31.6009C24.9369 31.6899 24.469 31.7369 23.9998 31.7412ZM40.8703 34.8646L34.9273 30.2715C36.7326 28.7501 38.2174 26.8848 39.2952 24.7843C39.4182 24.5411 39.4823 24.2723 39.4823 23.9997C39.4823 23.7272 39.4182 23.4584 39.2952 23.2151C36.3799 17.5269 30.6084 13.6784 23.9998 13.6784C21.2321 13.6817 18.5093 14.3785 16.0801 15.7051L9.24098 10.419C9.15179 10.3496 9.04981 10.2985 8.94085 10.2685C8.83189 10.2385 8.7181 10.2303 8.60597 10.2443C8.49384 10.2584 8.38557 10.2944 8.28736 10.3502C8.18914 10.4061 8.1029 10.4808 8.03356 10.5701L6.97828 11.9285C6.8383 12.1086 6.77557 12.3369 6.8039 12.5633C6.83223 12.7896 6.94929 12.9954 7.12934 13.1354L38.7587 37.581C38.8479 37.6504 38.9499 37.7016 39.0588 37.7315C39.1678 37.7615 39.2816 37.7697 39.3937 37.7557C39.5058 37.7416 39.6141 37.7057 39.7123 37.6498C39.8105 37.5939 39.8968 37.5192 39.9661 37.43L41.0219 36.0715C41.1619 35.8913 41.2245 35.663 41.1961 35.4366C41.1676 35.2103 41.0505 35.0045 40.8703 34.8646ZM30.9938 27.2309L28.8811 25.5977C29.059 25.0835 29.1534 24.5441 29.1606 24C29.1711 23.2034 28.9947 22.4155 28.6454 21.6995C28.2962 20.9836 27.7838 20.3595 27.1496 19.8774C26.5154 19.3953 25.777 19.0687 24.9937 18.9238C24.2103 18.7788 23.4039 18.8197 22.6392 19.0429C22.9634 19.4822 23.1387 20.0135 23.1397 20.5595C23.1317 20.7411 23.1039 20.9214 23.0569 21.097L19.0997 18.0387C20.4743 16.89 22.2085 16.2601 23.9998 16.2588C25.0166 16.2582 26.0235 16.4581 26.9629 16.8469C27.9024 17.2357 28.756 17.8059 29.475 18.5249C30.1939 19.2438 30.7641 20.0974 31.1529 21.0369C31.5418 21.9764 31.7416 22.9833 31.7411 24C31.7411 25.1628 31.4567 26.246 30.9938 27.2309Z",viewBox:"0 0 48 48",id:"line-eye-slash-solid"};var E2={description:"M35.8286 21.8493H26.1506V12.1714C26.1506 11.6338 25.613 11.0961 25.0753 11.0961H22.9247C22.3198 11.0961 21.8493 11.6338 21.8493 12.1714V21.8493H12.1714C11.5666 21.8493 11.0961 22.387 11.0961 22.9247V25.0753C11.0961 25.6802 11.5666 26.1506 12.1714 26.1506H21.8493V35.8286C21.8493 36.4334 22.3198 36.9039 22.9247 36.9039H25.0753C25.613 36.9039 26.1506 36.4334 26.1506 35.8286V26.1506H35.8286C36.3662 26.1506 36.9039 25.6802 36.9039 25.0753V22.9247C36.9039 22.387 36.3662 21.8493 35.8286 21.8493Z",viewBox:"0 0 48 48",id:"line-plus-solid"};var N=e2(require("@s_mart/masks"));var g2=require("@mui/material"),D2=require("@s_mart/utils"),X=require("react/jsx-runtime"),x=({label:C,required:i,regular:e})=>(0,X.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:(0,D2.toRem)(2)},children:[(0,X.jsx)(g2.Typography,{variant:"caption",fontWeight:e?400:700,style:{display:"flex",alignItems:"center"},children:C}),i&&(0,X.jsx)(g2.Typography,{variant:"caption",fontWeight:900,color:"error",children:"*"})]});var G2=require("react-hook-form"),I2=require("@s_mart/core");var b=(C,i)=>{var e,l,r,m;if(C[i])return C[i];if(i.includes("[")){let[t,H]=i.split("["),[L,c]=H.split("].");return(l=(e=C[t])==null?void 0:e[L])==null?void 0:l[c]}if(i.includes(".")){let[t,H,L]=i.split(".");return(m=(r=C[t])==null?void 0:r[H])==null?void 0:m[L]}};var $2=require("react/jsx-runtime"),h=({name:C})=>{var l;let i=(0,G2.useFormContext)(),e=b((l=i==null?void 0:i.formState)==null?void 0:l.errors,C);return e?(0,$2.jsx)(I2.Indicator,{severity:"error",children:e==null?void 0:e.message}):null};var q2=require("@s_mart/core");var G=require("react/jsx-runtime"),D3=F=>{var p=F,{name:C,rules:i,defaultValue:e,shouldUnregister:l,label:r,required:m,mask:t,variant:H="outlined",parse:L,format:c,onInputChange:a}=p,M=u(p,["name","rules","defaultValue","shouldUnregister","label","required","mask","variant","parse","format","onInputChange"]);let Z=(0,l2.useFormContext)();if(!Z)throw new Error("Para usar o <TextField /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let[d,f]=(0,r2.useState)(!1),n=s=>{var P;let S=s;return c&&(S=c(s)),t?(P=N==null?void 0:N[t])==null?void 0:P.format(S):S},y=s=>{var P;let S=s;return L&&(S=L(s)),t?(P=N==null?void 0:N[t])==null?void 0:P.parse(S):S},_=s=>{if(!s||t!=="porcentagem")return;s==null||s.stopPropagation();let S=(s==null?void 0:s.target).value;if(S){let P=String(S);if(P.length>0){let Q=P.indexOf("%");Q>-1&&(s.currentTarget.selectionEnd=Q)}}},g=b(Z.formState.errors,C);return(0,G.jsx)(l2.Controller,{control:Z.control,name:C,rules:i,defaultValue:e,shouldUnregister:l,render:({field:{value:s,onChange:S}})=>(0,G.jsxs)(j.Grid,{display:"flex",flexDirection:"column",children:[r&&(0,G.jsx)(x,{label:r,required:m}),(0,G.jsx)(j.TextField,V(o({variant:H,autoComplete:"off",defaultValue:e,value:n(s||""),onChange:P=>{var Q,b2;S(y((Q=P==null?void 0:P.target)==null?void 0:Q.value)),a==null||a(P,(b2=P==null?void 0:P.target)==null?void 0:b2.value,Z.watch())},error:Boolean(g)},M),{type:M.type==="password"?d?"text":"password":M.type,InputProps:o({onKeyDown:_,endAdornment:M.type==="password"&&(0,G.jsx)(j.InputAdornment,{position:"end",onClick:()=>f(!d),style:{cursor:"pointer"},children:(0,G.jsx)(q2.LIcon,{icon:d?A2:T2,size:"24px",removeMargin:!0})})},M.InputProps)})),(0,G.jsx)(h,{name:C})]})})},U2=(0,r2.memo)(D3);var n2=require("react"),H2=require("react-hook-form"),R2=require("@s_mart/core"),T=require("@mui/material");var k=require("react/jsx-runtime"),G3=M=>{var F=M,{name:C,rules:i,defaultValue:e,shouldUnregister:l,label:r,required:m,options:t,placeholder:H,onInputChange:L,footer:c}=F,a=u(F,["name","rules","defaultValue","shouldUnregister","label","required","options","placeholder","onInputChange","footer"]);let p=(0,H2.useFormContext)(),{palette:Z}=(0,T.useTheme)(),[d,f]=(0,n2.useState)(!1);if(!p)throw new Error("Para usar o <Select /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let n=b(p.formState.errors,C);return console.warn=()=>{},(0,k.jsx)(H2.Controller,{control:p.control,name:C,rules:i,defaultValue:e||"",shouldUnregister:l,render:({field:{value:y,onChange:_}})=>(0,k.jsxs)(T.Grid,{display:"flex",flexDirection:"column",children:[r&&(0,k.jsx)(x,{label:r,required:m}),(0,k.jsxs)(T.Select,V(o({open:d,onOpen:()=>f(!0),onClose:()=>f(!1),displayEmpty:Boolean(H),variant:"outlined",autoComplete:"off",value:y||"",onChange:g=>{_(g.target.value),L==null||L(g,g.target.value,p.watch())},error:Boolean(n),size:a.size||"medium"},a),{children:[H&&(0,k.jsx)(T.MenuItem,{disabled:!0,value:"",children:(0,k.jsx)("p",{style:{color:Z.grey[400]},children:H})}),t==null?void 0:t.map((g,s)=>(0,k.jsx)(T.MenuItem,{value:g.value,children:g.label},s)),c&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(T.Grid,{px:2,py:1,children:(0,k.jsx)(R2.Divider,{})}),c({closeSelect:()=>f(!1)})]})]})),(0,k.jsx)(h,{name:C})]})})},z2=(0,n2.memo)(G3);var O2=require("react"),t2=require("react-hook-form"),z=require("@mui/material");var _2=require("@s_mart/core");var v=require("react/jsx-runtime"),x2=require("react"),I3=M=>{var F=M,{name:C,rules:i,defaultValue:e,shouldUnregister:l,label:r,required:m,options:t,textFieldProps:H,noOptionsText:L,footer:c}=F,a=u(F,["name","rules","defaultValue","shouldUnregister","label","required","options","textFieldProps","noOptionsText","footer"]);let p=(0,t2.useFormContext)();if(!p)throw new Error("Para usar o <Searchable /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let Z=b(p.formState.errors,C);return(0,v.jsx)(t2.Controller,{control:p.control,name:C,rules:i,defaultValue:e,shouldUnregister:l,render:({field:{onChange:d,value:f}})=>(0,v.jsxs)(z.Grid,{display:"flex",flexDirection:"column",children:[r&&(0,v.jsx)(x,{label:r,required:m}),(0,v.jsx)(z.Autocomplete,V(o({onChange:(n,y)=>d(y),value:f||null,options:t,noOptionsText:L||"Nenhuma op\xE7\xE3o encontrada",isOptionEqualToValue:(n,y)=>typeof n=="string"&&typeof y=="string"?n===y:typeof n=="object"&&typeof y=="object"?n.value===y.value:!1,renderOption:(n,y)=>typeof y=="object"?(0,x2.createElement)("li",V(o({},n),{key:y.key||y.value}),y.label):(0,x2.createElement)("li",V(o({},n),{key:y}),y),ListboxComponent:n=>(0,v.jsxs)("ul",V(o({},n),{children:[n.children,c&&(0,v.jsx)("li",{children:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(z.Grid,{px:2,py:1,children:(0,v.jsx)(_2.Divider,{})}),c]})},"searchable-footer")]}))},a),{renderInput:n=>(0,v.jsx)(z.TextField,o(o({error:Boolean(Z)},n),H))})),(0,v.jsx)(h,{name:C})]})})},N2=(0,O2.memo)(I3);var K2=require("react"),s2=require("react-hook-form"),$=require("@mui/material");var I=require("@s_mart/utils"),y2=e2(require("@emotion/styled")),h2=require("@emotion/react"),j2=h2.css`
|
|
1
|
+
"use strict";var b3=Object.create;var J=Object.defineProperty,w3=Object.defineProperties,k3=Object.getOwnPropertyDescriptor,v3=Object.getOwnPropertyDescriptors,S3=Object.getOwnPropertyNames,i2=Object.getOwnPropertySymbols,B3=Object.getPrototypeOf,u2=Object.prototype.hasOwnProperty,k2=Object.prototype.propertyIsEnumerable;var w2=(C,i,e)=>i in C?J(C,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):C[i]=e,o=(C,i)=>{for(var e in i||(i={}))u2.call(i,e)&&w2(C,e,i[e]);if(i2)for(var e of i2(i))k2.call(i,e)&&w2(C,e,i[e]);return C},s=(C,i)=>w3(C,v3(i));var f=(C,i)=>{var e={};for(var n in C)u2.call(C,n)&&i.indexOf(n)<0&&(e[n]=C[n]);if(C!=null&&i2)for(var n of i2(C))i.indexOf(n)<0&&k2.call(C,n)&&(e[n]=C[n]);return e};var A3=(C,i)=>{for(var e in i)J(C,e,{get:i[e],enumerable:!0})},v2=(C,i,e,n)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of S3(i))!u2.call(C,r)&&r!==e&&J(C,r,{get:()=>i[r],enumerable:!(n=k3(i,r))||n.enumerable});return C};var e2=(C,i,e)=>(e=C!=null?b3(B3(C)):{},v2(i||!C||!C.__esModule?J(e,"default",{value:C,enumerable:!0}):e,C)),T3=C=>v2(J({},"__esModule",{value:!0}),C);var X3={};A3(X3,{Autocomplete:()=>F3,Checkbox:()=>X2,Creatable:()=>J2,DatePicker:()=>a3,Form:()=>B2,RadioButton:()=>i3,RadioGroup:()=>e3,Searchable:()=>N2,Select:()=>z2,Slider:()=>r3,Switch:()=>C3,TextField:()=>U2,TimePicker:()=>x3});module.exports=T3(X3);var S2=require("react"),o2=require("react-hook-form");var f2=require("react/jsx-runtime");function E3(m){var H=m,{children:C,onSubmit:i,style:e,disableDefaultValuesUpdate:n}=H,r=f(H,["children","onSubmit","style","disableDefaultValuesUpdate"]);let l=(0,o2.useForm)(r);(0,S2.useEffect)(()=>{n||l.reset(r.defaultValues)},[r.defaultValues,l.reset]);let V=()=>typeof C=="function"?C(s(o({},l),{onSubmit:l.handleSubmit(Z=>i(Z,l))})):C;return(0,f2.jsx)(o2.FormProvider,s(o({},l),{children:(0,f2.jsx)("form",{onSubmit:Z=>{Z.preventDefault(),Z.stopPropagation(),l.handleSubmit(a=>i(a,l))()},style:e,children:V()})}))}var B2=E3;var r2=require("react"),n2=require("react-hook-form"),j=require("@mui/material");var A2={description:"M39.0611 23.1367C36.3276 17.015 30.4051 13.2479 24.027 13.0909C17.4971 13.2479 11.5746 17.172 8.84117 23.1367C8.68931 23.6076 8.68931 24.2355 8.84117 24.8633C11.5746 30.985 17.4971 34.7521 23.8752 34.9091C30.4051 34.7521 36.1757 30.828 38.9092 24.8633C39.3648 24.2355 39.3648 23.6076 39.0611 23.1367ZM24.027 32.0837C19.6231 31.9268 16.2822 28.1596 16.4341 23.6076C16.586 19.3695 19.9269 15.7593 24.027 15.7593C28.4309 15.9163 31.7718 19.6835 31.62 24.2355C31.4681 28.4735 28.1272 32.0837 24.027 32.0837ZM24.027 18.5847C23.5715 18.5847 23.1159 18.7417 22.6603 18.7417C23.4196 19.8404 23.2677 21.2531 22.3566 22.3519C21.4454 23.2937 20.0787 23.2937 19.0157 22.5088C18.5601 24.7063 19.3194 27.2178 21.1417 28.4735C22.964 29.7292 25.3938 29.7292 27.0642 28.3165C28.7347 26.9039 29.494 24.3924 28.7347 22.1949C28.1272 19.9974 26.1531 18.5847 24.027 18.5847Z",viewBox:"0 0 48 48",id:"line-eye-solid"},T2={description:"M23.9998 31.7412C19.9223 31.7412 16.6215 28.5851 16.3177 24.5854L10.6785 20.2272C9.93715 21.1573 9.25496 22.1405 8.70447 23.2157C8.58149 23.4589 8.51742 23.7277 8.51742 24.0003C8.51742 24.2729 8.58149 24.5416 8.70447 24.7849C11.6198 30.4731 17.3913 34.3216 23.9998 34.3216C25.4465 34.3216 26.842 34.1066 28.1871 33.7593L25.3976 31.6009C24.9369 31.6899 24.469 31.7369 23.9998 31.7412ZM40.8703 34.8646L34.9273 30.2715C36.7326 28.7501 38.2174 26.8848 39.2952 24.7843C39.4182 24.5411 39.4823 24.2723 39.4823 23.9997C39.4823 23.7272 39.4182 23.4584 39.2952 23.2151C36.3799 17.5269 30.6084 13.6784 23.9998 13.6784C21.2321 13.6817 18.5093 14.3785 16.0801 15.7051L9.24098 10.419C9.15179 10.3496 9.04981 10.2985 8.94085 10.2685C8.83189 10.2385 8.7181 10.2303 8.60597 10.2443C8.49384 10.2584 8.38557 10.2944 8.28736 10.3502C8.18914 10.4061 8.1029 10.4808 8.03356 10.5701L6.97828 11.9285C6.8383 12.1086 6.77557 12.3369 6.8039 12.5633C6.83223 12.7896 6.94929 12.9954 7.12934 13.1354L38.7587 37.581C38.8479 37.6504 38.9499 37.7016 39.0588 37.7315C39.1678 37.7615 39.2816 37.7697 39.3937 37.7557C39.5058 37.7416 39.6141 37.7057 39.7123 37.6498C39.8105 37.5939 39.8968 37.5192 39.9661 37.43L41.0219 36.0715C41.1619 35.8913 41.2245 35.663 41.1961 35.4366C41.1676 35.2103 41.0505 35.0045 40.8703 34.8646ZM30.9938 27.2309L28.8811 25.5977C29.059 25.0835 29.1534 24.5441 29.1606 24C29.1711 23.2034 28.9947 22.4155 28.6454 21.6995C28.2962 20.9836 27.7838 20.3595 27.1496 19.8774C26.5154 19.3953 25.777 19.0687 24.9937 18.9238C24.2103 18.7788 23.4039 18.8197 22.6392 19.0429C22.9634 19.4822 23.1387 20.0135 23.1397 20.5595C23.1317 20.7411 23.1039 20.9214 23.0569 21.097L19.0997 18.0387C20.4743 16.89 22.2085 16.2601 23.9998 16.2588C25.0166 16.2582 26.0235 16.4581 26.9629 16.8469C27.9024 17.2357 28.756 17.8059 29.475 18.5249C30.1939 19.2438 30.7641 20.0974 31.1529 21.0369C31.5418 21.9764 31.7416 22.9833 31.7411 24C31.7411 25.1628 31.4567 26.246 30.9938 27.2309Z",viewBox:"0 0 48 48",id:"line-eye-slash-solid"};var E2={description:"M35.8286 21.8493H26.1506V12.1714C26.1506 11.6338 25.613 11.0961 25.0753 11.0961H22.9247C22.3198 11.0961 21.8493 11.6338 21.8493 12.1714V21.8493H12.1714C11.5666 21.8493 11.0961 22.387 11.0961 22.9247V25.0753C11.0961 25.6802 11.5666 26.1506 12.1714 26.1506H21.8493V35.8286C21.8493 36.4334 22.3198 36.9039 22.9247 36.9039H25.0753C25.613 36.9039 26.1506 36.4334 26.1506 35.8286V26.1506H35.8286C36.3662 26.1506 36.9039 25.6802 36.9039 25.0753V22.9247C36.9039 22.387 36.3662 21.8493 35.8286 21.8493Z",viewBox:"0 0 48 48",id:"line-plus-solid"};var N=e2(require("@s_mart/masks"));var g2=require("@mui/material"),D2=require("@s_mart/utils"),X=require("react/jsx-runtime"),g=({label:C,required:i,regular:e})=>(0,X.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:(0,D2.toRem)(2)},children:[(0,X.jsx)(g2.Typography,{variant:"caption",fontWeight:e?400:700,style:{display:"flex",alignItems:"center"},children:C}),i&&(0,X.jsx)(g2.Typography,{variant:"caption",fontWeight:900,color:"error",children:"*"})]});var I2=require("react-hook-form"),G2=require("@s_mart/core");var w=(C,i)=>{var e,n,r,m;if(C[i])return C[i];if(i.includes("[")){let[H,l]=i.split("["),[V,Z]=l.split("].");return(n=(e=C[H])==null?void 0:e[V])==null?void 0:n[Z]}if(i.includes(".")){let[H,l,V]=i.split(".");return(m=(r=C[H])==null?void 0:r[l])==null?void 0:m[V]}};var $2=require("react/jsx-runtime"),y=({name:C})=>{var n;let i=(0,I2.useFormContext)(),e=w((n=i==null?void 0:i.formState)==null?void 0:n.errors,C);return e?(0,$2.jsx)(G2.Indicator,{severity:"error",children:e==null?void 0:e.message}):null};var q2=require("@s_mart/core");var G=require("react/jsx-runtime"),D3=h=>{var c=h,{name:C,rules:i,defaultValue:e,shouldUnregister:n,label:r,required:m,mask:H,variant:l="outlined",parse:V,format:Z,onInputChange:a}=c,d=f(c,["name","rules","defaultValue","shouldUnregister","label","required","mask","variant","parse","format","onInputChange"]);let p=(0,n2.useFormContext)();if(!p)throw new Error("Para usar o <TextField /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let[t,L]=(0,r2.useState)(!1),M=P=>{var b;let B=P;return Z&&(B=Z(P)),H?(b=N==null?void 0:N[H])==null?void 0:b.format(B):B},x=P=>{var b;let B=P;return V&&(B=V(P)),H?(b=N==null?void 0:N[H])==null?void 0:b.parse(B):B},F=P=>{if(!P||H!=="porcentagem")return;P==null||P.stopPropagation();let B=(P==null?void 0:P.target).value;if(B){let b=String(B);if(b.length>0){let Q=b.indexOf("%");Q>-1&&(P.currentTarget.selectionEnd=Q)}}},u=w(p.formState.errors,C);return(0,G.jsx)(n2.Controller,{control:p.control,name:C,rules:i,defaultValue:e,shouldUnregister:n,render:({field:{value:P,onChange:B}})=>(0,G.jsxs)(j.Grid,{display:"flex",flexDirection:"column",children:[r&&(0,G.jsx)(g,{label:r,required:m}),(0,G.jsx)(j.TextField,s(o({variant:l,autoComplete:"off",defaultValue:e,value:M(P||""),onChange:b=>{var Q,b2;B(x((Q=b==null?void 0:b.target)==null?void 0:Q.value)),a==null||a(b,(b2=b==null?void 0:b.target)==null?void 0:b2.value,p.watch())},error:Boolean(u)},d),{type:d.type==="password"?t?"text":"password":d.type,InputProps:o({onKeyDown:F,endAdornment:d.type==="password"&&(0,G.jsx)(j.InputAdornment,{position:"end",onClick:()=>L(!t),style:{cursor:"pointer"},children:(0,G.jsx)(q2.LIcon,{icon:t?A2:T2,size:"24px",removeMargin:!0})})},d.InputProps)})),(0,G.jsx)(y,{name:C})]})})},U2=(0,r2.memo)(D3);var l2=require("react"),H2=require("react-hook-form"),R2=require("@s_mart/core"),E=require("@mui/material");var v=require("react/jsx-runtime"),I3=d=>{var h=d,{name:C,rules:i,defaultValue:e,shouldUnregister:n,label:r,required:m,options:H,placeholder:l,onInputChange:V,footer:Z}=h,a=f(h,["name","rules","defaultValue","shouldUnregister","label","required","options","placeholder","onInputChange","footer"]);let c=(0,H2.useFormContext)(),{palette:p}=(0,E.useTheme)(),[t,L]=(0,l2.useState)(!1);if(!c)throw new Error("Para usar o <Select /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let M=w(c.formState.errors,C);return console.warn=()=>{},(0,v.jsx)(H2.Controller,{control:c.control,name:C,rules:i,defaultValue:e||"",shouldUnregister:n,render:({field:{value:x,onChange:F}})=>(0,v.jsxs)(E.Grid,{display:"flex",flexDirection:"column",children:[r&&(0,v.jsx)(g,{label:r,required:m}),(0,v.jsxs)(E.Select,s(o({open:t,onOpen:()=>L(!0),onClose:()=>L(!1),displayEmpty:Boolean(l),variant:"outlined",autoComplete:"off",value:x||"",onChange:u=>{F(u.target.value),V==null||V(u,u.target.value,c.watch())},error:Boolean(M),size:a.size||"medium"},a),{children:[l&&(0,v.jsx)(E.MenuItem,{disabled:!0,value:"",children:(0,v.jsx)("p",{style:{color:p.grey[400]},children:l})}),H==null?void 0:H.map((u,P)=>(0,v.jsx)(E.MenuItem,{value:u.value,children:u.label},P)),Z&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(E.Grid,{px:2,py:1,children:(0,v.jsx)(R2.Divider,{})}),Z({closeSelect:()=>L(!1)})]})]})),(0,v.jsx)(y,{name:C})]})})},z2=(0,l2.memo)(I3);var O2=require("react"),t2=require("react-hook-form"),O=require("@mui/material");var _2=require("@s_mart/core");var S=require("react/jsx-runtime"),x2=require("react"),G3=d=>{var h=d,{name:C,rules:i,defaultValue:e,shouldUnregister:n,label:r,required:m,options:H,textFieldProps:l,noOptionsText:V,footer:Z}=h,a=f(h,["name","rules","defaultValue","shouldUnregister","label","required","options","textFieldProps","noOptionsText","footer"]);let c=(0,t2.useFormContext)();if(!c)throw new Error("Para usar o <Searchable /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let p=w(c.formState.errors,C);return console.warn=()=>{},(0,S.jsx)(t2.Controller,{control:c.control,name:C,rules:i,defaultValue:e,shouldUnregister:n,render:({field:{onChange:t,value:L}})=>(0,S.jsxs)(O.Grid,{display:"flex",flexDirection:"column",children:[r&&(0,S.jsx)(g,{label:r,required:m}),(0,S.jsx)(O.Autocomplete,s(o({onChange:(M,x)=>t(x),value:L||null,options:H,noOptionsText:V||"Nenhuma op\xE7\xE3o encontrada",isOptionEqualToValue:(M,x)=>typeof M=="string"&&typeof x=="string"?M===x:typeof M=="object"&&typeof x=="object"?M.value===x.value:!1,renderOption:(M,x)=>typeof x=="object"?(0,x2.createElement)("li",s(o({},M),{key:x.key||x.value}),x.label):(0,x2.createElement)("li",s(o({},M),{key:x}),x),ListboxComponent:M=>(0,S.jsxs)("ul",s(o({},M),{children:[M.children,Z&&(0,S.jsx)("li",{children:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(O.Grid,{px:2,py:1,children:(0,S.jsx)(_2.Divider,{})}),Z]})},"searchable-footer")]}))},a),{renderInput:M=>(0,S.jsx)(O.TextField,o(o({error:Boolean(p)},M),l))})),(0,S.jsx)(y,{name:C})]})})},N2=(0,O2.memo)(G3);var K2=require("react"),s2=require("react-hook-form"),q=require("@mui/material");var $=require("@s_mart/utils"),y2=e2(require("@emotion/styled")),h2=require("@emotion/react"),j2=h2.css`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
.divider {
|
|
15
15
|
width: 1px;
|
|
16
|
-
height: ${(0
|
|
16
|
+
height: ${(0,$.toRem)(20)};
|
|
17
17
|
background-color: ${C.palette.grey[400]};
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
color: ${C.palette.grey[600]};
|
|
25
25
|
border-radius: 50%;
|
|
26
26
|
|
|
27
|
-
margin: 0 ${(0
|
|
28
|
-
width: ${(0
|
|
29
|
-
height: ${(0
|
|
27
|
+
margin: 0 ${(0,$.toRem)(6)};
|
|
28
|
+
width: ${(0,$.toRem)(28)};
|
|
29
|
+
height: ${(0,$.toRem)(28)};
|
|
30
30
|
|
|
31
31
|
&:hover {
|
|
32
32
|
cursor: pointer;
|
|
@@ -49,18 +49,18 @@
|
|
|
49
49
|
`,Y2=y2.default.div`
|
|
50
50
|
color: ${({theme:C})=>C.palette.text.primary};
|
|
51
51
|
|
|
52
|
-
padding: ${(0
|
|
53
|
-
margin: ${(0
|
|
52
|
+
padding: ${(0,$.toRem)(6)} ${(0,$.toRem)(16)};
|
|
53
|
+
margin: ${(0,$.toRem)(-6)} ${(0,$.toRem)(-16)};
|
|
54
54
|
|
|
55
55
|
&:hover {
|
|
56
56
|
cursor: pointer;
|
|
57
57
|
transition: background-color 0.2s ease-in-out;
|
|
58
58
|
background-color: ${({theme:C})=>C.palette.grey[100]};
|
|
59
59
|
}
|
|
60
|
-
`;var Q2=require("@s_mart/core");var
|
|
60
|
+
`;var Q2=require("@s_mart/core");var k=require("react/jsx-runtime"),F2=require("react"),q3=d=>{var h=d,{name:C,rules:i,defaultValue:e,shouldUnregister:n,label:r,required:m,options:H,onCreateOption:l,textFieldProps:V,hideAddButton:Z}=h,a=f(h,["name","rules","defaultValue","shouldUnregister","label","required","options","onCreateOption","textFieldProps","hideAddButton"]);let c=(0,s2.useFormContext)();if(!c)throw new Error("Para usar o <Creatable /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let p=w(c.formState.errors,C);console.warn=()=>{};let t=L=>{l?l(L):console.error("onCreateOption n\xE3o foi definido")};return(0,k.jsx)(s2.Controller,{control:c.control,name:C,rules:i,defaultValue:e,shouldUnregister:n,render:({field:{value:L,onChange:M}})=>{let x=(L==null?void 0:L.label)||(L==null?void 0:L.value)||L;return(0,k.jsxs)(q.Grid,{display:"flex",flexDirection:"column",children:[r&&(0,k.jsx)(g,{label:r,required:m}),(0,k.jsx)(W2,{hideAddButton:Z,children:(0,k.jsx)(q.Autocomplete,s(o({fullWidth:!0,onChange:(F,u)=>M(u),options:H,value:L||null,noOptionsText:(0,k.jsx)(Y2,{onClick:()=>t(L),children:(0,k.jsxs)(q.Typography,{children:["Adicionar ",x&&`"${x}"`]})}),isOptionEqualToValue:(F,u)=>u?typeof F=="string"&&typeof u=="string"?F===u:typeof F=="object"&&typeof u=="object"?F.value===u.value:typeof F=="object"&&typeof u=="string":!1,renderOption:(F,u)=>typeof u=="object"?(0,F2.createElement)("li",s(o({},F),{key:u.key||u.value}),u.label):(0,F2.createElement)("li",s(o({},F),{key:u}),u)},a),{renderInput:F=>{let u=Z?F.InputProps:s(o({},F.InputProps),{endAdornment:(0,k.jsxs)("div",{className:"endAdornments",children:[F.InputProps.endAdornment,(0,k.jsxs)("div",{className:"creatable",children:[(0,k.jsx)("div",{className:"divider"}),(0,k.jsx)("div",{className:"button",onClick:()=>t(L),children:(0,k.jsx)(Q2.LIcon,{icon:E2,size:"24px",removeMargin:!0})})]})]})});return(0,k.jsx)(q.TextField,o(s(o({},F),{error:Boolean(p),onChange:M,InputProps:u}),V))}}))}),(0,k.jsx)(y,{name:C})]})}})},J2=(0,K2.memo)(q3);var V2=require("react-hook-form"),W=require("@mui/material");var U=require("react/jsx-runtime"),U3=V=>{var Z=V,{name:C,rules:i,defaultValue:e,shouldUnregister:n,label:r,labelPlacement:m,required:H}=Z,l=f(Z,["name","rules","defaultValue","shouldUnregister","label","labelPlacement","required"]);let a=(0,V2.useFormContext)();if(!a)throw new Error("Para usar o <Checkbox /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");return(0,U.jsx)(V2.Controller,{control:a.control,name:C,rules:i,defaultValue:e,shouldUnregister:n,render:({field:{value:d,onChange:h}})=>(0,U.jsxs)(W.Grid,{display:"flex",flexDirection:"column",children:[(0,U.jsx)(W.FormControlLabel,{control:(0,U.jsx)(W.Checkbox,o({value:d!=null?d:"",defaultValue:d,onChange:h},l)),label:(0,U.jsx)(g,{label:r,required:H,regular:!0}),labelPlacement:m||"end"}),(0,U.jsx)(y,{name:C})]})})},X2=U3;var d2=require("react-hook-form"),Y=require("@mui/material");var R=require("react/jsx-runtime"),R3=l=>{var V=l,{name:C,rules:i,defaultValue:e,shouldUnregister:n,label:r,labelPlacement:m}=V,H=f(V,["name","rules","defaultValue","shouldUnregister","label","labelPlacement"]);let Z=(0,d2.useFormContext)();if(!Z)throw new Error("Para usar o <Switch /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");return(0,R.jsx)(d2.Controller,{control:Z.control,name:C,rules:i,defaultValue:e,shouldUnregister:n,render:({field:{value:a,onChange:d}})=>(0,R.jsxs)(Y.Grid,{display:"flex",flexDirection:"column",children:[(0,R.jsx)(Y.FormControlLabel,{control:(0,R.jsx)(Y.Switch,o({value:a!=null?a:"",defaultValue:a,onChange:d},H)),label:(0,R.jsx)(g,{label:r}),labelPlacement:m||"end"}),(0,R.jsx)(y,{name:C})]})})},C3=R3;var K=require("@mui/material");var C2=require("react/jsx-runtime"),z3=n=>{var r=n,{label:C,labelPlacement:i}=r,e=f(r,["label","labelPlacement"]);return(0,C2.jsx)(K.Grid,{display:"flex",flexDirection:"column",children:(0,C2.jsx)(K.FormControlLabel,{control:(0,C2.jsx)(K.Radio,o({},e)),label:(0,C2.jsx)(g,{label:C}),labelPlacement:i||"end"})})},i3=z3;var L2=require("react-hook-form"),a2=require("@mui/material");var _=require("react/jsx-runtime"),O3=Z=>{var a=Z,{name:C,rules:i,defaultValue:e,shouldUnregister:n,label:r,required:m,children:H,orientation:l="row"}=a,V=f(a,["name","rules","defaultValue","shouldUnregister","label","required","children","orientation"]);let d=(0,L2.useFormContext)();if(!d)throw new Error("Para usar o <RadioGroup /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");return(0,_.jsx)(L2.Controller,{control:d.control,name:C,rules:i,defaultValue:e,shouldUnregister:n,render:({field:{value:h,onChange:c}})=>(0,_.jsxs)(a2.Grid,{display:"flex",flexDirection:"column",children:[r&&(0,_.jsx)(g,{label:r,required:m}),(0,_.jsx)(a2.RadioGroup,s(o({value:h||"",onChange:c,name:C},V),{style:{display:"flex",flexDirection:l},children:H})),(0,_.jsx)(y,{name:C})]})})},e3=O3;var M2=require("react-hook-form"),o3=require("@mui/material");var P2=require("react/jsx-runtime"),_3=m=>{var H=m,{name:C,rules:i,defaultValue:e,shouldUnregister:n}=H,r=f(H,["name","rules","defaultValue","shouldUnregister"]);let l=(0,M2.useFormContext)();if(!l)throw new Error("Para usar o <Slider /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");return(0,P2.jsx)(M2.Controller,{control:l.control,name:C,rules:i,defaultValue:e,shouldUnregister:n,render:({field:{value:V,onChange:Z}})=>(0,P2.jsx)(o3.Slider,o({value:V||(r==null?void 0:r.min)||0,onChange:Z,valueLabelDisplay:"auto"},r))})},r3=_3;var H3=require("react"),Z2=require("react-hook-form"),t3=require("@s_mart/core"),s3=require("@mui/material"),V3=require("@mui/x-date-pickers/DatePicker"),d3=require("@mui/x-date-pickers/AdapterDayjs"),L3=require("@mui/x-date-pickers/LocalizationProvider");var A=require("@s_mart/utils"),n3=e2(require("@emotion/styled")),N3=C=>{switch(C){case"small":return(0,A.toRem)(16);default:case"medium":return(0,A.toRem)(20);case"large":return(0,A.toRem)(24)}},j3=C=>{switch(C){case"small":return`${(0,A.toRem)(2)} ${(0,A.toRem)(8)}`;default:case"medium":return`${(0,A.toRem)(6)} ${(0,A.toRem)(8)}`;case"large":return`${(0,A.toRem)(10)}`}},l3=n3.default.div`
|
|
61
61
|
> div > button {
|
|
62
62
|
padding: ${({size:C})=>j3(C)};
|
|
63
|
-
border-radius: 0 ${(0,
|
|
63
|
+
border-radius: 0 ${(0,A.toRem)(4)} ${(0,A.toRem)(4)} 0;
|
|
64
64
|
|
|
65
65
|
margin: 0px -13px 0px 0px;
|
|
66
66
|
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
width: ${({size:C})=>N3(C)};
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
`;var
|
|
71
|
+
`;var D=require("react/jsx-runtime"),W3=Z=>{var a=Z,{rules:C,name:i,defaultValue:e,shouldUnregister:n,datePickerProps:r,label:m,required:H,placeholder:l}=a,V=f(a,["rules","name","defaultValue","shouldUnregister","datePickerProps","label","required","placeholder"]);let d=(0,Z2.useFormContext)();if(!d)throw new Error("Para usar o <DataPicker /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let h=w(d.formState.errors,i);return(0,D.jsx)(L3.LocalizationProvider,{dateAdapter:d3.AdapterDayjs,children:(0,D.jsx)(Z2.Controller,{control:d.control,name:i,rules:C,defaultValue:e,shouldUnregister:n,render:({field:{value:c,onChange:p}})=>(0,D.jsxs)(t3.Grid,{display:"flex",flexDirection:"column",children:[m&&(0,D.jsx)(g,{label:m,required:H}),(0,D.jsx)(V3.DatePicker,s(o({},r),{value:c!=null?c:null,inputFormat:(r==null?void 0:r.inputFormat)||"DD/MM/YYYY",onChange:p,renderInput:t=>{var L,M;return(0,D.jsx)(s3.TextField,s(o(s(o({variant:"outlined"},t),{error:Boolean(h)}),V),{inputProps:s(o({},t.inputProps),{placeholder:l||((L=t.inputProps)==null?void 0:L.placeholder)}),InputProps:s(o({},t.InputProps),{endAdornment:(0,D.jsx)(l3,{size:V.size,children:(M=t.InputProps)==null?void 0:M.endAdornment})})}))}})),(0,D.jsx)(y,{name:i})]})})})},a3=(0,H3.memo)(W3);var c3=require("@s_mart/core"),p3=require("@mui/x-date-pickers/TimePicker"),m3=require("@mui/material"),c2=require("react-hook-form"),u3=require("@mui/x-date-pickers/AdapterDayjs"),f3=require("@mui/x-date-pickers/LocalizationProvider");var T=require("@s_mart/utils"),M3=e2(require("@emotion/styled")),Y3=C=>{switch(C){case"small":return(0,T.toRem)(16);default:case"medium":return(0,T.toRem)(20);case"large":return(0,T.toRem)(24)}},K3=C=>{switch(C){case"small":return`${(0,T.toRem)(2)} ${(0,T.toRem)(8)}`;default:case"medium":return`${(0,T.toRem)(6)} ${(0,T.toRem)(8)}`;case"large":return`${(0,T.toRem)(10)}`}},Z3=M3.default.div`
|
|
72
72
|
> div > button {
|
|
73
73
|
padding: ${({size:C})=>K3(C)};
|
|
74
|
-
border-radius: 0 ${(0,
|
|
74
|
+
border-radius: 0 ${(0,T.toRem)(4)} ${(0,T.toRem)(4)} 0;
|
|
75
75
|
|
|
76
76
|
margin: 0px -13px 0px 0px;
|
|
77
77
|
|
|
@@ -79,4 +79,4 @@
|
|
|
79
79
|
width: ${({size:C})=>Y3(C)};
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
`;var g3=require("react");var
|
|
82
|
+
`;var g3=require("react");var I=require("react/jsx-runtime"),Q3=Z=>{var a=Z,{rules:C,defaultValue:i,shouldUnregister:e,name:n,required:r,label:m,timePickerProps:H,placeholder:l}=a,V=f(a,["rules","defaultValue","shouldUnregister","name","required","label","timePickerProps","placeholder"]);let d=(0,c2.useFormContext)();if(!d)throw new Error("Para usar o <TimePicker /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let h=w(d.formState.errors,n);return(0,I.jsx)(f3.LocalizationProvider,{dateAdapter:u3.AdapterDayjs,children:(0,I.jsx)(c2.Controller,{control:d.control,name:n,rules:C,defaultValue:i,shouldUnregister:e,render:({field:{value:c,onChange:p}})=>(0,I.jsxs)(c3.Grid,{display:"flex",flexDirection:"column",children:[m&&(0,I.jsx)(g,{label:m,required:r}),(0,I.jsx)(p3.TimePicker,s(o({value:c!=null?c:null,onChange:p},H),{renderInput:t=>{var L,M;return(0,I.jsx)(m3.TextField,s(o(s(o({variant:"outlined"},t),{error:Boolean(h)}),V),{inputProps:s(o({},t.inputProps),{placeholder:l||((L=t.inputProps)==null?void 0:L.placeholder)}),InputProps:s(o({},t.InputProps),{endAdornment:(0,I.jsx)(Z3,{size:V.size,children:(M=t.InputProps)==null?void 0:M.endAdornment})})}))}})),(0,I.jsx)(y,{name:n})]})})})},x3=(0,g3.memo)(Q3);var y3=require("react"),p2=require("react-hook-form"),m2=require("@mui/material"),h3=require("@s_mart/core");var z=require("react/jsx-runtime"),P3=require("react"),J3=Z=>{var a=Z,{name:C,defaultValue:i,rules:e,shouldUnregister:n,label:r,required:m,onInputChange:H,onChange:l}=a,V=f(a,["name","defaultValue","rules","shouldUnregister","label","required","onInputChange","onChange"]);let d=(0,p2.useFormContext)();if(!d)throw new Error("Para usar o <Autocomplete /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let h=w(d.formState.errors,C);return console.warn=()=>{},(0,z.jsx)(p2.Controller,{name:C,control:d.control,defaultValue:i,rules:e,shouldUnregister:n,render:({field:c})=>(0,z.jsxs)(h3.Grid,{display:"flex",flexDirection:"column",children:[r&&(0,z.jsx)(g,{label:r,required:m}),(0,z.jsx)(m2.Autocomplete,s(o({onChange:(p,t)=>{c.onChange(t),l==null||l(p,t,d.watch())},onInputChange:(p,t,L)=>{c.onChange(t),setTimeout(()=>{H==null||H(p,d.watch(C),L,d.watch())},0)},isOptionEqualToValue:(p,t)=>p.value===t.value,renderOption:(p,t)=>(0,P3.createElement)("li",s(o({},p),{key:t.key||t.value,onClick:L=>{var M;(M=p.onClick)==null||M.call(p,L),c.onChange(t)}}),t.label),value:c.value||null},V),{renderInput:p=>{var t,L,M;return(0,z.jsx)(m2.TextField,s(o(o({},p),V.textFieldProps),{error:Boolean(h),InputProps:s(o(o({},p.InputProps),(t=V.textFieldProps)==null?void 0:t.InputProps),{inputProps:o(o({},p.inputProps),(M=(L=V.textFieldProps)==null?void 0:L.InputProps)==null?void 0:M.inputProps)})}))}})),(0,z.jsx)(y,{name:C})]})})},F3=(0,y3.memo)(J3);0&&(module.exports={Autocomplete,Checkbox,Creatable,DatePicker,Form,RadioButton,RadioGroup,Searchable,Select,Slider,Switch,TextField,TimePicker});
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var u2=Object.defineProperty,f2=Object.defineProperties;var g2=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable;var Q=(C,i,o)=>i in C?u2(C,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):C[i]=o,e=(C,i)=>{for(var o in i||(i={}))J.call(i,o)&&Q(C,o,i[o]);if(O)for(var o of O(i))X.call(i,o)&&Q(C,o,i[o]);return C},V=(C,i)=>f2(C,g2(i));var u=(C,i)=>{var o={};for(var l in C)J.call(C,l)&&i.indexOf(l)<0&&(o[l]=C[l]);if(C!=null&&O)for(var l of O(C))i.indexOf(l)<0&&X.call(C,l)&&(o[l]=C[l]);return o};import{useEffect as x2}from"react";import{FormProvider as y2,useForm as h2}from"react-hook-form";import{jsx as C2}from"react/jsx-runtime";function F2(m){var t=m,{children:C,onSubmit:i,style:o,disableDefaultValuesUpdate:l}=t,r=u(t,["children","onSubmit","style","disableDefaultValuesUpdate"]);let H=h2(r);x2(()=>{l||H.reset(r.defaultValues)},[r.defaultValues,H.reset]);let L=()=>typeof C=="function"?C(V(e({},H),{onSubmit:H.handleSubmit(c=>i(c,H))})):C;return C2(y2,V(e({},H),{children:C2("form",{onSubmit:c=>{c.preventDefault(),c.stopPropagation(),H.handleSubmit(a=>i(a,H))()},style:o,children:L()})}))}var P2=F2;import{memo as B2,useState as A2}from"react";import{Controller as T2,useFormContext as E2}from"react-hook-form";import{Grid as D2,InputAdornment as G2,TextField as I2}from"@mui/material";var i2={description:"M39.0611 23.1367C36.3276 17.015 30.4051 13.2479 24.027 13.0909C17.4971 13.2479 11.5746 17.172 8.84117 23.1367C8.68931 23.6076 8.68931 24.2355 8.84117 24.8633C11.5746 30.985 17.4971 34.7521 23.8752 34.9091C30.4051 34.7521 36.1757 30.828 38.9092 24.8633C39.3648 24.2355 39.3648 23.6076 39.0611 23.1367ZM24.027 32.0837C19.6231 31.9268 16.2822 28.1596 16.4341 23.6076C16.586 19.3695 19.9269 15.7593 24.027 15.7593C28.4309 15.9163 31.7718 19.6835 31.62 24.2355C31.4681 28.4735 28.1272 32.0837 24.027 32.0837ZM24.027 18.5847C23.5715 18.5847 23.1159 18.7417 22.6603 18.7417C23.4196 19.8404 23.2677 21.2531 22.3566 22.3519C21.4454 23.2937 20.0787 23.2937 19.0157 22.5088C18.5601 24.7063 19.3194 27.2178 21.1417 28.4735C22.964 29.7292 25.3938 29.7292 27.0642 28.3165C28.7347 26.9039 29.494 24.3924 28.7347 22.1949C28.1272 19.9974 26.1531 18.5847 24.027 18.5847Z",viewBox:"0 0 48 48",id:"line-eye-solid"},e2={description:"M23.9998 31.7412C19.9223 31.7412 16.6215 28.5851 16.3177 24.5854L10.6785 20.2272C9.93715 21.1573 9.25496 22.1405 8.70447 23.2157C8.58149 23.4589 8.51742 23.7277 8.51742 24.0003C8.51742 24.2729 8.58149 24.5416 8.70447 24.7849C11.6198 30.4731 17.3913 34.3216 23.9998 34.3216C25.4465 34.3216 26.842 34.1066 28.1871 33.7593L25.3976 31.6009C24.9369 31.6899 24.469 31.7369 23.9998 31.7412ZM40.8703 34.8646L34.9273 30.2715C36.7326 28.7501 38.2174 26.8848 39.2952 24.7843C39.4182 24.5411 39.4823 24.2723 39.4823 23.9997C39.4823 23.7272 39.4182 23.4584 39.2952 23.2151C36.3799 17.5269 30.6084 13.6784 23.9998 13.6784C21.2321 13.6817 18.5093 14.3785 16.0801 15.7051L9.24098 10.419C9.15179 10.3496 9.04981 10.2985 8.94085 10.2685C8.83189 10.2385 8.7181 10.2303 8.60597 10.2443C8.49384 10.2584 8.38557 10.2944 8.28736 10.3502C8.18914 10.4061 8.1029 10.4808 8.03356 10.5701L6.97828 11.9285C6.8383 12.1086 6.77557 12.3369 6.8039 12.5633C6.83223 12.7896 6.94929 12.9954 7.12934 13.1354L38.7587 37.581C38.8479 37.6504 38.9499 37.7016 39.0588 37.7315C39.1678 37.7615 39.2816 37.7697 39.3937 37.7557C39.5058 37.7416 39.6141 37.7057 39.7123 37.6498C39.8105 37.5939 39.8968 37.5192 39.9661 37.43L41.0219 36.0715C41.1619 35.8913 41.2245 35.663 41.1961 35.4366C41.1676 35.2103 41.0505 35.0045 40.8703 34.8646ZM30.9938 27.2309L28.8811 25.5977C29.059 25.0835 29.1534 24.5441 29.1606 24C29.1711 23.2034 28.9947 22.4155 28.6454 21.6995C28.2962 20.9836 27.7838 20.3595 27.1496 19.8774C26.5154 19.3953 25.777 19.0687 24.9937 18.9238C24.2103 18.7788 23.4039 18.8197 22.6392 19.0429C22.9634 19.4822 23.1387 20.0135 23.1397 20.5595C23.1317 20.7411 23.1039 20.9214 23.0569 21.097L19.0997 18.0387C20.4743 16.89 22.2085 16.2601 23.9998 16.2588C25.0166 16.2582 26.0235 16.4581 26.9629 16.8469C27.9024 17.2357 28.756 17.8059 29.475 18.5249C30.1939 19.2438 30.7641 20.0974 31.1529 21.0369C31.5418 21.9764 31.7416 22.9833 31.7411 24C31.7411 25.1628 31.4567 26.246 30.9938 27.2309Z",viewBox:"0 0 48 48",id:"line-eye-slash-solid"};var o2={description:"M35.8286 21.8493H26.1506V12.1714C26.1506 11.6338 25.613 11.0961 25.0753 11.0961H22.9247C22.3198 11.0961 21.8493 11.6338 21.8493 12.1714V21.8493H12.1714C11.5666 21.8493 11.0961 22.387 11.0961 22.9247V25.0753C11.0961 25.6802 11.5666 26.1506 12.1714 26.1506H21.8493V35.8286C21.8493 36.4334 22.3198 36.9039 22.9247 36.9039H25.0753C25.613 36.9039 26.1506 36.4334 26.1506 35.8286V26.1506H35.8286C36.3662 26.1506 36.9039 25.6802 36.9039 25.0753V22.9247C36.9039 22.387 36.3662 21.8493 35.8286 21.8493Z",viewBox:"0 0 48 48",id:"line-plus-solid"};import*as I from"@s_mart/masks";import{Typography as r2}from"@mui/material";import{toRem as b2}from"@s_mart/utils";import{jsx as l2,jsxs as w2}from"react/jsx-runtime";var x=({label:C,required:i,regular:o})=>w2("span",{style:{display:"flex",alignItems:"center",gap:b2(2)},children:[l2(r2,{variant:"caption",fontWeight:o?400:700,style:{display:"flex",alignItems:"center"},children:C}),i&&l2(r2,{variant:"caption",fontWeight:900,color:"error",children:"*"})]});import{useFormContext as k2}from"react-hook-form";import{Indicator as v2}from"@s_mart/core";var b=(C,i)=>{var o,l,r,m;if(C[i])return C[i];if(i.includes("[")){let[t,H]=i.split("["),[L,c]=H.split("].");return(l=(o=C[t])==null?void 0:o[L])==null?void 0:l[c]}if(i.includes(".")){let[t,H,L]=i.split(".");return(m=(r=C[t])==null?void 0:r[H])==null?void 0:m[L]}};import{jsx as S2}from"react/jsx-runtime";var h=({name:C})=>{var l;let i=k2(),o=b((l=i==null?void 0:i.formState)==null?void 0:l.errors,C);return o?S2(v2,{severity:"error",children:o==null?void 0:o.message}):null};import{LIcon as $2}from"@s_mart/core";import{jsx as $,jsxs as R2}from"react/jsx-runtime";var q2=F=>{var p=F,{name:C,rules:i,defaultValue:o,shouldUnregister:l,label:r,required:m,mask:t,variant:H="outlined",parse:L,format:c,onInputChange:a}=p,M=u(p,["name","rules","defaultValue","shouldUnregister","label","required","mask","variant","parse","format","onInputChange"]);let Z=E2();if(!Z)throw new Error("Para usar o <TextField /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let[d,f]=A2(!1),n=s=>{var P;let w=s;return c&&(w=c(s)),t?(P=I==null?void 0:I[t])==null?void 0:P.format(w):w},y=s=>{var P;let w=s;return L&&(w=L(s)),t?(P=I==null?void 0:I[t])==null?void 0:P.parse(w):w},G=s=>{if(!s||t!=="porcentagem")return;s==null||s.stopPropagation();let w=(s==null?void 0:s.target).value;if(w){let P=String(w);if(P.length>0){let q=P.indexOf("%");q>-1&&(s.currentTarget.selectionEnd=q)}}},g=b(Z.formState.errors,C);return $(T2,{control:Z.control,name:C,rules:i,defaultValue:o,shouldUnregister:l,render:({field:{value:s,onChange:w}})=>R2(D2,{display:"flex",flexDirection:"column",children:[r&&$(x,{label:r,required:m}),$(I2,V(e({variant:H,autoComplete:"off",defaultValue:o,value:n(s||""),onChange:P=>{var q,K;w(y((q=P==null?void 0:P.target)==null?void 0:q.value)),a==null||a(P,(K=P==null?void 0:P.target)==null?void 0:K.value,Z.watch())},error:Boolean(g)},M),{type:M.type==="password"?d?"text":"password":M.type,InputProps:e({onKeyDown:G,endAdornment:M.type==="password"&&$(G2,{position:"end",onClick:()=>f(!d),style:{cursor:"pointer"},children:$($2,{icon:d?i2:e2,size:"24px",removeMargin:!0})})},M.InputProps)})),$(h,{name:C})]})})},U2=B2(q2);import{memo as z2,useState as O2}from"react";import{Controller as _2,useFormContext as N2}from"react-hook-form";import{Divider as j2}from"@s_mart/core";import{Grid as n2,Select as W2,MenuItem as H2,useTheme as Y2}from"@mui/material";import{Fragment as J2,jsx as B,jsxs as W}from"react/jsx-runtime";var K2=M=>{var F=M,{name:C,rules:i,defaultValue:o,shouldUnregister:l,label:r,required:m,options:t,placeholder:H,onInputChange:L,footer:c}=F,a=u(F,["name","rules","defaultValue","shouldUnregister","label","required","options","placeholder","onInputChange","footer"]);let p=N2(),{palette:Z}=Y2(),[d,f]=O2(!1);if(!p)throw new Error("Para usar o <Select /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let n=b(p.formState.errors,C);return console.warn=()=>{},B(_2,{control:p.control,name:C,rules:i,defaultValue:o||"",shouldUnregister:l,render:({field:{value:y,onChange:G}})=>W(n2,{display:"flex",flexDirection:"column",children:[r&&B(x,{label:r,required:m}),W(W2,V(e({open:d,onOpen:()=>f(!0),onClose:()=>f(!1),displayEmpty:Boolean(H),variant:"outlined",autoComplete:"off",value:y||"",onChange:g=>{G(g.target.value),L==null||L(g,g.target.value,p.watch())},error:Boolean(n),size:a.size||"medium"},a),{children:[H&&B(H2,{disabled:!0,value:"",children:B("p",{style:{color:Z.grey[400]},children:H})}),t==null?void 0:t.map((g,s)=>B(H2,{value:g.value,children:g.label},s)),c&&W(J2,{children:[B(n2,{px:2,py:1,children:B(j2,{})}),c({closeSelect:()=>f(!1)})]})]})),B(h,{name:C})]})})},Q2=z2(K2);import{memo as X2}from"react";import{Controller as C3,useFormContext as i3}from"react-hook-form";import{Grid as t2,Autocomplete as e3,TextField as o3}from"@mui/material";import{Divider as r3}from"@s_mart/core";import{Fragment as H3,jsx as A,jsxs as Y}from"react/jsx-runtime";import{createElement as s2}from"react";var l3=M=>{var F=M,{name:C,rules:i,defaultValue:o,shouldUnregister:l,label:r,required:m,options:t,textFieldProps:H,noOptionsText:L,footer:c}=F,a=u(F,["name","rules","defaultValue","shouldUnregister","label","required","options","textFieldProps","noOptionsText","footer"]);let p=i3();if(!p)throw new Error("Para usar o <Searchable /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let Z=b(p.formState.errors,C);return A(C3,{control:p.control,name:C,rules:i,defaultValue:o,shouldUnregister:l,render:({field:{onChange:d,value:f}})=>Y(t2,{display:"flex",flexDirection:"column",children:[r&&A(x,{label:r,required:m}),A(e3,V(e({onChange:(n,y)=>d(y),value:f||null,options:t,noOptionsText:L||"Nenhuma op\xE7\xE3o encontrada",isOptionEqualToValue:(n,y)=>typeof n=="string"&&typeof y=="string"?n===y:typeof n=="object"&&typeof y=="object"?n.value===y.value:!1,renderOption:(n,y)=>typeof y=="object"?s2("li",V(e({},n),{key:y.key||y.value}),y.label):s2("li",V(e({},n),{key:y}),y),ListboxComponent:n=>Y("ul",V(e({},n),{children:[n.children,c&&A("li",{children:Y(H3,{children:[A(t2,{px:2,py:1,children:A(r3,{})}),c]})},"searchable-footer")]}))},a),{renderInput:n=>A(o3,e(e({error:Boolean(Z)},n),H))})),A(h,{name:C})]})})},n3=X2(l3);import{memo as s3}from"react";import{Controller as V3,useFormContext as d3}from"react-hook-form";import{Grid as L3,Autocomplete as a3,TextField as M3,Typography as Z3}from"@mui/material";import{toRem as T}from"@s_mart/utils";import V2 from"@emotion/styled";import{css as d2}from"@emotion/react";var L2=d2`
|
|
1
|
+
var u2=Object.defineProperty,f2=Object.defineProperties;var g2=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable;var Q=(C,i,o)=>i in C?u2(C,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):C[i]=o,e=(C,i)=>{for(var o in i||(i={}))J.call(i,o)&&Q(C,o,i[o]);if(O)for(var o of O(i))X.call(i,o)&&Q(C,o,i[o]);return C},s=(C,i)=>f2(C,g2(i));var f=(C,i)=>{var o={};for(var n in C)J.call(C,n)&&i.indexOf(n)<0&&(o[n]=C[n]);if(C!=null&&O)for(var n of O(C))i.indexOf(n)<0&&X.call(C,n)&&(o[n]=C[n]);return o};import{useEffect as x2}from"react";import{FormProvider as y2,useForm as h2}from"react-hook-form";import{jsx as C2}from"react/jsx-runtime";function F2(m){var H=m,{children:C,onSubmit:i,style:o,disableDefaultValuesUpdate:n}=H,r=f(H,["children","onSubmit","style","disableDefaultValuesUpdate"]);let l=h2(r);x2(()=>{n||l.reset(r.defaultValues)},[r.defaultValues,l.reset]);let V=()=>typeof C=="function"?C(s(e({},l),{onSubmit:l.handleSubmit(Z=>i(Z,l))})):C;return C2(y2,s(e({},l),{children:C2("form",{onSubmit:Z=>{Z.preventDefault(),Z.stopPropagation(),l.handleSubmit(a=>i(a,l))()},style:o,children:V()})}))}var P2=F2;import{memo as B2,useState as A2}from"react";import{Controller as T2,useFormContext as E2}from"react-hook-form";import{Grid as D2,InputAdornment as I2,TextField as G2}from"@mui/material";var i2={description:"M39.0611 23.1367C36.3276 17.015 30.4051 13.2479 24.027 13.0909C17.4971 13.2479 11.5746 17.172 8.84117 23.1367C8.68931 23.6076 8.68931 24.2355 8.84117 24.8633C11.5746 30.985 17.4971 34.7521 23.8752 34.9091C30.4051 34.7521 36.1757 30.828 38.9092 24.8633C39.3648 24.2355 39.3648 23.6076 39.0611 23.1367ZM24.027 32.0837C19.6231 31.9268 16.2822 28.1596 16.4341 23.6076C16.586 19.3695 19.9269 15.7593 24.027 15.7593C28.4309 15.9163 31.7718 19.6835 31.62 24.2355C31.4681 28.4735 28.1272 32.0837 24.027 32.0837ZM24.027 18.5847C23.5715 18.5847 23.1159 18.7417 22.6603 18.7417C23.4196 19.8404 23.2677 21.2531 22.3566 22.3519C21.4454 23.2937 20.0787 23.2937 19.0157 22.5088C18.5601 24.7063 19.3194 27.2178 21.1417 28.4735C22.964 29.7292 25.3938 29.7292 27.0642 28.3165C28.7347 26.9039 29.494 24.3924 28.7347 22.1949C28.1272 19.9974 26.1531 18.5847 24.027 18.5847Z",viewBox:"0 0 48 48",id:"line-eye-solid"},e2={description:"M23.9998 31.7412C19.9223 31.7412 16.6215 28.5851 16.3177 24.5854L10.6785 20.2272C9.93715 21.1573 9.25496 22.1405 8.70447 23.2157C8.58149 23.4589 8.51742 23.7277 8.51742 24.0003C8.51742 24.2729 8.58149 24.5416 8.70447 24.7849C11.6198 30.4731 17.3913 34.3216 23.9998 34.3216C25.4465 34.3216 26.842 34.1066 28.1871 33.7593L25.3976 31.6009C24.9369 31.6899 24.469 31.7369 23.9998 31.7412ZM40.8703 34.8646L34.9273 30.2715C36.7326 28.7501 38.2174 26.8848 39.2952 24.7843C39.4182 24.5411 39.4823 24.2723 39.4823 23.9997C39.4823 23.7272 39.4182 23.4584 39.2952 23.2151C36.3799 17.5269 30.6084 13.6784 23.9998 13.6784C21.2321 13.6817 18.5093 14.3785 16.0801 15.7051L9.24098 10.419C9.15179 10.3496 9.04981 10.2985 8.94085 10.2685C8.83189 10.2385 8.7181 10.2303 8.60597 10.2443C8.49384 10.2584 8.38557 10.2944 8.28736 10.3502C8.18914 10.4061 8.1029 10.4808 8.03356 10.5701L6.97828 11.9285C6.8383 12.1086 6.77557 12.3369 6.8039 12.5633C6.83223 12.7896 6.94929 12.9954 7.12934 13.1354L38.7587 37.581C38.8479 37.6504 38.9499 37.7016 39.0588 37.7315C39.1678 37.7615 39.2816 37.7697 39.3937 37.7557C39.5058 37.7416 39.6141 37.7057 39.7123 37.6498C39.8105 37.5939 39.8968 37.5192 39.9661 37.43L41.0219 36.0715C41.1619 35.8913 41.2245 35.663 41.1961 35.4366C41.1676 35.2103 41.0505 35.0045 40.8703 34.8646ZM30.9938 27.2309L28.8811 25.5977C29.059 25.0835 29.1534 24.5441 29.1606 24C29.1711 23.2034 28.9947 22.4155 28.6454 21.6995C28.2962 20.9836 27.7838 20.3595 27.1496 19.8774C26.5154 19.3953 25.777 19.0687 24.9937 18.9238C24.2103 18.7788 23.4039 18.8197 22.6392 19.0429C22.9634 19.4822 23.1387 20.0135 23.1397 20.5595C23.1317 20.7411 23.1039 20.9214 23.0569 21.097L19.0997 18.0387C20.4743 16.89 22.2085 16.2601 23.9998 16.2588C25.0166 16.2582 26.0235 16.4581 26.9629 16.8469C27.9024 17.2357 28.756 17.8059 29.475 18.5249C30.1939 19.2438 30.7641 20.0974 31.1529 21.0369C31.5418 21.9764 31.7416 22.9833 31.7411 24C31.7411 25.1628 31.4567 26.246 30.9938 27.2309Z",viewBox:"0 0 48 48",id:"line-eye-slash-solid"};var o2={description:"M35.8286 21.8493H26.1506V12.1714C26.1506 11.6338 25.613 11.0961 25.0753 11.0961H22.9247C22.3198 11.0961 21.8493 11.6338 21.8493 12.1714V21.8493H12.1714C11.5666 21.8493 11.0961 22.387 11.0961 22.9247V25.0753C11.0961 25.6802 11.5666 26.1506 12.1714 26.1506H21.8493V35.8286C21.8493 36.4334 22.3198 36.9039 22.9247 36.9039H25.0753C25.613 36.9039 26.1506 36.4334 26.1506 35.8286V26.1506H35.8286C36.3662 26.1506 36.9039 25.6802 36.9039 25.0753V22.9247C36.9039 22.387 36.3662 21.8493 35.8286 21.8493Z",viewBox:"0 0 48 48",id:"line-plus-solid"};import*as G from"@s_mart/masks";import{Typography as r2}from"@mui/material";import{toRem as b2}from"@s_mart/utils";import{jsx as n2,jsxs as w2}from"react/jsx-runtime";var g=({label:C,required:i,regular:o})=>w2("span",{style:{display:"flex",alignItems:"center",gap:b2(2)},children:[n2(r2,{variant:"caption",fontWeight:o?400:700,style:{display:"flex",alignItems:"center"},children:C}),i&&n2(r2,{variant:"caption",fontWeight:900,color:"error",children:"*"})]});import{useFormContext as k2}from"react-hook-form";import{Indicator as v2}from"@s_mart/core";var w=(C,i)=>{var o,n,r,m;if(C[i])return C[i];if(i.includes("[")){let[H,l]=i.split("["),[V,Z]=l.split("].");return(n=(o=C[H])==null?void 0:o[V])==null?void 0:n[Z]}if(i.includes(".")){let[H,l,V]=i.split(".");return(m=(r=C[H])==null?void 0:r[l])==null?void 0:m[V]}};import{jsx as S2}from"react/jsx-runtime";var y=({name:C})=>{var n;let i=k2(),o=w((n=i==null?void 0:i.formState)==null?void 0:n.errors,C);return o?S2(v2,{severity:"error",children:o==null?void 0:o.message}):null};import{LIcon as $2}from"@s_mart/core";import{jsx as $,jsxs as R2}from"react/jsx-runtime";var q2=h=>{var c=h,{name:C,rules:i,defaultValue:o,shouldUnregister:n,label:r,required:m,mask:H,variant:l="outlined",parse:V,format:Z,onInputChange:a}=c,d=f(c,["name","rules","defaultValue","shouldUnregister","label","required","mask","variant","parse","format","onInputChange"]);let p=E2();if(!p)throw new Error("Para usar o <TextField /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let[t,L]=A2(!1),M=P=>{var b;let k=P;return Z&&(k=Z(P)),H?(b=G==null?void 0:G[H])==null?void 0:b.format(k):k},x=P=>{var b;let k=P;return V&&(k=V(P)),H?(b=G==null?void 0:G[H])==null?void 0:b.parse(k):k},F=P=>{if(!P||H!=="porcentagem")return;P==null||P.stopPropagation();let k=(P==null?void 0:P.target).value;if(k){let b=String(k);if(b.length>0){let q=b.indexOf("%");q>-1&&(P.currentTarget.selectionEnd=q)}}},u=w(p.formState.errors,C);return $(T2,{control:p.control,name:C,rules:i,defaultValue:o,shouldUnregister:n,render:({field:{value:P,onChange:k}})=>R2(D2,{display:"flex",flexDirection:"column",children:[r&&$(g,{label:r,required:m}),$(G2,s(e({variant:l,autoComplete:"off",defaultValue:o,value:M(P||""),onChange:b=>{var q,K;k(x((q=b==null?void 0:b.target)==null?void 0:q.value)),a==null||a(b,(K=b==null?void 0:b.target)==null?void 0:K.value,p.watch())},error:Boolean(u)},d),{type:d.type==="password"?t?"text":"password":d.type,InputProps:e({onKeyDown:F,endAdornment:d.type==="password"&&$(I2,{position:"end",onClick:()=>L(!t),style:{cursor:"pointer"},children:$($2,{icon:t?i2:e2,size:"24px",removeMargin:!0})})},d.InputProps)})),$(y,{name:C})]})})},U2=B2(q2);import{memo as z2,useState as O2}from"react";import{Controller as _2,useFormContext as N2}from"react-hook-form";import{Divider as j2}from"@s_mart/core";import{Grid as l2,Select as W2,MenuItem as H2,useTheme as Y2}from"@mui/material";import{Fragment as J2,jsx as A,jsxs as W}from"react/jsx-runtime";var K2=d=>{var h=d,{name:C,rules:i,defaultValue:o,shouldUnregister:n,label:r,required:m,options:H,placeholder:l,onInputChange:V,footer:Z}=h,a=f(h,["name","rules","defaultValue","shouldUnregister","label","required","options","placeholder","onInputChange","footer"]);let c=N2(),{palette:p}=Y2(),[t,L]=O2(!1);if(!c)throw new Error("Para usar o <Select /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let M=w(c.formState.errors,C);return console.warn=()=>{},A(_2,{control:c.control,name:C,rules:i,defaultValue:o||"",shouldUnregister:n,render:({field:{value:x,onChange:F}})=>W(l2,{display:"flex",flexDirection:"column",children:[r&&A(g,{label:r,required:m}),W(W2,s(e({open:t,onOpen:()=>L(!0),onClose:()=>L(!1),displayEmpty:Boolean(l),variant:"outlined",autoComplete:"off",value:x||"",onChange:u=>{F(u.target.value),V==null||V(u,u.target.value,c.watch())},error:Boolean(M),size:a.size||"medium"},a),{children:[l&&A(H2,{disabled:!0,value:"",children:A("p",{style:{color:p.grey[400]},children:l})}),H==null?void 0:H.map((u,P)=>A(H2,{value:u.value,children:u.label},P)),Z&&W(J2,{children:[A(l2,{px:2,py:1,children:A(j2,{})}),Z({closeSelect:()=>L(!1)})]})]})),A(y,{name:C})]})})},Q2=z2(K2);import{memo as X2}from"react";import{Controller as C3,useFormContext as i3}from"react-hook-form";import{Grid as t2,Autocomplete as e3,TextField as o3}from"@mui/material";import{Divider as r3}from"@s_mart/core";import{Fragment as H3,jsx as T,jsxs as Y}from"react/jsx-runtime";import{createElement as s2}from"react";var n3=d=>{var h=d,{name:C,rules:i,defaultValue:o,shouldUnregister:n,label:r,required:m,options:H,textFieldProps:l,noOptionsText:V,footer:Z}=h,a=f(h,["name","rules","defaultValue","shouldUnregister","label","required","options","textFieldProps","noOptionsText","footer"]);let c=i3();if(!c)throw new Error("Para usar o <Searchable /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let p=w(c.formState.errors,C);return console.warn=()=>{},T(C3,{control:c.control,name:C,rules:i,defaultValue:o,shouldUnregister:n,render:({field:{onChange:t,value:L}})=>Y(t2,{display:"flex",flexDirection:"column",children:[r&&T(g,{label:r,required:m}),T(e3,s(e({onChange:(M,x)=>t(x),value:L||null,options:H,noOptionsText:V||"Nenhuma op\xE7\xE3o encontrada",isOptionEqualToValue:(M,x)=>typeof M=="string"&&typeof x=="string"?M===x:typeof M=="object"&&typeof x=="object"?M.value===x.value:!1,renderOption:(M,x)=>typeof x=="object"?s2("li",s(e({},M),{key:x.key||x.value}),x.label):s2("li",s(e({},M),{key:x}),x),ListboxComponent:M=>Y("ul",s(e({},M),{children:[M.children,Z&&T("li",{children:Y(H3,{children:[T(t2,{px:2,py:1,children:T(r3,{})}),Z]})},"searchable-footer")]}))},a),{renderInput:M=>T(o3,e(e({error:Boolean(p)},M),l))})),T(y,{name:C})]})})},l3=X2(n3);import{memo as s3}from"react";import{Controller as V3,useFormContext as d3}from"react-hook-form";import{Grid as L3,Autocomplete as a3,TextField as M3,Typography as Z3}from"@mui/material";import{toRem as E}from"@s_mart/utils";import V2 from"@emotion/styled";import{css as d2}from"@emotion/react";var L2=d2`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -13,7 +13,7 @@ var u2=Object.defineProperty,f2=Object.defineProperties;var g2=Object.getOwnProp
|
|
|
13
13
|
|
|
14
14
|
.divider {
|
|
15
15
|
width: 1px;
|
|
16
|
-
height: ${
|
|
16
|
+
height: ${E(20)};
|
|
17
17
|
background-color: ${C.palette.grey[400]};
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -24,9 +24,9 @@ var u2=Object.defineProperty,f2=Object.defineProperties;var g2=Object.getOwnProp
|
|
|
24
24
|
color: ${C.palette.grey[600]};
|
|
25
25
|
border-radius: 50%;
|
|
26
26
|
|
|
27
|
-
margin: 0 ${
|
|
28
|
-
width: ${
|
|
29
|
-
height: ${
|
|
27
|
+
margin: 0 ${E(6)};
|
|
28
|
+
width: ${E(28)};
|
|
29
|
+
height: ${E(28)};
|
|
30
30
|
|
|
31
31
|
&:hover {
|
|
32
32
|
cursor: pointer;
|
|
@@ -49,18 +49,18 @@ var u2=Object.defineProperty,f2=Object.defineProperties;var g2=Object.getOwnProp
|
|
|
49
49
|
`,M2=V2.div`
|
|
50
50
|
color: ${({theme:C})=>C.palette.text.primary};
|
|
51
51
|
|
|
52
|
-
padding: ${
|
|
53
|
-
margin: ${
|
|
52
|
+
padding: ${E(6)} ${E(16)};
|
|
53
|
+
margin: ${E(-6)} ${E(-16)};
|
|
54
54
|
|
|
55
55
|
&:hover {
|
|
56
56
|
cursor: pointer;
|
|
57
57
|
transition: background-color 0.2s ease-in-out;
|
|
58
58
|
background-color: ${({theme:C})=>C.palette.grey[100]};
|
|
59
59
|
}
|
|
60
|
-
`;import{LIcon as c3}from"@s_mart/core";import{jsx as
|
|
60
|
+
`;import{LIcon as c3}from"@s_mart/core";import{jsx as v,jsxs as _}from"react/jsx-runtime";import{createElement as Z2}from"react";var p3=d=>{var h=d,{name:C,rules:i,defaultValue:o,shouldUnregister:n,label:r,required:m,options:H,onCreateOption:l,textFieldProps:V,hideAddButton:Z}=h,a=f(h,["name","rules","defaultValue","shouldUnregister","label","required","options","onCreateOption","textFieldProps","hideAddButton"]);let c=d3();if(!c)throw new Error("Para usar o <Creatable /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let p=w(c.formState.errors,C);console.warn=()=>{};let t=L=>{l?l(L):console.error("onCreateOption n\xE3o foi definido")};return v(V3,{control:c.control,name:C,rules:i,defaultValue:o,shouldUnregister:n,render:({field:{value:L,onChange:M}})=>{let x=(L==null?void 0:L.label)||(L==null?void 0:L.value)||L;return _(L3,{display:"flex",flexDirection:"column",children:[r&&v(g,{label:r,required:m}),v(a2,{hideAddButton:Z,children:v(a3,s(e({fullWidth:!0,onChange:(F,u)=>M(u),options:H,value:L||null,noOptionsText:v(M2,{onClick:()=>t(L),children:_(Z3,{children:["Adicionar ",x&&`"${x}"`]})}),isOptionEqualToValue:(F,u)=>u?typeof F=="string"&&typeof u=="string"?F===u:typeof F=="object"&&typeof u=="object"?F.value===u.value:typeof F=="object"&&typeof u=="string":!1,renderOption:(F,u)=>typeof u=="object"?Z2("li",s(e({},F),{key:u.key||u.value}),u.label):Z2("li",s(e({},F),{key:u}),u)},a),{renderInput:F=>{let u=Z?F.InputProps:s(e({},F.InputProps),{endAdornment:_("div",{className:"endAdornments",children:[F.InputProps.endAdornment,_("div",{className:"creatable",children:[v("div",{className:"divider"}),v("div",{className:"button",onClick:()=>t(L),children:v(c3,{icon:o2,size:"24px",removeMargin:!0})})]})]})});return v(M3,e(s(e({},F),{error:Boolean(p),onChange:M,InputProps:u}),V))}}))}),v(y,{name:C})]})}})},m3=s3(p3);import{Controller as u3,useFormContext as f3}from"react-hook-form";import{Grid as g3,Checkbox as x3,FormControlLabel as y3}from"@mui/material";import{jsx as U,jsxs as P3}from"react/jsx-runtime";var h3=V=>{var Z=V,{name:C,rules:i,defaultValue:o,shouldUnregister:n,label:r,labelPlacement:m,required:H}=Z,l=f(Z,["name","rules","defaultValue","shouldUnregister","label","labelPlacement","required"]);let a=f3();if(!a)throw new Error("Para usar o <Checkbox /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");return U(u3,{control:a.control,name:C,rules:i,defaultValue:o,shouldUnregister:n,render:({field:{value:d,onChange:h}})=>P3(g3,{display:"flex",flexDirection:"column",children:[U(y3,{control:U(x3,e({value:d!=null?d:"",defaultValue:d,onChange:h},l)),label:U(g,{label:r,required:H,regular:!0}),labelPlacement:m||"end"}),U(y,{name:C})]})})},F3=h3;import{Controller as b3,useFormContext as w3}from"react-hook-form";import{Grid as k3,Switch as v3,FormControlLabel as S3}from"@mui/material";import{jsx as R,jsxs as T3}from"react/jsx-runtime";var B3=l=>{var V=l,{name:C,rules:i,defaultValue:o,shouldUnregister:n,label:r,labelPlacement:m}=V,H=f(V,["name","rules","defaultValue","shouldUnregister","label","labelPlacement"]);let Z=w3();if(!Z)throw new Error("Para usar o <Switch /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");return R(b3,{control:Z.control,name:C,rules:i,defaultValue:o,shouldUnregister:n,render:({field:{value:a,onChange:d}})=>T3(k3,{display:"flex",flexDirection:"column",children:[R(S3,{control:R(v3,e({value:a!=null?a:"",defaultValue:a,onChange:d},H)),label:R(g,{label:r}),labelPlacement:m||"end"}),R(y,{name:C})]})})},A3=B3;import{Grid as E3,Radio as D3,FormControlLabel as I3}from"@mui/material";import{jsx as N}from"react/jsx-runtime";var G3=n=>{var r=n,{label:C,labelPlacement:i}=r,o=f(r,["label","labelPlacement"]);return N(E3,{display:"flex",flexDirection:"column",children:N(I3,{control:N(D3,e({},o)),label:N(g,{label:C}),labelPlacement:i||"end"})})},$3=G3;import{Controller as q3,useFormContext as U3}from"react-hook-form";import{Grid as R3,RadioGroup as z3}from"@mui/material";import{jsx as j,jsxs as N3}from"react/jsx-runtime";var O3=Z=>{var a=Z,{name:C,rules:i,defaultValue:o,shouldUnregister:n,label:r,required:m,children:H,orientation:l="row"}=a,V=f(a,["name","rules","defaultValue","shouldUnregister","label","required","children","orientation"]);let d=U3();if(!d)throw new Error("Para usar o <RadioGroup /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");return j(q3,{control:d.control,name:C,rules:i,defaultValue:o,shouldUnregister:n,render:({field:{value:h,onChange:c}})=>N3(R3,{display:"flex",flexDirection:"column",children:[r&&j(g,{label:r,required:m}),j(z3,s(e({value:h||"",onChange:c,name:C},V),{style:{display:"flex",flexDirection:l},children:H})),j(y,{name:C})]})})},_3=O3;import{Controller as j3,useFormContext as W3}from"react-hook-form";import{Slider as Y3}from"@mui/material";import{jsx as c2}from"react/jsx-runtime";var K3=m=>{var H=m,{name:C,rules:i,defaultValue:o,shouldUnregister:n}=H,r=f(H,["name","rules","defaultValue","shouldUnregister"]);let l=W3();if(!l)throw new Error("Para usar o <Slider /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");return c2(j3,{control:l.control,name:C,rules:i,defaultValue:o,shouldUnregister:n,render:({field:{value:V,onChange:Z}})=>c2(Y3,e({value:V||(r==null?void 0:r.min)||0,onChange:Z,valueLabelDisplay:"auto"},r))})},Q3=K3;import{memo as i1}from"react";import{Controller as e1,useFormContext as o1}from"react-hook-form";import{Grid as r1}from"@s_mart/core";import{TextField as n1}from"@mui/material";import{DatePicker as l1}from"@mui/x-date-pickers/DatePicker";import{AdapterDayjs as H1}from"@mui/x-date-pickers/AdapterDayjs";import{LocalizationProvider as t1}from"@mui/x-date-pickers/LocalizationProvider";import{toRem as S}from"@s_mart/utils";import J3 from"@emotion/styled";var X3=C=>{switch(C){case"small":return S(16);default:case"medium":return S(20);case"large":return S(24)}},C1=C=>{switch(C){case"small":return`${S(2)} ${S(8)}`;default:case"medium":return`${S(6)} ${S(8)}`;case"large":return`${S(10)}`}},p2=J3.div`
|
|
61
61
|
> div > button {
|
|
62
62
|
padding: ${({size:C})=>C1(C)};
|
|
63
|
-
border-radius: 0 ${
|
|
63
|
+
border-radius: 0 ${S(4)} ${S(4)} 0;
|
|
64
64
|
|
|
65
65
|
margin: 0px -13px 0px 0px;
|
|
66
66
|
|
|
@@ -68,10 +68,10 @@ var u2=Object.defineProperty,f2=Object.defineProperties;var g2=Object.getOwnProp
|
|
|
68
68
|
width: ${({size:C})=>X3(C)};
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
`;import{jsx as
|
|
71
|
+
`;import{jsx as D,jsxs as d1}from"react/jsx-runtime";var s1=Z=>{var a=Z,{rules:C,name:i,defaultValue:o,shouldUnregister:n,datePickerProps:r,label:m,required:H,placeholder:l}=a,V=f(a,["rules","name","defaultValue","shouldUnregister","datePickerProps","label","required","placeholder"]);let d=o1();if(!d)throw new Error("Para usar o <DataPicker /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let h=w(d.formState.errors,i);return D(t1,{dateAdapter:H1,children:D(e1,{control:d.control,name:i,rules:C,defaultValue:o,shouldUnregister:n,render:({field:{value:c,onChange:p}})=>d1(r1,{display:"flex",flexDirection:"column",children:[m&&D(g,{label:m,required:H}),D(l1,s(e({},r),{value:c!=null?c:null,inputFormat:(r==null?void 0:r.inputFormat)||"DD/MM/YYYY",onChange:p,renderInput:t=>{var L,M;return D(n1,s(e(s(e({variant:"outlined"},t),{error:Boolean(h)}),V),{inputProps:s(e({},t.inputProps),{placeholder:l||((L=t.inputProps)==null?void 0:L.placeholder)}),InputProps:s(e({},t.InputProps),{endAdornment:D(p2,{size:V.size,children:(M=t.InputProps)==null?void 0:M.endAdornment})})}))}})),D(y,{name:i})]})})})},V1=i1(s1);import{Grid as Z1}from"@s_mart/core";import{TimePicker as c1}from"@mui/x-date-pickers/TimePicker";import{TextField as p1}from"@mui/material";import{Controller as m1,useFormContext as u1}from"react-hook-form";import{AdapterDayjs as f1}from"@mui/x-date-pickers/AdapterDayjs";import{LocalizationProvider as g1}from"@mui/x-date-pickers/LocalizationProvider";import{toRem as B}from"@s_mart/utils";import L1 from"@emotion/styled";var a1=C=>{switch(C){case"small":return B(16);default:case"medium":return B(20);case"large":return B(24)}},M1=C=>{switch(C){case"small":return`${B(2)} ${B(8)}`;default:case"medium":return`${B(6)} ${B(8)}`;case"large":return`${B(10)}`}},m2=L1.div`
|
|
72
72
|
> div > button {
|
|
73
73
|
padding: ${({size:C})=>M1(C)};
|
|
74
|
-
border-radius: 0 ${
|
|
74
|
+
border-radius: 0 ${B(4)} ${B(4)} 0;
|
|
75
75
|
|
|
76
76
|
margin: 0px -13px 0px 0px;
|
|
77
77
|
|
|
@@ -79,4 +79,4 @@ var u2=Object.defineProperty,f2=Object.defineProperties;var g2=Object.getOwnProp
|
|
|
79
79
|
width: ${({size:C})=>a1(C)};
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
`;import{memo as x1}from"react";import{jsx as
|
|
82
|
+
`;import{memo as x1}from"react";import{jsx as I,jsxs as F1}from"react/jsx-runtime";var y1=Z=>{var a=Z,{rules:C,defaultValue:i,shouldUnregister:o,name:n,required:r,label:m,timePickerProps:H,placeholder:l}=a,V=f(a,["rules","defaultValue","shouldUnregister","name","required","label","timePickerProps","placeholder"]);let d=u1();if(!d)throw new Error("Para usar o <TimePicker /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let h=w(d.formState.errors,n);return I(g1,{dateAdapter:f1,children:I(m1,{control:d.control,name:n,rules:C,defaultValue:i,shouldUnregister:o,render:({field:{value:c,onChange:p}})=>F1(Z1,{display:"flex",flexDirection:"column",children:[m&&I(g,{label:m,required:r}),I(c1,s(e({value:c!=null?c:null,onChange:p},H),{renderInput:t=>{var L,M;return I(p1,s(e(s(e({variant:"outlined"},t),{error:Boolean(h)}),V),{inputProps:s(e({},t.inputProps),{placeholder:l||((L=t.inputProps)==null?void 0:L.placeholder)}),InputProps:s(e({},t.InputProps),{endAdornment:I(m2,{size:V.size,children:(M=t.InputProps)==null?void 0:M.endAdornment})})}))}})),I(y,{name:n})]})})})},h1=x1(y1);import{memo as P1}from"react";import{Controller as b1,useFormContext as w1}from"react-hook-form";import{Autocomplete as k1,TextField as v1}from"@mui/material";import{Grid as S1}from"@s_mart/core";import{jsx as z,jsxs as E1}from"react/jsx-runtime";import{createElement as T1}from"react";var B1=Z=>{var a=Z,{name:C,defaultValue:i,rules:o,shouldUnregister:n,label:r,required:m,onInputChange:H,onChange:l}=a,V=f(a,["name","defaultValue","rules","shouldUnregister","label","required","onInputChange","onChange"]);let d=w1();if(!d)throw new Error("Para usar o <Autocomplete /> \xE9 necess\xE1rio que ele esteja dentro de um <Form />");let h=w(d.formState.errors,C);return console.warn=()=>{},z(b1,{name:C,control:d.control,defaultValue:i,rules:o,shouldUnregister:n,render:({field:c})=>E1(S1,{display:"flex",flexDirection:"column",children:[r&&z(g,{label:r,required:m}),z(k1,s(e({onChange:(p,t)=>{c.onChange(t),l==null||l(p,t,d.watch())},onInputChange:(p,t,L)=>{c.onChange(t),setTimeout(()=>{H==null||H(p,d.watch(C),L,d.watch())},0)},isOptionEqualToValue:(p,t)=>p.value===t.value,renderOption:(p,t)=>T1("li",s(e({},p),{key:t.key||t.value,onClick:L=>{var M;(M=p.onClick)==null||M.call(p,L),c.onChange(t)}}),t.label),value:c.value||null},V),{renderInput:p=>{var t,L,M;return z(v1,s(e(e({},p),V.textFieldProps),{error:Boolean(h),InputProps:s(e(e({},p.InputProps),(t=V.textFieldProps)==null?void 0:t.InputProps),{inputProps:e(e({},p.inputProps),(M=(L=V.textFieldProps)==null?void 0:L.InputProps)==null?void 0:M.inputProps)})}))}})),z(y,{name:C})]})})},A1=P1(B1);export{A1 as Autocomplete,F3 as Checkbox,m3 as Creatable,V1 as DatePicker,P2 as Form,$3 as RadioButton,_3 as RadioGroup,l3 as Searchable,Q2 as Select,Q3 as Slider,A3 as Switch,U2 as TextField,h1 as TimePicker};
|