@elliemae/ds-controlled-form 2.4.2-rc.12 → 2.4.2-rc.13

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 (194) hide show
  1. package/cjs/autocomplete/config/useAutocomplete.js +0 -1
  2. package/cjs/autocomplete/parts/A11yFocusedOption.js +9 -6
  3. package/cjs/autocomplete/parts/container/Container.js +1 -1
  4. package/cjs/autocomplete/parts/container/useKeyboardNavigation.js +2 -2
  5. package/cjs/autocomplete/parts/menu-list/MenuList.js +3 -5
  6. package/cjs/autocomplete/parts/menu-list/styled.js +2 -2
  7. package/cjs/autocomplete/parts/menu-list/useItemRenderer.js +1 -1
  8. package/cjs/checkbox/config/useValidateProps.js +6 -3
  9. package/cjs/checkbox/styles.js +72 -28
  10. package/cjs/checkbox/utils/styleHelpers.js +20 -2
  11. package/cjs/combobox/config/useComboBox.js +1 -2
  12. package/cjs/combobox/config/useCorrectOptions.js +1 -2
  13. package/cjs/combobox/parts/A11yFocusedOption.js +4 -4
  14. package/cjs/combobox/parts/A11ySelectedValues.js +2 -2
  15. package/cjs/combobox/parts/DropdownIndicator.js +13 -5
  16. package/cjs/combobox/parts/container/Container.js +1 -1
  17. package/cjs/combobox/parts/container/styled.js +11 -10
  18. package/cjs/combobox/parts/controls/Controls.js +3 -9
  19. package/cjs/combobox/parts/controls/styled.js +54 -22
  20. package/cjs/combobox/parts/controls/useOnPillsNavigation.js +4 -12
  21. package/cjs/combobox/parts/controls-input/styled.js +41 -11
  22. package/cjs/combobox/parts/controls-input/useControlsInput.js +1 -5
  23. package/cjs/combobox/parts/controls-input/useKeyboardNavigation.js +4 -6
  24. package/cjs/combobox/parts/controls-input/useMaskedOnChange.js +1 -1
  25. package/cjs/combobox/parts/header-list/HeaderList.js +1 -1
  26. package/cjs/combobox/parts/header-list/styled.js +39 -10
  27. package/cjs/combobox/parts/header-list/useHeaderListHandlers.js +4 -11
  28. package/cjs/combobox/parts/menu-list/MenuList.js +2 -2
  29. package/cjs/combobox/parts/menu-list/styled.js +37 -21
  30. package/cjs/combobox/parts/menu-list/useItemRenderer.js +3 -3
  31. package/cjs/combobox/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +1 -1
  32. package/cjs/combobox/parts/multi-selected-values-container/RemovableSelectedValuePill.js +1 -3
  33. package/cjs/combobox/parts/multi-selected-values-container/useGroupPills.js +1 -2
  34. package/cjs/combobox/parts/styled.js +6 -7
  35. package/cjs/combobox/sharedTypes.js +2 -2
  36. package/cjs/combobox/utils/listHelper.js +4 -9
  37. package/cjs/date-range-picker/config/useRangePickerLogic.js +4 -8
  38. package/cjs/date-range-picker/parts/ControlledDateRangeCalendar.js +0 -2
  39. package/cjs/date-range-picker/parts/ControlledDateRangeFromDate.js +0 -2
  40. package/cjs/date-range-picker/parts/ControlledDateRangeToDate.js +0 -2
  41. package/cjs/date-time-picker/config/useChangeHandlers.js +3 -3
  42. package/cjs/date-time-picker/config/useControlledDateTimePicker.js +1 -1
  43. package/cjs/date-time-picker/config/useFocusTracker.js +1 -1
  44. package/cjs/date-time-picker/config/useGetDestructuredValues.js +6 -6
  45. package/cjs/date-time-picker/config/useGetPropsBasedOnType.js +1 -1
  46. package/cjs/date-time-picker/config/useGetReferences.js +1 -1
  47. package/cjs/date-time-picker/config/useRelevantValueFromProps.js +1 -1
  48. package/cjs/date-time-picker/config/useValidateProps.js +42 -11
  49. package/cjs/date-time-picker/parts/ClearButton/ClearButton.js +1 -3
  50. package/cjs/date-time-picker/parts/DateInputs/DDInput.js +3 -7
  51. package/cjs/date-time-picker/parts/DateInputs/MMInput.js +3 -7
  52. package/cjs/date-time-picker/parts/DateInputs/YYYYInput.js +3 -7
  53. package/cjs/date-time-picker/parts/DateInputs/useDateInputs.js +13 -23
  54. package/cjs/date-time-picker/parts/Pickers/Calendar/CalendarDaysList.js +4 -4
  55. package/cjs/date-time-picker/parts/Pickers/Calendar/CalendarHead.js +6 -14
  56. package/cjs/date-time-picker/parts/Pickers/Calendar/CalendarIconTrigger.js +1 -1
  57. package/cjs/date-time-picker/parts/Pickers/Calendar/Day.js +8 -10
  58. package/cjs/date-time-picker/parts/Pickers/Calendar/Styleds.js +44 -15
  59. package/cjs/date-time-picker/parts/Pickers/Calendar/useConfigCalendarCTX.js +1 -2
  60. package/cjs/date-time-picker/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js +2 -1
  61. package/cjs/date-time-picker/parts/Pickers/Calendar/useFocusLogic.js +0 -1
  62. package/cjs/date-time-picker/parts/Pickers/Calendar/usePopperTriggerLogic.js +3 -5
  63. package/cjs/date-time-picker/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +1 -1
  64. package/cjs/date-time-picker/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +3 -5
  65. package/cjs/date-time-picker/parts/Pickers/TimeWheel/HoursList.js +5 -7
  66. package/cjs/date-time-picker/parts/Pickers/TimeWheel/MeridiemList.js +6 -8
  67. package/cjs/date-time-picker/parts/Pickers/TimeWheel/MinutesList.js +5 -7
  68. package/cjs/date-time-picker/parts/Pickers/TimeWheel/SecondsList.js +2 -2
  69. package/cjs/date-time-picker/parts/Pickers/TimeWheel/Styleds.js +47 -15
  70. package/cjs/date-time-picker/parts/Pickers/TimeWheel/TimeWheelContent.js +1 -1
  71. package/cjs/date-time-picker/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +1 -1
  72. package/cjs/date-time-picker/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js +3 -3
  73. package/cjs/date-time-picker/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +2 -5
  74. package/cjs/date-time-picker/parts/Styleds.js +12 -6
  75. package/cjs/date-time-picker/parts/TimeInputs/HHInput.js +2 -4
  76. package/cjs/date-time-picker/parts/TimeInputs/MeridiemInput.js +3 -8
  77. package/cjs/date-time-picker/parts/TimeInputs/MinutesInput.js +3 -7
  78. package/cjs/date-time-picker/parts/TimeInputs/useTimeInputs.js +14 -26
  79. package/cjs/date-time-picker/utils/dateHelpers.js +17 -34
  80. package/cjs/date-time-picker/utils/hooks/useOnClickOutside.js +1 -3
  81. package/cjs/date-time-picker/utils/stringHelpers.js +5 -11
  82. package/cjs/input-group/styled.js +79 -13
  83. package/cjs/large-text-input/DSControlledLargeTextInput.js +1 -1
  84. package/cjs/large-text-input/styles.js +27 -13
  85. package/cjs/mask-hook/hooks/useNumberMask.js +1 -5
  86. package/cjs/mask-hook/hooks/usePhoneMask.js +1 -4
  87. package/cjs/mask-hook/hooks/useRegExpMask.js +4 -7
  88. package/cjs/mask-hook/hooks/useSSNMask.js +1 -4
  89. package/cjs/mask-hook/hooks/useZipCodeMask.js +1 -4
  90. package/cjs/mask-hook/utils/addSpecialCharacters.js +0 -1
  91. package/cjs/mask-hook/utils/flatStringArray.js +0 -1
  92. package/cjs/text-input/config/useInputText.js +0 -1
  93. package/cjs/text-input/styled/borders.js +18 -11
  94. package/cjs/text-input/styled/components.js +49 -10
  95. package/cjs/toggle/ControlledToggle.js +2 -3
  96. package/cjs/toggle/styles.js +7 -5
  97. package/esm/autocomplete/config/useAutocomplete.js +0 -1
  98. package/esm/autocomplete/parts/A11yFocusedOption.js +9 -5
  99. package/esm/autocomplete/parts/container/Container.js +1 -1
  100. package/esm/autocomplete/parts/container/useKeyboardNavigation.js +2 -2
  101. package/esm/autocomplete/parts/menu-list/MenuList.js +3 -5
  102. package/esm/autocomplete/parts/menu-list/styled.js +2 -2
  103. package/esm/autocomplete/parts/menu-list/useItemRenderer.js +1 -1
  104. package/esm/checkbox/config/useValidateProps.js +6 -3
  105. package/esm/checkbox/styles.js +72 -24
  106. package/esm/checkbox/utils/styleHelpers.js +20 -2
  107. package/esm/combobox/config/useComboBox.js +0 -1
  108. package/esm/combobox/config/useCorrectOptions.js +1 -2
  109. package/esm/combobox/parts/A11yFocusedOption.js +4 -4
  110. package/esm/combobox/parts/A11ySelectedValues.js +2 -2
  111. package/esm/combobox/parts/DropdownIndicator.js +13 -4
  112. package/esm/combobox/parts/container/Container.js +1 -1
  113. package/esm/combobox/parts/container/styled.js +11 -6
  114. package/esm/combobox/parts/controls/Controls.js +3 -9
  115. package/esm/combobox/parts/controls/styled.js +54 -18
  116. package/esm/combobox/parts/controls/useOnPillsNavigation.js +4 -12
  117. package/esm/combobox/parts/controls-input/styled.js +41 -7
  118. package/esm/combobox/parts/controls-input/useControlsInput.js +1 -5
  119. package/esm/combobox/parts/controls-input/useKeyboardNavigation.js +4 -6
  120. package/esm/combobox/parts/controls-input/useMaskedOnChange.js +1 -1
  121. package/esm/combobox/parts/header-list/HeaderList.js +1 -1
  122. package/esm/combobox/parts/header-list/styled.js +40 -7
  123. package/esm/combobox/parts/header-list/useHeaderListHandlers.js +4 -11
  124. package/esm/combobox/parts/menu-list/MenuList.js +2 -2
  125. package/esm/combobox/parts/menu-list/styled.js +37 -17
  126. package/esm/combobox/parts/menu-list/useItemRenderer.js +3 -3
  127. package/esm/combobox/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +1 -1
  128. package/esm/combobox/parts/multi-selected-values-container/RemovableSelectedValuePill.js +1 -3
  129. package/esm/combobox/parts/multi-selected-values-container/useGroupPills.js +1 -2
  130. package/esm/combobox/parts/styled.js +6 -3
  131. package/esm/combobox/sharedTypes.js +2 -2
  132. package/esm/combobox/utils/listHelper.js +4 -9
  133. package/esm/date-range-picker/config/useRangePickerLogic.js +3 -7
  134. package/esm/date-range-picker/parts/ControlledDateRangeCalendar.js +0 -2
  135. package/esm/date-range-picker/parts/ControlledDateRangeFromDate.js +0 -2
  136. package/esm/date-range-picker/parts/ControlledDateRangeToDate.js +0 -2
  137. package/esm/date-time-picker/config/useChangeHandlers.js +3 -3
  138. package/esm/date-time-picker/config/useControlledDateTimePicker.js +1 -1
  139. package/esm/date-time-picker/config/useFocusTracker.js +1 -1
  140. package/esm/date-time-picker/config/useGetDestructuredValues.js +6 -6
  141. package/esm/date-time-picker/config/useGetPropsBasedOnType.js +1 -1
  142. package/esm/date-time-picker/config/useGetReferences.js +1 -1
  143. package/esm/date-time-picker/config/useRelevantValueFromProps.js +1 -1
  144. package/esm/date-time-picker/config/useValidateProps.js +42 -11
  145. package/esm/date-time-picker/parts/ClearButton/ClearButton.js +1 -3
  146. package/esm/date-time-picker/parts/DateInputs/DDInput.js +3 -7
  147. package/esm/date-time-picker/parts/DateInputs/MMInput.js +3 -7
  148. package/esm/date-time-picker/parts/DateInputs/YYYYInput.js +3 -7
  149. package/esm/date-time-picker/parts/DateInputs/useDateInputs.js +13 -23
  150. package/esm/date-time-picker/parts/Pickers/Calendar/CalendarDaysList.js +4 -4
  151. package/esm/date-time-picker/parts/Pickers/Calendar/CalendarHead.js +6 -14
  152. package/esm/date-time-picker/parts/Pickers/Calendar/CalendarIconTrigger.js +1 -1
  153. package/esm/date-time-picker/parts/Pickers/Calendar/Day.js +8 -10
  154. package/esm/date-time-picker/parts/Pickers/Calendar/Styleds.js +44 -14
  155. package/esm/date-time-picker/parts/Pickers/Calendar/useConfigCalendarCTX.js +0 -1
  156. package/esm/date-time-picker/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js +2 -1
  157. package/esm/date-time-picker/parts/Pickers/Calendar/useFocusLogic.js +0 -1
  158. package/esm/date-time-picker/parts/Pickers/Calendar/usePopperTriggerLogic.js +3 -5
  159. package/esm/date-time-picker/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +1 -1
  160. package/esm/date-time-picker/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +3 -5
  161. package/esm/date-time-picker/parts/Pickers/TimeWheel/HoursList.js +5 -7
  162. package/esm/date-time-picker/parts/Pickers/TimeWheel/MeridiemList.js +6 -8
  163. package/esm/date-time-picker/parts/Pickers/TimeWheel/MinutesList.js +5 -7
  164. package/esm/date-time-picker/parts/Pickers/TimeWheel/SecondsList.js +2 -2
  165. package/esm/date-time-picker/parts/Pickers/TimeWheel/Styleds.js +47 -14
  166. package/esm/date-time-picker/parts/Pickers/TimeWheel/TimeWheelContent.js +1 -1
  167. package/esm/date-time-picker/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +1 -1
  168. package/esm/date-time-picker/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js +3 -3
  169. package/esm/date-time-picker/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +2 -5
  170. package/esm/date-time-picker/parts/Styleds.js +12 -6
  171. package/esm/date-time-picker/parts/TimeInputs/HHInput.js +2 -4
  172. package/esm/date-time-picker/parts/TimeInputs/MeridiemInput.js +3 -8
  173. package/esm/date-time-picker/parts/TimeInputs/MinutesInput.js +3 -7
  174. package/esm/date-time-picker/parts/TimeInputs/useTimeInputs.js +14 -26
  175. package/esm/date-time-picker/utils/dateHelpers.js +17 -34
  176. package/esm/date-time-picker/utils/hooks/useOnClickOutside.js +1 -3
  177. package/esm/date-time-picker/utils/stringHelpers.js +5 -11
  178. package/esm/input-group/styled.js +79 -9
  179. package/esm/large-text-input/DSControlledLargeTextInput.js +1 -1
  180. package/esm/large-text-input/styles.js +27 -9
  181. package/esm/mask-hook/hooks/useNumberMask.js +1 -5
  182. package/esm/mask-hook/hooks/usePhoneMask.js +1 -4
  183. package/esm/mask-hook/hooks/useRegExpMask.js +4 -7
  184. package/esm/mask-hook/hooks/useSSNMask.js +1 -4
  185. package/esm/mask-hook/hooks/useZipCodeMask.js +1 -4
  186. package/esm/mask-hook/utils/addSpecialCharacters.js +0 -1
  187. package/esm/mask-hook/utils/flatStringArray.js +0 -1
  188. package/esm/text-input/config/useInputText.js +0 -1
  189. package/esm/text-input/styled/borders.js +18 -7
  190. package/esm/text-input/styled/components.js +49 -6
  191. package/esm/toggle/ControlledToggle.js +0 -1
  192. package/esm/toggle/styles.js +7 -5
  193. package/package.json +15 -15
  194. package/types/text-input/config/useInputText.d.ts +3 -3
