@razorpay/blade 12.111.0 → 12.119.1

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 (346) 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/components/Button/BaseButton/BaseButton.js +124 -73
  83. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
  84. package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js +68 -2
  85. package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js.map +1 -1
  86. package/build/lib/web/development/components/Charts/AreaChart/AreaChart.web.js +206 -18
  87. package/build/lib/web/development/components/Charts/AreaChart/AreaChart.web.js.map +1 -1
  88. package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponents.web.js +159 -43
  89. package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponents.web.js.map +1 -1
  90. package/build/lib/web/development/components/Charts/CommonChartComponents/index.js +1 -1
  91. package/build/lib/web/development/components/Charts/CommonChartComponents/tokens.js +15 -2
  92. package/build/lib/web/development/components/Charts/CommonChartComponents/tokens.js.map +1 -1
  93. package/build/lib/web/development/components/Charts/LineChart/LineChart.web.js +272 -15
  94. package/build/lib/web/development/components/Charts/LineChart/LineChart.web.js.map +1 -1
  95. package/build/lib/web/development/components/Charts/LineChart/useReferenceBand.js +195 -0
  96. package/build/lib/web/development/components/Charts/LineChart/useReferenceBand.js.map +1 -0
  97. package/build/lib/web/development/components/Charts/utils/nullBridgeUtils.js +175 -0
  98. package/build/lib/web/development/components/Charts/utils/nullBridgeUtils.js.map +1 -0
  99. package/build/lib/web/development/components/Charts/utils/referenceBandUtils.js +66 -0
  100. package/build/lib/web/development/components/Charts/utils/referenceBandUtils.js.map +1 -0
  101. package/build/lib/web/development/components/CounterInput/CounterInput.web.js +29 -5
  102. package/build/lib/web/development/components/CounterInput/CounterInput.web.js.map +1 -1
  103. package/build/lib/web/development/components/CounterInput/StyledCounterInput.js +20 -4
  104. package/build/lib/web/development/components/CounterInput/StyledCounterInput.js.map +1 -1
  105. package/build/lib/web/development/components/CounterInput/token.js +6 -1
  106. package/build/lib/web/development/components/CounterInput/token.js.map +1 -1
  107. package/build/lib/web/development/components/DatePicker/BaseDatePicker.web.js +20 -0
  108. package/build/lib/web/development/components/DatePicker/BaseDatePicker.web.js.map +1 -1
  109. package/build/lib/web/development/components/DatePicker/Calendar.web.js +9 -2
  110. package/build/lib/web/development/components/DatePicker/Calendar.web.js.map +1 -1
  111. package/build/lib/web/development/components/DatePicker/utils.js +21 -1
  112. package/build/lib/web/development/components/DatePicker/utils.js.map +1 -1
  113. package/build/lib/web/development/components/Dropdown/Dropdown.js +4 -1
  114. package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
  115. package/build/lib/web/development/components/Dropdown/FilterChipSelectInput.web.js +20 -12
  116. package/build/lib/web/development/components/Dropdown/FilterChipSelectInput.web.js.map +1 -1
  117. package/build/lib/web/development/components/Dropdown/dropdownUtils.js +28 -2
  118. package/build/lib/web/development/components/Dropdown/dropdownUtils.js.map +1 -1
  119. package/build/lib/web/development/components/Dropdown/filterChipSelectInputUtils.js +15 -1
  120. package/build/lib/web/development/components/Dropdown/filterChipSelectInputUtils.js.map +1 -1
  121. package/build/lib/web/development/components/Dropdown/useDropdown.js +91 -5
  122. package/build/lib/web/development/components/Dropdown/useDropdown.js.map +1 -1
  123. package/build/lib/web/development/components/FloatingActionButton/FloatingActionButton.js +126 -0
  124. package/build/lib/web/development/components/FloatingActionButton/FloatingActionButton.js.map +1 -0
  125. package/build/lib/web/development/components/FloatingActionButton/FloatingActionButtonContainer.web.js +45 -0
  126. package/build/lib/web/development/components/FloatingActionButton/FloatingActionButtonContainer.web.js.map +1 -0
  127. package/build/lib/web/development/components/FloatingActionButton/index.js +2 -0
  128. package/build/lib/web/development/components/FloatingActionButton/index.js.map +1 -0
  129. package/build/lib/web/development/components/GenUI/GenUIComponents.web.js.map +1 -1
  130. package/build/lib/web/development/components/GenUI/GenUIContext.web.js +9 -1
  131. package/build/lib/web/development/components/GenUI/GenUIContext.web.js.map +1 -1
  132. package/build/lib/web/development/components/GenUI/GenUIProvider.web.js +17 -0
  133. package/build/lib/web/development/components/GenUI/GenUIProvider.web.js.map +1 -1
  134. package/build/lib/web/development/components/GenUI/GenUISchemaRenderer.web.js +31 -6
  135. package/build/lib/web/development/components/GenUI/GenUISchemaRenderer.web.js.map +1 -1
  136. package/build/lib/web/development/components/GenUI/index.js +1 -1
  137. package/build/lib/web/development/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js +44 -0
  138. package/build/lib/web/development/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js.map +1 -0
  139. package/build/lib/web/development/components/Icons/BookmarkFilledIcon/index.js +2 -0
  140. package/build/lib/web/development/components/Icons/BookmarkFilledIcon/index.js.map +1 -0
  141. package/build/lib/web/development/components/Icons/index.js +1 -0
  142. package/build/lib/web/development/components/Icons/index.js.map +1 -1
  143. package/build/lib/web/development/components/Input/OTPInput/OTPInput.js +3 -0
  144. package/build/lib/web/development/components/Input/OTPInput/OTPInput.js.map +1 -1
  145. package/build/lib/web/development/components/PopupArrow/PopupArrow.web.js +7 -1
  146. package/build/lib/web/development/components/PopupArrow/PopupArrow.web.js.map +1 -1
  147. package/build/lib/web/development/components/RollingText/RollingText.web.js +27 -20
  148. package/build/lib/web/development/components/RollingText/RollingText.web.js.map +1 -1
  149. package/build/lib/web/development/components/Spark/RzpGlass/RzpGlass.js +16 -7
  150. package/build/lib/web/development/components/Spark/RzpGlass/RzpGlass.js.map +1 -1
  151. package/build/lib/web/development/components/Spark/RzpGlass/RzpGlassMount.js +24 -6
  152. package/build/lib/web/development/components/Spark/RzpGlass/RzpGlassMount.js.map +1 -1
  153. package/build/lib/web/development/components/Spark/RzpGlass/presets.js +30 -1
  154. package/build/lib/web/development/components/Spark/RzpGlass/presets.js.map +1 -1
  155. package/build/lib/web/development/components/Spark/RzpGlass/rzpGlassShader.js +1 -1
  156. package/build/lib/web/development/components/Spark/RzpGlass/rzpGlassShader.js.map +1 -1
  157. package/build/lib/web/development/components/Spark/RzpGlass/utils.js +26 -10
  158. package/build/lib/web/development/components/Spark/RzpGlass/utils.js.map +1 -1
  159. package/build/lib/web/development/components/SpotlightPopoverTour/Tour.web.js +31 -18
  160. package/build/lib/web/development/components/SpotlightPopoverTour/Tour.web.js.map +1 -1
  161. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +14 -3
  162. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  163. package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js +23 -4
  164. package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
  165. package/build/lib/web/development/components/SpotlightPopoverTour/utils.js +58 -1
  166. package/build/lib/web/development/components/SpotlightPopoverTour/utils.js.map +1 -1
  167. package/build/lib/web/development/components/TreeView/StyledTreeViewRow.web.js +41 -0
  168. package/build/lib/web/development/components/TreeView/StyledTreeViewRow.web.js.map +1 -0
  169. package/build/lib/web/development/components/TreeView/TreeView.web.js +696 -0
  170. package/build/lib/web/development/components/TreeView/TreeView.web.js.map +1 -0
  171. package/build/lib/web/development/components/TreeView/TreeViewAnimator.web.js +184 -0
  172. package/build/lib/web/development/components/TreeView/TreeViewAnimator.web.js.map +1 -0
  173. package/build/lib/web/development/components/TreeView/TreeViewChevron.web.js +73 -0
  174. package/build/lib/web/development/components/TreeView/TreeViewChevron.web.js.map +1 -0
  175. package/build/lib/web/development/components/TreeView/TreeViewItem.web.js +295 -0
  176. package/build/lib/web/development/components/TreeView/TreeViewItem.web.js.map +1 -0
  177. package/build/lib/web/development/components/TreeView/TreeViewLoadMore.web.js +173 -0
  178. package/build/lib/web/development/components/TreeView/TreeViewLoadMore.web.js.map +1 -0
  179. package/build/lib/web/development/components/TreeView/componentIds.js +8 -0
  180. package/build/lib/web/development/components/TreeView/componentIds.js.map +1 -0
  181. package/build/lib/web/development/components/TreeView/index.web.js +4 -0
  182. package/build/lib/web/development/components/TreeView/index.web.js.map +1 -0
  183. package/build/lib/web/development/components/TreeView/treeViewUtils.js +475 -0
  184. package/build/lib/web/development/components/TreeView/treeViewUtils.js.map +1 -0
  185. package/build/lib/web/development/components/TreeView/useTreeView.js +24 -0
  186. package/build/lib/web/development/components/TreeView/useTreeView.js.map +1 -0
  187. package/build/lib/web/development/components/index.js +9 -2
  188. package/build/lib/web/development/components/index.js.map +1 -1
  189. package/build/lib/web/development/tokens/global/colors.js +2 -2
  190. package/build/lib/web/development/tokens/global/colors.js.map +1 -1
  191. package/build/lib/web/development/tokens/index.js +1 -0
  192. package/build/lib/web/development/tokens/index.js.map +1 -1
  193. package/build/lib/web/development/tokens/theme/bladeNeutralTheme.js +1439 -0
  194. package/build/lib/web/development/tokens/theme/bladeNeutralTheme.js.map +1 -0
  195. package/build/lib/web/development/tokens/theme/bladeTheme.js +48 -12
  196. package/build/lib/web/development/tokens/theme/bladeTheme.js.map +1 -1
  197. package/build/lib/web/development/tokens/theme/index.js +1 -0
  198. package/build/lib/web/development/tokens/theme/index.js.map +1 -1
  199. package/build/lib/web/development/tokens/theme/theme.js.map +1 -1
  200. package/build/lib/web/development/utils/componentZIndices.js +2 -0
  201. package/build/lib/web/development/utils/componentZIndices.js.map +1 -1
  202. package/build/lib/web/development/utils/metaAttribute/metaConstants.js +4 -0
  203. package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
  204. package/build/lib/web/development/utils/useControlledDropdownInput/useControlledDropdownInput.js +12 -4
  205. package/build/lib/web/development/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
  206. package/build/lib/web/development/utils/useTruncationTitle/useTruncationTitle.web.js +2 -2
  207. package/build/lib/web/development/utils/useTruncationTitle/useTruncationTitle.web.js.map +1 -1
  208. package/build/lib/web/production/_virtual/flatten.js +1 -1
  209. package/build/lib/web/production/_virtual/flatten3.js +1 -1
  210. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +124 -73
  211. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
  212. package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js +68 -2
  213. package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js.map +1 -1
  214. package/build/lib/web/production/components/Charts/AreaChart/AreaChart.web.js +206 -18
  215. package/build/lib/web/production/components/Charts/AreaChart/AreaChart.web.js.map +1 -1
  216. package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponents.web.js +159 -43
  217. package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponents.web.js.map +1 -1
  218. package/build/lib/web/production/components/Charts/CommonChartComponents/index.js +1 -1
  219. package/build/lib/web/production/components/Charts/CommonChartComponents/tokens.js +15 -2
  220. package/build/lib/web/production/components/Charts/CommonChartComponents/tokens.js.map +1 -1
  221. package/build/lib/web/production/components/Charts/LineChart/LineChart.web.js +272 -15
  222. package/build/lib/web/production/components/Charts/LineChart/LineChart.web.js.map +1 -1
  223. package/build/lib/web/production/components/Charts/LineChart/useReferenceBand.js +195 -0
  224. package/build/lib/web/production/components/Charts/LineChart/useReferenceBand.js.map +1 -0
  225. package/build/lib/web/production/components/Charts/utils/nullBridgeUtils.js +175 -0
  226. package/build/lib/web/production/components/Charts/utils/nullBridgeUtils.js.map +1 -0
  227. package/build/lib/web/production/components/Charts/utils/referenceBandUtils.js +66 -0
  228. package/build/lib/web/production/components/Charts/utils/referenceBandUtils.js.map +1 -0
  229. package/build/lib/web/production/components/CounterInput/CounterInput.web.js +29 -5
  230. package/build/lib/web/production/components/CounterInput/CounterInput.web.js.map +1 -1
  231. package/build/lib/web/production/components/CounterInput/StyledCounterInput.js +20 -4
  232. package/build/lib/web/production/components/CounterInput/StyledCounterInput.js.map +1 -1
  233. package/build/lib/web/production/components/CounterInput/token.js +6 -1
  234. package/build/lib/web/production/components/CounterInput/token.js.map +1 -1
  235. package/build/lib/web/production/components/DatePicker/BaseDatePicker.web.js +20 -0
  236. package/build/lib/web/production/components/DatePicker/BaseDatePicker.web.js.map +1 -1
  237. package/build/lib/web/production/components/DatePicker/Calendar.web.js +9 -2
  238. package/build/lib/web/production/components/DatePicker/Calendar.web.js.map +1 -1
  239. package/build/lib/web/production/components/DatePicker/utils.js +21 -1
  240. package/build/lib/web/production/components/DatePicker/utils.js.map +1 -1
  241. package/build/lib/web/production/components/Dropdown/Dropdown.js +4 -1
  242. package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
  243. package/build/lib/web/production/components/Dropdown/FilterChipSelectInput.web.js +20 -12
  244. package/build/lib/web/production/components/Dropdown/FilterChipSelectInput.web.js.map +1 -1
  245. package/build/lib/web/production/components/Dropdown/dropdownUtils.js +28 -2
  246. package/build/lib/web/production/components/Dropdown/dropdownUtils.js.map +1 -1
  247. package/build/lib/web/production/components/Dropdown/filterChipSelectInputUtils.js +15 -1
  248. package/build/lib/web/production/components/Dropdown/filterChipSelectInputUtils.js.map +1 -1
  249. package/build/lib/web/production/components/Dropdown/useDropdown.js +91 -5
  250. package/build/lib/web/production/components/Dropdown/useDropdown.js.map +1 -1
  251. package/build/lib/web/production/components/FloatingActionButton/FloatingActionButton.js +126 -0
  252. package/build/lib/web/production/components/FloatingActionButton/FloatingActionButton.js.map +1 -0
  253. package/build/lib/web/production/components/FloatingActionButton/FloatingActionButtonContainer.web.js +45 -0
  254. package/build/lib/web/production/components/FloatingActionButton/FloatingActionButtonContainer.web.js.map +1 -0
  255. package/build/lib/web/production/components/FloatingActionButton/index.js +2 -0
  256. package/build/lib/web/production/components/FloatingActionButton/index.js.map +1 -0
  257. package/build/lib/web/production/components/GenUI/GenUIComponents.web.js.map +1 -1
  258. package/build/lib/web/production/components/GenUI/GenUIContext.web.js +9 -1
  259. package/build/lib/web/production/components/GenUI/GenUIContext.web.js.map +1 -1
  260. package/build/lib/web/production/components/GenUI/GenUIProvider.web.js +17 -0
  261. package/build/lib/web/production/components/GenUI/GenUIProvider.web.js.map +1 -1
  262. package/build/lib/web/production/components/GenUI/GenUISchemaRenderer.web.js +31 -6
  263. package/build/lib/web/production/components/GenUI/GenUISchemaRenderer.web.js.map +1 -1
  264. package/build/lib/web/production/components/GenUI/index.js +1 -1
  265. package/build/lib/web/production/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js +44 -0
  266. package/build/lib/web/production/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js.map +1 -0
  267. package/build/lib/web/production/components/Icons/BookmarkFilledIcon/index.js +2 -0
  268. package/build/lib/web/production/components/Icons/BookmarkFilledIcon/index.js.map +1 -0
  269. package/build/lib/web/production/components/Icons/index.js +1 -0
  270. package/build/lib/web/production/components/Icons/index.js.map +1 -1
  271. package/build/lib/web/production/components/Input/OTPInput/OTPInput.js +3 -0
  272. package/build/lib/web/production/components/Input/OTPInput/OTPInput.js.map +1 -1
  273. package/build/lib/web/production/components/PopupArrow/PopupArrow.web.js +7 -1
  274. package/build/lib/web/production/components/PopupArrow/PopupArrow.web.js.map +1 -1
  275. package/build/lib/web/production/components/RollingText/RollingText.web.js +27 -20
  276. package/build/lib/web/production/components/RollingText/RollingText.web.js.map +1 -1
  277. package/build/lib/web/production/components/Spark/RzpGlass/RzpGlass.js +16 -7
  278. package/build/lib/web/production/components/Spark/RzpGlass/RzpGlass.js.map +1 -1
  279. package/build/lib/web/production/components/Spark/RzpGlass/RzpGlassMount.js +24 -6
  280. package/build/lib/web/production/components/Spark/RzpGlass/RzpGlassMount.js.map +1 -1
  281. package/build/lib/web/production/components/Spark/RzpGlass/presets.js +30 -1
  282. package/build/lib/web/production/components/Spark/RzpGlass/presets.js.map +1 -1
  283. package/build/lib/web/production/components/Spark/RzpGlass/rzpGlassShader.js +1 -1
  284. package/build/lib/web/production/components/Spark/RzpGlass/rzpGlassShader.js.map +1 -1
  285. package/build/lib/web/production/components/Spark/RzpGlass/utils.js +26 -10
  286. package/build/lib/web/production/components/Spark/RzpGlass/utils.js.map +1 -1
  287. package/build/lib/web/production/components/SpotlightPopoverTour/Tour.web.js +31 -18
  288. package/build/lib/web/production/components/SpotlightPopoverTour/Tour.web.js.map +1 -1
  289. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +14 -3
  290. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  291. package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js +23 -4
  292. package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
  293. package/build/lib/web/production/components/SpotlightPopoverTour/utils.js +58 -1
  294. package/build/lib/web/production/components/SpotlightPopoverTour/utils.js.map +1 -1
  295. package/build/lib/web/production/components/TreeView/StyledTreeViewRow.web.js +41 -0
  296. package/build/lib/web/production/components/TreeView/StyledTreeViewRow.web.js.map +1 -0
  297. package/build/lib/web/production/components/TreeView/TreeView.web.js +696 -0
  298. package/build/lib/web/production/components/TreeView/TreeView.web.js.map +1 -0
  299. package/build/lib/web/production/components/TreeView/TreeViewAnimator.web.js +184 -0
  300. package/build/lib/web/production/components/TreeView/TreeViewAnimator.web.js.map +1 -0
  301. package/build/lib/web/production/components/TreeView/TreeViewChevron.web.js +73 -0
  302. package/build/lib/web/production/components/TreeView/TreeViewChevron.web.js.map +1 -0
  303. package/build/lib/web/production/components/TreeView/TreeViewItem.web.js +295 -0
  304. package/build/lib/web/production/components/TreeView/TreeViewItem.web.js.map +1 -0
  305. package/build/lib/web/production/components/TreeView/TreeViewLoadMore.web.js +173 -0
  306. package/build/lib/web/production/components/TreeView/TreeViewLoadMore.web.js.map +1 -0
  307. package/build/lib/web/production/components/TreeView/componentIds.js +8 -0
  308. package/build/lib/web/production/components/TreeView/componentIds.js.map +1 -0
  309. package/build/lib/web/production/components/TreeView/index.web.js +4 -0
  310. package/build/lib/web/production/components/TreeView/index.web.js.map +1 -0
  311. package/build/lib/web/production/components/TreeView/treeViewUtils.js +475 -0
  312. package/build/lib/web/production/components/TreeView/treeViewUtils.js.map +1 -0
  313. package/build/lib/web/production/components/TreeView/useTreeView.js +24 -0
  314. package/build/lib/web/production/components/TreeView/useTreeView.js.map +1 -0
  315. package/build/lib/web/production/components/index.js +9 -2
  316. package/build/lib/web/production/components/index.js.map +1 -1
  317. package/build/lib/web/production/node_modules/es-toolkit/dist/array/flatten.js +1 -1
  318. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/array/flatten.js +1 -1
  319. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/array/sortBy.js +2 -2
  320. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/object/omit.js +2 -2
  321. package/build/lib/web/production/tokens/global/colors.js +2 -2
  322. package/build/lib/web/production/tokens/global/colors.js.map +1 -1
  323. package/build/lib/web/production/tokens/index.js +1 -0
  324. package/build/lib/web/production/tokens/index.js.map +1 -1
  325. package/build/lib/web/production/tokens/theme/bladeNeutralTheme.js +1439 -0
  326. package/build/lib/web/production/tokens/theme/bladeNeutralTheme.js.map +1 -0
  327. package/build/lib/web/production/tokens/theme/bladeTheme.js +48 -12
  328. package/build/lib/web/production/tokens/theme/bladeTheme.js.map +1 -1
  329. package/build/lib/web/production/tokens/theme/index.js +1 -0
  330. package/build/lib/web/production/tokens/theme/index.js.map +1 -1
  331. package/build/lib/web/production/tokens/theme/theme.js.map +1 -1
  332. package/build/lib/web/production/utils/componentZIndices.js +2 -0
  333. package/build/lib/web/production/utils/componentZIndices.js.map +1 -1
  334. package/build/lib/web/production/utils/metaAttribute/metaConstants.js +4 -0
  335. package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
  336. package/build/lib/web/production/utils/useControlledDropdownInput/useControlledDropdownInput.js +12 -4
  337. package/build/lib/web/production/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
  338. package/build/lib/web/production/utils/useTruncationTitle/useTruncationTitle.web.js +2 -2
  339. package/build/lib/web/production/utils/useTruncationTitle/useTruncationTitle.web.js.map +1 -1
  340. package/build/types/components/index.d.ts +557 -18
  341. package/build/types/components/index.native.d.ts +463 -16
  342. package/build/types/tokens/index.d.ts +11 -4
  343. package/build/types/tokens/index.native.d.ts +11 -4
  344. package/build/types/utils/index.d.ts +8 -3
  345. package/build/types/utils/index.native.d.ts +8 -3
  346. package/package.json +2 -2
