@zydon/common 2.2.16 → 2.2.17
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/chunk-JAIK5CGA.js +7 -0
- package/dist/chunk-QFRMUWE6.js +7 -0
- package/dist/chunk-SEVJABAI.js +7 -0
- package/dist/components/form/Address/index.js +3 -3
- package/dist/components/form/Autocomplete/index.js +1 -1
- package/dist/components/form/AutocompleteDetailed/index.js +2 -2
- package/dist/components/form/Checkbox/index.js +4 -4
- package/dist/components/form/ColorPicker/index.js +2 -2
- package/dist/components/form/DatePicker/index.js +1 -1
- package/dist/components/form/DateRangePicker/index.js +1 -1
- package/dist/components/form/DateTimePicker/index.js +1 -1
- package/dist/components/form/Field/index.js +1 -1
- package/dist/components/form/Incrementer/index.js +1 -1
- package/dist/components/form/InputTags/index.js +1 -1
- package/dist/components/form/MaskedInput/index.js +1 -1
- package/dist/components/form/MultiCheckbox/index.js +1 -1
- package/dist/components/form/MultiChipField/index.js +2 -2
- package/dist/components/form/NumberInput/index.js +2 -2
- package/dist/components/form/Password/index.js +2 -2
- package/dist/components/form/RadioGroup/index.js +1 -1
- package/dist/components/form/Switch/index.js +1 -1
- package/dist/components/form/TimePicker/index.js +2 -2
- package/dist/components/form/UploadAvatarWithCrop/index.js +1 -1
- package/dist/components/form/UploadWithCrop/index.js +1 -1
- package/dist/components/form/Webhook/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-NPVLELCM.js +0 -7
- package/dist/chunk-P46BBUKR.js +0 -7
- package/dist/chunk-U7BKKRLD.js +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
|
+
import F from '@mui/material/TextField';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var c=({name:o,helperText:p,rules:d,onChange:t,tabIndex:s,...e})=>{let{control:f}=useFormContext();return jsx(Controller,{name:o,control:f,rules:d,render:({field:{ref:m,...r},fieldState:{error:l}})=>jsx(F,{...r,onChange:i=>{r.onChange(i),t&&t(i);},inputRef:m,fullWidth:!0,error:!!l,helperText:l?.message||p,"data-intercom-target":o,...e,inputProps:{...e.inputProps,tabIndex:s}})})},x=c;
|
|
6
|
+
|
|
7
|
+
export { x as a };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { a } from './chunk-P3E7LDV7.js';
|
|
2
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var C=({name:t,helperText:l,rules:s,onSelectOption:e,...a$1})=>{let{control:u}=useFormContext();return jsx(Controller,{name:t,control:u,rules:s,render:({field:o,fieldState:{error:r}})=>jsx(a,{"data-intercom-target":t,...o,...a$1,onChange:n=>{e&&e(n,o.value),o.onChange(n);},error:!!r,helperText:r?.message||l})})},h=C;
|
|
6
|
+
|
|
7
|
+
export { h as a };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { a } from './chunk-QNAXGE5H.js';
|
|
2
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var C=({name:e,helperText:p,rules:m,onChange:r,error:s,...l})=>{let{control:d}=useFormContext();return jsx(Controller,{name:e,control:d,rules:m,render:({field:{name:u,onChange:f,value:i,ref:c},fieldState:{error:t}})=>jsx(a,{ref:c,"data-intercom-target":e,...l,name:u,value:i,error:s||!!t,helperText:t?.message||p,onChange:({target:{value:o}})=>{r&&r(o),f(o);}})})},h=C;
|
|
6
|
+
|
|
7
|
+
export { h as a };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as a$2 } from '../../../chunk-
|
|
2
|
-
import { a as a$1 } from '../../../chunk-
|
|
3
|
-
import { a as a$3 } from '../../../chunk-
|
|
1
|
+
import { a as a$2 } from '../../../chunk-JAIK5CGA.js';
|
|
2
|
+
import { a as a$1 } from '../../../chunk-SEVJABAI.js';
|
|
3
|
+
import { a as a$3 } from '../../../chunk-QFRMUWE6.js';
|
|
4
4
|
import '../../../chunk-QNAXGE5H.js';
|
|
5
5
|
import '../../../chunk-P3E7LDV7.js';
|
|
6
6
|
import '../../../chunk-A3HKJM7C.js';
|
|
@@ -4,6 +4,6 @@ import '../../../chunk-ILHUUK4X.js';
|
|
|
4
4
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
var d=({name:
|
|
7
|
+
var d=({name:t,rules:a$1,helperText:p,onSelectOption:o,...s})=>{let{control:u}=useFormContext();return jsx(Controller,{name:t,control:u,rules:a$1,render:({field:e,fieldState:{error:r}})=>jsx(a,{"data-intercom-target":t,...e,...s,onChange:n=>{o&&o(n,e.value),e.onChange(n);},error:!!r,helperText:r?.message||p})})},f=d;
|
|
8
8
|
|
|
9
|
-
export {
|
|
9
|
+
export { f as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import d from '@mui/material/Checkbox';
|
|
3
|
+
import s from '@mui/material/FormControlLabel';
|
|
4
|
+
import x from '@mui/material/FormHelperText';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var C=({name:t,rules:c,helperText:e,tabIndex:l,...n})=>{let{control:p}=useFormContext();return jsx(Controller,{name:t,control:p,rules:c,render:({field:m,fieldState:{error:o}})=>jsxs("div",{children:[jsx(s,{control:jsx(d,{...m,checked:m.value,tabIndex:l}),"data-intercom-target":t,...n}),(!!o||e)&&jsx(x,{error:!!o,children:o?o?.message:e})]})})},F=C;
|
|
8
8
|
|
|
9
9
|
export { F as default };
|
|
@@ -3,6 +3,6 @@ import '../../../chunk-ORYAES3Q.js';
|
|
|
3
3
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var u=({name:
|
|
6
|
+
var u=({name:o,rules:t,helperText:c,...f})=>{let{control:d}=useFormContext();return jsx(Controller,{name:o,control:d,rules:{...t,validate:{...t?.validate,validation:e=>{let r="#"+e.replaceAll("#","");return /^#([0-9A-Fa-f]{3}){1,2}$/.test(r)?!0:"Cor inv\xE1lida"}}},render:({field:{ref:e,onChange:r,...l},fieldState:{error:i}})=>jsx(a,{...l,onChangeColor:r,inputRef:e,fullWidth:!0,error:!!i,helperText:i?.message||c,"data-intercom-target":o,...f})})},g=u;
|
|
7
7
|
|
|
8
|
-
export {
|
|
8
|
+
export { g as default };
|
|
@@ -3,6 +3,6 @@ import { DatePicker } from '@mui/x-date-pickers-pro';
|
|
|
3
3
|
import C from 'dayjs';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var d=({name:
|
|
6
|
+
var d=({name:o,rules:i,tabIndex:r,helperText:p,required:u,...e})=>{let{control:c}=useFormContext();return jsx(Controller,{name:o,control:c,rules:i,render:({field:{ref:m,onChange:f,...t},fieldState:{error:l}})=>jsx(DatePicker,{inputRef:m,format:"DD/MM/YYYY",...t,"data-intercom-target":o,...e,value:t.value?C(t.value):null,onChange:a=>{let n=a?a.toDate():null;f(n),e.onChange&&e.onChange(n);},slotProps:{textField:{...e.slotProps?.textField,required:u,error:!!l,helperText:l?.message||p,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:r}},openPickerButton:{tabIndex:r}}})})},x=d;
|
|
7
7
|
|
|
8
8
|
export { x as default };
|
|
@@ -5,6 +5,6 @@ import { DateRangePicker } from '@mui/x-date-pickers-pro';
|
|
|
5
5
|
import m from 'dayjs';
|
|
6
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
|
-
var F=({name:
|
|
8
|
+
var F=({name:a,label:s,rules:p,tabIndex:D,helperText:l,required:d,...e})=>{let{control:f,setError:c}=useFormContext();return jsx(Controller,{name:a,control:f,rules:p,render:({field:{value:o,onChange:u},fieldState:{error:r}})=>jsxs(x,{children:[jsx(DateRangePicker,{"data-intercom-target":a,...e,format:"DD/MM/YYYY",value:[o?.startDate?m(o.startDate):null,o?.endDate?m(o.endDate):null],onChange:t=>{let i={startDate:t[0]?t[0].toDate():null,endDate:t[1]?t[1].toDate():null};u(i),e.onChange&&e.onChange(i);},onError:t=>{c(a,{message:t[0]||t[1]||void 0});},slotProps:{textField:({position:t})=>({...e.slotProps?.textField,required:d,error:!!r,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:t==="start"?`${s} (Dt. In\xEDcio)`:`${s} (Dt. Fim)`,inputProps:{tabIndex:D}})},sx:{width:1}}),(r?.message||l)&&jsx(k,{error:!!r,sx:{mx:"14px"},children:r?.message||l})]})})},$=F;
|
|
9
9
|
|
|
10
10
|
export { $ as default };
|
|
@@ -3,6 +3,6 @@ import { DateTimePicker } from '@mui/x-date-pickers-pro';
|
|
|
3
3
|
import C from 'dayjs';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var d=({name:o,rules:m,tabIndex:r,helperText:s,required:p,...e})=>{let{control:u}=useFormContext();return jsx(Controller,{name:o,control:u,rules:m,render:({field:{ref:c,onChange:f,...t},fieldState:{error:l}})=>jsx(DateTimePicker,{format:"DD/MM/YYYY HH:mm",inputRef:c,...t,"data-intercom-target":o,...e,value:t.value?C(t.value):null,onChange:a=>{let i=a?a.toDate():null;f(i),e.onChange&&e.onChange(i);},slotProps:{textField:{...e.slotProps?.textField,required:p,error:!!l,helperText:l?.message||s,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:r}},openPickerButton:{tabIndex:r}}})})},h=d;
|
|
7
7
|
|
|
8
8
|
export { h as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as default } from '../../../chunk-
|
|
1
|
+
export { a as default } from '../../../chunk-JAIK5CGA.js';
|
|
@@ -6,6 +6,6 @@ import '../../../chunk-HR73D35E.js';
|
|
|
6
6
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
|
-
var d=({name:e,helperText:n,rules:m,...l})=>{let{control:p}=useFormContext();return jsx(Controller,{name:e,control:p,rules:m,render:({field:{ref:
|
|
9
|
+
var d=({name:e,helperText:n,rules:m,...l})=>{let{control:p}=useFormContext();return jsx(Controller,{name:e,control:p,rules:m,render:({field:{ref:c,value:f,...i},fieldState:{error:r}})=>jsx(a,{value:f,inputRef:c,fullWidth:!0,error:!!r,helperText:r?.message||n,"data-intercom-target":e,...l,...i,name:e})})},C=d;
|
|
10
10
|
|
|
11
11
|
export { C as default };
|
|
@@ -4,6 +4,6 @@ import I from '@mui/material/Chip';
|
|
|
4
4
|
import h from '@mui/material/TextField';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
var C=({name:
|
|
7
|
+
var C=({name:o,helperText:u,rules:a,label:p,required:m})=>{let{control:i}=useFormContext();return jsx(Controller,{name:o,control:i,rules:a,render:({field:{ref:s,value:c,onChange:d},fieldState:{error:l}})=>jsx(b,{multiple:!0,options:[],freeSolo:!0,value:c,onChange:(e,r)=>d(r),renderTags:(e,r)=>e.map((f,n)=>jsx(I,{variant:"soft",color:"primary",label:f,...r({index:n})},n)),renderInput:e=>jsx(h,{...e,inputRef:s,label:p,placeholder:"| Digite e tecle enter",error:!!l,helperText:l?.message||u,required:m}),"data-intercom-target":o})})},V=C;
|
|
8
8
|
|
|
9
9
|
export { V as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as default } from '../../../chunk-
|
|
1
|
+
export { a as default } from '../../../chunk-SEVJABAI.js';
|
|
2
2
|
import '../../../chunk-QNAXGE5H.js';
|
|
@@ -7,6 +7,6 @@ import k from '@mui/material/FormHelperText';
|
|
|
7
7
|
import M from '@mui/material/FormLabel';
|
|
8
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
|
-
var L=({row:m,name:
|
|
10
|
+
var L=({row:m,name:n,rules:c,label:i,options:u,spacing:a,helperText:p,required:d,...f})=>{let{control:s}=useFormContext(),b=(o,l)=>o.includes(l)?o.filter(r=>r!==l):[...o,l];return jsx(Controller,{name:n,control:s,rules:c,render:({field:{value:o=[],...l},fieldState:{error:r}})=>jsxs(g,{component:"fieldset",children:[i&&jsx(M,{component:"legend",sx:{typography:"body2"},required:d,children:i}),jsx(h,{sx:{...m&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:a||0},...m&&{mr:0,"&:not(:last-of-type)":{mr:a||2}}}},children:u.map(e=>jsx(y,{control:jsx(x,{checked:o.includes(e.value),onChange:()=>l.onChange(b(o,e.value))}),label:e.label,"data-intercom-target":n,...f},e.value))}),(!!r||p)&&jsx(k,{error:!!r,sx:e=>({color:f.disabled?e.palette.grey[500]:void 0}),children:r?r?.message:p})]})})},w=L;
|
|
11
11
|
|
|
12
12
|
export { w as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
|
-
import
|
|
2
|
+
import h from '@mui/material/Autocomplete';
|
|
3
3
|
import c from '@mui/material/TextField';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var d=({name:
|
|
6
|
+
var d=({name:e,label:n="",rules:m,helperText:s,changed:r,...u})=>{let{control:C}=useFormContext();return jsx(Controller,{name:e,control:C,rules:m,render:({field:l,fieldState:{error:t}})=>jsx(h,{...l,onChange:(p,i)=>{r&&r(i),l.onChange(i);},renderInput:p=>jsx(c,{label:n,error:!!t,helperText:t?t?.message:s,...p}),"data-intercom-target":e,...u})})},F=d;
|
|
7
7
|
|
|
8
8
|
export { F as default };
|
|
@@ -2,6 +2,6 @@ import { a } from '../../../chunk-PV522B4W.js';
|
|
|
2
2
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var b=({name:r,helperText:u,rules:l,onChange:t,...s})=>{let{control:a$1}=useFormContext();return jsx(Controller,{name:r,control:a$1,rules:l,render:({field:o,fieldState:{error:e}})=>jsx(a,{...o,onChange:n=>{o.onChange(n),t&&t(n);},fullWidth:!0,error:!!e,helperText:e?.message||u,"data-intercom-target":r,...s})})},C=b;
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { C as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
1
|
+
import { a } from '../../../chunk-JAIK5CGA.js';
|
|
2
2
|
import { d } from '../../../chunk-CQDKXUUX.js';
|
|
3
3
|
import { a as a$1 } from '../../../chunk-A3HKJM7C.js';
|
|
4
4
|
import '../../../chunk-HR73D35E.js';
|
|
@@ -8,6 +8,6 @@ import S from '@mui/material/IconButton';
|
|
|
8
8
|
import b from '@mui/material/InputAdornment';
|
|
9
9
|
import { jsx } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
|
-
var N=({name:
|
|
11
|
+
var N=({name:s,sx:w,rules:n,passwordSize:i,specialCharacter:d$1,upperCaseChar:p,numberChar:l,showErrorMessage:c,match:t,...P})=>{let{watch:m}=useFormContext(),I=m(s),[a$2,g]=useState(!1),{hasNumberChar:v,hasSpecialCharacter:C,hasUpperCaseChar:V,isLengthValid:x}=d(I,i,l,d$1,p);return jsx(a,{"data-intercom-target":s,...P,name:s,type:a$2?"text":"password",InputProps:{endAdornment:jsx(b,{position:"end",children:jsx(S,{onClick:()=>g(!a$2),edge:"end","aria-label":"Mostrar/Ocultar senha",tabIndex:-1,children:jsx(a$1,{icon:a$2?"VIEW_ON":"VIEW_OFF"})})})},rules:{...n,validate:{...n?.validate,validationPassword:u=>{let o=d(u,i,l,d$1,p);return !o.hasNumberChar||!o.hasSpecialCharacter||!o.hasUpperCaseChar||!o.isLengthValid?"Senha inv\xE1lida":t&&t.fieldPassword&&m(t.fieldPassword)!==u?"As senhas devem ser iguais":!0}}},sx:{...w,"& .MuiFormHelperText-root":{display:(!C||!V||!x||!v)&&!c?"none":void 0}}})},_=N;
|
|
12
12
|
|
|
13
13
|
export { _ as default };
|
|
@@ -8,6 +8,6 @@ import $ from '@mui/material/RadioGroup';
|
|
|
8
8
|
import { alpha } from '@mui/material/styles';
|
|
9
9
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
|
-
var H=({name:
|
|
11
|
+
var H=({name:l,rules:b,row:i,label:e,options:y,spacing:d,helperText:p,decorated:n,onChange:u,tabIndex:g,required:C,disabled:s,...F})=>{let{control:R}=useFormContext(),c=e?`${l}-${e}`:"";return jsx(Controller,{name:l,control:R,rules:b,render:({field:a,fieldState:{error:m}})=>jsxs(h,{component:"fieldset",sx:{...n&&{paddingLeft:1.5}},"data-intercom-target":l,children:[e&&jsx(L,{component:"legend",id:c,sx:{typography:"body2"},required:C,children:e}),jsx($,{...F,...a,onChange:(o,t)=>{a.onChange(o),u&&u(o,t);},"aria-labelledby":c,row:i,children:y.map(o=>jsx(G,{value:o.value,control:jsx(P,{inputProps:{tabIndex:g},disabled:s,checked:o.value===a.value,icon:o.icon,checkedIcon:o.icon}),label:o.label,sx:({palette:t})=>({"&:not(:last-of-type)":{mb:d||0},...i&&{mr:0,"&:not(:last-of-type)":{mr:d||2}},...n&&{border:`1px solid ${alpha(t.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(d||0)/2||1,...a.value===o.value&&{borderColor:"primary.main",backgroundColor:alpha(t.primary.main,.05)}}})},o.value))}),(!!m||p)&&jsx(k,{error:!!m,sx:o=>({color:s?o.palette.grey[500]:void 0}),children:m?m?.message:p})]})})},D=H;
|
|
12
12
|
|
|
13
13
|
export { D as default };
|
|
@@ -4,6 +4,6 @@ import F from '@mui/material/FormHelperText';
|
|
|
4
4
|
import S from '@mui/material/Switch';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var g=({name:n,helperText:i,onChange:l,tabIndex:c,size:d,label:s,sx:a,...m})=>{let{control:u}=useFormContext(),p=r=>jsx(S,{...r,checked:r.value,onChange:(o,e)=>{r.onChange(o),l&&l(o,e);},inputProps:{tabIndex:c},size:d,sx:a});return jsx(Controller,{name:n,control:u,render:({field:r,fieldState:{error:o}})=>jsxs("div",{children:[s?jsx(C,{label:s,control:p(r),"data-intercom-target":n,...m}):p(r),(!!o||i)&&jsx(F,{error:!!o,sx:e=>({mx:"14px",color:m.disabled?e.palette.grey[500]:void 0}),children:o?o?.message:i})]})})},V=g;
|
|
8
8
|
|
|
9
9
|
export { V as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
2
|
import { TimePicker } from '@mui/x-date-pickers-pro';
|
|
3
|
-
import
|
|
3
|
+
import d from 'dayjs';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var T=({name:t,rules:a,tabIndex:r,helperText:s,required:p,...e})=>{let{control:u}=useFormContext();return jsx(Controller,{name:t,control:u,rules:a,render:({field:{ref:c,onChange:f,...o},fieldState:{error:l}})=>jsx(TimePicker,{ampm:!1,format:"HH:mm",inputRef:c,...o,"data-intercom-target":t,...e,value:o.value?d(o.value):null,onChange:i=>{let m=i?i.toDate():null;f(m),e.onChange&&e.onChange(m);},slotProps:{textField:{...e.slotProps?.textField,error:!!l,required:p,helperText:l?.message||s,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:r}},openPickerButton:{tabIndex:r}}})})},F=T;
|
|
7
7
|
|
|
8
8
|
export { F as default };
|
|
@@ -15,6 +15,6 @@ import { useFormContext, Controller } from 'react-hook-form';
|
|
|
15
15
|
import W from '@mui/material/FormHelperText';
|
|
16
16
|
import { jsx } from 'react/jsx-runtime';
|
|
17
17
|
|
|
18
|
-
var v=({name:
|
|
18
|
+
var v=({name:e,rules:m,helperText:r,aspect:n,label:f,image:s,onFileCropped:a$1,onImageUploaded:u,onCancel:l,...c})=>{let{control:C}=useFormContext(),{uploadFile:U,file:g,setFileValue:x}=a(e);return jsx(Controller,{name:e,control:C,rules:m,render:({field:{value:F},fieldState:{error:o}})=>jsx(b,{accept:{"image/*":[]},file:F?g:void 0,onFileCropped:p=>{U(p),a$1&&a$1(p);},onImageUploaded:u,onCancel:()=>{x(void 0),l&&l();},error:!!o,disableMultiple:!0,helperText:(!!o||r)&&jsx(W,{error:!!o,sx:{px:2},children:o?o?.message:r}),aspect:n,label:f,image:s,"data-intercom-target":e,...c})})},I=v;
|
|
19
19
|
|
|
20
20
|
export { I as default };
|
|
@@ -18,6 +18,6 @@ import { useFormContext, Controller } from 'react-hook-form';
|
|
|
18
18
|
import b from '@mui/material/FormHelperText';
|
|
19
19
|
import { jsx } from 'react/jsx-runtime';
|
|
20
20
|
|
|
21
|
-
var H=({name:
|
|
21
|
+
var H=({name:e$1,rules:m,helperText:l,aspect:n,label:f,image:s,onFileCropped:p,onImageUploaded:u,onCancel:r,...c})=>{let{control:C}=useFormContext(),{uploadFile:U,file:g,setFileValue:x}=a(e$1);return jsx(Controller,{name:e$1,control:C,rules:m,render:({field:{value:F},fieldState:{error:o}})=>jsx(e,{accept:{"image/*":[]},file:F?g:void 0,onFileCropped:i=>{U(i),p&&p(i);},onImageUploaded:u,onCancel:()=>{x(void 0),r&&r();},error:!!o,disableMultiple:!0,helperText:(!!o||l)&&jsx(b,{error:!!o,sx:{px:2},children:o?o?.message:l}),aspect:n,label:f,image:s,"data-intercom-target":e$1,...c})})},S=H;
|
|
22
22
|
|
|
23
23
|
export { S as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
2
|
-
import { a as a$2 } from '../../../chunk-
|
|
1
|
+
import { a } from '../../../chunk-JAIK5CGA.js';
|
|
2
|
+
import { a as a$2 } from '../../../chunk-QFRMUWE6.js';
|
|
3
3
|
import { a as a$3 } from '../../../chunk-CAZ3WGTV.js';
|
|
4
4
|
import '../../../chunk-P3E7LDV7.js';
|
|
5
5
|
import { a as a$1 } from '../../../chunk-A3HKJM7C.js';
|
package/package.json
CHANGED
package/dist/chunk-NPVLELCM.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-P3E7LDV7.js';
|
|
2
|
-
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var f=({name:p,helperText:l,rules:s,onSelectOption:e,...u})=>{let{control:a$1}=useFormContext();return jsx(Controller,{name:p,control:a$1,rules:s,render:({field:o,fieldState:{error:t}})=>jsx(a,{...o,...u,onChange:r=>{e&&e(r,o.value),o.onChange(r);},error:!!t,helperText:t?.message||l})})},h=f;
|
|
6
|
-
|
|
7
|
-
export { h as a };
|
package/dist/chunk-P46BBUKR.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
|
-
import a from '@mui/material/TextField';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var P=({name:i,helperText:p,rules:s,onChange:o,tabIndex:d,...e})=>{let{control:f}=useFormContext();return jsx(Controller,{name:i,control:f,rules:s,render:({field:{ref:m,...r},fieldState:{error:t}})=>jsx(a,{...r,onChange:l=>{r.onChange(l),o&&o(l);},inputRef:m,fullWidth:!0,error:!!t,helperText:t?.message||p,...e,inputProps:{...e.inputProps,tabIndex:d}})})},C=P;
|
|
6
|
-
|
|
7
|
-
export { C as a };
|
package/dist/chunk-U7BKKRLD.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-QNAXGE5H.js';
|
|
2
|
-
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var M=({name:a$1,helperText:p,rules:m,onChange:e,error:s,...l})=>{let{control:d}=useFormContext();return jsx(Controller,{name:a$1,control:d,rules:m,render:({field:{name:u,onChange:f,value:i,ref:k},fieldState:{error:o}})=>jsx(a,{ref:k,...l,name:u,value:i,error:s||!!o,helperText:o?.message||p,onChange:({target:{value:r}})=>{e&&e(r),f(r);}})})},h=M;
|
|
6
|
-
|
|
7
|
-
export { h as a };
|