@@ -3,7 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- require('core-js/modules/web.dom-collections.iterator.js');
7
6
  require('core-js/modules/esnext.async-iterator.filter.js');
8
7
  require('core-js/modules/esnext.iterator.constructor.js');
9
8
  require('core-js/modules/esnext.iterator.filter.js');
@@ -3,7 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _jsx = require('@babel/runtime/helpers/jsx');
6
- var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
7
6
  require('core-js/modules/esnext.async-iterator.find.js');
8
7
  require('core-js/modules/esnext.iterator.constructor.js');
9
8
  require('core-js/modules/esnext.iterator.find.js');
@@ -15,11 +14,14 @@ var listHelper = require('../utils/listHelper.js');
15
14
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
15
 
17
16
  var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
18
- var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
19
17
 
20
- var _templateObject;
21
- const isSeparator = el => (el === null || el === void 0 ? void 0 : el.type) === 'separator';
22
- const StyledA11ySelectedValues = dsSystem.styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n width: 1px;\n height: 1px;\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n"])));
18
+ const isSeparator = el => el?.type === 'separator';
19
+ const StyledA11ySelectedValues = dsSystem.styled.span`
20
+ width: 1px;
21
+ height: 1px;
22
+ position: absolute;
23
+ clip: rect(1px, 1px, 1px, 1px);
24
+ `;
23
25
  const A11yFocusedOption = () => {
24
26
  const {
25
27
  props: {
@@ -34,7 +36,8 @@ const A11yFocusedOption = () => {
34
36
  const focusSelectableOptionIdx = selectabledOptions.findIndex(option => option.dsId === focusOptionIdx);
35
37
  return /*#__PURE__*/_jsx__default["default"](StyledA11ySelectedValues, {
36
38
  "aria-live": "polite"
37
- }, void 0, !isSeparator(focusOption) && showPopover && focusOption && "option ".concat(focusOption.label, " focused.").concat(focusSelectableOptionIdx + 1, " of ").concat(selectabledOptions.length, "\n "));
39
+ }, void 0, !isSeparator(focusOption) && showPopover && focusOption && `option ${focusOption.label} focused.${focusSelectableOptionIdx + 1} of ${selectabledOptions.length}
40
+ `);
38
41
  }, [options, showPopover, focusOptionIdx]);
