From 2aea120b6a3f08f02b3de5d9aa6341336c1485eb Mon Sep 17 00:00:00 2001 From: delangle Date: Thu, 5 Sep 2024 09:06:44 +0200 Subject: [PATCH 1/2] [pickers] Improve onError JSDoc --- .../api-docs/date-pickers/date-field/date-field.json | 6 +++--- .../date-pickers/date-picker/date-picker.json | 6 +++--- .../date-range-picker/date-range-picker.json | 6 +++--- .../date-time-field/date-time-field.json | 6 +++--- .../date-time-picker/date-time-picker.json | 6 +++--- .../date-time-range-picker.json | 6 +++--- .../desktop-date-picker/desktop-date-picker.json | 6 +++--- .../desktop-date-range-picker.json | 6 +++--- .../desktop-date-time-picker.json | 6 +++--- .../desktop-date-time-range-picker.json | 6 +++--- .../desktop-time-picker/desktop-time-picker.json | 6 +++--- .../mobile-date-picker/mobile-date-picker.json | 6 +++--- .../mobile-date-range-picker.json | 6 +++--- .../mobile-date-time-picker.json | 6 +++--- .../mobile-date-time-range-picker.json | 6 +++--- .../mobile-time-picker/mobile-time-picker.json | 6 +++--- .../multi-input-date-range-field.json | 6 +++--- .../multi-input-date-time-range-field.json | 6 +++--- .../multi-input-time-range-field.json | 6 +++--- .../single-input-date-range-field.json | 6 +++--- .../single-input-date-time-range-field.json | 6 +++--- .../single-input-time-range-field.json | 6 +++--- .../static-date-picker/static-date-picker.json | 6 +++--- .../static-date-range-picker.json | 6 +++--- .../static-date-time-picker.json | 6 +++--- .../static-time-picker/static-time-picker.json | 6 +++--- .../api-docs/date-pickers/time-field/time-field.json | 6 +++--- .../date-pickers/time-picker/time-picker.json | 6 +++--- .../src/DateRangePicker/DateRangePicker.tsx | 10 +++++----- .../src/DateTimeRangePicker/DateTimeRangePicker.tsx | 10 +++++----- .../DesktopDateRangePicker.tsx | 10 +++++----- .../DesktopDateTimeRangePicker.tsx | 10 +++++----- .../MobileDateRangePicker/MobileDateRangePicker.tsx | 10 +++++----- .../MobileDateTimeRangePicker.tsx | 10 +++++----- .../MultiInputDateRangeField.tsx | 8 +++++--- .../MultiInputDateTimeRangeField.tsx | 8 +++++--- .../MultiInputTimeRangeField.tsx | 8 +++++--- .../SingleInputDateRangeField.tsx | 8 +++++--- .../SingleInputDateTimeRangeField.tsx | 8 +++++--- .../SingleInputTimeRangeField.tsx | 8 +++++--- .../StaticDateRangePicker/StaticDateRangePicker.tsx | 10 +++++----- packages/x-date-pickers/src/DateField/DateField.tsx | 8 +++++--- .../x-date-pickers/src/DatePicker/DatePicker.tsx | 10 +++++----- .../src/DateTimeField/DateTimeField.tsx | 8 +++++--- .../src/DateTimePicker/DateTimePicker.tsx | 10 +++++----- .../src/DesktopDatePicker/DesktopDatePicker.tsx | 10 +++++----- .../DesktopDateTimePicker/DesktopDateTimePicker.tsx | 10 +++++----- .../src/DesktopTimePicker/DesktopTimePicker.tsx | 10 +++++----- .../src/MobileDatePicker/MobileDatePicker.tsx | 10 +++++----- .../MobileDateTimePicker/MobileDateTimePicker.tsx | 10 +++++----- .../src/MobileTimePicker/MobileTimePicker.tsx | 10 +++++----- .../src/StaticDatePicker/StaticDatePicker.tsx | 10 +++++----- .../StaticDateTimePicker/StaticDateTimePicker.tsx | 10 +++++----- .../src/StaticTimePicker/StaticTimePicker.tsx | 10 +++++----- packages/x-date-pickers/src/TimeField/TimeField.tsx | 8 +++++--- .../x-date-pickers/src/TimePicker/TimePicker.tsx | 10 +++++----- .../src/internals/hooks/useField/useField.types.ts | 8 +++++--- .../hooks/usePicker/usePickerValue.types.ts | 10 +++++----- .../src/internals/hooks/useValidation.ts | 12 ++++++------ 59 files changed, 240 insertions(+), 220 deletions(-) diff --git a/docs/translations/api-docs/date-pickers/date-field/date-field.json b/docs/translations/api-docs/date-pickers/date-field/date-field.json index e023b91557cb..618744b87c46 100644 --- a/docs/translations/api-docs/date-pickers/date-field/date-field.json +++ b/docs/translations/api-docs/date-pickers/date-field/date-field.json @@ -66,10 +66,10 @@ }, "onClear": { "description": "Callback fired when the clear button is clicked." }, "onError": { - "description": "Callback fired when the error associated to the current value changes.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/date-picker/date-picker.json b/docs/translations/api-docs/date-pickers/date-picker/date-picker.json index fa776f7501a5..5555b7f4ffa4 100644 --- a/docs/translations/api-docs/date-pickers/date-picker/date-picker.json +++ b/docs/translations/api-docs/date-pickers/date-picker/date-picker.json @@ -77,10 +77,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/date-range-picker/date-range-picker.json b/docs/translations/api-docs/date-pickers/date-range-picker/date-range-picker.json index b847113e3e87..e36497d59678 100644 --- a/docs/translations/api-docs/date-pickers/date-range-picker/date-range-picker.json +++ b/docs/translations/api-docs/date-pickers/date-range-picker/date-range-picker.json @@ -91,10 +91,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/date-time-field/date-time-field.json b/docs/translations/api-docs/date-pickers/date-time-field/date-time-field.json index 4e77982370d0..95121dacea2d 100644 --- a/docs/translations/api-docs/date-pickers/date-time-field/date-time-field.json +++ b/docs/translations/api-docs/date-pickers/date-time-field/date-time-field.json @@ -83,10 +83,10 @@ }, "onClear": { "description": "Callback fired when the clear button is clicked." }, "onError": { - "description": "Callback fired when the error associated to the current value changes.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/date-time-picker/date-time-picker.json b/docs/translations/api-docs/date-pickers/date-time-picker/date-time-picker.json index e6bc667be2c4..d9f6a88b0bac 100644 --- a/docs/translations/api-docs/date-pickers/date-time-picker/date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/date-time-picker/date-time-picker.json @@ -97,10 +97,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/date-time-range-picker/date-time-range-picker.json b/docs/translations/api-docs/date-pickers/date-time-range-picker/date-time-range-picker.json index 38ff71b4a0bc..5c365483d5c3 100644 --- a/docs/translations/api-docs/date-pickers/date-time-range-picker/date-time-range-picker.json +++ b/docs/translations/api-docs/date-pickers/date-time-range-picker/date-time-range-picker.json @@ -108,10 +108,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/desktop-date-picker/desktop-date-picker.json b/docs/translations/api-docs/date-pickers/desktop-date-picker/desktop-date-picker.json index bd5ad6552128..c87e5e21816d 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-picker/desktop-date-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-picker/desktop-date-picker.json @@ -74,10 +74,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/desktop-date-range-picker/desktop-date-range-picker.json b/docs/translations/api-docs/date-pickers/desktop-date-range-picker/desktop-date-range-picker.json index 280773356bff..064000584821 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-range-picker/desktop-date-range-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-range-picker/desktop-date-range-picker.json @@ -88,10 +88,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/desktop-date-time-picker/desktop-date-time-picker.json b/docs/translations/api-docs/date-pickers/desktop-date-time-picker/desktop-date-time-picker.json index 850e02434af9..fd18750143b3 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-time-picker/desktop-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-time-picker/desktop-date-time-picker.json @@ -94,10 +94,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/desktop-date-time-range-picker/desktop-date-time-range-picker.json b/docs/translations/api-docs/date-pickers/desktop-date-time-range-picker/desktop-date-time-range-picker.json index 44308fe67c43..e078dbbc15d4 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-time-range-picker/desktop-date-time-range-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-time-range-picker/desktop-date-time-range-picker.json @@ -105,10 +105,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/desktop-time-picker/desktop-time-picker.json b/docs/translations/api-docs/date-pickers/desktop-time-picker/desktop-time-picker.json index cb08e6dbe9b5..4ddf39b2d428 100644 --- a/docs/translations/api-docs/date-pickers/desktop-time-picker/desktop-time-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-time-picker/desktop-time-picker.json @@ -66,10 +66,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onOpen": { diff --git a/docs/translations/api-docs/date-pickers/mobile-date-picker/mobile-date-picker.json b/docs/translations/api-docs/date-pickers/mobile-date-picker/mobile-date-picker.json index 6fdc6eaca82e..79e03e073898 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-picker/mobile-date-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-picker/mobile-date-picker.json @@ -74,10 +74,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/mobile-date-range-picker/mobile-date-range-picker.json b/docs/translations/api-docs/date-pickers/mobile-date-range-picker/mobile-date-range-picker.json index 4f31ae0b2920..9979387f247d 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-range-picker/mobile-date-range-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-range-picker/mobile-date-range-picker.json @@ -85,10 +85,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/mobile-date-time-picker/mobile-date-time-picker.json b/docs/translations/api-docs/date-pickers/mobile-date-time-picker/mobile-date-time-picker.json index 3731b8d7d2f7..4d5af5592845 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-time-picker/mobile-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-time-picker/mobile-date-time-picker.json @@ -94,10 +94,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/mobile-date-time-range-picker/mobile-date-time-range-picker.json b/docs/translations/api-docs/date-pickers/mobile-date-time-range-picker/mobile-date-time-range-picker.json index 743e5f688d34..c2eb9b111653 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-time-range-picker/mobile-date-time-range-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-time-range-picker/mobile-date-time-range-picker.json @@ -102,10 +102,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/mobile-time-picker/mobile-time-picker.json b/docs/translations/api-docs/date-pickers/mobile-time-picker/mobile-time-picker.json index cd9f9871246e..9e4aee022d83 100644 --- a/docs/translations/api-docs/date-pickers/mobile-time-picker/mobile-time-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-time-picker/mobile-time-picker.json @@ -66,10 +66,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onOpen": { diff --git a/docs/translations/api-docs/date-pickers/multi-input-date-range-field/multi-input-date-range-field.json b/docs/translations/api-docs/date-pickers/multi-input-date-range-field/multi-input-date-range-field.json index 3249b81c4e44..5091832ca274 100644 --- a/docs/translations/api-docs/date-pickers/multi-input-date-range-field/multi-input-date-range-field.json +++ b/docs/translations/api-docs/date-pickers/multi-input-date-range-field/multi-input-date-range-field.json @@ -34,10 +34,10 @@ } }, "onError": { - "description": "Callback fired when the error associated to the current value changes.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field/multi-input-date-time-range-field.json b/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field/multi-input-date-time-range-field.json index 5a80d81c50d9..2657b5ed1a3f 100644 --- a/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field/multi-input-date-time-range-field.json +++ b/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field/multi-input-date-time-range-field.json @@ -51,10 +51,10 @@ } }, "onError": { - "description": "Callback fired when the error associated to the current value changes.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/multi-input-time-range-field/multi-input-time-range-field.json b/docs/translations/api-docs/date-pickers/multi-input-time-range-field/multi-input-time-range-field.json index 36121c5af67d..29a60e20be62 100644 --- a/docs/translations/api-docs/date-pickers/multi-input-time-range-field/multi-input-time-range-field.json +++ b/docs/translations/api-docs/date-pickers/multi-input-time-range-field/multi-input-time-range-field.json @@ -43,10 +43,10 @@ } }, "onError": { - "description": "Callback fired when the error associated to the current value changes.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/single-input-date-range-field/single-input-date-range-field.json b/docs/translations/api-docs/date-pickers/single-input-date-range-field/single-input-date-range-field.json index 4b27f2a62221..a24a00361f7d 100644 --- a/docs/translations/api-docs/date-pickers/single-input-date-range-field/single-input-date-range-field.json +++ b/docs/translations/api-docs/date-pickers/single-input-date-range-field/single-input-date-range-field.json @@ -67,10 +67,10 @@ }, "onClear": { "description": "Callback fired when the clear button is clicked." }, "onError": { - "description": "Callback fired when the error associated to the current value changes.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/single-input-date-time-range-field/single-input-date-time-range-field.json b/docs/translations/api-docs/date-pickers/single-input-date-time-range-field/single-input-date-time-range-field.json index 2fd5f3960613..e98b84401aca 100644 --- a/docs/translations/api-docs/date-pickers/single-input-date-time-range-field/single-input-date-time-range-field.json +++ b/docs/translations/api-docs/date-pickers/single-input-date-time-range-field/single-input-date-time-range-field.json @@ -84,10 +84,10 @@ }, "onClear": { "description": "Callback fired when the clear button is clicked." }, "onError": { - "description": "Callback fired when the error associated to the current value changes.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/single-input-time-range-field/single-input-time-range-field.json b/docs/translations/api-docs/date-pickers/single-input-time-range-field/single-input-time-range-field.json index d14d95e0e73b..7814309458a6 100644 --- a/docs/translations/api-docs/date-pickers/single-input-time-range-field/single-input-time-range-field.json +++ b/docs/translations/api-docs/date-pickers/single-input-time-range-field/single-input-time-range-field.json @@ -76,10 +76,10 @@ }, "onClear": { "description": "Callback fired when the clear button is clicked." }, "onError": { - "description": "Callback fired when the error associated to the current value changes.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/static-date-picker/static-date-picker.json b/docs/translations/api-docs/date-pickers/static-date-picker/static-date-picker.json index 7ebb4803d895..289d1ade78f4 100644 --- a/docs/translations/api-docs/date-pickers/static-date-picker/static-date-picker.json +++ b/docs/translations/api-docs/date-pickers/static-date-picker/static-date-picker.json @@ -60,10 +60,10 @@ "description": "Callback fired when component requests to be closed. Can be fired when selecting (by default on desktop mode) or clearing a value." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/static-date-range-picker/static-date-range-picker.json b/docs/translations/api-docs/date-pickers/static-date-range-picker/static-date-range-picker.json index a5948b80f383..902cddeda703 100644 --- a/docs/translations/api-docs/date-pickers/static-date-range-picker/static-date-range-picker.json +++ b/docs/translations/api-docs/date-pickers/static-date-range-picker/static-date-range-picker.json @@ -70,10 +70,10 @@ "description": "Callback fired when component requests to be closed. Can be fired when selecting (by default on desktop mode) or clearing a value." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/static-date-time-picker/static-date-time-picker.json b/docs/translations/api-docs/date-pickers/static-date-time-picker/static-date-time-picker.json index 49348e673329..f249adf4217e 100644 --- a/docs/translations/api-docs/date-pickers/static-date-time-picker/static-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/static-date-time-picker/static-date-time-picker.json @@ -80,10 +80,10 @@ "description": "Callback fired when component requests to be closed. Can be fired when selecting (by default on desktop mode) or clearing a value." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/static-time-picker/static-time-picker.json b/docs/translations/api-docs/date-pickers/static-time-picker/static-time-picker.json index 8ba5b454d5e6..df19b36acd95 100644 --- a/docs/translations/api-docs/date-pickers/static-time-picker/static-time-picker.json +++ b/docs/translations/api-docs/date-pickers/static-time-picker/static-time-picker.json @@ -52,10 +52,10 @@ "description": "Callback fired when component requests to be closed. Can be fired when selecting (by default on desktop mode) or clearing a value." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onViewChange": { diff --git a/docs/translations/api-docs/date-pickers/time-field/time-field.json b/docs/translations/api-docs/date-pickers/time-field/time-field.json index afe127369650..e54b304b64b5 100644 --- a/docs/translations/api-docs/date-pickers/time-field/time-field.json +++ b/docs/translations/api-docs/date-pickers/time-field/time-field.json @@ -75,10 +75,10 @@ }, "onClear": { "description": "Callback fired when the clear button is clicked." }, "onError": { - "description": "Callback fired when the error associated to the current value changes.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/time-picker/time-picker.json b/docs/translations/api-docs/date-pickers/time-picker/time-picker.json index 3e18c58879a8..17d4ee6c9f6a 100644 --- a/docs/translations/api-docs/date-pickers/time-picker/time-picker.json +++ b/docs/translations/api-docs/date-pickers/time-picker/time-picker.json @@ -69,10 +69,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. If the error has a non-null value, then the TextField will be rendered in error state.", + "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { - "error": "The new error describing why the current value is not valid.", - "value": "The value associated to the error." + "error": "The reason why the current value is not valid.", + "value": "The value associated to the error" } }, "onOpen": { diff --git a/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx b/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx index 7fa21dbb2ee8..8002fc939798 100644 --- a/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx @@ -217,12 +217,12 @@ DateRangePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx b/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx index 4d94546246f8..9249006814e5 100644 --- a/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx @@ -250,12 +250,12 @@ DateTimeRangePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx b/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx index 1a583b12807b..33109d3b8a20 100644 --- a/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx @@ -252,12 +252,12 @@ DesktopDateRangePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx b/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx index 069e4d66cc75..943d8a40afd1 100644 --- a/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx @@ -418,12 +418,12 @@ DesktopDateTimeRangePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx b/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx index 54558b1607ea..ab6ed544ed97 100644 --- a/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx @@ -248,12 +248,12 @@ MobileDateRangePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx b/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx index 27036c430d8e..951ab2f3195b 100644 --- a/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx @@ -408,12 +408,12 @@ MobileDateTimeRangePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx b/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx index 909fc6c29e7c..4fb1f4622428 100644 --- a/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx +++ b/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx @@ -270,10 +270,12 @@ MultiInputDateRangeField.propTypes = { onChange: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx b/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx index 133685debe58..95eee8c613eb 100644 --- a/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx @@ -302,10 +302,12 @@ MultiInputDateTimeRangeField.propTypes = { onChange: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx b/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx index ee04099dff91..a682b755b87b 100644 --- a/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx @@ -287,10 +287,12 @@ MultiInputTimeRangeField.propTypes = { onChange: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx b/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx index edc1e5b91b69..88e25ad3ff8e 100644 --- a/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx +++ b/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx @@ -230,10 +230,12 @@ SingleInputDateRangeField.propTypes = { onClear: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, onFocus: PropTypes.func, diff --git a/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx b/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx index 57d0a57f3a91..aded6d5ac205 100644 --- a/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx @@ -263,10 +263,12 @@ SingleInputDateTimeRangeField.propTypes = { onClear: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, onFocus: PropTypes.func, diff --git a/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx b/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx index cd37622a001e..414b36c21cf2 100644 --- a/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx @@ -245,10 +245,12 @@ SingleInputTimeRangeField.propTypes = { onClear: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, onFocus: PropTypes.func, diff --git a/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx b/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx index 74ff932d922d..be78c3cd22b4 100644 --- a/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx @@ -197,12 +197,12 @@ StaticDateRangePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/DateField/DateField.tsx b/packages/x-date-pickers/src/DateField/DateField.tsx index 5f707a99d31a..9a8b2f4d5bb1 100644 --- a/packages/x-date-pickers/src/DateField/DateField.tsx +++ b/packages/x-date-pickers/src/DateField/DateField.tsx @@ -222,10 +222,12 @@ DateField.propTypes = { onClear: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, onFocus: PropTypes.func, diff --git a/packages/x-date-pickers/src/DatePicker/DatePicker.tsx b/packages/x-date-pickers/src/DatePicker/DatePicker.tsx index e93c88833ba4..15836ef4d4c1 100644 --- a/packages/x-date-pickers/src/DatePicker/DatePicker.tsx +++ b/packages/x-date-pickers/src/DatePicker/DatePicker.tsx @@ -194,12 +194,12 @@ DatePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx b/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx index 44db7bb3fb50..1b56a21d24e3 100644 --- a/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx +++ b/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx @@ -255,10 +255,12 @@ DateTimeField.propTypes = { onClear: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, onFocus: PropTypes.func, diff --git a/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx b/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx index a8126e9c5474..6008984bf9b9 100644 --- a/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx +++ b/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx @@ -232,12 +232,12 @@ DateTimePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx b/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx index 5e0c6e75ae8a..b2a40700a3be 100644 --- a/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx +++ b/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx @@ -239,12 +239,12 @@ DesktopDatePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx b/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx index f728453aa5ae..cf2fdde4eee7 100644 --- a/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx +++ b/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx @@ -413,12 +413,12 @@ DesktopDateTimePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx b/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx index 31232c0cfb7e..d8b1866e84fa 100644 --- a/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx +++ b/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx @@ -265,12 +265,12 @@ DesktopTimePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx b/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx index 5f33b9a15dcf..c00ddeff20f9 100644 --- a/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx +++ b/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx @@ -236,12 +236,12 @@ MobileDatePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx b/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx index 50ab45e2b37f..af64170abd4e 100644 --- a/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx +++ b/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx @@ -289,12 +289,12 @@ MobileDateTimePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx b/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx index 021ec100c680..ae3b4dbe2daa 100644 --- a/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx +++ b/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx @@ -228,12 +228,12 @@ MobileTimePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx b/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx index 7482205b4b95..fecefdb8997e 100644 --- a/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx +++ b/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx @@ -175,12 +175,12 @@ StaticDatePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx b/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx index 01dd868201d1..d1a95a73dbcb 100644 --- a/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx +++ b/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx @@ -227,12 +227,12 @@ StaticDateTimePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/StaticTimePicker/StaticTimePicker.tsx b/packages/x-date-pickers/src/StaticTimePicker/StaticTimePicker.tsx index b3b2b27047a0..8dfeb196310c 100644 --- a/packages/x-date-pickers/src/StaticTimePicker/StaticTimePicker.tsx +++ b/packages/x-date-pickers/src/StaticTimePicker/StaticTimePicker.tsx @@ -166,12 +166,12 @@ StaticTimePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/TimeField/TimeField.tsx b/packages/x-date-pickers/src/TimeField/TimeField.tsx index 10d4918133ed..e11d67c90237 100644 --- a/packages/x-date-pickers/src/TimeField/TimeField.tsx +++ b/packages/x-date-pickers/src/TimeField/TimeField.tsx @@ -237,10 +237,12 @@ TimeField.propTypes = { onClear: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, onFocus: PropTypes.func, diff --git a/packages/x-date-pickers/src/TimePicker/TimePicker.tsx b/packages/x-date-pickers/src/TimePicker/TimePicker.tsx index 2883b0d1d45b..ffdf2a060257 100644 --- a/packages/x-date-pickers/src/TimePicker/TimePicker.tsx +++ b/packages/x-date-pickers/src/TimePicker/TimePicker.tsx @@ -182,12 +182,12 @@ TimePicker.propTypes = { onClose: PropTypes.func, /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/internals/hooks/useField/useField.types.ts b/packages/x-date-pickers/src/internals/hooks/useField/useField.types.ts index df0915e71b7f..eb068d886ea2 100644 --- a/packages/x-date-pickers/src/internals/hooks/useField/useField.types.ts +++ b/packages/x-date-pickers/src/internals/hooks/useField/useField.types.ts @@ -78,10 +78,12 @@ export interface UseFieldInternalProps< onChange?: FieldChangeHandler; /** * Callback fired when the error associated to the current value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError?: (error: TError, value: TValue) => void; /** diff --git a/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.types.ts b/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.types.ts index 9372640881c4..706d9335221d 100644 --- a/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.types.ts +++ b/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.types.ts @@ -236,12 +236,12 @@ export interface UsePickerValueBaseProps { onAccept?: (value: TValue, context: PickerChangeHandlerContext) => void; /** * Callback fired when the error associated to the current value changes. - * If the error has a non-null value, then the `TextField` will be rendered in `error` state. - * - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} error The new error describing why the current value is not valid. - * @param {TValue} value The value associated to the error. + * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ onError?: (error: TError, value: TValue) => void; } diff --git a/packages/x-date-pickers/src/internals/hooks/useValidation.ts b/packages/x-date-pickers/src/internals/hooks/useValidation.ts index 406dcf61d0db..e0197c2c395c 100644 --- a/packages/x-date-pickers/src/internals/hooks/useValidation.ts +++ b/packages/x-date-pickers/src/internals/hooks/useValidation.ts @@ -5,15 +5,15 @@ import { PickerValidDate } from '../../models'; interface ValidationCommonProps { /** - * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error). - * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state. - * This can be used to render appropriate form error. + * Callback fired when the error associated to the current value changes. + * When a validation error is detected, the `error` parameter contains a non-null value. + * This can be used to render an appropriate form error. * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @param {TError} reason The reason why the current value is not valid. - * @param {TValue} value The invalid value. + * @param {TError} error The reason why the current value is not valid. + * @param {TValue} value The value associated to the error */ - onError?: (reason: TError, value: TValue) => void; + onError?: (error: TError, value: TValue) => void; value: TValue; } From 69c714275d253690e9f018210d614e63b0be8cc1 Mon Sep 17 00:00:00 2001 From: delangle Date: Thu, 5 Sep 2024 13:19:32 +0200 Subject: [PATCH 2/2] Review Lukas --- .../date-pickers/date-field/date-field.json | 4 ++-- .../date-pickers/date-picker/date-picker.json | 4 ++-- .../date-range-picker/date-range-picker.json | 4 ++-- .../date-time-field/date-time-field.json | 4 ++-- .../date-time-picker/date-time-picker.json | 4 ++-- .../date-time-range-picker.json | 4 ++-- .../desktop-date-picker/desktop-date-picker.json | 4 ++-- .../desktop-date-range-picker.json | 4 ++-- .../desktop-date-time-picker.json | 4 ++-- .../desktop-date-time-range-picker.json | 4 ++-- .../desktop-time-picker/desktop-time-picker.json | 4 ++-- .../mobile-date-picker/mobile-date-picker.json | 4 ++-- .../mobile-date-range-picker.json | 4 ++-- .../mobile-date-time-picker.json | 4 ++-- .../mobile-date-time-range-picker.json | 4 ++-- .../mobile-time-picker/mobile-time-picker.json | 4 ++-- .../multi-input-date-range-field.json | 4 ++-- .../multi-input-date-time-range-field.json | 4 ++-- .../multi-input-time-range-field.json | 4 ++-- .../single-input-date-range-field.json | 4 ++-- .../single-input-date-time-range-field.json | 4 ++-- .../single-input-time-range-field.json | 4 ++-- .../static-date-picker/static-date-picker.json | 4 ++-- .../static-date-range-picker.json | 4 ++-- .../static-date-time-picker.json | 4 ++-- .../static-time-picker/static-time-picker.json | 4 ++-- .../date-pickers/time-field/time-field.json | 4 ++-- .../date-pickers/time-picker/time-picker.json | 4 ++-- .../src/DateRangeCalendar/DateRangeCalendar.tsx | 2 +- .../src/DateRangePicker/DateRangePicker.tsx | 16 ++++++++-------- .../DateTimeRangePicker/DateTimeRangePicker.tsx | 16 ++++++++-------- .../DesktopDateRangePicker.tsx | 16 ++++++++-------- .../DesktopDateTimeRangePicker.tsx | 16 ++++++++-------- .../MobileDateRangePicker.tsx | 16 ++++++++-------- .../MobileDateTimeRangePicker.tsx | 16 ++++++++-------- .../MultiInputDateRangeField.tsx | 12 ++++++------ .../MultiInputDateTimeRangeField.tsx | 12 ++++++------ .../MultiInputTimeRangeField.tsx | 12 ++++++------ .../SingleInputDateRangeField.tsx | 12 ++++++------ .../SingleInputDateTimeRangeField.tsx | 12 ++++++------ .../SingleInputTimeRangeField.tsx | 12 ++++++------ .../StaticDateRangePicker.tsx | 16 ++++++++-------- .../src/DateCalendar/DateCalendar.tsx | 2 +- .../x-date-pickers/src/DateField/DateField.tsx | 12 ++++++------ .../x-date-pickers/src/DatePicker/DatePicker.tsx | 16 ++++++++-------- .../src/DateTimeField/DateTimeField.tsx | 12 ++++++------ .../src/DateTimePicker/DateTimePicker.tsx | 16 ++++++++-------- .../src/DesktopDatePicker/DesktopDatePicker.tsx | 16 ++++++++-------- .../DesktopDateTimePicker.tsx | 16 ++++++++-------- .../src/DesktopTimePicker/DesktopTimePicker.tsx | 16 ++++++++-------- .../src/DigitalClock/DigitalClock.tsx | 2 +- .../src/MobileDatePicker/MobileDatePicker.tsx | 16 ++++++++-------- .../MobileDateTimePicker.tsx | 16 ++++++++-------- .../src/MobileTimePicker/MobileTimePicker.tsx | 16 ++++++++-------- .../MultiSectionDigitalClock.tsx | 2 +- .../src/StaticDatePicker/StaticDatePicker.tsx | 16 ++++++++-------- .../StaticDateTimePicker.tsx | 16 ++++++++-------- .../src/StaticTimePicker/StaticTimePicker.tsx | 16 ++++++++-------- .../x-date-pickers/src/TimeClock/TimeClock.tsx | 2 +- .../x-date-pickers/src/TimeField/TimeField.tsx | 12 ++++++------ .../x-date-pickers/src/TimePicker/TimePicker.tsx | 16 ++++++++-------- .../internals/hooks/useField/useField.types.ts | 12 ++++++------ .../hooks/usePicker/usePickerValue.types.ts | 16 ++++++++-------- .../src/internals/hooks/useValidation.ts | 8 ++++---- .../src/internals/hooks/useViews.tsx | 2 +- 65 files changed, 286 insertions(+), 286 deletions(-) diff --git a/docs/translations/api-docs/date-pickers/date-field/date-field.json b/docs/translations/api-docs/date-pickers/date-field/date-field.json index 618744b87c46..f5c8a7ea37b8 100644 --- a/docs/translations/api-docs/date-pickers/date-field/date-field.json +++ b/docs/translations/api-docs/date-pickers/date-field/date-field.json @@ -66,10 +66,10 @@ }, "onClear": { "description": "Callback fired when the clear button is clicked." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/date-picker/date-picker.json b/docs/translations/api-docs/date-pickers/date-picker/date-picker.json index 5555b7f4ffa4..8536e255a604 100644 --- a/docs/translations/api-docs/date-pickers/date-picker/date-picker.json +++ b/docs/translations/api-docs/date-pickers/date-picker/date-picker.json @@ -77,10 +77,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/date-range-picker/date-range-picker.json b/docs/translations/api-docs/date-pickers/date-range-picker/date-range-picker.json index e36497d59678..3d2165e374fe 100644 --- a/docs/translations/api-docs/date-pickers/date-range-picker/date-range-picker.json +++ b/docs/translations/api-docs/date-pickers/date-range-picker/date-range-picker.json @@ -91,10 +91,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/date-time-field/date-time-field.json b/docs/translations/api-docs/date-pickers/date-time-field/date-time-field.json index 95121dacea2d..40143ace9193 100644 --- a/docs/translations/api-docs/date-pickers/date-time-field/date-time-field.json +++ b/docs/translations/api-docs/date-pickers/date-time-field/date-time-field.json @@ -83,10 +83,10 @@ }, "onClear": { "description": "Callback fired when the clear button is clicked." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/date-time-picker/date-time-picker.json b/docs/translations/api-docs/date-pickers/date-time-picker/date-time-picker.json index d9f6a88b0bac..d8994c789b60 100644 --- a/docs/translations/api-docs/date-pickers/date-time-picker/date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/date-time-picker/date-time-picker.json @@ -97,10 +97,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/date-time-range-picker/date-time-range-picker.json b/docs/translations/api-docs/date-pickers/date-time-range-picker/date-time-range-picker.json index 5c365483d5c3..d9cbe6026fe5 100644 --- a/docs/translations/api-docs/date-pickers/date-time-range-picker/date-time-range-picker.json +++ b/docs/translations/api-docs/date-pickers/date-time-range-picker/date-time-range-picker.json @@ -108,10 +108,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/desktop-date-picker/desktop-date-picker.json b/docs/translations/api-docs/date-pickers/desktop-date-picker/desktop-date-picker.json index c87e5e21816d..0235dcbeb4f1 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-picker/desktop-date-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-picker/desktop-date-picker.json @@ -74,10 +74,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/desktop-date-range-picker/desktop-date-range-picker.json b/docs/translations/api-docs/date-pickers/desktop-date-range-picker/desktop-date-range-picker.json index 064000584821..a8e7907b7f9f 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-range-picker/desktop-date-range-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-range-picker/desktop-date-range-picker.json @@ -88,10 +88,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/desktop-date-time-picker/desktop-date-time-picker.json b/docs/translations/api-docs/date-pickers/desktop-date-time-picker/desktop-date-time-picker.json index fd18750143b3..41c3552ab773 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-time-picker/desktop-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-time-picker/desktop-date-time-picker.json @@ -94,10 +94,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/desktop-date-time-range-picker/desktop-date-time-range-picker.json b/docs/translations/api-docs/date-pickers/desktop-date-time-range-picker/desktop-date-time-range-picker.json index e078dbbc15d4..9e40b5b86f95 100644 --- a/docs/translations/api-docs/date-pickers/desktop-date-time-range-picker/desktop-date-time-range-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-date-time-range-picker/desktop-date-time-range-picker.json @@ -105,10 +105,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/desktop-time-picker/desktop-time-picker.json b/docs/translations/api-docs/date-pickers/desktop-time-picker/desktop-time-picker.json index 4ddf39b2d428..1b755973312e 100644 --- a/docs/translations/api-docs/date-pickers/desktop-time-picker/desktop-time-picker.json +++ b/docs/translations/api-docs/date-pickers/desktop-time-picker/desktop-time-picker.json @@ -66,10 +66,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onOpen": { diff --git a/docs/translations/api-docs/date-pickers/mobile-date-picker/mobile-date-picker.json b/docs/translations/api-docs/date-pickers/mobile-date-picker/mobile-date-picker.json index 79e03e073898..196f25f2be15 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-picker/mobile-date-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-picker/mobile-date-picker.json @@ -74,10 +74,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/mobile-date-range-picker/mobile-date-range-picker.json b/docs/translations/api-docs/date-pickers/mobile-date-range-picker/mobile-date-range-picker.json index 9979387f247d..33656bf53c5f 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-range-picker/mobile-date-range-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-range-picker/mobile-date-range-picker.json @@ -85,10 +85,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/mobile-date-time-picker/mobile-date-time-picker.json b/docs/translations/api-docs/date-pickers/mobile-date-time-picker/mobile-date-time-picker.json index 4d5af5592845..1b95ab814138 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-time-picker/mobile-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-time-picker/mobile-date-time-picker.json @@ -94,10 +94,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/mobile-date-time-range-picker/mobile-date-time-range-picker.json b/docs/translations/api-docs/date-pickers/mobile-date-time-range-picker/mobile-date-time-range-picker.json index c2eb9b111653..88e8272c5347 100644 --- a/docs/translations/api-docs/date-pickers/mobile-date-time-range-picker/mobile-date-time-range-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-date-time-range-picker/mobile-date-time-range-picker.json @@ -102,10 +102,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/mobile-time-picker/mobile-time-picker.json b/docs/translations/api-docs/date-pickers/mobile-time-picker/mobile-time-picker.json index 9e4aee022d83..48fdc89e4bd9 100644 --- a/docs/translations/api-docs/date-pickers/mobile-time-picker/mobile-time-picker.json +++ b/docs/translations/api-docs/date-pickers/mobile-time-picker/mobile-time-picker.json @@ -66,10 +66,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onOpen": { diff --git a/docs/translations/api-docs/date-pickers/multi-input-date-range-field/multi-input-date-range-field.json b/docs/translations/api-docs/date-pickers/multi-input-date-range-field/multi-input-date-range-field.json index 5091832ca274..b2bbe71d889f 100644 --- a/docs/translations/api-docs/date-pickers/multi-input-date-range-field/multi-input-date-range-field.json +++ b/docs/translations/api-docs/date-pickers/multi-input-date-range-field/multi-input-date-range-field.json @@ -34,10 +34,10 @@ } }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field/multi-input-date-time-range-field.json b/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field/multi-input-date-time-range-field.json index 2657b5ed1a3f..df8eddfa4dfc 100644 --- a/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field/multi-input-date-time-range-field.json +++ b/docs/translations/api-docs/date-pickers/multi-input-date-time-range-field/multi-input-date-time-range-field.json @@ -51,10 +51,10 @@ } }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/multi-input-time-range-field/multi-input-time-range-field.json b/docs/translations/api-docs/date-pickers/multi-input-time-range-field/multi-input-time-range-field.json index 29a60e20be62..f041ee14ff3e 100644 --- a/docs/translations/api-docs/date-pickers/multi-input-time-range-field/multi-input-time-range-field.json +++ b/docs/translations/api-docs/date-pickers/multi-input-time-range-field/multi-input-time-range-field.json @@ -43,10 +43,10 @@ } }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/single-input-date-range-field/single-input-date-range-field.json b/docs/translations/api-docs/date-pickers/single-input-date-range-field/single-input-date-range-field.json index a24a00361f7d..fa08acde2c92 100644 --- a/docs/translations/api-docs/date-pickers/single-input-date-range-field/single-input-date-range-field.json +++ b/docs/translations/api-docs/date-pickers/single-input-date-range-field/single-input-date-range-field.json @@ -67,10 +67,10 @@ }, "onClear": { "description": "Callback fired when the clear button is clicked." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/single-input-date-time-range-field/single-input-date-time-range-field.json b/docs/translations/api-docs/date-pickers/single-input-date-time-range-field/single-input-date-time-range-field.json index e98b84401aca..4f40fa23b513 100644 --- a/docs/translations/api-docs/date-pickers/single-input-date-time-range-field/single-input-date-time-range-field.json +++ b/docs/translations/api-docs/date-pickers/single-input-date-time-range-field/single-input-date-time-range-field.json @@ -84,10 +84,10 @@ }, "onClear": { "description": "Callback fired when the clear button is clicked." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/single-input-time-range-field/single-input-time-range-field.json b/docs/translations/api-docs/date-pickers/single-input-time-range-field/single-input-time-range-field.json index 7814309458a6..7b4b4799c40f 100644 --- a/docs/translations/api-docs/date-pickers/single-input-time-range-field/single-input-time-range-field.json +++ b/docs/translations/api-docs/date-pickers/single-input-time-range-field/single-input-time-range-field.json @@ -76,10 +76,10 @@ }, "onClear": { "description": "Callback fired when the clear button is clicked." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/static-date-picker/static-date-picker.json b/docs/translations/api-docs/date-pickers/static-date-picker/static-date-picker.json index 289d1ade78f4..d8487afd8015 100644 --- a/docs/translations/api-docs/date-pickers/static-date-picker/static-date-picker.json +++ b/docs/translations/api-docs/date-pickers/static-date-picker/static-date-picker.json @@ -60,10 +60,10 @@ "description": "Callback fired when component requests to be closed. Can be fired when selecting (by default on desktop mode) or clearing a value." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/static-date-range-picker/static-date-range-picker.json b/docs/translations/api-docs/date-pickers/static-date-range-picker/static-date-range-picker.json index 902cddeda703..993e0008d075 100644 --- a/docs/translations/api-docs/date-pickers/static-date-range-picker/static-date-range-picker.json +++ b/docs/translations/api-docs/date-pickers/static-date-range-picker/static-date-range-picker.json @@ -70,10 +70,10 @@ "description": "Callback fired when component requests to be closed. Can be fired when selecting (by default on desktop mode) or clearing a value." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/static-date-time-picker/static-date-time-picker.json b/docs/translations/api-docs/date-pickers/static-date-time-picker/static-date-time-picker.json index f249adf4217e..ffe8c876b512 100644 --- a/docs/translations/api-docs/date-pickers/static-date-time-picker/static-date-time-picker.json +++ b/docs/translations/api-docs/date-pickers/static-date-time-picker/static-date-time-picker.json @@ -80,10 +80,10 @@ "description": "Callback fired when component requests to be closed. Can be fired when selecting (by default on desktop mode) or clearing a value." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onMonthChange": { diff --git a/docs/translations/api-docs/date-pickers/static-time-picker/static-time-picker.json b/docs/translations/api-docs/date-pickers/static-time-picker/static-time-picker.json index df19b36acd95..61e15cc5ee02 100644 --- a/docs/translations/api-docs/date-pickers/static-time-picker/static-time-picker.json +++ b/docs/translations/api-docs/date-pickers/static-time-picker/static-time-picker.json @@ -52,10 +52,10 @@ "description": "Callback fired when component requests to be closed. Can be fired when selecting (by default on desktop mode) or clearing a value." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onViewChange": { diff --git a/docs/translations/api-docs/date-pickers/time-field/time-field.json b/docs/translations/api-docs/date-pickers/time-field/time-field.json index e54b304b64b5..f7e8c72ad860 100644 --- a/docs/translations/api-docs/date-pickers/time-field/time-field.json +++ b/docs/translations/api-docs/date-pickers/time-field/time-field.json @@ -75,10 +75,10 @@ }, "onClear": { "description": "Callback fired when the clear button is clicked." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onSelectedSectionsChange": { diff --git a/docs/translations/api-docs/date-pickers/time-picker/time-picker.json b/docs/translations/api-docs/date-pickers/time-picker/time-picker.json index 17d4ee6c9f6a..8559abcfcb56 100644 --- a/docs/translations/api-docs/date-pickers/time-picker/time-picker.json +++ b/docs/translations/api-docs/date-pickers/time-picker/time-picker.json @@ -69,10 +69,10 @@ "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onError": { - "description": "Callback fired when the error associated to the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", + "description": "Callback fired when the error associated with the current value changes. When a validation error is detected, the error parameter contains a non-null value. This can be used to render an appropriate form error.", "typeDescriptions": { "error": "The reason why the current value is not valid.", - "value": "The value associated to the error" + "value": "The value associated with the error." } }, "onOpen": { diff --git a/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx b/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx index 3e0272ae130c..aaa0bee3165c 100644 --- a/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx +++ b/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx @@ -705,7 +705,7 @@ DateRangeCalendar.propTypes = { minDate: PropTypes.object, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @template TView The view type. Will be one of date or time views. * @param {TValue} value The new value. * @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete. diff --git a/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx b/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx index 8002fc939798..f24af1d702eb 100644 --- a/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.tsx @@ -196,16 +196,16 @@ DateRangePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -216,13 +216,13 @@ DateRangePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx b/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx index 9249006814e5..6985cce40ca0 100644 --- a/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DateTimeRangePicker/DateTimeRangePicker.tsx @@ -229,16 +229,16 @@ DateTimeRangePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -249,13 +249,13 @@ DateTimeRangePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx b/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx index 33109d3b8a20..f76e7d1ad76b 100644 --- a/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx @@ -231,16 +231,16 @@ DesktopDateRangePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -251,13 +251,13 @@ DesktopDateRangePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx b/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx index 943d8a40afd1..b25801087ea9 100644 --- a/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.tsx @@ -397,16 +397,16 @@ DesktopDateTimeRangePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -417,13 +417,13 @@ DesktopDateTimeRangePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx b/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx index ab6ed544ed97..6cb841389f50 100644 --- a/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.tsx @@ -227,16 +227,16 @@ MobileDateRangePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -247,13 +247,13 @@ MobileDateRangePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx b/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx index 951ab2f3195b..63637dbce374 100644 --- a/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/MobileDateTimeRangePicker/MobileDateTimeRangePicker.tsx @@ -387,16 +387,16 @@ MobileDateTimeRangePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -407,13 +407,13 @@ MobileDateTimeRangePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx b/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx index 4fb1f4622428..24417abcd17f 100644 --- a/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx +++ b/packages/x-date-pickers-pro/src/MultiInputDateRangeField/MultiInputDateRangeField.tsx @@ -262,20 +262,20 @@ MultiInputDateRangeField.propTypes = { minDate: PropTypes.object, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onChange: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx b/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx index 95eee8c613eb..3b4cdd1aa864 100644 --- a/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.tsx @@ -294,20 +294,20 @@ MultiInputDateTimeRangeField.propTypes = { minutesStep: PropTypes.number, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onChange: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx b/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx index a682b755b87b..16344a101382 100644 --- a/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/MultiInputTimeRangeField/MultiInputTimeRangeField.tsx @@ -279,20 +279,20 @@ MultiInputTimeRangeField.propTypes = { minutesStep: PropTypes.number, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onChange: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx b/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx index 88e25ad3ff8e..e9df9fc89acf 100644 --- a/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx +++ b/packages/x-date-pickers-pro/src/SingleInputDateRangeField/SingleInputDateRangeField.tsx @@ -218,8 +218,8 @@ SingleInputDateRangeField.propTypes = { onBlur: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -229,13 +229,13 @@ SingleInputDateRangeField.propTypes = { */ onClear: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, onFocus: PropTypes.func, diff --git a/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx b/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx index aded6d5ac205..579c6a62010f 100644 --- a/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.tsx @@ -251,8 +251,8 @@ SingleInputDateTimeRangeField.propTypes = { onBlur: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -262,13 +262,13 @@ SingleInputDateTimeRangeField.propTypes = { */ onClear: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, onFocus: PropTypes.func, diff --git a/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx b/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx index 414b36c21cf2..73bf67c73ac3 100644 --- a/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx +++ b/packages/x-date-pickers-pro/src/SingleInputTimeRangeField/SingleInputTimeRangeField.tsx @@ -233,8 +233,8 @@ SingleInputTimeRangeField.propTypes = { onBlur: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -244,13 +244,13 @@ SingleInputTimeRangeField.propTypes = { */ onClear: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, onFocus: PropTypes.func, diff --git a/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx b/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx index be78c3cd22b4..5283f9efdac6 100644 --- a/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx +++ b/packages/x-date-pickers-pro/src/StaticDateRangePicker/StaticDateRangePicker.tsx @@ -175,16 +175,16 @@ StaticDateRangePicker.propTypes = { minDate: PropTypes.object, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -196,13 +196,13 @@ StaticDateRangePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx b/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx index 765f75bd9fbe..380dae01c035 100644 --- a/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx +++ b/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx @@ -487,7 +487,7 @@ DateCalendar.propTypes = { monthsPerRow: PropTypes.oneOf([3, 4]), /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @template TView The view type. Will be one of date or time views. * @param {TValue} value The new value. * @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete. diff --git a/packages/x-date-pickers/src/DateField/DateField.tsx b/packages/x-date-pickers/src/DateField/DateField.tsx index 9a8b2f4d5bb1..7f6a1ec7ed45 100644 --- a/packages/x-date-pickers/src/DateField/DateField.tsx +++ b/packages/x-date-pickers/src/DateField/DateField.tsx @@ -210,8 +210,8 @@ DateField.propTypes = { onBlur: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -221,13 +221,13 @@ DateField.propTypes = { */ onClear: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, onFocus: PropTypes.func, diff --git a/packages/x-date-pickers/src/DatePicker/DatePicker.tsx b/packages/x-date-pickers/src/DatePicker/DatePicker.tsx index 15836ef4d4c1..a75adf37b6e2 100644 --- a/packages/x-date-pickers/src/DatePicker/DatePicker.tsx +++ b/packages/x-date-pickers/src/DatePicker/DatePicker.tsx @@ -173,16 +173,16 @@ DatePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -193,13 +193,13 @@ DatePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx b/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx index 1b56a21d24e3..ab78822ead2c 100644 --- a/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx +++ b/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx @@ -243,8 +243,8 @@ DateTimeField.propTypes = { onBlur: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -254,13 +254,13 @@ DateTimeField.propTypes = { */ onClear: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, onFocus: PropTypes.func, diff --git a/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx b/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx index 6008984bf9b9..fc5cab3f50ed 100644 --- a/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx +++ b/packages/x-date-pickers/src/DateTimePicker/DateTimePicker.tsx @@ -211,16 +211,16 @@ DateTimePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -231,13 +231,13 @@ DateTimePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx b/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx index b2a40700a3be..663e4174dd44 100644 --- a/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx +++ b/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.tsx @@ -218,16 +218,16 @@ DesktopDatePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -238,13 +238,13 @@ DesktopDatePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx b/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx index cf2fdde4eee7..08342cd65fa6 100644 --- a/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx +++ b/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx @@ -392,16 +392,16 @@ DesktopDateTimePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -412,13 +412,13 @@ DesktopDateTimePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx b/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx index d8b1866e84fa..516f63d636aa 100644 --- a/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx +++ b/packages/x-date-pickers/src/DesktopTimePicker/DesktopTimePicker.tsx @@ -244,16 +244,16 @@ DesktopTimePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -264,13 +264,13 @@ DesktopTimePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/DigitalClock/DigitalClock.tsx b/packages/x-date-pickers/src/DigitalClock/DigitalClock.tsx index e2e2c7558540..5119b2b0b643 100644 --- a/packages/x-date-pickers/src/DigitalClock/DigitalClock.tsx +++ b/packages/x-date-pickers/src/DigitalClock/DigitalClock.tsx @@ -405,7 +405,7 @@ DigitalClock.propTypes = { minutesStep: PropTypes.number, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @template TView The view type. Will be one of date or time views. * @param {TValue} value The new value. * @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete. diff --git a/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx b/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx index c00ddeff20f9..15b1b45d7615 100644 --- a/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx +++ b/packages/x-date-pickers/src/MobileDatePicker/MobileDatePicker.tsx @@ -215,16 +215,16 @@ MobileDatePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -235,13 +235,13 @@ MobileDatePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx b/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx index af64170abd4e..5f92e1939cb9 100644 --- a/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx +++ b/packages/x-date-pickers/src/MobileDateTimePicker/MobileDateTimePicker.tsx @@ -268,16 +268,16 @@ MobileDateTimePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -288,13 +288,13 @@ MobileDateTimePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx b/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx index ae3b4dbe2daa..f4af4c984ddb 100644 --- a/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx +++ b/packages/x-date-pickers/src/MobileTimePicker/MobileTimePicker.tsx @@ -207,16 +207,16 @@ MobileTimePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -227,13 +227,13 @@ MobileTimePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/MultiSectionDigitalClock/MultiSectionDigitalClock.tsx b/packages/x-date-pickers/src/MultiSectionDigitalClock/MultiSectionDigitalClock.tsx index 39a8b2495660..dabbbb69619b 100644 --- a/packages/x-date-pickers/src/MultiSectionDigitalClock/MultiSectionDigitalClock.tsx +++ b/packages/x-date-pickers/src/MultiSectionDigitalClock/MultiSectionDigitalClock.tsx @@ -511,7 +511,7 @@ MultiSectionDigitalClock.propTypes = { minutesStep: PropTypes.number, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @template TView The view type. Will be one of date or time views. * @param {TValue} value The new value. * @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete. diff --git a/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx b/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx index fecefdb8997e..4338718c441b 100644 --- a/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx +++ b/packages/x-date-pickers/src/StaticDatePicker/StaticDatePicker.tsx @@ -153,16 +153,16 @@ StaticDatePicker.propTypes = { monthsPerRow: PropTypes.oneOf([3, 4]), /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -174,13 +174,13 @@ StaticDatePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx b/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx index d1a95a73dbcb..a93916d40fcd 100644 --- a/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx +++ b/packages/x-date-pickers/src/StaticDateTimePicker/StaticDateTimePicker.tsx @@ -205,16 +205,16 @@ StaticDateTimePicker.propTypes = { monthsPerRow: PropTypes.oneOf([3, 4]), /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -226,13 +226,13 @@ StaticDateTimePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/StaticTimePicker/StaticTimePicker.tsx b/packages/x-date-pickers/src/StaticTimePicker/StaticTimePicker.tsx index 8dfeb196310c..49466bcc2123 100644 --- a/packages/x-date-pickers/src/StaticTimePicker/StaticTimePicker.tsx +++ b/packages/x-date-pickers/src/StaticTimePicker/StaticTimePicker.tsx @@ -144,16 +144,16 @@ StaticTimePicker.propTypes = { minutesStep: PropTypes.number, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -165,13 +165,13 @@ StaticTimePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/TimeClock/TimeClock.tsx b/packages/x-date-pickers/src/TimeClock/TimeClock.tsx index ee896e15730e..44a9581ea102 100644 --- a/packages/x-date-pickers/src/TimeClock/TimeClock.tsx +++ b/packages/x-date-pickers/src/TimeClock/TimeClock.tsx @@ -460,7 +460,7 @@ TimeClock.propTypes = { minutesStep: PropTypes.number, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @template TView The view type. Will be one of date or time views. * @param {TValue} value The new value. * @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete. diff --git a/packages/x-date-pickers/src/TimeField/TimeField.tsx b/packages/x-date-pickers/src/TimeField/TimeField.tsx index e11d67c90237..d609f295ecd6 100644 --- a/packages/x-date-pickers/src/TimeField/TimeField.tsx +++ b/packages/x-date-pickers/src/TimeField/TimeField.tsx @@ -225,8 +225,8 @@ TimeField.propTypes = { onBlur: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -236,13 +236,13 @@ TimeField.propTypes = { */ onClear: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, onFocus: PropTypes.func, diff --git a/packages/x-date-pickers/src/TimePicker/TimePicker.tsx b/packages/x-date-pickers/src/TimePicker/TimePicker.tsx index ffdf2a060257..534bead56e17 100644 --- a/packages/x-date-pickers/src/TimePicker/TimePicker.tsx +++ b/packages/x-date-pickers/src/TimePicker/TimePicker.tsx @@ -161,16 +161,16 @@ TimePicker.propTypes = { name: PropTypes.string, /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept: PropTypes.func, /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ @@ -181,13 +181,13 @@ TimePicker.propTypes = { */ onClose: PropTypes.func, /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError: PropTypes.func, /** diff --git a/packages/x-date-pickers/src/internals/hooks/useField/useField.types.ts b/packages/x-date-pickers/src/internals/hooks/useField/useField.types.ts index eb068d886ea2..7700c06357b6 100644 --- a/packages/x-date-pickers/src/internals/hooks/useField/useField.types.ts +++ b/packages/x-date-pickers/src/internals/hooks/useField/useField.types.ts @@ -70,20 +70,20 @@ export interface UseFieldInternalProps< referenceDate?: TDate; /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onChange?: FieldChangeHandler; /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError?: (error: TError, value: TValue) => void; /** diff --git a/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.types.ts b/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.types.ts index 706d9335221d..d2a170a8728e 100644 --- a/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.types.ts +++ b/packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.types.ts @@ -220,28 +220,28 @@ export interface UsePickerValueBaseProps { defaultValue?: TValue; /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The new value. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onChange?: (value: TValue, context: PickerChangeHandlerContext) => void; /** * Callback fired when the value is accepted. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. * @param {TValue} value The value that was just accepted. * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value. */ onAccept?: (value: TValue, context: PickerChangeHandlerContext) => void; /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError?: (error: TError, value: TValue) => void; } diff --git a/packages/x-date-pickers/src/internals/hooks/useValidation.ts b/packages/x-date-pickers/src/internals/hooks/useValidation.ts index e0197c2c395c..ce2fb99cfb29 100644 --- a/packages/x-date-pickers/src/internals/hooks/useValidation.ts +++ b/packages/x-date-pickers/src/internals/hooks/useValidation.ts @@ -5,13 +5,13 @@ import { PickerValidDate } from '../../models'; interface ValidationCommonProps { /** - * Callback fired when the error associated to the current value changes. + * Callback fired when the error associated with the current value changes. * When a validation error is detected, the `error` parameter contains a non-null value. * This can be used to render an appropriate form error. - * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @param {TError} error The reason why the current value is not valid. - * @param {TValue} value The value associated to the error + * @param {TValue} value The value associated with the error. */ onError?: (error: TError, value: TValue) => void; value: TValue; diff --git a/packages/x-date-pickers/src/internals/hooks/useViews.tsx b/packages/x-date-pickers/src/internals/hooks/useViews.tsx index c5c25387d2bf..e76c9f792049 100644 --- a/packages/x-date-pickers/src/internals/hooks/useViews.tsx +++ b/packages/x-date-pickers/src/internals/hooks/useViews.tsx @@ -14,7 +14,7 @@ export type PickerOnChangeFn = ( export interface UseViewsOptions { /** * Callback fired when the value changes. - * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value. + * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value. * @template TView The view type. Will be one of date or time views. * @param {TValue} value The new value. * @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete.