@razorpay/blade 12.111.0 → 12.120.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (352) hide show
  1. package/assets/spark/colorama-center-gradient-map-dark.jpg +0 -0
  2. package/assets/spark/colorama-gradient-map-dark.png +0 -0
  3. package/build/lib/native/components/Button/BaseButton/BaseButton.js +3 -3
  4. package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
  5. package/build/lib/native/components/Button/BaseButton/buttonTokens.js +1 -1
  6. package/build/lib/native/components/Button/BaseButton/buttonTokens.js.map +1 -1
  7. package/build/lib/native/components/Charts/AreaChart/AreaChart.native.js +2 -1
  8. package/build/lib/native/components/Charts/AreaChart/AreaChart.native.js.map +1 -1
  9. package/build/lib/native/components/Charts/CommonChartComponents/CommonChartComponents.native.js +2 -2
  10. package/build/lib/native/components/Charts/CommonChartComponents/CommonChartComponents.native.js.map +1 -1
  11. package/build/lib/native/components/Charts/CommonChartComponents/index.js +1 -1
  12. package/build/lib/native/components/Charts/CommonChartComponents/tokens.js +2 -2
  13. package/build/lib/native/components/Charts/CommonChartComponents/tokens.js.map +1 -1
  14. package/build/lib/native/components/Charts/LineChart/LineChart.native.js +4 -2
  15. package/build/lib/native/components/Charts/LineChart/LineChart.native.js.map +1 -1
  16. package/build/lib/native/components/Charts/utils/nullBridgeUtils.js +4 -0
  17. package/build/lib/native/components/Charts/utils/nullBridgeUtils.js.map +1 -0
  18. package/build/lib/native/components/Charts/utils/referenceBandUtils.js +6 -0
  19. package/build/lib/native/components/Charts/utils/referenceBandUtils.js.map +1 -0
  20. package/build/lib/native/components/CounterInput/CounterInput.native.js +3 -2
  21. package/build/lib/native/components/CounterInput/CounterInput.native.js.map +1 -1
  22. package/build/lib/native/components/CounterInput/token.js +2 -2
  23. package/build/lib/native/components/CounterInput/token.js.map +1 -1
  24. package/build/lib/native/components/DatePicker/Calendar.native.js +2 -2
  25. package/build/lib/native/components/DatePicker/Calendar.native.js.map +1 -1
  26. package/build/lib/native/components/DatePicker/utils.js +2 -2
  27. package/build/lib/native/components/DatePicker/utils.js.map +1 -1
  28. package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
  29. package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
  30. package/build/lib/native/components/Dropdown/FilterChipSelectInput.native.js +1 -1
  31. package/build/lib/native/components/Dropdown/FilterChipSelectInput.native.js.map +1 -1
  32. package/build/lib/native/components/Dropdown/dropdownUtils.js +1 -1
  33. package/build/lib/native/components/Dropdown/dropdownUtils.js.map +1 -1
  34. package/build/lib/native/components/Dropdown/filterChipSelectInputUtils.js +1 -1
  35. package/build/lib/native/components/Dropdown/filterChipSelectInputUtils.js.map +1 -1
  36. package/build/lib/native/components/Dropdown/useDropdown.js +1 -1
  37. package/build/lib/native/components/Dropdown/useDropdown.js.map +1 -1
  38. package/build/lib/native/components/FloatingActionButton/FloatingActionButton.js +14 -0
  39. package/build/lib/native/components/FloatingActionButton/FloatingActionButton.js.map +1 -0
  40. package/build/lib/native/components/FloatingActionButton/FloatingActionButtonContainer.native.js +20 -0
  41. package/build/lib/native/components/FloatingActionButton/FloatingActionButtonContainer.native.js.map +1 -0
  42. package/build/lib/native/components/FloatingActionButton/index.js +2 -0
  43. package/build/lib/native/components/FloatingActionButton/index.js.map +1 -0
  44. package/build/lib/native/components/GenUI/GenUIContext.native.js +2 -2
  45. package/build/lib/native/components/GenUI/GenUIContext.native.js.map +1 -1
  46. package/build/lib/native/components/GenUI/index.js +1 -1
  47. package/build/lib/native/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js +14 -0
  48. package/build/lib/native/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js.map +1 -0
  49. package/build/lib/native/components/Icons/BookmarkFilledIcon/index.js +2 -0
  50. package/build/lib/native/components/Icons/BookmarkFilledIcon/index.js.map +1 -0
  51. package/build/lib/native/components/Icons/index.js +1 -0
  52. package/build/lib/native/components/Icons/index.js.map +1 -1
  53. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +1 -1
  54. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
  55. package/build/lib/native/components/Input/OTPInput/OTPInput.js +1 -1
  56. package/build/lib/native/components/Input/OTPInput/OTPInput.js.map +1 -1
  57. package/build/lib/native/components/Spark/RzpGlass/utils.native.js +1 -1
  58. package/build/lib/native/components/Spark/RzpGlass/utils.native.js.map +1 -1
  59. package/build/lib/native/components/TreeView/TreeView.native.js +4 -0
  60. package/build/lib/native/components/TreeView/TreeView.native.js.map +1 -0
  61. package/build/lib/native/components/TreeView/index.native.js +2 -0
  62. package/build/lib/native/components/TreeView/index.native.js.map +1 -0
  63. package/build/lib/native/components/index.js +7 -2
  64. package/build/lib/native/components/index.js.map +1 -1
  65. package/build/lib/native/tokens/global/colors.js +1 -1
  66. package/build/lib/native/tokens/global/colors.js.map +1 -1
  67. package/build/lib/native/tokens/index.js +1 -0
  68. package/build/lib/native/tokens/index.js.map +1 -1
  69. package/build/lib/native/tokens/theme/bladeNeutralTheme.js +15 -0
  70. package/build/lib/native/tokens/theme/bladeNeutralTheme.js.map +1 -0
  71. package/build/lib/native/tokens/theme/bladeTheme.js +1 -1
  72. package/build/lib/native/tokens/theme/bladeTheme.js.map +1 -1
  73. package/build/lib/native/tokens/theme/index.js +1 -0
  74. package/build/lib/native/tokens/theme/index.js.map +1 -1
  75. package/build/lib/native/tokens/theme/theme.js.map +1 -1
  76. package/build/lib/native/utils/componentZIndices.js +1 -1
  77. package/build/lib/native/utils/componentZIndices.js.map +1 -1
  78. package/build/lib/native/utils/metaAttribute/metaConstants.js +1 -1
  79. package/build/lib/native/utils/metaAttribute/metaConstants.js.map +1 -1
  80. package/build/lib/native/utils/useControlledDropdownInput/useControlledDropdownInput.js +1 -1
  81. package/build/lib/native/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
  82. package/build/lib/web/development/_virtual/cloneDeep.js +1 -1
  83. package/build/lib/web/development/_virtual/cloneDeep3.js +1 -1
  84. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +124 -73
  85. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
  86. package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js +68 -2
  87. package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js.map +1 -1
  88. package/build/lib/web/development/components/Charts/AreaChart/AreaChart.web.js +206 -18
  89. package/build/lib/web/development/components/Charts/AreaChart/AreaChart.web.js.map +1 -1
  90. package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponents.web.js +159 -43
  91. package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponents.web.js.map +1 -1
  92. package/build/lib/web/development/components/Charts/CommonChartComponents/index.js +1 -1
  93. package/build/lib/web/development/components/Charts/CommonChartComponents/tokens.js +15 -2
  94. package/build/lib/web/development/components/Charts/CommonChartComponents/tokens.js.map +1 -1
  95. package/build/lib/web/development/components/Charts/LineChart/LineChart.web.js +272 -15
  96. package/build/lib/web/development/components/Charts/LineChart/LineChart.web.js.map +1 -1
  97. package/build/lib/web/development/components/Charts/LineChart/useReferenceBand.js +195 -0
  98. package/build/lib/web/development/components/Charts/LineChart/useReferenceBand.js.map +1 -0
  99. package/build/lib/web/development/components/Charts/utils/nullBridgeUtils.js +175 -0
  100. package/build/lib/web/development/components/Charts/utils/nullBridgeUtils.js.map +1 -0
  101. package/build/lib/web/development/components/Charts/utils/referenceBandUtils.js +66 -0
  102. package/build/lib/web/development/components/Charts/utils/referenceBandUtils.js.map +1 -0
  103. package/build/lib/web/development/components/CounterInput/CounterInput.web.js +29 -5
  104. package/build/lib/web/development/components/CounterInput/CounterInput.web.js.map +1 -1
  105. package/build/lib/web/development/components/CounterInput/StyledCounterInput.js +20 -4
  106. package/build/lib/web/development/components/CounterInput/StyledCounterInput.js.map +1 -1
  107. package/build/lib/web/development/components/CounterInput/token.js +6 -1
  108. package/build/lib/web/development/components/CounterInput/token.js.map +1 -1
  109. package/build/lib/web/development/components/DatePicker/BaseDatePicker.web.js +20 -0
  110. package/build/lib/web/development/components/DatePicker/BaseDatePicker.web.js.map +1 -1
  111. package/build/lib/web/development/components/DatePicker/Calendar.web.js +9 -2
  112. package/build/lib/web/development/components/DatePicker/Calendar.web.js.map +1 -1
  113. package/build/lib/web/development/components/DatePicker/utils.js +21 -1
  114. package/build/lib/web/development/components/DatePicker/utils.js.map +1 -1
  115. package/build/lib/web/development/components/Dropdown/Dropdown.js +4 -1
  116. package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
  117. package/build/lib/web/development/components/Dropdown/FilterChipSelectInput.web.js +20 -12
  118. package/build/lib/web/development/components/Dropdown/FilterChipSelectInput.web.js.map +1 -1
  119. package/build/lib/web/development/components/Dropdown/dropdownUtils.js +28 -2
  120. package/build/lib/web/development/components/Dropdown/dropdownUtils.js.map +1 -1
  121. package/build/lib/web/development/components/Dropdown/filterChipSelectInputUtils.js +15 -1
  122. package/build/lib/web/development/components/Dropdown/filterChipSelectInputUtils.js.map +1 -1
  123. package/build/lib/web/development/components/Dropdown/useDropdown.js +91 -5
  124. package/build/lib/web/development/components/Dropdown/useDropdown.js.map +1 -1
  125. package/build/lib/web/development/components/FloatingActionButton/FloatingActionButton.js +126 -0
  126. package/build/lib/web/development/components/FloatingActionButton/FloatingActionButton.js.map +1 -0
  127. package/build/lib/web/development/components/FloatingActionButton/FloatingActionButtonContainer.web.js +45 -0
  128. package/build/lib/web/development/components/FloatingActionButton/FloatingActionButtonContainer.web.js.map +1 -0
  129. package/build/lib/web/development/components/FloatingActionButton/index.js +2 -0
  130. package/build/lib/web/development/components/FloatingActionButton/index.js.map +1 -0
  131. package/build/lib/web/development/components/GenUI/GenUIComponents.web.js.map +1 -1
  132. package/build/lib/web/development/components/GenUI/GenUIContext.web.js +9 -1
  133. package/build/lib/web/development/components/GenUI/GenUIContext.web.js.map +1 -1
  134. package/build/lib/web/development/components/GenUI/GenUIProvider.web.js +17 -0
  135. package/build/lib/web/development/components/GenUI/GenUIProvider.web.js.map +1 -1
  136. package/build/lib/web/development/components/GenUI/GenUISchemaRenderer.web.js +31 -6
  137. package/build/lib/web/development/components/GenUI/GenUISchemaRenderer.web.js.map +1 -1
  138. package/build/lib/web/development/components/GenUI/index.js +1 -1
  139. package/build/lib/web/development/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js +44 -0
  140. package/build/lib/web/development/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js.map +1 -0
  141. package/build/lib/web/development/components/Icons/BookmarkFilledIcon/index.js +2 -0
  142. package/build/lib/web/development/components/Icons/BookmarkFilledIcon/index.js.map +1 -0
  143. package/build/lib/web/development/components/Icons/index.js +1 -0
  144. package/build/lib/web/development/components/Icons/index.js.map +1 -1
  145. package/build/lib/web/development/components/Input/OTPInput/OTPInput.js +3 -0
  146. package/build/lib/web/development/components/Input/OTPInput/OTPInput.js.map +1 -1
  147. package/build/lib/web/development/components/PopupArrow/PopupArrow.web.js +7 -1
  148. package/build/lib/web/development/components/PopupArrow/PopupArrow.web.js.map +1 -1
  149. package/build/lib/web/development/components/RollingText/RollingText.web.js +27 -20
  150. package/build/lib/web/development/components/RollingText/RollingText.web.js.map +1 -1
  151. package/build/lib/web/development/components/Spark/RzpGlass/RzpGlass.js +16 -7
  152. package/build/lib/web/development/components/Spark/RzpGlass/RzpGlass.js.map +1 -1
  153. package/build/lib/web/development/components/Spark/RzpGlass/RzpGlassMount.js +24 -6
  154. package/build/lib/web/development/components/Spark/RzpGlass/RzpGlassMount.js.map +1 -1
  155. package/build/lib/web/development/components/Spark/RzpGlass/presets.js +30 -1
  156. package/build/lib/web/development/components/Spark/RzpGlass/presets.js.map +1 -1
  157. package/build/lib/web/development/components/Spark/RzpGlass/rzpGlassShader.js +1 -1
  158. package/build/lib/web/development/components/Spark/RzpGlass/rzpGlassShader.js.map +1 -1
  159. package/build/lib/web/development/components/Spark/RzpGlass/utils.js +26 -10
  160. package/build/lib/web/development/components/Spark/RzpGlass/utils.js.map +1 -1
  161. package/build/lib/web/development/components/SpotlightPopoverTour/Tour.web.js +31 -18
  162. package/build/lib/web/development/components/SpotlightPopoverTour/Tour.web.js.map +1 -1
  163. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +14 -3
  164. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  165. package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js +23 -4
  166. package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
  167. package/build/lib/web/development/components/SpotlightPopoverTour/utils.js +58 -1
  168. package/build/lib/web/development/components/SpotlightPopoverTour/utils.js.map +1 -1
  169. package/build/lib/web/development/components/TreeView/StyledTreeViewRow.web.js +41 -0
  170. package/build/lib/web/development/components/TreeView/StyledTreeViewRow.web.js.map +1 -0
  171. package/build/lib/web/development/components/TreeView/TreeView.web.js +696 -0
  172. package/build/lib/web/development/components/TreeView/TreeView.web.js.map +1 -0
  173. package/build/lib/web/development/components/TreeView/TreeViewAnimator.web.js +184 -0
  174. package/build/lib/web/development/components/TreeView/TreeViewAnimator.web.js.map +1 -0
  175. package/build/lib/web/development/components/TreeView/TreeViewChevron.web.js +73 -0
  176. package/build/lib/web/development/components/TreeView/TreeViewChevron.web.js.map +1 -0
  177. package/build/lib/web/development/components/TreeView/TreeViewItem.web.js +295 -0
  178. package/build/lib/web/development/components/TreeView/TreeViewItem.web.js.map +1 -0
  179. package/build/lib/web/development/components/TreeView/TreeViewLoadMore.web.js +173 -0
  180. package/build/lib/web/development/components/TreeView/TreeViewLoadMore.web.js.map +1 -0
  181. package/build/lib/web/development/components/TreeView/componentIds.js +8 -0
  182. package/build/lib/web/development/components/TreeView/componentIds.js.map +1 -0
  183. package/build/lib/web/development/components/TreeView/index.web.js +4 -0
  184. package/build/lib/web/development/components/TreeView/index.web.js.map +1 -0
  185. package/build/lib/web/development/components/TreeView/treeViewUtils.js +475 -0
  186. package/build/lib/web/development/components/TreeView/treeViewUtils.js.map +1 -0
  187. package/build/lib/web/development/components/TreeView/useTreeView.js +24 -0
  188. package/build/lib/web/development/components/TreeView/useTreeView.js.map +1 -0
  189. package/build/lib/web/development/components/index.js +9 -2
  190. package/build/lib/web/development/components/index.js.map +1 -1
  191. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +1 -1
  192. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matches.js +2 -2
  193. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +2 -2
  194. package/build/lib/web/development/node_modules/es-toolkit/dist/object/cloneDeep.js +1 -1
  195. package/build/lib/web/development/tokens/global/colors.js +2 -2
  196. package/build/lib/web/development/tokens/global/colors.js.map +1 -1
  197. package/build/lib/web/development/tokens/index.js +1 -0
  198. package/build/lib/web/development/tokens/index.js.map +1 -1
  199. package/build/lib/web/development/tokens/theme/bladeNeutralTheme.js +1439 -0
  200. package/build/lib/web/development/tokens/theme/bladeNeutralTheme.js.map +1 -0
  201. package/build/lib/web/development/tokens/theme/bladeTheme.js +48 -12
  202. package/build/lib/web/development/tokens/theme/bladeTheme.js.map +1 -1
  203. package/build/lib/web/development/tokens/theme/index.js +1 -0
  204. package/build/lib/web/development/tokens/theme/index.js.map +1 -1
  205. package/build/lib/web/development/tokens/theme/theme.js.map +1 -1
  206. package/build/lib/web/development/utils/componentZIndices.js +2 -0
  207. package/build/lib/web/development/utils/componentZIndices.js.map +1 -1
  208. package/build/lib/web/development/utils/metaAttribute/metaConstants.js +4 -0
  209. package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
  210. package/build/lib/web/development/utils/useControlledDropdownInput/useControlledDropdownInput.js +12 -4
  211. package/build/lib/web/development/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
  212. package/build/lib/web/development/utils/useTruncationTitle/useTruncationTitle.web.js +2 -2
  213. package/build/lib/web/development/utils/useTruncationTitle/useTruncationTitle.web.js.map +1 -1
  214. package/build/lib/web/production/_virtual/flatten.js +1 -1
  215. package/build/lib/web/production/_virtual/flatten3.js +1 -1
  216. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +124 -73
  217. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
  218. package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js +68 -2
  219. package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js.map +1 -1
  220. package/build/lib/web/production/components/Charts/AreaChart/AreaChart.web.js +206 -18
  221. package/build/lib/web/production/components/Charts/AreaChart/AreaChart.web.js.map +1 -1
  222. package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponents.web.js +159 -43
  223. package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponents.web.js.map +1 -1
  224. package/build/lib/web/production/components/Charts/CommonChartComponents/index.js +1 -1
  225. package/build/lib/web/production/components/Charts/CommonChartComponents/tokens.js +15 -2
  226. package/build/lib/web/production/components/Charts/CommonChartComponents/tokens.js.map +1 -1
  227. package/build/lib/web/production/components/Charts/LineChart/LineChart.web.js +272 -15
  228. package/build/lib/web/production/components/Charts/LineChart/LineChart.web.js.map +1 -1
  229. package/build/lib/web/production/components/Charts/LineChart/useReferenceBand.js +195 -0
  230. package/build/lib/web/production/components/Charts/LineChart/useReferenceBand.js.map +1 -0
  231. package/build/lib/web/production/components/Charts/utils/nullBridgeUtils.js +175 -0
  232. package/build/lib/web/production/components/Charts/utils/nullBridgeUtils.js.map +1 -0
  233. package/build/lib/web/production/components/Charts/utils/referenceBandUtils.js +66 -0
  234. package/build/lib/web/production/components/Charts/utils/referenceBandUtils.js.map +1 -0
  235. package/build/lib/web/production/components/CounterInput/CounterInput.web.js +29 -5
  236. package/build/lib/web/production/components/CounterInput/CounterInput.web.js.map +1 -1
  237. package/build/lib/web/production/components/CounterInput/StyledCounterInput.js +20 -4
  238. package/build/lib/web/production/components/CounterInput/StyledCounterInput.js.map +1 -1
  239. package/build/lib/web/production/components/CounterInput/token.js +6 -1
  240. package/build/lib/web/production/components/CounterInput/token.js.map +1 -1
  241. package/build/lib/web/production/components/DatePicker/BaseDatePicker.web.js +20 -0
  242. package/build/lib/web/production/components/DatePicker/BaseDatePicker.web.js.map +1 -1
  243. package/build/lib/web/production/components/DatePicker/Calendar.web.js +9 -2
  244. package/build/lib/web/production/components/DatePicker/Calendar.web.js.map +1 -1
  245. package/build/lib/web/production/components/DatePicker/utils.js +21 -1
  246. package/build/lib/web/production/components/DatePicker/utils.js.map +1 -1
  247. package/build/lib/web/production/components/Dropdown/Dropdown.js +4 -1
  248. package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
  249. package/build/lib/web/production/components/Dropdown/FilterChipSelectInput.web.js +20 -12
  250. package/build/lib/web/production/components/Dropdown/FilterChipSelectInput.web.js.map +1 -1
  251. package/build/lib/web/production/components/Dropdown/dropdownUtils.js +28 -2
  252. package/build/lib/web/production/components/Dropdown/dropdownUtils.js.map +1 -1
  253. package/build/lib/web/production/components/Dropdown/filterChipSelectInputUtils.js +15 -1
  254. package/build/lib/web/production/components/Dropdown/filterChipSelectInputUtils.js.map +1 -1
  255. package/build/lib/web/production/components/Dropdown/useDropdown.js +91 -5
  256. package/build/lib/web/production/components/Dropdown/useDropdown.js.map +1 -1
  257. package/build/lib/web/production/components/FloatingActionButton/FloatingActionButton.js +126 -0
  258. package/build/lib/web/production/components/FloatingActionButton/FloatingActionButton.js.map +1 -0
  259. package/build/lib/web/production/components/FloatingActionButton/FloatingActionButtonContainer.web.js +45 -0
  260. package/build/lib/web/production/components/FloatingActionButton/FloatingActionButtonContainer.web.js.map +1 -0
  261. package/build/lib/web/production/components/FloatingActionButton/index.js +2 -0
  262. package/build/lib/web/production/components/FloatingActionButton/index.js.map +1 -0
  263. package/build/lib/web/production/components/GenUI/GenUIComponents.web.js.map +1 -1
  264. package/build/lib/web/production/components/GenUI/GenUIContext.web.js +9 -1
  265. package/build/lib/web/production/components/GenUI/GenUIContext.web.js.map +1 -1
  266. package/build/lib/web/production/components/GenUI/GenUIProvider.web.js +17 -0
  267. package/build/lib/web/production/components/GenUI/GenUIProvider.web.js.map +1 -1
  268. package/build/lib/web/production/components/GenUI/GenUISchemaRenderer.web.js +31 -6
  269. package/build/lib/web/production/components/GenUI/GenUISchemaRenderer.web.js.map +1 -1
  270. package/build/lib/web/production/components/GenUI/index.js +1 -1
  271. package/build/lib/web/production/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js +44 -0
  272. package/build/lib/web/production/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js.map +1 -0
  273. package/build/lib/web/production/components/Icons/BookmarkFilledIcon/index.js +2 -0
  274. package/build/lib/web/production/components/Icons/BookmarkFilledIcon/index.js.map +1 -0
  275. package/build/lib/web/production/components/Icons/index.js +1 -0
  276. package/build/lib/web/production/components/Icons/index.js.map +1 -1
  277. package/build/lib/web/production/components/Input/OTPInput/OTPInput.js +3 -0
  278. package/build/lib/web/production/components/Input/OTPInput/OTPInput.js.map +1 -1
  279. package/build/lib/web/production/components/PopupArrow/PopupArrow.web.js +7 -1
  280. package/build/lib/web/production/components/PopupArrow/PopupArrow.web.js.map +1 -1
  281. package/build/lib/web/production/components/RollingText/RollingText.web.js +27 -20
  282. package/build/lib/web/production/components/RollingText/RollingText.web.js.map +1 -1
  283. package/build/lib/web/production/components/Spark/RzpGlass/RzpGlass.js +16 -7
  284. package/build/lib/web/production/components/Spark/RzpGlass/RzpGlass.js.map +1 -1
  285. package/build/lib/web/production/components/Spark/RzpGlass/RzpGlassMount.js +24 -6
  286. package/build/lib/web/production/components/Spark/RzpGlass/RzpGlassMount.js.map +1 -1
  287. package/build/lib/web/production/components/Spark/RzpGlass/presets.js +30 -1
  288. package/build/lib/web/production/components/Spark/RzpGlass/presets.js.map +1 -1
  289. package/build/lib/web/production/components/Spark/RzpGlass/rzpGlassShader.js +1 -1
  290. package/build/lib/web/production/components/Spark/RzpGlass/rzpGlassShader.js.map +1 -1
  291. package/build/lib/web/production/components/Spark/RzpGlass/utils.js +26 -10
  292. package/build/lib/web/production/components/Spark/RzpGlass/utils.js.map +1 -1
  293. package/build/lib/web/production/components/SpotlightPopoverTour/Tour.web.js +31 -18
  294. package/build/lib/web/production/components/SpotlightPopoverTour/Tour.web.js.map +1 -1
  295. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +14 -3
  296. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  297. package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js +23 -4
  298. package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
  299. package/build/lib/web/production/components/SpotlightPopoverTour/utils.js +58 -1
  300. package/build/lib/web/production/components/SpotlightPopoverTour/utils.js.map +1 -1
  301. package/build/lib/web/production/components/TreeView/StyledTreeViewRow.web.js +41 -0
  302. package/build/lib/web/production/components/TreeView/StyledTreeViewRow.web.js.map +1 -0
  303. package/build/lib/web/production/components/TreeView/TreeView.web.js +696 -0
  304. package/build/lib/web/production/components/TreeView/TreeView.web.js.map +1 -0
  305. package/build/lib/web/production/components/TreeView/TreeViewAnimator.web.js +184 -0
  306. package/build/lib/web/production/components/TreeView/TreeViewAnimator.web.js.map +1 -0
  307. package/build/lib/web/production/components/TreeView/TreeViewChevron.web.js +73 -0
  308. package/build/lib/web/production/components/TreeView/TreeViewChevron.web.js.map +1 -0
  309. package/build/lib/web/production/components/TreeView/TreeViewItem.web.js +295 -0
  310. package/build/lib/web/production/components/TreeView/TreeViewItem.web.js.map +1 -0
  311. package/build/lib/web/production/components/TreeView/TreeViewLoadMore.web.js +173 -0
  312. package/build/lib/web/production/components/TreeView/TreeViewLoadMore.web.js.map +1 -0
  313. package/build/lib/web/production/components/TreeView/componentIds.js +8 -0
  314. package/build/lib/web/production/components/TreeView/componentIds.js.map +1 -0
  315. package/build/lib/web/production/components/TreeView/index.web.js +4 -0
  316. package/build/lib/web/production/components/TreeView/index.web.js.map +1 -0
  317. package/build/lib/web/production/components/TreeView/treeViewUtils.js +475 -0
  318. package/build/lib/web/production/components/TreeView/treeViewUtils.js.map +1 -0
  319. package/build/lib/web/production/components/TreeView/useTreeView.js +24 -0
  320. package/build/lib/web/production/components/TreeView/useTreeView.js.map +1 -0
  321. package/build/lib/web/production/components/index.js +9 -2
  322. package/build/lib/web/production/components/index.js.map +1 -1
  323. package/build/lib/web/production/node_modules/es-toolkit/dist/array/flatten.js +1 -1
  324. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/array/flatten.js +1 -1
  325. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/array/sortBy.js +2 -2
  326. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/object/omit.js +2 -2
  327. package/build/lib/web/production/tokens/global/colors.js +2 -2
  328. package/build/lib/web/production/tokens/global/colors.js.map +1 -1
  329. package/build/lib/web/production/tokens/index.js +1 -0
  330. package/build/lib/web/production/tokens/index.js.map +1 -1
  331. package/build/lib/web/production/tokens/theme/bladeNeutralTheme.js +1439 -0
  332. package/build/lib/web/production/tokens/theme/bladeNeutralTheme.js.map +1 -0
  333. package/build/lib/web/production/tokens/theme/bladeTheme.js +48 -12
  334. package/build/lib/web/production/tokens/theme/bladeTheme.js.map +1 -1
  335. package/build/lib/web/production/tokens/theme/index.js +1 -0
  336. package/build/lib/web/production/tokens/theme/index.js.map +1 -1
  337. package/build/lib/web/production/tokens/theme/theme.js.map +1 -1
  338. package/build/lib/web/production/utils/componentZIndices.js +2 -0
  339. package/build/lib/web/production/utils/componentZIndices.js.map +1 -1
  340. package/build/lib/web/production/utils/metaAttribute/metaConstants.js +4 -0
  341. package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
  342. package/build/lib/web/production/utils/useControlledDropdownInput/useControlledDropdownInput.js +12 -4
  343. package/build/lib/web/production/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
  344. package/build/lib/web/production/utils/useTruncationTitle/useTruncationTitle.web.js +2 -2
  345. package/build/lib/web/production/utils/useTruncationTitle/useTruncationTitle.web.js.map +1 -1
  346. package/build/types/components/index.d.ts +557 -18
  347. package/build/types/components/index.native.d.ts +463 -16
  348. package/build/types/tokens/index.d.ts +11 -4
  349. package/build/types/tokens/index.native.d.ts +11 -4
  350. package/build/types/utils/index.d.ts +8 -3
  351. package/build/types/utils/index.native.d.ts +8 -3
  352. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"GenUIContext.native.js","sources":["../../../../../src/components/GenUI/GenUIContext.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport type { GenUIAction } from './types';\nimport { throwBladeError } from '~utils/logger';\n\ntype GenUIContextValue = any;\nconst GenUIContext = React.createContext<GenUIContextValue | null>(null);\n\n/**\n * Hook to access GenUI context\n * @throws Error if used outside GenUIProvider\n */\nconst useGenUI = (): GenUIContextValue => {\n throwBladeError({\n message: 'useGenUI is not yet implemented for React Native',\n moduleName: 'useGenUI',\n });\n return null;\n};\n\n/**\n * Hook to access action click handler (safe version that doesn't throw)\n */\nconst useGenUIAction = (): ((action: GenUIAction) => void) | undefined => {\n throwBladeError({\n message: 'useGenUIAction is not yet implemented for React Native',\n moduleName: 'useGenUIAction',\n });\n return undefined;\n};\n\nexport { GenUIContext, useGenUI, useGenUIAction };\nexport type { GenUIContextValue };\n"],"names":["GenUIContext","React","createContext","useGenUI","throwBladeError","message","moduleName","useGenUIAction","undefined"],"mappings":";;;;AAMM,IAAAA,YAAY,CAAGC,cAAK,CAACC,aAAa,CAA2B,IAAI,EAMjE,IAAAC,QAAQ,CAAG,SAAXA,QAAQA,EAA4B,CACxCC,eAAe,CAAC,CACdC,OAAO,CAAE,kDAAkD,CAC3DC,UAAU,CAAE,UACd,CAAC,CAAC,CACF,OAAW,IAAA,CACb,EAKM,IAAAC,cAAc,CAAG,SAAjBA,cAAcA,EAAsD,CACxEH,eAAe,CAAC,CACdC,OAAO,CAAE,wDAAwD,CACjEC,UAAU,CAAE,gBACd,CAAC,CAAC,CACF,OAAOE,SAAS,CAClB;;;;"}
