@razorpay/blade 12.49.3 → 12.49.5

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 (618) hide show
  1. package/build/lib/native/components/Accordion/AccordionButton.native.js.map +1 -1
  2. package/build/lib/native/components/ActionList/ActionList.js.map +1 -1
  3. package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
  4. package/build/lib/native/components/ActionList/actionListUtils.js.map +1 -1
  5. package/build/lib/native/components/Alert/Alert.js.map +1 -1
  6. package/build/lib/native/components/Amount/Amount.js.map +1 -1
  7. package/build/lib/native/components/Badge/Badge.js.map +1 -1
  8. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  9. package/build/lib/native/components/BladeProvider/useBladeProvider.js.map +1 -1
  10. package/build/lib/native/components/BottomSheet/BottomSheet.native.js +1 -1
  11. package/build/lib/native/components/BottomSheet/BottomSheet.native.js.map +1 -1
  12. package/build/lib/native/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
  13. package/build/lib/native/components/Box/Box.js.map +1 -1
  14. package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
  15. package/build/lib/native/components/Button/BaseButton/StyledBaseButton.native.js.map +1 -1
  16. package/build/lib/native/components/Button/BaseButton/buttonTokens.js.map +1 -1
  17. package/build/lib/native/components/Button/IconButton/StyledIconButton.native.js.map +1 -1
  18. package/build/lib/native/components/Card/CardContext.js.map +1 -1
  19. package/build/lib/native/components/Card/CardFooter.js.map +1 -1
  20. package/build/lib/native/components/Card/CardHeader.js.map +1 -1
  21. package/build/lib/native/components/Card/CardRoot.native.js.map +1 -1
  22. package/build/lib/native/components/Card/CardSurface.native.js.map +1 -1
  23. package/build/lib/native/components/Carousel/Carousel.native.js.map +1 -1
  24. package/build/lib/native/components/Carousel/CarouselItem.native.js.map +1 -1
  25. package/build/lib/native/components/Carousel/Indicators/Indicators.js.map +1 -1
  26. package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  27. package/build/lib/native/components/Checkbox/Checkbox.js.map +1 -1
  28. package/build/lib/native/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
  29. package/build/lib/native/components/Checkbox/useCheckbox.js.map +1 -1
  30. package/build/lib/native/components/Chip/ChipGroup.js.map +1 -1
  31. package/build/lib/native/components/Chip/chipTokens.js.map +1 -1
  32. package/build/lib/native/components/Chip/useChipGroup.js.map +1 -1
  33. package/build/lib/native/components/Collapsible/Collapsible.js.map +1 -1
  34. package/build/lib/native/components/Collapsible/CollapsibleChevronIcon.native.js.map +1 -1
  35. package/build/lib/native/components/Collapsible/CollapsibleContext.js.map +1 -1
  36. package/build/lib/native/components/Counter/Counter.js.map +1 -1
  37. package/build/lib/native/components/Divider/Divider.js.map +1 -1
  38. package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
  39. package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
  40. package/build/lib/native/components/Dropdown/DropdownButton.js +1 -1
  41. package/build/lib/native/components/Dropdown/DropdownButton.js.map +1 -1
  42. package/build/lib/native/components/Dropdown/DropdownIconButton.js +1 -1
  43. package/build/lib/native/components/Dropdown/DropdownIconButton.js.map +1 -1
  44. package/build/lib/native/components/Dropdown/DropdownLink.js +1 -1
  45. package/build/lib/native/components/Dropdown/DropdownLink.js.map +1 -1
  46. package/build/lib/native/components/Dropdown/DropdownOverlay.native.js.map +1 -1
  47. package/build/lib/native/components/Dropdown/dropdownUtils.js.map +1 -1
  48. package/build/lib/native/components/Form/useFormId.js.map +1 -1
  49. package/build/lib/native/components/Input/BaseInput/BaseInput.js +1 -1
  50. package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
  51. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
  52. package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
  53. package/build/lib/native/components/Input/DropdownInputTriggers/Chevron.js.map +1 -1
  54. package/build/lib/native/components/Input/DropdownInputTriggers/SelectInput.js +1 -1
  55. package/build/lib/native/components/Input/DropdownInputTriggers/SelectInput.js.map +1 -1
  56. package/build/lib/native/components/Input/OTPInput/OTPInput.js.map +1 -1
  57. package/build/lib/native/components/Input/TextInput/TextInput.js.map +1 -1
  58. package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
  59. package/build/lib/native/components/Link/BaseLink/StyledBaseLink.native.js.map +1 -1
  60. package/build/lib/native/components/List/ListItem.js.map +1 -1
  61. package/build/lib/native/components/List/getOrderedListItemBullet.js.map +1 -1
  62. package/build/lib/native/components/Popover/PopoverContext.js.map +1 -1
  63. package/build/lib/native/components/PopupArrow/PopupArrow.native.js.map +1 -1
  64. package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js.map +1 -1
  65. package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
  66. package/build/lib/native/components/ProgressBar/ProgressBarFilled.native.js.map +1 -1
  67. package/build/lib/native/components/ProgressBar/progressBarTokens.js.map +1 -1
  68. package/build/lib/native/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
  69. package/build/lib/native/components/Radio/RadioGroup/useRadioGroup.js.map +1 -1
  70. package/build/lib/native/components/Radio/RadioIcon/RadioIcon.js.map +1 -1
  71. package/build/lib/native/components/Radio/useRadio.js.map +1 -1
  72. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  73. package/build/lib/native/components/Spinner/BaseSpinner/SpinningBox.native.js.map +1 -1
  74. package/build/lib/native/components/StepGroup/StepItemMarker.js.map +1 -1
  75. package/build/lib/native/components/Switch/getTrackStyles.js.map +1 -1
  76. package/build/lib/native/components/Tabs/SafeSceneMap.native.js.map +1 -1
  77. package/build/lib/native/components/Tabs/utils.js.map +1 -1
  78. package/build/lib/native/components/Tag/Tag.js.map +1 -1
  79. package/build/lib/native/components/Tag/getTagsGroup.js.map +1 -1
  80. package/build/lib/native/components/Tooltip/TooltipContext.js.map +1 -1
  81. package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
  82. package/build/lib/native/components/Typography/Code/Code.js.map +1 -1
  83. package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
  84. package/build/lib/native/components/Typography/utils.js.map +1 -1
  85. package/build/lib/native/components/VisuallyHidden/ScreenReaderStyles.js.map +1 -1
  86. package/build/lib/native/tokens/global/colors.js.map +1 -1
  87. package/build/lib/native/tokens/global/elevation/elevation.native.js.map +1 -1
  88. package/build/lib/native/tokens/theme/bladeTheme.js.map +1 -1
  89. package/build/lib/native/tokens/theme/createTheme.js.map +1 -1
  90. package/build/lib/native/utils/getMediaQuery/getMediaQuery.js.map +1 -1
  91. package/build/lib/native/utils/isPartialMatchObjectKeys/isPartialMatchObjectKeys.js.map +1 -1
  92. package/build/lib/native/utils/logger/logger.js.map +1 -1
  93. package/build/lib/native/utils/makeAccessible/makeAccessible.native.js.map +1 -1
  94. package/build/lib/native/utils/makeBorderSize/makeBorderSize.js.map +1 -1
  95. package/build/lib/native/utils/makeLetterSpacing/makeLetterSpacing.js.map +1 -1
  96. package/build/lib/native/utils/makeSize/makeSize.js.map +1 -1
  97. package/build/lib/native/utils/makeSpace/makeSpace.js.map +1 -1
  98. package/build/lib/native/utils/makeTypographySize/makeTypographySize.native.js.map +1 -1
  99. package/build/lib/native/utils/metaAttribute/metaAttribute.native.js.map +1 -1
  100. package/build/lib/native/utils/useColorScheme/useColorScheme.js.map +1 -1
  101. package/build/lib/native/utils/useId.js.map +1 -1
  102. package/build/lib/native/utils/useMergeRefs.js.map +1 -1
  103. package/build/lib/native/utils/useVerifyAllowedChildren/useVerifyAllowedChildren.js.map +1 -1
  104. package/build/lib/web/development/components/Accordion/Accordion.js +2 -2
  105. package/build/lib/web/development/components/Accordion/Accordion.js.map +1 -1
  106. package/build/lib/web/development/components/ActionList/ActionList.js +1 -1
  107. package/build/lib/web/development/components/ActionList/ActionList.js.map +1 -1
  108. package/build/lib/web/development/components/ActionList/ActionListBox.web.js +7 -7
  109. package/build/lib/web/development/components/ActionList/ActionListBox.web.js.map +1 -1
  110. package/build/lib/web/development/components/ActionList/ActionListItem.js +4 -4
  111. package/build/lib/web/development/components/ActionList/ActionListItem.js.map +1 -1
  112. package/build/lib/web/development/components/ActionList/actionListUtils.js +4 -4
  113. package/build/lib/web/development/components/ActionList/actionListUtils.js.map +1 -1
  114. package/build/lib/web/development/components/Amount/Amount.js +2 -2
  115. package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
  116. package/build/lib/web/development/components/AnimateInteractions/AnimateInteractions.web.js.map +1 -1
  117. package/build/lib/web/development/components/AnimateInteractions/useFocusWithin.js +2 -2
  118. package/build/lib/web/development/components/AnimateInteractions/useFocusWithin.js.map +1 -1
  119. package/build/lib/web/development/components/Avatar/Avatar.web.js +1 -1
  120. package/build/lib/web/development/components/Avatar/Avatar.web.js.map +1 -1
  121. package/build/lib/web/development/components/Badge/Badge.js +1 -1
  122. package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
  123. package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js +2 -2
  124. package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  125. package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js +2 -2
  126. package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js.map +1 -1
  127. package/build/lib/web/development/components/BladeProvider/useTheme.js.map +1 -1
  128. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +19 -19
  129. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
  130. package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
  131. package/build/lib/web/development/components/BottomSheet/BottomSheetContext.js.map +1 -1
  132. package/build/lib/web/development/components/BottomSheet/BottomSheetStack.js.map +1 -1
  133. package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js +27 -27
  134. package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
  135. package/build/lib/web/development/components/Box/Box.js +1 -1
  136. package/build/lib/web/development/components/Box/Box.js.map +1 -1
  137. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +5 -5
  138. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
  139. package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js.map +1 -1
  140. package/build/lib/web/development/components/Button/Button/Button.js +2 -2
  141. package/build/lib/web/development/components/Button/Button/Button.js.map +1 -1
  142. package/build/lib/web/development/components/Button/IconButton/IconButton.js +1 -1
  143. package/build/lib/web/development/components/Button/IconButton/IconButton.js.map +1 -1
  144. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js +1 -1
  145. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
  146. package/build/lib/web/development/components/Card/Card.js.map +1 -1
  147. package/build/lib/web/development/components/Card/CardFooter.js +2 -2
  148. package/build/lib/web/development/components/Card/CardFooter.js.map +1 -1
  149. package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
  150. package/build/lib/web/development/components/Carousel/Carousel.web.js +6 -6
  151. package/build/lib/web/development/components/Carousel/Carousel.web.js.map +1 -1
  152. package/build/lib/web/development/components/Carousel/CarouselItem.web.js +2 -2
  153. package/build/lib/web/development/components/Carousel/CarouselItem.web.js.map +1 -1
  154. package/build/lib/web/development/components/Carousel/Indicators/Indicators.js +1 -1
  155. package/build/lib/web/development/components/Carousel/Indicators/Indicators.js.map +1 -1
  156. package/build/lib/web/development/components/ChatMessage/ChatMessage.web.js +1 -1
  157. package/build/lib/web/development/components/ChatMessage/ChatMessage.web.js.map +1 -1
  158. package/build/lib/web/development/components/Checkbox/Checkbox.js +5 -5
  159. package/build/lib/web/development/components/Checkbox/Checkbox.js.map +1 -1
  160. package/build/lib/web/development/components/Checkbox/CheckboxGroup/useCheckboxGroup.js.map +1 -1
  161. package/build/lib/web/development/components/Checkbox/useCheckbox.js +1 -1
  162. package/build/lib/web/development/components/Checkbox/useCheckbox.js.map +1 -1
  163. package/build/lib/web/development/components/Chip/Chip.js +5 -5
  164. package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
  165. package/build/lib/web/development/components/Chip/useChipGroup.js.map +1 -1
  166. package/build/lib/web/development/components/Collapsible/Collapsible.js +3 -3
  167. package/build/lib/web/development/components/Collapsible/Collapsible.js.map +1 -1
  168. package/build/lib/web/development/components/Collapsible/CollapsibleButton.js +1 -1
  169. package/build/lib/web/development/components/Collapsible/CollapsibleButton.js.map +1 -1
  170. package/build/lib/web/development/components/Counter/Counter.js +1 -1
  171. package/build/lib/web/development/components/Counter/Counter.js.map +1 -1
  172. package/build/lib/web/development/components/DatePicker/BaseDatePicker.web.js +14 -14
  173. package/build/lib/web/development/components/DatePicker/BaseDatePicker.web.js.map +1 -1
  174. package/build/lib/web/development/components/DatePicker/Calendar.web.js +7 -7
  175. package/build/lib/web/development/components/DatePicker/Calendar.web.js.map +1 -1
  176. package/build/lib/web/development/components/DatePicker/CalendarHeader.web.js.map +1 -1
  177. package/build/lib/web/development/components/DatePicker/DateInput.web.js +17 -5
  178. package/build/lib/web/development/components/DatePicker/DateInput.web.js.map +1 -1
  179. package/build/lib/web/development/components/DatePicker/QuickSelection/PresetDropdown.web.js.map +1 -1
  180. package/build/lib/web/development/components/DatePicker/QuickSelection/PresetSideBar.web.js.map +1 -1
  181. package/build/lib/web/development/components/DatePicker/useControlledDates.js +1 -1
  182. package/build/lib/web/development/components/DatePicker/useControlledDates.js.map +1 -1
  183. package/build/lib/web/development/components/DatePicker/useDatesState.js +1 -1
  184. package/build/lib/web/development/components/DatePicker/useDatesState.js.map +1 -1
  185. package/build/lib/web/development/components/DatePicker/usePopup.js +2 -2
  186. package/build/lib/web/development/components/DatePicker/usePopup.js.map +1 -1
  187. package/build/lib/web/development/components/DatePicker/utils.js +191 -23
  188. package/build/lib/web/development/components/DatePicker/utils.js.map +1 -1
  189. package/build/lib/web/development/components/Drawer/Drawer.web.js +2 -2
  190. package/build/lib/web/development/components/Drawer/Drawer.web.js.map +1 -1
  191. package/build/lib/web/development/components/Drawer/DrawerContext.js.map +1 -1
  192. package/build/lib/web/development/components/Drawer/DrawerSubcomponents.web.js.map +1 -1
  193. package/build/lib/web/development/components/Drawer/StackProvider.js.map +1 -1
  194. package/build/lib/web/development/components/Dropdown/Dropdown.js +28 -28
  195. package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
  196. package/build/lib/web/development/components/Dropdown/DropdownButton.js +4 -4
  197. package/build/lib/web/development/components/Dropdown/DropdownButton.js.map +1 -1
  198. package/build/lib/web/development/components/Dropdown/DropdownHeaderFooter.js.map +1 -1
  199. package/build/lib/web/development/components/Dropdown/DropdownIconButton.js +4 -4
  200. package/build/lib/web/development/components/Dropdown/DropdownIconButton.js.map +1 -1
  201. package/build/lib/web/development/components/Dropdown/DropdownLink.js +4 -4
  202. package/build/lib/web/development/components/Dropdown/DropdownLink.js.map +1 -1
  203. package/build/lib/web/development/components/Dropdown/DropdownOverlay.web.js +1 -1
  204. package/build/lib/web/development/components/Dropdown/DropdownOverlay.web.js.map +1 -1
  205. package/build/lib/web/development/components/Dropdown/FilterChipGroup.web.js +1 -1
  206. package/build/lib/web/development/components/Dropdown/FilterChipGroup.web.js.map +1 -1
  207. package/build/lib/web/development/components/Dropdown/FilterChipGroupContext.web.js.map +1 -1
  208. package/build/lib/web/development/components/Dropdown/FilterChipSelectInput.web.js +7 -7
  209. package/build/lib/web/development/components/Dropdown/FilterChipSelectInput.web.js.map +1 -1
  210. package/build/lib/web/development/components/Dropdown/InputDropdownButton.web.js +8 -8
  211. package/build/lib/web/development/components/Dropdown/InputDropdownButton.web.js.map +1 -1
  212. package/build/lib/web/development/components/Dropdown/useDropdown.js +4 -4
  213. package/build/lib/web/development/components/Dropdown/useDropdown.js.map +1 -1
  214. package/build/lib/web/development/components/EmptyState/EmptyState.web.js +1 -1
  215. package/build/lib/web/development/components/EmptyState/EmptyState.web.js.map +1 -1
  216. package/build/lib/web/development/components/FileUpload/FileUpload.web.js +14 -14
  217. package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
  218. package/build/lib/web/development/components/FileUpload/FileUploadItem.js +1 -1
  219. package/build/lib/web/development/components/FileUpload/FileUploadItem.js.map +1 -1
  220. package/build/lib/web/development/components/FilterChip/BaseFilterChip.web.js +3 -3
  221. package/build/lib/web/development/components/FilterChip/BaseFilterChip.web.js.map +1 -1
  222. package/build/lib/web/development/components/Form/FormHint.js.map +1 -1
  223. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +1 -1
  224. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
  225. package/build/lib/web/development/components/Indicator/Indicator.js +1 -1
  226. package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
  227. package/build/lib/web/development/components/InfoGroup/InfoGroup.web.js +6 -6
  228. package/build/lib/web/development/components/InfoGroup/InfoGroup.web.js.map +1 -1
  229. package/build/lib/web/development/components/InfoGroup/InfoGroupContext.js.map +1 -1
  230. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +1 -1
  231. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  232. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +110 -110
  233. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
  234. package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js +8 -8
  235. package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
  236. package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +7 -7
  237. package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
  238. package/build/lib/web/development/components/Input/BaseInput/useTaggedInput.js +4 -4
  239. package/build/lib/web/development/components/Input/BaseInput/useTaggedInput.js.map +1 -1
  240. package/build/lib/web/development/components/Input/DropdownInputTriggers/AutoComplete.js +8 -8
  241. package/build/lib/web/development/components/Input/DropdownInputTriggers/AutoComplete.js.map +1 -1
  242. package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +4 -4
  243. package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
  244. package/build/lib/web/development/components/Input/DropdownInputTriggers/SelectInput.js +3 -3
  245. package/build/lib/web/development/components/Input/DropdownInputTriggers/SelectInput.js.map +1 -1
  246. package/build/lib/web/development/components/Input/OTPInput/OTPInput.js +14 -14
  247. package/build/lib/web/development/components/Input/OTPInput/OTPInput.js.map +1 -1
  248. package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js +1 -1
  249. package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js.map +1 -1
  250. package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
  251. package/build/lib/web/development/components/Input/PhoneNumberInput/PhoneNumberInput.web.js +5 -5
  252. package/build/lib/web/development/components/Input/PhoneNumberInput/PhoneNumberInput.web.js.map +1 -1
  253. package/build/lib/web/development/components/Input/SearchInput/SearchInput.js +5 -5
  254. package/build/lib/web/development/components/Input/SearchInput/SearchInput.js.map +1 -1
  255. package/build/lib/web/development/components/Input/TextArea/TextArea.js +7 -7
  256. package/build/lib/web/development/components/Input/TextArea/TextArea.js.map +1 -1
  257. package/build/lib/web/development/components/Input/TextInput/TextInput.js +7 -7
  258. package/build/lib/web/development/components/Input/TextInput/TextInput.js.map +1 -1
  259. package/build/lib/web/development/components/Input/TextInput/useFormattedInput.js +2 -2
  260. package/build/lib/web/development/components/Input/TextInput/useFormattedInput.js.map +1 -1
  261. package/build/lib/web/development/components/InputGroup/InputGroup.web.js +1 -1
  262. package/build/lib/web/development/components/InputGroup/InputGroup.web.js.map +1 -1
  263. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +3 -3
  264. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
  265. package/build/lib/web/development/components/Link/Link/Link.js +1 -1
  266. package/build/lib/web/development/components/Link/Link/Link.js.map +1 -1
  267. package/build/lib/web/development/components/List/List.js +1 -1
  268. package/build/lib/web/development/components/List/List.js.map +1 -1
  269. package/build/lib/web/development/components/List/getOrderedListItemBullet.js +3 -3
  270. package/build/lib/web/development/components/List/getOrderedListItemBullet.js.map +1 -1
  271. package/build/lib/web/development/components/ListView/ListViewFilters.web.js.map +1 -1
  272. package/build/lib/web/development/components/ListView/ListViewFiltersContext.web.js.map +1 -1
  273. package/build/lib/web/development/components/LiveAnnouncer/LiveAnnouncer.web.js.map +1 -1
  274. package/build/lib/web/development/components/Menu/Menu.web.js.map +1 -1
  275. package/build/lib/web/development/components/Menu/MenuItem.web.js +3 -3
  276. package/build/lib/web/development/components/Menu/MenuItem.web.js.map +1 -1
  277. package/build/lib/web/development/components/Menu/useMenu.js.map +1 -1
  278. package/build/lib/web/development/components/Modal/ModalBackdrop.js.map +1 -1
  279. package/build/lib/web/development/components/Modal/ModalContext.js.map +1 -1
  280. package/build/lib/web/development/components/Popover/Popover.web.js.map +1 -1
  281. package/build/lib/web/development/components/Preview/Preview.web.js +29 -30
  282. package/build/lib/web/development/components/Preview/Preview.web.js.map +1 -1
  283. package/build/lib/web/development/components/QuickFilters/QuickFilterGroup/QuickFilterGroup.js.map +1 -1
  284. package/build/lib/web/development/components/Radio/Radio.js +4 -4
  285. package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
  286. package/build/lib/web/development/components/Radio/RadioGroup/useRadioGroup.js +1 -1
  287. package/build/lib/web/development/components/Radio/RadioGroup/useRadioGroup.js.map +1 -1
  288. package/build/lib/web/development/components/Radio/useRadio.js +1 -1
  289. package/build/lib/web/development/components/Radio/useRadio.js.map +1 -1
  290. package/build/lib/web/development/components/SideNav/SideNav.web.js +19 -19
  291. package/build/lib/web/development/components/SideNav/SideNav.web.js.map +1 -1
  292. package/build/lib/web/development/components/SideNav/SideNavItems/SideNavLink.web.js +6 -6
  293. package/build/lib/web/development/components/SideNav/SideNavItems/SideNavLink.web.js.map +1 -1
  294. package/build/lib/web/development/components/SideNav/SideNavLevel.web.js.map +1 -1
  295. package/build/lib/web/development/components/SpotlightPopoverTour/Tour.web.js +7 -7
  296. package/build/lib/web/development/components/SpotlightPopoverTour/Tour.web.js.map +1 -1
  297. package/build/lib/web/development/components/SpotlightPopoverTour/TourFooter.web.js +2 -2
  298. package/build/lib/web/development/components/SpotlightPopoverTour/TourFooter.web.js.map +1 -1
  299. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +1 -1
  300. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  301. package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
  302. package/build/lib/web/development/components/SpotlightPopoverTour/TourStep.web.js +1 -1
  303. package/build/lib/web/development/components/SpotlightPopoverTour/TourStep.web.js.map +1 -1
  304. package/build/lib/web/development/components/StepGroup/StepGroup.web.js +6 -6
  305. package/build/lib/web/development/components/StepGroup/StepGroup.web.js.map +1 -1
  306. package/build/lib/web/development/components/StepGroup/StepItem.web.js +1 -1
  307. package/build/lib/web/development/components/StepGroup/StepItem.web.js.map +1 -1
  308. package/build/lib/web/development/components/StepGroup/StepLine.web.js +13 -13
  309. package/build/lib/web/development/components/StepGroup/StepLine.web.js.map +1 -1
  310. package/build/lib/web/development/components/Switch/Switch.js +1 -1
  311. package/build/lib/web/development/components/Switch/Switch.js.map +1 -1
  312. package/build/lib/web/development/components/Table/Table.web.js +10 -10
  313. package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
  314. package/build/lib/web/development/components/Table/TableBody.web.js +6 -6
  315. package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
  316. package/build/lib/web/development/components/Table/TableContext.js.map +1 -1
  317. package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
  318. package/build/lib/web/development/components/Table/TablePagination.web.js +2 -2
  319. package/build/lib/web/development/components/Table/TablePagination.web.js.map +1 -1
  320. package/build/lib/web/development/components/Table/TableToolbar.web.js.map +1 -1
  321. package/build/lib/web/development/components/Tabs/TabItem.web.js +2 -2
  322. package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
  323. package/build/lib/web/development/components/Tabs/TabList.web.js +2 -2
  324. package/build/lib/web/development/components/Tabs/TabList.web.js.map +1 -1
  325. package/build/lib/web/development/components/Tabs/Tabs.web.js +1 -1
  326. package/build/lib/web/development/components/Tabs/Tabs.web.js.map +1 -1
  327. package/build/lib/web/development/components/Tabs/utils.js +2 -2
  328. package/build/lib/web/development/components/Tabs/utils.js.map +1 -1
  329. package/build/lib/web/development/components/Tag/AnimatedTag.web.js.map +1 -1
  330. package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
  331. package/build/lib/web/development/components/Toast/Toast.web.js +2 -2
  332. package/build/lib/web/development/components/Toast/Toast.web.js.map +1 -1
  333. package/build/lib/web/development/components/Toast/ToastContainer.web.js.map +1 -1
  334. package/build/lib/web/development/components/Tooltip/Tooltip.web.js +1 -1
  335. package/build/lib/web/development/components/Tooltip/Tooltip.web.js.map +1 -1
  336. package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js +2 -2
  337. package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
  338. package/build/lib/web/development/components/TopNav/TabNav/utils.js +2 -2
  339. package/build/lib/web/development/components/TopNav/TabNav/utils.js.map +1 -1
  340. package/build/lib/web/development/components/Typography/Text/Text.js +1 -1
  341. package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
  342. package/build/lib/web/development/tokens/theme/overrideTheme.js +2 -2
  343. package/build/lib/web/development/tokens/theme/overrideTheme.js.map +1 -1
  344. package/build/lib/web/development/utils/bladeCoverage.js +9 -10
  345. package/build/lib/web/development/utils/bladeCoverage.js.map +1 -1
  346. package/build/lib/web/development/utils/fireNativeEvent/fireNativeEvent.web.js +1 -1
  347. package/build/lib/web/development/utils/fireNativeEvent/fireNativeEvent.web.js.map +1 -1
  348. package/build/lib/web/development/utils/hasSameObjectStructure/hasSameObjectStructure.js +6 -6
  349. package/build/lib/web/development/utils/hasSameObjectStructure/hasSameObjectStructure.js.map +1 -1
  350. package/build/lib/web/development/utils/isPartialMatchObjectKeys/isPartialMatchObjectKeys.js +3 -3
  351. package/build/lib/web/development/utils/isPartialMatchObjectKeys/isPartialMatchObjectKeys.js.map +1 -1
  352. package/build/lib/web/development/utils/isValidAllowedChildren/isValidAllowedChildren.js +2 -2
  353. package/build/lib/web/development/utils/isValidAllowedChildren/isValidAllowedChildren.js.map +1 -1
  354. package/build/lib/web/development/utils/lodashButBetter/cloneDeep.js +3 -3
  355. package/build/lib/web/development/utils/lodashButBetter/get.js +3 -3
  356. package/build/lib/web/development/utils/useControllable.js +1 -1
  357. package/build/lib/web/development/utils/useControllable.js.map +1 -1
  358. package/build/lib/web/development/utils/useControlledDropdownInput/useControlledDropdownInput.js +2 -2
  359. package/build/lib/web/development/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
  360. package/build/lib/web/development/utils/useScrollLock.js.map +1 -1
  361. package/build/lib/web/production/components/Accordion/Accordion.js +2 -2
  362. package/build/lib/web/production/components/Accordion/Accordion.js.map +1 -1
  363. package/build/lib/web/production/components/ActionList/ActionList.js +1 -1
  364. package/build/lib/web/production/components/ActionList/ActionList.js.map +1 -1
  365. package/build/lib/web/production/components/ActionList/ActionListBox.web.js +7 -7
  366. package/build/lib/web/production/components/ActionList/ActionListBox.web.js.map +1 -1
  367. package/build/lib/web/production/components/ActionList/ActionListItem.js +4 -4
  368. package/build/lib/web/production/components/ActionList/ActionListItem.js.map +1 -1
  369. package/build/lib/web/production/components/ActionList/actionListUtils.js +4 -4
  370. package/build/lib/web/production/components/ActionList/actionListUtils.js.map +1 -1
  371. package/build/lib/web/production/components/Amount/Amount.js +2 -2
  372. package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
  373. package/build/lib/web/production/components/AnimateInteractions/AnimateInteractions.web.js.map +1 -1
  374. package/build/lib/web/production/components/AnimateInteractions/useFocusWithin.js +2 -2
  375. package/build/lib/web/production/components/AnimateInteractions/useFocusWithin.js.map +1 -1
  376. package/build/lib/web/production/components/Avatar/Avatar.web.js +1 -1
  377. package/build/lib/web/production/components/Avatar/Avatar.web.js.map +1 -1
  378. package/build/lib/web/production/components/Badge/Badge.js +1 -1
  379. package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
  380. package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js +2 -2
  381. package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  382. package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js +2 -2
  383. package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js.map +1 -1
  384. package/build/lib/web/production/components/BladeProvider/useTheme.js.map +1 -1
  385. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +19 -19
  386. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
  387. package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
  388. package/build/lib/web/production/components/BottomSheet/BottomSheetContext.js.map +1 -1
  389. package/build/lib/web/production/components/BottomSheet/BottomSheetStack.js.map +1 -1
  390. package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js +27 -27
  391. package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
  392. package/build/lib/web/production/components/Box/Box.js +1 -1
  393. package/build/lib/web/production/components/Box/Box.js.map +1 -1
  394. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +5 -5
  395. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
  396. package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js.map +1 -1
  397. package/build/lib/web/production/components/Button/Button/Button.js +2 -2
  398. package/build/lib/web/production/components/Button/Button/Button.js.map +1 -1
  399. package/build/lib/web/production/components/Button/IconButton/IconButton.js +1 -1
  400. package/build/lib/web/production/components/Button/IconButton/IconButton.js.map +1 -1
  401. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js +1 -1
  402. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
  403. package/build/lib/web/production/components/Card/Card.js.map +1 -1
  404. package/build/lib/web/production/components/Card/CardFooter.js +2 -2
  405. package/build/lib/web/production/components/Card/CardFooter.js.map +1 -1
  406. package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
  407. package/build/lib/web/production/components/Carousel/Carousel.web.js +6 -6
  408. package/build/lib/web/production/components/Carousel/Carousel.web.js.map +1 -1
  409. package/build/lib/web/production/components/Carousel/CarouselItem.web.js +2 -2
  410. package/build/lib/web/production/components/Carousel/CarouselItem.web.js.map +1 -1
  411. package/build/lib/web/production/components/Carousel/Indicators/Indicators.js +1 -1
  412. package/build/lib/web/production/components/Carousel/Indicators/Indicators.js.map +1 -1
  413. package/build/lib/web/production/components/ChatMessage/ChatMessage.web.js +1 -1
  414. package/build/lib/web/production/components/ChatMessage/ChatMessage.web.js.map +1 -1
  415. package/build/lib/web/production/components/Checkbox/Checkbox.js +5 -5
  416. package/build/lib/web/production/components/Checkbox/Checkbox.js.map +1 -1
  417. package/build/lib/web/production/components/Checkbox/CheckboxGroup/useCheckboxGroup.js.map +1 -1
  418. package/build/lib/web/production/components/Checkbox/useCheckbox.js +1 -1
  419. package/build/lib/web/production/components/Checkbox/useCheckbox.js.map +1 -1
  420. package/build/lib/web/production/components/Chip/Chip.js +5 -5
  421. package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
  422. package/build/lib/web/production/components/Chip/useChipGroup.js.map +1 -1
  423. package/build/lib/web/production/components/Collapsible/Collapsible.js +3 -3
  424. package/build/lib/web/production/components/Collapsible/Collapsible.js.map +1 -1
  425. package/build/lib/web/production/components/Collapsible/CollapsibleButton.js +1 -1
  426. package/build/lib/web/production/components/Collapsible/CollapsibleButton.js.map +1 -1
  427. package/build/lib/web/production/components/Counter/Counter.js +1 -1
  428. package/build/lib/web/production/components/Counter/Counter.js.map +1 -1
  429. package/build/lib/web/production/components/DatePicker/BaseDatePicker.web.js +14 -14
  430. package/build/lib/web/production/components/DatePicker/BaseDatePicker.web.js.map +1 -1
  431. package/build/lib/web/production/components/DatePicker/Calendar.web.js +7 -7
  432. package/build/lib/web/production/components/DatePicker/Calendar.web.js.map +1 -1
  433. package/build/lib/web/production/components/DatePicker/CalendarHeader.web.js.map +1 -1
  434. package/build/lib/web/production/components/DatePicker/DateInput.web.js +17 -5
  435. package/build/lib/web/production/components/DatePicker/DateInput.web.js.map +1 -1
  436. package/build/lib/web/production/components/DatePicker/QuickSelection/PresetDropdown.web.js.map +1 -1
  437. package/build/lib/web/production/components/DatePicker/QuickSelection/PresetSideBar.web.js.map +1 -1
  438. package/build/lib/web/production/components/DatePicker/useControlledDates.js +1 -1
  439. package/build/lib/web/production/components/DatePicker/useControlledDates.js.map +1 -1
  440. package/build/lib/web/production/components/DatePicker/useDatesState.js +1 -1
  441. package/build/lib/web/production/components/DatePicker/useDatesState.js.map +1 -1
  442. package/build/lib/web/production/components/DatePicker/usePopup.js +2 -2
  443. package/build/lib/web/production/components/DatePicker/usePopup.js.map +1 -1
  444. package/build/lib/web/production/components/DatePicker/utils.js +191 -23
  445. package/build/lib/web/production/components/DatePicker/utils.js.map +1 -1
  446. package/build/lib/web/production/components/Drawer/Drawer.web.js +2 -2
  447. package/build/lib/web/production/components/Drawer/Drawer.web.js.map +1 -1
  448. package/build/lib/web/production/components/Drawer/DrawerContext.js.map +1 -1
  449. package/build/lib/web/production/components/Drawer/DrawerSubcomponents.web.js.map +1 -1
  450. package/build/lib/web/production/components/Drawer/StackProvider.js.map +1 -1
  451. package/build/lib/web/production/components/Dropdown/Dropdown.js +28 -28
  452. package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
  453. package/build/lib/web/production/components/Dropdown/DropdownButton.js +4 -4
  454. package/build/lib/web/production/components/Dropdown/DropdownButton.js.map +1 -1
  455. package/build/lib/web/production/components/Dropdown/DropdownHeaderFooter.js.map +1 -1
  456. package/build/lib/web/production/components/Dropdown/DropdownIconButton.js +4 -4
  457. package/build/lib/web/production/components/Dropdown/DropdownIconButton.js.map +1 -1
  458. package/build/lib/web/production/components/Dropdown/DropdownLink.js +4 -4
  459. package/build/lib/web/production/components/Dropdown/DropdownLink.js.map +1 -1
  460. package/build/lib/web/production/components/Dropdown/DropdownOverlay.web.js +1 -1
  461. package/build/lib/web/production/components/Dropdown/DropdownOverlay.web.js.map +1 -1
  462. package/build/lib/web/production/components/Dropdown/FilterChipGroup.web.js +1 -1
  463. package/build/lib/web/production/components/Dropdown/FilterChipGroup.web.js.map +1 -1
  464. package/build/lib/web/production/components/Dropdown/FilterChipGroupContext.web.js.map +1 -1
  465. package/build/lib/web/production/components/Dropdown/FilterChipSelectInput.web.js +7 -7
  466. package/build/lib/web/production/components/Dropdown/FilterChipSelectInput.web.js.map +1 -1
  467. package/build/lib/web/production/components/Dropdown/InputDropdownButton.web.js +8 -8
  468. package/build/lib/web/production/components/Dropdown/InputDropdownButton.web.js.map +1 -1
  469. package/build/lib/web/production/components/Dropdown/useDropdown.js +4 -4
  470. package/build/lib/web/production/components/Dropdown/useDropdown.js.map +1 -1
  471. package/build/lib/web/production/components/EmptyState/EmptyState.web.js +1 -1
  472. package/build/lib/web/production/components/EmptyState/EmptyState.web.js.map +1 -1
  473. package/build/lib/web/production/components/FileUpload/FileUpload.web.js +14 -14
  474. package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
  475. package/build/lib/web/production/components/FileUpload/FileUploadItem.js +1 -1
  476. package/build/lib/web/production/components/FileUpload/FileUploadItem.js.map +1 -1
  477. package/build/lib/web/production/components/FilterChip/BaseFilterChip.web.js +3 -3
  478. package/build/lib/web/production/components/FilterChip/BaseFilterChip.web.js.map +1 -1
  479. package/build/lib/web/production/components/Form/FormHint.js.map +1 -1
  480. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +1 -1
  481. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
  482. package/build/lib/web/production/components/Indicator/Indicator.js +1 -1
  483. package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
  484. package/build/lib/web/production/components/InfoGroup/InfoGroup.web.js +6 -6
  485. package/build/lib/web/production/components/InfoGroup/InfoGroup.web.js.map +1 -1
  486. package/build/lib/web/production/components/InfoGroup/InfoGroupContext.js.map +1 -1
  487. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +1 -1
  488. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  489. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +110 -110
  490. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
  491. package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js +8 -8
  492. package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
  493. package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +7 -7
  494. package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
  495. package/build/lib/web/production/components/Input/BaseInput/useTaggedInput.js +4 -4
  496. package/build/lib/web/production/components/Input/BaseInput/useTaggedInput.js.map +1 -1
  497. package/build/lib/web/production/components/Input/DropdownInputTriggers/AutoComplete.js +8 -8
  498. package/build/lib/web/production/components/Input/DropdownInputTriggers/AutoComplete.js.map +1 -1
  499. package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +4 -4
  500. package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
  501. package/build/lib/web/production/components/Input/DropdownInputTriggers/SelectInput.js +3 -3
  502. package/build/lib/web/production/components/Input/DropdownInputTriggers/SelectInput.js.map +1 -1
  503. package/build/lib/web/production/components/Input/OTPInput/OTPInput.js +14 -14
  504. package/build/lib/web/production/components/Input/OTPInput/OTPInput.js.map +1 -1
  505. package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js +1 -1
  506. package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js.map +1 -1
  507. package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
  508. package/build/lib/web/production/components/Input/PhoneNumberInput/PhoneNumberInput.web.js +5 -5
  509. package/build/lib/web/production/components/Input/PhoneNumberInput/PhoneNumberInput.web.js.map +1 -1
  510. package/build/lib/web/production/components/Input/SearchInput/SearchInput.js +5 -5
  511. package/build/lib/web/production/components/Input/SearchInput/SearchInput.js.map +1 -1
  512. package/build/lib/web/production/components/Input/TextArea/TextArea.js +7 -7
  513. package/build/lib/web/production/components/Input/TextArea/TextArea.js.map +1 -1
  514. package/build/lib/web/production/components/Input/TextInput/TextInput.js +7 -7
  515. package/build/lib/web/production/components/Input/TextInput/TextInput.js.map +1 -1
  516. package/build/lib/web/production/components/Input/TextInput/useFormattedInput.js +2 -2
  517. package/build/lib/web/production/components/Input/TextInput/useFormattedInput.js.map +1 -1
  518. package/build/lib/web/production/components/InputGroup/InputGroup.web.js +1 -1
  519. package/build/lib/web/production/components/InputGroup/InputGroup.web.js.map +1 -1
  520. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +3 -3
  521. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
  522. package/build/lib/web/production/components/Link/Link/Link.js +1 -1
  523. package/build/lib/web/production/components/Link/Link/Link.js.map +1 -1
  524. package/build/lib/web/production/components/List/List.js +1 -1
  525. package/build/lib/web/production/components/List/List.js.map +1 -1
  526. package/build/lib/web/production/components/List/getOrderedListItemBullet.js +3 -3
  527. package/build/lib/web/production/components/List/getOrderedListItemBullet.js.map +1 -1
  528. package/build/lib/web/production/components/ListView/ListViewFilters.web.js.map +1 -1
  529. package/build/lib/web/production/components/ListView/ListViewFiltersContext.web.js.map +1 -1
  530. package/build/lib/web/production/components/LiveAnnouncer/LiveAnnouncer.web.js.map +1 -1
  531. package/build/lib/web/production/components/Menu/Menu.web.js.map +1 -1
  532. package/build/lib/web/production/components/Menu/MenuItem.web.js +3 -3
  533. package/build/lib/web/production/components/Menu/MenuItem.web.js.map +1 -1
  534. package/build/lib/web/production/components/Menu/useMenu.js.map +1 -1
  535. package/build/lib/web/production/components/Modal/ModalBackdrop.js.map +1 -1
  536. package/build/lib/web/production/components/Modal/ModalContext.js.map +1 -1
  537. package/build/lib/web/production/components/Popover/Popover.web.js.map +1 -1
  538. package/build/lib/web/production/components/Preview/Preview.web.js +29 -30
  539. package/build/lib/web/production/components/Preview/Preview.web.js.map +1 -1
  540. package/build/lib/web/production/components/QuickFilters/QuickFilterGroup/QuickFilterGroup.js.map +1 -1
  541. package/build/lib/web/production/components/Radio/Radio.js +4 -4
  542. package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
  543. package/build/lib/web/production/components/Radio/RadioGroup/useRadioGroup.js +1 -1
  544. package/build/lib/web/production/components/Radio/RadioGroup/useRadioGroup.js.map +1 -1
  545. package/build/lib/web/production/components/Radio/useRadio.js +1 -1
  546. package/build/lib/web/production/components/Radio/useRadio.js.map +1 -1
  547. package/build/lib/web/production/components/SideNav/SideNav.web.js +19 -19
  548. package/build/lib/web/production/components/SideNav/SideNav.web.js.map +1 -1
  549. package/build/lib/web/production/components/SideNav/SideNavItems/SideNavLink.web.js +6 -6
  550. package/build/lib/web/production/components/SideNav/SideNavItems/SideNavLink.web.js.map +1 -1
  551. package/build/lib/web/production/components/SideNav/SideNavLevel.web.js.map +1 -1
  552. package/build/lib/web/production/components/SpotlightPopoverTour/Tour.web.js +7 -7
  553. package/build/lib/web/production/components/SpotlightPopoverTour/Tour.web.js.map +1 -1
  554. package/build/lib/web/production/components/SpotlightPopoverTour/TourFooter.web.js +2 -2
  555. package/build/lib/web/production/components/SpotlightPopoverTour/TourFooter.web.js.map +1 -1
  556. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +1 -1
  557. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  558. package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
  559. package/build/lib/web/production/components/SpotlightPopoverTour/TourStep.web.js +1 -1
  560. package/build/lib/web/production/components/SpotlightPopoverTour/TourStep.web.js.map +1 -1
  561. package/build/lib/web/production/components/StepGroup/StepGroup.web.js +6 -6
  562. package/build/lib/web/production/components/StepGroup/StepGroup.web.js.map +1 -1
  563. package/build/lib/web/production/components/StepGroup/StepItem.web.js +1 -1
  564. package/build/lib/web/production/components/StepGroup/StepItem.web.js.map +1 -1
  565. package/build/lib/web/production/components/StepGroup/StepLine.web.js +13 -13
  566. package/build/lib/web/production/components/StepGroup/StepLine.web.js.map +1 -1
  567. package/build/lib/web/production/components/Switch/Switch.js +1 -1
  568. package/build/lib/web/production/components/Switch/Switch.js.map +1 -1
  569. package/build/lib/web/production/components/Table/Table.web.js +10 -10
  570. package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
  571. package/build/lib/web/production/components/Table/TableBody.web.js +6 -6
  572. package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
  573. package/build/lib/web/production/components/Table/TableContext.js.map +1 -1
  574. package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
  575. package/build/lib/web/production/components/Table/TablePagination.web.js +2 -2
  576. package/build/lib/web/production/components/Table/TablePagination.web.js.map +1 -1
  577. package/build/lib/web/production/components/Table/TableToolbar.web.js.map +1 -1
  578. package/build/lib/web/production/components/Tabs/TabItem.web.js +2 -2
  579. package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
  580. package/build/lib/web/production/components/Tabs/TabList.web.js +2 -2
  581. package/build/lib/web/production/components/Tabs/TabList.web.js.map +1 -1
  582. package/build/lib/web/production/components/Tabs/Tabs.web.js +1 -1
  583. package/build/lib/web/production/components/Tabs/Tabs.web.js.map +1 -1
  584. package/build/lib/web/production/components/Tabs/utils.js +2 -2
  585. package/build/lib/web/production/components/Tabs/utils.js.map +1 -1
  586. package/build/lib/web/production/components/Tag/AnimatedTag.web.js.map +1 -1
  587. package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
  588. package/build/lib/web/production/components/Toast/Toast.web.js +2 -2
  589. package/build/lib/web/production/components/Toast/Toast.web.js.map +1 -1
  590. package/build/lib/web/production/components/Toast/ToastContainer.web.js.map +1 -1
  591. package/build/lib/web/production/components/Tooltip/Tooltip.web.js +1 -1
  592. package/build/lib/web/production/components/Tooltip/Tooltip.web.js.map +1 -1
  593. package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js +2 -2
  594. package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
  595. package/build/lib/web/production/components/TopNav/TabNav/utils.js +2 -2
  596. package/build/lib/web/production/components/TopNav/TabNav/utils.js.map +1 -1
  597. package/build/lib/web/production/components/Typography/Text/Text.js +1 -1
  598. package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
  599. package/build/lib/web/production/tokens/theme/overrideTheme.js +2 -2
  600. package/build/lib/web/production/tokens/theme/overrideTheme.js.map +1 -1
  601. package/build/lib/web/production/utils/bladeCoverage.js +9 -10
  602. package/build/lib/web/production/utils/bladeCoverage.js.map +1 -1
  603. package/build/lib/web/production/utils/fireNativeEvent/fireNativeEvent.web.js +1 -1
  604. package/build/lib/web/production/utils/fireNativeEvent/fireNativeEvent.web.js.map +1 -1
  605. package/build/lib/web/production/utils/hasSameObjectStructure/hasSameObjectStructure.js +6 -6
  606. package/build/lib/web/production/utils/hasSameObjectStructure/hasSameObjectStructure.js.map +1 -1
  607. package/build/lib/web/production/utils/isPartialMatchObjectKeys/isPartialMatchObjectKeys.js +3 -3
  608. package/build/lib/web/production/utils/isPartialMatchObjectKeys/isPartialMatchObjectKeys.js.map +1 -1
  609. package/build/lib/web/production/utils/isValidAllowedChildren/isValidAllowedChildren.js +2 -2
  610. package/build/lib/web/production/utils/isValidAllowedChildren/isValidAllowedChildren.js.map +1 -1
  611. package/build/lib/web/production/utils/lodashButBetter/cloneDeep.js +3 -3
  612. package/build/lib/web/production/utils/lodashButBetter/get.js +3 -3
  613. package/build/lib/web/production/utils/useControllable.js +1 -1
  614. package/build/lib/web/production/utils/useControllable.js.map +1 -1
  615. package/build/lib/web/production/utils/useControlledDropdownInput/useControlledDropdownInput.js +2 -2
  616. package/build/lib/web/production/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
  617. package/build/lib/web/production/utils/useScrollLock.js.map +1 -1
  618. package/package.json +15 -10
