@salutejs/plasma-new-hope 0.182.0-canary.1500.11610401138.0 → 0.182.0-canary.1511.11616350336.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (440) hide show
  1. package/cjs/components/Badge/Badge.css +0 -2
  2. package/cjs/components/Badge/Badge.js +4 -17
  3. package/cjs/components/Badge/Badge.js.map +1 -1
  4. package/cjs/components/Badge/Badge.tokens.js +1 -2
  5. package/cjs/components/Badge/Badge.tokens.js.map +1 -1
  6. package/cjs/components/NumberInput/NumberInput.css +52 -0
  7. package/cjs/components/NumberInput/NumberInput.js +196 -0
  8. package/cjs/components/NumberInput/NumberInput.js.map +1 -0
  9. package/cjs/components/NumberInput/NumberInput.styles.js +9 -0
  10. package/cjs/components/NumberInput/NumberInput.styles.js.map +1 -0
  11. package/cjs/components/NumberInput/NumberInput.styles_jeawjl.css +1 -0
  12. package/cjs/components/NumberInput/NumberInput.tokens.js +102 -0
  13. package/cjs/components/NumberInput/NumberInput.tokens.js.map +1 -0
  14. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +19 -0
  15. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.js.map +1 -0
  16. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +22 -0
  17. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js.map +1 -0
  18. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles_x642ct.css +1 -0
  19. package/cjs/components/NumberInput/ui/Input/Input.css +15 -0
  20. package/cjs/components/NumberInput/ui/Input/Input.js +202 -0
  21. package/cjs/components/NumberInput/ui/Input/Input.js.map +1 -0
  22. package/cjs/components/NumberInput/ui/Input/Input.styles.js +96 -0
  23. package/cjs/components/NumberInput/ui/Input/Input.styles.js.map +1 -0
  24. package/cjs/components/NumberInput/ui/Input/Input.styles_fhgb95.css +8 -0
  25. package/cjs/components/NumberInput/utils/index.js +8 -0
  26. package/cjs/components/NumberInput/utils/index.js.map +1 -0
  27. package/cjs/components/{Badge/variations/_truncate → NumberInput/variations/_background-type}/base.js +2 -2
  28. package/cjs/components/NumberInput/variations/_background-type/base.js.map +1 -0
  29. package/cjs/components/NumberInput/variations/_background-type/base_dx9knv.css +1 -0
  30. package/cjs/components/{Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate → NumberInput/variations/_disabled}/base.js +2 -2
  31. package/cjs/components/NumberInput/variations/_disabled/base.js.map +1 -0
  32. package/cjs/components/NumberInput/variations/_disabled/base_1sl0mh8.css +1 -0
  33. package/cjs/components/{Tabs/ui/vertical/VerticalTabItem/variations/_truncate → NumberInput/variations/_segmentation}/base.js +2 -2
  34. package/cjs/components/NumberInput/variations/_segmentation/base.js.map +1 -0
  35. package/cjs/components/NumberInput/variations/_segmentation/base_z3qfag.css +1 -0
  36. package/cjs/components/NumberInput/variations/_shape/base.js +9 -0
  37. package/cjs/components/NumberInput/variations/_shape/base.js.map +1 -0
  38. package/cjs/components/NumberInput/variations/_shape/base_k05biw.css +1 -0
  39. package/cjs/components/NumberInput/variations/_size/base.js +9 -0
  40. package/cjs/components/NumberInput/variations/_size/base.js.map +1 -0
  41. package/cjs/components/NumberInput/variations/_size/base_yqdmk4.css +1 -0
  42. package/cjs/components/NumberInput/variations/_view/base.js +9 -0
  43. package/cjs/components/NumberInput/variations/_view/base.js.map +1 -0
  44. package/cjs/components/NumberInput/variations/_view/base_tnfbb5.css +1 -0
  45. package/cjs/components/Tabs/tokens.js +1 -2
  46. package/cjs/components/Tabs/tokens.js.map +1 -1
  47. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +5 -7
  48. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -14
  49. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
  50. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  51. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
  52. package/{es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_1vj7dbl.css → cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_hfqv5b.css} +1 -1
  53. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +5 -7
  54. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -14
  55. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js.map +1 -1
  56. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +1 -1
  57. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
  58. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_16d3lah.css +5 -0
  59. package/cjs/index.css +33 -16
  60. package/cjs/index.js +6 -0
  61. package/cjs/index.js.map +1 -1
  62. package/emotion/cjs/components/Badge/Badge.js +4 -22
  63. package/emotion/cjs/components/Badge/Badge.tokens.js +1 -2
  64. package/emotion/cjs/components/NumberInput/NumberInput.js +206 -0
  65. package/emotion/cjs/components/NumberInput/NumberInput.styles.js +17 -0
  66. package/emotion/cjs/components/NumberInput/NumberInput.template-doc.mdx +194 -0
  67. package/emotion/cjs/components/NumberInput/NumberInput.tokens.js +99 -0
  68. package/emotion/cjs/components/NumberInput/NumberInput.types.js +5 -0
  69. package/emotion/cjs/components/NumberInput/index.js +31 -0
  70. package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +18 -0
  71. package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +16 -0
  72. package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.types.js +5 -0
  73. package/emotion/cjs/components/NumberInput/ui/Input/Input.js +210 -0
  74. package/emotion/cjs/components/NumberInput/ui/Input/Input.styles.js +81 -0
  75. package/emotion/cjs/components/NumberInput/ui/Input/Input.types.js +5 -0
  76. package/emotion/cjs/components/NumberInput/ui/index.js +19 -0
  77. package/emotion/cjs/components/NumberInput/utils/index.js +7 -0
  78. package/emotion/cjs/components/NumberInput/variations/_background-type/base.js +10 -0
  79. package/emotion/cjs/components/NumberInput/variations/_background-type/tokens.json +6 -0
  80. package/emotion/cjs/components/NumberInput/variations/_disabled/base.js +9 -0
  81. package/emotion/cjs/components/NumberInput/variations/_disabled/tokens.json +4 -0
  82. package/emotion/cjs/components/NumberInput/variations/_segmentation/base.js +12 -0
  83. package/emotion/cjs/components/NumberInput/variations/_segmentation/tokens.json +1 -0
  84. package/emotion/cjs/components/NumberInput/variations/_shape/base.js +11 -0
  85. package/emotion/cjs/components/NumberInput/variations/_shape/tokens.json +1 -0
  86. package/emotion/cjs/components/NumberInput/variations/_size/base.js +13 -0
  87. package/emotion/cjs/components/NumberInput/variations/_size/tokens.json +22 -0
  88. package/emotion/cjs/components/NumberInput/variations/_view/base.js +13 -0
  89. package/emotion/cjs/components/NumberInput/variations/_view/tokens.json +14 -0
  90. package/emotion/cjs/components/Tabs/tokens.js +1 -2
  91. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -19
  92. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +6 -6
  93. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -19
  94. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +6 -6
  95. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +14 -17
  96. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
  97. package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +46 -0
  98. package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.js +11 -0
  99. package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +108 -0
  100. package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
  101. package/emotion/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
  102. package/emotion/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
  103. package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +46 -0
  104. package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.js +11 -0
  105. package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +108 -0
  106. package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
  107. package/emotion/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
  108. package/emotion/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
  109. package/emotion/cjs/index.js +11 -0
  110. package/emotion/es/components/Badge/Badge.js +4 -23
  111. package/emotion/es/components/Badge/Badge.tokens.js +1 -2
  112. package/emotion/es/components/NumberInput/NumberInput.js +198 -0
  113. package/emotion/es/components/NumberInput/NumberInput.styles.js +11 -0
  114. package/emotion/es/components/NumberInput/NumberInput.template-doc.mdx +194 -0
  115. package/emotion/es/components/NumberInput/NumberInput.tokens.js +93 -0
  116. package/emotion/es/components/NumberInput/NumberInput.types.js +1 -0
  117. package/emotion/es/components/NumberInput/index.js +2 -0
  118. package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.js +11 -0
  119. package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +9 -0
  120. package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.types.js +1 -0
  121. package/emotion/es/components/NumberInput/ui/Input/Input.js +201 -0
  122. package/emotion/es/components/NumberInput/ui/Input/Input.styles.js +74 -0
  123. package/emotion/es/components/NumberInput/ui/Input/Input.types.js +1 -0
  124. package/emotion/es/components/NumberInput/ui/index.js +2 -0
  125. package/emotion/es/components/NumberInput/utils/index.js +1 -0
  126. package/emotion/es/components/NumberInput/variations/_background-type/base.js +4 -0
  127. package/emotion/es/components/NumberInput/variations/_background-type/tokens.json +6 -0
  128. package/emotion/es/components/NumberInput/variations/_disabled/base.js +3 -0
  129. package/emotion/es/components/NumberInput/variations/_disabled/tokens.json +4 -0
  130. package/emotion/es/components/NumberInput/variations/_segmentation/base.js +6 -0
  131. package/emotion/es/components/NumberInput/variations/_segmentation/tokens.json +1 -0
  132. package/emotion/es/components/NumberInput/variations/_shape/base.js +5 -0
  133. package/emotion/es/components/NumberInput/variations/_shape/tokens.json +1 -0
  134. package/emotion/es/components/NumberInput/variations/_size/base.js +7 -0
  135. package/emotion/es/components/NumberInput/variations/_size/tokens.json +22 -0
  136. package/emotion/es/components/NumberInput/variations/_view/base.js +7 -0
  137. package/emotion/es/components/NumberInput/variations/_view/tokens.json +14 -0
  138. package/emotion/es/components/Tabs/tokens.js +1 -2
  139. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -20
  140. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +6 -6
  141. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -20
  142. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +6 -6
  143. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +14 -17
  144. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
  145. package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +40 -0
  146. package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.js +5 -0
  147. package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +108 -0
  148. package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
  149. package/emotion/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
  150. package/emotion/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
  151. package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +40 -0
  152. package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.js +5 -0
  153. package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +108 -0
  154. package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
  155. package/emotion/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
  156. package/emotion/es/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
  157. package/emotion/es/index.js +2 -1
  158. package/es/components/Badge/Badge.css +0 -2
  159. package/es/components/Badge/Badge.js +5 -18
  160. package/es/components/Badge/Badge.js.map +1 -1
  161. package/es/components/Badge/Badge.tokens.js +1 -2
  162. package/es/components/Badge/Badge.tokens.js.map +1 -1
  163. package/es/components/NumberInput/NumberInput.css +52 -0
  164. package/es/components/NumberInput/NumberInput.js +191 -0
  165. package/es/components/NumberInput/NumberInput.js.map +1 -0
  166. package/es/components/NumberInput/NumberInput.styles.js +5 -0
  167. package/es/components/NumberInput/NumberInput.styles.js.map +1 -0
  168. package/es/components/NumberInput/NumberInput.styles_jeawjl.css +1 -0
  169. package/es/components/NumberInput/NumberInput.tokens.js +96 -0
  170. package/es/components/NumberInput/NumberInput.tokens.js.map +1 -0
  171. package/es/components/NumberInput/ui/ActionButton/ActionButton.js +15 -0
  172. package/es/components/NumberInput/ui/ActionButton/ActionButton.js.map +1 -0
  173. package/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +18 -0
  174. package/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js.map +1 -0
  175. package/es/components/NumberInput/ui/ActionButton/ActionButton.styles_x642ct.css +1 -0
  176. package/es/components/NumberInput/ui/Input/Input.css +15 -0
  177. package/es/components/NumberInput/ui/Input/Input.js +198 -0
  178. package/es/components/NumberInput/ui/Input/Input.js.map +1 -0
  179. package/es/components/NumberInput/ui/Input/Input.styles.js +85 -0
  180. package/es/components/NumberInput/ui/Input/Input.styles.js.map +1 -0
  181. package/es/components/NumberInput/ui/Input/Input.styles_fhgb95.css +8 -0
  182. package/es/components/NumberInput/utils/index.js +4 -0
  183. package/es/components/NumberInput/utils/index.js.map +1 -0
  184. package/es/components/{Badge/variations/_truncate → NumberInput/variations/_background-type}/base.js +2 -2
  185. package/es/components/NumberInput/variations/_background-type/base.js.map +1 -0
  186. package/es/components/NumberInput/variations/_background-type/base_dx9knv.css +1 -0
  187. package/es/components/NumberInput/variations/_disabled/base.js +5 -0
  188. package/es/components/NumberInput/variations/_disabled/base.js.map +1 -0
  189. package/es/components/NumberInput/variations/_disabled/base_1sl0mh8.css +1 -0
  190. package/es/components/NumberInput/variations/_segmentation/base.js +5 -0
  191. package/es/components/NumberInput/variations/_segmentation/base.js.map +1 -0
  192. package/es/components/NumberInput/variations/_segmentation/base_z3qfag.css +1 -0
  193. package/es/components/NumberInput/variations/_shape/base.js +5 -0
  194. package/es/components/NumberInput/variations/_shape/base.js.map +1 -0
  195. package/es/components/NumberInput/variations/_shape/base_k05biw.css +1 -0
  196. package/es/components/NumberInput/variations/_size/base.js +5 -0
  197. package/es/components/NumberInput/variations/_size/base.js.map +1 -0
  198. package/es/components/NumberInput/variations/_size/base_yqdmk4.css +1 -0
  199. package/es/components/NumberInput/variations/_view/base.js +5 -0
  200. package/es/components/NumberInput/variations/_view/base.js.map +1 -0
  201. package/es/components/NumberInput/variations/_view/base_tnfbb5.css +1 -0
  202. package/es/components/Tabs/tokens.js +1 -2
  203. package/es/components/Tabs/tokens.js.map +1 -1
  204. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +5 -7
  205. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +4 -15
  206. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
  207. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  208. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
  209. package/{cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_1vj7dbl.css → es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_hfqv5b.css} +1 -1
  210. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +5 -7
  211. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +4 -15
  212. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js.map +1 -1
  213. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +1 -1
  214. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
  215. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_16d3lah.css +5 -0
  216. package/es/index.css +33 -16
  217. package/es/index.js +2 -0
  218. package/es/index.js.map +1 -1
  219. package/package.json +2 -2
  220. package/styled-components/cjs/components/Badge/Badge.js +4 -22
  221. package/styled-components/cjs/components/Badge/Badge.tokens.js +1 -2
  222. package/styled-components/cjs/components/NumberInput/NumberInput.js +206 -0
  223. package/styled-components/cjs/components/NumberInput/NumberInput.styles.js +8 -0
  224. package/styled-components/cjs/components/NumberInput/NumberInput.template-doc.mdx +194 -0
  225. package/styled-components/cjs/components/NumberInput/NumberInput.tokens.js +99 -0
  226. package/styled-components/cjs/components/NumberInput/NumberInput.types.js +5 -0
  227. package/styled-components/cjs/components/NumberInput/index.js +31 -0
  228. package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +18 -0
  229. package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +15 -0
  230. package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.types.js +5 -0
  231. package/styled-components/cjs/components/NumberInput/ui/Input/Input.js +210 -0
  232. package/styled-components/cjs/components/NumberInput/ui/Input/Input.styles.js +48 -0
  233. package/styled-components/cjs/components/NumberInput/ui/Input/Input.types.js +5 -0
  234. package/styled-components/cjs/components/NumberInput/ui/index.js +19 -0
  235. package/styled-components/cjs/components/NumberInput/utils/index.js +7 -0
  236. package/styled-components/cjs/components/NumberInput/variations/_background-type/base.js +10 -0
  237. package/styled-components/cjs/components/NumberInput/variations/_background-type/tokens.json +6 -0
  238. package/styled-components/cjs/components/NumberInput/variations/_disabled/base.js +9 -0
  239. package/styled-components/cjs/components/NumberInput/variations/_disabled/tokens.json +4 -0
  240. package/styled-components/cjs/components/NumberInput/variations/_segmentation/base.js +12 -0
  241. package/styled-components/cjs/components/NumberInput/variations/_segmentation/tokens.json +1 -0
  242. package/styled-components/cjs/components/NumberInput/variations/_shape/base.js +11 -0
  243. package/styled-components/cjs/components/NumberInput/variations/_shape/tokens.json +1 -0
  244. package/styled-components/cjs/components/NumberInput/variations/_size/base.js +13 -0
  245. package/styled-components/cjs/components/NumberInput/variations/_size/tokens.json +22 -0
  246. package/styled-components/cjs/components/NumberInput/variations/_view/base.js +13 -0
  247. package/styled-components/cjs/components/NumberInput/variations/_view/tokens.json +14 -0
  248. package/styled-components/cjs/components/Tabs/tokens.js +1 -2
  249. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -19
  250. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  251. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -19
  252. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +2 -2
  253. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +0 -3
  254. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
  255. package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +46 -0
  256. package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.js +11 -0
  257. package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +108 -0
  258. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
  259. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
  260. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
  261. package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +46 -0
  262. package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.js +11 -0
  263. package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +108 -0
  264. package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
  265. package/styled-components/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
  266. package/styled-components/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
  267. package/styled-components/cjs/index.js +11 -0
  268. package/styled-components/es/components/Badge/Badge.js +4 -23
  269. package/styled-components/es/components/Badge/Badge.tokens.js +1 -2
  270. package/styled-components/es/components/NumberInput/NumberInput.js +198 -0
  271. package/styled-components/es/components/NumberInput/NumberInput.styles.js +2 -0
  272. package/styled-components/es/components/NumberInput/NumberInput.template-doc.mdx +194 -0
  273. package/styled-components/es/components/NumberInput/NumberInput.tokens.js +93 -0
  274. package/styled-components/es/components/NumberInput/NumberInput.types.js +1 -0
  275. package/styled-components/es/components/NumberInput/index.js +2 -0
  276. package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.js +11 -0
  277. package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +8 -0
  278. package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.types.js +1 -0
  279. package/styled-components/es/components/NumberInput/ui/Input/Input.js +201 -0
  280. package/styled-components/es/components/NumberInput/ui/Input/Input.styles.js +41 -0
  281. package/styled-components/es/components/NumberInput/ui/Input/Input.types.js +1 -0
  282. package/styled-components/es/components/NumberInput/ui/index.js +2 -0
  283. package/styled-components/es/components/NumberInput/utils/index.js +1 -0
  284. package/styled-components/es/components/NumberInput/variations/_background-type/base.js +4 -0
  285. package/styled-components/es/components/NumberInput/variations/_background-type/tokens.json +6 -0
  286. package/styled-components/es/components/NumberInput/variations/_disabled/base.js +3 -0
  287. package/styled-components/es/components/NumberInput/variations/_disabled/tokens.json +4 -0
  288. package/styled-components/es/components/NumberInput/variations/_segmentation/base.js +6 -0
  289. package/styled-components/es/components/NumberInput/variations/_segmentation/tokens.json +1 -0
  290. package/styled-components/es/components/NumberInput/variations/_shape/base.js +5 -0
  291. package/styled-components/es/components/NumberInput/variations/_shape/tokens.json +1 -0
  292. package/styled-components/es/components/NumberInput/variations/_size/base.js +7 -0
  293. package/styled-components/es/components/NumberInput/variations/_size/tokens.json +22 -0
  294. package/styled-components/es/components/NumberInput/variations/_view/base.js +7 -0
  295. package/styled-components/es/components/NumberInput/variations/_view/tokens.json +14 -0
  296. package/styled-components/es/components/Tabs/tokens.js +1 -2
  297. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -20
  298. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  299. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -20
  300. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +2 -2
  301. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +0 -3
  302. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
  303. package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +40 -0
  304. package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.js +5 -0
  305. package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +108 -0
  306. package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
  307. package/styled-components/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
  308. package/styled-components/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
  309. package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +40 -0
  310. package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.js +5 -0
  311. package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +108 -0
  312. package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
  313. package/styled-components/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
  314. package/styled-components/es/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
  315. package/styled-components/es/index.js +2 -1
  316. package/types/components/Badge/Badge.d.ts +2 -10
  317. package/types/components/Badge/Badge.d.ts.map +1 -1
  318. package/types/components/Badge/Badge.tokens.d.ts +0 -1
  319. package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
  320. package/types/components/Badge/Badge.types.d.ts +0 -5
  321. package/types/components/Badge/Badge.types.d.ts.map +1 -1
  322. package/types/components/NumberInput/NumberInput.d.ts +38 -0
  323. package/types/components/NumberInput/NumberInput.d.ts.map +1 -0
  324. package/types/components/NumberInput/NumberInput.styles.d.ts +2 -0
  325. package/types/components/NumberInput/NumberInput.styles.d.ts.map +1 -0
  326. package/types/components/NumberInput/NumberInput.tokens.d.ts +88 -0
  327. package/types/components/NumberInput/NumberInput.tokens.d.ts.map +1 -0
  328. package/types/components/NumberInput/NumberInput.types.d.ts +112 -0
  329. package/types/components/NumberInput/NumberInput.types.d.ts.map +1 -0
  330. package/types/components/NumberInput/index.d.ts +3 -0
  331. package/types/components/NumberInput/index.d.ts.map +1 -0
  332. package/types/components/NumberInput/ui/ActionButton/ActionButton.d.ts +4 -0
  333. package/types/components/NumberInput/ui/ActionButton/ActionButton.d.ts.map +1 -0
  334. package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts +45 -0
  335. package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts.map +1 -0
  336. package/types/components/NumberInput/ui/ActionButton/ActionButton.types.d.ts +7 -0
  337. package/types/components/NumberInput/ui/ActionButton/ActionButton.types.d.ts.map +1 -0
  338. package/types/components/NumberInput/ui/Input/Input.d.ts +19 -0
  339. package/types/components/NumberInput/ui/Input/Input.d.ts.map +1 -0
  340. package/types/components/NumberInput/ui/Input/Input.styles.d.ts +30 -0
  341. package/types/components/NumberInput/ui/Input/Input.styles.d.ts.map +1 -0
  342. package/types/components/NumberInput/ui/Input/Input.types.d.ts +19 -0
  343. package/types/components/NumberInput/ui/Input/Input.types.d.ts.map +1 -0
  344. package/types/components/NumberInput/ui/index.d.ts +3 -0
  345. package/types/components/NumberInput/ui/index.d.ts.map +1 -0
  346. package/types/components/NumberInput/utils/index.d.ts +2 -0
  347. package/types/components/NumberInput/utils/index.d.ts.map +1 -0
  348. package/types/components/NumberInput/variations/_background-type/base.d.ts.map +1 -0
  349. package/types/components/NumberInput/variations/_disabled/base.d.ts.map +1 -0
  350. package/types/components/NumberInput/variations/_segmentation/base.d.ts.map +1 -0
  351. package/types/components/NumberInput/variations/_shape/base.d.ts +2 -0
  352. package/types/components/NumberInput/variations/_shape/base.d.ts.map +1 -0
  353. package/types/components/NumberInput/variations/_size/base.d.ts +2 -0
  354. package/types/components/NumberInput/variations/_size/base.d.ts.map +1 -0
  355. package/types/components/NumberInput/variations/_view/base.d.ts +2 -0
  356. package/types/components/NumberInput/variations/_view/base.d.ts.map +1 -0
  357. package/types/components/Tabs/TabItem.types.d.ts +0 -5
  358. package/types/components/Tabs/TabItem.types.d.ts.map +1 -1
  359. package/types/components/Tabs/tokens.d.ts +0 -1
  360. package/types/components/Tabs/tokens.d.ts.map +1 -1
  361. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.d.ts +2 -9
  362. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.d.ts.map +1 -1
  363. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.d.ts.map +1 -1
  364. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.d.ts +2 -9
  365. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.d.ts.map +1 -1
  366. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.d.ts.map +1 -1
  367. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts +0 -3
  368. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
  369. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +0 -6
  370. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
  371. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts +39 -0
  372. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts.map +1 -0
  373. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts +82 -0
  374. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts.map +1 -0
  375. package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts +0 -6
  376. package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts.map +1 -1
  377. package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.d.ts +0 -3
  378. package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.d.ts.map +1 -1
  379. package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.d.ts +0 -3
  380. package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.d.ts.map +1 -1
  381. package/types/examples/plasma_web/components/Badge/Badge.d.ts +0 -3
  382. package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
  383. package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts +39 -0
  384. package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts.map +1 -0
  385. package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts +82 -0
  386. package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts.map +1 -0
  387. package/types/examples/plasma_web/components/Tabs/TabItem.d.ts +0 -6
  388. package/types/examples/plasma_web/components/Tabs/TabItem.d.ts.map +1 -1
  389. package/types/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.d.ts +0 -3
  390. package/types/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.d.ts.map +1 -1
  391. package/types/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.d.ts +0 -3
  392. package/types/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.d.ts.map +1 -1
  393. package/types/index.d.ts +1 -0
  394. package/types/index.d.ts.map +1 -1
  395. package/cjs/components/Badge/variations/_truncate/base.js.map +0 -1
  396. package/cjs/components/Badge/variations/_truncate/base_nf9u2h.css +0 -1
  397. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js.map +0 -1
  398. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base_1b34xv3.css +0 -1
  399. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_hh65kv.css +0 -5
  400. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js.map +0 -1
  401. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base_1nwonlh.css +0 -1
  402. package/emotion/cjs/components/Badge/variations/_truncate/base.js +0 -10
  403. package/emotion/cjs/components/Badge/variations/_truncate/tokens.json +0 -1
  404. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +0 -10
  405. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +0 -1
  406. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +0 -10
  407. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +0 -1
  408. package/emotion/es/components/Badge/variations/_truncate/base.js +0 -4
  409. package/emotion/es/components/Badge/variations/_truncate/tokens.json +0 -1
  410. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +0 -4
  411. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +0 -1
  412. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +0 -4
  413. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +0 -1
  414. package/es/components/Badge/variations/_truncate/base.js.map +0 -1
  415. package/es/components/Badge/variations/_truncate/base_nf9u2h.css +0 -1
  416. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +0 -5
  417. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js.map +0 -1
  418. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base_1b34xv3.css +0 -1
  419. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_hh65kv.css +0 -5
  420. package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +0 -5
  421. package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js.map +0 -1
  422. package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base_1nwonlh.css +0 -1
  423. package/styled-components/cjs/components/Badge/variations/_truncate/base.js +0 -10
  424. package/styled-components/cjs/components/Badge/variations/_truncate/tokens.json +0 -1
  425. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +0 -10
  426. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +0 -1
  427. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +0 -10
  428. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +0 -1
  429. package/styled-components/es/components/Badge/variations/_truncate/base.js +0 -4
  430. package/styled-components/es/components/Badge/variations/_truncate/tokens.json +0 -1
  431. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +0 -4
  432. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +0 -1
  433. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +0 -4
  434. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +0 -1
  435. package/types/components/Badge/variations/_truncate/base.d.ts.map +0 -1
  436. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.d.ts.map +0 -1
  437. package/types/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.d.ts.map +0 -1
  438. /package/types/components/{Badge/variations/_truncate → NumberInput/variations/_background-type}/base.d.ts +0 -0
  439. /package/types/components/{Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate → NumberInput/variations/_disabled}/base.d.ts +0 -0
  440. /package/types/components/{Tabs/ui/vertical/VerticalTabItem/variations/_truncate → NumberInput/variations/_segmentation}/base.d.ts +0 -0