39
42
  };
40
43
 
@@ -57,7 +57,7 @@ const Container = () => {
57
57
  const childrenWithProps = /*#__PURE__*/React__default["default"].isValidElement(input) ? /*#__PURE__*/React__default["default"].cloneElement(input, {
58
58
  'aria-activedescendant': focusOptionIdx
59
59
  }) : input;
60
- const idList = React.useMemo(() => "".concat(id ? "".concat(id, "-") : '', "listbox"), [id]);
60
+ const idList = React.useMemo(() => `${id ? `${id}-` : ''}listbox`, [id]);
61
61
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
62
62
  children: [_A11yFocusedOption || (_A11yFocusedOption = /*#__PURE__*/_jsx__default["default"](A11yFocusedOption.A11yFocusedOption, {})), /*#__PURE__*/jsxRuntime.jsxs(styled.StyledContainer, {
63
63
  id: id,
@@ -35,7 +35,7 @@ const useKeyboardNavigation = () => {
35
35
 
36
36
  if (e.key === 'Enter' && showPopover) {
37
37
  e.preventDefault();
38
- onSelect(currentItem === null || currentItem === void 0 ? void 0 : currentItem.label, e);
38
+ onSelect(currentItem?.label, e);
39
39
  setShowPopover(false);
40
40
  } // =============================================================================
41
41
  // ARROWS UP AND DOWN
@@ -68,7 +68,7 @@ const useKeyboardNavigation = () => {
68
68
  if (e.key === 'Escape') {
69
69
  setShowPopover(false);
70
70
  }
71
- }, [currentItem === null || currentItem === void 0 ? void 0 : currentItem.label, currentItemIndex, onSelect, options, scrollOptionIntoView, setCurrentOption, setShowPopover, showPopover]);
71
+ }, [currentItem?.label, currentItemIndex, onSelect, options, scrollOptionIntoView, setCurrentOption, setShowPopover, showPopover]);
72
72
  return {
73
73
  onInputKeyDown
74
74
  };
@@ -30,15 +30,13 @@ const MenuList = () => {
30
30
  } = React.useContext(AutocompleteCTX.AutocompleteContext);
31
31
  const ItemRenderer = useItemRenderer.useItemRenderer();
32
32
  const handleOnFocus = React.useCallback(() => {
33
- var _inputRef$current;
34
-
35
- (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
33
+ inputRef.current?.focus();
36
34
  }, [inputRef]);
37
- const idList = React.useMemo(() => "".concat(id ? "".concat(id, "-") : '', "listbox"), [id]);
35
+ const idList = React.useMemo(() => `${id ? `${id}-` : ''}listbox`, [id]);
38
36
  return /*#__PURE__*/_jsx__default["default"](styled.StyledListWrapper, {
39
37
  tabIndex: -1,
40
38
  onMouseDown: e => e.preventDefault(),
41
- minWidth: referenceElement === null || referenceElement === void 0 ? void 0 : referenceElement.offsetWidth,
39
+ minWidth: referenceElement?.offsetWidth,
42
40
  id: idList,
43
41
  role: "listbox"
44
42
  }, void 0, options.length > 0 && /*#__PURE__*/jsxRuntime.jsx(styled.StyledVirtualListWrapper, {
@@ -14,7 +14,7 @@ const StyledListWrapper = /*#__PURE__*/styled__default["default"].div.withConfig
14
14
  let {
15
15
  minWidth
16
16
  } = _ref;
17
- return minWidth ? "".concat(minWidth, "px") : '100%';
17
+ return minWidth ? `${minWidth}px` : '100%';
18
18
  });
19
19
  const StyledList = /*#__PURE__*/styled__default["default"].ul.withConfig({
20
20
  componentId: "sc-qt1kwv-1"
@@ -25,7 +25,7 @@ const StyledVirtualListWrapper = /*#__PURE__*/styled__default["default"].div.wit
25
25
  let {
26
26
  maxHeight
27
27
  } = _ref2;
28
- return "".concat(!maxHeight ? '400' : maxHeight, "px");
28
+ return `${!maxHeight ? '400' : maxHeight}px`;
29
29
  });
30
30
 
31
31
  exports.StyledList = StyledList;
@@ -51,7 +51,7 @@ const useItemRenderer = () => {
51
51
  left: 0,
52
52
  width: '100%'
53
53
  },
54
- key: "".concat(option.dsId),
54
+ key: `${option.dsId}`,
55
55
  innerRef: vItem.measureRef
56
56
  };
57
57
 
@@ -2,21 +2,24 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ require('core-js/modules/es.error.cause.js');
5
6
  var dsPropsHelpers = require('@elliemae/ds-props-helpers');
6
7
 
7
8
  const throwError = message => {
8
- throw new Error("DSControlledCheckbox:: ".concat(message, "\n "));
9
+ throw new Error(`DSControlledCheckbox:: ${message}
10
+ `);
9
11
  };
10
12
 
11
13
  const useValidateProps = (props, propTypes) => {
12
14
  dsPropsHelpers.useValidateTypescriptPropTypes(props, propTypes);
13
15
 
14
16
  if (typeof props.label === 'undefined' && typeof props['aria-label'] === 'undefined') {
15
- throwError("Please provide a label or ariaLabel property to use this component.");
17
+ throwError(`Please provide a label or ariaLabel property to use this component.`);
16
18
  }
17
19
 
18
20
  if (props.checked === 'mixed' && typeof props['aria-controls'] === 'undefined') {
19
- throwError("Please provide an ariaControls property to use a checkbox mixed state. \n This property must be a string containing all the ids that this mixed checkbox is controlling.");
21
+ throwError(`Please provide an ariaControls property to use a checkbox mixed state.
22
+ This property must be a string containing all the ids that this mixed checkbox is controlling.`);
20
23
  }
21
24
  };
22
25
 
@@ -2,48 +2,54 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
6
5
  var dsSystem = require('@elliemae/ds-system');
7
6
  var styleHelpers = require('./utils/styleHelpers.js');
8
7
  var theming = require('./exported-related/theming.js');
9
8
 
10
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
-
12
- var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
13
-
14
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
15
9
  const StyledContainer = dsSystem.styled('div', {
16
10
  name: theming.DSCheckboxName,
17
11
  slot: theming.DSCheckboxSlots.CONTAINER
18
- })(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n display: inline-grid;\n grid-template-rows: min-content;\n grid-template-columns: ", " auto;\n align-items: center;\n"])), _ref => {
12
+ })`
13
+ display: inline-grid;
14
+ grid-template-rows: min-content;
15
+ grid-template-columns: ${_ref => {
19
16
  let {
20
17
  theme
21
18
  } = _ref;
22
19
  return theme.space.xs;
23
- });
24
- const StyledCheckBox = dsSystem.styled('span')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default["default"](["\n width: ", ";\n height: ", ";\n border: 1px solid ", ";\n border-radius: 2px;\n position: relative;\n background: ", ";\n ", "\n &:focus-within {\n ", ";\n &:hover {\n ", "\n }\n }\n &:hover {\n background: ", ";\n ", ";\n }\n"])), _ref2 => {
20
+ }} auto;
21
+ align-items: center;
22
+ `;
23
+ const StyledCheckBox = dsSystem.styled('span')`
24
+ width: ${_ref2 => {
25
25
  let {
26
26
  theme
27
27
  } = _ref2;
28
28
  return theme.space.xs;
29
- }, _ref3 => {
29
+ }};
30
+ height: ${_ref3 => {
30
31
  let {
31
32
  theme
32
33
  } = _ref3;
33
34
  return theme.space.xs;
34
- }, _ref4 => {
35
+ }};
36
+ border: 1px solid ${_ref4 => {
35
37
  let {
36
38
  theme,
37
39
  hasError
38
40
  } = _ref4;
39
41
  return hasError ? theme.colors.danger[900] : theme.colors.neutral[400];
40
- }, _ref5 => {
42
+ }};
43
+ border-radius: 2px;
44
+ position: relative;
45
+ background: ${_ref5 => {
41
46
  let {
42
47
  theme,
43
48
  disabled
44
49
  } = _ref5;
45
50
  return styleHelpers.handleBackgroundColor(theme, disabled);
46
- }, _ref6 => {
51
+ }};
52
+ ${_ref6 => {
47
53
  let {
48
54
  theme,
49
55
  checked,
@@ -52,14 +58,18 @@ const StyledCheckBox = dsSystem.styled('span')(_templateObject2 || (_templateObj
52
58
  hasError
53
59
  } = _ref6;
54
60
  return styleHelpers.handleCheckmark(theme, checked, disabled, readOnly, hasError);
55
- }, _ref7 => {
61
+ }}
62
+ &:focus-within {
63
+ ${_ref7 => {
56
64
  let {
57
65
  theme,
58
66
  hasError,
59
67
  disabled
60
68
  } = _ref7;
61
- return !disabled && !hasError ? "border: 1px solid ".concat(theme.colors.brand[700], "; outline : 1px solid ").concat(theme.colors.brand[700], " ") : undefined;
62
- }, _ref8 => {
69
+ return !disabled && !hasError ? `border: 1px solid ${theme.colors.brand[700]}; outline : 1px solid ${theme.colors.brand[700]} ` : undefined;
70
+ }};
71
+ &:hover {
72
+ ${_ref8 => {
63
73
  let {
64
74
  theme,
65
75
  checked,
@@ -68,41 +78,71 @@ const StyledCheckBox = dsSystem.styled('span')(_templateObject2 || (_templateObj
68
78
  hasError
69
79
  } = _ref8;
70
80
  return styleHelpers.handleCheckmark(theme, checked, disabled, readOnly, hasError, true);
71
- }, _ref9 => {
81
+ }}
82
+ }
83
+ }
84
+ &:hover {
85
+ background: ${_ref9 => {
72
86
  let {
73
87
  theme,
74
88
  checked,
75
89
  disabled
76
90
  } = _ref9;
77
91
  return !disabled && (checked === 'mixed' || checked) ? theme.colors.brand[200] : undefined;
78
- }, _ref10 => {
92
+ }};
93
+ ${_ref10 => {
79
94
  let {
80
95
  theme,
81
96
  hasError,
82
97
  disabled,
83
98
  readOnly
84
99
  } = _ref10;
85
- return !hasError && !disabled && !readOnly ? " border: 1px solid ".concat(theme.colors.brand[600]) : undefined;
86
- });
87
- const checkboxStyles = dsSystem.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral__default["default"](["\n &:hover {\n cursor: pointer;\n }\n &:disabled {\n cursor: not-allowed;\n }\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n"])));
100
+ return !hasError && !disabled && !readOnly ? ` border: 1px solid ${theme.colors.brand[600]}` : undefined;
101
+ }};
102
+ }
103
+ `;
104
+ const checkboxStyles = dsSystem.css`
105
+ &:hover {
106
+ cursor: pointer;
107
+ }
108
+ &:disabled {
109
+ cursor: not-allowed;
110
+ }
111
+ width: 100%;
112
+ height: 100%;
113
+ position: absolute;
114
+ top: 0;
115
+ left: 0;
116
+ opacity: 0;
117
+ `;
88
118
  const StyledInput = dsSystem.styled('input', {
89
119
  name: theming.DSCheckboxName,
90
120
  slot: theming.DSCheckboxSlots.INPUT
91
- })(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral__default["default"](["\n ", "\n"])), checkboxStyles);
121
+ })`
122
+ ${checkboxStyles}
123
+ `;
92
124
  const StyledInputMixed = dsSystem.styled('div', {
93
125
  name: theming.DSCheckboxName,
94
126
  slot: theming.DSCheckboxSlots.INPUT
95
- })(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral__default["default"](["\n ", "\n"])), checkboxStyles);
127
+ })`
128
+ ${checkboxStyles}
129
+ `;
96
130
  const StyledLabel = dsSystem.styled('label', {
97
131
  name: theming.DSCheckboxName,
98
132
  slot: theming.DSCheckboxSlots.LABEL
99
- })(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral__default["default"](["\n &:hover {\n cursor: pointer;\n }\n ", ";\n\n color: ", ";\n font-size: 13px;\n line-height: 13px;\n display: inherit;\n"])), _ref11 => {
133
+ })`
134
+ &:hover {
135
+ cursor: pointer;
136
+ }
137
+ ${_ref11 => {
100
138
  let {
101
139
  wrapLabel,
102
140
  theme
103
141
  } = _ref11;
104
- return wrapLabel ? 'padding: 8px 0px 8px 8px;' : "padding-left: ".concat(theme.space.xxs);
105
- }, _ref12 => {
142
+ return wrapLabel ? 'padding: 8px 0px 8px 8px;' : `padding-left: ${theme.space.xxs}`;
143
+ }};
144
+
145
+ color: ${_ref12 => {
106
146
  let {
107
147
  theme,
108
148
  disabled,
@@ -110,8 +150,12 @@ const StyledLabel = dsSystem.styled('label', {
110
150
  checked
111
151
  } = _ref12;
112
152
  return disabled && checked !== true || readOnly ? theme.colors.neutral[500] : theme.colors.neutral[800];
113
- });
114
- const StyledWrapLabel = dsSystem.styled('span')(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral__default["default"]([""])));
153
+ }};
154
+ font-size: 13px;
155
+ line-height: 13px;
156
+ display: inherit;
157
+ `;
158
+ const StyledWrapLabel = dsSystem.styled('span')``;
115
159
 
