@instructure/ui-date-input 10.16.1 → 10.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/es/DateInput2/__new-tests__/DateInput2.test.js +30 -8
- package/es/DateInput2/index.js +6 -4
- package/lib/DateInput2/__new-tests__/DateInput2.test.js +30 -8
- package/lib/DateInput2/index.js +5 -4
- package/package.json +20 -20
- package/src/DateInput2/__new-tests__/DateInput2.test.tsx +23 -0
- package/src/DateInput2/index.tsx +212 -194
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/DateInput2/index.d.ts +106 -39
- package/types/DateInput2/index.d.ts.map +1 -1
@@ -1,49 +1,116 @@
|
|
1
1
|
import type { SyntheticEvent } from 'react';
|
2
|
-
import
|
2
|
+
import { TextInput } from '@instructure/ui-text-input';
|
3
3
|
import type { FormMessage } from '@instructure/ui-form-field';
|
4
4
|
/**
|
5
5
|
---
|
6
6
|
category: components
|
7
7
|
---
|
8
8
|
**/
|
9
|
-
declare const DateInput2: {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
9
|
+
declare const DateInput2: import("react").ForwardRefExoticComponent<{
|
10
|
+
renderLabel: import("@instructure/shared-types").Renderable;
|
11
|
+
screenReaderLabels: {
|
12
|
+
calendarIcon: string;
|
13
|
+
prevMonthButton: string;
|
14
|
+
nextMonthButton: string;
|
15
|
+
};
|
16
|
+
value?: string;
|
17
|
+
placeholder?: string;
|
18
|
+
onChange?: (event: React.SyntheticEvent, inputValue: string, utcDateString: string) => void;
|
19
|
+
onBlur?: (event: React.SyntheticEvent, value: string, utcDateString: string) => void;
|
20
|
+
interaction?: "enabled" | "disabled" | "readonly";
|
21
|
+
isRequired?: boolean;
|
22
|
+
isInline?: boolean;
|
23
|
+
width?: string;
|
24
|
+
messages?: FormMessage[];
|
25
|
+
invalidDateErrorMessage?: string;
|
26
|
+
locale?: string;
|
27
|
+
timezone?: string;
|
28
|
+
withYearPicker?: {
|
29
|
+
screenReaderLabel: string;
|
30
|
+
onRequestYearChange?: (e: SyntheticEvent, requestedYear: number) => void;
|
31
|
+
startYear: number;
|
32
|
+
endYear: number;
|
33
|
+
};
|
34
|
+
dateFormat?: {
|
35
|
+
parser: (input: string) => Date | null;
|
36
|
+
formatter: (date: Date) => string;
|
37
|
+
} | string;
|
38
|
+
onRequestValidateDate?: (event: React.SyntheticEvent, value: string, utcDateString: string) => void;
|
39
|
+
renderCalendarIcon?: import("@instructure/shared-types").Renderable;
|
40
|
+
margin?: import("@instructure/emotion").Spacing;
|
41
|
+
disabledDates?: string[] | ((isoDateToCheck: string) => boolean);
|
42
|
+
inputRef?: (inputElement: HTMLInputElement | null) => void;
|
43
|
+
} & Omit<import("react").InputHTMLAttributes<{
|
44
|
+
renderLabel: import("@instructure/shared-types").Renderable;
|
45
|
+
screenReaderLabels: {
|
46
|
+
calendarIcon: string;
|
47
|
+
prevMonthButton: string;
|
48
|
+
nextMonthButton: string;
|
49
|
+
};
|
50
|
+
value?: string;
|
51
|
+
placeholder?: string;
|
52
|
+
onChange?: (event: React.SyntheticEvent, inputValue: string, utcDateString: string) => void;
|
53
|
+
onBlur?: (event: React.SyntheticEvent, value: string, utcDateString: string) => void;
|
54
|
+
interaction?: "enabled" | "disabled" | "readonly";
|
55
|
+
isRequired?: boolean;
|
56
|
+
isInline?: boolean;
|
57
|
+
width?: string;
|
58
|
+
messages?: FormMessage[];
|
59
|
+
invalidDateErrorMessage?: string;
|
60
|
+
locale?: string;
|
61
|
+
timezone?: string;
|
62
|
+
withYearPicker?: {
|
63
|
+
screenReaderLabel: string;
|
64
|
+
onRequestYearChange?: (e: SyntheticEvent, requestedYear: number) => void;
|
65
|
+
startYear: number;
|
66
|
+
endYear: number;
|
67
|
+
};
|
68
|
+
dateFormat?: {
|
69
|
+
parser: (input: string) => Date | null;
|
70
|
+
formatter: (date: Date) => string;
|
71
|
+
} | string;
|
72
|
+
onRequestValidateDate?: (event: React.SyntheticEvent, value: string, utcDateString: string) => void;
|
73
|
+
renderCalendarIcon?: import("@instructure/shared-types").Renderable;
|
74
|
+
margin?: import("@instructure/emotion").Spacing;
|
75
|
+
disabledDates?: string[] | ((isoDateToCheck: string) => boolean);
|
76
|
+
inputRef?: (inputElement: HTMLInputElement | null) => void;
|
77
|
+
} & Element>, "dir" | keyof {
|
78
|
+
renderLabel: import("@instructure/shared-types").Renderable;
|
79
|
+
screenReaderLabels: {
|
80
|
+
calendarIcon: string;
|
81
|
+
prevMonthButton: string;
|
82
|
+
nextMonthButton: string;
|
83
|
+
};
|
84
|
+
value?: string;
|
85
|
+
placeholder?: string;
|
86
|
+
onChange?: (event: React.SyntheticEvent, inputValue: string, utcDateString: string) => void;
|
87
|
+
onBlur?: (event: React.SyntheticEvent, value: string, utcDateString: string) => void;
|
88
|
+
interaction?: "enabled" | "disabled" | "readonly";
|
89
|
+
isRequired?: boolean;
|
90
|
+
isInline?: boolean;
|
91
|
+
width?: string;
|
92
|
+
messages?: FormMessage[];
|
93
|
+
invalidDateErrorMessage?: string;
|
94
|
+
locale?: string;
|
95
|
+
timezone?: string;
|
96
|
+
withYearPicker?: {
|
97
|
+
screenReaderLabel: string;
|
98
|
+
onRequestYearChange?: (e: SyntheticEvent, requestedYear: number) => void;
|
99
|
+
startYear: number;
|
100
|
+
endYear: number;
|
101
|
+
};
|
102
|
+
dateFormat?: {
|
103
|
+
parser: (input: string) => Date | null;
|
104
|
+
formatter: (date: Date) => string;
|
105
|
+
} | string;
|
106
|
+
onRequestValidateDate?: (event: React.SyntheticEvent, value: string, utcDateString: string) => void;
|
107
|
+
renderCalendarIcon?: import("@instructure/shared-types").Renderable;
|
108
|
+
margin?: import("@instructure/emotion").Spacing;
|
109
|
+
disabledDates?: string[] | ((isoDateToCheck: string) => boolean);
|
110
|
+
inputRef?: (inputElement: HTMLInputElement | null) => void;
|
111
|
+
}> & {
|
112
|
+
dir?: "ltr" | "rtl";
|
113
|
+
} & import("react").RefAttributes<TextInput>>;
|
47
114
|
export default DateInput2;
|
48
115
|
export { DateInput2 };
|
49
116
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DateInput2/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DateInput2/index.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAS3C,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAOtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAsF7D;;;;GAIG;AAEH,QAAA,MAAM,UAAU;;;;;;;;;uBApFI,MAAQ,cAAa;qBAEnB,MAAM,cAAc;;;;;;;;;;;2BAwErC,CAAC;;;;;;;;oCA+BA,MAAK,cAAc;;;;;;;;;;;;;;uBAzGL,MAAQ,cAAa;qBAEnB,MAAM,cAAc;;;;;;;;;;;2BAwErC,CAAC;;;;;;;;oCA+BA,MAAK,cAAc;;;;;;;;;;;;;;uBAzGL,MAAQ,cAAa;qBAEnB,MAAM,cAAc;;;;;;;;;;;2BAwErC,CAAC;;;;;;;;oCA+BA,MAAK,cAAc;;;;;;;6CA4MxB,CAAA;AAID,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
|