@zydon/common 2.5.10 → 2.5.11
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/Common/index.js +2 -2
- package/dist/components/form/Address/index.js +1 -1
- package/dist/components/form/DateField/index.d.ts +11 -0
- package/dist/components/form/DateField/index.js +8 -0
- package/dist/theme/theme-provider.js +2 -2
- package/dist/types/dateFieldProps.d.ts +15 -0
- package/dist/types/dateFieldProps.js +1 -0
- package/package.json +1 -1
- package/dist/{chunk-I6DKOBSH.js → chunk-XI2QTFJA.js} +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a } from '../../chunk-
|
|
1
|
+
import { a } from '../../chunk-XI2QTFJA.js';
|
|
2
|
+
import '../../chunk-GUFT6XPG.js';
|
|
2
3
|
import '../../chunk-BH5YHBAI.js';
|
|
3
4
|
import '../../chunk-OSDHZZEM.js';
|
|
4
5
|
import '../../chunk-CFVUZ4S5.js';
|
|
5
6
|
import '../../chunk-FDP5MHVS.js';
|
|
6
|
-
import '../../chunk-GUFT6XPG.js';
|
|
7
7
|
import { i } from '../../chunk-D27ND54J.js';
|
|
8
8
|
import { a as a$1 } from '../../chunk-MAK4JF5M.js';
|
|
9
9
|
import '../../chunk-FUB7WQS5.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as a$1 } from '../../../chunk-2NMLQNWC.js';
|
|
2
1
|
import { a as a$2 } from '../../../chunk-YNOYR4WX.js';
|
|
2
|
+
import { a as a$1 } from '../../../chunk-2NMLQNWC.js';
|
|
3
3
|
import { a as a$3 } from '../../../chunk-FOOP2WUM.js';
|
|
4
4
|
import '../../../chunk-ORLVNXTG.js';
|
|
5
5
|
import '../../../chunk-LLMDC6IE.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { DateFieldProps } from '../../../types/dateFieldProps.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '@mui/x-date-pickers-pro';
|
|
5
|
+
import 'dayjs';
|
|
6
|
+
import '../../../types/baseField.js';
|
|
7
|
+
import 'react-hook-form';
|
|
8
|
+
|
|
9
|
+
declare const DateField: ({ name, rules, tabIndex, helperText, required, ...other }: DateFieldProps) => react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { DateField as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
|
+
import { DateField } from '@mui/x-date-pickers-pro';
|
|
3
|
+
import c from 'dayjs';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var g=({name:t,rules:s,tabIndex:i,helperText:p,required:u,...e})=>{let{control:d}=useFormContext();return jsx(Controller,{name:t,control:d,rules:s,render:({field:{ref:f,onChange:m,...o},fieldState:{error:l}})=>jsx(DateField,{inputRef:f,format:"DD/MM/YYYY",...o,"data-intercom-target":t,...e,value:o.value?c(o.value):null,onChange:r=>{let a=r?r.toDate():null;m(a),e.onChange&&e.onChange(a);},slotProps:{textField:{...e.slotProps?.textField,name:t,required:u,error:!!l,helperText:l?.message||p,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:i}}}})})},h=g;
|
|
7
|
+
|
|
8
|
+
export { h as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { a as default } from '../chunk-
|
|
1
|
+
export { a as default } from '../chunk-XI2QTFJA.js';
|
|
2
|
+
import '../chunk-GUFT6XPG.js';
|
|
2
3
|
import '../chunk-BH5YHBAI.js';
|
|
3
4
|
import '../chunk-OSDHZZEM.js';
|
|
4
5
|
import '../chunk-CFVUZ4S5.js';
|
|
5
6
|
import '../chunk-FDP5MHVS.js';
|
|
6
|
-
import '../chunk-GUFT6XPG.js';
|
|
7
7
|
import '../chunk-D27ND54J.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DateFieldProps as DateFieldProps$1 } from '@mui/x-date-pickers-pro';
|
|
3
|
+
import { Dayjs } from 'dayjs';
|
|
4
|
+
import { BaseField } from './baseField.js';
|
|
5
|
+
import 'react-hook-form';
|
|
6
|
+
|
|
7
|
+
type DateFieldProps = BaseField<Omit<DateFieldProps$1<Dayjs>, 'value' | 'onChange'>> & {
|
|
8
|
+
tabIndex?: number;
|
|
9
|
+
helperText?: ReactNode;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
value?: Date | null | undefined;
|
|
12
|
+
onChange?(value: Date | null | undefined): void;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { DateFieldProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { a } from './chunk-GUFT6XPG.js';
|
|
1
2
|
import { a as a$1, e } from './chunk-BH5YHBAI.js';
|
|
2
3
|
import { a as a$3, b as b$1 } from './chunk-OSDHZZEM.js';
|
|
3
4
|
import { q, s, a as a$2 } from './chunk-FDP5MHVS.js';
|
|
4
|
-
import { a } from './chunk-GUFT6XPG.js';
|
|
5
5
|
import { c } from './chunk-D27ND54J.js';
|
|
6
6
|
import A from '@mui/material/CssBaseline';
|
|
7
7
|
import { Experimental_CssVarsProvider, experimental_extendTheme, lighten, darken } from '@mui/material/styles';
|