@salutejs/plasma-new-hope 0.325.0-canary.1941.15208820474.0 → 0.325.0-canary.1954.15208821137.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/cjs/components/List/List.css +1 -0
  2. package/cjs/components/List/List.js +63 -0
  3. package/cjs/components/List/List.js.map +1 -0
  4. package/cjs/components/List/List.styles.js +9 -0
  5. package/cjs/components/List/List.styles.js.map +1 -0
  6. package/cjs/components/List/List.styles_9yg2yl.css +1 -0
  7. package/cjs/components/List/List.tokens.js +41 -0
  8. package/cjs/components/List/List.tokens.js.map +1 -0
  9. package/cjs/components/List/ui/ListItem.css +18 -0
  10. package/cjs/components/List/ui/ListItem.js +27 -0
  11. package/cjs/components/List/ui/ListItem.js.map +1 -0
  12. package/cjs/components/List/ui/ListItem.styles.js +28 -0
  13. package/cjs/components/List/ui/ListItem.styles.js.map +1 -0
  14. package/cjs/components/List/ui/ListItem.styles_1eo5k14.css +2 -0
  15. package/cjs/components/{CodeField/variations/_size → List/variations/_disabled}/base.js +2 -2
  16. package/cjs/components/List/variations/_disabled/base.js.map +1 -0
  17. package/cjs/components/List/variations/_disabled/base_x642ct.css +1 -0
  18. package/cjs/components/{CodeField/variations/_view → List/variations/_size}/base.js +2 -2
  19. package/cjs/components/List/variations/_size/base.js.map +1 -0
  20. package/cjs/components/List/variations/_size/base_x642ct.css +1 -0
  21. package/cjs/components/{CodeField/variations/_shape → List/variations/_variant}/base.js +2 -2
  22. package/cjs/components/List/variations/_variant/base.js.map +1 -0
  23. package/cjs/components/List/variations/_variant/base_x642ct.css +1 -0
  24. package/cjs/components/{CodeField/variations/_disabled → List/variations/_view}/base.js +2 -2
  25. package/cjs/components/List/variations/_view/base.js.map +1 -0
  26. package/cjs/components/List/variations/_view/base_x642ct.css +1 -0
  27. package/cjs/components/NumberInput/ui/Input/Input.js +3 -0
  28. package/cjs/components/NumberInput/ui/Input/Input.js.map +1 -1
  29. package/cjs/index.css +5 -15
  30. package/cjs/index.js +8 -10
  31. package/cjs/index.js.map +1 -1
  32. package/emotion/cjs/components/List/List.js +59 -0
  33. package/emotion/cjs/components/List/List.styles.js +9 -0
  34. package/emotion/cjs/components/List/List.tokens.js +39 -0
  35. package/emotion/cjs/components/List/index.js +38 -0
  36. package/emotion/cjs/components/List/ui/ListItem.js +24 -0
  37. package/emotion/cjs/components/List/ui/ListItem.styles.js +21 -0
  38. package/emotion/cjs/components/List/variations/_disabled/base.js +8 -0
  39. package/emotion/cjs/components/List/variations/_disabled/tokens.json +1 -0
  40. package/emotion/cjs/components/List/variations/_size/base.js +8 -0
  41. package/emotion/cjs/components/List/variations/_size/tokens.json +1 -0
  42. package/emotion/cjs/components/List/variations/_variant/base.js +8 -0
  43. package/emotion/cjs/components/List/variations/_variant/tokens.json +1 -0
  44. package/emotion/cjs/components/List/variations/_view/base.js +8 -0
  45. package/emotion/cjs/components/List/variations/_view/tokens.json +1 -0
  46. package/emotion/cjs/components/NumberInput/ui/Input/Input.js +3 -0
  47. package/emotion/cjs/examples/plasma_b2c/components/List/List.config.js +34 -0
  48. package/emotion/cjs/examples/plasma_b2c/components/List/List.js +12 -0
  49. package/emotion/cjs/examples/plasma_b2c/components/List/List.stories.tsx +60 -0
  50. package/emotion/cjs/examples/plasma_web/components/List/List.config.js +34 -0
  51. package/emotion/cjs/examples/plasma_web/components/List/List.js +12 -0
  52. package/emotion/cjs/examples/plasma_web/components/List/List.stories.tsx +60 -0
  53. package/emotion/cjs/index.js +11 -11
  54. package/emotion/es/components/List/List.js +50 -0
  55. package/emotion/es/components/List/List.styles.js +3 -0
  56. package/emotion/es/components/List/List.tokens.js +33 -0
  57. package/emotion/es/components/List/index.js +3 -0
  58. package/emotion/es/components/List/ui/ListItem.js +17 -0
  59. package/emotion/es/components/List/ui/ListItem.styles.js +14 -0
  60. package/emotion/es/components/List/variations/_disabled/base.js +2 -0
  61. package/emotion/es/components/List/variations/_disabled/tokens.json +1 -0
  62. package/emotion/es/components/List/variations/_size/base.js +2 -0
  63. package/emotion/es/components/List/variations/_size/tokens.json +1 -0
  64. package/emotion/es/components/List/variations/_variant/base.js +2 -0
  65. package/emotion/es/components/List/variations/_variant/tokens.json +1 -0
  66. package/emotion/es/components/List/variations/_view/base.js +2 -0
  67. package/emotion/es/components/List/variations/_view/tokens.json +1 -0
  68. package/emotion/es/components/NumberInput/ui/Input/Input.js +3 -0
  69. package/emotion/es/examples/plasma_b2c/components/List/List.config.js +28 -0
  70. package/emotion/es/examples/plasma_b2c/components/List/List.js +6 -0
  71. package/emotion/es/examples/plasma_b2c/components/List/List.stories.tsx +60 -0
  72. package/emotion/es/examples/plasma_web/components/List/List.config.js +28 -0
  73. package/emotion/es/examples/plasma_web/components/List/List.js +6 -0
  74. package/emotion/es/examples/plasma_web/components/List/List.stories.tsx +60 -0
  75. package/emotion/es/index.js +2 -1
  76. package/es/components/List/List.css +1 -0
  77. package/es/components/List/List.js +54 -0
  78. package/es/components/List/List.js.map +1 -0
  79. package/es/components/List/List.styles.js +5 -0
  80. package/es/components/List/List.styles.js.map +1 -0
  81. package/es/components/List/List.styles_9yg2yl.css +1 -0
  82. package/es/components/List/List.tokens.js +36 -0
  83. package/es/components/List/List.tokens.js.map +1 -0
  84. package/es/components/List/ui/ListItem.css +18 -0
  85. package/es/components/List/ui/ListItem.js +19 -0
  86. package/es/components/List/ui/ListItem.js.map +1 -0
  87. package/es/components/List/ui/ListItem.styles.js +23 -0
  88. package/es/components/List/ui/ListItem.styles.js.map +1 -0
  89. package/es/components/List/ui/ListItem.styles_1eo5k14.css +2 -0
  90. package/es/components/{CodeField/variations/_view → List/variations/_disabled}/base.js +2 -2
  91. package/es/components/List/variations/_disabled/base.js.map +1 -0
  92. package/es/components/List/variations/_disabled/base_x642ct.css +1 -0
  93. package/es/components/{CodeField → List}/variations/_size/base.js +2 -2
  94. package/es/components/List/variations/_size/base.js.map +1 -0
  95. package/es/components/List/variations/_size/base_x642ct.css +1 -0
  96. package/es/components/List/variations/_variant/base.js +5 -0
  97. package/es/components/List/variations/_variant/base.js.map +1 -0
  98. package/es/components/List/variations/_variant/base_x642ct.css +1 -0
  99. package/es/components/{CodeField/variations/_disabled → List/variations/_view}/base.js +2 -2
  100. package/es/components/List/variations/_view/base.js.map +1 -0
  101. package/es/components/List/variations/_view/base_x642ct.css +1 -0
  102. package/es/components/NumberInput/ui/Input/Input.js +3 -0
  103. package/es/components/NumberInput/ui/Input/Input.js.map +1 -1
  104. package/es/index.css +5 -15
  105. package/es/index.js +3 -3
  106. package/package.json +2 -2
  107. package/styled-components/cjs/components/List/List.js +59 -0
  108. package/styled-components/cjs/components/List/List.styles.js +9 -0
  109. package/styled-components/cjs/components/List/List.tokens.js +39 -0
  110. package/styled-components/cjs/components/List/List.types.js +5 -0
  111. package/styled-components/cjs/components/List/index.js +38 -0
  112. package/styled-components/cjs/components/List/ui/ListItem.js +24 -0
  113. package/styled-components/cjs/components/List/ui/ListItem.styles.js +19 -0
  114. package/styled-components/cjs/components/List/ui/ListItem.types.js +5 -0
  115. package/styled-components/cjs/components/{CodeField → List}/variations/_disabled/base.js +1 -2
  116. package/styled-components/cjs/components/List/variations/_disabled/tokens.json +1 -0
  117. package/styled-components/cjs/components/List/variations/_size/base.js +8 -0
  118. package/styled-components/cjs/components/List/variations/_size/tokens.json +1 -0
  119. package/styled-components/cjs/components/List/variations/_variant/base.js +8 -0
  120. package/styled-components/cjs/components/List/variations/_variant/tokens.json +1 -0
  121. package/styled-components/cjs/components/List/variations/_view/base.js +8 -0
  122. package/styled-components/cjs/components/List/variations/_view/tokens.json +1 -0
  123. package/styled-components/cjs/components/NumberInput/ui/Input/Input.js +3 -0
  124. package/styled-components/cjs/examples/plasma_b2c/components/List/List.config.js +34 -0
  125. package/styled-components/cjs/examples/plasma_b2c/components/List/List.js +12 -0
  126. package/styled-components/cjs/examples/plasma_b2c/components/List/List.stories.tsx +60 -0
  127. package/styled-components/cjs/examples/plasma_web/components/List/List.config.js +34 -0
  128. package/styled-components/cjs/examples/plasma_web/components/List/List.js +12 -0
  129. package/styled-components/cjs/examples/plasma_web/components/List/List.stories.tsx +60 -0
  130. package/styled-components/cjs/index.js +11 -11
  131. package/styled-components/es/components/List/List.js +50 -0
  132. package/styled-components/es/components/List/List.styles.js +3 -0
  133. package/styled-components/es/components/List/List.tokens.js +33 -0
  134. package/styled-components/es/components/List/List.types.js +1 -0
  135. package/styled-components/es/components/List/index.js +3 -0
  136. package/styled-components/es/components/List/ui/ListItem.js +17 -0
  137. package/styled-components/es/components/List/ui/ListItem.styles.js +12 -0
  138. package/styled-components/es/components/List/ui/ListItem.types.js +1 -0
  139. package/styled-components/es/components/List/variations/_disabled/base.js +2 -0
  140. package/styled-components/es/components/List/variations/_disabled/tokens.json +1 -0
  141. package/styled-components/es/components/List/variations/_size/base.js +2 -0
  142. package/styled-components/es/components/List/variations/_size/tokens.json +1 -0
  143. package/styled-components/es/components/List/variations/_variant/base.js +2 -0
  144. package/styled-components/es/components/List/variations/_variant/tokens.json +1 -0
  145. package/styled-components/es/components/List/variations/_view/base.js +2 -0
  146. package/styled-components/es/components/List/variations/_view/tokens.json +1 -0
  147. package/styled-components/es/components/NumberInput/ui/Input/Input.js +3 -0
  148. package/styled-components/es/examples/plasma_b2c/components/List/List.config.js +28 -0
  149. package/styled-components/es/examples/plasma_b2c/components/List/List.js +6 -0
  150. package/styled-components/es/examples/plasma_b2c/components/List/List.stories.tsx +60 -0
  151. package/styled-components/es/examples/plasma_web/components/List/List.config.js +28 -0
  152. package/styled-components/es/examples/plasma_web/components/List/List.js +6 -0
  153. package/styled-components/es/examples/plasma_web/components/List/List.stories.tsx +60 -0
  154. package/styled-components/es/index.js +2 -1
  155. package/types/components/List/List.d.ts +43 -0
  156. package/types/components/List/List.d.ts.map +1 -0
  157. package/types/components/List/List.styles.d.ts +2 -0
  158. package/types/components/List/List.styles.d.ts.map +1 -0
  159. package/types/components/List/List.tokens.d.ts +34 -0
  160. package/types/components/List/List.tokens.d.ts.map +1 -0
  161. package/types/components/List/List.types.d.ts +24 -0
  162. package/types/components/List/List.types.d.ts.map +1 -0
  163. package/types/components/List/index.d.ts +5 -0
  164. package/types/components/List/index.d.ts.map +1 -0
  165. package/types/components/List/ui/ListItem.d.ts +4 -0
  166. package/types/components/List/ui/ListItem.d.ts.map +1 -0
  167. package/types/components/List/ui/ListItem.styles.d.ts +36 -0
  168. package/types/components/List/ui/ListItem.styles.d.ts.map +1 -0
  169. package/types/components/List/ui/ListItem.types.d.ts +15 -0
  170. package/types/components/List/ui/ListItem.types.d.ts.map +1 -0
  171. package/types/components/List/variations/_disabled/base.d.ts.map +1 -0
  172. package/types/components/List/variations/_size/base.d.ts.map +1 -0
  173. package/types/components/List/variations/_variant/base.d.ts.map +1 -0
  174. package/types/components/List/variations/_view/base.d.ts.map +1 -0
  175. package/types/components/NumberInput/ui/Input/Input.d.ts.map +1 -1
  176. package/types/index.d.ts +2 -1
  177. package/types/index.d.ts.map +1 -1
  178. package/cjs/components/CodeField/CodeField.css +0 -14
  179. package/cjs/components/CodeField/CodeField.js +0 -290
  180. package/cjs/components/CodeField/CodeField.js.map +0 -1
  181. package/cjs/components/CodeField/CodeField.styles.js +0 -57
  182. package/cjs/components/CodeField/CodeField.styles.js.map +0 -1
  183. package/cjs/components/CodeField/CodeField.styles_7zxgpc.css +0 -6
  184. package/cjs/components/CodeField/CodeField.tokens.js +0 -59
  185. package/cjs/components/CodeField/CodeField.tokens.js.map +0 -1
  186. package/cjs/components/CodeField/utils/constants.js +0 -18
  187. package/cjs/components/CodeField/utils/constants.js.map +0 -1
  188. package/cjs/components/CodeField/utils/handleCodeError.js +0 -55
  189. package/cjs/components/CodeField/utils/handleCodeError.js.map +0 -1
  190. package/cjs/components/CodeField/utils/handleItemError.js +0 -53
  191. package/cjs/components/CodeField/utils/handleItemError.js.map +0 -1
  192. package/cjs/components/CodeField/utils/initialValuesHelper.js +0 -33
  193. package/cjs/components/CodeField/utils/initialValuesHelper.js.map +0 -1
  194. package/cjs/components/CodeField/variations/_disabled/base.js.map +0 -1
  195. package/cjs/components/CodeField/variations/_disabled/base_obsae2.css +0 -1
  196. package/cjs/components/CodeField/variations/_shape/base.js.map +0 -1
  197. package/cjs/components/CodeField/variations/_shape/base_1scsyya.css +0 -1
  198. package/cjs/components/CodeField/variations/_size/base.js.map +0 -1
  199. package/cjs/components/CodeField/variations/_size/base_1wrvbr5.css +0 -1
  200. package/cjs/components/CodeField/variations/_view/base.js.map +0 -1
  201. package/cjs/components/CodeField/variations/_view/base_9a5yza.css +0 -1
  202. package/emotion/cjs/components/CodeField/CodeField.js +0 -299
  203. package/emotion/cjs/components/CodeField/CodeField.styles.js +0 -65
  204. package/emotion/cjs/components/CodeField/CodeField.template-doc.mdx +0 -150
  205. package/emotion/cjs/components/CodeField/CodeField.tokens.js +0 -57
  206. package/emotion/cjs/components/CodeField/index.js +0 -50
  207. package/emotion/cjs/components/CodeField/utils/constants.js +0 -12
  208. package/emotion/cjs/components/CodeField/utils/handleCodeError.js +0 -58
  209. package/emotion/cjs/components/CodeField/utils/handleItemError.js +0 -56
  210. package/emotion/cjs/components/CodeField/utils/index.js +0 -38
  211. package/emotion/cjs/components/CodeField/utils/initialValuesHelper.js +0 -30
  212. package/emotion/cjs/components/CodeField/variations/_disabled/base.js +0 -9
  213. package/emotion/cjs/components/CodeField/variations/_disabled/tokens.json +0 -4
  214. package/emotion/cjs/components/CodeField/variations/_shape/base.js +0 -10
  215. package/emotion/cjs/components/CodeField/variations/_shape/tokens.json +0 -1
  216. package/emotion/cjs/components/CodeField/variations/_size/base.js +0 -10
  217. package/emotion/cjs/components/CodeField/variations/_size/tokens.json +0 -19
  218. package/emotion/cjs/components/CodeField/variations/_view/base.js +0 -10
  219. package/emotion/cjs/components/CodeField/variations/_view/tokens.json +0 -0
  220. package/emotion/cjs/examples/plasma_b2c/components/CodeField/CodeField.config.js +0 -31
  221. package/emotion/cjs/examples/plasma_b2c/components/CodeField/CodeField.js +0 -11
  222. package/emotion/cjs/examples/plasma_b2c/components/CodeField/CodeField.stories.tsx +0 -107
  223. package/emotion/cjs/examples/plasma_web/components/CodeField/CodeField.config.js +0 -31
  224. package/emotion/cjs/examples/plasma_web/components/CodeField/CodeField.js +0 -11
  225. package/emotion/cjs/examples/plasma_web/components/CodeField/CodeField.stories.tsx +0 -107
  226. package/emotion/es/components/CodeField/CodeField.js +0 -290
  227. package/emotion/es/components/CodeField/CodeField.styles.js +0 -58
  228. package/emotion/es/components/CodeField/CodeField.template-doc.mdx +0 -150
  229. package/emotion/es/components/CodeField/CodeField.tokens.js +0 -51
  230. package/emotion/es/components/CodeField/index.js +0 -3
  231. package/emotion/es/components/CodeField/utils/constants.js +0 -6
  232. package/emotion/es/components/CodeField/utils/handleCodeError.js +0 -52
  233. package/emotion/es/components/CodeField/utils/handleItemError.js +0 -50
  234. package/emotion/es/components/CodeField/utils/index.js +0 -3
  235. package/emotion/es/components/CodeField/utils/initialValuesHelper.js +0 -24
  236. package/emotion/es/components/CodeField/variations/_disabled/base.js +0 -3
  237. package/emotion/es/components/CodeField/variations/_disabled/tokens.json +0 -4
  238. package/emotion/es/components/CodeField/variations/_shape/base.js +0 -4
  239. package/emotion/es/components/CodeField/variations/_shape/tokens.json +0 -1
  240. package/emotion/es/components/CodeField/variations/_size/base.js +0 -4
  241. package/emotion/es/components/CodeField/variations/_size/tokens.json +0 -19
  242. package/emotion/es/components/CodeField/variations/_view/base.js +0 -4
  243. package/emotion/es/components/CodeField/variations/_view/tokens.json +0 -0
  244. package/emotion/es/examples/plasma_b2c/components/CodeField/CodeField.config.js +0 -25
  245. package/emotion/es/examples/plasma_b2c/components/CodeField/CodeField.js +0 -5
  246. package/emotion/es/examples/plasma_b2c/components/CodeField/CodeField.stories.tsx +0 -107
  247. package/emotion/es/examples/plasma_web/components/CodeField/CodeField.config.js +0 -25
  248. package/emotion/es/examples/plasma_web/components/CodeField/CodeField.js +0 -5
  249. package/emotion/es/examples/plasma_web/components/CodeField/CodeField.stories.tsx +0 -107
  250. package/es/components/CodeField/CodeField.css +0 -14
  251. package/es/components/CodeField/CodeField.js +0 -280
  252. package/es/components/CodeField/CodeField.js.map +0 -1
  253. package/es/components/CodeField/CodeField.styles.js +0 -48
  254. package/es/components/CodeField/CodeField.styles.js.map +0 -1
  255. package/es/components/CodeField/CodeField.styles_7zxgpc.css +0 -6
  256. package/es/components/CodeField/CodeField.tokens.js +0 -54
  257. package/es/components/CodeField/CodeField.tokens.js.map +0 -1
  258. package/es/components/CodeField/utils/constants.js +0 -9
  259. package/es/components/CodeField/utils/constants.js.map +0 -1
  260. package/es/components/CodeField/utils/handleCodeError.js +0 -51
  261. package/es/components/CodeField/utils/handleCodeError.js.map +0 -1
  262. package/es/components/CodeField/utils/handleItemError.js +0 -49
  263. package/es/components/CodeField/utils/handleItemError.js.map +0 -1
  264. package/es/components/CodeField/utils/initialValuesHelper.js +0 -27
  265. package/es/components/CodeField/utils/initialValuesHelper.js.map +0 -1
  266. package/es/components/CodeField/variations/_disabled/base.js.map +0 -1
  267. package/es/components/CodeField/variations/_disabled/base_obsae2.css +0 -1
  268. package/es/components/CodeField/variations/_shape/base.js +0 -5
  269. package/es/components/CodeField/variations/_shape/base.js.map +0 -1
  270. package/es/components/CodeField/variations/_shape/base_1scsyya.css +0 -1
  271. package/es/components/CodeField/variations/_size/base.js.map +0 -1
  272. package/es/components/CodeField/variations/_size/base_1wrvbr5.css +0 -1
  273. package/es/components/CodeField/variations/_view/base.js.map +0 -1
  274. package/es/components/CodeField/variations/_view/base_9a5yza.css +0 -1
  275. package/styled-components/cjs/components/CodeField/CodeField.js +0 -299
  276. package/styled-components/cjs/components/CodeField/CodeField.styles.js +0 -38
  277. package/styled-components/cjs/components/CodeField/CodeField.template-doc.mdx +0 -150
  278. package/styled-components/cjs/components/CodeField/CodeField.tokens.js +0 -57
  279. package/styled-components/cjs/components/CodeField/index.js +0 -50
  280. package/styled-components/cjs/components/CodeField/utils/constants.js +0 -12
  281. package/styled-components/cjs/components/CodeField/utils/handleCodeError.js +0 -58
  282. package/styled-components/cjs/components/CodeField/utils/handleItemError.js +0 -56
  283. package/styled-components/cjs/components/CodeField/utils/index.js +0 -38
  284. package/styled-components/cjs/components/CodeField/utils/initialValuesHelper.js +0 -30
  285. package/styled-components/cjs/components/CodeField/variations/_disabled/tokens.json +0 -4
  286. package/styled-components/cjs/components/CodeField/variations/_shape/base.js +0 -10
  287. package/styled-components/cjs/components/CodeField/variations/_shape/tokens.json +0 -1
  288. package/styled-components/cjs/components/CodeField/variations/_size/base.js +0 -10
  289. package/styled-components/cjs/components/CodeField/variations/_size/tokens.json +0 -19
  290. package/styled-components/cjs/components/CodeField/variations/_view/base.js +0 -10
  291. package/styled-components/cjs/components/CodeField/variations/_view/tokens.json +0 -0
  292. package/styled-components/cjs/examples/plasma_b2c/components/CodeField/CodeField.config.js +0 -31
  293. package/styled-components/cjs/examples/plasma_b2c/components/CodeField/CodeField.js +0 -11
  294. package/styled-components/cjs/examples/plasma_b2c/components/CodeField/CodeField.stories.tsx +0 -107
  295. package/styled-components/cjs/examples/plasma_web/components/CodeField/CodeField.config.js +0 -31
  296. package/styled-components/cjs/examples/plasma_web/components/CodeField/CodeField.js +0 -11
  297. package/styled-components/cjs/examples/plasma_web/components/CodeField/CodeField.stories.tsx +0 -107
  298. package/styled-components/es/components/CodeField/CodeField.js +0 -290
  299. package/styled-components/es/components/CodeField/CodeField.styles.js +0 -30
  300. package/styled-components/es/components/CodeField/CodeField.template-doc.mdx +0 -150
  301. package/styled-components/es/components/CodeField/CodeField.tokens.js +0 -51
  302. package/styled-components/es/components/CodeField/index.js +0 -3
  303. package/styled-components/es/components/CodeField/utils/constants.js +0 -6
  304. package/styled-components/es/components/CodeField/utils/handleCodeError.js +0 -52
  305. package/styled-components/es/components/CodeField/utils/handleItemError.js +0 -50
  306. package/styled-components/es/components/CodeField/utils/index.js +0 -3
  307. package/styled-components/es/components/CodeField/utils/initialValuesHelper.js +0 -24
  308. package/styled-components/es/components/CodeField/variations/_disabled/base.js +0 -3
  309. package/styled-components/es/components/CodeField/variations/_disabled/tokens.json +0 -4
  310. package/styled-components/es/components/CodeField/variations/_shape/base.js +0 -4
  311. package/styled-components/es/components/CodeField/variations/_shape/tokens.json +0 -1
  312. package/styled-components/es/components/CodeField/variations/_size/base.js +0 -4
  313. package/styled-components/es/components/CodeField/variations/_size/tokens.json +0 -19
  314. package/styled-components/es/components/CodeField/variations/_view/base.js +0 -4
  315. package/styled-components/es/components/CodeField/variations/_view/tokens.json +0 -0
  316. package/styled-components/es/examples/plasma_b2c/components/CodeField/CodeField.config.js +0 -25
  317. package/styled-components/es/examples/plasma_b2c/components/CodeField/CodeField.js +0 -5
  318. package/styled-components/es/examples/plasma_b2c/components/CodeField/CodeField.stories.tsx +0 -107
  319. package/styled-components/es/examples/plasma_web/components/CodeField/CodeField.config.js +0 -25
  320. package/styled-components/es/examples/plasma_web/components/CodeField/CodeField.js +0 -5
  321. package/styled-components/es/examples/plasma_web/components/CodeField/CodeField.stories.tsx +0 -107
  322. package/types/components/CodeField/CodeField.d.ts +0 -69
  323. package/types/components/CodeField/CodeField.d.ts.map +0 -1
  324. package/types/components/CodeField/CodeField.styles.d.ts +0 -11
  325. package/types/components/CodeField/CodeField.styles.d.ts.map +0 -1
  326. package/types/components/CodeField/CodeField.tokens.d.ts +0 -52
  327. package/types/components/CodeField/CodeField.tokens.d.ts.map +0 -1
  328. package/types/components/CodeField/CodeField.types.d.ts +0 -93
  329. package/types/components/CodeField/CodeField.types.d.ts.map +0 -1
  330. package/types/components/CodeField/index.d.ts +0 -4
  331. package/types/components/CodeField/index.d.ts.map +0 -1
  332. package/types/components/CodeField/utils/constants.d.ts +0 -7
  333. package/types/components/CodeField/utils/constants.d.ts.map +0 -1
  334. package/types/components/CodeField/utils/handleCodeError.d.ts +0 -15
  335. package/types/components/CodeField/utils/handleCodeError.d.ts.map +0 -1
  336. package/types/components/CodeField/utils/handleItemError.d.ts +0 -14
  337. package/types/components/CodeField/utils/handleItemError.d.ts.map +0 -1
  338. package/types/components/CodeField/utils/index.d.ts +0 -4
  339. package/types/components/CodeField/utils/index.d.ts.map +0 -1
  340. package/types/components/CodeField/utils/initialValuesHelper.d.ts +0 -4
  341. package/types/components/CodeField/utils/initialValuesHelper.d.ts.map +0 -1
  342. package/types/components/CodeField/variations/_disabled/base.d.ts.map +0 -1
  343. package/types/components/CodeField/variations/_shape/base.d.ts.map +0 -1
  344. package/types/components/CodeField/variations/_size/base.d.ts.map +0 -1
  345. package/types/components/CodeField/variations/_view/base.d.ts.map +0 -1
  346. /package/emotion/cjs/components/{CodeField/CodeField.types.js → List/List.types.js} +0 -0
  347. /package/{styled-components/cjs/components/CodeField/CodeField.types.js → emotion/cjs/components/List/ui/ListItem.types.js} +0 -0
  348. /package/emotion/es/components/{CodeField/CodeField.types.js → List/List.types.js} +0 -0
  349. /package/{styled-components/es/components/CodeField/CodeField.types.js → emotion/es/components/List/ui/ListItem.types.js} +0 -0
  350. /package/types/components/{CodeField → List}/variations/_disabled/base.d.ts +0 -0
  351. /package/types/components/{CodeField/variations/_shape → List/variations/_size}/base.d.ts +0 -0
  352. /package/types/components/{CodeField/variations/_size → List/variations/_variant}/base.d.ts +0 -0
  353. /package/types/components/{CodeField → List}/variations/_view/base.d.ts +0 -0
