@elliemae/ds-form 2.0.1 → 2.1.0-rc.10

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 (330) hide show
  1. package/cjs/Checkbox/DSCheckbox.js +4 -4
  2. package/cjs/CheckboxGroup/DSCheckboxGroup.js +2 -2
  3. package/cjs/ComboBox/index.js +0 -3
  4. package/cjs/ComboBox/v1/DSComboBox.js +2 -2
  5. package/cjs/ComboBox/v1/components/AllOption.js +2 -2
  6. package/cjs/ComboBox/v1/components/Control.js +2 -2
  7. package/cjs/ComboBox/v1/components/CustomOption.js +2 -2
  8. package/cjs/ComboBox/v1/components/CustomOptionMulti.js +2 -2
  9. package/cjs/ComboBox/v1/components/DropdownIndicator.js +2 -2
  10. package/cjs/ComboBox/v1/components/MenuList.js +2 -2
  11. package/cjs/ComboBox/v1/components/MultiValueRemove.js +2 -2
  12. package/cjs/ComboBox/v1/components/SelectMenu.js +2 -2
  13. package/cjs/ComboBox/v1/components/ValueContainer.js +2 -2
  14. package/cjs/ComboBox/v1/withSelectStringValueConverter.js +2 -2
  15. package/cjs/ComboBox/v2/Combobox.js +2 -2
  16. package/cjs/ComboBox/v2/components/AllOption.js +2 -2
  17. package/cjs/ComboBox/v2/components/ClearIndicator.js +2 -2
  18. package/cjs/ComboBox/v2/components/Content.js +2 -2
  19. package/cjs/ComboBox/v2/components/Control.js +2 -2
  20. package/cjs/ComboBox/v2/components/CustomOption.js +2 -2
  21. package/cjs/ComboBox/v2/components/CustomOptionMulti.js +2 -2
  22. package/cjs/ComboBox/v2/components/DropdownIndicator.js +2 -2
  23. package/cjs/ComboBox/v2/components/GroupHeading.js +2 -2
  24. package/cjs/ComboBox/v2/components/IndicatorSeparator.js +2 -2
  25. package/cjs/ComboBox/v2/components/MenuList.js +2 -2
  26. package/cjs/ComboBox/v2/components/MultiValueRemove.js +2 -2
  27. package/cjs/ComboBox/v2/components/SelectMenu.js +2 -2
  28. package/cjs/ComboBox/v2/components/ValueContainer.js +2 -2
  29. package/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +2 -3
  30. package/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js +2 -2
  31. package/cjs/ComboBoxFreeSolo/components/SingleValue.js +2 -2
  32. package/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js +2 -2
  33. package/cjs/DateInput/DSDateInput.js +2 -2
  34. package/cjs/DateInput/components/DateInputImpl.js +2 -2
  35. package/cjs/DateInput/components/DateInputs.js +2 -2
  36. package/cjs/DateInputV2/components/DateInputs.js +2 -2
  37. package/cjs/ExpandableInput/ExpandableInputImpl.js +2 -2
  38. package/cjs/FloatingLabelInput/FloatingLabelInputImpl.js +2 -2
  39. package/cjs/FormItem/DSFormItemLayout.js +2 -2
  40. package/cjs/FormItem/ValidationFieldWrapper.js +2 -2
  41. package/cjs/Input/DSInput.js +2 -2
  42. package/cjs/Input/InputAddonWrapper.js +2 -2
  43. package/cjs/Input/InputImpl.js +2 -2
  44. package/cjs/InputGroup/AddonWrapper.js +2 -2
  45. package/cjs/InputMask/DSInputMask.js +2 -2
  46. package/cjs/InputMask/DSInputMaskDeprecated.js +2 -2
  47. package/cjs/InputMask/MaskTypes.js +2 -2
  48. package/cjs/InputMask/mask_types/DateInputMask.js +2 -2
  49. package/cjs/InputMask/mask_types/DateTimeInputMask.js +2 -2
  50. package/cjs/InputMask/mask_types/DictionaryInputMask.js +2 -2
  51. package/cjs/InputMask/mask_types/NumberInputMask.js +2 -2
  52. package/cjs/InputMask/mask_types/PhoneInputMask.js +2 -2
  53. package/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +2 -2
  54. package/cjs/InputMask/mask_types/SsnInputMask.js +2 -2
  55. package/cjs/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
  56. package/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
  57. package/cjs/InputMask/mask_types/index.js +2 -2
  58. package/cjs/InputProtected/DSInputProtected.js +2 -2
  59. package/cjs/LargeInputText/DSLargeInputText.js +2 -2
  60. package/cjs/MenuItem/components/MultiMenuItem/MultiMenuItem.js +2 -1
  61. package/cjs/MenuItem/components/Section/styled.js +2 -2
  62. package/cjs/MenuItem/components/Separator/styled.js +2 -2
  63. package/cjs/MenuItem/components/SubmenuItem/index.js +3 -3
  64. package/cjs/MenuItem/components/styled.js +4 -9
  65. package/cjs/Radio/DSRadio.js +11 -6
  66. package/cjs/RadioGroup/DSRadioGroup.js +2 -2
  67. package/cjs/SearchBox/SearchBoxToggle.js +2 -2
  68. package/cjs/SearchBox/withSearchable.js +2 -2
  69. package/cjs/TextBox/DSTextBox.js +2 -2
  70. package/cjs/TimeInput/DSTimeInput.js +2 -2
  71. package/cjs/TimeInput/TimeInputImpl.js +2 -2
  72. package/cjs/TimeInput/TimeInputs.js +2 -2
  73. package/cjs/Toggle/DSToggle.js +2 -2
  74. package/cjs/Toggle/DSToggleImpl.js +2 -2
  75. package/cjs/Toggle/DSToggleRender.js +2 -2
  76. package/cjs/index.js +0 -2
  77. package/esm/Checkbox/DSCheckbox.js +4 -4
  78. package/esm/CheckboxGroup/DSCheckboxGroup.js +2 -2
  79. package/esm/ComboBox/index.js +0 -1
  80. package/esm/ComboBox/v1/DSComboBox.js +2 -2
  81. package/esm/ComboBox/v1/components/AllOption.js +2 -2
  82. package/esm/ComboBox/v1/components/Control.js +2 -2
  83. package/esm/ComboBox/v1/components/CustomOption.js +2 -2
  84. package/esm/ComboBox/v1/components/CustomOptionMulti.js +2 -2
  85. package/esm/ComboBox/v1/components/DropdownIndicator.js +2 -2
  86. package/esm/ComboBox/v1/components/MenuList.js +2 -2
  87. package/esm/ComboBox/v1/components/MultiValueRemove.js +2 -2
  88. package/esm/ComboBox/v1/components/SelectMenu.js +2 -2
  89. package/esm/ComboBox/v1/components/ValueContainer.js +2 -2
  90. package/esm/ComboBox/v1/withSelectStringValueConverter.js +2 -2
  91. package/esm/ComboBox/v2/Combobox.js +2 -2
  92. package/esm/ComboBox/v2/components/AllOption.js +2 -2
  93. package/esm/ComboBox/v2/components/ClearIndicator.js +2 -2
  94. package/esm/ComboBox/v2/components/Content.js +2 -2
  95. package/esm/ComboBox/v2/components/Control.js +2 -2
  96. package/esm/ComboBox/v2/components/CustomOption.js +2 -2
  97. package/esm/ComboBox/v2/components/CustomOptionMulti.js +2 -2
  98. package/esm/ComboBox/v2/components/DropdownIndicator.js +2 -2
  99. package/esm/ComboBox/v2/components/GroupHeading.js +2 -2
  100. package/esm/ComboBox/v2/components/IndicatorSeparator.js +2 -2
  101. package/esm/ComboBox/v2/components/MenuList.js +2 -2
  102. package/esm/ComboBox/v2/components/MultiValueRemove.js +2 -2
  103. package/esm/ComboBox/v2/components/SelectMenu.js +2 -2
  104. package/esm/ComboBox/v2/components/ValueContainer.js +2 -2
  105. package/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +2 -3
  106. package/esm/ComboBoxFreeSolo/components/MultiValueRemove.js +2 -2
  107. package/esm/ComboBoxFreeSolo/components/SingleValue.js +2 -2
  108. package/esm/ComboBoxFreeSolo/components/SingleValueRemove.js +2 -2
  109. package/esm/DateInput/DSDateInput.js +2 -2
  110. package/esm/DateInput/components/DateInputImpl.js +2 -2
  111. package/esm/DateInput/components/DateInputs.js +2 -2
  112. package/esm/DateInputV2/components/DateInputs.js +2 -2
  113. package/esm/ExpandableInput/ExpandableInputImpl.js +2 -2
  114. package/esm/FloatingLabelInput/FloatingLabelInputImpl.js +2 -2
  115. package/esm/FormItem/DSFormItemLayout.js +2 -2
  116. package/esm/FormItem/ValidationFieldWrapper.js +2 -2
  117. package/esm/Input/DSInput.js +2 -2
  118. package/esm/Input/InputAddonWrapper.js +2 -2
  119. package/esm/Input/InputImpl.js +2 -2
  120. package/esm/InputGroup/AddonWrapper.js +2 -2
  121. package/esm/InputMask/DSInputMask.js +2 -2
  122. package/esm/InputMask/DSInputMaskDeprecated.js +2 -2
  123. package/esm/InputMask/MaskTypes.js +2 -2
  124. package/esm/InputMask/mask_types/DateInputMask.js +2 -2
  125. package/esm/InputMask/mask_types/DateTimeInputMask.js +2 -2
  126. package/esm/InputMask/mask_types/DictionaryInputMask.js +2 -2
  127. package/esm/InputMask/mask_types/NumberInputMask.js +2 -2
  128. package/esm/InputMask/mask_types/PhoneInputMask.js +2 -2
  129. package/esm/InputMask/mask_types/PhoneInternationalInputMask.js +2 -2
  130. package/esm/InputMask/mask_types/SsnInputMask.js +2 -2
  131. package/esm/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
  132. package/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
  133. package/esm/InputMask/mask_types/index.js +2 -2
  134. package/esm/InputProtected/DSInputProtected.js +2 -2
  135. package/esm/LargeInputText/DSLargeInputText.js +2 -2
  136. package/esm/MenuItem/components/MultiMenuItem/MultiMenuItem.js +2 -1
  137. package/esm/MenuItem/components/Section/styled.js +2 -2
  138. package/esm/MenuItem/components/Separator/styled.js +2 -2
  139. package/esm/MenuItem/components/SubmenuItem/index.js +3 -3
  140. package/esm/MenuItem/components/styled.js +5 -9
  141. package/esm/Radio/DSRadio.js +11 -6
  142. package/esm/RadioGroup/DSRadioGroup.js +2 -2
  143. package/esm/SearchBox/SearchBoxToggle.js +2 -2
  144. package/esm/SearchBox/withSearchable.js +2 -2
  145. package/esm/TextBox/DSTextBox.js +2 -2
  146. package/esm/TimeInput/DSTimeInput.js +2 -2
  147. package/esm/TimeInput/TimeInputImpl.js +2 -2
  148. package/esm/TimeInput/TimeInputs.js +2 -2
  149. package/esm/Toggle/DSToggle.js +2 -2
  150. package/esm/Toggle/DSToggleImpl.js +2 -2
  151. package/esm/Toggle/DSToggleRender.js +2 -2
  152. package/esm/index.js +0 -1
  153. package/package.json +23 -207
  154. package/types/Checkbox/DSCheckbox.d.ts +36 -47
  155. package/types/Checkbox/props.d.ts +14 -14
  156. package/types/CheckboxGroup/DSCheckboxGroup.d.ts +12 -12
  157. package/types/CheckboxGroup/props.d.ts +12 -12
  158. package/types/ComboBox/index.d.ts +0 -1
  159. package/types/DateInput/DSDateInput.d.ts +32 -32
  160. package/types/DateInput/props.d.ts +64 -32
  161. package/types/DateInputV2/components/DSDateInput.d.ts +20 -20
  162. package/types/DateInputV2/components/props.d.ts +20 -20
  163. package/types/FloatingLabelInput/DSFloatingLabelInput.d.ts +38 -38
  164. package/types/FormItem/DSFormItemLayout.d.ts +112 -112
  165. package/types/FormItem/Error/DSError.d.ts +4 -4
  166. package/types/FormItem/defaultProps.d.ts +38 -38
  167. package/types/FormItem/props.d.ts +74 -74
  168. package/types/InputGroup/DSInputGroup.d.ts +14 -14
  169. package/types/InputGroup/props.d.ts +14 -14
  170. package/types/InputMask/DSInputMask.d.ts +54 -54
  171. package/types/InputMask/props.d.ts +54 -54
  172. package/types/InputProtected/DSInputProtected.d.ts +12 -12
  173. package/types/InputProtected/props.d.ts +12 -12
  174. package/types/LargeInputText/DSLargeInputText.d.ts +54 -54
  175. package/types/LargeInputText/props.d.ts +54 -54
  176. package/types/MenuItem/components/SubmenuItem/styled.d.ts +1 -1
  177. package/types/MenuItem/components/styled.d.ts +5 -3
  178. package/types/MenuItem/props.d.ts +4 -3
  179. package/types/Radio/DSRadio.d.ts +56 -46
  180. package/types/RadioGroup/DSRadioGroup.d.ts +12 -12
  181. package/types/RadioGroup/props.d.ts +12 -12
  182. package/types/SearchBox/DSSearchBox.d.ts +40 -40
  183. package/types/SearchBox/NavSearchBox.d.ts +24 -7
  184. package/types/SearchBox/SButton.d.ts +4 -4
  185. package/types/SearchBox/props.d.ts +44 -44
  186. package/types/TextBox/DSTextBox.d.ts +38 -38
  187. package/types/TimeInput/DSTimeInput.d.ts +22 -22
  188. package/types/Toggle/DSToggle.d.ts +22 -22
  189. package/cjs/ComboBox/v3/ComboBox.js +0 -33
  190. package/cjs/ComboBox/v3/ComboBoxCTX.js +0 -55
  191. package/cjs/ComboBox/v3/ComboboxDataTestids.js +0 -17
  192. package/cjs/ComboBox/v3/config/constants.js +0 -14
  193. package/cjs/ComboBox/v3/config/useComboBox.js +0 -122
  194. package/cjs/ComboBox/v3/config/useGetPropsWithDefault.js +0 -11
  195. package/cjs/ComboBox/v3/index.d.js +0 -2
  196. package/cjs/ComboBox/v3/index.js +0 -10
  197. package/cjs/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.js +0 -33
  198. package/cjs/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.js +0 -28
  199. package/cjs/ComboBox/v3/parts/a11y-messages/index.js +0 -11
  200. package/cjs/ComboBox/v3/parts/a11y-messages/styled.js +0 -15
  201. package/cjs/ComboBox/v3/parts/container/Container.js +0 -67
  202. package/cjs/ComboBox/v3/parts/container/index.js +0 -9
  203. package/cjs/ComboBox/v3/parts/container/styled.js +0 -23
  204. package/cjs/ComboBox/v3/parts/controls/Controls.js +0 -71
  205. package/cjs/ComboBox/v3/parts/controls/index.js +0 -9
  206. package/cjs/ComboBox/v3/parts/controls/styled.js +0 -65
  207. package/cjs/ComboBox/v3/parts/controls-input/ControlsInput.js +0 -67
  208. package/cjs/ComboBox/v3/parts/controls-input/styled.js +0 -27
  209. package/cjs/ComboBox/v3/parts/controls-input/useControlsInput.js +0 -77
  210. package/cjs/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.js +0 -33
  211. package/cjs/ComboBox/v3/parts/dropdown-indicator/index.js +0 -2
  212. package/cjs/ComboBox/v3/parts/dropdown-indicator/styled.js +0 -17
  213. package/cjs/ComboBox/v3/parts/empty-state/index.js +0 -27
  214. package/cjs/ComboBox/v3/parts/empty-state/styled.js +0 -19
  215. package/cjs/ComboBox/v3/parts/header-list/HeaderList.js +0 -113
  216. package/cjs/ComboBox/v3/parts/header-list/index.js +0 -9
  217. package/cjs/ComboBox/v3/parts/header-list/styled.js +0 -58
  218. package/cjs/ComboBox/v3/parts/header-list/useHeaderListHandlers.js +0 -73
  219. package/cjs/ComboBox/v3/parts/menu-list/MenuList.js +0 -81
  220. package/cjs/ComboBox/v3/parts/menu-list/index.js +0 -9
  221. package/cjs/ComboBox/v3/parts/menu-list/styled.js +0 -33
  222. package/cjs/ComboBox/v3/parts/menu-list/useItemRenderer.js +0 -105
  223. package/cjs/ComboBox/v3/parts/menu-list/useMenuList.js +0 -61
  224. package/cjs/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +0 -63
  225. package/cjs/ComboBox/v3/parts/multi-selected-values-container/index.js +0 -9
  226. package/cjs/ComboBox/v3/parts/multi-selected-values-container/styled.js +0 -23
  227. package/cjs/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.js +0 -71
  228. package/cjs/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.js +0 -28
  229. package/cjs/ComboBox/v3/parts/single-selected-value-container/index.js +0 -9
  230. package/cjs/ComboBox/v3/parts/single-selected-value-container/styled.js +0 -15
  231. package/cjs/ComboBox/v3/propTypes.js +0 -25
  232. package/cjs/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +0 -152
  233. package/cjs/ComboBox/v3/utils/hooks/useOnElementResize.js +0 -37
  234. package/cjs/ComboBox/v3/utils/listHelper.js +0 -39
  235. package/esm/ComboBox/v3/ComboBox.js +0 -24
  236. package/esm/ComboBox/v3/ComboBoxCTX.js +0 -49
  237. package/esm/ComboBox/v3/ComboboxDataTestids.js +0 -13
  238. package/esm/ComboBox/v3/config/constants.js +0 -10
  239. package/esm/ComboBox/v3/config/useComboBox.js +0 -114
  240. package/esm/ComboBox/v3/config/useGetPropsWithDefault.js +0 -7
  241. package/esm/ComboBox/v3/index.d.js +0 -1
  242. package/esm/ComboBox/v3/index.js +0 -1
  243. package/esm/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.js +0 -25
  244. package/esm/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.js +0 -20
  245. package/esm/ComboBox/v3/parts/a11y-messages/index.js +0 -2
  246. package/esm/ComboBox/v3/parts/a11y-messages/styled.js +0 -7
  247. package/esm/ComboBox/v3/parts/container/Container.js +0 -59
  248. package/esm/ComboBox/v3/parts/container/index.js +0 -1
  249. package/esm/ComboBox/v3/parts/container/styled.js +0 -13
  250. package/esm/ComboBox/v3/parts/controls/Controls.js +0 -63
  251. package/esm/ComboBox/v3/parts/controls/index.js +0 -1
  252. package/esm/ComboBox/v3/parts/controls/styled.js +0 -52
  253. package/esm/ComboBox/v3/parts/controls-input/ControlsInput.js +0 -59
  254. package/esm/ComboBox/v3/parts/controls-input/styled.js +0 -16
  255. package/esm/ComboBox/v3/parts/controls-input/useControlsInput.js +0 -73
  256. package/esm/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.js +0 -26
  257. package/esm/ComboBox/v3/parts/dropdown-indicator/index.js +0 -1
  258. package/esm/ComboBox/v3/parts/dropdown-indicator/styled.js +0 -8
  259. package/esm/ComboBox/v3/parts/empty-state/index.js +0 -19
  260. package/esm/ComboBox/v3/parts/empty-state/styled.js +0 -10
  261. package/esm/ComboBox/v3/parts/header-list/HeaderList.js +0 -105
  262. package/esm/ComboBox/v3/parts/header-list/index.js +0 -1
  263. package/esm/ComboBox/v3/parts/header-list/styled.js +0 -41
  264. package/esm/ComboBox/v3/parts/header-list/useHeaderListHandlers.js +0 -69
  265. package/esm/ComboBox/v3/parts/menu-list/MenuList.js +0 -73
  266. package/esm/ComboBox/v3/parts/menu-list/index.js +0 -1
  267. package/esm/ComboBox/v3/parts/menu-list/styled.js +0 -23
  268. package/esm/ComboBox/v3/parts/menu-list/useItemRenderer.js +0 -97
  269. package/esm/ComboBox/v3/parts/menu-list/useMenuList.js +0 -57
  270. package/esm/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +0 -54
  271. package/esm/ComboBox/v3/parts/multi-selected-values-container/index.js +0 -1
  272. package/esm/ComboBox/v3/parts/multi-selected-values-container/styled.js +0 -13
  273. package/esm/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.js +0 -67
  274. package/esm/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.js +0 -20
  275. package/esm/ComboBox/v3/parts/single-selected-value-container/index.js +0 -1
  276. package/esm/ComboBox/v3/parts/single-selected-value-container/styled.js +0 -7
  277. package/esm/ComboBox/v3/propTypes.js +0 -21
  278. package/esm/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +0 -148
  279. package/esm/ComboBox/v3/utils/hooks/useOnElementResize.js +0 -33
  280. package/esm/ComboBox/v3/utils/listHelper.js +0 -30
  281. package/types/ComboBox/v3/ComboBox.d.ts +0 -62
  282. package/types/ComboBox/v3/ComboBoxCTX.d.ts +0 -6
  283. package/types/ComboBox/v3/ComboboxDataTestids.d.ts +0 -11
  284. package/types/ComboBox/v3/config/constants.d.ts +0 -8
  285. package/types/ComboBox/v3/config/useComboBox.d.ts +0 -2
  286. package/types/ComboBox/v3/config/useGetPropsWithDefault.d.ts +0 -2
  287. package/types/ComboBox/v3/index.d.ts +0 -1
  288. package/types/ComboBox/v3/parts/a11y-messages/MultiAllyMessages.d.ts +0 -3
  289. package/types/ComboBox/v3/parts/a11y-messages/SingleAllyMessages.d.ts +0 -3
  290. package/types/ComboBox/v3/parts/a11y-messages/index.d.ts +0 -2
  291. package/types/ComboBox/v3/parts/a11y-messages/styled.d.ts +0 -1
  292. package/types/ComboBox/v3/parts/container/Container.d.ts +0 -3
  293. package/types/ComboBox/v3/parts/container/index.d.ts +0 -1
  294. package/types/ComboBox/v3/parts/container/styled.d.ts +0 -3
  295. package/types/ComboBox/v3/parts/controls/Controls.d.ts +0 -3
  296. package/types/ComboBox/v3/parts/controls/index.d.ts +0 -1
  297. package/types/ComboBox/v3/parts/controls/styled.d.ts +0 -7
  298. package/types/ComboBox/v3/parts/controls-input/ControlsInput.d.ts +0 -3
  299. package/types/ComboBox/v3/parts/controls-input/styled.d.ts +0 -4
  300. package/types/ComboBox/v3/parts/controls-input/useControlsInput.d.ts +0 -12
  301. package/types/ComboBox/v3/parts/dropdown-indicator/DropdownIndicator.d.ts +0 -3
  302. package/types/ComboBox/v3/parts/dropdown-indicator/index.d.ts +0 -0
  303. package/types/ComboBox/v3/parts/dropdown-indicator/styled.d.ts +0 -1
  304. package/types/ComboBox/v3/parts/empty-state/index.d.ts +0 -3
  305. package/types/ComboBox/v3/parts/empty-state/styled.d.ts +0 -2
  306. package/types/ComboBox/v3/parts/header-list/HeaderList.d.ts +0 -3
  307. package/types/ComboBox/v3/parts/header-list/index.d.ts +0 -1
  308. package/types/ComboBox/v3/parts/header-list/styled.d.ts +0 -7
  309. package/types/ComboBox/v3/parts/header-list/useHeaderListHandlers.d.ts +0 -12
  310. package/types/ComboBox/v3/parts/menu-list/MenuList.d.ts +0 -3
  311. package/types/ComboBox/v3/parts/menu-list/index.d.ts +0 -1
  312. package/types/ComboBox/v3/parts/menu-list/styled.d.ts +0 -10
  313. package/types/ComboBox/v3/parts/menu-list/useItemRenderer.d.ts +0 -2
  314. package/types/ComboBox/v3/parts/menu-list/useMenuList.d.ts +0 -2
  315. package/types/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.d.ts +0 -3
  316. package/types/ComboBox/v3/parts/multi-selected-values-container/index.d.ts +0 -1
  317. package/types/ComboBox/v3/parts/multi-selected-values-container/styled.d.ts +0 -3
  318. package/types/ComboBox/v3/parts/multi-selected-values-container/useGroupPills.d.ts +0 -2
  319. package/types/ComboBox/v3/parts/single-selected-value-container/SingleSelectedValueContainer.d.ts +0 -3
  320. package/types/ComboBox/v3/parts/single-selected-value-container/index.d.ts +0 -1
  321. package/types/ComboBox/v3/parts/single-selected-value-container/styled.d.ts +0 -1
  322. package/types/ComboBox/v3/propTypes.d.ts +0 -51
  323. package/types/ComboBox/v3/tests/combobox-general.test.d.ts +0 -1
  324. package/types/ComboBox/v3/tests/combobox-multi-select.test.d.ts +0 -1
  325. package/types/ComboBox/v3/tests/combobox-single-select.test.d.ts +0 -1
  326. package/types/ComboBox/v3/tests/combobox-special-keys.test.d.ts +0 -1
  327. package/types/ComboBox/v3/tests/utils.d.ts +0 -22
  328. package/types/ComboBox/v3/utils/hooks/useKeyboardNavigation.d.ts +0 -4
  329. package/types/ComboBox/v3/utils/hooks/useOnElementResize.d.ts +0 -3
  330. package/types/ComboBox/v3/utils/listHelper.d.ts +0 -7