@@ -1 +1 @@
1
- {"version":3,"file":"SearchInput.js","sources":["../../../../../../../src/components/Input/SearchInput/SearchInput.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getKeyboardAndAutocompleteProps } from '../BaseInput/utils';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport { CloseIcon, SearchIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type {\n BladeElementRef,\n BladeElementRefWithValue,\n DataAnalyticsAttribute,\n} from '~utils/types';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport { DropdownOverlay, InputDropdownButton } from '~components/Dropdown';\nimport { Divider } from '~components/Divider';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\n\ntype SearchInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'labelSuffix'\n | 'labelTrailing'\n | 'helpText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'autoFocus'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n | keyof DataAnalyticsAttribute\n> & {\n /**\n * Event handler to handle the onClick event for clear button.\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n /**\n * Toggle the visibility of the search icon.\n *\n * @default true\n */\n showSearchIcon?: boolean;\n /**\n * Optional trailing to be shown at the end of the input.\n */\n trailing?: React.ReactNode;\n} & StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype SearchInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype SearchInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype SearchInputProps = (SearchInputPropsWithA11yLabel | SearchInputPropsWithLabel) &\n SearchInputCommonProps;\n\n// need to do this to tell TS to infer type as SearchInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef?: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _SearchInput: React.ForwardRefRenderFunction<BladeElementRef, SearchInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n defaultValue,\n name,\n value,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n labelSuffix,\n labelTrailing,\n helpText,\n onClearButtonClick,\n isLoading,\n autoCapitalize,\n autoFocus,\n testID,\n size = 'medium',\n showSearchIcon = true,\n trailing,\n ...rest\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n const [isTrailingDropDownOpen, setIsTrailingDropDownOpen] = useState(false);\n const {\n triggererWrapperRef,\n onTriggerKeydown,\n onTriggerClick,\n dropdownTriggerer,\n close: closeParentDropDown,\n isOpen: isParentDropDownOpen,\n } = useDropdown();\n const isInsideDropdown = dropdownTriggerer === 'SearchInput';\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(defaultValue ?? value));\n }, [defaultValue, value]);\n\n useEffect(() => {\n if (isParentDropDownOpen && isTrailingDropDownOpen) {\n setIsTrailingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [closeParentDropDown, isParentDropDownOpen]);\n\n useEffect(() => {\n if (isTrailingDropDownOpen && isParentDropDownOpen) {\n closeParentDropDown();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [setIsTrailingDropDownOpen, isTrailingDropDownOpen]);\n\n const trailingDropdown =\n trailing && getComponentId(trailing as React.ReactElement) === 'Dropdown' ? trailing : null;\n\n const renderTrailingDropDown = (): React.ReactElement | null => {\n if (!trailingDropdown) {\n return null;\n }\n return React.cloneElement(trailingDropdown as React.ReactElement, {\n selectionType: 'single',\n isOpen: isTrailingDropDownOpen,\n onOpenChange: (isOpen: boolean) => {\n setIsTrailingDropDownOpen(isOpen);\n },\n children: React.Children.map(\n (trailingDropdown as React.ReactElement).props.children,\n (child) => {\n if (child.type === InputDropdownButton) {\n return React.cloneElement(child, {\n _isInsideSearchInput: true,\n });\n }\n if (child.type === DropdownOverlay) {\n return React.cloneElement(child, {\n referenceRef: triggererWrapperRef,\n _isNestedDropdown: true,\n defaultPlacement: 'bottom-end',\n });\n }\n return child;\n },\n ),\n });\n };\n\n const renderClearButton = (): React.ReactElement => {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(value) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n };\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton && trailingDropdown) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" />\n </BaseBox>\n );\n }\n if (shouldShowClearButton) {\n return renderClearButton();\n }\n\n return null;\n };\n\n return (\n <BaseBox position=\"relative\">\n <BaseInput\n id=\"searchinput\"\n componentName={MetaConstants.SearchInput}\n ref={mergedRef}\n isDropdownTrigger={true}\n setInputWrapperRef={\n isInsideDropdown || isTrailingDropDownOpen\n ? (wrapperNode) => {\n triggererWrapperRef.current = wrapperNode;\n }\n : undefined\n }\n label={label as string}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n placeholder={placeholder}\n defaultValue={defaultValue}\n value={value}\n name={name}\n onKeyDown={isInsideDropdown ? onTriggerKeydown : undefined}\n onChange={({ name, value }) => {\n if (value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n onChange?.({ name, value });\n }}\n onClick={(e) => {\n if (isDisabled) return;\n if (isInsideDropdown) {\n onTriggerClick();\n }\n onClick?.(e);\n }}\n onFocus={onFocus}\n onBlur={onBlur}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n leadingIcon={showSearchIcon ? SearchIcon : undefined}\n trailingInteractionElement={renderInteractionElement()}\n trailingDropDown={renderTrailingDropDown()}\n helpText={helpText}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type: 'search',\n autoCapitalize,\n })}\n size={size}\n {...rest}\n />\n </BaseBox>\n );\n};\n\nconst SearchInput = assignWithoutSideEffects(React.forwardRef(_SearchInput), {\n displayName: 'SearchInput',\n componentId: dropdownComponentIds.triggers.SearchInput,\n});\n\nexport type { SearchInputProps };\nexport { SearchInput };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_SearchInput","_ref","ref","label","accessibilityLabel","_ref$labelPosition","labelPosition","placeholder","defaultValue","name","value","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","labelSuffix","labelTrailing","helpText","onClearButtonClick","isLoading","autoCapitalize","autoFocus","testID","_ref$size","size","_ref$showSearchIcon","showSearchIcon","trailing","rest","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","_useState3","_useState4","isTrailingDropDownOpen","setIsTrailingDropDownOpen","_useDropdown","useDropdown","triggererWrapperRef","onTriggerKeydown","onTriggerClick","dropdownTriggerer","closeParentDropDown","close","isParentDropDownOpen","isOpen","isInsideDropdown","useEffect","Boolean","trailingDropdown","getComponentId","renderTrailingDropDown","cloneElement","selectionType","onOpenChange","children","Children","map","props","child","type","InputDropdownButton","_isInsideSearchInput","DropdownOverlay","referenceRef","_isNestedDropdown","defaultPlacement","renderClearButton","_jsx","IconButton","icon","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","renderInteractionElement","Spinner","color","_jsxs","BaseBox","display","gap","Divider","orientation","position","BaseInput","_objectSpread","id","componentName","MetaConstants","SearchInput","isDropdownTrigger","setInputWrapperRef","wrapperNode","undefined","hideLabelText","onKeyDown","_ref2","length","e","leadingIcon","SearchIcon","trailingInteractionElement","trailingDropDown","getKeyboardAndAutocompleteProps","assignWithoutSideEffects","forwardRef","displayName","componentId","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuGA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,aAAmB,EAA4C;AACpF,EAAA,OAAOC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC7C,CAAC,CAAA;AAED,IAAMC,YAA+E,GAAG,SAAlFA,YAA+EA,CAAAC,IAAA,EA4BnFC,GAAG,EACc;AAAA,EAAA,IA3BfC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,kBAAkB,GAAAH,IAAA,CAAlBG,kBAAkB;IAAAC,kBAAA,GAAAJ,IAAA,CAClBK,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,kBAAA;IACrBE,WAAW,GAAAN,IAAA,CAAXM,WAAW;IACXC,YAAY,GAAAP,IAAA,CAAZO,YAAY;IACZC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;IACJC,KAAK,GAAAT,IAAA,CAALS,KAAK;IACLC,SAAQ,GAAAV,IAAA,CAARU,QAAQ;IACRC,QAAO,GAAAX,IAAA,CAAPW,OAAO;IACPC,OAAO,GAAAZ,IAAA,CAAPY,OAAO;IACPC,MAAM,GAAAb,IAAA,CAANa,MAAM;IACNC,QAAQ,GAAAd,IAAA,CAARc,QAAQ;IACRC,UAAU,GAAAf,IAAA,CAAVe,UAAU;IACVC,WAAW,GAAAhB,IAAA,CAAXgB,WAAW;IACXC,aAAa,GAAAjB,IAAA,CAAbiB,aAAa;IACbC,QAAQ,GAAAlB,IAAA,CAARkB,QAAQ;IACRC,kBAAkB,GAAAnB,IAAA,CAAlBmB,kBAAkB;IAClBC,SAAS,GAAApB,IAAA,CAAToB,SAAS;IACTC,cAAc,GAAArB,IAAA,CAAdqB,cAAc;IACdC,SAAS,GAAAtB,IAAA,CAATs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,EAAEA,MAAAA;AAAO,KAAA,EACX+F,+BAA+B,CAAC;AAClC/C,MAAAA,IAAI,EAAE,QAAQ;AACdlD,MAAAA,cAAc,EAAdA,cAAAA;AACF,KAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AACFI,MAAAA,IAAI,EAAEA,IAAAA;AAAK,KAAA,EACPI,IAAI,CACT,CAAA;AAAC,GACK,CAAC,CAAA;AAEd,CAAC,CAAA;AAEK2E,IAAAA,WAAW,gBAAGe,wBAAwB,eAACtF,cAAK,CAACuF,UAAU,CAACzH,YAAY,CAAC,EAAE;AAC3E0H,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,WAAW,EAAEC,oBAAoB,CAACC,QAAQ,CAACpB,WAAAA;AAC7C,CAAC;;;;"}
1
+ {"version":3,"file":"SearchInput.js","sources":["../../../../../../../src/components/Input/SearchInput/SearchInput.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getKeyboardAndAutocompleteProps } from '../BaseInput/utils';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport { CloseIcon, SearchIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type {\n BladeElementRef,\n BladeElementRefWithValue,\n DataAnalyticsAttribute,\n} from '~utils/types';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport { DropdownOverlay, InputDropdownButton } from '~components/Dropdown';\nimport { Divider } from '~components/Divider';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\n\ntype SearchInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'labelSuffix'\n | 'labelTrailing'\n | 'helpText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'autoFocus'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n | keyof DataAnalyticsAttribute\n> & {\n /**\n * Event handler to handle the onClick event for clear button.\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n /**\n * Toggle the visibility of the search icon.\n *\n * @default true\n */\n showSearchIcon?: boolean;\n /**\n * Optional trailing to be shown at the end of the input.\n */\n trailing?: React.ReactNode;\n} & StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype SearchInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype SearchInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype SearchInputProps = (SearchInputPropsWithA11yLabel | SearchInputPropsWithLabel) &\n SearchInputCommonProps;\n\n// need to do this to tell TS to infer type as SearchInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef?: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _SearchInput: React.ForwardRefRenderFunction<BladeElementRef, SearchInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n defaultValue,\n name,\n value,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n labelSuffix,\n labelTrailing,\n helpText,\n onClearButtonClick,\n isLoading,\n autoCapitalize,\n autoFocus,\n testID,\n size = 'medium',\n showSearchIcon = true,\n trailing,\n ...rest\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n const [isTrailingDropDownOpen, setIsTrailingDropDownOpen] = useState(false);\n const {\n triggererWrapperRef,\n onTriggerKeydown,\n onTriggerClick,\n dropdownTriggerer,\n close: closeParentDropDown,\n isOpen: isParentDropDownOpen,\n } = useDropdown();\n const isInsideDropdown = dropdownTriggerer === 'SearchInput';\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(defaultValue ?? value));\n }, [defaultValue, value]);\n\n useEffect(() => {\n if (isParentDropDownOpen && isTrailingDropDownOpen) {\n setIsTrailingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [closeParentDropDown, isParentDropDownOpen]);\n\n useEffect(() => {\n if (isTrailingDropDownOpen && isParentDropDownOpen) {\n closeParentDropDown();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [setIsTrailingDropDownOpen, isTrailingDropDownOpen]);\n\n const trailingDropdown =\n trailing && getComponentId(trailing as React.ReactElement) === 'Dropdown' ? trailing : null;\n\n const renderTrailingDropDown = (): React.ReactElement | null => {\n if (!trailingDropdown) {\n return null;\n }\n return React.cloneElement(trailingDropdown as React.ReactElement, {\n selectionType: 'single',\n isOpen: isTrailingDropDownOpen,\n onOpenChange: (isOpen: boolean) => {\n setIsTrailingDropDownOpen(isOpen);\n },\n children: React.Children.map(\n (trailingDropdown as React.ReactElement).props.children,\n (child) => {\n if (child.type === InputDropdownButton) {\n return React.cloneElement(child, {\n _isInsideSearchInput: true,\n });\n }\n if (child.type === DropdownOverlay) {\n return React.cloneElement(child, {\n referenceRef: triggererWrapperRef,\n _isNestedDropdown: true,\n defaultPlacement: 'bottom-end',\n });\n }\n return child;\n },\n ),\n });\n };\n\n const renderClearButton = (): React.ReactElement => {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(value) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n };\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton && trailingDropdown) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" />\n </BaseBox>\n );\n }\n if (shouldShowClearButton) {\n return renderClearButton();\n }\n\n return null;\n };\n\n return (\n <BaseBox position=\"relative\">\n <BaseInput\n id=\"searchinput\"\n componentName={MetaConstants.SearchInput}\n ref={mergedRef}\n isDropdownTrigger={true}\n setInputWrapperRef={\n isInsideDropdown || isTrailingDropDownOpen\n ? (wrapperNode) => {\n triggererWrapperRef.current = wrapperNode;\n }\n : undefined\n }\n label={label as string}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n placeholder={placeholder}\n defaultValue={defaultValue}\n value={value}\n name={name}\n onKeyDown={isInsideDropdown ? onTriggerKeydown : undefined}\n onChange={({ name, value }) => {\n if (value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n onChange?.({ name, value });\n }}\n onClick={(e) => {\n if (isDisabled) return;\n if (isInsideDropdown) {\n onTriggerClick();\n }\n onClick?.(e);\n }}\n onFocus={onFocus}\n onBlur={onBlur}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n leadingIcon={showSearchIcon ? SearchIcon : undefined}\n trailingInteractionElement={renderInteractionElement()}\n trailingDropDown={renderTrailingDropDown()}\n helpText={helpText}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type: 'search',\n autoCapitalize,\n })}\n size={size}\n {...rest}\n />\n </BaseBox>\n );\n};\n\nconst SearchInput = assignWithoutSideEffects(React.forwardRef(_SearchInput), {\n displayName: 'SearchInput',\n componentId: dropdownComponentIds.triggers.SearchInput,\n});\n\nexport type { SearchInputProps };\nexport { SearchInput };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_SearchInput","_ref","ref","label","accessibilityLabel","_ref$labelPosition","labelPosition","placeholder","defaultValue","name","value","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","labelSuffix","labelTrailing","helpText","onClearButtonClick","isLoading","autoCapitalize","autoFocus","testID","_ref$size","size","_ref$showSearchIcon","showSearchIcon","trailing","rest","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","_useState3","_useState4","isTrailingDropDownOpen","setIsTrailingDropDownOpen","_useDropdown","useDropdown","triggererWrapperRef","onTriggerKeydown","onTriggerClick","dropdownTriggerer","closeParentDropDown","close","isParentDropDownOpen","isOpen","isInsideDropdown","useEffect","Boolean","trailingDropdown","getComponentId","renderTrailingDropDown","cloneElement","selectionType","onOpenChange","children","Children","map","props","child","type","InputDropdownButton","_isInsideSearchInput","DropdownOverlay","referenceRef","_isNestedDropdown","defaultPlacement","renderClearButton","_jsx","IconButton","icon","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","renderInteractionElement","Spinner","color","_jsxs","BaseBox","display","gap","Divider","orientation","position","BaseInput","_objectSpread","id","componentName","MetaConstants","SearchInput","isDropdownTrigger","setInputWrapperRef","wrapperNode","undefined","hideLabelText","onKeyDown","_ref2","length","e","leadingIcon","SearchIcon","trailingInteractionElement","trailingDropDown","getKeyboardAndAutocompleteProps","assignWithoutSideEffects","forwardRef","displayName","componentId","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuGA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,aAAmB,EAA4C;AACpF,EAAA,OAAOC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC7C,CAAC,CAAA;AAED,IAAMC,YAA+E,GAAG,SAAlFA,YAA+EA,CAAAC,IAAA,EA4BnFC,GAAG,EACc;AAAA,EAAA,IA3BfC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,kBAAkB,GAAAH,IAAA,CAAlBG,kBAAkB;IAAAC,kBAAA,GAAAJ,IAAA,CAClBK,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,kBAAA;IACrBE,WAAW,GAAAN,IAAA,CAAXM,WAAW;IACXC,YAAY,GAAAP,IAAA,CAAZO,YAAY;IACZC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;IACJC,KAAK,GAAAT,IAAA,CAALS,KAAK;IACLC,SAAQ,GAAAV,IAAA,CAARU,QAAQ;IACRC,QAAO,GAAAX,IAAA,CAAPW,OAAO;IACPC,OAAO,GAAAZ,IAAA,CAAPY,OAAO;IACPC,MAAM,GAAAb,IAAA,CAANa,MAAM;IACNC,QAAQ,GAAAd,IAAA,CAARc,QAAQ;IACRC,UAAU,GAAAf,IAAA,CAAVe,UAAU;IACVC,WAAW,GAAAhB,IAA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AE3B,wBAAwB,EAAG;MACvD4B,gBAAgB,EAAEvD,sBAAsB,EAAG;AAC3C5C,MAAAA,QAAQ,EAAEA,QAAAA;AACV;AAAA;AACAI,MAAAA,SAAS,EAAEA,SAAU;AACrBC,MAAAA,MAAM,EAAEA,MAAAA;AAAO,KAAA,EACX+F,+BAA+B,CAAC;AAClC/C,MAAAA,IAAI,EAAE,QAAQ;AACdlD,MAAAA,cAAc,EAAdA,cAAAA;AACF,KAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AACFI,MAAAA,IAAI,EAAEA,IAAAA;AAAK,KAAA,EACPI,IAAI,CACT,CAAA;AAAC,GACK,CAAC,CAAA;AAEd,CAAC,CAAA;AAEK2E,IAAAA,WAAW,gBAAGe,wBAAwB,cAACtF,cAAK,CAACuF,UAAU,CAACzH,YAAY,CAAC,EAAE;AAC3E0H,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,WAAW,EAAEC,oBAAoB,CAACC,QAAQ,CAACpB,WAAAA;AAC7C,CAAC;;;;"}
@@ -118,8 +118,8 @@ var _TextArea = function _TextArea(_ref, ref) {
118
118
  }
