@salutejs/plasma-new-hope 0.174.0-canary.1511.11518967304.0 → 0.174.1-canary.1512.11549467998.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (391) hide show
  1. package/cjs/components/Drawer/Drawer.js +2 -1
  2. package/cjs/components/Drawer/Drawer.js.map +1 -1
  3. package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -1
  4. package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js.map +1 -1
  5. package/cjs/components/Popover/Popover.js +2 -1
  6. package/cjs/components/Popover/Popover.js.map +1 -1
  7. package/cjs/components/ViewContainer/ViewContainer.js +38 -0
  8. package/cjs/components/ViewContainer/ViewContainer.js.map +1 -0
  9. package/cjs/components/ViewContainer/ViewContainer_yiqfcb.css +1 -0
  10. package/cjs/components/{NumberInput/variations → ViewContainer}/_view/base.js +2 -2
  11. package/cjs/components/ViewContainer/_view/base.js.map +1 -0
  12. package/cjs/index.css +1 -24
  13. package/cjs/index.js +3 -6
  14. package/cjs/index.js.map +1 -1
  15. package/emotion/cjs/components/Drawer/Drawer.js +4 -3
  16. package/emotion/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -1
  17. package/emotion/cjs/components/Popover/Popover.js +2 -1
  18. package/emotion/cjs/components/ViewContainer/ViewContainer.js +49 -0
  19. package/emotion/cjs/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  20. package/emotion/cjs/components/ViewContainer/_view/base.js +8 -0
  21. package/emotion/cjs/components/ViewContainer/_view/tokens.json +1 -0
  22. package/emotion/cjs/components/ViewContainer/index.js +18 -0
  23. package/emotion/cjs/examples/_helpers.js +3 -14
  24. package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +16 -0
  25. package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +11 -0
  26. package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  27. package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +16 -0
  28. package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.js +11 -0
  29. package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  30. package/emotion/cjs/index.js +4 -4
  31. package/emotion/es/components/Drawer/Drawer.js +2 -1
  32. package/emotion/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -1
  33. package/emotion/es/components/Popover/Popover.js +2 -1
  34. package/emotion/es/components/ViewContainer/ViewContainer.js +40 -0
  35. package/emotion/es/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  36. package/emotion/es/components/ViewContainer/_view/base.js +2 -0
  37. package/emotion/es/components/ViewContainer/_view/tokens.json +1 -0
  38. package/emotion/es/components/ViewContainer/index.js +1 -0
  39. package/emotion/es/examples/_helpers.js +3 -14
  40. package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +10 -0
  41. package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +5 -0
  42. package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  43. package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +10 -0
  44. package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.js +5 -0
  45. package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  46. package/emotion/es/index.js +1 -1
  47. package/es/components/Drawer/Drawer.js +2 -1
  48. package/es/components/Drawer/Drawer.js.map +1 -1
  49. package/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -1
  50. package/es/components/Dropdown/ui/DropdownOld/DropdownOld.js.map +1 -1
  51. package/es/components/Popover/Popover.js +2 -1
  52. package/es/components/Popover/Popover.js.map +1 -1
  53. package/es/components/ViewContainer/ViewContainer.js +33 -0
  54. package/es/components/ViewContainer/ViewContainer.js.map +1 -0
  55. package/es/components/ViewContainer/ViewContainer_yiqfcb.css +1 -0
  56. package/es/components/{NumberInput/variations/_segmentation → ViewContainer/_view}/base.js +2 -2
  57. package/es/components/ViewContainer/_view/base.js.map +1 -0
  58. package/es/index.css +1 -24
  59. package/es/index.js +1 -2
  60. package/es/index.js.map +1 -1
  61. package/package.json +3 -2
  62. package/styled-components/cjs/components/Drawer/Drawer.js +4 -3
  63. package/styled-components/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -1
  64. package/styled-components/cjs/components/Popover/Popover.js +2 -1
  65. package/styled-components/cjs/components/ViewContainer/ViewContainer.js +40 -0
  66. package/styled-components/cjs/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  67. package/styled-components/cjs/components/{NumberInput/NumberInput.styles.js → ViewContainer/_view/base.js} +1 -1
  68. package/styled-components/cjs/components/ViewContainer/_view/tokens.json +1 -0
  69. package/styled-components/cjs/components/ViewContainer/index.js +18 -0
  70. package/styled-components/cjs/examples/_helpers.js +3 -14
  71. package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +16 -0
  72. package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +11 -0
  73. package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  74. package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +16 -0
  75. package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.js +11 -0
  76. package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  77. package/styled-components/cjs/index.js +4 -4
  78. package/styled-components/es/components/Drawer/Drawer.js +2 -1
  79. package/styled-components/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -1
  80. package/styled-components/es/components/Popover/Popover.js +2 -1
  81. package/styled-components/es/components/ViewContainer/ViewContainer.js +31 -0
  82. package/styled-components/es/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  83. package/styled-components/es/components/ViewContainer/_view/base.js +2 -0
  84. package/styled-components/es/components/ViewContainer/_view/tokens.json +1 -0
  85. package/styled-components/es/components/ViewContainer/index.js +1 -0
  86. package/styled-components/es/examples/_helpers.js +3 -14
  87. package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +10 -0
  88. package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +5 -0
  89. package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  90. package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +10 -0
  91. package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.js +5 -0
  92. package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  93. package/styled-components/es/index.js +1 -1
  94. package/types/components/Drawer/Drawer.d.ts.map +1 -1
  95. package/types/components/Dropdown/ui/DropdownOld/DropdownOld.d.ts.map +1 -1
  96. package/types/components/Popover/Popover.d.ts.map +1 -1
  97. package/types/components/ViewContainer/ViewContainer.d.ts +26 -0
  98. package/types/components/ViewContainer/ViewContainer.d.ts.map +1 -0
  99. package/types/components/ViewContainer/_view/base.d.ts.map +1 -0
  100. package/types/components/ViewContainer/index.d.ts +2 -0
  101. package/types/components/ViewContainer/index.d.ts.map +1 -0
  102. package/types/examples/_helpers.d.ts.map +1 -1
  103. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.d.ts +9 -0
  104. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.d.ts.map +1 -0
  105. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.d.ts +8 -0
  106. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.d.ts.map +1 -0
  107. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.config.d.ts +9 -0
  108. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.config.d.ts.map +1 -0
  109. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.d.ts +8 -0
  110. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.d.ts.map +1 -0
  111. package/types/index.d.ts +1 -1
  112. package/types/index.d.ts.map +1 -1
  113. package/cjs/components/NumberInput/NumberInput.css +0 -54
  114. package/cjs/components/NumberInput/NumberInput.js +0 -188
  115. package/cjs/components/NumberInput/NumberInput.js.map +0 -1
  116. package/cjs/components/NumberInput/NumberInput.styles.js +0 -9
  117. package/cjs/components/NumberInput/NumberInput.styles.js.map +0 -1
  118. package/cjs/components/NumberInput/NumberInput.styles_jeawjl.css +0 -1
  119. package/cjs/components/NumberInput/NumberInput.tokens.js +0 -90
  120. package/cjs/components/NumberInput/NumberInput.tokens.js.map +0 -1
  121. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +0 -19
  122. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.js.map +0 -1
  123. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -22
  124. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js.map +0 -1
  125. package/cjs/components/NumberInput/ui/Input/Input.css +0 -15
  126. package/cjs/components/NumberInput/ui/Input/Input.js +0 -190
  127. package/cjs/components/NumberInput/ui/Input/Input.js.map +0 -1
  128. package/cjs/components/NumberInput/ui/Input/Input.styles.js +0 -96
  129. package/cjs/components/NumberInput/ui/Input/Input.styles.js.map +0 -1
  130. package/cjs/components/NumberInput/ui/Input/Input.styles_jszc0c.css +0 -8
  131. package/cjs/components/NumberInput/utils/index.js +0 -8
  132. package/cjs/components/NumberInput/utils/index.js.map +0 -1
  133. package/cjs/components/NumberInput/variations/_background-type/base.js +0 -9
  134. package/cjs/components/NumberInput/variations/_background-type/base.js.map +0 -1
  135. package/cjs/components/NumberInput/variations/_background-type/base_1jmdljr.css +0 -1
  136. package/cjs/components/NumberInput/variations/_clear/base.js +0 -9
  137. package/cjs/components/NumberInput/variations/_clear/base.js.map +0 -1
  138. package/cjs/components/NumberInput/variations/_clear/base_3l8dqb.css +0 -1
  139. package/cjs/components/NumberInput/variations/_disabled/base.js +0 -9
  140. package/cjs/components/NumberInput/variations/_disabled/base.js.map +0 -1
  141. package/cjs/components/NumberInput/variations/_disabled/base_1sl0mh8.css +0 -1
  142. package/cjs/components/NumberInput/variations/_segmentation/base.js +0 -9
  143. package/cjs/components/NumberInput/variations/_segmentation/base.js.map +0 -1
  144. package/cjs/components/NumberInput/variations/_segmentation/base_nl8ve.css +0 -1
  145. package/cjs/components/NumberInput/variations/_shape/base.js +0 -9
  146. package/cjs/components/NumberInput/variations/_shape/base.js.map +0 -1
  147. package/cjs/components/NumberInput/variations/_shape/base_k05biw.css +0 -1
  148. package/cjs/components/NumberInput/variations/_size/base.js +0 -9
  149. package/cjs/components/NumberInput/variations/_size/base.js.map +0 -1
  150. package/cjs/components/NumberInput/variations/_size/base_1pju5qf.css +0 -1
  151. package/cjs/components/NumberInput/variations/_view/base.js.map +0 -1
  152. package/cjs/components/NumberInput/variations/_view/base_cghr9q.css +0 -1
  153. package/emotion/cjs/components/NumberInput/NumberInput.js +0 -198
  154. package/emotion/cjs/components/NumberInput/NumberInput.styles.js +0 -17
  155. package/emotion/cjs/components/NumberInput/NumberInput.tokens.js +0 -87
  156. package/emotion/cjs/components/NumberInput/NumberInput.types.js +0 -5
  157. package/emotion/cjs/components/NumberInput/index.js +0 -31
  158. package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +0 -18
  159. package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -16
  160. package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -5
  161. package/emotion/cjs/components/NumberInput/ui/Input/Input.js +0 -198
  162. package/emotion/cjs/components/NumberInput/ui/Input/Input.styles.js +0 -82
  163. package/emotion/cjs/components/NumberInput/ui/Input/Input.types.js +0 -5
  164. package/emotion/cjs/components/NumberInput/ui/index.js +0 -19
  165. package/emotion/cjs/components/NumberInput/utils/index.js +0 -7
  166. package/emotion/cjs/components/NumberInput/variations/_background-type/base.js +0 -10
  167. package/emotion/cjs/components/NumberInput/variations/_background-type/tokens.json +0 -6
  168. package/emotion/cjs/components/NumberInput/variations/_clear/base.js +0 -12
  169. package/emotion/cjs/components/NumberInput/variations/_clear/tokens.json +0 -5
  170. package/emotion/cjs/components/NumberInput/variations/_disabled/base.js +0 -9
  171. package/emotion/cjs/components/NumberInput/variations/_disabled/tokens.json +0 -4
  172. package/emotion/cjs/components/NumberInput/variations/_segmentation/base.js +0 -12
  173. package/emotion/cjs/components/NumberInput/variations/_segmentation/tokens.json +0 -1
  174. package/emotion/cjs/components/NumberInput/variations/_shape/base.js +0 -11
  175. package/emotion/cjs/components/NumberInput/variations/_shape/tokens.json +0 -1
  176. package/emotion/cjs/components/NumberInput/variations/_size/base.js +0 -13
  177. package/emotion/cjs/components/NumberInput/variations/_size/tokens.json +0 -22
  178. package/emotion/cjs/components/NumberInput/variations/_view/base.js +0 -13
  179. package/emotion/cjs/components/NumberInput/variations/_view/tokens.json +0 -14
  180. package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -48
  181. package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -11
  182. package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -109
  183. package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -48
  184. package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.js +0 -11
  185. package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -109
  186. package/emotion/cjs/examples/themes/declaration.d.ts +0 -4
  187. package/emotion/cjs/examples/themes/index.js +0 -15
  188. package/emotion/cjs/examples/themes/plasma_b2c.module.css +0 -984
  189. package/emotion/cjs/examples/themes/plasma_web.module.css +0 -984
  190. package/emotion/es/components/NumberInput/NumberInput.js +0 -190
  191. package/emotion/es/components/NumberInput/NumberInput.styles.js +0 -11
  192. package/emotion/es/components/NumberInput/NumberInput.tokens.js +0 -81
  193. package/emotion/es/components/NumberInput/NumberInput.types.js +0 -1
  194. package/emotion/es/components/NumberInput/index.js +0 -2
  195. package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.js +0 -11
  196. package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -9
  197. package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -1
  198. package/emotion/es/components/NumberInput/ui/Input/Input.js +0 -189
  199. package/emotion/es/components/NumberInput/ui/Input/Input.styles.js +0 -75
  200. package/emotion/es/components/NumberInput/ui/Input/Input.types.js +0 -1
  201. package/emotion/es/components/NumberInput/ui/index.js +0 -2
  202. package/emotion/es/components/NumberInput/utils/index.js +0 -1
  203. package/emotion/es/components/NumberInput/variations/_background-type/base.js +0 -4
  204. package/emotion/es/components/NumberInput/variations/_background-type/tokens.json +0 -6
  205. package/emotion/es/components/NumberInput/variations/_clear/base.js +0 -6
  206. package/emotion/es/components/NumberInput/variations/_clear/tokens.json +0 -5
  207. package/emotion/es/components/NumberInput/variations/_disabled/base.js +0 -3
  208. package/emotion/es/components/NumberInput/variations/_disabled/tokens.json +0 -4
  209. package/emotion/es/components/NumberInput/variations/_segmentation/base.js +0 -6
  210. package/emotion/es/components/NumberInput/variations/_segmentation/tokens.json +0 -1
  211. package/emotion/es/components/NumberInput/variations/_shape/base.js +0 -5
  212. package/emotion/es/components/NumberInput/variations/_shape/tokens.json +0 -1
  213. package/emotion/es/components/NumberInput/variations/_size/base.js +0 -7
  214. package/emotion/es/components/NumberInput/variations/_size/tokens.json +0 -22
  215. package/emotion/es/components/NumberInput/variations/_view/base.js +0 -7
  216. package/emotion/es/components/NumberInput/variations/_view/tokens.json +0 -14
  217. package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -42
  218. package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -5
  219. package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -109
  220. package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -42
  221. package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.js +0 -5
  222. package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -109
  223. package/emotion/es/examples/themes/declaration.d.ts +0 -4
  224. package/emotion/es/examples/themes/index.js +0 -7
  225. package/emotion/es/examples/themes/plasma_b2c.module.css +0 -984
  226. package/emotion/es/examples/themes/plasma_web.module.css +0 -984
  227. package/es/components/NumberInput/NumberInput.css +0 -54
  228. package/es/components/NumberInput/NumberInput.js +0 -183
  229. package/es/components/NumberInput/NumberInput.js.map +0 -1
  230. package/es/components/NumberInput/NumberInput.styles.js +0 -5
  231. package/es/components/NumberInput/NumberInput.styles.js.map +0 -1
  232. package/es/components/NumberInput/NumberInput.styles_jeawjl.css +0 -1
  233. package/es/components/NumberInput/NumberInput.tokens.js +0 -84
  234. package/es/components/NumberInput/NumberInput.tokens.js.map +0 -1
  235. package/es/components/NumberInput/ui/ActionButton/ActionButton.js +0 -15
  236. package/es/components/NumberInput/ui/ActionButton/ActionButton.js.map +0 -1
  237. package/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -18
  238. package/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js.map +0 -1
  239. package/es/components/NumberInput/ui/Input/Input.css +0 -15
  240. package/es/components/NumberInput/ui/Input/Input.js +0 -186
  241. package/es/components/NumberInput/ui/Input/Input.js.map +0 -1
  242. package/es/components/NumberInput/ui/Input/Input.styles.js +0 -85
  243. package/es/components/NumberInput/ui/Input/Input.styles.js.map +0 -1
  244. package/es/components/NumberInput/ui/Input/Input.styles_jszc0c.css +0 -8
  245. package/es/components/NumberInput/utils/index.js +0 -4
  246. package/es/components/NumberInput/utils/index.js.map +0 -1
  247. package/es/components/NumberInput/variations/_background-type/base.js +0 -5
  248. package/es/components/NumberInput/variations/_background-type/base.js.map +0 -1
  249. package/es/components/NumberInput/variations/_background-type/base_1jmdljr.css +0 -1
  250. package/es/components/NumberInput/variations/_clear/base.js +0 -5
  251. package/es/components/NumberInput/variations/_clear/base.js.map +0 -1
  252. package/es/components/NumberInput/variations/_clear/base_3l8dqb.css +0 -1
  253. package/es/components/NumberInput/variations/_disabled/base.js +0 -5
  254. package/es/components/NumberInput/variations/_disabled/base.js.map +0 -1
  255. package/es/components/NumberInput/variations/_disabled/base_1sl0mh8.css +0 -1
  256. package/es/components/NumberInput/variations/_segmentation/base.js.map +0 -1
  257. package/es/components/NumberInput/variations/_segmentation/base_nl8ve.css +0 -1
  258. package/es/components/NumberInput/variations/_shape/base.js +0 -5
  259. package/es/components/NumberInput/variations/_shape/base.js.map +0 -1
  260. package/es/components/NumberInput/variations/_shape/base_k05biw.css +0 -1
  261. package/es/components/NumberInput/variations/_size/base.js +0 -5
  262. package/es/components/NumberInput/variations/_size/base.js.map +0 -1
  263. package/es/components/NumberInput/variations/_size/base_1pju5qf.css +0 -1
  264. package/es/components/NumberInput/variations/_view/base.js +0 -5
  265. package/es/components/NumberInput/variations/_view/base.js.map +0 -1
  266. package/es/components/NumberInput/variations/_view/base_cghr9q.css +0 -1
  267. package/styled-components/cjs/components/NumberInput/NumberInput.js +0 -198
  268. package/styled-components/cjs/components/NumberInput/NumberInput.tokens.js +0 -87
  269. package/styled-components/cjs/components/NumberInput/NumberInput.types.js +0 -5
  270. package/styled-components/cjs/components/NumberInput/index.js +0 -31
  271. package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +0 -18
  272. package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -15
  273. package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -5
  274. package/styled-components/cjs/components/NumberInput/ui/Input/Input.js +0 -198
  275. package/styled-components/cjs/components/NumberInput/ui/Input/Input.styles.js +0 -49
  276. package/styled-components/cjs/components/NumberInput/ui/Input/Input.types.js +0 -5
  277. package/styled-components/cjs/components/NumberInput/ui/index.js +0 -19
  278. package/styled-components/cjs/components/NumberInput/utils/index.js +0 -7
  279. package/styled-components/cjs/components/NumberInput/variations/_background-type/base.js +0 -10
  280. package/styled-components/cjs/components/NumberInput/variations/_background-type/tokens.json +0 -6
  281. package/styled-components/cjs/components/NumberInput/variations/_clear/base.js +0 -12
  282. package/styled-components/cjs/components/NumberInput/variations/_clear/tokens.json +0 -5
  283. package/styled-components/cjs/components/NumberInput/variations/_disabled/base.js +0 -9
  284. package/styled-components/cjs/components/NumberInput/variations/_disabled/tokens.json +0 -4
  285. package/styled-components/cjs/components/NumberInput/variations/_segmentation/base.js +0 -12
  286. package/styled-components/cjs/components/NumberInput/variations/_segmentation/tokens.json +0 -1
  287. package/styled-components/cjs/components/NumberInput/variations/_shape/base.js +0 -11
  288. package/styled-components/cjs/components/NumberInput/variations/_shape/tokens.json +0 -1
  289. package/styled-components/cjs/components/NumberInput/variations/_size/base.js +0 -13
  290. package/styled-components/cjs/components/NumberInput/variations/_size/tokens.json +0 -22
  291. package/styled-components/cjs/components/NumberInput/variations/_view/base.js +0 -13
  292. package/styled-components/cjs/components/NumberInput/variations/_view/tokens.json +0 -14
  293. package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -48
  294. package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -11
  295. package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -109
  296. package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -48
  297. package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.js +0 -11
  298. package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -109
  299. package/styled-components/cjs/examples/themes/declaration.d.ts +0 -4
  300. package/styled-components/cjs/examples/themes/index.js +0 -15
  301. package/styled-components/cjs/examples/themes/plasma_b2c.module.css +0 -984
  302. package/styled-components/cjs/examples/themes/plasma_web.module.css +0 -984
  303. package/styled-components/es/components/NumberInput/NumberInput.js +0 -190
  304. package/styled-components/es/components/NumberInput/NumberInput.styles.js +0 -2
  305. package/styled-components/es/components/NumberInput/NumberInput.tokens.js +0 -81
  306. package/styled-components/es/components/NumberInput/NumberInput.types.js +0 -1
  307. package/styled-components/es/components/NumberInput/index.js +0 -2
  308. package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.js +0 -11
  309. package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -8
  310. package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -1
  311. package/styled-components/es/components/NumberInput/ui/Input/Input.js +0 -189
  312. package/styled-components/es/components/NumberInput/ui/Input/Input.styles.js +0 -42
  313. package/styled-components/es/components/NumberInput/ui/Input/Input.types.js +0 -1
  314. package/styled-components/es/components/NumberInput/ui/index.js +0 -2
  315. package/styled-components/es/components/NumberInput/utils/index.js +0 -1
  316. package/styled-components/es/components/NumberInput/variations/_background-type/base.js +0 -4
  317. package/styled-components/es/components/NumberInput/variations/_background-type/tokens.json +0 -6
  318. package/styled-components/es/components/NumberInput/variations/_clear/base.js +0 -6
  319. package/styled-components/es/components/NumberInput/variations/_clear/tokens.json +0 -5
  320. package/styled-components/es/components/NumberInput/variations/_disabled/base.js +0 -3
  321. package/styled-components/es/components/NumberInput/variations/_disabled/tokens.json +0 -4
  322. package/styled-components/es/components/NumberInput/variations/_segmentation/base.js +0 -6
  323. package/styled-components/es/components/NumberInput/variations/_segmentation/tokens.json +0 -1
  324. package/styled-components/es/components/NumberInput/variations/_shape/base.js +0 -5
  325. package/styled-components/es/components/NumberInput/variations/_shape/tokens.json +0 -1
  326. package/styled-components/es/components/NumberInput/variations/_size/base.js +0 -7
  327. package/styled-components/es/components/NumberInput/variations/_size/tokens.json +0 -22
  328. package/styled-components/es/components/NumberInput/variations/_view/base.js +0 -7
  329. package/styled-components/es/components/NumberInput/variations/_view/tokens.json +0 -14
  330. package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -42
  331. package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -5
  332. package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -109
  333. package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -42
  334. package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.js +0 -5
  335. package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -109
  336. package/styled-components/es/examples/themes/declaration.d.ts +0 -4
  337. package/styled-components/es/examples/themes/index.js +0 -7
  338. package/styled-components/es/examples/themes/plasma_b2c.module.css +0 -984
  339. package/styled-components/es/examples/themes/plasma_web.module.css +0 -984
  340. package/types/components/NumberInput/NumberInput.d.ts +0 -42
  341. package/types/components/NumberInput/NumberInput.d.ts.map +0 -1
  342. package/types/components/NumberInput/NumberInput.styles.d.ts +0 -2
  343. package/types/components/NumberInput/NumberInput.styles.d.ts.map +0 -1
  344. package/types/components/NumberInput/NumberInput.tokens.d.ts +0 -76
  345. package/types/components/NumberInput/NumberInput.tokens.d.ts.map +0 -1
  346. package/types/components/NumberInput/NumberInput.types.d.ts +0 -112
  347. package/types/components/NumberInput/NumberInput.types.d.ts.map +0 -1
  348. package/types/components/NumberInput/index.d.ts +0 -3
  349. package/types/components/NumberInput/index.d.ts.map +0 -1
  350. package/types/components/NumberInput/ui/ActionButton/ActionButton.d.ts +0 -4
  351. package/types/components/NumberInput/ui/ActionButton/ActionButton.d.ts.map +0 -1
  352. package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts +0 -45
  353. package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts.map +0 -1
  354. package/types/components/NumberInput/ui/ActionButton/ActionButton.types.d.ts +0 -7
  355. package/types/components/NumberInput/ui/ActionButton/ActionButton.types.d.ts.map +0 -1
  356. package/types/components/NumberInput/ui/Input/Input.d.ts +0 -16
  357. package/types/components/NumberInput/ui/Input/Input.d.ts.map +0 -1
  358. package/types/components/NumberInput/ui/Input/Input.styles.d.ts +0 -30
  359. package/types/components/NumberInput/ui/Input/Input.styles.d.ts.map +0 -1
  360. package/types/components/NumberInput/ui/Input/Input.types.d.ts +0 -16
  361. package/types/components/NumberInput/ui/Input/Input.types.d.ts.map +0 -1
  362. package/types/components/NumberInput/ui/index.d.ts +0 -3
  363. package/types/components/NumberInput/ui/index.d.ts.map +0 -1
  364. package/types/components/NumberInput/utils/index.d.ts +0 -2
  365. package/types/components/NumberInput/utils/index.d.ts.map +0 -1
  366. package/types/components/NumberInput/variations/_background-type/base.d.ts.map +0 -1
  367. package/types/components/NumberInput/variations/_clear/base.d.ts +0 -2
  368. package/types/components/NumberInput/variations/_clear/base.d.ts.map +0 -1
  369. package/types/components/NumberInput/variations/_disabled/base.d.ts +0 -2
  370. package/types/components/NumberInput/variations/_disabled/base.d.ts.map +0 -1
  371. package/types/components/NumberInput/variations/_segmentation/base.d.ts +0 -2
  372. package/types/components/NumberInput/variations/_segmentation/base.d.ts.map +0 -1
  373. package/types/components/NumberInput/variations/_shape/base.d.ts +0 -2
  374. package/types/components/NumberInput/variations/_shape/base.d.ts.map +0 -1
  375. package/types/components/NumberInput/variations/_size/base.d.ts +0 -2
  376. package/types/components/NumberInput/variations/_size/base.d.ts.map +0 -1
  377. package/types/components/NumberInput/variations/_view/base.d.ts +0 -2
  378. package/types/components/NumberInput/variations/_view/base.d.ts.map +0 -1
  379. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts +0 -41
  380. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts.map +0 -1
  381. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts +0 -84
  382. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts.map +0 -1
  383. package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts +0 -41
  384. package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts.map +0 -1
  385. package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts +0 -84
  386. package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts.map +0 -1
  387. package/types/examples/themes/index.d.ts +0 -6
  388. package/types/examples/themes/index.d.ts.map +0 -1
  389. /package/cjs/components/{NumberInput/ui/ActionButton/ActionButton.styles_x642ct.css → ViewContainer/_view/base_x642ct.css} +0 -0
  390. /package/es/components/{NumberInput/ui/ActionButton/ActionButton.styles_x642ct.css → ViewContainer/_view/base_x642ct.css} +0 -0
  391. /package/types/components/{NumberInput/variations/_background-type → ViewContainer/_view}/base.d.ts +0 -0