@@ -29,7 +29,6 @@ type CustomStoryTabsProps = {
29
29
 
30
30
  const contentLeftOptions = ['none', 'icon'];
31
31
  const contentRightOptions = ['none', 'counter', 'icon'];
32
- const labels = ['Label', 'Middle label', 'Very long label'];
33
32
 
34
33
  const getContentLeft = (contentLeftOption: string, size: string) => {
35
34
  const iconSize = size === 'xs' ? 'xs' : 's';
@@ -77,12 +76,6 @@ const meta: Meta<StoryTabsProps> = {
77
76
  },
78
77
  if: { arg: 'helperText', eq: '' },
79
78
  },
80
- maxItemWidth: {
81
- control: {
82
- type: 'text',
83
- },
84
- if: { arg: 'stretch', truthy: false },
85
- },
86
79
  },
87
80
  };
88
81
 
@@ -97,14 +90,13 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
97
90
  contentRight: contentRightOption,
98
91
  hasDivider,
99
92
  stretch,
100
- maxItemWidth,
101
93
  helperText,
102
94
  } = props;
103
95
  const items = Array(itemQuantity).fill(0);
104
96
  const [index, setIndex] = useState(0);
105
97
 
106
98
  return (
107
- <Tabs clip="none" view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
99
+ <Tabs view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
108
100
  {items.map((_, i) => {
109
101
  if (helperText !== '') {
110
102
  return (
@@ -118,9 +110,8 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
118
110
  value={helperText}
119
111
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
120
112
  size={size as Size}
121
- maxItemWidth={maxItemWidth}
122
113
  >
123
- {`${labels[i % labels.length]} ${i + 1}`}
114
+ {`Label${i + 1}`}
124
115
  </TabItem>
125
116
  );
126
117
  }
@@ -136,9 +127,8 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
136
127
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
137
128
  contentRight={getContentRight(contentRightOption, size as Size)}
138
129
  size={size as Size}
139
- maxItemWidth={maxItemWidth}
140
130
  >
141
- {`${labels[i % labels.length]} ${i + 1}`}
131
+ {`Label${i + 1}`}
142
132
  </TabItem>
143
133
  );
144
134
  })}
