@instructure/ui-date-input 9.2.1-snapshot-14 → 9.2.1-snapshot-16
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 +5 -2
- package/es/DateInput/index.js +0 -2
- package/es/DateInput/props.js +2 -1
- package/es/DateInput2/index.js +208 -0
- package/es/DateInput2/props.js +48 -0
- package/es/index.js +2 -1
- package/lib/DateInput/index.js +0 -2
- package/lib/DateInput/props.js +2 -1
- package/lib/DateInput2/index.js +217 -0
- package/lib/DateInput2/props.js +54 -0
- package/lib/index.js +8 -1
- package/package.json +21 -19
- package/src/DateInput/README.md +2 -31
- package/src/DateInput/index.tsx +0 -2
- package/src/DateInput/props.ts +20 -1
- package/src/DateInput2/README.md +114 -0
- package/src/DateInput2/index.tsx +264 -0
- package/src/DateInput2/props.ts +178 -0
- package/src/index.ts +1 -0
- package/tsconfig.build.json +3 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/DateInput/index.d.ts +12 -2
- package/types/DateInput/index.d.ts.map +1 -1
- package/types/DateInput/props.d.ts +17 -0
- package/types/DateInput/props.d.ts.map +1 -1
- package/types/DateInput2/index.d.ts +14 -0
- package/types/DateInput2/index.d.ts.map +1 -0
- package/types/DateInput2/props.d.ts +124 -0
- package/types/DateInput2/props.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
@@ -11,8 +11,6 @@ import type { FormMessage } from '@instructure/ui-form-field';
|
|
11
11
|
---
|
12
12
|
category: components
|
13
13
|
---
|
14
|
-
The `DateInput` component provides a visual interface for inputting date data.
|
15
|
-
See <https://instructure.design/#DateInput/>
|
16
14
|
**/
|
17
15
|
declare class DateInput extends Component<DateInputProps, DateInputState> {
|
18
16
|
static readonly componentId = "DateInput";
|
@@ -56,6 +54,12 @@ declare class DateInput extends Component<DateInputProps, DateInputState> {
|
|
56
54
|
disabledDateErrorMessage?: string | ((rawDateValue: string) => FormMessage);
|
57
55
|
locale?: string;
|
58
56
|
timezone?: string;
|
57
|
+
withYearPicker?: {
|
58
|
+
screenReaderLabel: string;
|
59
|
+
onRequestYearChange?: (e: any, requestedYear: number) => void;
|
60
|
+
startYear: number;
|
61
|
+
endYear: number;
|
62
|
+
};
|
59
63
|
}>;
|
60
64
|
static allowedProps: readonly (keyof {
|
61
65
|
renderLabel: import("@instructure/shared-types").Renderable;
|
@@ -95,6 +99,12 @@ declare class DateInput extends Component<DateInputProps, DateInputState> {
|
|
95
99
|
disabledDateErrorMessage?: string | ((rawDateValue: string) => FormMessage);
|
96
100
|
locale?: string;
|
97
101
|
timezone?: string;
|
102
|
+
withYearPicker?: {
|
103
|
+
screenReaderLabel: string;
|
104
|
+
onRequestYearChange?: (e: any, requestedYear: number) => void;
|
105
|
+
startYear: number;
|
106
|
+
endYear: number;
|
107
|
+
};
|
98
108
|
})[];
|
99
109
|
static defaultProps: {
|
100
110
|
value: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DateInput/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAY,SAAS,EAAgB,MAAM,OAAO,CAAA;AAGhE,OAAO,KAAK,EAAiB,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAI/E,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAUhE,OAAO,EAAY,kBAAkB,EAAU,MAAM,sBAAsB,CAAA;AAE3E,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAKrD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAE7D
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/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AAc,uBASjB;IAED,IAAI,WAAW,0DAEd;IAED,YAAY,SAAU,MAAM,YAI3B;IAED,cAAc,EAAE,cAAc,CAAC,UAAU,CAAC,CAQzC;IAED,iBAAiB,EAAE,cAAc,CAAC,UAAU,CAAC,CAG5C;IAED,kBAAkB,UAAW,KAAK,CAAC,cAAc,UAMhD;IAED,YAAY,SAAU,MAAM,mBAoD3B;IAED,kBAAkB,UAAW,KAAK,CAAC,cAAc,iBAAiB,MAAM,UAqBvE;IAED,qBAAqB,EAAE,eAAe,CAAC,0BAA0B,CAAC,CAiDjE;IAED,2BAA2B,CAAC,IAAI,SAAS;IAOzC,UAAU,CAAC,cAAc,EAAE,gBAAgB,CAAC,gBAAgB,CAAC;IAoB7D,cAAc,CAAC,EACb,YAAY,EACZ,cAAc,EACf,EAAE;QACD,YAAY,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAA;QAC9C,cAAc,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAA;KACnD;IAuDD,WAAW,CAAC,EACV,aAAa,EACb,eAAe,EAChB,EAAE;QACD,aAAa,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAA;QAChD,eAAe,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAA;KACnD;IA6DD,kBAAkB,4BAGgB;IAElC,MAAM;CA2CP;AAED,eAAe,SAAS,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
@@ -202,6 +202,23 @@ type DateInputOwnProps = {
|
|
202
202
|
* property or a context property.
|
203
203
|
**/
|
204
204
|
timezone?: string;
|
205
|
+
/**
|
206
|
+
* If set, years can be picked from a dropdown.
|
207
|
+
* It accepts an object.
|
208
|
+
* screenReaderLabel: string // e.g.: i18n("pick a year")
|
209
|
+
*
|
210
|
+
* onRequestYearChange?:(e: React.MouseEvent,requestedYear: number): void // if set, on year change, only this will be called and no internal change will take place
|
211
|
+
*
|
212
|
+
* startYear: number // e.g.: 2001, sets the start year of the selectable list
|
213
|
+
*
|
214
|
+
* endYear: number // e.g.: 2030, sets the end year of the selectable list
|
215
|
+
*/
|
216
|
+
withYearPicker?: {
|
217
|
+
screenReaderLabel: string;
|
218
|
+
onRequestYearChange?: (e: any, requestedYear: number) => void;
|
219
|
+
startYear: number;
|
220
|
+
endYear: number;
|
221
|
+
};
|
205
222
|
};
|
206
223
|
type PropKeys = keyof DateInputOwnProps;
|
207
224
|
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/DateInput/props.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,cAAc,EACf,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EAAE,EAAE,mBAAmB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAEhF,KAAK,iBAAiB,GAAG;IACvB;;OAEG;IACH,WAAW,EAAE,UAAU,CAAA;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CACT,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAC1C,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KACrB,IAAI,CAAA;IACT;;OAEG;IACH,MAAM,CAAC,EAAE,CA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Ac,CAAC,QAAQ,CA6CvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAoCnB,CAAA;AAED,KAAK,cAAc,GAAG;IACpB,WAAW,EAAE,OAAO,CAAA;IACpB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,WAAW,EAAE,CAAA;CACxB,CAAA;AAED,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { jsx } from '@instructure/emotion';
|
2
|
+
import type { DateInput2Props } from './props';
|
3
|
+
/**
|
4
|
+
---
|
5
|
+
category: components
|
6
|
+
---
|
7
|
+
**/
|
8
|
+
declare const DateInput2: {
|
9
|
+
({ renderLabel, screenReaderLabels, isRequired, interaction, size, isInline, value, messages, width, onChange, onBlur, withYearPicker, invalidDateErrorMessage, locale, timezone, placeholder, ...rest }: DateInput2Props): jsx.JSX.Element;
|
10
|
+
propTypes: import("@instructure/shared-types").PropValidators<keyof DateInput2Props>;
|
11
|
+
};
|
12
|
+
export default DateInput2;
|
13
|
+
export { DateInput2 };
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DateInput2/index.tsx"],"names":[],"mappings":"AAwCA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAG1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAiC9C;;;;GAIG;AACH,QAAA,MAAM,UAAU;8MAkBb,eAAe;;CA+JjB,CAAA;AAID,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
@@ -0,0 +1,124 @@
|
|
1
|
+
import type { SyntheticEvent } from 'react';
|
2
|
+
import type { FormMessage } from '@instructure/ui-form-field';
|
3
|
+
import type { Renderable, PropValidators } from '@instructure/shared-types';
|
4
|
+
type DateInput2Props = {
|
5
|
+
/**
|
6
|
+
* Specifies the input label.
|
7
|
+
*/
|
8
|
+
renderLabel: Renderable;
|
9
|
+
screenReaderLabels: {
|
10
|
+
calendarIcon: string;
|
11
|
+
prevMonthButton: string;
|
12
|
+
nextMonthButton: string;
|
13
|
+
};
|
14
|
+
/**
|
15
|
+
* Specifies the input value.
|
16
|
+
*/
|
17
|
+
value?: string;
|
18
|
+
/**
|
19
|
+
* Specifies the input size.
|
20
|
+
*/
|
21
|
+
size?: 'small' | 'medium' | 'large';
|
22
|
+
/**
|
23
|
+
* Html placeholder text to display when the input has no value. This should
|
24
|
+
* be hint text, not a label replacement.
|
25
|
+
*/
|
26
|
+
placeholder?: string;
|
27
|
+
/**
|
28
|
+
* Callback fired when the input changes.
|
29
|
+
*/
|
30
|
+
onChange?: (event: React.SyntheticEvent, value: string) => void;
|
31
|
+
/**
|
32
|
+
* Callback executed when the input fires a blur event.
|
33
|
+
*/
|
34
|
+
onBlur?: (event: React.SyntheticEvent) => void;
|
35
|
+
/**
|
36
|
+
* Specifies if interaction with the input is enabled, disabled, or readonly.
|
37
|
+
* When "disabled", the input changes visibly to indicate that it cannot
|
38
|
+
* receive user interactions. When "readonly" the input still cannot receive
|
39
|
+
* user interactions but it keeps the same styles as if it were enabled.
|
40
|
+
*/
|
41
|
+
interaction?: 'enabled' | 'disabled' | 'readonly';
|
42
|
+
/**
|
43
|
+
* Specifies if the input is required.
|
44
|
+
*/
|
45
|
+
isRequired?: boolean;
|
46
|
+
/**
|
47
|
+
* Controls whether the input is rendered inline with other elements or if it
|
48
|
+
* is rendered as a block level element.
|
49
|
+
*/
|
50
|
+
isInline?: boolean;
|
51
|
+
/**
|
52
|
+
* Specifies the width of the input.
|
53
|
+
*/
|
54
|
+
width?: string;
|
55
|
+
/**
|
56
|
+
* Displays messages and validation for the input. It should be an object
|
57
|
+
* with the following shape:
|
58
|
+
* `{
|
59
|
+
* text: PropTypes.node,
|
60
|
+
* type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
|
61
|
+
* }`
|
62
|
+
*/
|
63
|
+
messages?: FormMessage[];
|
64
|
+
/**
|
65
|
+
* Callback fired requesting the calendar be shown.
|
66
|
+
*/
|
67
|
+
onRequestShowCalendar?: (event: SyntheticEvent) => void;
|
68
|
+
/**
|
69
|
+
* Callback fired requesting the calendar be hidden.
|
70
|
+
*/
|
71
|
+
onRequestHideCalendar?: (event: SyntheticEvent) => void;
|
72
|
+
/**
|
73
|
+
* The message shown to the user when the date is invalid.
|
74
|
+
**/
|
75
|
+
invalidDateErrorMessage?: string;
|
76
|
+
/**
|
77
|
+
* A standard language identifier.
|
78
|
+
*
|
79
|
+
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) for
|
80
|
+
* more details.
|
81
|
+
*
|
82
|
+
* This property can also be set via a context property and if both are set
|
83
|
+
* then the component property takes precedence over the context property.
|
84
|
+
*
|
85
|
+
* The web browser's locale will be used if no value is set via a component
|
86
|
+
* property or a context property.
|
87
|
+
**/
|
88
|
+
locale?: string;
|
89
|
+
/**
|
90
|
+
* A timezone identifier in the format: *Area/Location*
|
91
|
+
*
|
92
|
+
* See [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for the list
|
93
|
+
* of possible options.
|
94
|
+
*
|
95
|
+
* This property can also be set via a context property and if both are set
|
96
|
+
* then the component property takes precedence over the context property.
|
97
|
+
*
|
98
|
+
* The web browser's timezone will be used if no value is set via a component
|
99
|
+
* property or a context property.
|
100
|
+
**/
|
101
|
+
timezone?: string;
|
102
|
+
/**
|
103
|
+
* If set, years can be picked from a dropdown.
|
104
|
+
* It accepts an object.
|
105
|
+
* screenReaderLabel: string // e.g.: i18n("pick a year")
|
106
|
+
*
|
107
|
+
* onRequestYearChange?:(e: React.MouseEvent,requestedYear: number): void // if set, on year change, only this will be called and no internal change will take place
|
108
|
+
*
|
109
|
+
* startYear: number // e.g.: 2001, sets the start year of the selectable list
|
110
|
+
*
|
111
|
+
* endYear: number // e.g.: 2030, sets the end year of the selectable list
|
112
|
+
*/
|
113
|
+
withYearPicker?: {
|
114
|
+
screenReaderLabel: string;
|
115
|
+
onRequestYearChange?: (e: SyntheticEvent, requestedYear: number) => void;
|
116
|
+
startYear: number;
|
117
|
+
endYear: number;
|
118
|
+
};
|
119
|
+
};
|
120
|
+
type PropKeys = keyof DateInput2Props;
|
121
|
+
declare const propTypes: PropValidators<PropKeys>;
|
122
|
+
export type { DateInput2Props };
|
123
|
+
export { propTypes };
|
124
|
+
//# sourceMappingURL=props.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/DateInput2/props.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAI3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE3E,KAAK,eAAe,GAAG;IACrB;;OAEG;IACH,WAAW,EAAE,UAAU,CAAA;IACvB,kBAAkB,EAAE;QAClB,YAAY,EAAE,MAAM,CAAA;QACpB,eAAe,EAAE,MAAM,CAAA;QACvB,eAAe,EAAE,MAAM,CAAA;KACxB,CAAA;IACD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/D;;OAEG;IACH,MAA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index.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA"}
|