@transferwise/components 0.0.0-experimental-8e7ab50 → 0.0.0-experimental-72aed20
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/build/index.esm.js +9 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +9 -0
- package/build/index.js.map +1 -1
- package/build/types/dateInput/DateInput.d.ts +2 -0
- package/build/types/dateInput/DateInput.d.ts.map +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/dateInput/DateInput.js +8 -0
- package/src/dateInput/DateInput.story.tsx +2 -0
- package/src/phoneNumberInput/PhoneNumberInput.js +1 -0
|
@@ -22,8 +22,10 @@ export interface DateInputProps {
|
|
|
22
22
|
onFocus?: (...args: any[])=>any;
|
|
23
23
|
onBlur?: (...args: any[])=>any;
|
|
24
24
|
dayLabel?: string;
|
|
25
|
+
dayAutoComplete?: string;
|
|
25
26
|
monthLabel?: string;
|
|
26
27
|
yearLabel?: string;
|
|
28
|
+
yearAutoComplete?: string;
|
|
27
29
|
monthFormat?: DateInputMonthFormat;
|
|
28
30
|
mode?: DateInputMode;
|
|
29
31
|
placeholders?: DateInputPlaceholders;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../src/dateInput/DateInput.js"],"names":[],"mappings":";AAeA
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../src/dateInput/DateInput.js"],"names":[],"mappings":";AAeA;;;;;;;;;;;;;;;;;gCAsQC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneNumberInput.d.ts","sourceRoot":"","sources":["../../../src/phoneNumberInput/PhoneNumberInput.js"],"names":[],"mappings":";AAuBA,
|
|
1
|
+
{"version":3,"file":"PhoneNumberInput.d.ts","sourceRoot":"","sources":["../../../src/phoneNumberInput/PhoneNumberInput.js"],"names":[],"mappings":";AAuBA,2EAyJC;;;;;;;;;;;;;;;;;;;;;;;;;;QAwBC,gCAAY;QACZ,+BAAW"}
|
package/package.json
CHANGED
|
@@ -18,8 +18,10 @@ const DateInput = ({
|
|
|
18
18
|
size,
|
|
19
19
|
value,
|
|
20
20
|
dayLabel,
|
|
21
|
+
dayAutoComplete,
|
|
21
22
|
monthLabel,
|
|
22
23
|
yearLabel,
|
|
24
|
+
yearAutoComplete,
|
|
23
25
|
monthFormat,
|
|
24
26
|
mode,
|
|
25
27
|
onChange,
|
|
@@ -239,6 +241,7 @@ const DateInput = ({
|
|
|
239
241
|
<Input
|
|
240
242
|
type="number"
|
|
241
243
|
name="day"
|
|
244
|
+
autoComplete={dayAutoComplete}
|
|
242
245
|
value={day || ''}
|
|
243
246
|
placeholder={placeholders.day}
|
|
244
247
|
disabled={disabled}
|
|
@@ -259,6 +262,7 @@ const DateInput = ({
|
|
|
259
262
|
<Input
|
|
260
263
|
type="number"
|
|
261
264
|
name="year"
|
|
265
|
+
autoComplete={yearAutoComplete}
|
|
262
266
|
placeholder={placeholders.year}
|
|
263
267
|
value={year || ''}
|
|
264
268
|
disabled={disabled}
|
|
@@ -303,8 +307,10 @@ DateInput.propTypes = {
|
|
|
303
307
|
onFocus: PropTypes.func,
|
|
304
308
|
onBlur: PropTypes.func,
|
|
305
309
|
dayLabel: PropTypes.string,
|
|
310
|
+
dayAutoComplete: PropTypes.string,
|
|
306
311
|
monthLabel: PropTypes.string,
|
|
307
312
|
yearLabel: PropTypes.string,
|
|
313
|
+
yearAutoComplete: PropTypes.string,
|
|
308
314
|
monthFormat: PropTypes.oneOf(['long', 'short']),
|
|
309
315
|
mode: PropTypes.oneOf(['day-month-year', 'month-year']),
|
|
310
316
|
placeholders: PropTypes.shape({
|
|
@@ -322,6 +328,8 @@ DateInput.defaultProps = {
|
|
|
322
328
|
value: null,
|
|
323
329
|
onFocus: null,
|
|
324
330
|
onBlur: null,
|
|
331
|
+
dayAutoComplete: null,
|
|
332
|
+
yearAutoComplete: null,
|
|
325
333
|
monthFormat: MonthFormat.LONG,
|
|
326
334
|
mode: DateMode.DAY_MONTH_YEAR,
|
|
327
335
|
id: '',
|
|
@@ -8,8 +8,10 @@ export default {
|
|
|
8
8
|
title: 'Forms/DateInput',
|
|
9
9
|
args: {
|
|
10
10
|
dayLabel: 'Day input',
|
|
11
|
+
dayAutoComplete: 'bday-day',
|
|
11
12
|
monthLabel: 'Month select',
|
|
12
13
|
yearLabel: 'Year input',
|
|
14
|
+
yearAutoComplete: 'bday-year',
|
|
13
15
|
selectProps: {
|
|
14
16
|
buttonProps: {
|
|
15
17
|
'aria-label': 'Select month',
|