@@ -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","focus","_inputRefs$index2","select","handleOnChange","_ref3","currentOtpIndex","trim","_value$trim","newValue","handleOnInput","_ref4","handleOnKeyDown","_ref5","key","event","_event$preventDefault","preventDefault","call","_event$preventDefault2","_event$preventDefault3","_event$preventDefault4","getHiddenInput","_ref6","_jsx","hidden","id","readOnly","getOTPInputFields","inputs","_loop","_otpValue$index","_Array$from$index","currentValue","React","createRef","currentInputType","push","BaseBox","flex","marginLeft","children","BaseInput","_objectSpread","concat","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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHA,IAAMA,aAAa,GAAGC,eAAe,EAAE,KAAK,cAAc,CAAA;;AAE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,CAAA;AAAA,GAAA,CACH,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMsG,QAAQ,gBAAG3B,cAAK,CAACyC,UAAU,CAAoCpJ,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","focus","_inputRefs$index2","select","handleOnChange","_ref3","currentOtpIndex","trim","lastFilledIndex","Math","min","_value$trim","newValue","handleOnInput","_ref4","handleOnKeyDown","_ref5","key","event","_event$preventDefault","preventDefault","call","_event$preventDefault2","_event$preventDefault3","_event$preventDefault4","getHiddenInput","_ref6","_jsx","hidden","id","readOnly","getOTPInputFields","inputs","_loop","_otpValue$index","_Array$from$index","currentValue","React","createRef","currentInputType","push","BaseBox","flex","marginLeft","children","BaseInput","_objectSpread","concat","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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHA,IAAMA,aAAa,GAAGC,eAAe,EAAE,KAAK,cAAc,CAAA;;AAE1D;AACA;AACA;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAAa,EAAA;AAAA,EAAA,IAAAC,WAAA,CAAA;EAAA,OAAAA,CAAAA,WAAA,GAAeD,IAAI,KAAJA,IAAAA,IAAAA,IAAI,uBAAJA,IAAI,CAAEE,KAAK,CAAC,EAAE,CAAC,cAAAD,WAAA,KAAA,KAAA,CAAA,GAAAA,WAAA,GAAIE,KAAK,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,EAAE,CAAC,CAAA;AAAA,CAAA,CAAA;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,SAA4E,GAAG,SAA/EA,SAA4EA,CAAAC,IAAA,EA6BhFC,WAAW,EACR;AAAA,EAAA,IA5BDC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,SAAS,GAAAH,IAAA,CAATG,SAAS;IACTC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IACRC,UAAU,GAAAL,IAAA,CAAVK,UAAU;IACVC,qBAAqB,GAAAN,IAAA,CAArBM,qBAAqB;IAAAC,iBAAA,GAAAP,IAAA,CACrBQ,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,iBAAA;IACxBE,KAAK,GAAAT,IAAA,CAALS,KAAK;IACLC,kBAAkB,GAAAV,IAAA,CAAlBU,kBAAkB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Q,CAACpG,qBAAqB,GAAG,GAAG,GAAG,CAAC,CAAE;MAAAsE,QAAA,eAC7DjB,GAAA,CAACgD,QAAQ,EAAA;QACPjB,IAAI,EAAEkB,WAAW,CAAC;AAAE7H,UAAAA,eAAe,EAAfA,eAAe;UAAE8H,WAAW,EAAEP,OAAO,CAAC1I,QAAQ,CAAA;AAAE,SAAC,CAAE;AACvEA,QAAAA,QAAQ,EAAEA,QAAS;AACnBD,QAAAA,SAAS,EAAEA,SAAU;AACrBmB,QAAAA,WAAW,EAAEA,WAAY;AACzB4B,QAAAA,UAAU,EAAEA,UAAW;AACvBC,QAAAA,WAAW,EAAEA,WAAY;AACzBC,QAAAA,aAAa,EAAEA,aAAc;AAC7BrB,QAAAA,IAAI,EAAEA,IAAAA;OACP,CAAA;AAAC,KACK,CAAC,CAAA;AAAA,GAAA,CACH,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMyG,QAAQ,gBAAG3B,cAAK,CAACyC,UAAU,CAAoCvJ,SAAS;;;;"}
@@ -24,7 +24,13 @@ var PopupArrow = /*#__PURE__*/React__default.forwardRef(function (_ref, arrowRef
24
24
  height: height,
25
25
  fill: fillColor,
26
26
  stroke: strokeColor,
27
- strokeWidth: strokeWidth !== null && strokeWidth !== void 0 ? strokeWidth : 0,
27
+ strokeWidth: strokeWidth !== null && strokeWidth !== void 0 ? strokeWidth : 0
28
+ /**
29
+ * `tipRadius` is a ratio, not a px value — FloatingArrow scales it against the arrow's
30
+ * own width/height, so the rounding grows much faster than the token number suggests.
31
+ * `xsmall` (4) visibly bows the arrow's edges; `2xsmall` (2) softens the tip while
32
+ * keeping the sides straight.
33
+ */,
28
34
  tipRadius: theme.border.radius['2xsmall'],
29
35
  style: _objectSpread({}, style)
30
36
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PopupArrow.web.js","sources":["../../../../../../src/components/PopupArrow/PopupArrow.web.tsx"],"sourcesContent":["import React from 'react';\nimport { FloatingArrow } from '@floating-ui/react';\nimport type { PopupArrowProps } from './types';\nimport { useTheme } from '~components/BladeProvider';\n\nconst PopupArrow = React.forwardRef<SVGSVGElement, PopupArrowProps>(\n ({ context, width, height, fillColor, strokeColor, strokeWidth, style }, arrowRef) => {\n const { theme } = useTheme();\n return (\n <FloatingArrow\n ref={arrowRef}\n context={context}\n width={width}\n height={height}\n fill={fillColor}\n stroke={strokeColor}\n strokeWidth={strokeWidth ?? 0}\n tipRadius={theme.border.radius['2xsmall']}\n style={{ ...style }}\n />\n );\n },\n);\n\nexport { PopupArrow };\n"],"names":["PopupArrow","React","forwardRef","_ref","arrowRef","context","width","height","fillColor","strokeColor","strokeWidth","style","_useTheme","useTheme","theme","_jsx","FloatingArrow","ref","fill","stroke","tipRadius","border","radius","_objectSpread"],"mappings":";;;;;;;;;AAKMA,IAAAA,UAAU,gBAAGC,cAAK,CAACC,UAAU,CACjC,UAAAC,IAAA,EAAyEC,QAAQ,EAAK;AAAA,EAAA,IAAnFC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IAAEC,KAAK,GAAAH,IAAA,CAALG,KAAK;IAAEC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IAAEC,SAAS,GAAAL,IAAA,CAATK,SAAS;IAAEC,WAAW,GAAAN,IAAA,CAAXM,WAAW;IAAEC,WAAW,GAAAP,IAAA,CAAXO,WAAW;IAAEC,KAAK,GAAAR,IAAA,CAALQ,KAAK,CAAA;AACnE,EAAA,IAAAC,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;EACb,oBACEC,GAAA,CAACC,aAAa,EAAA;AACZC,IAAAA,GAAG,EAAEb,QAAS;AACdC,IAAAA,OAAO,EAAEA,OAAQ;AACjBC,IAAAA,KAAK,EAAEA,KAAM;AACbC,IAAAA,MAAM,EAAEA,MAAO;AACfW,IAAAA,IAAI,EAAEV,SAAU;AAChBW,IAAAA,MAAM,EAAEV,WAAY;AACpBC,IAAAA,WAAW,EAAEA,WAAW,KAAA,IAAA,IAAXA,WAAW,KAAXA,KAAAA,CAAAA,GAAAA,WAAW,GAAI,CAAE;IAC9BU,SAAS,EAAEN,KAAK,CAACO,MAAM,CAACC,MAAM,CAAC,SAAS,CAAE;IAC1CX,KAAK,EAAAY,aAAA,CAAA,EAAA,EAAOZ,KAAK,CAAA;AAAG,GACrB,CAAC,CAAA;AAEN,CACF;;;;"}
1
+ {"version":3,"file":"PopupArrow.web.js","sources":["../../../../../../src/components/PopupArrow/PopupArrow.web.tsx"],"sourcesContent":["import React from 'react';\nimport { FloatingArrow } from '@floating-ui/react';\nimport type { PopupArrowProps } from './types';\nimport { useTheme } from '~components/BladeProvider';\n\nconst PopupArrow = React.forwardRef<SVGSVGElement, PopupArrowProps>(\n ({ context, width, height, fillColor, strokeColor, strokeWidth, style }, arrowRef) => {\n const { theme } = useTheme();\n return (\n <FloatingArrow\n ref={arrowRef}\n context={context}\n width={width}\n height={height}\n fill={fillColor}\n stroke={strokeColor}\n strokeWidth={strokeWidth ?? 0}\n /**\n * `tipRadius` is a ratio, not a px value — FloatingArrow scales it against the arrow's\n * own width/height, so the rounding grows much faster than the token number suggests.\n * `xsmall` (4) visibly bows the arrow's edges; `2xsmall` (2) softens the tip while\n * keeping the sides straight.\n */\n tipRadius={theme.border.radius['2xsmall']}\n style={{ ...style }}\n />\n );\n },\n);\n\nexport { PopupArrow };\n"],"names":["PopupArrow","React","forwardRef","_ref","arrowRef","context","width","height","fillColor","strokeColor","strokeWidth","style","_useTheme","useTheme","theme","_jsx","FloatingArrow","ref","fill","stroke","tipRadius","border","radius","_objectSpread"],"mappings":";;;;;;;;;AAKMA,IAAAA,UAAU,gBAAGC,cAAK,CAACC,UAAU,CACjC,UAAAC,IAAA,EAAyEC,QAAQ,EAAK;AAAA,EAAA,IAAnFC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IAAEC,KAAK,GAAAH,IAAA,CAALG,KAAK;IAAEC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IAAEC,SAAS,GAAAL,IAAA,CAATK,SAAS;IAAEC,WAAW,GAAAN,IAAA,CAAXM,WAAW;IAAEC,WAAW,GAAAP,IAAA,CAAXO,WAAW;IAAEC,KAAK,GAAAR,IAAA,CAALQ,KAAK,CAAA;AACnE,EAAA,IAAAC,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;EACb,oBACEC,GAAA,CAACC,aAAa,EAAA;AACZC,IAAAA,GAAG,EAAEb,QAAS;AACdC,IAAAA,OAAO,EAAEA,OAAQ;AACjBC,IAAAA,KAAK,EAAEA,KAAM;AACbC,IAAAA,MAAM,EAAEA,MAAO;AACfW,IAAAA,IAAI,EAAEV,SAAU;AAChBW,IAAAA,MAAM,EAAEV,WAAY;AACpBC,IAAAA,WAAW,EAAEA,WAAW,KAAA,IAAA,IAAXA,WAAW,KAAA,KAAA,CAAA,GAAXA,WAAW,GAAI,CAAA;AAC5B;AACR;AACA;AACA;AACA;AACA;IACQU,SAAS,EAAEN,KAAK,CAACO,MAAM,CAACC,MAAM,CAAC,SAAS,CAAE;IAC1CX,KAAK,EAAAY,aAAA,CAAA,EAAA,EAAOZ,KAAK,CAAA;AAAG,GACrB,CAAC,CAAA;AAEN,CACF;;;;"}
@@ -7,48 +7,53 @@ import { msToSeconds } from '../../utils/msToSeconds.js';
7
7
  import { cssBezierToArray } from '../../utils/cssBezierToArray.js';
8
8
  import '../BaseMotion/index.js';
9
9
  import '../Box/index.js';
10
- import { jsx, jsxs } from 'react/jsx-runtime';
10
+ import { jsx } from 'react/jsx-runtime';
11
11
  import useTheme from '../BladeProvider/useTheme.js';
12
12
  import { castWebType } from '../../utils/platform/castUtils.js';
13
13
  import { Box } from '../Box/Box.js';
14
14
  import { BaseMotionBox } from '../BaseMotion/BaseMotion.web.js';
15
15
 
16
- var ShimmerOverlay = function ShimmerOverlay() {
16
+ var ShimmerText = function ShimmerText(_ref) {
17
+ var children = _ref.children;
17
18
  var _useTheme = useTheme(),
18
19
  theme = _useTheme.theme;
19
- var shimmerColor = theme.colors.surface.text.staticWhite.muted;
20
+ var textColor = theme.colors.feedback.text.positive.intense;
21
+ // Lighter positive feedback token creates the sweeping glint; resolves per color scheme automatically.
22
+ var highlightColor = theme.colors.feedback.text.positive.subtle;
20
23
  var shimmerDuration = msToSeconds(theme.motion.duration['2xgentle']);
21
24
  var shimmerDelay = msToSeconds(theme.motion.delay.gentle);
22
25
  var shimmerEase = cssBezierToArray(castWebType(theme.motion.easing.standard));
23
26
  return /*#__PURE__*/jsx(m.span, {
24
- "aria-hidden": true,
25
27
  style: {
26
- position: 'absolute',
27
- inset: 0,
28
- background: "linear-gradient(90deg, transparent 0%, ".concat(shimmerColor, " 50%, transparent 100%)"),
29
- pointerEvents: 'none'
28
+ backgroundImage: "linear-gradient(90deg, ".concat(textColor, " 38%, ").concat(highlightColor, " 50%, ").concat(textColor, " 62%)"),
29
+ backgroundSize: '250% 100%',
30
+ WebkitBackgroundClip: 'text',
31
+ backgroundClip: 'text',
32
+ color: 'transparent',
33
+ WebkitTextFillColor: 'transparent'
30
34
  },
31
35
  initial: {
32
- x: '-100%'
36
+ backgroundPosition: '100% 0%'
33
37
  },
34
38
  animate: {
35
- x: '100%'
39
+ backgroundPosition: '0% 0%'
36
40
  },
37
41
  transition: {
38
42
  duration: shimmerDuration,
39
43
  ease: shimmerEase,
40
44
  repeat: Infinity,
41
45
  repeatDelay: shimmerDelay
42
- }
46
+ },
47
+ children: children
43
48
  });
44
49
  };
45
- var RollingText = function RollingText(_ref) {
46
- var texts = _ref.texts,
47
- children = _ref.children,
48
- onIndexChange = _ref.onIndexChange,
49
- cycleDurationProp = _ref.cycleDuration,
50
- _ref$showShimmer = _ref.showShimmer,
51
- showShimmer = _ref$showShimmer === void 0 ? true : _ref$showShimmer;
50
+ var RollingText = function RollingText(_ref2) {
51
+ var texts = _ref2.texts,
52
+ children = _ref2.children,
53
+ onIndexChange = _ref2.onIndexChange,
54
+ cycleDurationProp = _ref2.cycleDuration,
55
+ _ref2$showShimmer = _ref2.showShimmer,
56
+ showShimmer = _ref2$showShimmer === void 0 ? true : _ref2$showShimmer;
52
57
  var _useTheme2 = useTheme(),
53
58
  theme = _useTheme2.theme;
54
59
  var _React$useState = React__default.useState(0),
@@ -123,11 +128,13 @@ var RollingText = function RollingText(_ref) {
123
128
  initial: false,
124
129
  children: /*#__PURE__*/jsx(BaseMotionBox, {
125
130
  motionVariants: slideVariants,
126
- children: /*#__PURE__*/jsxs(Box, {
131
+ children: /*#__PURE__*/jsx(Box, {
127
132
  position: "relative",
128
133
  overflow: "hidden",
129
134
  whiteSpace: "nowrap",
130
- children: [renderContent(texts[currentIndex]), showShimmer && /*#__PURE__*/jsx(ShimmerOverlay, {})]
135
+ children: showShimmer && !children ? /*#__PURE__*/jsx(ShimmerText, {
136
+ children: renderContent(texts[currentIndex])
137
+ }) : renderContent(texts[currentIndex])
131
138
  })
132
139
  }, currentIndex)
133
140
  })
@@ -1 +1 @@
1
- {"version":3,"file":"RollingText.web.js","sources":["../../../../../../src/components/RollingText/RollingText.web.tsx"],"sourcesContent":["import React from 'react';\nimport { AnimatePresence, m } from 'framer-motion';\nimport { castWebType } from '~utils';\nimport { useTheme } from '~components/BladeProvider';\nimport { msToSeconds } from '~utils/msToSeconds';\nimport { cssBezierToArray } from '~utils/cssBezierToArray';\nimport { BaseMotionBox } from '~components/BaseMotion';\nimport type { MotionVariantsType } from '~components/BaseMotion';\nimport { Box } from '~components/Box';\n\nconst ShimmerOverlay = (): React.ReactElement => {\n const { theme } = useTheme();\n\n const shimmerColor = theme.colors.surface.text.staticWhite.muted;\n const shimmerDuration = msToSeconds(theme.motion.duration['2xgentle']);\n const shimmerDelay = msToSeconds(theme.motion.delay.gentle);\n const shimmerEase = cssBezierToArray(castWebType(theme.motion.easing.standard));\n\n return (\n <m.span\n aria-hidden\n style={{\n position: 'absolute',\n inset: 0,\n background: `linear-gradient(90deg, transparent 0%, ${shimmerColor} 50%, transparent 100%)`,\n pointerEvents: 'none',\n }}\n initial={{ x: '-100%' }}\n animate={{ x: '100%' }}\n transition={{\n duration: shimmerDuration,\n ease: shimmerEase,\n repeat: Infinity,\n repeatDelay: shimmerDelay,\n }}\n />\n );\n};\n\ntype RollingTextProps = {\n /** Array of strings to cycle through with a rolling animation */\n texts: string[];\n /** Custom render function for each text item */\n children?: (text: string) => React.ReactNode;\n /** Callback fired when the active index changes */\n onIndexChange?: (index: number) => void;\n /** Cycle interval in ms (defaults to theme.motion.delay.xlong) */\n cycleDuration?: number;\n /** Whether to show the shimmer overlay on each item (defaults to true) */\n showShimmer?: boolean;\n};\n\nconst RollingText = ({\n texts,\n children,\n onIndexChange,\n cycleDuration: cycleDurationProp,\n showShimmer = true,\n}: RollingTextProps): React.ReactElement => {\n const { theme } = useTheme();\n const [currentIndex, setCurrentIndex] = React.useState(0);\n\n const cycleDuration = cycleDurationProp ?? theme.motion.delay.xlong;\n const slideDuration = msToSeconds(theme.motion.duration.xmoderate);\n const slideEase = cssBezierToArray(castWebType(theme.motion.easing.emphasized));\n\n React.useEffect(() => {\n if (texts.length <= 1) {\n return undefined;\n }\n\n const id = setInterval(() => {\n setCurrentIndex((prev) => {\n const next = (prev + 1) % texts.length;\n onIndexChange?.(next);\n return next;\n });\n }, cycleDuration);\n\n return (): void => {\n clearInterval(id);\n };\n }, [texts.length, cycleDuration, onIndexChange]);\n\n const textsString = texts.join('\\0');\n React.useEffect(() => {\n setCurrentIndex(0);\n onIndexChange?.(0);\n // Reset only when the text contents change, not on every render (new array reference)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [textsString]);\n\n const renderContent = (text: string): React.ReactNode => {\n return children ? children(text) : text;\n };\n\n if (texts.length <= 1) {\n return <span>{renderContent(texts[0])}</span>;\n }\n\n const slideVariants: MotionVariantsType = {\n initial: { y: 16, opacity: 0, filter: 'blur(4px)' },\n animate: {\n y: 0,\n opacity: 1,\n filter: 'blur(0px)',\n transition: { duration: slideDuration, ease: slideEase },\n },\n exit: {\n y: -16,\n opacity: 0,\n filter: 'blur(4px)',\n position: 'absolute' as const,\n transition: { duration: slideDuration, ease: slideEase },\n },\n };\n\n return (\n <Box position=\"relative\" display=\"inline-flex\" overflow=\"hidden\">\n <AnimatePresence mode=\"popLayout\" initial={false}>\n <BaseMotionBox key={currentIndex} motionVariants={slideVariants}>\n <Box position=\"relative\" overflow=\"hidden\" whiteSpace=\"nowrap\">\n {renderContent(texts[currentIndex])}\n {showShimmer && <ShimmerOverlay />}\n </Box>\n </BaseMotionBox>\n </AnimatePresence>\n </Box>\n );\n};\n\nexport { RollingText };\nexport type { RollingTextProps };\n"],"names":["ShimmerOverlay","_useTheme","useTheme","theme","shimmerColor","colors","surface","text","staticWhite","muted","shimmerDuration","msToSeconds","motion","duration","shimmerDelay","delay","gentle","shimmerEase","cssBezierToArray","castWebType","easing","standard","_jsx","m","span","style","position","inset","background","concat","pointerEvents","initial","x","animate","transition","ease","repeat","Infinity","repeatDelay","RollingText","_ref","texts","children","onIndexChange","cycleDurationProp","cycleDuration","_ref$showShimmer","showShimmer","_useTheme2","_React$useState","React","useState","_React$useState2","_slicedToArray","currentIndex","setCurrentIndex","xlong","slideDuration","xmoderate","slideEase","emphasized","useEffect","length","undefined","id","setInterval","prev","next","clearInterval","textsString","join","renderContent","slideVariants","y","opacity","filter","exit","Box","display","overflow","AnimatePresence","mode","BaseMotionBox","motionVariants","_jsxs","whiteSpace"],"mappings":";;;;;;;;;;;;;;;AAUA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,GAA6B;AAC/C,EAAA,IAAAC,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;AAEb,EAAA,IAAMC,YAAY,GAAGD,KAAK,CAACE,MAAM,CAACC,OAAO,CAACC,IAAI,CAACC,WAAW,CAACC,KAAK,CAAA;AAChE,EAAA,IAAMC,eAAe,GAAGC,WAAW,CAACR,KAAK,CAACS,MAAM,CAACC,QAAQ,CAAC,UAAU,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KACxD;AACDiB,IAAAA,IAAI,EAAE;MACJH,CAAC,EAAE,CAAC,EAAE;AACNC,MAAAA,OAAO,EAAE,CAAC;AACVC,MAAAA,MAAM,EAAE,WAAW;AACnBjD,MAAAA,QAAQ,EAAE,UAAmB;AAC7BQ,MAAAA,UAAU,EAAE;AAAErB,QAAAA,QAAQ,EAAE4C,aAAa;AAAEtB,QAAAA,IAAI,EAAEwB,SAAAA;AAAU,OAAA;AACzD,KAAA;GACD,CAAA;EAED,oBACErC,GAAA,CAACuD,GAAG,EAAA;AAACnD,IAAAA,QAAQ,EAAC,UAAU;AAACoD,IAAAA,OAAO,EAAC,aAAa;AAACC,IAAAA,QAAQ,EAAC,QAAQ;IAAArC,QAAA,eAC9DpB,GAAA,CAAC0D,eAAe,EAAA;AAACC,MAAAA,IAAI,EAAC,WAAW;AAAClD,MAAAA,OAAO,EAAE,KAAM;MAAAW,QAAA,eAC/CpB,GAAA,CAAC4D,aAAa,EAAA;AAAoBC,QAAAA,cAAc,EAAEX,aAAc;QAAA9B,QAAA,eAC9D0C,IAAA,CAACP,GAAG,EAAA;AAACnD,UAAAA,QAAQ,EAAC,UAAU;AAACqD,UAAAA,QAAQ,EAAC,QAAQ;AAACM,UAAAA,UAAU,EAAC,QAAQ;AAAA3C,UAAAA,QAAA,EAC3D6B,CAAAA,aAAa,CAAC9B,KAAK,CAACa,YAAY,CAAC,CAAC,EAClCP,WAAW,iBAAIzB,GAAA,CAACtB,cAAc,IAAE,CAAC,CAAA;SAC/B,CAAA;AAAC,OAAA,EAJYsD,YAKL,CAAA;KACA,CAAA;AAAC,GACf,CAAC,CAAA;AAEV;;;;"}
1
+ {"version":3,"file":"RollingText.web.js","sources":["../../../../../../src/components/RollingText/RollingText.web.tsx"],"sourcesContent":["import React from 'react';\nimport { AnimatePresence, m } from 'framer-motion';\nimport { castWebType } from '~utils';\nimport { useTheme } from '~components/BladeProvider';\nimport { msToSeconds } from '~utils/msToSeconds';\nimport { cssBezierToArray } from '~utils/cssBezierToArray';\nimport { BaseMotionBox } from '~components/BaseMotion';\nimport type { MotionVariantsType } from '~components/BaseMotion';\nimport { Box } from '~components/Box';\n\nconst ShimmerText = ({ children }: { children: React.ReactNode }): React.ReactElement => {\n const { theme } = useTheme();\n\n const textColor = theme.colors.feedback.text.positive.intense;\n // Lighter positive feedback token creates the sweeping glint; resolves per color scheme automatically.\n const highlightColor = theme.colors.feedback.text.positive.subtle;\n const shimmerDuration = msToSeconds(theme.motion.duration['2xgentle']);\n const shimmerDelay = msToSeconds(theme.motion.delay.gentle);\n const shimmerEase = cssBezierToArray(castWebType(theme.motion.easing.standard));\n\n return (\n <m.span\n style={{\n backgroundImage: `linear-gradient(90deg, ${textColor} 38%, ${highlightColor} 50%, ${textColor} 62%)`,\n backgroundSize: '250% 100%',\n WebkitBackgroundClip: 'text',\n backgroundClip: 'text',\n color: 'transparent',\n WebkitTextFillColor: 'transparent',\n }}\n initial={{ backgroundPosition: '100% 0%' }}\n animate={{ backgroundPosition: '0% 0%' }}\n transition={{\n duration: shimmerDuration,\n ease: shimmerEase,\n repeat: Infinity,\n repeatDelay: shimmerDelay,\n }}\n >\n {children}\n </m.span>\n );\n};\n\ntype RollingTextProps = {\n /** Array of strings to cycle through with a rolling animation */\n texts: string[];\n /** Custom render function for each text item */\n children?: (text: string) => React.ReactNode;\n /** Callback fired when the active index changes */\n onIndexChange?: (index: number) => void;\n /** Cycle interval in ms (defaults to theme.motion.delay.xlong) */\n cycleDuration?: number;\n /** Whether to show the shimmer overlay on each item (defaults to true) */\n showShimmer?: boolean;\n};\n\nconst RollingText = ({\n texts,\n children,\n onIndexChange,\n cycleDuration: cycleDurationProp,\n showShimmer = true,\n}: RollingTextProps): React.ReactElement => {\n const { theme } = useTheme();\n const [currentIndex, setCurrentIndex] = React.useState(0);\n\n const cycleDuration = cycleDurationProp ?? theme.motion.delay.xlong;\n const slideDuration = msToSeconds(theme.motion.duration.xmoderate);\n const slideEase = cssBezierToArray(castWebType(theme.motion.easing.emphasized));\n\n React.useEffect(() => {\n if (texts.length <= 1) {\n return undefined;\n }\n\n const id = setInterval(() => {\n setCurrentIndex((prev) => {\n const next = (prev + 1) % texts.length;\n onIndexChange?.(next);\n return next;\n });\n }, cycleDuration);\n\n return (): void => {\n clearInterval(id);\n };\n }, [texts.length, cycleDuration, onIndexChange]);\n\n const textsString = texts.join('\\0');\n React.useEffect(() => {\n setCurrentIndex(0);\n onIndexChange?.(0);\n // Reset only when the text contents change, not on every render (new array reference)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [textsString]);\n\n const renderContent = (text: string): React.ReactNode => {\n return children ? children(text) : text;\n };\n\n if (texts.length <= 1) {\n return <span>{renderContent(texts[0])}</span>;\n }\n\n const slideVariants: MotionVariantsType = {\n initial: { y: 16, opacity: 0, filter: 'blur(4px)' },\n animate: {\n y: 0,\n opacity: 1,\n filter: 'blur(0px)',\n transition: { duration: slideDuration, ease: slideEase },\n },\n exit: {\n y: -16,\n opacity: 0,\n filter: 'blur(4px)',\n position: 'absolute' as const,\n transition: { duration: slideDuration, ease: slideEase },\n },\n };\n\n return (\n <Box position=\"relative\" display=\"inline-flex\" overflow=\"hidden\">\n <AnimatePresence mode=\"popLayout\" initial={false}>\n <BaseMotionBox key={currentIndex} motionVariants={slideVariants}>\n <Box position=\"relative\" overflow=\"hidden\" whiteSpace=\"nowrap\">\n {showShimmer && !children ? (\n <ShimmerText>{renderContent(texts[currentIndex])}</ShimmerText>\n ) : (\n renderContent(texts[currentIndex])\n )}\n </Box>\n </BaseMotionBox>\n </AnimatePresence>\n </Box>\n );\n};\n\nexport { RollingText };\nexport type { RollingTextProps };\n"],"names":["ShimmerText","_ref","children","_useTheme","useTheme","theme","textColor","colors","feedback","text","positive","intense","highlightColor","subtle","shimmerDuration","msToSeconds","motion","duration","shimmerDelay","delay","gentle","shimmerEase","cssBezierToArray","castWebType","easing","standard","_jsx","m","span","style","backgroundImage","concat","backgroundSize","WebkitBackgroundClip","backgroundClip","color","WebkitTextFillColor","initial","backgroundPosition","animate","transition","ease","repeat","Infinity","repeatDelay","RollingText","_ref2","texts","onIndexChange","cycleDurationProp","cycleDuration","_ref2$showShimmer","showShimmer","_useTheme2","_React$useState","React","useState","_React$useState2","_slicedToArray","currentIndex","setCurrentIndex","xlong","slideDuration","xmoderate","slideEase","emphasized","useEffect","length","undefined","id","setInterval","prev","next","clearInterval","textsString","join","renderContent","slideVariants","y","opacity","filter","exit","position","Box","display","overflow","AnimatePresence","mode","BaseMotionBox","motionVariants","whiteSpace"],"mappings":";;;;;;;;;;;;;;;AAUA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAAwE;AAAA,EAAA,IAAlEC,QAAQ,GAAAD,IAAA,CAARC,QAAQ,CAAA;AAC7B,EAAA,IAAAC,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;AAEb,EAAA,IAAMC,SAAS,GAAGD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAACC,IAAI,CAACC,QAAQ,CAACC,OAAO,CAAA;AAC7D;AACA,EAAA,IAAMC,cAAc,GAAGP,KAAK,CAACE,MAAM,CAACC,QAAQ,CAACC,IAAI,CAACC,QAAQ,CAACG,MAAM,CAAA;AACjE,EAAA,IAAMC,eAAe,GAAGC,WAAW,CAACV,KAAK,CAACW,MAAM,CAACC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAA;EACtE,IAAMC,YAAY,GAAGH,WAAW,CAACV,KAAK,CAACW,MAAM,CAACG,KAAK,CAACC,MAAM,CAAC,CAAA;AAC3D,EAAA,IAAMC,WAAW,GAAGC,gBAAgB,CAACC,WAAW,CAAClB,KAAK,CAACW,MAAM,CAACQ,MAAM,CAACC,QAAQ,CAAC,CAAC,CAAA;AAE/E,EAAA,oBACEC,GAAA,CAACC,CAAC,CAACC,IAAI,EAAA;AACLC,IAAAA,KAAK,EAAE;AACLC,MAAAA,eAAe,EAAAC,yBAAAA,CAAAA,MAA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,UAAU,EAAE;AAAEvB,QAAAA,QAAQ,EAAE6C,aAAa;AAAErB,QAAAA,IAAI,EAAEuB,SAAAA;AAAU,OAAA;AACzD,KAAA;GACD,CAAA;EAED,oBACEtC,GAAA,CAACyD,GAAG,EAAA;AAACD,IAAAA,QAAQ,EAAC,UAAU;AAACE,IAAAA,OAAO,EAAC,aAAa;AAACC,IAAAA,QAAQ,EAAC,QAAQ;IAAAnF,QAAA,eAC9DwB,GAAA,CAAC4D,eAAe,EAAA;AAACC,MAAAA,IAAI,EAAC,WAAW;AAAClD,MAAAA,OAAO,EAAE,KAAM;MAAAnC,QAAA,eAC/CwB,GAAA,CAAC8D,aAAa,EAAA;AAAoBC,QAAAA,cAAc,EAAEZ,aAAc;QAAA3E,QAAA,eAC9DwB,GAAA,CAACyD,GAAG,EAAA;AAACD,UAAAA,QAAQ,EAAC,UAAU;AAACG,UAAAA,QAAQ,EAAC,QAAQ;AAACK,UAAAA,UAAU,EAAC,QAAQ;UAAAxF,QAAA,EAC3DkD,WAAW,IAAI,CAAClD,QAAQ,gBACvBwB,GAAA,CAAC1B,WAAW,EAAA;AAAAE,YAAAA,QAAA,EAAE0E,aAAa,CAAC7B,KAAK,CAACY,YAAY,CAAC,CAAA;AAAC,WAAc,CAAC,GAE/DiB,aAAa,CAAC7B,KAAK,CAACY,YAAY,CAAC,CAAA;SAEhC,CAAA;AAAC,OAAA,EAPYA,YAQL,CAAA;KACA,CAAA;AAAC,GACf,CAAC,CAAA;AAEV;;;;"}
@@ -8,14 +8,16 @@ import { forwardRef, useState, useRef, useEffect } from 'react';
8
8
  import { RzpGlassMount } from './RzpGlassMount.js';
9
9
  import { DEFAULT_CDN_PATH, getDefaultAssets, getPresetAssets, resolveConfig } from './utils.js';
10
10
  import { useMergeRefs } from '../../../utils/useMergeRefs.js';
11
+ import '../../BladeProvider/index.js';
11
12
  import { jsx } from 'react/jsx-runtime';
13
+ import useTheme from '../../BladeProvider/useTheme.js';
12
14
 
13
15
  var _excluded = ["width", "height", "className", "style", "onLoad", "onError", "assetsPath", "gradientMapCanvas", "gradientMapSrc", "gradientMap2Src", "imageSrc"];
14
16
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15
17
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
16
18
  var FADE_IN_MS = 200;
17
19
  var RzpGlass = /*#__PURE__*/forwardRef(function RzpGlass(props, forwardedRef) {
18
- var _presetAssets$videoSr, _ref, _ref2, _presetAssets$centerG, _configProps$edgeFeat;
20
+ var _presetAssets$videoSr, _ref, _ref2, _presetAssets$centerG, _configProps$edgeFeat, _configProps$specular;
19
21
  var _props$width = props.width,
20
22
  width = _props$width === void 0 ? '100%' : _props$width,
21
23
  _props$height = props.height,
@@ -31,12 +33,19 @@ var RzpGlass = /*#__PURE__*/forwardRef(function RzpGlass(props, forwardedRef) {
31
33
  imageSrcProp = props.imageSrc,
32
34
  configProps = _objectWithoutProperties(props, _excluded);
33
35
 
36
+ // Follow Blade's color scheme: in dark mode every preset gets its dark
37
+ // counterpart (dark gradient maps, black background, no bloom, black specular)
38
+ // layered on top. Explicit props still win over the dark overlay.
39
+ var _useTheme = useTheme(),
40
+ colorScheme = _useTheme.colorScheme;
41
+ var isDark = colorScheme === 'dark';
42
+
34
43
  // Get default assets based on assetsPath
35
44
  var assetsPath = assetsPathProp !== null && assetsPathProp !== void 0 ? assetsPathProp : DEFAULT_CDN_PATH;
36
45
  var defaultAssets = getDefaultAssets(assetsPath);
37
46
 
38
47
  // Resolve assets: prop overrides preset, preset overrides default
39
- var presetAssets = getPresetAssets(props.preset, assetsPath);
48
+ var presetAssets = getPresetAssets(props.preset, assetsPath, isDark);
40
49
  var imageSrc = imageSrcProp !== null && imageSrcProp !== void 0 ? imageSrcProp : presetAssets.imageSrc;
41
50
  var videoSrc = imageSrc ? undefined : (_presetAssets$videoSr = presetAssets.videoSrc) !== null && _presetAssets$videoSr !== void 0 ? _presetAssets$videoSr : defaultAssets.videoSrc;
42
51
  var gradientMapSrc = (_ref = gradientMapSrcProp !== null && gradientMapSrcProp !== void 0 ? gradientMapSrcProp : presetAssets.gradientMapSrc) !== null && _ref !== void 0 ? _ref : defaultAssets.gradientMapSrc;
@@ -68,7 +77,7 @@ var RzpGlass = /*#__PURE__*/forwardRef(function RzpGlass(props, forwardedRef) {
68
77
  return _context.abrupt("return");
69
78
  case 1:
70
79
  _context.prev = 1;
71
- config = resolveConfig(props, assetsPath);
80
+ config = resolveConfig(props, assetsPath, isDark);
72
81
  mountRef.current = new RzpGlassMount(divRef.current, {
73
82
  videoSrc: videoSrc,
74
83
  imageSrc: imageSrc,
@@ -121,15 +130,15 @@ var RzpGlass = /*#__PURE__*/forwardRef(function RzpGlass(props, forwardedRef) {
121
130
  mountRef.current = null;
122
131
  setIsInitialized(false);
123
132
  };
124
- }, [assetsPath, videoSrc, imageSrc, gradientMapSrc, gradientMap2Src, centerGradientMapSrc, configProps.preset]);
133
+ }, [assetsPath, videoSrc, imageSrc, gradientMapSrc, gradientMap2Src, centerGradientMapSrc, configProps.preset, isDark]);
125
134
 
126
135
  // Update uniforms when config props change
127
136
  useEffect(function () {
128
137
  if (isInitialized && mountRef.current) {
129
- var config = resolveConfig(props, assetsPath);
138
+ var config = resolveConfig(props, assetsPath, isDark);
130
139
  mountRef.current.setUniforms(config);
131
140
  }
132
- }, [isInitialized, configProps.preset,
141
+ }, [isInitialized, isDark, configProps.preset,
133
142
  // Colorama
134
143
  configProps.inputMin, configProps.inputMax, configProps.modifyGamma, configProps.posterizeLevels, configProps.cycleRepetitions, configProps.phaseShift, configProps.cycleSpeed, configProps.wrapMode, configProps.reverse, configProps.blendWithOriginal,
135
144
  // Displacement
@@ -143,7 +152,7 @@ var RzpGlass = /*#__PURE__*/forwardRef(function RzpGlass(props, forwardedRef) {
143
152
  // Effect toggles
144
153
  configProps.enableDisplacement, configProps.enableColorama, configProps.enableBloom, configProps.enableLightSweep,
145
154
  // Light
146
- configProps.lightIntensity, configProps.lightStartFrame,
155
+ configProps.lightIntensity], _toConsumableArray((_configProps$specular = configProps.specularTint) !== null && _configProps$specular !== void 0 ? _configProps$specular : [1, 1, 1]), [configProps.lightStartFrame,
147
156
  // Playback
148
157
  configProps.paused, configProps.startTime, configProps.endTime, configProps.animateLightIndependently,
149
158
  // Cycle animation
@@ -1 +1 @@
1
- {"version":3,"file":"RzpGlass.js","sources":["../../../../../../../src/components/Spark/RzpGlass/RzpGlass.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable react/react-in-jsx-scope */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable @typescript-eslint/no-implicit-any-catch */\n/* eslint-disable @typescript-eslint/no-shadow */\nimport { forwardRef, useEffect, useRef, useState } from 'react';\nimport { RzpGlassMount } from './RzpGlassMount';\nimport type { RzpGlassProps } from './types';\nimport { DEFAULT_CDN_PATH, getDefaultAssets, getPresetAssets, resolveConfig } from './utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\n\n// Duration of the component's built-in fade-in transition.\n// The video is kept paused during this window so one-shot animations\n// (e.g. circleSlideUp) don't \"waste\" frames while the canvas is invisible.\nconst FADE_IN_MS = 200;\n\nconst RzpGlass = forwardRef<HTMLDivElement, RzpGlassProps>(function RzpGlass(props, forwardedRef) {\n const {\n width = '100%',\n height = '100%',\n className,\n style,\n onLoad,\n onError,\n assetsPath: assetsPathProp,\n gradientMapCanvas,\n gradientMapSrc: gradientMapSrcProp,\n gradientMap2Src: gradientMap2SrcProp,\n imageSrc: imageSrcProp,\n ...configProps\n } = props;\n\n // Get default assets based on assetsPath\n const assetsPath: string = assetsPathProp ?? DEFAULT_CDN_PATH;\n const defaultAssets = getDefaultAssets(assetsPath);\n\n // Resolve assets: prop overrides preset, preset overrides default\n const presetAssets = getPresetAssets(props.preset, assetsPath);\n const imageSrc = imageSrcProp ?? presetAssets.imageSrc;\n const videoSrc = imageSrc ? undefined : presetAssets.videoSrc ?? defaultAssets.videoSrc;\n const gradientMapSrc =\n gradientMapSrcProp ?? presetAssets.gradientMapSrc ?? defaultAssets.gradientMapSrc;\n const gradientMap2Src =\n gradientMap2SrcProp ?? presetAssets.gradientMap2Src ?? defaultAssets.gradientMap2Src;\n const centerGradientMapSrc =\n presetAssets.centerGradientMapSrc ?? defaultAssets.centerGradientMapSrc;\n\n const [isInitialized, setIsInitialized] = useState(false);\n const [error, setError] = useState<Error | null>(null);\n const divRef = useRef<HTMLDivElement>(null);\n const mountRef = useRef<RzpGlassMount | null>(null);\n\n // Initialize on mount\n useEffect(() => {\n const init = async () => {\n if (!divRef.current || mountRef.current) return;\n\n try {\n const config = resolveConfig(props, assetsPath);\n\n mountRef.current = new RzpGlassMount(\n divRef.current,\n {\n videoSrc,\n imageSrc,\n gradientMapSrc,\n gradientMap2Src,\n centerGradientMapSrc,\n },\n config,\n );\n\n await mountRef.current.loadAssets();\n\n // Pause the video during the CSS fade-in so one-shot animations\n // don't burn frames while the component is still transparent.\n // Only do this when the consumer hasn't explicitly set paused: true.\n const userWantsPaused = config.paused ?? false;\n if (!userWantsPaused) {\n mountRef.current.pause();\n }\n\n setIsInitialized(true); // kicks off the CSS opacity 0 → 1 transition\n\n // After the fade-in completes, resume video and notify the consumer.\n setTimeout(() => {\n if (!mountRef.current) return;\n if (!userWantsPaused) {\n mountRef.current.play();\n }\n onLoad?.();\n }, FADE_IN_MS);\n } catch (err) {\n const error = err instanceof Error ? err : new Error(String(err));\n setError(error);\n onError?.(error);\n }\n };\n\n void init();\n\n return () => {\n mountRef.current?.dispose();\n mountRef.current = null;\n setIsInitialized(false);\n };\n }, [assetsPath, videoSrc, imageSrc, gradientMapSrc, gradientMap2Src, centerGradientMapSrc, configProps.preset]);\n\n // Update uniforms when config props change\n useEffect(() => {\n if (isInitialized && mountRef.current) {\n const config = resolveConfig(props, assetsPath);\n mountRef.current.setUniforms(config);\n }\n }, [\n isInitialized,\n configProps.preset,\n // Colorama\n configProps.inputMin,\n configProps.inputMax,\n configProps.modifyGamma,\n configProps.posterizeLevels,\n configProps.cycleRepetitions,\n configProps.phaseShift,\n configProps.cycleSpeed,\n configProps.wrapMode,\n configProps.reverse,\n configProps.blendWithOriginal,\n // Displacement\n configProps.numSegments,\n configProps.slitAngle,\n configProps.displacementX,\n configProps.displacementY,\n // Center element\n configProps.enableCenterElement,\n configProps.centerAnimDuration,\n // Color correction\n configProps.ccBlackPoint,\n configProps.ccWhitePoint,\n configProps.ccMidtoneGamma,\n configProps.ccGamma,\n configProps.ccContrast,\n // Zoom & Pan\n configProps.zoom,\n configProps.panX,\n configProps.panY,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n ...(configProps.edgeFeather ?? [0, 0, 0, 0]),\n // Effect toggles\n configProps.enableDisplacement,\n configProps.enableColorama,\n configProps.enableBloom,\n configProps.enableLightSweep,\n // Light\n configProps.lightIntensity,\n configProps.lightStartFrame,\n // Playback\n configProps.paused,\n configProps.startTime,\n configProps.endTime,\n configProps.animateLightIndependently,\n // Cycle animation\n configProps.animateCycleReps,\n configProps.cycleRepetitionsStart,\n configProps.cycleRepetitionsEnd,\n configProps.cycleRepetitionsStartFrame,\n configProps.cycleRepetitionsDuration,\n // Gradient map blend\n configProps.gradientMapBlend,\n configProps.gradientMapBlendDuration,\n ]);\n\n // Update gradient map texture when a canvas is provided\n useEffect(() => {\n if (isInitialized && mountRef.current && gradientMapCanvas) {\n mountRef.current.updateGradientMapTexture(gradientMapCanvas);\n }\n }, [isInitialized, gradientMapCanvas]);\n\n const mergedRef = useMergeRefs(forwardedRef, divRef);\n\n // Convert width/height to string if number\n const widthStyle = typeof width === 'number' ? `${width}px` : width;\n const heightStyle = typeof height === 'number' ? `${height}px` : height;\n\n if (error) {\n return (\n <div\n ref={mergedRef}\n className={className}\n style={{\n width: widthStyle,\n height: heightStyle,\n ...style,\n }}\n />\n );\n }\n\n return (\n <div\n ref={mergedRef}\n className={className}\n style={{\n width: widthStyle,\n height: heightStyle,\n position: 'relative',\n overflow: 'hidden',\n backgroundColor: 'transparent',\n transition: `${FADE_IN_MS}ms opacity`,\n ...(isInitialized ? { opacity: 1 } : { opacity: 0 }),\n ...style,\n }}\n />\n );\n});\n\nexport { RzpGlass };\n"],"names":["FADE_IN_MS","RzpGlass","forwardRef","props","forwardedRef","_presetAssets$videoSr","_ref","_ref2","_presetAssets$centerG","_configProps$edgeFeat","_props$width","width","_props$height","height","className","style","onLoad","onError","assetsPathProp","assetsPath","gradientMapCanvas","gradientMapSrcProp","gradientMapSrc","gradientMap2SrcProp","gradientMap2Src","imageSrcProp","imageSrc","configProps","_objectWithoutProperties","_excluded","DEFAULT_CDN_PATH","defaultAssets","getDefaultAssets","presetAssets","getPresetAssets","preset","videoSrc","undefined","centerGradientMapSrc","_useState","useState","_useState2","_slicedToArray","isInitialized","setIsInitialized","_useState3","_useState4","error","setError","divRef","useRef","mountRef","useEffect","init","_ref3","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_config$paused","config","userWantsPaused","_error","_t","wrap","_context","prev","next","current","abrupt","resolveConfig","RzpGlassMount","loadAssets","paused","pause","setTimeout","play","Error","String","stop","apply","arguments","_mountRef$current","dispose","setUniforms","inputMin","inputMax","modifyGamma","posterizeLevels","cycleRepetitions","phaseShift","cycleSpeed","wrapMode","reverse","blendWithOriginal","numSegments","slitAngle","displacementX","displacementY","enableCenterElement","centerAnimDuration","ccBlackPoint","ccWhitePoint","ccMidtoneGamma","ccGamma","ccContrast","zoom","panX","panY","concat","_toConsumableArray","edgeFeather","enableDisplacement","enableColorama","enableBloom","enableLightSweep","lightIntensity","lightStartFrame","startTime","endTime","animateLightIndependently","animateCycleReps","cycleRepetitionsStart","cycleRepetitionsEnd","cycleRepetitionsStartFrame","cycleRepetitionsDuration","gradientMapBlend","gradientMapBlendDuration","updateGradientMapTexture","mergedRef","useMergeRefs","widthStyle","heightStyle","_jsx","ref","_objectSpread","position","overflow","backgroundColor","transition","opacity"],"mappings":";;;;;;;;;;;;;;;AAgBA,IAAMA,UAAU,GAAG,GAAG,CAAA;AAEhBC,IAAAA,QAAQ,gBAAGC,UAAU,CAAgC,SAASD,QAAQA,CAACE,KAAK,EAAEC,YAAY,EAAE;EAAA,IAAAC,qBAAA,EAAAC,IAAA,EAAAC,KAAA,EAAAC,qBAAA,EAAAC,qBAAA,CAAA;AAChG,EAAA,IAAAC,YAAA,GAaIP,KAAK,CAZPQ,KAAK;AAALA,IAAAA,KAAK,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,YAAA;IAAAE,aAAA,GAYZT,KAAK,CAXPU,MAAM;AAANA,IAAAA,MAAM,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,aAAA;IACfE,SAAS,GAUPX,KAAK,CAVPW,SAAS;IACTC,KAAK,GASHZ,KAAK,CATPY,KAAK;IACLC,MAAM,GAQJb,KAAK,CARPa,MAAM;IACNC,OAAO,GAOLd,KAAK,CAPPc,OAAO;IACKC,cAAc,GAMxBf,KAAK,CANPgB,UAAU;IACVC,iBAAiB,GAKfjB,KAAK,CALPiB,iBAAiB;IACDC,kBAAkB,GAIhClB,KAAK,CAJPmB,cAAc;IACGC,mBAAmB,GAGlCpB,KAAK,CAHPqB,eAAe;IACLC,YAAY,GAEpBtB,KAAK,CAFPuB,QAAQ;AACLC,IAAAA,WAAW,GAAAC,wBAAA,CACZzB,KAAK,EAAA0B,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EAAA,CAAAgG,MAAA,CAAMhG,MAAM,EAAA,IAAA,CAAA,GAAOA,MAAM,CAAA;AAEvE,EAAA,IAAIkC,KAAK,EAAE;AACT,IAAA,oBACEsF,GAAA,CAAA,KAAA,EAAA;AACEC,MAAAA,GAAG,EAAEL,SAAU;AACfnH,MAAAA,SAAS,EAAEA,SAAU;AACrBC,MAAAA,KAAK,EAAAwH,aAAA,CAAA;AACH5H,QAAAA,KAAK,EAAEwH,UAAU;AACjBtH,QAAAA,MAAM,EAAEuH,WAAAA;AAAW,OAAA,EAChBrH,KAAK,CAAA;AACR,KACH,CAAC,CAAA;AAEN,GAAA;AAEA,EAAA,oBACEsH,GAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,GAAG,EAAEL,SAAU;AACfnH,IAAAA,SAAS,EAAEA,SAAU;IACrBC,KAAK,EAAAwH,aAAA,CAAAA,aAAA,CAAA;AACH5H,MAAAA,KAAK,EAAEwH,UAAU;AACjBtH,MAAAA,MAAM,EAAEuH,WAAW;AACnBI,MAAAA,QAAQ,EAAE,UAAU;AACpBC,MAAAA,QAAQ,EAAE,QAAQ;AAClBC,MAAAA,eAAe,EAAE,aAAa;MAC9BC,UAAU,EAAA,EAAA,CAAA9B,MAAA,CAAK7G,UAAU,EAAA,YAAA,CAAA;AAAY,KAAA,EACjC2C,aAAa,GAAG;AAAEiG,MAAAA,OAAO,EAAE,CAAA;AAAE,KAAC,GAAG;AAAEA,MAAAA,OAAO,EAAE,CAAA;AAAE,KAAC,GAChD7H,KAAK,CAAA;AACR,GACH,CAAC,CAAA;AAEN,CAAC;;;;"}
1
+ {"version":3,"file":"RzpGlass.js","sources":["../../../../../../../src/components/Spark/RzpGlass/RzpGlass.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable react/react-in-jsx-scope */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable @typescript-eslint/no-implicit-any-catch */\n/* eslint-disable @typescript-eslint/no-shadow */\nimport { forwardRef, useEffect, useRef, useState } from 'react';\nimport { RzpGlassMount } from './RzpGlassMount';\nimport type { RzpGlassProps } from './types';\nimport { DEFAULT_CDN_PATH, getDefaultAssets, getPresetAssets, resolveConfig } from './utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport { useTheme } from '~components/BladeProvider';\n\n// Duration of the component's built-in fade-in transition.\n// The video is kept paused during this window so one-shot animations\n// (e.g. circleSlideUp) don't \"waste\" frames while the canvas is invisible.\nconst FADE_IN_MS = 200;\n\nconst RzpGlass = forwardRef<HTMLDivElement, RzpGlassProps>(function RzpGlass(props, forwardedRef) {\n const {\n width = '100%',\n height = '100%',\n className,\n style,\n onLoad,\n onError,\n assetsPath: assetsPathProp,\n gradientMapCanvas,\n gradientMapSrc: gradientMapSrcProp,\n gradientMap2Src: gradientMap2SrcProp,\n imageSrc: imageSrcProp,\n ...configProps\n } = props;\n\n // Follow Blade's color scheme: in dark mode every preset gets its dark\n // counterpart (dark gradient maps, black background, no bloom, black specular)\n // layered on top. Explicit props still win over the dark overlay.\n const { colorScheme } = useTheme();\n const isDark = colorScheme === 'dark';\n\n // Get default assets based on assetsPath\n const assetsPath: string = assetsPathProp ?? DEFAULT_CDN_PATH;\n const defaultAssets = getDefaultAssets(assetsPath);\n\n // Resolve assets: prop overrides preset, preset overrides default\n const presetAssets = getPresetAssets(props.preset, assetsPath, isDark);\n const imageSrc = imageSrcProp ?? presetAssets.imageSrc;\n const videoSrc = imageSrc ? undefined : presetAssets.videoSrc ?? defaultAssets.videoSrc;\n const gradientMapSrc =\n gradientMapSrcProp ?? presetAssets.gradientMapSrc ?? defaultAssets.gradientMapSrc;\n const gradientMap2Src =\n gradientMap2SrcProp ?? presetAssets.gradientMap2Src ?? defaultAssets.gradientMap2Src;\n const centerGradientMapSrc =\n presetAssets.centerGradientMapSrc ?? defaultAssets.centerGradientMapSrc;\n\n const [isInitialized, setIsInitialized] = useState(false);\n const [error, setError] = useState<Error | null>(null);\n const divRef = useRef<HTMLDivElement>(null);\n const mountRef = useRef<RzpGlassMount | null>(null);\n\n // Initialize on mount\n useEffect(() => {\n const init = async () => {\n if (!divRef.current || mountRef.current) return;\n\n try {\n const config = resolveConfig(props, assetsPath, isDark);\n\n mountRef.current = new RzpGlassMount(\n divRef.current,\n {\n videoSrc,\n imageSrc,\n gradientMapSrc,\n gradientMap2Src,\n centerGradientMapSrc,\n },\n config,\n );\n\n await mountRef.current.loadAssets();\n\n // Pause the video during the CSS fade-in so one-shot animations\n // don't burn frames while the component is still transparent.\n // Only do this when the consumer hasn't explicitly set paused: true.\n const userWantsPaused = config.paused ?? false;\n if (!userWantsPaused) {\n mountRef.current.pause();\n }\n\n setIsInitialized(true); // kicks off the CSS opacity 0 → 1 transition\n\n // After the fade-in completes, resume video and notify the consumer.\n setTimeout(() => {\n if (!mountRef.current) return;\n if (!userWantsPaused) {\n mountRef.current.play();\n }\n onLoad?.();\n }, FADE_IN_MS);\n } catch (err) {\n const error = err instanceof Error ? err : new Error(String(err));\n setError(error);\n onError?.(error);\n }\n };\n\n void init();\n\n return () => {\n mountRef.current?.dispose();\n mountRef.current = null;\n setIsInitialized(false);\n };\n }, [assetsPath, videoSrc, imageSrc, gradientMapSrc, gradientMap2Src, centerGradientMapSrc, configProps.preset, isDark]);\n\n // Update uniforms when config props change\n useEffect(() => {\n if (isInitialized && mountRef.current) {\n const config = resolveConfig(props, assetsPath, isDark);\n mountRef.current.setUniforms(config);\n }\n }, [\n isInitialized,\n isDark,\n configProps.preset,\n // Colorama\n configProps.inputMin,\n configProps.inputMax,\n configProps.modifyGamma,\n configProps.posterizeLevels,\n configProps.cycleRepetitions,\n configProps.phaseShift,\n configProps.cycleSpeed,\n configProps.wrapMode,\n configProps.reverse,\n configProps.blendWithOriginal,\n // Displacement\n configProps.numSegments,\n configProps.slitAngle,\n configProps.displacementX,\n configProps.displacementY,\n // Center element\n configProps.enableCenterElement,\n configProps.centerAnimDuration,\n // Color correction\n configProps.ccBlackPoint,\n configProps.ccWhitePoint,\n configProps.ccMidtoneGamma,\n configProps.ccGamma,\n configProps.ccContrast,\n // Zoom & Pan\n configProps.zoom,\n configProps.panX,\n configProps.panY,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n ...(configProps.edgeFeather ?? [0, 0, 0, 0]),\n // Effect toggles\n configProps.enableDisplacement,\n configProps.enableColorama,\n configProps.enableBloom,\n configProps.enableLightSweep,\n // Light\n configProps.lightIntensity,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n ...(configProps.specularTint ?? [1, 1, 1]),\n configProps.lightStartFrame,\n // Playback\n configProps.paused,\n configProps.startTime,\n configProps.endTime,\n configProps.animateLightIndependently,\n // Cycle animation\n configProps.animateCycleReps,\n configProps.cycleRepetitionsStart,\n configProps.cycleRepetitionsEnd,\n configProps.cycleRepetitionsStartFrame,\n configProps.cycleRepetitionsDuration,\n // Gradient map blend\n configProps.gradientMapBlend,\n configProps.gradientMapBlendDuration,\n ]);\n\n // Update gradient map texture when a canvas is provided\n useEffect(() => {\n if (isInitialized && mountRef.current && gradientMapCanvas) {\n mountRef.current.updateGradientMapTexture(gradientMapCanvas);\n }\n }, [isInitialized, gradientMapCanvas]);\n\n const mergedRef = useMergeRefs(forwardedRef, divRef);\n\n // Convert width/height to string if number\n const widthStyle = typeof width === 'number' ? `${width}px` : width;\n const heightStyle = typeof height === 'number' ? `${height}px` : height;\n\n if (error) {\n return (\n <div\n ref={mergedRef}\n className={className}\n style={{\n width: widthStyle,\n height: heightStyle,\n ...style,\n }}\n />\n );\n }\n\n return (\n <div\n ref={mergedRef}\n className={className}\n style={{\n width: widthStyle,\n height: heightStyle,\n position: 'relative',\n overflow: 'hidden',\n backgroundColor: 'transparent',\n transition: `${FADE_IN_MS}ms opacity`,\n ...(isInitialized ? { opacity: 1 } : { opacity: 0 }),\n ...style,\n }}\n />\n );\n});\n\nexport { RzpGlass };\n"],"names":["FADE_IN_MS","RzpGlass","forwardRef","props","forwardedRef","_presetAssets$videoSr","_ref","_ref2","_presetAssets$centerG","_configProps$edgeFeat","_configProps$specular","_props$width","width","_props$height","height","className","style","onLoad","onError","assetsPathProp","assetsPath","gradientMapCanvas","gradientMapSrcProp","gradientMapSrc","gradientMap2SrcProp","gradientMap2Src","imageSrcProp","imageSrc","configProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","colorScheme","isDark","DEFAULT_CDN_PATH","defaultAssets","getDefaultAssets","presetAssets","getPresetAssets","preset","videoSrc","undefined","centerGradientMapSrc","_useState","useState","_useState2","_slicedToArray","isInitialized","setIsInitialized","_useState3","_useState4","error","setError","divRef","useRef","mountRef","useEffect","init","_ref3","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_config$paused","config","userWantsPaused","_error","_t","wrap","_context","prev","next","current","abrupt","resolveConfig","RzpGlassMount","loadAssets","paused","pause","setTimeout","play","Error","String","stop","apply","arguments","_mountRef$current","dispose","setUniforms","inputMin","inputMax","modifyGamma","posterizeLevels","cycleRepetitions","phaseShift","cycleSpeed","wrapMode","reverse","blendWithOriginal","numSegments","slitAngle","displacementX","displacementY","enableCenterElement","centerAnimDuration","ccBlackPoint","ccWhitePoint","ccMidtoneGamma","ccGamma","ccContrast","zoom","panX","panY","concat","_toConsumableArray","edgeFeather","enableDisplacement","enableColorama","enableBloom","enableLightSweep","lightIntensity","specularTint","lightStartFrame","startTime","endTime","animateLightIndependently","animateCycleReps","cycleRepetitionsStart","cycleRepetitionsEnd","cycleRepetitionsStartFrame","cycleRepetitionsDuration","gradientMapBlend","gradientMapBlendDuration","updateGradientMapTexture","mergedRef","useMergeRefs","widthStyle","heightStyle","_jsx","ref","_objectSpread","position","overflow","backgroundColor","transition","opacity"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,IAAMA,UAAU,GAAG,GAAG,CAAA;AAEhBC,IAAAA,QAAQ,gBAAGC,UAAU,CAAgC,SAASD,QAAQA,CAACE,KAAK,EAAE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IAAIsC,KAAK,EAAE;AACT,IAAA,oBACEuF,GAAA,CAAA,KAAA,EAAA;AACEC,MAAAA,GAAG,EAAEL,SAAU;AACfxH,MAAAA,SAAS,EAAEA,SAAU;AACrBC,MAAAA,KAAK,EAAA6H,aAAA,CAAA;AACHjI,QAAAA,KAAK,EAAE6H,UAAU;AACjB3H,QAAAA,MAAM,EAAE4H,WAAAA;AAAW,OAAA,EAChB1H,KAAK,CAAA;AACR,KACH,CAAC,CAAA;AAEN,GAAA;AAEA,EAAA,oBACE2H,GAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,GAAG,EAAEL,SAAU;AACfxH,IAAAA,SAAS,EAAEA,SAAU;IACrBC,KAAK,EAAA6H,aAAA,CAAAA,aAAA,CAAA;AACHjI,MAAAA,KAAK,EAAE6H,UAAU;AACjB3H,MAAAA,MAAM,EAAE4H,WAAW;AACnBI,MAAAA,QAAQ,EAAE,UAAU;AACpBC,MAAAA,QAAQ,EAAE,QAAQ;AAClBC,MAAAA,eAAe,EAAE,aAAa;MAC9BC,UAAU,EAAA,EAAA,CAAA/B,MAAA,CAAKlH,UAAU,EAAA,YAAA,CAAA;AAAY,KAAA,EACjCgD,aAAa,GAAG;AAAEkG,MAAAA,OAAO,EAAE,CAAA;AAAE,KAAC,GAAG;AAAEA,MAAAA,OAAO,EAAE,CAAA;AAAE,KAAC,GAChDlI,KAAK,CAAA;AACR,GACH,CAAC,CAAA;AAEN,CAAC;;;;"}
@@ -521,7 +521,7 @@ var RzpGlassMount = /*#__PURE__*/function () {
521
521
  var program = this.program;
522
522
 
523
523
  // All uniform names from the shader
524
- var uniformNames = ['uTime', 'iResolution', 'uDpr', 'uVideoTexture', 'uGradientMap', 'uGradientMap2', 'uGradientMapBlend', 'uCenterGradientMap', 'uEnableDisplacement', 'uEnableColorama', 'uEnableBloom', 'uEnableLightSweep', 'uInputMin', 'uInputMax', 'uModifyGamma', 'uPosterizeLevels', 'uCycleRepetitions', 'uPhaseShift', 'uCycleSpeed', 'uWrapMode', 'uReverse', 'uBlendWithOriginal', 'uLightIntensity', 'uFrameCount', 'uLightStartFrame', 'uNumSegments', 'uSlitAngle', 'uDisplacementX', 'uDisplacementY', 'uEnableCenterElement', 'uCenterAnimDuration', 'uCenterAnimTime', 'uCCBlackPoint', 'uCCWhitePoint', 'uCCMidtoneGamma', 'uCCGamma', 'uCCContrast', 'uZoom', 'uPan',
524
+ var uniformNames = ['uTime', 'iResolution', 'uDpr', 'uVideoTexture', 'uGradientMap', 'uGradientMap2', 'uGradientMapBlend', 'uCenterGradientMap', 'uEnableDisplacement', 'uEnableColorama', 'uEnableBloom', 'uEnableLightSweep', 'uInputMin', 'uInputMax', 'uModifyGamma', 'uPosterizeLevels', 'uCycleRepetitions', 'uPhaseShift', 'uCycleSpeed', 'uWrapMode', 'uReverse', 'uBlendWithOriginal', 'uLightIntensity', 'uSpecularTint', 'uFrameCount', 'uLightStartFrame', 'uNumSegments', 'uSlitAngle', 'uDisplacementX', 'uDisplacementY', 'uEnableCenterElement', 'uCenterAnimDuration', 'uCenterAnimTime', 'uCCBlackPoint', 'uCCWhitePoint', 'uCCMidtoneGamma', 'uCCGamma', 'uCCContrast', 'uZoom', 'uPan',
525
525
  // vec2(panX, panY) - set in vertex shader
526
526
  'uEdgeFeather', 'uRefResolution', 'uVisibleUvBounds',
527
527
  // vec4(minX, minY, maxX, maxY) - visible portion of canvas in UV space
@@ -619,6 +619,11 @@ var RzpGlassMount = /*#__PURE__*/function () {
619
619
  // Set all config-based uniforms
620
620
  this.setUniformValues(this.config);
621
621
 
622
+ // Specular tint defaults to white (no tint) when not configured
623
+ if (this.config.specularTint === undefined) {
624
+ gl.uniform3f(this.uniformLocations.uSpecularTint, 1.0, 1.0, 1.0);
625
+ }
626
+
622
627
  // Explicitly set pan uniform (vertex shader uniform)
623
628
  gl.uniform2f(this.uniformLocations.uPan, this.config.panX, this.config.panY);
624
629
 
@@ -713,6 +718,19 @@ var RzpGlassMount = /*#__PURE__*/function () {
713
718
  }
714
719
  }
715
720
 
721
+ // Handle special specularTint uniform (vec3 in fragment shader)
722
+ if (config.specularTint !== undefined) {
723
+ var tintCacheKey = 'specularTint';
724
+ if (!this.areUniformValuesEqual(this.uniformCache[tintCacheKey], config.specularTint)) {
725
+ this.uniformCache[tintCacheKey] = config.specularTint;
726
+ var _config$specularTint = _slicedToArray(config.specularTint, 3),
727
+ r = _config$specularTint[0],
728
+ g = _config$specularTint[1],
729
+ b = _config$specularTint[2];
730
+ gl.uniform3f(this.uniformLocations.uSpecularTint, r, g, b);
731
+ }
732
+ }
733
+
716
734
  // Handle special backgroundColor uniform (vec3 in fragment shader)
717
735
  if (config.backgroundColor !== undefined) {
718
736
  var bgCacheKey = 'backgroundColor';
@@ -720,12 +738,12 @@ var RzpGlassMount = /*#__PURE__*/function () {
720
738
  this.uniformCache[bgCacheKey] = config.backgroundColor;
721
739
  if (config.backgroundColor) {
722
740
  var _config$backgroundCol = _slicedToArray(config.backgroundColor, 3),
723
- r = _config$backgroundCol[0],
724
- g = _config$backgroundCol[1],
725
- b = _config$backgroundCol[2];
726
- gl.uniform3f(this.uniformLocations.uBackgroundColor, r, g, b);
741
+ _r = _config$backgroundCol[0],
742
+ _g = _config$backgroundCol[1],
743
+ _b = _config$backgroundCol[2];
744
+ gl.uniform3f(this.uniformLocations.uBackgroundColor, _r, _g, _b);
727
745
  // Also update clear color to match
728
- gl.clearColor(r, g, b, 1.0);
746
+ gl.clearColor(_r, _g, _b, 1.0);
729
747
  } else {
730
748
  // Set to -1 to indicate no background color blending
731
749
  gl.uniform3f(this.uniformLocations.uBackgroundColor, -1.0, -1.0, -1.0);