@zydon/common 2.0.0 → 2.0.2
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-Y6ER5LXD.mjs → chunk-CLXZIOVZ.mjs} +1 -1
- package/dist/{chunk-MYKAMLAI.mjs → chunk-EPIVCFTK.mjs} +1 -1
- package/dist/chunk-FXUKC2TO.mjs +3 -0
- package/dist/{chunk-ZN4LYG7I.mjs → chunk-GLPNPJIJ.mjs} +1 -1
- package/dist/{chunk-GNT763UQ.mjs → chunk-LWMTG62I.mjs} +2 -2
- package/dist/components/DatePicker/index.d.ts +16 -0
- package/dist/components/DatePicker/index.mjs +7 -0
- package/dist/components/DateRangePicker/index.d.ts +20 -0
- package/dist/components/DateRangePicker/index.mjs +7 -0
- package/dist/components/DateTimePicker/index.d.ts +16 -0
- package/dist/components/DateTimePicker/index.mjs +7 -0
- package/dist/components/Incrementer/index.mjs +2 -2
- package/dist/components/SelectableCards/index.mjs +2 -2
- package/dist/components/StyledTab/index.d.ts +9 -0
- package/dist/components/StyledTab/index.mjs +10 -0
- package/dist/components/StyledTab/props.d.ts +10 -0
- package/dist/components/StyledTab/props.mjs +1 -0
- package/dist/components/StyledTabs/index.d.ts +11 -0
- package/dist/components/StyledTabs/index.mjs +7 -0
- package/dist/components/StyledTabs/props.d.ts +8 -0
- package/dist/components/StyledTabs/props.mjs +1 -0
- package/dist/components/SwapList/index.mjs +1 -1
- package/dist/components/TimePicker/index.d.ts +16 -0
- package/dist/components/TimePicker/index.mjs +7 -0
- package/dist/components/form/DatePicker/index.mjs +3 -3
- package/dist/components/form/DateRangePicker/index.mjs +3 -3
- package/dist/components/form/DateTimePicker/index.mjs +3 -3
- package/dist/components/form/Incrementer/index.mjs +2 -2
- package/dist/components/form/SelectableCards/index.mjs +2 -2
- package/dist/components/form/TimePicker/index.mjs +1 -1
- package/dist/components/form/UploadAvatarWithCrop/index.mjs +3 -3
- package/dist/components/form/UploadWithCrop/index.mjs +3 -3
- package/dist/components/upload/index.mjs +4 -4
- package/dist/types/datagrid.d.ts +5 -0
- package/dist/types/datagrid.mjs +1 -0
- package/dist/utils/date.d.ts +4 -0
- package/dist/utils/date.mjs +6 -0
- package/dist/utils/formatNumber.d.ts +2 -1
- package/dist/utils/formatNumber.mjs +1 -1
- package/dist/utils/loadable.d.ts +6 -0
- package/dist/utils/loadable.mjs +7 -0
- package/dist/utils/mask.d.ts +8 -0
- package/dist/utils/mask.mjs +3 -0
- package/dist/utils/sort.d.ts +4 -0
- package/dist/utils/sort.mjs +3 -0
- package/dist/utils/uuidv4.d.ts +3 -0
- package/dist/utils/uuidv4.mjs +3 -0
- package/package.json +1 -1
- package/dist/chunk-HLTCIAAR.mjs +0 -3
- package/dist/{chunk-OWZUABY4.mjs → chunk-CKOWGDWH.mjs} +1 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var c={code:"pt-BR",currency:"BRL"};function o(n){return n==null||Number.isNaN(n)?null:Number(n)}function l(n,r){let e=c,t=o(n);return t===null?"":new Intl.NumberFormat(e.code,{minimumFractionDigits:0,maximumFractionDigits:2,...r}).format(t)}function s(n,r){let e=c,t=o(n);return t===null?"":new Intl.NumberFormat(e.code,{style:"currency",currency:e.currency,minimumFractionDigits:0,maximumFractionDigits:2,...r}).format(t)}function a(n,r){let e=c,t=o(n);return t===null?"":new Intl.NumberFormat(e.code,{style:"percent",minimumFractionDigits:0,maximumFractionDigits:1,...r}).format(t/100)}function b(n,r){let e=c,t=o(n);return t===null?"":new Intl.NumberFormat(e.code,{notation:"compact",maximumFractionDigits:2,...r}).format(t).replace(/[A-Z]/g,m=>m.toLowerCase())}function f(n){let r=o(n);if(r===null||r===0)return "0 bytes";let e=["bytes","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],t=2,u=1024,m=Math.floor(Math.log(r)/Math.log(u));return `${parseFloat((r/u**m).toFixed(t))} ${e[m]}`}var p=n=>+Number(n).toFixed(12),N=n=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(n||0);
|
|
2
|
+
|
|
3
|
+
export { l as a, s as b, a as c, b as d, f as e, p as f, N as g };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, b, c } from './chunk-
|
|
2
|
-
import { e } from './chunk-
|
|
1
|
+
import { a, b, c } from './chunk-CLXZIOVZ.mjs';
|
|
2
|
+
import { e } from './chunk-FXUKC2TO.mjs';
|
|
3
3
|
import { i } from './chunk-S6AXG7VS.mjs';
|
|
4
4
|
import { a as a$1 } from './chunk-QHCGLZFD.mjs';
|
|
5
5
|
import v1 from '@mui/material/Badge';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { DatePickerProps as DatePickerProps$1 } from '@mui/x-date-pickers-pro';
|
|
4
|
+
import { Dayjs } from 'dayjs';
|
|
5
|
+
|
|
6
|
+
type DatePickerProps = Omit<DatePickerProps$1<Dayjs>, 'value' | 'onChange'> & {
|
|
7
|
+
tabIndex?: number;
|
|
8
|
+
helperText?: ReactNode;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
value?: Date | null | undefined;
|
|
11
|
+
onChange(value: Date | null | undefined): void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
declare const DatePicker: ({ value, onChange, tabIndex, helperText, required, ...other }: DatePickerProps) => react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { DatePicker as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DatePicker } from '@mui/x-date-pickers-pro';
|
|
2
|
+
import s from 'dayjs';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var P=({value:t,onChange:l,tabIndex:e,helperText:i,required:p,...o})=>jsx(DatePicker,{...o,format:"DD/MM/YYYY",value:t?s(t):null,onChange:r=>l(r?r.toDate():null),slotProps:{textField:{...o.slotProps?.textField,required:p,helperText:i,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:e}},openPickerButton:{tabIndex:e}}}),c=P;
|
|
6
|
+
|
|
7
|
+
export { c as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { DateRangePickerProps as DateRangePickerProps$1 } from '@mui/x-date-pickers-pro';
|
|
4
|
+
import { Dayjs } from 'dayjs';
|
|
5
|
+
|
|
6
|
+
type DateRange = {
|
|
7
|
+
startDate?: Date | null | undefined;
|
|
8
|
+
endDate?: Date | null | undefined;
|
|
9
|
+
};
|
|
10
|
+
type DateRangePickerProps = Omit<DateRangePickerProps$1<Dayjs>, 'value' | 'onChange'> & {
|
|
11
|
+
value?: DateRange;
|
|
12
|
+
onChange(value?: DateRange): void;
|
|
13
|
+
tabIndex?: number;
|
|
14
|
+
helperText?: ReactNode;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
declare const DateRangePicker: ({ label, value, onChange, tabIndex, helperText, required, ...other }: DateRangePickerProps) => react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { DateRangePicker as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DateRangePicker } from '@mui/x-date-pickers-pro';
|
|
2
|
+
import o from 'dayjs';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var p=({label:a,value:e,onChange:l,tabIndex:n,helperText:D,required:s,...r})=>jsx(DateRangePicker,{format:"DD/MM/YYYY",value:[e?.startDate?o(e.startDate):null,e?.endDate?o(e.endDate):null],onChange:t=>l({startDate:t[0]?t[0].toDate():null,endDate:t[1]?t[1].toDate():null}),...r,slotProps:{textField:({position:t})=>({...r.slotProps?.textField,required:s,helperText:D,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:t==="start"?`${a} (Dt. In\xEDcio)`:`${a} (Dt. Fim)`,inputProps:{tabIndex:n}})},sx:{width:1}}),m=p;
|
|
6
|
+
|
|
7
|
+
export { m as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { DateTimePickerProps as DateTimePickerProps$1 } from '@mui/x-date-pickers-pro';
|
|
4
|
+
import { Dayjs } from 'dayjs';
|
|
5
|
+
|
|
6
|
+
type DateTimePickerProps = Omit<DateTimePickerProps$1<Dayjs>, 'value' | 'onChange'> & {
|
|
7
|
+
tabIndex?: number;
|
|
8
|
+
helperText?: ReactNode;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
value?: Date | null | undefined;
|
|
11
|
+
onChange(value: Date | null | undefined): void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
declare const DateTimePicker: ({ value, onChange, tabIndex, helperText, required, ...other }: DateTimePickerProps) => react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { DateTimePicker as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DateTimePicker } from '@mui/x-date-pickers-pro';
|
|
2
|
+
import a from 'dayjs';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var s=({value:e,onChange:i,tabIndex:t,helperText:l,required:m,...o})=>jsx(DateTimePicker,{...o,format:"DD/MM/YYYY HH:mm",value:e?a(e):null,onChange:r=>i(r?r.toDate():null),slotProps:{textField:{...o.slotProps?.textField,required:m,helperText:l,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:t}},openPickerButton:{tabIndex:t}}}),D=s;
|
|
6
|
+
|
|
7
|
+
export { D as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-GLPNPJIJ.mjs';
|
|
2
2
|
import '../../chunk-JZ3KAZMQ.mjs';
|
|
3
|
-
import '../../chunk-
|
|
3
|
+
import '../../chunk-FXUKC2TO.mjs';
|
|
4
4
|
import '../../chunk-DSQPMRZS.mjs';
|
|
5
5
|
import '../../chunk-QHCGLZFD.mjs';
|
|
6
6
|
import '../../chunk-KLIYANST.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-CKOWGDWH.mjs';
|
|
2
2
|
import '../../chunk-2ZLS7IUJ.mjs';
|
|
3
3
|
import '../../chunk-OUPUY4L2.mjs';
|
|
4
|
-
import '../../chunk-SXVKHA6L.mjs';
|
|
5
4
|
import '../../chunk-WHA7HOMZ.mjs';
|
|
5
|
+
import '../../chunk-SXVKHA6L.mjs';
|
|
6
6
|
import '../../chunk-MUAMRRNL.mjs';
|
|
7
7
|
import '../../chunk-QHCGLZFD.mjs';
|
|
8
8
|
import '../../chunk-KLIYANST.mjs';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as _emotion_styled from '@emotion/styled';
|
|
2
|
+
import * as _mui_system from '@mui/system';
|
|
3
|
+
import * as _mui_material_styles from '@mui/material/styles';
|
|
4
|
+
import { StyledTabProps } from './props.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
|
|
7
|
+
declare const StyledTab: _emotion_styled.StyledComponent<StyledTabProps & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, {}, {}>;
|
|
8
|
+
|
|
9
|
+
export { StyledTab as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { a } from '../../chunk-QHCGLZFD.mjs';
|
|
2
|
+
import '../../chunk-KLIYANST.mjs';
|
|
3
|
+
import n from '@mui/material/Stack';
|
|
4
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
5
|
+
import b from '@mui/material/Tab';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var g=styled(({label:o,onClose:i,icon:p,hasChanges:e,...l})=>jsx(b,{disableRipple:!0,...l,label:jsxs(n,{position:"relative",direction:"row",alignItems:"center",gap:1.5,sx:t=>({"> span":{position:"absolute",top:-14,right:-10,span:{position:"fixed",width:10,height:10,backgroundColor:t.palette.warning.main,border:"1px solid #fff",borderRadius:"50%",zIndex:999}}}),children:[p,o,jsx(a,{icon:"CLOSE_MARK_BUTTON",width:16,onClick:t=>{i(),t.stopPropagation();}}),e&&jsx("span",{children:jsx("span",{})})]})}))(({theme:o})=>({textTransform:"none",fontSize:o.typography.pxToRem(14),margin:"0 !important",color:`${o.palette.primary.lighter} !important`,minHeight:"initial",padding:"10px 16px",backgroundColor:o.palette.primary.dark,border:`1px solid ${alpha(o.palette.primary.darker,.25)}`,borderBottom:0,borderRadius:"8px 8px 0 0",fontWeight:600,overflow:"initial !important",lineHeight:1,"&.Mui-selected":{color:`${o.palette.text.primary} !important`,backgroundColor:o.palette.background.paper,borderColor:o.palette.primary.dark,svg:{color:o.palette.text.disabled}},"&.Mui-focusVisible":{backgroundColor:"rgba(100, 95, 228, 0.32)"},"svg:hover":{opacity:.85}})),y=g;
|
|
9
|
+
|
|
10
|
+
export { y as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as _emotion_styled from '@emotion/styled';
|
|
2
|
+
import * as _mui_system from '@mui/system';
|
|
3
|
+
import * as _mui_material_styles from '@mui/material/styles';
|
|
4
|
+
import * as react from 'react';
|
|
5
|
+
import { StyledTabsProps } from './props.js';
|
|
6
|
+
|
|
7
|
+
declare const StyledTabs: _emotion_styled.StyledComponent<StyledTabsProps & {
|
|
8
|
+
children?: react.ReactNode;
|
|
9
|
+
} & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, {}, {}>;
|
|
10
|
+
|
|
11
|
+
export { StyledTabs as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { styled } from '@mui/material/styles';
|
|
2
|
+
import r from '@mui/material/Tabs';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var a=styled(o=>jsx(r,{...o,variant:"scrollable",scrollButtons:"auto"}))({height:"100%",alignItems:"flex-end",gap:8,"& .MuiTabs-indicator":{display:"none",justifyContent:"center",backgroundColor:"transparent"},"& > .MuiButtonBase-root":{height:32,width:32,color:"#fff",marginBottom:2},"& .MuiTabs-flexContainer":{gap:4}}),s=a;
|
|
6
|
+
|
|
7
|
+
export { s as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { b, a as a$4 } from '../../chunk-MAKO5GLN.mjs';
|
|
2
2
|
import { a as a$1 } from '../../chunk-2ZLS7IUJ.mjs';
|
|
3
3
|
import { a } from '../../chunk-OUPUY4L2.mjs';
|
|
4
|
-
import { a as a$3 } from '../../chunk-SXVKHA6L.mjs';
|
|
5
4
|
import { a as a$2 } from '../../chunk-WHA7HOMZ.mjs';
|
|
5
|
+
import { a as a$3 } from '../../chunk-SXVKHA6L.mjs';
|
|
6
6
|
import '../../chunk-MUAMRRNL.mjs';
|
|
7
7
|
import { a as a$5 } from '../../chunk-QHCGLZFD.mjs';
|
|
8
8
|
import '../../chunk-KLIYANST.mjs';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { TimePickerProps as TimePickerProps$1 } from '@mui/x-date-pickers-pro';
|
|
4
|
+
import { Dayjs } from 'dayjs';
|
|
5
|
+
|
|
6
|
+
type TimePickerProps = Omit<TimePickerProps$1<Dayjs>, 'value' | 'onChange'> & {
|
|
7
|
+
tabIndex?: number;
|
|
8
|
+
helperText?: ReactNode;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
value?: Date | null | undefined;
|
|
11
|
+
onChange(value: Date | null | undefined): void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
declare const TimePicker: ({ value, onChange, tabIndex, helperText, required, ...other }: TimePickerProps) => react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { TimePicker as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TimePicker } from '@mui/x-date-pickers-pro';
|
|
2
|
+
import s from 'dayjs';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var P=({value:e,onChange:i,tabIndex:o,helperText:l,required:m,...r})=>jsx(TimePicker,{...r,format:"HH:mm",value:e?s(e):null,onChange:t=>i(t?t.toDate():null),slotProps:{textField:{...r.slotProps?.textField,required:m,helperText:l,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:o}},openPickerButton:{tabIndex:o}}}),k=P;
|
|
6
|
+
|
|
7
|
+
export { k as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
2
|
import { DatePicker } from '@mui/x-date-pickers-pro';
|
|
3
|
-
import
|
|
3
|
+
import k from 'dayjs';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var d=({name:p,rules:s,tabIndex:t,helperText:i,required:n,...o})=>{let{control:u}=useFormContext();return jsx(Controller,{name:p,control:u,rules:s,render:({field:{ref:m,onChange:f,...e},fieldState:{error:r}})=>jsx(DatePicker,{inputRef:m,format:"DD/MM/YYYY",...e,...o,value:e.value?k(e.value):null,onChange:l=>f(l?l.toDate():null),slotProps:{textField:{...o.slotProps?.textField,required:n,error:!!r,helperText:r?.message||i,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:t}},openPickerButton:{tabIndex:t}}})})},x=d;
|
|
7
7
|
|
|
8
|
-
export {
|
|
8
|
+
export { x as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
2
|
import { DateRangePicker } from '@mui/x-date-pickers-pro';
|
|
3
|
-
import
|
|
3
|
+
import l from 'dayjs';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var k=({name:r,label:o,rules:i,tabIndex:D,helperText:d,required:p,...a})=>{let{control:f,setError:m}=useFormContext();return jsx(Controller,{name:r,control:f,rules:i,render:({field:{value:t,onChange:u},fieldState:{error:n}})=>jsx(DateRangePicker,{format:"DD/MM/YYYY",value:[t?.startDate?l(t.startDate):null,t?.endDate?l(t.endDate):null],onChange:e=>u({startDate:e[0]?e[0].toDate():null,endDate:e[1]?e[1].toDate():null}),onError:e=>{m(r,{message:e[0]||e[1]||void 0});},...a,slotProps:{textField:({position:e})=>({...a.slotProps?.textField,required:p,error:!!n,helperText:n?.message||d,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:e==="start"?`${o} (Dt. In\xEDcio)`:`${o} (Dt. Fim)`,inputProps:{tabIndex:D}})},sx:{width:1}})})},h=k;
|
|
7
7
|
|
|
8
|
-
export {
|
|
8
|
+
export { h as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
2
|
import { DateTimePicker } from '@mui/x-date-pickers-pro';
|
|
3
|
-
import
|
|
3
|
+
import k from 'dayjs';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var T=({name:m,rules:a,tabIndex:t,helperText:p,required:s,...o})=>{let{control:n}=useFormContext();return jsx(Controller,{name:m,control:n,rules:a,render:({field:{ref:u,onChange:f,...e},fieldState:{error:r}})=>jsx(DateTimePicker,{format:"DD/MM/YYYY HH:mm",inputRef:u,...e,...o,value:e.value?k(e.value):null,onChange:l=>f(l?l.toDate():null),slotProps:{textField:{...o.slotProps?.textField,required:s,error:!!r,helperText:r?.message||p,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:t}},openPickerButton:{tabIndex:t}}})})},h=T;
|
|
7
7
|
|
|
8
|
-
export {
|
|
8
|
+
export { h as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
1
|
+
import { a } from '../../../chunk-GLPNPJIJ.mjs';
|
|
2
2
|
import '../../../chunk-JZ3KAZMQ.mjs';
|
|
3
|
-
import '../../../chunk-
|
|
3
|
+
import '../../../chunk-FXUKC2TO.mjs';
|
|
4
4
|
import '../../../chunk-DSQPMRZS.mjs';
|
|
5
5
|
import '../../../chunk-QHCGLZFD.mjs';
|
|
6
6
|
import '../../../chunk-KLIYANST.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
1
|
+
import { a } from '../../../chunk-CKOWGDWH.mjs';
|
|
2
2
|
import '../../../chunk-2ZLS7IUJ.mjs';
|
|
3
3
|
import '../../../chunk-OUPUY4L2.mjs';
|
|
4
|
-
import '../../../chunk-SXVKHA6L.mjs';
|
|
5
4
|
import '../../../chunk-WHA7HOMZ.mjs';
|
|
5
|
+
import '../../../chunk-SXVKHA6L.mjs';
|
|
6
6
|
import '../../../chunk-MUAMRRNL.mjs';
|
|
7
7
|
import '../../../chunk-QHCGLZFD.mjs';
|
|
8
8
|
import '../../../chunk-KLIYANST.mjs';
|
|
@@ -3,6 +3,6 @@ import { TimePicker } from '@mui/x-date-pickers-pro';
|
|
|
3
3
|
import T from 'dayjs';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var d=({name:i,rules:p,tabIndex:o,helperText:s,required:n,...r})=>{let{control:u}=useFormContext();return jsx(Controller,{name:i,control:u,rules:p,render:({field:{ref:a,onChange:f,...e},fieldState:{error:t}})=>jsx(TimePicker,{ampm:!1,format:"HH:mm",inputRef:a,...e,...r,value:e.value?T(e.value):null,onChange:l=>f(l?l.toDate():null),slotProps:{textField:{...r.slotProps?.textField,error:!!t,required:n,helperText:t?.message||s,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:o}},openPickerButton:{tabIndex:o}}})})},F=d;
|
|
7
7
|
|
|
8
8
|
export { F as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { b } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
1
|
+
import { b } from '../../../chunk-EPIVCFTK.mjs';
|
|
2
|
+
import '../../../chunk-CLXZIOVZ.mjs';
|
|
3
3
|
import '../../../chunk-PABYPOVH.mjs';
|
|
4
|
+
import '../../../chunk-FXUKC2TO.mjs';
|
|
4
5
|
import '../../../chunk-NNSTFVSV.mjs';
|
|
5
6
|
import '../../../chunk-EVHG7UNX.mjs';
|
|
6
|
-
import '../../../chunk-HLTCIAAR.mjs';
|
|
7
7
|
import '../../../chunk-S6AXG7VS.mjs';
|
|
8
8
|
import { a } from '../../../chunk-R2LSQJYW.mjs';
|
|
9
9
|
import '../../../chunk-OKHG4T22.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as d$1 } from '../../../chunk-
|
|
2
|
-
import { d, e } from '../../../chunk-
|
|
1
|
+
import { d as d$1 } from '../../../chunk-LWMTG62I.mjs';
|
|
2
|
+
import { d, e } from '../../../chunk-CLXZIOVZ.mjs';
|
|
3
3
|
import { a as a$4 } from '../../../chunk-PABYPOVH.mjs';
|
|
4
|
+
import '../../../chunk-FXUKC2TO.mjs';
|
|
4
5
|
import '../../../chunk-NNSTFVSV.mjs';
|
|
5
6
|
import '../../../chunk-EVHG7UNX.mjs';
|
|
6
|
-
import '../../../chunk-HLTCIAAR.mjs';
|
|
7
7
|
import { a as a$2 } from '../../../chunk-WMRVP7HJ.mjs';
|
|
8
8
|
import '../../../chunk-S6AXG7VS.mjs';
|
|
9
9
|
import { a } from '../../../chunk-R2LSQJYW.mjs';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { a as UploadAvatar, b as UploadAvatarWithCrop, b as UploadWithCrop } from '../../chunk-
|
|
2
|
-
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload } from '../../chunk-
|
|
3
|
-
export { c as RejectionFiles } from '../../chunk-
|
|
1
|
+
export { a as UploadAvatar, b as UploadAvatarWithCrop, b as UploadWithCrop } from '../../chunk-EPIVCFTK.mjs';
|
|
2
|
+
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload } from '../../chunk-LWMTG62I.mjs';
|
|
3
|
+
export { c as RejectionFiles } from '../../chunk-CLXZIOVZ.mjs';
|
|
4
4
|
import '../../chunk-PABYPOVH.mjs';
|
|
5
|
+
import '../../chunk-FXUKC2TO.mjs';
|
|
5
6
|
import '../../chunk-NNSTFVSV.mjs';
|
|
6
7
|
import '../../chunk-EVHG7UNX.mjs';
|
|
7
|
-
import '../../chunk-HLTCIAAR.mjs';
|
|
8
8
|
import { i } from '../../chunk-S6AXG7VS.mjs';
|
|
9
9
|
import '../../chunk-OKHG4T22.mjs';
|
|
10
10
|
import '../../chunk-BQ3PJ47P.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -6,5 +6,6 @@ declare function fPercent(inputValue: InputNumberValue, options?: Options): stri
|
|
|
6
6
|
declare function fShortenNumber(inputValue: InputNumberValue, options?: Options): string;
|
|
7
7
|
declare function fData(inputValue: InputNumberValue): string;
|
|
8
8
|
declare const fWithDecimalPlacesOrNot: (value: string | number) => number;
|
|
9
|
+
declare const fCurrencyBRL: (value?: number | null) => string;
|
|
9
10
|
|
|
10
|
-
export { InputNumberValue, fCurrency, fData, fNumber, fPercent, fShortenNumber, fWithDecimalPlacesOrNot };
|
|
11
|
+
export { InputNumberValue, fCurrency, fCurrencyBRL, fData, fNumber, fPercent, fShortenNumber, fWithDecimalPlacesOrNot };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { b as fCurrency, e as fData, a as fNumber, c as fPercent, d as fShortenNumber, f as fWithDecimalPlacesOrNot } from '../chunk-
|
|
1
|
+
export { b as fCurrency, g as fCurrencyBRL, e as fData, a as fNumber, c as fPercent, d as fShortenNumber, f as fWithDecimalPlacesOrNot } from '../chunk-FXUKC2TO.mjs';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const applyMask: (value: string | undefined, mask: string) => string;
|
|
2
|
+
declare const cpfMask: (v: string) => string;
|
|
3
|
+
declare const cnpjMask: (v: string) => string;
|
|
4
|
+
declare const cepMask: (v: string) => string;
|
|
5
|
+
declare const phoneMask: (v: string) => string;
|
|
6
|
+
declare const cpfMaskOrCnpjMask: (v: string) => string | null;
|
|
7
|
+
|
|
8
|
+
export { applyMask, cepMask, cnpjMask, cpfMask, cpfMaskOrCnpjMask, phoneMask };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var r=(e="",n)=>{let t="",s=0;return [...n].forEach(a=>{t+=a==="#"?e[s++]||"_":a;}),t},l=e=>r((e||"").replace(/\D/g,""),"###.###.###-##"),c=e=>r((e||"").replace(/\D/g,""),"##.###.###/####-##"),o=e=>r((e||"").replace(/\D/g,""),"#####-###"),u=e=>{let t=(e||"").replace(/\D/g,""),s=t.length===11?"(##) #####-####":"(##) ####-####";return r(t,s)},p=e=>{let t=(e||""||"").replace(/\D/g,"");return t.length===11?l(t):t.length===14?c(t):null};
|
|
2
|
+
|
|
3
|
+
export { r as applyMask, o as cepMask, c as cnpjMask, l as cpfMask, p as cpfMaskOrCnpjMask, u as phoneMask };
|
package/package.json
CHANGED
package/dist/chunk-HLTCIAAR.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var c={code:"pt-BR",currency:"BRL"};function o(t){return t==null||Number.isNaN(t)?null:Number(t)}function l(t,e){let r=c,n=o(t);return n===null?"":new Intl.NumberFormat(r.code,{minimumFractionDigits:0,maximumFractionDigits:2,...e}).format(n)}function s(t,e){let r=c,n=o(t);return n===null?"":new Intl.NumberFormat(r.code,{style:"currency",currency:r.currency,minimumFractionDigits:0,maximumFractionDigits:2,...e}).format(n)}function a(t,e){let r=c,n=o(t);return n===null?"":new Intl.NumberFormat(r.code,{style:"percent",minimumFractionDigits:0,maximumFractionDigits:1,...e}).format(n/100)}function b(t,e){let r=c,n=o(t);return n===null?"":new Intl.NumberFormat(r.code,{notation:"compact",maximumFractionDigits:2,...e}).format(n).replace(/[A-Z]/g,m=>m.toLowerCase())}function f(t){let e=o(t);if(e===null||e===0)return "0 bytes";let r=["bytes","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],n=2,u=1024,m=Math.floor(Math.log(e)/Math.log(u));return `${parseFloat((e/u**m).toFixed(n))} ${r[m]}`}var p=t=>+Number(t).toFixed(12);
|
|
2
|
-
|
|
3
|
-
export { l as a, s as b, a as c, b as d, f as e, p as f };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as a$3 } from './chunk-2ZLS7IUJ.mjs';
|
|
2
2
|
import { a as a$1 } from './chunk-OUPUY4L2.mjs';
|
|
3
|
-
import { a as a$2 } from './chunk-SXVKHA6L.mjs';
|
|
4
3
|
import { a as a$4 } from './chunk-WHA7HOMZ.mjs';
|
|
4
|
+
import { a as a$2 } from './chunk-SXVKHA6L.mjs';
|
|
5
5
|
import { a as a$5 } from './chunk-QHCGLZFD.mjs';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
import L from '@mui/material/Button';
|