1
+ {"version":3,"file":"GenUIContext.native.js","sources":["../../../../../src/components/GenUI/GenUIContext.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport type { GenUIAction } from './types';\nimport { throwBladeError } from '~utils/logger';\n\ntype GenUIContextValue = any;\nconst GenUIContext = React.createContext<GenUIContextValue | null>(null);\n\n/**\n * Hook to access GenUI context\n * @throws Error if used outside GenUIProvider\n */\nconst useGenUI = (): GenUIContextValue => {\n throwBladeError({\n message: 'useGenUI is not yet implemented for React Native',\n moduleName: 'useGenUI',\n });\n return null;\n};\n\n/**\n * Hook to access action click handler (safe version that doesn't throw)\n */\nconst useGenUIAction = (): ((action: GenUIAction) => void) | undefined => {\n throwBladeError({\n message: 'useGenUIAction is not yet implemented for React Native',\n moduleName: 'useGenUIAction',\n });\n return undefined;\n};\n\n/**\n * Hook to access the consumer-registered action slot registry (safe version that doesn't throw)\n */\nconst useGenUIComponentActions = (): undefined => {\n throwBladeError({\n message: 'useGenUIComponentActions is not yet implemented for React Native',\n moduleName: 'useGenUIComponentActions',\n });\n return undefined;\n};\n\nexport { GenUIContext, useGenUI, useGenUIAction, useGenUIComponentActions };\nexport type { GenUIContextValue };\n"],"names":["GenUIContext","React","createContext","useGenUI","throwBladeError","message","moduleName","useGenUIAction","undefined","useGenUIComponentActions"],"mappings":";;;;AAMM,IAAAA,YAAY,CAAGC,cAAK,CAACC,aAAa,CAA2B,IAAI,EAMjE,IAAAC,QAAQ,CAAG,SAAXA,QAAQA,EAA4B,CACxCC,eAAe,CAAC,CACdC,OAAO,CAAE,kDAAkD,CAC3DC,UAAU,CAAE,UACd,CAAC,CAAC,CACF,OAAO,IAAI,CACb,EAKM,IAAAC,cAAc,CAAG,SAAjBA,cAAcA,EAAsD,CACxEH,eAAe,CAAC,CACdC,OAAO,CAAE,wDAAwD,CACjEC,UAAU,CAAE,gBACd,CAAC,CAAC,CACF,OAAOE,SAAS,CAClB,EAKM,IAAAC,wBAAwB,CAAG,SAA3BA,wBAAwBA,EAAoB,CAChDL,eAAe,CAAC,CACdC,OAAO,CAAE,kEAAkE,CAC3EC,UAAU,CAAE,0BACd,CAAC,CAAC,CACF,OAAOE,SAAS,CAClB;;;;"}
@@ -1,4 +1,4 @@
1
1
  export { GenUIProvider } from './GenUIProvider.native.js';
2
- export { useGenUI, useGenUIAction } from './GenUIContext.native.js';
2
+ export { useGenUI, useGenUIAction, useGenUIComponentActions } from './GenUIContext.native.js';
3
3
  export { GenUISchemaRenderer } from './GenUISchemaRenderer.native.js';