116
160
  exports.StyledCheckBox = StyledCheckBox;
117
161
  exports.StyledContainer = StyledContainer;
@@ -26,11 +26,29 @@ const handleCheckmark = function (theme, checked, disabled, readOnly, hasError)
26
26
  let isHovering = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
27
27
 
28
28
  if (checked === 'mixed') {
29
- return "&:before {\n position: absolute;\n content: '';\n top: 6px;\n left: 3px;\n background: ".concat(handleCheckMarkColor(theme, checked, isHovering, disabled, readOnly, hasError), ";\n width: ").concat(theme.space.xxs, ";\n height: 2px;\n }");
29
+ return `&:before {
30
+ position: absolute;
31
+ content: '';
32
+ top: 6px;
33
+ left: 3px;
34
+ background: ${handleCheckMarkColor(theme, checked, isHovering, disabled, readOnly, hasError)};
35
+ width: ${theme.space.xxs};
36
+ height: 2px;
37
+ }`;
30
38
  }
31
39
 
32
40
  if (checked) {
33
- return "&:before {\n position: absolute;\n content: '';\n top: 3px;\n left: 2px;\n border-left: 2px solid ".concat(handleCheckMarkColor(theme, checked, isHovering, disabled, readOnly, hasError), ";\n border-bottom: 2px solid ").concat(handleCheckMarkColor(theme, checked, isHovering, disabled, readOnly, hasError), ";\n height: 5px;\n width: 10px;\n transform: rotate(-45deg);\n }");
41
+ return `&:before {
42
+ position: absolute;
43
+ content: '';
44
+ top: 3px;
45
+ left: 2px;
46
+ border-left: 2px solid ${handleCheckMarkColor(theme, checked, isHovering, disabled, readOnly, hasError)};
47
+ border-bottom: 2px solid ${handleCheckMarkColor(theme, checked, isHovering, disabled, readOnly, hasError)};
48
+ height: 5px;
49
+ width: 10px;
50
+ transform: rotate(-45deg);
51
+ }`;
34
52
  }
