@instructure/ui-date-input 9.6.0 → 10.0.1-pr-snapshot-1723800180253
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 +4 -10
- package/es/DateInput2/index.js +33 -42
- package/es/DateInput2/props.js +1 -2
- package/lib/DateInput2/index.js +33 -42
- package/lib/DateInput2/props.js +1 -2
- package/package.json +20 -20
- package/src/DateInput2/README.md +1 -103
- package/src/DateInput2/index.tsx +48 -53
- package/src/DateInput2/props.ts +6 -33
- package/src/index.ts +0 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/DateInput2/index.d.ts +2 -34
- package/types/DateInput2/index.d.ts.map +1 -1
- package/types/DateInput2/props.d.ts +5 -10
- package/types/DateInput2/props.d.ts.map +1 -1
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
@@ -1,45 +1,13 @@
|
|
1
|
-
import type { SyntheticEvent } from 'react';
|
2
1
|
import { jsx } from '@instructure/emotion';
|
3
2
|
import type { DateInput2Props } from './props';
|
4
|
-
import type { FormMessage } from '@instructure/ui-form-field';
|
5
3
|
/**
|
6
4
|
---
|
7
5
|
category: components
|
8
6
|
---
|
9
7
|
**/
|
10
8
|
declare const DateInput2: {
|
11
|
-
({ renderLabel, screenReaderLabels, isRequired, interaction, size, isInline, value, messages, width, onChange, onBlur, withYearPicker, onRequestValidateDate, invalidDateErrorMessage, locale, timezone, placeholder,
|
12
|
-
propTypes: import("@instructure/shared-types").PropValidators<keyof
|
13
|
-
renderLabel: import("@instructure/shared-types").Renderable;
|
14
|
-
screenReaderLabels: {
|
15
|
-
calendarIcon: string;
|
16
|
-
prevMonthButton: string;
|
17
|
-
nextMonthButton: string;
|
18
|
-
};
|
19
|
-
value?: string;
|
20
|
-
size?: "small" | "medium" | "large";
|
21
|
-
placeholder?: string;
|
22
|
-
onChange?: (event: React.SyntheticEvent, inputValue: string, dateString: string) => void;
|
23
|
-
onBlur?: (event: React.SyntheticEvent) => void;
|
24
|
-
interaction?: "enabled" | "disabled" | "readonly";
|
25
|
-
isRequired?: boolean;
|
26
|
-
isInline?: boolean;
|
27
|
-
width?: string;
|
28
|
-
messages?: FormMessage[];
|
29
|
-
onRequestShowCalendar?: (event: SyntheticEvent) => void;
|
30
|
-
onRequestHideCalendar?: (event: SyntheticEvent) => void;
|
31
|
-
onRequestValidateDate?: (value?: string, internalValidationPassed?: boolean) => void | FormMessage[];
|
32
|
-
invalidDateErrorMessage?: string;
|
33
|
-
locale?: string;
|
34
|
-
timezone?: string;
|
35
|
-
withYearPicker?: {
|
36
|
-
screenReaderLabel: string;
|
37
|
-
onRequestYearChange?: (e: SyntheticEvent, requestedYear: number) => void;
|
38
|
-
startYear: number;
|
39
|
-
endYear: number;
|
40
|
-
};
|
41
|
-
formatDate?: (isoDate: string, locale: string, timezone: string) => string;
|
42
|
-
}>;
|
9
|
+
({ renderLabel, screenReaderLabels, isRequired, interaction, size, isInline, value, messages, width, onChange, onBlur, withYearPicker, onRequestValidateDate, invalidDateErrorMessage, locale, timezone, placeholder, ...rest }: DateInput2Props): jsx.JSX.Element;
|
10
|
+
propTypes: import("@instructure/shared-types").PropValidators<keyof DateInput2Props>;
|
43
11
|
};
|
44
12
|
export default DateInput2;
|
45
13
|
export { DateInput2 };
|
@@ -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":"AAwCA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAG1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAuB9C;;;;GAIG;AACH,QAAA,MAAM,UAAU;qOAmBb,eAAe;;CAmKjB,CAAA;AAID,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import type { SyntheticEvent
|
1
|
+
import type { SyntheticEvent } from 'react';
|
2
2
|
import type { FormMessage } from '@instructure/ui-form-field';
|
3
|
-
import type {
|
4
|
-
type
|
3
|
+
import type { Renderable, PropValidators } from '@instructure/shared-types';
|
4
|
+
type DateInput2Props = {
|
5
5
|
/**
|
6
6
|
* Specifies the input label.
|
7
7
|
*/
|
@@ -27,7 +27,7 @@ type DateInput2OwnProps = {
|
|
27
27
|
/**
|
28
28
|
* Callback fired when the input changes.
|
29
29
|
*/
|
30
|
-
onChange?: (event: React.SyntheticEvent,
|
30
|
+
onChange?: (event: React.SyntheticEvent, value: string) => void;
|
31
31
|
/**
|
32
32
|
* Callback executed when the input fires a blur event.
|
33
33
|
*/
|
@@ -124,13 +124,8 @@ type DateInput2OwnProps = {
|
|
124
124
|
startYear: number;
|
125
125
|
endYear: number;
|
126
126
|
};
|
127
|
-
/**
|
128
|
-
* Formatting function for how the date should be displayed inside the input field. It will be applied if the user clicks on a date in the date picker of after blur event from the input field.
|
129
|
-
*/
|
130
|
-
formatDate?: (isoDate: string, locale: string, timezone: string) => string;
|
131
127
|
};
|
132
|
-
type PropKeys = keyof
|
133
|
-
type DateInput2Props = DateInput2OwnProps & OtherHTMLAttributes<DateInput2OwnProps, InputHTMLAttributes<DateInput2OwnProps & Element>>;
|
128
|
+
type PropKeys = keyof DateInput2Props;
|
134
129
|
declare const propTypes: PropValidators<PropKeys>;
|
135
130
|
export type { DateInput2Props };
|
136
131
|
export { propTypes };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/DateInput2/props.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,cAAc,EAAE,
|
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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C/B,IAAI,GAAG,WAAW,EAAE,CAAA;IACzB;;;QAGI;IACJ,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC;;;;;;;;;;;QAWI;IACJ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;;;;;;;;QAWI;IACJ,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE;QACf,iBAAiB,EAAE,MAAM,CAAA;QACzB,mBAAmB,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,KAAK,IAAI,CAAA;QACxE,SAAS,EAAE,MAAM,CAAA;QACjB,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,eAAe,CAAA;AAErC,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAuBvC,CAAA;AAED,YAAY,EAAE,eAAe,EAAE,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
package/types/index.d.ts
CHANGED
package/types/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
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
|
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"}
|