@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.
@@ -1,49 +1,116 @@
1
1
  import type { SyntheticEvent } from 'react';
2
- import type { DateInput2Props } from './props';
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
- ({ renderLabel, screenReaderLabels, isRequired, interaction, isInline, value, messages, width, onChange, onBlur, withYearPicker, invalidDateErrorMessage, locale, timezone, placeholder, dateFormat, onRequestValidateDate, disabledDates, renderCalendarIcon, margin, inputRef, ...rest }: DateInput2Props): import("@emotion/react/jsx-runtime").JSX.Element;
11
- propTypes: import("@instructure/shared-types").PropValidators<keyof {
12
- renderLabel: import("@instructure/shared-types").Renderable;
13
- screenReaderLabels: {
14
- calendarIcon: string;
15
- prevMonthButton: string;
16
- nextMonthButton: string;
17
- };
18
- value?: string;
19
- placeholder?: string;
20
- onChange?: (event: React.SyntheticEvent, inputValue: string, utcDateString: string) => void;
21
- onBlur?: (event: React.SyntheticEvent, value: string, utcDateString: string) => void;
22
- interaction?: "enabled" | "disabled" | "readonly";
23
- isRequired?: boolean;
24
- isInline?: boolean;
25
- width?: string;
26
- messages?: FormMessage[];
27
- invalidDateErrorMessage?: string;
28
- locale?: string;
29
- timezone?: string;
30
- withYearPicker?: {
31
- screenReaderLabel: string;
32
- onRequestYearChange?: (e: SyntheticEvent, requestedYear: number) => void;
33
- startYear: number;
34
- endYear: number;
35
- };
36
- dateFormat?: {
37
- parser: (input: string) => Date | null;
38
- formatter: (date: Date) => string;
39
- } | string;
40
- onRequestValidateDate?: (event: React.SyntheticEvent, value: string, utcDateString: string) => void;
41
- renderCalendarIcon?: import("@instructure/shared-types").Renderable;
42
- margin?: import("@instructure/emotion").Spacing;
43
- disabledDates?: string[] | ((isoDateToCheck: string) => boolean);
44
- inputRef?: (inputElement: HTMLInputElement | null) => void;
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":"AAyBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAe3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAsF7D;;;;GAIG;AACH,QAAA,MAAM,UAAU;gSAuBb,eAAe;;;;;;;;;;2BA/FhB,MAVK,cAAc;yBACqD,MAAO,cAAc;;;;;;;;;;;+BAwErC,CAAC;;;;;;;;wCAqC7C,MACV,cAAW;;;;;;CA0Ld,CAAA;AAID,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
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"}