carbon-react 107.1.0 → 107.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/date/date.d.ts +10 -1
- package/esm/components/date/index.d.ts +1 -0
- package/esm/components/date-range/date-range.d.ts +3 -3
- package/esm/components/date-range/index.d.ts +1 -0
- package/lib/components/date/date.d.ts +10 -1
- package/lib/components/date/index.d.ts +1 -0
- package/lib/components/date-range/date-range.d.ts +3 -3
- package/lib/components/date-range/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2,6 +2,15 @@ import * as React from "react";
|
|
|
2
2
|
import { DayPickerProps } from "react-day-picker";
|
|
3
3
|
import { TextboxProps } from "../textbox/textbox";
|
|
4
4
|
|
|
5
|
+
export interface DateChangeEvent {
|
|
6
|
+
target: {
|
|
7
|
+
value: {
|
|
8
|
+
formattedValue: string;
|
|
9
|
+
rawValue: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
5
14
|
export interface DateInputProps
|
|
6
15
|
extends Omit<
|
|
7
16
|
TextboxProps,
|
|
@@ -31,7 +40,7 @@ export interface DateInputProps
|
|
|
31
40
|
/** Maximum possible date YYYY-MM-DD */
|
|
32
41
|
maxDate?: string;
|
|
33
42
|
/** Specify a callback triggered on change */
|
|
34
|
-
onChange: (ev:
|
|
43
|
+
onChange: (ev: DateChangeEvent) => void;
|
|
35
44
|
/** The current date string */
|
|
36
45
|
value: string;
|
|
37
46
|
/** Pass any props that match the DayPickerProps interface to override default behaviors */
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
3
|
import { DateInputProps } from "../date/date";
|
|
4
4
|
|
|
5
|
-
interface DateRangeChangeEvent {
|
|
5
|
+
export interface DateRangeChangeEvent {
|
|
6
6
|
target: {
|
|
7
7
|
value: [
|
|
8
8
|
{
|
|
@@ -19,7 +19,7 @@ interface DateRangeChangeEvent {
|
|
|
19
19
|
|
|
20
20
|
export interface DateRangeProps extends MarginProps {
|
|
21
21
|
/** Props for the child end Date component */
|
|
22
|
-
endDateProps?: DateInputProps
|
|
22
|
+
endDateProps?: Partial<DateInputProps>;
|
|
23
23
|
/** Optional label for endDate field */
|
|
24
24
|
endLabel?: string;
|
|
25
25
|
/**
|
|
@@ -51,7 +51,7 @@ export interface DateRangeProps extends MarginProps {
|
|
|
51
51
|
/** Specify a callback triggered on blur */
|
|
52
52
|
onBlur?: (ev: DateRangeChangeEvent) => void;
|
|
53
53
|
/** Props for the child start Date component */
|
|
54
|
-
startDateProps?: DateInputProps
|
|
54
|
+
startDateProps?: Partial<DateInputProps>;
|
|
55
55
|
/** Optional label for startDate field */
|
|
56
56
|
startLabel?: string;
|
|
57
57
|
/**
|
|
@@ -2,6 +2,15 @@ import * as React from "react";
|
|
|
2
2
|
import { DayPickerProps } from "react-day-picker";
|
|
3
3
|
import { TextboxProps } from "../textbox/textbox";
|
|
4
4
|
|
|
5
|
+
export interface DateChangeEvent {
|
|
6
|
+
target: {
|
|
7
|
+
value: {
|
|
8
|
+
formattedValue: string;
|
|
9
|
+
rawValue: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
5
14
|
export interface DateInputProps
|
|
6
15
|
extends Omit<
|
|
7
16
|
TextboxProps,
|
|
@@ -31,7 +40,7 @@ export interface DateInputProps
|
|
|
31
40
|
/** Maximum possible date YYYY-MM-DD */
|
|
32
41
|
maxDate?: string;
|
|
33
42
|
/** Specify a callback triggered on change */
|
|
34
|
-
onChange: (ev:
|
|
43
|
+
onChange: (ev: DateChangeEvent) => void;
|
|
35
44
|
/** The current date string */
|
|
36
45
|
value: string;
|
|
37
46
|
/** Pass any props that match the DayPickerProps interface to override default behaviors */
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
3
|
import { DateInputProps } from "../date/date";
|
|
4
4
|
|
|
5
|
-
interface DateRangeChangeEvent {
|
|
5
|
+
export interface DateRangeChangeEvent {
|
|
6
6
|
target: {
|
|
7
7
|
value: [
|
|
8
8
|
{
|
|
@@ -19,7 +19,7 @@ interface DateRangeChangeEvent {
|
|
|
19
19
|
|
|
20
20
|
export interface DateRangeProps extends MarginProps {
|
|
21
21
|
/** Props for the child end Date component */
|
|
22
|
-
endDateProps?: DateInputProps
|
|
22
|
+
endDateProps?: Partial<DateInputProps>;
|
|
23
23
|
/** Optional label for endDate field */
|
|
24
24
|
endLabel?: string;
|
|
25
25
|
/**
|
|
@@ -51,7 +51,7 @@ export interface DateRangeProps extends MarginProps {
|
|
|
51
51
|
/** Specify a callback triggered on blur */
|
|
52
52
|
onBlur?: (ev: DateRangeChangeEvent) => void;
|
|
53
53
|
/** Props for the child start Date component */
|
|
54
|
-
startDateProps?: DateInputProps
|
|
54
|
+
startDateProps?: Partial<DateInputProps>;
|
|
55
55
|
/** Optional label for startDate field */
|
|
56
56
|
startLabel?: string;
|
|
57
57
|
/**
|