@@ -157,7 +147,6 @@ const StoryHorizontalScroll = (props: HorizontalStoryTabsProps) => {
157
147
  hasDivider,
158
148
  helperText,
159
149
  width,
160
- maxItemWidth,
161
150
  } = props;
162
151
  const items = Array(itemQuantity).fill(0);
163
152
  const [index, setIndex] = useState(0);
@@ -177,9 +166,8 @@ const StoryHorizontalScroll = (props: HorizontalStoryTabsProps) => {
177
166
  value={helperText}
178
167
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
179
168
  size={size as Size}
180
- maxItemWidth={maxItemWidth}
181
169
  >
182
- {`${labels[i % labels.length]} ${i + 1}`}
170
+ {`Label${i + 1}`}
183
171
  </TabItem>
184
172
  );
185
173
  }
@@ -195,9 +183,8 @@ const StoryHorizontalScroll = (props: HorizontalStoryTabsProps) => {
195
183
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
196
184
  contentRight={getContentRight(contentRightOption, size as Size)}
197
185
  size={size as Size}
198
- maxItemWidth={maxItemWidth}
199
186
  >
200
- {`${labels[i % labels.length]} ${i + 1}`}
187
+ {`Label${i + 1}`}
201
188
  </TabItem>
202
189
  );
203
190
  })}
