@mui/x-date-pickers 9.9.0 → 9.10.0
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/CHANGELOG.md +111 -0
- package/DateCalendar/useIsDateDisabled.d.mts +1 -1
- package/DateCalendar/useIsDateDisabled.d.ts +1 -1
- package/DatePicker/shared.d.mts +2 -1
- package/DatePicker/shared.d.ts +2 -1
- package/DateTimePicker/DateTimePickerTabs.d.mts +4 -14
- package/DateTimePicker/DateTimePickerTabs.d.ts +4 -14
- package/DateTimePicker/DateTimePickerTabs.js +13 -9
- package/DateTimePicker/DateTimePickerTabs.mjs +13 -9
- package/DateTimePicker/shared.d.mts +3 -2
- package/DateTimePicker/shared.d.ts +3 -2
- package/DigitalClock/DigitalClock.d.mts +1 -1
- package/DigitalClock/DigitalClock.d.ts +1 -1
- package/PickersActionBar/PickersActionBar.d.mts +0 -3
- package/PickersActionBar/PickersActionBar.d.ts +0 -3
- package/PickersLayout/PickersLayout.d.mts +2 -2
- package/PickersLayout/PickersLayout.d.ts +2 -2
- package/PickersLayout/PickersLayout.types.d.mts +4 -4
- package/PickersLayout/PickersLayout.types.d.ts +4 -4
- package/PickersSectionList/PickersSectionList.d.mts +1 -1
- package/PickersSectionList/PickersSectionList.d.ts +1 -1
- package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.mts +11 -11
- package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +11 -11
- package/PickersTextField/PickersInput/pickersInputClasses.d.mts +11 -11
- package/PickersTextField/PickersInput/pickersInputClasses.d.ts +11 -11
- package/PickersTextField/PickersInputBase/PickersInputBase.d.mts +2 -2
- package/PickersTextField/PickersInputBase/PickersInputBase.d.ts +2 -2
- package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.mts +11 -11
- package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +11 -11
- package/PickersTextField/PickersTextField.d.mts +1 -1
- package/PickersTextField/PickersTextField.d.ts +1 -1
- package/PickersTextField/PickersTextField.types.d.mts +6 -5
- package/PickersTextField/PickersTextField.types.d.ts +6 -5
- package/TimeClock/ClockNumbers.d.mts +1 -1
- package/TimeClock/ClockNumbers.d.ts +1 -1
- package/TimePicker/shared.d.mts +2 -1
- package/TimePicker/shared.d.ts +2 -1
- package/YearCalendar/yearCalendarClasses.d.mts +1 -1
- package/YearCalendar/yearCalendarClasses.d.ts +1 -1
- package/hooks/useSplitFieldProps.d.mts +1 -1
- package/hooks/useSplitFieldProps.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/components/PickerFieldUI.d.mts +1 -1
- package/internals/components/PickerFieldUI.d.ts +1 -1
- package/internals/components/PickerPopper/PickerPopper.d.mts +2 -1
- package/internals/components/PickerPopper/PickerPopper.d.ts +2 -1
- package/internals/components/PickerPopper/pickerPopperClasses.d.mts +1 -1
- package/internals/components/PickerPopper/pickerPopperClasses.d.ts +1 -1
- package/internals/components/PickerViewRoot/PickerViewRoot.d.mts +1 -1
- package/internals/components/PickerViewRoot/PickerViewRoot.d.ts +1 -1
- package/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.d.mts +1 -1
- package/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.d.ts +1 -1
- package/internals/components/PickersModalDialog.d.mts +4 -3
- package/internals/components/PickersModalDialog.d.ts +4 -3
- package/internals/components/pickersToolbarClasses.d.mts +1 -1
- package/internals/components/pickersToolbarClasses.d.ts +1 -1
- package/internals/hooks/date-helpers-hooks.d.mts +1 -1
- package/internals/hooks/date-helpers-hooks.d.ts +1 -1
- package/internals/hooks/useField/useField.utils.d.mts +3 -3
- package/internals/hooks/useField/useField.utils.d.ts +3 -3
- package/internals/utils/date-utils.d.mts +2 -2
- package/internals/utils/date-utils.d.ts +2 -2
- package/internals/utils/time-utils.d.mts +2 -2
- package/internals/utils/time-utils.d.ts +2 -2
- package/locales/beBY.d.mts +5 -5
- package/locales/beBY.d.ts +5 -5
- package/locales/bgBG.d.mts +5 -5
- package/locales/bgBG.d.ts +5 -5
- package/locales/bnBD.d.mts +5 -5
- package/locales/bnBD.d.ts +5 -5
- package/locales/caES.d.mts +5 -5
- package/locales/caES.d.ts +5 -5
- package/locales/csCZ.d.mts +5 -5
- package/locales/csCZ.d.ts +5 -5
- package/locales/daDK.d.mts +5 -5
- package/locales/daDK.d.ts +5 -5
- package/locales/deDE.d.mts +5 -5
- package/locales/deDE.d.ts +5 -5
- package/locales/elGR.d.mts +5 -5
- package/locales/elGR.d.ts +5 -5
- package/locales/enUS.d.mts +5 -5
- package/locales/enUS.d.ts +5 -5
- package/locales/esES.d.mts +5 -5
- package/locales/esES.d.ts +5 -5
- package/locales/eu.d.mts +5 -5
- package/locales/eu.d.ts +5 -5
- package/locales/faIR.d.mts +5 -5
- package/locales/faIR.d.ts +5 -5
- package/locales/fiFI.d.mts +5 -5
- package/locales/fiFI.d.ts +5 -5
- package/locales/frFR.d.mts +5 -5
- package/locales/frFR.d.ts +5 -5
- package/locales/heIL.d.mts +5 -5
- package/locales/heIL.d.ts +5 -5
- package/locales/hrHR.d.mts +5 -5
- package/locales/hrHR.d.ts +5 -5
- package/locales/huHU.d.mts +5 -5
- package/locales/huHU.d.ts +5 -5
- package/locales/isIS.d.mts +5 -5
- package/locales/isIS.d.ts +5 -5
- package/locales/itIT.d.mts +5 -5
- package/locales/itIT.d.ts +5 -5
- package/locales/jaJP.d.mts +5 -5
- package/locales/jaJP.d.ts +5 -5
- package/locales/koKR.d.mts +5 -5
- package/locales/koKR.d.ts +5 -5
- package/locales/kzKZ.d.mts +5 -5
- package/locales/kzKZ.d.ts +5 -5
- package/locales/mk.d.mts +5 -5
- package/locales/mk.d.ts +5 -5
- package/locales/nbNO.d.mts +5 -5
- package/locales/nbNO.d.ts +5 -5
- package/locales/nlNL.d.mts +5 -5
- package/locales/nlNL.d.ts +5 -5
- package/locales/nnNO.d.mts +5 -5
- package/locales/nnNO.d.ts +5 -5
- package/locales/plPL.d.mts +5 -5
- package/locales/plPL.d.ts +5 -5
- package/locales/ptBR.d.mts +5 -5
- package/locales/ptBR.d.ts +5 -5
- package/locales/ptPT.d.mts +5 -5
- package/locales/ptPT.d.ts +5 -5
- package/locales/roRO.d.mts +5 -5
- package/locales/roRO.d.ts +5 -5
- package/locales/ruRU.d.mts +5 -5
- package/locales/ruRU.d.ts +5 -5
- package/locales/skSK.d.mts +5 -5
- package/locales/skSK.d.ts +5 -5
- package/locales/svSE.d.mts +5 -5
- package/locales/svSE.d.ts +5 -5
- package/locales/thTH.d.mts +5 -5
- package/locales/thTH.d.ts +5 -5
- package/locales/trTR.d.mts +5 -5
- package/locales/trTR.d.ts +5 -5
- package/locales/ukUA.d.mts +5 -5
- package/locales/ukUA.d.ts +5 -5
- package/locales/urPK.d.mts +5 -5
- package/locales/urPK.d.ts +5 -5
- package/locales/utils/getPickersLocalization.d.mts +5 -5
- package/locales/utils/getPickersLocalization.d.ts +5 -5
- package/locales/viVN.d.mts +5 -5
- package/locales/viVN.d.ts +5 -5
- package/locales/zhCN.d.mts +5 -5
- package/locales/zhCN.d.ts +5 -5
- package/locales/zhHK.d.mts +5 -5
- package/locales/zhHK.d.ts +5 -5
- package/locales/zhTW.d.mts +5 -5
- package/locales/zhTW.d.ts +5 -5
- package/package.json +2 -2
- package/timeViewRenderers/timeViewRenderers.d.mts +1 -1
- package/timeViewRenderers/timeViewRenderers.d.ts +1 -1
- package/validation/extractValidationProps.d.mts +1 -1
- package/validation/extractValidationProps.d.ts +1 -1
|
@@ -6,20 +6,20 @@ export interface PickersInputClasses extends PickersInputBaseClasses {
|
|
|
6
6
|
export type PickersInputClassKey = keyof PickersInputClasses;
|
|
7
7
|
export declare function getPickersInputUtilityClass(slot: string): string;
|
|
8
8
|
export declare const pickersInputClasses: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
sectionContent: string;
|
|
9
|
+
activeBar: string;
|
|
10
|
+
adornedEnd: string;
|
|
11
|
+
adornedStart: string;
|
|
13
12
|
disabled: string;
|
|
14
|
-
readOnly: string;
|
|
15
|
-
focused: string;
|
|
16
13
|
error: string;
|
|
14
|
+
focused: string;
|
|
15
|
+
input: string;
|
|
17
16
|
inputSizeSmall: string;
|
|
18
17
|
notchedOutline: string;
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
readOnly: string;
|
|
19
|
+
root: string;
|
|
21
20
|
sectionAfter: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
sectionBefore: string;
|
|
22
|
+
sectionContent: string;
|
|
23
|
+
sectionsContainer: string;
|
|
24
|
+
underline: string;
|
|
25
25
|
};
|
|
@@ -3,8 +3,8 @@ import type { PickersInputBaseProps } from "./PickersInputBase.types.mjs";
|
|
|
3
3
|
import type { PickerTextFieldOwnerState } from "../../models/fields.mjs";
|
|
4
4
|
export declare const PickersInputBaseRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
5
5
|
ownerState: PickerTextFieldOwnerState;
|
|
6
|
-
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.
|
|
7
|
-
export declare const PickersInputBaseSectionsContainer: import("@emotion/styled").StyledComponent<Pick<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.
|
|
6
|
+
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}>;
|
|
7
|
+
export declare const PickersInputBaseSectionsContainer: import("@emotion/styled").StyledComponent<Pick<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement> | keyof import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
8
8
|
ownerState: PickerTextFieldOwnerState;
|
|
9
9
|
}, {}, {}>;
|
|
10
10
|
/**
|
|
@@ -3,8 +3,8 @@ import type { PickersInputBaseProps } from "./PickersInputBase.types.js";
|
|
|
3
3
|
import type { PickerTextFieldOwnerState } from "../../models/fields.js";
|
|
4
4
|
export declare const PickersInputBaseRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
5
5
|
ownerState: PickerTextFieldOwnerState;
|
|
6
|
-
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.
|
|
7
|
-
export declare const PickersInputBaseSectionsContainer: import("@emotion/styled").StyledComponent<Pick<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.
|
|
6
|
+
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}>;
|
|
7
|
+
export declare const PickersInputBaseSectionsContainer: import("@emotion/styled").StyledComponent<Pick<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement> | keyof import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
8
8
|
ownerState: PickerTextFieldOwnerState;
|
|
9
9
|
}, {}, {}>;
|
|
10
10
|
/**
|
|
@@ -6,19 +6,19 @@ export interface PickersOutlinedInputClasses extends PickersInputBaseClasses {
|
|
|
6
6
|
export type PickersOutlinedInputClassKey = keyof PickersOutlinedInputClasses;
|
|
7
7
|
export declare function getPickersOutlinedInputUtilityClass(slot: string): string;
|
|
8
8
|
export declare const pickersOutlinedInputClasses: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
sectionContent: string;
|
|
9
|
+
activeBar: string;
|
|
10
|
+
adornedEnd: string;
|
|
11
|
+
adornedStart: string;
|
|
13
12
|
disabled: string;
|
|
14
|
-
readOnly: string;
|
|
15
|
-
focused: string;
|
|
16
13
|
error: string;
|
|
14
|
+
focused: string;
|
|
15
|
+
input: string;
|
|
17
16
|
inputSizeSmall: string;
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
notchedOutline: string;
|
|
18
|
+
readOnly: string;
|
|
19
|
+
root: string;
|
|
20
20
|
sectionAfter: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
sectionBefore: string;
|
|
22
|
+
sectionContent: string;
|
|
23
|
+
sectionsContainer: string;
|
|
24
24
|
};
|
|
@@ -6,19 +6,19 @@ export interface PickersOutlinedInputClasses extends PickersInputBaseClasses {
|
|
|
6
6
|
export type PickersOutlinedInputClassKey = keyof PickersOutlinedInputClasses;
|
|
7
7
|
export declare function getPickersOutlinedInputUtilityClass(slot: string): string;
|
|
8
8
|
export declare const pickersOutlinedInputClasses: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
sectionContent: string;
|
|
9
|
+
activeBar: string;
|
|
10
|
+
adornedEnd: string;
|
|
11
|
+
adornedStart: string;
|
|
13
12
|
disabled: string;
|
|
14
|
-
readOnly: string;
|
|
15
|
-
focused: string;
|
|
16
13
|
error: string;
|
|
14
|
+
focused: string;
|
|
15
|
+
input: string;
|
|
17
16
|
inputSizeSmall: string;
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
notchedOutline: string;
|
|
18
|
+
readOnly: string;
|
|
19
|
+
root: string;
|
|
20
20
|
sectionAfter: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
sectionBefore: string;
|
|
22
|
+
sectionContent: string;
|
|
23
|
+
sectionsContainer: string;
|
|
24
24
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const PickersTextField: React.ForwardRefExoticComponent<(Omit<import("./PickersTextField.types.mjs").
|
|
2
|
+
declare const PickersTextField: React.ForwardRefExoticComponent<(Omit<import("./PickersTextField.types.mjs").PickersFilledTextFieldProps, "ref"> | Omit<import("./PickersTextField.types.mjs").PickersOutlinedTextFieldProps, "ref"> | Omit<import("./PickersTextField.types.mjs").PickersStandardTextFieldProps, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
3
3
|
export { PickersTextField };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const PickersTextField: React.ForwardRefExoticComponent<(Omit<import("./PickersTextField.types.js").
|
|
2
|
+
declare const PickersTextField: React.ForwardRefExoticComponent<(Omit<import("./PickersTextField.types.js").PickersFilledTextFieldProps, "ref"> | Omit<import("./PickersTextField.types.js").PickersOutlinedTextFieldProps, "ref"> | Omit<import("./PickersTextField.types.js").PickersStandardTextFieldProps, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
3
3
|
export { PickersTextField };
|
|
@@ -3,6 +3,7 @@ import type { FormControlProps } from '@mui/material/FormControl';
|
|
|
3
3
|
import type { FormHelperTextProps } from '@mui/material/FormHelperText';
|
|
4
4
|
import type { InputLabelProps } from '@mui/material/InputLabel';
|
|
5
5
|
import type { TextFieldVariants } from '@mui/material/TextField';
|
|
6
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
6
7
|
import type { PickersInputBaseProps, PickersInputPropsUsedByField } from "./PickersInputBase/PickersInputBase.types.mjs";
|
|
7
8
|
import type { PickersInputProps } from "./PickersInput/index.mjs";
|
|
8
9
|
import type { PickersOutlinedInputProps } from "./PickersOutlinedInput/index.mjs";
|
|
@@ -36,11 +37,11 @@ export interface PickersTextFieldSlots {
|
|
|
36
37
|
formHelperText?: React.ElementType;
|
|
37
38
|
}
|
|
38
39
|
export interface PickersTextFieldSlotProps<InputPropsType extends PickersInputBaseProps> {
|
|
39
|
-
root?: Partial<FormControlProps
|
|
40
|
-
input?: Partial<InputPropsType
|
|
41
|
-
inputLabel?: Partial<InputLabelProps
|
|
42
|
-
htmlInput?: React.ComponentPropsWithRef<'input'
|
|
43
|
-
formHelperText?: Partial<FormHelperTextProps
|
|
40
|
+
root?: WithDataAttributes<Partial<FormControlProps>>;
|
|
41
|
+
input?: WithDataAttributes<Partial<InputPropsType>>;
|
|
42
|
+
inputLabel?: WithDataAttributes<Partial<InputLabelProps>>;
|
|
43
|
+
htmlInput?: WithDataAttributes<React.ComponentPropsWithRef<'input'>>;
|
|
44
|
+
formHelperText?: WithDataAttributes<Partial<FormHelperTextProps>>;
|
|
44
45
|
}
|
|
45
46
|
export interface PickersTextFieldSlotsAndSlotProps<InputPropsType extends PickersInputBaseProps> {
|
|
46
47
|
/**
|
|
@@ -3,6 +3,7 @@ import type { FormControlProps } from '@mui/material/FormControl';
|
|
|
3
3
|
import type { FormHelperTextProps } from '@mui/material/FormHelperText';
|
|
4
4
|
import type { InputLabelProps } from '@mui/material/InputLabel';
|
|
5
5
|
import type { TextFieldVariants } from '@mui/material/TextField';
|
|
6
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
6
7
|
import type { PickersInputBaseProps, PickersInputPropsUsedByField } from "./PickersInputBase/PickersInputBase.types.js";
|
|
7
8
|
import type { PickersInputProps } from "./PickersInput/index.js";
|
|
8
9
|
import type { PickersOutlinedInputProps } from "./PickersOutlinedInput/index.js";
|
|
@@ -36,11 +37,11 @@ export interface PickersTextFieldSlots {
|
|
|
36
37
|
formHelperText?: React.ElementType;
|
|
37
38
|
}
|
|
38
39
|
export interface PickersTextFieldSlotProps<InputPropsType extends PickersInputBaseProps> {
|
|
39
|
-
root?: Partial<FormControlProps
|
|
40
|
-
input?: Partial<InputPropsType
|
|
41
|
-
inputLabel?: Partial<InputLabelProps
|
|
42
|
-
htmlInput?: React.ComponentPropsWithRef<'input'
|
|
43
|
-
formHelperText?: Partial<FormHelperTextProps
|
|
40
|
+
root?: WithDataAttributes<Partial<FormControlProps>>;
|
|
41
|
+
input?: WithDataAttributes<Partial<InputPropsType>>;
|
|
42
|
+
inputLabel?: WithDataAttributes<Partial<InputLabelProps>>;
|
|
43
|
+
htmlInput?: WithDataAttributes<React.ComponentPropsWithRef<'input'>>;
|
|
44
|
+
formHelperText?: WithDataAttributes<Partial<FormHelperTextProps>>;
|
|
44
45
|
}
|
|
45
46
|
export interface PickersTextFieldSlotsAndSlotProps<InputPropsType extends PickersInputBaseProps> {
|
|
46
47
|
/**
|
|
@@ -31,7 +31,7 @@ export declare const getMinutesNumbers: ({
|
|
|
31
31
|
isDisabled,
|
|
32
32
|
getClockNumberText,
|
|
33
33
|
selectedId
|
|
34
|
-
}: Omit<GetHourNumbersOptions,
|
|
34
|
+
}: Omit<GetHourNumbersOptions, 'ampm' | 'value'> & {
|
|
35
35
|
value: number;
|
|
36
36
|
}) => React.JSX.Element[];
|
|
37
37
|
export {};
|
|
@@ -31,7 +31,7 @@ export declare const getMinutesNumbers: ({
|
|
|
31
31
|
isDisabled,
|
|
32
32
|
getClockNumberText,
|
|
33
33
|
selectedId
|
|
34
|
-
}: Omit<GetHourNumbersOptions,
|
|
34
|
+
}: Omit<GetHourNumbersOptions, 'ampm' | 'value'> & {
|
|
35
35
|
value: number;
|
|
36
36
|
}) => React.JSX.Element[];
|
|
37
37
|
export {};
|
package/TimePicker/shared.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { DefaultizedProps } from '@mui/x-internals/types';
|
|
3
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
3
4
|
import type { TimeClockSlots, TimeClockSlotProps } from "../TimeClock/TimeClock.types.mjs";
|
|
4
5
|
import type { BasePickerInputProps } from "../internals/models/props/basePickerProps.mjs";
|
|
5
6
|
import type { LocalizedComponent } from "../locales/utils/pickersLocaleTextApi.mjs";
|
|
@@ -18,7 +19,7 @@ export interface BaseTimePickerSlots extends TimeClockSlots {
|
|
|
18
19
|
toolbar?: React.JSXElementConstructor<TimePickerToolbarProps>;
|
|
19
20
|
}
|
|
20
21
|
export interface BaseTimePickerSlotProps extends TimeClockSlotProps {
|
|
21
|
-
toolbar?: ExportedTimePickerToolbarProps
|
|
22
|
+
toolbar?: WithDataAttributes<ExportedTimePickerToolbarProps>;
|
|
22
23
|
}
|
|
23
24
|
export type TimePickerViewRenderers<TView extends TimeViewWithMeridiem> = PickerViewRendererLookup<PickerValue, TView, TimeViewRendererProps<TView, BaseClockProps<TView>>>;
|
|
24
25
|
export interface BaseTimePickerProps<TView extends TimeViewWithMeridiem> extends BasePickerInputProps<PickerValue, TView, TimeValidationError>, ExportedBaseClockProps {
|
package/TimePicker/shared.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { DefaultizedProps } from '@mui/x-internals/types';
|
|
3
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
3
4
|
import type { TimeClockSlots, TimeClockSlotProps } from "../TimeClock/TimeClock.types.js";
|
|
4
5
|
import type { BasePickerInputProps } from "../internals/models/props/basePickerProps.js";
|
|
5
6
|
import type { LocalizedComponent } from "../locales/utils/pickersLocaleTextApi.js";
|
|
@@ -18,7 +19,7 @@ export interface BaseTimePickerSlots extends TimeClockSlots {
|
|
|
18
19
|
toolbar?: React.JSXElementConstructor<TimePickerToolbarProps>;
|
|
19
20
|
}
|
|
20
21
|
export interface BaseTimePickerSlotProps extends TimeClockSlotProps {
|
|
21
|
-
toolbar?: ExportedTimePickerToolbarProps
|
|
22
|
+
toolbar?: WithDataAttributes<ExportedTimePickerToolbarProps>;
|
|
22
23
|
}
|
|
23
24
|
export type TimePickerViewRenderers<TView extends TimeViewWithMeridiem> = PickerViewRendererLookup<PickerValue, TView, TimeViewRendererProps<TView, BaseClockProps<TView>>>;
|
|
24
25
|
export interface BaseTimePickerProps<TView extends TimeViewWithMeridiem> extends BasePickerInputProps<PickerValue, TView, TimeValidationError>, ExportedBaseClockProps {
|
|
@@ -10,4 +10,4 @@ export interface YearCalendarClasses {
|
|
|
10
10
|
}
|
|
11
11
|
export type YearCalendarClassKey = keyof YearCalendarClasses;
|
|
12
12
|
export declare function getYearCalendarUtilityClass(slot: string): string;
|
|
13
|
-
export declare const yearCalendarClasses: Record<"
|
|
13
|
+
export declare const yearCalendarClasses: Record<"button" | "disabled" | "root" | "selected", string>;
|
|
@@ -10,4 +10,4 @@ export interface YearCalendarClasses {
|
|
|
10
10
|
}
|
|
11
11
|
export type YearCalendarClassKey = keyof YearCalendarClasses;
|
|
12
12
|
export declare function getYearCalendarUtilityClass(slot: string): string;
|
|
13
|
-
export declare const yearCalendarClasses: Record<"
|
|
13
|
+
export declare const yearCalendarClasses: Record<"button" | "disabled" | "root" | "selected", string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DATE_TIME_VALIDATION_PROP_NAMES, DATE_VALIDATION_PROP_NAMES, TIME_VALIDATION_PROP_NAMES } from "../validation/extractValidationProps.mjs";
|
|
2
2
|
import type { PickerValueType } from "../models/common.mjs";
|
|
3
|
-
declare const SHARED_FIELD_INTERNAL_PROP_NAMES: readonly [
|
|
3
|
+
declare const SHARED_FIELD_INTERNAL_PROP_NAMES: readonly ['value', 'defaultValue', 'referenceDate', 'format', 'formatDensity', 'onChange', 'timezone', 'onError', 'shouldRespectLeadingZeros', 'selectedSections', 'onSelectedSectionsChange', 'fieldRef', 'startFieldRef', 'endFieldRef', 'disabled', 'readOnly', 'dateSeparator', 'autoFocus', 'focused'];
|
|
4
4
|
export type InternalPropNames<TValueType extends PickerValueType> = (typeof SHARED_FIELD_INTERNAL_PROP_NAMES)[number] | (TValueType extends 'date' | 'date-time' ? (typeof DATE_VALIDATION_PROP_NAMES)[number] : never) | (TValueType extends 'time' | 'date-time' ? (typeof TIME_VALIDATION_PROP_NAMES)[number] : never) | (TValueType extends 'date-time' ? (typeof DATE_TIME_VALIDATION_PROP_NAMES)[number] : never);
|
|
5
5
|
/**
|
|
6
6
|
* Split the props received by the field component into:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DATE_TIME_VALIDATION_PROP_NAMES, DATE_VALIDATION_PROP_NAMES, TIME_VALIDATION_PROP_NAMES } from "../validation/extractValidationProps.js";
|
|
2
2
|
import type { PickerValueType } from "../models/common.js";
|
|
3
|
-
declare const SHARED_FIELD_INTERNAL_PROP_NAMES: readonly [
|
|
3
|
+
declare const SHARED_FIELD_INTERNAL_PROP_NAMES: readonly ['value', 'defaultValue', 'referenceDate', 'format', 'formatDensity', 'onChange', 'timezone', 'onError', 'shouldRespectLeadingZeros', 'selectedSections', 'onSelectedSectionsChange', 'fieldRef', 'startFieldRef', 'endFieldRef', 'disabled', 'readOnly', 'dateSeparator', 'autoFocus', 'focused'];
|
|
4
4
|
export type InternalPropNames<TValueType extends PickerValueType> = (typeof SHARED_FIELD_INTERNAL_PROP_NAMES)[number] | (TValueType extends 'date' | 'date-time' ? (typeof DATE_VALIDATION_PROP_NAMES)[number] : never) | (TValueType extends 'time' | 'date-time' ? (typeof TIME_VALIDATION_PROP_NAMES)[number] : never) | (TValueType extends 'date-time' ? (typeof DATE_TIME_VALIDATION_PROP_NAMES)[number] : never);
|
|
5
5
|
/**
|
|
6
6
|
* Split the props received by the field component into:
|
package/index.js
CHANGED
package/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import type { UseFieldReturnValue, UseFieldProps } from "../hooks/useField/index
|
|
|
9
9
|
import type { PickersTextFieldProps } from "../../PickersTextField/index.mjs";
|
|
10
10
|
export declare const cleanFieldResponse: <TFieldResponse extends MakeOptional<UseFieldReturnValue<ExportedPickerFieldUIProps & {
|
|
11
11
|
[key: string]: any;
|
|
12
|
-
}>,
|
|
12
|
+
}>, 'onClear' | 'clearable'>>(fieldResponse: TFieldResponse) => ExportedPickerFieldUIProps & {
|
|
13
13
|
openPickerAriaLabel: string;
|
|
14
14
|
textFieldProps: Partial<PickersTextFieldProps>;
|
|
15
15
|
};
|
|
@@ -9,7 +9,7 @@ import type { UseFieldReturnValue, UseFieldProps } from "../hooks/useField/index
|
|
|
9
9
|
import type { PickersTextFieldProps } from "../../PickersTextField/index.js";
|
|
10
10
|
export declare const cleanFieldResponse: <TFieldResponse extends MakeOptional<UseFieldReturnValue<ExportedPickerFieldUIProps & {
|
|
11
11
|
[key: string]: any;
|
|
12
|
-
}>,
|
|
12
|
+
}>, 'onClear' | 'clearable'>>(fieldResponse: TFieldResponse) => ExportedPickerFieldUIProps & {
|
|
13
13
|
openPickerAriaLabel: string;
|
|
14
14
|
textFieldProps: Partial<PickersTextFieldProps>;
|
|
15
15
|
};
|
|
@@ -4,6 +4,7 @@ import type { PopperProps as MuiPopperProps, PopperPlacementType, PopperProps }
|
|
|
4
4
|
import type { TrapFocusProps as MuiTrapFocusProps } from '@mui/material/Unstable_TrapFocus';
|
|
5
5
|
import type { TransitionProps as MuiTransitionProps } from '@mui/material/transitions';
|
|
6
6
|
import type { SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
7
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
7
8
|
import type { PickerPopperClasses } from "./pickerPopperClasses.mjs";
|
|
8
9
|
import type { PickerOwnerState } from "../../../models/index.mjs";
|
|
9
10
|
export interface PickerPopperOwnerState extends PickerOwnerState {
|
|
@@ -39,7 +40,7 @@ export interface PickerPopperSlotProps {
|
|
|
39
40
|
/**
|
|
40
41
|
* Props passed down to the desktop [Transition](https://mui.com/material-ui/transitions/) component.
|
|
41
42
|
*/
|
|
42
|
-
desktopTransition?: Partial<MuiTransitionProps
|
|
43
|
+
desktopTransition?: WithDataAttributes<Partial<MuiTransitionProps>>;
|
|
43
44
|
/**
|
|
44
45
|
* Props passed down to the [FocusTrap](https://mui.com/base-ui/react-focus-trap/) component on desktop.
|
|
45
46
|
*/
|
|
@@ -4,6 +4,7 @@ import type { PopperProps as MuiPopperProps, PopperPlacementType, PopperProps }
|
|
|
4
4
|
import type { TrapFocusProps as MuiTrapFocusProps } from '@mui/material/Unstable_TrapFocus';
|
|
5
5
|
import type { TransitionProps as MuiTransitionProps } from '@mui/material/transitions';
|
|
6
6
|
import type { SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
7
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
7
8
|
import type { PickerPopperClasses } from "./pickerPopperClasses.js";
|
|
8
9
|
import type { PickerOwnerState } from "../../../models/index.js";
|
|
9
10
|
export interface PickerPopperOwnerState extends PickerOwnerState {
|
|
@@ -39,7 +40,7 @@ export interface PickerPopperSlotProps {
|
|
|
39
40
|
/**
|
|
40
41
|
* Props passed down to the desktop [Transition](https://mui.com/material-ui/transitions/) component.
|
|
41
42
|
*/
|
|
42
|
-
desktopTransition?: Partial<MuiTransitionProps
|
|
43
|
+
desktopTransition?: WithDataAttributes<Partial<MuiTransitionProps>>;
|
|
43
44
|
/**
|
|
44
45
|
* Props passed down to the [FocusTrap](https://mui.com/base-ui/react-focus-trap/) component on desktop.
|
|
45
46
|
*/
|
|
@@ -6,4 +6,4 @@ export interface PickerPopperClasses {
|
|
|
6
6
|
}
|
|
7
7
|
export type PickerPopperClassKey = keyof PickerPopperClasses;
|
|
8
8
|
export declare function getPickerPopperUtilityClass(slot: string): string;
|
|
9
|
-
export declare const pickerPopperClasses: Record<"
|
|
9
|
+
export declare const pickerPopperClasses: Record<"paper" | "root", string>;
|
|
@@ -6,4 +6,4 @@ export interface PickerPopperClasses {
|
|
|
6
6
|
}
|
|
7
7
|
export type PickerPopperClassKey = keyof PickerPopperClasses;
|
|
8
8
|
export declare function getPickerPopperUtilityClass(slot: string): string;
|
|
9
|
-
export declare const pickerPopperClasses: Record<"
|
|
9
|
+
export declare const pickerPopperClasses: Record<"paper" | "root", string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PickerViewRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").
|
|
1
|
+
export declare const PickerViewRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PickerViewRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").
|
|
1
|
+
export declare const PickerViewRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -16,4 +16,4 @@ export interface PickersArrowSwitcherClasses {
|
|
|
16
16
|
}
|
|
17
17
|
export type PickersArrowSwitcherClassKey = keyof PickersArrowSwitcherClasses;
|
|
18
18
|
export declare function getPickersArrowSwitcherUtilityClass(slot: string): string;
|
|
19
|
-
export declare const pickersArrowSwitcherClasses: Record<"
|
|
19
|
+
export declare const pickersArrowSwitcherClasses: Record<"button" | "leftArrowIcon" | "nextIconButton" | "previousIconButton" | "rightArrowIcon" | "root" | "spacer", string>;
|
|
@@ -16,4 +16,4 @@ export interface PickersArrowSwitcherClasses {
|
|
|
16
16
|
}
|
|
17
17
|
export type PickersArrowSwitcherClassKey = keyof PickersArrowSwitcherClasses;
|
|
18
18
|
export declare function getPickersArrowSwitcherUtilityClass(slot: string): string;
|
|
19
|
-
export declare const pickersArrowSwitcherClasses: Record<"
|
|
19
|
+
export declare const pickersArrowSwitcherClasses: Record<"button" | "leftArrowIcon" | "nextIconButton" | "previousIconButton" | "rightArrowIcon" | "root" | "spacer", string>;
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import type { DialogProps as MuiDialogProps } from '@mui/material/Dialog';
|
|
3
3
|
import type { PaperProps as MuiPaperProps } from '@mui/material/Paper';
|
|
4
4
|
import type { TransitionProps as MuiTransitionProps } from '@mui/material/transitions';
|
|
5
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
5
6
|
export interface PickersModalDialogSlots {
|
|
6
7
|
/**
|
|
7
8
|
* Custom component for the dialog inside which the views are rendered on mobile.
|
|
@@ -23,15 +24,15 @@ export interface PickersModalDialogSlotProps {
|
|
|
23
24
|
/**
|
|
24
25
|
* Props passed down to the [`Dialog`](https://mui.com/material-ui/api/dialog/) component.
|
|
25
26
|
*/
|
|
26
|
-
dialog?: Partial<MuiDialogProps
|
|
27
|
+
dialog?: WithDataAttributes<Partial<MuiDialogProps>>;
|
|
27
28
|
/**
|
|
28
29
|
* Props passed down to the mobile [Paper](https://mui.com/material-ui/api/paper/) component.
|
|
29
30
|
*/
|
|
30
|
-
mobilePaper?: Partial<MuiPaperProps
|
|
31
|
+
mobilePaper?: WithDataAttributes<Partial<MuiPaperProps>>;
|
|
31
32
|
/**
|
|
32
33
|
* Props passed down to the mobile [Transition](https://mui.com/material-ui/transitions/) component.
|
|
33
34
|
*/
|
|
34
|
-
mobileTransition?: Partial<MuiTransitionProps
|
|
35
|
+
mobileTransition?: WithDataAttributes<Partial<MuiTransitionProps>>;
|
|
35
36
|
}
|
|
36
37
|
export interface PickersModalDialogProps {
|
|
37
38
|
/**
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import type { DialogProps as MuiDialogProps } from '@mui/material/Dialog';
|
|
3
3
|
import type { PaperProps as MuiPaperProps } from '@mui/material/Paper';
|
|
4
4
|
import type { TransitionProps as MuiTransitionProps } from '@mui/material/transitions';
|
|
5
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
5
6
|
export interface PickersModalDialogSlots {
|
|
6
7
|
/**
|
|
7
8
|
* Custom component for the dialog inside which the views are rendered on mobile.
|
|
@@ -23,15 +24,15 @@ export interface PickersModalDialogSlotProps {
|
|
|
23
24
|
/**
|
|
24
25
|
* Props passed down to the [`Dialog`](https://mui.com/material-ui/api/dialog/) component.
|
|
25
26
|
*/
|
|
26
|
-
dialog?: Partial<MuiDialogProps
|
|
27
|
+
dialog?: WithDataAttributes<Partial<MuiDialogProps>>;
|
|
27
28
|
/**
|
|
28
29
|
* Props passed down to the mobile [Paper](https://mui.com/material-ui/api/paper/) component.
|
|
29
30
|
*/
|
|
30
|
-
mobilePaper?: Partial<MuiPaperProps
|
|
31
|
+
mobilePaper?: WithDataAttributes<Partial<MuiPaperProps>>;
|
|
31
32
|
/**
|
|
32
33
|
* Props passed down to the mobile [Transition](https://mui.com/material-ui/transitions/) component.
|
|
33
34
|
*/
|
|
34
|
-
mobileTransition?: Partial<MuiTransitionProps
|
|
35
|
+
mobileTransition?: WithDataAttributes<Partial<MuiTransitionProps>>;
|
|
35
36
|
}
|
|
36
37
|
export interface PickersModalDialogProps {
|
|
37
38
|
/**
|
|
@@ -8,4 +8,4 @@ export interface PickersToolbarClasses {
|
|
|
8
8
|
}
|
|
9
9
|
export type PickersToolbarClassKey = keyof PickersToolbarClasses;
|
|
10
10
|
export declare function getPickersToolbarUtilityClass(slot: string): string;
|
|
11
|
-
export declare const pickersToolbarClasses: Record<"
|
|
11
|
+
export declare const pickersToolbarClasses: Record<"content" | "root" | "title", string>;
|
|
@@ -8,4 +8,4 @@ export interface PickersToolbarClasses {
|
|
|
8
8
|
}
|
|
9
9
|
export type PickersToolbarClassKey = keyof PickersToolbarClasses;
|
|
10
10
|
export declare function getPickersToolbarUtilityClass(slot: string): string;
|
|
11
|
-
export declare const pickersToolbarClasses: Record<"
|
|
11
|
+
export declare const pickersToolbarClasses: Record<"content" | "root" | "title", string>;
|
|
@@ -20,5 +20,5 @@ export declare function usePreviousMonthDisabled(month: PickerValidDate, {
|
|
|
20
20
|
}: Pick<MonthValidationOptions, 'disablePast' | 'minDate' | 'timezone'>): boolean;
|
|
21
21
|
export declare function useMeridiemMode(date: PickerValidDate | null, ampm: boolean | undefined, onChange: PickerOnChangeFn, selectionState?: PickerSelectionState): {
|
|
22
22
|
meridiemMode: import("../utils/time-utils.mjs").Meridiem | null;
|
|
23
|
-
handleMeridiemChange: (mode:
|
|
23
|
+
handleMeridiemChange: (mode: 'am' | 'pm') => void;
|
|
24
24
|
};
|
|
@@ -20,5 +20,5 @@ export declare function usePreviousMonthDisabled(month: PickerValidDate, {
|
|
|
20
20
|
}: Pick<MonthValidationOptions, 'disablePast' | 'minDate' | 'timezone'>): boolean;
|
|
21
21
|
export declare function useMeridiemMode(date: PickerValidDate | null, ampm: boolean | undefined, onChange: PickerOnChangeFn, selectionState?: PickerSelectionState): {
|
|
22
22
|
meridiemMode: import("../utils/time-utils.js").Meridiem | null;
|
|
23
|
-
handleMeridiemChange: (mode:
|
|
23
|
+
handleMeridiemChange: (mode: 'am' | 'pm') => void;
|
|
24
24
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FieldSectionsValueBoundaries, SectionOrdering, FieldSectionValueBoundaries, FieldParsedSelectedSections } from "./useField.types.mjs";
|
|
2
2
|
import type { FieldSectionType, FieldSection, MuiPickersAdapter, FieldSectionContentType, PickersTimezone, PickerValidDate, FieldSelectedSections, PickerValueType, InferFieldSection } from "../../../models/index.mjs";
|
|
3
3
|
import type { PickerValidValue } from "../../models/index.mjs";
|
|
4
|
-
export declare const getDateSectionConfigFromFormatToken: (adapter: MuiPickersAdapter, formatToken: string) => Pick<FieldSection,
|
|
4
|
+
export declare const getDateSectionConfigFromFormatToken: (adapter: MuiPickersAdapter, formatToken: string) => Pick<FieldSection, 'type' | 'contentType'> & {
|
|
5
5
|
maxLength: number | undefined;
|
|
6
6
|
};
|
|
7
7
|
export declare const getDaysInWeekStr: (adapter: MuiPickersAdapter, format: string) => string[];
|
|
@@ -16,8 +16,8 @@ export declare const isStringNumber: (valueStr: string, localizedDigits: string[
|
|
|
16
16
|
* Warning: Should only be called with non-localized digits. Call `removeLocalizedDigits` with your value if needed.
|
|
17
17
|
*/
|
|
18
18
|
export declare const cleanLeadingZeros: (valueStr: string, size: number) => string;
|
|
19
|
-
export declare const cleanDigitSectionValue: (adapter: MuiPickersAdapter, value: number, sectionBoundaries: FieldSectionValueBoundaries<any>, localizedDigits: string[], section: Pick<FieldSection,
|
|
20
|
-
export declare const getSectionVisibleValue: (section: FieldSection, target:
|
|
19
|
+
export declare const cleanDigitSectionValue: (adapter: MuiPickersAdapter, value: number, sectionBoundaries: FieldSectionValueBoundaries<any>, localizedDigits: string[], section: Pick<FieldSection, 'format' | 'type' | 'contentType' | 'hasLeadingZerosInFormat' | 'hasLeadingZerosInInput' | 'maxLength'>) => string;
|
|
20
|
+
export declare const getSectionVisibleValue: (section: FieldSection, target: 'input-rtl' | 'input-ltr' | 'non-input', localizedDigits: string[]) => string;
|
|
21
21
|
export declare const changeSectionValueFormat: (adapter: MuiPickersAdapter, valueStr: string, currentFormat: string, newFormat: string) => string;
|
|
22
22
|
export declare const doesSectionFormatHaveLeadingZeros: (adapter: MuiPickersAdapter, contentType: FieldSectionContentType, sectionType: FieldSectionType, format: string) => boolean;
|
|
23
23
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FieldSectionsValueBoundaries, SectionOrdering, FieldSectionValueBoundaries, FieldParsedSelectedSections } from "./useField.types.js";
|
|
2
2
|
import type { FieldSectionType, FieldSection, MuiPickersAdapter, FieldSectionContentType, PickersTimezone, PickerValidDate, FieldSelectedSections, PickerValueType, InferFieldSection } from "../../../models/index.js";
|
|
3
3
|
import type { PickerValidValue } from "../../models/index.js";
|
|
4
|
-
export declare const getDateSectionConfigFromFormatToken: (adapter: MuiPickersAdapter, formatToken: string) => Pick<FieldSection,
|
|
4
|
+
export declare const getDateSectionConfigFromFormatToken: (adapter: MuiPickersAdapter, formatToken: string) => Pick<FieldSection, 'type' | 'contentType'> & {
|
|
5
5
|
maxLength: number | undefined;
|
|
6
6
|
};
|
|
7
7
|
export declare const getDaysInWeekStr: (adapter: MuiPickersAdapter, format: string) => string[];
|
|
@@ -16,8 +16,8 @@ export declare const isStringNumber: (valueStr: string, localizedDigits: string[
|
|
|
16
16
|
* Warning: Should only be called with non-localized digits. Call `removeLocalizedDigits` with your value if needed.
|
|
17
17
|
*/
|
|
18
18
|
export declare const cleanLeadingZeros: (valueStr: string, size: number) => string;
|
|
19
|
-
export declare const cleanDigitSectionValue: (adapter: MuiPickersAdapter, value: number, sectionBoundaries: FieldSectionValueBoundaries<any>, localizedDigits: string[], section: Pick<FieldSection,
|
|
20
|
-
export declare const getSectionVisibleValue: (section: FieldSection, target:
|
|
19
|
+
export declare const cleanDigitSectionValue: (adapter: MuiPickersAdapter, value: number, sectionBoundaries: FieldSectionValueBoundaries<any>, localizedDigits: string[], section: Pick<FieldSection, 'format' | 'type' | 'contentType' | 'hasLeadingZerosInFormat' | 'hasLeadingZerosInInput' | 'maxLength'>) => string;
|
|
20
|
+
export declare const getSectionVisibleValue: (section: FieldSection, target: 'input-rtl' | 'input-ltr' | 'non-input', localizedDigits: string[]) => string;
|
|
21
21
|
export declare const changeSectionValueFormat: (adapter: MuiPickersAdapter, valueStr: string, currentFormat: string, newFormat: string) => string;
|
|
22
22
|
export declare const doesSectionFormatHaveLeadingZeros: (adapter: MuiPickersAdapter, contentType: FieldSectionContentType, sectionType: FieldSectionType, format: string) => boolean;
|
|
23
23
|
/**
|
|
@@ -26,8 +26,8 @@ export declare const applyDefaultDate: (adapter: MuiPickersAdapter, value: Picke
|
|
|
26
26
|
export declare const areDatesEqual: (adapter: MuiPickersAdapter, a: PickerValidDate | null, b: PickerValidDate | null) => boolean;
|
|
27
27
|
export declare const getMonthsInYear: (adapter: MuiPickersAdapter, year: PickerValidDate) => PickerValidDate[];
|
|
28
28
|
export declare const getTodayDate: (adapter: MuiPickersAdapter, timezone: PickersTimezone, valueType?: PickerValueType) => PickerValidDate;
|
|
29
|
-
export declare const formatMeridiem: (adapter: MuiPickersAdapter, meridiem:
|
|
30
|
-
export declare const DATE_VIEWS: readonly [
|
|
29
|
+
export declare const formatMeridiem: (adapter: MuiPickersAdapter, meridiem: 'am' | 'pm') => string;
|
|
30
|
+
export declare const DATE_VIEWS: readonly ['year', 'month', 'day'];
|
|
31
31
|
export declare const isDatePickerView: (view: DateOrTimeViewWithMeridiem) => view is DateView;
|
|
32
32
|
export declare const resolveDateFormat: (adapter: MuiPickersAdapter, {
|
|
33
33
|
format,
|
|
@@ -26,8 +26,8 @@ export declare const applyDefaultDate: (adapter: MuiPickersAdapter, value: Picke
|
|
|
26
26
|
export declare const areDatesEqual: (adapter: MuiPickersAdapter, a: PickerValidDate | null, b: PickerValidDate | null) => boolean;
|
|
27
27
|
export declare const getMonthsInYear: (adapter: MuiPickersAdapter, year: PickerValidDate) => PickerValidDate[];
|
|
28
28
|
export declare const getTodayDate: (adapter: MuiPickersAdapter, timezone: PickersTimezone, valueType?: PickerValueType) => PickerValidDate;
|
|
29
|
-
export declare const formatMeridiem: (adapter: MuiPickersAdapter, meridiem:
|
|
30
|
-
export declare const DATE_VIEWS: readonly [
|
|
29
|
+
export declare const formatMeridiem: (adapter: MuiPickersAdapter, meridiem: 'am' | 'pm') => string;
|
|
30
|
+
export declare const DATE_VIEWS: readonly ['year', 'month', 'day'];
|
|
31
31
|
export declare const isDatePickerView: (view: DateOrTimeViewWithMeridiem) => view is DateView;
|
|
32
32
|
export declare const resolveDateFormat: (adapter: MuiPickersAdapter, {
|
|
33
33
|
format,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MuiPickersAdapter, PickerValidDate } from "../../models/index.mjs";
|
|
2
2
|
import type { DateOrTimeViewWithMeridiem, TimeViewWithMeridiem } from "../models/index.mjs";
|
|
3
|
-
export declare const EXPORTED_TIME_VIEWS: readonly [
|
|
4
|
-
export declare const TIME_VIEWS: readonly [
|
|
3
|
+
export declare const EXPORTED_TIME_VIEWS: readonly ['hours', 'minutes', 'seconds'];
|
|
4
|
+
export declare const TIME_VIEWS: readonly ['hours', 'minutes', 'seconds', 'meridiem'];
|
|
5
5
|
export declare const isTimeView: (view: DateOrTimeViewWithMeridiem) => boolean;
|
|
6
6
|
export declare const isInternalTimeView: (view: DateOrTimeViewWithMeridiem) => view is TimeViewWithMeridiem;
|
|
7
7
|
export type Meridiem = 'am' | 'pm';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MuiPickersAdapter, PickerValidDate } from "../../models/index.js";
|
|
2
2
|
import type { DateOrTimeViewWithMeridiem, TimeViewWithMeridiem } from "../models/index.js";
|
|
3
|
-
export declare const EXPORTED_TIME_VIEWS: readonly [
|
|
4
|
-
export declare const TIME_VIEWS: readonly [
|
|
3
|
+
export declare const EXPORTED_TIME_VIEWS: readonly ['hours', 'minutes', 'seconds'];
|
|
4
|
+
export declare const TIME_VIEWS: readonly ['hours', 'minutes', 'seconds', 'meridiem'];
|
|
5
5
|
export declare const isTimeView: (view: DateOrTimeViewWithMeridiem) => boolean;
|
|
6
6
|
export declare const isInternalTimeView: (view: DateOrTimeViewWithMeridiem) => view is TimeViewWithMeridiem;
|
|
7
7
|
export type Meridiem = 'am' | 'pm';
|