@elliemae/ds-form 2.0.0-rc.9 → 2.1.0-rc.0

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 (207) hide show
  1. package/cjs/Checkbox/DSCheckbox.js +4 -4
  2. package/cjs/CheckboxGroup/DSCheckboxGroup.js +2 -2
  3. package/cjs/ComboBox/v1/DSComboBox.js +20 -24
  4. package/cjs/ComboBox/v1/components/AllOption.js +2 -2
  5. package/cjs/ComboBox/v1/components/Control.js +2 -2
  6. package/cjs/ComboBox/v1/components/CustomOption.js +2 -2
  7. package/cjs/ComboBox/v1/components/CustomOptionMulti.js +2 -2
  8. package/cjs/ComboBox/v1/components/DropdownIndicator.js +2 -2
  9. package/cjs/ComboBox/v1/components/MenuList.js +2 -2
  10. package/cjs/ComboBox/v1/components/MultiValueRemove.js +2 -2
  11. package/cjs/ComboBox/v1/components/SelectMenu.js +2 -2
  12. package/cjs/ComboBox/v1/components/ValueContainer.js +2 -2
  13. package/cjs/ComboBox/v1/withSelectStringValueConverter.js +5 -6
  14. package/cjs/ComboBox/v2/Combobox.js +2 -2
  15. package/cjs/ComboBox/v2/components/AllOption.js +2 -2
  16. package/cjs/ComboBox/v2/components/ClearIndicator.js +2 -2
  17. package/cjs/ComboBox/v2/components/Content.js +2 -2
  18. package/cjs/ComboBox/v2/components/Control.js +2 -2
  19. package/cjs/ComboBox/v2/components/CustomOption.js +2 -2
  20. package/cjs/ComboBox/v2/components/CustomOptionMulti.js +2 -2
  21. package/cjs/ComboBox/v2/components/DropdownIndicator.js +2 -2
  22. package/cjs/ComboBox/v2/components/GroupHeading.js +2 -2
  23. package/cjs/ComboBox/v2/components/IndicatorSeparator.js +2 -2
  24. package/cjs/ComboBox/v2/components/MenuList.js +2 -2
  25. package/cjs/ComboBox/v2/components/MultiValueRemove.js +2 -2
  26. package/cjs/ComboBox/v2/components/SelectMenu.js +2 -2
  27. package/cjs/ComboBox/v2/components/ValueContainer.js +2 -2
  28. package/cjs/ComboBox/v3/ComboBoxCTX.js +16 -17
  29. package/cjs/ComboBox/v3/config/useComboBox.js +8 -8
  30. package/cjs/ComboBox/v3/parts/container/Container.js +1 -1
  31. package/cjs/ComboBox/v3/parts/controls-input/ControlsInput.js +5 -3
  32. package/cjs/ComboBox/v3/parts/controls-input/useControlsInput.js +8 -8
  33. package/cjs/ComboBox/v3/parts/header-list/HeaderList.js +5 -3
  34. package/cjs/ComboBox/v3/parts/menu-list/MenuList.js +7 -8
  35. package/cjs/ComboBox/v3/parts/menu-list/styled.js +8 -4
  36. package/cjs/ComboBox/v3/parts/menu-list/useItemRenderer.js +12 -11
  37. package/cjs/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +5 -5
  38. package/cjs/ComboBox/v3/utils/hooks/useOnElementResize.js +4 -4
  39. package/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +2 -2
  40. package/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js +2 -2
  41. package/cjs/ComboBoxFreeSolo/components/SingleValue.js +2 -2
  42. package/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js +2 -2
  43. package/cjs/DateInput/DSDateInput.js +2 -2
  44. package/cjs/DateInput/components/DateInputImpl.js +2 -2
  45. package/cjs/DateInput/components/DateInputs.js +2 -2
  46. package/cjs/DateInputV2/components/DateInputs.js +2 -2
  47. package/cjs/ExpandableInput/ExpandableInputImpl.js +2 -2
  48. package/cjs/FloatingLabelInput/FloatingLabelInputImpl.js +6 -9
  49. package/cjs/FormItem/DSFormItemLayout.js +2 -2
  50. package/cjs/FormItem/ValidationFieldWrapper.js +4 -5
  51. package/cjs/Input/DSInput.js +2 -2
  52. package/cjs/Input/InputAddonWrapper.js +4 -5
  53. package/cjs/Input/InputImpl.js +18 -20
  54. package/cjs/InputGroup/AddonWrapper.js +6 -8
  55. package/cjs/InputMask/DSInputMask.js +2 -2
  56. package/cjs/InputMask/DSInputMaskDeprecated.js +12 -14
  57. package/cjs/InputMask/MaskTypes.js +2 -2
  58. package/cjs/InputMask/mask_types/DateInputMask.js +2 -2
  59. package/cjs/InputMask/mask_types/DateTimeInputMask.js +2 -2
  60. package/cjs/InputMask/mask_types/DictionaryInputMask.js +2 -2
  61. package/cjs/InputMask/mask_types/NumberInputMask.js +2 -2
  62. package/cjs/InputMask/mask_types/PhoneInputMask.js +2 -2
  63. package/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +2 -2
  64. package/cjs/InputMask/mask_types/SsnInputMask.js +2 -2
  65. package/cjs/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
  66. package/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
  67. package/cjs/InputMask/mask_types/index.js +2 -2
  68. package/cjs/InputProtected/DSInputProtected.js +2 -2
  69. package/cjs/LargeInputText/DSLargeInputText.js +2 -2
  70. package/cjs/MenuItem/components/SubmenuItem/index.js +2 -2
  71. package/cjs/Radio/DSRadio.js +11 -6
  72. package/cjs/RadioGroup/DSRadioGroup.js +2 -2
  73. package/cjs/SearchBox/NavSearchBox.js +5 -1
  74. package/cjs/SearchBox/SearchBoxToggle.js +2 -2
  75. package/cjs/SearchBox/withSearchable.js +5 -7
  76. package/cjs/TextBox/DSTextBox.js +2 -2
  77. package/cjs/TimeInput/DSTimeInput.js +2 -2
  78. package/cjs/TimeInput/TimeInputImpl.js +2 -2
  79. package/cjs/TimeInput/TimeInputs.js +2 -2
  80. package/cjs/Toggle/DSToggle.js +2 -2
  81. package/cjs/Toggle/DSToggleImpl.js +30 -30
  82. package/cjs/Toggle/DSToggleRender.js +2 -2
  83. package/esm/Checkbox/DSCheckbox.js +4 -4
  84. package/esm/CheckboxGroup/DSCheckboxGroup.js +2 -2
  85. package/esm/ComboBox/v1/DSComboBox.js +19 -23
  86. package/esm/ComboBox/v1/components/AllOption.js +2 -2
  87. package/esm/ComboBox/v1/components/Control.js +2 -2
  88. package/esm/ComboBox/v1/components/CustomOption.js +2 -2
  89. package/esm/ComboBox/v1/components/CustomOptionMulti.js +2 -2
  90. package/esm/ComboBox/v1/components/DropdownIndicator.js +2 -2
  91. package/esm/ComboBox/v1/components/MenuList.js +2 -2
  92. package/esm/ComboBox/v1/components/MultiValueRemove.js +2 -2
  93. package/esm/ComboBox/v1/components/SelectMenu.js +2 -2
  94. package/esm/ComboBox/v1/components/ValueContainer.js +2 -2
  95. package/esm/ComboBox/v1/withSelectStringValueConverter.js +5 -6
  96. package/esm/ComboBox/v2/Combobox.js +2 -2
  97. package/esm/ComboBox/v2/components/AllOption.js +2 -2
  98. package/esm/ComboBox/v2/components/ClearIndicator.js +2 -2
  99. package/esm/ComboBox/v2/components/Content.js +2 -2
  100. package/esm/ComboBox/v2/components/Control.js +2 -2
  101. package/esm/ComboBox/v2/components/CustomOption.js +2 -2
  102. package/esm/ComboBox/v2/components/CustomOptionMulti.js +2 -2
  103. package/esm/ComboBox/v2/components/DropdownIndicator.js +2 -2
  104. package/esm/ComboBox/v2/components/GroupHeading.js +2 -2
  105. package/esm/ComboBox/v2/components/IndicatorSeparator.js +2 -2
  106. package/esm/ComboBox/v2/components/MenuList.js +2 -2
  107. package/esm/ComboBox/v2/components/MultiValueRemove.js +2 -2
  108. package/esm/ComboBox/v2/components/SelectMenu.js +2 -2
  109. package/esm/ComboBox/v2/components/ValueContainer.js +2 -2
  110. package/esm/ComboBox/v3/ComboBoxCTX.js +5 -6
  111. package/esm/ComboBox/v3/config/useComboBox.js +8 -8
  112. package/esm/ComboBox/v3/parts/container/Container.js +1 -1
  113. package/esm/ComboBox/v3/parts/controls-input/ControlsInput.js +5 -3
  114. package/esm/ComboBox/v3/parts/controls-input/useControlsInput.js +8 -8
  115. package/esm/ComboBox/v3/parts/header-list/HeaderList.js +5 -3
  116. package/esm/ComboBox/v3/parts/menu-list/MenuList.js +8 -9
  117. package/esm/ComboBox/v3/parts/menu-list/styled.js +8 -4
  118. package/esm/ComboBox/v3/parts/menu-list/useItemRenderer.js +12 -11
  119. package/esm/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +5 -5
  120. package/esm/ComboBox/v3/utils/hooks/useOnElementResize.js +4 -4
  121. package/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +2 -2
  122. package/esm/ComboBoxFreeSolo/components/MultiValueRemove.js +2 -2
  123. package/esm/ComboBoxFreeSolo/components/SingleValue.js +2 -2
  124. package/esm/ComboBoxFreeSolo/components/SingleValueRemove.js +2 -2
  125. package/esm/DateInput/DSDateInput.js +2 -2
  126. package/esm/DateInput/components/DateInputImpl.js +2 -2
  127. package/esm/DateInput/components/DateInputs.js +2 -2
  128. package/esm/DateInputV2/components/DateInputs.js +2 -2
  129. package/esm/ExpandableInput/ExpandableInputImpl.js +2 -2
  130. package/esm/FloatingLabelInput/FloatingLabelInputImpl.js +6 -9
  131. package/esm/FormItem/DSFormItemLayout.js +2 -2
  132. package/esm/FormItem/ValidationFieldWrapper.js +4 -5
  133. package/esm/Input/DSInput.js +2 -2
  134. package/esm/Input/InputAddonWrapper.js +4 -5
  135. package/esm/Input/InputImpl.js +17 -19
  136. package/esm/InputGroup/AddonWrapper.js +7 -9
  137. package/esm/InputMask/DSInputMask.js +2 -2
  138. package/esm/InputMask/DSInputMaskDeprecated.js +12 -14
  139. package/esm/InputMask/MaskTypes.js +2 -2
  140. package/esm/InputMask/mask_types/DateInputMask.js +2 -2
  141. package/esm/InputMask/mask_types/DateTimeInputMask.js +2 -2
  142. package/esm/InputMask/mask_types/DictionaryInputMask.js +2 -2
  143. package/esm/InputMask/mask_types/NumberInputMask.js +2 -2
  144. package/esm/InputMask/mask_types/PhoneInputMask.js +2 -2
  145. package/esm/InputMask/mask_types/PhoneInternationalInputMask.js +2 -2
  146. package/esm/InputMask/mask_types/SsnInputMask.js +2 -2
  147. package/esm/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
  148. package/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
  149. package/esm/InputMask/mask_types/index.js +2 -2
  150. package/esm/InputProtected/DSInputProtected.js +2 -2
  151. package/esm/LargeInputText/DSLargeInputText.js +2 -2
  152. package/esm/MenuItem/components/SubmenuItem/index.js +2 -2
  153. package/esm/Radio/DSRadio.js +11 -6
  154. package/esm/RadioGroup/DSRadioGroup.js +2 -2
  155. package/esm/SearchBox/NavSearchBox.js +5 -1
  156. package/esm/SearchBox/SearchBoxToggle.js +2 -2
  157. package/esm/SearchBox/withSearchable.js +4 -6
  158. package/esm/TextBox/DSTextBox.js +2 -2
  159. package/esm/TimeInput/DSTimeInput.js +2 -2
  160. package/esm/TimeInput/TimeInputImpl.js +2 -2
  161. package/esm/TimeInput/TimeInputs.js +2 -2
  162. package/esm/Toggle/DSToggle.js +2 -2
  163. package/esm/Toggle/DSToggleImpl.js +30 -30
  164. package/esm/Toggle/DSToggleRender.js +2 -2
  165. package/package.json +24 -28
  166. package/types/Checkbox/DSCheckbox.d.ts +36 -47
  167. package/types/Checkbox/props.d.ts +14 -14
  168. package/types/CheckboxGroup/DSCheckboxGroup.d.ts +12 -12
  169. package/types/CheckboxGroup/props.d.ts +12 -12
  170. package/types/ComboBox/v3/ComboBox.d.ts +2 -2
  171. package/types/ComboBox/v3/parts/controls-input/useControlsInput.d.ts +3 -3
  172. package/types/ComboBox/v3/parts/menu-list/styled.d.ts +4 -3
  173. package/types/ComboBox/v3/parts/menu-list/useItemRenderer.d.ts +1 -1
  174. package/types/ComboBox/v3/propTypes.d.ts +2 -2
  175. package/types/ComboBox/v3/utils/hooks/useKeyboardNavigation.d.ts +4 -1
  176. package/types/ComboBox/v3/utils/listHelper.d.ts +1 -1
  177. package/types/DateInput/DSDateInput.d.ts +32 -32
  178. package/types/DateInput/props.d.ts +64 -32
  179. package/types/DateInputV2/components/DSDateInput.d.ts +20 -20
  180. package/types/DateInputV2/components/props.d.ts +20 -20
  181. package/types/FloatingLabelInput/DSFloatingLabelInput.d.ts +38 -38
  182. package/types/FormItem/DSFormItemLayout.d.ts +112 -112
  183. package/types/FormItem/Error/DSError.d.ts +4 -4
  184. package/types/FormItem/defaultProps.d.ts +38 -38
  185. package/types/FormItem/props.d.ts +74 -74
  186. package/types/InputGroup/DSInputGroup.d.ts +14 -14
  187. package/types/InputGroup/props.d.ts +14 -14
  188. package/types/InputMask/DSInputMask.d.ts +54 -54
  189. package/types/InputMask/props.d.ts +54 -54
  190. package/types/InputProtected/DSInputProtected.d.ts +12 -12
  191. package/types/InputProtected/props.d.ts +12 -12
  192. package/types/LargeInputText/DSLargeInputText.d.ts +54 -54
  193. package/types/LargeInputText/props.d.ts +54 -54
  194. package/types/Radio/DSRadio.d.ts +56 -46
  195. package/types/RadioGroup/DSRadioGroup.d.ts +12 -12
  196. package/types/RadioGroup/props.d.ts +12 -12
  197. package/types/SearchBox/DSSearchBox.d.ts +40 -40
  198. package/types/SearchBox/NavSearchBox.d.ts +24 -7
  199. package/types/SearchBox/SButton.d.ts +4 -4
  200. package/types/SearchBox/index.d.ts +1 -1
  201. package/types/SearchBox/props.d.ts +44 -44
  202. package/types/TextBox/DSTextBox.d.ts +38 -38
  203. package/types/TimeInput/DSTimeInput.d.ts +22 -22
  204. package/types/Toggle/DSToggle.d.ts +22 -22
  205. package/cjs/ComboBox/v3/utils/hooks/useOnWindowResize.js +0 -31
  206. package/esm/ComboBox/v3/utils/hooks/useOnWindowResize.js +0 -27
  207. package/types/ComboBox/v3/utils/hooks/useOnWindowResize.d.ts +0 -5