@@ -215,7 +202,6 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
215
202
  contentRight: contentRightOption,
216
203
  hasDivider,
217
204
  helperText,
218
- maxItemWidth,
219
205
  } = props;
220
206
  const maxItemQuantity = 3;
221
207
  const items = Array(itemQuantity).fill(0);
@@ -248,9 +234,8 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
248
234
  value={helperText}
249
235
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
250
236
  size={size as Size}
251
- maxItemWidth={maxItemWidth}
252
237
  >
253
- {`${labels[i % labels.length]} ${i + 1}`}
238
+ {`Label${i + 1}`}
254
239
  </TabItem>
255
240
  );
256
241
  }
@@ -266,9 +251,8 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
266
251
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
267
252
  contentRight={getContentRight(contentRightOption, size as Size)}
268
253
  size={size as Size}
269
- maxItemWidth={maxItemWidth}
270
254
  >
271
- {`${labels[i % labels.length]} ${i + 1}`}
255
+ {`Label${i + 1}`}
272
256
  </TabItem>
273
257
  );
274
258
  })}
@@ -285,7 +269,6 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
285
269
  tabIndex={!disabled ? 0 : -1}
286
270
  disabled={disabled}
287
271
  size={size as Size}
288
- maxItemWidth="auto"
289
272
  >