@@ -1,188 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
6
- var React = require('react');
7
- var index = require('../../utils/index.js');
8
- var NumberInput_tokens = require('./NumberInput.tokens.js');
9
- var NumberInput_styles = require('./NumberInput.styles.js');
10
- var base = require('./variations/_view/base.js');
11
- var base$1 = require('./variations/_size/base.js');
12
- var base$2 = require('./variations/_shape/base.js');
13
- var base$3 = require('./variations/_background-type/base.js');
14
- var base$4 = require('./variations/_segmentation/base.js');
15
- var base$5 = require('./variations/_clear/base.js');
16
- var base$6 = require('./variations/_disabled/base.js');
17
- var ActionButton = require('./ui/ActionButton/ActionButton.js');
18
- var IconMinus = require('../_Icon/Icons/IconMinus.js');
19
- var Input = require('./ui/Input/Input.js');
20
- var IconPlus = require('../_Icon/Icons/IconPlus.js');
21
- var getSizeValueFromProp = require('../../utils/getSizeValueFromProp.js');
22
-
23
- var _excluded = ["className", "style", "width", "value", "min", "max", "step", "isLoading", "loader", "size", "view", "clear", "shape", "segmentation", "inputBackgroundType", "disabled", "textBefore", "textAfter", "customIncrementButton", "incrementIcon", "customDecrementButton", "decrementIcon", "isManualInput", "onChange", "onIncrement", "onDecrement"];
24
- var numberInputRoot = function numberInputRoot(Root) {
25
- return /*#__PURE__*/React.forwardRef(function (_ref, ref) {
26
- var _ref2;
27
- var className = _ref.className,
28
- style = _ref.style,
29
- width = _ref.width,
30
- value = _ref.value,
31
- min = _ref.min,
32
- max = _ref.max,
33
- _ref$step = _ref.step,
34
- step = _ref$step === void 0 ? 1 : _ref$step,
35
- isLoading = _ref.isLoading,
36
- loader = _ref.loader,
37
- size = _ref.size,
38
- view = _ref.view,
39
- clear = _ref.clear,
40
- shape = _ref.shape,
41
- segmentation = _ref.segmentation,
42
- _ref$inputBackgroundT = _ref.inputBackgroundType,
43
- inputBackgroundType = _ref$inputBackgroundT === void 0 ? 'fill' : _ref$inputBackgroundT,
44
- disabled = _ref.disabled,
45
- textBefore = _ref.textBefore,
46
- textAfter = _ref.textAfter,
47
- customIncrementButton = _ref.customIncrementButton,
48
- incrementIcon = _ref.incrementIcon,
49
- customDecrementButton = _ref.customDecrementButton,
50
- decrementIcon = _ref.decrementIcon,
51
- isManualInput = _ref.isManualInput,
52
- onChange = _ref.onChange,
53
- onIncrement = _ref.onIncrement,
54
- onDecrement = _ref.onDecrement,
55
- rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
56
- var _useState = React.useState((_ref2 = value !== null && value !== void 0 ? value : min) !== null && _ref2 !== void 0 ? _ref2 : 0),
57
- _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
58
- innerValue = _useState2[0],
59
- setInnerValue = _useState2[1];
60
- var innerWidth = width ? getSizeValueFromProp.getSizeValueFromProp(width) : '100%';
61
- var actionIconSize = size === 'xs' ? 'xs' : 's';
62
- var solidViewClass = segmentation === 'solid' ? NumberInput_tokens.classes.solidView : undefined;
63
- var segmentedViewClass = segmentation === 'segmented' ? NumberInput_tokens.classes.segmentedView : undefined;
64
- var clearViewClass = clear ? NumberInput_tokens.classes.clearView : undefined;
65
- var disabledClass = disabled ? NumberInput_tokens.classes.disabled : undefined;
66
- var isMinValue = function isMinValue(currentValue) {
67
- return min && currentValue <= min;
68
- };
69
- var isMaxValue = function isMaxValue(currentValue) {
70
- return max && currentValue >= max;
71
- };
72
- var decrementButtonDisabled = isMinValue(Number(innerValue)) || isLoading ? NumberInput_tokens.classes.actionButtonDecrementDisabled : undefined;
73
- var incrementButtonDisabled = isMaxValue(Number(innerValue)) || isLoading ? NumberInput_tokens.classes.actionButtonIncrementDisabled : undefined;
74
- var handleDecrement = function handleDecrement() {
75
- if (isLoading || disabled) {
76
- return;
77
- }
78
- var diffValue = Number(innerValue) - step;
79
- var resValue = !isMinValue(diffValue) ? diffValue : Number(min);
80
- setInnerValue(resValue);
81
- if (onDecrement) {
82
- onDecrement(resValue);
83
- }
84
- if (onChange) {
85
- onChange(null, resValue);
86
- }
87
- };
88
- var handleIncrement = function handleIncrement() {
89
- if (isLoading || disabled) {
90
- return;
91
- }
92
- var diffValue = Number(innerValue) + step;
93
- var resValue = !isMaxValue(diffValue) ? diffValue : Number(max);
94
- setInnerValue(resValue);
95
- if (onIncrement) {
96
- onIncrement(resValue);
97
- }
98
- if (onChange) {
99
- onChange(null, resValue);
100
- }
101
- };
102
- return /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
103
- view: view,
104
- size: size,
105
- disabled: disabled,
106
- clear: clear,
107
- shape: shape,
108
- segmentation: segmentation,
109
- isLoading: isLoading
110
- }, segmentation === 'solid' ? {
111
- inputBackgroundType: 'clear'
112
- } : {
113
- inputBackgroundType: inputBackgroundType
114
- }, {
115
- className: index.cx(className, solidViewClass, clearViewClass, disabledClass),
116
- style: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, style), {}, _rollupPluginBabelHelpers.defineProperty({}, NumberInput_tokens.privateTokens.inputWidth, innerWidth))
117
- }), customDecrementButton || /*#__PURE__*/React.createElement(ActionButton.ActionButton, {
118
- className: index.cx(NumberInput_tokens.classes.actionButtonDecrement, decrementButtonDisabled, solidViewClass, segmentedViewClass),
119
- icon: decrementIcon || /*#__PURE__*/React.createElement(IconMinus.IconMinus, {
120
- color: "inherit",
121
- size: actionIconSize
122
- }),
123
- onClick: handleDecrement
124
- }), /*#__PURE__*/React.createElement(Input.NumberInput, _rollupPluginBabelHelpers.extends({
125
- ref: ref,
126
- segmentation: segmentation,
127
- value: innerValue,
128
- min: min,
129
- max: max,
130
- isManualInput: isManualInput,
131
- textBefore: textBefore,
132
- textAfter: textAfter,
133
- isLoading: isLoading,
134
- loader: loader,
135
- disabled: disabled,
136
- setInnerValue: setInnerValue,
137
- onChange: onChange
138
- }, rest)), customIncrementButton || /*#__PURE__*/React.createElement(ActionButton.ActionButton, {
139
- className: index.cx(NumberInput_tokens.classes.actionButtonIncrement, incrementButtonDisabled, solidViewClass, segmentedViewClass),
140
- icon: incrementIcon || /*#__PURE__*/React.createElement(IconPlus.IconPlus, {
141
- color: "inherit",
142
- size: actionIconSize
143
- }),
144
- onClick: handleIncrement
145
- }));
146
- });
147
- };
148
- var numberInputConfig = {
149
- name: 'NumberInput',
150
- tag: 'div',
151
- layout: numberInputRoot,
152
- base: NumberInput_styles.base,
153
- variations: {
154
- view: {
155
- css: base.base
156
- },
157
- size: {
158
- css: base$1.base
159
- },
160
- shape: {
161
- css: base$2.base
162
- },
163
- inputBackgroundType: {
164
- css: base$3.base
165
- },
166
- segmentation: {
167
- css: base$4.base
168
- },
169
- clear: {
170
- css: base$5.base,
171
- attrs: true
172
- },
173
- disabled: {
174
- css: base$6.base,
175
- attrs: true
176
- }
177
- },
178
- defaults: {
179
- view: 'default',
180
- size: 'l',
181
- shape: 'cornered',
182
- segmentation: 'default'
183
- }
184
- };
185
-
186
- exports.numberInputConfig = numberInputConfig;
187
- exports.numberInputRoot = numberInputRoot;
188
- //# sourceMappingURL=NumberInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NumberInput.js","sources":["../../../src/components/NumberInput/NumberInput.tsx"],"sourcesContent":["import React, { CSSProperties, forwardRef, useState } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { cx, getSizeValueFromProp } from '../../utils';\nimport { IconMinus, IconPlus } from '../_Icon';\n\nimport type { NumberInputProps, NumberInputRootProps } from './NumberInput.types';\nimport { ActionButton, NumberInput } from './ui';\nimport { classes, privateTokens } from './NumberInput.tokens';\nimport { base } from './NumberInput.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 inputBackgroundTypeCSS } from './variations/_background-type/base';\nimport { base as segmentationCSS } from './variations/_segmentation/base';\nimport { base as clearCSS } from './variations/_clear/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\n\nexport const numberInputRoot = (Root: RootProps<HTMLDivElement, NumberInputRootProps>) =>\n forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n className,\n style,\n width,\n value,\n min,\n max,\n step = 1,\n isLoading,\n loader,\n size,\n view,\n clear,\n shape,\n segmentation,\n inputBackgroundType = 'fill',\n disabled,\n textBefore,\n textAfter,\n customIncrementButton,\n incrementIcon,\n customDecrementButton,\n decrementIcon,\n isManualInput,\n onChange,\n onIncrement,\n onDecrement,\n ...rest\n },\n ref,\n ) => {\n const [innerValue, setInnerValue] = useState<number | string>(value ?? min ?? 0);\n\n const innerWidth = width ? getSizeValueFromProp(width) : '100%';\n\n const actionIconSize = size === 'xs' ? 'xs' : 's';\n const solidViewClass = segmentation === 'solid' ? classes.solidView : undefined;\n const segmentedViewClass = segmentation === 'segmented' ? classes.segmentedView : undefined;\n const clearViewClass = clear ? classes.clearView : undefined;\n const disabledClass = disabled ? classes.disabled : undefined;\n\n const isMinValue = (currentValue: number) => min && currentValue <= min;\n const isMaxValue = (currentValue: number) => max && currentValue >= max;\n\n const decrementButtonDisabled =\n isMinValue(Number(innerValue)) || isLoading ? classes.actionButtonDecrementDisabled : undefined;\n const incrementButtonDisabled =\n isMaxValue(Number(innerValue)) || isLoading ? classes.actionButtonIncrementDisabled : undefined;\n\n const handleDecrement = () => {\n if (isLoading || disabled) {\n return;\n }\n\n const diffValue = Number(innerValue) - step;\n const resValue = !isMinValue(diffValue) ? diffValue : Number(min);\n\n setInnerValue(resValue);\n\n if (onDecrement) {\n onDecrement(resValue);\n }\n\n if (onChange) {\n onChange(null, resValue);\n }\n };\n\n const handleIncrement = () => {\n if (isLoading || disabled) {\n return;\n }\n\n const diffValue = Number(innerValue) + step;\n const resValue = !isMaxValue(diffValue) ? diffValue : Number(max);\n\n setInnerValue(resValue);\n\n if (onIncrement) {\n onIncrement(resValue);\n }\n\n if (onChange) {\n onChange(null, resValue);\n }\n };\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n clear={clear}\n shape={shape}\n segmentation={segmentation}\n isLoading={isLoading}\n {...(segmentation === 'solid' ? { inputBackgroundType: 'clear' } : { inputBackgroundType })}\n className={cx(className, solidViewClass, clearViewClass, disabledClass)}\n style={\n {\n ...style,\n [privateTokens.inputWidth]: innerWidth,\n } as CSSProperties\n }\n >\n {customDecrementButton || (\n <ActionButton\n className={cx(\n classes.actionButtonDecrement,\n decrementButtonDisabled,\n solidViewClass,\n segmentedViewClass,\n )}\n icon={decrementIcon || <IconMinus color=\"inherit\" size={actionIconSize} />}\n onClick={handleDecrement}\n />\n )}\n <NumberInput\n ref={ref}\n segmentation={segmentation}\n value={innerValue}\n min={min}\n max={max}\n isManualInput={isManualInput}\n textBefore={textBefore}\n textAfter={textAfter}\n isLoading={isLoading}\n loader={loader}\n disabled={disabled}\n setInnerValue={setInnerValue}\n onChange={onChange}\n {...rest}\n />\n {customIncrementButton || (\n <ActionButton\n className={cx(\n classes.actionButtonIncrement,\n incrementButtonDisabled,\n solidViewClass,\n segmentedViewClass,\n )}\n icon={incrementIcon || <IconPlus color=\"inherit\" size={actionIconSize} />}\n onClick={handleIncrement}\n />\n )}\n </Root>\n );\n },\n );\n\nexport const numberInputConfig = {\n name: 'NumberInput',\n tag: 'div',\n layout: numberInputRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n shape: {\n css: shapeCSS,\n },\n inputBackgroundType: {\n css: inputBackgroundTypeCSS,\n },\n segmentation: {\n css: segmentationCSS,\n },\n clear: {\n css: clearCSS,\n attrs: true,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n },\n defaults: {\n view: 'default',\n size: 'l',\n shape: 'cornered',\n segmentation: 'default',\n },\n};\n"],"names":["numberInputRoot","Root","forwardRef","_ref","ref","_ref2","className","style","width","value","min","max","_ref$step","step","isLoading","loader","size","view","clear","shape","segmentation","_ref$inputBackgroundT","inputBackgroundType","disabled","textBefore","textAfter","customIncrementButton","incrementIcon","customDecrementButton","decrementIcon","isManualInput","onChange","onIncrement","onDecrement","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","innerValue","setInnerValue","innerWidth","getSizeValueFromProp","actionIconSize","solidViewClass","classes","solidView","undefined","segmentedViewClass","segmentedView","clearViewClass","clearView","disabledClass","isMinValue","currentValue","isMaxValue","decrementButtonDisabled","Number","actionButtonDecrementDisabled","incrementButtonDisabled","actionButtonIncrementDisabled","handleDecrement","diffValue","resValue","handleIncrement","React","createElement","_extends","cx","_objectSpread","_defineProperty","privateTokens","inputWidth","ActionButton","actionButtonDecrement","icon","IconMinus","color","onClick","NumberInput","actionButtonIncrement","IconPlus","numberInputConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","shapeCSS","inputBackgroundTypeCSS","segmentationCSS","clearCSS","attrs","disabledCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;IAkBaA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,IAAqD,EAAA;AAAA,EAAA,oBACjFC,gBAAU,CACN,UAAAC,IAAA,EA8BIC,GAAG,EACF;AAAA,IAAA,IAAAC,KAAA,CAAA;AAAA,IAAA,IA7BGC,SAAS,GAAAH,IAAA,CAATG,SAAS;MACTC,KAAK,GAAAJ,IAAA,CAALI,KAAK;MACLC,KAAK,GAAAL,IAAA,CAALK,KAAK;MACLC,KAAK,GAAAN,IAAA,CAALM,KAAK;MACLC,GAAG,GAAAP,IAAA,CAAHO,GAAG;MACHC,GAAG,GAAAR,IAAA,CAAHQ,GAAG;MAAAC,SAAA,GAAAT,IAAA,CACHU,IAAI;AAAJA,MAAAA,IAAI,GAAAD,SAAA,KAAG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AACD1E,IAAAA,YAAY,EAAE;AACVsE,MAAAA,GAAG,EAAEK,WAAAA;KACR;AACD7E,IAAAA,KAAK,EAAE;AACHwE,MAAAA,GAAG,EAAEM,WAAQ;AACbC,MAAAA,KAAK,EAAE,IAAA;KACV;AACD1E,IAAAA,QAAQ,EAAE;AACNmE,MAAAA,GAAG,EAAEQ,WAAW;AAChBD,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDE,EAAAA,QAAQ,EAAE;AACNlF,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAG;AACTG,IAAAA,KAAK,EAAE,UAAU;AACjBC,IAAAA,YAAY,EAAE,SAAA;AAClB,GAAA;AACJ;;;;;"}
@@ -1,9 +0,0 @@
1
- import './NumberInput.styles_jeawjl.css';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, '__esModule', { value: true });
5
-
6
- var base = "bwds6g";
7
-
8
- exports.base = base;
9
- //# sourceMappingURL=NumberInput.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NumberInput.styles.js","sources":["../../../src/components/NumberInput/NumberInput.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css`\n display: flex;\n align-items: center;\n`;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAGhB;;;;"}
@@ -1 +0,0 @@
1
- .bwds6g{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;}
@@ -1,90 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var classes = {
6
- actionButtonDecrement: 'action-button-decrement',
7
- actionButtonDecrementDisabled: 'action-button-decrement-disabled',
8
- actionButtonIncrement: 'action-button-increment',
9
- actionButtonIncrementDisabled: 'action-button-increment-disabled',
10
- textBefore: 'text-before',
11
- textAfter: 'text-after',
12
- solidView: 'solid-view',
13
- segmentedView: 'segmented-view',
14
- clearView: 'clear-view',
15
- errorAnimation: 'error-animation',
16
- disabled: 'number-input-disabled'
17
- };
18
- var privateTokens = {
19
- inputWidth: '--plasma_private-number-input_width',
20
- segmentationBorderRadius: '--plasma_private-segemntation-border-radius'
21
- };
22
- var tokens = {
23
- // Root size tokens
24
- rootMinWidth: '--plasma-number-input_min-width',
25
- disabledOpacity: '--plasma-number-input_disabled-opacity',
26
- // Action button view tokens
27
- iconButtonColor: '--plasma-number-input_icon-button_color',
28
- iconButtonBackgroundColor: '--plasma-number-input_icon-button_background-color',
29
- iconButtonColorHover: '--plasma-number-input_icon-button_color-hover',
30
- iconButtonBackgroundColorHover: '--plasma-number-input_icon-button_background-color-hover',
31
- iconButtonColorActive: '--plasma-number-input_icon-button_color-active',
32
- iconButtonBackgroundColorActive: '--plasma-number-input_icon-button_background-color-active',
33
- iconButtonColorClear: '--plasma-number-input_icon-button_color-clear',
34
- actionButtonDisabledOpacity: '--plasma-number-input_action-button_disabled-opacity',
35
- // Action button size tokens
36
- iconButtonHeight: '--plasma-number-input_icon-button_height',
37
- iconButtonWidth: '--plasma-number-input_icon-button_width',
38
- iconButtonPadding: '--plasma-number-input_icon-button_padding',
39
- iconButtonRadius: '--plasma-number-input_icon-button_radius',
40
- iconButtonSegmentationRadius: '--plasma-number-input_icon-button_segmentation_radius',
41
- iconButtonFontFamily: '--plasma-number-input_icon-button_font-family',
42
- iconButtonFontSize: '--plasma-number-input_icon-button_font-size',
43
- iconButtonFontStyle: '--plasma-number-input_icon-button_font-style',
44
- iconButtonFontWeight: '--plasma-number-input_icon-button_font-weight',
45
- iconButtonLetterSpacing: '--plasma-number-input_icon-button_letter-spacing',
46
- iconButtonLineHeight: '--plasma-number-input_icon-button_line-height',
47
- // Input size tokens
48
- inputWrapperBorderWidth: '--plasma-number-input_input-wrapper_border-width',
49
- inputWrapperMargin: '--plasma-number-input_input-wrapper_margin',
50
- inputWrapperBorderRadius: '--plasma-number-input_input-wrapper_border-radius',
51
- textWrapperHeight: '--plasma-number-input_text-wrapper_height',
52
- textWrapperPadding: '--plasma-number-input_text-wrapper_padding',
53
- fontFamily: '--plasma-number-input_font-family',
54
- fontStyle: '--plasma-number-input_font-style',
55
- fontSize: '--plasma-number-input_font-size',
56
- fontWeight: '--plasma-number-input_font-weight',
57
- letterSpacing: '--plasma-number-input_letter-spacing',
58
- lineHeight: '--plasma-number-input_line-height',
59
- textBeforeMarginRight: '--plasma-number-input_text-before_margin-right',
60
- textAfterMarginLeft: '--plasma-number-input_text-after_margin-left',
61
- // Input view tokens
62
- caretColor: '--plasma-number-input_caret_color',
63
- caretColorSolid: '--plasma-number-input_caret_color-solid',
64
- color: '--plasma-number-input_color',
65
- colorSolid: '--plasma-number-input_color-solid',
66
- colorClear: '--plasma-number-input_color-clear',
67
- backgroundColor: '--plasma-number-input_background-color',
68
- backgroundColorHover: '--plasma-number-input_background-color-hover',
69
- backgroundColorFocus: '--plasma-number-input_background-color-focus',
70
- backgroundColorSolidFocus: '--plasma-number-input_background-color-solid-focus',
71
- backgroundColorSolid: '--plasma-number-input_background-color-solid',
72
- borderColor: '--plasma-number-input_border-color',
73
- borderColorHover: '--plasma-number-input_border-color-hover',
74
- borderColorFocus: '--plasma-number-input_border-color-focus',
75
- borderColorSolidFocus: '--plasma-number-input_border-color-solid-focus',
76
- borderColorSolid: '--plasma-number-input_border-color-solid',
77
- additionalTextColor: '--plasma-number-input_additional-text_color',
78
- additionalTextColorSolid: '--plasma-number-input_additional-text_color-solid',
79
- additionalTextColorClear: '--plasma-number-input_additional-text_color-clear',
80
- errorColor: '--plasma-number-input_error-color',
81
- // Loader tokens
82
- loaderSpinnerSize: '--plasma-number-input_loader-spinner_size',
83
- loaderSpinnerColor: '--plasma-number-input_loader-spinner_color',
84
- loaderSpinnerColorSolid: '--plasma-number-input_loader-spinner_color-solid'
85
- };
86
-
87
- exports.classes = classes;
88
- exports.privateTokens = privateTokens;
89
- exports.tokens = tokens;
90
- //# sourceMappingURL=NumberInput.tokens.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NumberInput.tokens.js","sources":["../../../src/components/NumberInput/NumberInput.tokens.ts"],"sourcesContent":["export const classes = {\n actionButtonDecrement: 'action-button-decrement',\n actionButtonDecrementDisabled: 'action-button-decrement-disabled',\n actionButtonIncrement: 'action-button-increment',\n actionButtonIncrementDisabled: 'action-button-increment-disabled',\n textBefore: 'text-before',\n textAfter: 'text-after',\n solidView: 'solid-view',\n segmentedView: 'segmented-view',\n clearView: 'clear-view',\n errorAnimation: 'error-animation',\n disabled: 'number-input-disabled',\n};\n\nexport const privateTokens = {\n inputWidth: '--plasma_private-number-input_width',\n segmentationBorderRadius: '--plasma_private-segemntation-border-radius',\n};\n\nexport const tokens = {\n // Root size tokens\n rootMinWidth: '--plasma-number-input_min-width',\n disabledOpacity: '--plasma-number-input_disabled-opacity',\n\n // Action button view tokens\n iconButtonColor: '--plasma-number-input_icon-button_color',\n iconButtonBackgroundColor: '--plasma-number-input_icon-button_background-color',\n iconButtonColorHover: '--plasma-number-input_icon-button_color-hover',\n iconButtonBackgroundColorHover: '--plasma-number-input_icon-button_background-color-hover',\n iconButtonColorActive: '--plasma-number-input_icon-button_color-active',\n iconButtonBackgroundColorActive: '--plasma-number-input_icon-button_background-color-active',\n\n iconButtonColorClear: '--plasma-number-input_icon-button_color-clear',\n\n actionButtonDisabledOpacity: '--plasma-number-input_action-button_disabled-opacity',\n\n // Action button size tokens\n iconButtonHeight: '--plasma-number-input_icon-button_height',\n iconButtonWidth: '--plasma-number-input_icon-button_width',\n iconButtonPadding: '--plasma-number-input_icon-button_padding',\n iconButtonRadius: '--plasma-number-input_icon-button_radius',\n iconButtonSegmentationRadius: '--plasma-number-input_icon-button_segmentation_radius',\n iconButtonFontFamily: '--plasma-number-input_icon-button_font-family',\n iconButtonFontSize: '--plasma-number-input_icon-button_font-size',\n iconButtonFontStyle: '--plasma-number-input_icon-button_font-style',\n iconButtonFontWeight: '--plasma-number-input_icon-button_font-weight',\n iconButtonLetterSpacing: '--plasma-number-input_icon-button_letter-spacing',\n iconButtonLineHeight: '--plasma-number-input_icon-button_line-height',\n\n // Input size tokens\n inputWrapperBorderWidth: '--plasma-number-input_input-wrapper_border-width',\n inputWrapperMargin: '--plasma-number-input_input-wrapper_margin',\n inputWrapperBorderRadius: '--plasma-number-input_input-wrapper_border-radius',\n textWrapperHeight: '--plasma-number-input_text-wrapper_height',\n textWrapperPadding: '--plasma-number-input_text-wrapper_padding',\n\n fontFamily: '--plasma-number-input_font-family',\n fontStyle: '--plasma-number-input_font-style',\n fontSize: '--plasma-number-input_font-size',\n fontWeight: '--plasma-number-input_font-weight',\n letterSpacing: '--plasma-number-input_letter-spacing',\n lineHeight: '--plasma-number-input_line-height',\n\n textBeforeMarginRight: '--plasma-number-input_text-before_margin-right',\n textAfterMarginLeft: '--plasma-number-input_text-after_margin-left',\n\n // Input view tokens\n caretColor: '--plasma-number-input_caret_color',\n caretColorSolid: '--plasma-number-input_caret_color-solid',\n color: '--plasma-number-input_color',\n colorSolid: '--plasma-number-input_color-solid',\n colorClear: '--plasma-number-input_color-clear',\n backgroundColor: '--plasma-number-input_background-color',\n backgroundColorHover: '--plasma-number-input_background-color-hover',\n backgroundColorFocus: '--plasma-number-input_background-color-focus',\n backgroundColorSolidFocus: '--plasma-number-input_background-color-solid-focus',\n backgroundColorSolid: '--plasma-number-input_background-color-solid',\n borderColor: '--plasma-number-input_border-color',\n borderColorHover: '--plasma-number-input_border-color-hover',\n borderColorFocus: '--plasma-number-input_border-color-focus',\n borderColorSolidFocus: '--plasma-number-input_border-color-solid-focus',\n borderColorSolid: '--plasma-number-input_border-color-solid',\n additionalTextColor: '--plasma-number-input_additional-text_color',\n additionalTextColorSolid: '--plasma-number-input_additional-text_color-solid',\n additionalTextColorClear: '--plasma-number-input_additional-text_color-clear',\n\n errorColor: '--plasma-number-input_error-color',\n\n // Loader tokens\n loaderSpinnerSize: '--plasma-number-input_loader-spinner_size',\n loaderSpinnerColor: '--plasma-number-input_loader-spinner_color',\n loaderSpinnerColorSolid: '--plasma-number-input_loader-spinner_color-solid',\n};\n"],"names":["classes","actionButtonDecrement","actionButtonDecrementDisabled","actionButtonIncrement","actionButtonIncrementDisabled","textBefore","textAfter","solidView","segmentedView","clearView","errorAnimation","disabled","privateTokens","inputWidth","segmentationBorderRadius","tokens","rootMinWidth","disabledOpacity","iconButtonColor","iconButtonBackgroundColor","iconButtonColorHover","iconButtonBackgroundColorHover","iconButtonColorActive","iconButtonBackgroundColorActive","iconButtonColorClear","actionButtonDisabledOpacity","iconButtonHeight","iconButtonWidth","iconButtonPadding","iconButtonRadius","iconButtonSegmentationRadius","iconButtonFontFamily","iconButtonFontSize","iconButtonFontStyle","iconButtonFontWeight","iconButtonLetterSpacing","iconButtonLineHeight","inputWrapperBorderWidth","inputWrapperMargin","inputWrapperBorderRadius","textWrapperHeight","textWrapperPadding","fontFamily","fontStyle","fontSize","fontWeight","letterSpacing","lineHeight","textBeforeMarginRight","textAfterMarginLeft","caretColor","caretColorSolid","color","colorSolid","colorClear","backgroundColor","backgroundColorHover","backgroundColorFocus","backgroundColorSolidFocus","backgroundColorSolid","borderColor","borderColorHover","borderColorFocus","borderColorSolidFocus","borderColorSolid","additionalTextColor","additionalTextColorSolid","additionalTextColorClear","errorColor","loaderSpinnerSize","loaderSpinnerColor","loaderSpinnerColorSolid"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,qBAAqB,EAAE,yBAAyB;AAChDC,EAAAA,6BAA6B,EAAE,kCAAkC;AACjEC,EAAAA,qBAAqB,EAAE,yBAAyB;AAChDC,EAAAA,6BAA6B,EAAE,kCAAkC;AACjEC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,aAAa,EAAE,gBAAgB;AAC/BC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,cAAc,EAAE,iBAAiB;AACjCC,E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,kCAAkC;AAC7CC,EAAAA,QAAQ,EAAE,iCAAiC;AAC3CC,EAAAA,UAAU,EAAE,mCAAmC;AAC/CC,EAAAA,aAAa,EAAE,sCAAsC;AACrDC,EAAAA,UAAU,EAAE,mCAAmC;AAE/CC,EAAAA,qBAAqB,EAAE,gDAAgD;AACvEC,EAAAA,mBAAmB,EAAE,8CAA8C;AAEnE;AACAC,EAAAA,UAAU,EAAE,mCAAmC;AAC/CC,EAAAA,eAAe,EAAE,yCAAyC;AAC1DC,EAAAA,KAAK,EAAE,6BAA6B;AACpCC,EAAAA,UAAU,EAAE,mCAAmC;AAC/CC,EAAAA,UAAU,EAAE,mCAAmC;AAC/CC,EAAAA,eAAe,EAAE,wCAAwC;AACzDC,EAAAA,oBAAoB,EAAE,8CAA8C;AACpEC,EAAAA,oBAAoB,EAAE,8CAA8C;AACpEC,EAAAA,yBAAyB,EAAE,oDAAoD;AAC/EC,EAAAA,oBAAoB,EAAE,8CAA8C;AACpEC,EAAAA,WAAW,EAAE,oCAAoC;AACjDC,EAAAA,gBAAgB,EAAE,0CAA0C;AAC5DC,EAAAA,gBAAgB,EAAE,0CAA0C;AAC5DC,EAAAA,qBAAqB,EAAE,gDAAgD;AACvEC,EAAAA,gBAAgB,EAAE,0CAA0C;AAC5DC,EAAAA,mBAAmB,EAAE,6CAA6C;AAClEC,EAAAA,wBAAwB,EAAE,mDAAmD;AAC7EC,EAAAA,wBAAwB,EAAE,mDAAmD;AAE7EC,EAAAA,UAAU,EAAE,mCAAmC;AAE/C;AACAC,EAAAA,iBAAiB,EAAE,2CAA2C;AAC9DC,EAAAA,kBAAkB,EAAE,4CAA4C;AAChEC,EAAAA,uBAAuB,EAAE,kDAAA;AAC7B;;;;;;"}
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var React = require('react');
6
- var ActionButton_styles = require('./ActionButton.styles.js');
7
-
8
- var ActionButton = function ActionButton(_ref) {
9
- var icon = _ref.icon,
10
- className = _ref.className,
11
- onClick = _ref.onClick;
12
- return /*#__PURE__*/React.createElement(ActionButton_styles.StyledIconButton, {
13
- className: className,
14
- onClick: onClick
15
- }, icon);
16
- };
17
-
18
- exports.ActionButton = ActionButton;
19
- //# sourceMappingURL=ActionButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionButton.js","sources":["../../../../../src/components/NumberInput/ui/ActionButton/ActionButton.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { StyledIconButton } from './ActionButton.styles';\nimport type { ActionButtonProps } from './ActionButton.types';\n\nexport const ActionButton: FC<ActionButtonProps> = ({ icon, className, onClick }) => {\n return (\n <StyledIconButton className={className} onClick={onClick}>\n {icon}\n </StyledIconButton>\n );\n};\n"],"names":["ActionButton","_ref","icon","className","onClick","React","createElement","StyledIconButton"],"mappings":";;;;;;;IAKaA,YAAmC,GAAG,SAAtCA,YAAmCA,CAAAC,IAAA,EAAqC;AAAA,EAAA,IAA/BC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEC,OAAO,GAAAH,IAAA,CAAPG,OAAO,CAAA;AAC1E,EAAA,oBACIC,KAAA,CAAAC,aAAA,CAACC,oCAAgB,EAAA;AAACJ,IAAAA,SAAS,EAAEA,SAAU;AAACC,IAAAA,OAAO,EAAEA,OAAAA;AAAQ,GAAA,EACpDF,IACa,CAAC,CAAA;AAE3B;;;;"}
@@ -1,22 +0,0 @@
1
- import './ActionButton.styles_x642ct.css';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, '__esModule', { value: true });
5
-
6
- var react = require('@linaria/react');
7
- var common = require('../../../../engines/common.js');
8
- var IconButton$1 = require('../../../IconButton/IconButton.js');
9
-
10
- var mergedIconButtonConfig = /*#__PURE__*/common.mergeConfig(IconButton$1.iconButtonConfig);
11
- var IconButton = /*#__PURE__*/common.component(mergedIconButtonConfig);
12
- var _exp = function _exp() {
13
- return IconButton;
14
- };
15
- var StyledIconButton = /*#__PURE__*/react.styled(_exp())({
16
- name: "StyledIconButton",
17
- "class": "sj0ab1b",
18
- propsAsIs: true
19
- });
20
-
21
- exports.StyledIconButton = StyledIconButton;
22
- //# sourceMappingURL=ActionButton.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionButton.styles.js","sources":["../../../../../src/components/NumberInput/ui/ActionButton/ActionButton.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { iconButtonConfig } from '../../../IconButton';\nimport { component, mergeConfig } from '../../../../engines';\n\nconst mergedIconButtonConfig = mergeConfig(iconButtonConfig);\nconst IconButton = component(mergedIconButtonConfig);\n\nexport const StyledIconButton = styled(IconButton)``;\n"],"names":["mergedIconButtonConfig","mergeConfig","iconButtonConfig","IconButton","component","_exp","StyledIconButton","styled","name","class","propsAsIs"],"mappings":";;;;;;;;AAKA,IAAMA,sBAAsB,gBAAGC,kBAAW,CAACC,6BAAgB,CAAC,CAAA;AAC5D,IAAMC,UAAU,gBAAGC,gBAAS,CAACJ,sBAAsB,CAAC,CAAA;AAAC,IAAAK,IAAA,GALnCA,SAKmCA,IAAAA,GAAA;AAAA,EAAA,OAEdF,UAAU,CAAA;AAAA,CAAA,CAAA;AAA1C,IAAMG,gBAAgB,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAAc;;;;"}
@@ -1,15 +0,0 @@
1
- .base_1gusher_b1chvyq8__76b641f5{color:var(--plasma-spinner-color);}
2
-
3
- .base_ova69f_bw56nfh__55225c7f{width:var(--plasma-spinner-size);height:var(--plasma-spinner-size);}
4
-
5
- .Spinner_styles_13q7ndk_b1hp2dsz__af962114{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;box-sizing:border-box;}
6
- .Spinner_styles_13q7ndk_s122r4cn__af962114{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:var(--s122r4cn-0);height:var(--s122r4cn-1);-webkit-animation:Spinner_styles_13q7ndk_rotateS122r4cn__af962114 1s linear infinite;animation:Spinner_styles_13q7ndk_rotateS122r4cn__af962114 1s linear infinite;}@-webkit-keyframes Spinner_styles_13q7ndk_rotateS122r4cn__af962114{from{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}@keyframes Spinner_styles_13q7ndk_rotateS122r4cn__af962114{from{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}
7
-
8
- .Input_styles_jszc0c_i1s8bsh6__6eb57599{overflow-x:auto;overflow-y:hidden;-webkit-flex:1;-ms-flex:1;flex:1;cursor:var(--i1s8bsh6-0);-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;overscroll-behavior:contain;}.Input_styles_jszc0c_i1s8bsh6__6eb57599::-webkit-scrollbar{display:none;}
9
- .Input_styles_jszc0c_t6wb9c__6eb57599{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;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:0 auto;box-sizing:border-box;}
10
-
11
-
12
-
13
- .Input_styles_jszc0c_d1n4jo6t__6eb57599{position:relative;}
14
- .Input_styles_jszc0c_i1tgbhg7__6eb57599{box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;background-color:transparent;outline:none;width:var(--i1tgbhg7-0);box-sizing:border-box;cursor:var(--i1tgbhg7-1);pointer-events:var(--i1tgbhg7-2);-webkit-transition:width 0.1s;transition:width 0.1s;}.Input_styles_jszc0c_i1tgbhg7__6eb57599.Input_styles_jszc0c_i1tgbhg7__6eb57599.Input_styles_jszc0c_errorAnimation__6eb57599{color:var(--plasma-number-input_error-color);-webkit-animation:Input_styles_jszc0c_shakingErrorI1tgbhg7__6eb57599 0.5s forwards;animation:Input_styles_jszc0c_shakingErrorI1tgbhg7__6eb57599 0.5s forwards;}@-webkit-keyframes Input_styles_jszc0c_shakingErrorI1tgbhg7__6eb57599{0%{opacity:1;}12.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}25%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}37.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}50%{opacity:1;-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}62.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}75%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}87.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}100%{opacity:0;-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}}@keyframes Input_styles_jszc0c_shakingErrorI1tgbhg7__6eb57599{0%{opacity:1;}12.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}25%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}37.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}50%{opacity:1;-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}62.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}75%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}87.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}100%{opacity:0;-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}}
15
- .Input_styles_jszc0c_i1il5xze__6eb57599{position:absolute;z-index:-999;visibility:hidden;top:0;left:0;opacity:0;height:0;white-space:pre;}
@@ -1,190 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
6
- var React = require('react');
7
- var plasmaCore = require('@salutejs/plasma-core');
8
- var NumberInput_tokens = require('../../NumberInput.tokens.js');
9
- var index = require('../../../../utils/index.js');
10
- var index$1 = require('../../utils/index.js');
11
- var constants = require('../../../../utils/constants.js');
12
- var Input_styles = require('./Input.styles.js');
13
- var useDidMountEffect = require('../../../../hooks/useDidMountEffect.js');
14
- var isNumber = require('../../../../utils/isNumber.js');
15
-
16
- var _StyledSpinner;
17
- var _excluded = ["value", "min", "max", "isLoading", "loader", "disabled", "segmentation", "textBefore", "textAfter", "isManualInput", "setInnerValue", "onChange", "onBlur", "onKeyDown"];
18
- var NumberInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
19
- var value = _ref.value,
20
- min = _ref.min,
21
- max = _ref.max,
22
- isLoading = _ref.isLoading,
23
- loader = _ref.loader,
24
- disabled = _ref.disabled,
25
- segmentation = _ref.segmentation,
26
- textBefore = _ref.textBefore,
27
- textAfter = _ref.textAfter,
28
- isManualInput = _ref.isManualInput,
29
- setInnerValue = _ref.setInnerValue,
30
- onChange = _ref.onChange,
31
- onBlur = _ref.onBlur,
32
- onKeyDown = _ref.onKeyDown,
33
- rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
34
- var _useState = React.useState(value ? "".concat(String(value).length, "ch") : '1ch'),
35
- _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
36
- dynamicWidth = _useState2[0],
37
- setDynamicWidth = _useState2[1];
38
- var _useState3 = React.useState(Number(value)),
39
- _useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
40
- lastValidValue = _useState4[0],
41
- setLastValidValue = _useState4[1];
42
- var _useState5 = React.useState(undefined),
43
- _useState6 = _rollupPluginBabelHelpers.slicedToArray(_useState5, 2),
44
- errorClass = _useState6[0],
45
- setErrorClass = _useState6[1];
46
- var _useState7 = React.useState(),
47
- _useState8 = _rollupPluginBabelHelpers.slicedToArray(_useState7, 2),
48
- errorValue = _useState8[0],
49
- setErrorValue = _useState8[1];
50
- var inputHelperRef = React.useRef(null);
51
- var wrapperRef = React.useRef(null);
52
- var textWrapperRef = React.useRef(null);
53
- var inputRef = React.useRef(null);
54
- var inputForkRef = plasmaCore.useForkRef(inputRef, ref);
55
- var solidViewClass = segmentation === 'solid' ? NumberInput_tokens.classes.solidView : undefined;
56
- var handleClickInputWrapper = function handleClickInputWrapper() {
57
- var _inputRef$current;
58
- if (!isManualInput) {
59
- return;
60
- }
61
- inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
62
- };
63
- var getInputWidth = function getInputWidth() {
64
- var _inputHelperRef$curre;
65
- var firstRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
66
- if (!firstRender && (_inputHelperRef$curre = inputHelperRef.current) !== null && _inputHelperRef$curre !== void 0 && _inputHelperRef$curre.clientWidth) {
67
- var _inputHelperRef$curre2;
68
- return "".concat((_inputHelperRef$curre2 = inputHelperRef.current) === null || _inputHelperRef$curre2 === void 0 ? void 0 : _inputHelperRef$curre2.clientWidth, "px");
69
- }
70
- if (value) {
71
- return "".concat(String(value).length, "ch");
72
- }
73
- return '1ch';
74
- };
75
- var setValues = function setValues(event, newValue) {
76
- setLastValidValue(newValue);
77
- setInnerValue(newValue);
78
- if (onChange) {
79
- onChange(event, newValue);
80
- }
81
- };
82
- var handleManualInputChange = function handleManualInputChange(event) {
83
- var _textWrapperRef$curre, _wrapperRef$current;
84
- if (!isManualInput || disabled) {
85
- return;
86
- }
87
- var newValue = event.target.value;
88
- if (!newValue) {
89
- setInnerValue('');
90
- if (onChange) {
91
- onChange(event, '');
92
- }
93
- return;
94
- }
95
- var cleanValue = newValue.replace(/[^-.\d]/g, '');
96
- if (cleanValue.endsWith('.')) {
97
- setInnerValue(cleanValue);
98
- if (onChange) {
99
- onChange(event, cleanValue);
100
- }
101
- return;
102
- }
103
- var isValid = index$1.numberPettern.test(cleanValue);
104
- if (!isValid) {
105
- setValues(event, lastValidValue);
106
- return;
107
- }
108
- var resValue = Number(cleanValue);
109
- if (max && resValue > max) {
110
- setErrorClass(NumberInput_tokens.classes.errorAnimation);
111
- setErrorValue(max);
112
- return;
113
- }
114
- if (min && resValue < min) {
115
- setErrorClass(NumberInput_tokens.classes.errorAnimation);
116
- setErrorValue(min);
117
- return;
118
- }
119
- if (textWrapperRef !== null && textWrapperRef !== void 0 && textWrapperRef.current && wrapperRef !== null && wrapperRef !== void 0 && wrapperRef.current && (textWrapperRef === null || textWrapperRef === void 0 || (_textWrapperRef$curre = textWrapperRef.current) === null || _textWrapperRef$curre === void 0 ? void 0 : _textWrapperRef$curre.clientWidth) > (wrapperRef === null || wrapperRef === void 0 || (_wrapperRef$current = wrapperRef.current) === null || _wrapperRef$current === void 0 ? void 0 : _wrapperRef$current.clientWidth)) {
120
- wrapperRef.current.scrollLeft = textWrapperRef.current.offsetWidth - textWrapperRef.current.offsetLeft || 0;
121
- }
122
- setValues(event, resValue);
123
- };
124
- var handleBlur = function handleBlur(event) {
125
- if (!value || !isNumber.isNumber(value)) {
126
- setValues(null, lastValidValue);
127
- } else if (String(value).endsWith('.')) {
128
- setValues(null, Number(value));
129
- }
130
- if (onBlur) {
131
- onBlur(event);
132
- }
133
- };
134
- var handleKeyDown = function handleKeyDown(event) {
135
- if (!isManualInput || disabled) {
136
- return;
137
- }
138
- if (event.keyCode === constants.keyCodes.Enter) {
139
- event.preventDefault();
140
- if (!value || !isNumber.isNumber(value)) {
141
- setValues(null, lastValidValue);
142
- } else if (String(value).endsWith('.')) {
143
- setValues(null, Number(value));
144
- }
145
- if (onKeyDown) {
146
- onKeyDown(event);
147
- }
148
- }
149
- };
150
- var handleEndErrorAnimation = function handleEndErrorAnimation(correctValue) {
151
- setErrorClass(undefined);
152
- setValues(null, correctValue);
153
- };
154
- React.useEffect(function () {
155
- setDynamicWidth(getInputWidth());
156
- }, []);
157
- useDidMountEffect.useDidMountEffect(function () {
158
- setDynamicWidth(getInputWidth(false));
159
- }, [value]);
160
- return /*#__PURE__*/React.createElement(Input_styles.InputWrapper, {
161
- ref: wrapperRef,
162
- className: index.cx(solidViewClass),
163
- isManualInput: Boolean(isManualInput),
164
- onClick: handleClickInputWrapper
165
- }, /*#__PURE__*/React.createElement(Input_styles.TextWrapper, {
166
- ref: textWrapperRef
167
- }, textBefore && /*#__PURE__*/React.createElement(Input_styles.AdditionalText, {
168
- className: NumberInput_tokens.classes.textBefore
169
- }, textBefore), isLoading ? /*#__PURE__*/React.createElement(Input_styles.Loader, null, loader || _StyledSpinner || (_StyledSpinner = /*#__PURE__*/React.createElement(Input_styles.StyledSpinner, null))) : /*#__PURE__*/React.createElement(Input_styles.DynamicInput, null, /*#__PURE__*/React.createElement(Input_styles.Input, _rollupPluginBabelHelpers.extends({
170
- ref: inputForkRef,
171
- className: index.cx(errorClass),
172
- dynamicWidth: dynamicWidth,
173
- value: value,
174
- isManualInput: Boolean(isManualInput),
175
- tabIndex: disabled || !isManualInput ? -1 : 0,
176
- onChange: handleManualInputChange,
177
- onBlur: handleBlur,
178
- onKeyDown: handleKeyDown,
179
- onAnimationEnd: function onAnimationEnd() {
180
- return handleEndErrorAnimation(Number(errorValue));
181
- }
182
- }, rest)), /*#__PURE__*/React.createElement(Input_styles.InputWidthHelper, {
183
- ref: inputHelperRef
184
- }, value)), textAfter && /*#__PURE__*/React.createElement(Input_styles.AdditionalText, {
185
- className: NumberInput_tokens.classes.textAfter
186
- }, textAfter)));
187
- });
188
-
189
- exports.NumberInput = NumberInput;
190
- //# sourceMappingURL=Input.js.map