4
4
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,14 @@
1
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
+ import '../_Svg/index.js';
3
+ import '../useIconProps/index.js';
4
+ import '../../../utils/assignWithoutSideEffects/index.js';
5
+ import { jsx } from 'react/jsx-runtime';
6
+ import useIconProps from '../useIconProps/useIconProps.js';
7
+ import Svg from '../_Svg/Svg/Svg.native.js';
8
+ import Path from '../_Svg/Path/Path.native.js';
9
+ import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
10
+
11
+ var _excluded=["size","color"];var _this=undefined,_jsxFileName="/home/runner/work/blade/blade/packages/blade/src/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.tsx";var _BookmarkFilledIcon=function _BookmarkFilledIcon(_ref){var size=_ref.size,color=_ref.color,styledProps=_objectWithoutProperties(_ref,_excluded);var _useIconProps=useIconProps({size:size,color:color}),height=_useIconProps.height,width=_useIconProps.width,iconColor=_useIconProps.iconColor;return jsx(Svg,Object.assign({},styledProps,{width:width,height:height,viewBox:"0 0 24 24",fill:"none",children:jsx(Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M4 5C4 3.34315 5.34315 2 7 2H17C18.6569 2 20 3.34315 20 5V21C20 21.3746 19.7907 21.7178 19.4576 21.8892C19.1245 22.0606 18.7236 22.0315 18.4188 21.8137L12 17.2289L5.58124 21.8137C5.27642 22.0315 4.87549 22.0606 4.54242 21.8892C4.20935 21.7178 4 21.3746 4 21V5Z",fill:iconColor})}));};var BookmarkFilledIcon=assignWithoutSideEffects(_BookmarkFilledIcon,{componentId:'BookmarkFilledIcon'});
12
+
13
+ export { BookmarkFilledIcon as default };
14
+ //# sourceMappingURL=BookmarkFilledIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BookmarkFilledIcon.js","sources":["../../../../../../src/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.tsx"],"sourcesContent":["import { Svg, Path } from '../_Svg';\nimport type { IconComponent } from '..';\nimport useIconProps from '../useIconProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\nconst _BookmarkFilledIcon: IconComponent = ({ size, color, ...styledProps }) => {\n const { height, width, iconColor } = useIconProps({ size, color });\n\n return (\n <Svg {...styledProps} width={width} height={height} viewBox=\"0 0 24 24\" fill=\"none\">\n <Path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M4 5C4 3.34315 5.34315 2 7 2H17C18.6569 2 20 3.34315 20 5V21C20 21.3746 19.7907 21.7178 19.4576 21.8892C19.1245 22.0606 18.7236 22.0315 18.4188 21.8137L12 17.2289L5.58124 21.8137C5.27642 22.0315 4.87549 22.0606 4.54242 21.8892C4.20935 21.7178 4 21.3746 4 21V5Z\"\n fill={iconColor}\n />\n </Svg>\n );\n};\n\nconst BookmarkFilledIcon = assignWithoutSideEffects(_BookmarkFilledIcon, {\n componentId: 'BookmarkFilledIcon',\n});\n\nexport default BookmarkFilledIcon;\n"],"names":["this","_BookmarkFilledIcon","_ref","size","color","styledProps","_objectWithoutProperties","_excluded","_useIconProps","useIconProps","height","width","iconColor","_jsx","Svg","Object","assign","viewBox","fill","children","Path","fillRule","clipRule","d","BookmarkFilledIcon","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,MAAA,CAAA,OAAA,CAAA,CAAA,IAAA,KAAA,CAAAA,SAAA,CAAA,YAAA,CAAA,6GAAA,CAKA,IAAMC,mBAAkC,CAAG,SAArCA,mBAAkCA,CAAAC,IAAA,CAAwC,CAAA,IAAlCC,IAAI,CAAAD,IAAA,CAAJC,IAAI,CAAEC,KAAK,CAAAF,IAAA,CAALE,KAAK,CAAKC,WAAW,CAAAC,wBAAA,CAAAJ,IAAA,CAAAK,SAAA,CACvE,CAAA,IAAAC,aAAA,CAAqCC,YAAY,CAAC,CAAEN,IAAI,CAAJA,IAAI,CAAEC,KAAK,CAALA,KAAM,CAAC,CAAC,CAA1DM,MAAM,CAAAF,aAAA,CAANE,MAAM,CAAEC,KAAK,CAAAH,aAAA,CAALG,KAAK,CAAEC,SAAS,CAAAJ,aAAA,CAATI,SAAS,CAEhC,OACEC,GAAA,CAACC,GAAG,CAAAC,MAAA,CAAAC,MAAA,CAAA,EAAA,CAAKX,WAAW,CAAA,CAAEM,KAAK,CAAEA,KAAM,CAACD,MAAM,CAAEA,MAAO,CAACO,OAAO,CAAC,WAAW,CAACC,IAAI,CAAC,MAAM,CAAAC,QAAA,CACjFN,GAAA,CAACO,IAAI,CACHC,CAAAA,QAAQ,CAAC,SAAS,CAClBC,QAAQ,CAAC,SAAS,CAClBC,CAAC,CAAC,sQAAsQ,CACxQL,IAAI,CAAEN,SAAU,CACjB,CAAC,CAAA,CACC,CAAC,CAEV,CAAC,CAEK,IAAAY,kBAAkB,CAAGC,wBAAwB,CAACxB,mBAAmB,CAAE,CACvEyB,WAAW,CAAE,oBACf,CAAC;;;;"}
@@ -0,0 +1,2 @@
1
+ export { default } from './BookmarkFilledIcon.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -66,6 +66,7 @@ import './BillMeIcon/index.js';
66
66
  import './BluetoothIcon/index.js';
67
67
  import './BoldIcon/index.js';
68
68
  import './BookIcon/index.js';
69
+ import './BookmarkFilledIcon/index.js';
69
70
  import './BookmarkIcon/index.js';
70
71
  import './BoxIcon/index.js';
71
72
  import './BriefcaseIcon/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -19,7 +19,7 @@ import { BaseBox } from '../../Box/BaseBox/BaseBox.native.js';
19
19
  import { Text } from '../../Typography/Text/Text.js';
20
20
  import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
21
21
 
22
- var _excluded=["name","isRequired","isDisabled","maxCharacters","handleOnFocus","handleOnChange","handleOnBlur","handleOnSubmit","handleOnInput","handleOnKeyDown","handleOnClick","keyboardType","keyboardReturnKeyType","autoCompleteSuggestionType","accessibilityProps","currentInteraction","setCurrentInteraction","type","numberOfLines","autoGrowMaxHeight","isTextArea","hasPopup","shouldIgnoreBlurAnimation","autoCapitalize","as","$size","valueSuffix"];var _this=undefined,_jsxFileName="/home/runner/work/blade/blade/packages/blade/src/components/Input/BaseInput/StyledBaseInput.native.tsx";var autoCompleteSuggestionTypeAndroid={none:'off',name:'name',email:'email',username:'username',password:'password',newPassword:'password-new',oneTimeCode:'sms-otp',telephone:'tel',postalCode:'postal-code',countryName:'postal-address-country',creditCardNumber:'cc-number',creditCardCSC:'cc-csc',creditCardExpiry:'cc-exp',creditCardExpiryMonth:'cc-exp-month',creditCardExpiryYear:'cc-exp-year'};var autoCompleteSuggestionTypeIOS={none:'none',name:'name',email:'emailAddress',username:'username',password:'password',newPassword:'newPassword',oneTimeCode:'oneTimeCode',telephone:'telephoneNumber',postalCode:'postalCode',countryName:'countryName',creditCardNumber:'creditCardNumber',creditCardCSC:'none',creditCardExpiry:'none',creditCardExpiryMonth:'none',creditCardExpiryYear:'none'};var KeyboardTypeToNativeValuesMap={text:'default',search:'default',telephone:'phone-pad',email:'email-address',url:'url',decimal:'decimal-pad'};var getInputHeight=function getInputHeight(_ref){var isTextArea=_ref.isTextArea,hasTags=_ref.hasTags,numberOfLines=_ref.numberOfLines,isDropdownTrigger=_ref.isDropdownTrigger,size$1=_ref.size,autoGrowMaxHeight=_ref.autoGrowMaxHeight;if(isTextArea){if(autoGrowMaxHeight){return undefined;}var lines=isDropdownTrigger?1:numberOfLines!=null?numberOfLines:0;return `${baseInputHeight[size$1]*lines}px`;}if(hasTags){return undefined;}return makeSize(size[baseInputHeight[size$1]]);};var getRNInputStyles=function getRNInputStyles(props){var _props$numberOfLines;return Object.assign({},getBaseInputStyles({theme:props.theme,isFocused:props.isFocused,isDisabled:!props.editable,validationState:props.validationState,leadingIcon:props.leadingIcon,prefix:props.prefix,trailingInteractionElement:props.trailingInteractionElement,leadingInteractionElement:props.leadingInteractionElement,suffix:props.suffix,trailingIcon:props.trailingIcon,isTextArea:props.isTextArea,hasTags:props.hasTags,isDropdownTrigger:props.isDropdownTrigger,size:props.$size,padding:props.$padding,valueComponentType:props.valueComponentType,isTableInputCell:props.isTableInputCell}),{lineHeight:Platform.select({android:makeSize(props.theme.typography.lineHeights[100]),ios:undefined}),textAlignVertical:props.isTextArea?'top':'center'},props.isTextArea?{}:{paddingTop:0,paddingBottom:0,height:undefined,minHeight:undefined},props.isTextArea||props.hasTags?Object.assign({height:getInputHeight({isTextArea:props.isTextArea,hasTags:props.hasTags,numberOfLines:props.numberOfLines,isDropdownTrigger:props.isDropdownTrigger,size:props.$size,autoGrowMaxHeight:props.$autoGrowMaxHeight})},props.isTextArea&&props.$autoGrowMaxHeight?{minHeight:`${baseInputHeight[props.$size]*(props.isDropdownTrigger?1:(_props$numberOfLines=props.numberOfLines)!=null?_props$numberOfLines:1)}px`}:{}):{});};var StyledNativeBaseInput=styled.TextInput(function(_ref2){var id=_ref2.id,isFocused=_ref2.isFocused,theme=_ref2.theme,editable=_ref2.editable,validationState=_ref2.validationState,leadingIcon=_ref2.leadingIcon,prefix=_ref2.prefix,trailingInteractionElement=_ref2.trailingInteractionElement,leadingInteractionElement=_ref2.leadingInteractionElement,suffix=_ref2.suffix,trailingIcon=_ref2.trailingIcon,isTextArea=_ref2.isTextArea,numberOfLines=_ref2.numberOfLines,$autoGrowMaxHeight=_ref2.$autoGrowMaxHeight,isDropdownTrigger=_ref2.isDropdownTrigger,hasTags=_ref2.hasTags,$size=_ref2.$size,$padding=_ref2.$padding,isTableInputCell=_ref2.isTableInputCell,valueComponentType=_ref2.valueComponentType;return getRNInputStyles({id:id,isFocused:isFocused,theme:theme,editable:editable,validationState:validationState,leadingIcon:leadingIcon,prefix:prefix,trailingInteractionElement:trailingInteractionElement,leadingInteractionElement:leadingInteractionElement,suffix:suffix,trailingIcon:trailingIcon,isTextArea:isTextArea,numberOfLines:numberOfLines,$autoGrowMaxHeight:$autoGrowMaxHeight,hasTags:hasTags,isDropdownTrigger:isDropdownTrigger,$size:$size,$padding:$padding,valueComponentType:valueComponentType,isTableInputCell:isTableInputCell});});var StyledNativeBaseButton=styled.TouchableOpacity(function(_ref3){var id=_ref3.id,isFocused=_ref3.isFocused,theme=_ref3.theme,editable=_ref3.editable,validationState=_ref3.validationState,leadingIcon=_ref3.leadingIcon,prefix=_ref3.prefix,trailingInteractionElement=_ref3.trailingInteractionElement,leadingInteractionElement=_ref3.leadingInteractionElement,suffix=_ref3.suffix,trailingIcon=_ref3.trailingIcon,isTextArea=_ref3.isTextArea,numberOfLines=_ref3.numberOfLines,$autoGrowMaxHeight=_ref3.$autoGrowMaxHeight,isDropdownTrigger=_ref3.isDropdownTrigger,hasTags=_ref3.hasTags,$size=_ref3.$size,$padding=_ref3.$padding,isTableInputCell=_ref3.isTableInputCell,valueComponentType=_ref3.valueComponentType;return Object.assign({},getRNInputStyles({id:id,isFocused:isFocused,theme:theme,editable:editable,validationState:validationState,leadingIcon:leadingIcon,prefix:prefix,trailingInteractionElement:trailingInteractionElement,leadingInteractionElement:leadingInteractionElement,suffix:suffix,trailingIcon:trailingIcon,isTextArea:isTextArea,numberOfLines:numberOfLines,$autoGrowMaxHeight:$autoGrowMaxHeight,isDropdownTrigger:isDropdownTrigger,hasTags:hasTags,$size:$size,$padding:$padding,valueComponentType:valueComponentType,isTableInputCell:isTableInputCell}));});var _StyledBaseInput=function _StyledBaseInput(_ref4,ref){var _props$textAlign;var name=_ref4.name,isRequired=_ref4.isRequired,isDisabled=_ref4.isDisabled,maxCharacters=_ref4.maxCharacters,handleOnFocus=_ref4.handleOnFocus,handleOnChange=_ref4.handleOnChange,handleOnBlur=_ref4.handleOnBlur,handleOnSubmit=_ref4.handleOnSubmit,handleOnInput=_ref4.handleOnInput,handleOnKeyDown=_ref4.handleOnKeyDown,handleOnClick=_ref4.handleOnClick,_ref4$keyboardType=_ref4.keyboardType,keyboardType=_ref4$keyboardType===void 0?'text':_ref4$keyboardType,keyboardReturnKeyType=_ref4.keyboardReturnKeyType,autoCompleteSuggestionType=_ref4.autoCompleteSuggestionType,accessibilityProps=_ref4.accessibilityProps,currentInteraction=_ref4.currentInteraction,setCurrentInteraction=_ref4.setCurrentInteraction,type=_ref4.type,numberOfLines=_ref4.numberOfLines,autoGrowMaxHeight=_ref4.autoGrowMaxHeight,isTextArea=_ref4.isTextArea,hasPopup=_ref4.hasPopup,shouldIgnoreBlurAnimation=_ref4.shouldIgnoreBlurAnimation,autoCapitalize=_ref4.autoCapitalize,renderAs=_ref4.as,$size=_ref4.$size,valueSuffix=_ref4.valueSuffix,props=_objectWithoutProperties(_ref4,_excluded);var buttonValue=props.value?props.value:props.placeholder;var _useTheme=useTheme(),theme=_useTheme.theme;var isAutoGrowing=Boolean(isTextArea&&autoGrowMaxHeight);var minAutoGrowHeight=baseInputHeight[$size]*(props.isDropdownTrigger?1:numberOfLines!=null?numberOfLines:1);var _React$useState=React__default.useState(minAutoGrowHeight),_React$useState2=_slicedToArray(_React$useState,2),autoGrowHeight=_React$useState2[0],setAutoGrowHeight=_React$useState2[1];React__default.useEffect(function(){if(!isAutoGrowing){return;}setAutoGrowHeight(minAutoGrowHeight);},[isAutoGrowing,minAutoGrowHeight]);var commonProps={onBlur:function onBlur(){if(!shouldIgnoreBlurAnimation){setCurrentInteraction('default');}},isFocused:currentInteraction==='focus'};return renderAs==='button'?jsx(StyledNativeBaseButton,Object.assign({ref:ref,onPress:function onPress(){handleOnClick==null?void 0:handleOnClick({name:name,value:props.value});},onFocus:function onFocus(){handleOnFocus==null?void 0:handleOnFocus({name:name,value:props.value});setCurrentInteraction('focus');},as:undefined,$size:$size},commonProps,props,accessibilityProps,{children:jsxs(BaseBox,{display:"flex",flexDirection:"row",alignItems:"center",gap:"spacing.3",width:"100%",children:[jsx(Text,{color:props.value&&!isDisabled?'interactive.text.gray.normal':'surface.text.gray.disabled',truncateAfterLines:1,textAlign:(_props$textAlign=props.textAlign)!=null?_props$textAlign:'left',size:$size,children:buttonValue}),valueSuffix]})})):jsx(StyledNativeBaseInput,Object.assign({ref:ref,multiline:isTextArea,numberOfLines:numberOfLines,editable:!isDisabled,maxLength:maxCharacters,placeholderTextColor:theme.colors.surface.text.gray.disabled,onFocus:function onFocus(event){handleOnFocus==null?void 0:handleOnFocus({name:name,value:event==null?void 0:event.nativeEvent.text});handleOnClick==null?void 0:handleOnClick({name:name,value:event==null?void 0:event.nativeEvent.text});setCurrentInteraction('focus');},onChangeText:function onChangeText(text){handleOnChange==null?void 0:handleOnChange({name:name,value:text});handleOnInput==null?void 0:handleOnInput({name:name,value:text});},onEndEditing:function onEndEditing(event){return handleOnBlur==null?void 0:handleOnBlur({name:name,value:event==null?void 0:event.nativeEvent.text});},onSubmitEditing:function onSubmitEditing(event){return handleOnSubmit==null?void 0:handleOnSubmit({name:name,value:event==null?void 0:event.nativeEvent.text});},onKeyPress:function onKeyPress(event){handleOnKeyDown==null?void 0:handleOnKeyDown({name:name,key:event==null?void 0:event.nativeEvent.key,event:event});},onContentSizeChange:isAutoGrowing&&autoGrowMaxHeight?function(event){var nextHeight=Math.min(Math.max(event.nativeEvent.contentSize.height,minAutoGrowHeight),autoGrowMaxHeight);setAutoGrowHeight(nextHeight);}:undefined,keyboardType:KeyboardTypeToNativeValuesMap[keyboardType],returnKeyType:keyboardReturnKeyType,autoCompleteType:autoCompleteSuggestionType?autoCompleteSuggestionTypeAndroid[autoCompleteSuggestionType]:undefined,secureTextEntry:type==='password',isTextArea:isTextArea,$autoGrowMaxHeight:isAutoGrowing?autoGrowMaxHeight:undefined,textContentType:autoCompleteSuggestionType?autoCompleteSuggestionTypeIOS[autoCompleteSuggestionType]:undefined,autoCapitalize:autoCapitalize,includeFontPadding:false,$size:$size,scrollEnabled:isAutoGrowing?autoGrowHeight>=autoGrowMaxHeight:undefined},commonProps,props,accessibilityProps,{style:isAutoGrowing?{height:autoGrowHeight,maxHeight:autoGrowMaxHeight}:undefined}));};var StyledBaseInput=assignWithoutSideEffects(React__default.forwardRef(_StyledBaseInput),{displayName:'StyledBaseInput'});
22
+ var _excluded=["name","isRequired","isDisabled","maxCharacters","handleOnFocus","handleOnChange","handleOnBlur","handleOnSubmit","handleOnInput","handleOnKeyDown","handleOnClick","keyboardType","keyboardReturnKeyType","autoCompleteSuggestionType","accessibilityProps","currentInteraction","setCurrentInteraction","type","numberOfLines","autoGrowMaxHeight","isTextArea","hasPopup","shouldIgnoreBlurAnimation","autoCapitalize","as","$size","valueSuffix"];var _this=undefined,_jsxFileName="/home/runner/work/blade/blade/packages/blade/src/components/Input/BaseInput/StyledBaseInput.native.tsx";var autoCompleteSuggestionTypeAndroid={none:'off',name:'name',email:'email',username:'username',password:'password',newPassword:'password-new',oneTimeCode:'sms-otp',telephone:'tel',postalCode:'postal-code',countryName:'postal-address-country',creditCardNumber:'cc-number',creditCardCSC:'cc-csc',creditCardExpiry:'cc-exp',creditCardExpiryMonth:'cc-exp-month',creditCardExpiryYear:'cc-exp-year'};var autoCompleteSuggestionTypeIOS={none:'none',name:'name',email:'emailAddress',username:'username',password:'password',newPassword:'newPassword',oneTimeCode:'oneTimeCode',telephone:'telephoneNumber',postalCode:'postalCode',countryName:'countryName',creditCardNumber:'creditCardNumber',creditCardCSC:'none',creditCardExpiry:'none',creditCardExpiryMonth:'none',creditCardExpiryYear:'none'};var KeyboardTypeToNativeValuesMap={text:'default',search:'default',telephone:'phone-pad',email:'email-address',url:'url',decimal:'decimal-pad'};var getInputHeight=function getInputHeight(_ref){var isTextArea=_ref.isTextArea,hasTags=_ref.hasTags,numberOfLines=_ref.numberOfLines,isDropdownTrigger=_ref.isDropdownTrigger,size$1=_ref.size,autoGrowMaxHeight=_ref.autoGrowMaxHeight;if(isTextArea){if(autoGrowMaxHeight){return undefined;}var lines=isDropdownTrigger?1:numberOfLines!=null?numberOfLines:0;return `${baseInputHeight[size$1]*lines}px`;}if(hasTags){return undefined;}return makeSize(size[baseInputHeight[size$1]]);};var getRNInputStyles=function getRNInputStyles(props){var _props$numberOfLines;return Object.assign({},getBaseInputStyles({theme:props.theme,isFocused:props.isFocused,isDisabled:!props.editable,validationState:props.validationState,leadingIcon:props.leadingIcon,prefix:props.prefix,trailingInteractionElement:props.trailingInteractionElement,leadingInteractionElement:props.leadingInteractionElement,suffix:props.suffix,trailingIcon:props.trailingIcon,isTextArea:props.isTextArea,hasTags:props.hasTags,isDropdownTrigger:props.isDropdownTrigger,size:props.$size,padding:props.$padding,valueComponentType:props.valueComponentType,isTableInputCell:props.isTableInputCell}),{lineHeight:Platform.select({android:makeSize(props.theme.typography.lineHeights[100]),ios:undefined}),textAlignVertical:props.isTextArea?'top':'center'},props.isTextArea?{}:{paddingTop:0,paddingBottom:0,height:undefined,minHeight:undefined},props.isTextArea||props.hasTags?Object.assign({height:getInputHeight({isTextArea:props.isTextArea,hasTags:props.hasTags,numberOfLines:props.numberOfLines,isDropdownTrigger:props.isDropdownTrigger,size:props.$size,autoGrowMaxHeight:props.$autoGrowMaxHeight})},props.isTextArea&&props.$autoGrowMaxHeight?{minHeight:`${baseInputHeight[props.$size]*(props.isDropdownTrigger?1:(_props$numberOfLines=props.numberOfLines)!=null?_props$numberOfLines:1)}px`}:{}):{});};var StyledNativeBaseInput=styled.TextInput(function(_ref2){var id=_ref2.id,isFocused=_ref2.isFocused,theme=_ref2.theme,editable=_ref2.editable,validationState=_ref2.validationState,leadingIcon=_ref2.leadingIcon,prefix=_ref2.prefix,trailingInteractionElement=_ref2.trailingInteractionElement,leadingInteractionElement=_ref2.leadingInteractionElement,suffix=_ref2.suffix,trailingIcon=_ref2.trailingIcon,isTextArea=_ref2.isTextArea,numberOfLines=_ref2.numberOfLines,$autoGrowMaxHeight=_ref2.$autoGrowMaxHeight,isDropdownTrigger=_ref2.isDropdownTrigger,hasTags=_ref2.hasTags,$size=_ref2.$size,$padding=_ref2.$padding,isTableInputCell=_ref2.isTableInputCell,valueComponentType=_ref2.valueComponentType;return getRNInputStyles({id:id,isFocused:isFocused,theme:theme,editable:editable,validationState:validationState,leadingIcon:leadingIcon,prefix:prefix,trailingInteractionElement:trailingInteractionElement,leadingInteractionElement:leadingInteractionElement,suffix:suffix,trailingIcon:trailingIcon,isTextArea:isTextArea,numberOfLines:numberOfLines,$autoGrowMaxHeight:$autoGrowMaxHeight,hasTags:hasTags,isDropdownTrigger:isDropdownTrigger,$size:$size,$padding:$padding,valueComponentType:valueComponentType,isTableInputCell:isTableInputCell});});var StyledNativeBaseButton=styled.TouchableOpacity(function(_ref3){var id=_ref3.id,isFocused=_ref3.isFocused,theme=_ref3.theme,editable=_ref3.editable,validationState=_ref3.validationState,leadingIcon=_ref3.leadingIcon,prefix=_ref3.prefix,trailingInteractionElement=_ref3.trailingInteractionElement,leadingInteractionElement=_ref3.leadingInteractionElement,suffix=_ref3.suffix,trailingIcon=_ref3.trailingIcon,isTextArea=_ref3.isTextArea,numberOfLines=_ref3.numberOfLines,$autoGrowMaxHeight=_ref3.$autoGrowMaxHeight,isDropdownTrigger=_ref3.isDropdownTrigger,hasTags=_ref3.hasTags,$size=_ref3.$size,$padding=_ref3.$padding,isTableInputCell=_ref3.isTableInputCell,valueComponentType=_ref3.valueComponentType;return Object.assign({},getRNInputStyles({id:id,isFocused:isFocused,theme:theme,editable:editable,validationState:validationState,leadingIcon:leadingIcon,prefix:prefix,trailingInteractionElement:trailingInteractionElement,leadingInteractionElement:leadingInteractionElement,suffix:suffix,trailingIcon:trailingIcon,isTextArea:isTextArea,numberOfLines:numberOfLines,$autoGrowMaxHeight:$autoGrowMaxHeight,isDropdownTrigger:isDropdownTrigger,hasTags:hasTags,$size:$size,$padding:$padding,valueComponentType:valueComponentType,isTableInputCell:isTableInputCell}));});var _StyledBaseInput=function _StyledBaseInput(_ref4,ref){var _props$textAlign;var name=_ref4.name,isRequired=_ref4.isRequired,isDisabled=_ref4.isDisabled,maxCharacters=_ref4.maxCharacters,handleOnFocus=_ref4.handleOnFocus,handleOnChange=_ref4.handleOnChange,handleOnBlur=_ref4.handleOnBlur,handleOnSubmit=_ref4.handleOnSubmit,handleOnInput=_ref4.handleOnInput,handleOnKeyDown=_ref4.handleOnKeyDown,handleOnClick=_ref4.handleOnClick,_ref4$keyboardType=_ref4.keyboardType,keyboardType=_ref4$keyboardType===void 0?'text':_ref4$keyboardType,keyboardReturnKeyType=_ref4.keyboardReturnKeyType,autoCompleteSuggestionType=_ref4.autoCompleteSuggestionType,accessibilityProps=_ref4.accessibilityProps,currentInteraction=_ref4.currentInteraction,setCurrentInteraction=_ref4.setCurrentInteraction,type=_ref4.type,numberOfLines=_ref4.numberOfLines,autoGrowMaxHeight=_ref4.autoGrowMaxHeight,isTextArea=_ref4.isTextArea,hasPopup=_ref4.hasPopup,shouldIgnoreBlurAnimation=_ref4.shouldIgnoreBlurAnimation,autoCapitalize=_ref4.autoCapitalize,renderAs=_ref4.as,$size=_ref4.$size,valueSuffix=_ref4.valueSuffix,props=_objectWithoutProperties(_ref4,_excluded);var buttonValue=props.value?props.value:props.placeholder;var _useTheme=useTheme(),theme=_useTheme.theme;var isAutoGrowing=Boolean(isTextArea&&autoGrowMaxHeight);var minAutoGrowHeight=baseInputHeight[$size]*(props.isDropdownTrigger?1:numberOfLines!=null?numberOfLines:1);var _React$useState=React__default.useState(minAutoGrowHeight),_React$useState2=_slicedToArray(_React$useState,2),autoGrowHeight=_React$useState2[0],setAutoGrowHeight=_React$useState2[1];React__default.useEffect(function(){if(!isAutoGrowing){return;}setAutoGrowHeight(minAutoGrowHeight);},[isAutoGrowing,minAutoGrowHeight]);var commonProps={onBlur:function onBlur(){if(!shouldIgnoreBlurAnimation){setCurrentInteraction('default');}},isFocused:currentInteraction==='focus'};return renderAs==='button'?jsx(StyledNativeBaseButton,Object.assign({ref:ref,onPress:function onPress(){handleOnClick==null?void 0:handleOnClick({name:name,value:props.value});},onFocus:function onFocus(){handleOnFocus==null?void 0:handleOnFocus({name:name,value:props.value});setCurrentInteraction('focus');},as:undefined,$size:$size},commonProps,props,accessibilityProps,{children:jsxs(BaseBox,{display:"flex",flexDirection:"row",alignItems:"center",gap:"spacing.3",width:"100%",children:[jsx(Text,{color:props.value&&!isDisabled?'interactive.text.gray.normal':'surface.text.gray.disabled',truncateAfterLines:1,textAlign:(_props$textAlign=props.textAlign)!=null?_props$textAlign:'left',size:$size,children:buttonValue}),valueSuffix]})})):jsx(StyledNativeBaseInput,Object.assign({ref:ref,multiline:isTextArea,numberOfLines:numberOfLines,editable:!isDisabled,maxLength:maxCharacters,placeholderTextColor:theme.colors.surface.text.gray.disabled,onFocus:function onFocus(event){handleOnFocus==null?void 0:handleOnFocus({name:name,value:event==null?void 0:event.nativeEvent.text});handleOnClick==null?void 0:handleOnClick({name:name,value:event==null?void 0:event.nativeEvent.text});setCurrentInteraction('focus');},onChangeText:function onChangeText(text){handleOnChange==null?void 0:handleOnChange({name:name,value:text});handleOnInput==null?void 0:handleOnInput({name:name,value:text});},onEndEditing:function onEndEditing(event){return handleOnBlur==null?void 0:handleOnBlur({name:name,value:event==null?void 0:event.nativeEvent.text});},onSubmitEditing:function onSubmitEditing(event){return handleOnSubmit==null?void 0:handleOnSubmit({name:name,value:event==null?void 0:event.nativeEvent.text});},onKeyPress:function onKeyPress(event){handleOnKeyDown==null?void 0:handleOnKeyDown({name:name,key:event==null?void 0:event.nativeEvent.key,event:event});},onContentSizeChange:isAutoGrowing&&autoGrowMaxHeight?function(event){var nextHeight=Math.min(Math.max(event.nativeEvent.contentSize.height,minAutoGrowHeight),autoGrowMaxHeight);setAutoGrowHeight(nextHeight);}:undefined,keyboardType:KeyboardTypeToNativeValuesMap[keyboardType],returnKeyType:keyboardReturnKeyType,autoComplete:autoCompleteSuggestionType?autoCompleteSuggestionTypeAndroid[autoCompleteSuggestionType]:undefined,secureTextEntry:type==='password',isTextArea:isTextArea,$autoGrowMaxHeight:isAutoGrowing?autoGrowMaxHeight:undefined,textContentType:autoCompleteSuggestionType?autoCompleteSuggestionTypeIOS[autoCompleteSuggestionType]:undefined,autoCapitalize:autoCapitalize,includeFontPadding:false,$size:$size,scrollEnabled:isAutoGrowing?autoGrowHeight>=autoGrowMaxHeight:undefined},commonProps,props,accessibilityProps,{style:isAutoGrowing?{height:autoGrowHeight,maxHeight:autoGrowMaxHeight}:undefined}));};var StyledBaseInput=assignWithoutSideEffects(React__default.forwardRef(_StyledBaseInput),{displayName:'StyledBaseInput'});
23
23
 
24
24
  export { StyledBaseInput };
25
25
  //# sourceMappingURL=StyledBaseInput.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StyledBaseInput.native.js","sources":["../../../../../../src/components/Input/BaseInput/StyledBaseInput.native.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components/native';\nimport type { CSSObject, ThemeProps, DefaultTheme } from 'styled-components';\nimport type {\n TextInputProps,\n TouchableHighlight,\n TouchableHighlightProps,\n GestureResponderEvent,\n TextInput,\n} from 'react-native';\nimport { Platform as RNPlatform } from 'react-native';\nimport type { BaseInputProps } from './BaseInput';\nimport type { StyledBaseInputProps } from './types';\nimport { getBaseInputStyles } from './baseInputStyles';\nimport { baseInputHeight } from './baseInputTokens';\nimport { Text } from '~components/Typography';\nimport { useTheme } from '~components/BladeProvider';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { size as sizeToken } from '~tokens/global';\nimport { makeSize } from '~utils/makeSize';\nimport type { Platform } from '~utils';\nimport BaseBox from '~components/Box/BaseBox';\n\ntype StyledComponentAutoCompleteAndroid =\n | 'off'\n | 'name'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-number'\n | 'email'\n | 'username'\n | 'password'\n | 'postal-code'\n | 'tel'\n | undefined;\n\nconst autoCompleteSuggestionTypeAndroid = {\n none: 'off',\n name: 'name',\n email: 'email',\n username: 'username',\n password: 'password',\n newPassword: 'password-new',\n oneTimeCode: 'sms-otp',\n telephone: 'tel',\n postalCode: 'postal-code',\n countryName: 'postal-address-country',\n creditCardNumber: 'cc-number',\n creditCardCSC: 'cc-csc',\n creditCardExpiry: 'cc-exp',\n creditCardExpiryMonth: 'cc-exp-month',\n creditCardExpiryYear: 'cc-exp-year',\n} as const;\n\nconst autoCompleteSuggestionTypeIOS = {\n none: 'none',\n name: 'name',\n email: 'emailAddress',\n username: 'username',\n password: 'password',\n newPassword: 'newPassword',\n oneTimeCode: 'oneTimeCode',\n telephone: 'telephoneNumber',\n postalCode: 'postalCode',\n countryName: 'countryName',\n creditCardNumber: 'creditCardNumber',\n creditCardCSC: 'none',\n creditCardExpiry: 'none',\n creditCardExpiryMonth: 'none',\n creditCardExpiryYear: 'none',\n} as const;\n\nconst KeyboardTypeToNativeValuesMap = {\n text: 'default',\n search: 'default',\n telephone: 'phone-pad',\n email: 'email-address',\n url: 'url',\n decimal: 'decimal-pad',\n};\n\ntype StyledComponentInputProps = Omit<\n StyledBaseInputProps,\n 'accessibilityProps' | 'setCurrentInteraction' | 'currentInteraction' | 'autoGrowMaxHeight'\n> & {\n isTextArea?: boolean;\n isFocused: boolean;\n autoCompleteType?: typeof autoCompleteSuggestionTypeAndroid[keyof typeof autoCompleteSuggestionTypeAndroid];\n editable?: boolean;\n onPress?: (event: GestureResponderEvent) => void;\n $size: NonNullable<BaseInputProps['size']>;\n /** Transient — must not forward to native TextInput */\n $autoGrowMaxHeight?: number;\n};\n\nconst getInputHeight = ({\n isTextArea,\n hasTags,\n numberOfLines,\n isDropdownTrigger,\n size,\n autoGrowMaxHeight,\n}: Pick<StyledBaseInputProps, 'hasTags' | 'isTextArea' | 'numberOfLines' | 'isDropdownTrigger'> & {\n size: NonNullable<BaseInputProps['size']>;\n autoGrowMaxHeight?: number;\n}): string | undefined => {\n if (isTextArea) {\n // Auto-grow textareas manage height via inline styles + onContentSizeChange\n if (autoGrowMaxHeight) {\n return undefined;\n }\n const lines = isDropdownTrigger ? 1 : numberOfLines ?? 0;\n return `${baseInputHeight[size] * lines}px`;\n }\n\n if (hasTags) {\n return undefined; // we don't set height on input. We set it on wrapper to properly include tags in overall height\n }\n\n return makeSize(sizeToken[baseInputHeight[size]]);\n};\n\nconst getRNInputStyles = (\n props: StyledComponentInputProps &\n ThemeProps<DefaultTheme> &\n (TextInputProps | TouchableHighlightProps),\n): CSSObject => {\n return {\n ...getBaseInputStyles({\n theme: props.theme,\n isFocused: props.isFocused,\n isDisabled: !props.editable,\n validationState: props.validationState,\n leadingIcon: props.leadingIcon,\n prefix: props.prefix,\n trailingInteractionElement: props.trailingInteractionElement,\n leadingInteractionElement: props.leadingInteractionElement,\n suffix: props.suffix,\n trailingIcon: props.trailingIcon,\n isTextArea: props.isTextArea,\n hasTags: props.hasTags,\n isDropdownTrigger: props.isDropdownTrigger,\n size: props.$size,\n padding: props.$padding,\n valueComponentType: props.valueComponentType,\n isTableInputCell: props.isTableInputCell,\n }),\n lineHeight: RNPlatform.select({\n android: makeSize(props.theme.typography.lineHeights[100]),\n ios: undefined,\n }),\n textAlignVertical: props.isTextArea ? 'top' : 'center',\n ...(props.isTextArea\n ? {}\n : {\n paddingTop: 0,\n paddingBottom: 0,\n height: undefined,\n minHeight: undefined,\n }),\n ...(props.isTextArea || props.hasTags\n ? {\n height: getInputHeight({\n isTextArea: props.isTextArea,\n hasTags: props.hasTags,\n numberOfLines: props.numberOfLines,\n isDropdownTrigger: props.isDropdownTrigger,\n size: props.$size,\n autoGrowMaxHeight: props.$autoGrowMaxHeight,\n }),\n ...(props.isTextArea && props.$autoGrowMaxHeight\n ? {\n minHeight: `${\n baseInputHeight[props.$size] *\n (props.isDropdownTrigger ? 1 : props.numberOfLines ?? 1)\n }px`,\n }\n : {}),\n }\n : {}),\n };\n};\nconst StyledNativeBaseInput = styled.TextInput<StyledComponentInputProps>(\n ({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n $autoGrowMaxHeight,\n isDropdownTrigger,\n hasTags,\n $size,\n $padding,\n isTableInputCell,\n valueComponentType,\n }) =>\n getRNInputStyles({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n $autoGrowMaxHeight,\n hasTags,\n isDropdownTrigger,\n $size,\n $padding,\n valueComponentType,\n isTableInputCell,\n }),\n);\nconst StyledNativeBaseButton = styled.TouchableOpacity<StyledComponentInputProps>(\n ({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n $autoGrowMaxHeight,\n isDropdownTrigger,\n hasTags,\n $size,\n $padding,\n isTableInputCell,\n valueComponentType,\n }) => ({\n ...getRNInputStyles({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n $autoGrowMaxHeight,\n isDropdownTrigger,\n hasTags,\n $size,\n $padding,\n valueComponentType,\n isTableInputCell,\n }),\n }),\n);\n\nconst _StyledBaseInput: React.ForwardRefRenderFunction<\n TextInput | TouchableHighlight,\n StyledBaseInputProps\n> = (\n {\n name,\n isRequired,\n isDisabled,\n maxCharacters,\n handleOnFocus,\n handleOnChange,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n handleOnClick,\n keyboardType = 'text',\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n accessibilityProps,\n currentInteraction,\n setCurrentInteraction,\n type,\n numberOfLines,\n autoGrowMaxHeight,\n isTextArea,\n hasPopup,\n shouldIgnoreBlurAnimation,\n autoCapitalize,\n as: renderAs,\n $size,\n valueSuffix,\n ...props\n },\n ref,\n) => {\n const buttonValue = props.value ? props.value : props.placeholder;\n const { theme } = useTheme();\n // Auto-grow is opt-in (ChatInput only today). Default path must match prior textarea height behavior.\n const isAutoGrowing = Boolean(isTextArea && autoGrowMaxHeight);\n const minAutoGrowHeight =\n baseInputHeight[$size] * (props.isDropdownTrigger ? 1 : numberOfLines ?? 1);\n const [autoGrowHeight, setAutoGrowHeight] = React.useState(minAutoGrowHeight);\n\n React.useEffect(() => {\n if (!isAutoGrowing) {\n return;\n }\n setAutoGrowHeight(minAutoGrowHeight);\n }, [isAutoGrowing, minAutoGrowHeight]);\n\n const commonProps = {\n onBlur: (): void => {\n // In certain cases like SelectInput, we want to ignore the blur animation when option item is clicked.\n // The selectinput should always look like it is in focus otherwise it triggers blur + focus again which can cause flicker\n if (!shouldIgnoreBlurAnimation) {\n setCurrentInteraction('default');\n }\n },\n isFocused: currentInteraction === 'focus',\n };\n\n return renderAs === 'button' ? (\n <StyledNativeBaseButton\n // the types of styled-components for react-native is creating a mess, so there's no other option but to type `ref` as any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n onPress={(): void => {\n handleOnClick?.({ name, value: props.value });\n }}\n onFocus={(): void => {\n handleOnFocus?.({ name, value: props.value });\n setCurrentInteraction('focus');\n }}\n as={undefined}\n $size={$size}\n {...commonProps}\n {...props}\n {...accessibilityProps}\n >\n <BaseBox display=\"flex\" flexDirection=\"row\" alignItems=\"center\" gap=\"spacing.3\" width=\"100%\">\n <Text\n color={\n props.value && !isDisabled\n ? 'interactive.text.gray.normal'\n : 'surface.text.gray.disabled'\n }\n truncateAfterLines={1}\n textAlign={props.textAlign ?? 'left'}\n size={$size}\n >\n {buttonValue}\n </Text>\n {valueSuffix}\n </BaseBox>\n </StyledNativeBaseButton>\n ) : (\n <StyledNativeBaseInput\n // the types of styled-components for react-native is creating a mess, so there's no other option but to type `ref` as any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n multiline={isTextArea}\n numberOfLines={numberOfLines}\n editable={!isDisabled}\n maxLength={maxCharacters}\n placeholderTextColor={theme.colors.surface.text.gray.disabled}\n onFocus={(event): void => {\n handleOnFocus?.({ name, value: event?.nativeEvent.text });\n // React Native does not have native onPress event on Input elements so for consistency of API we call it on onFocus which also gets triggered on clicks\n handleOnClick?.({ name, value: event?.nativeEvent.text });\n setCurrentInteraction('focus');\n }}\n onChangeText={(text): void => {\n handleOnChange?.({ name, value: text });\n handleOnInput?.({ name, value: text });\n }}\n onEndEditing={(event): void => handleOnBlur?.({ name, value: event?.nativeEvent.text })}\n onSubmitEditing={(event): void => handleOnSubmit?.({ name, value: event?.nativeEvent.text })}\n onKeyPress={(event): void => {\n handleOnKeyDown?.({\n name,\n key: event?.nativeEvent.key,\n event: (event as unknown) as React.KeyboardEvent<HTMLInputElement>, // TODO: handle platform specific type\n });\n }}\n onContentSizeChange={\n isAutoGrowing && autoGrowMaxHeight\n ? (event): void => {\n const nextHeight = Math.min(\n Math.max(event.nativeEvent.contentSize.height, minAutoGrowHeight),\n autoGrowMaxHeight,\n );\n setAutoGrowHeight(nextHeight);\n }\n : undefined\n }\n // @ts-expect-error styled-components have limited keyboard types('default' | 'email-address' | 'numeric' | 'phone-pad' | 'number-pad' | 'decimal-pad') compared to the actual supported types so ignoring the error.\n // source: https://reactnative.dev/docs/textinput/#keyboardtype\n keyboardType={KeyboardTypeToNativeValuesMap[keyboardType]}\n returnKeyType={keyboardReturnKeyType}\n autoCompleteType={\n autoCompleteSuggestionType\n ? (autoCompleteSuggestionTypeAndroid[\n autoCompleteSuggestionType as Platform.CastNative<\n BaseInputProps['autoCompleteSuggestionType']\n >\n ] as StyledComponentAutoCompleteAndroid)\n : undefined\n }\n secureTextEntry={type === 'password'}\n isTextArea={isTextArea}\n // Transient styled prop — never forwarded to native TextInput\n $autoGrowMaxHeight={isAutoGrowing ? autoGrowMaxHeight : undefined}\n textContentType={\n autoCompleteSuggestionType\n ? autoCompleteSuggestionTypeIOS[\n autoCompleteSuggestionType as Platform.CastNative<\n BaseInputProps['autoCompleteSuggestionType']\n >\n ]\n : undefined\n }\n autoCapitalize={autoCapitalize}\n includeFontPadding={false}\n $size={$size}\n scrollEnabled={isAutoGrowing ? autoGrowHeight >= (autoGrowMaxHeight as number) : undefined}\n {...commonProps}\n {...props}\n {...accessibilityProps}\n style={isAutoGrowing ? { height: autoGrowHeight, maxHeight: autoGrowMaxHeight } : undefined}\n />\n );\n};\n\nconst StyledBaseInput = assignWithoutSideEffects(React.forwardRef(_StyledBaseInput), {\n displayName: 'StyledBaseInput',\n});\n\nexport { StyledBaseInput };\n"],"names":["autoCompleteSuggestionTypeAndroid","none","name","email","username","password","newPassword","oneTimeCode","telephone","postalCode","countryName","creditCardNumber","creditCardCSC","creditCardExpiry","creditCardExpiryMonth","creditCardExpiryYear","autoCompleteSuggestionTypeIOS","KeyboardTypeToNativeValuesMap","text","search","url","decimal","getInputHeight","_ref","isTextArea","hasTags","numberOfLines","isDropdownTrigger","size","autoGrowMaxHeight","undefined","lines","baseInputHeight","makeSize","sizeToken","getRNInputStyles","props","_props$numberOfLines","Object","assign","getBaseInputStyles","theme","isFocused","isDisabled","editable","validationState","leadingIcon","prefix","trailingInteractionElement","leadingInteractionElement","suffix","trailingIcon","$size","padding","$padding","valueComponentType","isTableInputCell","lineHeight","RNPlatform","select","android","typography","lineHeights","ios","textAlignVertical","paddingTop","paddingBottom","height","minHeight","$autoGrowMaxHeight","StyledNativeBaseInput","styled","TextInput","_ref2","id","StyledNativeBaseButton","TouchableOpacity","_ref3","_StyledBaseInput","_ref4","ref","_props$textAlign","isRequired","maxCharacters","handleOnFocus","handleOnChange","handleOnBlur","handleOnSubmit","handleOnInput","handleOnKeyDown","handleOnClick","_ref4$keyboardType","keyboardType","keyboardReturnKeyType","autoCompleteSuggestionType","accessibilityProps","currentInteraction","setCurrentInteraction","type","hasPopup","shouldIgnoreBlurAnimation","autoCapitalize","renderAs","as","valueSuffix","_objectWithoutProperties","_excluded","buttonValue","value","placeholder","_useTheme","useTheme","isAutoGrowing","Boolean","minAutoGrowHeight","_React$useState","React","useState","_React$useState2","_slicedToArray","autoGrowHeight","setAutoGrowHeight","useEffect","commonProps","onBlur","_jsx","onPress","onFocus","children","_jsxs","BaseBox","display","flexDirection","alignItems","gap","width","Text","color","truncateAfterLines","textAlign","multiline","maxLength","placeholderTextColor","colors","surface","gray","disabled","event","nativeEvent","onChangeText","onEndEditing","onSubmitEditing","onKeyPress","key","onContentSizeChange","nextHeight","Math","min","max","contentSize","returnKeyType","autoCompleteType","secureTextEntry","textContentType","includeFontPadding","scrollEnabled","style","maxHeight","StyledBaseInput","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;+kBAsCA,IAAMA,iCAAiC,CAAG,CACxCC,IAAI,CAAE,KAAK,CACXC,IAAI,CAAE,MAAM,CACZC,KAAK,CAAE,OAAO,CACdC,QAAQ,CAAE,UAAU,CACpBC,QAAQ,CAAE,UAAU,CACpBC,WAAW,CAAE,cAAc,CAC3BC,WAAW,CAAE,SAAS,CACtBC,SAAS,CAAE,KAAK,CAChBC,UAAU,CAAE,aAAa,CACzBC,WAAW,CAAE,wBAAwB,CACrCC,gBAAgB,CAAE,WAAW,CAC7BC,aAAa,CAAE,QAAQ,CACvBC,gBAAgB,CAAE,QAAQ,CAC1BC,qBAAqB,CAAE,cAAc,CACrCC,oBAAoB,CAAE,aACxB,CAAU,CAEV,IAAMC,6BAA6B,CAAG,CACpCf,IAAI,CAAE,MAAM,CACZC,IAAI,CAAE,MAAM,CACZC,KAAK,CAAE,cAAc,CACrBC,QAAQ,CAAE,UAAU,CACpB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a,CAAEnE,qBAAsB,CACrCoE,gBAAgB,CACdnE,0BAA0B,CACrB9F,iCAAiC,CAChC8F,0BAA0B,CAG3B,CACDhE,SACL,CACDoI,eAAe,CAAEhE,IAAI,GAAK,UAAW,CACrC1E,UAAU,CAAEA,UAAW,CAEvB6C,kBAAkB,CAAE2C,aAAa,CAAGnF,iBAAiB,CAAGC,SAAU,CAClEqI,eAAe,CACbrE,0BAA0B,CACtB9E,6BAA6B,CAC3B8E,0BAA0B,CAG3B,CACDhE,SACL,CACDuE,cAAc,CAAEA,cAAe,CAC/B+D,kBAAkB,CAAE,KAAM,CAC1BhH,KAAK,CAAEA,KAAM,CACbiH,aAAa,CAAErD,aAAa,CAAGQ,cAAc,EAAK3F,iBAA4B,CAAGC,SAAU,CAAA,CACvF6F,WAAW,CACXvF,KAAK,CACL2D,kBAAkB,CAAA,CACtBuE,KAAK,CAAEtD,aAAa,CAAG,CAAE7C,MAAM,CAAEqD,cAAc,CAAE+C,SAAS,CAAE1I,iBAAkB,CAAC,CAAGC,SAAU,CAC7F,CAAA,CACF,CACH,CAAC,CAEK,IAAA0I,eAAe,CAAGC,wBAAwB,CAACrD,cAAK,CAACsD,UAAU,CAAC5F,gBAAgB,CAAC,CAAE,CACnF6F,WAAW,CAAE,iBACf,CAAC;;;;"}
1
+ {"version":3,"file":"StyledBaseInput.native.js","sources":["../../../../../../src/components/Input/BaseInput/StyledBaseInput.native.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components/native';\nimport type { CSSObject, ThemeProps, DefaultTheme } from 'styled-components';\nimport type {\n TextInputProps,\n TouchableHighlight,\n TouchableHighlightProps,\n GestureResponderEvent,\n TextInput,\n} from 'react-native';\nimport { Platform as RNPlatform } from 'react-native';\nimport type { BaseInputProps } from './BaseInput';\nimport type { StyledBaseInputProps } from './types';\nimport { getBaseInputStyles } from './baseInputStyles';\nimport { baseInputHeight } from './baseInputTokens';\nimport { Text } from '~components/Typography';\nimport { useTheme } from '~components/BladeProvider';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { size as sizeToken } from '~tokens/global';\nimport { makeSize } from '~utils/makeSize';\nimport type { Platform } from '~utils';\nimport BaseBox from '~components/Box/BaseBox';\n\ntype StyledComponentAutoCompleteAndroid =\n | 'off'\n | 'name'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-number'\n | 'email'\n | 'username'\n | 'password'\n | 'password-new'\n | 'sms-otp'\n | 'postal-code'\n | 'postal-address-country'\n | 'tel'\n | undefined;\n\nconst autoCompleteSuggestionTypeAndroid = {\n none: 'off',\n name: 'name',\n email: 'email',\n username: 'username',\n password: 'password',\n newPassword: 'password-new',\n oneTimeCode: 'sms-otp',\n telephone: 'tel',\n postalCode: 'postal-code',\n countryName: 'postal-address-country',\n creditCardNumber: 'cc-number',\n creditCardCSC: 'cc-csc',\n creditCardExpiry: 'cc-exp',\n creditCardExpiryMonth: 'cc-exp-month',\n creditCardExpiryYear: 'cc-exp-year',\n} as const;\n\nconst autoCompleteSuggestionTypeIOS = {\n none: 'none',\n name: 'name',\n email: 'emailAddress',\n username: 'username',\n password: 'password',\n newPassword: 'newPassword',\n oneTimeCode: 'oneTimeCode',\n telephone: 'telephoneNumber',\n postalCode: 'postalCode',\n countryName: 'countryName',\n creditCardNumber: 'creditCardNumber',\n creditCardCSC: 'none',\n creditCardExpiry: 'none',\n creditCardExpiryMonth: 'none',\n creditCardExpiryYear: 'none',\n} as const;\n\nconst KeyboardTypeToNativeValuesMap = {\n text: 'default',\n search: 'default',\n telephone: 'phone-pad',\n email: 'email-address',\n url: 'url',\n decimal: 'decimal-pad',\n};\n\ntype StyledComponentInputProps = Omit<\n StyledBaseInputProps,\n 'accessibilityProps' | 'setCurrentInteraction' | 'currentInteraction' | 'autoGrowMaxHeight'\n> & {\n isTextArea?: boolean;\n isFocused: boolean;\n autoComplete?: typeof autoCompleteSuggestionTypeAndroid[keyof typeof autoCompleteSuggestionTypeAndroid];\n editable?: boolean;\n onPress?: (event: GestureResponderEvent) => void;\n $size: NonNullable<BaseInputProps['size']>;\n /** Transient — must not forward to native TextInput */\n $autoGrowMaxHeight?: number;\n};\n\nconst getInputHeight = ({\n isTextArea,\n hasTags,\n numberOfLines,\n isDropdownTrigger,\n size,\n autoGrowMaxHeight,\n}: Pick<StyledBaseInputProps, 'hasTags' | 'isTextArea' | 'numberOfLines' | 'isDropdownTrigger'> & {\n size: NonNullable<BaseInputProps['size']>;\n autoGrowMaxHeight?: number;\n}): string | undefined => {\n if (isTextArea) {\n // Auto-grow textareas manage height via inline styles + onContentSizeChange\n if (autoGrowMaxHeight) {\n return undefined;\n }\n const lines = isDropdownTrigger ? 1 : numberOfLines ?? 0;\n return `${baseInputHeight[size] * lines}px`;\n }\n\n if (hasTags) {\n return undefined; // we don't set height on input. We set it on wrapper to properly include tags in overall height\n }\n\n return makeSize(sizeToken[baseInputHeight[size]]);\n};\n\nconst getRNInputStyles = (\n props: StyledComponentInputProps &\n ThemeProps<DefaultTheme> &\n (TextInputProps | TouchableHighlightProps),\n): CSSObject => {\n return {\n ...getBaseInputStyles({\n theme: props.theme,\n isFocused: props.isFocused,\n isDisabled: !props.editable,\n validationState: props.validationState,\n leadingIcon: props.leadingIcon,\n prefix: props.prefix,\n trailingInteractionElement: props.trailingInteractionElement,\n leadingInteractionElement: props.leadingInteractionElement,\n suffix: props.suffix,\n trailingIcon: props.trailingIcon,\n isTextArea: props.isTextArea,\n hasTags: props.hasTags,\n isDropdownTrigger: props.isDropdownTrigger,\n size: props.$size,\n padding: props.$padding,\n valueComponentType: props.valueComponentType,\n isTableInputCell: props.isTableInputCell,\n }),\n lineHeight: RNPlatform.select({\n android: makeSize(props.theme.typography.lineHeights[100]),\n ios: undefined,\n }),\n textAlignVertical: props.isTextArea ? 'top' : 'center',\n ...(props.isTextArea\n ? {}\n : {\n paddingTop: 0,\n paddingBottom: 0,\n height: undefined,\n minHeight: undefined,\n }),\n ...(props.isTextArea || props.hasTags\n ? {\n height: getInputHeight({\n isTextArea: props.isTextArea,\n hasTags: props.hasTags,\n numberOfLines: props.numberOfLines,\n isDropdownTrigger: props.isDropdownTrigger,\n size: props.$size,\n autoGrowMaxHeight: props.$autoGrowMaxHeight,\n }),\n ...(props.isTextArea && props.$autoGrowMaxHeight\n ? {\n minHeight: `${\n baseInputHeight[props.$size] *\n (props.isDropdownTrigger ? 1 : props.numberOfLines ?? 1)\n }px`,\n }\n : {}),\n }\n : {}),\n };\n};\nconst StyledNativeBaseInput = styled.TextInput<StyledComponentInputProps>(\n ({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n $autoGrowMaxHeight,\n isDropdownTrigger,\n hasTags,\n $size,\n $padding,\n isTableInputCell,\n valueComponentType,\n }) =>\n getRNInputStyles({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n $autoGrowMaxHeight,\n hasTags,\n isDropdownTrigger,\n $size,\n $padding,\n valueComponentType,\n isTableInputCell,\n }),\n);\nconst StyledNativeBaseButton = styled.TouchableOpacity<StyledComponentInputProps>(\n ({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n $autoGrowMaxHeight,\n isDropdownTrigger,\n hasTags,\n $size,\n $padding,\n isTableInputCell,\n valueComponentType,\n }) => ({\n ...getRNInputStyles({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n $autoGrowMaxHeight,\n isDropdownTrigger,\n hasTags,\n $size,\n $padding,\n valueComponentType,\n isTableInputCell,\n }),\n }),\n);\n\nconst _StyledBaseInput: React.ForwardRefRenderFunction<\n TextInput | TouchableHighlight,\n StyledBaseInputProps\n> = (\n {\n name,\n isRequired,\n isDisabled,\n maxCharacters,\n handleOnFocus,\n handleOnChange,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n handleOnClick,\n keyboardType = 'text',\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n accessibilityProps,\n currentInteraction,\n setCurrentInteraction,\n type,\n numberOfLines,\n autoGrowMaxHeight,\n isTextArea,\n hasPopup,\n shouldIgnoreBlurAnimation,\n autoCapitalize,\n as: renderAs,\n $size,\n valueSuffix,\n ...props\n },\n ref,\n) => {\n const buttonValue = props.value ? props.value : props.placeholder;\n const { theme } = useTheme();\n // Auto-grow is opt-in (ChatInput only today). Default path must match prior textarea height behavior.\n const isAutoGrowing = Boolean(isTextArea && autoGrowMaxHeight);\n const minAutoGrowHeight =\n baseInputHeight[$size] * (props.isDropdownTrigger ? 1 : numberOfLines ?? 1);\n const [autoGrowHeight, setAutoGrowHeight] = React.useState(minAutoGrowHeight);\n\n React.useEffect(() => {\n if (!isAutoGrowing) {\n return;\n }\n setAutoGrowHeight(minAutoGrowHeight);\n }, [isAutoGrowing, minAutoGrowHeight]);\n\n const commonProps = {\n onBlur: (): void => {\n // In certain cases like SelectInput, we want to ignore the blur animation when option item is clicked.\n // The selectinput should always look like it is in focus otherwise it triggers blur + focus again which can cause flicker\n if (!shouldIgnoreBlurAnimation) {\n setCurrentInteraction('default');\n }\n },\n isFocused: currentInteraction === 'focus',\n };\n\n return renderAs === 'button' ? (\n <StyledNativeBaseButton\n // the types of styled-components for react-native is creating a mess, so there's no other option but to type `ref` as any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n onPress={(): void => {\n handleOnClick?.({ name, value: props.value });\n }}\n onFocus={(): void => {\n handleOnFocus?.({ name, value: props.value });\n setCurrentInteraction('focus');\n }}\n as={undefined}\n $size={$size}\n {...commonProps}\n {...props}\n {...accessibilityProps}\n >\n <BaseBox display=\"flex\" flexDirection=\"row\" alignItems=\"center\" gap=\"spacing.3\" width=\"100%\">\n <Text\n color={\n props.value && !isDisabled\n ? 'interactive.text.gray.normal'\n : 'surface.text.gray.disabled'\n }\n truncateAfterLines={1}\n textAlign={props.textAlign ?? 'left'}\n size={$size}\n >\n {buttonValue}\n </Text>\n {valueSuffix}\n </BaseBox>\n </StyledNativeBaseButton>\n ) : (\n <StyledNativeBaseInput\n // the types of styled-components for react-native is creating a mess, so there's no other option but to type `ref` as any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n multiline={isTextArea}\n numberOfLines={numberOfLines}\n editable={!isDisabled}\n maxLength={maxCharacters}\n placeholderTextColor={theme.colors.surface.text.gray.disabled}\n onFocus={(event): void => {\n handleOnFocus?.({ name, value: event?.nativeEvent.text });\n // React Native does not have native onPress event on Input elements so for consistency of API we call it on onFocus which also gets triggered on clicks\n handleOnClick?.({ name, value: event?.nativeEvent.text });\n setCurrentInteraction('focus');\n }}\n onChangeText={(text): void => {\n handleOnChange?.({ name, value: text });\n handleOnInput?.({ name, value: text });\n }}\n onEndEditing={(event): void => handleOnBlur?.({ name, value: event?.nativeEvent.text })}\n onSubmitEditing={(event): void => handleOnSubmit?.({ name, value: event?.nativeEvent.text })}\n onKeyPress={(event): void => {\n handleOnKeyDown?.({\n name,\n key: event?.nativeEvent.key,\n event: (event as unknown) as React.KeyboardEvent<HTMLInputElement>, // TODO: handle platform specific type\n });\n }}\n onContentSizeChange={\n isAutoGrowing && autoGrowMaxHeight\n ? (event): void => {\n const nextHeight = Math.min(\n Math.max(event.nativeEvent.contentSize.height, minAutoGrowHeight),\n autoGrowMaxHeight,\n );\n setAutoGrowHeight(nextHeight);\n }\n : undefined\n }\n // @ts-expect-error styled-components have limited keyboard types('default' | 'email-address' | 'numeric' | 'phone-pad' | 'number-pad' | 'decimal-pad') compared to the actual supported types so ignoring the error.\n // source: https://reactnative.dev/docs/textinput/#keyboardtype\n keyboardType={KeyboardTypeToNativeValuesMap[keyboardType]}\n returnKeyType={keyboardReturnKeyType}\n autoComplete={\n autoCompleteSuggestionType\n ? (autoCompleteSuggestionTypeAndroid[\n autoCompleteSuggestionType as Platform.CastNative<\n BaseInputProps['autoCompleteSuggestionType']\n >\n ] as StyledComponentAutoCompleteAndroid)\n : undefined\n }\n secureTextEntry={type === 'password'}\n isTextArea={isTextArea}\n // Transient styled prop — never forwarded to native TextInput\n $autoGrowMaxHeight={isAutoGrowing ? autoGrowMaxHeight : undefined}\n textContentType={\n autoCompleteSuggestionType\n ? autoCompleteSuggestionTypeIOS[\n autoCompleteSuggestionType as Platform.CastNative<\n BaseInputProps['autoCompleteSuggestionType']\n >\n ]\n : undefined\n }\n autoCapitalize={autoCapitalize}\n includeFontPadding={false}\n $size={$size}\n scrollEnabled={isAutoGrowing ? autoGrowHeight >= (autoGrowMaxHeight as number) : undefined}\n {...commonProps}\n {...props}\n {...accessibilityProps}\n style={isAutoGrowing ? { height: autoGrowHeight, maxHeight: autoGrowMaxHeight } : undefined}\n />\n );\n};\n\nconst StyledBaseInput = assignWithoutSideEffects(React.forwardRef(_StyledBaseInput), {\n displayName: 'StyledBaseInput',\n});\n\nexport { StyledBaseInput };\n"],"names":["autoCompleteSuggestionTypeAndroid","none","name","email","username","password","newPassword","oneTimeCode","telephone","postalCode","countryName","creditCardNumber","creditCardCSC","creditCardExpiry","creditCardExpiryMonth","creditCardExpiryYear","autoCompleteSuggestionTypeIOS","KeyboardTypeToNativeValuesMap","text","search","url","decimal","getInputHeight","_ref","isTextArea","hasTags","numberOfLines","isDropdownTrigger","size","autoGrowMaxHeight","undefined","lines","baseInputHeight","makeSize","sizeToken","getRNInputStyles","props","_props$numberOfLines","Object","assign","getBaseInputStyles","theme","isFocused","isDisabled","editable","validationState","leadingIcon","prefix","trailingInteractionElement","leadingInteractionElement","suffix","trailingIcon","$size","padding","$padding","valueComponentType","isTableInputCell","lineHeight","RNPlatform","select","android","typography","lineHeights","ios","textAlignVertical","paddingTop","paddingBottom","height","minHeight","$autoGrowMaxHeight","StyledNativeBaseInput","styled","TextInput","_ref2","id","StyledNativeBaseButton","TouchableOpacity","_ref3","_StyledBaseInput","_ref4","ref","_props$textAlign","isRequired","maxCharacters","handleOnFocus","handleOnChange","handleOnBlur","handleOnSubmit","handleOnInput","handleOnKeyDown","handleOnClick","_ref4$keyboardType","keyboardType","keyboardReturnKeyType","autoCompleteSuggestionType","accessibilityProps","currentInteraction","setCurrentInteraction","type","hasPopup","shouldIgnoreBlurAnimation","autoCapitalize","renderAs","as","valueSuffix","_objectWithoutProperties","_excluded","buttonValue","value","placeholder","_useTheme","useTheme","isAutoGrowing","Boolean","minAutoGrowHeight","_React$useState","React","useState","_React$useState2","_slicedToArray","autoGrowHeight","setAutoGrowHeight","useEffect","commonProps","onBlur","_jsx","onPress","onFocus","children","_jsxs","BaseBox","display","flexDirection","alignItems","gap","width","Text","color","truncateAfterLines","textAlign","multiline","maxLength","placeholderTextColor","colors","surface","gray","disabled","event","nativeEvent","onChangeText","onEndEditing","onSubmitEditing","onKeyPress","key","onContentSizeChange","nextHeight","Math","min","max","contentSize","returnKeyType","autoComplete","secureTextEntry","textContentType","includeFontPadding","scrollEnabled","style","maxHeight","StyledBaseInput","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;+kBAyCA,IAAMA,iCAAiC,CAAG,CACxCC,IAAI,CAAE,KAAK,CACXC,IAAI,CAAE,MAAM,CACZC,KAAK,CAAE,OAAO,CACdC,QAAQ,CAAE,UAAU,CACpBC,QAAQ,CAAE,UAAU,CACpBC,WAAW,CAAE,cAAc,CAC3BC,WAAW,CAAE,SAAS,CACtBC,SAAS,CAAE,KAAK,CAChBC,UAAU,CAAE,aAAa,CACzBC,WAAW,CAAE,wBAAwB,CACrCC,gBAAgB,CAAE,WAAW,CAC7BC,aAAa,CAAE,QAAQ,CACvBC,gBAA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KAAK,CAACC,WAAW,CAACW,WAAW,CAAC5F,MAAM,CAAE+C,iBAAiB,CAAC,CACjErF,iBACF,CAAC,CACD4F,iBAAiB,CAACkC,UAAU,CAAC,CAC/B,CAAC,CACD7H,SACL,CAGD8D,YAAY,CAAE3E,6BAA6B,CAAC2E,YAAY,CAAE,CAC1DoE,aAAa,CAAEnE,qBAAsB,CACrCoE,YAAY,CACVnE,0BAA0B,CACrB9F,iCAAiC,CAChC8F,0BAA0B,CAG3B,CACDhE,SACL,CACDoI,eAAe,CAAEhE,IAAI,GAAK,UAAW,CACrC1E,UAAU,CAAEA,UAAW,CAEvB6C,kBAAkB,CAAE2C,aAAa,CAAGnF,iBAAiB,CAAGC,SAAU,CAClEqI,eAAe,CACbrE,0BAA0B,CACtB9E,6BAA6B,CAC3B8E,0BAA0B,CAG3B,CACDhE,SACL,CACDuE,cAAc,CAAEA,cAAe,CAC/B+D,kBAAkB,CAAE,KAAM,CAC1BhH,KAAK,CAAEA,KAAM,CACbiH,aAAa,CAAErD,aAAa,CAAGQ,cAAc,EAAK3F,iBAA4B,CAAGC,SAAU,CAAA,CACvF6F,WAAW,CACXvF,KAAK,CACL2D,kBAAkB,CAAA,CACtBuE,KAAK,CAAEtD,aAAa,CAAG,CAAE7C,MAAM,CAAEqD,cAAc,CAAE+C,SAAS,CAAE1I,iBAAkB,CAAC,CAAGC,SAAU,CAC7F,CAAA,CACF,CACH,CAAC,CAEK,IAAA0I,eAAe,CAAGC,wBAAwB,CAACrD,cAAK,CAACsD,UAAU,CAAC5F,gBAAgB,CAAC,CAAE,CACnF6F,WAAW,CAAE,iBACf,CAAC;;;;"}
@@ -23,7 +23,7 @@ import { FormLabel } from '../../Form/FormLabel.js';
23
23
  import { makeSize } from '../../../utils/makeSize/makeSize.js';
24
24
  import { FormHint } from '../../Form/FormHint.js';
25
25
 
26
- var _excluded=["autoFocus","errorText","helpText","isDisabled","keyboardReturnKeyType","keyboardType","label","accessibilityLabel","labelPosition","labelSuffix","labelTrailing","name","onChange","onFocus","onBlur","onOTPFilled","otpLength","placeholder","successText","validationState","value","isMasked","autoCompleteSuggestionType","testID","size"];var _this=undefined,_jsxFileName="/home/runner/work/blade/blade/packages/blade/src/components/Input/OTPInput/OTPInput.tsx";var isReactNative=getPlatformType()==='react-native';var otpToArray=function otpToArray(code){var _code$split;return (_code$split=code==null?void 0:code.split(''))!=null?_code$split:Array(6).fill('');};var _OTPInput=function _OTPInput(_ref,incomingRef){var autoFocus=_ref.autoFocus,errorText=_ref.errorText,helpText=_ref.helpText,isDisabled=_ref.isDisabled,keyboardReturnKeyType=_ref.keyboardReturnKeyType,_ref$keyboardType=_ref.keyboardType,keyboardType=_ref$keyboardType===void 0?'decimal':_ref$keyboardType,label=_ref.label,accessibilityLabel=_ref.accessibilityLabel,labelPosition=_ref.labelPosition,labelSuffix=_ref.labelSuffix,labelTrailing=_ref.labelTrailing,name=_ref.name,onChange=_ref.onChange,_onFocus=_ref.onFocus,_onBlur=_ref.onBlur,onOTPFilled=_ref.onOTPFilled,_ref$otpLength=_ref.otpLength,otpLength=_ref$otpLength===void 0?6:_ref$otpLength,placeholder=_ref.placeholder,successText=_ref.successText,validationState=_ref.validationState,inputValue=_ref.value,isMasked=_ref.isMasked,_ref$autoCompleteSugg=_ref.autoCompleteSuggestionType,autoCompleteSuggestionType=_ref$autoCompleteSugg===void 0?'oneTimeCode':_ref$autoCompleteSugg,testID=_ref.testID,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,rest=_objectWithoutProperties(_ref,_excluded);var inputRefs=[];var _useState=useState(otpToArray(inputValue)),_useState2=_slicedToArray(_useState,2),otpValue=_useState2[0],setOtpValue=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),inputType=_useState4[0],setInputType=_useState4[1];var isLabelLeftPositioned=labelPosition==='left';var _useFormId=useFormId('otp'),inputId=_useFormId.inputId,helpTextId=_useFormId.helpTextId,errorTextId=_useFormId.errorTextId,successTextId=_useFormId.successTextId;useImperativeHandle(incomingRef,function(){return inputRefs.map(function(ref){return ref.current;});},[inputRefs]);useEffect(function(){if(inputValue&&inputValue.length>=otpLength){onOTPFilled==null?void 0:onOTPFilled({value:inputValue.slice(0,otpLength),name:name});}else if(!inputValue&&otpValue.join('').length>=otpLength){onOTPFilled==null?void 0:onOTPFilled({value:otpValue.slice(0,otpLength).join(''),name:name});}},[otpValue,otpLength,name,inputValue,onOTPFilled]);useEffect(function(){otpValue.forEach(function(otp,index){if(!isEmpty(otp)&&!inputType[index]&&isMasked){var newInputType=Array.from(inputType);newInputType[index]='password';setInputType(newInputType);}if(isEmpty(otp)&&inputType[index]){var _newInputType=Array.from(inputType);_newInputType[index]=undefined;setInputType(_newInputType);}});},[otpValue,inputType,isMasked]);var setOtpValueByIndex=function setOtpValueByIndex(_ref2){var value=_ref2.value,index=_ref2.index;var newOtpValue=Array.from(otpValue);newOtpValue[index]=value;setOtpValue(newOtpValue);return newOtpValue.join('');};var focusOnOtpByIndex=function focusOnOtpByIndex(index){var _inputRefs$index,_inputRefs$index$curr;(_inputRefs$index=inputRefs[index])==null?void 0:(_inputRefs$index$curr=_inputRefs$index.current)==null?void 0:_inputRefs$index$curr.focus();if(!isReactNative){var _inputRefs$index2,_inputRefs$index2$cur;(_inputRefs$index2=inputRefs[index])==null?void 0:(_inputRefs$index2$cur=_inputRefs$index2.current)==null?void 0:_inputRefs$index2$cur.select();}};var handleOnChange=function handleOnChange(_ref3){var value=_ref3.value,currentOtpIndex=_ref3.currentOtpIndex;if(value&&value===' '){return;}if(inputValue&&inputValue.length>0){var newOtpValue=Array.from(inputValue);newOtpValue[currentOtpIndex]=value!=null?value:'';setOtpValue(newOtpValue);onChange==null?void 0:onChange({name:name,value:newOtpValue.join('')});}else if(value&&value.trim().length>1){setOtpValue(Array.from(value));onChange==null?void 0:onChange({name:name,value:value.trim().slice(0,otpLength)});}else if(otpValue[currentOtpIndex]!==(value==null?void 0:value.trim())){var _value$trim;var newValue=setOtpValueByIndex({value:(_value$trim=value==null?void 0:value.trim())!=null?_value$trim:'',index:currentOtpIndex});onChange==null?void 0:onChange({name:name,value:newValue});}};var handleOnInput=function handleOnInput(_ref4){var value=_ref4.value,currentOtpIndex=_ref4.currentOtpIndex;if(value&&value.trim().length===1){focusOnOtpByIndex(++currentOtpIndex);}};var handleOnKeyDown=function handleOnKeyDown(_ref5){var key=_ref5.key,code=_ref5.code,event=_ref5.event,currentOtpIndex=_ref5.currentOtpIndex;if(key==='Backspace'||code==='Backspace'||code==='Delete'||key==='Delete'){event.preventDefault==null?void 0:event.preventDefault();if(otpValue[currentOtpIndex]){handleOnChange({value:'',currentOtpIndex:currentOtpIndex});}else {focusOnOtpByIndex(--currentOtpIndex);handleOnChange({value:'',currentOtpIndex:currentOtpIndex});}}else if(key==='ArrowLeft'||code==='ArrowLeft'){event.preventDefault==null?void 0:event.preventDefault();focusOnOtpByIndex(--currentOtpIndex);}else if(key==='ArrowRight'||code==='ArrowRight'){event.preventDefault==null?void 0:event.preventDefault();focusOnOtpByIndex(++currentOtpIndex);}else if(key===' '||code==='Space'){event.preventDefault==null?void 0:event.preventDefault();}};var getHiddenInput=function getHiddenInput(){if(!isReactNative){var _ref6;return jsx("input",{hidden:true,id:inputId,name:name,value:(_ref6=inputValue!=null?inputValue:otpValue.join(''))!=null?_ref6:'',readOnly:true});}return null;};var getOTPInputFields=function getOTPInputFields(){var inputs=[];var _loop=function _loop(index){var _otpValue$index,_Array$from$index;var currentValue=inputValue?otpToArray(inputValue)[index]||'':otpValue[index]||'';var ref=React__default.createRef();var currentInputType;if(isMasked){currentInputType=inputValue?'password':inputType[index];}inputRefs.push(ref);inputs.push(jsx(BaseBox,{flex:1,marginLeft:index==0?'spacing.0':'spacing.3',children:jsx(BaseInput,Object.assign({autoFocus:autoFocus&&index===0,accessibilityLabel:`${index===0?label||accessibilityLabel:''} character ${index+1}`,label:label,hideLabelText:true,id:`${inputId}-${index}`,textAlign:"center",ref:ref,name:name,value:currentValue,maxCharacters:((_otpValue$index=otpValue[index])==null?void 0:_otpValue$index.length)>0?1:undefined,onChange:function onChange(formEvent){return handleOnChange(Object.assign({},formEvent,{currentOtpIndex:index}));},onFocus:function onFocus(formEvent){return _onFocus==null?void 0:_onFocus(Object.assign({},formEvent,{inputIndex:index}));},onBlur:function onBlur(formEvent){return _onBlur==null?void 0:_onBlur(Object.assign({},formEvent,{inputIndex:index}));},onInput:function onInput(formEvent){return handleOnInput(Object.assign({},formEvent,{currentOtpIndex:index}));},onKeyDown:function onKeyDown(keyboardEvent){return handleOnKeyDown(Object.assign({},keyboardEvent,{currentOtpIndex:index}));},isDisabled:isDisabled,placeholder:(_Array$from$index=Array.from(placeholder!=null?placeholder:'')[index])!=null?_Array$from$index:'',isRequired:true,autoCompleteSuggestionType:autoCompleteSuggestionType,keyboardType:keyboardType,keyboardReturnKeyType:keyboardReturnKeyType,validationState:validationState,successText:successText,errorText:errorText,helpText:helpText,hideFormHint:true,type:currentInputType,size:size,valueComponentType:"heading"},makeAnalyticsAttribute(rest)))},`${inputId}-${index}`));};for(var index=0;index<otpLength;index++){_loop(index);}return inputs;};return jsxs(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.OTPInput,testID:testID}),getStyledProps(rest),{children:[jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'row':'column',alignItems:isLabelLeftPositioned?'center':undefined,position:"relative",children:[Boolean(label)&&jsx(FormLabel,{as:"label",position:labelPosition,htmlFor:inputId,size:size,labelSuffix:labelSuffix,labelTrailing:labelTrailing,children:label}),jsxs(BaseBox,{display:"flex",flexDirection:"row",children:[getHiddenInput(),getOTPInputFields()]})]}),jsx(BaseBox,{marginLeft:makeSize(isLabelLeftPositioned?136:0),children:jsx(FormHint,{type:getHintType({validationState:validationState,hasHelpText:Boolean(helpText)}),helpText:helpText,errorText:errorText,successText:successText,helpTextId:helpTextId,errorTextId:errorTextId,successTextId:successTextId,size:size})})]}));};var OTPInput=React__default.forwardRef(_OTPInput);
26
+ var _excluded=["autoFocus","errorText","helpText","isDisabled","keyboardReturnKeyType","keyboardType","label","accessibilityLabel","labelPosition","labelSuffix","labelTrailing","name","onChange","onFocus","onBlur","onOTPFilled","otpLength","placeholder","successText","validationState","value","isMasked","autoCompleteSuggestionType","testID","size"];var _this=undefined,_jsxFileName="/home/runner/work/blade/blade/packages/blade/src/components/Input/OTPInput/OTPInput.tsx";var isReactNative=getPlatformType()==='react-native';var otpToArray=function otpToArray(code){var _code$split;return (_code$split=code==null?void 0:code.split(''))!=null?_code$split:Array(6).fill('');};var _OTPInput=function _OTPInput(_ref,incomingRef){var autoFocus=_ref.autoFocus,errorText=_ref.errorText,helpText=_ref.helpText,isDisabled=_ref.isDisabled,keyboardReturnKeyType=_ref.keyboardReturnKeyType,_ref$keyboardType=_ref.keyboardType,keyboardType=_ref$keyboardType===void 0?'decimal':_ref$keyboardType,label=_ref.label,accessibilityLabel=_ref.accessibilityLabel,labelPosition=_ref.labelPosition,labelSuffix=_ref.labelSuffix,labelTrailing=_ref.labelTrailing,name=_ref.name,onChange=_ref.onChange,_onFocus=_ref.onFocus,_onBlur=_ref.onBlur,onOTPFilled=_ref.onOTPFilled,_ref$otpLength=_ref.otpLength,otpLength=_ref$otpLength===void 0?6:_ref$otpLength,placeholder=_ref.placeholder,successText=_ref.successText,validationState=_ref.validationState,inputValue=_ref.value,isMasked=_ref.isMasked,_ref$autoCompleteSugg=_ref.autoCompleteSuggestionType,autoCompleteSuggestionType=_ref$autoCompleteSugg===void 0?'oneTimeCode':_ref$autoCompleteSugg,testID=_ref.testID,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,rest=_objectWithoutProperties(_ref,_excluded);var inputRefs=[];var _useState=useState(otpToArray(inputValue)),_useState2=_slicedToArray(_useState,2),otpValue=_useState2[0],setOtpValue=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),inputType=_useState4[0],setInputType=_useState4[1];var isLabelLeftPositioned=labelPosition==='left';var _useFormId=useFormId('otp'),inputId=_useFormId.inputId,helpTextId=_useFormId.helpTextId,errorTextId=_useFormId.errorTextId,successTextId=_useFormId.successTextId;useImperativeHandle(incomingRef,function(){return inputRefs.map(function(ref){return ref.current;});},[inputRefs]);useEffect(function(){if(inputValue&&inputValue.length>=otpLength){onOTPFilled==null?void 0:onOTPFilled({value:inputValue.slice(0,otpLength),name:name});}else if(!inputValue&&otpValue.join('').length>=otpLength){onOTPFilled==null?void 0:onOTPFilled({value:otpValue.slice(0,otpLength).join(''),name:name});}},[otpValue,otpLength,name,inputValue,onOTPFilled]);useEffect(function(){otpValue.forEach(function(otp,index){if(!isEmpty(otp)&&!inputType[index]&&isMasked){var newInputType=Array.from(inputType);newInputType[index]='password';setInputType(newInputType);}if(isEmpty(otp)&&inputType[index]){var _newInputType=Array.from(inputType);_newInputType[index]=undefined;setInputType(_newInputType);}});},[otpValue,inputType,isMasked]);var setOtpValueByIndex=function setOtpValueByIndex(_ref2){var value=_ref2.value,index=_ref2.index;var newOtpValue=Array.from(otpValue);newOtpValue[index]=value;setOtpValue(newOtpValue);return newOtpValue.join('');};var focusOnOtpByIndex=function focusOnOtpByIndex(index){var _inputRefs$index,_inputRefs$index$curr;(_inputRefs$index=inputRefs[index])==null?void 0:(_inputRefs$index$curr=_inputRefs$index.current)==null?void 0:_inputRefs$index$curr.focus();if(!isReactNative){var _inputRefs$index2,_inputRefs$index2$cur;(_inputRefs$index2=inputRefs[index])==null?void 0:(_inputRefs$index2$cur=_inputRefs$index2.current)==null?void 0:_inputRefs$index2$cur.select();}};var handleOnChange=function handleOnChange(_ref3){var value=_ref3.value,currentOtpIndex=_ref3.currentOtpIndex;if(value&&value===' '){return;}if(inputValue&&inputValue.length>0){var newOtpValue=Array.from(inputValue);newOtpValue[currentOtpIndex]=value!=null?value:'';setOtpValue(newOtpValue);onChange==null?void 0:onChange({name:name,value:newOtpValue.join('')});}else if(value&&value.trim().length>1){setOtpValue(Array.from(value));onChange==null?void 0:onChange({name:name,value:value.trim().slice(0,otpLength)});var lastFilledIndex=Math.min(value.trim().length,otpLength)-1;focusOnOtpByIndex(lastFilledIndex);}else if(otpValue[currentOtpIndex]!==(value==null?void 0:value.trim())){var _value$trim;var newValue=setOtpValueByIndex({value:(_value$trim=value==null?void 0:value.trim())!=null?_value$trim:'',index:currentOtpIndex});onChange==null?void 0:onChange({name:name,value:newValue});}};var handleOnInput=function handleOnInput(_ref4){var value=_ref4.value,currentOtpIndex=_ref4.currentOtpIndex;if(value&&value.trim().length===1){focusOnOtpByIndex(++currentOtpIndex);}};var handleOnKeyDown=function handleOnKeyDown(_ref5){var key=_ref5.key,code=_ref5.code,event=_ref5.event,currentOtpIndex=_ref5.currentOtpIndex;if(key==='Backspace'||code==='Backspace'||code==='Delete'||key==='Delete'){event.preventDefault==null?void 0:event.preventDefault();if(otpValue[currentOtpIndex]){handleOnChange({value:'',currentOtpIndex:currentOtpIndex});}else {focusOnOtpByIndex(--currentOtpIndex);handleOnChange({value:'',currentOtpIndex:currentOtpIndex});}}else if(key==='ArrowLeft'||code==='ArrowLeft'){event.preventDefault==null?void 0:event.preventDefault();focusOnOtpByIndex(--currentOtpIndex);}else if(key==='ArrowRight'||code==='ArrowRight'){event.preventDefault==null?void 0:event.preventDefault();focusOnOtpByIndex(++currentOtpIndex);}else if(key===' '||code==='Space'){event.preventDefault==null?void 0:event.preventDefault();}};var getHiddenInput=function getHiddenInput(){if(!isReactNative){var _ref6;return jsx("input",{hidden:true,id:inputId,name:name,value:(_ref6=inputValue!=null?inputValue:otpValue.join(''))!=null?_ref6:'',readOnly:true});}return null;};var getOTPInputFields=function getOTPInputFields(){var inputs=[];var _loop=function _loop(index){var _otpValue$index,_Array$from$index;var currentValue=inputValue?otpToArray(inputValue)[index]||'':otpValue[index]||'';var ref=React__default.createRef();var currentInputType;if(isMasked){currentInputType=inputValue?'password':inputType[index];}inputRefs.push(ref);inputs.push(jsx(BaseBox,{flex:1,marginLeft:index==0?'spacing.0':'spacing.3',children:jsx(BaseInput,Object.assign({autoFocus:autoFocus&&index===0,accessibilityLabel:`${index===0?label||accessibilityLabel:''} character ${index+1}`,label:label,hideLabelText:true,id:`${inputId}-${index}`,textAlign:"center",ref:ref,name:name,value:currentValue,maxCharacters:((_otpValue$index=otpValue[index])==null?void 0:_otpValue$index.length)>0?1:undefined,onChange:function onChange(formEvent){return handleOnChange(Object.assign({},formEvent,{currentOtpIndex:index}));},onFocus:function onFocus(formEvent){return _onFocus==null?void 0:_onFocus(Object.assign({},formEvent,{inputIndex:index}));},onBlur:function onBlur(formEvent){return _onBlur==null?void 0:_onBlur(Object.assign({},formEvent,{inputIndex:index}));},onInput:function onInput(formEvent){return handleOnInput(Object.assign({},formEvent,{currentOtpIndex:index}));},onKeyDown:function onKeyDown(keyboardEvent){return handleOnKeyDown(Object.assign({},keyboardEvent,{currentOtpIndex:index}));},isDisabled:isDisabled,placeholder:(_Array$from$index=Array.from(placeholder!=null?placeholder:'')[index])!=null?_Array$from$index:'',isRequired:true,autoCompleteSuggestionType:autoCompleteSuggestionType,keyboardType:keyboardType,keyboardReturnKeyType:keyboardReturnKeyType,validationState:validationState,successText:successText,errorText:errorText,helpText:helpText,hideFormHint:true,type:currentInputType,size:size,valueComponentType:"heading"},makeAnalyticsAttribute(rest)))},`${inputId}-${index}`));};for(var index=0;index<otpLength;index++){_loop(index);}return inputs;};return jsxs(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.OTPInput,testID:testID}),getStyledProps(rest),{children:[jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'row':'column',alignItems:isLabelLeftPositioned?'center':undefined,position:"relative",children:[Boolean(label)&&jsx(FormLabel,{as:"label",position:labelPosition,htmlFor:inputId,size:size,labelSuffix:labelSuffix,labelTrailing:labelTrailing,children:label}),jsxs(BaseBox,{display:"flex",flexDirection:"row",children:[getHiddenInput(),getOTPInputFields()]})]}),jsx(BaseBox,{marginLeft:makeSize(isLabelLeftPositioned?136:0),children:jsx(FormHint,{type:getHintType({validationState:validationState,hasHelpText:Boolean(helpText)}),helpText:helpText,errorText:errorText,successText:successText,helpTextId:helpTextId,errorTextId:errorTextId,successTextId:successTextId,size:size})})]}));};var OTPInput=React__default.forwardRef(_OTPInput);
27
27
 