290
273
  ShowAll
291
274
  </TabItem>
@@ -302,10 +285,9 @@ export const HorizontalTabs: StoryObj<HorizontalStoryTabsProps> = {
302
285
  disabled: false,
303
286
  hasDivider: true,
304
287
  helperText: '',
305
- itemQuantity: 6,
288
+ itemQuantity: 8,
306
289
  stretch: false,
307
290
  width: '15rem',
308
- maxItemWidth: '',
309
291
  },
310
292
  argTypes: {
311
293
  contentLeft: {
@@ -361,7 +343,6 @@ const StoryVerticalDefault = (props: VerticalStoryTabsProps) => {
361
343
  contentRight: contentRightOption,
362
344
  hasDivider,
363
345
  helperText,
364
- maxItemWidth,
365
346
  } = props;
366
347
  const items = Array(itemQuantity).fill(0);
367
348
  const [index, setIndex] = useState(0);
@@ -382,9 +363,8 @@ const StoryVerticalDefault = (props: VerticalStoryTabsProps) => {
382
363
  value={helperText}
383
364
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
384
365
  size={size as Size}
385
- maxItemWidth={maxItemWidth}
386
366
  >
387
- {`${labels[i % labels.length]} ${i + 1}`}
367
+ {`Label${i + 1}`}
388
368
  </TabItem>
389
369
  );
390
370
  }
@@ -401,9 +381,8 @@ const StoryVerticalDefault = (props: VerticalStoryTabsProps) => {
401
381
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
402
382
  contentRight={getContentRight(contentRightOption, size as Size)}
403
383
  size={size as Size}
404
- maxItemWidth={maxItemWidth}
405
384
  >
406
- {`${labels[i % labels.length]} ${i + 1}`}
385
+ {`Label${i + 1}`}
407
386
  </TabItem>
408
387
  );
409
388
  })}