35
53
 
36
54
  return '';
@@ -2,13 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- require('core-js/modules/web.dom-collections.iterator.js');
7
5
  require('core-js/modules/esnext.async-iterator.filter.js');
8
6
  require('core-js/modules/esnext.iterator.constructor.js');
9
7
  require('core-js/modules/esnext.iterator.filter.js');
10
8
  require('core-js/modules/esnext.async-iterator.for-each.js');
11
9
  require('core-js/modules/esnext.iterator.for-each.js');
10
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
12
11
  var React = require('react');
13
12
  var reactVirtual = require('react-virtual');
14
13
  var dsPropsHelpers = require('@elliemae/ds-props-helpers');
@@ -2,7 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('core-js/modules/web.dom-collections.iterator.js');
6
5
  var React = require('react');
7
6
  var uid = require('uid');
8
7
  var constants = require('../constants.js');
@@ -28,7 +27,7 @@ const useCorrectOptions = (propsWithDefaults, inputValue, showSelectedOptions) =
28
27
  if (onCreate && inputValue && filteredOptions.findIndex(option => option.type === constants.MENU_OPTION_TYPES.OPTION && option.label === inputValue) === -1) {
29
28
  const creatableUuid = uid.uid();
30
29
  const creatableItem = {
31
- dsId: "creatable-".concat(creatableUuid),
30
+ dsId: `creatable-${creatableUuid}`,
32
31
  label: inputValue,
33
32
  type: 'creatable'
34
33
  };
@@ -27,7 +27,7 @@ const A11yFocusedOption = () => {
27
27
  } = React.useContext(ComboBoxCTX.ComboBoxContext);
28
28
  const selectabledOptions = listHelper.getSelectableOptions(filteredOptions);
29
29
  const focusOption = filteredOptions.find(option => option.dsId === focusOptionIdx);
30
- const isFocusOptionSelected = (focusOption === null || focusOption === void 0 ? void 0 : focusOption.type) === 'option' && listHelper.isSelected(selectedValues, focusOption);
30
+ const isFocusOptionSelected = focusOption?.type === 'option' && listHelper.isSelected(selectedValues, focusOption);
31
31
  const focusSelectableOptionIdx = selectabledOptions.findIndex(option => option.dsId === focusOptionIdx);
32
32
  const navigationContext = 'Use up and down to choose options,press enter to choose focused option, press Escape to excuse dropdown menu';
33
33
  return React.useMemo(() => {
@@ -35,12 +35,12 @@ const A11yFocusedOption = () => {
35
35
  "aria-live": "polite",
36
36
  "aria-atomic": "false",
37
37
  "aria-relevant": "additions text"
38
- }, menuState, "option ".concat(focusOption === null || focusOption === void 0 ? void 0 : focusOption.label, " ").concat(isFocusOptionSelected ? 'selected and ' : '', "focused .").concat(focusSelectableOptionIdx + 1, " of ").concat(selectabledOptions.length, ". ").concat(navigationContext, " "));
39
- if ((focusOption === null || focusOption === void 0 ? void 0 : focusOption.type) === 'creatable') return /*#__PURE__*/_jsx__default["default"](styled.StyledA11ySelectedValues, {
38
+ }, menuState, `option ${focusOption?.label} ${isFocusOptionSelected ? 'selected and ' : ''}focused .${focusSelectableOptionIdx + 1} of ${selectabledOptions.length}. ${navigationContext} `);
39
+ if (focusOption?.type === 'creatable') return /*#__PURE__*/_jsx__default["default"](styled.StyledA11ySelectedValues, {
40
40
  "aria-live": "assertive",
41
41
  "aria-atomic": "false",
42
42
  "aria-relevant": "additions text"
43
- }, menuState, "Press enter to Add: ".concat(focusOption === null || focusOption === void 0 ? void 0 : focusOption.label, ". ").concat(navigationContext));
43
+ }, menuState, `Press enter to Add: ${focusOption?.label}. ${navigationContext}`);
44
44
  return null;
