@zydon/common 2.0.1 → 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/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/SelectableCards/index.mjs +2 -2
- 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/Address/index.mjs +1 -1
- 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/SelectableCards/index.mjs +2 -2
- package/dist/components/form/TimePicker/index.mjs +1 -1
- package/dist/components/form/UploadAvatarWithCrop/index.mjs +1 -1
- package/dist/components/form/UploadWithCrop/index.mjs +1 -1
- package/dist/components/upload/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/{chunk-OWZUABY4.mjs → chunk-CKOWGDWH.mjs} +1 -1
|
@@ -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,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';
|
|
@@ -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,5 +1,5 @@
|
|
|
1
|
-
import { a as a$2 } from '../../../chunk-ZREC5BF3.mjs';
|
|
2
1
|
import { a as a$1 } from '../../../chunk-HQYCK4C3.mjs';
|
|
2
|
+
import { a as a$2 } from '../../../chunk-ZREC5BF3.mjs';
|
|
3
3
|
import { a as a$3 } from '../../../chunk-POP3P3YE.mjs';
|
|
4
4
|
import '../../../chunk-6UGYYTYE.mjs';
|
|
5
5
|
import '../../../chunk-D6NU2WRK.mjs';
|
|
@@ -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,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
1
|
import { b } from '../../../chunk-EPIVCFTK.mjs';
|
|
2
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-FXUKC2TO.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
1
|
import { d as d$1 } from '../../../chunk-LWMTG62I.mjs';
|
|
2
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-FXUKC2TO.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';
|
|
@@ -2,9 +2,9 @@ export { a as UploadAvatar, b as UploadAvatarWithCrop, b as UploadWithCrop } fro
|
|
|
2
2
|
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload } from '../../chunk-LWMTG62I.mjs';
|
|
3
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-FXUKC2TO.mjs';
|
|
8
8
|
import { i } from '../../chunk-S6AXG7VS.mjs';
|
|
9
9
|
import '../../chunk-OKHG4T22.mjs';
|
|
10
10
|
import '../../chunk-BQ3PJ47P.mjs';
|
package/package.json
CHANGED
|
@@ -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';
|