@salutejs/plasma-new-hope 0.336.0-canary.2228.17672900057.0 → 0.336.0-canary.2231.17732581275.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 (502) hide show
  1. package/cjs/components/Attach/Attach.css +7 -9
  2. package/cjs/components/Attach/Attach.js +59 -13
  3. package/cjs/components/Attach/Attach.js.map +1 -1
  4. package/cjs/components/Attach/Attach.styles.js +9 -21
  5. package/cjs/components/Attach/Attach.styles.js.map +1 -1
  6. package/cjs/components/Attach/Attach.styles_1w3ga58.css +5 -0
  7. package/cjs/components/Attach/utils/addSeparator.js +18 -0
  8. package/cjs/components/Attach/utils/addSeparator.js.map +1 -0
  9. package/cjs/components/Attach/utils/getFileicon.js +2 -2
  10. package/cjs/components/Attach/utils/getFileicon.js.map +1 -1
  11. package/cjs/components/Attach/utils/index.js +8 -0
  12. package/cjs/components/Attach/utils/index.js.map +1 -0
  13. package/cjs/components/Attach/variations/_helperTextView/base.js +1 -1
  14. package/cjs/components/Attach/variations/_helperTextView/base_1vgke1p.css +1 -0
  15. package/cjs/components/Attach/variations/_size/base.js +1 -1
  16. package/cjs/components/Attach/variations/_size/base.js.map +1 -1
  17. package/cjs/components/Attach/variations/_size/base_a4eelx.css +1 -0
  18. package/cjs/components/Autocomplete/Autocomplete.css +3 -0
  19. package/cjs/components/CodeField/CodeField.css +7 -6
  20. package/cjs/components/CodeField/CodeField.js +63 -27
  21. package/cjs/components/CodeField/CodeField.js.map +1 -1
  22. package/cjs/components/CodeField/CodeField.styles.js +7 -1
  23. package/cjs/components/CodeField/CodeField.styles.js.map +1 -1
  24. package/{es/components/CodeField/CodeField.styles_ebdpd0.css → cjs/components/CodeField/CodeField.styles_14p25hi.css} +1 -0
  25. package/cjs/components/CodeField/hooks/useWebOTP.js +95 -0
  26. package/cjs/components/CodeField/hooks/useWebOTP.js.map +1 -0
  27. package/cjs/components/CodeField/utils/handleCodeError.js +2 -2
  28. package/cjs/components/CodeField/utils/handleCodeError.js.map +1 -1
  29. package/cjs/components/CodeField/utils/handleItemError.js +14 -4
  30. package/cjs/components/CodeField/utils/handleItemError.js.map +1 -1
  31. package/cjs/components/CodeField/utils/isWebOTPSupported.js +10 -0
  32. package/cjs/components/CodeField/utils/isWebOTPSupported.js.map +1 -0
  33. package/cjs/components/Combobox/ComboboxNew/Combobox.css +3 -0
  34. package/cjs/components/Combobox/ComboboxNew/Combobox.js +65 -66
  35. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  36. package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +1 -4
  37. package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  38. package/cjs/components/DatePicker/RangeDate/RangeDate.css +3 -0
  39. package/cjs/components/DatePicker/RangeDate/RangeDate.js +30 -22
  40. package/cjs/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
  41. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +3 -0
  42. package/cjs/components/DatePicker/SingleDate/SingleDate.css +3 -0
  43. package/cjs/components/Pagination/Pagination.css +15 -10
  44. package/cjs/components/Pagination/Pagination.js +57 -5
  45. package/cjs/components/Pagination/Pagination.js.map +1 -1
  46. package/cjs/components/Pagination/Pagination.styles.js +19 -7
  47. package/cjs/components/Pagination/Pagination.styles.js.map +1 -1
  48. package/cjs/components/Pagination/{Pagination.styles_ska0td.css → Pagination.styles_qhyqps.css} +5 -3
  49. package/cjs/components/Pagination/Pagination.tokens.js +3 -0
  50. package/cjs/components/Pagination/Pagination.tokens.js.map +1 -1
  51. package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.css +3 -3
  52. package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +1 -1
  53. package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js.map +1 -1
  54. package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/{PaginationQuickJumpToPage.styles_89ax1q.css → PaginationQuickJumpToPage.styles_1sw6ww1.css} +2 -2
  55. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +3 -0
  56. package/cjs/components/Popover/Popover.js +4 -1
  57. package/cjs/components/Popover/Popover.js.map +1 -1
  58. package/cjs/components/Range/Range.css +3 -0
  59. package/cjs/components/Select/Select.css +3 -0
  60. package/cjs/components/Select/Select.js +35 -21
  61. package/cjs/components/Select/Select.js.map +1 -1
  62. package/cjs/components/Select/hooks/usePathMaps.js +1 -4
  63. package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
  64. package/cjs/components/Select/ui/Target/Target.css +3 -0
  65. package/cjs/components/Select/ui/Target/Target.js +0 -2
  66. package/cjs/components/Select/ui/Target/Target.js.map +1 -1
  67. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +3 -0
  68. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +32 -49
  69. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  70. package/cjs/components/Slider/Slider.css +3 -0
  71. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +3 -0
  72. package/cjs/components/Switch/Switch.css +6 -6
  73. package/cjs/components/Switch/Switch.js +5 -2
  74. package/cjs/components/Switch/Switch.js.map +1 -1
  75. package/cjs/components/Switch/Switch.styles.js +1 -1
  76. package/cjs/components/Switch/Switch.styles.js.map +1 -1
  77. package/cjs/components/Switch/{Switch.styles_qjefea.css → Switch.styles_158fwwl.css} +1 -1
  78. package/cjs/components/Switch/Switch.tokens.js +2 -1
  79. package/cjs/components/Switch/Switch.tokens.js.map +1 -1
  80. package/cjs/components/Table/Table.css +3 -0
  81. package/cjs/components/Table/ui/Cell/Cell.css +3 -0
  82. package/cjs/components/Table/ui/EditableCell/EditableCell.css +3 -0
  83. package/cjs/components/Table/ui/HeadCell/HeadCell.css +3 -0
  84. package/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.css +3 -0
  85. package/cjs/components/TextField/TextField.js +20 -4
  86. package/cjs/components/TextField/TextField.js.map +1 -1
  87. package/cjs/components/TextField/TextField.tokens.js +1 -0
  88. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  89. package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.css +58 -0
  90. package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +86 -0
  91. package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js.map +1 -0
  92. package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +25 -0
  93. package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js.map +1 -0
  94. package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles_y9tozi.css +2 -0
  95. package/cjs/components/Tree/Tree.css +7 -6
  96. package/cjs/components/Tree/Tree.js +42 -1
  97. package/cjs/components/Tree/Tree.js.map +1 -1
  98. package/cjs/components/Tree/Tree.styles.js +17 -2
  99. package/cjs/components/Tree/Tree.styles.js.map +1 -1
  100. package/cjs/components/Tree/Tree.styles_1bw3k0r.css +8 -0
  101. package/cjs/components/Tree/Tree.tokens.js +5 -2
  102. package/cjs/components/Tree/Tree.tokens.js.map +1 -1
  103. package/cjs/components/Tree/utils/traverseTree.js +3 -3
  104. package/cjs/components/Tree/utils/traverseTree.js.map +1 -1
  105. package/cjs/engines/common.js.map +1 -1
  106. package/cjs/engines/index.js.map +1 -1
  107. package/cjs/index.css +42 -37
  108. package/emotion/cjs/components/Attach/Attach.js +51 -12
  109. package/emotion/cjs/components/Attach/Attach.styles.js +13 -28
  110. package/emotion/cjs/components/Attach/utils/addSeparator.js +20 -0
  111. package/emotion/cjs/components/Attach/utils/getFileicon.js +3 -3
  112. package/emotion/cjs/components/Attach/utils/index.js +10 -2
  113. package/emotion/cjs/components/Attach/variations/_size/base.js +1 -1
  114. package/emotion/cjs/components/CodeField/CodeField.js +61 -23
  115. package/emotion/cjs/components/CodeField/CodeField.styles.js +18 -11
  116. package/emotion/cjs/components/CodeField/hooks/useWebOTP.js +246 -0
  117. package/emotion/cjs/components/CodeField/utils/handleCodeError.js +2 -2
  118. package/emotion/cjs/components/CodeField/utils/handleItemError.js +12 -3
  119. package/emotion/cjs/components/CodeField/utils/index.js +4 -0
  120. package/emotion/cjs/components/CodeField/utils/isWebOTPSupported.js +13 -0
  121. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +67 -74
  122. package/emotion/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
  123. package/emotion/cjs/components/Combobox/ComboboxNew/utils/index.js +0 -4
  124. package/emotion/cjs/components/DatePicker/RangeDate/RangeDate.js +24 -22
  125. package/emotion/cjs/components/Pagination/Pagination.js +53 -5
  126. package/emotion/cjs/components/Pagination/Pagination.styles.js +28 -14
  127. package/emotion/cjs/components/Pagination/Pagination.tokens.js +3 -0
  128. package/emotion/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +6 -6
  129. package/emotion/cjs/components/Popover/Popover.js +3 -1
  130. package/emotion/cjs/components/Select/Select.js +36 -19
  131. package/emotion/cjs/components/Select/hooks/usePathMaps.js +2 -5
  132. package/emotion/cjs/components/Select/ui/Target/Target.js +1 -2
  133. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +32 -71
  134. package/emotion/cjs/components/Select/utils/index.js +0 -4
  135. package/emotion/cjs/components/Switch/Switch.js +4 -2
  136. package/emotion/cjs/components/Switch/Switch.styles.js +11 -11
  137. package/emotion/cjs/components/Switch/Switch.tokens.js +2 -1
  138. package/emotion/cjs/components/TextField/TextField.js +21 -5
  139. package/emotion/cjs/components/TextField/TextField.tokens.js +1 -0
  140. package/emotion/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +78 -0
  141. package/emotion/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +49 -0
  142. package/emotion/cjs/components/TextField/ui/index.js +12 -3
  143. package/emotion/cjs/components/Tree/Tree.js +31 -1
  144. package/emotion/cjs/components/Tree/Tree.styles.js +23 -13
  145. package/emotion/cjs/components/Tree/Tree.tokens.js +5 -2
  146. package/emotion/cjs/components/Tree/utils/traverseTree.js +3 -3
  147. package/emotion/cjs/examples/components/Combobox/Combobox.js +0 -15
  148. package/emotion/cjs/examples/components/Pagination/Pagination.config.js +12 -12
  149. package/emotion/cjs/examples/components/Range/Range.config.js +8 -7
  150. package/emotion/cjs/examples/components/Tree/Tree.config.js +5 -5
  151. package/emotion/es/components/Attach/Attach.js +55 -16
  152. package/emotion/es/components/Attach/Attach.styles.js +11 -20
  153. package/emotion/es/components/Attach/utils/addSeparator.js +10 -0
  154. package/emotion/es/components/Attach/utils/getFileicon.js +1 -1
  155. package/emotion/es/components/Attach/utils/index.js +3 -1
  156. package/emotion/es/components/Attach/variations/_size/base.js +2 -2
  157. package/emotion/es/components/CodeField/CodeField.js +64 -26
  158. package/emotion/es/components/CodeField/CodeField.styles.js +15 -11
  159. package/emotion/es/components/CodeField/hooks/useWebOTP.js +236 -0
  160. package/emotion/es/components/CodeField/utils/handleCodeError.js +2 -2
  161. package/emotion/es/components/CodeField/utils/handleItemError.js +12 -3
  162. package/emotion/es/components/CodeField/utils/index.js +1 -0
  163. package/emotion/es/components/CodeField/utils/isWebOTPSupported.js +3 -0
  164. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +68 -75
  165. package/emotion/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
  166. package/emotion/es/components/Combobox/ComboboxNew/utils/index.js +0 -1
  167. package/emotion/es/components/DatePicker/RangeDate/RangeDate.js +24 -22
  168. package/emotion/es/components/Pagination/Pagination.js +55 -7
  169. package/emotion/es/components/Pagination/Pagination.styles.js +23 -15
  170. package/emotion/es/components/Pagination/Pagination.tokens.js +3 -0
  171. package/emotion/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +6 -6
  172. package/emotion/es/components/Popover/Popover.js +4 -2
  173. package/emotion/es/components/Select/Select.js +36 -19
  174. package/emotion/es/components/Select/hooks/usePathMaps.js +2 -5
  175. package/emotion/es/components/Select/ui/Target/Target.js +1 -2
  176. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +33 -72
  177. package/emotion/es/components/Select/utils/index.js +0 -1
  178. package/emotion/es/components/Switch/Switch.js +4 -2
  179. package/emotion/es/components/Switch/Switch.styles.js +11 -11
  180. package/emotion/es/components/Switch/Switch.tokens.js +2 -1
  181. package/emotion/es/components/TextField/TextField.js +22 -6
  182. package/emotion/es/components/TextField/TextField.tokens.js +1 -0
  183. package/emotion/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +63 -0
  184. package/emotion/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +27 -0
  185. package/emotion/es/components/TextField/ui/index.js +1 -0
  186. package/emotion/es/components/Tree/Tree.js +32 -2
  187. package/emotion/es/components/Tree/Tree.styles.js +20 -13
  188. package/emotion/es/components/Tree/Tree.tokens.js +5 -2
  189. package/emotion/es/components/Tree/utils/traverseTree.js +3 -3
  190. package/emotion/es/examples/components/Combobox/Combobox.js +0 -7
  191. package/emotion/es/examples/components/Pagination/Pagination.config.js +12 -12
  192. package/emotion/es/examples/components/Range/Range.config.js +8 -7
  193. package/emotion/es/examples/components/Tree/Tree.config.js +5 -5
  194. package/es/components/Attach/Attach.css +7 -9
  195. package/es/components/Attach/Attach.js +63 -17
  196. package/es/components/Attach/Attach.js.map +1 -1
  197. package/es/components/Attach/Attach.styles.js +9 -19
  198. package/es/components/Attach/Attach.styles.js.map +1 -1
  199. package/es/components/Attach/Attach.styles_1w3ga58.css +5 -0
  200. package/es/components/Attach/utils/addSeparator.js +14 -0
  201. package/es/components/Attach/utils/addSeparator.js.map +1 -0
  202. package/es/components/Attach/utils/getFileicon.js +2 -2
  203. package/es/components/Attach/utils/getFileicon.js.map +1 -1
  204. package/es/components/Attach/utils/index.js +4 -0
  205. package/es/components/Attach/utils/index.js.map +1 -0
  206. package/es/components/Attach/variations/_helperTextView/base.js +1 -1
  207. package/es/components/Attach/variations/_helperTextView/base_1vgke1p.css +1 -0
  208. package/es/components/Attach/variations/_size/base.js +1 -1
  209. package/es/components/Attach/variations/_size/base.js.map +1 -1
  210. package/es/components/Attach/variations/_size/base_a4eelx.css +1 -0
  211. package/es/components/Autocomplete/Autocomplete.css +3 -0
  212. package/es/components/CodeField/CodeField.css +7 -6
  213. package/es/components/CodeField/CodeField.js +66 -30
  214. package/es/components/CodeField/CodeField.js.map +1 -1
  215. package/es/components/CodeField/CodeField.styles.js +7 -2
  216. package/es/components/CodeField/CodeField.styles.js.map +1 -1
  217. package/{cjs/components/CodeField/CodeField.styles_ebdpd0.css → es/components/CodeField/CodeField.styles_14p25hi.css} +1 -0
  218. package/es/components/CodeField/hooks/useWebOTP.js +91 -0
  219. package/es/components/CodeField/hooks/useWebOTP.js.map +1 -0
  220. package/es/components/CodeField/utils/handleCodeError.js +2 -2
  221. package/es/components/CodeField/utils/handleCodeError.js.map +1 -1
  222. package/es/components/CodeField/utils/handleItemError.js +14 -4
  223. package/es/components/CodeField/utils/handleItemError.js.map +1 -1
  224. package/es/components/CodeField/utils/isWebOTPSupported.js +6 -0
  225. package/es/components/CodeField/utils/isWebOTPSupported.js.map +1 -0
  226. package/es/components/Combobox/ComboboxNew/Combobox.css +3 -0
  227. package/es/components/Combobox/ComboboxNew/Combobox.js +66 -67
  228. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  229. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +1 -4
  230. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  231. package/es/components/DatePicker/RangeDate/RangeDate.css +3 -0
  232. package/es/components/DatePicker/RangeDate/RangeDate.js +30 -22
  233. package/es/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
  234. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +3 -0
  235. package/es/components/DatePicker/SingleDate/SingleDate.css +3 -0
  236. package/es/components/Pagination/Pagination.css +15 -10
  237. package/es/components/Pagination/Pagination.js +59 -7
  238. package/es/components/Pagination/Pagination.js.map +1 -1
  239. package/es/components/Pagination/Pagination.styles.js +18 -8
  240. package/es/components/Pagination/Pagination.styles.js.map +1 -1
  241. package/es/components/Pagination/{Pagination.styles_ska0td.css → Pagination.styles_qhyqps.css} +5 -3
  242. package/es/components/Pagination/Pagination.tokens.js +3 -0
  243. package/es/components/Pagination/Pagination.tokens.js.map +1 -1
  244. package/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.css +3 -3
  245. package/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +1 -1
  246. package/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js.map +1 -1
  247. package/es/components/Pagination/ui/PaginationQuickJumpToPage/{PaginationQuickJumpToPage.styles_89ax1q.css → PaginationQuickJumpToPage.styles_1sw6ww1.css} +2 -2
  248. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +3 -0
  249. package/es/components/Popover/Popover.js +4 -1
  250. package/es/components/Popover/Popover.js.map +1 -1
  251. package/es/components/Range/Range.css +3 -0
  252. package/es/components/Select/Select.css +3 -0
  253. package/es/components/Select/Select.js +35 -21
  254. package/es/components/Select/Select.js.map +1 -1
  255. package/es/components/Select/hooks/usePathMaps.js +1 -4
  256. package/es/components/Select/hooks/usePathMaps.js.map +1 -1
  257. package/es/components/Select/ui/Target/Target.css +3 -0
  258. package/es/components/Select/ui/Target/Target.js +0 -2
  259. package/es/components/Select/ui/Target/Target.js.map +1 -1
  260. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +3 -0
  261. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +33 -50
  262. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  263. package/es/components/Slider/Slider.css +3 -0
  264. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +3 -0
  265. package/es/components/Switch/Switch.css +6 -6
  266. package/es/components/Switch/Switch.js +5 -2
  267. package/es/components/Switch/Switch.js.map +1 -1
  268. package/es/components/Switch/Switch.styles.js +1 -1
  269. package/es/components/Switch/Switch.styles.js.map +1 -1
  270. package/es/components/Switch/{Switch.styles_qjefea.css → Switch.styles_158fwwl.css} +1 -1
  271. package/es/components/Switch/Switch.tokens.js +2 -1
  272. package/es/components/Switch/Switch.tokens.js.map +1 -1
  273. package/es/components/Table/Table.css +3 -0
  274. package/es/components/Table/ui/Cell/Cell.css +3 -0
  275. package/es/components/Table/ui/EditableCell/EditableCell.css +3 -0
  276. package/es/components/Table/ui/HeadCell/HeadCell.css +3 -0
  277. package/es/components/Table/ui/HeadCell/ui/Filter/Filter.css +3 -0
  278. package/es/components/TextField/TextField.js +20 -4
  279. package/es/components/TextField/TextField.js.map +1 -1
  280. package/es/components/TextField/TextField.tokens.js +1 -0
  281. package/es/components/TextField/TextField.tokens.js.map +1 -1
  282. package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.css +58 -0
  283. package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +78 -0
  284. package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js.map +1 -0
  285. package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +21 -0
  286. package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js.map +1 -0
  287. package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles_y9tozi.css +2 -0
  288. package/es/components/Tree/Tree.css +7 -6
  289. package/es/components/Tree/Tree.js +43 -2
  290. package/es/components/Tree/Tree.js.map +1 -1
  291. package/es/components/Tree/Tree.styles.js +17 -3
  292. package/es/components/Tree/Tree.styles.js.map +1 -1
  293. package/es/components/Tree/Tree.styles_1bw3k0r.css +8 -0
  294. package/es/components/Tree/Tree.tokens.js +5 -2
  295. package/es/components/Tree/Tree.tokens.js.map +1 -1
  296. package/es/components/Tree/utils/traverseTree.js +3 -3
  297. package/es/components/Tree/utils/traverseTree.js.map +1 -1
  298. package/es/engines/common.js.map +1 -1
  299. package/es/engines/index.js.map +1 -1
  300. package/es/index.css +42 -37
  301. package/package.json +2 -2
  302. package/styled-components/cjs/components/Attach/Attach.js +51 -12
  303. package/styled-components/cjs/components/Attach/Attach.styles.js +11 -31
  304. package/styled-components/cjs/components/Attach/utils/addSeparator.js +20 -0
  305. package/styled-components/cjs/components/Attach/utils/getFileicon.js +3 -3
  306. package/styled-components/cjs/components/Attach/utils/index.js +10 -2
  307. package/styled-components/cjs/components/Attach/variations/_size/base.js +8 -1
  308. package/styled-components/cjs/components/CodeField/CodeField.js +61 -23
  309. package/styled-components/cjs/components/CodeField/CodeField.styles.js +14 -5
  310. package/styled-components/cjs/components/CodeField/hooks/useWebOTP.js +246 -0
  311. package/styled-components/cjs/components/CodeField/utils/handleCodeError.js +2 -2
  312. package/styled-components/cjs/components/CodeField/utils/handleItemError.js +12 -3
  313. package/styled-components/cjs/components/CodeField/utils/index.js +4 -0
  314. package/styled-components/cjs/components/CodeField/utils/isWebOTPSupported.js +13 -0
  315. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +67 -74
  316. package/styled-components/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
  317. package/styled-components/cjs/components/Combobox/ComboboxNew/utils/index.js +0 -4
  318. package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.js +24 -22
  319. package/styled-components/cjs/components/Pagination/Pagination.js +53 -5
  320. package/styled-components/cjs/components/Pagination/Pagination.styles.js +39 -12
  321. package/styled-components/cjs/components/Pagination/Pagination.tokens.js +3 -0
  322. package/styled-components/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +5 -5
  323. package/styled-components/cjs/components/Popover/Popover.js +3 -1
  324. package/styled-components/cjs/components/Select/Select.js +36 -19
  325. package/styled-components/cjs/components/Select/hooks/usePathMaps.js +2 -5
  326. package/styled-components/cjs/components/Select/ui/Target/Target.js +1 -2
  327. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +32 -71
  328. package/styled-components/cjs/components/Select/utils/index.js +0 -4
  329. package/styled-components/cjs/components/Switch/Switch.js +4 -2
  330. package/styled-components/cjs/components/Switch/Switch.styles.js +9 -8
  331. package/styled-components/cjs/components/Switch/Switch.tokens.js +2 -1
  332. package/styled-components/cjs/components/TextField/TextField.js +20 -4
  333. package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -0
  334. package/styled-components/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +78 -0
  335. package/styled-components/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +114 -0
  336. package/styled-components/cjs/components/TextField/ui/index.js +12 -3
  337. package/styled-components/cjs/components/Tree/Tree.js +31 -1
  338. package/styled-components/cjs/components/Tree/Tree.styles.js +24 -8
  339. package/styled-components/cjs/components/Tree/Tree.tokens.js +5 -2
  340. package/styled-components/cjs/components/Tree/utils/traverseTree.js +3 -3
  341. package/styled-components/cjs/examples/components/Pagination/Pagination.config.js +18 -11
  342. package/styled-components/cjs/examples/components/Range/Range.config.js +46 -0
  343. package/styled-components/cjs/examples/components/Tree/Tree.config.js +6 -2
  344. package/styled-components/es/components/Attach/Attach.js +55 -16
  345. package/styled-components/es/components/Attach/Attach.styles.js +9 -23
  346. package/styled-components/es/components/Attach/utils/addSeparator.js +10 -0
  347. package/styled-components/es/components/Attach/utils/getFileicon.js +1 -1
  348. package/styled-components/es/components/Attach/utils/index.js +3 -1
  349. package/styled-components/es/components/Attach/variations/_size/base.js +9 -2
  350. package/styled-components/es/components/CodeField/CodeField.js +64 -26
  351. package/styled-components/es/components/CodeField/CodeField.styles.js +11 -5
  352. package/styled-components/es/components/CodeField/hooks/useWebOTP.js +236 -0
  353. package/styled-components/es/components/CodeField/utils/handleCodeError.js +2 -2
  354. package/styled-components/es/components/CodeField/utils/handleItemError.js +12 -3
  355. package/styled-components/es/components/CodeField/utils/index.js +1 -0
  356. package/styled-components/es/components/CodeField/utils/isWebOTPSupported.js +3 -0
  357. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +68 -75
  358. package/styled-components/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
  359. package/styled-components/es/components/Combobox/ComboboxNew/utils/index.js +0 -1
  360. package/styled-components/es/components/DatePicker/RangeDate/RangeDate.js +24 -22
  361. package/styled-components/es/components/Pagination/Pagination.js +55 -7
  362. package/styled-components/es/components/Pagination/Pagination.styles.js +34 -13
  363. package/styled-components/es/components/Pagination/Pagination.tokens.js +3 -0
  364. package/styled-components/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +5 -5
  365. package/styled-components/es/components/Popover/Popover.js +4 -2
  366. package/styled-components/es/components/Select/Select.js +36 -19
  367. package/styled-components/es/components/Select/hooks/usePathMaps.js +2 -5
  368. package/styled-components/es/components/Select/ui/Target/Target.js +1 -2
  369. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +33 -72
  370. package/styled-components/es/components/Select/utils/index.js +0 -1
  371. package/styled-components/es/components/Switch/Switch.js +4 -2
  372. package/styled-components/es/components/Switch/Switch.styles.js +9 -8
  373. package/styled-components/es/components/Switch/Switch.tokens.js +2 -1
  374. package/styled-components/es/components/TextField/TextField.js +21 -5
  375. package/styled-components/es/components/TextField/TextField.tokens.js +1 -0
  376. package/styled-components/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +63 -0
  377. package/styled-components/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +92 -0
  378. package/styled-components/es/components/TextField/ui/index.js +1 -0
  379. package/styled-components/es/components/Tree/Tree.js +32 -2
  380. package/styled-components/es/components/Tree/Tree.styles.js +21 -8
  381. package/styled-components/es/components/Tree/Tree.tokens.js +5 -2
  382. package/styled-components/es/components/Tree/utils/traverseTree.js +3 -3
  383. package/styled-components/es/examples/components/Pagination/Pagination.config.js +18 -11
  384. package/styled-components/es/examples/components/Range/Range.config.js +46 -0
  385. package/styled-components/es/examples/components/Tree/Tree.config.js +6 -2
  386. package/types/components/Attach/Attach.d.ts.map +1 -1
  387. package/types/components/Attach/Attach.styles.d.ts +1 -3
  388. package/types/components/Attach/Attach.styles.d.ts.map +1 -1
  389. package/types/components/Attach/Attach.types.d.ts +0 -7
  390. package/types/components/Attach/Attach.types.d.ts.map +1 -1
  391. package/types/components/Attach/utils/addSeparator.d.ts +2 -0
  392. package/types/components/Attach/utils/addSeparator.d.ts.map +1 -0
  393. package/types/components/Attach/utils/getFileicon.d.ts +1 -1
  394. package/types/components/Attach/utils/index.d.ts +3 -1
  395. package/types/components/Attach/utils/index.d.ts.map +1 -1
  396. package/types/components/Attach/variations/_size/base.d.ts.map +1 -1
  397. package/types/components/CodeField/CodeField.d.ts.map +1 -1
  398. package/types/components/CodeField/CodeField.styles.d.ts +1 -0
  399. package/types/components/CodeField/CodeField.styles.d.ts.map +1 -1
  400. package/types/components/CodeField/hooks/useWebOTP.d.ts +20 -0
  401. package/types/components/CodeField/hooks/useWebOTP.d.ts.map +1 -0
  402. package/types/components/CodeField/utils/handleCodeError.d.ts +2 -2
  403. package/types/components/CodeField/utils/handleCodeError.d.ts.map +1 -1
  404. package/types/components/CodeField/utils/handleItemError.d.ts +3 -2
  405. package/types/components/CodeField/utils/handleItemError.d.ts.map +1 -1
  406. package/types/components/CodeField/utils/index.d.ts +1 -0
  407. package/types/components/CodeField/utils/index.d.ts.map +1 -1
  408. package/types/components/CodeField/utils/isWebOTPSupported.d.ts +2 -0
  409. package/types/components/CodeField/utils/isWebOTPSupported.d.ts.map +1 -0
  410. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  411. package/types/components/Combobox/ComboboxNew/hooks/getPathMaps.d.ts +1 -2
  412. package/types/components/Combobox/ComboboxNew/hooks/getPathMaps.d.ts.map +1 -1
  413. package/types/components/Combobox/ComboboxNew/utils/index.d.ts +0 -1
  414. package/types/components/Combobox/ComboboxNew/utils/index.d.ts.map +1 -1
  415. package/types/components/DatePicker/RangeDate/RangeDate.d.ts.map +1 -1
  416. package/types/components/Pagination/Pagination.d.ts.map +1 -1
  417. package/types/components/Pagination/Pagination.styles.d.ts +2 -0
  418. package/types/components/Pagination/Pagination.styles.d.ts.map +1 -1
  419. package/types/components/Pagination/Pagination.tokens.d.ts +3 -0
  420. package/types/components/Pagination/Pagination.tokens.d.ts.map +1 -1
  421. package/types/components/Pagination/Pagination.types.d.ts +6 -0
  422. package/types/components/Pagination/Pagination.types.d.ts.map +1 -1
  423. package/types/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.d.ts.map +1 -1
  424. package/types/components/Popover/Popover.d.ts.map +1 -1
  425. package/types/components/Select/Select.d.ts.map +1 -1
  426. package/types/components/Select/hooks/usePathMaps.d.ts +1 -2
  427. package/types/components/Select/hooks/usePathMaps.d.ts.map +1 -1
  428. package/types/components/Select/ui/Target/Target.d.ts +0 -1
  429. package/types/components/Select/ui/Target/Target.d.ts.map +1 -1
  430. package/types/components/Select/ui/Target/Target.types.d.ts +1 -2
  431. package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
  432. package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
  433. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -1
  434. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
  435. package/types/components/Select/utils/index.d.ts +0 -1
  436. package/types/components/Select/utils/index.d.ts.map +1 -1
  437. package/types/components/Switch/Switch.d.ts.map +1 -1
  438. package/types/components/Switch/Switch.styles.d.ts.map +1 -1
  439. package/types/components/Switch/Switch.tokens.d.ts +1 -0
  440. package/types/components/Switch/Switch.tokens.d.ts.map +1 -1
  441. package/types/components/Switch/Switch.types.d.ts +5 -0
  442. package/types/components/Switch/Switch.types.d.ts.map +1 -1
  443. package/types/components/TextField/TextField.d.ts.map +1 -1
  444. package/types/components/TextField/TextField.tokens.d.ts +1 -0
  445. package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
  446. package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.d.ts +21 -0
  447. package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.d.ts.map +1 -0
  448. package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.d.ts +3 -0
  449. package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.d.ts.map +1 -0
  450. package/types/components/TextField/ui/index.d.ts +1 -0
  451. package/types/components/TextField/ui/index.d.ts.map +1 -1
  452. package/types/components/Tree/Tree.d.ts +3 -3
  453. package/types/components/Tree/Tree.d.ts.map +1 -1
  454. package/types/components/Tree/Tree.styles.d.ts +3 -0
  455. package/types/components/Tree/Tree.styles.d.ts.map +1 -1
  456. package/types/components/Tree/Tree.tokens.d.ts +3 -0
  457. package/types/components/Tree/Tree.tokens.d.ts.map +1 -1
  458. package/types/components/Tree/Tree.types.d.ts +50 -1
  459. package/types/components/Tree/Tree.types.d.ts.map +1 -1
  460. package/types/components/Tree/utils/traverseTree.d.ts.map +1 -1
  461. package/types/engines/common.d.ts +3 -3
  462. package/types/engines/common.d.ts.map +1 -1
  463. package/types/engines/index.d.ts +1 -1
  464. package/types/engines/index.d.ts.map +1 -1
  465. package/types/engines/types.d.ts +4 -0
  466. package/types/engines/types.d.ts.map +1 -1
  467. package/types/examples/components/Attach/Attach.d.ts.map +1 -1
  468. package/types/examples/components/Pagination/Pagination.config.d.ts.map +1 -1
  469. package/types/examples/components/Range/Range.config.d.ts +1 -0
  470. package/types/examples/components/Range/Range.config.d.ts.map +1 -1
  471. package/types/examples/components/Range/Range.d.ts +1 -0
  472. package/types/examples/components/Range/Range.d.ts.map +1 -1
  473. package/types/examples/components/Tree/Tree.config.d.ts.map +1 -1
  474. package/types/examples/components/Tree/Tree.d.ts.map +1 -1
  475. package/cjs/components/Attach/Attach.styles_pso18d.css +0 -7
  476. package/cjs/components/Attach/variations/_helperTextView/base_1tgnvl9.css +0 -1
  477. package/cjs/components/Attach/variations/_size/base_1c6ezmq.css +0 -1
  478. package/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -17
  479. package/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js.map +0 -1
  480. package/cjs/components/Select/utils/getRemovedElement.js +0 -17
  481. package/cjs/components/Select/utils/getRemovedElement.js.map +0 -1
  482. package/cjs/components/Tree/Tree.styles_6sla5y.css +0 -7
  483. package/emotion/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -20
  484. package/emotion/cjs/components/Select/utils/getRemovedElement.js +0 -20
  485. package/emotion/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -10
  486. package/emotion/es/components/Select/utils/getRemovedElement.js +0 -10
  487. package/es/components/Attach/Attach.styles_pso18d.css +0 -7
  488. package/es/components/Attach/variations/_helperTextView/base_1tgnvl9.css +0 -1
  489. package/es/components/Attach/variations/_size/base_1c6ezmq.css +0 -1
  490. package/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -13
  491. package/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js.map +0 -1
  492. package/es/components/Select/utils/getRemovedElement.js +0 -13
  493. package/es/components/Select/utils/getRemovedElement.js.map +0 -1
  494. package/es/components/Tree/Tree.styles_6sla5y.css +0 -7
  495. package/styled-components/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -20
  496. package/styled-components/cjs/components/Select/utils/getRemovedElement.js +0 -20
  497. package/styled-components/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -10
  498. package/styled-components/es/components/Select/utils/getRemovedElement.js +0 -10
  499. package/types/components/Combobox/ComboboxNew/utils/getRemovedElement.d.ts +0 -2
  500. package/types/components/Combobox/ComboboxNew/utils/getRemovedElement.d.ts.map +0 -1
  501. package/types/components/Select/utils/getRemovedElement.d.ts +0 -2
  502. package/types/components/Select/utils/getRemovedElement.d.ts.map +0 -1