45
45
  }, [focusOption, menuState, isFocusOptionSelected, focusSelectableOptionIdx, selectabledOptions.length]);
46
46
  };
@@ -25,10 +25,10 @@ const A11ySelectedValues = () => {
25
25
 
26
26
  if (Array.isArray(selectedValues)) {
27
27
  if (selectedValues.length > 0) {
28
- msg = "Options selected: ".concat(selectedValues.map(item => item.label).join(', '));
28
+ msg = `Options selected: ${selectedValues.map(item => item.label).join(', ')}`;
29
29
  }
30
30
  } else if (selectedValues) {
31
- msg = "Option selected: ".concat(selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.label);
31
+ msg = `Option selected: ${selectedValues?.label}`;
32
32
  }
33
33
 
34
34
  return /*#__PURE__*/_jsx__default["default"](styled.StyledA11ySelectedValues, {
@@ -3,7 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _jsx = require('@babel/runtime/helpers/jsx');
6
- var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
7
6
  var React = require('react');
8
7
  var dsSystem = require('@elliemae/ds-system');
9
8
  var DSButton = require('@elliemae/ds-button');
@@ -14,16 +13,25 @@ var ComboboxDataTestids = require('../ComboboxDataTestids.js');
14
13
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
14
 
16
15
  var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
17
- var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
18
16
 
19
- var _templateObject;
20
- const StyledDropDownButton = dsSystem.styled(DSButton.DSButtonV2)(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n &:focus::after {\n border: none;\n }\n &:hover:not(:disabled) {\n background-color: transparent;\n }\n\n & svg {\n fill: ", ";\n }\n"])), _ref => {
17
+ const StyledDropDownButton = dsSystem.styled(DSButton.DSButtonV2)`
18
+ &:focus::after {
19
+ border: none;
20
+ }
21
+ &:hover:not(:disabled) {
22
+ background-color: transparent;
23
+ }
24
+
25
+ & svg {
26
+ fill: ${_ref => {
21
27
  let {
22
28
  theme,
23
29
  disabled
24
30
  } = _ref;
25
31
  return disabled ? theme.colors.neutral['400'] : theme.colors.brand['700'];
26
- });
32
+ }};
33
+ }
34
+ `;
27
35
  const DropdownIndicator = () => {
28
36
  const {
29
37
  props: {
@@ -61,7 +61,7 @@ const Container = () => {
61
61
  }, []);
62
62
  const handleCloseMenu = React.useCallback(() => {
63
63
  setMenuState(false, 'blur');
64
- if (innerRef !== null && innerRef !== void 0 && innerRef.current) innerRef.current.blur();
64
+ if (innerRef?.current) innerRef.current.blur();
65
65
  }, [innerRef, setMenuState]);
66
66
  React.useEffect(() => {
67
67
  const closeMenuOnWindowBlur = () => {
@@ -2,30 +2,31 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
6
5
  var dsSystem = require('@elliemae/ds-system');
7
6
  var theming = require('../../theming.js');
8
7
 
9
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
-
11
- var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
12
-
13
- var _templateObject, _templateObject2;
14
8
  const StyledContainer = dsSystem.styled('div', {
15
9
  name: theming.DSComboBoxName,
16
10
  slot: theming.DSComboboxSlots.CONTAINER
17
- })(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n position: relative;\n cursor: ", ";\n"])), _ref => {
11
+ })`
12
+ position: relative;
13
+ cursor: ${_ref => {
18
14
  let {
19
15
  disabled
20
16
  } = _ref;
21
17
  return disabled ? 'not-allowed' : 'default';
22
- });
23
- const StyledPopperWrapper = dsSystem.styled('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default["default"](["\n position: relative;\n cursor: ", ";\n overflow: auto;\n"])), _ref2 => {
18
+ }};
19
+ `;
20
+ const StyledPopperWrapper = dsSystem.styled('div')`
21
+ position: relative;
22
+ cursor: ${_ref2 => {
24
23
  let {
25
24
  disabled
26
25
  } = _ref2;
27
26
  return disabled ? 'not-allowed' : 'default';
28
- });
27
+ }};
28
+ overflow: auto;
29
+ `;
29
30
 
30
31
  exports.StyledContainer = StyledContainer;
31
32
  exports.StyledPopperWrapper = StyledPopperWrapper;
@@ -42,20 +42,16 @@ const Controls = () => {
42
42
  controlsWrapperRef
43
43
  } = React.useContext(ComboBoxCTX.ComboBoxContext);
44
44
  const handleOnClick = React.useCallback(() => {
45
- var _innerRef$current2;
46
-
47
45
  if (disabled) return;
48
46
 
49
47
  if (hasFocus && menuState && !inline) {
50
- var _innerRef$current;
51
-
52
48
  setMenuState(false);
53
49
  setFocusOptionIdx('');
54
- (_innerRef$current = innerRef.current) === null || _innerRef$current === void 0 ? void 0 : _innerRef$current.blur();
50
+ innerRef.current?.blur();
55
51
  return;
56
52
  }
57
53
 
58
- (_innerRef$current2 = innerRef.current) === null || _innerRef$current2 === void 0 ? void 0 : _innerRef$current2.focus();
54
+ innerRef.current?.focus();
59
55
  setMenuState(true);
60
56
  window.requestAnimationFrame(() => {
61
57
  window.requestAnimationFrame(() => {
@@ -68,9 +64,7 @@ const Controls = () => {
68
64
  if (menuState || disabled) {
69
65
  e.stopPropagation();
70
66
  } else {
71
- var _innerRef$current3;
72
-
73
- (_innerRef$current3 = innerRef.current) === null || _innerRef$current3 === void 0 ? void 0 : _innerRef$current3.focus();
67
+ innerRef.current?.focus();
74
68
  setMenuState(true);
75
69
  }
76
70
  }, [menuState, innerRef, disabled, setMenuState]); // callback to prevent onBlur on the input when clicking in all the wrapper