119
119
  handleTagsClear();
120
120
  // if the input field is controlled just call the click handler and the value change shall be left upto the consumer
121
- onClearButtonClick === null || onClearButtonClick === void 0 ? void 0 : onClearButtonClick();
122
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
121
+ onClearButtonClick === null || onClearButtonClick === void 0 || onClearButtonClick();
122
+ inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
123
123
  setShouldShowClearButton(false);
124
124
  }
125
125
  })
@@ -176,22 +176,22 @@ var _TextArea = function _TextArea(_ref, ref) {
176
176
  name: name,
177
177
  value: value
178
178
  });
179
- _onChange === null || _onChange === void 0 ? void 0 : _onChange({
179
+ _onChange === null || _onChange === void 0 || _onChange({
180
180
  name: name,
181
181
  value: value
182
182
  });
183
183
  },
184
184
  onFocus: function onFocus(e) {
185
185
  setIsInputFocussed(true);
186
- _onFocus === null || _onFocus === void 0 ? void 0 : _onFocus(e);
186
+ _onFocus === null || _onFocus === void 0 || _onFocus(e);
187
187
  },
188
188
  onBlur: function onBlur(e) {
189
189
  setIsInputFocussed(false);
190
- _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e);
190
+ _onBlur === null || _onBlur === void 0 || _onBlur(e);
191
191
  },
