@elliemae/ds-controlled-form 2.4.2-rc.1 → 2.4.2-rc.11
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/cjs/autocomplete/parts/A11yFocusedOption.js +43 -0
- package/cjs/autocomplete/parts/container/Container.js +36 -24
- package/cjs/autocomplete/parts/container/styled.js +2 -2
- package/cjs/autocomplete/parts/menu-list/MenuList.js +4 -2
- package/cjs/autocomplete/parts/styled.js +2 -0
- package/cjs/autocomplete/utils/listHelper.js +1 -1
- package/cjs/checkbox/ControlledCheckbox.js +1 -1
- package/cjs/checkbox/react-desc-prop-types.js +2 -1
- package/cjs/checkbox/styles.js +4 -2
- package/cjs/combobox/ComboBoxCTX.js +6 -3
- package/cjs/combobox/config/useComboBox.js +15 -4
- package/cjs/combobox/parts/A11yFocusedOption.js +14 -6
- package/cjs/combobox/parts/A11ySelectedValues.js +0 -2
- package/cjs/combobox/parts/DropdownIndicator.js +2 -2
- package/cjs/combobox/parts/container/Container.js +10 -13
- package/cjs/combobox/parts/controls/Controls.js +16 -18
- package/cjs/combobox/parts/controls/useOnPillsNavigation.js +3 -3
- package/cjs/combobox/parts/controls-input/ControlsInput.js +2 -2
- package/cjs/combobox/parts/controls-input/useControlsInput.js +3 -2
- package/cjs/combobox/parts/controls-input/useKeyboardNavigation.js +16 -23
- package/cjs/combobox/parts/controls-input/useMaskedOnChange.js +6 -6
- package/cjs/combobox/parts/dropdown-indicator/DropdownIndicator.js +2 -2
- package/cjs/combobox/parts/header-list/useHeaderListHandlers.js +3 -3
- package/cjs/combobox/parts/menu-list/MenuList.js +7 -5
- package/cjs/combobox/parts/menu-list/styled.js +5 -3
- package/cjs/combobox/parts/menu-list/useItemRenderer.js +16 -15
- package/cjs/combobox/react-desc-prop-types.js +3 -2
- package/cjs/combobox/utils/listHelper.js +10 -0
- package/cjs/date-time-picker/config/useChangeHandlers.js +8 -12
- package/cjs/date-time-picker/config/useControlledDateTimePicker.js +13 -9
- package/cjs/date-time-picker/config/useFocusTracker.js +136 -0
- package/cjs/date-time-picker/config/useGetReferences.js +40 -19
- package/cjs/date-time-picker/config/useGlobalKeyHandlers.js +8 -12
- package/cjs/date-time-picker/parts/ClearButton/ClearButton.js +12 -2
- package/cjs/date-time-picker/parts/ClearButton/useClearButton.js +12 -25
- package/cjs/date-time-picker/parts/ControlledDateTimePickerContent.js +4 -7
- package/cjs/date-time-picker/parts/DateInputs/DDInput.js +8 -2
- package/cjs/date-time-picker/parts/DateInputs/DateInputs.js +9 -4
- package/cjs/date-time-picker/parts/DateInputs/MMInput.js +8 -2
- package/cjs/date-time-picker/parts/DateInputs/YYYYInput.js +8 -2
- package/cjs/date-time-picker/parts/DateInputs/useDateInputs.js +76 -95
- package/cjs/date-time-picker/parts/Pickers/Calendar/CalendarHead.js +31 -5
- package/cjs/date-time-picker/parts/Pickers/Calendar/Day.js +16 -10
- package/cjs/date-time-picker/parts/Pickers/Calendar/useConfigCalendarCTX.js +12 -12
- package/cjs/date-time-picker/parts/Pickers/Calendar/useFocusLogic.js +2 -38
- package/cjs/date-time-picker/parts/Pickers/Calendar/useKeyboardHandlers.js +40 -73
- package/cjs/date-time-picker/parts/Pickers/Calendar/usePopperTriggerLogic.js +18 -27
- package/cjs/date-time-picker/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +1 -0
- package/cjs/date-time-picker/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +17 -23
- package/cjs/date-time-picker/parts/Pickers/TimeWheel/HoursList.js +13 -7
- package/cjs/date-time-picker/parts/Pickers/TimeWheel/MeridiemList.js +14 -8
- package/cjs/date-time-picker/parts/Pickers/TimeWheel/MinutesList.js +13 -7
- package/cjs/date-time-picker/parts/Pickers/TimeWheel/useKeyboardHandlers.js +36 -230
- package/cjs/date-time-picker/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +11 -13
- package/cjs/date-time-picker/parts/TimeInputs/HHInput.js +8 -2
- package/cjs/date-time-picker/parts/TimeInputs/MeridiemInput.js +8 -2
- package/cjs/date-time-picker/parts/TimeInputs/MinutesInput.js +8 -2
- package/cjs/date-time-picker/parts/TimeInputs/TimeInputs.js +11 -6
- package/cjs/date-time-picker/parts/TimeInputs/useTimeInputs.js +44 -74
- package/cjs/date-time-picker/utils/constants.js +0 -12
- package/cjs/date-time-picker/utils/hooks/useGetStartingFocusedDay.js +38 -36
- package/cjs/input-group/InputGroup.js +8 -7
- package/cjs/input-group/exported-related/data-test-ids.js +12 -0
- package/cjs/input-group/exported-related/index.js +12 -0
- package/cjs/input-group/exported-related/theming.js +13 -0
- package/cjs/input-group/styled.js +21 -20
- package/esm/autocomplete/parts/A11yFocusedOption.js +32 -0
- package/esm/autocomplete/parts/container/Container.js +39 -27
- package/esm/autocomplete/parts/container/styled.js +2 -2
- package/esm/autocomplete/parts/menu-list/MenuList.js +5 -3
- package/esm/autocomplete/parts/styled.js +1 -0
- package/esm/autocomplete/utils/listHelper.js +1 -1
- package/esm/checkbox/ControlledCheckbox.js +2 -2
- package/esm/checkbox/react-desc-prop-types.js +2 -1
- package/esm/checkbox/styles.js +4 -3
- package/esm/combobox/ComboBoxCTX.js +6 -3
- package/esm/combobox/config/useComboBox.js +16 -5
- package/esm/combobox/parts/A11yFocusedOption.js +15 -7
- package/esm/combobox/parts/A11ySelectedValues.js +0 -2
- package/esm/combobox/parts/DropdownIndicator.js +2 -2
- package/esm/combobox/parts/container/Container.js +10 -13
- package/esm/combobox/parts/controls/Controls.js +16 -18
- package/esm/combobox/parts/controls/useOnPillsNavigation.js +3 -3
- package/esm/combobox/parts/controls-input/ControlsInput.js +2 -2
- package/esm/combobox/parts/controls-input/useControlsInput.js +3 -2
- package/esm/combobox/parts/controls-input/useKeyboardNavigation.js +17 -24
- package/esm/combobox/parts/controls-input/useMaskedOnChange.js +6 -6
- package/esm/combobox/parts/dropdown-indicator/DropdownIndicator.js +2 -2
- package/esm/combobox/parts/header-list/useHeaderListHandlers.js +3 -3
- package/esm/combobox/parts/menu-list/MenuList.js +7 -5
- package/esm/combobox/parts/menu-list/styled.js +5 -4
- package/esm/combobox/parts/menu-list/useItemRenderer.js +18 -17
- package/esm/combobox/react-desc-prop-types.js +3 -2
- package/esm/combobox/utils/listHelper.js +10 -1
- package/esm/date-time-picker/config/useChangeHandlers.js +8 -12
- package/esm/date-time-picker/config/useControlledDateTimePicker.js +13 -9
- package/esm/date-time-picker/config/useFocusTracker.js +132 -0
- package/esm/date-time-picker/config/useGetReferences.js +41 -20
- package/esm/date-time-picker/config/useGlobalKeyHandlers.js +8 -12
- package/esm/date-time-picker/parts/ClearButton/ClearButton.js +12 -2
- package/esm/date-time-picker/parts/ClearButton/useClearButton.js +12 -25
- package/esm/date-time-picker/parts/ControlledDateTimePickerContent.js +4 -7
- package/esm/date-time-picker/parts/DateInputs/DDInput.js +8 -2
- package/esm/date-time-picker/parts/DateInputs/DateInputs.js +9 -4
- package/esm/date-time-picker/parts/DateInputs/MMInput.js +8 -2
- package/esm/date-time-picker/parts/DateInputs/YYYYInput.js +8 -2
- package/esm/date-time-picker/parts/DateInputs/useDateInputs.js +77 -96
- package/esm/date-time-picker/parts/Pickers/Calendar/CalendarHead.js +32 -6
- package/esm/date-time-picker/parts/Pickers/Calendar/Day.js +16 -10
- package/esm/date-time-picker/parts/Pickers/Calendar/useConfigCalendarCTX.js +12 -12
- package/esm/date-time-picker/parts/Pickers/Calendar/useFocusLogic.js +3 -39
- package/esm/date-time-picker/parts/Pickers/Calendar/useKeyboardHandlers.js +40 -73
- package/esm/date-time-picker/parts/Pickers/Calendar/usePopperTriggerLogic.js +18 -27
- package/esm/date-time-picker/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +1 -0
- package/esm/date-time-picker/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +17 -23
- package/esm/date-time-picker/parts/Pickers/TimeWheel/HoursList.js +14 -8
- package/esm/date-time-picker/parts/Pickers/TimeWheel/MeridiemList.js +15 -9
- package/esm/date-time-picker/parts/Pickers/TimeWheel/MinutesList.js +14 -8
- package/esm/date-time-picker/parts/Pickers/TimeWheel/useKeyboardHandlers.js +36 -230
- package/esm/date-time-picker/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +11 -13
- package/esm/date-time-picker/parts/TimeInputs/HHInput.js +8 -2
- package/esm/date-time-picker/parts/TimeInputs/MeridiemInput.js +8 -2
- package/esm/date-time-picker/parts/TimeInputs/MinutesInput.js +8 -2
- package/esm/date-time-picker/parts/TimeInputs/TimeInputs.js +11 -6
- package/esm/date-time-picker/parts/TimeInputs/useTimeInputs.js +44 -74
- package/esm/date-time-picker/utils/constants.js +1 -7
- package/esm/date-time-picker/utils/hooks/useGetStartingFocusedDay.js +38 -36
- package/esm/input-group/InputGroup.js +5 -4
- package/esm/input-group/exported-related/data-test-ids.js +8 -0
- package/esm/input-group/exported-related/index.js +2 -0
- package/esm/input-group/exported-related/theming.js +8 -0
- package/esm/input-group/styled.js +18 -17
- package/package.json +39 -15
- package/types/autocomplete/parts/A11yFocusedOption.d.ts +5 -0
- package/types/autocomplete/parts/container/styled.d.ts +1 -1
- package/types/autocomplete/parts/styled.d.ts +0 -0
- package/types/autocomplete/utils/listHelper.d.ts +5 -5
- package/types/checkbox/react-desc-prop-types.d.ts +1 -1
- package/types/checkbox/styles.d.ts +1 -0
- package/types/combobox/parts/menu-list/styled.d.ts +1 -0
- package/types/combobox/react-desc-prop-types.d.ts +8 -6
- package/types/combobox/sharedTypes.d.ts +3 -2
- package/types/combobox/utils/listHelper.d.ts +1 -0
- package/types/date-time-picker/config/useChangeHandlers.d.ts +3 -1
- package/types/date-time-picker/config/useControlledDateTimePicker.d.ts +2 -5
- package/types/date-time-picker/config/useFocusTracker.d.ts +38 -0
- package/types/date-time-picker/config/useGetPropsBasedOnType.d.ts +6 -6
- package/types/date-time-picker/config/useGetReferences.d.ts +30 -36
- package/types/date-time-picker/config/useGlobalKeyHandlers.d.ts +3 -1
- package/types/date-time-picker/parts/DateInputs/DDInput.d.ts +2 -1
- package/types/date-time-picker/parts/DateInputs/MMInput.d.ts +2 -1
- package/types/date-time-picker/parts/DateInputs/YYYYInput.d.ts +2 -1
- package/types/date-time-picker/parts/Pickers/Calendar/useConfigCalendarCTX.d.ts +14 -0
- package/types/date-time-picker/parts/Pickers/Calendar/useFocusLogic.d.ts +1 -2
- package/types/date-time-picker/parts/Pickers/Calendar/usePopperTriggerLogic.d.ts +19 -0
- package/types/date-time-picker/parts/Pickers/TimeWheel/useKeyboardHandlers.d.ts +0 -6
- package/types/date-time-picker/parts/Pickers/TimeWheel/usePopperTriggerLogic.d.ts +14 -0
- package/types/date-time-picker/parts/TimeInputs/HHInput.d.ts +2 -1
- package/types/date-time-picker/parts/TimeInputs/MeridiemInput.d.ts +2 -1
- package/types/date-time-picker/parts/TimeInputs/MinutesInput.d.ts +2 -1
- package/types/date-time-picker/propTypes.d.ts +117 -0
- package/types/date-time-picker/sharedTypes.d.ts +1 -1
- package/types/date-time-picker/utils/constants.d.ts +0 -6
- package/types/input-group/exported-related/data-test-ids.d.ts +6 -0
- package/types/input-group/exported-related/index.d.ts +2 -0
- package/types/input-group/exported-related/theming.d.ts +6 -0
- package/types/input-group/styled.d.ts +4 -7
- package/types/text-input/config/useInputText.d.ts +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useContext, useCallback, useMemo } from 'react';
|
|
2
2
|
import { ControlledDateTimePickerContext } from '../../ControlledDateTimePickerCTX.js';
|
|
3
|
-
import { homeEndArrowUpDownSemiKeys, homeEndArrowUpDownSpaceKeys, homeEndArrowUpDownKeys } from '../../utils/constants.js';
|
|
4
3
|
import { prependStringWithPlaceHolders } from '../../utils/stringHelpers.js';
|
|
5
4
|
|
|
6
5
|
/* eslint-disable complexity */
|
|
@@ -9,66 +8,55 @@ const useTimeInputs = () => {
|
|
|
9
8
|
props: {
|
|
10
9
|
disabled
|
|
11
10
|
},
|
|
12
|
-
lastSegmentRef,
|
|
13
11
|
hours,
|
|
14
12
|
minutes,
|
|
15
13
|
meridiem,
|
|
16
|
-
hideDate,
|
|
17
14
|
withAnyRightController,
|
|
18
15
|
withAnyPicker,
|
|
19
16
|
withClearBtn,
|
|
20
17
|
isWithDateInputs,
|
|
21
|
-
hourInputRef,
|
|
22
|
-
minutesInputRef,
|
|
23
|
-
meridiemInputRef,
|
|
24
|
-
yearInputRef,
|
|
25
|
-
clearButtonRef,
|
|
26
|
-
pickerButtonRef,
|
|
27
|
-
monthInputRef,
|
|
28
18
|
autoFocusHourInput,
|
|
29
19
|
handleChangeHours,
|
|
30
20
|
handleChangeMinutes,
|
|
31
21
|
handleChangeMeridiem,
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
minutesInterval,
|
|
23
|
+
trackFocusFirstSegment,
|
|
24
|
+
trackFocusLastSegment,
|
|
25
|
+
trackFocusHourInput,
|
|
26
|
+
trackFocusMinuteInput,
|
|
27
|
+
trackFocusMeridiemInput,
|
|
28
|
+
trackFocusClearBtn,
|
|
29
|
+
trackFocusPicker,
|
|
30
|
+
trackFocusYearInput
|
|
34
31
|
} = useContext(ControlledDateTimePickerContext);
|
|
35
|
-
const setLatestInteractionRegionTimeInputs = useCallback(() => {
|
|
36
|
-
setLatestInteractionRegion('time-inputs');
|
|
37
|
-
}, [setLatestInteractionRegion]);
|
|
38
32
|
const onHomeKeyDown = useCallback(() => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (!hideDate) monthInputRef === null || monthInputRef === void 0 ? void 0 : (_monthInputRef$curren = monthInputRef.current) === null || _monthInputRef$curren === void 0 ? void 0 : (_monthInputRef$curren2 = _monthInputRef$curren.focus) === null || _monthInputRef$curren2 === void 0 ? void 0 : _monthInputRef$curren2.call(_monthInputRef$curren);else hourInputRef === null || hourInputRef === void 0 ? void 0 : (_hourInputRef$current = hourInputRef.current) === null || _hourInputRef$current === void 0 ? void 0 : (_hourInputRef$current2 = _hourInputRef$current.focus) === null || _hourInputRef$current2 === void 0 ? void 0 : _hourInputRef$current2.call(_hourInputRef$current);
|
|
42
|
-
}, [hideDate, monthInputRef, hourInputRef]);
|
|
33
|
+
trackFocusFirstSegment();
|
|
34
|
+
}, [trackFocusFirstSegment]);
|
|
43
35
|
const onEndKeyDown = useCallback(() => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (withAnyPicker) pickerButtonRef === null || pickerButtonRef === void 0 ? void 0 : (_pickerButtonRef$curr = pickerButtonRef.current) === null || _pickerButtonRef$curr === void 0 ? void 0 : (_pickerButtonRef$curr2 = _pickerButtonRef$curr.focus) === null || _pickerButtonRef$curr2 === void 0 ? void 0 : _pickerButtonRef$curr2.call(_pickerButtonRef$curr);else if (withClearBtn) clearButtonRef === null || clearButtonRef === void 0 ? void 0 : (_clearButtonRef$curre = clearButtonRef.current) === null || _clearButtonRef$curre === void 0 ? void 0 : (_clearButtonRef$curre2 = _clearButtonRef$curre.focus) === null || _clearButtonRef$curre2 === void 0 ? void 0 : _clearButtonRef$curre2.call(_clearButtonRef$curre);else meridiemInputRef === null || meridiemInputRef === void 0 ? void 0 : (_meridiemInputRef$cur = meridiemInputRef.current) === null || _meridiemInputRef$cur === void 0 ? void 0 : (_meridiemInputRef$cur2 = _meridiemInputRef$cur.focus) === null || _meridiemInputRef$cur2 === void 0 ? void 0 : _meridiemInputRef$cur2.call(_meridiemInputRef$cur);
|
|
47
|
-
}, [withAnyPicker, pickerButtonRef, withClearBtn, clearButtonRef, meridiemInputRef]);
|
|
36
|
+
trackFocusLastSegment();
|
|
37
|
+
}, [trackFocusLastSegment]);
|
|
48
38
|
const onHoursFocus = useCallback(() => {
|
|
49
|
-
|
|
50
|
-
}, [
|
|
39
|
+
trackFocusHourInput();
|
|
40
|
+
}, [trackFocusHourInput]);
|
|
51
41
|
const onHoursChange = useCallback(e => {
|
|
52
|
-
var _e$target
|
|
42
|
+
var _e$target;
|
|
53
43
|
|
|
54
44
|
let newHours = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value; // converts hours 2~9 to 07~09
|
|
55
45
|
|
|
56
46
|
if (Number.parseInt(newHours, 10) > 1) newHours = prependStringWithPlaceHolders(newHours, 2);
|
|
57
47
|
handleChangeHours(newHours, e); // auto-advance functionality:
|
|
58
48
|
|
|
59
|
-
if (newHours.length === 2)
|
|
60
|
-
}, [
|
|
49
|
+
if (newHours.length === 2) trackFocusMinuteInput();
|
|
50
|
+
}, [handleChangeHours, trackFocusMinuteInput]);
|
|
61
51
|
const onHoursKeyDown = useCallback(e => {
|
|
62
|
-
var _lastSegmentRef$curre, _lastSegmentRef$curre2;
|
|
63
|
-
|
|
64
52
|
const {
|
|
65
53
|
key,
|
|
66
54
|
ctrlKey,
|
|
67
55
|
metaKey
|
|
68
56
|
} = e;
|
|
69
57
|
const hoursStringConvertedToInteger = Number.parseInt(hours, 10);
|
|
70
|
-
if (
|
|
71
|
-
if (
|
|
58
|
+
if (['Home', 'End', 'ArrowUp', 'ArrowDown', ':'].includes(key)) e.preventDefault();
|
|
59
|
+
if (['Home', 'End', 'ArrowUp', 'ArrowDown', ':'].includes(key)) e.stopPropagation();
|
|
72
60
|
if (key === 'Home') onHomeKeyDown();
|
|
73
61
|
if (key === 'End') onEndKeyDown();
|
|
74
62
|
|
|
@@ -81,24 +69,20 @@ const useTimeInputs = () => {
|
|
|
81
69
|
}
|
|
82
70
|
|
|
83
71
|
if (!Number.isNaN(hoursStringConvertedToInteger) && key === ':') {
|
|
84
|
-
var _minutesInputRef$curr3, _minutesInputRef$curr4;
|
|
85
|
-
|
|
86
72
|
const newHours = prependStringWithPlaceHolders("".concat(hoursStringConvertedToInteger), 2);
|
|
87
73
|
handleChangeHours(newHours, e); // auto-advance functionality:
|
|
88
74
|
|
|
89
|
-
if (newHours.length === 2)
|
|
75
|
+
if (newHours.length === 2) trackFocusMinuteInput();
|
|
90
76
|
} // regressive backspace functionality
|
|
91
77
|
|
|
92
78
|
|
|
93
79
|
if (key === 'Backspace' && hours.length === 0 && isWithDateInputs) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
yearInputRef === null || yearInputRef === void 0 ? void 0 : (_yearInputRef$current = yearInputRef.current) === null || _yearInputRef$current === void 0 ? void 0 : (_yearInputRef$current2 = _yearInputRef$current.focus) === null || _yearInputRef$current2 === void 0 ? void 0 : _yearInputRef$current2.call(_yearInputRef$current);
|
|
80
|
+
trackFocusYearInput();
|
|
97
81
|
} // focus last fragment on fill with now
|
|
98
82
|
|
|
99
83
|
|
|
100
|
-
if ((ctrlKey || metaKey) && key === ';')
|
|
101
|
-
}, [hours,
|
|
84
|
+
if ((ctrlKey || metaKey) && key === ';') trackFocusLastSegment();
|
|
85
|
+
}, [hours, isWithDateInputs, trackFocusYearInput, onHomeKeyDown, onEndKeyDown, trackFocusLastSegment, trackFocusMinuteInput, handleChangeHours]);
|
|
102
86
|
const onHoursBlur = useCallback(e => {
|
|
103
87
|
var _e$target2;
|
|
104
88
|
|
|
@@ -110,30 +94,27 @@ const useTimeInputs = () => {
|
|
|
110
94
|
});
|
|
111
95
|
}, [handleChangeHours]);
|
|
112
96
|
const onMinutesFocus = useCallback(() => {
|
|
113
|
-
|
|
114
|
-
}, [
|
|
97
|
+
trackFocusMinuteInput();
|
|
98
|
+
}, [trackFocusMinuteInput]);
|
|
115
99
|
const onMinutesChange = useCallback(e => {
|
|
116
|
-
var _e$target3
|
|
100
|
+
var _e$target3;
|
|
117
101
|
|
|
118
102
|
let newMinutes = e === null || e === void 0 ? void 0 : (_e$target3 = e.target) === null || _e$target3 === void 0 ? void 0 : _e$target3.value; // converts minutes 7~9 to 07~09
|
|
119
103
|
|
|
120
104
|
if (Number.parseInt(newMinutes, 10) > 6) newMinutes = prependStringWithPlaceHolders(newMinutes, 2);
|
|
121
105
|
handleChangeMinutes(newMinutes, e); // auto-advance functionality:
|
|
122
|
-
// if (newMinutes.length === 2) secondsInputRef?.current?.focus?.();
|
|
123
106
|
|
|
124
|
-
if (newMinutes.length === 2)
|
|
125
|
-
}, [
|
|
107
|
+
if (newMinutes.length === 2) trackFocusMeridiemInput();
|
|
108
|
+
}, [handleChangeMinutes, trackFocusMeridiemInput]);
|
|
126
109
|
const onMinutesKeyDown = useCallback(e => {
|
|
127
|
-
var _lastSegmentRef$curre3, _lastSegmentRef$curre4;
|
|
128
|
-
|
|
129
110
|
const {
|
|
130
111
|
key,
|
|
131
112
|
ctrlKey,
|
|
132
113
|
metaKey
|
|
133
114
|
} = e;
|
|
134
115
|
const minutesStringConvertedToInteger = Number.parseInt(minutes, 10);
|
|
135
|
-
if (
|
|
136
|
-
if (
|
|
116
|
+
if (['Home', 'End', 'ArrowUp', 'ArrowDown', ' '].includes(key)) e.preventDefault();
|
|
117
|
+
if (['Home', 'End', 'ArrowUp', 'ArrowDown', ' '].includes(key)) e.stopPropagation();
|
|
137
118
|
if (key === 'Home') onHomeKeyDown();
|
|
138
119
|
if (key === 'End') onEndKeyDown();
|
|
139
120
|
|
|
@@ -146,25 +127,20 @@ const useTimeInputs = () => {
|
|
|
146
127
|
}
|
|
147
128
|
|
|
148
129
|
if (!Number.isNaN(minutesStringConvertedToInteger) && key === ' ') {
|
|
149
|
-
var _meridiemInputRef$cur5, _meridiemInputRef$cur6;
|
|
150
|
-
|
|
151
130
|
const newMinutes = prependStringWithPlaceHolders("".concat(minutesStringConvertedToInteger), 2);
|
|
152
131
|
handleChangeMinutes(newMinutes, e); // auto-advance functionality:
|
|
153
|
-
// if (newMinutes.length === 2) secondsInputRef?.current?.focus?.();
|
|
154
132
|
|
|
155
|
-
if (newMinutes.length === 2)
|
|
133
|
+
if (newMinutes.length === 2) trackFocusMeridiemInput();
|
|
156
134
|
} // regressive backspace functionality
|
|
157
135
|
|
|
158
136
|
|
|
159
137
|
if (key === 'Backspace' && (minutes === null || minutes === void 0 ? void 0 : minutes.length) === 0) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
hourInputRef === null || hourInputRef === void 0 ? void 0 : (_hourInputRef$current3 = hourInputRef.current) === null || _hourInputRef$current3 === void 0 ? void 0 : (_hourInputRef$current4 = _hourInputRef$current3.focus) === null || _hourInputRef$current4 === void 0 ? void 0 : _hourInputRef$current4.call(_hourInputRef$current3);
|
|
138
|
+
trackFocusHourInput();
|
|
163
139
|
} // focus last fragment on fill with now
|
|
164
140
|
|
|
165
141
|
|
|
166
|
-
if ((ctrlKey || metaKey) && key === ';')
|
|
167
|
-
}, [minutes, onHomeKeyDown, onEndKeyDown,
|
|
142
|
+
if ((ctrlKey || metaKey) && key === ';') trackFocusLastSegment();
|
|
143
|
+
}, [minutes, onHomeKeyDown, onEndKeyDown, trackFocusLastSegment, minutesInterval, handleChangeMinutes, trackFocusMeridiemInput, trackFocusHourInput]);
|
|
168
144
|
const onMinutesBlur = useCallback(e => {
|
|
169
145
|
var _e$target4;
|
|
170
146
|
|
|
@@ -174,8 +150,8 @@ const useTimeInputs = () => {
|
|
|
174
150
|
});
|
|
175
151
|
}, [handleChangeMinutes]);
|
|
176
152
|
const onMeridiemFocus = useCallback(() => {
|
|
177
|
-
|
|
178
|
-
}, [
|
|
153
|
+
trackFocusMeridiemInput();
|
|
154
|
+
}, [trackFocusMeridiemInput]);
|
|
179
155
|
const onMeridiemChange = useCallback(e => {
|
|
180
156
|
var _e$target5, _e$target5$value, _e$target5$value$toUp;
|
|
181
157
|
|
|
@@ -187,35 +163,29 @@ const useTimeInputs = () => {
|
|
|
187
163
|
handleChangeMeridiem(newMeridiem, e); // auto-advance functionality:
|
|
188
164
|
|
|
189
165
|
if (newMeridiem.length === 2 && withAnyRightController) {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
if (withClearBtn) (_clearButtonRef$curre3 = clearButtonRef.current) === null || _clearButtonRef$curre3 === void 0 ? void 0 : (_clearButtonRef$curre4 = _clearButtonRef$curre3.focus) === null || _clearButtonRef$curre4 === void 0 ? void 0 : _clearButtonRef$curre4.call(_clearButtonRef$curre3);else if (withAnyPicker) pickerButtonRef === null || pickerButtonRef === void 0 ? void 0 : (_pickerButtonRef$curr3 = pickerButtonRef.current) === null || _pickerButtonRef$curr3 === void 0 ? void 0 : (_pickerButtonRef$curr4 = _pickerButtonRef$curr3.focus) === null || _pickerButtonRef$curr4 === void 0 ? void 0 : _pickerButtonRef$curr4.call(_pickerButtonRef$curr3);
|
|
166
|
+
if (withClearBtn) trackFocusClearBtn();else if (withAnyPicker) trackFocusPicker();
|
|
193
167
|
}
|
|
194
|
-
}, [meridiem, handleChangeMeridiem, withAnyRightController, withClearBtn,
|
|
168
|
+
}, [meridiem, handleChangeMeridiem, withAnyRightController, withClearBtn, trackFocusClearBtn, withAnyPicker, trackFocusPicker]);
|
|
195
169
|
const onMeridiemKeyDown = useCallback(e => {
|
|
196
|
-
var _lastSegmentRef$curre5, _lastSegmentRef$curre6;
|
|
197
|
-
|
|
198
170
|
const {
|
|
199
171
|
key,
|
|
200
172
|
ctrlKey,
|
|
201
173
|
metaKey
|
|
202
174
|
} = e;
|
|
203
|
-
if (
|
|
204
|
-
if (
|
|
175
|
+
if (['Home', 'End', 'ArrowUp', 'ArrowDown'].includes(key)) e.preventDefault();
|
|
176
|
+
if (['Home', 'End', 'ArrowUp', 'ArrowDown'].includes(key)) e.stopPropagation();
|
|
205
177
|
if (key === 'Home') onHomeKeyDown();
|
|
206
178
|
if (key === 'End') onEndKeyDown();
|
|
207
179
|
if (key === 'ArrowUp' && meridiem !== 'AM') handleChangeMeridiem('AM', e);
|
|
208
180
|
if (key === 'ArrowDown' && meridiem !== 'PM') handleChangeMeridiem('PM', e); // regressive backspace functionality
|
|
209
181
|
|
|
210
182
|
if (key === 'Backspace') {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
if ((meridiem === null || meridiem === void 0 ? void 0 : meridiem.length) === 2) handleChangeMeridiem('', e);else minutesInputRef === null || minutesInputRef === void 0 ? void 0 : (_minutesInputRef$curr5 = minutesInputRef.current) === null || _minutesInputRef$curr5 === void 0 ? void 0 : (_minutesInputRef$curr6 = _minutesInputRef$curr5.focus) === null || _minutesInputRef$curr6 === void 0 ? void 0 : _minutesInputRef$curr6.call(_minutesInputRef$curr5);
|
|
183
|
+
if ((meridiem === null || meridiem === void 0 ? void 0 : meridiem.length) === 2) handleChangeMeridiem('', e);else trackFocusMinuteInput();
|
|
214
184
|
} // focus last fragment on fill with now
|
|
215
185
|
|
|
216
186
|
|
|
217
|
-
if ((ctrlKey || metaKey) && key === ';')
|
|
218
|
-
}, [onHomeKeyDown, onEndKeyDown, meridiem, handleChangeMeridiem,
|
|
187
|
+
if ((ctrlKey || metaKey) && key === ';') trackFocusLastSegment();
|
|
188
|
+
}, [onHomeKeyDown, onEndKeyDown, meridiem, handleChangeMeridiem, trackFocusLastSegment, trackFocusMinuteInput]);
|
|
219
189
|
const onMeridiemBlur = useCallback(e => {
|
|
220
190
|
var _e$target6, _e$target6$value, _e$target6$value$toUp;
|
|
221
191
|
|
|
@@ -33,14 +33,8 @@ const announcableCardinalDays = {
|
|
|
33
33
|
30: 'thirtieth',
|
|
34
34
|
31: 'thirty first'
|
|
35
35
|
};
|
|
36
|
-
const homeEndAllArrowKeys = ['Home', 'End', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];
|
|
37
|
-
const homeEndKeys = ['Home', 'End'];
|
|
38
|
-
const homeEndArrowUpDownDashSlashesKeys = ['Home', 'End', 'ArrowUp', 'ArrowDown', '-', '/', '\\'];
|
|
39
|
-
const homeEndArrowUpDownSpaceKeys = ['Home', 'End', 'ArrowUp', 'ArrowDown', ' '];
|
|
40
|
-
const homeEndArrowUpDownSemiKeys = ['Home', 'End', 'ArrowUp', 'ArrowDown', ':'];
|
|
41
|
-
const homeEndArrowUpDownKeys = ['Home', 'End', 'ArrowUp', 'ArrowDown'];
|
|
42
36
|
const defaultMetaInfo = {
|
|
43
37
|
isAutomaticFillTrigger: false
|
|
44
38
|
};
|
|
45
39
|
|
|
46
|
-
export { announcableCardinalDays, defaultMetaInfo,
|
|
40
|
+
export { announcableCardinalDays, defaultMetaInfo, monthNames, weekDays };
|
|
@@ -25,50 +25,52 @@ const useGetStartingFocusedDay = () => {
|
|
|
25
25
|
onCalendarOpenFocusedDay
|
|
26
26
|
} = useContext(ControlledDateTimePickerContext);
|
|
27
27
|
const dayFromInputValues = useGetDayFromDateString();
|
|
28
|
+
const {
|
|
29
|
+
month: inputValuesSplitMonth,
|
|
30
|
+
day: inputValuesSplitDay,
|
|
31
|
+
year: inputValuesDaySplitYear
|
|
32
|
+
} = dayFromInputValues ? getDateValuesFromDate(dayFromInputValues) : {
|
|
33
|
+
month: null,
|
|
34
|
+
day: null,
|
|
35
|
+
year: null
|
|
36
|
+
};
|
|
37
|
+
const isInputFilledAndValid = inputValuesSplitMonth && inputValuesSplitDay && inputValuesDaySplitYear && isValidDayForTheMonth(inputValuesSplitMonth, inputValuesDaySplitYear, inputValuesSplitDay);
|
|
38
|
+
const isOnCalendarOpenFocusedDayEmpty = !onCalendarOpenFocusedDay;
|
|
39
|
+
const shouldFillWithOnCalendarOpenFocusedDay = !isInputFilledAndValid && !isOnCalendarOpenFocusedDayEmpty;
|
|
28
40
|
return useMemo(() => {
|
|
29
|
-
const startingDay = _objectSpread({}, empty);
|
|
41
|
+
const startingDay = _objectSpread({}, empty); // if input was filled start focus is the filled value (if it's valid day for the month)
|
|
30
42
|
|
|
31
|
-
if (dayFromInputValues) {
|
|
32
|
-
const {
|
|
33
|
-
month: inputValuesSplitMonth,
|
|
34
|
-
day: inputValuesSplitDay,
|
|
35
|
-
year: inputValuesDaySplitYear
|
|
36
|
-
} = getDateValuesFromDate(dayFromInputValues);
|
|
37
|
-
const isInputFilledAndValid = inputValuesSplitMonth && inputValuesSplitDay && inputValuesDaySplitYear && isValidDayForTheMonth(inputValuesSplitMonth, inputValuesDaySplitYear, inputValuesSplitDay);
|
|
38
|
-
const isOnCalendarOpenFocusedDayEmpty = !onCalendarOpenFocusedDay;
|
|
39
|
-
const shouldFillWithOnCalendarOpenFocusedDay = !isInputFilledAndValid && !isOnCalendarOpenFocusedDayEmpty; // if input was filled start focus is the filled value (if it's valid day for the month)
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
44
|
+
if (isInputFilledAndValid) {
|
|
45
|
+
startingDay.startFocusedMonth = inputValuesSplitMonth;
|
|
46
|
+
startingDay.startFocusedDay = inputValuesSplitDay;
|
|
47
|
+
startingDay.startFocusedYear = inputValuesDaySplitYear;
|
|
48
|
+
startingDay.startFocusedDate = dayFromInputValues; // if input was not filled (or filled invalid) and there is no onCalendarOpenFocusedDay start focus is not a day
|
|
49
|
+
} else if (isOnCalendarOpenFocusedDayEmpty) {
|
|
50
|
+
// if input was not filled and there is onCalendarOpenFocusedDay start focus is onCalendarOpenFocusedDay day
|
|
51
|
+
return empty;
|
|
52
|
+
} else if (shouldFillWithOnCalendarOpenFocusedDay) {
|
|
53
|
+
const {
|
|
54
|
+
month: focusedDaySplitMonth,
|
|
55
|
+
day: focusedDaySplitDay,
|
|
56
|
+
year: focusedDaySplitYear
|
|
57
|
+
} = deconstructValuesFromDateString(onCalendarOpenFocusedDay);
|
|
58
|
+
const monthAsInt = convertToPositiveNumberIfPossible(focusedDaySplitMonth);
|
|
59
|
+
const dayAsInt = convertToPositiveNumberIfPossible(focusedDaySplitDay);
|
|
60
|
+
const yearAsInt = convertToPositiveNumberIfPossible(focusedDaySplitYear); // if this condition is false, return will be the same as return empty
|
|
61
|
+
// because startFocusedMonth/Day/Year/Date will be === null
|
|
62
|
+
// which is the expected result
|
|
60
63
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
64
|
+
if (monthAsInt !== -1 && dayAsInt !== -1 && yearAsInt !== -1 && isValidDayForTheMonth(monthAsInt - 1, yearAsInt, dayAsInt)) {
|
|
65
|
+
startingDay.startFocusedMonth = monthAsInt;
|
|
66
|
+
startingDay.startFocusedDay = dayAsInt;
|
|
67
|
+
startingDay.startFocusedYear = yearAsInt;
|
|
68
|
+
startingDay.startFocusedDate = new Date(yearAsInt, monthAsInt - 1, dayAsInt);
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
return startingDay;
|
|
71
|
-
}, [dayFromInputValues, onCalendarOpenFocusedDay]);
|
|
73
|
+
}, [dayFromInputValues, inputValuesDaySplitYear, inputValuesSplitDay, inputValuesSplitMonth, isInputFilledAndValid, isOnCalendarOpenFocusedDayEmpty, onCalendarOpenFocusedDay, shouldFillWithOnCalendarOpenFocusedDay]);
|
|
72
74
|
};
|
|
73
75
|
|
|
74
76
|
export { useGetStartingFocusedDay };
|
|
@@ -6,10 +6,10 @@ import 'core-js/modules/esnext.iterator.for-each.js';
|
|
|
6
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
7
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
8
8
|
import { useMemo } from 'react';
|
|
9
|
-
import { describe, useValidateTypescriptPropTypes, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';
|
|
9
|
+
import { describe, useValidateTypescriptPropTypes, useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-props-helpers';
|
|
10
10
|
import { StyledContainer, StyledLeftAddon, StyledInput, StyledRightAddon } from './styled.js';
|
|
11
11
|
import { propTypes } from './react-desc-prop-types.js';
|
|
12
|
-
import { InputGroupDataTestIds } from './
|
|
12
|
+
import { InputGroupDataTestIds } from './exported-related/data-test-ids.js';
|
|
13
13
|
import { jsxs } from 'react/jsx-runtime';
|
|
14
14
|
|
|
15
15
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -24,6 +24,7 @@ const DSInputGroup = props => {
|
|
|
24
24
|
rightAddon
|
|
25
25
|
} = props;
|
|
26
26
|
const globals = useGetGlobalAttributes(props);
|
|
27
|
+
const xstyledProps = useGetXstyledProps(props);
|
|
27
28
|
const cols = useMemo(() => {
|
|
28
29
|
if (leftAddon && rightAddon) {
|
|
29
30
|
return ['max-content', 'auto', 'max-content'];
|
|
@@ -39,10 +40,10 @@ const DSInputGroup = props => {
|
|
|
39
40
|
|
|
40
41
|
return ['auto'];
|
|
41
42
|
}, [leftAddon, rightAddon]);
|
|
42
|
-
return /*#__PURE__*/jsxs(StyledContainer, _objectSpread(_objectSpread({
|
|
43
|
+
return /*#__PURE__*/jsxs(StyledContainer, _objectSpread(_objectSpread(_objectSpread({
|
|
43
44
|
cols: cols,
|
|
44
45
|
"data-testid": InputGroupDataTestIds.CONTAINER
|
|
45
|
-
}, globals), {}, {
|
|
46
|
+
}, globals), xstyledProps), {}, {
|
|
46
47
|
children: [leftAddon && /*#__PURE__*/_jsx(StyledLeftAddon, {
|
|
47
48
|
"data-testid": InputGroupDataTestIds.LEFTADDON
|
|
48
49
|
}, void 0, leftAddon), /*#__PURE__*/_jsx(StyledInput, {
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
|
|
2
|
+
import { styled } from '@elliemae/ds-system';
|
|
2
3
|
import { Grid } from '@elliemae/ds-grid';
|
|
3
4
|
import '../text-input/DSInputText.js';
|
|
4
5
|
import { DSInputTextName, DSInputTextSlots } from '../text-input/exported-related/theming.js';
|
|
5
6
|
import '../combobox/ComboBox.js';
|
|
6
7
|
import { DSComboBoxName, DSComboboxSlots } from '../combobox/theming.js';
|
|
8
|
+
import { DSInputGroupName, DSInputGroupSlots } from './exported-related/theming.js';
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
const StyledContainer =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
})(["outline:1px solid ", ";outline-offset:-1px;height:inherit;display:flex;button{border-width:1px;}&:hover{z-index:1;button:not(:disabled){border:1px solid ", ";}}&:focus-within{z-index:1;}"], _ref => {
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
11
|
+
const StyledContainer = styled(Grid, {
|
|
12
|
+
name: DSInputGroupName,
|
|
13
|
+
slot: DSInputGroupSlots.CONTAINER
|
|
14
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: 28px;\n\n // input in left position with right addon\n & > div:nth-child(1) {\n .", "-", ",\n .", "-", ",\n .", "-", " {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n }\n\n // input in center position with left and right addon\n & > div:nth-child(2):nth-last-child(2) {\n .", "-", ",\n .", "-", ",\n .", "-", " {\n border-radius: 0;\n }\n }\n\n // input in right position with left addon\n & > div:nth-child(2):nth-last-child(1) {\n .", "-", ",\n .", "-", ",\n .", "-", " {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n }\n"])), DSInputTextName, DSInputTextSlots.INPUT_WRAPPER, DSInputTextName, DSInputTextSlots.INPUT, DSComboBoxName, DSComboboxSlots.INPUT_WRAPPER, DSInputTextName, DSInputTextSlots.INPUT_WRAPPER, DSInputTextName, DSInputTextSlots.INPUT, DSComboBoxName, DSComboboxSlots.INPUT_WRAPPER, DSInputTextName, DSInputTextSlots.INPUT_WRAPPER, DSInputTextName, DSInputTextSlots.INPUT, DSComboBoxName, DSComboboxSlots.INPUT_WRAPPER);
|
|
15
|
+
const StyledAddon = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n outline: 1px solid ", ";\n outline-offset: -1px;\n height: inherit;\n display: flex;\n button {\n border-width: 1px;\n }\n &:hover {\n z-index: 2;\n button:not(:disabled) {\n border: 1px solid ", ";\n }\n }\n &:focus-within {\n z-index: 2;\n }\n"])), _ref => {
|
|
15
16
|
let {
|
|
16
17
|
theme
|
|
17
18
|
} = _ref;
|
|
@@ -22,14 +23,14 @@ const StyledAddon = /*#__PURE__*/styled.div.withConfig({
|
|
|
22
23
|
} = _ref2;
|
|
23
24
|
return theme.colors.brand['700'];
|
|
24
25
|
});
|
|
25
|
-
const StyledLeftAddon =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
const StyledLeftAddon = styled(StyledAddon, {
|
|
27
|
+
name: DSInputGroupName,
|
|
28
|
+
slot: DSInputGroupSlots.LEFT_ADDON
|
|
29
|
+
})(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-top-left-radius: 2px;\n border-bottom-left-radius: 2px;\n margin-right: -1px;\n &:hover {\n button:not(:disabled) {\n border-top-right-radius: 0px;\n border-bottom-right-radius: 0px;\n }\n }\n"])));
|
|
30
|
+
const StyledRightAddon = styled(StyledAddon, {
|
|
31
|
+
name: DSInputGroupName,
|
|
32
|
+
slot: DSInputGroupSlots.RIGHT_ADDON
|
|
33
|
+
})(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-top-right-radius: 2px;\n border-bottom-right-radius: 2px;\n margin-left: -1px;\n &:hover {\n button:not(:disabled) {\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n }\n }\n"])));
|
|
34
|
+
const StyledInput = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n z-index: 1;\n"])));
|
|
34
35
|
|
|
35
36
|
export { StyledContainer, StyledInput, StyledLeftAddon, StyledRightAddon };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-controlled-form",
|
|
3
|
-
"version": "2.4.2-rc.
|
|
3
|
+
"version": "2.4.2-rc.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Controlled Form Controllers",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -179,6 +179,18 @@
|
|
|
179
179
|
"import": "./esm/input-group/index.js",
|
|
180
180
|
"require": "./cjs/input-group/index.js"
|
|
181
181
|
},
|
|
182
|
+
"./input-group/exported-related/theming": {
|
|
183
|
+
"import": "./esm/input-group/exported-related/theming.js",
|
|
184
|
+
"require": "./cjs/input-group/exported-related/theming.js"
|
|
185
|
+
},
|
|
186
|
+
"./input-group/exported-related": {
|
|
187
|
+
"import": "./esm/input-group/exported-related/index.js",
|
|
188
|
+
"require": "./cjs/input-group/exported-related/index.js"
|
|
189
|
+
},
|
|
190
|
+
"./input-group/exported-related/data-test-ids": {
|
|
191
|
+
"import": "./esm/input-group/exported-related/data-test-ids.js",
|
|
192
|
+
"require": "./cjs/input-group/exported-related/data-test-ids.js"
|
|
193
|
+
},
|
|
182
194
|
"./date-time-picker/utils/typeGuards": {
|
|
183
195
|
"import": "./esm/date-time-picker/utils/typeGuards.js",
|
|
184
196
|
"require": "./cjs/date-time-picker/utils/typeGuards.js"
|
|
@@ -511,6 +523,10 @@
|
|
|
511
523
|
"import": "./esm/date-time-picker/config/useGetDestructuredValues.js",
|
|
512
524
|
"require": "./cjs/date-time-picker/config/useGetDestructuredValues.js"
|
|
513
525
|
},
|
|
526
|
+
"./date-time-picker/config/useFocusTracker": {
|
|
527
|
+
"import": "./esm/date-time-picker/config/useFocusTracker.js",
|
|
528
|
+
"require": "./cjs/date-time-picker/config/useFocusTracker.js"
|
|
529
|
+
},
|
|
514
530
|
"./date-time-picker/config/useControlledDateTimePicker": {
|
|
515
531
|
"import": "./esm/date-time-picker/config/useControlledDateTimePicker.js",
|
|
516
532
|
"require": "./cjs/date-time-picker/config/useControlledDateTimePicker.js"
|
|
@@ -799,6 +815,10 @@
|
|
|
799
815
|
"import": "./esm/autocomplete/react-desc-prop-types.js",
|
|
800
816
|
"require": "./cjs/autocomplete/react-desc-prop-types.js"
|
|
801
817
|
},
|
|
818
|
+
"./autocomplete/parts/styled": {
|
|
819
|
+
"import": "./esm/autocomplete/parts/styled.js",
|
|
820
|
+
"require": "./cjs/autocomplete/parts/styled.js"
|
|
821
|
+
},
|
|
802
822
|
"./autocomplete/parts/menu-list/useItemRenderer": {
|
|
803
823
|
"import": "./esm/autocomplete/parts/menu-list/useItemRenderer.js",
|
|
804
824
|
"require": "./cjs/autocomplete/parts/menu-list/useItemRenderer.js"
|
|
@@ -831,6 +851,10 @@
|
|
|
831
851
|
"import": "./esm/autocomplete/parts/container/Container.js",
|
|
832
852
|
"require": "./cjs/autocomplete/parts/container/Container.js"
|
|
833
853
|
},
|
|
854
|
+
"./autocomplete/parts/A11yFocusedOption": {
|
|
855
|
+
"import": "./esm/autocomplete/parts/A11yFocusedOption.js",
|
|
856
|
+
"require": "./cjs/autocomplete/parts/A11yFocusedOption.js"
|
|
857
|
+
},
|
|
834
858
|
"./autocomplete": {
|
|
835
859
|
"import": "./esm/autocomplete/index.js",
|
|
836
860
|
"require": "./cjs/autocomplete/index.js"
|
|
@@ -872,20 +896,20 @@
|
|
|
872
896
|
"build": "node ../../scripts/build/build.js"
|
|
873
897
|
},
|
|
874
898
|
"dependencies": {
|
|
875
|
-
"@elliemae/ds-button": "2.4.2-rc.
|
|
876
|
-
"@elliemae/ds-circular-progress-indicator": "2.4.2-rc.
|
|
877
|
-
"@elliemae/ds-controlled-form": "2.4.2-rc.
|
|
878
|
-
"@elliemae/ds-form": "2.4.2-rc.
|
|
879
|
-
"@elliemae/ds-form-layout-blocks": "2.4.2-rc.
|
|
880
|
-
"@elliemae/ds-grid": "2.4.2-rc.
|
|
881
|
-
"@elliemae/ds-icon": "2.4.2-rc.
|
|
882
|
-
"@elliemae/ds-icons": "2.4.2-rc.
|
|
883
|
-
"@elliemae/ds-pills": "2.4.2-rc.
|
|
884
|
-
"@elliemae/ds-popperjs": "2.4.2-rc.
|
|
885
|
-
"@elliemae/ds-props-helpers": "2.4.2-rc.
|
|
886
|
-
"@elliemae/ds-system": "2.4.2-rc.
|
|
887
|
-
"@elliemae/ds-tooltip": "2.4.2-rc.
|
|
888
|
-
"@elliemae/ds-truncated-tooltip-text": "2.4.2-rc.
|
|
899
|
+
"@elliemae/ds-button": "2.4.2-rc.11",
|
|
900
|
+
"@elliemae/ds-circular-progress-indicator": "2.4.2-rc.11",
|
|
901
|
+
"@elliemae/ds-controlled-form": "2.4.2-rc.11",
|
|
902
|
+
"@elliemae/ds-form": "2.4.2-rc.11",
|
|
903
|
+
"@elliemae/ds-form-layout-blocks": "2.4.2-rc.11",
|
|
904
|
+
"@elliemae/ds-grid": "2.4.2-rc.11",
|
|
905
|
+
"@elliemae/ds-icon": "2.4.2-rc.11",
|
|
906
|
+
"@elliemae/ds-icons": "2.4.2-rc.11",
|
|
907
|
+
"@elliemae/ds-pills": "2.4.2-rc.11",
|
|
908
|
+
"@elliemae/ds-popperjs": "2.4.2-rc.11",
|
|
909
|
+
"@elliemae/ds-props-helpers": "2.4.2-rc.11",
|
|
910
|
+
"@elliemae/ds-system": "2.4.2-rc.11",
|
|
911
|
+
"@elliemae/ds-tooltip": "2.4.2-rc.11",
|
|
912
|
+
"@elliemae/ds-truncated-tooltip-text": "2.4.2-rc.11",
|
|
889
913
|
"prop-types": "~15.7.2",
|
|
890
914
|
"react-desc": "~4.1.3",
|
|
891
915
|
"react-popper": "~2.2.5",
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DSAutocompleteT } from '../react-desc-prop-types';
|
|
3
|
+
export declare const isSeparator: (el: DSAutocompleteT.OptionTypes | undefined) => el is DSAutocompleteT.ItemSeparatorOptions;
|
|
4
|
+
export declare const StyledA11ySelectedValues: any;
|
|
5
|
+
export declare const A11yFocusedOption: React.ComponentType;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const StyledContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
2
|
export declare const StyledPopperWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DSAutocompleteT } from '../react-desc-prop-types';
|
|
2
|
-
export declare const getSelectableOptions: (options: Array<
|
|
3
|
-
export declare const getOptions: (options: Array<
|
|
4
|
-
export declare const isSelectedValueEmpty: (value:
|
|
5
|
-
export declare const isSelectedValueMultiple: (value:
|
|
6
|
-
export declare const findInCircularList:
|
|
2
|
+
export declare const getSelectableOptions: (options: Array<DSAutocompleteT.OptionTypes>) => Array<DSAutocompleteT.OptionTypes>;
|
|
3
|
+
export declare const getOptions: (options: Array<DSAutocompleteT.OptionTypes>) => Array<DSAutocompleteT.OptionTypes>;
|
|
4
|
+
export declare const isSelectedValueEmpty: (value: DSAutocompleteT.OptionTypes | Array<DSAutocompleteT.OptionTypes>) => boolean;
|
|
5
|
+
export declare const isSelectedValueMultiple: (value: DSAutocompleteT.OptionTypes | Array<DSAutocompleteT.OptionTypes>) => boolean;
|
|
6
|
+
export declare const findInCircularList: (list: DSAutocompleteT.OptionTypes[], from: number, criteria: (item: DSAutocompleteT.OptionTypes) => boolean, step?: number) => number;
|
|
7
7
|
export declare const getFirstOption: (options: DSAutocompleteT.OptionTypes[]) => string;
|
|
@@ -5,7 +5,6 @@ export declare namespace DSControlledCheckboxT {
|
|
|
5
5
|
checked: boolean | 'mixed';
|
|
6
6
|
tabIndex?: number;
|
|
7
7
|
hasError?: boolean;
|
|
8
|
-
'data-testid'?: string;
|
|
9
8
|
wrapLabel: boolean;
|
|
10
9
|
}
|
|
11
10
|
interface OptionalProps {
|
|
@@ -35,6 +34,7 @@ export declare const propTypes: {
|
|
|
35
34
|
label: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
36
35
|
hasError: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
37
36
|
innerRef: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
37
|
+
wrapLabel: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
38
38
|
'aria-*': import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
39
39
|
'on-*': import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
40
40
|
'data-*': import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
@@ -2,4 +2,5 @@ export declare const StyledListWrapper: any;
|
|
|
2
2
|
export declare const StyledList: any;
|
|
3
3
|
export declare const StyledVirtualListWrapper: any;
|
|
4
4
|
export declare const StyledCreatableLabel: any;
|
|
5
|
+
export declare const StyledCreatableValue: any;
|
|
5
6
|
export declare const StyledNoResultsWrapper: any;
|