@zydon/common 2.3.31 → 2.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-7HCMY4TM.js +17 -0
- package/dist/chunk-M7BRHRFK.js +7 -0
- package/dist/components/Autocomplete/index.d.ts +1 -0
- package/dist/components/Autocomplete/index.js +1 -1
- package/dist/components/DragContainer/index.d.ts +25 -0
- package/dist/components/DragContainer/index.js +7 -0
- package/dist/components/SelectableCards/index.js +2 -2
- package/dist/components/SimpleCard/index.d.ts +2 -7
- package/dist/components/SimpleCard/index.js +3 -3
- package/dist/components/SwapList/index.js +1 -1
- package/dist/components/WebhookCard/index.js +1 -1
- package/dist/components/form/Address/index.js +2 -2
- package/dist/components/form/Autocomplete/index.d.ts +3 -1
- package/dist/components/form/Autocomplete/index.js +2 -2
- package/dist/components/form/SelectableCards/index.js +2 -2
- package/dist/components/form/UploadWithCrop/index.js +2 -2
- package/dist/components/form/Webhook/index.js +2 -2
- package/dist/components/upload/index.js +2 -2
- package/dist/types/autoCompleteProps.d.ts +2 -0
- package/package.json +1 -1
- package/dist/chunk-LX7UN2X7.js +0 -17
- package/dist/chunk-NDLAVFYV.js +0 -7
- package/dist/{chunk-AAMAQ5VB.js → chunk-5KTBSMOB.js} +1 -1
- package/dist/{chunk-WDEZLC6N.js → chunk-IVVXLYFV.js} +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { a } from './chunk-HMOIIKEY.js';
|
|
2
|
+
import { createContext, forwardRef, useContext, useState, useMemo, useRef, useEffect } from 'react';
|
|
3
|
+
import me, { autocompleteClasses } from '@mui/material/Autocomplete';
|
|
4
|
+
import le from '@mui/material/CircularProgress';
|
|
5
|
+
import ae from '@mui/material/TextField';
|
|
6
|
+
import { VariableSizeList } from 'react-window';
|
|
7
|
+
import Q from '@mui/material/ListSubheader';
|
|
8
|
+
import K from '@mui/material/Stack';
|
|
9
|
+
import { useTheme, styled } from '@mui/material/styles';
|
|
10
|
+
import I from '@mui/material/Typography';
|
|
11
|
+
import Z from '@mui/material/useMediaQuery';
|
|
12
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
|
+
import ne from '@mui/material/Popper';
|
|
14
|
+
|
|
15
|
+
var k=8,ee=u=>{let{data:r,index:i,style:m}=u,n=r[i],{showValueInLabel:s,key:c,...f}=n[0],l={...m,top:m.top+k,paddingTop:8};return Object.prototype.hasOwnProperty.call(n,"group")?jsx(Q,{component:"div",style:l,children:n.group},`list-box-item-group-${c}`):jsx(I,{component:"li",...f,noWrap:!0,style:l,children:jsxs(K,{component:"div",direction:"row",flex:1,gap:1,justifyContent:"start",children:[n[1].icon&&jsx(a,{icon:n[1].icon}),n[1].label,s&&jsxs(I,{variant:"inherit",color:"grey.400",children:["(",n[1].value,")"]})]})},`list-box-item-${c}`)},z=createContext({}),M=forwardRef((u,r)=>{let i=useContext(z);return jsx("div",{ref:r,...u,...i})});M.displayName="OuterElementType";var te=u=>{let r=useRef(null);return useEffect(()=>{r.current!=null&&r.current.resetAfterIndex(0,!0);},[u]),r},re=forwardRef(function(r,i){let{children:m,...n}=r,s=[];m.forEach(o=>{s.push(o),s.push(...o.children||[]);});let c=useTheme(),f=Z(c.breakpoints.up("sm")),l=s.length,d=f?36:48,g=o=>Object.prototype.hasOwnProperty.call(o,"group")?48:d,C=()=>l>8?8*d:s.map(g).reduce((o,P)=>o+P,0),L=te(l);return jsx("div",{ref:i,children:jsx(z.Provider,{value:n,children:jsx(VariableSizeList,{itemData:s,height:C()+2*k,width:"100%",ref:L,outerElementType:M,innerElementType:"ul",itemSize:o=>g(s[o]),overscanCount:5,itemCount:l,children:ee})})})}),N=re;var D=styled(ne)({[`& .${autocompleteClasses.listbox}`]:{boxSizing:"border-box","& ul":{padding:0,margin:0}}});var H=forwardRef(({label:u,value:r,options:i=[],loading:m,noOptionsText:n="Nenhum resultado encontrado.",loadingText:s="Carregando op\xE7\xF5es...",error:c,helperText:f,placeholder:l,onChange:d,groupBy:g,showValueInLabel:C,disabled:L,multiple:o,required:P,renderOption:x,tabIndex:X,onInputChange:A,onSearch:v,onBlur:E,InputLabelProps:J,...$},V)=>{let[U,T]=useState(),W=e=>e&&typeof e=="object"?e.value.toString():e.toString(),y=useMemo(()=>o?(Array.isArray(r)?r:[]).reduce((p,b)=>{let O=i.find(j=>j.value.toString()===b.toString());return O?[...p,O]:[...p]},[]):i.find(t=>t.value.toString()===r?.toString())||null,[i,r,o]);return jsx(me,{ref:V,value:U||y,onInputChange:(e,t,p)=>{if(A&&A(e,t,p),p==="input"){v&&(v(t),T(t));return}T(void 0);},options:i,loading:m,noOptionsText:n,loadingText:s,disabled:m||L,disableListWrap:!0,PopperComponent:D,ListboxComponent:x?void 0:N,filterOptions:(e,t)=>e.filter(p=>`${p.value} ${p.label}`.toLocaleUpperCase().includes(t.inputValue.toLocaleUpperCase())),onChange:(e,t)=>{if(!t){d(o?[]:null);return}if(Array.isArray(t)){d(t.map(W));return}d(typeof t=="string"?t.toString():t.value.toString());},onBlur:e=>{E&&E(e),T(void 0);},renderOption:(e,t,p,b)=>x?x(e,t,p,b):[{...e,showValueInLabel:C},t],renderGroup:e=>e,groupBy:g,multiple:o,renderInput:e=>jsx(ae,{...e,placeholder:l,fullWidth:!0,error:!!c,helperText:f,label:u,required:P,InputProps:{...e.InputProps,...!o&&{startAdornment:y&&!Array.isArray(y)&&y.icon?jsx(a,{icon:y.icon}):void 0},endAdornment:jsxs(Fragment,{children:[m?jsx(le,{color:"primary",size:20}):null,e.InputProps.endAdornment]})},inputProps:{...e.inputProps,tabIndex:X},InputLabelProps:J}),...$})});H.displayName="Autocomplete";var Xe=H;
|
|
16
|
+
|
|
17
|
+
export { Xe as a };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { a } from './chunk-7HCMY4TM.js';
|
|
2
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var f=({name:t,helperText:l,rules:s,onSelectOption:e,InputLabelProps:a$1,...u})=>{let{control:c}=useFormContext();return jsx(Controller,{name:t,control:c,rules:s,render:({field:o,fieldState:{error:r}})=>jsx(a,{"data-intercom-target":t,...o,...u,onChange:n=>{e&&e(n,o.value),o.onChange(n);},error:!!r,helperText:r?.message||l,InputLabelProps:a$1})})},i=f;
|
|
6
|
+
|
|
7
|
+
export { i as a };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as _emotion_styled from '@emotion/styled';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import * as _mui_system from '@mui/system';
|
|
4
|
+
import * as _mui_material_styles from '@mui/material/styles';
|
|
5
|
+
import { DraggableAttributes } from '@dnd-kit/core';
|
|
6
|
+
import { Transform } from '@dnd-kit/utilities';
|
|
7
|
+
import { BoxProps } from '@mui/material/Box';
|
|
8
|
+
|
|
9
|
+
interface SortableStyleProps extends BoxProps {
|
|
10
|
+
transform: Transform | null;
|
|
11
|
+
transition: string;
|
|
12
|
+
isDragging: boolean;
|
|
13
|
+
tabIndex?: number;
|
|
14
|
+
role?: string;
|
|
15
|
+
'aria-describedby'?: string;
|
|
16
|
+
'aria-disabled'?: boolean;
|
|
17
|
+
'aria-pressed'?: boolean | undefined;
|
|
18
|
+
'aria-roledescription'?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare const DragContainer: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material_styles.Theme> & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
22
|
+
ref?: react.RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
23
|
+
}, keyof _mui_system.BoxOwnProps<_mui_material_styles.Theme>> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme> & SortableStyleProps & Partial<DraggableAttributes>, {}, {}>;
|
|
24
|
+
|
|
25
|
+
export { DragContainer as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { x } from '../../chunk-2P4CXK3O.js';
|
|
2
|
+
import n from '@mui/material/Box';
|
|
3
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
4
|
+
|
|
5
|
+
var a=styled(n,{shouldForwardProp:r=>r!=="transform"&&r!=="transition"&&r!=="isDragging"})(({theme:r,transform:e=null,transition:i,isDragging:t=!1})=>({transform:x.Transform.toString(e),transition:i,boxShadow:t?`0 0 0 2px ${r.palette.primary.main}, 0 4px 16px rgba(25, 118, 210, 0.10)`:void 0,background:t?alpha(r.palette.primary.main,.06):void 0,borderRadius:8,zIndex:t?1200:0}));var u=a;
|
|
6
|
+
|
|
7
|
+
export { u as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-IVVXLYFV.js';
|
|
2
2
|
import '../../chunk-TWGGHTU5.js';
|
|
3
3
|
import '../../chunk-SVDMHST7.js';
|
|
4
|
-
import '../../chunk-CMQCMCWI.js';
|
|
5
4
|
import '../../chunk-E5MGOPPQ.js';
|
|
5
|
+
import '../../chunk-CMQCMCWI.js';
|
|
6
6
|
import '../../chunk-U26IUEAG.js';
|
|
7
7
|
import '../../chunk-HMOIIKEY.js';
|
|
8
8
|
import '../../chunk-RPKNOLCY.js';
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { StackProps } from '@mui/material/Stack';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
sx?: SxProps<Theme>;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare const SimpleCard: ({ children, sx }: SimpleCardProps) => react_jsx_runtime.JSX.Element;
|
|
4
|
+
declare const SimpleCard: ({ children, ...props }: StackProps) => react_jsx_runtime.JSX.Element;
|
|
10
5
|
|
|
11
6
|
export { SimpleCard as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from '@mui/material/Stack';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
var o=styled(
|
|
5
|
+
var o=styled(a)(({theme:r})=>({border:`1px solid ${r.palette.grey[300]}`,borderRadius:16,gap:10,padding:24,backgroundColor:r.palette.background.paper}));var d=({children:r,...p})=>jsx(o,{...p,children:r}),s=d;
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { s as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as a$1 } from '../../chunk-TWGGHTU5.js';
|
|
2
2
|
import { a } from '../../chunk-SVDMHST7.js';
|
|
3
|
-
import { a as a$2 } from '../../chunk-CMQCMCWI.js';
|
|
4
3
|
import { a as a$3 } from '../../chunk-E5MGOPPQ.js';
|
|
4
|
+
import { a as a$2 } from '../../chunk-CMQCMCWI.js';
|
|
5
5
|
import '../../chunk-U26IUEAG.js';
|
|
6
6
|
import { a as a$4 } from '../../chunk-HMOIIKEY.js';
|
|
7
7
|
import '../../chunk-RPKNOLCY.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d } from '../../chunk-WUQSPJPN.js';
|
|
2
2
|
import { a } from '../../chunk-HOMGLSVS.js';
|
|
3
|
-
import { a as a$3 } from '../../chunk-UA7OPAW7.js';
|
|
4
3
|
import { a as a$2 } from '../../chunk-BYAPKKGB.js';
|
|
4
|
+
import { a as a$3 } from '../../chunk-UA7OPAW7.js';
|
|
5
5
|
import '../../chunk-D27ND54J.js';
|
|
6
6
|
import { a as a$4 } from '../../chunk-HMOIIKEY.js';
|
|
7
7
|
import '../../chunk-RPKNOLCY.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as a$2 } from '../../../chunk-VTHBHXM2.js';
|
|
2
2
|
import { a as a$1 } from '../../../chunk-2NMLQNWC.js';
|
|
3
|
-
import { a as a$3 } from '../../../chunk-
|
|
3
|
+
import { a as a$3 } from '../../../chunk-M7BRHRFK.js';
|
|
4
4
|
import '../../../chunk-ORLVNXTG.js';
|
|
5
|
-
import '../../../chunk-
|
|
5
|
+
import '../../../chunk-7HCMY4TM.js';
|
|
6
6
|
import '../../../chunk-HMOIIKEY.js';
|
|
7
7
|
import '../../../chunk-RPKNOLCY.js';
|
|
8
8
|
import E from '@mui/material/CircularProgress';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { InputLabelProps } from '@mui/material/InputLabel';
|
|
2
3
|
import { BaseAutoComplete } from '../../../types/autoComplete.js';
|
|
3
4
|
import { BaseField } from '../../../types/baseField.js';
|
|
4
5
|
import { Option } from '../../../types/option.js';
|
|
@@ -9,8 +10,9 @@ import 'react-hook-form';
|
|
|
9
10
|
|
|
10
11
|
type AutocompleteProps = BaseField<BaseAutoComplete> & {
|
|
11
12
|
onSelectOption?(newValue: NonNullable<string | Option> | (string | Option)[] | null | undefined, oldValue?: NonNullable<string | Option> | (string | Option)[] | null | undefined): void;
|
|
13
|
+
InputLabelProps?: Partial<InputLabelProps>;
|
|
12
14
|
};
|
|
13
15
|
|
|
14
|
-
declare const Autocomplete: ({ name, helperText, rules, onSelectOption, ...other }: AutocompleteProps) => react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare const Autocomplete: ({ name, helperText, rules, onSelectOption, InputLabelProps, ...other }: AutocompleteProps) => react_jsx_runtime.JSX.Element;
|
|
15
17
|
|
|
16
18
|
export { Autocomplete as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as default } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
1
|
+
export { a as default } from '../../../chunk-M7BRHRFK.js';
|
|
2
|
+
import '../../../chunk-7HCMY4TM.js';
|
|
3
3
|
import '../../../chunk-HMOIIKEY.js';
|
|
4
4
|
import '../../../chunk-RPKNOLCY.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
1
|
+
import { a } from '../../../chunk-IVVXLYFV.js';
|
|
2
2
|
import '../../../chunk-TWGGHTU5.js';
|
|
3
3
|
import '../../../chunk-SVDMHST7.js';
|
|
4
|
-
import '../../../chunk-CMQCMCWI.js';
|
|
5
4
|
import '../../../chunk-E5MGOPPQ.js';
|
|
5
|
+
import '../../../chunk-CMQCMCWI.js';
|
|
6
6
|
import '../../../chunk-U26IUEAG.js';
|
|
7
7
|
import '../../../chunk-HMOIIKEY.js';
|
|
8
8
|
import '../../../chunk-RPKNOLCY.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { e } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-2P4CXK3O.js';
|
|
1
|
+
import { e } from '../../../chunk-5KTBSMOB.js';
|
|
3
2
|
import '../../../chunk-AOKGGMJB.js';
|
|
4
3
|
import '../../../chunk-LIGXBDJV.js';
|
|
5
4
|
import '../../../chunk-XHCJ67Q6.js';
|
|
6
5
|
import '../../../chunk-T7I256S6.js';
|
|
7
6
|
import '../../../chunk-ANAHA3L6.js';
|
|
8
7
|
import '../../../chunk-ZPQUQ3ZX.js';
|
|
8
|
+
import '../../../chunk-2P4CXK3O.js';
|
|
9
9
|
import '../../../chunk-FK7DDO5L.js';
|
|
10
10
|
import '../../../chunk-D27ND54J.js';
|
|
11
11
|
import '../../../chunk-DMQW3LDF.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a } from '../../../chunk-VTHBHXM2.js';
|
|
2
|
-
import { a as a$2 } from '../../../chunk-
|
|
2
|
+
import { a as a$2 } from '../../../chunk-M7BRHRFK.js';
|
|
3
3
|
import { a as a$3 } from '../../../chunk-7SYZRGWH.js';
|
|
4
|
-
import '../../../chunk-
|
|
4
|
+
import '../../../chunk-7HCMY4TM.js';
|
|
5
5
|
import { a as a$1 } from '../../../chunk-HMOIIKEY.js';
|
|
6
6
|
import '../../../chunk-RPKNOLCY.js';
|
|
7
7
|
import { useFormContext, useFieldArray } from 'react-hook-form';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-AAMAQ5VB.js';
|
|
2
|
-
import '../../chunk-2P4CXK3O.js';
|
|
3
1
|
export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-JFCKSA6O.js';
|
|
2
|
+
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-5KTBSMOB.js';
|
|
4
3
|
import { o } from '../../chunk-AOKGGMJB.js';
|
|
5
4
|
export { p as RejectionFiles } from '../../chunk-AOKGGMJB.js';
|
|
6
5
|
import '../../chunk-LIGXBDJV.js';
|
|
@@ -8,6 +7,7 @@ import '../../chunk-XHCJ67Q6.js';
|
|
|
8
7
|
import '../../chunk-T7I256S6.js';
|
|
9
8
|
import '../../chunk-ANAHA3L6.js';
|
|
10
9
|
import '../../chunk-ZPQUQ3ZX.js';
|
|
10
|
+
import '../../chunk-2P4CXK3O.js';
|
|
11
11
|
import '../../chunk-FK7DDO5L.js';
|
|
12
12
|
import '../../chunk-D27ND54J.js';
|
|
13
13
|
import '../../chunk-DMQW3LDF.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InputLabelProps } from '@mui/material/InputLabel';
|
|
1
2
|
import { BaseAutoComplete } from './autoComplete.js';
|
|
2
3
|
import { Option } from './option.js';
|
|
3
4
|
import 'react';
|
|
@@ -12,6 +13,7 @@ type AutocompleteProps = BaseAutoComplete & {
|
|
|
12
13
|
helperText?: string;
|
|
13
14
|
showValueInLabel?: boolean;
|
|
14
15
|
showAdditionalFields?: boolean;
|
|
16
|
+
InputLabelProps?: Partial<InputLabelProps>;
|
|
15
17
|
};
|
|
16
18
|
|
|
17
19
|
export { AutocompleteProps };
|
package/package.json
CHANGED
package/dist/chunk-LX7UN2X7.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-HMOIIKEY.js';
|
|
2
|
-
import { createContext, forwardRef, useContext, useState, useMemo, useRef, useEffect } from 'react';
|
|
3
|
-
import ue, { autocompleteClasses } from '@mui/material/Autocomplete';
|
|
4
|
-
import me from '@mui/material/CircularProgress';
|
|
5
|
-
import le from '@mui/material/TextField';
|
|
6
|
-
import { VariableSizeList } from 'react-window';
|
|
7
|
-
import F from '@mui/material/ListSubheader';
|
|
8
|
-
import Q from '@mui/material/Stack';
|
|
9
|
-
import { useTheme, styled } from '@mui/material/styles';
|
|
10
|
-
import I from '@mui/material/Typography';
|
|
11
|
-
import Y from '@mui/material/useMediaQuery';
|
|
12
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
|
-
import oe from '@mui/material/Popper';
|
|
14
|
-
|
|
15
|
-
var k=8,Z=u=>{let{data:r,index:i,style:m}=u,n=r[i],{showValueInLabel:s,key:c,...f}=n[0],l={...m,top:m.top+k,paddingTop:8};return Object.prototype.hasOwnProperty.call(n,"group")?jsx(F,{component:"div",style:l,children:n.group},`list-box-item-group-${c}`):jsx(I,{component:"li",...f,noWrap:!0,style:l,children:jsxs(Q,{component:"div",direction:"row",flex:1,gap:1,justifyContent:"start",children:[n[1].icon&&jsx(a,{icon:n[1].icon}),n[1].label,s&&jsxs(I,{variant:"inherit",color:"grey.400",children:["(",n[1].value,")"]})]})},`list-box-item-${c}`)},z=createContext({}),M=forwardRef((u,r)=>{let i=useContext(z);return jsx("div",{ref:r,...u,...i})});M.displayName="OuterElementType";var ee=u=>{let r=useRef(null);return useEffect(()=>{r.current!=null&&r.current.resetAfterIndex(0,!0);},[u]),r},te=forwardRef(function(r,i){let{children:m,...n}=r,s=[];m.forEach(o=>{s.push(o),s.push(...o.children||[]);});let c=useTheme(),f=Y(c.breakpoints.up("sm")),l=s.length,d=f?36:48,g=o=>Object.prototype.hasOwnProperty.call(o,"group")?48:d,C=()=>l>8?8*d:s.map(g).reduce((o,L)=>o+L,0),x=ee(l);return jsx("div",{ref:i,children:jsx(z.Provider,{value:n,children:jsx(VariableSizeList,{itemData:s,height:C()+2*k,width:"100%",ref:x,outerElementType:M,innerElementType:"ul",itemSize:o=>g(s[o]),overscanCount:5,itemCount:l,children:Z})})})}),N=te;var D=styled(oe)({[`& .${autocompleteClasses.listbox}`]:{boxSizing:"border-box","& ul":{padding:0,margin:0}}});var H=forwardRef(({label:u,value:r,options:i=[],loading:m,noOptionsText:n="Nenhum resultado encontrado.",loadingText:s="Carregando op\xE7\xF5es...",error:c,helperText:f,placeholder:l,onChange:d,groupBy:g,showValueInLabel:C,disabled:x,multiple:o,required:L,renderOption:P,tabIndex:X,onInputChange:A,onSearch:v,onBlur:E,...J},$)=>{let[V,T]=useState(),U=e=>e&&typeof e=="object"?e.value.toString():e.toString(),y=useMemo(()=>o?(Array.isArray(r)?r:[]).reduce((p,h)=>{let O=i.find(W=>W.value.toString()===h.toString());return O?[...p,O]:[...p]},[]):i.find(t=>t.value.toString()===r?.toString())||null,[i,r,o]);return jsx(ue,{ref:$,value:V||y,onInputChange:(e,t,p)=>{if(A&&A(e,t,p),p==="input"){v&&(v(t),T(t));return}T(void 0);},options:i,loading:m,noOptionsText:n,loadingText:s,disabled:m||x,disableListWrap:!0,PopperComponent:D,ListboxComponent:P?void 0:N,filterOptions:(e,t)=>e.filter(p=>`${p.value} ${p.label}`.toLocaleUpperCase().includes(t.inputValue.toLocaleUpperCase())),onChange:(e,t)=>{if(!t){d(o?[]:null);return}if(Array.isArray(t)){d(t.map(U));return}d(typeof t=="string"?t.toString():t.value.toString());},onBlur:e=>{E&&E(e),T(void 0);},renderOption:(e,t,p,h)=>P?P(e,t,p,h):[{...e,showValueInLabel:C},t],renderGroup:e=>e,groupBy:g,multiple:o,renderInput:e=>jsx(le,{...e,placeholder:l,fullWidth:!0,error:!!c,helperText:f,label:u,required:L,InputProps:{...e.InputProps,...!o&&{startAdornment:y&&!Array.isArray(y)&&y.icon?jsx(a,{icon:y.icon}):void 0},endAdornment:jsxs(Fragment,{children:[m?jsx(me,{color:"primary",size:20}):null,e.InputProps.endAdornment]})},inputProps:{...e.inputProps,tabIndex:X}}),...J})});H.displayName="Autocomplete";var He=H;
|
|
16
|
-
|
|
17
|
-
export { He as a };
|
package/dist/chunk-NDLAVFYV.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-LX7UN2X7.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 };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { x } from './chunk-2P4CXK3O.js';
|
|
2
1
|
import { c, g, p, n, d, e as e$1, a as a$5, b, h, i as i$1, l, m as m$1, j as j$2, k } from './chunk-AOKGGMJB.js';
|
|
3
2
|
import { a as a$4 } from './chunk-LIGXBDJV.js';
|
|
4
3
|
import { e } from './chunk-ANAHA3L6.js';
|
|
5
4
|
import { a as a$6 } from './chunk-ZPQUQ3ZX.js';
|
|
5
|
+
import { x } from './chunk-2P4CXK3O.js';
|
|
6
6
|
import { a as a$3 } from './chunk-FK7DDO5L.js';
|
|
7
7
|
import { i, o } from './chunk-D27ND54J.js';
|
|
8
8
|
import { j as j$1 } from './chunk-DMQW3LDF.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as a$3 } from './chunk-TWGGHTU5.js';
|
|
2
2
|
import { a as a$1 } from './chunk-SVDMHST7.js';
|
|
3
|
-
import { a as a$4 } from './chunk-CMQCMCWI.js';
|
|
4
3
|
import { a as a$2 } from './chunk-E5MGOPPQ.js';
|
|
4
|
+
import { a as a$4 } from './chunk-CMQCMCWI.js';
|
|
5
5
|
import { a as a$5 } from './chunk-HMOIIKEY.js';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
import L from '@mui/material/Button';
|