@s_mart/form 10.0.0-beta.15 → 10.0.0-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +11 -11
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -34,7 +34,7 @@ type CheckboxProps = CheckboxProps$1 & UseControllerProps & {
|
|
|
34
34
|
disableIconError?: boolean;
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
declare const _default$
|
|
37
|
+
declare const _default$6: ({ name, rules, defaultValue, shouldUnregister, control: controlFromProps, label, labelPlacement, required, disableIconError, onChange: onChangeProp, ...rest }: CheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
38
38
|
|
|
39
39
|
type CreatableV2Props<FieldValue, Multiple extends boolean | undefined = undefined, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined> = WithRequired<Omit<AutocompleteProps<FieldValue, Multiple, DisableClearable, FreeSolo>, 'renderInput' | 'options' | 'size' | 'onInputChange' | 'onChange' | 'defaultValue' | 'value'>, 'getOptionKey' | 'getOptionLabel'> & UseControllerProps & {
|
|
40
40
|
options: FieldValue[];
|
|
@@ -98,7 +98,7 @@ type CreatableV2Props<FieldValue, Multiple extends boolean | undefined = undefin
|
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
declare function CreatableV2<FieldValue, Multiple extends boolean | undefined = undefined, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined>(props: CreatableV2Props<FieldValue, Multiple, DisableClearable, FreeSolo>): react_jsx_runtime.JSX.Element;
|
|
101
|
-
declare const _default$
|
|
101
|
+
declare const _default$5: typeof CreatableV2;
|
|
102
102
|
|
|
103
103
|
type DatePickerProps = UseControllerProps & Pick<TextFieldProps$1, 'label' | 'error' | 'helperText' | 'size' | 'fullWidth' | 'variant' | 'autoFocus' | 'placeholder'> & {
|
|
104
104
|
datePickerProps?: Partial<DatePickerProps$1<any>>;
|
|
@@ -124,7 +124,7 @@ type DatePickerProps = UseControllerProps & Pick<TextFieldProps$1, 'label' | 'er
|
|
|
124
124
|
disableIconError?: boolean;
|
|
125
125
|
};
|
|
126
126
|
|
|
127
|
-
declare const _default$
|
|
127
|
+
declare const _default$4: ({ rules, name, defaultValue, shouldUnregister, control: controlFromProps, datePickerProps, label, required, placeholder, disabled, disableIconError, ...rest }: DatePickerProps) => react_jsx_runtime.JSX.Element;
|
|
128
128
|
|
|
129
129
|
type FieldLabelProps = {
|
|
130
130
|
label: React.ReactNode;
|
|
@@ -315,7 +315,7 @@ type SearchableV2Props<FieldValue, Multiple extends boolean | undefined = undefi
|
|
|
315
315
|
getOptionAfterLabel?: (option: FieldValue | AutocompleteFreeSoloValueMapping<FreeSolo>) => string | React.ReactNode;
|
|
316
316
|
};
|
|
317
317
|
|
|
318
|
-
declare const _default$
|
|
318
|
+
declare const _default$3: <FieldValue, Multiple extends boolean | undefined = undefined, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined>(props: SearchableV2Props<FieldValue, Multiple, DisableClearable, FreeSolo>) => react_jsx_runtime.JSX.Element;
|
|
319
319
|
|
|
320
320
|
type FooterPropsV2 = {
|
|
321
321
|
closeSelect: () => void;
|
|
@@ -376,7 +376,7 @@ type SelectV2ReturnValueProps<TFieldValues extends FieldValues = FieldValues, TF
|
|
|
376
376
|
getOptionLabel: (option: FieldPathValue<TFieldValues, TFieldName>) => string;
|
|
377
377
|
};
|
|
378
378
|
|
|
379
|
-
declare const _default$
|
|
379
|
+
declare const _default$2: <FieldValue extends string | number | FieldValues>(props: SelectV2Props<FieldValue>) => react_jsx_runtime.JSX.Element;
|
|
380
380
|
|
|
381
381
|
type SliderProps = SliderProps$1 & UseControllerProps & {
|
|
382
382
|
/**
|
|
@@ -426,7 +426,7 @@ type SwitchProps = SwitchProps$1 & UseControllerProps & {
|
|
|
426
426
|
disableIconError?: boolean;
|
|
427
427
|
};
|
|
428
428
|
|
|
429
|
-
declare const
|
|
429
|
+
declare const Switch: ({ name, rules, defaultValue, shouldUnregister, control: controlFromProps, label, labelPlacement, disableIconError, onChange: onChangeProp, disabled, ...rest }: SwitchProps) => react_jsx_runtime.JSX.Element;
|
|
430
430
|
|
|
431
431
|
type Masks = 'cpf' | 'cnpj' | 'cpfCnpj' | 'cep' | 'telefone' | 'decimal' | 'decimal3' | 'decimal4' | 'decimal5' | 'porcentagem' | 'porcentagem0' | 'nome' | 'numero' | 'numeroPontuacao' | 'placa' | 'valor' | 'valor3' | 'valor4';
|
|
432
432
|
type TextFieldProps = TextFieldProps$1 & UseControllerProps & {
|
|
@@ -498,4 +498,4 @@ type TimePickerProps = UseControllerProps & Pick<TextFieldProps$1, 'label' | 'er
|
|
|
498
498
|
|
|
499
499
|
declare const _default: ({ rules, defaultValue, shouldUnregister, name, control: controlFromProps, required, label, timePickerProps, placeholder, disabled, disableIconError, ...rest }: TimePickerProps) => react_jsx_runtime.JSX.Element;
|
|
500
500
|
|
|
501
|
-
export { _default$
|
|
501
|
+
export { _default$6 as Checkbox, type CheckboxProps, _default$5 as CreatableV2, type CreatableV2Props, _default$4 as DatePicker, type DatePickerProps, FieldError, type FieldErrorProps, FieldInfo, type FieldInfoProps, FieldLabel, type FieldLabelProps, type FooterPropsV2, Form, FormProvider, type IFormProps, type IFormProviderProps, type IUseFormProps, type Masks, RadioButton, RadioGroup, type RadioGroupProps, type RadioProps, _default$3 as SearchableV2, type SearchableV2Props, _default$2 as SelectV2, type SelectV2Props, type SelectV2ReturnValueProps, Slider, type SliderProps, Switch, type SwitchProps, _default$1 as TextField, type TextFieldProps, _default as TimePicker, type TimePickerProps, useForm };
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{useController as
|
|
1
|
+
import{useController as Ge,useFormContext as Ne}from"react-hook-form";import{Checkbox as Ue,FormControlLabel as He}from"@mui/material";import{Indicator as Be}from"@s_mart/core";import{useFormState as De}from"react-hook-form";var E=(e,o)=>o.replace(/[[\]]/g,"").split(".").reduce((l,a)=>l?.[a],e);import{jsx as Ae}from"react/jsx-runtime";var Me=({name:e,disableIcon:o,control:t})=>{let l=De({control:t,name:e}),a=E(l?.errors,e);return a?Ae(Be,{severity:"error",icon:o?!1:void 0,children:a?.message}):null},V=Me;import{Typography as me}from"@mui/material";import{toRem as Oe}from"@s_mart/utils";import{jsx as ue,jsxs as ze}from"react/jsx-runtime";var $e=({label:e,required:o,regular:t})=>ze("span",{style:{display:"flex",alignItems:"center",gap:Oe(2)},children:[ue(me,{variant:"caption",style:{display:"flex",alignItems:"center"},sx:{fontWeight:t?400:700},children:e}),o&&ue(me,{variant:"caption",color:"error",sx:{fontWeight:900},children:"*"})]}),P=$e;var h=class extends Error{constructor(o){super(`O componente ${o} precisa de um control para funcionar. Passe o control como prop ou coloque o componente dentro de um <Form />`),this.name="FormComponentPrecisaDeControl"}};import{memo as qe}from"react";var B=qe;import{jsx as Q,jsxs as We}from"react/jsx-runtime";var _e=({name:e,rules:o,defaultValue:t,shouldUnregister:l,control:a,label:m,labelPlacement:u,required:s,disableIconError:b,onChange:F,...T})=>{let c=Ne()?.control,d=a??c;if(!d)throw new h("Checkbox");let{field:i}=Ge({control:d,name:e,rules:o,defaultValue:t,shouldUnregister:l});return We("span",{children:[Q(He,{control:Q(Ue,{checked:!!i.value,value:i.value??"",defaultValue:i.value,onChange:(p,I)=>{i.onChange(p,I),F?.(p,I)},...T},e),label:Q(P,{label:m,required:s,regular:!0}),labelPlacement:u||"end"}),Q(V,{name:e,disableIcon:b,control:d})]})},Ke=B(_e);import{forwardRef as eo,useCallback as oo,useState as to}from"react";import{useController as ro,useFormContext as lo,useFormState as io}from"react-hook-form";import no from"lodash-es/isObject";import ao from"lodash-es/isEmpty";import so from"lodash-es/isEqual";import{Autocomplete as po,TextField as mo,Divider as ye,Button as uo}from"@mui/material";import{LIcon as re}from"@s_mart/core";import{linePlus as Fe,linePen as fo}from"@s_mart/solid-icons";import{toRem as xe}from"@s_mart/utils";import{css as Ye,styled as Je}from"@mui/material";import{toRem as Z}from"@s_mart/utils";var fe=Ye`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
|
-
`,ce=
|
|
5
|
+
`,ce=Je("div")`
|
|
6
6
|
display: flex;
|
|
7
7
|
|
|
8
8
|
div.endAdornments {
|
|
@@ -49,22 +49,22 @@ import{useController as qe,useFormContext as Ge}from"react-hook-form";import{Che
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
`;import{Tooltip as
|
|
52
|
+
`;import{Tooltip as Xe}from"@mui/material";import{LIcon as Qe}from"@s_mart/core";import{lineInfoCircle as Ze}from"@s_mart/solid-icons";import{jsx as te}from"react/jsx-runtime";var je=({title:e})=>te(Xe,{title:e,placement:"top",children:te("div",{style:{width:"fit-content"},children:te(Qe,{icon:Ze,color:"#757575"})})}),H=je;import{Fragment as le,jsx as S,jsxs as A}from"react/jsx-runtime";import{createElement as Fo}from"react";function co(e){let{name:o,rules:t,defaultValue:l,shouldUnregister:a,control:m,label:u,required:s,options:b,footer:F,showCreatableButton:T=!0,showEditableButton:c,onEditOption:d,onCreateOption:i,getOptionKey:p,getOptionLabel:I,getOptionAfterLabel:y,multiple:R,info:k,noOptionsText:n,onChange:g,onInputChange:$,placeholder:z,...x}=e,[U,D]=to(""),f=lo()?.control,r=m??f;if(!r)throw new h("CreatableV2");let v=io({control:r,name:o}),L=E(v.errors,o),_=!T||x.disabled,{field:K}=ro({name:o,control:r,rules:t,defaultValue:l,shouldUnregister:a}),Ie=w=>{let C=0;return e.slotProps?.textField?.slotProps?.input||(C+=2.5),_||(C+=2.56,pe(w)&&(C+=2.56)),!x.disableClearable&&!x.disabled&&(C+=1.3),`${C}rem`},pe=w=>x.disabled?!1:c&&no(w)&&!ao(w),we=()=>x.disabled?!1:T,de=oo(()=>{typeof i<"u"&&(i(U),D(""))},[U,i]),Le=()=>{d?.(K.value)},Re=K.value?K.value:R?[]:null;return A("div",{style:{display:"flex",flexDirection:"column"},children:[A("div",{style:{display:"flex"},children:[u&&S(P,{label:u,required:s}),k&&S(H,{title:k})]}),S(ce,{children:S(po,{fullWidth:!0,onChange:(w,C)=>{D(""),K.onChange(C),g?.(C)},onInputChange:(w,C,W)=>{W==="input"&&(D(C),$?.(C))},slotProps:{...x.slotProps,listbox:{component:eo(function(C,W){return A(le,{children:[S("ul",{...C,ref:W}),typeof F<"u"?A("div",{...C,children:[S("div",{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},children:S(ye,{})}),F()]},"creatable-footer"):null]})})}},value:Re,options:b,multiple:R,readOnly:x.disabled,noOptionsText:A(le,{children:[n||"Nenhuma op\xE7\xE3o encontrada",!_&&A(uo,{sx:{justifyContent:"flex-start",padding:`${xe(6)} ${xe(-16)}`,margin:0},fullWidth:!0,onClick:de,variant:"text",startIcon:S(re,{icon:Fe}),children:["Adicionar ",`"${U}"`]}),typeof F<"u"&&A(le,{children:[S("div",{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},children:S(ye,{})}),F()]})]}),isOptionEqualToValue:(w,C)=>so(w,C),getOptionLabel:I,getOptionKey:p,renderOption:typeof y=="function"?(w,C)=>{let W=y(C),Ee=p(C);return Fo("li",{...w,key:Ee},A("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[S("span",{children:I(C)}),typeof W=="string"?S("span",{children:W}):W]}))}:void 0,...x,sx:{"& div.MuiInputBase-root":{paddingRight:`${Ie(K.value)} !important`},...x.sx},onBlur:w=>{x?.onBlur?.(w),D("")},renderInput:w=>S(mo,{placeholder:z,...w,error:!!L,...e.slotProps?.textField,slotProps:{input:{...w.InputProps,...e.slotProps?.textField?.slotProps?.input,inputRef:K.ref,endAdornment:A("div",{className:"endAdornments",children:[w.InputProps.endAdornment,e.slotProps?.textField?.slotProps?.input?.endAdornment??null,pe(K.value)?A("div",{className:"editable",children:[S("div",{className:"divider"}),S("div",{className:"button",onKeyUp:Le,children:S(re,{icon:fo,size:"24px",removeMargin:!0})})]}):null,we()&&A("div",{className:"creatable",children:[S("div",{className:"divider"}),S("div",{className:"button",onKeyUp:de,children:S(re,{icon:Fe,size:"24px",removeMargin:!0})})]})]})}}})},o)}),S(V,{name:o,control:r})]})}var yo=B(co);import{Stack as go,TextField as vo}from"@mui/material";import{AdapterDayjs as Co}from"@mui/x-date-pickers/AdapterDayjs";import{DatePicker as Vo}from"@mui/x-date-pickers/DatePicker";import{LocalizationProvider as So}from"@mui/x-date-pickers/LocalizationProvider";import{ptBR as To}from"@mui/x-date-pickers/locales/ptBR";import{composeValidators as ko,date as he}from"@s_mart/rules";import Io from"dayjs/locale/pt-br";import{useController as wo,useFormContext as Lo,useFormState as Ro}from"react-hook-form";import{IconButton as xo,styled as Po}from"@mui/material";import{toRem as q}from"@s_mart/utils";var ho=e=>{switch(e){case"small":return q(16);case"large":return q(24);default:return q(20)}},bo=e=>{switch(e){case"small":return`${q(2)} ${q(8)}`;case"large":return`${q(10)}`;default:return`${q(6)} ${q(8)}`}},Pe=Po(xo)`
|
|
53
53
|
margin: 0px;
|
|
54
54
|
|
|
55
|
-
padding: ${({size:e})=>
|
|
56
|
-
border-radius: 0 ${
|
|
55
|
+
padding: ${({size:e})=>bo(e)};
|
|
56
|
+
border-radius: 0 ${q(4)} ${q(4)} 0;
|
|
57
57
|
|
|
58
58
|
svg {
|
|
59
|
-
width: ${({size:e})=>
|
|
59
|
+
width: ${({size:e})=>ho(e)} !important;
|
|
60
60
|
}
|
|
61
|
-
`;import{jsx as j,jsxs as Do}from"react/jsx-runtime";import{createElement as Bo}from"react";var Ro=({rules:e,name:o,defaultValue:r,shouldUnregister:l,control:s,datePickerProps:u,label:f,required:p,placeholder:b,disabled:y,disableIconError:S,...m})=>{let c=wo()?.control,n=s??c;if(!n)throw new P("DatePicker");let d=Lo({control:n,name:o}),w=R(d.errors,o),g=u?.format||"DD/MM/YYYY",E=e?To([he(g),e]):he(g),{field:T}=Io({control:n,name:o,rules:E,defaultValue:r,shouldUnregister:l});return j(Vo,{dateAdapter:vo,adapterLocale:ko,localeText:So.components.MuiLocalizationProvider.defaultProps.localeText,children:Do(bo,{children:[f&&j(x,{label:f,required:p}),Bo(Co,{...u,key:o,value:T.value??null,format:g,onChange:(i,h)=>{T.onChange(i,h),u?.onChange?.(i,h)},disabled:y,slots:{textField:go,openPickerButton:i=>j(Pe,{...i,size:m.size})},slotProps:{textField:i=>({variant:"outlined",...i,error:!!w,...m,inputProps:{...i.inputProps,placeholder:b||i.inputProps?.placeholder},InputProps:{...i.InputProps,inputRef:h=>{T.ref(h),typeof i.inputRef=="function"&&i.inputRef(h)}}})}}),j(C,{name:o,disableIcon:S,control:n})]})})},Eo=I(Ro);import{FormProvider as Mo}from"react-hook-form";import{jsx as be}from"react/jsx-runtime";function Ao({children:e,style:o,onSubmit:r,...l}){return be(Mo,{...l,children:be("form",{onSubmit:s=>{s.preventDefault(),s.stopPropagation(),r(s)},style:o,children:e})})}var ie=Ao;import{useEffect as Oo}from"react";import{useForm as $o}from"react-hook-form";import{zodResolver as zo}from"@hookform/resolvers/zod";var qo=({disableDefaultValuesUpdate:e,onSubmit:o,...r})=>{let l=$o({...r,resolver:r.schema&&zo(r.schema)});return Oo(()=>{e||l.reset(r.defaultValues)},[r.defaultValues,l.reset]),{...l,onSubmit:l.handleSubmit(s=>o(s,l))}},ne=qo;import{jsx as Uo}from"react/jsx-runtime";function Go({children:e,style:o,...r}){let l=ne(r);return Uo(ie,{...l,style:o,children:typeof e=="function"?e(l):e})}var No=Go;import{RadioGroup as _o,Stack as Ho}from"@mui/material";import{useController as Ko,useFormContext as Wo}from"react-hook-form";import{jsx as ae,jsxs as Xo}from"react/jsx-runtime";var Yo=({name:e,rules:o,defaultValue:r,shouldUnregister:l,control:s,label:u,required:f,children:p,orientation:b="row",disableIconError:y,...S})=>{let m=Wo()?.control,c=s??m;if(!c)throw new P("RadioGroup");let{field:n}=Ko({control:c,name:e,rules:o,defaultValue:r,shouldUnregister:l});return Xo(Ho,{children:[u&&ae(x,{label:u,required:f}),ae(_o,{value:n.value||"",name:e,...S,onChange:d=>{S?.onChange?.(d,d.target?.value),n.onChange(d)},style:{display:"flex",flexDirection:b},children:p},e),ae(C,{name:e,disableIcon:y,control:c})]})},Jo=Yo;import{FormControlLabel as Qo,Grid2 as Zo,Radio as jo}from"@mui/material";import{jsx as ee}from"react/jsx-runtime";var et=({label:e,labelPlacement:o,...r})=>ee(Zo,{sx:{display:"flex",flexDirection:"column"},children:ee(Qo,{control:ee(jo,{...r}),label:ee(x,{label:e}),labelPlacement:o||"end"})}),ot=et;import{Autocomplete as tt,Divider as ge,TextField as rt}from"@mui/material";import lt from"lodash-es/isEqual";import{forwardRef as it}from"react";import{useController as nt,useFormContext as at,useFormState as st}from"react-hook-form";import{Fragment as se,jsx as D,jsxs as K}from"react/jsx-runtime";import{createElement as mt}from"react";var pt=e=>{let{name:o,rules:r,defaultValue:l,shouldUnregister:s,control:u,label:f,required:p,options:b,textFieldProps:y,noOptionsText:S,footer:m,multiple:c,info:n,placeholder:d,onChange:w,onInputChange:g,getOptionAfterLabel:E,getOptionLabel:T,getOptionKey:i,...h}=e,O=at()?.control,$=u??O;if(!$)throw new P("SearchableV2");let F=st({control:$,name:o}),N=R(F.errors,o),{field:B}=nt({name:o,control:$,rules:r,defaultValue:l,shouldUnregister:s});return K("div",{style:{display:"flex",flexDirection:"column"},children:[K("div",{style:{display:"flex"},children:[f&&D(x,{label:f,required:p}),n&&D(_,{title:n})]}),D(tt,{onChange:(a,t)=>{B.onChange(t),w?.(t)},onInputChange:(a,t,L)=>{L==="input"&&g?.(t)},value:B.value,options:b,multiple:c,readOnly:h.disabled,slotProps:{...h.slotProps,listbox:{component:it(function(t,L){return K(se,{children:[D("ul",{...t,ref:L}),typeof m<"u"?K("div",{...t,children:[D("div",{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},children:D(ge,{})}),m()]},"searchable-footer"):null]})})}},noOptionsText:K(se,{children:[S||"Nenhuma op\xE7\xE3o encontrada",typeof m<"u"?K(se,{children:[D("div",{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},children:D(ge,{})}),m()]}):null]}),isOptionEqualToValue:(a,t)=>lt(a,t),getOptionLabel:T,getOptionKey:i,renderOption:typeof E=="function"?(a,t)=>{let L=E(t),U=i(t);return mt("li",{...a,key:U},K("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[D("span",{children:T(t)}),typeof L=="string"?D("span",{children:L}):L]}))}:void 0,...h,renderInput:a=>D(rt,{error:!!N,placeholder:d,...a,...y,inputRef:B.ref})},o),D(C,{name:o,control:$})]})},dt=I(pt);import{useState as ct}from"react";import{useController as yt,useFormContext as Ft,useFormState as xt}from"react-hook-form";import{IconButton as Pt,LIcon as ht}from"@s_mart/core";import{lineTimes as bt}from"@s_mart/regular-icons";import{colorPalette as gt}from"@s_mart/tokens";import{Select as vt,MenuItem as Ct,Divider as Vt}from"@mui/material";import{colorPalette as ut}from"@s_mart/tokens";import{jsx as ft}from"react/jsx-runtime";var ve=({value:e,placeholder:o,getOptionLabel:r})=>e===null||e?.length===0?ft("p",{style:{color:ut.neutral[100]},children:o}):r(e);import{Fragment as kt,jsx as A,jsxs as W}from"react/jsx-runtime";var St=e=>{let{name:o,rules:r,defaultValue:l,shouldUnregister:s,control:u,label:f,required:p,options:b,placeholder:y,clearable:S,info:m,footer:c,onChange:n,variant:d="outlined",getOptionKey:w,getOptionLabel:g,getOptionAfterLabel:E,getOptionIcon:T,...i}=e,h=Ft()?.control,O=u??h,[$,F]=ct(!1);if(!O)throw new P("SelectV2");let N=xt({control:O,name:o}),B=R(N.errors,o),{field:a}=yt({control:O,name:o,rules:r,defaultValue:l,shouldUnregister:s});return W("div",{style:{display:"flex",flexDirection:"column"},children:[W("div",{style:{display:"flex"},children:[f&&A(x,{label:f,required:p}),m&&A(_,{title:m})]}),W(vt,{open:$,onOpen:()=>F(!0),onClose:()=>F(!1),displayEmpty:!!y,variant:d,autoComplete:"off",value:a.value||null,renderValue:t=>A(ve,{getOptionLabel:g,placeholder:y,value:t}),onChange:t=>{console.log(t),a.onChange(t.target.value),n?.(t.target.value)},error:!!B,size:i.size||"medium",inputRef:a.ref,...i,endAdornment:W(kt,{children:[i.endAdornment,!!(S&&a.value)&&A(Pt,{variant:"text",color:"neutral",size:"small",sx:{borderRadius:"50%",position:"absolute",right:"2rem"},style:{padding:0},"aria-label":"Limpar",title:"Limpar",onClick:()=>{a.onChange(null),n?.(null)},children:A(ht,{icon:bt,color:gt.neutral[100],size:"25px",removeMargin:!0})})]}),children:[b.map(t=>{let L=w(t),U=g(t),J=T?.(t);return A(Ct,{value:t,children:W("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[J!==void 0?W("div",{style:{display:"flex",alignItems:"center"},children:[J,U]}):U,A("span",{children:E?.(t)??null})]})},L)}),c!==void 0&&W("div",{children:[A("div",{style:{padding:"8px 16px"},children:A(Vt,{})},"footer-divider"),A("div",{children:c({closeSelect:()=>F(!1)})},"footer-content")]},"footer")]},o),A(C,{name:o,control:O})]})},Tt=I(St);import{useController as It,useFormContext as wt}from"react-hook-form";import{Slider as Lt}from"@mui/material";import{jsx as Bt}from"react/jsx-runtime";var Rt=({name:e,rules:o,defaultValue:r,shouldUnregister:l,control:s,...u})=>{let f=wt()?.control,p=s??f;if(!p)throw new P("Slider");let{field:b}=It({control:p,name:e,rules:o,defaultValue:r,shouldUnregister:l});return Bt(Lt,{value:b.value||u?.min||0,onChange:b.onChange,valueLabelDisplay:"auto",...u},e)},Et=Rt;import{FormControlLabel as Dt,Stack as Mt,Switch as At}from"@mui/material";import{useController as Ot,useFormContext as $t}from"react-hook-form";import{jsx as oe,jsxs as Gt}from"react/jsx-runtime";var zt=({name:e,rules:o,defaultValue:r,shouldUnregister:l,control:s,label:u,labelPlacement:f,disableIconError:p,onChange:b,...y})=>{let S=$t()?.control,m=s??S;if(!m)throw new P("Switch");let{field:c}=Ot({control:m,name:e,rules:o,defaultValue:r,shouldUnregister:l});return Gt(Mt,{children:[oe(Dt,{control:oe(At,{value:c.value??"",checked:c.value??!1,onChange:(n,d)=>{c.onChange(n,d),b?.(n,d)},...y},e),label:oe(x,{label:u}),labelPlacement:f||"end"}),oe(C,{name:e,disableIcon:p,control:m})]})},qt=I(zt);import{InputAdornment as Nt,Stack as Ut,TextField as _t,Tooltip as Ht}from"@mui/material";import{LIcon as Ce}from"@s_mart/core";import*as Ve from"@s_mart/masks";import{lineEye as Kt,lineEyeSlash as Wt,lineInfoCircle as Yt}from"@s_mart/solid-icons";import{useRef as Jt,useState as Xt}from"react";import{useController as Qt,useFormContext as Zt,useFormState as jt}from"react-hook-form";import{jsx as q,jsxs as Se}from"react/jsx-runtime";var er=({name:e,rules:o,defaultValue:r,shouldUnregister:l,control:s,label:u,required:f,mask:p,variant:b="outlined",info:y,parse:S,format:m,onInputChange:c,disableIconError:n,...d})=>{let w=Zt()?.control,g=s??w,E=Jt(r||void 0);if(!g)throw new P("TextField");let[T,i]=Xt(!1),h=a=>{let t=a;return t=m?.(a)??a,p?Ve?.[p]?.format(t):t},O=a=>{let t=a;return t=S?.(a)??t,p?Ve?.[p]?.parse(t,E.current):t},$=a=>{if(!a||p!=="porcentagem"&&p!=="porcentagem0")return;a?.stopPropagation();let t=(a?.target).value;if(t){let L=String(t);if(L.length>0){let U=L.indexOf("%");U>-1&&(a.currentTarget.selectionEnd=U)}}},{field:F}=Qt({control:g,name:e,rules:o,defaultValue:r,shouldUnregister:l}),N=jt({control:g,name:e}),B=R(N.errors,e);return Se(Ut,{children:[Se("div",{style:{display:"flex"},children:[u&&q("div",{children:q(x,{label:u,required:f})}),y&&q("div",{children:q(Ht,{title:y,placement:"top",children:q("div",{style:{width:"fit-content"},children:q(Ce,{icon:Yt,color:"#757575"})})})})]}),q(_t,{variant:b,defaultValue:r,value:h(F.value||(F.value!=0?"":F.value)),onChange:a=>{let t=O(a?.target?.value);F.onChange(t),c?.(t),E.current=a.target.value},error:!!B,...d,type:d.type==="password"?T?"text":"password":d.type,autoComplete:d.autoComplete||"off",slotProps:{input:{onKeyDown:$,inputRef:F.ref,endAdornment:d.type==="password"&&q(Nt,{position:"start",onClick:()=>i(!T),style:{cursor:"pointer"},children:q(Ce,{icon:T?Kt:Wt,size:"24px",removeMargin:!0})}),...d.slotProps?.input}}},e),q(C,{name:e,disableIcon:n,control:g})]})},or=I(er);import{Stack as nr,TextField as ar}from"@mui/material";import{AdapterDayjs as sr}from"@mui/x-date-pickers/AdapterDayjs";import{LocalizationProvider as pr}from"@mui/x-date-pickers/LocalizationProvider";import{TimePicker as dr}from"@mui/x-date-pickers/TimePicker";import{ptBR as mr}from"@mui/x-date-pickers/locales/ptBR";import{composeValidators as ur,time as ke}from"@s_mart/rules";import fr from"dayjs/locale/pt-br";import{useController as cr,useFormContext as yr,useFormState as Fr}from"react-hook-form";import{styled as tr}from"@mui/material";import{IconButton as rr}from"@mui/material";import{toRem as G}from"@s_mart/utils";var lr=e=>{switch(e){case"small":return G(16);case"large":return G(24);default:return G(20)}},ir=e=>{switch(e){case"small":return`${G(2)} ${G(8)}`;case"large":return G(10);default:return`${G(6)} ${G(8)}`}},Te=tr(rr)`
|
|
61
|
+
`;import{jsx as j,jsxs as Mo}from"react/jsx-runtime";import{createElement as Do}from"react";var Eo=({rules:e,name:o,defaultValue:t,shouldUnregister:l,control:a,datePickerProps:m,label:u,required:s,placeholder:b,disabled:F,disableIconError:T,...c})=>{let d=Lo()?.control,i=a??d;if(!i)throw new h("DatePicker");let p=Ro({control:i,name:o}),I=E(p.errors,o),y=m?.format||"DD/MM/YYYY",R=e?ko([he(y),e]):he(y),{field:k}=wo({control:i,name:o,rules:R,defaultValue:t,shouldUnregister:l});return j(So,{dateAdapter:Co,adapterLocale:Io,localeText:To.components.MuiLocalizationProvider.defaultProps.localeText,children:Mo(go,{children:[u&&j(P,{label:u,required:s}),Do(Vo,{...m,key:o,value:k.value??null,format:y,onChange:(n,g)=>{k.onChange(n,g),m?.onChange?.(n,g)},disabled:F,slots:{textField:vo,openPickerButton:n=>j(Pe,{...n,size:c.size})},slotProps:{textField:n=>({variant:"outlined",...n,error:!!I,...c,inputProps:{...n.inputProps,placeholder:b||n.inputProps?.placeholder},InputProps:{...n.InputProps,inputRef:g=>{k.ref(g),typeof n.inputRef=="function"&&n.inputRef(g)}}})}}),j(V,{name:o,disableIcon:T,control:i})]})})},Bo=B(Eo);import{FormProvider as Ao}from"react-hook-form";import{jsx as be}from"react/jsx-runtime";function Oo({children:e,style:o,onSubmit:t,...l}){return be(Ao,{...l,children:be("form",{onSubmit:a=>{a.preventDefault(),a.stopPropagation(),t(a)},style:o,children:e})})}var ie=Oo;import{useEffect as $o}from"react";import{useForm as zo}from"react-hook-form";import{zodResolver as qo}from"@hookform/resolvers/zod";var Go=({disableDefaultValuesUpdate:e,onSubmit:o,...t})=>{let l=zo({...t,resolver:t.schema&&qo(t.schema)});return $o(()=>{e||l.reset(t.defaultValues)},[t.defaultValues,l.reset]),{...l,onSubmit:l.handleSubmit(a=>o(a,l))}},ne=Go;import{jsx as Ho}from"react/jsx-runtime";function No({children:e,style:o,...t}){let l=ne(t);return Ho(ie,{...l,style:o,children:typeof e=="function"?e(l):e})}var Uo=No;import{RadioGroup as _o,Stack as Ko}from"@mui/material";import{useController as Wo,useFormContext as Yo}from"react-hook-form";import{jsx as ae,jsxs as Qo}from"react/jsx-runtime";var Jo=({name:e,rules:o,defaultValue:t,shouldUnregister:l,control:a,label:m,required:u,children:s,orientation:b="row",disableIconError:F,...T})=>{let c=Yo()?.control,d=a??c;if(!d)throw new h("RadioGroup");let{field:i}=Wo({control:d,name:e,rules:o,defaultValue:t,shouldUnregister:l});return Qo(Ko,{children:[m&&ae(P,{label:m,required:u}),ae(_o,{value:i.value||"",name:e,...T,onChange:p=>{T?.onChange?.(p,p.target?.value),i.onChange(p)},style:{display:"flex",flexDirection:b},children:s},e),ae(V,{name:e,disableIcon:F,control:d})]})},Xo=Jo;import{FormControlLabel as Zo,Grid2 as jo,Radio as et}from"@mui/material";import{jsx as ee}from"react/jsx-runtime";var ot=({label:e,labelPlacement:o,...t})=>ee(jo,{sx:{display:"flex",flexDirection:"column"},children:ee(Zo,{control:ee(et,{...t}),label:ee(P,{label:e}),labelPlacement:o||"end"})}),tt=ot;import{Autocomplete as rt,Divider as ge,TextField as lt}from"@mui/material";import it from"lodash-es/isEqual";import{forwardRef as nt}from"react";import{useController as at,useFormContext as st,useFormState as pt}from"react-hook-form";import{Fragment as se,jsx as M,jsxs as Y}from"react/jsx-runtime";import{createElement as ut}from"react";var dt=e=>{let{name:o,rules:t,defaultValue:l,shouldUnregister:a,control:m,label:u,required:s,options:b,textFieldProps:F,noOptionsText:T,footer:c,multiple:d,info:i,placeholder:p,onChange:I,onInputChange:y,getOptionAfterLabel:R,getOptionLabel:k,getOptionKey:n,...g}=e,$=st()?.control,z=m??$;if(!z)throw new h("SearchableV2");let x=pt({control:z,name:o}),U=E(x.errors,o),{field:D}=at({name:o,control:z,rules:t,defaultValue:l,shouldUnregister:a}),f=D.value?D.value:d?[]:null;return Y("div",{style:{display:"flex",flexDirection:"column"},children:[Y("div",{style:{display:"flex"},children:[u&&M(P,{label:u,required:s}),i&&M(H,{title:i})]}),M(rt,{onChange:(r,v)=>{D.onChange(v),I?.(v)},onInputChange:(r,v,L)=>{L==="input"&&y?.(v)},value:f,options:b,multiple:d,readOnly:g.disabled,slotProps:{...g.slotProps,listbox:{component:nt(function(v,L){return Y(se,{children:[M("ul",{...v,ref:L}),typeof c<"u"?Y("div",{...v,children:[M("div",{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},children:M(ge,{})}),c()]},"searchable-footer"):null]})})}},noOptionsText:Y(se,{children:[T||"Nenhuma op\xE7\xE3o encontrada",typeof c<"u"?Y(se,{children:[M("div",{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},children:M(ge,{})}),c()]}):null]}),isOptionEqualToValue:(r,v)=>it(r,v),getOptionLabel:k,getOptionKey:n,renderOption:typeof R=="function"?(r,v)=>{let L=R(v),_=n(v);return ut("li",{...r,key:_},Y("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[M("span",{children:k(v)}),typeof L=="string"?M("span",{children:L}):L]}))}:void 0,...g,renderInput:r=>M(lt,{error:!!U,placeholder:p,...r,...F,inputRef:D.ref})},o),M(V,{name:o,control:z})]})},mt=B(dt);import{useState as yt}from"react";import{useController as Ft,useFormContext as xt,useFormState as Pt}from"react-hook-form";import{IconButton as ht,LIcon as bt}from"@s_mart/core";import{lineTimes as gt}from"@s_mart/regular-icons";import{colorPalette as vt}from"@s_mart/tokens";import{Select as Ct,MenuItem as Vt,Divider as St}from"@mui/material";import{colorPalette as ft}from"@s_mart/tokens";import{jsx as ct}from"react/jsx-runtime";var ve=({value:e,placeholder:o,getOptionLabel:t})=>e===null||e?.length===0?ct("p",{style:{color:ft.neutral[100]},children:o}):t(e);import{Fragment as It,jsx as O,jsxs as J}from"react/jsx-runtime";var Tt=e=>{let{name:o,rules:t,defaultValue:l,shouldUnregister:a,control:m,label:u,required:s,options:b,placeholder:F,clearable:T,info:c,footer:d,onChange:i,variant:p="outlined",getOptionKey:I,getOptionLabel:y,getOptionAfterLabel:R,getOptionIcon:k,...n}=e,g=xt()?.control,$=m??g,[z,x]=yt(!1);if(!$)throw new h("SelectV2");let U=Pt({control:$,name:o}),D=E(U.errors,o),{field:f}=Ft({control:$,name:o,rules:t,defaultValue:l,shouldUnregister:a});return J("div",{style:{display:"flex",flexDirection:"column"},children:[J("div",{style:{display:"flex"},children:[u&&O(P,{label:u,required:s}),c&&O(H,{title:c})]}),J(Ct,{open:z,onOpen:()=>x(!0),onClose:()=>x(!1),displayEmpty:!!F,variant:p,autoComplete:"off",value:f.value||null,renderValue:r=>O(ve,{getOptionLabel:y,placeholder:F,value:r}),onChange:r=>{console.log(r),f.onChange(r.target.value),i?.(r.target.value)},error:!!D,size:n.size||"medium",inputRef:f.ref,...n,endAdornment:J(It,{children:[n.endAdornment,!!(T&&f.value)&&O(ht,{variant:"text",color:"neutral",size:"small",sx:{borderRadius:"50%",position:"absolute",right:"2rem"},style:{padding:0},"aria-label":"Limpar",title:"Limpar",onClick:()=>{f.onChange(null),i?.(null)},children:O(bt,{icon:gt,color:vt.neutral[100],size:"25px",removeMargin:!0})})]}),children:[b.map(r=>{let v=I(r),L=y(r),_=k?.(r);return O(Vt,{value:r,children:J("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[_!==void 0?J("div",{style:{display:"flex",alignItems:"center"},children:[_,L]}):L,O("span",{children:R?.(r)??null})]})},v)}),d!==void 0&&J("div",{children:[O("div",{style:{padding:"8px 16px"},children:O(St,{})},"footer-divider"),O("div",{children:d({closeSelect:()=>x(!1)})},"footer-content")]},"footer")]},o),O(V,{name:o,control:$})]})},kt=B(Tt);import{useController as wt,useFormContext as Lt}from"react-hook-form";import{Slider as Rt}from"@mui/material";import{jsx as Dt}from"react/jsx-runtime";var Et=({name:e,rules:o,defaultValue:t,shouldUnregister:l,control:a,...m})=>{let u=Lt()?.control,s=a??u;if(!s)throw new h("Slider");let{field:b}=wt({control:s,name:e,rules:o,defaultValue:t,shouldUnregister:l});return Dt(Rt,{value:b.value||m?.min||0,onChange:b.onChange,valueLabelDisplay:"auto",...m},e)},Bt=Et;import{FormControlLabel as Mt,Stack as At,Switch as Ot}from"@mui/material";import{useController as $t,useFormContext as zt}from"react-hook-form";import{useCallback as qt}from"react";import{jsx as oe,jsxs as Ut}from"react/jsx-runtime";var Gt=({name:e,rules:o,defaultValue:t,shouldUnregister:l,control:a,label:m,labelPlacement:u="end",disableIconError:s,onChange:b,disabled:F,...T})=>{let c=zt()?.control,d=a??c;if(!d)throw new h("Switch");let{field:i}=$t({control:d,name:e,rules:o,defaultValue:t,shouldUnregister:l,disabled:F}),p=qt((I,y)=>{i.onChange(I,y),b?.(I,y)},[i.onChange,b]);return Ut(At,{children:[oe(Mt,{control:oe(Ot,{ref:i.ref,onBlur:i.onBlur,disabled:i.disabled,value:i.value??"",checked:i.value??!1,onChange:p,...T},e),label:oe(P,{label:m}),labelPlacement:u}),oe(V,{name:e,disableIcon:s,control:d})]})},Nt=Gt;import{InputAdornment as Ht,Stack as _t,TextField as Kt,Tooltip as Wt}from"@mui/material";import{LIcon as Ce}from"@s_mart/core";import*as Ve from"@s_mart/masks";import{lineEye as Yt,lineEyeSlash as Jt,lineInfoCircle as Xt}from"@s_mart/solid-icons";import{useRef as Qt,useState as Zt}from"react";import{useController as jt,useFormContext as er,useFormState as or}from"react-hook-form";import{jsx as G,jsxs as Se}from"react/jsx-runtime";var tr=({name:e,rules:o,defaultValue:t,shouldUnregister:l,control:a,label:m,required:u,mask:s,variant:b="outlined",info:F,parse:T,format:c,onInputChange:d,disableIconError:i,...p})=>{let I=er()?.control,y=a??I,R=Qt(t||void 0);if(!y)throw new h("TextField");let[k,n]=Zt(!1),g=f=>{let r=f;return r=c?.(f)??f,s?Ve?.[s]?.format(r):r},$=f=>{let r=f;return r=T?.(f)??r,s?Ve?.[s]?.parse(r,R.current):r},z=f=>{if(!f||s!=="porcentagem"&&s!=="porcentagem0")return;f?.stopPropagation();let r=(f?.target).value;if(r){let v=String(r);if(v.length>0){let L=v.indexOf("%");L>-1&&(f.currentTarget.selectionEnd=L)}}},{field:x}=jt({control:y,name:e,rules:o,defaultValue:t,shouldUnregister:l}),U=or({control:y,name:e}),D=E(U.errors,e);return Se(_t,{children:[Se("div",{style:{display:"flex"},children:[m&&G("div",{children:G(P,{label:m,required:u})}),F&&G("div",{children:G(Wt,{title:F,placement:"top",children:G("div",{style:{width:"fit-content"},children:G(Ce,{icon:Xt,color:"#757575"})})})})]}),G(Kt,{variant:b,defaultValue:t,value:g(x.value||(x.value!=0?"":x.value)),onChange:f=>{let r=$(f?.target?.value);x.onChange(r),d?.(r),R.current=f.target.value},error:!!D,...p,type:p.type==="password"?k?"text":"password":p.type,autoComplete:p.autoComplete||"off",slotProps:{input:{onKeyDown:z,inputRef:x.ref,endAdornment:p.type==="password"&&G(Ht,{position:"start",onClick:()=>n(!k),style:{cursor:"pointer"},children:G(Ce,{icon:k?Yt:Jt,size:"24px",removeMargin:!0})}),...p.slotProps?.input}}},e),G(V,{name:e,disableIcon:i,control:y})]})},rr=B(tr);import{Stack as sr,TextField as pr}from"@mui/material";import{AdapterDayjs as dr}from"@mui/x-date-pickers/AdapterDayjs";import{LocalizationProvider as mr}from"@mui/x-date-pickers/LocalizationProvider";import{TimePicker as ur}from"@mui/x-date-pickers/TimePicker";import{ptBR as fr}from"@mui/x-date-pickers/locales/ptBR";import{composeValidators as cr,time as ke}from"@s_mart/rules";import yr from"dayjs/locale/pt-br";import{useController as Fr,useFormContext as xr,useFormState as Pr}from"react-hook-form";import{styled as lr}from"@mui/material";import{IconButton as ir}from"@mui/material";import{toRem as N}from"@s_mart/utils";var nr=e=>{switch(e){case"small":return N(16);case"large":return N(24);default:return N(20)}},ar=e=>{switch(e){case"small":return`${N(2)} ${N(8)}`;case"large":return N(10);default:return`${N(6)} ${N(8)}`}},Te=lr(ir)`
|
|
62
62
|
margin: 0px;
|
|
63
63
|
|
|
64
|
-
padding: ${({size:e})=>
|
|
65
|
-
border-radius: 0 ${
|
|
64
|
+
padding: ${({size:e})=>ar(e)};
|
|
65
|
+
border-radius: 0 ${N(4)} ${N(4)} 0;
|
|
66
66
|
|
|
67
67
|
svg {
|
|
68
|
-
width: ${({size:e})=>
|
|
68
|
+
width: ${({size:e})=>nr(e)} !important;
|
|
69
69
|
}
|
|
70
|
-
`;import{jsx as X,jsxs as
|
|
70
|
+
`;import{jsx as X,jsxs as gr}from"react/jsx-runtime";var hr=({rules:e,defaultValue:o,shouldUnregister:t,name:l,control:a,required:m,label:u,timePickerProps:s,placeholder:b,disabled:F,disableIconError:T,...c})=>{let d=xr()?.control,i=a??d;if(!i)throw new h("TimePicker");let p=Pr({control:i,name:l}),I=E(p.errors,l),y=s?.format||"HH:mm",R=e?cr([ke(y),e]):ke(y),{field:k}=Fr({control:i,name:l,rules:R,defaultValue:o,shouldUnregister:t});return X(mr,{dateAdapter:dr,adapterLocale:yr,localeText:fr.components.MuiLocalizationProvider.defaultProps.localeText,children:gr(sr,{children:[u&&X(P,{label:u,required:m}),X(ur,{ampm:!1,format:y,value:k.value??null,disabled:F,...s,onChange:(n,g)=>{k.onChange(n,g),s?.onChange?.(n,g)},slots:{textField:pr,openPickerButton:n=>X(Te,{...n,size:c.size})},slotProps:{textField:n=>({variant:"outlined",...n,error:!!I,...c,inputProps:{...n.inputProps,placeholder:b||n.inputProps?.placeholder},InputProps:{...n.InputProps,inputRef:g=>{k.ref(g),typeof n.inputRef=="function"&&n.inputRef(g)}}})}},l),X(V,{name:l,disableIcon:T,control:i})]})})},br=B(hr);console.log("opa");export{Ke as Checkbox,yo as CreatableV2,Bo as DatePicker,V as FieldError,H as FieldInfo,P as FieldLabel,Uo as Form,ie as FormProvider,tt as RadioButton,Xo as RadioGroup,mt as SearchableV2,kt as SelectV2,Bt as Slider,Nt as Switch,rr as TextField,br as TimePicker,ne as useForm};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@s_mart/form",
|
|
3
|
-
"version": "10.0.0-beta.
|
|
3
|
+
"version": "10.0.0-beta.16",
|
|
4
4
|
"main": "./dist/index.mjs",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.mts",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"typescript": ">=5.4.2",
|
|
32
32
|
"zod": "^3.22.4",
|
|
33
33
|
"@s_mart/regular-icons": "6.0.10",
|
|
34
|
-
"@s_mart/core": "10.0.0-beta.8",
|
|
35
34
|
"@s_mart/solid-icons": "6.0.7",
|
|
36
|
-
"@s_mart/
|
|
35
|
+
"@s_mart/core": "10.0.0-beta.8",
|
|
37
36
|
"@s_mart/masks": "5.2.0",
|
|
37
|
+
"@s_mart/rules": "5.1.2-beta.0",
|
|
38
38
|
"@s_mart/tokens": "5.1.1",
|
|
39
39
|
"@s_mart/typed": "7.2.3",
|
|
40
40
|
"@s_mart/utils": "5.3.4"
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"dayjs": "^1.11.10",
|
|
52
52
|
"typescript": ">=5.4.2",
|
|
53
53
|
"@s_mart/core": "10.0.0-beta.8",
|
|
54
|
+
"@s_mart/rules": "5.1.2-beta.0",
|
|
54
55
|
"@s_mart/tokens": "5.1.1",
|
|
55
56
|
"@s_mart/masks": "5.2.0",
|
|
56
|
-
"@s_mart/
|
|
57
|
-
"@s_mart/
|
|
58
|
-
"@s_mart/utils": "5.3.4"
|
|
57
|
+
"@s_mart/utils": "5.3.4",
|
|
58
|
+
"@s_mart/typed": "7.2.3"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "tsup src/index.tsx --minify --format esm --dts --external react",
|