@@ -422,7 +401,6 @@ const StoryVerticalScroll = (props: VerticalStoryTabsProps) => {
422
401
  hasDivider,
423
402
  helperText,
424
403
  height,
425
- maxItemWidth,
426
404
  } = props;
427
405
  const items = Array(itemQuantity).fill(0);
428
406
  const [index, setIndex] = useState(0);
@@ -450,9 +428,8 @@ const StoryVerticalScroll = (props: VerticalStoryTabsProps) => {
450
428
  value={helperText}
451
429
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
452
430
  size={size as Size}
453
- maxItemWidth={maxItemWidth}
454
431
  >
455
- {`${labels[i % labels.length]} ${i + 1}`}
432
+ {`Label${i + 1}`}
456
433
  </TabItem>
457
434
  );
458
435
  }
@@ -469,9 +446,8 @@ const StoryVerticalScroll = (props: VerticalStoryTabsProps) => {
469
446
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
470
447
  contentRight={getContentRight(contentRightOption, size as Size)}
471
448
  size={size as Size}
472
- maxItemWidth={maxItemWidth}
473
449
  >
474
- {`${labels[i % labels.length]} ${i + 1}`}
450
+ {`Label${i + 1}`}
475
451
  </TabItem>
476
452
  );
477
453
  })}
@@ -489,7 +465,6 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
489
465
  contentRight: contentRightOption,
490
466
  hasDivider,
491
467
  helperText,
492
- maxItemWidth,
493
468
  } = props;
494
469
  const maxItemQuantity = 3;
495
470
  const items = Array(itemQuantity).fill(0);
@@ -523,9 +498,8 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
523
498
  value={helperText}
524
499
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
525
500
  size={size as Size}
526
- maxItemWidth={maxItemWidth}
527
501
  >
528
- {`${labels[i % labels.length]} ${i + 1}`}
502
+ {`Label${i + 1}`}
529
503
  </TabItem>
530
504
  );
531
505
  }
@@ -542,9 +516,8 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
542
516
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
543
517
  contentRight={getContentRight(contentRightOption, size as Size)}
544
518
  size={size as Size}
545
- maxItemWidth={maxItemWidth}
546
519
  >
547
- {`${labels[i % labels.length]} ${i + 1}`}
520
+ {`Label${i + 1}`}
548
521
  </TabItem>
549
522
  );
550
523
  })}
@@ -561,7 +534,6 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
561
534
  tabIndex={!disabled ? 0 : -1}
562
535
  disabled={disabled}
563
536
  size={size as Size}
564
- maxItemWidth="auto"
565
537
  >
566
538
  ShowAll
567
539
  </TabItem>
@@ -576,11 +548,10 @@ export const VerticalTabs: StoryObj<VerticalStoryTabsProps> = {
576
548
  size: 'xs',
577
549
  disabled: false,
578
550
  hasDivider: true,
579
- itemQuantity: 6,
551
+ itemQuantity: 8,
580
552
  orientation: 'vertical',
581
553
  helperText: '',
582
554
  height: '10rem',
583
- maxItemWidth: '',
584
555
  },
585
556
  argTypes: {
586
557
  contentLeft: {
@@ -633,7 +604,7 @@ export const VerticalTabs: StoryObj<VerticalStoryTabsProps> = {
633
604
  };
634
605
 
635
606
  const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
636
- const { disabled, itemQuantity, size, helperText, maxItemWidth } = props;
607
+ const { disabled, itemQuantity, size, helperText } = props;
637
608
  const items = Array(itemQuantity).fill(0);
638
609
  const [index, setIndex] = useState(0);
639
610
 
@@ -649,7 +620,6 @@ const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
649
620
  disabled={disabled}
650
621
  value={helperText}
651
622
  size={size as HeaderSize}
652
- maxItemWidth={maxItemWidth}
653
623
  >
654
624
  {`Label${i + 1}`}
655
625
  </TabItem>
@@ -659,7 +629,7 @@ const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
659
629
  };
660
630
 
661
631
  const StoryHeaderScroll = (props: HorizontalStoryTabsProps) => {
662
- const { disabled, itemQuantity, size, helperText, width, maxItemWidth } = props;
632
+ const { disabled, itemQuantity, size, helperText, width } = props;
663
633
  const items = Array(itemQuantity).fill(0);
664
634
  const [index, setIndex] = useState(0);
665
635
 
@@ -675,9 +645,8 @@ const StoryHeaderScroll = (props: HorizontalStoryTabsProps) => {
675
645
  disabled={disabled}
676
646
  value={helperText}
677
647
  size={size as HeaderSize}
678
- maxItemWidth={maxItemWidth}
679
648
  >
680
- {`${labels[i % labels.length]} ${i + 1}`}
649
+ {`Label${i + 1}`}
681
650
  </TabItem>
682
651
  ))}
683
652
  </Tabs>
@@ -689,9 +658,8 @@ export const HeaderTabs: StoryObj<HorizontalStoryTabsProps> = {
689
658
  size: 'h5',
690
659
  disabled: false,
691
660
  helperText: '',
692
- itemQuantity: 4,
661
+ itemQuantity: 6,
693
662
  width: '12rem',
694
- maxItemWidth: '',
695
663
  },
696
664
  argTypes: {
697
665
  clip: {
@@ -34,9 +34,6 @@ var config = exports.config = {
34
34
  },
35
35
  pilled: {
36
36
  "true": /*#__PURE__*/(0, _styledComponents.css)(["", ":1.5rem;"], _Tabs.tabsTokens.itemPilledBorderRadius)
37
- },
38
- truncate: {
39
- "true": /*#__PURE__*/(0, _styledComponents.css)([""])
40
37
  }
41
38
  }
42
39
  };