28
28
  export { OTPInput };
29
29
  //# sourceMappingURL=OTPInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OTPInput.js","sources":["../../../../../../src/components/Input/OTPInput/OTPInput.tsx"],"sourcesContent":["import React, { useEffect, useImperativeHandle, useState } from 'react';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getHintType } from '../BaseInput/BaseInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { FormInputOnEvent } from '~components/Form';\nimport { FormHint, FormLabel } from '~components/Form';\nimport { useFormId } from '~components/Form/useFormId';\nimport type { FormInputOnKeyDownEvent } from '~components/Form/FormTypes';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeSize } from '~utils/makeSize';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype FormInputOnEventWithIndex = ({\n name,\n value,\n inputIndex,\n}: {\n name?: string;\n value?: string;\n inputIndex: number;\n}) => void;\n\nexport type OTPInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'labelSuffix'\n | 'labelTrailing'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'name'\n | 'onChange'\n | 'value'\n | 'isDisabled'\n | 'autoFocus'\n | 'keyboardReturnKeyType'\n | 'keyboardType'\n | 'placeholder'\n | 'testID'\n | 'size'\n | keyof DataAnalyticsAttribute\n> & {\n /**\n * Determines the number of input fields to show for the OTP\n * @default 6\n */\n otpLength?: 4 | 6;\n /**\n * The callback function to be invoked when all the values of the OTPInput are filled\n */\n onOTPFilled?: FormInputOnEvent;\n /**\n * Masks input characters in all the fields\n */\n isMasked?: boolean;\n /**\n * Determines what autoComplete suggestion type to show. Defaults to `oneTimeCode`.\n *\n * It's not recommended to turn this off in favor of otp input practices.\n *\n *\n * Internally it'll render platform specific attributes:\n *\n * - web: `autocomplete`\n * - iOS: `textContentType`\n * - android: `autoComplete`\n *\n */\n autoCompleteSuggestionType?: Extract<\n BaseInputProps['autoCompleteSuggestionType'],\n 'none' | 'oneTimeCode'\n >;\n /**\n * The callback function to be invoked when one of the input fields gets focus\n */\n onFocus?: FormInputOnEventWithIndex;\n /**\n * The callback function to be invoked when one of the input fields is blurred\n */\n onBlur?: FormInputOnEventWithIndex;\n} & StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype OTPInputPropsWithA11yLabel = {\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 OTPInputPropsWithLabel = {\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 OTPInputProps = (OTPInputPropsWithA11yLabel | OTPInputPropsWithLabel) & OTPInputCommonProps;\n\nconst isReactNative = getPlatformType() === 'react-native';\n\n/**\n * Converts a string value of otp to array if passed otherwise returns an array of 6 empty strings\n */\nconst otpToArray = (code?: string): string[] => code?.split('') ?? Array(6).fill('');\n\n/**\n * OTPInput component can be used for accepting OTPs sent to users for authentication/verification purposes.\n *\n * ## Usage\n *\n * ```tsx\n * <OTPInput\n * label=\"Enter OTP\"\n * name=\"otpInput\"\n * onChange={({ name, value }): void => console.log({ name, value })}\n * onOTPFilled={({ name, value }): void => console.log({ name, value })}\n * />\n * ```\n */\nconst _OTPInput: React.ForwardRefRenderFunction<HTMLInputElement[], OTPInputProps> = (\n {\n autoFocus,\n errorText,\n helpText,\n isDisabled,\n keyboardReturnKeyType,\n keyboardType = 'decimal',\n label,\n accessibilityLabel,\n labelPosition,\n labelSuffix,\n labelTrailing,\n name,\n onChange,\n onFocus,\n onBlur,\n onOTPFilled,\n otpLength = 6,\n placeholder,\n successText,\n validationState,\n value: inputValue,\n isMasked,\n autoCompleteSuggestionType = 'oneTimeCode',\n testID,\n size = 'medium',\n ...rest\n },\n incomingRef,\n) => {\n const inputRefs: React.RefObject<HTMLInputElement>[] = [];\n const [otpValue, setOtpValue] = useState<string[]>(otpToArray(inputValue));\n const [inputType, setInputType] = useState<('password' | undefined)[]>([]);\n const isLabelLeftPositioned = labelPosition === 'left';\n const { inputId, helpTextId, errorTextId, successTextId } = useFormId('otp');\n\n useImperativeHandle(\n incomingRef,\n () => {\n return inputRefs.map((ref) => ref.current!);\n },\n [inputRefs],\n );\n\n useEffect(() => {\n // Effect for calling `onOTPFilled` callback\n if (inputValue && inputValue.length >= otpLength) {\n // callback for when the OTPInput is controlled and inputValue reaches the same or greater length as the otpLength\n onOTPFilled?.({ value: inputValue.slice(0, otpLength), name });\n } else if (!inputValue && otpValue.join('').length >= otpLength) {\n // callback for when the OTPInput is uncontrolled and otpValue stored in state reaches the same or greater length as the otpLength\n onOTPFilled?.({ value: otpValue.slice(0, otpLength).join(''), name });\n }\n }, [otpValue, otpLength, name, inputValue, onOTPFilled]);\n\n useEffect(() => {\n /* We want to disable the password managers for OTPInput when isMasked is set.\n The issue with only setting autocomplete='off' is that its not an enforcement but a suggestion to the browser to follow.\n This workaround unsets type on first render and sets it to `password` only once a value is entered by the user.\n */\n otpValue.forEach((otp, index) => {\n // Set inputType as 'password' only when a value is entered when isMasked is set\n if (!isEmpty(otp) && !inputType[index] && isMasked) {\n const newInputType = Array.from(inputType);\n newInputType[index] = 'password';\n setInputType(newInputType);\n }\n // Cleanup the inputType array whenever the value is empty but inputType[index] is set\n if (isEmpty(otp) && inputType[index]) {\n const newInputType = Array.from(inputType);\n newInputType[index] = undefined;\n setInputType(newInputType);\n }\n });\n }, [otpValue, inputType, isMasked]);\n\n /**\n * Changes the value of the otp at a given index and updates the otpValue stored in state\n *\n * @param {{ value: string; index: number }} { value, index }\n * @returns {string} updated otpValue\n */\n const setOtpValueByIndex = ({ value, index }: { value: string; index: number }): string => {\n const newOtpValue = Array.from(otpValue);\n newOtpValue[index] = value;\n setOtpValue(newOtpValue);\n return newOtpValue.join('');\n };\n\n /**\n * Sets focus to the desired otp input by index\n *\n * @param {number} index the index of the otp input to be focused\n */\n const focusOnOtpByIndex = (index: number): void => {\n inputRefs[index]?.current?.focus();\n if (!isReactNative) {\n // React Native doesn't support imperatively selecting the value of input\n inputRefs[index]?.current?.select();\n }\n };\n\n const handleOnChange = ({\n value,\n currentOtpIndex,\n }: {\n value?: string;\n currentOtpIndex: number;\n }): void => {\n if (value && value === ' ') {\n // React native doesn't support `event.preventDefault()` hence have to add this check to ensure that empty space is not allowed\n return;\n }\n if (inputValue && inputValue.length > 0) {\n // When OTPInput is controlled, set the otpValue as the consumer passed `inputValue` and append the value on current index based on user's input.\n // User's input will not reflect on the otp but will trigger `onChange` callback with the user's input appended so that the consumer can take appropriate action.\n const newOtpValue = Array.from(inputValue);\n newOtpValue[currentOtpIndex] = value ?? '';\n setOtpValue(newOtpValue);\n onChange?.({ name, value: newOtpValue.join('') });\n } else if (value && value.trim().length > 1) {\n // When the entered value is more that 1 character (when value is pasted), set the otpValue to the newly received value.\n // Could have used `onPaste` for web to achieve this but 1. React Native doesn't support onPaste and 2. Safari's autofill on web doesn't trigger onPaste\n setOtpValue(Array.from(value));\n onChange?.({ name, value: value.trim().slice(0, otpLength) });\n } else if (otpValue[currentOtpIndex] !== value?.trim()) {\n // Set the value at the current index to the entered value\n // only as long as its not the same as the already existing value (this prevents `onChange` being triggered unnecessarily)\n const newValue = setOtpValueByIndex({\n value: value?.trim() ?? '',\n index: currentOtpIndex,\n });\n onChange?.({ name, value: newValue });\n }\n };\n\n const handleOnInput = ({\n value,\n currentOtpIndex,\n }: {\n value?: string;\n currentOtpIndex: number;\n }): void => {\n // Moves focus to next input whenever a value is entered in the current input\n if (value && value.trim().length === 1) {\n focusOnOtpByIndex(++currentOtpIndex);\n }\n };\n\n const handleOnKeyDown = ({\n key,\n code,\n event,\n currentOtpIndex,\n }: FormInputOnKeyDownEvent & { currentOtpIndex: number }): void => {\n if (key === 'Backspace' || code === 'Backspace' || code === 'Delete' || key === 'Delete') {\n event.preventDefault?.();\n if (otpValue[currentOtpIndex]) {\n // Clear the value at the current index if value exists\n handleOnChange({ value: '', currentOtpIndex });\n } else {\n // Move focus to the previous input if the current input is empty\n // and clear the value at the new active (previous) index\n focusOnOtpByIndex(--currentOtpIndex);\n handleOnChange({ value: '', currentOtpIndex });\n }\n } else if (key === 'ArrowLeft' || code === 'ArrowLeft') {\n event.preventDefault?.();\n focusOnOtpByIndex(--currentOtpIndex);\n } else if (key === 'ArrowRight' || code === 'ArrowRight') {\n event.preventDefault?.();\n focusOnOtpByIndex(++currentOtpIndex);\n } else if (key === ' ' || code === 'Space') {\n event.preventDefault?.();\n }\n };\n\n const getHiddenInput = (): React.ReactNode => {\n if (!isReactNative) {\n return (\n <input\n hidden={true}\n id={inputId}\n name={name}\n value={inputValue ?? otpValue.join('') ?? ''}\n readOnly\n />\n );\n }\n return null;\n };\n\n const getOTPInputFields = (): React.ReactNode => {\n const inputs = [];\n for (let index = 0; index < otpLength; index++) {\n const currentValue = inputValue ? otpToArray(inputValue)[index] || '' : otpValue[index] || '';\n const ref = React.createRef<HTMLInputElement>();\n // if an inputValue is passed (controlled) and isMasked is set, inputType will always be password\n let currentInputType: 'password' | undefined;\n if (isMasked) {\n // if inputValue is passed (controlled component) then the inputType will always be password\n currentInputType = inputValue ? 'password' : inputType[index];\n }\n inputRefs.push(ref);\n inputs.push(\n <BaseBox\n flex={1}\n marginLeft={index == 0 ? 'spacing.0' : 'spacing.3'}\n key={`${inputId}-${index}`}\n >\n <BaseInput\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus && index === 0}\n accessibilityLabel={`${index === 0 ? label || accessibilityLabel : ''} character ${\n index + 1\n }`}\n label={label}\n hideLabelText={true}\n id={`${inputId}-${index}`}\n textAlign=\"center\"\n ref={ref as never}\n name={name}\n value={currentValue}\n maxCharacters={otpValue[index]?.length > 0 ? 1 : undefined}\n onChange={(formEvent) => handleOnChange({ ...formEvent, currentOtpIndex: index })}\n onFocus={(formEvent) => onFocus?.({ ...formEvent, inputIndex: index })}\n onBlur={(formEvent) => onBlur?.({ ...formEvent, inputIndex: index })}\n onInput={(formEvent) => handleOnInput({ ...formEvent, currentOtpIndex: index })}\n onKeyDown={(keyboardEvent) =>\n handleOnKeyDown({ ...keyboardEvent, currentOtpIndex: index })\n }\n isDisabled={isDisabled}\n placeholder={Array.from(placeholder ?? '')[index] ?? ''}\n isRequired={true}\n autoCompleteSuggestionType={autoCompleteSuggestionType}\n keyboardType={keyboardType}\n keyboardReturnKeyType={keyboardReturnKeyType}\n validationState={validationState}\n successText={successText}\n errorText={errorText}\n helpText={helpText}\n hideFormHint={true}\n type={currentInputType}\n size={size}\n valueComponentType=\"heading\"\n {...makeAnalyticsAttribute(rest)}\n />\n </BaseBox>,\n );\n }\n return inputs;\n };\n\n return (\n <BaseBox {...metaAttribute({ name: MetaConstants.OTPInput, testID })} {...getStyledProps(rest)}>\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'row' : 'column'}\n alignItems={isLabelLeftPositioned ? 'center' : undefined}\n position=\"relative\"\n >\n {Boolean(label) && (\n <FormLabel\n as=\"label\"\n position={labelPosition}\n htmlFor={inputId}\n size={size}\n labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n >\n {label}\n </FormLabel>\n )}\n <BaseBox display=\"flex\" flexDirection=\"row\">\n {getHiddenInput()}\n {getOTPInputFields()}\n </BaseBox>\n </BaseBox>\n {/* the magic number 136 is basically max-width of label i.e 120 and then right margin i.e 16 which is the spacing between label and input field */}\n {/*Refer `BaseInput`'s implementation of FormHint which uses similar logic */}\n <BaseBox marginLeft={makeSize(isLabelLeftPositioned ? 136 : 0)}>\n <FormHint\n type={getHintType({ validationState, hasHelpText: Boolean(helpText) })}\n helpText={helpText}\n errorText={errorText}\n successText={successText}\n helpTextId={helpTextId}\n errorTextId={errorTextId}\n successTextId={successTextId}\n size={size}\n />\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst OTPInput = React.forwardRef<HTMLInputElement[], OTPInputProps>(_OTPInput);\n\nexport type { OTPInputProps };\nexport { OTPInput };\n"],"names":["isReactNative","getPlatformType","otpToArray","code","_code$split","split","Array","fill","_OTPInput","_ref","incomingRef","autoFocus","errorText","helpText","isDisabled","keyboardReturnKeyType","_ref$keyboardType","keyboardType","label","accessibilityLabel","labelPosition","labelSuffix","labelTrailing","name","onChange","onFocus","onBlur","onOTPFilled","_ref$otpLength","otpLength","placeholder","successText","validationState","inputValue","value","isMasked","_ref$autoCompleteSugg","autoCompleteSuggestionType","testID","_ref$size","size","rest","_objectWithoutProperties","_excluded","inputRefs","_useState","useState","_useState2","_slicedToArray","otpValue","setOtpValue","_useState3","_useState4","inputType","setInputType","isLabelLeftPositioned","_useFormId","useFormId","inputId","helpTextId","errorTextId","successTextId","useImperativeHandle","map","ref","current","useEffect","length","slice","join","forEach","otp","index","isEmpty","newInputType","from","undefined","setOtpValueByIndex","_ref2","newOtpValue","focusOnOtpByIndex","_inputRefs$index","_inputRefs$index$curr","focus","_inputRefs$index2","_inputRefs$index2$cur","select","handleOnChange","_ref3","currentOtpIndex","trim","_value$trim","newValue","handleOnInput","_ref4","handleOnKeyDown","_ref5","key","event","preventDefault","getHiddenInput","_ref6","_jsx","hidden","id","readOnly","getOTPInputFields","inputs","_loop","_otpValue$index","_Array$from$index","currentValue","React","createRef","currentInputType","push","BaseBox","flex","marginLeft","children","BaseInput","Object","assign","hideLabelText","textAlign","maxCharacters","formEvent","inputIndex","onInput","onKeyDown","keyboardEvent","isRequired","hideFormHint","type","valueComponentType","makeAnalyticsAttribute","_jsxs","metaAttribute","MetaConstants","OTPInput","getStyledProps","display","flexDirection","alignItems","position","Boolean","FormLabel","as","htmlFor","makeSize","FormHint","getHintType","hasHelpText","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;0dAyHA,IAAMA,aAAa,CAAGC,eAAe,EAAE,GAAK,cAAc,CAK1D,IAAMC,UAAU,CAAG,SAAbA,UAAUA,CAAIC,IAAa,CAAA,CAAA,IAAAC,WAAA,CAAA,OAAA,CAAAA,WAAA,CAAeD,IAAI,EAAA,IAAA,CAAA,KAAA,CAAA,CAAJA,IAAI,CAAEE,KAAK,CAAC,EAAE,CAAC,GAAA,IAAA,CAAAD,WAAA,CAAIE,KAAK,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,EAAE,CAAC,CAgBpF,CAAA,CAAA,IAAMC,SAA4E,CAAG,SAA/EA,SAA4EA,CAAAC,IAAA,CA6BhFC,WAAW,CACR,CAAA,IA5BDC,SAAS,CAAAF,IAAA,CAATE,SAAS,CACTC,SAAS,CAAAH,IAAA,CAATG,SAAS,CACTC,QAAQ,CAAAJ,IAAA,CAARI,QAAQ,CACRC,UAAU,CAAAL,IAAA,CAAVK,UAAU,CACVC,qBAAqB,CAAAN,IAAA,CAArBM,qBAAqB,CAAAC,iBAAA,CAAAP,IAAA,CACrBQ,YAAY,CAAZA,YAAY,CAAAD,iBAAA,GAAA,KAAA,CAAA,CAAG,SAAS,CAAAA,iBAAA,CACxBE,KAAK,CAAAT,IAAA,CAALS,KAAK,CACLC,kBAAkB,CAAAV,IAAA,CAAlBU,kBAAkB,CAClBC,aAAa,CAAAX,IAAA,CAAbW,aAAa,CACbC,WAAW,CAAAZ,IAAA,CAAXY,WAAW,CACXC,aAAa,CAAAb,IAAA,CAAba,aAAa,CACbC,IAAI,CAAAd,IAAA,CAAJc,IAAI,CACJC,QAAQ,CAAAf,IAAA,CAARe,QAAQ,CACRC,QAAO,CAAAhB,IA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AEK,IAAAmG,QAAQ,CAAG3B,cAAK,CAACyC,UAAU,CAAoCjJ,SAAS;;;;"}
