@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.
Files changed (168) hide show
  1. package/cjs/autocomplete/parts/A11yFocusedOption.js +43 -0
  2. package/cjs/autocomplete/parts/container/Container.js +36 -24
  3. package/cjs/autocomplete/parts/container/styled.js +2 -2
  4. package/cjs/autocomplete/parts/menu-list/MenuList.js +4 -2
  5. package/cjs/autocomplete/parts/styled.js +2 -0
  6. package/cjs/autocomplete/utils/listHelper.js +1 -1
  7. package/cjs/checkbox/ControlledCheckbox.js +1 -1
  8. package/cjs/checkbox/react-desc-prop-types.js +2 -1
  9. package/cjs/checkbox/styles.js +4 -2
  10. package/cjs/combobox/ComboBoxCTX.js +6 -3
  11. package/cjs/combobox/config/useComboBox.js +15 -4
  12. package/cjs/combobox/parts/A11yFocusedOption.js +14 -6
  13. package/cjs/combobox/parts/A11ySelectedValues.js +0 -2
  14. package/cjs/combobox/parts/DropdownIndicator.js +2 -2
  15. package/cjs/combobox/parts/container/Container.js +10 -13
  16. package/cjs/combobox/parts/controls/Controls.js +16 -18
  17. package/cjs/combobox/parts/controls/useOnPillsNavigation.js +3 -3
  18. package/cjs/combobox/parts/controls-input/ControlsInput.js +2 -2
  19. package/cjs/combobox/parts/controls-input/useControlsInput.js +3 -2
  20. package/cjs/combobox/parts/controls-input/useKeyboardNavigation.js +16 -23
  21. package/cjs/combobox/parts/controls-input/useMaskedOnChange.js +6 -6
  22. package/cjs/combobox/parts/dropdown-indicator/DropdownIndicator.js +2 -2
  23. package/cjs/combobox/parts/header-list/useHeaderListHandlers.js +3 -3
  24. package/cjs/combobox/parts/menu-list/MenuList.js +7 -5
  25. package/cjs/combobox/parts/menu-list/styled.js +5 -3
  26. package/cjs/combobox/parts/menu-list/useItemRenderer.js +16 -15
  27. package/cjs/combobox/react-desc-prop-types.js +3 -2
  28. package/cjs/combobox/utils/listHelper.js +10 -0
  29. package/cjs/date-time-picker/config/useChangeHandlers.js +8 -12
  30. package/cjs/date-time-picker/config/useControlledDateTimePicker.js +13 -9
  31. package/cjs/date-time-picker/config/useFocusTracker.js +136 -0
  32. package/cjs/date-time-picker/config/useGetReferences.js +40 -19
  33. package/cjs/date-time-picker/config/useGlobalKeyHandlers.js +8 -12
  34. package/cjs/date-time-picker/parts/ClearButton/ClearButton.js +12 -2
  35. package/cjs/date-time-picker/parts/ClearButton/useClearButton.js +12 -25
  36. package/cjs/date-time-picker/parts/ControlledDateTimePickerContent.js +4 -7
  37. package/cjs/date-time-picker/parts/DateInputs/DDInput.js +8 -2
  38. package/cjs/date-time-picker/parts/DateInputs/DateInputs.js +9 -4
  39. package/cjs/date-time-picker/parts/DateInputs/MMInput.js +8 -2
  40. package/cjs/date-time-picker/parts/DateInputs/YYYYInput.js +8 -2
  41. package/cjs/date-time-picker/parts/DateInputs/useDateInputs.js +76 -95
  42. package/cjs/date-time-picker/parts/Pickers/Calendar/CalendarHead.js +31 -5
  43. package/cjs/date-time-picker/parts/Pickers/Calendar/Day.js +16 -10
  44. package/cjs/date-time-picker/parts/Pickers/Calendar/useConfigCalendarCTX.js +12 -12
  45. package/cjs/date-time-picker/parts/Pickers/Calendar/useFocusLogic.js +2 -38
  46. package/cjs/date-time-picker/parts/Pickers/Calendar/useKeyboardHandlers.js +40 -73
  47. package/cjs/date-time-picker/parts/Pickers/Calendar/usePopperTriggerLogic.js +18 -27
  48. package/cjs/date-time-picker/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +1 -0
  49. package/cjs/date-time-picker/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +17 -23
  50. package/cjs/date-time-picker/parts/Pickers/TimeWheel/HoursList.js +13 -7
  51. package/cjs/date-time-picker/parts/Pickers/TimeWheel/MeridiemList.js +14 -8
  52. package/cjs/date-time-picker/parts/Pickers/TimeWheel/MinutesList.js +13 -7
  53. package/cjs/date-time-picker/parts/Pickers/TimeWheel/useKeyboardHandlers.js +36 -230
  54. package/cjs/date-time-picker/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +11 -13
  55. package/cjs/date-time-picker/parts/TimeInputs/HHInput.js +8 -2
  56. package/cjs/date-time-picker/parts/TimeInputs/MeridiemInput.js +8 -2
  57. package/cjs/date-time-picker/parts/TimeInputs/MinutesInput.js +8 -2
  58. package/cjs/date-time-picker/parts/TimeInputs/TimeInputs.js +11 -6
  59. package/cjs/date-time-picker/parts/TimeInputs/useTimeInputs.js +44 -74
  60. package/cjs/date-time-picker/utils/constants.js +0 -12
  61. package/cjs/date-time-picker/utils/hooks/useGetStartingFocusedDay.js +38 -36
  62. package/cjs/input-group/InputGroup.js +8 -7
  63. package/cjs/input-group/exported-related/data-test-ids.js +12 -0
  64. package/cjs/input-group/exported-related/index.js +12 -0
  65. package/cjs/input-group/exported-related/theming.js +13 -0
  66. package/cjs/input-group/styled.js +21 -20
  67. package/esm/autocomplete/parts/A11yFocusedOption.js +32 -0
  68. package/esm/autocomplete/parts/container/Container.js +39 -27
  69. package/esm/autocomplete/parts/container/styled.js +2 -2
  70. package/esm/autocomplete/parts/menu-list/MenuList.js +5 -3
  71. package/esm/autocomplete/parts/styled.js +1 -0
  72. package/esm/autocomplete/utils/listHelper.js +1 -1
  73. package/esm/checkbox/ControlledCheckbox.js +2 -2
  74. package/esm/checkbox/react-desc-prop-types.js +2 -1
  75. package/esm/checkbox/styles.js +4 -3
  76. package/esm/combobox/ComboBoxCTX.js +6 -3
  77. package/esm/combobox/config/useComboBox.js +16 -5
  78. package/esm/combobox/parts/A11yFocusedOption.js +15 -7
  79. package/esm/combobox/parts/A11ySelectedValues.js +0 -2
  80. package/esm/combobox/parts/DropdownIndicator.js +2 -2
  81. package/esm/combobox/parts/container/Container.js +10 -13
  82. package/esm/combobox/parts/controls/Controls.js +16 -18
  83. package/esm/combobox/parts/controls/useOnPillsNavigation.js +3 -3
  84. package/esm/combobox/parts/controls-input/ControlsInput.js +2 -2
  85. package/esm/combobox/parts/controls-input/useControlsInput.js +3 -2
  86. package/esm/combobox/parts/controls-input/useKeyboardNavigation.js +17 -24
  87. package/esm/combobox/parts/controls-input/useMaskedOnChange.js +6 -6
  88. package/esm/combobox/parts/dropdown-indicator/DropdownIndicator.js +2 -2
  89. package/esm/combobox/parts/header-list/useHeaderListHandlers.js +3 -3
  90. package/esm/combobox/parts/menu-list/MenuList.js +7 -5
  91. package/esm/combobox/parts/menu-list/styled.js +5 -4
  92. package/esm/combobox/parts/menu-list/useItemRenderer.js +18 -17
  93. package/esm/combobox/react-desc-prop-types.js +3 -2
  94. package/esm/combobox/utils/listHelper.js +10 -1
  95. package/esm/date-time-picker/config/useChangeHandlers.js +8 -12
  96. package/esm/date-time-picker/config/useControlledDateTimePicker.js +13 -9
  97. package/esm/date-time-picker/config/useFocusTracker.js +132 -0
  98. package/esm/date-time-picker/config/useGetReferences.js +41 -20
  99. package/esm/date-time-picker/config/useGlobalKeyHandlers.js +8 -12
  100. package/esm/date-time-picker/parts/ClearButton/ClearButton.js +12 -2
  101. package/esm/date-time-picker/parts/ClearButton/useClearButton.js +12 -25
  102. package/esm/date-time-picker/parts/ControlledDateTimePickerContent.js +4 -7
  103. package/esm/date-time-picker/parts/DateInputs/DDInput.js +8 -2
  104. package/esm/date-time-picker/parts/DateInputs/DateInputs.js +9 -4
  105. package/esm/date-time-picker/parts/DateInputs/MMInput.js +8 -2
  106. package/esm/date-time-picker/parts/DateInputs/YYYYInput.js +8 -2
  107. package/esm/date-time-picker/parts/DateInputs/useDateInputs.js +77 -96
  108. package/esm/date-time-picker/parts/Pickers/Calendar/CalendarHead.js +32 -6
  109. package/esm/date-time-picker/parts/Pickers/Calendar/Day.js +16 -10
  110. package/esm/date-time-picker/parts/Pickers/Calendar/useConfigCalendarCTX.js +12 -12
  111. package/esm/date-time-picker/parts/Pickers/Calendar/useFocusLogic.js +3 -39
  112. package/esm/date-time-picker/parts/Pickers/Calendar/useKeyboardHandlers.js +40 -73
  113. package/esm/date-time-picker/parts/Pickers/Calendar/usePopperTriggerLogic.js +18 -27
  114. package/esm/date-time-picker/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +1 -0
  115. package/esm/date-time-picker/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +17 -23
  116. package/esm/date-time-picker/parts/Pickers/TimeWheel/HoursList.js +14 -8
  117. package/esm/date-time-picker/parts/Pickers/TimeWheel/MeridiemList.js +15 -9
  118. package/esm/date-time-picker/parts/Pickers/TimeWheel/MinutesList.js +14 -8
  119. package/esm/date-time-picker/parts/Pickers/TimeWheel/useKeyboardHandlers.js +36 -230
  120. package/esm/date-time-picker/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +11 -13
  121. package/esm/date-time-picker/parts/TimeInputs/HHInput.js +8 -2
  122. package/esm/date-time-picker/parts/TimeInputs/MeridiemInput.js +8 -2
  123. package/esm/date-time-picker/parts/TimeInputs/MinutesInput.js +8 -2
  124. package/esm/date-time-picker/parts/TimeInputs/TimeInputs.js +11 -6
  125. package/esm/date-time-picker/parts/TimeInputs/useTimeInputs.js +44 -74
  126. package/esm/date-time-picker/utils/constants.js +1 -7
  127. package/esm/date-time-picker/utils/hooks/useGetStartingFocusedDay.js +38 -36
  128. package/esm/input-group/InputGroup.js +5 -4
  129. package/esm/input-group/exported-related/data-test-ids.js +8 -0
  130. package/esm/input-group/exported-related/index.js +2 -0
  131. package/esm/input-group/exported-related/theming.js +8 -0
  132. package/esm/input-group/styled.js +18 -17
  133. package/package.json +39 -15
  134. package/types/autocomplete/parts/A11yFocusedOption.d.ts +5 -0
  135. package/types/autocomplete/parts/container/styled.d.ts +1 -1
  136. package/types/autocomplete/parts/styled.d.ts +0 -0
  137. package/types/autocomplete/utils/listHelper.d.ts +5 -5
  138. package/types/checkbox/react-desc-prop-types.d.ts +1 -1
  139. package/types/checkbox/styles.d.ts +1 -0
  140. package/types/combobox/parts/menu-list/styled.d.ts +1 -0
  141. package/types/combobox/react-desc-prop-types.d.ts +8 -6
  142. package/types/combobox/sharedTypes.d.ts +3 -2
  143. package/types/combobox/utils/listHelper.d.ts +1 -0
  144. package/types/date-time-picker/config/useChangeHandlers.d.ts +3 -1
  145. package/types/date-time-picker/config/useControlledDateTimePicker.d.ts +2 -5
  146. package/types/date-time-picker/config/useFocusTracker.d.ts +38 -0
  147. package/types/date-time-picker/config/useGetPropsBasedOnType.d.ts +6 -6
  148. package/types/date-time-picker/config/useGetReferences.d.ts +30 -36
  149. package/types/date-time-picker/config/useGlobalKeyHandlers.d.ts +3 -1
  150. package/types/date-time-picker/parts/DateInputs/DDInput.d.ts +2 -1
  151. package/types/date-time-picker/parts/DateInputs/MMInput.d.ts +2 -1
  152. package/types/date-time-picker/parts/DateInputs/YYYYInput.d.ts +2 -1
  153. package/types/date-time-picker/parts/Pickers/Calendar/useConfigCalendarCTX.d.ts +14 -0
  154. package/types/date-time-picker/parts/Pickers/Calendar/useFocusLogic.d.ts +1 -2
  155. package/types/date-time-picker/parts/Pickers/Calendar/usePopperTriggerLogic.d.ts +19 -0
  156. package/types/date-time-picker/parts/Pickers/TimeWheel/useKeyboardHandlers.d.ts +0 -6
  157. package/types/date-time-picker/parts/Pickers/TimeWheel/usePopperTriggerLogic.d.ts +14 -0
  158. package/types/date-time-picker/parts/TimeInputs/HHInput.d.ts +2 -1
  159. package/types/date-time-picker/parts/TimeInputs/MeridiemInput.d.ts +2 -1
  160. package/types/date-time-picker/parts/TimeInputs/MinutesInput.d.ts +2 -1
  161. package/types/date-time-picker/propTypes.d.ts +117 -0
  162. package/types/date-time-picker/sharedTypes.d.ts +1 -1
  163. package/types/date-time-picker/utils/constants.d.ts +0 -6
  164. package/types/input-group/exported-related/data-test-ids.d.ts +6 -0
  165. package/types/input-group/exported-related/index.d.ts +2 -0
  166. package/types/input-group/exported-related/theming.d.ts +6 -0
  167. package/types/input-group/styled.d.ts +4 -7
  168. 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