@@ -1,290 +0,0 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _Separator;
3
- var _excluded = ["className", "value", "placeholder", "autoFocus", "codeLength", "caption", "captionAlign", "width", "shape", "view", "size", "disabled", "isError", "allowedSymbols", "itemErrorBehavior", "codeErrorBehavior", "autoComplete", "setIsError", "onChange", "onFullCodeEnter"];
4
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
5
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
6
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
7
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
- function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
9
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
- function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
11
- function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
12
- function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
13
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
15
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
16
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
17
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
18
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
19
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
20
- import React, { forwardRef, Fragment, useCallback, useEffect, useRef, useState } from 'react';
21
- import cls from 'classnames';
22
- import { useDidMountEffect } from "../../hooks";
23
- import { getSizeValueFromProp } from "../../utils";
24
- import { BACKSPACE_KEY, FORBIDDEN_KEYS, ONLY_DIGITS_PATTERN } from "./utils/constants";
25
- import { getCodeValue, getFieldPattern, getPlaceholderValue, handleCodeError, handleItemError } from "./utils";
26
- import { classes } from "./CodeField.tokens";
27
- import { base, CaptionWrapper, CodeGroup, CodeWrapper, ItemInput, Separator } from "./CodeField.styles";
28
- import { base as viewCSS } from "./variations/_view/base";
29
- import { base as sizeCSS } from "./variations/_size/base";
30
- import { base as shapeCSS } from "./variations/_shape/base";
31
- import { base as disabledCSS } from "./variations/_disabled/base";
32
- export var codeFieldRoot = function codeFieldRoot(Root) {
33
- return /*#__PURE__*/forwardRef(function (_ref, ref) {
34
- var className = _ref.className,
35
- outerValue = _ref.value,
36
- placeholder = _ref.placeholder,
37
- autoFocus = _ref.autoFocus,
38
- _ref$codeLength = _ref.codeLength,
39
- codeLength = _ref$codeLength === void 0 ? 6 : _ref$codeLength,
40
- caption = _ref.caption,
41
- _ref$captionAlign = _ref.captionAlign,
42
- captionAlign = _ref$captionAlign === void 0 ? 'left' : _ref$captionAlign,
43
- width = _ref.width,
44
- _ref$shape = _ref.shape,
45
- shape = _ref$shape === void 0 ? 'default' : _ref$shape,
46
- view = _ref.view,
47
- size = _ref.size,
48
- disabled = _ref.disabled,
49
- isError = _ref.isError,
50
- _ref$allowedSymbols = _ref.allowedSymbols,
51
- allowedSymbols = _ref$allowedSymbols === void 0 ? ONLY_DIGITS_PATTERN : _ref$allowedSymbols,
52
- _ref$itemErrorBehavio = _ref.itemErrorBehavior,
53
- itemErrorBehavior = _ref$itemErrorBehavio === void 0 ? 'remove-symbol' : _ref$itemErrorBehavio,
54
- _ref$codeErrorBehavio = _ref.codeErrorBehavior,
55
- codeErrorBehavior = _ref$codeErrorBehavio === void 0 ? 'remove-code' : _ref$codeErrorBehavio,
56
- _ref$autoComplete = _ref.autoComplete,
57
- autoComplete = _ref$autoComplete === void 0 ? 'one-time-code' : _ref$autoComplete,
58
- setIsError = _ref.setIsError,
59
- onChange = _ref.onChange,
60
- onFullCodeEnter = _ref.onFullCodeEnter,
61
- rest = _objectWithoutProperties(_ref, _excluded);
62
- var _useState = useState(getCodeValue(codeLength, outerValue || '')),
63
- _useState2 = _slicedToArray(_useState, 2),
64
- code = _useState2[0],
65
- setCode = _useState2[1];
66
- var _useState3 = useState(code.join('')),
67
- _useState4 = _slicedToArray(_useState3, 2),
68
- originalValue = _useState4[0],
69
- setOriginalValue = _useState4[1];
70
- var inputRefs = useRef([]);
71
- var inputContainerRef = useRef(null);
72
- var captionRef = useRef(null);
73
- var fieldPattern = getFieldPattern(allowedSymbols);
74
- var placeholderValue = getPlaceholderValue(codeLength, placeholder);
75
- var parts = codeLength === 6 ? 2 : 1;
76
- var widthValue = width ? getSizeValueFromProp(width, 'rem') : undefined;
77
- var getLastActiveIndex = function getLastActiveIndex() {
78
- if (code.length && code.length < codeLength) {
79
- return code.length;
80
- }
81
- var lastEmptyIndex = code.findIndex(function (digit) {
82
- return digit === '';
83
- });
84
- return lastEmptyIndex >= 0 ? lastEmptyIndex : codeLength - 1;
85
- };
86
- var handleClick = function handleClick() {
87
- if (disabled) {
88
- return;
89
- }
90
- var lastActiveIndex = getLastActiveIndex();
91
- if (inputRefs.current[lastActiveIndex]) {
92
- inputRefs.current[lastActiveIndex].focus();
93
- }
94
- };
95
- var handleOnKeyDown = function handleOnKeyDown(event, index) {
96
- if (disabled) {
97
- return;
98
- }
99
- var key = event.key;
100
- if (FORBIDDEN_KEYS.includes(key)) {
101
- event.preventDefault();
102
- return;
103
- }
104
- if (key === BACKSPACE_KEY) {
105
- if (index > 0 && code[index] === '') {
106
- var _inputRefs$current;
107
- (_inputRefs$current = inputRefs.current[index - 1]) === null || _inputRefs$current === void 0 || _inputRefs$current.focus();
108
- }
109
- }
110
- };
111
- var codeSetter = function codeSetter(newCode) {
112
- setCode(newCode);
113
- setOriginalValue(newCode.join(''));
114
- if (onChange) {
115
- onChange(newCode.join(''));
116
- }
117
- };
118
- var handleChange = function handleChange(event, index) {
119
- var _inputRefs$current$in;
120
- if (disabled) {
121
- return;
122
- }
123
- var rawSymbol = event.currentTarget.value;
124
- var symbol = rawSymbol.charAt(rawSymbol.length - 1);
125
- var newCode = _toConsumableArray(code);
126
- (_inputRefs$current$in = inputRefs.current[index]) === null || _inputRefs$current$in === void 0 || _inputRefs$current$in.classList.remove(classes.itemError);
127
- if (isError) {
128
- var _captionRef$current;
129
- (_captionRef$current = captionRef.current) === null || _captionRef$current === void 0 || _captionRef$current.classList.remove(classes.captionError);
130
- if (codeErrorBehavior === 'keep') {
131
- var _inputContainerRef$cu;
132
- (_inputContainerRef$cu = inputContainerRef.current) === null || _inputContainerRef$cu === void 0 || _inputContainerRef$cu.classList.remove(classes.codeError, classes.codeErrorAnimation);
133
- }
134
- if (setIsError) {
135
- setIsError(false);
136
- }
137
- }
138
- if (!fieldPattern) {
139
- newCode[index] = symbol;
140
- codeSetter(newCode);
141
- if (symbol && index < codeLength - 1) {
142
- var _inputRefs$current2;
143
- (_inputRefs$current2 = inputRefs.current[index + 1]) === null || _inputRefs$current2 === void 0 || _inputRefs$current2.focus();
144
- }
145
- return;
146
- }
147
- if (!symbol) {
148
- newCode[index] = '';
149
- codeSetter(newCode);
150
- return;
151
- }
152
- if (fieldPattern.test(symbol)) {
153
- newCode[index] = symbol.charAt(symbol.length - 1);
154
- codeSetter(newCode);
155
- if (index < codeLength - 1) {
156
- var _inputRefs$current3;
157
- (_inputRefs$current3 = inputRefs.current[index + 1]) === null || _inputRefs$current3 === void 0 || _inputRefs$current3.focus();
158
- }
159
- } else {
160
- newCode[index] = symbol.charAt(symbol.length - 1);
161
- handleItemError({
162
- currentSymbol: symbol,
163
- itemErrorBehavior: itemErrorBehavior,
164
- index: index,
165
- newCode: newCode,
166
- inputRefs: inputRefs,
167
- setCode: setCode,
168
- codeSetter: codeSetter
169
- });
170
- }
171
- };
172
- var handlePaste = function handlePaste(event) {
173
- var _inputRefs$current$ac;
174
- if (disabled) {
175
- return;
176
- }
177
- event.preventDefault();
178
- var rawData = event.clipboardData.getData('text/plain');
179
- var pastedData = (fieldPattern ? rawData.split('').map(function (symb) {
180
- var _symb$match;
181
- return ((_symb$match = symb.match(fieldPattern)) === null || _symb$match === void 0 ? void 0 : _symb$match[0]) || '';
182
- }).filter(Boolean) || [] : rawData.split('')).slice(0, codeLength);
183
- var activeIndex = Math.min(pastedData.length, codeLength - 1);
184
- (_inputRefs$current$ac = inputRefs.current[activeIndex]) === null || _inputRefs$current$ac === void 0 || _inputRefs$current$ac.focus();
185
- codeSetter(pastedData);
186
- };
187
- var handleFullCodeEnter = useCallback(function (fullCode) {
188
- if (onFullCodeEnter) {
189
- onFullCodeEnter(fullCode);
190
- }
191
- }, []);
192
- useEffect(function () {
193
- inputRefs.current = inputRefs.current.slice(0, codeLength);
194
- }, [codeLength]);
195
- useEffect(function () {
196
- if (autoFocus && !disabled) {
197
- var _inputRefs$current$la;
198
- var lastActiveIndex = getLastActiveIndex();
199
- (_inputRefs$current$la = inputRefs.current[lastActiveIndex]) === null || _inputRefs$current$la === void 0 || _inputRefs$current$la.focus();
200
- }
201
- }, [autoFocus]);
202
- useDidMountEffect(function () {
203
- if (handleFullCodeEnter && originalValue.length === codeLength) {
204
- handleFullCodeEnter(originalValue);
205
- }
206
- }, [originalValue, handleFullCodeEnter]);
207
- useDidMountEffect(function () {
208
- if (isError) {
209
- handleCodeError({
210
- codeLength: codeLength,
211
- codeErrorBehavior: codeErrorBehavior,
212
- currentCode: code,
213
- inputRefs: inputRefs,
214
- inputContainerRef: inputContainerRef,
215
- captionRef: captionRef,
216
- setCode: setCode,
217
- codeSetter: codeSetter
218
- });
219
- }
220
- }, [isError]);
221
- return /*#__PURE__*/React.createElement(Root, _extends({
222
- ref: ref,
223
- view: view,
224
- size: size,
225
- shape: shape,
226
- disabled: disabled,
227
- onClick: handleClick,
228
- className: cls(className, _defineProperty({}, classes.captionAlignLeft, captionAlign === 'left'))
229
- }, rest), /*#__PURE__*/React.createElement(CodeWrapper, {
230
- ref: inputContainerRef
231
- }, _toConsumableArray(Array(parts)).map(function (_, partIndex) {
232
- return /*#__PURE__*/React.createElement(Fragment, {
233
- key: partIndex
234
- }, /*#__PURE__*/React.createElement(CodeGroup, {
235
- role: "group"
236
- }, _toConsumableArray(Array(codeLength / parts)).map(function (_, i) {
237
- var inputCorrectIndex = i + codeLength / parts * partIndex;
238
- return /*#__PURE__*/React.createElement(ItemInput, _extends({
239
- key: partIndex + i + partIndex * i,
240
- ref: function ref(element) {
241
- inputRefs.current[inputCorrectIndex] = element;
242
- },
243
- className: cls(_defineProperty(_defineProperty({}, classes.segmented, shape === 'segmented'), classes.hoverEnabled, inputCorrectIndex >= originalValue.length)),
244
- value: code[inputCorrectIndex] || '',
245
- autoComplete: autoComplete,
246
- onChange: function onChange(e) {
247
- handleChange(e, inputCorrectIndex);
248
- },
249
- onKeyDown: function onKeyDown(e) {
250
- handleOnKeyDown(e, inputCorrectIndex);
251
- },
252
- onPaste: handlePaste,
253
- tabIndex: originalValue.length === inputCorrectIndex ? 0 : -1
254
- }, placeholderValue && {
255
- placeholder: placeholderValue[inputCorrectIndex]
256
- }));
257
- })), partIndex !== parts - 1 && (_Separator || (_Separator = /*#__PURE__*/React.createElement(Separator, null))));
258
- })), caption && /*#__PURE__*/React.createElement(CaptionWrapper, {
259
- ref: captionRef,
260
- captionAlign: captionAlign,
261
- widthValue: widthValue
262
- }, caption));
263
- });
264
- };
265
- export var codeFieldConfig = {
266
- name: 'CodeField',
267
- tag: 'div',
268
- layout: codeFieldRoot,
269
- base: base,
270
- variations: {
271
- view: {
272
- css: viewCSS
273
- },
274
- size: {
275
- css: sizeCSS
276
- },
277
- shape: {
278
- css: shapeCSS
279
- },
280
- disabled: {
281
- css: disabledCSS,
282
- attrs: true
283
- }
284
- },
285
- defaults: {
286
- size: 'm',
287
- view: 'default',
288
- shape: 'default'
289
- }
290
- };
@@ -1,58 +0,0 @@
1
- import _styled from "@emotion/styled/base";
2
- function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
3
- import { css } from '@emotion/react';
4
- import { classes, tokens } from "./CodeField.tokens";
5
- export var base = /*#__PURE__*/css("display:flex;flex-direction:column;justify-content:center;width:min-content;align-items:center;&.", classes.captionAlignLeft, "{align-items:start;};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90a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uZXhwb3J0IGNvbnN0IEl0ZW1JbnB1dCA9IHN0eWxlZC5pbnB1dGBcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICAgIGFwcGVhcmFuY2U6IG5vbmU7XG4gICAgYm9yZGVyOiAwO1xuICAgIHBhZGRpbmc6IDA7XG4gICAgb3V0bGluZTogbm9uZTtcbiAgICBwb2ludGVyLWV2ZW50czogbm9uZTtcbiAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XG5gO1xuXG5leHBvcnQgY29uc3QgQ2FwdGlvbldyYXBwZXIgPSBzdHlsZWQuZGl2PHsgY2FwdGlvbkFsaWduOiAnbGVmdCcgfCAnY2VudGVyJzsgd2lkdGhWYWx1ZT86IHN0cmluZyB9PmBcbiAgICB0ZXh0LWFsaWduOiAkeyh7IGNhcHRpb25BbGlnbiB9KSA9PiBjYXB0aW9uQWxpZ259O1xuICAgIGFsaWduLXNlbGY6ICR7KHsgY2FwdGlvbkFsaWduIH0pID0+IGNhcHRpb25BbGlnbn07XG4gICAgd2lkdGg6ICR7KHsgd2lkdGhWYWx1ZSB9KSA9PiB3aWR0aFZhbHVlIHx8ICdhdXRvJ307XG4gICAgd2hpdGUtc3BhY2U6IHByZS1saW5lO1xuYDtcbiJdfQ== */"));
6
- export var CodeWrapper = /*#__PURE__*/_styled("div", {
7
- target: "eytpek44",
8
- label: "plasma-new-hope__CodeWrapper"
9
- })(process.env.NODE_ENV === "production" ? {
10
- name: "s5xdrg",
11
- styles: "display:flex;align-items:center"
12
- } : {
13
- name: "s5xdrg",
14
- styles: "display:flex;align-items:center",
15
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ29kZUZpZWxkL0NvZGVGaWVsZC5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBaUJxQyIsImZpbGUiOiIuL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HBlYXJhbmNlOiBub25lO1xuICAgIGJvcmRlcjogMDtcbiAgICBwYWRkaW5nOiAwO1xuICAgIG91dGxpbmU6IG5vbmU7XG4gICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgdGV4dC1hbGlnbjogY2VudGVyO1xuYDtcblxuZXhwb3J0IGNvbnN0IENhcHRpb25XcmFwcGVyID0gc3R5bGVkLmRpdjx7IGNhcHRpb25BbGlnbjogJ2xlZnQnIHwgJ2NlbnRlcic7IHdpZHRoVmFsdWU/OiBzdHJpbmcgfT5gXG4gICAgdGV4dC1hbGlnbjogJHsoeyBjYXB0aW9uQWxpZ24gfSkgPT4gY2FwdGlvbkFsaWdufTtcbiAgICBhbGlnbi1zZWxmOiAkeyh7IGNhcHRpb25BbGlnbiB9KSA9PiBjYXB0aW9uQWxpZ259O1xuICAgIHdpZHRoOiAkeyh7IHdpZHRoVmFsdWUgfSkgPT4gd2lkdGhWYWx1ZSB8fCAnYXV0byd9O1xuICAgIHdoaXRlLXNwYWNlOiBwcmUtbGluZTtcbmA7XG4iXX0= */",
16
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
17
- });
18
- export var CodeGroup = /*#__PURE__*/_styled("div", {
19
- target: "eytpek43",
20
- label: "plasma-new-hope__CodeGroup"
21
- })(process.env.NODE_ENV === "production" ? {
22
- name: "s5xdrg",
23
- styles: "display:flex;align-items:center"
24
- } : {
25
- name: "s5xdrg",
26
- styles: "display:flex;align-items:center",
27
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ29kZUZpZWxkL0NvZGVGaWVsZC5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0JtQyIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0NvZGVGaWVsZC9Db2RlR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ICAgIG91dGxpbmU6IG5vbmU7XG4gICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgdGV4dC1hbGlnbjogY2VudGVyO1xuYDtcblxuZXhwb3J0IGNvbnN0IENhcHRpb25XcmFwcGVyID0gc3R5bGVkLmRpdjx7IGNhcHRpb25BbGlnbjogJ2xlZnQnIHwgJ2NlbnRlcic7IHdpZHRoVmFsdWU/OiBzdHJpbmcgfT5gXG4gICAgdGV4dC1hbGlnbjogJHsoeyBjYXB0aW9uQWxpZ24gfSkgPT4gY2FwdGlvbkFsaWdufTtcbiAgICBhbGlnbi1zZWxmOiAkeyh7IGNhcHRpb25BbGlnbiB9KSA9PiBjYXB0aW9uQWxpZ259O1xuICAgIHdpZHRoOiAkeyh7IHdpZHRoVmFsdWUgfSkgPT4gd2lkdGhWYWx1ZSB8fCAnYXV0byd9O1xuICAgIHdoaXRlLXNwYWNlOiBwcmUtbGluZTtcbmA7XG4iXX0= */",
28
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
29
- });
30
- export var Separator = /*#__PURE__*/_styled("div", {
31
- target: "eytpek42",
32
- label: "plasma-new-hope__Separator"
33
- })("width:var(", tokens.separatorWidth, ");" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ29kZUZpZWxkL0NvZGVGaWVsZC5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMkJtQyIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0NvZGVGaWVsZC9Db2RlRmllbGQuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW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wcGVyID0gc3R5bGVkLmRpdjx7IGNhcHRpb25BbGlnbjogJ2xlZnQnIHwgJ2NlbnRlcic7IHdpZHRoVmFsdWU/OiBzdHJpbmcgfT5gXG4gICAgdGV4dC1hbGlnbjogJHsoeyBjYXB0aW9uQWxpZ24gfSkgPT4gY2FwdGlvbkFsaWdufTtcbiAgICBhbGlnbi1zZWxmOiAkeyh7IGNhcHRpb25BbGlnbiB9KSA9PiBjYXB0aW9uQWxpZ259O1xuICAgIHdpZHRoOiAkeyh7IHdpZHRoVmFsdWUgfSkgPT4gd2lkdGhWYWx1ZSB8fCAnYXV0byd9O1xuICAgIHdoaXRlLXNwYWNlOiBwcmUtbGluZTtcbmA7XG4iXX0= */"));
34
- export var ItemInput = /*#__PURE__*/_styled("input", {
35
- target: "eytpek41",
36
- label: "plasma-new-hope__ItemInput"
37
- })(process.env.NODE_ENV === "production" ? {
38
- name: "1bnqsy",
39
- styles: "box-sizing:border-box;appearance:none;border:0;padding:0;outline:none;pointer-events:none;text-align:center"
40
- } : {
41
- name: "1bnqsy",
42
- styles: "box-sizing:border-box;appearance:none;border:0;padding:0;outline:none;pointer-events:none;text-align:center",
43
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ29kZUZpZWxkL0NvZGVGaWVsZC5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBK0JxQyIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0NvZGVGaWVsZC9Db2RlRmllbGQuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQg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BbGlnbjogJ2xlZnQnIHwgJ2NlbnRlcic7IHdpZHRoVmFsdWU/OiBzdHJpbmcgfT5gXG4gICAgdGV4dC1hbGlnbjogJHsoeyBjYXB0aW9uQWxpZ24gfSkgPT4gY2FwdGlvbkFsaWdufTtcbiAgICBhbGlnbi1zZWxmOiAkeyh7IGNhcHRpb25BbGlnbiB9KSA9PiBjYXB0aW9uQWxpZ259O1xuICAgIHdpZHRoOiAkeyh7IHdpZHRoVmFsdWUgfSkgPT4gd2lkdGhWYWx1ZSB8fCAnYXV0byd9O1xuICAgIHdoaXRlLXNwYWNlOiBwcmUtbGluZTtcbmA7XG4iXX0= */",
44
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
45
- });
46
- export var CaptionWrapper = /*#__PURE__*/_styled("div", {
47
- target: "eytpek40",
48
- label: "plasma-new-hope__CaptionWrapper"
49
- })("text-align:", function (_ref) {
50
- var captionAlign = _ref.captionAlign;
51
- return captionAlign;
52
- }, ";align-self:", function (_ref2) {
53
- var captionAlign = _ref2.captionAlign;
54
- return captionAlign;
55
- }, ";width:", function (_ref3) {
56
- var widthValue = _ref3.widthValue;
57
- return widthValue || 'auto';
58
- }, ";white-space:pre-line;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ29kZUZpZWxkL0NvZGVGaWVsZC5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBeUNrRyIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0NvZGVGaWVsZC9Db2RlRmllbGQuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICd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cmFwcGVyID0gc3R5bGVkLmRpdjx7IGNhcHRpb25BbGlnbjogJ2xlZnQnIHwgJ2NlbnRlcic7IHdpZHRoVmFsdWU/OiBzdHJpbmcgfT5gXG4gICAgdGV4dC1hbGlnbjogJHsoeyBjYXB0aW9uQWxpZ24gfSkgPT4gY2FwdGlvbkFsaWdufTtcbiAgICBhbGlnbi1zZWxmOiAkeyh7IGNhcHRpb25BbGlnbiB9KSA9PiBjYXB0aW9uQWxpZ259O1xuICAgIHdpZHRoOiAkeyh7IHdpZHRoVmFsdWUgfSkgPT4gd2lkdGhWYWx1ZSB8fCAnYXV0byd9O1xuICAgIHdoaXRlLXNwYWNlOiBwcmUtbGluZTtcbmA7XG4iXX0= */"));
@@ -1,150 +0,0 @@
1
- ---
2
- id: codefield
3
- title: CodeField
4
- ---
5
-
6
- import { PropsTable, Description } from '@site/src/components';
7
-
8
- # CodeField
9
- Компонент `CodeField` используется для ввода OTP-кодов.
10
-
11
- <Description name="CodeField" />
12
- <PropsTable name="CodeField" />
13
-
14
- ## Примеры
15
-
16
- ### Размер
17
- Размер задается с помощью свойства `size`.
18
- Ширина компонента так же может регулироваться при помощи свойства `width`:
19
-
20
- ```tsx live
21
- import React from 'react';
22
- import { CodeField } from '@salutejs/{{ package }}';
23
-
24
- export function App() {
25
- return (
26
- <div style=\{{ flexDirection: 'column', gap: '2rem' }}>
27
- <CodeField
28
- size="l"
29
- caption="Осталось попыток: 4"
30
- captionAlign="center"
31
- />
32
- <CodeField
33
- size="m"
34
- caption="Чтобы выслать вам код повторно подождите: 20 секунд"
35
- captionAlign="left"
36
- />
37
- <CodeField
38
- width="25"
39
- caption="Не передавайте никому код из СМС. Иначе ваш аккаунт могут взломать"
40
- captionAlign="center"
41
- />
42
- </div>
43
- );
44
- }
45
- ```
46
-
47
- ### Форма компонента и длина кода
48
- Форма компонента задается с помощью свойства `shape`, а длина кода с помощью `codeLength`:
49
-
50
- ```tsx live
51
- import React from 'react';
52
- import { CodeField } from '@salutejs/{{ package }}';
53
-
54
- export function App() {
55
- return (
56
- <div style=\{{ flexDirection: 'column', gap: '2rem' }}>
57
- <div style=\{{ display: 'flex', gap: '2rem' }}>
58
- <CodeField shape="default" codeLength={4} />
59
- <CodeField shape="segmented" codeLength={4} />
60
- </div>
61
- <div style=\{{ display: 'flex', gap: '2rem' }}>
62
- <CodeField shape="default" codeLength={5} />
63
- <CodeField shape="segmented" codeLength={5} />
64
- </div>
65
- <div style=\{{ display: 'flex', gap: '2rem' }}>
66
- <CodeField shape="default" codeLength={6} />
67
- <CodeField shape="segmented" codeLength={6} />
68
- </div>
69
- </div>
70
- );
71
- }
72
- ```
73
-
74
- ### Допустимые символы и поведение ячейки при вводе некорректного символа
75
- За допустимые символы для ввода отвечает свойство `allowedSymbols`. Задается строкой или регулярным выражением.
76
- Библиотека экспортирует наиболее используемые вариации допустимых символов:
77
- `import { ONLY_DIGITS_PATTERN, ONLY_CHARS_PATTERN, ONLY_DIGITS_AND_CHARS_PATTERN } from '@salutejs/{{ package }}';`
78
-
79
- Поведение ячейки при вводе некорректного символа регулируется свойством `itemErrorBehavior`:
80
-
81
- ```tsx live
82
- import React from 'react';
83
- import { CodeField } from '@salutejs/{{ package }}';
84
-
85
- export function App() {
86
- return (
87
- <div>
88
- <CodeField value="123" itemErrorBehavior="remove-symbol" />
89
- <CodeField value="123" itemErrorBehavior="keep" />
90
- <CodeField value="123" itemErrorBehavior="forbid-enter" />
91
- </div>
92
- );
93
- }
94
- ```
95
-
96
- ### Поведение компонента при вводе некорректного кода и индикация ошибки
97
- При заполнении всех полей ввода срабатывает колбэк `onFullCodeEnter`.
98
- При неверном вводе кода, поведние компонента управляется с помощью свойства `codeErrorBehavior`.
99
- Индикация ошибки происходит с помощью флага `isError` и колбека `setIsError`:
100
-
101
- ```tsx live
102
- import React, { useState, useRef, Dispatch, SetStateAction } from 'react';
103
- import { CodeField } from '@salutejs/{{ package }}';
104
-
105
- export function App() {
106
- const [disabledFirst, setDisabledFirst] = useState(false);
107
- const [isErrorFirst, setIsErrorFirst] = useState(false);
108
-
109
- const [disabledSecond, setDisabledSecond] = useState(false);
110
- const [isErrorSecond, setIsErrorSecond] = useState(false);
111
-
112
- const onFullCodeEnter = (
113
- code: string,
114
- errorSetter: Dispatch<SetStateAction<boolean>>,
115
- disableSetter: Dispatch<SetStateAction<boolean>>
116
- ) => {
117
- disableSetter(true);
118
-
119
- // имитация запроса на сервер
120
- setTimeout(() => {
121
- disableSetter(false);
122
-
123
- if (code !== '123456') {
124
- errorSetter(true);
125
- }
126
- }, 3000)
127
- }
128
-
129
- return (
130
- <div style=\{{ flexDirection: 'column', gap: '2rem' }}>
131
- <CodeField
132
- itemErrorBehavior="remove-symbol"
133
- codeErrorBehavior="remove-code"
134
- disabled={disabledFirst}
135
- isError={isErrorFirst}
136
- setIsError={setIsErrorFirst}
137
- onFullCodeEnter={(code) => onFullCodeEnter(code, setIsErrorFirst, setDisabledFirst)}
138
- />
139
- <CodeField
140
- itemErrorBehavior="remove-symbol"
141
- codeErrorBehavior="keep"
142
- disabled={disabledSecond}
143
- isError={isErrorSecond}
144
- setIsError={setIsErrorSecond}
145
- onFullCodeEnter={(code) => onFullCodeEnter(code, setIsErrorSecond, setDisabledSecond)}
146
- />
147
- </div>
148
- );
149
- }
150
- ```
@@ -1,51 +0,0 @@
1
- export var classes = {
2
- itemError: 'codefield-item-error',
3
- itemErrorAnimation: 'codefield-item-error-animation',
4
- itemErrorFade: 'codefield-item-error-fade',
5
- captionError: 'codefield-caption-error',
6
- codeError: 'codefield-code-error',
7
- codeErrorAnimation: 'codefield-code-error-animation',
8
- codeErrorFade: 'codefield-code-error-fade',
9
- captionAlignLeft: 'codefield-caption-align-left',
10
- hoverEnabled: 'codefield-item-hover-enabled',
11
- segmented: 'codefield-shape-segmented',
12
- "default": 'codefield-shape-default',
13
- disabled: 'codefield-disabled'
14
- };
15
- export var tokens = {
16
- captionGap: '--plasma-codefield-caption-gap',
17
- codeItemsGap: '--plasma-codefield-code-item-gap',
18
- separatorWidth: '--plasma-codefield-separator-width',
19
- codeItemWidth: '--plasma-codefield-item-width',
20
- codeItemHeight: '--plasma-codefield-item-height',
21
- fontFamily: '--plasma-codefield-font-family',
22
- fontStyle: '--plasma-codefield-font-style',
23
- fontSize: '--plasma-codefield-font-size',
24
- fontWeight: '--plasma-codefield-font-weight',
25
- letterSpacing: '--plasma-codefield-letter-spacing',
26
- lineHeight: '--plasma-codefield-line-height',
27
- captionFontFamily: '--plasma-codefield-caption-font-family',
28
- captionFontSize: '--plasma-codefield-caption-font-style',
29
- captionFontStyle: '--plasma-codefield-caption-font-size',
30
- captionFontWeight: '--plasma-codefield-caption-font-weight',
31
- captionLetterSpacing: '--plasma-codefield-caption-letter-spacing',
32
- captionLineHeight: '--plasma-codefield-caption-line-height',
33
- borderRadius: '--plasma-codefield-code-item-border-radius',
34
- borderRadiusSegmented: '--plasma-codefield-code-item-border-radius-segmented',
35
- segmentedSideBorderRadius: '--plasma-codefield-code-item-segmented-side-border-radius',
36
- captionColor: '--plasma-codefield-caption-color',
37
- captionColorError: '--plasma-codefield-caption-color-error',
38
- codeColor: '--plasma-codefield-code-color',
39
- codeColorError: '--plasma-codefield-code-color-error',
40
- backgroundColor: '--plasma-codefield-background-color',
41
- backgroundColorHover: '--plasma-codefield-background-color-hover',
42
- backgroundColorFocus: '--plasma-codefield-background-color-focus',
43
- backgroundErrorColor: '--plasma-codefield-background-error-color',
44
- borderWidth: '--plasma-codefield-border-width',
45
- borderColor: '--plasma-codefield-border-color',
46
- borderColorHover: '--plasma-codefield-border-color-hover',
47
- borderColorFocus: '--plasma-codefield-border-color-focus',
48
- borderErrorColor: '--plasma-codefield-border-error-color',
49
- caretColor: '--plasma-codefield-caret-color',
50
- disabledOpacity: '--plasma-codefield-disabled-opacity'
51
- };
@@ -1,3 +0,0 @@
1
- export { codeFieldRoot, codeFieldConfig } from "./CodeField";
2
- export { tokens as codeFieldTokens, classes as codeFieldClasses } from "./CodeField.tokens";
3
- export { ONLY_DIGITS_PATTERN, ONLY_CHARS_PATTERN, ONLY_DIGITS_AND_CHARS_PATTERN } from "./utils/constants";
@@ -1,6 +0,0 @@
1
- export var ONLY_DIGITS_PATTERN = '^\\d+$';
2
- export var ONLY_CHARS_PATTERN = '^[a-zA-Z]+$';
3
- export var ONLY_DIGITS_AND_CHARS_PATTERN = '^[a-zA-Z0-9]+$';
4
- export var FORBIDDEN_KEYS = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Delete'];
5
- export var BACKSPACE_KEY = 'Backspace';
6
- export var ANIMATION_TIMEOUT = 300;
@@ -1,52 +0,0 @@
1
- function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
2
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
4
- function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
5
- function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
6
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
7
- import { classes } from "../CodeField.tokens";
8
- import { ANIMATION_TIMEOUT } from "./constants";
9
- import { getCodeValue } from "./initialValuesHelper";
10
- export var handleCodeError = function handleCodeError(_ref) {
11
- var _captionRef$current, _captionRef$current2;
12
- var codeLength = _ref.codeLength,
13
- codeErrorBehavior = _ref.codeErrorBehavior,
14
- currentCode = _ref.currentCode,
15
- inputRefs = _ref.inputRefs,
16
- inputContainerRef = _ref.inputContainerRef,
17
- captionRef = _ref.captionRef,
18
- setCode = _ref.setCode,
19
- codeSetter = _ref.codeSetter;
20
- if (!inputContainerRef.current) {
21
- return;
22
- }
23
- switch (codeErrorBehavior) {
24
- case 'keep':
25
- inputContainerRef.current.classList.add(classes.codeError, classes.codeErrorAnimation);
26
- (_captionRef$current = captionRef.current) === null || _captionRef$current === void 0 || _captionRef$current.classList.add(classes.captionError);
27
- setTimeout(function () {
28
- var _inputContainerRef$cu;
29
- var newCode = _toConsumableArray(currentCode);
30
- newCode.pop();
31
- codeSetter(newCode);
32
- setCode(currentCode);
33
- (_inputContainerRef$cu = inputContainerRef.current) === null || _inputContainerRef$cu === void 0 || _inputContainerRef$cu.classList.remove(classes.codeErrorAnimation);
34
- setTimeout(function () {
35
- var _inputRefs$current, _inputRefs$current2;
36
- (_inputRefs$current = inputRefs.current[inputRefs.current.length - 1]) === null || _inputRefs$current === void 0 || _inputRefs$current.setSelectionRange(0, 1);
37
- (_inputRefs$current2 = inputRefs.current[inputRefs.current.length - 1]) === null || _inputRefs$current2 === void 0 || _inputRefs$current2.focus();
38
- }, 0);
39
- }, ANIMATION_TIMEOUT);
40
- break;
41
- case 'remove-code':
42
- default:
43
- inputContainerRef.current.classList.add(classes.codeError, classes.codeErrorAnimation, classes.codeErrorFade);
44
- (_captionRef$current2 = captionRef.current) === null || _captionRef$current2 === void 0 || _captionRef$current2.classList.add(classes.captionError);
45
- setTimeout(function () {
46
- var _inputRefs$current$, _inputContainerRef$cu2;
47
- codeSetter(getCodeValue(codeLength, ''));
48
- (_inputRefs$current$ = inputRefs.current[0]) === null || _inputRefs$current$ === void 0 || _inputRefs$current$.focus();
49
- (_inputContainerRef$cu2 = inputContainerRef.current) === null || _inputContainerRef$cu2 === void 0 || _inputContainerRef$cu2.classList.remove(classes.codeError, classes.codeErrorAnimation, classes.codeErrorFade);
50
- }, ANIMATION_TIMEOUT);
51
- }
52
- };