@@ -1,31 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- require('core-js/modules/web.dom-collections.iterator.js');
6
- var React = require('react');
7
-
8
- // Taken and modified from https://stackoverflow.com/a/60218754
9
-
10
- const useDimensions = targetRef => {
11
- const queryDimension = React.useCallback(dimension => targetRef.current ? targetRef.current[dimension] : 0, []);
12
- const [width, setWidth] = React.useState(targetRef.current ? targetRef.current.offsetWidth : 0);
13
- const [height, setHeight] = React.useState(targetRef.current ? targetRef.current.offsetWidth : 0);
14
- const handleResize = React.useCallback(() => {
15
- setWidth(queryDimension('offsetWidth'));
16
- setHeight(queryDimension('offsetHeight'));
17
- }, []);
18
- React.useEffect(() => {
19
- window.addEventListener('resize', handleResize);
20
- return () => window.removeEventListener('resize', handleResize);
21
- }, []);
22
- React.useLayoutEffect(() => {
23
- handleResize();
24
- }, []);
25
- return React.useMemo(() => ({
26
- width,
27
- height
28
- }), [width, height]);
29
- };
30
-
31
- exports.useDimensions = useDimensions;
@@ -1,27 +0,0 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
- import { useCallback, useState, useEffect, useLayoutEffect, useMemo } from 'react';
3
-
4
- // Taken and modified from https://stackoverflow.com/a/60218754
5
-
6
- const useDimensions = targetRef => {
7
- const queryDimension = useCallback(dimension => targetRef.current ? targetRef.current[dimension] : 0, []);
8
- const [width, setWidth] = useState(targetRef.current ? targetRef.current.offsetWidth : 0);
9
- const [height, setHeight] = useState(targetRef.current ? targetRef.current.offsetWidth : 0);
10
- const handleResize = useCallback(() => {
11
- setWidth(queryDimension('offsetWidth'));
12
- setHeight(queryDimension('offsetHeight'));
13
- }, []);
14
- useEffect(() => {
15
- window.addEventListener('resize', handleResize);
16
- return () => window.removeEventListener('resize', handleResize);
17
- }, []);
18
- useLayoutEffect(() => {
19
- handleResize();
20
- }, []);
21
- return useMemo(() => ({
22
- width,
23
- height
24
- }), [width, height]);
25
- };
26
-
27
- export { useDimensions };
@@ -1,5 +0,0 @@
1
- declare const useDimensions: (targetRef: any) => {
2
- width: any;
3
- height: any;
4
- };
5
- export { useDimensions };