- setLatestInteractionRegion,
33
- minutesInterval
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
- var _monthInputRef$curren, _monthInputRef$curren2, _hourInputRef$current, _hourInputRef$current2;
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
- var _pickerButtonRef$curr, _pickerButtonRef$curr2, _clearButtonRef$curre, _clearButtonRef$curre2, _meridiemInputRef$cur, _meridiemInputRef$cur2;
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
- setLatestInteractionRegionTimeInputs();
50
- }, [setLatestInteractionRegionTimeInputs]);
39
+ trackFocusHourInput();
40
+ }, [trackFocusHourInput]);
51
41
  const onHoursChange = useCallback(e => {
52
- var _e$target, _minutesInputRef$curr, _minutesInputRef$curr2;
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) minutesInputRef === null || minutesInputRef === void 0 ? void 0 : (_minutesInputRef$curr = minutesInputRef.current) === null || _minutesInputRef$curr === void 0 ? void 0 : (_minutesInputRef$curr2 = _minutesInputRef$curr.focus) === null || _minutesInputRef$curr2 === void 0 ? void 0 : _minutesInputRef$curr2.call(_minutesInputRef$curr);
60
- }, [minutesInputRef, handleChangeHours]);
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 (homeEndArrowUpDownSemiKeys.includes(key)) e.preventDefault();
71
- if (homeEndArrowUpDownSemiKeys.includes(key)) e.stopPropagation();
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) minutesInputRef === null || minutesInputRef === void 0 ? void 0 : (_minutesInputRef$curr3 = minutesInputRef.current) === null || _minutesInputRef$curr3 === void 0 ? void 0 : (_minutesInputRef$curr4 = _minutesInputRef$curr3.focus) === null || _minutesInputRef$curr4 === void 0 ? void 0 : _minutesInputRef$curr4.call(_minutesInputRef$curr3);
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
- var _yearInputRef$current, _yearInputRef$current2;
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 === ';') lastSegmentRef === null || lastSegmentRef === void 0 ? void 0 : (_lastSegmentRef$curre = lastSegmentRef.current) === null || _lastSegmentRef$curre === void 0 ? void 0 : (_lastSegmentRef$curre2 = _lastSegmentRef$curre.focus) === null || _lastSegmentRef$curre2 === void 0 ? void 0 : _lastSegmentRef$curre2.call(_lastSegmentRef$curre);
101
- }, [hours, onHomeKeyDown, onEndKeyDown, isWithDateInputs, lastSegmentRef, handleChangeHours, minutesInputRef, yearInputRef]);
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
- setLatestInteractionRegionTimeInputs();
114
- }, [setLatestInteractionRegionTimeInputs]);
97
+ trackFocusMinuteInput();
98
+ }, [trackFocusMinuteInput]);
115
99
  const onMinutesChange = useCallback(e => {
116
- var _e$target3, _meridiemInputRef$cur3, _meridiemInputRef$cur4;
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) meridiemInputRef === null || meridiemInputRef === void 0 ? void 0 : (_meridiemInputRef$cur3 = meridiemInputRef.current) === null || _meridiemInputRef$cur3 === void 0 ? void 0 : (_meridiemInputRef$cur4 = _meridiemInputRef$cur3.focus) === null || _meridiemInputRef$cur4 === void 0 ? void 0 : _meridiemInputRef$cur4.call(_meridiemInputRef$cur3);
125
- }, [meridiemInputRef, handleChangeMinutes]);
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 (homeEndArrowUpDownSpaceKeys.includes(key)) e.preventDefault();
136
- if (homeEndArrowUpDownSpaceKeys.includes(key)) e.stopPropagation();
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) meridiemInputRef === null || meridiemInputRef === void 0 ? void 0 : (_meridiemInputRef$cur5 = meridiemInputRef.current) === null || _meridiemInputRef$cur5 === void 0 ? void 0 : (_meridiemInputRef$cur6 = _meridiemInputRef$cur5.focus) === null || _meridiemInputRef$cur6 === void 0 ? void 0 : _meridiemInputRef$cur6.call(_meridiemInputRef$cur5);
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
- var _hourInputRef$current3, _hourInputRef$current4;
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 === ';') lastSegmentRef === null || lastSegmentRef === void 0 ? void 0 : (_lastSegmentRef$curre3 = lastSegmentRef.current) === null || _lastSegmentRef$curre3 === void 0 ? void 0 : (_lastSegmentRef$curre4 = _lastSegmentRef$curre3.focus) === null || _lastSegmentRef$curre4 === void 0 ? void 0 : _lastSegmentRef$curre4.call(_lastSegmentRef$curre3);
167
- }, [minutes, onHomeKeyDown, onEndKeyDown, lastSegmentRef, minutesInterval, handleChangeMinutes, meridiemInputRef, hourInputRef]);
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
- setLatestInteractionRegionTimeInputs();
178
- }, [setLatestInteractionRegionTimeInputs]);
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
- var _clearButtonRef$curre3, _clearButtonRef$curre4, _pickerButtonRef$curr3, _pickerButtonRef$curr4;
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, clearButtonRef, withAnyPicker, pickerButtonRef]);
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 (homeEndArrowUpDownKeys.includes(key)) e.preventDefault();
204
- if (homeEndArrowUpDownKeys.includes(key)) e.stopPropagation();
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
- var _minutesInputRef$curr5, _minutesInputRef$curr6;
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 === ';') lastSegmentRef === null || lastSegmentRef === void 0 ? void 0 : (_lastSegmentRef$curre5 = lastSegmentRef.current) === null || _lastSegmentRef$curre5 === void 0 ? void 0 : (_lastSegmentRef$curre6 = _lastSegmentRef$curre5.focus) === null || _lastSegmentRef$curre6 === void 0 ? void 0 : _lastSegmentRef$curre6.call(_lastSegmentRef$curre5);
218
- }, [onHomeKeyDown, onEndKeyDown, meridiem, handleChangeMeridiem, lastSegmentRef, minutesInputRef]);
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, homeEndAllArrowKeys, homeEndArrowUpDownDashSlashesKeys, homeEndArrowUpDownKeys, homeEndArrowUpDownSemiKeys, homeEndArrowUpDownSpaceKeys, homeEndKeys, monthNames, weekDays };
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
- if (isInputFilledAndValid) {
42
- startingDay.startFocusedMonth = inputValuesSplitMonth;
43
- startingDay.startFocusedDay = inputValuesSplitDay;
44
- startingDay.startFocusedYear = inputValuesDaySplitYear;
45
- startingDay.startFocusedDate = dayFromInputValues; // if input was not filled (or filled invalid) and there is no onCalendarOpenFocusedDay start focus is not a day
46
- } else if (isOnCalendarOpenFocusedDayEmpty) {
47
- // if input was not filled and there is onCalendarOpenFocusedDay start focus is onCalendarOpenFocusedDay day
48
- return empty;
49
- } else if (shouldFillWithOnCalendarOpenFocusedDay) {
50
- const {
51
- month: focusedDaySplitMonth,
52
- day: focusedDaySplitDay,
53
- year: focusedDaySplitYear
54
- } = deconstructValuesFromDateString(onCalendarOpenFocusedDay);
55
- const monthAsInt = convertToPositiveNumberIfPossible(focusedDaySplitMonth);
56
- const dayAsInt = convertToPositiveNumberIfPossible(focusedDaySplitDay);
57
- const yearAsInt = convertToPositiveNumberIfPossible(focusedDaySplitYear); // if this condition is false, return will be the same as return empty
58
- // because startFocusedMonth/Day/Year/Date will be === null
59
- // which is the expected result
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
- if (monthAsInt !== -1 && dayAsInt !== -1 && yearAsInt !== -1 && isValidDayForTheMonth(monthAsInt - 1, yearAsInt, dayAsInt)) {
62
- startingDay.startFocusedMonth = monthAsInt;
63
- startingDay.startFocusedDay = dayAsInt;
64
- startingDay.startFocusedYear = yearAsInt;
65
- startingDay.startFocusedDate = new Date(yearAsInt, monthAsInt - 1, dayAsInt);
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 './InputGroupDataTestIds.js';
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, {
@@ -0,0 +1,8 @@
1
+ const InputGroupDataTestIds = {
2
+ CONTAINER: 'ds-input-group-container',
3
+ LEFTADDON: 'ds-input-group-left-addon',
4
+ RIGHTADDON: 'ds-input-group-right-addon',
5
+ INPUTCONTAINER: 'ds-input-group-input-container'
6
+ };
7
+
8
+ export { InputGroupDataTestIds };
@@ -0,0 +1,2 @@
1
+ export { InputGroupDataTestIds } from './data-test-ids.js';
2
+ export { DSInputGroupName, DSInputGroupSlots } from './theming.js';
@@ -0,0 +1,8 @@
1
+ const DSInputGroupName = 'ds-input-group';
2
+ const DSInputGroupSlots = {
3
+ CONTAINER: 'root',
4
+ LEFT_ADDON: 'leftaddon',
5
+ RIGHT_ADDON: 'rightaddon'
6
+ };
7
+
8
+ export { DSInputGroupName, DSInputGroupSlots };
@@ -1,17 +1,18 @@
1
- import styled from 'styled-components';
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
- /* eslint-disable @typescript-eslint/no-unsafe-assignment */
9
- const StyledContainer = /*#__PURE__*/styled(Grid).withConfig({
10
- componentId: "sc-12elcva-0"
11
- })(["width:100%;height:28px;& > div:nth-child(1){.", "-", ",.", "-", ",.", "-", "{border-top-right-radius:0;border-bottom-right-radius:0;}}& > div:nth-child(2):nth-last-child(2){.", "-", ",.", "-", ",.", "-", "{border-radius:0;}}& > div:nth-child(2):nth-last-child(1){.", "-", ",.", "-", ",.", "-", "{border-top-left-radius:0;border-bottom-left-radius:0;}}"], 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);
12
- const StyledAddon = /*#__PURE__*/styled.div.withConfig({
13
- componentId: "sc-12elcva-1"
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 = /*#__PURE__*/styled(StyledAddon).withConfig({
26
- componentId: "sc-12elcva-2"
27
- })(["border-top-left-radius:2px;border-bottom-left-radius:2px;margin-right:-1px;&:hover{button:not(:disabled){border-top-right-radius:0px;border-bottom-right-radius:0px;}}"]);
28
- const StyledRightAddon = /*#__PURE__*/styled(StyledAddon).withConfig({
29
- componentId: "sc-12elcva-3"
30
- })(["border-top-right-radius:2px;border-bottom-right-radius:2px;margin-left:-1px;&:hover{button:not(:disabled){border-top-left-radius:0px;border-bottom-left-radius:0px;}}"]);
31
- const StyledInput = /*#__PURE__*/styled.div.withConfig({
32
- componentId: "sc-12elcva-4"
33
- })(["&:focus-within,&:hover{z-index:1;}"]);
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.1",
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.1",
876
- "@elliemae/ds-circular-progress-indicator": "2.4.2-rc.1",
877
- "@elliemae/ds-controlled-form": "2.4.2-rc.1",
878
- "@elliemae/ds-form": "2.4.2-rc.1",
879
- "@elliemae/ds-form-layout-blocks": "2.4.2-rc.1",
880
- "@elliemae/ds-grid": "2.4.2-rc.1",
881
- "@elliemae/ds-icon": "2.4.2-rc.1",
882
- "@elliemae/ds-icons": "2.4.2-rc.1",
883
- "@elliemae/ds-pills": "2.4.2-rc.1",
884
- "@elliemae/ds-popperjs": "2.4.2-rc.1",
885
- "@elliemae/ds-props-helpers": "2.4.2-rc.1",
886
- "@elliemae/ds-system": "2.4.2-rc.1",
887
- "@elliemae/ds-tooltip": "2.4.2-rc.1",
888
- "@elliemae/ds-truncated-tooltip-text": "2.4.2-rc.1",
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 StyledContainerWithPopper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
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<CBOptionT>) => Array<CBOptionT>;
3
- export declare const getOptions: (options: Array<CBOptionT>) => Array<CBOptionT>;
4
- export declare const isSelectedValueEmpty: (value: CBOptionT | Array<CBOptionT>) => boolean;
5
- export declare const isSelectedValueMultiple: (value: CBOptionT | Array<CBOptionT>) => boolean;
6
- export declare const findInCircularList: <T extends unknown>(list: T[], from: number, criteria: (item: T) => boolean, step?: number) => number;
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;
@@ -3,3 +3,4 @@ export declare const StyledCheckBox: any;
3
3
  export declare const StyledInput: any;
4
4
  export declare const StyledInputMixed: any;
5
5
  export declare const StyledLabel: any;
6
+ export declare const StyledWrapLabel: any;
@@ -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;