1
+ {"version":3,"file":"OTPInput.js","sources":["../../../../../../src/components/Input/OTPInput/OTPInput.tsx"],"sourcesContent":["import React, { useEffect, useImperativeHandle, useState } from 'react';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getHintType } from '../BaseInput/BaseInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { FormInputOnEvent } from '~components/Form';\nimport { FormHint, FormLabel } from '~components/Form';\nimport { useFormId } from '~components/Form/useFormId';\nimport type { FormInputOnKeyDownEvent } from '~components/Form/FormTypes';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeSize } from '~utils/makeSize';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype FormInputOnEventWithIndex = ({\n name,\n value,\n inputIndex,\n}: {\n name?: string;\n value?: string;\n inputIndex: number;\n}) => void;\n\nexport type OTPInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'labelSuffix'\n | 'labelTrailing'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'name'\n | 'onChange'\n | 'value'\n | 'isDisabled'\n | 'autoFocus'\n | 'keyboardReturnKeyType'\n | 'keyboardType'\n | 'placeholder'\n | 'testID'\n | 'size'\n | keyof DataAnalyticsAttribute\n> & {\n /**\n * Determines the number of input fields to show for the OTP\n * @default 6\n */\n otpLength?: 4 | 6;\n /**\n * The callback function to be invoked when all the values of the OTPInput are filled\n */\n onOTPFilled?: FormInputOnEvent;\n /**\n * Masks input characters in all the fields\n */\n isMasked?: boolean;\n /**\n * Determines what autoComplete suggestion type to show. Defaults to `oneTimeCode`.\n *\n * It's not recommended to turn this off in favor of otp input practices.\n *\n *\n * Internally it'll render platform specific attributes:\n *\n * - web: `autocomplete`\n * - iOS: `textContentType`\n * - android: `autoComplete`\n *\n */\n autoCompleteSuggestionType?: Extract<\n BaseInputProps['autoCompleteSuggestionType'],\n 'none' | 'oneTimeCode'\n >;\n /**\n * The callback function to be invoked when one of the input fields gets focus\n */\n onFocus?: FormInputOnEventWithIndex;\n /**\n * The callback function to be invoked when one of the input fields is blurred\n */\n onBlur?: FormInputOnEventWithIndex;\n} & StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype OTPInputPropsWithA11yLabel = {\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 OTPInputPropsWithLabel = {\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 OTPInputProps = (OTPInputPropsWithA11yLabel | OTPInputPropsWithLabel) & OTPInputCommonProps;\n\nconst isReactNative = getPlatformType() === 'react-native';\n\n/**\n * Converts a string value of otp to array if passed otherwise returns an array of 6 empty strings\n */\nconst otpToArray = (code?: string): string[] => code?.split('') ?? Array(6).fill('');\n\n/**\n * OTPInput component can be used for accepting OTPs sent to users for authentication/verification purposes.\n *\n * ## Usage\n *\n * ```tsx\n * <OTPInput\n * label=\"Enter OTP\"\n * name=\"otpInput\"\n * onChange={({ name, value }): void => console.log({ name, value })}\n * onOTPFilled={({ name, value }): void => console.log({ name, value })}\n * />\n * ```\n */\nconst _OTPInput: React.ForwardRefRenderFunction<HTMLInputElement[], OTPInputProps> = (\n {\n autoFocus,\n errorText,\n helpText,\n isDisabled,\n keyboardReturnKeyType,\n keyboardType = 'decimal',\n label,\n accessibilityLabel,\n labelPosition,\n labelSuffix,\n labelTrailing,\n name,\n onChange,\n onFocus,\n onBlur,\n onOTPFilled,\n otpLength = 6,\n placeholder,\n successText,\n validationState,\n value: inputValue,\n isMasked,\n autoCompleteSuggestionType = 'oneTimeCode',\n testID,\n size = 'medium',\n ...rest\n },\n incomingRef,\n) => {\n const inputRefs: React.RefObject<HTMLInputElement>[] = [];\n const [otpValue, setOtpValue] = useState<string[]>(otpToArray(inputValue));\n const [inputType, setInputType] = useState<('password' | undefined)[]>([]);\n const isLabelLeftPositioned = labelPosition === 'left';\n const { inputId, helpTextId, errorTextId, successTextId } = useFormId('otp');\n\n useImperativeHandle(\n incomingRef,\n () => {\n return inputRefs.map((ref) => ref.current!);\n },\n [inputRefs],\n );\n\n useEffect(() => {\n // Effect for calling `onOTPFilled` callback\n if (inputValue && inputValue.length >= otpLength) {\n // callback for when the OTPInput is controlled and inputValue reaches the same or greater length as the otpLength\n onOTPFilled?.({ value: inputValue.slice(0, otpLength), name });\n } else if (!inputValue && otpValue.join('').length >= otpLength) {\n // callback for when the OTPInput is uncontrolled and otpValue stored in state reaches the same or greater length as the otpLength\n onOTPFilled?.({ value: otpValue.slice(0, otpLength).join(''), name });\n }\n }, [otpValue, otpLength, name, inputValue, onOTPFilled]);\n\n useEffect(() => {\n /* We want to disable the password managers for OTPInput when isMasked is set.\n The issue with only setting autocomplete='off' is that its not an enforcement but a suggestion to the browser to follow.\n This workaround unsets type on first render and sets it to `password` only once a value is entered by the user.\n */\n otpValue.forEach((otp, index) => {\n // Set inputType as 'password' only when a value is entered when isMasked is set\n if (!isEmpty(otp) && !inputType[index] && isMasked) {\n const newInputType = Array.from(inputType);\n newInputType[index] = 'password';\n setInputType(newInputType);\n }\n // Cleanup the inputType array whenever the value is empty but inputType[index] is set\n if (isEmpty(otp) && inputType[index]) {\n const newInputType = Array.from(inputType);\n newInputType[index] = undefined;\n setInputType(newInputType);\n }\n });\n }, [otpValue, inputType, isMasked]);\n\n /**\n * Changes the value of the otp at a given index and updates the otpValue stored in state\n *\n * @param {{ value: string; index: number }} { value, index }\n * @returns {string} updated otpValue\n */\n const setOtpValueByIndex = ({ value, index }: { value: string; index: number }): string => {\n const newOtpValue = Array.from(otpValue);\n newOtpValue[index] = value;\n setOtpValue(newOtpValue);\n return newOtpValue.join('');\n };\n\n /**\n * Sets focus to the desired otp input by index\n *\n * @param {number} index the index of the otp input to be focused\n */\n const focusOnOtpByIndex = (index: number): void => {\n inputRefs[index]?.current?.focus();\n if (!isReactNative) {\n // React Native doesn't support imperatively selecting the value of input\n inputRefs[index]?.current?.select();\n }\n };\n\n const handleOnChange = ({\n value,\n currentOtpIndex,\n }: {\n value?: string;\n currentOtpIndex: number;\n }): void => {\n if (value && value === ' ') {\n // React native doesn't support `event.preventDefault()` hence have to add this check to ensure that empty space is not allowed\n return;\n }\n if (inputValue && inputValue.length > 0) {\n // When OTPInput is controlled, set the otpValue as the consumer passed `inputValue` and append the value on current index based on user's input.\n // User's input will not reflect on the otp but will trigger `onChange` callback with the user's input appended so that the consumer can take appropriate action.\n const newOtpValue = Array.from(inputValue);\n newOtpValue[currentOtpIndex] = value ?? '';\n setOtpValue(newOtpValue);\n onChange?.({ name, value: newOtpValue.join('') });\n } else if (value && value.trim().length > 1) {\n // When the entered value is more that 1 character (when value is pasted), set the otpValue to the newly received value.\n // Could have used `onPaste` for web to achieve this but 1. React Native doesn't support onPaste and 2. Safari's autofill on web doesn't trigger onPaste\n setOtpValue(Array.from(value));\n onChange?.({ name, value: value.trim().slice(0, otpLength) });\n // Move focus to the last filled input box after paste\n const lastFilledIndex = Math.min(value.trim().length, otpLength) - 1;\n focusOnOtpByIndex(lastFilledIndex);\n } else if (otpValue[currentOtpIndex] !== value?.trim()) {\n // Set the value at the current index to the entered value\n // only as long as its not the same as the already existing value (this prevents `onChange` being triggered unnecessarily)\n const newValue = setOtpValueByIndex({\n value: value?.trim() ?? '',\n index: currentOtpIndex,\n });\n onChange?.({ name, value: newValue });\n }\n };\n\n const handleOnInput = ({\n value,\n currentOtpIndex,\n }: {\n value?: string;\n currentOtpIndex: number;\n }): void => {\n // Moves focus to next input whenever a value is entered in the current input\n if (value && value.trim().length === 1) {\n focusOnOtpByIndex(++currentOtpIndex);\n }\n };\n\n const handleOnKeyDown = ({\n key,\n code,\n event,\n currentOtpIndex,\n }: FormInputOnKeyDownEvent & { currentOtpIndex: number }): void => {\n if (key === 'Backspace' || code === 'Backspace' || code === 'Delete' || key === 'Delete') {\n event.preventDefault?.();\n if (otpValue[currentOtpIndex]) {\n // Clear the value at the current index if value exists\n handleOnChange({ value: '', currentOtpIndex });\n } else {\n // Move focus to the previous input if the current input is empty\n // and clear the value at the new active (previous) index\n focusOnOtpByIndex(--currentOtpIndex);\n handleOnChange({ value: '', currentOtpIndex });\n }\n } else if (key === 'ArrowLeft' || code === 'ArrowLeft') {\n event.preventDefault?.();\n focusOnOtpByIndex(--currentOtpIndex);\n } else if (key === 'ArrowRight' || code === 'ArrowRight') {\n event.preventDefault?.();\n focusOnOtpByIndex(++currentOtpIndex);\n } else if (key === ' ' || code === 'Space') {\n event.preventDefault?.();\n }\n };\n\n const getHiddenInput = (): React.ReactNode => {\n if (!isReactNative) {\n return (\n <input\n hidden={true}\n id={inputId}\n name={name}\n value={inputValue ?? otpValue.join('') ?? ''}\n readOnly\n />\n );\n }\n return null;\n };\n\n const getOTPInputFields = (): React.ReactNode => {\n const inputs = [];\n for (let index = 0; index < otpLength; index++) {\n const currentValue = inputValue ? otpToArray(inputValue)[index] || '' : otpValue[index] || '';\n const ref = React.createRef<HTMLInputElement>();\n // if an inputValue is passed (controlled) and isMasked is set, inputType will always be password\n let currentInputType: 'password' | undefined;\n if (isMasked) {\n // if inputValue is passed (controlled component) then the inputType will always be password\n currentInputType = inputValue ? 'password' : inputType[index];\n }\n inputRefs.push(ref);\n inputs.push(\n <BaseBox\n flex={1}\n marginLeft={index == 0 ? 'spacing.0' : 'spacing.3'}\n key={`${inputId}-${index}`}\n >\n <BaseInput\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus && index === 0}\n accessibilityLabel={`${index === 0 ? label || accessibilityLabel : ''} character ${\n index + 1\n }`}\n label={label}\n hideLabelText={true}\n id={`${inputId}-${index}`}\n textAlign=\"center\"\n ref={ref as never}\n name={name}\n value={currentValue}\n maxCharacters={otpValue[index]?.length > 0 ? 1 : undefined}\n onChange={(formEvent) => handleOnChange({ ...formEvent, currentOtpIndex: index })}\n onFocus={(formEvent) => onFocus?.({ ...formEvent, inputIndex: index })}\n onBlur={(formEvent) => onBlur?.({ ...formEvent, inputIndex: index })}\n onInput={(formEvent) => handleOnInput({ ...formEvent, currentOtpIndex: index })}\n onKeyDown={(keyboardEvent) =>\n handleOnKeyDown({ ...keyboardEvent, currentOtpIndex: index })\n }\n isDisabled={isDisabled}\n placeholder={Array.from(placeholder ?? '')[index] ?? ''}\n isRequired={true}\n autoCompleteSuggestionType={autoCompleteSuggestionType}\n keyboardType={keyboardType}\n keyboardReturnKeyType={keyboardReturnKeyType}\n validationState={validationState}\n successText={successText}\n errorText={errorText}\n helpText={helpText}\n hideFormHint={true}\n type={currentInputType}\n size={size}\n valueComponentType=\"heading\"\n {...makeAnalyticsAttribute(rest)}\n />\n </BaseBox>,\n );\n }\n return inputs;\n };\n\n return (\n <BaseBox {...metaAttribute({ name: MetaConstants.OTPInput, testID })} {...getStyledProps(rest)}>\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'row' : 'column'}\n alignItems={isLabelLeftPositioned ? 'center' : undefined}\n position=\"relative\"\n >\n {Boolean(label) && (\n <FormLabel\n as=\"label\"\n position={labelPosition}\n htmlFor={inputId}\n size={size}\n labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n >\n {label}\n </FormLabel>\n )}\n <BaseBox display=\"flex\" flexDirection=\"row\">\n {getHiddenInput()}\n {getOTPInputFields()}\n </BaseBox>\n </BaseBox>\n {/* the magic number 136 is basically max-width of label i.e 120 and then right margin i.e 16 which is the spacing between label and input field */}\n {/*Refer `BaseInput`'s implementation of FormHint which uses similar logic */}\n <BaseBox marginLeft={makeSize(isLabelLeftPositioned ? 136 : 0)}>\n <FormHint\n type={getHintType({ validationState, hasHelpText: Boolean(helpText) })}\n helpText={helpText}\n errorText={errorText}\n successText={successText}\n helpTextId={helpTextId}\n errorTextId={errorTextId}\n successTextId={successTextId}\n size={size}\n />\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst OTPInput = React.forwardRef<HTMLInputElement[], OTPInputProps>(_OTPInput);\n\nexport type { OTPInputProps };\nexport { OTPInput };\n"],"names":["isReactNative","getPlatformType","otpToArray","code","_code$split","split","Array","fill","_OTPInput","_ref","incomingRef","autoFocus","errorText","helpText","isDisabled","keyboardReturnKeyType","_ref$keyboardType","keyboardType","label","accessibilityLabel","labelPosition","labelSuffix","labelTrailing","name","onChange","onFocus","onBlur","onOTPFilled","_ref$otpLength","otpLength","placeholder","successText","validationState","inputValue","value","isMasked","_ref$autoCompleteSugg","autoCompleteSuggestionType","testID","_ref$size","size","rest","_objectWithoutProperties","_excluded","inputRefs","_useState","useState","_useState2","_slicedToArray","otpValue","setOtpValue","_useState3","_useState4","inputType","setInputType","isLabelLeftPositioned","_useFormId","useFormId","inputId","helpTextId","errorTextId","successTextId","useImperativeHandle","map","ref","current","useEffect","length","slice","join","forEach","otp","index","isEmpty","newInputType","from","undefined","setOtpValueByIndex","_ref2","newOtpValue","focusOnOtpByIndex","_inputRefs$index","_inputRefs$index$curr","focus","_inputRefs$index2","_inputRefs$index2$cur","select","handleOnChange","_ref3","currentOtpIndex","trim","lastFilledIndex","Math","min","_value$trim","newValue","handleOnInput","_ref4","handleOnKeyDown","_ref5","key","event","preventDefault","getHiddenInput","_ref6","_jsx","hidden","id","readOnly","getOTPInputFields","inputs","_loop","_otpValue$index","_Array$from$index","currentValue","React","createRef","currentInputType","push","BaseBox","flex","marginLeft","children","BaseInput","Object","assign","hideLabelText","textAlign","maxCharacters","formEvent","inputIndex","onInput","onKeyDown","keyboardEvent","isRequired","hideFormHint","type","valueComponentType","makeAnalyticsAttribute","_jsxs","metaAttribute","MetaConstants","OTPInput","getStyledProps","display","flexDirection","alignItems","position","Boolean","FormLabel","as","htmlFor","makeSize","FormHint","getHintType","hasHelpText","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;0dAyHA,IAAMA,aAAa,CAAGC,eAAe,EAAE,GAAK,cAAc,CAK1D,IAAMC,UAAU,CAAG,SAAbA,UAAUA,CAAIC,IAAa,CAAAC,CAAAA,IAAAA,WAAA,CAAAA,OAAAA,CAAAA,WAAA,CAAeD,IAAI,EAAJA,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,IAAI,CAAEE,KAAK,CAAC,EAAE,CAAC,GAAAD,IAAAA,CAAAA,WAAA,CAAIE,KAAK,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,EAAE,CAAC,CAgBpF,CAAA,CAAA,IAAMC,SAA4E,CAAG,SAA/EA,SAA4EA,CAAAC,IAAA,CA6BhFC,WAAW,CACR,CAAA,IA5BDC,SAAS,CAAAF,IAAA,CAATE,SAAS,CACTC,SAAS,CAAAH,IAAA,CAATG,SAAS,CACTC,QAAQ,CAAAJ,IAAA,CAARI,QAAQ,CACRC,UAAU,CAAAL,IAAA,CAAVK,UAAU,CACVC,qBAAqB,CAAAN,IAAA,CAArBM,qBAAqB,CAAAC,iBAAA,CAAAP,IAAA,CACrBQ,YAAY,CAAZA,YAAY,CAAAD,iBAAA,GAAA,KAAA,CAAA,CAAG,SAAS,CAAAA,iBAAA,CACxBE,KAAK,CAAAT,IAAA,CAALS,KAAK,CACLC,kBAAkB,CAAAV,IAAA,CAAlBU,kBAAkB,CAClBC,aAAa,CAAAX,IAAA,CAAbW,aAAa,CACbC,WAAW,CAAAZ,IAAA,CAAXY,WAAW,CACXC,aAAa,CAAAb,IAAA,CAAba,aAAa,CACbC,IAAI,CAAAd,IAAA,CAAJc,IAAI,CACJC,QAAQ,CAAAf,IAAA,CAARe,QAAQ,CACRC,QAAO,CAAAhB,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AAU,CAAEA,UAAW,CACvBC,WAAW,CAAEA,WAAY,CACzBC,aAAa,CAAEA,aAAc,CAC7BrB,IAAI,CAAEA,IAAK,CACZ,CAAC,CACK,CAAC,CAAA,CAAA,CACH,CAAC,CAEd,CAAC,CAEK,IAAAsG,QAAQ,CAAG3B,cAAK,CAACyC,UAAU,CAAoCpJ,SAAS;;;;"}
@@ -1,6 +1,6 @@
1
1
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
2
2
 
3
- var DEFAULT_CDN_PATH='https://cdn.jsdelivr.net/npm/@razorpay/blade@latest/assets/spark';function preloadRazorSenseAssets(){return _preloadRazorSenseAssets.apply(this,arguments);}function _preloadRazorSenseAssets(){_preloadRazorSenseAssets=_asyncToGenerator(function*(){var _preset=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'default';var _assetsPath=arguments.length>1&&arguments[1]!==undefined?arguments[1]:DEFAULT_CDN_PATH;});return _preloadRazorSenseAssets.apply(this,arguments);}function loadImage(_x){return _loadImage.apply(this,arguments);}function _loadImage(){_loadImage=_asyncToGenerator(function*(_src){return Promise.reject(new Error('loadImage is not supported on native'));});return _loadImage.apply(this,arguments);}function loadVideo(_x2){return _loadVideo.apply(this,arguments);}function _loadVideo(){_loadVideo=_asyncToGenerator(function*(_src){return Promise.reject(new Error('loadVideo is not supported on native'));});return _loadVideo.apply(this,arguments);}function isSafari(){return false;}function bestGuessBrowserZoom(){return 1;}function getDefaultAssets(_assetsPath){return {};}function getPresetAssets(_preset,_assetsPath){return {};}function resolveConfig(_props,_assetsPath){return {};}
3
+ var DEFAULT_CDN_PATH='https://cdn.jsdelivr.net/npm/@razorpay/blade@latest/assets/spark';function preloadRazorSenseAssets(){return _preloadRazorSenseAssets.apply(this,arguments);}function _preloadRazorSenseAssets(){_preloadRazorSenseAssets=_asyncToGenerator(function*(){var _preset=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'default';var _assetsPath=arguments.length>1&&arguments[1]!==undefined?arguments[1]:DEFAULT_CDN_PATH;var _colorScheme=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'light';});return _preloadRazorSenseAssets.apply(this,arguments);}function loadImage(_x){return _loadImage.apply(this,arguments);}function _loadImage(){_loadImage=_asyncToGenerator(function*(_src){return Promise.reject(new Error('loadImage is not supported on native'));});return _loadImage.apply(this,arguments);}function loadVideo(_x2){return _loadVideo.apply(this,arguments);}function _loadVideo(){_loadVideo=_asyncToGenerator(function*(_src){return Promise.reject(new Error('loadVideo is not supported on native'));});return _loadVideo.apply(this,arguments);}function isSafari(){return false;}function bestGuessBrowserZoom(){return 1;}function getDefaultAssets(_assetsPath){return {};}function getPresetAssets(_preset,_assetsPath){var _isDark=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;return {};}function resolveConfig(_props,_assetsPath){var _isDark=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;return {};}
4
4
 
5
5
  export { DEFAULT_CDN_PATH, bestGuessBrowserZoom, getDefaultAssets, getPresetAssets, isSafari, loadImage, loadVideo, preloadRazorSenseAssets, resolveConfig };
6
6
  //# sourceMappingURL=utils.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.native.js","sources":["../../../../../../src/components/Spark/RzpGlass/utils.native.ts"],"sourcesContent":["import type { RzpGlassPreset } from './presets';\n\nconst DEFAULT_CDN_PATH = 'https://cdn.jsdelivr.net/npm/@razorpay/blade@latest/assets/spark';\n\nasync function preloadRazorSenseAssets(\n _preset: RzpGlassPreset = 'default',\n _assetsPath: string = DEFAULT_CDN_PATH,\n): Promise<void> {\n // no-op on native\n}\n\n// no-op stubs for web-only utilities — not available on native.\n// Return Promise<never> since these always reject and HTMLImageElement/HTMLVideoElement\n// are DOM types that don't exist in React Native's type environment.\nasync function loadImage(_src: string): Promise<never> {\n return Promise.reject(new Error('loadImage is not supported on native'));\n}\n\nasync function loadVideo(_src: string): Promise<never> {\n return Promise.reject(new Error('loadVideo is not supported on native'));\n}\n\nfunction isSafari(): boolean {\n return false;\n}\n\nfunction bestGuessBrowserZoom(): number {\n return 1;\n}\n\nfunction getDefaultAssets(_assetsPath: string): Record<string, string> {\n return {};\n}\n\nfunction getPresetAssets(_preset: string | undefined, _assetsPath: string): Record<string, string> {\n return {};\n}\n\nfunction resolveConfig(\n _props: Record<string, unknown>,\n _assetsPath: string,\n): Record<string, unknown> {\n return {};\n}\n\nexport {\n DEFAULT_CDN_PATH,\n preloadRazorSenseAssets,\n loadImage,\n loadVideo,\n isSafari,\n bestGuessBrowserZoom,\n getDefaultAssets,\n getPresetAssets,\n resolveConfig,\n};\n"],"names":["DEFAULT_CDN_PATH","preloadRazorSenseAssets","_preloadRazorSenseAssets","apply","arguments","_asyncToGenerator","_preset","length","undefined","_assetsPath","loadImage","_x","_loadImage","_src","Promise","reject","Error","loadVideo","_x2","_loadVideo","isSafari","bestGuessBrowserZoom","getDefaultAssets","getPresetAssets","resolveConfig","_props"],"mappings":";;AAEM,IAAAA,gBAAgB,CAAG,mEAAmE,SAE7EC,uBAAuBA,EAAA,CAAA,OAAAC,wBAAA,CAAAC,KAAA,CAAAC,IAAAA,CAAAA,SAAA,CAAAF,CAAAA,CAAAA,SAAAA,wBAAAA,EAAAA,CAAAA,wBAAA,CAAAG,iBAAA,CAAtC,WAGiB,CAAA,IAFfC,OAAuB,CAAAF,SAAA,CAAAG,MAAA,CAAA,CAAA,EAAAH,SAAA,CAAA,CAAA,CAAA,GAAAI,SAAA,CAAAJ,SAAA,CAAG,CAAA,CAAA,CAAA,SAAS,CACnC,IAAAK,WAAmB,CAAAL,SAAA,CAAAG,MAAA,CAAAH,CAAAA,EAAAA,SAAA,CAAAI,CAAAA,CAAAA,GAAAA,SAAA,CAAAJ,SAAA,CAAGJ,CAAAA,CAAAA,CAAAA,gBAAgB,CAGxC,CAAC,SAAAE,wBAAA,CAAAC,KAAA,CAAA,IAAA,CAAAC,SAAA,CAAA,CAAA,CAAA,SAKcM,SAASA,CAAAC,EAAA,CAAA,CAAA,OAAAC,UAAA,CAAAT,KAAA,CAAAC,IAAAA,CAAAA,SAAA,CAAAQ,CAAAA,CAAAA,SAAAA,UAAAA,EAAAA,CAAAA,UAAA,CAAAP,iBAAA,CAAxB,UAAyBQ,IAAY,CAAkB,CACrD,OAAOC,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,sCAAsC,CAAC,CAAC,CAC1E,CAAC,CAAAJ,CAAAA,OAAAA,UAAA,CAAAT,KAAA,CAAAC,IAAAA,CAAAA,SAAA,CAEc,CAAA,CAAA,SAAAa,SAASA,CAAAC,GAAA,CAAA,CAAA,OAAAC,UAAA,CAAAhB,KAAA,CAAAC,IAAAA,CAAAA,SAAA,CAAAe,CAAAA,CAAAA,SAAAA,UAAAA,EAAAA,CAAAA,UAAA,CAAAd,iBAAA,CAAxB,UAAyBQ,IAAY,CAAkB,CACrD,OAAOC,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,sCAAsC,CAAC,CAAC,CAC1E,CAAC,CAAAG,CAAAA,OAAAA,UAAA,CAAAhB,KAAA,CAAAC,IAAAA,CAAAA,SAAA,GAED,SAASgB,QAAQA,EAAY,CAC3B,OAAY,KAAA,CACd,CAEA,SAASC,oBAAoBA,EAAW,CACtC,OAAQ,CAAA,CACV,CAEA,SAASC,gBAAgBA,CAACb,WAAmB,CAA0B,CACrE,OAAO,EAAE,CACX,CAEA,SAASc,eAAeA,CAACjB,OAA2B,CAAEG,WAAmB,CAA0B,CACjG,OAAO,EAAE,CACX,CAEA,SAASe,aAAaA,CACpBC,MAA+B,CAC/BhB,WAAmB,CACM,CACzB,OAAO,EAAE,CACX;;;;"}
1
+ {"version":3,"file":"utils.native.js","sources":["../../../../../../src/components/Spark/RzpGlass/utils.native.ts"],"sourcesContent":["import type { RzpGlassPreset } from './presets';\n\nconst DEFAULT_CDN_PATH = 'https://cdn.jsdelivr.net/npm/@razorpay/blade@latest/assets/spark';\n\nasync function preloadRazorSenseAssets(\n _preset: RzpGlassPreset = 'default',\n _assetsPath: string = DEFAULT_CDN_PATH,\n _colorScheme: 'light' | 'dark' = 'light',\n): Promise<void> {\n // no-op on native\n}\n\n// no-op stubs for web-only utilities — not available on native.\n// Return Promise<never> since these always reject and HTMLImageElement/HTMLVideoElement\n// are DOM types that don't exist in React Native's type environment.\nasync function loadImage(_src: string): Promise<never> {\n return Promise.reject(new Error('loadImage is not supported on native'));\n}\n\nasync function loadVideo(_src: string): Promise<never> {\n return Promise.reject(new Error('loadVideo is not supported on native'));\n}\n\nfunction isSafari(): boolean {\n return false;\n}\n\nfunction bestGuessBrowserZoom(): number {\n return 1;\n}\n\nfunction getDefaultAssets(_assetsPath: string): Record<string, string> {\n return {};\n}\n\nfunction getPresetAssets(\n _preset: string | undefined,\n _assetsPath: string,\n _isDark = false,\n): Record<string, string> {\n return {};\n}\n\nfunction resolveConfig(\n _props: Record<string, unknown>,\n _assetsPath: string,\n _isDark = false,\n): Record<string, unknown> {\n return {};\n}\n\nexport {\n DEFAULT_CDN_PATH,\n preloadRazorSenseAssets,\n loadImage,\n loadVideo,\n isSafari,\n bestGuessBrowserZoom,\n getDefaultAssets,\n getPresetAssets,\n resolveConfig,\n};\n"],"names":["DEFAULT_CDN_PATH","preloadRazorSenseAssets","_preloadRazorSenseAssets","apply","arguments","_asyncToGenerator","_preset","length","undefined","_assetsPath","_colorScheme","loadImage","_x","_loadImage","_src","Promise","reject","Error","loadVideo","_x2","_loadVideo","isSafari","bestGuessBrowserZoom","getDefaultAssets","getPresetAssets","_isDark","resolveConfig","_props"],"mappings":";;AAEM,IAAAA,gBAAgB,CAAG,mEAAmE,SAE7EC,uBAAuBA,EAAA,CAAA,OAAAC,wBAAA,CAAAC,KAAA,CAAAC,IAAAA,CAAAA,SAAA,CAAAF,CAAAA,CAAAA,SAAAA,wBAAAA,EAAAA,CAAAA,wBAAA,CAAAG,iBAAA,CAAtC,WAIiB,CAHf,IAAAC,OAAuB,CAAAF,SAAA,CAAAG,MAAA,CAAAH,CAAAA,EAAAA,SAAA,CAAAI,CAAA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Y,CAC3B,OAAO,KAAK,CACd,CAEA,SAASC,oBAAoBA,EAAW,CACtC,OAAO,CAAC,CACV,CAEA,SAASC,gBAAgBA,CAACd,WAAmB,CAA0B,CACrE,OAAO,EAAE,CACX,CAEA,SAASe,eAAeA,CACtBlB,OAA2B,CAC3BG,WAAmB,CAEK,CADxB,IAAAgB,OAAO,CAAArB,SAAA,CAAAG,MAAA,CAAA,CAAA,EAAAH,SAAA,CAAA,CAAA,CAAA,GAAAI,SAAA,CAAAJ,SAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAEf,OAAO,EAAE,CACX,CAEA,SAASsB,aAAaA,CACpBC,MAA+B,CAC/BlB,WAAmB,CAEM,CADzB,IAAAgB,OAAO,CAAArB,SAAA,CAAAG,MAAA,CAAAH,CAAAA,EAAAA,SAAA,CAAAI,CAAAA,CAAAA,GAAAA,SAAA,CAAAJ,SAAA,CAAG,CAAA,CAAA,CAAA,KAAK,CAEf,OAAO,EAAE,CACX;;;;"}
@@ -0,0 +1,4 @@
1
+ var TreeView=function TreeView(_props){throw new Error('[Blade: TreeView]: TreeView is not available on React Native');};var TreeViewItem=function TreeViewItem(_props){throw new Error('[Blade: TreeView]: TreeViewItem is not available on React Native');};var TreeViewLoadMore=function TreeViewLoadMore(_props){throw new Error('[Blade: TreeView]: TreeViewLoadMore is not available on React Native');};
2
+
3
+ export { TreeView, TreeViewItem, TreeViewLoadMore };
4
+ //# sourceMappingURL=TreeView.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeView.native.js","sources":["../../../../../src/components/TreeView/TreeView.native.tsx"],"sourcesContent":["import type { TreeViewItemProps, TreeViewLoadMoreProps, TreeViewProps } from './types';\n\nconst TreeView = (_props: TreeViewProps): never => {\n throw new Error('[Blade: TreeView]: TreeView is not available on React Native');\n};\n\nconst TreeViewItem = (_props: TreeViewItemProps): never => {\n throw new Error('[Blade: TreeView]: TreeViewItem is not available on React Native');\n};\n\nconst TreeViewLoadMore = (_props: TreeViewLoadMoreProps): never => {\n throw new Error('[Blade: TreeView]: TreeViewLoadMore is not available on React Native');\n};\n\nexport { TreeView, TreeViewItem, TreeViewLoadMore };\n"],"names":["TreeView","_props","Error","TreeViewItem","TreeViewLoadMore"],"mappings":"AAEM,IAAAA,QAAQ,CAAG,SAAXA,QAAQA,CAAIC,MAAqB,CAAY,CACjD,MAAM,IAAIC,KAAK,CAAC,8DAA8D,CAAC,CACjF,EAEM,IAAAC,YAAY,CAAG,SAAfA,YAAYA,CAAIF,MAAyB,CAAY,CACzD,MAAM,IAAIC,KAAK,CAAC,kEAAkE,CAAC,CACrF,EAEM,IAAAE,gBAAgB,CAAG,SAAnBA,gBAAgBA,CAAIH,MAA6B,CAAY,CACjE,MAAU,IAAAC,KAAK,CAAC,sEAAsE,CAAC,CACzF;;;;"}
@@ -0,0 +1,2 @@
1
+ export { TreeView, TreeViewItem, TreeViewLoadMore } from './TreeView.native.js';
2
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}