@elliemae/ds-form 3.16.0-next.1 → 3.16.0-next.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (421) hide show
  1. package/dist/cjs/CheckboxGroup/DSCheckboxGroup.js +6 -6
  2. package/dist/cjs/CheckboxGroup/DSCheckboxGroup.js.map +2 -2
  3. package/dist/cjs/CheckboxGroup/index.js +1 -1
  4. package/dist/cjs/CheckboxGroup/index.js.map +2 -2
  5. package/dist/cjs/CheckboxGroup/props.js +13 -13
  6. package/dist/cjs/CheckboxGroup/props.js.map +2 -2
  7. package/dist/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +5 -5
  8. package/dist/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +1 -1
  9. package/dist/cjs/ComboBoxFreeSolo/components/SingleValue.js +2 -2
  10. package/dist/cjs/ComboBoxFreeSolo/components/SingleValue.js.map +1 -1
  11. package/dist/cjs/ComboBoxFreeSolo/index.js +1 -1
  12. package/dist/cjs/ComboBoxFreeSolo/index.js.map +2 -2
  13. package/dist/cjs/DateInput/DSDateInput.js +6 -5
  14. package/dist/cjs/DateInput/DSDateInput.js.map +2 -2
  15. package/dist/cjs/DateInput/components/DateInputImpl.js +1 -1
  16. package/dist/cjs/DateInput/components/DateInputImpl.js.map +1 -1
  17. package/dist/cjs/DateInput/components/DateInputs.js +1 -1
  18. package/dist/cjs/DateInput/components/DateInputs.js.map +1 -1
  19. package/dist/cjs/DateInput/index.js +1 -1
  20. package/dist/cjs/DateInput/index.js.map +2 -2
  21. package/dist/cjs/DateInput/props.js +17 -17
  22. package/dist/cjs/DateInput/props.js.map +2 -2
  23. package/dist/cjs/DateInputV2/components/DSDateInput.js +5 -5
  24. package/dist/cjs/DateInputV2/components/DSDateInput.js.map +2 -2
  25. package/dist/cjs/DateInputV2/components/DateInputs.js +6 -4
  26. package/dist/cjs/DateInputV2/components/DateInputs.js.map +2 -2
  27. package/dist/cjs/DateInputV2/components/helpers.js +1 -1
  28. package/dist/cjs/DateInputV2/components/helpers.js.map +1 -1
  29. package/dist/cjs/DateInputV2/components/props.js +11 -11
  30. package/dist/cjs/DateInputV2/components/props.js.map +2 -2
  31. package/dist/cjs/DateInputV2/index.js +2 -2
  32. package/dist/cjs/DateInputV2/index.js.map +2 -2
  33. package/dist/cjs/ExpandableInput/DSExpandableInput.js +1 -1
  34. package/dist/cjs/ExpandableInput/DSExpandableInput.js.map +1 -1
  35. package/dist/cjs/ExpandableInput/ExpandableInputImpl.js +1 -1
  36. package/dist/cjs/ExpandableInput/ExpandableInputImpl.js.map +1 -1
  37. package/dist/cjs/ExpandableInput/index.js +1 -1
  38. package/dist/cjs/ExpandableInput/index.js.map +2 -2
  39. package/dist/cjs/FloatingLabelInput/DSFloatingLabelInput.js +3 -3
  40. package/dist/cjs/FloatingLabelInput/DSFloatingLabelInput.js.map +1 -1
  41. package/dist/cjs/FloatingLabelInput/FloatingLabelInputImpl.js +2 -2
  42. package/dist/cjs/FloatingLabelInput/FloatingLabelInputImpl.js.map +1 -1
  43. package/dist/cjs/FloatingLabelInput/index.js +1 -1
  44. package/dist/cjs/FloatingLabelInput/index.js.map +2 -2
  45. package/dist/cjs/FormItem/DSFormItemLayout.js +10 -8
  46. package/dist/cjs/FormItem/DSFormItemLayout.js.map +2 -2
  47. package/dist/cjs/FormItem/Error/DSError.js +4 -4
  48. package/dist/cjs/FormItem/Error/DSError.js.map +2 -2
  49. package/dist/cjs/FormItem/Label/DSLabel.js +1 -1
  50. package/dist/cjs/FormItem/Label/DSLabel.js.map +1 -1
  51. package/dist/cjs/FormItem/defaultProps.js +4 -4
  52. package/dist/cjs/FormItem/defaultProps.js.map +1 -1
  53. package/dist/cjs/FormItem/index.js +2 -2
  54. package/dist/cjs/FormItem/index.js.map +1 -1
  55. package/dist/cjs/FormItem/props.js +45 -45
  56. package/dist/cjs/FormItem/props.js.map +2 -2
  57. package/dist/cjs/InputGroup/DSInputGroup.js +20 -16
  58. package/dist/cjs/InputGroup/DSInputGroup.js.map +2 -2
  59. package/dist/cjs/InputGroup/index.js +1 -1
  60. package/dist/cjs/InputGroup/index.js.map +1 -1
  61. package/dist/cjs/InputGroup/props.js +8 -8
  62. package/dist/cjs/InputGroup/props.js.map +2 -2
  63. package/dist/cjs/InputMask/DSInputMask.js +9 -7
  64. package/dist/cjs/InputMask/DSInputMask.js.map +2 -2
  65. package/dist/cjs/InputMask/DSInputMaskDeprecated.js +2 -2
  66. package/dist/cjs/InputMask/DSInputMaskDeprecated.js.map +1 -1
  67. package/dist/cjs/InputMask/InputMaskContext.js.map +1 -1
  68. package/dist/cjs/InputMask/MaskPipes.js +1 -1
  69. package/dist/cjs/InputMask/MaskPipes.js.map +1 -1
  70. package/dist/cjs/InputMask/defaultProps.js +1 -1
  71. package/dist/cjs/InputMask/defaultProps.js.map +1 -1
  72. package/dist/cjs/InputMask/index.js +1 -1
  73. package/dist/cjs/InputMask/index.js.map +2 -2
  74. package/dist/cjs/InputMask/mask_types/DateInputMask.js +2 -2
  75. package/dist/cjs/InputMask/mask_types/DateInputMask.js.map +1 -1
  76. package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js +2 -2
  77. package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js.map +1 -1
  78. package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js +2 -2
  79. package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js.map +1 -1
  80. package/dist/cjs/InputMask/mask_types/NumberInputMask.js +2 -2
  81. package/dist/cjs/InputMask/mask_types/NumberInputMask.js.map +1 -1
  82. package/dist/cjs/InputMask/mask_types/PhoneInputMask.js +2 -2
  83. package/dist/cjs/InputMask/mask_types/PhoneInputMask.js.map +2 -2
  84. package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +2 -2
  85. package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js.map +1 -1
  86. package/dist/cjs/InputMask/mask_types/SsnInputMask.js +2 -2
  87. package/dist/cjs/InputMask/mask_types/SsnInputMask.js.map +1 -1
  88. package/dist/cjs/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
  89. package/dist/cjs/InputMask/mask_types/UsZipCodeInputMask.js.map +1 -1
  90. package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
  91. package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js.map +1 -1
  92. package/dist/cjs/InputMask/mask_types/index.js +9 -9
  93. package/dist/cjs/InputMask/mask_types/index.js.map +1 -1
  94. package/dist/cjs/InputMask/props.js +31 -31
  95. package/dist/cjs/InputMask/props.js.map +2 -2
  96. package/dist/cjs/InputProtected/DSInputProtected.js +8 -6
  97. package/dist/cjs/InputProtected/DSInputProtected.js.map +2 -2
  98. package/dist/cjs/InputProtected/defaultProps.js +1 -1
  99. package/dist/cjs/InputProtected/defaultProps.js.map +1 -1
  100. package/dist/cjs/InputProtected/index.js +2 -2
  101. package/dist/cjs/InputProtected/index.js.map +2 -2
  102. package/dist/cjs/InputProtected/props.js +10 -10
  103. package/dist/cjs/InputProtected/props.js.map +2 -2
  104. package/dist/cjs/LargeInputText/DSLargeInputText.js +5 -3
  105. package/dist/cjs/LargeInputText/DSLargeInputText.js.map +2 -2
  106. package/dist/cjs/LargeInputText/index.js +1 -1
  107. package/dist/cjs/LargeInputText/index.js.map +1 -1
  108. package/dist/cjs/LargeInputText/props.js +28 -28
  109. package/dist/cjs/LargeInputText/props.js.map +2 -2
  110. package/dist/cjs/Radio/DSRadio.js +18 -16
  111. package/dist/cjs/Radio/DSRadio.js.map +2 -2
  112. package/dist/cjs/Radio/index.js +1 -1
  113. package/dist/cjs/Radio/index.js.map +2 -2
  114. package/dist/cjs/RadioGroup/DSRadioGroup.js +6 -6
  115. package/dist/cjs/RadioGroup/DSRadioGroup.js.map +2 -2
  116. package/dist/cjs/RadioGroup/index.js +1 -1
  117. package/dist/cjs/RadioGroup/index.js.map +2 -2
  118. package/dist/cjs/RadioGroup/props.js +11 -11
  119. package/dist/cjs/RadioGroup/props.js.map +2 -2
  120. package/dist/cjs/RequiredMark/index.js +1 -1
  121. package/dist/cjs/RequiredMark/index.js.map +2 -2
  122. package/dist/cjs/TimeInput/DSTimeInput.js +15 -15
  123. package/dist/cjs/TimeInput/DSTimeInput.js.map +2 -2
  124. package/dist/cjs/TimeInput/TimeInputImpl.js +1 -1
  125. package/dist/cjs/TimeInput/TimeInputImpl.js.map +1 -1
  126. package/dist/cjs/TimeInput/TimeInputs.js +1 -1
  127. package/dist/cjs/TimeInput/TimeInputs.js.map +1 -1
  128. package/dist/cjs/TimeInput/index.js +1 -1
  129. package/dist/cjs/TimeInput/index.js.map +2 -2
  130. package/dist/cjs/Toggle/DSToggle.js +33 -29
  131. package/dist/cjs/Toggle/DSToggle.js.map +2 -2
  132. package/dist/cjs/Toggle/DSToggleImpl.js +3 -3
  133. package/dist/cjs/Toggle/DSToggleImpl.js.map +1 -1
  134. package/dist/cjs/Toggle/index.js +1 -1
  135. package/dist/cjs/Toggle/index.js.map +1 -1
  136. package/dist/cjs/index.js +21 -21
  137. package/dist/cjs/index.js.map +2 -2
  138. package/dist/cjs/package.json +7 -0
  139. package/dist/esm/CheckboxGroup/DSCheckboxGroup.js +5 -5
  140. package/dist/esm/CheckboxGroup/DSCheckboxGroup.js.map +1 -1
  141. package/dist/esm/CheckboxGroup/index.js +1 -1
  142. package/dist/esm/CheckboxGroup/index.js.map +1 -1
  143. package/dist/esm/CheckboxGroup/props.js +2 -2
  144. package/dist/esm/CheckboxGroup/props.js.map +1 -1
  145. package/dist/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +5 -5
  146. package/dist/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +1 -1
  147. package/dist/esm/ComboBoxFreeSolo/components/SingleValue.js +2 -2
  148. package/dist/esm/ComboBoxFreeSolo/components/SingleValue.js.map +1 -1
  149. package/dist/esm/ComboBoxFreeSolo/index.js +1 -1
  150. package/dist/esm/ComboBoxFreeSolo/index.js.map +1 -1
  151. package/dist/esm/DateInput/DSDateInput.js +6 -5
  152. package/dist/esm/DateInput/DSDateInput.js.map +2 -2
  153. package/dist/esm/DateInput/components/DateInputImpl.js +1 -1
  154. package/dist/esm/DateInput/components/DateInputImpl.js.map +1 -1
  155. package/dist/esm/DateInput/components/DateInputs.js +1 -1
  156. package/dist/esm/DateInput/components/DateInputs.js.map +1 -1
  157. package/dist/esm/DateInput/index.js +1 -1
  158. package/dist/esm/DateInput/index.js.map +1 -1
  159. package/dist/esm/DateInput/props.js +1 -1
  160. package/dist/esm/DateInput/props.js.map +1 -1
  161. package/dist/esm/DateInputV2/components/DSDateInput.js +4 -4
  162. package/dist/esm/DateInputV2/components/DSDateInput.js.map +1 -1
  163. package/dist/esm/DateInputV2/components/DateInputs.js +6 -4
  164. package/dist/esm/DateInputV2/components/DateInputs.js.map +2 -2
  165. package/dist/esm/DateInputV2/components/helpers.js +1 -1
  166. package/dist/esm/DateInputV2/components/helpers.js.map +1 -1
  167. package/dist/esm/DateInputV2/components/props.js +1 -1
  168. package/dist/esm/DateInputV2/components/props.js.map +1 -1
  169. package/dist/esm/DateInputV2/index.js +2 -2
  170. package/dist/esm/DateInputV2/index.js.map +1 -1
  171. package/dist/esm/ExpandableInput/DSExpandableInput.js +1 -1
  172. package/dist/esm/ExpandableInput/DSExpandableInput.js.map +1 -1
  173. package/dist/esm/ExpandableInput/ExpandableInputImpl.js +1 -1
  174. package/dist/esm/ExpandableInput/ExpandableInputImpl.js.map +1 -1
  175. package/dist/esm/ExpandableInput/index.js +1 -1
  176. package/dist/esm/ExpandableInput/index.js.map +1 -1
  177. package/dist/esm/FloatingLabelInput/DSFloatingLabelInput.js +3 -3
  178. package/dist/esm/FloatingLabelInput/DSFloatingLabelInput.js.map +1 -1
  179. package/dist/esm/FloatingLabelInput/FloatingLabelInputImpl.js +2 -2
  180. package/dist/esm/FloatingLabelInput/FloatingLabelInputImpl.js.map +1 -1
  181. package/dist/esm/FloatingLabelInput/index.js +1 -1
  182. package/dist/esm/FloatingLabelInput/index.js.map +1 -1
  183. package/dist/esm/FormItem/DSFormItemLayout.js +10 -8
  184. package/dist/esm/FormItem/DSFormItemLayout.js.map +2 -2
  185. package/dist/esm/FormItem/Error/DSError.js +1 -1
  186. package/dist/esm/FormItem/Error/DSError.js.map +1 -1
  187. package/dist/esm/FormItem/Label/DSLabel.js +1 -1
  188. package/dist/esm/FormItem/Label/DSLabel.js.map +1 -1
  189. package/dist/esm/FormItem/defaultProps.js +4 -4
  190. package/dist/esm/FormItem/defaultProps.js.map +1 -1
  191. package/dist/esm/FormItem/index.js +2 -2
  192. package/dist/esm/FormItem/index.js.map +1 -1
  193. package/dist/esm/FormItem/props.js +2 -2
  194. package/dist/esm/FormItem/props.js.map +1 -1
  195. package/dist/esm/InputGroup/DSInputGroup.js +20 -16
  196. package/dist/esm/InputGroup/DSInputGroup.js.map +2 -2
  197. package/dist/esm/InputGroup/index.js +1 -1
  198. package/dist/esm/InputGroup/index.js.map +1 -1
  199. package/dist/esm/InputGroup/props.js +1 -1
  200. package/dist/esm/InputGroup/props.js.map +1 -1
  201. package/dist/esm/InputMask/DSInputMask.js +9 -7
  202. package/dist/esm/InputMask/DSInputMask.js.map +2 -2
  203. package/dist/esm/InputMask/DSInputMaskDeprecated.js +2 -2
  204. package/dist/esm/InputMask/DSInputMaskDeprecated.js.map +1 -1
  205. package/dist/esm/InputMask/InputMaskContext.js.map +1 -1
  206. package/dist/esm/InputMask/MaskPipes.js +1 -1
  207. package/dist/esm/InputMask/MaskPipes.js.map +1 -1
  208. package/dist/esm/InputMask/defaultProps.js +1 -1
  209. package/dist/esm/InputMask/defaultProps.js.map +1 -1
  210. package/dist/esm/InputMask/index.js +1 -1
  211. package/dist/esm/InputMask/index.js.map +1 -1
  212. package/dist/esm/InputMask/mask_types/DateInputMask.js +2 -2
  213. package/dist/esm/InputMask/mask_types/DateInputMask.js.map +1 -1
  214. package/dist/esm/InputMask/mask_types/DateTimeInputMask.js +2 -2
  215. package/dist/esm/InputMask/mask_types/DateTimeInputMask.js.map +1 -1
  216. package/dist/esm/InputMask/mask_types/DictionaryInputMask.js +2 -2
  217. package/dist/esm/InputMask/mask_types/DictionaryInputMask.js.map +1 -1
  218. package/dist/esm/InputMask/mask_types/NumberInputMask.js +2 -2
  219. package/dist/esm/InputMask/mask_types/NumberInputMask.js.map +1 -1
  220. package/dist/esm/InputMask/mask_types/PhoneInputMask.js +2 -2
  221. package/dist/esm/InputMask/mask_types/PhoneInputMask.js.map +2 -2
  222. package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js +2 -2
  223. package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js.map +1 -1
  224. package/dist/esm/InputMask/mask_types/SsnInputMask.js +2 -2
  225. package/dist/esm/InputMask/mask_types/SsnInputMask.js.map +1 -1
  226. package/dist/esm/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
  227. package/dist/esm/InputMask/mask_types/UsZipCodeInputMask.js.map +1 -1
  228. package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
  229. package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js.map +1 -1
  230. package/dist/esm/InputMask/mask_types/index.js +9 -9
  231. package/dist/esm/InputMask/mask_types/index.js.map +1 -1
  232. package/dist/esm/InputMask/props.js +1 -1
  233. package/dist/esm/InputMask/props.js.map +1 -1
  234. package/dist/esm/InputProtected/DSInputProtected.js +8 -6
  235. package/dist/esm/InputProtected/DSInputProtected.js.map +2 -2
  236. package/dist/esm/InputProtected/defaultProps.js +1 -1
  237. package/dist/esm/InputProtected/defaultProps.js.map +1 -1
  238. package/dist/esm/InputProtected/index.js +2 -2
  239. package/dist/esm/InputProtected/index.js.map +1 -1
  240. package/dist/esm/InputProtected/props.js +2 -2
  241. package/dist/esm/InputProtected/props.js.map +1 -1
  242. package/dist/esm/LargeInputText/DSLargeInputText.js +5 -3
  243. package/dist/esm/LargeInputText/DSLargeInputText.js.map +2 -2
  244. package/dist/esm/LargeInputText/index.js +1 -1
  245. package/dist/esm/LargeInputText/index.js.map +1 -1
  246. package/dist/esm/LargeInputText/props.js +1 -1
  247. package/dist/esm/LargeInputText/props.js.map +1 -1
  248. package/dist/esm/Radio/DSRadio.js +4 -2
  249. package/dist/esm/Radio/DSRadio.js.map +2 -2
  250. package/dist/esm/Radio/index.js +1 -1
  251. package/dist/esm/Radio/index.js.map +1 -1
  252. package/dist/esm/RadioGroup/DSRadioGroup.js +5 -5
  253. package/dist/esm/RadioGroup/DSRadioGroup.js.map +1 -1
  254. package/dist/esm/RadioGroup/index.js +1 -1
  255. package/dist/esm/RadioGroup/index.js.map +1 -1
  256. package/dist/esm/RadioGroup/props.js +1 -1
  257. package/dist/esm/RadioGroup/props.js.map +1 -1
  258. package/dist/esm/RequiredMark/index.js +1 -1
  259. package/dist/esm/RequiredMark/index.js.map +1 -1
  260. package/dist/esm/TimeInput/DSTimeInput.js +3 -3
  261. package/dist/esm/TimeInput/DSTimeInput.js.map +1 -1
  262. package/dist/esm/TimeInput/TimeInputImpl.js +1 -1
  263. package/dist/esm/TimeInput/TimeInputImpl.js.map +1 -1
  264. package/dist/esm/TimeInput/TimeInputs.js +1 -1
  265. package/dist/esm/TimeInput/TimeInputs.js.map +1 -1
  266. package/dist/esm/TimeInput/index.js +1 -1
  267. package/dist/esm/TimeInput/index.js.map +1 -1
  268. package/dist/esm/Toggle/DSToggle.js +22 -18
  269. package/dist/esm/Toggle/DSToggle.js.map +2 -2
  270. package/dist/esm/Toggle/DSToggleImpl.js +3 -3
  271. package/dist/esm/Toggle/DSToggleImpl.js.map +1 -1
  272. package/dist/esm/Toggle/index.js +1 -1
  273. package/dist/esm/Toggle/index.js.map +1 -1
  274. package/dist/esm/index.js +21 -21
  275. package/dist/esm/index.js.map +1 -1
  276. package/dist/esm/package.json +7 -0
  277. package/package.json +16 -15
  278. package/dist/types/Checkbox/index.d.ts +0 -1
  279. package/dist/types/CheckboxGroup/DSCheckboxGroup.d.ts +0 -46
  280. package/dist/types/CheckboxGroup/defaultProps.d.ts +0 -14
  281. package/dist/types/CheckboxGroup/index.d.ts +0 -1
  282. package/dist/types/CheckboxGroup/props.d.ts +0 -26
  283. package/dist/types/CheckboxGroup/tests/DSCheckboxGroup.events.test.d.ts +0 -1
  284. package/dist/types/ComboBox/index.d.ts +0 -1
  285. package/dist/types/ComboBoxFreeSolo/ComboBoxFreeSolo.d.ts +0 -78
  286. package/dist/types/ComboBoxFreeSolo/components/MultiValueLabel.d.ts +0 -5
  287. package/dist/types/ComboBoxFreeSolo/components/MultiValueRemove.d.ts +0 -5
  288. package/dist/types/ComboBoxFreeSolo/components/SingleValue.d.ts +0 -2
  289. package/dist/types/ComboBoxFreeSolo/components/SingleValueRemove.d.ts +0 -5
  290. package/dist/types/ComboBoxFreeSolo/index.d.ts +0 -1
  291. package/dist/types/DateInput/DSDateInput.d.ts +0 -62
  292. package/dist/types/DateInput/components/DateInputImpl.d.ts +0 -40
  293. package/dist/types/DateInput/components/DateInputs.d.ts +0 -40
  294. package/dist/types/DateInput/components/utils.d.ts +0 -40
  295. package/dist/types/DateInput/defaultProps.d.ts +0 -18
  296. package/dist/types/DateInput/index.d.ts +0 -1
  297. package/dist/types/DateInput/props.d.ts +0 -60
  298. package/dist/types/DateInput/tests/DSDateInput.events.test.d.ts +0 -1
  299. package/dist/types/DateInputV2/components/DSDateInput.d.ts +0 -54
  300. package/dist/types/DateInputV2/components/DateInputs.d.ts +0 -32
  301. package/dist/types/DateInputV2/components/helpers.d.ts +0 -1
  302. package/dist/types/DateInputV2/components/props.d.ts +0 -53
  303. package/dist/types/DateInputV2/components/propsTypes.d.ts +0 -21
  304. package/dist/types/DateInputV2/components/styled.d.ts +0 -5
  305. package/dist/types/DateInputV2/components/utils.d.ts +0 -42
  306. package/dist/types/DateInputV2/index.d.ts +0 -2
  307. package/dist/types/DateInputV2/tests/DateInput.test.d.ts +0 -1
  308. package/dist/types/ExpandableInput/DSExpandableInput.d.ts +0 -15
  309. package/dist/types/ExpandableInput/ExpandableInputImpl.d.ts +0 -7
  310. package/dist/types/ExpandableInput/index.d.ts +0 -1
  311. package/dist/types/FloatingLabelInput/DSFloatingLabelInput.d.ts +0 -47
  312. package/dist/types/FloatingLabelInput/FloatingLabelInputImpl.d.ts +0 -27
  313. package/dist/types/FloatingLabelInput/getSvgPath.d.ts +0 -10
  314. package/dist/types/FloatingLabelInput/index.d.ts +0 -1
  315. package/dist/types/FormItem/DSFormItemLayout.d.ts +0 -180
  316. package/dist/types/FormItem/Error/DSError.d.ts +0 -19
  317. package/dist/types/FormItem/Feedback.d.ts +0 -6
  318. package/dist/types/FormItem/Label/DSLabel.d.ts +0 -23
  319. package/dist/types/FormItem/Suffix/Suffix.d.ts +0 -4
  320. package/dist/types/FormItem/ValidationFieldWrapper.d.ts +0 -19
  321. package/dist/types/FormItem/defaultProps.d.ts +0 -51
  322. package/dist/types/FormItem/index.d.ts +0 -2
  323. package/dist/types/FormItem/props.d.ts +0 -80
  324. package/dist/types/FormItem/tests/DSFormItem.events.test.d.ts +0 -1
  325. package/dist/types/FormItem/variants.d.ts +0 -8
  326. package/dist/types/Input/DSInput.d.ts +0 -0
  327. package/dist/types/Input/InputAddonWrapper.d.ts +0 -0
  328. package/dist/types/Input/InputImpl.d.ts +0 -0
  329. package/dist/types/Input/index.d.ts +0 -1
  330. package/dist/types/Input/tests/Input.test.d.ts +0 -0
  331. package/dist/types/InputGroup/AddonWrapper.d.ts +0 -8
  332. package/dist/types/InputGroup/DSInputGroup.d.ts +0 -40
  333. package/dist/types/InputGroup/defaultProps.d.ts +0 -8
  334. package/dist/types/InputGroup/index.d.ts +0 -1
  335. package/dist/types/InputGroup/props.d.ts +0 -24
  336. package/dist/types/InputGroup/tests/DSInputGroup.events.test.d.ts +0 -1
  337. package/dist/types/InputMask/DSInputMask.d.ts +0 -85
  338. package/dist/types/InputMask/DSInputMaskDeprecated.d.ts +0 -18
  339. package/dist/types/InputMask/InputMaskContext.d.ts +0 -18
  340. package/dist/types/InputMask/MaskPipes.d.ts +0 -18
  341. package/dist/types/InputMask/MaskTypes.d.ts +0 -15
  342. package/dist/types/InputMask/addons/AutoCorrectedDatePipe.d.ts +0 -8
  343. package/dist/types/InputMask/defaultProps.d.ts +0 -28
  344. package/dist/types/InputMask/index.d.ts +0 -1
  345. package/dist/types/InputMask/mask_types/DateInputMask.d.ts +0 -36
  346. package/dist/types/InputMask/mask_types/DateTimeInputMask.d.ts +0 -36
  347. package/dist/types/InputMask/mask_types/DictionaryInputMask.d.ts +0 -39
  348. package/dist/types/InputMask/mask_types/NumberInputMask.d.ts +0 -48
  349. package/dist/types/InputMask/mask_types/PhoneInputMask.d.ts +0 -36
  350. package/dist/types/InputMask/mask_types/PhoneInternationalInputMask.d.ts +0 -36
  351. package/dist/types/InputMask/mask_types/SsnInputMask.d.ts +0 -36
  352. package/dist/types/InputMask/mask_types/UsZipCodeInputMask.d.ts +0 -36
  353. package/dist/types/InputMask/mask_types/ZipCodeSearchInputMask.d.ts +0 -36
  354. package/dist/types/InputMask/mask_types/index.d.ts +0 -41
  355. package/dist/types/InputMask/props.d.ts +0 -112
  356. package/dist/types/InputMask/tests/DSInputMask.test.d.ts +0 -1
  357. package/dist/types/InputMask/tests/NumberInputMask.test.d.ts +0 -1
  358. package/dist/types/InputMask/tests/events/DateInputMask.events.test.d.ts +0 -1
  359. package/dist/types/InputMask/tests/events/DateTimeInputMask.events.test.d.ts +0 -1
  360. package/dist/types/InputMask/tests/events/NumberInputMask.events.test.d.ts +0 -1
  361. package/dist/types/InputMask/tests/events/PercentInputMask.events.test.d.ts +0 -1
  362. package/dist/types/InputMask/tests/events/PhoneInputMask.events.test.d.ts +0 -1
  363. package/dist/types/InputMask/tests/events/PhoneInternationalInputMask.events.test.d.ts +0 -1
  364. package/dist/types/InputMask/tests/events/SsnInputMask.events.test.d.ts +0 -1
  365. package/dist/types/InputMask/tests/events/UsZipCodeInputMask.events.test.d.ts +0 -1
  366. package/dist/types/InputMask/tests/events/ZipCodeSearchInputMask.events.test.d.ts +0 -1
  367. package/dist/types/InputMask/types/index.d.ts +0 -5
  368. package/dist/types/InputMask/utils/setCaretPosition.d.ts +0 -3
  369. package/dist/types/InputProtected/DSInputProtected.d.ts +0 -41
  370. package/dist/types/InputProtected/defaultProps.d.ts +0 -4
  371. package/dist/types/InputProtected/index.d.ts +0 -2
  372. package/dist/types/InputProtected/options.d.ts +0 -8
  373. package/dist/types/InputProtected/props.d.ts +0 -14
  374. package/dist/types/InputProtected/tests/DSInputProtected.events.test.d.ts +0 -1
  375. package/dist/types/InputProtected/tests/DSInputProtected.test.d.ts +0 -1
  376. package/dist/types/LargeInputText/DSLargeInputText.d.ts +0 -127
  377. package/dist/types/LargeInputText/defaultProps.d.ts +0 -31
  378. package/dist/types/LargeInputText/index.d.ts +0 -1
  379. package/dist/types/LargeInputText/props.d.ts +0 -95
  380. package/dist/types/LargeInputText/tests/DSLargeInputText.events.test.d.ts +0 -1
  381. package/dist/types/LargeInputText/tests/DSLargeInputText.test.d.ts +0 -1
  382. package/dist/types/MenuItem/components/MenuItem/index.d.ts +0 -0
  383. package/dist/types/MenuItem/components/MenuItem/styled.d.ts +0 -0
  384. package/dist/types/MenuItem/components/MultiMenuItem/MultiMenuItem.d.ts +0 -0
  385. package/dist/types/MenuItem/components/MultiMenuItem/styled.d.ts +0 -0
  386. package/dist/types/MenuItem/components/Section/index.d.ts +0 -0
  387. package/dist/types/MenuItem/components/Section/props.d.ts +0 -0
  388. package/dist/types/MenuItem/components/Section/styled.d.ts +0 -0
  389. package/dist/types/MenuItem/components/Separator/index.d.ts +0 -0
  390. package/dist/types/MenuItem/components/Separator/styled.d.ts +0 -0
  391. package/dist/types/MenuItem/components/SingleMenuItem/SingleMenuItem.d.ts +0 -0
  392. package/dist/types/MenuItem/components/SubmenuItem/index.d.ts +0 -0
  393. package/dist/types/MenuItem/components/SubmenuItem/styled.d.ts +0 -0
  394. package/dist/types/MenuItem/components/index.d.ts +0 -0
  395. package/dist/types/MenuItem/components/styled.d.ts +0 -0
  396. package/dist/types/MenuItem/index.d.ts +0 -0
  397. package/dist/types/MenuItem/props.d.ts +0 -0
  398. package/dist/types/Radio/Circle.d.ts +0 -8
  399. package/dist/types/Radio/DSRadio.d.ts +0 -87
  400. package/dist/types/Radio/index.d.ts +0 -1
  401. package/dist/types/RadioGroup/DSRadioGroup.d.ts +0 -46
  402. package/dist/types/RadioGroup/defaultProps.d.ts +0 -12
  403. package/dist/types/RadioGroup/index.d.ts +0 -1
  404. package/dist/types/RadioGroup/props.d.ts +0 -25
  405. package/dist/types/RadioGroup/tests/DSRadioGroup.events.test.d.ts +0 -1
  406. package/dist/types/RequiredMark/RequiredMark.d.ts +0 -6
  407. package/dist/types/RequiredMark/index.d.ts +0 -1
  408. package/dist/types/SearchBox/index.d.ts +0 -1
  409. package/dist/types/TextBox/index.d.ts +0 -1
  410. package/dist/types/TimeInput/DSTimeInput.d.ts +0 -71
  411. package/dist/types/TimeInput/TimeInputImpl.d.ts +0 -55
  412. package/dist/types/TimeInput/TimeInputs.d.ts +0 -17
  413. package/dist/types/TimeInput/index.d.ts +0 -1
  414. package/dist/types/TimeInput/utils.d.ts +0 -39
  415. package/dist/types/Toggle/DSToggle.d.ts +0 -86
  416. package/dist/types/Toggle/DSToggleImpl.d.ts +0 -61
  417. package/dist/types/Toggle/DSToggleRender.d.ts +0 -32
  418. package/dist/types/Toggle/index.d.ts +0 -1
  419. package/dist/types/Toggle/props.d.ts +0 -47
  420. package/dist/types/Toggle/toggleHelper.d.ts +0 -24
  421. package/dist/types/index.d.ts +0 -21
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/LargeInputText/props.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-utilities';\n\nexport const props = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /**\n * Whether uses auto focus or not\n */\n autoFocus: PropTypes.bool.description('Whether uses auto focus or not'),\n /** CSS class */\n className: PropTypes.string.description('CSS class'),\n /**\n * Whether is disabled or not\n */\n disabled: PropTypes.bool.description('Whether is disabled or not'),\n /** HTML form name property */\n name: PropTypes.string.description('HTML form name property'),\n /** HTML id */\n id: PropTypes.number.description('HTML id'),\n /**\n * Max length for text to be entered\n */\n maxLength: PropTypes.number.description('Max length for text to be entered'),\n /**\n * Min length for text to be entered\n */\n minLength: PropTypes.number.description('Min length for text to be entered'),\n /**\n * Placeholder for the text\n */\n placeholder: PropTypes.string.description('Placeholder for the text'),\n /**\n * Allows a function that is triggered once the input text is clicked\n */\n onClick: PropTypes.func.description('Allows a function that is triggered once the input text is clicked'),\n /**\n * Allows a function that is triggered once the input text changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the input text changes'),\n /**\n * Allows a function that is triggered once the input text is focused\n */\n onFocus: PropTypes.func.description('Allows a function that is triggered once the input text is focused'),\n /**\n * Allows a function that is triggered once the input text loses focus\n */\n onBlur: PropTypes.func.description('Allows a function that is triggered once the input text loses focus'),\n /**\n * Allows a function that is triggered once in the input a keyboard key is released\n */\n onKeyUp: PropTypes.func.description(\n 'Allows a function that is triggered once in the input a keyboard key is released',\n ),\n /**\n * Allows a function that is triggered once a key is being pressed\n */\n onKeyDown: PropTypes.func.description('Allows a function that is triggered once a key is being pressed'),\n /**\n * Allows a function that is triggered once the input text is pasted\n */\n onPaste: PropTypes.func.description('Allows a function that is triggered once the input text is pasted'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description('Default value once the component is initialized'),\n /**\n * Whether the input text has error or not\n */\n hasError: PropTypes.bool.description('Whether the input text has error or not'),\n /**\n * Whether the input text is required or not\n */\n required: PropTypes.bool.description('Whether the input text is required or not'),\n /**\n * Whether the input text is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the input text is read only or not'),\n /**\n * Whether the input text style is vertical or not\n */\n resize: PropTypes.string.description('Whether the input text style is vertical or not'),\n /** ref forwarded to component */\n innerRef: PropTypes.func.description('ref forwarded to component'),\n /** a11y aria label */\n ariaLabel: PropTypes.string.description('a11y aria label'),\n ariaAutocomplete: PropTypes.string.description(''),\n /**\n * Type of input. Ex: textbox\n */\n role: PropTypes.string.description('Type of input. Ex: textbox'),\n /**\n * it will show a counter/limit if the value is greater than 0\n */\n characterLimitCounter: PropTypes.number.description('it will show a counter/limit if the value is greater than 0'),\n /**\n * Tab index html property.\n */\n tabIndex: PropTypes.string.description('Tab index html property.'),\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport const props = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /**\n * Whether uses auto focus or not\n */\n autoFocus: PropTypes.bool.description('Whether uses auto focus or not'),\n /** CSS class */\n className: PropTypes.string.description('CSS class'),\n /**\n * Whether is disabled or not\n */\n disabled: PropTypes.bool.description('Whether is disabled or not'),\n /** HTML form name property */\n name: PropTypes.string.description('HTML form name property'),\n /** HTML id */\n id: PropTypes.number.description('HTML id'),\n /**\n * Max length for text to be entered\n */\n maxLength: PropTypes.number.description('Max length for text to be entered'),\n /**\n * Min length for text to be entered\n */\n minLength: PropTypes.number.description('Min length for text to be entered'),\n /**\n * Placeholder for the text\n */\n placeholder: PropTypes.string.description('Placeholder for the text'),\n /**\n * Allows a function that is triggered once the input text is clicked\n */\n onClick: PropTypes.func.description('Allows a function that is triggered once the input text is clicked'),\n /**\n * Allows a function that is triggered once the input text changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the input text changes'),\n /**\n * Allows a function that is triggered once the input text is focused\n */\n onFocus: PropTypes.func.description('Allows a function that is triggered once the input text is focused'),\n /**\n * Allows a function that is triggered once the input text loses focus\n */\n onBlur: PropTypes.func.description('Allows a function that is triggered once the input text loses focus'),\n /**\n * Allows a function that is triggered once in the input a keyboard key is released\n */\n onKeyUp: PropTypes.func.description(\n 'Allows a function that is triggered once in the input a keyboard key is released',\n ),\n /**\n * Allows a function that is triggered once a key is being pressed\n */\n onKeyDown: PropTypes.func.description('Allows a function that is triggered once a key is being pressed'),\n /**\n * Allows a function that is triggered once the input text is pasted\n */\n onPaste: PropTypes.func.description('Allows a function that is triggered once the input text is pasted'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description('Default value once the component is initialized'),\n /**\n * Whether the input text has error or not\n */\n hasError: PropTypes.bool.description('Whether the input text has error or not'),\n /**\n * Whether the input text is required or not\n */\n required: PropTypes.bool.description('Whether the input text is required or not'),\n /**\n * Whether the input text is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the input text is read only or not'),\n /**\n * Whether the input text style is vertical or not\n */\n resize: PropTypes.string.description('Whether the input text style is vertical or not'),\n /** ref forwarded to component */\n innerRef: PropTypes.func.description('ref forwarded to component'),\n /** a11y aria label */\n ariaLabel: PropTypes.string.description('a11y aria label'),\n ariaAutocomplete: PropTypes.string.description(''),\n /**\n * Type of input. Ex: textbox\n */\n role: PropTypes.string.description('Type of input. Ex: textbox'),\n /**\n * it will show a counter/limit if the value is greater than 0\n */\n characterLimitCounter: PropTypes.number.description('it will show a counter/limit if the value is greater than 0'),\n /**\n * Tab index html property.\n */\n tabIndex: PropTypes.string.description('Tab index html property.'),\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAEnB,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,UAAU,OAAO,YAAY,gDAAgD;AAAA,EAI7F,WAAW,UAAU,KAAK,YAAY,gCAAgC;AAAA,EAEtE,WAAW,UAAU,OAAO,YAAY,WAAW;AAAA,EAInD,UAAU,UAAU,KAAK,YAAY,4BAA4B;AAAA,EAEjE,MAAM,UAAU,OAAO,YAAY,yBAAyB;AAAA,EAE5D,IAAI,UAAU,OAAO,YAAY,SAAS;AAAA,EAI1C,WAAW,UAAU,OAAO,YAAY,mCAAmC;AAAA,EAI3E,WAAW,UAAU,OAAO,YAAY,mCAAmC;AAAA,EAI3E,aAAa,UAAU,OAAO,YAAY,0BAA0B;AAAA,EAIpE,SAAS,UAAU,KAAK,YAAY,oEAAoE;AAAA,EAIxG,UAAU,UAAU,KAAK,YAAY,iEAAiE;AAAA,EAItG,SAAS,UAAU,KAAK,YAAY,oEAAoE;AAAA,EAIxG,QAAQ,UAAU,KAAK,YAAY,qEAAqE;AAAA,EAIxG,SAAS,UAAU,KAAK;AAAA,IACtB;AAAA,EACF;AAAA,EAIA,WAAW,UAAU,KAAK,YAAY,iEAAiE;AAAA,EAIvG,SAAS,UAAU,KAAK,YAAY,mEAAmE;AAAA,EAIvG,OAAO,UAAU,OAAO,YAAY,iDAAiD;AAAA,EAIrF,UAAU,UAAU,KAAK,YAAY,yCAAyC;AAAA,EAI9E,UAAU,UAAU,KAAK,YAAY,2CAA2C;AAAA,EAIhF,UAAU,UAAU,KAAK,YAAY,4CAA4C;AAAA,EAIjF,QAAQ,UAAU,OAAO,YAAY,iDAAiD;AAAA,EAEtF,UAAU,UAAU,KAAK,YAAY,4BAA4B;AAAA,EAEjE,WAAW,UAAU,OAAO,YAAY,iBAAiB;AAAA,EACzD,kBAAkB,UAAU,OAAO,YAAY,EAAE;AAAA,EAIjD,MAAM,UAAU,OAAO,YAAY,4BAA4B;AAAA,EAI/D,uBAAuB,UAAU,OAAO,YAAY,6DAA6D;AAAA,EAIjH,UAAU,UAAU,OAAO,YAAY,0BAA0B;AACnE;",
6
6
  "names": []
7
7
  }
@@ -1,9 +1,10 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useRef } from "react";
4
- import { PropTypes, describe } from "@elliemae/ds-utilities";
4
+ import { useDeprecateComponent } from "@elliemae/ds-utilities";
5
+ import { PropTypes, describe } from "@elliemae/ds-props-helpers";
5
6
  import { convertPropToCssClassName } from "@elliemae/ds-classnames";