@@ -23,9 +23,6 @@ var config = exports.config = {
23
23
  },
24
24
  disabled: {
25
25
  "true": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.4;"], _Tabs.tabsTokens.disabledOpacity)
26
- },
27
- truncate: {
28
- "true": /*#__PURE__*/(0, _styledComponents.css)([""])
29
26
  }
30
27
  }
31
28
  };
@@ -684,4 +684,15 @@ Object.keys(_ViewContainer).forEach(function (key) {
684
684
  return _ViewContainer[key];
685
685
  }
686
686
  });
687
+ });
688
+ var _NumberInput = /*#__PURE__*/require("./components/NumberInput");
689
+ Object.keys(_NumberInput).forEach(function (key) {
690
+ if (key === "default" || key === "__esModule") return;
691
+ if (key in exports && exports[key] === _NumberInput[key]) return;
692
+ Object.defineProperty(exports, key, {
693
+ enumerable: true,
694
+ get: function get() {
695
+ return _NumberInput[key];
696
+ }
697
+ });
687
698
  });
@@ -1,11 +1,5 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["children", "className", "text", "contentLeft", "contentRight", "size", "view", "pilled", "transparent", "clear", "maxWidth"];
1
+ var _excluded = ["children", "className", "text", "contentLeft", "contentRight", "size", "view", "pilled", "transparent", "clear"];
3
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
5
  import React, { forwardRef } from 'react';
@@ -15,7 +9,6 @@ import { base as sizeCSS } from './variations/_size/base';
15
9
  import { base as pilledCSS } from './variations/_pilled/base';
16
10
  import { base as transparentCSS } from './variations/_transparent/base';
17
11
  import { base as clearCSS } from './variations/_clear/base';
18
- import { base as truncateCSS } from './variations/_truncate/base';
19
12
  import { StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Badge.styles';
20
13
  import { classes } from './Badge.tokens';
21
14
  export var badgeRoot = function badgeRoot(Root) {
@@ -33,28 +26,20 @@ export var badgeRoot = function badgeRoot(Root) {
33
26
  transparent = _props$transparent === void 0 ? false : _props$transparent,
34
27
  _props$clear = props.clear,
35
28
  clear = _props$clear === void 0 ? false : _props$clear,
36
- _props$maxWidth = props.maxWidth,
37
- maxWidth = _props$maxWidth === void 0 ? 'auto' : _props$maxWidth,
38
29
  rest = _objectWithoutProperties(props, _excluded);
39
30
  var pilledClass = pilled ? classes.badgePilled : undefined;
40
31
  var transparentClass = transparent ? classes.badgeTransparent : undefined;
41
32
  var clearClass = clear ? classes.badgeClear : undefined;
42
33
  var txt = !text && typeof children === 'string' ? children : text;
43
- var truncate = maxWidth !== 'auto';
44
34
  return /*#__PURE__*/React.createElement(Root, _extends({
45
35
  ref: ref,
46
- className: cx(pilledClass, transparentClass, clearClass, truncate && classes.badgeTruncate, className),
36
+ className: cx(pilledClass, transparentClass, clearClass, className),
47
37
  view: view,
48
38
  size: size,
49
39
  pilled: pilled,
50
40
  transparent: transparent,
51
- clear: clear,
52
- truncate: truncate
53
- }, rest, {
54
- style: _objectSpread(_objectSpread({}, rest.style), {}, {
55
- maxWidth: maxWidth
56
- })
57
- }), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight));
41
+ clear: clear
42
+ }, rest), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight));
58
43
  });
59
44
  };