@@ -0,0 +1,14 @@
1
+ import { extractExtension } from './extractExtension.js';
2
+
3
+ var addSeparator = function addSeparator(filename, separator) {
4
+ var extension = extractExtension(filename);
5
+ var strings = filename.split('.');
6
+ var name = strings.length > 1 ? strings.slice(0, -1).join('.') : strings[0];
7
+ var lastChar = name[name.length - 1];
8
+ var dotChar = '.';
9
+ var nameWithSeparator = "".concat(name.slice(0, -1)).concat(separator).concat(lastChar);
10
+ return extension === name ? "".concat(nameWithSeparator) : "".concat(nameWithSeparator).concat(dotChar).concat(extension);
11
+ };
12
+
13
+ export { addSeparator };
14
+ //# sourceMappingURL=addSeparator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addSeparator.js","sources":["../../../../src/components/Attach/utils/addSeparator.ts"],"sourcesContent":["import { extractExtension } from './extractExtension';\n\nexport const addSeparator = (filename: string, separator: string) => {\n const extension = extractExtension(filename);\n\n const strings = filename.split('.');\n const name = strings.length > 1 ? strings.slice(0, -1).join('.') : strings[0];\n const lastChar = name[name.length - 1];\n const dotChar = '.';\n\n const nameWithSeparator = `${name.slice(0, -1)}${separator}${lastChar}`;\n\n return extension === name ? `${nameWithSeparator}` : `${nameWithSeparator}${dotChar}${extension}`;\n};\n"],"names":["addSeparator","filename","separator","extension","extractExtension","strings","split","name","length","slice","join","lastChar","dotChar","nameWithSeparator","concat"],"mappings":";;AAEO,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,QAAgB,EAAEC,SAAiB,EAAK;AACjE,EAAA,IAAMC,SAAS,GAAGC,gBAAgB,CAACH,QAAQ,CAAC,CAAA;AAE5C,EAAA,IAAMI,OAAO,GAAGJ,QAAQ,CAACK,KAAK,CAAC,GAAG,CAAC,CAAA;EACnC,IAAMC,IAAI,GAAGF,OAAO,CAACG,MAAM,GAAG,CAAC,GAAGH,OAAO,CAACI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,GAAGL,OAAO,CAAC,CAAC,CAAC,CAAA;EAC7E,IAAMM,QAAQ,GAAGJ,IAAI,CAACA,IAAI,CAACC,MAAM,GAAG,CAAC,CAAC,CAAA;EACtC,IAAMI,OAAO,GAAG,GAAG,CAAA;EAEnB,IAAMC,iBAAiB,MAAAC,MAAA,CAAMP,IAAI,CAACE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAAK,MAAA,CAAGZ,SAAS,CAAAY,CAAAA,MAAA,CAAGH,QAAQ,CAAE,CAAA;AAEvE,EAAA,OAAOR,SAAS,KAAKI,IAAI,MAAAO,MAAA,CAAMD,iBAAiB,CAAAC,GAAAA,EAAAA,CAAAA,MAAA,CAAQD,iBAAiB,CAAA,CAAAC,MAAA,CAAGF,OAAO,EAAAE,MAAA,CAAGX,SAAS,CAAE,CAAA;AACrG;;;;"}
@@ -6,7 +6,7 @@ import { IconBlankXlsOutline } from '../../_Icon/Icons/IconBlankXlsOutline.js';
6
6
  import { IconBlankDocOutline } from '../../_Icon/Icons/IconBlankDocOutline.js';