6
- import { Circle } from "./Circle";
7
+ import { Circle } from "./Circle.js";
7
8
  const DSRadio = ({
8
9
  containerProps,
9
10
  className,
@@ -22,6 +23,7 @@ const DSRadio = ({
22
23
  innerRef,
23
24
  ...otherProps
24
25
  }) => {
26
+ useDeprecateComponent({ componentName: "ds-form/DSRadio", version: "3.x Date: 2023 Q1" });
25
27
  const { cssClassName, classNameElement } = convertPropToCssClassName("form-element-radio", className, {
26
28
  hasError,
27
29
  readOnly,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Radio/DSRadio.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable react/no-unknown-property */\nimport React, { useRef } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { Circle } from './Circle';\n\ninterface DSRadioT {\n [x: string]: unknown;\n innerRef?: React.MutableRefObject<HTMLInputElement>;\n containerProps?: { [x: string]: unknown };\n className?: string;\n style?: React.CSSProperties;\n labelText?: string;\n htmlFor?: string;\n hasError?: boolean;\n readOnly?: boolean;\n disabled?: boolean;\n checked?: boolean;\n value?: string;\n name?: string;\n onKeyDown?: React.KeyboardEventHandler<HTMLSpanElement>;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n children?: React.ReactNode | React.ReactNode[];\n tabIndex?: number;\n}\n\nconst DSRadio = ({\n containerProps,\n className,\n style,\n labelText,\n htmlFor,\n hasError,\n readOnly,\n disabled,\n checked,\n value,\n name,\n onChange,\n children,\n tabIndex,\n innerRef,\n ...otherProps\n}: DSRadioT) => {\n // this will be solved when we move to styled components...\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { cssClassName, classNameElement } = convertPropToCssClassName('form-element-radio', className, {\n hasError,\n readOnly,\n disabled,\n });\n const checkRef = useRef<HTMLInputElement | null>(null);\n return (\n <div {...containerProps} className={cssClassName}>\n <label className={classNameElement('label')} htmlFor={htmlFor}>\n <input\n {...otherProps}\n ref={checkRef}\n aria-disabled={disabled}\n checked={disabled ? false : checked}\n className={classNameElement('input')}\n disabled={disabled}\n name={name}\n onChange={(e) => {\n if (!readOnly && !disabled) {\n onChange(e);\n }\n }}\n readOnly={readOnly}\n tabIndex={-1}\n type=\"radio\"\n value={value}\n />\n <span\n ref={innerRef}\n aria-checked={checked}\n aria-disabled={disabled}\n className={classNameElement('input-button')}\n onKeyDown={(e) => {\n // really really bad pattern...\n // overwriting the target to point to the hidden input because the focus is on the span and not on the input...\n // we will solve this with a v2 of this when we move to controlled + styled components...\n e.target = checkRef.current;\n if (disabled) return;\n if (e.key === 'Enter' || e.keyCode === 32) {\n onChange(e);\n } else if (otherProps.onKeyDown) {\n otherProps.onKeyDown(e);\n }\n }}\n role=\"radio\"\n style={style}\n tabIndex={disabled ? -1 : tabIndex}\n // value={value} // should be unused?\n >\n <Circle checked={checked} />\n </span>\n <span className={classNameElement('label-text')}>{labelText}</span>\n </label>\n {children && <div className={classNameElement('radio-children')}>{children}</div>}\n </div>\n );\n};\n\nDSRadio.defaultProps = {\n containerProps: {},\n className: '',\n hasError: false,\n readOnly: false,\n disabled: false,\n checked: false,\n name: '',\n onChange: () => null,\n children: null,\n tabIndex: 0,\n};\n\nconst radioProps = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /** css class prop */\n className: PropTypes.string.description('css class prop'),\n /** name property to manage form */\n name: PropTypes.string.description('name property to manage form'),\n /**\n * Displayable label for the radio\n */\n labelText: PropTypes.string.description('Displayable label for the radio'),\n /** HTMLFOR property to manage form */\n htmlFor: PropTypes.element.description('HTMLFOR property to manage form'),\n /**\n * Whether the radio has error or not\n */\n hasError: PropTypes.bool.description('Whether the radio has error or not'),\n /**\n * Whether the radio is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the radio is read only or not'),\n /**\n * Whether the radio is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the radio is disabled or not'),\n /**\n * Whether the radio is checked or not\n */\n checked: PropTypes.bool.description('Whether the radio is checked or not'),\n /**\n * Value that takes the checkbox if it is checked\n */\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]).description(\n 'Value that takes the checkbox if it is checked',\n ).isRequired,\n /**\n * Allows a function that is triggered once the radio changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the radio changes'),\n /**\n * Optional, if you want a checkbox customized\n */\n children: PropTypes.node.description('Optional, if you want a checkbox customized'),\n /** HTML tabindex to manage focus */\n tabIndex: PropTypes.number.description('HTML tabindex to manage focus'),\n /** style override object */\n style: PropTypes.object.description('style override object'),\n};\n\nDSRadio.propTypes = radioProps;\nDSRadio.displayName = 'DSRadio';\nconst DSRadioWithSchema = describe(DSRadio);\nDSRadioWithSchema.propTypes = radioProps;\n\nexport { DSRadio, DSRadioWithSchema };\n\nexport default DSRadio;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACuDjB,SACE,KADF;AArDN,SAAgB,cAAc;AAC9B,SAAS,WAAW,gBAAgB;AACpC,SAAS,iCAAiC;AAC1C,SAAS,cAAc;AAsBvB,MAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,KACG;AACL,MAAgB;AAGd,QAAM,EAAE,cAAc,iBAAiB,IAAI,0BAA0B,sBAAsB,WAAW;AAAA,IACpG;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,WAAW,OAAgC,IAAI;AACrD,SACE,qBAAC,SAAK,GAAG,gBAAgB,WAAW,cAClC;AAAA,yBAAC,WAAM,WAAW,iBAAiB,OAAO,GAAG,SAC3C;AAAA;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ,KAAK;AAAA,UACL,iBAAe;AAAA,UACf,SAAS,WAAW,Q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,UAAU,OAAO,YAAY,iCAAiC;AAAA,EAEzE,SAAS,UAAU,QAAQ,YAAY,iCAAiC;AAAA,EAIxE,UAAU,UAAU,KAAK,YAAY,oCAAoC;AAAA,EAIzE,UAAU,UAAU,KAAK,YAAY,uCAAuC;AAAA,EAI5E,UAAU,UAAU,KAAK,YAAY,sCAAsC;AAAA,EAI3E,SAAS,UAAU,KAAK,YAAY,qCAAqC;AAAA,EAIzE,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE;AAAA,IACjF;AAAA,EACF,EAAE;AAAA,EAIF,UAAU,UAAU,KAAK,YAAY,4DAA4D;AAAA,EAIjG,UAAU,UAAU,KAAK,YAAY,6CAA6C;AAAA,EAElF,UAAU,UAAU,OAAO,YAAY,+BAA+B;AAAA,EAEtE,OAAO,UAAU,OAAO,YAAY,uBAAuB;AAC7D;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,oBAAoB,SAAS,OAAO;AAC1C,kBAAkB,YAAY;AAI9B,IAAO,kBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable react/no-unknown-property */\nimport React, { useRef } from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { Circle } from './Circle.js';\n\ninterface DSRadioT {\n [x: string]: unknown;\n innerRef?: React.MutableRefObject<HTMLInputElement>;\n containerProps?: { [x: string]: unknown };\n className?: string;\n style?: React.CSSProperties;\n labelText?: string;\n htmlFor?: string;\n hasError?: boolean;\n readOnly?: boolean;\n disabled?: boolean;\n checked?: boolean;\n value?: string;\n name?: string;\n onKeyDown?: React.KeyboardEventHandler<HTMLSpanElement>;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n children?: React.ReactNode | React.ReactNode[];\n tabIndex?: number;\n}\n\nconst DSRadio = ({\n containerProps,\n className,\n style,\n labelText,\n htmlFor,\n hasError,\n readOnly,\n disabled,\n checked,\n value,\n name,\n onChange,\n children,\n tabIndex,\n innerRef,\n ...otherProps\n}: DSRadioT) => {\n useDeprecateComponent({ componentName: 'ds-form/DSRadio', version: '3.x Date: 2023 Q1' });\n\n // this will be solved when we move to styled components...\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { cssClassName, classNameElement } = convertPropToCssClassName('form-element-radio', className, {\n hasError,\n readOnly,\n disabled,\n });\n const checkRef = useRef<HTMLInputElement | null>(null);\n return (\n <div {...containerProps} className={cssClassName}>\n <label className={classNameElement('label')} htmlFor={htmlFor}>\n <input\n {...otherProps}\n ref={checkRef}\n aria-disabled={disabled}\n checked={disabled ? false : checked}\n className={classNameElement('input')}\n disabled={disabled}\n name={name}\n onChange={(e) => {\n if (!readOnly && !disabled) {\n onChange(e);\n }\n }}\n readOnly={readOnly}\n tabIndex={-1}\n type=\"radio\"\n value={value}\n />\n <span\n ref={innerRef}\n aria-checked={checked}\n aria-disabled={disabled}\n className={classNameElement('input-button')}\n onKeyDown={(e) => {\n // really really bad pattern...\n // overwriting the target to point to the hidden input because the focus is on the span and not on the input...\n // we will solve this with a v2 of this when we move to controlled + styled components...\n e.target = checkRef.current;\n if (disabled) return;\n if (e.key === 'Enter' || e.keyCode === 32) {\n onChange(e);\n } else if (otherProps.onKeyDown) {\n otherProps.onKeyDown(e);\n }\n }}\n role=\"radio\"\n style={style}\n tabIndex={disabled ? -1 : tabIndex}\n // value={value} // should be unused?\n >\n <Circle checked={checked} />\n </span>\n <span className={classNameElement('label-text')}>{labelText}</span>\n </label>\n {children && <div className={classNameElement('radio-children')}>{children}</div>}\n </div>\n );\n};\n\nDSRadio.defaultProps = {\n containerProps: {},\n className: '',\n hasError: false,\n readOnly: false,\n disabled: false,\n checked: false,\n name: '',\n onChange: () => null,\n children: null,\n tabIndex: 0,\n};\n\nconst radioProps = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /** css class prop */\n className: PropTypes.string.description('css class prop'),\n /** name property to manage form */\n name: PropTypes.string.description('name property to manage form'),\n /**\n * Displayable label for the radio\n */\n labelText: PropTypes.string.description('Displayable label for the radio'),\n /** HTMLFOR property to manage form */\n htmlFor: PropTypes.element.description('HTMLFOR property to manage form'),\n /**\n * Whether the radio has error or not\n */\n hasError: PropTypes.bool.description('Whether the radio has error or not'),\n /**\n * Whether the radio is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the radio is read only or not'),\n /**\n * Whether the radio is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the radio is disabled or not'),\n /**\n * Whether the radio is checked or not\n */\n checked: PropTypes.bool.description('Whether the radio is checked or not'),\n /**\n * Value that takes the checkbox if it is checked\n */\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]).description(\n 'Value that takes the checkbox if it is checked',\n ).isRequired,\n /**\n * Allows a function that is triggered once the radio changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the radio changes'),\n /**\n * Optional, if you want a checkbox customized\n */\n children: PropTypes.node.description('Optional, if you want a checkbox customized'),\n /** HTML tabindex to manage focus */\n tabIndex: PropTypes.number.description('HTML tabindex to manage focus'),\n /** style override object */\n style: PropTypes.object.description('style override object'),\n};\n\nDSRadio.propTypes = radioProps;\nDSRadio.displayName = 'DSRadio';\nconst DSRadioWithSchema = describe(DSRadio);\nDSRadioWithSchema.propTypes = radioProps;\n\nexport { DSRadio, DSRadioWithSchema };\n\nexport default DSRadio;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC0DjB,SACE,KADF;AAxDN,SAAgB,cAAc;AAC9B,SAAS,6BAA6B;AACtC,SAAS,WAAW,gBAAgB;AACpC,SAAS,iCAAiC;AAC1C,SAAS,cAAc;AAsBvB,MAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA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@@
1
1
  import * as React from "react";
2
- export * from "./DSRadio";
2
+ export * from "./DSRadio.js";
3
3
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Radio/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSRadio';\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSRadio.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,12 +1,12 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import React2 from "react";
4
- import { describe } from "@elliemae/ds-utilities";
4
+ import { describe } from "@elliemae/ds-props-helpers";
5
5
  import { GroupItem, Group } from "@elliemae/ds-shared";
6
- import { DSFormItemLayout } from "../FormItem";
7
- import { DSRadio } from "../Radio";
8
- import { props as rprops } from "./props";
9
- import { defaultProps } from "./defaultProps";
6
+ import { DSFormItemLayout } from "../FormItem/index.js";
7
+ import { DSRadio } from "../Radio/index.js";
8
+ import { props as rprops } from "./props.js";
9
+ import { defaultProps } from "./defaultProps.js";
10
10
  const emClassPrefix = "em-ds";
11
11
  const baseClass = `${emClassPrefix}-radio-group`;
12
12
  const RadioItem = (props) => /* @__PURE__ */ jsx(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/RadioGroup/DSRadioGroup.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-utilities';\nimport { GroupItem, Group } from '@elliemae/ds-shared';\nimport { DSFormItemLayout } from '../FormItem';\nimport { DSRadio } from '../Radio';\nimport { props as rprops } from './props';\nimport { defaultProps } from './defaultProps';\n\nconst emClassPrefix = 'em-ds';\nconst baseClass = `${emClassPrefix}-radio-group`;\n\nconst RadioItem = (props) => (\n <GroupItem\n render={(context) => (\n <DSRadio\n {...props}\n checked={context.activeValue === props.value}\n disabled={context.disabled || props.disabled}\n onChange={context.onChange}\n />\n )}\n />\n);\n\nconst DSRadioGroup = ({\n containerProps,\n onChange,\n activeValue,\n children,\n orientation,\n disabled,\n truncateText,\n labelProps,\n}) => {\n const checkRefs = [];\n const count = React.Children.count(children);\n const onKeyDown = (e, index) => {\n if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n if (index === 0) checkRefs[count - 1].focus();\n else checkRefs[index - 1].focus();\n }\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n if (index === count - 1) checkRefs[0].focus();\n else checkRefs[index + 1].focus();\n }\n };\n const group = (\n <Group activeValue={activeValue} disabled={disabled} onChange={onChange}>\n <div\n data-testid=\"ds-radiogroup\"\n {...(labelProps && labelProps.labelText ? {} : containerProps)}\n className={`${baseClass} ${baseClass}--${orientation}`}\n role=\"group\"\n >\n {React.Children.map(\n children,\n (child, index) => (\n <RadioItem\n {...child.props}\n innerRef={(t) => {\n checkRefs.push(t);\n }}\n onKeyDown={(e) => onKeyDown(e, index)}\n />\n ),\n null,\n )}\n </div>\n </Group>\n );\n\n if (labelProps && labelProps.labelText) {\n return (\n <div className={`${baseClass}-form-item-layout-wrapper`} {...containerProps} role=\"group\">\n <DSFormItemLayout {...labelProps} inputComponent={group} onChange={onChange} truncateText={truncateText} />\n </div>\n );\n }\n return group;\n};\n\nDSRadioGroup.propTypes = rprops;\nDSRadioGroup.defaultProps = defaultProps;\nDSRadioGroup.displayName = 'DSRadioGroup';\nconst DSRadioGroupWithSchema = describe(DSRadioGroup);\nDSRadioGroupWithSchema.propTypes = rprops;\n\nexport { DSRadioGroup, DSRadioGroupWithSchema };\n\nexport default DSRadioGroup;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { GroupItem, Group } from '@elliemae/ds-shared';\nimport { DSFormItemLayout } from '../FormItem/index.js';\nimport { DSRadio } from '../Radio/index.js';\nimport { props as rprops } from './props.js';\nimport { defaultProps } from './defaultProps.js';\n\nconst emClassPrefix = 'em-ds';\nconst baseClass = `${emClassPrefix}-radio-group`;\n\nconst RadioItem = (props) => (\n <GroupItem\n render={(context) => (\n <DSRadio\n {...props}\n checked={context.activeValue === props.value}\n disabled={context.disabled || props.disabled}\n onChange={context.onChange}\n />\n )}\n />\n);\n\nconst DSRadioGroup = ({\n containerProps,\n onChange,\n activeValue,\n children,\n orientation,\n disabled,\n truncateText,\n labelProps,\n}) => {\n const checkRefs = [];\n const count = React.Children.count(children);\n const onKeyDown = (e, index) => {\n if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n if (index === 0) checkRefs[count - 1].focus();\n else checkRefs[index - 1].focus();\n }\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n if (index === count - 1) checkRefs[0].focus();\n else checkRefs[index + 1].focus();\n }\n };\n const group = (\n <Group activeValue={activeValue} disabled={disabled} onChange={onChange}>\n <div\n data-testid=\"ds-radiogroup\"\n {...(labelProps && labelProps.labelText ? {} : containerProps)}\n className={`${baseClass} ${baseClass}--${orientation}`}\n role=\"group\"\n >\n {React.Children.map(\n children,\n (child, index) => (\n <RadioItem\n {...child.props}\n innerRef={(t) => {\n checkRefs.push(t);\n }}\n onKeyDown={(e) => onKeyDown(e, index)}\n />\n ),\n null,\n )}\n </div>\n </Group>\n );\n\n if (labelProps && labelProps.labelText) {\n return (\n <div className={`${baseClass}-form-item-layout-wrapper`} {...containerProps} role=\"group\">\n <DSFormItemLayout {...labelProps} inputComponent={group} onChange={onChange} truncateText={truncateText} />\n </div>\n );\n }\n return group;\n};\n\nDSRadioGroup.propTypes = rprops;\nDSRadioGroup.defaultProps = defaultProps;\nDSRadioGroup.displayName = 'DSRadioGroup';\nconst DSRadioGroupWithSchema = describe(DSRadioGroup);\nDSRadioGroupWithSchema.propTypes = rprops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AW,GAAG,aAAa,cAAc;AAAA,MACzC,MAAK;AAAA,MAEJ,UAAAA,OAAM,SAAS;AAAA,QACd;AAAA,QACA,CAAC,OAAO,UACN;AAAA,UAAC;AAAA;AAAA,YACE,GAAG,MAAM;AAAA,YACV,UAAU,CAAC,MAAM;AACf,wBAAU,KAAK,CAAC;AAAA,YAClB;AAAA,YACA,WAAW,CAAC,MAAM,UAAU,GAAG,KAAK;AAAA;AAAA,QACtC;AAAA,QAEF;AAAA,MACF;AAAA;AAAA,EACF,GACF;AAGF,MAAI,cAAc,WAAW,WAAW;AACtC,WACE,oBAAC,SAAI,WAAW,GAAG,sCAAuC,GAAG,gBAAgB,MAAK,SAChF,8BAAC,oBAAkB,GAAG,YAAY,gBAAgB,OAAO,UAAoB,cAA4B,GAC3G;AAAA,EAEJ;AACA,SAAO;AACT;AAEA,aAAa,YAAY;AACzB,aAAa,eAAe;AAC5B,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAInC,IAAO,uBAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,3 +1,3 @@
1
1
  import * as React from "react";
2
- export * from "./DSRadioGroup";
2
+ export * from "./DSRadioGroup.js";
3
3
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/RadioGroup/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSRadioGroup';\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSRadioGroup.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { PropTypes } from "@elliemae/ds-utilities";
2
+ import { PropTypes } from "@elliemae/ds-props-helpers";
3
3
  import { orientation as radioGroupOrientation } from "@elliemae/ds-shared";
4
4
  const props = {
5
5
  containerProps: PropTypes.object.description("Inject props to component wrapper"),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/RadioGroup/props.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-utilities';\nimport { orientation as radioGroupOrientation } from '@elliemae/ds-shared';\n\nexport const props = {\n /** Inject props to component wrapper */\n containerProps: PropTypes.object.description('Inject props to component wrapper'),\n /**\n * Allows a function that is triggered once the radio group changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the radio group changes'),\n /**\n * Selected default active value\n */\n activeValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Selected default active value'),\n /**\n * Radio group items to show of type DSRadio\n */\n children: PropTypes.arrayOf(PropTypes.element).isRequired.description('Radio group items to show of type DSRadio'),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(radioGroupOrientation).description(\"['horizontal', 'vertical']\"),\n /**\n * Whether the radio group is disabled or not\n */\n disabled: PropTypes.bool.description(''),\n labelProps: PropTypes.shape({\n feedbackMessage: PropTypes.string,\n labelText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n required: PropTypes.bool,\n }).description('Whether the radio group is disabled or not'),\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\nimport { orientation as radioGroupOrientation } from '@elliemae/ds-shared';\n\nexport const props = {\n /** Inject props to component wrapper */\n containerProps: PropTypes.object.description('Inject props to component wrapper'),\n /**\n * Allows a function that is triggered once the radio group changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the radio group changes'),\n /**\n * Selected default active value\n */\n activeValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Selected default active value'),\n /**\n * Radio group items to show of type DSRadio\n */\n children: PropTypes.arrayOf(PropTypes.element).isRequired.description('Radio group items to show of type DSRadio'),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(radioGroupOrientation).description(\"['horizontal', 'vertical']\"),\n /**\n * Whether the radio group is disabled or not\n */\n disabled: PropTypes.bool.description(''),\n labelProps: PropTypes.shape({\n feedbackMessage: PropTypes.string,\n labelText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n required: PropTypes.bool,\n }).description('Whether the radio group is disabled or not'),\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAC1B,SAAS,eAAe,6BAA6B;AAE9C,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,UAAU,OAAO,YAAY,mCAAmC;AAAA,EAIhF,UAAU,UAAU,KAAK,YAAY,kEAAkE;AAAA,EAIvG,aAAa,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAAY,+BAA+B;AAAA,EAIlH,UAAU,UAAU,QAAQ,UAAU,OAAO,EAAE,WAAW,YAAY,2CAA2C;AAAA,EAIjH,aAAa,UAAU,MAAM,qBAAqB,EAAE,YAAY,4BAA4B;AAAA,EAI5F,UAAU,UAAU,KAAK,YAAY,EAAE;AAAA,EACvC,YAAY,UAAU,MAAM;AAAA,IAC1B,iBAAiB,UAAU;AAAA,IAC3B,WAAW,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO,CAAC;AAAA,IACpE,UAAU,UAAU;AAAA,EACtB,CAAC,EAAE,YAAY,4CAA4C;AAC7D;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,3 @@
1
1
  import * as React from "react";
2
- export * from "./RequiredMark";
2
+ export * from "./RequiredMark.js";
3
3
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/RequiredMark/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './RequiredMark';\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './RequiredMark.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { PropTypes, describe } from "@elliemae/ds-utilities";
4
- import { DSInput } from "../Input";
5
- import { TimeInputImpl } from "./TimeInputImpl";
3
+ import { PropTypes, describe } from "@elliemae/ds-props-helpers";
4
+ import { DSInput } from "../Input/index.js";
5
+ import { TimeInputImpl } from "./TimeInputImpl.js";
6
6
  const DSTimeInput = ({
7
7
  containerProps = {},
8
8
  innerRef,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/TimeInput/DSTimeInput.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { DSInput } from '../Input';\nimport { TimeInputImpl } from './TimeInputImpl';\n\nconst DSTimeInput = ({\n containerProps = {},\n innerRef,\n className = '',\n style = {},\n onChange = () => null,\n format,\n value = '',\n clearable = false,\n disabled = false,\n ariaLabel = 'Time input',\n}) => (\n <DSInput\n className={className}\n clearable={clearable}\n containerProps={containerProps}\n customInputType={({ onChange: inputOnChange, ...restInputProps }) => (\n <TimeInputImpl\n aria-label={ariaLabel}\n disabled={disabled}\n format={format}\n onChange={(time) => inputOnChange(time)}\n {...restInputProps}\n style={style}\n />\n )}\n disabled={disabled}\n innerRef={innerRef}\n isShowElipsisActive={false}\n onChange={onChange}\n onClear={() => onChange(null)}\n value={value}\n />\n);\n\nDSTimeInput.defaultProps = {\n format: 'hh:mm:ss',\n disabled: false,\n clearable: true,\n};\n\nconst props = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /**\n * Allows a function that is triggered once the time input changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the time input changes'),\n /** a11y aria label */\n 'aria-label': PropTypes.string.description('a11y aria label'),\n /** style object for time input wrapper */\n style: PropTypes.object.description('style object for time input wrapper'),\n /** inner ref for time inpot wrapper */\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'inner ref for time input wrapper',\n ),\n /** class for time input */\n className: PropTypes.string.description('class for time input'),\n /**\n * Valid time format\n */\n format: PropTypes.string.description('Valid time format'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description('Default value once the component is initialized'),\n /**\n * Whether the time input is clearable or not\n */\n clearable: PropTypes.bool.description('Whether the time input is clearable or not'),\n /**\n * Whether the time input is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the time input is disabled or not'),\n /**\n * Aria label\n */\n ariaLabel: PropTypes.string.description('Aria label'),\n};\n\nDSTimeInput.propTypes = props;\nDSTimeInput.displayName = 'DSTimeInput';\nconst DSTimeInputWithSchema = describe(DSTimeInput);\nDSTimeInputWithSchema.propTypes = props;\n\nexport { TimeInputImpl, DSTimeInputWithSchema, DSTimeInput };\n\nexport default DSTimeInput;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { DSInput } from '../Input/index.js';\nimport { TimeInputImpl } from './TimeInputImpl.js';\n\nconst DSTimeInput = ({\n containerProps = {},\n innerRef,\n className = '',\n style = {},\n onChange = () => null,\n format,\n value = '',\n clearable = false,\n disabled = false,\n ariaLabel = 'Time input',\n}) => (\n <DSInput\n className={className}\n clearable={clearable}\n containerProps={containerProps}\n customInputType={({ onChange: inputOnChange, ...restInputProps }) => (\n <TimeInputImpl\n aria-label={ariaLabel}\n disabled={disabled}\n format={format}\n onChange={(time) => inputOnChange(time)}\n {...restInputProps}\n style={style}\n />\n )}\n disabled={disabled}\n innerRef={innerRef}\n isShowElipsisActive={false}\n onChange={onChange}\n onClear={() => onChange(null)}\n value={value}\n />\n);\n\nDSTimeInput.defaultProps = {\n format: 'hh:mm:ss',\n disabled: false,\n clearable: true,\n};\n\nconst props = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /**\n * Allows a function that is triggered once the time input changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the time input changes'),\n /** a11y aria label */\n 'aria-label': PropTypes.string.description('a11y aria label'),\n /** style object for time input wrapper */\n style: PropTypes.object.description('style object for time input wrapper'),\n /** inner ref for time inpot wrapper */\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'inner ref for time input wrapper',\n ),\n /** class for time input */\n className: PropTypes.string.description('class for time input'),\n /**\n * Valid time format\n */\n format: PropTypes.string.description('Valid time format'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description('Default value once the component is initialized'),\n /**\n * Whether the time input is clearable or not\n */\n clearable: PropTypes.bool.description('Whether the time input is clearable or not'),\n /**\n * Whether the time input is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the time input is disabled or not'),\n /**\n * Aria label\n */\n ariaLabel: PropTypes.string.description('Aria label'),\n};\n\nDSTimeInput.propTypes = props;\nDSTimeInput.displayName = 'DSTimeInput';\nconst DSTimeInputWithSchema = describe(DSTimeInput);\nDSTimeInputWithSchema.propTypes = props;\n\nexport { TimeInputImpl, DSTimeInputWithSchema, DSTimeInput };\n\nexport default DSTimeInput;\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACsBjB;AArBN,SAAS,WAAW,gBAAgB;AACpC,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAE9B,MAAM,cAAc,CAAC;AAAA,EACnB,iBAAiB,CAAC;AAAA,EAClB;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ,CAAC;AAAA,EACT,WAAW,MAAM;AAAA,EACjB;AAAA,EACA,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,WAAW;AAA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 @@ import PropTypes from "prop-types";
5
5
  import { getVisibleTimeByFormat } from "@elliemae/ds-utilities";
6
6
  import memoizeOne from "memoize-one";
7
7
  import { aggregatedClasses } from "@elliemae/ds-classnames";
8
- import { TimeInputs } from "./TimeInputs";
8
+ import { TimeInputs } from "./TimeInputs.js";
9
9
  const blockName = "input-time";
10
10
  const InputTimeContainer = aggregatedClasses("div")(blockName);
11
11
  const TimeInputImpl = ({
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/TimeInput/TimeInputImpl.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { getVisibleTimeByFormat } from '@elliemae/ds-utilities';\nimport memoizeOne from 'memoize-one';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { TimeInputs } from './TimeInputs';\n\nconst blockName = 'input-time';\n\nconst InputTimeContainer = aggregatedClasses('div')(blockName);\n\nconst TimeInputImpl = ({\n format,\n innerRef,\n onChange,\n className,\n value,\n disabled,\n clearable,\n 'arial-label': ariaLabel,\n}) => {\n const getVisibleTimeInputs = memoizeOne((formatValue) => getVisibleTimeByFormat(formatValue));\n let inputsContainer = useRef();\n\n const handleFocus = (e) => {\n if (!e.target.type) {\n inputsContainer.querySelector('input').focus();\n }\n };\n\n const visibleInputs = useMemo(() => getVisibleTimeInputs(format));\n\n return (\n <InputTimeContainer className={className} disabled={disabled} innerRef={innerRef} onClick={handleFocus}>\n <TimeInputs\n aria-label={ariaLabel}\n clearable={clearable}\n disabled={disabled}\n format={format}\n innerRef={(node) => {\n inputsContainer = node;\n }}\n onChange={onChange}\n time={value}\n {...visibleInputs}\n />\n </InputTimeContainer>\n );\n};\n\nTimeInputImpl.propTypes = {\n containerProps: PropTypes.shape({}),\n /**\n * Inner reference to the input\n */\n innerRef: PropTypes.any,\n /**\n * Classes to add to the container\n */\n className: PropTypes.string,\n /**\n * Styles to add to the container\n */\n style: PropTypes.shape({}),\n /**\n * Allows a function that is triggered once the time input changes\n */\n onChange: PropTypes.func,\n /**\n * Valid time format\n */\n format: PropTypes.string,\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string,\n /**\n * Whether the time input is clearable or not\n */\n clearable: PropTypes.bool,\n /**\n * Whether the time input is disabled or not\n */\n disabled: PropTypes.bool,\n /**\n * Aria label to add to the container\n */\n 'aria-label': PropTypes.bool,\n 'arial-label': PropTypes.bool,\n};\n\nexport { TimeInputImpl };\nexport default TimeInputImpl;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { getVisibleTimeByFormat } from '@elliemae/ds-utilities';\nimport memoizeOne from 'memoize-one';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { TimeInputs } from './TimeInputs.js';\n\nconst blockName = 'input-time';\n\nconst InputTimeContainer = aggregatedClasses('div')(blockName);\n\nconst TimeInputImpl = ({\n format,\n innerRef,\n onChange,\n className,\n value,\n disabled,\n clearable,\n 'arial-label': ariaLabel,\n}) => {\n const getVisibleTimeInputs = memoizeOne((formatValue) => getVisibleTimeByFormat(formatValue));\n let inputsContainer = useRef();\n\n const handleFocus = (e) => {\n if (!e.target.type) {\n inputsContainer.querySelector('input').focus();\n }\n };\n\n const visibleInputs = useMemo(() => getVisibleTimeInputs(format));\n\n return (\n <InputTimeContainer className={className} disabled={disabled} innerRef={innerRef} onClick={handleFocus}>\n <TimeInputs\n aria-label={ariaLabel}\n clearable={clearable}\n disabled={disabled}\n format={format}\n innerRef={(node) => {\n inputsContainer = node;\n }}\n onChange={onChange}\n time={value}\n {...visibleInputs}\n />\n </InputTimeContainer>\n );\n};\n\nTimeInputImpl.propTypes = {\n containerProps: PropTypes.shape({}),\n /**\n * Inner reference to the input\n */\n innerRef: PropTypes.any,\n /**\n * Classes to add to the container\n */\n className: PropTypes.string,\n /**\n * Styles to add to the container\n */\n style: PropTypes.shape({}),\n /**\n * Allows a function that is triggered once the time input changes\n */\n onChange: PropTypes.func,\n /**\n * Valid time format\n */\n format: PropTypes.string,\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string,\n /**\n * Whether the time input is clearable or not\n */\n clearable: PropTypes.bool,\n /**\n * Whether the time input is disabled or not\n */\n disabled: PropTypes.bool,\n /**\n * Aria label to add to the container\n */\n 'aria-label': PropTypes.bool,\n 'arial-label': PropTypes.bool,\n};\n\nexport { TimeInputImpl };\nexport default TimeInputImpl;\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACkCjB;AAlCN,SAAgB,QAAQ,eAAe;AACvC,OAAO,eAAe;AACtB,SAAS,8BAA8B;AACvC,OAAO,gBAAgB;AACvB,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAE3B,MAAM,YAAY;AAElB,MAAM,qBAAqB,kBAAkB,KAAK,EAAE,SAAS;AAE7D,MAAM,gBAAgB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,uBAAuB,WAAW,CAAC,gBAAgB,uBAAuB,WAAW,CAAC;AAC5F,MAAI,kBAAkB,OAAO;AAE7B,QAAM,cAAc,CAAC,MAAM;AACzB,QAAI,CAAC,EAAE,OAAO,MAAM;AAClB,sBAAgB,cAAc,OAAO,EAAE,MAAM;AAAA,IAC/C;AAAA,EACF;AAEA,QAAM,gBAAgB,QAAQ,MAAM,qBAAqB,MAAM,CAAC;AAEhE,SACE,oBAAC,sBAAmB,WAAsB,UAAoB,UAAoB,SAAS,aACzF;AAAA,IAAC;AAAA;AAAA,MACC,cAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU,CAAC,SAAS;AAClB,0BAAkB;AAAA,MACpB;AAAA,MACA;AAAA,MACA,MAAM;AAAA,MACL,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;AAEA,cAAc,YAAY;AAAA,EACxB,gBAAgB,UAAU,MAAM,CAAC,CAAC;AAAA,EAIlC,UAAU,UAAU;AAAA,EAIpB,WAAW,UAAU;AAAA,EAIrB,OAAO,UAAU,MAAM,CAAC,CAAC;AAAA,EAIzB,UAAU,UAAU;AAAA,EAIpB,QAAQ,UAAU;AAAA,EAIlB,OAAO,UAAU;AAAA,EAIjB,WAAW,UAAU;AAAA,EAIrB,UAAU,UAAU;AAAA,EAIpB,cAAc,UAAU;AAAA,EACxB,eAAe,UAAU;AAC3B;AAGA,IAAO,wBAAQ;",
6
6
  "names": []
7
7
  }
@@ -19,7 +19,7 @@ import {
19
19
  isArrowIncrementDecrement,
20
20
  shouldFocusNextInput,
21
21
  placeholderFormat
22
- } from "./utils";
22
+ } from "./utils.js";
23
23
  import {
24
24
  AM,
25
25
  PM,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/TimeInput/TimeInputs.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\n/* eslint-disable max-statements */\nimport React, { useEffect, useState } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport moment from 'moment';\nimport {\n commonInputProps,\n formatHour,\n formatMinutes,\n formatSeconds,\n formatMeridiem,\n getValidTimeNumber,\n setNativeValue,\n parseTimeNumberFromText,\n focusNextInput,\n focusPreviousInput,\n getTimeValuesFromTime,\n isArrowIncrementDecrement,\n shouldFocusNextInput,\n placeholderFormat,\n} from './utils';\nimport {\n AM,\n PM,\n ARROW_UP,\n ARROW_DOWN,\n BACKSPACE,\n ESCAPE,\n HOME,\n HOUR_RANGE_12,\n HOUR_RANGE_24,\n GENERAL_TIME_RANGE,\n END,\n PLACEHOLDER_TIME,\n SHIFT,\n} from '@elliemae/ds-shared';\n\nconst blockName = 'input-times-group';\n\nconst InputTimesGroup = aggregatedClasses('div')(blockName);\nconst TimeInput = aggregatedClasses('input')(blockName, 'input');\nconst Divider = aggregatedClasses('span')(blockName, 'divider', ({ value }) => ({\n value,\n}));\n\n// eslint-disable-next-line react/prop-types\nconst TimeDivider = ({ content = ':', value = '' }) => <Divider value={!!value}>{content}</Divider>;\n\nconst TimeInputs = ({\n time,\n format,\n use12Hours,\n step = 1,\n showHours,\n showMinutes,\n showSeconds,\n onChange,\n disabled,\n innerRef,\n clearable,\n 'arial-label': ariaLabel,\n 'aria-label': ariaLabel2,\n}) => {\n const [meridiem, setMeridiem] = useState('');\n const [hours, setHours] = useState('');\n const [minutes, setMinutes] = useState('');\n const [hasInputValue, setHasInputValue] = useState(false);\n const [seconds, setSeconds] = useState('');\n const [currentKey, setCurrentKey] = useState('');\n const [hasInputBeenTriggered, setHasInputBeenTriggered] = useState(false);\n\n const [lastTypedNumber, setLastTypedNumber] = useState(null);\n const inputRefs = {\n hours: null,\n minutes: null,\n seconds: null,\n meridiem: null,\n };\n\n useEffect(() => {\n if (time && moment(time).isValid()) {\n const timeValues = getTimeValuesFromTime(time, format, use12Hours);\n\n setMeridiem(timeValues.meridiem);\n setHours(timeValues.hours);\n setMinutes(timeValues.minutes);\n setSeconds(timeValues.seconds);\n } else {\n setMeridiem('');\n setHours('');\n setMinutes('');\n setSeconds('');\n }\n }, [time, format, use12Hours]);\n\n useEffect(() => {\n const selectedTime = time || moment();\n if (isTimeCompletelySet() && selectedTime.hours && hasInputBeenTriggered) {\n if (showHours && hours) selectedTime.hours(hours);\n if (showMinutes && minutes) selectedTime.minutes(minutes);\n if (showSeconds && seconds) selectedTime.seconds(seconds);\n if (use12Hours && meridiem) {\n const nextHours = meridiem.toLowerCase() === AM ? hours % 12 : (hours % 12) + 12;\n selectedTime.hour(nextHours);\n }\n onChange(selectedTime);\n setHasInputBeenTriggered(false);\n }\n }, [hours, minutes, seconds, meridiem]);\n\n const focusNextInputIfNeeded = (currentEl, max, number) => {\n if (\n shouldFocusNextInput(max, number, currentEl.value) &&\n !isArrowIncrementDecrement(currentKey) &&\n !hasInputValue\n ) {\n focusNextInput(currentEl);\n }\n };\n\n const getNextTimeValue = (value, incrementing = true) => {\n const parsedValue = parseTimeNumberFromText(value);\n return incrementing ? parsedValue + step : parsedValue - step;\n };\n\n const onInputFocus = (e) => {\n e.preventDefault();\n e.stopPropagation();\n e.target.select();\n };\n\n const onClick = (e) => {\n if (e.target.value) {\n setHasInputValue(true);\n }\n };\n\n // eslint-disable-next-line max-statements\n const onKeyDown = (event, max) => {\n const { target } = event;\n const { value } = target;\n setLastTypedNumber(event.key);\n switch (event.key) {\n case ARROW_UP: {\n event.preventDefault();\n setCurrentKey(event.key);\n const incrementedValue = getNextTimeValue(value);\n setNativeValue(event.target, incrementedValue);\n break;\n }\n case ARROW_DOWN: {\n event.preventDefault();\n setCurrentKey(event.key);\n const decrementedValue = getNextTimeValue(value, false);\n setNativeValue(event.target, decrementedValue);\n break;\n }\n case BACKSPACE: {\n event.preventDefault();\n if (!value) {\n focusPreviousInput(event.target);\n } else {\n setNativeValue(event.target, '');\n }\n break;\n }\n case ESCAPE: {\n event.preventDefault();\n event.target.blur();\n break;\n }\n case HOME: {\n event.preventDefault();\n setNativeValue(event.target, String(max));\n focusNextInput(event.target);\n break;\n }\n case END: {\n event.preventDefault();\n setNativeValue(event.target, '00');\n focusNextInput(event.target);\n break;\n }\n case SHIFT:\n event.preventDefault();\n setCurrentKey(event.key);\n break;\n default:\n break;\n }\n };\n\n const isTimeCompletelySet = () => {\n let neededValues = [];\n\n if (showHours) neededValues = [...neededValues, hours || null];\n if (showMinutes) neededValues = [...neededValues, minutes || null];\n if (showSeconds) neededValues = [...neededValues, seconds || null];\n if (use12Hours) neededValues = [...neededValues, meridiem || null];\n\n return !neededValues.some((value) => !value);\n };\n\n const handleSecondsChange = (e) => {\n const { value } = e.target;\n const secondsHandled = parseTimeNumberFromText(value);\n\n const nextSeconds = getValidTimeNumber(GENERAL_TIME_RANGE, secondsHandled, lastTypedNumber);\n\n setSeconds(formatSeconds(format, nextSeconds));\n setHasInputBeenTriggered(true);\n focusNextInputIfNeeded(e.target, GENERAL_TIME_RANGE.max, value);\n };\n\n const handleMinutesChange = (e) => {\n const { value } = e.target;\n const minutesHandled = parseTimeNumberFromText(value);\n const nextMinutes = getValidTimeNumber(GENERAL_TIME_RANGE, minutesHandled, lastTypedNumber);\n\n setMinutes(formatMinutes(format, nextMinutes));\n setHasInputBeenTriggered(true);\n focusNextInputIfNeeded(e.target, GENERAL_TIME_RANGE.max, value);\n };\n\n const handleHoursChange = (e) => {\n const { value } = e.target;\n const hour = parseTimeNumberFromText(value);\n const hoursRange = use12Hours ? HOUR_RANGE_12 : HOUR_RANGE_24;\n\n const nextHour = getValidTimeNumber(hoursRange, hour, lastTypedNumber);\n setHours(formatHour(format, nextHour));\n setHasInputBeenTriggered(true);\n focusNextInputIfNeeded(e.target, hoursRange.max, value);\n };\n\n const handleMeridiemKeyDown = (e) => {\n if (e.key === ARROW_UP || e.key === 'a') {\n setMeridiem(formatMeridiem(format, AM));\n } else if (e.key === ARROW_DOWN || e.key === 'p') {\n setMeridiem(formatMeridiem(format, PM));\n } else if (e.key === SHIFT) {\n setCurrentKey(e.key);\n } else if (e.key === BACKSPACE) {\n setMeridiem('');\n }\n setHasInputBeenTriggered(true);\n };\n\n const handleMeridiemBlur = (e) => {\n const { value } = e.target;\n if (value !== AM && value !== PM) {\n setMeridiem('');\n }\n };\n\n const handleOnBlur = (event) => {\n const selectedTime = moment();\n if (clearable && !event.currentTarget.contains(event.relatedTarget)) {\n if (showHours && hours) selectedTime.hours(hours);\n if (showMinutes && minutes) selectedTime.minutes(minutes);\n if (showSeconds && seconds) selectedTime.seconds(seconds);\n if (use12Hours && meridiem) {\n const nextHours = meridiem.toLowerCase() === AM ? hours % 12 : (hours % 12) + 12;\n selectedTime.hour(nextHours);\n }\n onChange(selectedTime);\n }\n };\n\n const renderSecondsInput = () => {\n if (!showSeconds) return null;\n\n return (\n <TimeInput\n {...commonInputProps((e) => onKeyDown(e, GENERAL_TIME_RANGE.max), onInputFocus, onClick)}\n key=\"seconds-input\"\n data-testid=\"ds-time-input__seconds\"\n aria-label={ariaLabel || ariaLabel2 || 'Seconds Input'}\n disabled={disabled}\n // eslint-disable-next-line no-return-assign\n innerRef={(node) => (inputRefs.seconds = node)}\n onChange={handleSecondsChange}\n placeholder={placeholderFormat(PLACEHOLDER_TIME.seconds, format)}\n value={seconds}\n />\n );\n };\n\n const renderMinutesInput = () => {\n if (!showMinutes) return null;\n\n return (\n <TimeInput\n {...commonInputProps((e) => onKeyDown(e, GENERAL_TIME_RANGE.max), onInputFocus, onClick)}\n key=\"minutes-input\"\n data-testid=\"ds-time-input__minutes\"\n aria-label={ariaLabel || ariaLabel2 || 'Minutes Input'}\n disabled={disabled}\n // eslint-disable-next-line no-return-assign\n innerRef={(node) => (inputRefs.minutes = node)}\n onChange={handleMinutesChange}\n placeholder={placeholderFormat(PLACEHOLDER_TIME.minutes, format)}\n value={minutes}\n />\n );\n };\n\n const renderHoursInput = () => {\n if (!showHours) return null;\n const hourFormatRange = use12Hours ? HOUR_RANGE_12 : HOUR_RANGE_24;\n\n return (\n <TimeInput\n {...commonInputProps((e) => onKeyDown(e, hourFormatRange.max), onInputFocus, onClick)}\n key=\"hour-input\"\n data-testid=\"ds-time-input__hours\"\n aria-label={ariaLabel || ariaLabel2 || 'Hours Input'}\n disabled={disabled}\n // eslint-disable-next-line no-return-assign\n innerRef={(node) => (inputRefs.hours = node)}\n onChange={handleHoursChange}\n placeholder={placeholderFormat(PLACEHOLDER_TIME.hour, format, use12Hours)}\n value={hours}\n />\n );\n };\n\n const renderMeridiemInput = () => {\n if (!use12Hours) return null;\n\n return (\n <TimeInput\n {...commonInputProps}\n key=\"meridiem-input\"\n data-testid=\"ds-time-input__ampm\"\n aria-label={ariaLabel || ariaLabel2 || 'Meridiem Input'}\n disabled={disabled}\n onBlur={handleMeridiemBlur}\n onKeyDown={handleMeridiemKeyDown}\n placeholder={placeholderFormat(PLACEHOLDER_TIME.meridiem, format)}\n value={meridiem}\n />\n );\n };\n\n const renderTimeInputs = () => {\n const inputs = [renderHoursInput(), renderMinutesInput(), renderSecondsInput()];\n /* eslint-disable indent */\n const inputsWithDividers = inputs.reduce(\n (acc, input, index) =>\n input\n ? acc.concat([\n index ? (\n <TimeDivider\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n content=\":\"\n value={input.props.value}\n />\n ) : null,\n input,\n ])\n : acc,\n [],\n );\n /* eslint-enable indent */\n\n return [\n inputsWithDividers,\n React.createElement('span', { key: 'span' }), // hack for next/prev focus\n renderMeridiemInput(),\n ];\n };\n\n return (\n <InputTimesGroup onBlur={handleOnBlur} innerRef={innerRef}>\n {renderTimeInputs()}\n </InputTimesGroup>\n );\n};\n\nexport { TimeInputs };\nexport default TimeInputs;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\n/* eslint-disable max-statements */\nimport React, { useEffect, useState } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport moment from 'moment';\nimport {\n commonInputProps,\n formatHour,\n formatMinutes,\n formatSeconds,\n formatMeridiem,\n getValidTimeNumber,\n setNativeValue,\n parseTimeNumberFromText,\n focusNextInput,\n focusPreviousInput,\n getTimeValuesFromTime,\n isArrowIncrementDecrement,\n shouldFocusNextInput,\n placeholderFormat,\n} from './utils.js';\nimport {\n AM,\n PM,\n ARROW_UP,\n ARROW_DOWN,\n BACKSPACE,\n ESCAPE,\n HOME,\n HOUR_RANGE_12,\n HOUR_RANGE_24,\n GENERAL_TIME_RANGE,\n END,\n PLACEHOLDER_TIME,\n SHIFT,\n} from '@elliemae/ds-shared';\n\nconst blockName = 'input-times-group';\n\nconst InputTimesGroup = aggregatedClasses('div')(blockName);\nconst TimeInput = aggregatedClasses('input')(blockName, 'input');\nconst Divider = aggregatedClasses('span')(blockName, 'divider', ({ value }) => ({\n value,\n}));\n\n// eslint-disable-next-line react/prop-types\nconst TimeDivider = ({ content = ':', value = '' }) => <Divider value={!!value}>{content}</Divider>;\n\nconst TimeInputs = ({\n time,\n format,\n use12Hours,\n step = 1,\n showHours,\n showMinutes,\n showSeconds,\n onChange,\n disabled,\n innerRef,\n clearable,\n 'arial-label': ariaLabel,\n 'aria-label': ariaLabel2,\n}) => {\n const [meridiem, setMeridiem] = useState('');\n const [hours, setHours] = useState('');\n const [minutes, setMinutes] = useState('');\n const [hasInputValue, setHasInputValue] = useState(false);\n const [seconds, setSeconds] = useState('');\n const [currentKey, setCurrentKey] = useState('');\n const [hasInputBeenTriggered, setHasInputBeenTriggered] = useState(false);\n\n const [lastTypedNumber, setLastTypedNumber] = useState(null);\n const inputRefs = {\n hours: null,\n minutes: null,\n seconds: null,\n meridiem: null,\n };\n\n useEffect(() => {\n if (time && moment(time).isValid()) {\n const timeValues = getTimeValuesFromTime(time, format, use12Hours);\n\n setMeridiem(timeValues.meridiem);\n setHours(timeValues.hours);\n setMinutes(timeValues.minutes);\n setSeconds(timeValues.seconds);\n } else {\n setMeridiem('');\n setHours('');\n setMinutes('');\n setSeconds('');\n }\n }, [time, format, use12Hours]);\n\n useEffect(() => {\n const selectedTime = time || moment();\n if (isTimeCompletelySet() && selectedTime.hours && hasInputBeenTriggered) {\n if (showHours && hours) selectedTime.hours(hours);\n if (showMinutes && minutes) selectedTime.minutes(minutes);\n if (showSeconds && seconds) selectedTime.seconds(seconds);\n if (use12Hours && meridiem) {\n const nextHours = meridiem.toLowerCase() === AM ? hours % 12 : (hours % 12) + 12;\n selectedTime.hour(nextHours);\n }\n onChange(selectedTime);\n setHasInputBeenTriggered(false);\n }\n }, [hours, minutes, seconds, meridiem]);\n\n const focusNextInputIfNeeded = (currentEl, max, number) => {\n if (\n shouldFocusNextInput(max, number, currentEl.value) &&\n !isArrowIncrementDecrement(currentKey) &&\n !hasInputValue\n ) {\n focusNextInput(currentEl);\n }\n };\n\n const getNextTimeValue = (value, incrementing = true) => {\n const parsedValue = parseTimeNumberFromText(value);\n return incrementing ? parsedValue + step : parsedValue - step;\n };\n\n const onInputFocus = (e) => {\n e.preventDefault();\n e.stopPropagation();\n e.target.select();\n };\n\n const onClick = (e) => {\n if (e.target.value) {\n setHasInputValue(true);\n }\n };\n\n // eslint-disable-next-line max-statements\n const onKeyDown = (event, max) => {\n const { target } = event;\n const { value } = target;\n setLastTypedNumber(event.key);\n switch (event.key) {\n case ARROW_UP: {\n event.preventDefault();\n setCurrentKey(event.key);\n const incrementedValue = getNextTimeValue(value);\n setNativeValue(event.target, incrementedValue);\n break;\n }\n case ARROW_DOWN: {\n event.preventDefault();\n setCurrentKey(event.key);\n const decrementedValue = getNextTimeValue(value, false);\n setNativeValue(event.target, decrementedValue);\n break;\n }\n case BACKSPACE: {\n event.preventDefault();\n if (!value) {\n focusPreviousInput(event.target);\n } else {\n setNativeValue(event.target, '');\n }\n break;\n }\n case ESCAPE: {\n event.preventDefault();\n event.target.blur();\n break;\n }\n case HOME: {\n event.preventDefault();\n setNativeValue(event.target, String(max));\n focusNextInput(event.target);\n break;\n }\n case END: {\n event.preventDefault();\n setNativeValue(event.target, '00');\n focusNextInput(event.target);\n break;\n }\n case SHIFT:\n event.preventDefault();\n setCurrentKey(event.key);\n break;\n default:\n break;\n }\n };\n\n const isTimeCompletelySet = () => {\n let neededValues = [];\n\n if (showHours) neededValues = [...neededValues, hours || null];\n if (showMinutes) neededValues = [...neededValues, minutes || null];\n if (showSeconds) neededValues = [...neededValues, seconds || null];\n if (use12Hours) neededValues = [...neededValues, meridiem || null];\n\n return !neededValues.some((value) => !value);\n };\n\n const handleSecondsChange = (e) => {\n const { value } = e.target;\n const secondsHandled = parseTimeNumberFromText(value);\n\n const nextSeconds = getValidTimeNumber(GENERAL_TIME_RANGE, secondsHandled, lastTypedNumber);\n\n setSeconds(formatSeconds(format, nextSeconds));\n setHasInputBeenTriggered(true);\n focusNextInputIfNeeded(e.target, GENERAL_TIME_RANGE.max, value);\n };\n\n const handleMinutesChange = (e) => {\n const { value } = e.target;\n const minutesHandled = parseTimeNumberFromText(value);\n const nextMinutes = getValidTimeNumber(GENERAL_TIME_RANGE, minutesHandled, lastTypedNumber);\n\n setMinutes(formatMinutes(format, nextMinutes));\n setHasInputBeenTriggered(true);\n focusNextInputIfNeeded(e.target, GENERAL_TIME_RANGE.max, value);\n };\n\n const handleHoursChange = (e) => {\n const { value } = e.target;\n const hour = parseTimeNumberFromText(value);\n const hoursRange = use12Hours ? HOUR_RANGE_12 : HOUR_RANGE_24;\n\n const nextHour = getValidTimeNumber(hoursRange, hour, lastTypedNumber);\n setHours(formatHour(format, nextHour));\n setHasInputBeenTriggered(true);\n focusNextInputIfNeeded(e.target, hoursRange.max, value);\n };\n\n const handleMeridiemKeyDown = (e) => {\n if (e.key === ARROW_UP || e.key === 'a') {\n setMeridiem(formatMeridiem(format, AM));\n } else if (e.key === ARROW_DOWN || e.key === 'p') {\n setMeridiem(formatMeridiem(format, PM));\n } else if (e.key === SHIFT) {\n setCurrentKey(e.key);\n } else if (e.key === BACKSPACE) {\n setMeridiem('');\n }\n setHasInputBeenTriggered(true);\n };\n\n const handleMeridiemBlur = (e) => {\n const { value } = e.target;\n if (value !== AM && value !== PM) {\n setMeridiem('');\n }\n };\n\n const handleOnBlur = (event) => {\n const selectedTime = moment();\n if (clearable && !event.currentTarget.contains(event.relatedTarget)) {\n if (showHours && hours) selectedTime.hours(hours);\n if (showMinutes && minutes) selectedTime.minutes(minutes);\n if (showSeconds && seconds) selectedTime.seconds(seconds);\n if (use12Hours && meridiem) {\n const nextHours = meridiem.toLowerCase() === AM ? hours % 12 : (hours % 12) + 12;\n selectedTime.hour(nextHours);\n }\n onChange(selectedTime);\n }\n };\n\n const renderSecondsInput = () => {\n if (!showSeconds) return null;\n\n return (\n <TimeInput\n {...commonInputProps((e) => onKeyDown(e, GENERAL_TIME_RANGE.max), onInputFocus, onClick)}\n key=\"seconds-input\"\n data-testid=\"ds-time-input__seconds\"\n aria-label={ariaLabel || ariaLabel2 || 'Seconds Input'}\n disabled={disabled}\n // eslint-disable-next-line no-return-assign\n innerRef={(node) => (inputRefs.seconds = node)}\n onChange={handleSecondsChange}\n placeholder={placeholderFormat(PLACEHOLDER_TIME.seconds, format)}\n value={seconds}\n />\n );\n };\n\n const renderMinutesInput = () => {\n if (!showMinutes) return null;\n\n return (\n <TimeInput\n {...commonInputProps((e) => onKeyDown(e, GENERAL_TIME_RANGE.max), onInputFocus, onClick)}\n key=\"minutes-input\"\n data-testid=\"ds-time-input__minutes\"\n aria-label={ariaLabel || ariaLabel2 || 'Minutes Input'}\n disabled={disabled}\n // eslint-disable-next-line no-return-assign\n innerRef={(node) => (inputRefs.minutes = node)}\n onChange={handleMinutesChange}\n placeholder={placeholderFormat(PLACEHOLDER_TIME.minutes, format)}\n value={minutes}\n />\n );\n };\n\n const renderHoursInput = () => {\n if (!showHours) return null;\n const hourFormatRange = use12Hours ? HOUR_RANGE_12 : HOUR_RANGE_24;\n\n return (\n <TimeInput\n {...commonInputProps((e) => onKeyDown(e, hourFormatRange.max), onInputFocus, onClick)}\n key=\"hour-input\"\n data-testid=\"ds-time-input__hours\"\n aria-label={ariaLabel || ariaLabel2 || 'Hours Input'}\n disabled={disabled}\n // eslint-disable-next-line no-return-assign\n innerRef={(node) => (inputRefs.hours = node)}\n onChange={handleHoursChange}\n placeholder={placeholderFormat(PLACEHOLDER_TIME.hour, format, use12Hours)}\n value={hours}\n />\n );\n };\n\n const renderMeridiemInput = () => {\n if (!use12Hours) return null;\n\n return (\n <TimeInput\n {...commonInputProps}\n key=\"meridiem-input\"\n data-testid=\"ds-time-input__ampm\"\n aria-label={ariaLabel || ariaLabel2 || 'Meridiem Input'}\n disabled={disabled}\n onBlur={handleMeridiemBlur}\n onKeyDown={handleMeridiemKeyDown}\n placeholder={placeholderFormat(PLACEHOLDER_TIME.meridiem, format)}\n value={meridiem}\n />\n );\n };\n\n const renderTimeInputs = () => {\n const inputs = [renderHoursInput(), renderMinutesInput(), renderSecondsInput()];\n /* eslint-disable indent */\n const inputsWithDividers = inputs.reduce(\n (acc, input, index) =>\n input\n ? acc.concat([\n index ? (\n <TimeDivider\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n content=\":\"\n value={input.props.value}\n />\n ) : null,\n input,\n ])\n : acc,\n [],\n );\n /* eslint-enable indent */\n\n return [\n inputsWithDividers,\n React.createElement('span', { key: 'span' }), // hack for next/prev focus\n renderMeridiemInput(),\n ];\n };\n\n return (\n <InputTimesGroup onBlur={handleOnBlur} innerRef={innerRef}>\n {renderTimeInputs()}\n </InputTimesGroup>\n );\n};\n\nexport { TimeInputs };\nexport default TimeInputs;\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACgDgC;AAmOjD;AA/QN,OAAOA,UAAS,WAAW,gBAAgB;AAC3C,SAAS,yBAAyB;AAClC,OAAO,YAAY;AACnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,YAAY;AAElB,MAAM,kBAAkB,kBAAkB,KAAK,EAAE,SAAS;AAC1D,MAAM,YAAY,kBAAkB,OAAO,EAAE,WAAW,OAAO;AAC/D,MAAM,UAAU,kBAAkB,MAAM,EAAE,WAAW,WAAW,CAAC,EAAE,MAAM,OAAO;AAAA,EAC9E;AACF,EAAE;AAGF,MAAM,cAAc,CAAC,EAAE,UAAU,KAAK,QAAQ,GAAG,MAAM,oBAAC,WAAQ,OAAO,CAAC,CAAC,OAAQ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"]
7
7
  }
@@ -1,3 +1,3 @@
1
1
  import * as React from "react";
2
- export * from "./DSTimeInput";
2
+ export * from "./DSTimeInput.js";
3
3
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/TimeInput/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSTimeInput';\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSTimeInput.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { PropTypes, describe } from "@elliemae/ds-utilities";
4
- import { DSToggleImpl } from "./DSToggleImpl";
3
+ import { useDeprecateComponent } from "@elliemae/ds-utilities";
4
+ import { PropTypes, describe } from "@elliemae/ds-props-helpers";
5
+ import { DSToggleImpl } from "./DSToggleImpl.js";
5
6
  import { dsBasicSizes } from "@elliemae/ds-shared";
6
7
  const DSToggle = ({
7
8
  containerProps,
@@ -15,22 +16,25 @@ const DSToggle = ({
15
16
  value,
16
17
  size,
17
18
  ...otherProps
18
- }) => /* @__PURE__ */ jsx(
19
- DSToggleImpl,
20
- {
21
- ...otherProps,
22
- checked,
23
- containerProps,
24
- disabled,
25
- hasError,
26
- labelOff,
27
- labelOn,
28
- name,
29
- readOnly,
30
- size,
31
- value
32
- }
33
- );
19
+ }) => {
20
+ useDeprecateComponent({ componentName: "ds-form/Toggle", version: "TBD Date: 2023 Q3" });
21
+ return /* @__PURE__ */ jsx(
22
+ DSToggleImpl,
23
+ {
24
+ ...otherProps,
25
+ checked,
26
+ containerProps,
27
+ disabled,
28
+ hasError,
29
+ labelOff,
30
+ labelOn,
31
+ name,
32
+ readOnly,
33
+ size,
34
+ value
35
+ }
36
+ );
37
+ };
34
38
  DSToggle.defaultProps = {
35
39
  labelOn: "ON",
36
40
  labelOff: "OFF",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Toggle/DSToggle.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { DSToggleImpl } from './DSToggleImpl';\nimport { dsBasicSizes } from '@elliemae/ds-shared';\n\nconst DSToggle = ({\n containerProps,\n hasError,\n readOnly,\n disabled,\n checked,\n labelOn,\n labelOff,\n name,\n value,\n size,\n ...otherProps\n}) => (\n <DSToggleImpl\n {...otherProps}\n checked={checked}\n containerProps={containerProps}\n disabled={disabled}\n hasError={hasError}\n labelOff={labelOff}\n labelOn={labelOn}\n name={name}\n readOnly={readOnly}\n size={size}\n value={value}\n />\n);\n\nDSToggle.defaultProps = {\n labelOn: 'ON',\n labelOff: 'OFF',\n size: 's',\n hasError: false,\n readOnly: false,\n disabled: false,\n checked: undefined,\n};\n\nconst props = {\n /**\n * Set of Properties attached to the main container\n */\n containerProps: PropTypes.shape({}).description('Set of Properties attached to the main container'),\n /**\n * Whether the toggle has error or not\n */\n hasError: PropTypes.bool.description('Whether the toggle has error or not'),\n /**\n * Whether the toggle is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the toggle is read only or not'),\n /**\n * Whether the toggle is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the toggle is disabled or not'),\n /**\n * Whether the toggle is checked or not\n */\n checked: PropTypes.bool.description('Whether the toggle is checked or not'),\n /**\n * Allows a function that is triggered once the toggle changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the toggle changes'),\n /**\n * Label to show when the toggle is ON\n */\n labelOn: PropTypes.string.description('Label to show when the toggle is ON'),\n /**\n * Label to show when the toggle is OFF\n */\n labelOff: PropTypes.string.description('Label to show when the toggle is OFF'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description('Default value once the component is initialized'),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * Input name\n */\n name: PropTypes.string.description('Input name'),\n};\n\nDSToggle.propTypes = props;\nDSToggle.displayName = 'DSToggle';\nconst DSToggleWithSchema = describe(DSToggle);\n\nDSToggleWithSchema.propTypes = props;\n\nexport default DSToggle;\n\nexport { DSToggleWithSchema, DSToggle };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACkBrB;AAjBF,SAAS,WAAW,gBAAgB;AACpC,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAE7B,MAAM,WAAW,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,KACG;AACL,MACE;AAAA,EAAC;AAAA;AAAA,IACE,GAAG;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AACF;AAGF,SAAS,eAAe;AAAA,EACtB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AACX;AAEA,MAAM,QAAQ;AAAA,EAIZ,gBAAgB,UAAU,MAAM,CAAC,CAAC,EAAE,YAAY,kDAAkD;AAAA,EAIlG,UAAU,UAAU,KAAK,YAAY,qCAAqC;AAAA,EAI1E,UAAU,UAAU,KAAK,YAAY,wCAAwC;AAAA,EAI7E,UAAU,UAAU,KAAK,YAAY,uCAAuC;AAAA,EAI5E,SAAS,UAAU,KAAK,YAAY,sCAAsC;AAAA,EAI1E,UAAU,UAAU,KAAK,YAAY,6DAA6D;AAAA,EAIlG,SAAS,UAAU,OAAO,YAAY,qCAAqC;AAAA,EAI3E,UAAU,UAAU,OAAO,YAAY,sCAAsC;AAAA,EAI7E,OAAO,UAAU,OAAO,YAAY,iDAAiD;AAAA,EAIrF,MAAM,UAAU,MAAM,YAAY,EAAE,YAAY,iBAAiB;AAAA,EAIjE,MAAM,UAAU,OAAO,YAAY,YAAY;AACjD;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAE5C,mBAAmB,YAAY;AAE/B,IAAO,mBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { DSToggleImpl } from './DSToggleImpl.js';\nimport { dsBasicSizes } from '@elliemae/ds-shared';\n\nconst DSToggle = ({\n containerProps,\n hasError,\n readOnly,\n disabled,\n checked,\n labelOn,\n labelOff,\n name,\n value,\n size,\n ...otherProps\n}) => {\n useDeprecateComponent({ componentName: 'ds-form/Toggle', version: 'TBD Date: 2023 Q3' });\n\n return (\n <DSToggleImpl\n {...otherProps}\n checked={checked}\n containerProps={containerProps}\n disabled={disabled}\n hasError={hasError}\n labelOff={labelOff}\n labelOn={labelOn}\n name={name}\n readOnly={readOnly}\n size={size}\n value={value}\n />\n );\n};\n\nDSToggle.defaultProps = {\n labelOn: 'ON',\n labelOff: 'OFF',\n size: 's',\n hasError: false,\n readOnly: false,\n disabled: false,\n checked: undefined,\n};\n\nconst props = {\n /**\n * Set of Properties attached to the main container\n */\n containerProps: PropTypes.shape({}).description('Set of Properties attached to the main container'),\n /**\n * Whether the toggle has error or not\n */\n hasError: PropTypes.bool.description('Whether the toggle has error or not'),\n /**\n * Whether the toggle is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the toggle is read only or not'),\n /**\n * Whether the toggle is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the toggle is disabled or not'),\n /**\n * Whether the toggle is checked or not\n */\n checked: PropTypes.bool.description('Whether the toggle is checked or not'),\n /**\n * Allows a function that is triggered once the toggle changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the toggle changes'),\n /**\n * Label to show when the toggle is ON\n */\n labelOn: PropTypes.string.description('Label to show when the toggle is ON'),\n /**\n * Label to show when the toggle is OFF\n */\n labelOff: PropTypes.string.description('Label to show when the toggle is OFF'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description('Default value once the component is initialized'),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * Input name\n */\n name: PropTypes.string.description('Input name'),\n};\n\nDSToggle.propTypes = props;\nDSToggle.displayName = 'DSToggle';\nconst DSToggleWithSchema = describe(DSToggle);\n\nDSToggleWithSchema.propTypes = props;\n\nexport default DSToggle;\n\nexport { DSToggleWithSchema, DSToggle };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACsBnB;AArBJ,SAAS,6BAA6B;AACtC,SAAS,WAAW,gBAAgB;AACpC,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAE7B,MAAM,WAAW,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,KACG;AACL,MAAM;AACJ,wBAAsB,EAAE,eAAe,kBAAkB,SAAS,oBAAoB,CAAC;AAEvF,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;AAEA,SAAS,eAAe;AAAA,EACtB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AACX;AAEA,MAAM,QAAQ;AAAA,EAIZ,gBAAgB,UAAU,MAAM,CAAC,CAAC,EAAE,YAAY,kDAAkD;AAAA,EAIlG,UAAU,UAAU,KAAK,YAAY,qCAAqC;AAAA,EAI1E,UAAU,UAAU,KAAK,YAAY,wCAAwC;AAAA,EAI7E,UAAU,UAAU,KAAK,YAAY,uCAAuC;AAAA,EAI5E,SAAS,UAAU,KAAK,YAAY,sCAAsC;AAAA,EAI1E,UAAU,UAAU,KAAK,YAAY,6DAA6D;AAAA,EAIlG,SAAS,UAAU,OAAO,YAAY,qCAAqC;AAAA,EAI3E,UAAU,UAAU,OAAO,YAAY,sCAAsC;AAAA,EAI7E,OAAO,UAAU,OAAO,YAAY,iDAAiD;AAAA,EAIrF,MAAM,UAAU,MAAM,YAAY,EAAE,YAAY,iBAAiB;AAAA,EAIjE,MAAM,UAAU,OAAO,YAAY,YAAY;AACjD;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAE5C,mBAAmB,YAAY;AAE/B,IAAO,mBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,9 +1,9 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import React2, { Component } from "react";
4
- import { isValidDrag, cleanDrag, calculateDrag, dragStartingPoints } from "./toggleHelper";
5
- import { DSToggleRender } from "./DSToggleRender";
6
- import { togglePropTypes } from "./props";
4
+ import { isValidDrag, cleanDrag, calculateDrag, dragStartingPoints } from "./toggleHelper.js";
5
+ import { DSToggleRender } from "./DSToggleRender.js";
6
+ import { togglePropTypes } from "./props.js";
7
7
  class DSToggleImpl extends Component {
8
8
  constructor(props) {
9
9
  super(props);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Toggle/DSToggleImpl.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { Component } from 'react';\nimport { isValidDrag, cleanDrag, calculateDrag, dragStartingPoints } from './toggleHelper';\nimport { DSToggleRender } from './DSToggleRender';\nimport { togglePropTypes } from './props';\n\nclass DSToggleImpl extends Component {\n constructor(props) {\n super(props);\n this.state = {\n checked: props.checked || false,\n inside: false,\n isDragging: false,\n // prevent draw of toggle before drag handle positioning calculations\n hide: true,\n drag: null,\n startPoint: null,\n circleWidth: null,\n boxWidth: null,\n };\n this.circle = React.createRef();\n this.box = React.createRef();\n\n this.setDragOnChange = this.setDragOnChange.bind(this);\n this.verifyElements = this.verifyElements.bind(this);\n }\n\n componentDidMount() {\n this.verifyElements();\n }\n\n componentDidUpdate(prevProps, prevState, snapshot) {\n if (\n this.state.hide &&\n this.state.circleWidth &&\n this.state.boxWidth &&\n prevState.hide &&\n this.state.drag !== null\n ) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({ hide: false });\n }\n if (snapshot) {\n this.verifyElements();\n }\n }\n\n /**\n * ******************************************************\n * Drag\n * ****************************************************** *\n *\n * @param clientX\n */\n onDragStart = (clientX) => {\n const { startPoint, checked, isDragging, boxWidth, circleWidth } = this.state;\n // const { checked: checkedProp, } = this.props\n const drag = calculateDrag(clientX, {\n startPoint,\n checked,\n isDragging,\n boxWidth,\n circleWidth,\n });\n if (drag) this.setState({ drag });\n // else this.setDragOnChange(checkedProp != null ? checkedProp : checked) // set initial position\n else this.setDragOnChange(checked); // set initial position\n };\n\n onDragStop = (e) => {\n const { checked } = this.state;\n // const { checked: checkedProp, } = this.props\n if (isValidDrag(this.state)) {\n this.onChange(e);\n this.setState(cleanDrag);\n // } else this.setDragOnChange(checkedProp != null ? checkedProp : checked) // set initial position\n } else this.setDragOnChange(checked); // set initial position\n };\n\n /**\n * ******************************************************\n * StandardEvents\n * ****************************************************** *\n *\n * @param e\n */\n onBlur = (e) => {\n const { onBlur, id } = this.props;\n if (onBlur) onBlur(e, id);\n };\n\n onFocus = (e) => {\n const { onFocus, id } = this.props;\n if (onFocus) onFocus(e, id);\n };\n\n onChange = (e) => {\n const { checked } = this.state;\n const {\n onChange,\n id,\n value,\n // checked: checkedProp,\n } = this.props;\n const newCheck = !checked;\n // this.setState({\n // checked: checkedProp != null ? checkedProp : newCheck,\n // })\n this.setState({\n checked: newCheck,\n });\n e.target.value = value;\n e.target.checked = newCheck;\n e.checked = newCheck;\n onChange(e, id);\n // this.setDragOnChange(checkedProp != null ? checkedProp : newCheck) // set new position\n this.setDragOnChange(newCheck); // set new position\n };\n\n /**\n ******************************************************\n MouseEvents\n ******************************************************* *\n */\n onMouseEnter = () => {\n this.setState({ inside: true });\n };\n\n onMouseLeave = () => {\n this.setState({ inside: false });\n };\n\n onMouseMove = (event) => {\n event.preventDefault();\n this.onDragStart(event.clientX);\n };\n\n onMouseDown = (event) => {\n this.onDragStart(event.clientX);\n this.setState({ startPoint: event.clientX, isDragging: true });\n window.addEventListener('mousemove', this.onMouseMove);\n window.addEventListener('mouseup', this.onMouseUp);\n };\n\n onMouseUp = (event) => {\n this.onDragStop(event);\n window.removeEventListener('mousemove', this.onMouseMove);\n window.removeEventListener('mouseup', this.onMouseUp);\n };\n\n /**\n ******************************************************\n Touch\n ******************************************************* *\n */\n onTouchCancel = () => {\n this.setState({ inside: false });\n };\n\n onTouchEnd = (event) => {\n event.preventDefault();\n this.onDragStop(event);\n };\n\n onTouchMove = (event) => {\n this.onDragStart(event.touches[0].clientX);\n };\n\n onTouchStart = (event) => {\n this.onDragStart(event.touches[0].clientX);\n this.setState({ startPoint: event.touches[0].clientX, isDragging: true });\n };\n\n static getDerivedStateFromProps(props, state) {\n if (props.checked === true || props.checked === false) {\n return {\n checked: props.checked,\n ...dragStartingPoints(props.checked)(state),\n };\n }\n return null;\n }\n\n getSnapshotBeforeUpdate(prevProps) {\n const { size } = this.props;\n if (prevProps.size !== size) {\n return true;\n }\n return false;\n }\n\n /**\n * ******************************************************\n * other\n * ****************************************************** *\n *\n * @param currentCheckState\n */\n setDragOnChange(currentCheckState) {\n this.setState(dragStartingPoints(currentCheckState));\n }\n\n verifyElements() {\n const { checked } = this.state;\n const { checked: checkedProp } = this.props;\n const nodesInterval = setInterval(() => {\n // !important it checks when nodes are availables\n if (!this.circle || !this.box || !this.circle.current || !this.box.current) return;\n const {\n current: { clientWidth: circleWidth },\n } = this.circle;\n const {\n current: { clientWidth: boxWidth },\n } = this.box;\n if (!circleWidth || !boxWidth || circleWidth === boxWidth) return;\n this.setState({\n boxWidth,\n circleWidth,\n });\n this.setDragOnChange(checkedProp != null ? checkedProp : checked);\n // this.setDragOnChange(checked)\n clearInterval(nodesInterval);\n }, 5);\n }\n\n render() {\n const { checked, drag, inside, hide } = this.state;\n const dragStyle = drag !== null || checked || this.props.checked ? { left: `${drag}px` } : null;\n return (\n <DSToggleRender\n {...this.props}\n defaultState={this.props.checked}\n checked={checked}\n containerRef={this.box}\n hide={hide}\n dragStyle={dragStyle}\n handRef={this.circle}\n inside={inside}\n onBlur={this.onBlur}\n onChange={this.onChange}\n onFocus={this.onFocus}\n onMouseDown={this.onMouseDown}\n onMouseEnter={this.onMouseEnter}\n onMouseLeave={this.onMouseLeave}\n onTouchCancel={this.onTouchCancel}\n onTouchEnd={this.onTouchEnd}\n onTouchMove={this.onTouchMove}\n onTouchStart={this.onTouchStart}\n />\n );\n }\n}\n\nDSToggleImpl.propTypes = togglePropTypes;\n\nexport { DSToggleImpl };\nexport default DSToggleImpl;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { Component } from 'react';\nimport { isValidDrag, cleanDrag, calculateDrag, dragStartingPoints } from './toggleHelper.js';\nimport { DSToggleRender } from './DSToggleRender.js';\nimport { togglePropTypes } from './props.js';\n\nclass DSToggleImpl extends Component {\n constructor(props) {\n super(props);\n this.state = {\n checked: props.checked || false,\n inside: false,\n isDragging: false,\n // prevent draw of toggle before drag handle positioning calculations\n hide: true,\n drag: null,\n startPoint: null,\n circleWidth: null,\n boxWidth: null,\n };\n this.circle = React.createRef();\n this.box = React.createRef();\n\n this.setDragOnChange = this.setDragOnChange.bind(this);\n this.verifyElements = this.verifyElements.bind(this);\n }\n\n componentDidMount() {\n this.verifyElements();\n }\n\n componentDidUpdate(prevProps, prevState, snapshot) {\n if (\n this.state.hide &&\n this.state.circleWidth &&\n this.state.boxWidth &&\n prevState.hide &&\n this.state.drag !== null\n ) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({ hide: false });\n }\n if (snapshot) {\n this.verifyElements();\n }\n }\n\n /**\n * ******************************************************\n * Drag\n * ****************************************************** *\n *\n * @param clientX\n */\n onDragStart = (clientX) => {\n const { startPoint, checked, isDragging, boxWidth, circleWidth } = this.state;\n // const { checked: checkedProp, } = this.props\n const drag = calculateDrag(clientX, {\n startPoint,\n checked,\n isDragging,\n boxWidth,\n circleWidth,\n });\n if (drag) this.setState({ drag });\n // else this.setDragOnChange(checkedProp != null ? checkedProp : checked) // set initial position\n else this.setDragOnChange(checked); // set initial position\n };\n\n onDragStop = (e) => {\n const { checked } = this.state;\n // const { checked: checkedProp, } = this.props\n if (isValidDrag(this.state)) {\n this.onChange(e);\n this.setState(cleanDrag);\n // } else this.setDragOnChange(checkedProp != null ? checkedProp : checked) // set initial position\n } else this.setDragOnChange(checked); // set initial position\n };\n\n /**\n * ******************************************************\n * StandardEvents\n * ****************************************************** *\n *\n * @param e\n */\n onBlur = (e) => {\n const { onBlur, id } = this.props;\n if (onBlur) onBlur(e, id);\n };\n\n onFocus = (e) => {\n const { onFocus, id } = this.props;\n if (onFocus) onFocus(e, id);\n };\n\n onChange = (e) => {\n const { checked } = this.state;\n const {\n onChange,\n id,\n value,\n // checked: checkedProp,\n } = this.props;\n const newCheck = !checked;\n // this.setState({\n // checked: checkedProp != null ? checkedProp : newCheck,\n // })\n this.setState({\n checked: newCheck,\n });\n e.target.value = value;\n e.target.checked = newCheck;\n e.checked = newCheck;\n onChange(e, id);\n // this.setDragOnChange(checkedProp != null ? checkedProp : newCheck) // set new position\n this.setDragOnChange(newCheck); // set new position\n };\n\n /**\n ******************************************************\n MouseEvents\n ******************************************************* *\n */\n onMouseEnter = () => {\n this.setState({ inside: true });\n };\n\n onMouseLeave = () => {\n this.setState({ inside: false });\n };\n\n onMouseMove = (event) => {\n event.preventDefault();\n this.onDragStart(event.clientX);\n };\n\n onMouseDown = (event) => {\n this.onDragStart(event.clientX);\n this.setState({ startPoint: event.clientX, isDragging: true });\n window.addEventListener('mousemove', this.onMouseMove);\n window.addEventListener('mouseup', this.onMouseUp);\n };\n\n onMouseUp = (event) => {\n this.onDragStop(event);\n window.removeEventListener('mousemove', this.onMouseMove);\n window.removeEventListener('mouseup', this.onMouseUp);\n };\n\n /**\n ******************************************************\n Touch\n ******************************************************* *\n */\n onTouchCancel = () => {\n this.setState({ inside: false });\n };\n\n onTouchEnd = (event) => {\n event.preventDefault();\n this.onDragStop(event);\n };\n\n onTouchMove = (event) => {\n this.onDragStart(event.touches[0].clientX);\n };\n\n onTouchStart = (event) => {\n this.onDragStart(event.touches[0].clientX);\n this.setState({ startPoint: event.touches[0].clientX, isDragging: true });\n };\n\n static getDerivedStateFromProps(props, state) {\n if (props.checked === true || props.checked === false) {\n return {\n checked: props.checked,\n ...dragStartingPoints(props.checked)(state),\n };\n }\n return null;\n }\n\n getSnapshotBeforeUpdate(prevProps) {\n const { size } = this.props;\n if (prevProps.size !== size) {\n return true;\n }\n return false;\n }\n\n /**\n * ******************************************************\n * other\n * ****************************************************** *\n *\n * @param currentCheckState\n */\n setDragOnChange(currentCheckState) {\n this.setState(dragStartingPoints(currentCheckState));\n }\n\n verifyElements() {\n const { checked } = this.state;\n const { checked: checkedProp } = this.props;\n const nodesInterval = setInterval(() => {\n // !important it checks when nodes are availables\n if (!this.circle || !this.box || !this.circle.current || !this.box.current) return;\n const {\n current: { clientWidth: circleWidth },\n } = this.circle;\n const {\n current: { clientWidth: boxWidth },\n } = this.box;\n if (!circleWidth || !boxWidth || circleWidth === boxWidth) return;\n this.setState({\n boxWidth,\n circleWidth,\n });\n this.setDragOnChange(checkedProp != null ? checkedProp : checked);\n // this.setDragOnChange(checked)\n clearInterval(nodesInterval);\n }, 5);\n }\n\n render() {\n const { checked, drag, inside, hide } = this.state;\n const dragStyle = drag !== null || checked || this.props.checked ? { left: `${drag}px` } : null;\n return (\n <DSToggleRender\n {...this.props}\n defaultState={this.props.checked}\n checked={checked}\n containerRef={this.box}\n hide={hide}\n dragStyle={dragStyle}\n handRef={this.circle}\n inside={inside}\n onBlur={this.onBlur}\n onChange={this.onChange}\n onFocus={this.onFocus}\n onMouseDown={this.onMouseDown}\n onMouseEnter={this.onMouseEnter}\n onMouseLeave={this.onMouseLeave}\n onTouchCancel={this.onTouchCancel}\n onTouchEnd={this.onTouchEnd}\n onTouchMove={this.onTouchMove}\n onTouchStart={this.onTouchStart}\n />\n );\n }\n}\n\nDSToggleImpl.propTypes = togglePropTypes;\n\nexport { DSToggleImpl };\nexport default DSToggleImpl;\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACqOjB;AApON,OAAOA,UAAS,iBAAiB;AACjC,SAAS,aAAa,WAAW,eAAe,0BAA0B;AAC1E,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAEhC,MAAM,qBAAqB,UAAU;AAAA,EACnC,YAAY,OAAO;AACjB,UAAM,KAAK;AA8Cb,uBAAc,CAAC,YAAY;AACzB,YAAM,EAAE,YAAY,SAAS,YAAY,UAAU,YAAY,IAAI,KAAK;AAExE,YAAM,OAAO,cAAc,SAAS;AAAA,QAClC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AACD,UAAI;AAAM,aAAK,SAAS,EAAE,KAAK,CAAC;AAAA;AAE3B,aAAK,gBAAgB,OAAO;AAAA,IACnC;AAEA,sBAAa,CAAC,MAAM;AAClB,YAAM,EAAE,QAAQ,IAAI,KAAK;AAEzB,UAAI,YAAY,KAAK,KAAK,GAAG;AAC3B,aAAK,SAAS,CAAC;AACf,aAAK,SAAS,SAAS;AAAA,MAEzB;AAAO,aAAK,gBAA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,QACnB,cAAc,KAAK;AAAA,QACnB,eAAe,KAAK;AAAA,QACpB,YAAY,KAAK;AAAA,QACjB,aAAa,KAAK;AAAA,QAClB,cAAc,KAAK;AAAA;AAAA,IACrB;AAAA,EAEJ;AACF;AAEA,aAAa,YAAY;AAGzB,IAAO,uBAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { default as default2, DSToggleWithSchema, DSToggle } from "./DSToggle";
2
+ import { default as default2, DSToggleWithSchema, DSToggle } from "./DSToggle.js";
3
3
  export {
4
4
  DSToggle,
5
5
  DSToggleWithSchema,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Toggle/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { default, DSToggleWithSchema, DSToggle } from './DSToggle';\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { default, DSToggleWithSchema, DSToggle } from './DSToggle.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAAA,UAAS,oBAAoB,gBAAgB;",
6
6
  "names": ["default"]
7
7
  }