60
45
  export var badgeConfig = {
@@ -80,10 +65,6 @@ export var badgeConfig = {
80
65
  clear: {
81
66
  css: clearCSS,
82
67
  attrs: true
83
- },
84
- truncate: {
85
- css: truncateCSS,
86
- attrs: true
87
68
  }
88
69
  },
89
70
  defaults: {
@@ -1,8 +1,7 @@
1
1
  export var classes = {
2
2
  badgePilled: 'badge-pilled',
3
3
  badgeTransparent: 'badge-transparent',
4
- badgeClear: 'badge-clear',
5
- badgeTruncate: 'badge-truncate'
4
+ badgeClear: 'badge-clear'
6
5
  };
7
6
  export var tokens = {
8
7
  background: '--plasma-badge-background',
@@ -0,0 +1,198 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _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"];
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
12
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
13
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
14
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
16
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
17
+ import React, { forwardRef, useState } from 'react';
18
+ import { cx, getSizeValueFromProp } from '../../utils';
19
+ import { IconMinus, IconPlus } from '../_Icon';
20
+ import { ActionButton, NumberInput } from './ui';
21
+ import { classes, privateTokens } from './NumberInput.tokens';
22
+ import { base } from './NumberInput.styles';
23
+ import { base as viewCSS } from './variations/_view/base';
24
+ import { base as sizeCSS } from './variations/_size/base';
25
+ import { base as shapeCSS } from './variations/_shape/base';
26
+ import { base as inputBackgroundTypeCSS } from './variations/_background-type/base';
27
+ import { base as segmentationCSS } from './variations/_segmentation/base';
28
+ import { base as disabledCSS } from './variations/_disabled/base';
29
+ export var numberInputRoot = function numberInputRoot(Root) {
30
+ return /*#__PURE__*/forwardRef(function (_ref, ref) {
31
+ var _ref2;
32
+ var className = _ref.className,
33
+ style = _ref.style,
34
+ width = _ref.width,
35
+ value = _ref.value,
36
+ min = _ref.min,
37
+ max = _ref.max,
38
+ _ref$step = _ref.step,
39
+ step = _ref$step === void 0 ? 1 : _ref$step,
40
+ isLoading = _ref.isLoading,
41
+ loader = _ref.loader,
42
+ size = _ref.size,
43
+ view = _ref.view,
44
+ clear = _ref.clear,
45
+ shape = _ref.shape,
46
+ segmentation = _ref.segmentation,
47
+ _ref$inputBackgroundT = _ref.inputBackgroundType,
48
+ inputBackgroundType = _ref$inputBackgroundT === void 0 ? 'fill' : _ref$inputBackgroundT,
49
+ disabled = _ref.disabled,
50
+ textBefore = _ref.textBefore,
51
+ textAfter = _ref.textAfter,
52
+ customIncrementButton = _ref.customIncrementButton,
53
+ incrementIcon = _ref.incrementIcon,
54
+ customDecrementButton = _ref.customDecrementButton,
55
+ decrementIcon = _ref.decrementIcon,
56
+ isManualInput = _ref.isManualInput,
57
+ onChange = _ref.onChange,
58
+ onIncrement = _ref.onIncrement,
59
+ onDecrement = _ref.onDecrement,
60
+ rest = _objectWithoutProperties(_ref, _excluded);
61
+ var _useState = useState((_ref2 = value !== null && value !== void 0 ? value : min) !== null && _ref2 !== void 0 ? _ref2 : 0),
62
+ _useState2 = _slicedToArray(_useState, 2),
63
+ innerValue = _useState2[0],
64
+ setInnerValue = _useState2[1];
65
+ var _useState3 = useState(false),
66
+ _useState4 = _slicedToArray(_useState3, 2),
67
+ isInputFocused = _useState4[0],
68
+ setIsInputFocused = _useState4[1];
69
+ var _useState5 = useState(false),
70
+ _useState6 = _slicedToArray(_useState5, 2),
71
+ isAnimationRun = _useState6[0],
72
+ setIsAnimationRun = _useState6[1];
73
+ var innerWidth = width ? getSizeValueFromProp(width) : '100%';
74
+ var actionIconSize = size === 'xs' ? 'xs' : 's';
75
+ var solidViewClass = segmentation === 'solid' ? classes.solidView : undefined;
76
+ var segmentedViewClass = segmentation === 'segmented' ? classes.segmentedView : undefined;
77
+ var clearViewClass = clear ? classes.clearView : undefined;
78
+ var disabledClass = disabled ? classes.disabled : undefined;
79
+ var loadingClass = isLoading ? classes.loading : undefined;
80
+ var focusedClass = isInputFocused ? classes.focused : undefined;
81
+ var isMinValue = function isMinValue(currentValue) {
82
+ return min !== undefined && currentValue <= Number(min);
83
+ };
84
+ var isMaxValue = function isMaxValue(currentValue) {
85
+ return max !== undefined && currentValue >= Number(max);
86
+ };
87
+ var decrementButtonDisabled = isMinValue(Number(innerValue)) && !isAnimationRun || isLoading ? classes.actionButtonDecrementDisabled : undefined;
88
+ var incrementButtonDisabled = isMaxValue(Number(innerValue)) && !isAnimationRun || isLoading ? classes.actionButtonIncrementDisabled : undefined;
89
+ var handleDecrement = function handleDecrement() {
90
+ if (isLoading || disabled || isAnimationRun) {
91
+ return;
92
+ }
93
+ var diffValue = Number(innerValue) - step;
94
+ var resValue = !isMinValue(diffValue) ? diffValue : Number(min);
95
+ setInnerValue(resValue);
96
+ if (onDecrement) {
97
+ onDecrement(resValue);
98
+ }
99
+ if (onChange) {
100
+ onChange(null, resValue);
101
+ }
102
+ };
103
+ var handleIncrement = function handleIncrement() {
104
+ if (isLoading || disabled || isAnimationRun) {
105
+ return;
106
+ }
107
+ var diffValue = Number(innerValue) + step;
108
+ var resValue = !isMaxValue(diffValue) ? diffValue : Number(max);
109
+ setInnerValue(resValue);
110
+ if (onIncrement) {
111
+ onIncrement(resValue);
112
+ }
113
+ if (onChange) {
114
+ onChange(null, resValue);
115
+ }
116
+ };
117
+ return /*#__PURE__*/React.createElement(Root, _extends({
118
+ view: view,
119
+ size: size,
120
+ disabled: disabled,
121
+ clear: clear,
122
+ shape: shape,
123
+ segmentation: segmentation,
124
+ isLoading: isLoading
125
+ }, segmentation === 'solid' ? {
126
+ inputBackgroundType: 'clear'
127
+ } : {
128
+ inputBackgroundType: inputBackgroundType
129
+ }, {
130
+ className: cx(className, solidViewClass, segmentedViewClass, clearViewClass, disabledClass, loadingClass, focusedClass),
131
+ style: _objectSpread(_objectSpread({}, style), {}, _defineProperty({}, privateTokens.inputWidth, innerWidth))
132
+ }), customDecrementButton || /*#__PURE__*/React.createElement(ActionButton, {
133
+ className: cx(classes.actionButtonDecrement, decrementButtonDisabled, solidViewClass, segmentedViewClass),
134
+ icon: decrementIcon || /*#__PURE__*/React.createElement(IconMinus, {
135
+ color: "inherit",
136
+ size: actionIconSize
137
+ }),
138
+ onClick: handleDecrement
139
+ }), /*#__PURE__*/React.createElement(NumberInput, _extends({
140
+ ref: ref,
141
+ segmentation: segmentation,
142
+ value: innerValue,
143
+ min: min,
144
+ max: max,
145
+ isManualInput: isManualInput,
146
+ textBefore: textBefore,
147
+ textAfter: textAfter,
148
+ isLoading: isLoading,
149
+ loader: loader,
150
+ disabled: disabled,
151
+ isInputFocused: isInputFocused,
152
+ setIsInputFocused: setIsInputFocused,
153
+ setIsAnimationRun: setIsAnimationRun,
154
+ setInnerValue: setInnerValue,
155
+ onChange: onChange
156
+ }, rest)), customIncrementButton || /*#__PURE__*/React.createElement(ActionButton, {
157
+ className: cx(classes.actionButtonIncrement, incrementButtonDisabled, solidViewClass, segmentedViewClass),
158
+ icon: incrementIcon || /*#__PURE__*/React.createElement(IconPlus, {
159
+ color: "inherit",
160
+ size: actionIconSize
161
+ }),
162
+ onClick: handleIncrement
163
+ }));
164
+ });
165
+ };
166
+ export var numberInputConfig = {
167
+ name: 'NumberInput',
168
+ tag: 'div',
169
+ layout: numberInputRoot,
170
+ base: base,
171
+ variations: {
172
+ view: {
173
+ css: viewCSS
174
+ },
175
+ size: {
176
+ css: sizeCSS
177
+ },
178
+ shape: {
179
+ css: shapeCSS
180
+ },
181
+ inputBackgroundType: {
182
+ css: inputBackgroundTypeCSS
183
+ },
184
+ segmentation: {
185
+ css: segmentationCSS
186
+ },
187
+ disabled: {
188
+ css: disabledCSS,
189
+ attrs: true
190
+ }
191
+ },
192
+ defaults: {
193
+ view: 'default',
194
+ size: 'l',
195
+ shape: 'cornered',
196
+ segmentation: 'default'
197
+ }
198
+ };
@@ -0,0 +1,2 @@
1
+ import { css } from 'styled-components';
2
+ export var base = /*#__PURE__*/css(["display:flex;align-items:center;"]);