7
7
  import { IconBlankPdfOutline } from '../../_Icon/Icons/IconBlankPdfOutline.js';
8
8
 
9
- var getFileIcon = function getFileIcon(extension, size) {
9
+ var getFileicon = function getFileicon(extension, size) {
10
10
  var iconSize = size === 'xs' ? 'xs' : 's';
11
11
  switch (extension) {
12
12
  case 'pdf':
@@ -52,5 +52,5 @@ var getFileIcon = function getFileIcon(extension, size) {
52
52
  }
53
53
  };
54
54
 
55
- export { getFileIcon };
55
+ export { getFileicon };
56
56
  //# sourceMappingURL=getFileicon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFileicon.js","sources":["../../../../src/components/Attach/utils/getFileicon.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n IconBlankCsvOutline,\n IconBlankDocOutline,\n IconBlankOutline,\n IconBlankPdfOutline,\n IconBlankTxtOutline,\n IconBlankXlsOutline,\n} from '../../_Icon';\n\nexport const getFileIcon = (extension?: string, size?: string) => {\n const iconSize = size === 'xs' ? 'xs' : 's';\n\n switch (extension) {\n case 'pdf':\n return <IconBlankPdfOutline size={iconSize} color=\"inherit\" />;\n case 'doc':\n return <IconBlankDocOutline size={iconSize} color=\"inherit\" />;\n case 'docx':\n return <IconBlankDocOutline size={iconSize} color=\"inherit\" />;\n case 'xls':\n return <IconBlankXlsOutline size={iconSize} color=\"inherit\" />;\n case 'xlsx':\n return <IconBlankXlsOutline size={iconSize} color=\"inherit\" />;\n case 'txt':\n return <IconBlankTxtOutline size={iconSize} color=\"inherit\" />;\n case 'csv':\n return <IconBlankCsvOutline size={iconSize} color=\"inherit\" />;\n default:\n return <IconBlankOutline size={iconSize} color=\"inherit\" />;\n }\n};\n"],"names":["getFileIcon","extension","size","iconSize","React","createElement","IconBlankPdfOutline","color","IconBlankDocOutline","IconBlankXlsOutline","IconBlankTxtOutline","IconBlankCsvOutline","IconBlankOutline"],"mappings":";;;;;;;;AAWO,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,SAAkB,EAAEC,IAAa,EAAK;EAC9D,IAAMC,QAAQ,GAAGD,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,GAAG,CAAA;AAE3C,EAAA,QAAQD,SAAS;AACb,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOG,KAAA,CAAAC,aAAA,CAACC,mBAAmB,EAAA;AAACJ,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACG,mBAAmB,EAAA;AAACN,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,MAAM;AACP,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACG,mBAAmB,EAAA;AAACN,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACI,mBAAmB,EAAA;AAACP,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,MAAM;AACP,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACI,mBAAmB,EAAA;AAACP,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACK,mBAAmB,EAAA;AAACR,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACM,mBAAmB,EAAA;AAACT,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA;AACI,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACO,gBAAgB,EAAA;AAACV,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AACnE,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"getFileicon.js","sources":["../../../../src/components/Attach/utils/getFileicon.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n IconBlankCsvOutline,\n IconBlankDocOutline,\n IconBlankOutline,\n IconBlankPdfOutline,\n IconBlankTxtOutline,\n IconBlankXlsOutline,\n} from '../../_Icon';\n\nexport const getFileicon = (extension?: string, size?: string) => {\n const iconSize = size === 'xs' ? 'xs' : 's';\n\n switch (extension) {\n case 'pdf':\n return <IconBlankPdfOutline size={iconSize} color=\"inherit\" />;\n case 'doc':\n return <IconBlankDocOutline size={iconSize} color=\"inherit\" />;\n case 'docx':\n return <IconBlankDocOutline size={iconSize} color=\"inherit\" />;\n case 'xls':\n return <IconBlankXlsOutline size={iconSize} color=\"inherit\" />;\n case 'xlsx':\n return <IconBlankXlsOutline size={iconSize} color=\"inherit\" />;\n case 'txt':\n return <IconBlankTxtOutline size={iconSize} color=\"inherit\" />;\n case 'csv':\n return <IconBlankCsvOutline size={iconSize} color=\"inherit\" />;\n default:\n return <IconBlankOutline size={iconSize} color=\"inherit\" />;\n }\n};\n"],"names":["getFileicon","extension","size","iconSize","React","createElement","IconBlankPdfOutline","color","IconBlankDocOutline","IconBlankXlsOutline","IconBlankTxtOutline","IconBlankCsvOutline","IconBlankOutline"],"mappings":";;;;;;;;AAWO,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,SAAkB,EAAEC,IAAa,EAAK;EAC9D,IAAMC,QAAQ,GAAGD,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,GAAG,CAAA;AAE3C,EAAA,QAAQD,SAAS;AACb,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOG,KAAA,CAAAC,aAAA,CAACC,mBAAmB,EAAA;AAACJ,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACG,mBAAmB,EAAA;AAACN,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,MAAM;AACP,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACG,mBAAmB,EAAA;AAACN,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACI,mBAAmB,EAAA;AAACP,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,MAAM;AACP,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACI,mBAAmB,EAAA;AAACP,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACK,mBAAmB,EAAA;AAACR,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACM,mBAAmB,EAAA;AAACT,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA;AACI,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACO,gBAAgB,EAAA;AAACV,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AACnE,GAAA;AACJ;;;;"}
@@ -0,0 +1,4 @@
1
+ var separator = '...';
2
+
3
+ export { separator };
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Attach/utils/index.ts"],"sourcesContent":["export { extractExtension } from './extractExtension';\nexport { getFileicon } from './getFileicon';\nexport { addSeparator } from './addSeparator';\n\nexport const separator = '...';\n"],"names":["separator"],"mappings":"AAIO,IAAMA,SAAS,GAAG;;;;"}
@@ -1,4 +1,4 @@
1
- import './base_1tgnvl9.css';
1
+ import './base_1vgke1p.css';
2
2
  var base = "b1psfq3i";
3
3
 
4
4
  export { base };
@@ -0,0 +1 @@
1
+ .b1psfq3i .sssye98{color:var(--plasma-attach-helper-text-color);}
@@ -1,4 +1,4 @@
1
- import './base_1c6ezmq.css';
1
+ import './base_a4eelx.css';
2
2
  var base = "b1pj1390";
3
3
 
4
4
  export { base };
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sources":["../../../../../src/components/Attach/variations/_size/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { tokens, classes } from '../../Attach.tokens';\nimport { StyledHelperText } from '../../Attach.styles';\n\nexport const base = css`\n &.${classes.horizontal} {\n column-gap: var(${tokens.horizontalGap});\n }\n\n &.${classes.vertical} {\n row-gap: var(${tokens.verticalGap});\n }\n\n &.${classes.auto} {\n row-gap: var(${tokens.verticalGap});\n column-gap: var(${tokens.horizontalGap});\n }\n\n &.${classes.withHelperText} {\n row-gap: var(${tokens.verticalGapWithHelperText});\n }\n\n ${StyledHelperText} {\n font-family: var(--plasma-typo-body-xs-font-family);\n font-size: var(--plasma-typo-body-xs-font-size);\n font-style: var(--plasma-typo-body-xs-font-style);\n font-weight: var(--plasma-typo-body-xs-font-weight);\n letter-spacing: var(--plasma-typo-body-xs-letter-spacing);\n line-height: var(--plasma-typo-body-xs-line-height);\n }\n}\n`;\n"],"names":["base"],"mappings":"AAKO,IAAMA,IAAI,GA2BhB;;;;"}
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Attach/variations/_size/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { tokens, classes } from '../../Attach.tokens';\nimport { StyledHelperText, StyledHiddenInputHelper } from '../../Attach.styles';\n\nexport const base = css`\n &.${classes.horizontal} {\n column-gap: var(${tokens.horizontalGap});\n }\n\n &.${classes.vertical} {\n row-gap: var(${tokens.verticalGap});\n }\n\n &.${classes.auto} {\n row-gap: var(${tokens.verticalGap});\n column-gap: var(${tokens.horizontalGap});\n }\n\n &.${classes.withHelperText} {\n row-gap: var(${tokens.verticalGapWithHelperText});\n }\n\n ${StyledHiddenInputHelper} {\n font-family: var(${tokens.cellTitleFontFamily});\n font-size: var(${tokens.cellTitleFontSize});\n font-style: var(${tokens.cellTitleFontStyle});\n font-weight: var(${tokens.cellTitleFontWeight});\n letter-spacing: var(${tokens.cellTitleLetterSpacing});\n line-height: var(${tokens.cellTitleLineHeight});\n }\n\n ${StyledHelperText} {\n font-family: var(--plasma-typo-body-xs-font-family);\n font-size: var(--plasma-typo-body-xs-font-size);\n font-style: var(--plasma-typo-body-xs-font-style);\n font-weight: var(--plasma-typo-body-xs-font-weight);\n letter-spacing: var(--plasma-typo-body-xs-letter-spacing);\n line-height: var(--plasma-typo-body-xs-line-height);\n }\n}\n`;\n"],"names":["base"],"mappings":"AAKO,IAAMA,IAAI,GAoChB;;;;"}
@@ -0,0 +1 @@
1
+ .b1pj1390.horizontal{-webkit-column-gap:var(--plasma-attach-horizontal-gap);column-gap:var(--plasma-attach-horizontal-gap);}.b1pj1390.vertical{row-gap:var(--plasma-attach-vertical-gap);}.b1pj1390.auto{row-gap:var(--plasma-attach-vertical-gap);-webkit-column-gap:var(--plasma-attach-horizontal-gap);column-gap:var(--plasma-attach-horizontal-gap);}.b1pj1390.with-helper-text{row-gap:var(--plasma-attach-vertical-gap-with-helper-text);}.b1pj1390 .suojwhg{font-family:var(--plasma-attach-cell-title-font-family);font-size:var(--plasma-attach-cell-title-font-size);font-style:var(--plasma-attach-cell-title-font-style);font-weight:var(--plasma-attach-cell-title-font-weight);-webkit-letter-spacing:var(--plasma-attach-cell-title-letter-spacing);-moz-letter-spacing:var(--plasma-attach-cell-title-letter-spacing);-ms-letter-spacing:var(--plasma-attach-cell-title-letter-spacing);letter-spacing:var(--plasma-attach-cell-title-letter-spacing);line-height:var(--plasma-attach-cell-title-line-height);}.b1pj1390 .sssye98{font-family:var(--plasma-typo-body-xs-font-family);font-size:var(--plasma-typo-body-xs-font-size);font-style:var(--plasma-typo-body-xs-font-style);font-weight:var(--plasma-typo-body-xs-font-weight);-webkit-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);-moz-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);-ms-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);letter-spacing:var(--plasma-typo-body-xs-letter-spacing);line-height:var(--plasma-typo-body-xs-line-height);}
@@ -68,6 +68,9 @@
68
68
  .TextFieldChip_styles_14q069b_s32p7ut__9f1b34fd{--plasma-chip-color:var(--plasma-textfield__chip-color);--plasma-chip-background:var(--plasma-textfield__chip-background);--plasma-chip-color-hover:var(--plasma-textfield__chip-color-hover);--plasma-chip-background-hover:var(--plasma-textfield__chip-background-hover);--plasma-chip-color-active:var(--plasma-textfield__chip-color-active);--plasma-chip-background-active:var(--plasma-textfield__chip-background-active);--plasma-chip-background-readonly:var(--plasma-textfield__chip-background-readonly);--plasma-chip-color-readonly:var(--plasma-textfield__chip-color-readonly);--plasma-chip-background-readonly-hover:var(--plasma-textfield__chip-background-readonly-hover);--plasma-chip-color-readonly-hover:var(--plasma-textfield__chip-color-readonly-hover);--plasma-chip-border-radius:var(--plasma-textfield__chip-border-radius);--plasma-chip-width:var(--plasma-textfield__chip-width);--plasma-chip-height:var(--plasma-textfield__chip-height);--plasma-chip-padding:var(--plasma-textfield__chip-padding);--plasma-chip-font-family:var(--plasma-textfield__chip-font-family);--plasma-chip-font-size:var(--plasma-textfield__chip-font-size);--plasma-chip-font-style:var(--plasma-textfield__chip-font-style);--plasma-chip-font-weight:var(--plasma-textfield__chip-font-weight);--plasma-chip-letter-spacing:var(--plasma-textfield__chip-letter-spacing);--plasma-chip-lineheight:var(--plasma-textfield__chip-line-height);--plasma-chip-clear-content-margin-left:var(--plasma-textfield__chip-clear-content-margin-left);--plasma-chip-clear-content-margin-right:var(--plasma-textfield__chip-clear-content-margin-right);--plasma-chip-close-icon-size:var(--plasma-textfield__chip-close-icon-size);--plasma-chip-close-icon-color:var(--plasma-textfield__chip-close-icon-color);--plasma-chip-focus-color:var(--plasma-textfield-focus-color);-webkit-scroll-snap-align:center;-moz-scroll-snap-align:center;-ms-scroll-snap-align:center;scroll-snap-align:center;-webkit-scroll-snap-stop:normal;-moz-scroll-snap-stop:normal;-ms-scroll-snap-stop:normal;scroll-snap-stop:normal;position:relative;}.TextFieldChip_styles_14q069b_s32p7ut__9f1b34fd::before{content:'';position:absolute;top:0.0625rem;left:0.0625rem;right:0.0625rem;bottom:0.0625rem;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:calc(var(--plasma-textfield__chip-border-radius) - 0.1rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.TextFieldChip_styles_14q069b_s32p7ut__9f1b34fd.TextFieldChip_styles_14q069b_focusVisible__9f1b34fd:focus::before,.TextFieldChip_styles_14q069b_s32p7ut__9f1b34fd[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-textfield-focus-color);}.TextFieldChip_styles_14q069b_s32p7ut__9f1b34fd[readonly]{opacity:var(--plasma-textfield__chip-opacity-readonly);}
69
69
  .TextFieldChip_styles_14q069b_t4nir3h__9f1b34fd{display:block;-webkit-flex:none;-ms-flex:none;flex:none;background:none;border:none;outline:none;padding:0;white-space:nowrap;cursor:pointer;font-family:var(--plasma-textfield-font-family);font-size:var(--plasma-textfield-font-size);font-style:var(--plasma-textfield-font-style);font-weight:var(--plasma-textfield-font-weight);-webkit-letter-spacing:var(--plasma-textfield-letter-spacing);-moz-letter-spacing:var(--plasma-textfield-letter-spacing);-ms-letter-spacing:var(--plasma-textfield-letter-spacing);letter-spacing:var(--plasma-textfield-letter-spacing);line-height:var(--plasma-textfield-line-height);color:var(--plasma-textfield-color);position:relative;}.TextFieldChip_styles_14q069b_t4nir3h__9f1b34fd::before{content:'';position:absolute;top:0.0625rem;left:0.0625rem;right:0.0625rem;bottom:0.0625rem;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:calc(var(--plasma-textfield__chip-border-radius) - 0.1rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.TextFieldChip_styles_14q069b_t4nir3h__9f1b34fd.TextFieldChip_styles_14q069b_focusVisible__9f1b34fd:focus::before,.TextFieldChip_styles_14q069b_t4nir3h__9f1b34fd[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-textfield-focus-color);}.TextFieldChip_styles_14q069b_t4nir3h__9f1b34fd:after{content:',';}.TextFieldChip_styles_14q069b_t4nir3h__9f1b34fd:last-child:after{content:'';}
70
70
 
71
+ .TextFieldChipNew_styles_y9tozi_s11qqqhl__d1734be7{--plasma-chip-color:var(--plasma-textfield__chip-color);--plasma-chip-background:var(--plasma-textfield__chip-background);--plasma-chip-color-hover:var(--plasma-textfield__chip-color-hover);--plasma-chip-background-hover:var(--plasma-textfield__chip-background-hover);--plasma-chip-color-active:var(--plasma-textfield__chip-color-active);--plasma-chip-background-active:var(--plasma-textfield__chip-background-active);--plasma-chip-background-readonly:var(--plasma-textfield__chip-background-readonly);--plasma-chip-color-readonly:var(--plasma-textfield__chip-color-readonly);--plasma-chip-background-readonly-hover:var(--plasma-textfield__chip-background-readonly-hover);--plasma-chip-color-readonly-hover:var(--plasma-textfield__chip-color-readonly-hover);--plasma-chip-border-radius:var(--plasma-textfield__chip-border-radius);--plasma-chip-width:var(--plasma-textfield__chip-width);--plasma-chip-height:var(--plasma-textfield__chip-height);--plasma-chip-padding:var(--plasma-textfield__chip-padding);--plasma-chip-font-family:var(--plasma-textfield__chip-font-family);--plasma-chip-font-size:var(--plasma-textfield__chip-font-size);--plasma-chip-font-style:var(--plasma-textfield__chip-font-style);--plasma-chip-font-weight:var(--plasma-textfield__chip-font-weight);--plasma-chip-letter-spacing:var(--plasma-textfield__chip-letter-spacing);--plasma-chip-lineheight:var(--plasma-textfield__chip-line-height);--plasma-chip-clear-content-margin-left:var(--plasma-textfield__chip-clear-content-margin-left);--plasma-chip-clear-content-margin-right:var(--plasma-textfield__chip-clear-content-margin-right);--plasma-chip-close-icon-size:var(--plasma-textfield__chip-close-icon-size);--plasma-chip-close-icon-color:var(--plasma-textfield__chip-close-icon-color);--plasma-chip-focus-color:var(--plasma-textfield-focus-color);--plasma-chip-disabled-opacity:0.4;position:relative;}.TextFieldChipNew_styles_y9tozi_s11qqqhl__d1734be7::before{content:'';position:absolute;top:0.0625rem;left:0.0625rem;right:0.0625rem;bottom:0.0625rem;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:calc(var(--plasma-textfield__chip-border-radius) - 0.1rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.TextFieldChipNew_styles_y9tozi_s11qqqhl__d1734be7.TextFieldChipNew_styles_y9tozi_focusVisible__d1734be7:focus::before,.TextFieldChipNew_styles_y9tozi_s11qqqhl__d1734be7[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-textfield-focus-color);}.TextFieldChipNew_styles_y9tozi_s11qqqhl__d1734be7[readonly]{opacity:var(--plasma-textfield__chip-opacity-readonly);}
72
+ .TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7{display:block;-webkit-flex:none;-ms-flex:none;flex:none;background:none;border:none;outline:none;padding:0;white-space:nowrap;cursor:pointer;font-family:var(--plasma-textfield-font-family);font-size:var(--plasma-textfield-font-size);font-style:var(--plasma-textfield-font-style);font-weight:var(--plasma-textfield-font-weight);-webkit-letter-spacing:var(--plasma-textfield-letter-spacing);-moz-letter-spacing:var(--plasma-textfield-letter-spacing);-ms-letter-spacing:var(--plasma-textfield-letter-spacing);letter-spacing:var(--plasma-textfield-letter-spacing);line-height:var(--plasma-textfield-line-height);color:var(--plasma-textfield-color);position:relative;}.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7::before{content:'';position:absolute;top:0.0625rem;left:0.0625rem;right:0.0625rem;bottom:0.0625rem;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:calc(var(--plasma-textfield__chip-border-radius) - 0.1rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7.TextFieldChipNew_styles_y9tozi_focusVisible__d1734be7:focus::before,.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-textfield-focus-color);}.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7:after{content:',';}.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7:last-child:after{content:'';}
73
+
71
74
  .IconRoot_7pl7ig_svvlqhf__32c458a1{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:var(--svvlqhf-0);height:var(--svvlqhf-0);-webkit-flex:0 0 var(--svvlqhf-0);-ms-flex:0 0 var(--svvlqhf-0);flex:0 0 var(--svvlqhf-0);}
72
75
 
73
76
  .TextField_1lzb2r1_bpunezx__7d079491{display:block;}
@@ -1,9 +1,10 @@
1
- .CodeField_styles_ebdpd0_b1xx9skx__3407b383{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:-webkit-min-content;width:-moz-min-content;width:min-content;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.CodeField_styles_ebdpd0_b1xx9skx__3407b383.CodeField_styles_ebdpd0_codefieldCaptionAlignLeft__3407b383{-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}
2
- .CodeField_styles_ebdpd0_c1wzspax__3407b383{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
3
- .CodeField_styles_ebdpd0_c7swj1z__3407b383{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
4
- .CodeField_styles_ebdpd0_s13uxcg8__3407b383{width:var(--plasma-codefield-separator-width);}
5
- .CodeField_styles_ebdpd0_ig5h1kg__3407b383{box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;outline:none;pointer-events:none;text-align:center;}
6
- .CodeField_styles_ebdpd0_c1jpzjak__3407b383{text-align:var(--c1jpzjak-0);-webkit-align-self:var(--c1jpzjak-0);-ms-flex-item-align:var(--c1jpzjak-0);align-self:var(--c1jpzjak-0);width:var(--c1jpzjak-1);white-space:pre-line;}
1
+ .CodeField_styles_14p25hi_b1xx9skx__a0f2e82d{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:-webkit-min-content;width:-moz-min-content;width:min-content;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.CodeField_styles_14p25hi_b1xx9skx__a0f2e82d.CodeField_styles_14p25hi_codefieldCaptionAlignLeft__a0f2e82d{-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}
2
+ .CodeField_styles_14p25hi_c1wzspax__a0f2e82d{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
3
+ .CodeField_styles_14p25hi_c7swj1z__a0f2e82d{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
4
+ .CodeField_styles_14p25hi_s13uxcg8__a0f2e82d{width:var(--plasma-codefield-separator-width);}
5
+ .CodeField_styles_14p25hi_ig5h1kg__a0f2e82d{box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;outline:none;pointer-events:none;text-align:center;}
6
+ .CodeField_styles_14p25hi_c1jpzjak__a0f2e82d{text-align:var(--c1jpzjak-0);-webkit-align-self:var(--c1jpzjak-0);-ms-flex-item-align:var(--c1jpzjak-0);align-self:var(--c1jpzjak-0);width:var(--c1jpzjak-1);white-space:pre-line;}
7
+ .CodeField_styles_14p25hi_h1x845wl__a0f2e82d{display:none;}
7
8
 
8
9
  .base_9a5yza_b1g41h91__e66aaab8 .base_9a5yza_c1jpzjak__e66aaab8{color:var(--plasma-codefield-caption-color);}.base_9a5yza_b1g41h91__e66aaab8 .base_9a5yza_c1jpzjak__e66aaab8.base_9a5yza_codefieldCaptionError__e66aaab8{color:var(--plasma-codefield-caption-color-error);}.base_9a5yza_b1g41h91__e66aaab8 .base_9a5yza_ig5h1kg__e66aaab8{color:var(--plasma-codefield-code-color);caret-color:var(--plasma-codefield-caret-color);background-color:var(--plasma-codefield-background-color);box-shadow:inset 0 0 0 var(--plasma-codefield-border-width) var(--plasma-codefield-border-color);}.base_9a5yza_b1g41h91__e66aaab8:hover .base_9a5yza_codefieldItemHoverEnabled__e66aaab8{background-color:var(--plasma-codefield-background-color-hover);box-shadow:inset 0 0 0 var(--plasma-codefield-border-width) var(--plasma-codefield-border-color-hover);}.base_9a5yza_b1g41h91__e66aaab8:focus-within .base_9a5yza_ig5h1kg__e66aaab8:focus-within{background-color:var(--plasma-codefield-background-color-focus);box-shadow:inset 0 0 0 var(--plasma-codefield-border-width) var(--plasma-codefield-border-color-focus);}.base_9a5yza_b1g41h91__e66aaab8.base_9a5yza_b1g41h91__e66aaab8 .base_9a5yza_codefieldCodeErrorAnimation__e66aaab8{-webkit-animation:base_9a5yza_shakingErrorB1g41h91__e66aaab8 0.3s forwards;animation:base_9a5yza_shakingErrorB1g41h91__e66aaab8 0.3s forwards;}.base_9a5yza_b1g41h91__e66aaab8.base_9a5yza_b1g41h91__e66aaab8 .base_9a5yza_codefieldCodeError__e66aaab8 .base_9a5yza_ig5h1kg__e66aaab8{color:var(--plasma-codefield-code-color-error);background-color:var(--plasma-codefield-background-error-color);box-shadow:inset 0 0 0 var(--plasma-codefield-border-width) var(--plasma-codefield-border-error-color);}.base_9a5yza_b1g41h91__e66aaab8.base_9a5yza_b1g41h91__e66aaab8 .base_9a5yza_codefieldCodeError__e66aaab8:focus-within .base_9a5yza_ig5h1kg__e66aaab8{background-color:var(--plasma-codefield-background-error-color);box-shadow:inset 0 0 0 var(--plasma-codefield-border-width) var(--plasma-codefield-border-error-color);}.base_9a5yza_b1g41h91__e66aaab8.base_9a5yza_b1g41h91__e66aaab8 .base_9a5yza_codefieldCodeError__e66aaab8.base_9a5yza_codefieldCodeErrorFade__e66aaab8 .base_9a5yza_ig5h1kg__e66aaab8{-webkit-animation:base_9a5yza_fadeErrorB1g41h91__e66aaab8 0.3s forwards;animation:base_9a5yza_fadeErrorB1g41h91__e66aaab8 0.3s forwards;}.base_9a5yza_b1g41h91__e66aaab8.base_9a5yza_b1g41h91__e66aaab8 .base_9a5yza_codefieldItemErrorAnimation__e66aaab8{-webkit-animation:base_9a5yza_shakingErrorB1g41h91__e66aaab8 0.3s forwards;animation:base_9a5yza_shakingErrorB1g41h91__e66aaab8 0.3s forwards;}.base_9a5yza_b1g41h91__e66aaab8.base_9a5yza_b1g41h91__e66aaab8 .base_9a5yza_codefieldItemError__e66aaab8,.base_9a5yza_b1g41h91__e66aaab8.base_9a5yza_b1g41h91__e66aaab8 .base_9a5yza_codefieldItemError__e66aaab8:focus-within{color:var(--plasma-codefield-code-color-error);background-color:var(--plasma-codefield-background-error-color);box-shadow:inset 0 0 0 var(--plasma-codefield-border-width) var(--plasma-codefield-border-error-color);}.base_9a5yza_b1g41h91__e66aaab8.base_9a5yza_b1g41h91__e66aaab8 .base_9a5yza_codefieldItemError__e66aaab8.base_9a5yza_codefieldCodeErrorFade__e66aaab8,.base_9a5yza_b1g41h91__e66aaab8.base_9a5yza_b1g41h91__e66aaab8 .base_9a5yza_codefieldItemError__e66aaab8:focus-within.base_9a5yza_codefieldCodeErrorFade__e66aaab8{-webkit-animation:base_9a5yza_shakingErrorB1g41h91__e66aaab8 0.3s forwards :local(fadeError-b1g41h91) 0.3s :local(forwards);animation:base_9a5yza_shakingErrorB1g41h91__e66aaab8 0.3s forwards :local(fadeError-b1g41h91) 0.3s :local(forwards);}@-webkit-keyframes base_9a5yza_shakingErrorB1g41h91__e66aaab8{14%{-webkit-transform:translateX(-0.125rem);-ms-transform:translateX(-0.125rem);transform:translateX(-0.125rem);}28%{-webkit-transform:translateX(0.125rem);-ms-transform:translateX(0.125rem);transform:translateX(0.125rem);}42%{-webkit-transform:translateX(-0.125rem);-ms-transform:translateX(-0.125rem);transform:translateX(-0.125rem);}57%{-webkit-transform:translateX(0.125rem);-ms-transform:translateX(0.125rem);transform:translateX(0.125rem);}71%{-webkit-transform:translateX(-0.125rem);-ms-transform:translateX(-0.125rem);transform:translateX(-0.125rem);}85%{-webkit-transform:translateX(0.125rem);-ms-transform:translateX(0.125rem);transform:translateX(0.125rem);}100%{-webkit-transform:translateX(-0.125rem);-ms-transform:translateX(-0.125rem);transform:translateX(-0.125rem);}}@keyframes base_9a5yza_shakingErrorB1g41h91__e66aaab8{14%{-webkit-transform:translateX(-0.125rem);-ms-transform:translateX(-0.125rem);transform:translateX(-0.125rem);}28%{-webkit-transform:translateX(0.125rem);-ms-transform:translateX(0.125rem);transform:translateX(0.125rem);}42%{-webkit-transform:translateX(-0.125rem);-ms-transform:translateX(-0.125rem);transform:translateX(-0.125rem);}57%{-webkit-transform:translateX(0.125rem);-ms-transform:translateX(0.125rem);transform:translateX(0.125rem);}71%{-webkit-transform:translateX(-0.125rem);-ms-transform:translateX(-0.125rem);transform:translateX(-0.125rem);}85%{-webkit-transform:translateX(0.125rem);-ms-transform:translateX(0.125rem);transform:translateX(0.125rem);}100%{-webkit-transform:translateX(-0.125rem);-ms-transform:translateX(-0.125rem);transform:translateX(-0.125rem);}}@-webkit-keyframes base_9a5yza_fadeErrorB1g41h91__e66aaab8{50%{color:var(--plasma-codefield-code-color-error);}100%{color:transparent;}}@keyframes base_9a5yza_fadeErrorB1g41h91__e66aaab8{50%{color:var(--plasma-codefield-code-color-error);}100%{color:transparent;}}
9
10
 
@@ -1,24 +1,27 @@
1
- import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, defineProperty as _defineProperty, toConsumableArray as _toConsumableArray } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
- import React, { forwardRef, useState, useRef, useCallback, Fragment } from 'react';
1
+ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, objectSpread2 as _objectSpread2, defineProperty as _defineProperty, toConsumableArray as _toConsumableArray } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import React, { forwardRef, useState, useRef, useCallback, useEffect, Fragment } from 'react';
3
3
  import cls from 'classnames';
4
4
  import { FORBIDDEN_KEYS, BACKSPACE_KEY, ONLY_DIGITS_PATTERN } from './utils/constants.js';
5
5
  import { classes } from './CodeField.tokens.js';
6
- import { CodeWrapper, CodeGroup, ItemInput, Separator, CaptionWrapper, base } from './CodeField.styles.js';
6
+ import { CodeWrapper, CodeGroup, ItemInput, Separator, CaptionWrapper, HiddenInput, base } from './CodeField.styles.js';
7
7
  import { base as base$1 } from './variations/_view/base.js';
8
8
  import { base as base$2 } from './variations/_size/base.js';
9
9
  import { base as base$3 } from './variations/_shape/base.js';
10
10
  import { base as base$4 } from './variations/_disabled/base.js';
11
+ import { useWebOTP } from './hooks/useWebOTP.js';
11
12
  import { getCodeValue, getPlaceholderValue, getFieldPattern } from './utils/initialValuesHelper.js';
12
13
  import { useCodeHook } from '../../hooks/useCodeHook.js';
13
14
  import { useDidMountEffect } from '../../hooks/useDidMountEffect.js';
14
15
  import { handleCodeError } from './utils/handleCodeError.js';
15
16
  import { getSizeValueFromProp } from '../../utils/getSizeValueFromProp.js';
17
+ import { isWebOTPSupported } from './utils/isWebOTPSupported.js';
16
18
  import { handleItemError } from './utils/handleItemError.js';
17
19
 
18
20
  var _Separator;
19
21
  var _excluded = ["className", "value", "placeholder", "autoFocus", "codeLength", "caption", "captionAlign", "width", "shape", "view", "size", "disabled", "isError", "allowedSymbols", "itemErrorBehavior", "codeErrorBehavior", "autoComplete", "setIsError", "onChange", "onFullCodeEnter"];
20
22
  var codeFieldRoot = function codeFieldRoot(Root) {
21
23
  return /*#__PURE__*/forwardRef(function (_ref, ref) {
24
+ var _autocompleteRef$curr;
22
25
  var className = _ref.className,
23
26
  outerValue = _ref.value,
24
27
  placeholder = _ref.placeholder,
@@ -47,10 +50,11 @@ var codeFieldRoot = function codeFieldRoot(Root) {
47
50
  onChange = _ref.onChange,
48
51
  onFullCodeEnter = _ref.onFullCodeEnter,
49
52
  rest = _objectWithoutProperties(_ref, _excluded);
50
- var _useState = useState(getCodeValue(codeLength, outerValue || '')),
53
+ var _useState = useState(getCodeValue(codeLength, '')),
51
54
  _useState2 = _slicedToArray(_useState, 2),
52
- code = _useState2[0],
53
- setCode = _useState2[1];
55
+ innerValue = _useState2[0],
56
+ setInnerValue = _useState2[1];
57
+ var code = typeof outerValue === 'string' ? getCodeValue(codeLength, outerValue) : innerValue;
54
58
  var _useState3 = useState(code.join('')),
55
59
  _useState4 = _slicedToArray(_useState3, 2),
56
60
  originalValue = _useState4[0],
@@ -58,10 +62,12 @@ var codeFieldRoot = function codeFieldRoot(Root) {
58
62
  var inputRefs = useRef([]);
59
63
  var inputContainerRef = useRef(null);
60
64
  var captionRef = useRef(null);
65
+ var autocompleteRef = useRef(null);
61
66
  var fieldPattern = getFieldPattern(allowedSymbols);
62
67
  var placeholderValue = getPlaceholderValue(codeLength, placeholder);
63
68
  var parts = codeLength === 6 ? 2 : 1;
64
69
  var widthValue = width ? getSizeValueFromProp(width, 'rem') : undefined;
70
+ var isWebOTPEnabled = autoComplete === 'one-time-code' && !disabled && isWebOTPSupported();
65
71
  var getLastActiveIndex = function getLastActiveIndex() {
66
72
  if (code.length && code.length < codeLength) {
67
73
  return code.length;
@@ -71,6 +77,22 @@ var codeFieldRoot = function codeFieldRoot(Root) {
71
77
  });
72
78
  return lastEmptyIndex >= 0 ? lastEmptyIndex : codeLength - 1;
73
79
  };
80
+ var codeSetter = function codeSetter(newCode) {
81
+ var originalCode = newCode.join('');
82
+ setInnerValue(getCodeValue(codeLength, originalCode));
83
+ setOriginalValue(originalCode);
84
+ if (onChange) {
85
+ onChange(originalCode);
86
+ }
87
+ };
88
+ useWebOTP({
89
+ codeString: originalValue,
90
+ enableSMSAutoRead: autoComplete === 'one-time-code',
91
+ disabled: Boolean(disabled),
92
+ codeLength: codeLength,
93
+ codeSetter: codeSetter,
94
+ onFullCodeEnter: onFullCodeEnter
95
+ });
74
96
  var handleClick = function handleClick() {
75
97
  if (disabled) {
76
98
  return;
@@ -90,28 +112,33 @@ var codeFieldRoot = function codeFieldRoot(Root) {
90
112
  return;
91
113
  }
92
114
  if (key === BACKSPACE_KEY) {
93
- if (index > 0 && code[index] === '') {
94
- var _inputRefs$current;
95
- (_inputRefs$current = inputRefs.current[index - 1]) === null || _inputRefs$current === void 0 || _inputRefs$current.focus();
115
+ if (index > 0) {
116
+ var _inputRefs$current$in;
117
+ var newCode = _toConsumableArray(code);
118
+ newCode[index] = '';
119
+ if (index >= codeLength - 1 && code[index]) {
120
+ codeSetter(newCode);
121
+ return;
122
+ }
123
+ if (!code[index]) {
124
+ var _inputRefs$current;
125
+ newCode[index - 1] = '';
126
+ (_inputRefs$current = inputRefs.current[index - 1]) === null || _inputRefs$current === void 0 || _inputRefs$current.focus();
127
+ }
128
+ (_inputRefs$current$in = inputRefs.current[index]) === null || _inputRefs$current$in === void 0 || _inputRefs$current$in.classList.remove(classes.itemError);
129
+ codeSetter(newCode);
96
130
  }
97
131
  }
98
132
  };
99
- var codeSetter = function codeSetter(newCode) {
100
- setCode(newCode);
101
- setOriginalValue(newCode.join(''));
102
- if (onChange) {
103
- onChange(newCode.join(''));
104
- }
105
- };
106
133
  var handleChange = function handleChange(event, index) {
107
- var _inputRefs$current$in;
134
+ var _inputRefs$current$in2;
108
135
  if (disabled) {
109
136
  return;
110
137
  }
111
138
  var rawSymbol = event.currentTarget.value;
112
139
  var symbol = rawSymbol.charAt(rawSymbol.length - 1);
113
140
  var newCode = _toConsumableArray(code);
114
- (_inputRefs$current$in = inputRefs.current[index]) === null || _inputRefs$current$in === void 0 || _inputRefs$current$in.classList.remove(classes.itemError);
141
+ (_inputRefs$current$in2 = inputRefs.current[index]) === null || _inputRefs$current$in2 === void 0 || _inputRefs$current$in2.classList.remove(classes.itemError);
115
142
  if (isError) {
116
143
  var _captionRef$current;
117
144
  (_captionRef$current = captionRef.current) === null || _captionRef$current === void 0 || _captionRef$current.classList.remove(classes.captionError);
@@ -123,6 +150,9 @@ var codeFieldRoot = function codeFieldRoot(Root) {
123
150
  setIsError(false);
124
151
  }
125
152
  }
153
+ if (!symbol) {
154
+ return;
155
+ }
126
156
  if (!fieldPattern) {
127
157
  newCode[index] = symbol;
128
158
  codeSetter(newCode);
@@ -132,11 +162,6 @@ var codeFieldRoot = function codeFieldRoot(Root) {
132
162
  }
133
163
  return;
134
164
  }
135
- if (!symbol) {
136
- newCode[index] = '';
137
- codeSetter(newCode);
138
- return;
139
- }
140
165
  if (fieldPattern.test(symbol)) {
141
166
  newCode[index] = symbol.charAt(symbol.length - 1);
142
167
  codeSetter(newCode);
@@ -152,8 +177,9 @@ var codeFieldRoot = function codeFieldRoot(Root) {
152
177
  index: index,
153
178
  newCode: newCode,
154
179
  inputRefs: inputRefs,
155
- setCode: setCode,
156
- codeSetter: codeSetter
180
+ setInnerValue: setInnerValue,
181
+ codeSetter: codeSetter,
182
+ onChange: onChange
157
183
  });
158
184
  }
159
185
  };
@@ -199,12 +225,19 @@ var codeFieldRoot = function codeFieldRoot(Root) {
199
225
  inputRefs: inputRefs,
200
226
  inputContainerRef: inputContainerRef,
201
227
  captionRef: captionRef,
202
- setCode: setCode,
228
+ setInnerValue: setInnerValue,
203
229
  codeSetter: codeSetter
204
230
  });
205
231
  }
206
232
  }, [isError]);
207
- return /*#__PURE__*/React.createElement(Root, _extends({
233
+ useEffect(function () {
234
+ if (disabled || !autocompleteRef.current) {
235
+ return;
236
+ }
237
+ var autocompleteCode = autocompleteRef.current.value.split('');
238
+ codeSetter(autocompleteCode);
239
+ }, [(_autocompleteRef$curr = autocompleteRef.current) === null || _autocompleteRef$curr === void 0 ? void 0 : _autocompleteRef$curr.value, disabled]);
240
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Root, _extends({
208
241
  ref: ref,
209
242
  view: view,
210
243
  size: size,
@@ -212,7 +245,7 @@ var codeFieldRoot = function codeFieldRoot(Root) {
212
245
  disabled: disabled,
213
246
  onClick: handleClick,
214
247
  className: cls(className, _defineProperty({}, classes.captionAlignLeft, captionAlign === 'left'))
215
- }, rest), /*#__PURE__*/React.createElement(CodeWrapper, {
248
+ }, !isWebOTPEnabled && _objectSpread2({}, rest)), /*#__PURE__*/React.createElement(CodeWrapper, {
216
249
  ref: inputContainerRef
217
250
  }, _toConsumableArray(Array(parts)).map(function (_, partIndex) {
218
251
  return /*#__PURE__*/React.createElement(Fragment, {
@@ -228,7 +261,6 @@ var codeFieldRoot = function codeFieldRoot(Root) {
228
261
  },
229
262
  className: cls(_defineProperty(_defineProperty({}, classes.segmented, shape === 'segmented'), classes.hoverEnabled, !disabled && inputCorrectIndex >= originalValue.length)),
230
263
  value: code[inputCorrectIndex] || '',
231
- autoComplete: autoComplete,
232
264
  onChange: function onChange(e) {
233
265
  handleChange(e, inputCorrectIndex);
234
266
  },
@@ -245,7 +277,11 @@ var codeFieldRoot = function codeFieldRoot(Root) {
245
277
  ref: captionRef,
246
278
  captionAlign: captionAlign,
247
279
  widthValue: widthValue
248
- }, caption));
280
+ }, caption), isWebOTPEnabled && /*#__PURE__*/React.createElement(HiddenInput, _extends({
281
+ ref: autocompleteRef,
282
+ autoComplete: autoComplete,
283
+ tabIndex: -1
284
+ }, rest))));
249
285
  });
250
286
  };
251
287
  var codeFieldConfig = {
@@ -1 +1 @@
1
- {"version":3,"file":"CodeField.js","sources":["../../../src/components/CodeField/CodeField.tsx"],"sourcesContent":["import React, { forwardRef, Fragment, useCallback, useRef, useState } from 'react';\nimport cls from 'classnames';\nimport type { ChangeEvent, KeyboardEvent, ClipboardEvent } from 'react';\nimport type { RootProps } from 'src/engines';\nimport { useDidMountEffect } from 'src/hooks';\nimport { getSizeValueFromProp } from 'src/utils';\n\nimport { useCodeHook } from '../../hooks';\n\nimport type { CodeFieldProps } from './CodeField.types';\nimport { BACKSPACE_KEY, FORBIDDEN_KEYS, ONLY_DIGITS_PATTERN } from './utils/constants';\nimport { getCodeValue, getFieldPattern, getPlaceholderValue, handleCodeError, handleItemError } from './utils';\nimport { classes } from './CodeField.tokens';\nimport { base, CaptionWrapper, CodeGroup, CodeWrapper, ItemInput, Separator } from './CodeField.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as shapeCSS } from './variations/_shape/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\n\nexport const codeFieldRoot = (Root: RootProps<HTMLDivElement, CodeFieldProps>) =>\n forwardRef<HTMLInputElement, CodeFieldProps>(\n (\n {\n className,\n value: outerValue,\n placeholder,\n autoFocus,\n codeLength = 6,\n caption,\n captionAlign = 'left',\n width,\n shape = 'default',\n view,\n size,\n disabled,\n isError,\n allowedSymbols = ONLY_DIGITS_PATTERN,\n itemErrorBehavior = 'remove-symbol',\n codeErrorBehavior = 'remove-code',\n autoComplete = 'one-time-code',\n setIsError,\n onChange,\n onFullCodeEnter,\n ...rest\n },\n ref,\n ) => {\n const [code, setCode] = useState<Array<string>>(getCodeValue(codeLength, outerValue || ''));\n const [originalValue, setOriginalValue] = useState<string>(code.join(''));\n\n const inputRefs = useRef<Array<HTMLInputElement>>([]);\n const inputContainerRef = useRef<HTMLDivElement | null>(null);\n const captionRef = useRef<HTMLDivElement | null>(null);\n\n const fieldPattern = getFieldPattern(allowedSymbols);\n const placeholderValue = getPlaceholderValue(codeLength, placeholder);\n const parts = codeLength === 6 ? 2 : 1;\n\n const widthValue = width ? getSizeValueFromProp(width, 'rem') : undefined;\n\n const getLastActiveIndex = () => {\n if (code.length && code.length < codeLength) {\n return code.length;\n }\n\n const lastEmptyIndex = code.findIndex((digit) => digit === '');\n return lastEmptyIndex >= 0 ? lastEmptyIndex : codeLength - 1;\n };\n\n const handleClick = () => {\n if (disabled) {\n return;\n }\n\n const lastActiveIndex = getLastActiveIndex();\n\n if (inputRefs.current[lastActiveIndex]) {\n inputRefs.current[lastActiveIndex].focus();\n }\n };\n\n const handleOnKeyDown = (event: KeyboardEvent<HTMLInputElement>, index: number) => {\n if (disabled) {\n return;\n }\n\n const { key } = event;\n if (FORBIDDEN_KEYS.includes(key)) {\n event.preventDefault();\n\n return;\n }\n\n if (key === BACKSPACE_KEY) {\n if (index > 0 && code[index] === '') {\n inputRefs.current[index - 1]?.focus();\n }\n }\n };\n\n const codeSetter = (newCode: Array<string>) => {\n setCode(newCode);\n setOriginalValue(newCode.join(''));\n\n if (onChange) {\n onChange(newCode.join(''));\n }\n };\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>, index: number) => {\n if (disabled) {\n return;\n }\n\n const rawSymbol = event.currentTarget.value;\n const symbol = rawSymbol.charAt(rawSymbol.length - 1);\n const newCode = [...code];\n\n inputRefs.current[index]?.classList.remove(classes.itemError);\n if (isError) {\n captionRef.current?.classList.remove(classes.captionError);\n\n if (codeErrorBehavior === 'keep') {\n inputContainerRef.current?.classList.remove(classes.codeError, classes.codeErrorAnimation);\n }\n\n if (setIsError) {\n setIsError(false);\n }\n }\n\n if (!fieldPattern) {\n newCode[index] = symbol;\n codeSetter(newCode);\n\n if (symbol && index < codeLength - 1) {\n inputRefs.current[index + 1]?.focus();\n }\n\n return;\n }\n\n if (!symbol) {\n newCode[index] = '';\n codeSetter(newCode);\n\n return;\n }\n\n if (fieldPattern.test(symbol)) {\n newCode[index] = symbol.charAt(symbol.length - 1);\n codeSetter(newCode);\n\n if (index < codeLength - 1) {\n inputRefs.current[index + 1]?.focus();\n }\n } else {\n newCode[index] = symbol.charAt(symbol.length - 1);\n\n handleItemError({\n currentSymbol: symbol,\n itemErrorBehavior,\n index,\n newCode,\n inputRefs,\n setCode,\n codeSetter,\n });\n }\n };\n\n const handlePaste = (event: ClipboardEvent<HTMLInputElement>) => {\n const newCode = [...code];\n\n if (disabled) {\n return;\n }\n\n event.preventDefault();\n\n const rawData = event.clipboardData.getData('text/plain');\n\n const pastedData = (fieldPattern\n ? rawData\n .split('')\n .map((symb) => symb.match(fieldPattern)?.[0] || '')\n .filter(Boolean) || []\n : rawData.split('')\n ).slice(0, codeLength);\n\n pastedData.forEach((element, index) => {\n newCode[index] = element;\n });\n\n const activeIndex = Math.min(pastedData.length, codeLength - 1);\n inputRefs.current[activeIndex]?.focus();\n\n codeSetter(newCode);\n };\n\n const handleFullCodeEnter = useCallback((fullCode: string) => {\n if (onFullCodeEnter) {\n onFullCodeEnter(fullCode);\n }\n }, []);\n\n useCodeHook({\n inputRefs,\n codeLength,\n disabled,\n autoFocus,\n originalValue,\n getLastActiveIndex,\n handleFullCodeEnter,\n });\n\n useDidMountEffect(() => {\n if (isError) {\n handleCodeError({\n codeLength,\n codeErrorBehavior,\n currentCode: code,\n inputRefs,\n inputContainerRef,\n captionRef,\n setCode,\n codeSetter,\n });\n }\n }, [isError]);\n\n return (\n <Root\n ref={ref}\n view={view}\n size={size}\n shape={shape}\n disabled={disabled}\n onClick={handleClick}\n className={cls(className, {\n [classes.captionAlignLeft]: captionAlign === 'left',\n })}\n {...rest}\n >\n <CodeWrapper ref={inputContainerRef}>\n {[...Array(parts)].map((_, partIndex) => (\n <Fragment key={partIndex}>\n <CodeGroup role=\"group\">\n {[...Array(codeLength / parts)].map((_, i) => {\n const inputCorrectIndex = i + (codeLength / parts) * partIndex;\n\n return (\n <ItemInput\n key={partIndex + i + partIndex * i}\n ref={(element: HTMLInputElement) => {\n inputRefs.current[inputCorrectIndex] = element;\n }}\n className={cls({\n [classes.segmented]: shape === 'segmented',\n [classes.hoverEnabled]:\n !disabled && inputCorrectIndex >= originalValue.length,\n })}\n value={code[inputCorrectIndex] || ''}\n autoComplete={autoComplete}\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n handleChange(e, inputCorrectIndex);\n }}\n onKeyDown={(e: KeyboardEvent<HTMLInputElement>) => {\n handleOnKeyDown(e, inputCorrectIndex);\n }}\n onPaste={handlePaste}\n tabIndex={\n !disabled && originalValue.length === inputCorrectIndex ? 0 : -1\n }\n {...(placeholderValue && {\n placeholder: placeholderValue[inputCorrectIndex],\n })}\n />\n );\n })}\n </CodeGroup>\n {partIndex !== parts - 1 && <Separator />}\n </Fragment>\n ))}\n </CodeWrapper>\n {caption && (\n <CaptionWrapper ref={captionRef} captionAlign={captionAlign} widthValue={widthValue}>\n {caption}\n </CaptionWrapper>\n )}\n </Root>\n );\n },\n );\n\nexport const codeFieldConfig = {\n name: 'CodeField',\n tag: 'div',\n layout: codeFieldRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n shape: {\n css: shapeCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n },\n defaults: {\n size: 'm',\n view: 'default',\n shape: 'default',\n },\n};\n"],"names":["codeFieldRoot","Root","forwardRef","_ref","ref","className","outerValue","value","placeholder","autoFocus","_ref$codeLength","codeLength","caption","_ref$captionAlign","captionAlign","width","_ref$shape","shape","view","size","disabled","isError","_ref$allowedSymbols","allowedSymbols","ONLY_DIGITS_PATTERN","_ref$itemErrorBehavio","itemErrorBehavior","_ref$codeErrorBehavio","codeErrorBehavior","_ref$autoComplete","autoComplete","setIsError","onChange","onFullCodeEnter","rest","_objectWithoutProperties","_excluded","_useState","useState","getCodeValue","_useState2","_slicedToArray","code","setCode","_useState3","join","_useState4","originalValue","setOriginalValue","inputRefs","useRef","inputContainerRef","captionRef","fieldPattern","getFieldPattern","placeholderValue","getPlaceholderValue","parts","widthValue","getSizeValueFromProp","undefined","getLastActiveIndex","length","lastEmptyIndex","findIndex","digit","handleClick","lastActiveIndex","current","focus","handleOnKeyDown","event","index","key","FORBIDDEN_KEYS","includes","preventDefault","BACKSPACE_KEY","_inputRefs$current","codeSetter","newCode","handleChange","_inputRefs$current$in","rawSymbol","currentTarget","symbol","charAt","_toConsumableArray","classList","remove","classes","itemError","_captionRef$current","captionError","_inputContainerRef$cu","codeError","codeErrorAnimation","_inputRefs$current2","test","_inputRefs$current3","handleItemError","currentSymbol","handlePaste","_inputRefs$current$ac","rawData","clipboardData","getData","pastedData","split","map","symb","_symb$match","match","filter","Boolean","slice","forEach","element","activeIndex","Math","min","handleFullCodeEnter","useCallback","fullCode","useCodeHook","useDidMountEffect","handleCodeError","currentCode","React","createElement","_extends","onClick","cls","_defineProperty","captionAlignLeft","CodeWrapper","Array","_","partIndex","Fragment","CodeGroup","role","i","inputCorrectIndex","ItemInput","segmented","hoverEnabled","e","onKeyDown","onPaste","tabIndex","_Separator","Separator","CaptionWrapper","codeFieldConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","shapeCSS","disabledCSS","attrs","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;IAmBaA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,IAA+C,EAAA;AAAA,EAAA,oBACzEC,UAAU,CACN,UAAAC,IAAA,EAwBIC,GAAG,EACF;AAAA,IAAA,IAvBGC,SAAS,GAAAF,IAAA,CAATE,SAAS;MACFC,UAAU,GAAAH,IAAA,CAAjBI,KAAK;MACLC,WAAW,GAAAL,IAAA,CAAXK,WAAW;MACXC,SAAS,GAAAN,IAAA,CAATM,SAAS;MAAAC,eAAA,GAAAP,IAAA,CACTQ,UAAU;AAAVA,MAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,eAAA;MACdE,OAAO,GAAAT,IAAA,CAAPS,OAAO;MAAAC,iBA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C,WAAW,EAAE+C,gBAAgB,CAACwF,iBAAiB,CAAA;AACnD,SAAC,CACJ,CAAC,CAAA;OAET,CACM,CAAC,EACXL,SAAS,KAAKjF,KAAK,GAAG,CAAC,KAAA8F,UAAA,KAAAA,UAAA,gBAAIvB,KAAA,CAAAC,aAAA,CAACuB,SAAS,EAAA,IAAE,CAAC,CAAA,CACnC,CAAC,CAAA;KACd,CACQ,CAAC,EACb5I,OAAO,iBACJoH,KAAA,CAAAC,aAAA,CAACwB,cAAc,EAAA;AAACrJ,MAAAA,GAAG,EAAEgD,UAAW;AAACtC,MAAAA,YAAY,EAAEA,YAAa;AAAC4C,MAAAA,UAAU,EAAEA,UAAAA;KACpE9C,EAAAA,OACW,CAElB,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM8I,eAAe,GAAG;AAC3BC,EAAAA,IAAI,EAAE,WAAW;AACjBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE7J,aAAa;AACrB8J,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACR7I,IAAAA,IAAI,EAAE;AACF8I,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACD9I,IAAAA,IAAI,EAAE;AACF6I,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDjJ,IAAAA,KAAK,EAAE;AACH+I,MAAAA,GAAG,EAAEG,MAAAA;KACR;AACD/I,IAAAA,QAAQ,EAAE;AACN4I,MAAAA,GAAG,EAAEI,MAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNnJ,IAAAA,IAAI,EAAE,GAAG;AACTD,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,KAAK,EAAE,SAAA;AACX,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"CodeField.js","sources":["../../../src/components/CodeField/CodeField.tsx"],"sourcesContent":["import React, { forwardRef, Fragment, useCallback, useEffect, useRef, useState } from 'react';\nimport cls from 'classnames';\nimport type { ChangeEvent, KeyboardEvent, ClipboardEvent } from 'react';\nimport type { RootProps } from 'src/engines';\nimport { useDidMountEffect } from 'src/hooks';\nimport { getSizeValueFromProp } from 'src/utils';\n\nimport { useCodeHook } from '../../hooks';\n\nimport type { CodeFieldProps } from './CodeField.types';\nimport { BACKSPACE_KEY, FORBIDDEN_KEYS, ONLY_DIGITS_PATTERN } from './utils/constants';\nimport {\n getCodeValue,\n getFieldPattern,\n getPlaceholderValue,\n handleCodeError,\n handleItemError,\n isWebOTPSupported,\n} from './utils';\nimport { classes } from './CodeField.tokens';\nimport { base, CaptionWrapper, CodeGroup, CodeWrapper, HiddenInput, ItemInput, Separator } from './CodeField.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as shapeCSS } from './variations/_shape/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { useWebOTP } from './hooks/useWebOTP';\n\nexport const codeFieldRoot = (Root: RootProps<HTMLDivElement, CodeFieldProps>) =>\n forwardRef<HTMLInputElement, CodeFieldProps>(\n (\n {\n className,\n value: outerValue,\n placeholder,\n autoFocus,\n codeLength = 6,\n caption,\n captionAlign = 'left',\n width,\n shape = 'default',\n view,\n size,\n disabled,\n isError,\n allowedSymbols = ONLY_DIGITS_PATTERN,\n itemErrorBehavior = 'remove-symbol',\n codeErrorBehavior = 'remove-code',\n autoComplete = 'one-time-code',\n setIsError,\n onChange,\n onFullCodeEnter,\n ...rest\n },\n ref,\n ) => {\n const [innerValue, setInnerValue] = useState<Array<string>>(getCodeValue(codeLength, ''));\n const code = typeof outerValue === 'string' ? getCodeValue(codeLength, outerValue) : innerValue;\n\n const [originalValue, setOriginalValue] = useState<string>(code.join(''));\n\n const inputRefs = useRef<Array<HTMLInputElement>>([]);\n const inputContainerRef = useRef<HTMLDivElement | null>(null);\n const captionRef = useRef<HTMLDivElement | null>(null);\n const autocompleteRef = useRef<HTMLInputElement | null>(null);\n\n const fieldPattern = getFieldPattern(allowedSymbols);\n const placeholderValue = getPlaceholderValue(codeLength, placeholder);\n const parts = codeLength === 6 ? 2 : 1;\n\n const widthValue = width ? getSizeValueFromProp(width, 'rem') : undefined;\n const isWebOTPEnabled = autoComplete === 'one-time-code' && !disabled && isWebOTPSupported();\n\n const getLastActiveIndex = () => {\n if (code.length && code.length < codeLength) {\n return code.length;\n }\n\n const lastEmptyIndex = code.findIndex((digit) => digit === '');\n return lastEmptyIndex >= 0 ? lastEmptyIndex : codeLength - 1;\n };\n\n const codeSetter = (newCode: Array<string>) => {\n const originalCode = newCode.join('');\n\n setInnerValue(getCodeValue(codeLength, originalCode));\n setOriginalValue(originalCode);\n\n if (onChange) {\n onChange(originalCode);\n }\n };\n\n useWebOTP({\n codeString: originalValue,\n enableSMSAutoRead: autoComplete === 'one-time-code',\n disabled: Boolean(disabled),\n codeLength,\n codeSetter,\n onFullCodeEnter,\n });\n\n const handleClick = () => {\n if (disabled) {\n return;\n }\n\n const lastActiveIndex = getLastActiveIndex();\n\n if (inputRefs.current[lastActiveIndex]) {\n inputRefs.current[lastActiveIndex].focus();\n }\n };\n\n const handleOnKeyDown = (event: KeyboardEvent<HTMLInputElement>, index: number) => {\n if (disabled) {\n return;\n }\n\n const { key } = event;\n if (FORBIDDEN_KEYS.includes(key)) {\n event.preventDefault();\n\n return;\n }\n\n if (key === BACKSPACE_KEY) {\n if (index > 0) {\n const newCode = [...code];\n\n newCode[index] = '';\n\n if (index >= codeLength - 1 && code[index]) {\n codeSetter(newCode);\n return;\n }\n\n if (!code[index]) {\n newCode[index - 1] = '';\n inputRefs.current[index - 1]?.focus();\n }\n\n inputRefs.current[index]?.classList.remove(classes.itemError);\n codeSetter(newCode);\n }\n }\n };\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>, index: number) => {\n if (disabled) {\n return;\n }\n\n const rawSymbol = event.currentTarget.value;\n const symbol = rawSymbol.charAt(rawSymbol.length - 1);\n const newCode = [...code];\n\n inputRefs.current[index]?.classList.remove(classes.itemError);\n if (isError) {\n captionRef.current?.classList.remove(classes.captionError);\n\n if (codeErrorBehavior === 'keep') {\n inputContainerRef.current?.classList.remove(classes.codeError, classes.codeErrorAnimation);\n }\n\n if (setIsError) {\n setIsError(false);\n }\n }\n\n if (!symbol) {\n return;\n }\n\n if (!fieldPattern) {\n newCode[index] = symbol;\n codeSetter(newCode);\n\n if (symbol && index < codeLength - 1) {\n inputRefs.current[index + 1]?.focus();\n }\n\n return;\n }\n\n if (fieldPattern.test(symbol)) {\n newCode[index] = symbol.charAt(symbol.length - 1);\n codeSetter(newCode);\n\n if (index < codeLength - 1) {\n inputRefs.current[index + 1]?.focus();\n }\n } else {\n newCode[index] = symbol.charAt(symbol.length - 1);\n\n handleItemError({\n currentSymbol: symbol,\n itemErrorBehavior,\n index,\n newCode,\n inputRefs,\n setInnerValue,\n codeSetter,\n onChange,\n });\n }\n };\n\n const handlePaste = (event: ClipboardEvent<HTMLInputElement>) => {\n const newCode = [...code];\n\n if (disabled) {\n return;\n }\n\n event.preventDefault();\n\n const rawData = event.clipboardData.getData('text/plain');\n\n const pastedData = (fieldPattern\n ? rawData\n .split('')\n .map((symb) => symb.match(fieldPattern)?.[0] || '')\n .filter(Boolean) || []\n : rawData.split('')\n ).slice(0, codeLength);\n\n pastedData.forEach((element, index) => {\n newCode[index] = element;\n });\n\n const activeIndex = Math.min(pastedData.length, codeLength - 1);\n inputRefs.current[activeIndex]?.focus();\n\n codeSetter(newCode);\n };\n\n const handleFullCodeEnter = useCallback((fullCode: string) => {\n if (onFullCodeEnter) {\n onFullCodeEnter(fullCode);\n }\n }, []);\n\n useCodeHook({\n inputRefs,\n codeLength,\n disabled,\n autoFocus,\n originalValue,\n getLastActiveIndex,\n handleFullCodeEnter,\n });\n\n useDidMountEffect(() => {\n if (isError) {\n handleCodeError({\n codeLength,\n codeErrorBehavior,\n currentCode: code,\n inputRefs,\n inputContainerRef,\n captionRef,\n setInnerValue,\n codeSetter,\n });\n }\n }, [isError]);\n\n useEffect(() => {\n if (disabled || !autocompleteRef.current) {\n return;\n }\n\n const autocompleteCode = autocompleteRef.current.value.split('');\n codeSetter(autocompleteCode);\n }, [autocompleteRef.current?.value, disabled]);\n\n return (\n <>\n <Root\n ref={ref}\n view={view}\n size={size}\n shape={shape}\n disabled={disabled}\n onClick={handleClick}\n className={cls(className, {\n [classes.captionAlignLeft]: captionAlign === 'left',\n })}\n {...(!isWebOTPEnabled && { ...rest })}\n >\n <CodeWrapper ref={inputContainerRef}>\n {[...Array(parts)].map((_, partIndex) => (\n <Fragment key={partIndex}>\n <CodeGroup role=\"group\">\n {[...Array(codeLength / parts)].map((_, i) => {\n const inputCorrectIndex = i + (codeLength / parts) * partIndex;\n\n return (\n <ItemInput\n key={partIndex + i + partIndex * i}\n ref={(element: HTMLInputElement) => {\n inputRefs.current[inputCorrectIndex] = element;\n }}\n className={cls({\n [classes.segmented]: shape === 'segmented',\n [classes.hoverEnabled]:\n !disabled && inputCorrectIndex >= originalValue.length,\n })}\n value={code[inputCorrectIndex] || ''}\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n handleChange(e, inputCorrectIndex);\n }}\n onKeyDown={(e: KeyboardEvent<HTMLInputElement>) => {\n handleOnKeyDown(e, inputCorrectIndex);\n }}\n onPaste={handlePaste}\n tabIndex={\n !disabled && originalValue.length === inputCorrectIndex ? 0 : -1\n }\n {...(placeholderValue && {\n placeholder: placeholderValue[inputCorrectIndex],\n })}\n />\n );\n })}\n </CodeGroup>\n {partIndex !== parts - 1 && <Separator />}\n </Fragment>\n ))}\n </CodeWrapper>\n\n {caption && (\n <CaptionWrapper ref={captionRef} captionAlign={captionAlign} widthValue={widthValue}>\n {caption}\n </CaptionWrapper>\n )}\n\n {isWebOTPEnabled && (\n <HiddenInput ref={autocompleteRef} autoComplete={autoComplete} tabIndex={-1} {...rest} />\n )}\n </Root>\n </>\n );\n },\n );\n\nexport const codeFieldConfig = {\n name: 'CodeField',\n tag: 'div',\n layout: codeFieldRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n shape: {\n css: shapeCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n },\n defaults: {\n size: 'm',\n view: 'default',\n shape: 'default',\n },\n};\n"],"names":["codeFieldRoot","Root","forwardRef","_ref","ref","_autocompleteRef$curr","className","outerValue","value","placeholder","autoFocus","_ref$codeLength","codeLength","caption","_ref$captionAlign","captionAlign","width","_ref$shape","shape","view","size","disabled","isError","_ref$allowedSymbols","allowedSymbols","ONLY_DIGITS_PATTERN","_ref$itemErrorBehavio","itemErrorBehavior","_ref$codeErrorBehavio","codeErrorBehavior","_ref$autoComplete","autoComplete","setIsError","onChange","onFullCodeEnter","rest","_objectWithoutProperties","_excluded","_useState","useState","getCodeValue","_useState2","_slicedToArray","innerValue","setInnerValue","code","_useState3","join","_useState4","originalValue","setOriginalValue","inputRefs","useRef","inputContainerRef","captionRef","autocompleteRef","fieldPattern","getFieldPattern","placeholderValue","getPlaceholderValue","parts","widthValue","getSizeValueFromProp","undefined","isWebOTPEnabled","isWebOTPSupported","getLastActiveIndex","length","lastEmptyIndex","findIndex","digit","codeSetter","newCode","originalCode","useWebOTP","codeString","enableSMSAutoRead","Boolean","handleClick","lastActiveIndex","current","focus","handleOnKeyDown","event","index","key","FORBIDDEN_KEYS","includes","preventDefault","BACKSPACE_KEY","_inputRefs$current$in","_toConsumableArray","_inputRefs$current","classList","remove","classes","itemError","handleChange","_inputRefs$current$in2","rawSymbol","currentTarget","symbol","charAt","_captionRef$current","captionError","_inputContainerRef$cu","codeError","codeErrorAnimation","_inputRefs$current2","test","_inputRefs$current3","handleItemError","currentSymbol","handlePaste","_inputRefs$current$ac","rawData","clipboardData","getData","pastedData","split","map","symb","_symb$match","match","filter","slice","forEach","element","activeIndex","Math","min","handleFullCodeEnter","useCallback","fullCode","useCodeHook","useDidMountEffect","handleCodeError","currentCode","useEffect","autocompleteCode","React","createElement","Fragment","_extends","onClick","cls","_defineProperty","captionAlignLeft","_objectSpread","CodeWrapper","Array","_","partIndex","CodeGroup","role","i","inputCorrectIndex","ItemInput","segmented","hoverEnabled","e","onKeyDown","onPaste","tabIndex","_Separator","Separator","CaptionWrapper","HiddenInput","codeFieldConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","shapeCSS","disabledCSS","attrs","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;IA2BaA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,IAA+C,EAAA;AAAA,EAAA,oBACzEC,UAAU,CACN,UAAAC,IAAA,EAwBIC,GAAG,EACF;AAAA,IAAA,IAAAC,qBAAA,CAAA;AAAA,IAAA,IAvBGC,SAAS,GAAAH,IAAA,CAATG,SAAS;MACFC,UAAU,GAAAJ,IAAA,CAAjBK,KAAK;MACLC,WAAW,GAAAN,IAAA,CAAXM,WAAW;MACXC,SAAS,GAAAP,IAAA,CAATO,SAAS;MAAAC,eAAA,GAAAR,IAAA,CACTS,UAAU;AAAVA,MAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,eAAA;MACdE,OAAO,GAAAV,IAAA,CAAPU,OAAO;MAAAC,iBAAA,GAAAX,IAAA,CACPY,YAAY;AAAZA,MAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,iBAAA;MACrBE,KAAK,GAAAb,IAAA,CAALa,KAAK;MAAAC,UAAA,GAAAd,IAAA,CACLe,KAAK;AAALA,MAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,UAAA;MACjBE,IAAI,GAAAhB,IAAA,CAAJgB,IAAI;MACJC,IAAI,GAAAjB,IAAA,CAAJiB,IAAI;MACJC,QAAQ,GAAAlB,IAAA,CAARkB,QAAQ;MACRC,OAAO,GAAAnB,IAAA,CAAPmB,OAAO;MAAAC,mBAAA,GAAApB,IAAA,CACPqB,cAAc;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EI,MAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNhK,IAAAA,IAAI,EAAE,GAAG;AACTD,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,KAAK,EAAE,SAAA;AACX,GAAA;AACJ;;;;"}
@@ -1,4 +1,4 @@
1
- import './CodeField.styles_ebdpd0.css';
1
+ import './CodeField.styles_14p25hi.css';
2
2
  import { styled } from '@linaria/react';
3
3
 
4
4
  var base = "b1xx9skx";
@@ -43,6 +43,11 @@ var CaptionWrapper = /*#__PURE__*/styled('div')({
43
43
  "c1jpzjak-1": [/*#__PURE__*/_exp5()]
44
44
  }
45
45
  });
46
+ var HiddenInput = /*#__PURE__*/styled('input')({
47
+ name: "HiddenInput",
48
+ "class": "h1x845wl",
49
+ propsAsIs: false
50
+ });
46
51
 
47
- export { CaptionWrapper, CodeGroup, CodeWrapper, ItemInput, Separator, base };
52
+ export { CaptionWrapper, CodeGroup, CodeWrapper, HiddenInput, ItemInput, Separator, base };
48
53
  //# sourceMappingURL=CodeField.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeField.styles.js","sources":["../../../src/components/CodeField/CodeField.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { classes, tokens } from './CodeField.tokens';\n\nexport const base = css`\n display: flex;\n flex-direction: column;\n justify-content: center;\n width: min-content;\n align-items: center;\n\n &.${classes.captionAlignLeft} {\n align-items: flex-start;\n }\n`;\n\nexport const CodeWrapper = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const CodeGroup = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const Separator = styled.div`\n width: var(${tokens.separatorWidth});\n`;\n\nexport const ItemInput = styled.input`\n box-sizing: border-box;\n appearance: none;\n border: 0;\n padding: 0;\n outline: none;\n pointer-events: none;\n text-align: center;\n`;\n\nexport const CaptionWrapper = styled.div<{ captionAlign: 'left' | 'center'; widthValue?: string }>`\n text-align: ${({ captionAlign }) => captionAlign};\n align-self: ${({ captionAlign }) => captionAlign};\n width: ${({ widthValue }) => widthValue || 'auto'};\n white-space: pre-line;\n`;\n"],"names":["base","CodeWrapper","styled","name","class","propsAsIs","CodeGroup","Separator","ItemInput","_exp4","_ref","captionAlign","_exp5","_ref2","widthValue","CaptionWrapper","vars"],"mappings":";;AAKO,IAAMA,IAAI,GAUhB,WAAA;AAEM,IAAMC,WAAW,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGhC,EAAA;AAEM,IAAMC,SAAS,gBAAGJ,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,WAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAG9B,EAAA;AAEM,IAAME,SAAS,gBAAGL,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,WAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE9B,EAAA;AAEM,IAAMG,SAAS,gBAAGN,MAAM,CAAA,OAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,WAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAQ9B,EAAA;AAAC,IAAAI,KAAA,GAtCgBA,SAsChBA,KAAAA,GAAA;AAAA,EAAA,OAIgB,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,YAAAA,GAAAA,IAAAA,CAAAA,YAAAA,CAAAA;AAAAA,IAAAA,OAAmBA,YAAY,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,KAAA,GA1ClCA,SA0CkCA,KAAAA,GAAA;AAAA,EAAA,OACvC,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,UAAAA,GAAAA,KAAAA,CAAAA,UAAAA,CAAAA;IAAAA,OAAiBA,UAAU,IAAI,MAAM,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAH9C,IAAMC,cAAc,gBAAGb,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,gBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAW,EAAAA,IAAA,EAAA;AAAA,IAAA,YAAA,EAAA,cAElBP,KAAkC,EAAA,CAAA;AAAA,IAAA,YAAA,EAAA,cACvCG,KAAwC,EAAA,CAAA;AAAA,GAAA;AAAA,CAEpD;;;;"}
1
+ {"version":3,"file":"CodeField.styles.js","sources":["../../../src/components/CodeField/CodeField.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { classes, tokens } from './CodeField.tokens';\n\nexport const base = css`\n display: flex;\n flex-direction: column;\n justify-content: center;\n width: min-content;\n align-items: center;\n\n &.${classes.captionAlignLeft} {\n align-items: flex-start;\n }\n`;\n\nexport const CodeWrapper = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const CodeGroup = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const Separator = styled.div`\n width: var(${tokens.separatorWidth});\n`;\n\nexport const ItemInput = styled.input`\n box-sizing: border-box;\n appearance: none;\n border: 0;\n padding: 0;\n outline: none;\n pointer-events: none;\n text-align: center;\n`;\n\nexport const CaptionWrapper = styled.div<{ captionAlign: 'left' | 'center'; widthValue?: string }>`\n text-align: ${({ captionAlign }) => captionAlign};\n align-self: ${({ captionAlign }) => captionAlign};\n width: ${({ widthValue }) => widthValue || 'auto'};\n white-space: pre-line;\n`;\n\nexport const HiddenInput = styled.input`\n display: none;\n`;\n"],"names":["base","CodeWrapper","styled","name","class","props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,MAAM,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAH9C,IAAMC,cAAc,gBAAGb,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,gBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAW,EAAAA,IAAA,EAAA;AAAA,IAAA,YAAA,EAAA,cAElBP,KAAkC,EAAA,CAAA;AAAA,IAAA,YAAA,EAAA,cACvCG,KAAwC,EAAA,CAAA;AAAA,GAAA;AAAA,CAEpD,EAAA;AAEM,IAAMK,WAAW,gBAAGf,MAAM,CAAA,OAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAEhC;;;;"}
@@ -4,3 +4,4 @@
4
4
  .s13uxcg8{width:var(--plasma-codefield-separator-width);}
5
5
  .ig5h1kg{box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;outline:none;pointer-events:none;text-align:center;}
6
6
  .c1jpzjak{text-align:var(--c1jpzjak-0);-webkit-align-self:var(--c1jpzjak-0);-ms-flex-item-align:var(--c1jpzjak-0);align-self:var(--c1jpzjak-0);width:var(--c1jpzjak-1);white-space:pre-line;}
7
+ .h1x845wl{display:none;}