192
192
  onKeyDown: function onKeyDown(e) {
193
193
  handleTaggedInputKeydown(e);
194
- _onKeyDown === null || _onKeyDown === void 0 ? void 0 : _onKeyDown({
194
+ _onKeyDown === null || _onKeyDown === void 0 || _onKeyDown({
195
195
  name: e.name,
196
196
  value: e.event.currentTarget.value,
197
197
  event: e.event
@@ -213,7 +213,7 @@ var _TextArea = function _TextArea(_ref, ref) {
213
213
  size: size
214
214
  }, rest));
215
215
  };
216
- var TextArea = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__default.forwardRef(_TextArea), {
216
+ var TextArea = /*#__PURE__*/assignWithoutSideEffects(/*#__PURE__*/React__default.forwardRef(_TextArea), {
217
217
  displayName: 'TextArea'
218
218
  });
219
219
 
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","sources":["../../../../../../../src/components/Input/TextArea/TextArea.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/no-autofocus */\nimport React from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport type { TaggedInputProps } from '../BaseInput/useTaggedInput';\nimport { useTaggedInput } from '../BaseInput/useTaggedInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type {\n BladeElementRef,\n BladeElementRefWithValue,\n DataAnalyticsAttribute,\n} from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\nimport type { FormInputOnKeyDownEvent } from '~components/Form/FormTypes';\n\ntype TextAreaCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'labelSuffix'\n | 'labelTrailing'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'onSubmit'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'maxCharacters'\n | 'autoFocus'\n | 'numberOfLines'\n | 'testID'\n | 'size'\n | keyof DataAnalyticsAttribute\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n\n onKeyDown?: ({\n name,\n value,\n event,\n }: {\n name?: FormInputOnKeyDownEvent['name'];\n value: string;\n event: FormInputOnKeyDownEvent['event'];\n }) => void;\n} & TaggedInputProps &\n StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextAreaPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype TextAreaPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype TextAreaProps = (TextAreaPropsWithA11yLabel | TextAreaPropsWithLabel) & TextAreaCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextArea: React.ForwardRefRenderFunction<BladeElementRef, TextAreaProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition,\n labelSuffix,\n labelTrailing,\n necessityIndicator,\n errorText,\n helpText,\n successText,\n validationState,\n defaultValue,\n isDisabled,\n isRequired,\n name,\n onChange,\n onFocus,\n onBlur,\n onSubmit,\n onKeyDown,\n placeholder,\n value,\n maxCharacters,\n showClearButton,\n onClearButtonClick,\n autoFocus,\n numberOfLines = 2,\n testID,\n size = 'medium',\n isTaggedInput,\n tags,\n onTagChange,\n ...rest\n },\n ref,\n) => {\n const inputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, inputRef);\n const [isInputFocussed, setIsInputFocussed] = React.useState(autoFocus ?? false);\n const {\n activeTagIndex,\n setActiveTagIndex,\n getTags,\n handleTaggedInputKeydown,\n handleTaggedInputChange,\n handleTagsClear,\n } = useTaggedInput({\n tags,\n onTagChange,\n isDisabled,\n inputRef,\n isTaggedInput,\n name,\n value,\n onChange,\n });\n\n const [shouldShowClearButton, setShouldShowClearButton] = React.useState(false);\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (value?.length || defaultValue?.length)));\n }, [showClearButton, defaultValue, value]);\n\n const renderInteractionElement = (): React.ReactNode => {\n if (shouldShowClearButton) {\n return (\n <BaseBox paddingTop=\"spacing.3\" marginTop=\"spacing.1\">\n <IconButton\n icon={CloseIcon}\n accessibilityLabel=\"Clear textarea content\"\n onClick={() => {\n if (isEmpty(value) && inputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(inputRef.current)) {\n inputRef.current.clear();\n inputRef.current.focus();\n } else if (inputRef.current instanceof HTMLTextAreaElement) {\n inputRef.current.value = '';\n inputRef.current.focus();\n }\n }\n handleTagsClear();\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n inputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n />\n </BaseBox>\n );\n }\n\n return null;\n };\n\n return (\n <BaseInput\n as=\"textarea\"\n id=\"textarea\"\n maxTagRows=\"multiple\"\n componentName={MetaConstants.TextArea}\n autoFocus={autoFocus}\n ref={mergedRef}\n label={label as string}\n tags={isTaggedInput ? getTags({ size }) : undefined}\n activeTagIndex={activeTagIndex}\n setActiveTagIndex={setActiveTagIndex}\n isDropdownTrigger={isTaggedInput}\n showAllTags={isInputFocussed}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n necessityIndicator={necessityIndicator}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n validationState={validationState}\n isDisabled={isDisabled}\n isRequired={isRequired}\n name={name}\n maxCharacters={maxCharacters}\n placeholder={placeholder}\n trailingInteractionElement={renderInteractionElement()}\n defaultValue={defaultValue}\n value={value}\n numberOfLines={numberOfLines}\n onChange={({ name, value }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n handleTaggedInputChange({ name, value });\n onChange?.({ name, value });\n }}\n onFocus={(e) => {\n setIsInputFocussed(true);\n onFocus?.(e);\n }}\n onBlur={(e) => {\n setIsInputFocussed(false);\n onBlur?.(e);\n }}\n onKeyDown={(e) => {\n handleTaggedInputKeydown(e);\n onKeyDown?.({\n name: e.name,\n value: e.event.currentTarget.value,\n event: e.event,\n });\n }}\n onSubmit={onSubmit}\n trailingFooterSlot={(value) => {\n return maxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter currentCount={value?.length ?? 0} maxCount={maxCharacters} />\n </BaseBox>\n ) : null;\n }}\n testID={testID}\n size={size}\n {...rest}\n />\n );\n};\n\nconst TextArea = assignWithoutSideEffects(React.forwardRef(_TextArea), {\n displayName: 'TextArea',\n});\n\nexport type { TextAreaProps };\nexport { TextArea };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextArea","_ref","ref","label","accessibilityLabel","labelPosition","labelSuffix","labelTrailing","necessityIndicator","errorText","helpText","successText","validationState","defaultValue","isDisabled","isRequired","name","onChange","onFocus","onBlur","onSubmit","onKeyDown","placeholder","value","maxCharacters","showClearButton","onClearButtonClick","autoFocus","_ref$numberOfLines","numberOfLines","testID","_ref$size","size","isTaggedInput","tags","onTagChange","rest","_objectWithoutProperties","_excluded","inputRef","React","useRef","mergedRef","useMergeRefs","_React$useState","useState","_React$useState2","_slicedToArray","isInputFocussed","setIsInputFocussed","_useTaggedInput","useTaggedInput","activeTagIndex","setActiveTagIndex","getTags","handleTaggedInputKeydown","handleTaggedInputChange","handleTagsClear","_React$useState3","_React$useState4","shouldShowClearButton","setShouldShowClearButton","useEffect","Boolean","length","renderInteractionElement","_jsx","BaseBox","paddingTop","marginTop","children","IconButton","icon","CloseIcon","onClick","_inputRef$current","isEmpty","current","clear","focus","HTMLTextAreaElement","BaseInput","_objectSpread","as","id","maxTagRows","componentName","MetaConstants","TextArea","undefined","isDropdownTrigger","showAllTags","hideLabelText","trailingInteractionElement","_ref2","e","event","currentTarget","trailingFooterSlot","_value$length","hintMarginTop","marginRight","CharacterCounter","currentCount","maxCount","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,aAAkB,EAA4C;AACnF,EAAA,OAAOC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC7C,CAAC,CAAA;AAED,IAAMC,SAAyE,GAAG,SAA5EA,SAAyEA,CAAAC,IAA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GAAAA,KAAAA,CAAAA,GAAAA,UAAS,CAAG;QACVL,IAAI,EAAE+E,CAAC,CAAC/E,IAAI;AACZO,QAAAA,KAAK,EAAEwE,CAAC,CAACC,KAAK,CAACC,aAAa,CAAC1E,KAAK;QAClCyE,KAAK,EAAED,CAAC,CAACC,KAAAA;AACX,OAAC,CAAC,CAAA;KACF;AACF5E,IAAAA,QAAQ,EAAEA,QAAS;AACnB8E,IAAAA,kBAAkB,EAAE,SAAAA,kBAAC3E,CAAAA,KAAK,EAAK;AAAA,MAAA,IAAA4E,aAAA,CAAA;AAC7B,MAAA,OAAO3E,aAAa,gBAClB0C,GAAA,CAACC,OAAO,EAAA;AAACE,QAAAA,SAAS,EAAE+B,aAAa,CAACpE,IAAI,CAAE;AAACqE,QAAAA,WAAW,EAAC,WAAW;QAAA/B,QAAA,eAC9DJ,GAAA,CAACoC,gBAAgB,EAAA;AAACC,UAAAA,YAAY,EAAAJ,CAAAA,aAAA,GAAE5E,KAAK,aAALA,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAALA,KAAK,CAAEyC,MAAM,MAAAmC,IAAAA,IAAAA,aAAA,KAAAA,KAAAA,CAAAA,GAAAA,aAAA,GAAI,CAAE;AAACK,UAAAA,QAAQ,EAAEhF,aAAAA;SAAgB,CAAA;OACvE,CAAC,GACR,IAAI,CAAA;KACR;AACFM,IAAAA,MAAM,EAAEA,MAAO;AACfE,IAAAA,IAAI,EAAEA,IAAAA;GACFI,EAAAA,IAAI,CACT,CAAC,CAAA;AAEN,CAAC,CAAA;AAEKoD,IAAAA,QAAQ,gBAAGiB,wBAAwB,eAACjE,cAAK,CAACkE,UAAU,CAAC1G,SAAS,CAAC,EAAE;AACrE2G,EAAAA,WAAW,EAAE,UAAA;AACf,CAAC;;;;"}
1
+ {"version":3,"file":"TextArea.js","sources":["../../../../../../../src/components/Input/TextArea/TextArea.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/no-autofocus */\nimport React from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport type { TaggedInputProps } from '../BaseInput/useTaggedInput';\nimport { useTaggedInput } from '../BaseInput/useTaggedInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type {\n BladeElementRef,\n BladeElementRefWithValue,\n DataAnalyticsAttribute,\n} from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\nimport type { FormInputOnKeyDownEvent } from '~components/Form/FormTypes';\n\ntype TextAreaCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'labelSuffix'\n | 'labelTrailing'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'onSubmit'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'maxCharacters'\n | 'autoFocus'\n | 'numberOfLines'\n | 'testID'\n | 'size'\n | keyof DataAnalyticsAttribute\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n\n onKeyDown?: ({\n name,\n value,\n event,\n }: {\n name?: FormInputOnKeyDownEvent['name'];\n value: string;\n event: FormInputOnKeyDownEvent['event'];\n }) => void;\n} & TaggedInputProps &\n StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextAreaPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype TextAreaPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype TextAreaProps = (TextAreaPropsWithA11yLabel | TextAreaPropsWithLabel) & TextAreaCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextArea: React.ForwardRefRenderFunction<BladeElementRef, TextAreaProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition,\n labelSuffix,\n labelTrailing,\n necessityIndicator,\n errorText,\n helpText,\n successText,\n validationState,\n defaultValue,\n isDisabled,\n isRequired,\n name,\n onChange,\n onFocus,\n onBlur,\n onSubmit,\n onKeyDown,\n placeholder,\n value,\n maxCharacters,\n showClearButton,\n onClearButtonClick,\n autoFocus,\n numberOfLines = 2,\n testID,\n size = 'medium',\n isTaggedInput,\n tags,\n onTagChange,\n ...rest\n },\n ref,\n) => {\n const inputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, inputRef);\n const [isInputFocussed, setIsInputFocussed] = React.useState(autoFocus ?? false);\n const {\n activeTagIndex,\n setActiveTagIndex,\n getTags,\n handleTaggedInputKeydown,\n handleTaggedInputChange,\n handleTagsClear,\n } = useTaggedInput({\n tags,\n onTagChange,\n isDisabled,\n inputRef,\n isTaggedInput,\n name,\n value,\n onChange,\n });\n\n const [shouldShowClearButton, setShouldShowClearButton] = React.useState(false);\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (value?.length || defaultValue?.length)));\n }, [showClearButton, defaultValue, value]);\n\n const renderInteractionElement = (): React.ReactNode => {\n if (shouldShowClearButton) {\n return (\n <BaseBox paddingTop=\"spacing.3\" marginTop=\"spacing.1\">\n <IconButton\n icon={CloseIcon}\n accessibilityLabel=\"Clear textarea content\"\n onClick={() => {\n if (isEmpty(value) && inputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(inputRef.current)) {\n inputRef.current.clear();\n inputRef.current.focus();\n } else if (inputRef.current instanceof HTMLTextAreaElement) {\n inputRef.current.value = '';\n inputRef.current.focus();\n }\n }\n handleTagsClear();\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n inputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n />\n </BaseBox>\n );\n }\n\n return null;\n };\n\n return (\n <BaseInput\n as=\"textarea\"\n id=\"textarea\"\n maxTagRows=\"multiple\"\n componentName={MetaConstants.TextArea}\n autoFocus={autoFocus}\n ref={mergedRef}\n label={label as string}\n tags={isTaggedInput ? getTags({ size }) : undefined}\n activeTagIndex={activeTagIndex}\n setActiveTagIndex={setActiveTagIndex}\n isDropdownTrigger={isTaggedInput}\n showAllTags={isInputFocussed}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n necessityIndicator={necessityIndicator}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n validationState={validationState}\n isDisabled={isDisabled}\n isRequired={isRequired}\n name={name}\n maxCharacters={maxCharacters}\n placeholder={placeholder}\n trailingInteractionElement={renderInteractionElement()}\n defaultValue={defaultValue}\n value={value}\n numberOfLines={numberOfLines}\n onChange={({ name, value }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n handleTaggedInputChange({ name, value });\n onChange?.({ name, value });\n }}\n onFocus={(e) => {\n setIsInputFocussed(true);\n onFocus?.(e);\n }}\n onBlur={(e) => {\n setIsInputFocussed(false);\n onBlur?.(e);\n }}\n onKeyDown={(e) => {\n handleTaggedInputKeydown(e);\n onKeyDown?.({\n name: e.name,\n value: e.event.currentTarget.value,\n event: e.event,\n });\n }}\n onSubmit={onSubmit}\n trailingFooterSlot={(value) => {\n return maxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter currentCount={value?.length ?? 0} maxCount={maxCharacters} />\n </BaseBox>\n ) : null;\n }}\n testID={testID}\n size={size}\n {...rest}\n />\n );\n};\n\nconst TextArea = assignWithoutSideEffects(React.forwardRef(_TextArea), {\n displayName: 'TextArea',\n});\n\nexport type { TextAreaProps };\nexport { TextArea };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextArea","_ref","ref","label","accessibilityLabel","labelPosition","labelSuffix","labelTrailing","necessityIndicator","errorText","helpText","successText","validationState","defaultValue","isDisabled","isRequired","name","onChange","onFocus","onBlur","onSubmit","onKeyDown","placeholder","value","maxCharacters","showClearButton","onClearButtonClick","autoFocus","_ref$numberOfLines","numberOfLines","testID","_ref$size","size","isTaggedInput","tags","onTagChange","rest","_objectWithoutProperties","_excluded","inputRef","React","useRef","mergedRef","useMergeRefs","_React$useState","useState","_React$useState2","_slicedToArray","isInputFocussed","setIsInputFocussed","_useTaggedInput","useTaggedInput","activeTagIndex","setActiveTagIndex","getTags","handleTaggedInputKeydown","handleTaggedInputChange","handleTagsClear","_React$useState3","_React$useState4","shouldShowClearButton","setShouldShowClearButton","useEffect","Boolean","length","renderInteractionElement","_jsx","BaseBox","paddingTop","marginTop","children","IconButton","icon","CloseIcon","onClick","_inputRef$current","isEmpty","current","clear","focus","HTMLTextAreaElement","BaseInput","_objectSpread","as","id","maxTagRows","componentName","MetaConstants","TextArea","undefined","isDropdownTrigger","showAllTags","hideLabelText","trailingInteractionElement","_ref2","e","event","currentTarget","trailingFooterSlot","_value$length","hintMarginTop","marginRight","CharacterCounter","currentCount","maxCount","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,aAAkB,EAA4C;AACnF,EAAA,OAAOC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC7C,CAAC,CAAA;AAED,IAAMC,SAAyE,GAAG,SAA5EA,SAAyEA,CAAAC,IAAA,EAmC7EC,GAAG,EACA;AAAA,EAAA,IAlCDC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,kBAAkB,GAAAH,IAAA,CAAlBG,kBAAkB;IAClBC,aAAa,GAAAJ,IAAA,CAAbI,aAAa;IACbC,WAAW,GAAAL,IAAA,CAAXK,WAAW;IACXC,aAAa,GAAAN,IAAA,CAAbM,aAAa;IACbC,kBAAkB,GAAAP,IAAA,CAAlBO,kBAAkB;IAClBC,SAAS,GAAAR,IAAA,CAATQ,SAAS;IACTC,QAAQ,GAAAT,IAAA,CAARS,QAAQ;IACRC,WAAW,GAAAV,IAAA,CAAXU,WAAW;IACXC,eAAe,GAAAX,IAAA,CAAfW,eAAe;IACfC,YAAY,GAAAZ,IAAA,CAAZY,YAAY;IACZC,UAAU,GAAAb,IAAA,CAAVa,UAAU;IACVC,UAAU,GAAAd,IAAA,CAAVc,UAAU;IACVC,IAAI,GAAAf,IAAA,CAAJe,IAAI;IACJC,SAAQ,GAAAhB,IAAA,CAARgB,QAAQ;IACRC,QAAO,GAAAjB,IAAA,CAAPiB,OAAO;IACPC,OAAM,GAAAlB,IAAA,CAANkB,MAAM;IACNC,QAAQ,GAAAnB,IAAA,CAARmB,QAAQ;IACRC,UAAS,GAAApB,IAAA,CAAToB,SAAS;IACTC,WAAW,GAAArB,IAAA,CAAXqB,WAAW;IACXC,KAAK,GAAAtB,IAAA,CAALsB,KAAK;IACLC,aAAa,GA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CAAC1G,SAAS,CAAC,EAAE;AACrE2G,EAAAA,WAAW,EAAE,UAAA;AACf,CAAC;;;;"}
@@ -129,7 +129,7 @@ var _TextInput = function _TextInput(_ref, ref) {
129
129
  value: inputValue
130
130
  });
131
131
  } else {
132
- onChange === null || onChange === void 0 ? void 0 : onChange({
132
+ onChange === null || onChange === void 0 || onChange({
133
133
  name: name,
134
134
  value: inputValue
135
135
  });
@@ -224,8 +224,8 @@ var _TextInput = function _TextInput(_ref, ref) {
224
224
  }
225
225
  handleTagsClear();
226
226
  // if the input field is controlled just call the click handler and the value change shall be left upto the consumer
227
- onClearButtonClick === null || onClearButtonClick === void 0 ? void 0 : onClearButtonClick();
228
- textInputRef === null || textInputRef === void 0 ? void 0 : (_textInputRef$current = textInputRef.current) === null || _textInputRef$current === void 0 ? void 0 : _textInputRef$current.focus();
227
+ onClearButtonClick === null || onClearButtonClick === void 0 || onClearButtonClick();
228
+ textInputRef === null || textInputRef === void 0 || (_textInputRef$current = textInputRef.current) === null || _textInputRef$current === void 0 || _textInputRef$current.focus();
229
229
  setShouldShowClearButton(false);
230
230
  },
231
231
  isDisabled: isDisabled,
@@ -331,15 +331,15 @@ var _TextInput = function _TextInput(_ref, ref) {
331
331
  onClick: onClick,
332
332
  onFocus: function onFocus(e) {
333
333
  setIsInputFocussed(true);
334
- _onFocus === null || _onFocus === void 0 ? void 0 : _onFocus(e);
334
+ _onFocus === null || _onFocus === void 0 || _onFocus(e);
335
335
  },
336
336
  onBlur: function onBlur(e) {
337
337
  setIsInputFocussed(false);
338
- _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e);
338
+ _onBlur === null || _onBlur === void 0 || _onBlur(e);
339
339
  },
340
340
  onKeyDown: function onKeyDown(e) {
341
341
  handleTaggedInputKeydown(e);
342
- _onKeyDown === null || _onKeyDown === void 0 ? void 0 : _onKeyDown(e);
342
+ _onKeyDown === null || _onKeyDown === void 0 || _onKeyDown(e);
343
343
  if (format) {
344
344
  formattingResult.handleKeyDown(e.event);
345
345
  }
@@ -382,7 +382,7 @@ var _TextInput = function _TextInput(_ref, ref) {
382
382
  size: size
383
383
  }, rest));
384
384
  };
385
- var TextInput = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__default.forwardRef(_TextInput), {
385
+ var TextInput = /*#__PURE__*/assignWithoutSideEffects(/*#__PURE__*/React__default.forwardRef(_TextInput), {
386
386
  displayName: 'TextInput'
387
387
  });
388
388
 
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.js","sources":["../../../../../../../src/components/Input/TextInput/TextInput.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getKeyboardAndAutocompleteProps } from '../BaseInput/utils';\nimport type { TaggedInputProps } from '../BaseInput/useTaggedInput';\nimport { useTaggedInput } from '../BaseInput/useTaggedInput';\nimport { useFormattedInput } from './useFormattedInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { IconComponent } from '~components/Icons';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type {\n BladeElementRef,\n BladeElementRefWithValue,\n ContainerElementType,\n DataAnalyticsAttribute,\n} from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\nimport { Divider } from '~components/Divider';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { DropdownOverlay } from '~components/Dropdown';\nimport type { FormInputOnEvent } from '~components/Form/FormTypes';\nimport { isIconComponent } from '~utils/isIconComponent';\n\n// Users should use PasswordInput for input type password\ntype Type = Exclude<BaseInputProps['type'], 'password'>;\n\ntype TextInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'labelSuffix'\n | 'labelTrailing'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'prefix'\n | 'suffix'\n | 'maxCharacters'\n | 'autoFocus'\n | 'keyboardReturnKeyType'\n | 'autoCompleteSuggestionType'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n | 'leadingIcon'\n | 'trailingButton'\n | 'trailingIcon'\n | 'textAlign'\n | 'popupId'\n | 'isPopupExpanded'\n | 'hasPopup'\n | 'componentName'\n | 'onKeyDown'\n | keyof DataAnalyticsAttribute\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n\n /**\n * Icon that will be rendered at the beginning of the input field\n * @deprecated Use `leading` instead. This prop will be removed in the next major version.\n */\n icon?: IconComponent;\n /**\n * Type of Input Field to be rendered. Use `PasswordInput` for type `password`\n *\n *\n * **Note on number type**\n *\n * `type=\"number\"` internally uses `inputMode=\"numeric\"` instead of HTML's `type=\"number\"` which also allows text characters.\n * If you have a usecase where you only want to support number input, you can handle it on validations end.\n *\n * Check out [Why the GOV.UK Design System team changed the input type for numbers](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/) for reasoning\n *\n * @default text\n */\n type?: Type;\n /**\n *\n * Icon or React Element to be rendered at the end of the input field\n */\n trailing?: React.ReactElement | IconComponent;\n /**\n * Icon or React Element to be rendered at the beginning of the input field\n */\n leading?: React.ReactElement | IconComponent;\n /**\n * Format pattern where # represents input characters and other symbols act as delimiters\n * When provided, input will be automatically formatted and onChange will include rawValue\n *\n * **Note:**\n * 1. Format pattern should only contain # symbols and special characters as delimiters.\n * Alphanumeric characters (letters and numbers) are not allowed in the format pattern.\n * 2. When format is provided, user input is restricted to alphanumeric characters only.\n * Special characters and symbols will be filtered out automatically from user input.\n *\n * @example \"#### #### #### ####\" for card numbers\n * @example \"##/##\" for expiry dates\n * @example \"(###) ###-####\" for phone numbers\n */\n format?:\n | '#### #### #### ####'\n | '##/##'\n | '##/##/####'\n | '(###) ###-####'\n | '###-##-####'\n | '##:##'\n | '##:##:##'\n | '#### #### ####'\n | '###.###.###.###'\n | '## ## ####'\n | '##-###-##'\n // eslint-disable-next-line @typescript-eslint/ban-types\n | (string & {});\n} & TaggedInputProps &\n StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype TextInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype TextInputProps = (TextInputPropsWithA11yLabel | TextInputPropsWithLabel) &\n TextInputCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextInput: React.ForwardRefRenderFunction<BladeElementRef, TextInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n name,\n value,\n maxCharacters,\n format,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n icon,\n prefix,\n showClearButton,\n onClearButtonClick,\n isLoading,\n suffix,\n autoFocus,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n testID,\n size = 'medium',\n leadingIcon,\n trailingIcon,\n isTaggedInput,\n tags,\n onTagChange,\n trailing,\n leading,\n labelSuffix,\n labelTrailing,\n onKeyDown,\n ...rest\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n const [isInputFocussed, setIsInputFocussed] = useState(autoFocus ?? false);\n\n if (__DEV__) {\n if (format) {\n const hasAlphanumeric = /[a-zA-Z0-9]/.test(format);\n if (hasAlphanumeric) {\n throw new Error(\n `[Blade: TextInput] Invalid format \"${format}\". Only # and special characters allowed, no letters/numbers.`,\n );\n }\n }\n }\n\n const formattingResult = useFormattedInput({\n format,\n onChange,\n value,\n defaultValue,\n });\n\n const inputValue = format ? formattingResult.formattedValue : value;\n const effectiveMaxCharacters = format ? formattingResult.maxLength : maxCharacters;\n\n const handleOnChange: FormInputOnEvent = React.useCallback(\n ({ name, value: inputValue }) => {\n if (format) {\n formattingResult.handleChange({ name, value: inputValue });\n } else {\n onChange?.({ name, value: inputValue });\n }\n },\n [format, formattingResult.handleChange, onChange],\n );\n\n const {\n activeTagIndex,\n setActiveTagIndex,\n getTags,\n handleTaggedInputKeydown,\n handleTaggedInputChange,\n handleTagsClear,\n } = useTaggedInput({\n isTaggedInput,\n tags,\n onTagChange,\n isDisabled,\n onChange: handleOnChange,\n name,\n value: inputValue,\n inputRef: textInputRef,\n });\n const [isTrailingDropDownOpen, setIsTrailingDropDownOpen] = React.useState(false);\n const [isLeadingDropDownOpen, setIsLeadingDropDownOpen] = React.useState(false);\n const textInputWrapperRef = useRef<ContainerElementType | null>(null);\n\n useEffect(() => {\n if (isTrailingDropDownOpen && isLeadingDropDownOpen) {\n setIsLeadingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isTrailingDropDownOpen]);\n\n useEffect(() => {\n if (isLeadingDropDownOpen && isTrailingDropDownOpen) {\n setIsTrailingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isLeadingDropDownOpen]);\n\n const leadingDropDown =\n leading && getComponentId(leading as React.ReactElement) === 'Dropdown' ? leading : null;\n\n const trailingDropdown =\n trailing && getComponentId(trailing as React.ReactElement) === 'Dropdown' ? trailing : null;\n // we need to look into name of component and check if it 's and icon or a dropdown\n const _leadingIcon: IconComponent | undefined = isIconComponent(leading)\n ? (leading as IconComponent)\n : undefined;\n\n const _trailingIcon: IconComponent | undefined = isIconComponent(trailing)\n ? (trailing as IconComponent)\n : undefined;\n const hasLeadingInteractionElement = !_leadingIcon && !leadingDropDown && leading;\n\n const hasTrailingInteractionElement = !_trailingIcon && !trailingDropdown && trailing;\n\n const renderDropdown = (\n dropdown: React.ReactElement,\n isOpen: boolean,\n setIsOpen: (isOpen: boolean) => void,\n defaultPlacement: 'bottom-start' | 'bottom-end',\n ): React.ReactElement | null => {\n if (!dropdown) {\n return null;\n }\n return React.cloneElement(dropdown, {\n selectionType: 'single',\n isOpen,\n onOpenChange: (isOpen: boolean) => {\n setIsOpen(isOpen);\n },\n children: React.Children.map(dropdown.props.children, (child) => {\n if (child.type === DropdownOverlay) {\n return React.cloneElement(child, {\n referenceRef: textInputWrapperRef,\n _isNestedDropdown: true,\n defaultPlacement,\n });\n }\n return child;\n }),\n });\n };\n\n const renderLeadingDropDown = renderDropdown(\n leadingDropDown as React.ReactElement,\n isLeadingDropDownOpen,\n setIsLeadingDropDownOpen,\n 'bottom-start',\n );\n const renderTrailingDropDown = renderDropdown(\n trailingDropdown as React.ReactElement,\n isTrailingDropDownOpen,\n setIsTrailingDropDownOpen,\n 'bottom-end',\n );\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (defaultValue ?? inputValue)));\n }, [showClearButton, defaultValue, inputValue]);\n\n const renderClearButton = (): React.ReactElement => {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(inputValue) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n handleTagsClear();\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n };\n const hasTrailingDropDown = Boolean(trailingDropdown);\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton && hasTrailingDropDown) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" />\n </BaseBox>\n );\n }\n\n if (showClearButton && hasTrailingInteractionElement) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" /> {trailing as React.ReactElement}\n </BaseBox>\n );\n }\n\n if (shouldShowClearButton) {\n return renderClearButton();\n }\n\n if (hasTrailingInteractionElement) {\n return trailing as React.ReactElement;\n }\n return null;\n };\n return (\n <BaseInput\n id=\"textinput\"\n componentName={MetaConstants.TextInput}\n ref={mergedRef}\n setInputWrapperRef={(wrapperNode) => {\n textInputWrapperRef.current = wrapperNode;\n }}\n label={label as string}\n labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n placeholder={placeholder}\n // CONTROLLED/UNCONTROLLED INPUT LOGIC:\n // For inputs WITHOUT format:\n // - Use standard React controlled/uncontrolled logic\n // - Controlled: user provides `value` prop → use `value` prop\n // - Uncontrolled: user provides `defaultValue` prop → use `defaultValue` prop\n //\n // For inputs WITH format:\n // - Formatting requires controlled mode to re-render and show formatted values\n // - Case 1: Only `value` provided → defaultValue: undefined, value: formattedValue (normal controlled)\n // - Case 2: Only `defaultValue` provided → defaultValue: undefined, value: formattedValue (convert to controlled)\n // - Case 3: Both `value` and `defaultValue` provided → defaultValue: defaultValue, value: formattedValue (let BaseInput detect conflict and throw error)\n //\n defaultValue={\n format\n ? value !== undefined && defaultValue !== undefined\n ? defaultValue\n : undefined\n : defaultValue\n }\n value={format ? inputValue : value}\n name={name}\n maxCharacters={effectiveMaxCharacters}\n isDropdownTrigger={isTaggedInput}\n tags={isTaggedInput ? getTags({ size }) : undefined}\n showAllTags={isInputFocussed}\n maxTagRows=\"single\"\n activeTagIndex={activeTagIndex}\n setActiveTagIndex={setActiveTagIndex}\n leadingDropDown={renderLeadingDropDown}\n trailingDropDown={renderTrailingDropDown}\n leadingInteractionElement={\n hasLeadingInteractionElement ? (leading as React.ReactElement) : null\n }\n onChange={({ name, value }: { name?: string; value?: string }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n handleTaggedInputChange({ name, value });\n handleOnChange({ name, value });\n }}\n onClick={onClick}\n onFocus={(e) => {\n setIsInputFocussed(true);\n onFocus?.(e);\n }}\n onBlur={(e) => {\n setIsInputFocussed(false);\n onBlur?.(e);\n }}\n onKeyDown={(e) => {\n handleTaggedInputKeydown(e);\n onKeyDown?.(e);\n if (format) {\n formattingResult.handleKeyDown(e.event);\n }\n }}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n necessityIndicator={necessityIndicator}\n isRequired={isRequired}\n leadingIcon={_leadingIcon ?? leadingIcon ?? icon}\n prefix={prefix}\n trailingInteractionElement={renderInteractionElement()}\n trailingIcon={_trailingIcon ?? trailingIcon}\n suffix={suffix}\n validationState={validationState}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n trailingFooterSlot={(value) => {\n return format ? null : effectiveMaxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter\n currentCount={value?.length ?? 0}\n maxCount={effectiveMaxCharacters}\n size={size}\n />\n </BaseBox>\n ) : null;\n }}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n })}\n size={size}\n {...rest}\n />\n );\n};\n\nconst TextInput = assignWithoutSideEffects(React.forwardRef(_TextInput), {\n displayName: 'TextInput',\n});\n\nexport type { TextInputProps };\nexport { TextInput };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextInput","_ref","ref","_ref4","label","accessibilityLabel","_ref$labelPosition","labelPosition","placeholder","_ref$type","type","defaultValue","name","value","maxCharacters","format","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID","_ref$size","size","leadingIcon","trailingIcon","isTaggedInput","tags","onTagChange","trailing","leading","labelSuffix","labelTrailing","onKeyDown","rest","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","_useState3","_useState4","isInputFocussed","setIsInputFocussed","hasAlphanumeric","test","Error","concat","formattingResult","useFormattedInput","inputValue","formattedValue","effectiveMaxCharacters","maxLength","handleOnChange","useCallback","_ref2","handleChange","_useTaggedInput","useTaggedInput","inputRef","activeTagIndex","setActiveTagIndex","getTags","handleTaggedInputKeydown","handleTaggedInputChange","handleTagsClear","_React$useState","_React$useState2","isTrailingDropDownOpen","setIsTrailingDropDownOpen","_React$useState3","_React$useState4","isLeadingDropDownOpen","setIsLeadingDropDownOpen","textInputWrapperRef","useEffect","leadingDropDown","getComponentId","trailingDropdown","_leadingIcon","isIconComponent","undefined","_trailingIcon","hasLeadingInteractionElement","hasTrailingInteractionElement","renderDropdown","dropdown","isOpen","setIsOpen","defaultPlacement","cloneElement","selectionType","onOpenChange","children","Children","map","props","child","DropdownOverlay","referenceRef","_isNestedDropdown","renderLeadingDropDown","renderTrailingDropDown","Boolean","renderClearButton","_jsx","IconButton","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","hasTrailingDropDown","renderInteractionElement","Spinner","color","_jsxs","BaseBox","display","gap","Divider","orientation","BaseInput","_objectSpread","id","componentName","MetaConstants","TextInput","setInputWrapperRef","wrapperNode","hideLabelText","isDropdownTrigger","showAllTags","maxTagRows","trailingDropDown","leadingInteractionElement","_ref3","length","e","handleKeyDown","event","trailingInteractionElement","trailingFooterSlot","_value$length","marginTop","hintMarginTop","marginRight","CharacterCounter","currentCount","maxCount","getKeyboardAndAutocompleteProps","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyLA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,aAAkB,EAA4C;AACnF,EAAA,OAAOC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC7C,CAAC,CAAA;AAED,IAAMC,UAA2E,GAAG,SAA9EA,UAA2EA,CAAAC,IAAA,EAgD/EC,GAAG,EACc;AAAA,EAAA,IAAAC,KAAA,CAAA;AAAA,EAAA,IA/CfC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,kBAAkB,GAA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AU,CAAC,EAAE;AACvEqL,EAAAA,WAAW,EAAE,WAAA;AACf,CAAC;;;;"}
1
+ {"version":3,"file":"TextInput.js","sources":["../../../../../../../src/components/Input/TextInput/TextInput.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getKeyboardAndAutocompleteProps } from '../BaseInput/utils';\nimport type { TaggedInputProps } from '../BaseInput/useTaggedInput';\nimport { useTaggedInput } from '../BaseInput/useTaggedInput';\nimport { useFormattedInput } from './useFormattedInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { IconComponent } from '~components/Icons';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type {\n BladeElementRef,\n BladeElementRefWithValue,\n ContainerElementType,\n DataAnalyticsAttribute,\n} from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\nimport { Divider } from '~components/Divider';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { DropdownOverlay } from '~components/Dropdown';\nimport type { FormInputOnEvent } from '~components/Form/FormTypes';\nimport { isIconComponent } from '~utils/isIconComponent';\n\n// Users should use PasswordInput for input type password\ntype Type = Exclude<BaseInputProps['type'], 'password'>;\n\ntype TextInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'labelSuffix'\n | 'labelTrailing'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'prefix'\n | 'suffix'\n | 'maxCharacters'\n | 'autoFocus'\n | 'keyboardReturnKeyType'\n | 'autoCompleteSuggestionType'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n | 'leadingIcon'\n | 'trailingButton'\n | 'trailingIcon'\n | 'textAlign'\n | 'popupId'\n | 'isPopupExpanded'\n | 'hasPopup'\n | 'componentName'\n | 'onKeyDown'\n | keyof DataAnalyticsAttribute\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n\n /**\n * Icon that will be rendered at the beginning of the input field\n * @deprecated Use `leading` instead. This prop will be removed in the next major version.\n */\n icon?: IconComponent;\n /**\n * Type of Input Field to be rendered. Use `PasswordInput` for type `password`\n *\n *\n * **Note on number type**\n *\n * `type=\"number\"` internally uses `inputMode=\"numeric\"` instead of HTML's `type=\"number\"` which also allows text characters.\n * If you have a usecase where you only want to support number input, you can handle it on validations end.\n *\n * Check out [Why the GOV.UK Design System team changed the input type for numbers](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/) for reasoning\n *\n * @default text\n */\n type?: Type;\n /**\n *\n * Icon or React Element to be rendered at the end of the input field\n */\n trailing?: React.ReactElement | IconComponent;\n /**\n * Icon or React Element to be rendered at the beginning of the input field\n */\n leading?: React.ReactElement | IconComponent;\n /**\n * Format pattern where # represents input characters and other symbols act as delimiters\n * When provided, input will be automatically formatted and onChange will include rawValue\n *\n * **Note:**\n * 1. Format pattern should only contain # symbols and special characters as delimiters.\n * Alphanumeric characters (letters and numbers) are not allowed in the format pattern.\n * 2. When format is provided, user input is restricted to alphanumeric characters only.\n * Special characters and symbols will be filtered out automatically from user input.\n *\n * @example \"#### #### #### ####\" for card numbers\n * @example \"##/##\" for expiry dates\n * @example \"(###) ###-####\" for phone numbers\n */\n format?:\n | '#### #### #### ####'\n | '##/##'\n | '##/##/####'\n | '(###) ###-####'\n | '###-##-####'\n | '##:##'\n | '##:##:##'\n | '#### #### ####'\n | '###.###.###.###'\n | '## ## ####'\n | '##-###-##'\n // eslint-disable-next-line @typescript-eslint/ban-types\n | (string & {});\n} & TaggedInputProps &\n StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype TextInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype TextInputProps = (TextInputPropsWithA11yLabel | TextInputPropsWithLabel) &\n TextInputCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextInput: React.ForwardRefRenderFunction<BladeElementRef, TextInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n name,\n value,\n maxCharacters,\n format,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n icon,\n prefix,\n showClearButton,\n onClearButtonClick,\n isLoading,\n suffix,\n autoFocus,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n testID,\n size = 'medium',\n leadingIcon,\n trailingIcon,\n isTaggedInput,\n tags,\n onTagChange,\n trailing,\n leading,\n labelSuffix,\n labelTrailing,\n onKeyDown,\n ...rest\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n const [isInputFocussed, setIsInputFocussed] = useState(autoFocus ?? false);\n\n if (__DEV__) {\n if (format) {\n const hasAlphanumeric = /[a-zA-Z0-9]/.test(format);\n if (hasAlphanumeric) {\n throw new Error(\n `[Blade: TextInput] Invalid format \"${format}\". Only # and special characters allowed, no letters/numbers.`,\n );\n }\n }\n }\n\n const formattingResult = useFormattedInput({\n format,\n onChange,\n value,\n defaultValue,\n });\n\n const inputValue = format ? formattingResult.formattedValue : value;\n const effectiveMaxCharacters = format ? formattingResult.maxLength : maxCharacters;\n\n const handleOnChange: FormInputOnEvent = React.useCallback(\n ({ name, value: inputValue }) => {\n if (format) {\n formattingResult.handleChange({ name, value: inputValue });\n } else {\n onChange?.({ name, value: inputValue });\n }\n },\n [format, formattingResult.handleChange, onChange],\n );\n\n const {\n activeTagIndex,\n setActiveTagIndex,\n getTags,\n handleTaggedInputKeydown,\n handleTaggedInputChange,\n handleTagsClear,\n } = useTaggedInput({\n isTaggedInput,\n tags,\n onTagChange,\n isDisabled,\n onChange: handleOnChange,\n name,\n value: inputValue,\n inputRef: textInputRef,\n });\n const [isTrailingDropDownOpen, setIsTrailingDropDownOpen] = React.useState(false);\n const [isLeadingDropDownOpen, setIsLeadingDropDownOpen] = React.useState(false);\n const textInputWrapperRef = useRef<ContainerElementType | null>(null);\n\n useEffect(() => {\n if (isTrailingDropDownOpen && isLeadingDropDownOpen) {\n setIsLeadingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isTrailingDropDownOpen]);\n\n useEffect(() => {\n if (isLeadingDropDownOpen && isTrailingDropDownOpen) {\n setIsTrailingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isLeadingDropDownOpen]);\n\n const leadingDropDown =\n leading && getComponentId(leading as React.ReactElement) === 'Dropdown' ? leading : null;\n\n const trailingDropdown =\n trailing && getComponentId(trailing as React.ReactElement) === 'Dropdown' ? trailing : null;\n // we need to look into name of component and check if it 's and icon or a dropdown\n const _leadingIcon: IconComponent | undefined = isIconComponent(leading)\n ? (leading as IconComponent)\n : undefined;\n\n const _trailingIcon: IconComponent | undefined = isIconComponent(trailing)\n ? (trailing as IconComponent)\n : undefined;\n const hasLeadingInteractionElement = !_leadingIcon && !leadingDropDown && leading;\n\n const hasTrailingInteractionElement = !_trailingIcon && !trailingDropdown && trailing;\n\n const renderDropdown = (\n dropdown: React.ReactElement,\n isOpen: boolean,\n setIsOpen: (isOpen: boolean) => void,\n defaultPlacement: 'bottom-start' | 'bottom-end',\n ): React.ReactElement | null => {\n if (!dropdown) {\n return null;\n }\n return React.cloneElement(dropdown, {\n selectionType: 'single',\n isOpen,\n onOpenChange: (isOpen: boolean) => {\n setIsOpen(isOpen);\n },\n children: React.Children.map(dropdown.props.children, (child) => {\n if (child.type === DropdownOverlay) {\n return React.cloneElement(child, {\n referenceRef: textInputWrapperRef,\n _isNestedDropdown: true,\n defaultPlacement,\n });\n }\n return child;\n }),\n });\n };\n\n const renderLeadingDropDown = renderDropdown(\n leadingDropDown as React.ReactElement,\n isLeadingDropDownOpen,\n setIsLeadingDropDownOpen,\n 'bottom-start',\n );\n const renderTrailingDropDown = renderDropdown(\n trailingDropdown as React.ReactElement,\n isTrailingDropDownOpen,\n setIsTrailingDropDownOpen,\n 'bottom-end',\n );\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (defaultValue ?? inputValue)));\n }, [showClearButton, defaultValue, inputValue]);\n\n const renderClearButton = (): React.ReactElement => {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(inputValue) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n handleTagsClear();\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n };\n const hasTrailingDropDown = Boolean(trailingDropdown);\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton && hasTrailingDropDown) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" />\n </BaseBox>\n );\n }\n\n if (showClearButton && hasTrailingInteractionElement) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" /> {trailing as React.ReactElement}\n </BaseBox>\n );\n }\n\n if (shouldShowClearButton) {\n return renderClearButton();\n }\n\n if (hasTrailingInteractionElement) {\n return trailing as React.ReactElement;\n }\n return null;\n };\n return (\n <BaseInput\n id=\"textinput\"\n componentName={MetaConstants.TextInput}\n ref={mergedRef}\n setInputWrapperRef={(wrapperNode) => {\n textInputWrapperRef.current = wrapperNode;\n }}\n label={label as string}\n labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n placeholder={placeholder}\n // CONTROLLED/UNCONTROLLED INPUT LOGIC:\n // For inputs WITHOUT format:\n // - Use standard React controlled/uncontrolled logic\n // - Controlled: user provides `value` prop → use `value` prop\n // - Uncontrolled: user provides `defaultValue` prop → use `defaultValue` prop\n //\n // For inputs WITH format:\n // - Formatting requires controlled mode to re-render and show formatted values\n // - Case 1: Only `value` provided → defaultValue: undefined, value: formattedValue (normal controlled)\n // - Case 2: Only `defaultValue` provided → defaultValue: undefined, value: formattedValue (convert to controlled)\n // - Case 3: Both `value` and `defaultValue` provided → defaultValue: defaultValue, value: formattedValue (let BaseInput detect conflict and throw error)\n //\n defaultValue={\n format\n ? value !== undefined && defaultValue !== undefined\n ? defaultValue\n : undefined\n : defaultValue\n }\n value={format ? inputValue : value}\n name={name}\n maxCharacters={effectiveMaxCharacters}\n isDropdownTrigger={isTaggedInput}\n tags={isTaggedInput ? getTags({ size }) : undefined}\n showAllTags={isInputFocussed}\n maxTagRows=\"single\"\n activeTagIndex={activeTagIndex}\n setActiveTagIndex={setActiveTagIndex}\n leadingDropDown={renderLeadingDropDown}\n trailingDropDown={renderTrailingDropDown}\n leadingInteractionElement={\n hasLeadingInteractionElement ? (leading as React.ReactElement) : null\n }\n onChange={({ name, value }: { name?: string; value?: string }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n handleTaggedInputChange({ name, value });\n handleOnChange({ name, value });\n }}\n onClick={onClick}\n onFocus={(e) => {\n setIsInputFocussed(true);\n onFocus?.(e);\n }}\n onBlur={(e) => {\n setIsInputFocussed(false);\n onBlur?.(e);\n }}\n onKeyDown={(e) => {\n handleTaggedInputKeydown(e);\n onKeyDown?.(e);\n if (format) {\n formattingResult.handleKeyDown(e.event);\n }\n }}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n necessityIndicator={necessityIndicator}\n isRequired={isRequired}\n leadingIcon={_leadingIcon ?? leadingIcon ?? icon}\n prefix={prefix}\n trailingInteractionElement={renderInteractionElement()}\n trailingIcon={_trailingIcon ?? trailingIcon}\n suffix={suffix}\n validationState={validationState}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n trailingFooterSlot={(value) => {\n return format ? null : effectiveMaxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter\n currentCount={value?.length ?? 0}\n maxCount={effectiveMaxCharacters}\n size={size}\n />\n </BaseBox>\n ) : null;\n }}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n })}\n size={size}\n {...rest}\n />\n );\n};\n\nconst TextInput = assignWithoutSideEffects(React.forwardRef(_TextInput), {\n displayName: 'TextInput',\n});\n\nexport type { TextInputProps };\nexport { TextInput };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextInput","_ref","ref","_ref4","label","accessibilityLabel","_ref$labelPosition","labelPosition","placeholder","_ref$type","type","defaultValue","name","value","maxCharacters","format","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID","_ref$size","size","leadingIcon","trailingIcon","isTaggedInput","tags","onTagChange","trailing","leading","labelSuffix","labelTrailing","onKeyDown","rest","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","_useState3","_useState4","isInputFocussed","setIsInputFocussed","hasAlphanumeric","test","Error","concat","formattingResult","useFormattedInput","inputValue","formattedValue","effectiveMaxCharacters","maxLength","handleOnChange","useCallback","_ref2","handleChange","_useTaggedInput","useTaggedInput","inputRef","activeTagIndex","setActiveTagIndex","getTags","handleTaggedInputKeydown","handleTaggedInputChange","handleTagsClear","_React$useState","_React$useState2","isTrailingDropDownOpen","setIsTrailingDropDownOpen","_React$useState3","_React$useState4","isLeadingDropDownOpen","setIsLeadingDropDownOpen","textInputWrapperRef","useEffect","leadingDropDown","getComponentId","trailingDropdown","_leadingIcon","isIconComponent","undefined","_trailingIcon","hasLeadingInteractionElement","hasTrailingInteractionElement","renderDropdown","dropdown","isOpen","setIsOpen","defaultPlacement","cloneElement","selectionType","onOpenChange","children","Children","map","props","child","DropdownOverlay","referenceRef","_isNestedDropdown","renderLeadingDropDown","renderTrailingDropDown","Boolean","renderClearButton","_jsx","IconButton","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","hasTrailingDropDown","renderInteractionElement","Spinner","color","_jsxs","BaseBox","display","gap","Divider","orientation","BaseInput","_objectSpread","id","componentName","MetaConstants","TextInput","setInputWrapperRef","wrapperNode","hideLabelText","isDropdownTrigger","showAllTags","maxTagRows","trailingDropDown","leadingInteractionElement","_ref3","length","e","handleKeyDown","event","trailingInteractionElement","trailingFooterSlot","_value$length","marginTop","hintMarginTop","marginRight","CharacterCounter","currentCount","maxCount","getKeyboardAndAutocompleteProps","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyLA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,aAAkB,EAA4C;AACnF,EAAA,OAAOC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC7C,CAAC,CAAA;AAED,IAAMC,UAA2E,GAAG,SAA9EA,UAA2EA,CAAAC,IAAA,EAgD/EC,GAAG,EACc;AAAA,EAAA,IAAAC,KAAA,CAAA;AAAA,EAAA,IA/CfC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,kBAAkB,GAAAJ,IAAA,CAAlBI,kBAAkB;IAAAC,kBAAA,GAAAL,IAAA,CAClBM,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,kBAAA;IACrBE,WAAW,GAAAP,IAAA,CAAXO,WAAW;IAAAC,SAAA,GAAAR,IAAA,CACXS,I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;AAACsI,QAAAA,WAAW,EAAC,WAAW;QAAAvD,QAAA,eAC9DY,GAAA,CAAC4C,gBAAgB,EAAA;AACfC,UAAAA,YAAY,EAAAL,CAAAA,aAAA,GAAE9J,KAAK,aAALA,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAALA,KAAK,CAAEwJ,MAAM,MAAAM,IAAAA,IAAAA,aAAA,KAAAA,KAAAA,CAAAA,GAAAA,aAAA,GAAI,CAAE;AACjCM,UAAAA,QAAQ,EAAEpG,sBAAuB;AACjCrC,UAAAA,IAAI,EAAEA,IAAAA;SACP,CAAA;OACM,CAAC,GACR,IAAI,CAAA;AACV,KAAA;AACA;AAAA;AACAN,IAAAA,SAAS,EAAEA,SAAU;AACrBI,IAAAA,MAAM,EAAEA,MAAAA;AAAO,GAAA,EACX4I,+BAA+B,CAAC;AAClCxK,IAAAA,IAAI,EAAJA,IAAI;AACJyB,IAAAA,qBAAqB,EAArBA,qBAAqB;AACrBC,IAAAA,0BAA0B,EAA1BA,0BAA0B;AAC1BC,IAAAA,cAAc,EAAdA,cAAAA;AACF,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AACFG,IAAAA,IAAI,EAAEA,IAAAA;GACFW,EAAAA,IAAI,CACT,CAAC,CAAA;AAEN,CAAC,CAAA;AAEKwG,IAAAA,SAAS,gBAAGwB,wBAAwB,cAAC5H,cAAK,CAAC6H,UAAU,CAACpL,UAAU,CAAC,EAAE;AACvEqL,EAAAA,WAAW,EAAE,WAAA;AACf,CAAC;;;;"}
@@ -102,7 +102,7 @@ var useFormattedInput = function useFormattedInput(_ref) {
102
102
  if (!pattern) {
103
103
  // No pattern = regular input
104
104
  var cleanValue = inputValue !== null && inputValue !== void 0 ? inputValue : '';
105
- onChange === null || onChange === void 0 ? void 0 : onChange({
105
+ onChange === null || onChange === void 0 || onChange({
106
106
  name: name,
107
107
  value: cleanValue
108
108
  });
@@ -168,7 +168,7 @@ var useFormattedInput = function useFormattedInput(_ref) {
168
168
  }
169
169
  }
170
170
  }
171
- onChange === null || onChange === void 0 ? void 0 : onChange({
171
+ onChange === null || onChange === void 0 || onChange({
172
172
  name: name,
173
173
  value: formattedValue,
174
174
  rawValue: rawValue
@@ -1 +1 @@
1
- {"version":3,"file":"useFormattedInput.js","sources":["../../../../../../../src/components/Input/TextInput/useFormattedInput.ts"],"sourcesContent":["import type React from 'react';\nimport { useCallback, useRef, useState, useEffect, useMemo } from 'react';\nimport type { FormInputOnEvent } from '~components/Form/FormTypes';\n\n/**\n * Formats user input according to pattern. format(\"1234\", \"##/##\") → \"12/34\"\n */\nconst format = (value: string, pattern: string): string => {\n if (!pattern) return value;\n\n let result = '';\n let valueIndex = 0;\n\n for (let i = 0; i < pattern.length; i++) {\n const patternChar = pattern[i]; // \"#\" or \"/\"\n\n if (patternChar === '#') {\n if (valueIndex < value.length) {\n result += value[valueIndex]; // add \"1\" from \"1234\"\n valueIndex++;\n } else {\n break; // No more input chars, stop\n }\n } else {\n result += patternChar; // add \"/\" delimiter\n }\n }\n\n return result; // \"12/34\"\n};\n\n/**\n * Removes delimiters, keeps only user input. stripPatternCharacters(\"12/34\") → \"1234\"\n */\nconst stripPatternCharacters = (value: string): string => {\n return value.replace(/[^\\dA-z]/g, ''); // \"12/34\" → \"1234\" (removes \"/\")\n};\n\n/**\n * Checks if character is user input vs delimiter. isUserCharacter('1') → true, isUserCharacter('/') → false\n */\nconst isUserCharacter = (character: string): boolean => {\n return /[\\dA-z]/.test(character); // \"1\" → true, \"/\" → false\n};\n\ntype UseFormattedInputProps = {\n format?: string;\n onChange?: (params: { name?: string; value?: string; rawValue?: string }) => void;\n value?: string;\n defaultValue?: string;\n};\n\ntype UseFormattedInputReturn = {\n formattedValue: string;\n handleChange: FormInputOnEvent;\n handleKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n maxLength?: number;\n};\n\n/**\n * Hook for pattern-based input formatting with smart cursor positioning.\n * useFormattedInput({ format: \"##/##\" }) transforms \"1234\" → \"12/34\"\n */\nexport const useFormattedInput = ({\n format: pattern,\n onChange,\n value: userValue,\n defaultValue = '',\n}: UseFormattedInputProps): UseFormattedInputReturn => {\n const initialValue = useMemo(() => {\n return format(userValue ?? defaultValue, pattern ?? '');\n }, [userValue, defaultValue, pattern]);\n\n const [internalValue, setInternalValue] = useState(initialValue);\n const inputRef = useRef<HTMLInputElement | null>(null);\n const infoRef = useRef<{\n cursorPosition?: number;\n endOfSection?: boolean;\n }>({});\n\n const maxLength = useMemo(() => pattern?.length, [pattern]);\n\n // Reset internal state when parent clears value (form resets, external state changes)\n // Preserves format delimiters for visual guidance. Example: \"(###)\" → \"( )\" when cleared\n useEffect(() => {\n if ((userValue === '' || userValue === undefined) && defaultValue === '') {\n const emptyFormatted = format('', pattern ?? '');\n setInternalValue(emptyFormatted);\n }\n // DATEPICKER FIX: Sync internal state when external value changes\n // This addresses the issue where DatePicker programmatically updates the value prop\n // (e.g., when user selects date from calendar), but the formatted input's internal\n // state doesn't update, causing the input to not reflect the new value.\n // Without this, only user typing and empty resets were handled.\n if (userValue !== undefined && userValue !== '' && pattern) {\n const rawValue = stripPatternCharacters(userValue);\n const newFormatted = format(rawValue, pattern);\n\n // Only update if the formatted value actually changed to avoid unnecessary re-renders\n if (newFormatted !== internalValue) {\n setInternalValue(newFormatted);\n }\n }\n }, [userValue, pattern]);\n\n // Apply calculated cursor position after value updates\n useEffect(() => {\n const { cursorPosition, endOfSection } = infoRef.current;\n\n if (endOfSection || cursorPosition === undefined) return; // Skip if no position or end section\n\n if (inputRef.current) {\n inputRef.current.setSelectionRange(cursorPosition, cursorPosition);\n }\n }, [internalValue]);\n\n const handleChange: FormInputOnEvent = useCallback(\n ({ name, value: inputValue }) => {\n if (!pattern) {\n // No pattern = regular input\n const cleanValue = inputValue ?? '';\n onChange?.({ name, value: cleanValue });\n setInternalValue(cleanValue);\n return;\n }\n\n const currentValue = internalValue; // \"12/34\" (user wants to delete \"/\")\n const newInputValue = inputValue ?? ''; // \"1234\" (after deleting \"/\")\n const cursorPosition = inputRef.current?.selectionStart ?? 0; // 2 (cursor where \"/\" was)\n const didDelete = newInputValue.length < currentValue.length; // 4 < 5 → true\n\n infoRef.current.cursorPosition = cursorPosition;\n\n let rawValue = stripPatternCharacters(newInputValue); // \"1234\" → \"1234\"\n\n // Handle special case: user deleted a delimiter (like deleting \"/\" in \"12/|34\")\n if (didDelete) {\n const deletedChar = currentValue[cursorPosition] ?? ''; // \"12/34\"[2] → \"/\"\n const deletedDelimiter = !isUserCharacter(deletedChar); // \"/\" → true (is delimiter)\n\n if (deletedDelimiter) {\n // true (will execute for \"/\" deletion)\n const beforeCursor = newInputValue.substring(0, cursorPosition); // \"12\" (before cursor)\n const afterCursor = newInputValue.substring(cursorPosition); // \"34\" (after cursor)\n const rawBefore = stripPatternCharacters(beforeCursor); // \"12\" → \"12\"\n const rawAfter = stripPatternCharacters(afterCursor); // \"34\" → \"34\"\n\n rawValue = rawBefore.slice(0, -1) + rawAfter; // \"12\".slice(0,-1) + \"34\" → \"1\" + \"34\" → \"134\"\n\n // Removes trailing non-alphanumeric characters from the end of the string, preserving the last alphanumeric word before them.\n infoRef.current.cursorPosition =\n beforeCursor.replace(/([\\d\\w]+)[^\\dA-z]+$/, '$1').length - 1;\n }\n }\n\n const formattedValue = format(rawValue, pattern); // format(\"134\", \"##/##\") → \"13/4\"\n infoRef.current.endOfSection = false;\n\n // Handle cursor positioning when typing (not deleting)\n if (!didDelete) {\n // User types \"2\" in \"1|\" → becomes \"12|/\" → should jump to \"12/|\"\n const nextChar = formattedValue[cursorPosition]; // \"12/\"[2] → \"/\" (delimiter)\n const nextIsDelimiter = nextChar ? !isUserCharacter(nextChar) : false; // \"/\" → true\n\n const remainingText = formattedValue.substring(cursorPosition); // \"12/\".substring(2) → \"/\"\n const nextUserCharIndex = remainingText.search(/[\\dA-z]/); // \"/\".search() → -1 (no user chars)\n const hasMoreUserChars = nextUserCharIndex !== -1; // -1 !== -1 → false\n\n infoRef.current.endOfSection = nextIsDelimiter && !hasMoreUserChars; // true && false → false\n\n // Move cursor past auto-inserted delimiters for smooth typing\n if (nextIsDelimiter && hasMoreUserChars) {\n const prevChar = formattedValue[cursorPosition - 1] ?? '';\n const prevIsDelimiter = !isUserCharacter(prevChar);\n\n if (prevIsDelimiter) {\n infoRef.current.cursorPosition = cursorPosition + nextUserCharIndex + 1;\n } else {\n // If we're at a delimiter after typing (not deleting), and there are more chars,\n // we probably need to move past it unless it's a brand new delimiter\n const delimiterExistedBefore =\n currentValue[cursorPosition] === formattedValue[cursorPosition];\n if (delimiterExistedBefore) {\n infoRef.current.cursorPosition = cursorPosition + 1;\n }\n }\n }\n }\n\n onChange?.({ name, value: formattedValue, rawValue });\n setInternalValue(formattedValue);\n },\n [pattern, onChange, internalValue],\n );\n\n const handleKeyDown = useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.currentTarget && inputRef.current !== event.currentTarget) {\n inputRef.current = event.currentTarget;\n }\n }, []);\n\n return {\n formattedValue: internalValue,\n handleChange,\n handleKeyDown,\n maxLength,\n };\n};\n"],"names":["format","value","pattern","result","valueIndex","i","length","patternChar","stripPatternCharacters","replace","isUserCharacter","character","test","useFormattedInput","_ref","onChange","userValue","_ref$defaultValue","defaultValue","initialValue","useMemo","_useState","useState","_useState2","_slicedToArray","internalValue","setInternalValue","inputRef","useRef","infoRef","maxLength","useEffect","undefined","emptyFormatted","rawValue","newFormatted","_infoRef$current","current","cursorPosition","endOfSection","setSelectionRange","handleChange","useCallback","_ref2","_inputRef$current$sel","_inputRef$current","name","inputValue","cleanValue","currentValue","newInputValue","selectionStart","didDelete","_currentValue$cursorP","deletedChar","deletedDelimiter","beforeCursor","substring","afterCursor","rawBefore","rawAfter","slice","formattedValue","nextChar","nextIsDelimiter","remainingText","nextUserCharIndex","search","hasMoreUserChars","_formattedValue","prevChar","prevIsDelimiter","delimiterExistedBefore","handleKeyDown","event","currentTarget"],"mappings":";;;AAIA;AACA;AACA;AACA,IAAMA,MAAM,GAAG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Aa,EAAE;AACnEhD,MAAAA,QAAQ,CAACU,OAAO,GAAGqC,KAAK,CAACC,aAAa,CAAA;AACxC,KAAA;GACD,EAAE,EAAE,CAAC,CAAA;EAEN,OAAO;AACLb,IAAAA,cAAc,EAAErC,aAAa;AAC7BgB,IAAAA,YAAY,EAAZA,YAAY;AACZgC,IAAAA,aAAa,EAAbA,aAAa;AACb3C,IAAAA,SAAS,EAATA,SAAAA;GACD,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"useFormattedInput.js","sources":["../../../../../../../src/components/Input/TextInput/useFormattedInput.ts"],"sourcesContent":["import type React from 'react';\nimport { useCallback, useRef, useState, useEffect, useMemo } from 'react';\nimport type { FormInputOnEvent } from '~components/Form/FormTypes';\n\n/**\n * Formats user input according to pattern. format(\"1234\", \"##/##\") → \"12/34\"\n */\nconst format = (value: string, pattern: string): string => {\n if (!pattern) return value;\n\n let result = '';\n let valueIndex = 0;\n\n for (let i = 0; i < pattern.length; i++) {\n const patternChar = pattern[i]; // \"#\" or \"/\"\n\n if (patternChar === '#') {\n if (valueIndex < value.length) {\n result += value[valueIndex]; // add \"1\" from \"1234\"\n valueIndex++;\n } else {\n break; // No more input chars, stop\n }\n } else {\n result += patternChar; // add \"/\" delimiter\n }\n }\n\n return result; // \"12/34\"\n};\n\n/**\n * Removes delimiters, keeps only user input. stripPatternCharacters(\"12/34\") → \"1234\"\n */\nconst stripPatternCharacters = (value: string): string => {\n return value.replace(/[^\\dA-z]/g, ''); // \"12/34\" → \"1234\" (removes \"/\")\n};\n\n/**\n * Checks if character is user input vs delimiter. isUserCharacter('1') → true, isUserCharacter('/') → false\n */\nconst isUserCharacter = (character: string): boolean => {\n return /[\\dA-z]/.test(character); // \"1\" → true, \"/\" → false\n};\n\ntype UseFormattedInputProps = {\n format?: string;\n onChange?: (params: { name?: string; value?: string; rawValue?: string }) => void;\n value?: string;\n defaultValue?: string;\n};\n\ntype UseFormattedInputReturn = {\n formattedValue: string;\n handleChange: FormInputOnEvent;\n handleKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n maxLength?: number;\n};\n\n/**\n * Hook for pattern-based input formatting with smart cursor positioning.\n * useFormattedInput({ format: \"##/##\" }) transforms \"1234\" → \"12/34\"\n */\nexport const useFormattedInput = ({\n format: pattern,\n onChange,\n value: userValue,\n defaultValue = '',\n}: UseFormattedInputProps): UseFormattedInputReturn => {\n const initialValue = useMemo(() => {\n return format(userValue ?? defaultValue, pattern ?? '');\n }, [userValue, defaultValue, pattern]);\n\n const [internalValue, setInternalValue] = useState(initialValue);\n const inputRef = useRef<HTMLInputElement | null>(null);\n const infoRef = useRef<{\n cursorPosition?: number;\n endOfSection?: boolean;\n }>({});\n\n const maxLength = useMemo(() => pattern?.length, [pattern]);\n\n // Reset internal state when parent clears value (form resets, external state changes)\n // Preserves format delimiters for visual guidance. Example: \"(###)\" → \"( )\" when cleared\n useEffect(() => {\n if ((userValue === '' || userValue === undefined) && defaultValue === '') {\n const emptyFormatted = format('', pattern ?? '');\n setInternalValue(emptyFormatted);\n }\n // DATEPICKER FIX: Sync internal state when external value changes\n // This addresses the issue where DatePicker programmatically updates the value prop\n // (e.g., when user selects date from calendar), but the formatted input's internal\n // state doesn't update, causing the input to not reflect the new value.\n // Without this, only user typing and empty resets were handled.\n if (userValue !== undefined && userValue !== '' && pattern) {\n const rawValue = stripPatternCharacters(userValue);\n const newFormatted = format(rawValue, pattern);\n\n // Only update if the formatted value actually changed to avoid unnecessary re-renders\n if (newFormatted !== internalValue) {\n setInternalValue(newFormatted);\n }\n }\n }, [userValue, pattern]);\n\n // Apply calculated cursor position after value updates\n useEffect(() => {\n const { cursorPosition, endOfSection } = infoRef.current;\n\n if (endOfSection || cursorPosition === undefined) return; // Skip if no position or end section\n\n if (inputRef.current) {\n inputRef.current.setSelectionRange(cursorPosition, cursorPosition);\n }\n }, [internalValue]);\n\n const handleChange: FormInputOnEvent = useCallback(\n ({ name, value: inputValue }) => {\n if (!pattern) {\n // No pattern = regular input\n const cleanValue = inputValue ?? '';\n onChange?.({ name, value: cleanValue });\n setInternalValue(cleanValue);\n return;\n }\n\n const currentValue = internalValue; // \"12/34\" (user wants to delete \"/\")\n const newInputValue = inputValue ?? ''; // \"1234\" (after deleting \"/\")\n const cursorPosition = inputRef.current?.selectionStart ?? 0; // 2 (cursor where \"/\" was)\n const didDelete = newInputValue.length < currentValue.length; // 4 < 5 → true\n\n infoRef.current.cursorPosition = cursorPosition;\n\n let rawValue = stripPatternCharacters(newInputValue); // \"1234\" → \"1234\"\n\n // Handle special case: user deleted a delimiter (like deleting \"/\" in \"12/|34\")\n if (didDelete) {\n const deletedChar = currentValue[cursorPosition] ?? ''; // \"12/34\"[2] → \"/\"\n const deletedDelimiter = !isUserCharacter(deletedChar); // \"/\" → true (is delimiter)\n\n if (deletedDelimiter) {\n // true (will execute for \"/\" deletion)\n const beforeCursor = newInputValue.substring(0, cursorPosition); // \"12\" (before cursor)\n const afterCursor = newInputValue.substring(cursorPosition); // \"34\" (after cursor)\n const rawBefore = stripPatternCharacters(beforeCursor); // \"12\" → \"12\"\n const rawAfter = stripPatternCharacters(afterCursor); // \"34\" → \"34\"\n\n rawValue = rawBefore.slice(0, -1) + rawAfter; // \"12\".slice(0,-1) + \"34\" → \"1\" + \"34\" → \"134\"\n\n // Removes trailing non-alphanumeric characters from the end of the string, preserving the last alphanumeric word before them.\n infoRef.current.cursorPosition =\n beforeCursor.replace(/([\\d\\w]+)[^\\dA-z]+$/, '$1').length - 1;\n }\n }\n\n const formattedValue = format(rawValue, pattern); // format(\"134\", \"##/##\") → \"13/4\"\n infoRef.current.endOfSection = false;\n\n // Handle cursor positioning when typing (not deleting)\n if (!didDelete) {\n // User types \"2\" in \"1|\" → becomes \"12|/\" → should jump to \"12/|\"\n const nextChar = formattedValue[cursorPosition]; // \"12/\"[2] → \"/\" (delimiter)\n const nextIsDelimiter = nextChar ? !isUserCharacter(nextChar) : false; // \"/\" → true\n\n const remainingText = formattedValue.substring(cursorPosition); // \"12/\".substring(2) → \"/\"\n const nextUserCharIndex = remainingText.search(/[\\dA-z]/); // \"/\".search() → -1 (no user chars)\n const hasMoreUserChars = nextUserCharIndex !== -1; // -1 !== -1 → false\n\n infoRef.current.endOfSection = nextIsDelimiter && !hasMoreUserChars; // true && false → false\n\n // Move cursor past auto-inserted delimiters for smooth typing\n if (nextIsDelimiter && hasMoreUserChars) {\n const prevChar = formattedValue[cursorPosition - 1] ?? '';\n const prevIsDelimiter = !isUserCharacter(prevChar);\n\n if (prevIsDelimiter) {\n infoRef.current.cursorPosition = cursorPosition + nextUserCharIndex + 1;\n } else {\n // If we're at a delimiter after typing (not deleting), and there are more chars,\n // we probably need to move past it unless it's a brand new delimiter\n const delimiterExistedBefore =\n currentValue[cursorPosition] === formattedValue[cursorPosition];\n if (delimiterExistedBefore) {\n infoRef.current.cursorPosition = cursorPosition + 1;\n }\n }\n }\n }\n\n onChange?.({ name, value: formattedValue, rawValue });\n setInternalValue(formattedValue);\n },\n [pattern, onChange, internalValue],\n );\n\n const handleKeyDown = useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.currentTarget && inputRef.current !== event.currentTarget) {\n inputRef.current = event.currentTarget;\n }\n }, []);\n\n return {\n formattedValue: internalValue,\n handleChange,\n handleKeyDown,\n maxLength,\n };\n};\n"],"names":["format","value","pattern","result","valueIndex","i","length","patternChar","stripPatternCharacters","replace","isUserCharacter","character","test","useFormattedInput","_ref","onChange","userValue","_ref$defaultValue","defaultValue","initialValue","useMemo","_useState","useState","_useState2","_slicedToArray","internalValue","setInternalValue","inputRef","useRef","infoRef","maxLength","useEffect","undefined","emptyFormatted","rawValue","newFormatted","_infoRef$current","current","cursorPosition","endOfSection","setSelectionRange","handleChange","useCallback","_ref2","_inputRef$current$sel","_inputRef$current","name","inputValue","cleanValue","currentValue","newInputValue","selectionStart","didDelete","_currentValue$cursorP","deletedChar","deletedDelimiter","beforeCursor","substring","afterCursor","rawBefore","rawAfter","slice","formattedValue","nextChar","nextIsDelimiter","remainingText","nextUserCharIndex","search","hasMoreUserChars","_formattedValue","prevChar","prevIsDelimiter","delimiterExistedBefore","handleKeyDown","event","currentTarget"],"mappings":";;;AAIA;AACA;AACA;AACA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAIC,KAAa,EAAEC,OAAe,EAAa;AACzD,EAAA,IAAI,CAACA,OAAO,EAAE,OAAOD,KAAK,CAAA;EAE1B,IAAIE,MAAM,GAAG,EAAE,CAAA;EACf,IAAIC,UAAU,GAAG,CAAC,CAAA;AAElB,EAAA,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,OAAO,CAACI,MAAM,EAAED,CAAC,EAAE,EAAE;AACvC,IAAA,IAAME,WAAW,GAAGL,OAAO,CAACG,CAAC,CAAC,CAAC;;IAE/B,IAAIE,WAAW,KAAK,GAAG,EAAE;AACvB,MAAA,IAAIH,UAAU,GAAGH,KAAK,CAACK,MAAM,EAAE;AAC7BH,QAAAA,MAAM,IAAIF,KAAK,CAACG,UAAU,CAAC,CAAC;AAC5BA,QAAAA,UAAU,EAAE,CAAA;AACd,OAAC,MAAM;AACL,QAAA,MAAM;AACR,OAAA;AACF,KAAC,MAAM;MACLD,MAAM,IAAII,WAAW,CAAC;AACxB,KAAA;AACF,GAAA;EAEA,OAAOJ,MAAM,CAAC;AAChB,CAAC,CAAA;;AAED;AACA;AACA;AACA,IAAMK,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAIP,KAAa,EAAa;EACxD,OAAOA,KAAK,CAACQ,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACxC,CAAC,CAAA;;AAED;AACA;AACA;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,SAAiB,EAAc;AACtD,EAAA,OAAO,SAAS,CAACC,IAAI,CAACD,SAAS,CAAC,CAAC;AACnC,CAAC,CAAA;AAgBD;AACA;AACA;AACA;IACaE,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAKy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ACgC,KAA4C,EAAK;IAClF,IAAIA,KAAK,CAACC,aAAa,IAAIhD,QAAQ,CAACU,OAAO,KAAKqC,KAAK,CAACC,aAAa,EAAE;AACnEhD,MAAAA,QAAQ,CAACU,OAAO,GAAGqC,KAAK,CAACC,aAAa,CAAA;AACxC,KAAA;GACD,EAAE,EAAE,CAAC,CAAA;EAEN,OAAO;AACLb,IAAAA,cAAc,EAAErC,aAAa;AAC7BgB,IAAAA,YAAY,EAAZA,YAAY;AACZgC,IAAAA,aAAa,EAAbA,aAAa;AACb3C,IAAAA,SAAS,EAATA,SAAAA;GACD,CAAA;AACH;;;;"}
@@ -130,7 +130,7 @@ var _InputGroup = function _InputGroup(_ref, ref) {
130
130
  }))
131
131
  });
132
132
  };
133
- var InputGroup = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__default.forwardRef(_InputGroup), {
133
+ var InputGroup = /*#__PURE__*/assignWithoutSideEffects(/*#__PURE__*/React__default.forwardRef(_InputGroup), {
134
134
  displayName: 'InputGroup',
135
135
  componentId: 'InputGroup'
136
136
  });