@@ -1,33 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _jsx = require('@babel/runtime/helpers/jsx');
6
- require('react');
7
- var reactDesc = require('react-desc');
8
- var dsPropsHelpers = require('@elliemae/ds-props-helpers');
9
- var useComboBox = require('./config/useComboBox.js');
10
- var Container = require('./parts/container/Container.js');
11
- var propTypes = require('./propTypes.js');
12
- var ComboBoxCTX = require('./ComboBoxCTX.js');
13
-
14
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
-
16
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
17
-
18
- var _Container;
19
-
20
- const DSComboBox = props => {
21
- const propsWithDefault = dsPropsHelpers.useMemoMergePropsWithDefault(props, ComboBoxCTX.defaultProps);
22
- dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefault, propTypes.propTypes);
23
- const ctx = useComboBox.useComboBox(props);
24
- return /*#__PURE__*/_jsx__default["default"](ComboBoxCTX.ComboBoxContext.Provider, {
25
- value: ctx
26
- }, void 0, _Container || (_Container = /*#__PURE__*/_jsx__default["default"](Container.Container, {})));
27
- };
28
-
29
- const DSComboBoxWithSchema = reactDesc.describe(DSComboBox);
30
- DSComboBoxWithSchema.propTypes = propTypes.propTypes;
31
-
32
- exports.DSComboBox = DSComboBox;
33
- exports.DSComboBoxWithSchema = DSComboBoxWithSchema;
@@ -1,55 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var React = require('react');
6
- var lodash = require('lodash');
7
-
8
- // eslint-disable-next-line @typescript-eslint/no-empty-function
9
- const defaultProps = {
10
- placeholder: '',
11
- options: [],
12
- selectedValues: null,
13
- hasError: false,
14
- inline: false,
15
- autoFocus: false,
16
- startPlacementPreference: 'bottom-start',
17
- placementOrderPreference: ['bottom-start', 'bottom-end'],
18
- onClearAll: lodash.noop,
19
- onSelectAll: lodash.noop,
20
- onCreate: lodash.noop,
21
- withToggle: false,
22
- onChange: lodash.noop,
23
- onKeyDown: lodash.noop,
24
- onFilter: lodash.noop,
25
- onMenuOpen: lodash.noop
26
- };
27
- const defaultContext = {
28
- props: defaultProps,
29
- showPopover: false,
30
- setShowPopover: lodash.noop,
31
- scrollOptionIntoView: lodash.noop,
32
- referenceElement: null,
33
- hasFocus: false,
34
- setHasFocus: lodash.noop,
35
- pillGroupRef: /*#__PURE__*/React.createRef(),
36
- setReferenceElement: lodash.noop,
37
- inputRef: /*#__PURE__*/React.createRef(),
38
- listRef: /*#__PURE__*/React.createRef(),
39
- wrapperListRef: /*#__PURE__*/React.createRef(),
40
- controlsWrapperRef: /*#__PURE__*/React.createRef(),
41
- selectedOptionsRef: /*#__PURE__*/React.createRef(),
42
- showSelectedValue: false,
43
- setShowSelectedValue: lodash.noop,
44
- focusOptionIdx: '',
45
- setCurrentOption: lodash.noop,
46
- showSelectedOptions: false,
47
- setShowSelectedOptions: lodash.noop
48
- };
49
- /** Context for cross component communication */
50
-
51
- const ComboBoxContext = /*#__PURE__*/React.createContext(defaultContext);
52
-
53
- exports.ComboBoxContext = ComboBoxContext;
54
- exports["default"] = ComboBoxContext;
55
- exports.defaultProps = defaultProps;
@@ -1,17 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const ComboboxDataTestid = {
6
- INPUT: 'combobox-input',
7
- LIST: 'combobox-menu-list',
8
- SELECTED_VALUES: 'combobox-selected-values',
9
- SELECT_ALL_BUTTON: 'combobox-all-btn',
10
- CLEAR_ALL_BUTTON: 'combobox-clear-btn',
11
- DROPDOWN: 'combobox-dropdown-btn',
12
- OPTION: 'combobox-option',
13
- SHOW_ALL_BUTTON: 'combobox-show-all-btn',
14
- SHOW_SELECTED_OPTIONS_BUTTON: 'combobox-selected-options-btn'
15
- };
16
-
17
- exports.ComboboxDataTestid = ComboboxDataTestid;
@@ -1,14 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const DATA_TESTID = {
6
- COMBOBOX_MENU_LIST: 'combobox-menu-list',
7
- COMBOBOX_CLEAR_BTN: 'combobox-clear-btn',
8
- COMBOBOX_ALL_BTN: 'combobox-all-btn',
9
- COMBOBOX_DROPDOWN_BTN: 'combobox-dropdown-btn',
10
- COMBOBOX_OPTION: 'combobox-option',
11
- COMBOBOX: 'combobox'
12
- };
13
-
14
- exports.DATA_TESTID = DATA_TESTID;
@@ -1,122 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- require('core-js/modules/web.dom-collections.iterator.js');
7
- require('core-js/modules/esnext.async-iterator.for-each.js');
8
- require('core-js/modules/esnext.iterator.constructor.js');
9
- require('core-js/modules/esnext.iterator.for-each.js');
10
- require('core-js/modules/esnext.async-iterator.find.js');
11
- require('core-js/modules/esnext.iterator.find.js');
12
- require('core-js/modules/esnext.async-iterator.filter.js');
13
- require('core-js/modules/esnext.iterator.filter.js');
14
- var React = require('react');
15
- var reactVirtual = require('react-virtual');
16
- var useGetPropsWithDefault = require('./useGetPropsWithDefault.js');
17
-
18
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
19
-
20
- var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
21
-
22
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
23
-
24
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
25
- const useComboBox = props => {
26
- const [showPopover, setShowPopover] = React.useState(false);
27
- const [referenceElement, setReferenceElement] = React.useState(null);
28
- const [showSelectedValue, setShowSelectedValue] = React.useState(false);
29
- const [showSelectedOptions, setShowSelectedOptions] = React.useState(false);
30
- const [hasFocus, setHasFocus] = React.useState(false);
31
- const [focusOptionIdx, setCurrentOption] = React.useState('');
32
- const inputRef = React.useRef(null);
33
- const listRef = React.useRef(null);
34
- const wrapperListRef = React.useRef(null);
35
- const selectedOptionsRef = React.useRef(null);
36
- const controlsWrapperRef = React.useRef(null);
37
- const pillGroupRef = React.useRef(null);
38
- const propsWithDefaults = useGetPropsWithDefault.useGetComboBoxWithDefaultsProps(props);
39
- const {
40
- options,
41
- selectedValues
42
- } = propsWithDefaults; // ---------------------------------------------------------------------------
43
- // Menu Options with/out selected filter
44
- // ---------------------------------------------------------------------------
45
-
46
- const selectedValuesWithSections = React.useCallback(() => {
47
- var _items2;
48
-
49
- const multiSelectedValue = selectedValues;
50
- const items = [];
51
- options.forEach(option => {
52
- const isSelectedValue = multiSelectedValue.find(item => item.dsId === option.dsId);
53
-
54
- if (isSelectedValue) {
55
- items.push(option);
56
- }
57
-
58
- if (option.type === 'section') {
59
- var _items;
60
-
61
- if (((_items = items[items.length - 1]) === null || _items === void 0 ? void 0 : _items.type) === 'section') {
62
- items[items.length - 1] = option;
63
- } else {
64
- items.push(option);
65
- }
66
- }
67
- });
68
-
69
- if (((_items2 = items[items.length - 1]) === null || _items2 === void 0 ? void 0 : _items2.type) === 'section') {
70
- items.pop();
71
- }
72
-
73
- return items;
74
- }, [options, selectedValues]);
75
- const correctOptions = React.useMemo(() => showSelectedOptions && Array.isArray(selectedValues) && selectedValues.length > 0 ? selectedValuesWithSections() : options, [options, selectedValuesWithSections, selectedValues, showSelectedOptions]); // ===========================================================================
76
- // Virtualization setup
77
- // ===========================================================================
78
-
79
- const virtualListHelpers = reactVirtual.useVirtual({
80
- size: correctOptions.length,
81
- parentRef: listRef,
82
- overscan: 15,
83
- paddingStart: 0
84
- }); // ===========================================================================
85
- // Scroll into view function
86
- // ===========================================================================
87
-
88
- const scrollOptionIntoView = React.useCallback(function (dsId) {
89
- let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
90
- align: 'center'
91
- };
92
- virtualListHelpers.scrollToIndex(correctOptions.findIndex(opt => opt.dsId === dsId), opts);
93
- }, [correctOptions, virtualListHelpers]);
94
- const ctx = React.useMemo(() => ({
95
- props: _objectSpread(_objectSpread({}, propsWithDefaults), {}, {
96
- options: correctOptions
97
- }),
98
- virtualListHelpers,
99
- showPopover,
100
- referenceElement,
101
- inputRef,
102
- showSelectedValue,
103
- listRef,
104
- focusOptionIdx,
105
- selectedOptionsRef,
106
- controlsWrapperRef,
107
- hasFocus,
108
- pillGroupRef,
109
- showSelectedOptions,
110
- wrapperListRef,
111
- setShowSelectedOptions,
112
- setHasFocus,
113
- setCurrentOption,
114
- scrollOptionIntoView,
115
- setShowSelectedValue,
116
- setReferenceElement,
117
- setShowPopover
118
- }), [scrollOptionIntoView, correctOptions, propsWithDefaults, virtualListHelpers, focusOptionIdx, showSelectedValue, wrapperListRef, showSelectedOptions, showPopover, pillGroupRef, referenceElement, inputRef, selectedOptionsRef, controlsWrapperRef, hasFocus, listRef]);
119
- return ctx;
120
- };
121
-
122
- exports.useComboBox = useComboBox;
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var dsPropsHelpers = require('@elliemae/ds-props-helpers');
6
- var ComboBoxCTX = require('../ComboBoxCTX.js');
7
-
8
- // we have to merge the "default" nested default values with what the user gives us...
9
- const useGetComboBoxWithDefaultsProps = props => dsPropsHelpers.useMemoMergePropsWithDefault(props, ComboBoxCTX.defaultProps);
10
-
11
- exports.useGetComboBoxWithDefaultsProps = useGetComboBoxWithDefaultsProps;
@@ -1,2 +0,0 @@
1
- 'use strict';
2
-
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var ComboBox = require('./ComboBox.js');
6
-
7
-
8
-
9
- exports.DSComboBox = ComboBox.DSComboBox;
10
- exports.DSComboBoxWithSchema = ComboBox.DSComboBoxWithSchema;
@@ -1,33 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _jsx = require('@babel/runtime/helpers/jsx');
6
- require('core-js/modules/esnext.async-iterator.map.js');
7
- require('core-js/modules/esnext.iterator.map.js');
8
- var React = require('react');
9
- var ComboBoxCTX = require('../../ComboBoxCTX.js');
10
- var listHelper = require('../../utils/listHelper.js');
11
- var styled = require('./styled.js');
12
-
13
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
-
15
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
16
-
17
- const MultiAllyMessages = () => {
18
- const {
19
- props: {
20
- options,
21
- selectedValues
22
- }
23
- } = React.useContext(ComboBoxCTX.ComboBoxContext);
24
- const selectableOptions = listHelper.getSelectableOptions(options);
25
- const multipleSelectedValues = selectedValues;
26
- return /*#__PURE__*/_jsx__default["default"](styled.StyledA11ySelectedValues, {
27
- "aria-live": "polite",
28
- "aria-atomic": "false",
29
- "aria-relevant": "additions text"
30
- }, void 0, "Options selected: ".concat(multipleSelectedValues.map(item => item.label).join(', '), ". ").concat(multipleSelectedValues.length, " of ").concat(selectableOptions.length));
31
- };
32
-
33
- exports.MultiAllyMessages = MultiAllyMessages;
@@ -1,28 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _jsx = require('@babel/runtime/helpers/jsx');
6
- var React = require('react');
7
- var ComboBoxCTX = require('../../ComboBoxCTX.js');
8
- var styled = require('./styled.js');
9
-
10
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
-
12
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
13
-
14
- const SingleAllyMessages = () => {
15
- const {
16
- props: {
17
- selectedValues
18
- }
19
- } = React.useContext(ComboBoxCTX.ComboBoxContext);
20
- const singleSelectedValue = selectedValues;
21
- return /*#__PURE__*/_jsx__default["default"](styled.StyledA11ySelectedValues, {
22
- "aria-live": "polite",
23
- "aria-atomic": "false",
24
- "aria-relevant": "additions text"
25
- }, void 0, "Option selected: ".concat(singleSelectedValue.label, "."));
26
- };
27
-
28
- exports.SingleAllyMessages = SingleAllyMessages;
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var MultiAllyMessages = require('./MultiAllyMessages.js');
6
- var SingleAllyMessages = require('./SingleAllyMessages.js');
7
-
8
-
9
-
10
- exports.MultiAllyMessages = MultiAllyMessages.MultiAllyMessages;
11
- exports.SingleAllyMessages = SingleAllyMessages.SingleAllyMessages;
@@ -1,15 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var styled = require('styled-components');
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
-
9
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
10
-
11
- const StyledA11ySelectedValues = /*#__PURE__*/styled__default["default"].span.withConfig({
12
- componentId: "sc-4xp40i-0"
13
- })(["width:1px;height:1px;position:absolute;clip:rect(1px,1px,1px,1px);"]);
14
-
15
- exports.StyledA11ySelectedValues = StyledA11ySelectedValues;
@@ -1,67 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _jsx = require('@babel/runtime/helpers/jsx');
6
- var React = require('react');
7
- var dsPopperjs = require('@elliemae/ds-popperjs');
8
- var ComboBoxCTX = require('../../ComboBoxCTX.js');
9
- var styled = require('./styled.js');
10
- var Controls = require('../controls/Controls.js');
11
- var MenuList = require('../menu-list/MenuList.js');
12
- var jsxRuntime = require('react/jsx-runtime');
13
-
14
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
-
16
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
17
-
18
- var _Controls, _MenuList, _MenuList2;
19
-
20
- const Container = () => {
21
- const {
22
- props: {
23
- inline,
24
- startPlacementPreference,
25
- placementOrderPreference
26
- },
27
- showPopover,
28
- inputRef,
29
- setReferenceElement,
30
- setShowPopover,
31
- referenceElement
32
- } = React.useContext(ComboBoxCTX.ComboBoxContext);
33
- const handleCloseMenu = React.useCallback(() => {
34
- setShowPopover(false);
35
- if (inputRef.current) inputRef.current.blur();
36
- }, [inputRef, setShowPopover]);
37
- const handleMouseDown = React.useCallback(e => {
38
- e.preventDefault();
39
- }, []);
40
- const handleOnClickContainer = React.useCallback(() => {
41
- setShowPopover(!showPopover);
42
- }, [setShowPopover, showPopover]);
43
- const StyledContainer = inline ? styled.StyledContainerInline : styled.StyledContainerWithPopper;
44
- return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
45
- children: [/*#__PURE__*/jsxRuntime.jsxs(StyledContainer, {
46
- ref: setReferenceElement,
47
- onClick: handleOnClickContainer,
48
- children: [_Controls || (_Controls = /*#__PURE__*/_jsx__default["default"](Controls.Controls, {})), inline ? _MenuList || (_MenuList = /*#__PURE__*/_jsx__default["default"](MenuList.MenuList, {})) : null]
49
- }), !inline ? /*#__PURE__*/_jsx__default["default"](dsPopperjs.DSPopperJS, {
50
- customOffset: [0, 5],
51
- closeContextMenu: handleCloseMenu,
52
- referenceElement: referenceElement,
53
- showPopover: showPopover,
54
- startPlacementPreference: startPlacementPreference,
55
- placementOrderPreference: placementOrderPreference,
56
- withoutPortal: true,
57
- withoutArrow: true,
58
- withoutAnimation: true,
59
- zIndex: 10
60
- }, void 0, /*#__PURE__*/_jsx__default["default"](styled.StyledPopperWrapper, {
61
- tabIndex: -1,
62
- onMouseDown: handleMouseDown
63
- }, void 0, _MenuList2 || (_MenuList2 = /*#__PURE__*/_jsx__default["default"](MenuList.MenuList, {})))) : null]
64
- });
65
- };
66
-
67
- exports.Container = Container;
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var Container = require('./Container.js');
6
-
7
-
8
-
9
- exports.Container = Container.Container;
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var styled = require('styled-components');
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
-
9
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
10
-
11
- const StyledContainerWithPopper = /*#__PURE__*/styled__default["default"].div.withConfig({
12
- componentId: "sc-17wftik-0"
13
- })(["width:100%;height:28px;position:relative;"]);
14
- const StyledContainerInline = /*#__PURE__*/styled__default["default"].div.withConfig({
15
- componentId: "sc-17wftik-1"
16
- })(["width:100%;position:relative;"]);
17
- const StyledPopperWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
18
- componentId: "sc-17wftik-2"
19
- })(["background:#fff;overflow:auto;position:relative;"]);
20
-
21
- exports.StyledContainerInline = StyledContainerInline;
22
- exports.StyledContainerWithPopper = StyledContainerWithPopper;
23
- exports.StyledPopperWrapper = StyledPopperWrapper;
@@ -1,71 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _jsx = require('@babel/runtime/helpers/jsx');
6
- var React = require('react');
7
- var DropdownIndicator = require('../dropdown-indicator/DropdownIndicator.js');
8
- var ComboboxDataTestids = require('../../ComboboxDataTestids.js');
9
- var ComboBoxCTX = require('../../ComboBoxCTX.js');
10
- var styled = require('./styled.js');
11
- var MultiSelectedValuesContainer = require('../multi-selected-values-container/MultiSelectedValuesContainer.js');
12
- var ControlsInput = require('../controls-input/ControlsInput.js');
13
- var SingleSelectedValueContainer = require('../single-selected-value-container/SingleSelectedValueContainer.js');
14
- var jsxRuntime = require('react/jsx-runtime');
15
-
16
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
-
18
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
19
-
20
- var _MultiSelectedValuesC, _SingleSelectedValueC, _ControlsInput, _StyledHeaderActionsW;
21
-
22
- const Controls = () => {
23
- const {
24
- props: {
25
- inline,
26
- inputMinWidth,
27
- hasError,
28
- selectedValues
29
- },
30
- inputRef,
31
- selectedOptionsRef,
32
- setShowPopover,
33
- showPopover,
34
- hasFocus,
35
- controlsWrapperRef
36
- } = React.useContext(ComboBoxCTX.ComboBoxContext);
37
- const handleOnClick = React.useCallback(() => {
38
- if (hasFocus && showPopover && !inline) {
39
- inputRef.current.blur();
40
- } else if (hasFocus) {
41
- setShowPopover(true);
42
- } else {
43
- inputRef.current.focus();
44
- }
45
- }, [hasFocus, setShowPopover, showPopover, inputRef, inline]);
46
-
47
- const handleOnMouseDown = e => {
48
- if (hasFocus || inline) {
49
- e.preventDefault();
50
- }
51
- };
52
-
53
- const cols = !inline ? ['minmax(0px,max-content)', 'minmax(20px, auto)', '29px'] : ['minmax(0px, auto)'];
54
- return /*#__PURE__*/jsxRuntime.jsxs(styled.StyledControlsWrapper, {
55
- ref: controlsWrapperRef,
56
- cols: cols,
57
- minWidth: inputMinWidth,
58
- hasError: hasError,
59
- hasFocus: hasFocus,
60
- inline: inline,
61
- onClick: handleOnClick,
62
- onMouseDown: handleOnMouseDown,
63
- children: [!inline && /*#__PURE__*/jsxRuntime.jsx(styled.StyledSelection, {
64
- ref: selectedOptionsRef,
65
- "data-testid": ComboboxDataTestids.ComboboxDataTestid.SELECTED_VALUES,
66
- children: Array.isArray(selectedValues) ? _MultiSelectedValuesC || (_MultiSelectedValuesC = /*#__PURE__*/_jsx__default["default"](MultiSelectedValuesContainer.MultiSelectedValuesContainer, {})) : _SingleSelectedValueC || (_SingleSelectedValueC = /*#__PURE__*/_jsx__default["default"](SingleSelectedValueContainer.SingleSelectedValueContainer, {}))
67
- }), _ControlsInput || (_ControlsInput = /*#__PURE__*/_jsx__default["default"](ControlsInput.ControlsInput, {})), !inline && (_StyledHeaderActionsW || (_StyledHeaderActionsW = /*#__PURE__*/_jsx__default["default"](styled.StyledHeaderActionsWrapper, {}, void 0, /*#__PURE__*/_jsx__default["default"](styled.StyleHeaderActionsSeparator, {}), /*#__PURE__*/_jsx__default["default"](DropdownIndicator, {}))))]
68
- });
69
- };
70
-
71
- exports.Controls = Controls;
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var Controls = require('./Controls.js');
6
-
7
-
8
-
9
- exports.Controls = Controls.Controls;
@@ -1,65 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
6
- var styled = require('styled-components');
7
- var dsSystem = require('@elliemae/ds-system');
8
- var Grid = require('@elliemae/ds-grid');
9
-
10
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
-
12
- var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
13
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
14
-
15
- var _templateObject, _templateObject2;
16
- const normalBorder = dsSystem.css(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n border: 1px solid\n ", ";\n"])), props => {
17
- if (props.hasError) {
18
- return props.theme.colors.danger[900];
19
- }
20
-
21
- return props.theme.colors.neutral[400];
22
- });
23
- const focusBorder = dsSystem.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default["default"](["\n border: 2px solid ", ";\n"])), _ref => {
24
- let {
25
- theme
26
- } = _ref;
27
- return theme.colors.brand[700];
28
- });
29
- const StyledControlsWrapper = /*#__PURE__*/styled__default["default"](Grid.Grid).withConfig({
30
- componentId: "sc-64uci7-0"
31
- })(["background:transparent;position:relative;border-radius:2px;min-width:", ";align-items:center;align-content:center;height:28px;padding-left:8px;margin:", ";&::after{display:block;content:' ';position:absolute;top:0;left:0;right:0;bottom:0;border-radius:2px;", " pointer-events:none;z-index:7;}"], _ref2 => {
32
- let {
33
- minWidth,
34
- inline
35
- } = _ref2;
36
- return inline ? '' : "".concat(minWidth, "px");
37
- }, _ref3 => {
38
- let {
39
- inline
40
- } = _ref3;
41
- return inline ? '10px 16px' : 'none';
42
- }, _ref4 => {
43
- let {
44
- hasFocus
45
- } = _ref4;
46
- return hasFocus ? focusBorder : normalBorder;
47
- });
48
- const StyledSelection = /*#__PURE__*/styled__default["default"].div.withConfig({
49
- componentId: "sc-64uci7-1"
50
- })(["font-size:13px;margin-right:3px;line-height:13px;display:flex;"]);
51
- const StyledHeaderActionsWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
52
- componentId: "sc-64uci7-2"
53
- })(["align-items:center;align-self:stretch;display:flex;box-sizing:border-box;height:28px;.em-ds-button--text:focus::after{border:none;}"]);
54
- const StyleDropdownIndicator = /*#__PURE__*/styled__default["default"].div.withConfig({
55
- componentId: "sc-64uci7-3"
56
- })([""]);
57
- const StyleHeaderActionsSeparator = /*#__PURE__*/styled__default["default"].span.withConfig({
58
- componentId: "sc-64uci7-4"
59
- })(["align-self:stretch;margin:4px 0px;width:1px;background-color:", ";"], props => props.theme.colors.neutral['500']);
60
-
61
- exports.StyleDropdownIndicator = StyleDropdownIndicator;
62
- exports.StyleHeaderActionsSeparator = StyleHeaderActionsSeparator;
63
- exports.StyledControlsWrapper = StyledControlsWrapper;
64
- exports.StyledHeaderActionsWrapper = StyledHeaderActionsWrapper;
65
- exports.StyledSelection = StyledSelection;