@salutejs/sdds-cs 0.319.0-canary.2020.15831403447.0 → 0.319.0-canary.2021.15776478579.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (960) hide show
  1. package/components/Accordion/Accordion.config.js +19 -101
  2. package/components/Accordion/Accordion.js +12 -18
  3. package/components/Accordion/index.js +14 -15
  4. package/components/Attach/Attach.config.js +26 -267
  5. package/components/Attach/Attach.js +11 -11
  6. package/components/Attach/index.js +7 -6
  7. package/components/Autocomplete/Autocomplete.config.js +30 -247
  8. package/components/Autocomplete/Autocomplete.js +7 -11
  9. package/components/Autocomplete/index.js +7 -6
  10. package/components/Avatar/Avatar.config.js +31 -197
  11. package/components/Avatar/Avatar.js +7 -19
  12. package/components/Avatar/index.js +7 -6
  13. package/components/AvatarGroup/AvatarGroup.js +6 -10
  14. package/components/AvatarGroup/index.js +7 -6
  15. package/components/Badge/Badge.config.js +30 -145
  16. package/components/Badge/Badge.js +11 -11
  17. package/components/Badge/index.js +7 -6
  18. package/components/Breadcrumbs/Breadcrumbs.config.js +18 -60
  19. package/components/Breadcrumbs/Breadcrumbs.js +12 -12
  20. package/components/Breadcrumbs/index.js +7 -6
  21. package/components/Button/Button.config.js +30 -174
  22. package/components/Button/Button.js +41 -146
  23. package/components/Button/index.js +7 -6
  24. package/components/ButtonBase/index.js +7 -6
  25. package/components/ButtonGroup/ButtonGroup.config.js +38 -228
  26. package/components/ButtonGroup/ButtonGroup.js +11 -11
  27. package/components/ButtonGroup/index.js +7 -6
  28. package/components/Calendar/Calendar.js +18 -39
  29. package/components/Calendar/CalendarBase.config.js +18 -128
  30. package/components/Calendar/CalendarDouble.config.js +18 -128
  31. package/components/Calendar/index.js +32 -24
  32. package/components/Card/Card.config.js +20 -81
  33. package/components/Card/Card.js +23 -22
  34. package/components/Card/index.js +20 -18
  35. package/components/Cell/Cell.config.js +16 -110
  36. package/components/Cell/Cell.js +12 -12
  37. package/components/Cell/index.js +33 -25
  38. package/components/Checkbox/Checkbox.config.js +25 -104
  39. package/components/Checkbox/Checkbox.js +11 -12
  40. package/components/Checkbox/index.js +7 -6
  41. package/components/Chip/Chip.config.js +25 -162
  42. package/components/Chip/Chip.js +12 -12
  43. package/components/Chip/index.js +7 -6
  44. package/components/ChipGroup/ChipGroup.config.js +24 -127
  45. package/components/ChipGroup/ChipGroup.js +7 -11
  46. package/components/ChipGroup/index.js +7 -6
  47. package/components/Combobox/Combobox.config.js +30 -313
  48. package/components/Combobox/Combobox.js +15 -50
  49. package/components/Combobox/index.js +7 -6
  50. package/components/Counter/Counter.config.js +21 -95
  51. package/components/Counter/Counter.js +11 -11
  52. package/components/Counter/index.js +15 -16
  53. package/components/DatePicker/DatePicker.config.js +24 -264
  54. package/components/DatePicker/DatePicker.js +9 -21
  55. package/components/DatePicker/index.js +27 -22
  56. package/components/Divider/Divider.config.js +27 -109
  57. package/components/Divider/Divider.js +11 -11
  58. package/components/Divider/index.js +15 -16
  59. package/components/Drawer/Drawer.config.js +22 -79
  60. package/components/Drawer/Drawer.js +29 -31
  61. package/components/Drawer/index.js +26 -21
  62. package/components/Dropdown/Dropdown.config.js +18 -94
  63. package/components/Dropdown/Dropdown.js +15 -50
  64. package/components/Dropdown/index.js +7 -6
  65. package/components/Dropzone/Dropzone.config.js +21 -86
  66. package/components/Dropzone/Dropzone.js +7 -11
  67. package/components/Dropzone/index.js +21 -19
  68. package/components/EmptyState/EmptyState.config.js +18 -114
  69. package/components/EmptyState/EmptyState.js +7 -19
  70. package/components/EmptyState/index.js +7 -6
  71. package/components/Flow/Flow.config.js +7 -11
  72. package/components/Flow/Flow.js +7 -11
  73. package/components/Flow/index.js +7 -6
  74. package/components/Grid/Grid.config.js +19 -71
  75. package/components/Grid/Grid.js +18 -21
  76. package/components/Grid/index.js +20 -18
  77. package/components/IconButton/IconButton.config.js +28 -146
  78. package/components/IconButton/IconButton.js +12 -12
  79. package/components/IconButton/index.js +7 -6
  80. package/components/Image/Image.component-test.js +92 -0
  81. package/components/Image/Image.js +11 -11
  82. package/components/Image/index.js +7 -6
  83. package/components/Indicator/Indicator.config.js +26 -138
  84. package/components/Indicator/Indicator.js +7 -19
  85. package/components/Indicator/index.js +7 -6
  86. package/components/Link/Link.config.js +29 -214
  87. package/components/Link/Link.js +11 -12
  88. package/components/Link/index.js +7 -6
  89. package/components/Mask/Mask.js +6 -10
  90. package/components/Mask/index.js +7 -6
  91. package/components/Modal/Modal.config.js +15 -47
  92. package/components/Modal/Modal.js +12 -12
  93. package/components/Modal/index.js +15 -16
  94. package/components/Notification/Notification.config.js +26 -163
  95. package/components/Notification/Notification.js +23 -38
  96. package/components/Notification/index.js +27 -22
  97. package/components/NumberFormat/NumberFormat.js +13 -10
  98. package/components/NumberFormat/index.js +7 -6
  99. package/components/NumberInput/NumberInput.config.js +34 -154
  100. package/components/NumberInput/NumberInput.js +7 -11
  101. package/components/NumberInput/index.js +21 -19
  102. package/components/Overlay/index.js +7 -6
  103. package/components/Pagination/Pagination.component-test.js +298 -0
  104. package/components/Pagination/Pagination.config.js +26 -139
  105. package/components/Pagination/Pagination.js +12 -12
  106. package/components/Pagination/index.js +7 -6
  107. package/components/Popover/Popover.config.js +15 -43
  108. package/components/Popover/Popover.js +7 -11
  109. package/components/Popover/index.js +7 -6
  110. package/components/Popup/Popup.js +10 -10
  111. package/components/Popup/index.js +27 -22
  112. package/components/Portal/index.js +7 -6
  113. package/components/Price/Price.config.js +11 -15
  114. package/components/Price/Price.js +12 -12
  115. package/components/Price/index.js +15 -16
  116. package/components/Progress/Progress.config.js +21 -95
  117. package/components/Progress/Progress.js +8 -12
  118. package/components/Progress/index.js +7 -6
  119. package/components/Radiobox/Radiobox.config.js +31 -106
  120. package/components/Radiobox/Radiobox.js +16 -19
  121. package/components/Radiobox/index.js +14 -15
  122. package/components/Range/Range.config.js +24 -157
  123. package/components/Range/Range.js +11 -11
  124. package/components/Range/index.js +15 -16
  125. package/components/Rating/Rating.config.js +20 -117
  126. package/components/Rating/Rating.js +7 -11
  127. package/components/Rating/index.js +21 -19
  128. package/components/SSRProvider/index.js +7 -6
  129. package/components/Segment/Segment.js +32 -27
  130. package/components/Segment/SegmentGroup.config.js +34 -130
  131. package/components/Segment/SegmentItem.config.js +25 -124
  132. package/components/Segment/index.js +26 -21
  133. package/components/Select/Select.config.js +35 -305
  134. package/components/Select/Select.js +15 -50
  135. package/components/Select/index.js +7 -6
  136. package/components/Sheet/Sheet.config.js +18 -63
  137. package/components/Sheet/Sheet.js +12 -12
  138. package/components/Sheet/index.js +15 -16
  139. package/components/Skeleton/LineSkeleton.config.js +31 -230
  140. package/components/Skeleton/Skeleton.js +20 -25
  141. package/components/Skeleton/index.js +26 -21
  142. package/components/Slider/Slider.component-test.js +223 -0
  143. package/components/Slider/Slider.config.js +22 -147
  144. package/components/Slider/Slider.js +13 -12
  145. package/components/Slider/index.js +7 -6
  146. package/components/Spinner/Spinner.config.js +23 -107
  147. package/components/Spinner/Spinner.js +15 -23
  148. package/components/Spinner/index.js +7 -6
  149. package/components/Steps/Steps.config.js +18 -105
  150. package/components/Steps/Steps.js +8 -12
  151. package/components/Steps/index.js +7 -6
  152. package/components/Switch/Switch.config.js +31 -149
  153. package/components/Switch/Switch.js +8 -12
  154. package/components/Switch/index.js +7 -6
  155. package/components/Table/Table.config.js +21 -257
  156. package/components/Table/Table.js +12 -12
  157. package/components/Table/index.js +7 -6
  158. package/components/Tabs/TabItem.js +21 -26
  159. package/components/Tabs/Tabs.js +21 -26
  160. package/components/Tabs/TabsController.js +16 -15
  161. package/components/Tabs/horizontal/HorizontalTabItem.config.js +30 -230
  162. package/components/Tabs/horizontal/HorizontalTabs.config.js +37 -266
  163. package/components/Tabs/index.js +35 -27
  164. package/components/Tabs/vertical/VerticalTabItem.config.js +24 -125
  165. package/components/Tabs/vertical/VerticalTabs.config.js +24 -98
  166. package/components/TextArea/TextArea.config.js +42 -367
  167. package/components/TextArea/TextArea.js +12 -12
  168. package/components/TextArea/index.js +7 -6
  169. package/components/TextField/TextField.config.js +40 -338
  170. package/components/TextField/TextField.js +11 -11
  171. package/components/TextField/index.js +15 -16
  172. package/components/Toast/Toast.config.js +35 -127
  173. package/components/Toast/Toast.js +14 -26
  174. package/components/Toast/index.js +20 -18
  175. package/components/ToastNew/ToastNew.config.js +21 -80
  176. package/components/ToastNew/ToastNew.js +8 -20
  177. package/components/ToastNew/index.js +14 -15
  178. package/components/Tokens/Colors/Colors.styles.js +51 -147
  179. package/components/Tokens/NumberTokens/NumberTokens.styles.js +23 -70
  180. package/components/Tokens/Typography/Typography.styles.js +76 -204
  181. package/components/Toolbar/Toolbar.config.js +18 -57
  182. package/components/Toolbar/Toolbar.js +13 -21
  183. package/components/Toolbar/index.js +21 -19
  184. package/components/Tooltip/Tooltip.config.js +19 -71
  185. package/components/Tooltip/Tooltip.js +7 -11
  186. package/components/Tooltip/index.js +7 -6
  187. package/components/Tree/Tree.config.js +18 -83
  188. package/components/Tree/Tree.js +7 -11
  189. package/components/Tree/index.js +7 -6
  190. package/components/Typography/Body.config.js +47 -161
  191. package/components/Typography/Dspl.config.js +31 -105
  192. package/components/Typography/Heading.config.js +47 -161
  193. package/components/Typography/Text.config.js +39 -133
  194. package/components/Typography/Typography.js +59 -116
  195. package/components/Typography/index.js +106 -62
  196. package/components/ViewContainer/ViewContainer.config.js +14 -46
  197. package/components/ViewContainer/ViewContainer.js +7 -11
  198. package/components/ViewContainer/index.js +7 -6
  199. package/emotion/cjs/components/Accordion/Accordion.config.js +19 -101
  200. package/emotion/cjs/components/Accordion/Accordion.js +12 -18
  201. package/emotion/cjs/components/Accordion/Accordion.stories.tsx +159 -0
  202. package/emotion/cjs/components/Accordion/index.js +14 -15
  203. package/emotion/cjs/components/Attach/Attach.config.js +26 -267
  204. package/emotion/cjs/components/Attach/Attach.js +11 -11
  205. package/emotion/cjs/components/Attach/Attach.stories.tsx +157 -0
  206. package/emotion/cjs/components/Attach/index.js +7 -6
  207. package/emotion/cjs/components/Autocomplete/Autocomplete.config.js +30 -247
  208. package/emotion/cjs/components/Autocomplete/Autocomplete.js +7 -11
  209. package/emotion/cjs/components/Autocomplete/Autocomplete.stories.tsx +170 -0
  210. package/emotion/cjs/components/Autocomplete/index.js +7 -6
  211. package/emotion/cjs/components/Avatar/Avatar.config.js +31 -197
  212. package/emotion/cjs/components/Avatar/Avatar.js +7 -19
  213. package/emotion/cjs/components/Avatar/Avatar.stories.tsx +74 -0
  214. package/emotion/cjs/components/Avatar/index.js +7 -6
  215. package/emotion/cjs/components/AvatarGroup/AvatarGroup.js +6 -10
  216. package/emotion/cjs/components/AvatarGroup/AvatarGroup.stories.tsx +71 -0
  217. package/emotion/cjs/components/AvatarGroup/index.js +7 -6
  218. package/emotion/cjs/components/Badge/Badge.config.js +30 -145
  219. package/emotion/cjs/components/Badge/Badge.js +11 -11
  220. package/emotion/cjs/components/Badge/Badge.stories.tsx +87 -0
  221. package/emotion/cjs/components/Badge/index.js +7 -6
  222. package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.config.js +18 -60
  223. package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.js +12 -12
  224. package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.stories.tsx +82 -0
  225. package/emotion/cjs/components/Breadcrumbs/index.js +7 -6
  226. package/emotion/cjs/components/Button/Button.config.js +30 -174
  227. package/emotion/cjs/components/Button/Button.js +41 -146
  228. package/emotion/cjs/components/Button/Button.stories.tsx +212 -0
  229. package/emotion/cjs/components/Button/index.js +7 -6
  230. package/emotion/cjs/components/ButtonBase/index.js +7 -6
  231. package/emotion/cjs/components/ButtonGroup/ButtonGroup.config.js +38 -228
  232. package/emotion/cjs/components/ButtonGroup/ButtonGroup.js +11 -11
  233. package/emotion/cjs/components/ButtonGroup/ButtonGroup.stories.tsx +109 -0
  234. package/emotion/cjs/components/ButtonGroup/index.js +7 -6
  235. package/emotion/cjs/components/Calendar/Calendar.js +18 -39
  236. package/emotion/cjs/components/Calendar/Calendar.stories.tsx +304 -0
  237. package/emotion/cjs/components/Calendar/CalendarBase.config.js +18 -128
  238. package/emotion/cjs/components/Calendar/CalendarDouble.config.js +18 -128
  239. package/emotion/cjs/components/Calendar/index.js +32 -24
  240. package/emotion/cjs/components/Card/Card.config.js +20 -81
  241. package/emotion/cjs/components/Card/Card.js +23 -22
  242. package/emotion/cjs/components/Card/Card.stories.tsx +281 -0
  243. package/emotion/cjs/components/Card/index.js +20 -18
  244. package/emotion/cjs/components/Cell/Cell.config.js +16 -110
  245. package/emotion/cjs/components/Cell/Cell.js +12 -12
  246. package/emotion/cjs/components/Cell/Cell.stories.tsx +97 -0
  247. package/emotion/cjs/components/Cell/index.js +33 -25
  248. package/emotion/cjs/components/Checkbox/Checkbox.config.js +25 -104
  249. package/emotion/cjs/components/Checkbox/Checkbox.js +11 -12
  250. package/emotion/cjs/components/Checkbox/Checkbox.stories.tsx +232 -0
  251. package/emotion/cjs/components/Checkbox/index.js +7 -6
  252. package/emotion/cjs/components/Chip/Chip.config.js +25 -162
  253. package/emotion/cjs/components/Chip/Chip.js +12 -12
  254. package/emotion/cjs/components/Chip/Chip.stories.tsx +93 -0
  255. package/emotion/cjs/components/Chip/index.js +7 -6
  256. package/emotion/cjs/components/ChipGroup/ChipGroup.config.js +24 -127
  257. package/emotion/cjs/components/ChipGroup/ChipGroup.js +7 -11
  258. package/emotion/cjs/components/ChipGroup/ChipGroup.stories.tsx +79 -0
  259. package/emotion/cjs/components/ChipGroup/index.js +7 -6
  260. package/emotion/cjs/components/Combobox/Combobox.config.js +30 -313
  261. package/emotion/cjs/components/Combobox/Combobox.js +15 -50
  262. package/emotion/cjs/components/Combobox/Combobox.stories.tsx +604 -0
  263. package/emotion/cjs/components/Combobox/index.js +7 -6
  264. package/emotion/cjs/components/Counter/Counter.config.js +21 -95
  265. package/emotion/cjs/components/Counter/Counter.js +11 -11
  266. package/emotion/cjs/components/Counter/Counter.stories.tsx +34 -0
  267. package/emotion/cjs/components/Counter/index.js +15 -16
  268. package/emotion/cjs/components/DatePicker/DatePicker.config.js +24 -264
  269. package/emotion/cjs/components/DatePicker/DatePicker.js +9 -21
  270. package/emotion/cjs/components/DatePicker/DatePicker.stories.tsx +309 -0
  271. package/emotion/cjs/components/DatePicker/index.js +27 -22
  272. package/emotion/cjs/components/Divider/Divider.config.js +27 -109
  273. package/emotion/cjs/components/Divider/Divider.js +11 -11
  274. package/emotion/cjs/components/Divider/Divider.stories.tsx +58 -0
  275. package/emotion/cjs/components/Divider/index.js +15 -16
  276. package/emotion/cjs/components/Drawer/Drawer.config.js +22 -79
  277. package/emotion/cjs/components/Drawer/Drawer.js +29 -31
  278. package/emotion/cjs/components/Drawer/Drawer.stories.tsx +217 -0
  279. package/emotion/cjs/components/Drawer/index.js +26 -21
  280. package/emotion/cjs/components/Dropdown/Dropdown.config.js +18 -94
  281. package/emotion/cjs/components/Dropdown/Dropdown.js +15 -50
  282. package/emotion/cjs/components/Dropdown/Dropdown.stories.tsx +331 -0
  283. package/emotion/cjs/components/Dropdown/index.js +7 -6
  284. package/emotion/cjs/components/Dropzone/Dropzone.config.js +21 -86
  285. package/emotion/cjs/components/Dropzone/Dropzone.js +7 -11
  286. package/emotion/cjs/components/Dropzone/Dropzone.stories.tsx +58 -0
  287. package/emotion/cjs/components/Dropzone/index.js +21 -19
  288. package/emotion/cjs/components/EmptyState/EmptyState.config.js +18 -114
  289. package/emotion/cjs/components/EmptyState/EmptyState.js +7 -19
  290. package/emotion/cjs/components/EmptyState/EmptyState.stories.tsx +43 -0
  291. package/emotion/cjs/components/EmptyState/index.js +7 -6
  292. package/emotion/cjs/components/Flow/Flow.config.js +7 -11
  293. package/emotion/cjs/components/Flow/Flow.js +7 -11
  294. package/emotion/cjs/components/Flow/Flow.stories.tsx +133 -0
  295. package/emotion/cjs/components/Flow/index.js +7 -6
  296. package/emotion/cjs/components/Grid/Grid.config.js +19 -71
  297. package/emotion/cjs/components/Grid/Grid.js +18 -21
  298. package/emotion/cjs/components/Grid/Grid.stories.tsx +119 -0
  299. package/emotion/cjs/components/Grid/index.js +20 -18
  300. package/emotion/cjs/components/IconButton/IconButton.config.js +28 -146
  301. package/emotion/cjs/components/IconButton/IconButton.js +12 -12
  302. package/emotion/cjs/components/IconButton/IconButton.stories.tsx +94 -0
  303. package/emotion/cjs/components/IconButton/index.js +7 -6
  304. package/emotion/cjs/components/Image/Image.component-test.js +91 -0
  305. package/emotion/cjs/components/Image/Image.js +11 -11
  306. package/emotion/cjs/components/Image/Image.stories.tsx +44 -0
  307. package/emotion/cjs/components/Image/index.js +7 -6
  308. package/emotion/cjs/components/Indicator/Indicator.config.js +26 -138
  309. package/emotion/cjs/components/Indicator/Indicator.js +7 -19
  310. package/emotion/cjs/components/Indicator/Indicator.stories.tsx +34 -0
  311. package/emotion/cjs/components/Indicator/index.js +7 -6
  312. package/emotion/cjs/components/Link/Link.config.js +29 -214
  313. package/emotion/cjs/components/Link/Link.js +11 -12
  314. package/emotion/cjs/components/Link/Link.stories.tsx +57 -0
  315. package/emotion/cjs/components/Link/index.js +7 -6
  316. package/emotion/cjs/components/Mask/Mask.js +6 -10
  317. package/emotion/cjs/components/Mask/Mask.stories.tsx +176 -0
  318. package/emotion/cjs/components/Mask/index.js +7 -6
  319. package/emotion/cjs/components/Modal/Modal.config.js +15 -47
  320. package/emotion/cjs/components/Modal/Modal.js +12 -12
  321. package/emotion/cjs/components/Modal/Modal.stories.tsx +426 -0
  322. package/emotion/cjs/components/Modal/index.js +15 -16
  323. package/emotion/cjs/components/Notification/Notification.config.js +26 -163
  324. package/emotion/cjs/components/Notification/Notification.js +23 -38
  325. package/emotion/cjs/components/Notification/Notification.stories.tsx +221 -0
  326. package/emotion/cjs/components/Notification/index.js +27 -22
  327. package/emotion/cjs/components/NumberFormat/NumberFormat.js +13 -10
  328. package/emotion/cjs/components/NumberFormat/NumberFormat.stories.tsx +186 -0
  329. package/emotion/cjs/components/NumberFormat/index.js +7 -6
  330. package/emotion/cjs/components/NumberInput/NumberInput.config.js +34 -154
  331. package/emotion/cjs/components/NumberInput/NumberInput.js +7 -11
  332. package/emotion/cjs/components/NumberInput/NumberInput.stories.tsx +81 -0
  333. package/emotion/cjs/components/NumberInput/index.js +21 -19
  334. package/emotion/cjs/components/Overlay/Overlay.stories.tsx +76 -0
  335. package/emotion/cjs/components/Overlay/index.js +7 -6
  336. package/emotion/cjs/components/Pagination/Pagination.component-test.js +298 -0
  337. package/emotion/cjs/components/Pagination/Pagination.config.js +26 -139
  338. package/emotion/cjs/components/Pagination/Pagination.js +12 -12
  339. package/emotion/cjs/components/Pagination/Pagination.stories.tsx +139 -0
  340. package/emotion/cjs/components/Pagination/index.js +7 -6
  341. package/emotion/cjs/components/Popover/Popover.config.js +15 -43
  342. package/emotion/cjs/components/Popover/Popover.js +7 -11
  343. package/emotion/cjs/components/Popover/Popover.stories.tsx +127 -0
  344. package/emotion/cjs/components/Popover/index.js +7 -6
  345. package/emotion/cjs/components/Popover/style.css +4 -0
  346. package/emotion/cjs/components/Popup/Popup.js +10 -10
  347. package/emotion/cjs/components/Popup/Popup.stories.tsx +171 -0
  348. package/emotion/cjs/components/Popup/index.js +27 -22
  349. package/emotion/cjs/components/Portal/Portal.stories.tsx +57 -0
  350. package/emotion/cjs/components/Portal/index.js +7 -6
  351. package/emotion/cjs/components/Price/Price.config.js +11 -15
  352. package/emotion/cjs/components/Price/Price.js +12 -12
  353. package/emotion/cjs/components/Price/Price.stories.tsx +34 -0
  354. package/emotion/cjs/components/Price/index.js +15 -16
  355. package/emotion/cjs/components/Progress/Progress.config.js +21 -95
  356. package/emotion/cjs/components/Progress/Progress.js +8 -12
  357. package/emotion/cjs/components/Progress/Progress.stories.tsx +32 -0
  358. package/emotion/cjs/components/Progress/index.js +7 -6
  359. package/emotion/cjs/components/Radiobox/Radiobox.config.js +31 -106
  360. package/emotion/cjs/components/Radiobox/Radiobox.js +16 -19
  361. package/emotion/cjs/components/Radiobox/Radiobox.stories.tsx +139 -0
  362. package/emotion/cjs/components/Radiobox/index.js +14 -15
  363. package/emotion/cjs/components/Range/Range.config.js +24 -157
  364. package/emotion/cjs/components/Range/Range.js +11 -11
  365. package/emotion/cjs/components/Range/Range.stories.tsx +343 -0
  366. package/emotion/cjs/components/Range/index.js +15 -16
  367. package/emotion/cjs/components/Rating/Rating.config.js +20 -117
  368. package/emotion/cjs/components/Rating/Rating.js +7 -11
  369. package/emotion/cjs/components/Rating/Rating.stories.tsx +125 -0
  370. package/emotion/cjs/components/Rating/index.js +21 -19
  371. package/emotion/cjs/components/SSRProvider/index.js +7 -6
  372. package/emotion/cjs/components/Segment/Segment.js +32 -27
  373. package/emotion/cjs/components/Segment/Segment.stories.tsx +162 -0
  374. package/emotion/cjs/components/Segment/SegmentGroup.config.js +34 -130
  375. package/emotion/cjs/components/Segment/SegmentItem.config.js +25 -124
  376. package/emotion/cjs/components/Segment/index.js +26 -21
  377. package/emotion/cjs/components/Select/Select.config.js +35 -305
  378. package/emotion/cjs/components/Select/Select.js +15 -50
  379. package/emotion/cjs/components/Select/Select.stories.tsx +642 -0
  380. package/emotion/cjs/components/Select/index.js +7 -6
  381. package/emotion/cjs/components/Select/style.css +37 -0
  382. package/emotion/cjs/components/Sheet/Sheet.config.js +18 -63
  383. package/emotion/cjs/components/Sheet/Sheet.js +12 -12
  384. package/emotion/cjs/components/Sheet/Sheet.stories.tsx +361 -0
  385. package/emotion/cjs/components/Sheet/index.js +15 -16
  386. package/emotion/cjs/components/Skeleton/LineSkeleton.config.js +31 -230
  387. package/emotion/cjs/components/Skeleton/Skeleton.js +20 -25
  388. package/emotion/cjs/components/Skeleton/Skeleton.stories.tsx +116 -0
  389. package/emotion/cjs/components/Skeleton/index.js +26 -21
  390. package/emotion/cjs/components/Slider/Slider.component-test.js +223 -0
  391. package/emotion/cjs/components/Slider/Slider.config.js +22 -147
  392. package/emotion/cjs/components/Slider/Slider.js +13 -12
  393. package/emotion/cjs/components/Slider/Slider.stories.tsx +277 -0
  394. package/emotion/cjs/components/Slider/index.js +7 -6
  395. package/emotion/cjs/components/Spinner/Spinner.config.js +23 -107
  396. package/emotion/cjs/components/Spinner/Spinner.js +15 -23
  397. package/emotion/cjs/components/Spinner/Spinner.stories.tsx +109 -0
  398. package/emotion/cjs/components/Spinner/index.js +7 -6
  399. package/emotion/cjs/components/Steps/Steps.config.js +18 -105
  400. package/emotion/cjs/components/Steps/Steps.js +8 -12
  401. package/emotion/cjs/components/Steps/Steps.stories.tsx +191 -0
  402. package/emotion/cjs/components/Steps/index.js +7 -6
  403. package/emotion/cjs/components/Switch/Switch.config.js +31 -149
  404. package/emotion/cjs/components/Switch/Switch.js +8 -12
  405. package/emotion/cjs/components/Switch/Switch.stories.tsx +100 -0
  406. package/emotion/cjs/components/Switch/index.js +7 -6
  407. package/emotion/cjs/components/Table/Table.config.js +21 -257
  408. package/emotion/cjs/components/Table/Table.js +12 -12
  409. package/emotion/cjs/components/Table/Table.stories.tsx +551 -0
  410. package/emotion/cjs/components/Table/index.js +7 -6
  411. package/emotion/cjs/components/Tabs/TabItem.js +21 -26
  412. package/emotion/cjs/components/Tabs/Tabs.js +21 -26
  413. package/emotion/cjs/components/Tabs/Tabs.stories.tsx +639 -0
  414. package/emotion/cjs/components/Tabs/TabsController.js +16 -15
  415. package/emotion/cjs/components/Tabs/horizontal/HorizontalTabItem.config.js +30 -230
  416. package/emotion/cjs/components/Tabs/horizontal/HorizontalTabs.config.js +37 -266
  417. package/emotion/cjs/components/Tabs/index.js +35 -27
  418. package/emotion/cjs/components/Tabs/vertical/VerticalTabItem.config.js +24 -125
  419. package/emotion/cjs/components/Tabs/vertical/VerticalTabs.config.js +24 -98
  420. package/emotion/cjs/components/TextArea/TextArea.config.js +42 -367
  421. package/emotion/cjs/components/TextArea/TextArea.js +12 -12
  422. package/emotion/cjs/components/TextArea/TextArea.stories.tsx +228 -0
  423. package/emotion/cjs/components/TextArea/index.js +7 -6
  424. package/emotion/cjs/components/TextField/TextField.config.js +40 -338
  425. package/emotion/cjs/components/TextField/TextField.js +11 -11
  426. package/emotion/cjs/components/TextField/TextField.stories.tsx +260 -0
  427. package/emotion/cjs/components/TextField/index.js +15 -16
  428. package/emotion/cjs/components/Toast/Toast.config.js +35 -127
  429. package/emotion/cjs/components/Toast/Toast.js +14 -26
  430. package/emotion/cjs/components/Toast/Toast.stories.tsx +156 -0
  431. package/emotion/cjs/components/Toast/index.js +20 -18
  432. package/emotion/cjs/components/ToastNew/ToastNew.config.js +21 -80
  433. package/emotion/cjs/components/ToastNew/ToastNew.js +8 -20
  434. package/emotion/cjs/components/ToastNew/ToastNew.stories.tsx +87 -0
  435. package/emotion/cjs/components/ToastNew/index.js +14 -15
  436. package/emotion/cjs/components/Tokens/Colors/Colors.stories.tsx +196 -0
  437. package/emotion/cjs/components/Tokens/Colors/Colors.styles.js +27 -147
  438. package/emotion/cjs/components/Tokens/NumberTokens/CornerRadius.stories.tsx +93 -0
  439. package/emotion/cjs/components/Tokens/NumberTokens/NumberTokens.styles.js +13 -70
  440. package/emotion/cjs/components/Tokens/NumberTokens/Spacing.stories.tsx +93 -0
  441. package/emotion/cjs/components/Tokens/Typography/Typography.stories.tsx +277 -0
  442. package/emotion/cjs/components/Tokens/Typography/Typography.styles.js +44 -204
  443. package/emotion/cjs/components/Toolbar/Toolbar.config.js +18 -57
  444. package/emotion/cjs/components/Toolbar/Toolbar.js +13 -21
  445. package/emotion/cjs/components/Toolbar/Toolbar.stories.tsx +64 -0
  446. package/emotion/cjs/components/Toolbar/index.js +21 -19
  447. package/emotion/cjs/components/Tooltip/Tooltip.config.js +19 -71
  448. package/emotion/cjs/components/Tooltip/Tooltip.js +7 -11
  449. package/emotion/cjs/components/Tooltip/Tooltip.stories.tsx +152 -0
  450. package/emotion/cjs/components/Tooltip/index.js +7 -6
  451. package/emotion/cjs/components/Tree/Tree.config.js +18 -83
  452. package/emotion/cjs/components/Tree/Tree.js +7 -11
  453. package/emotion/cjs/components/Tree/Tree.stories.tsx +146 -0
  454. package/emotion/cjs/components/Tree/index.js +7 -6
  455. package/emotion/cjs/components/Typography/Body.config.js +47 -161
  456. package/emotion/cjs/components/Typography/Dspl.config.js +31 -105
  457. package/emotion/cjs/components/Typography/Heading.config.js +47 -161
  458. package/emotion/cjs/components/Typography/Text.config.js +39 -133
  459. package/emotion/cjs/components/Typography/Typography.js +59 -116
  460. package/emotion/cjs/components/Typography/Typography.stories.tsx +243 -0
  461. package/emotion/cjs/components/Typography/index.js +106 -62
  462. package/emotion/cjs/components/ViewContainer/ViewContainer.config.js +14 -46
  463. package/emotion/cjs/components/ViewContainer/ViewContainer.js +7 -11
  464. package/emotion/cjs/components/ViewContainer/index.js +7 -6
  465. package/emotion/cjs/index.js +729 -82
  466. package/emotion/cjs/mixins/index.js +20 -61
  467. package/emotion/cjs/tokens/index.js +255 -126
  468. package/emotion/es/components/Accordion/Accordion.config.js +14 -92
  469. package/emotion/es/components/Accordion/Accordion.js +3 -3
  470. package/emotion/es/components/Accordion/Accordion.stories.tsx +159 -0
  471. package/emotion/es/components/Accordion/index.js +1 -1
  472. package/emotion/es/components/Attach/Attach.config.js +21 -258
  473. package/emotion/es/components/Attach/Attach.js +4 -2
  474. package/emotion/es/components/Attach/Attach.stories.tsx +157 -0
  475. package/emotion/es/components/Attach/index.js +1 -1
  476. package/emotion/es/components/Autocomplete/Autocomplete.config.js +25 -238
  477. package/emotion/es/components/Autocomplete/Autocomplete.js +2 -2
  478. package/emotion/es/components/Autocomplete/Autocomplete.stories.tsx +170 -0
  479. package/emotion/es/components/Autocomplete/index.js +1 -1
  480. package/emotion/es/components/Avatar/Avatar.config.js +26 -188
  481. package/emotion/es/components/Avatar/Avatar.js +3 -3
  482. package/emotion/es/components/Avatar/Avatar.stories.tsx +74 -0
  483. package/emotion/es/components/Avatar/index.js +1 -1
  484. package/emotion/es/components/AvatarGroup/AvatarGroup.js +2 -2
  485. package/emotion/es/components/AvatarGroup/AvatarGroup.stories.tsx +71 -0
  486. package/emotion/es/components/AvatarGroup/index.js +1 -1
  487. package/emotion/es/components/Badge/Badge.config.js +25 -136
  488. package/emotion/es/components/Badge/Badge.js +4 -2
  489. package/emotion/es/components/Badge/Badge.stories.tsx +87 -0
  490. package/emotion/es/components/Badge/index.js +1 -1
  491. package/emotion/es/components/Breadcrumbs/Breadcrumbs.config.js +13 -51
  492. package/emotion/es/components/Breadcrumbs/Breadcrumbs.js +5 -3
  493. package/emotion/es/components/Breadcrumbs/Breadcrumbs.stories.tsx +82 -0
  494. package/emotion/es/components/Breadcrumbs/index.js +1 -1
  495. package/emotion/es/components/Button/Button.config.js +25 -165
  496. package/emotion/es/components/Button/Button.js +28 -89
  497. package/emotion/es/components/Button/Button.stories.tsx +212 -0
  498. package/emotion/es/components/Button/index.js +1 -1
  499. package/emotion/es/components/ButtonBase/index.js +1 -1
  500. package/emotion/es/components/ButtonGroup/ButtonGroup.config.js +33 -219
  501. package/emotion/es/components/ButtonGroup/ButtonGroup.js +4 -2
  502. package/emotion/es/components/ButtonGroup/ButtonGroup.stories.tsx +109 -0
  503. package/emotion/es/components/ButtonGroup/index.js +1 -1
  504. package/emotion/es/components/Calendar/Calendar.js +12 -12
  505. package/emotion/es/components/Calendar/Calendar.stories.tsx +304 -0
  506. package/emotion/es/components/Calendar/CalendarBase.config.js +13 -119
  507. package/emotion/es/components/Calendar/CalendarDouble.config.js +13 -119
  508. package/emotion/es/components/Calendar/index.js +1 -1
  509. package/emotion/es/components/Card/Card.config.js +15 -72
  510. package/emotion/es/components/Card/Card.js +6 -4
  511. package/emotion/es/components/Card/Card.stories.tsx +281 -0
  512. package/emotion/es/components/Card/index.js +1 -1
  513. package/emotion/es/components/Cell/Cell.config.js +11 -101
  514. package/emotion/es/components/Cell/Cell.js +5 -3
  515. package/emotion/es/components/Cell/Cell.stories.tsx +97 -0
  516. package/emotion/es/components/Cell/index.js +1 -1
  517. package/emotion/es/components/Checkbox/Checkbox.config.js +20 -95
  518. package/emotion/es/components/Checkbox/Checkbox.js +4 -3
  519. package/emotion/es/components/Checkbox/Checkbox.stories.tsx +232 -0
  520. package/emotion/es/components/Checkbox/index.js +1 -1
  521. package/emotion/es/components/Chip/Chip.config.js +20 -153
  522. package/emotion/es/components/Chip/Chip.js +5 -3
  523. package/emotion/es/components/Chip/Chip.stories.tsx +93 -0
  524. package/emotion/es/components/Chip/index.js +1 -1
  525. package/emotion/es/components/ChipGroup/ChipGroup.config.js +19 -118
  526. package/emotion/es/components/ChipGroup/ChipGroup.js +2 -2
  527. package/emotion/es/components/ChipGroup/ChipGroup.stories.tsx +79 -0
  528. package/emotion/es/components/ChipGroup/index.js +1 -1
  529. package/emotion/es/components/Combobox/Combobox.config.js +25 -304
  530. package/emotion/es/components/Combobox/Combobox.js +9 -36
  531. package/emotion/es/components/Combobox/Combobox.stories.tsx +604 -0
  532. package/emotion/es/components/Combobox/index.js +1 -1
  533. package/emotion/es/components/Counter/Counter.config.js +16 -86
  534. package/emotion/es/components/Counter/Counter.js +4 -2
  535. package/emotion/es/components/Counter/Counter.stories.tsx +34 -0
  536. package/emotion/es/components/Counter/index.js +1 -1
  537. package/emotion/es/components/DatePicker/DatePicker.config.js +19 -255
  538. package/emotion/es/components/DatePicker/DatePicker.js +4 -4
  539. package/emotion/es/components/DatePicker/DatePicker.stories.tsx +309 -0
  540. package/emotion/es/components/DatePicker/index.js +1 -1
  541. package/emotion/es/components/Divider/Divider.config.js +22 -100
  542. package/emotion/es/components/Divider/Divider.js +4 -2
  543. package/emotion/es/components/Divider/Divider.stories.tsx +58 -0
  544. package/emotion/es/components/Divider/index.js +1 -1
  545. package/emotion/es/components/Drawer/Drawer.config.js +17 -70
  546. package/emotion/es/components/Drawer/Drawer.js +16 -8
  547. package/emotion/es/components/Drawer/Drawer.stories.tsx +217 -0
  548. package/emotion/es/components/Drawer/index.js +1 -1
  549. package/emotion/es/components/Dropdown/Dropdown.config.js +13 -85
  550. package/emotion/es/components/Dropdown/Dropdown.js +9 -36
  551. package/emotion/es/components/Dropdown/Dropdown.stories.tsx +331 -0
  552. package/emotion/es/components/Dropdown/index.js +1 -1
  553. package/emotion/es/components/Dropzone/Dropzone.config.js +16 -77
  554. package/emotion/es/components/Dropzone/Dropzone.js +2 -2
  555. package/emotion/es/components/Dropzone/Dropzone.stories.tsx +58 -0
  556. package/emotion/es/components/Dropzone/index.js +1 -1
  557. package/emotion/es/components/EmptyState/EmptyState.config.js +13 -105
  558. package/emotion/es/components/EmptyState/EmptyState.js +2 -2
  559. package/emotion/es/components/EmptyState/EmptyState.stories.tsx +43 -0
  560. package/emotion/es/components/EmptyState/index.js +1 -1
  561. package/emotion/es/components/Flow/Flow.config.js +3 -3
  562. package/emotion/es/components/Flow/Flow.js +2 -2
  563. package/emotion/es/components/Flow/Flow.stories.tsx +133 -0
  564. package/emotion/es/components/Flow/index.js +1 -1
  565. package/emotion/es/components/Grid/Grid.config.js +14 -62
  566. package/emotion/es/components/Grid/Grid.js +2 -2
  567. package/emotion/es/components/Grid/Grid.stories.tsx +119 -0
  568. package/emotion/es/components/Grid/index.js +1 -1
  569. package/emotion/es/components/IconButton/IconButton.config.js +23 -137
  570. package/emotion/es/components/IconButton/IconButton.js +5 -3
  571. package/emotion/es/components/IconButton/IconButton.stories.tsx +94 -0
  572. package/emotion/es/components/IconButton/index.js +1 -1
  573. package/emotion/es/components/Image/Image.component-test.js +85 -0
  574. package/emotion/es/components/Image/Image.js +5 -3
  575. package/emotion/es/components/Image/Image.stories.tsx +44 -0
  576. package/emotion/es/components/Image/index.js +1 -1
  577. package/emotion/es/components/Indicator/Indicator.config.js +21 -129
  578. package/emotion/es/components/Indicator/Indicator.js +3 -3
  579. package/emotion/es/components/Indicator/Indicator.stories.tsx +34 -0
  580. package/emotion/es/components/Indicator/index.js +1 -1
  581. package/emotion/es/components/Link/Link.config.js +24 -205
  582. package/emotion/es/components/Link/Link.js +4 -3
  583. package/emotion/es/components/Link/Link.stories.tsx +57 -0
  584. package/emotion/es/components/Link/index.js +1 -1
  585. package/emotion/es/components/Mask/Mask.js +1 -1
  586. package/emotion/es/components/Mask/Mask.stories.tsx +176 -0
  587. package/emotion/es/components/Mask/index.js +1 -1
  588. package/emotion/es/components/Modal/Modal.config.js +10 -38
  589. package/emotion/es/components/Modal/Modal.js +5 -3
  590. package/emotion/es/components/Modal/Modal.stories.tsx +426 -0
  591. package/emotion/es/components/Modal/index.js +1 -1
  592. package/emotion/es/components/Notification/Notification.config.js +21 -154
  593. package/emotion/es/components/Notification/Notification.js +15 -11
  594. package/emotion/es/components/Notification/Notification.stories.tsx +221 -0
  595. package/emotion/es/components/Notification/index.js +1 -1
  596. package/emotion/es/components/NumberFormat/NumberFormat.js +9 -1
  597. package/emotion/es/components/NumberFormat/NumberFormat.stories.tsx +186 -0
  598. package/emotion/es/components/NumberFormat/index.js +1 -1
  599. package/emotion/es/components/NumberInput/NumberInput.config.js +29 -145
  600. package/emotion/es/components/NumberInput/NumberInput.js +2 -2
  601. package/emotion/es/components/NumberInput/NumberInput.stories.tsx +81 -0
  602. package/emotion/es/components/NumberInput/index.js +1 -1
  603. package/emotion/es/components/Overlay/Overlay.stories.tsx +76 -0
  604. package/emotion/es/components/Overlay/index.js +1 -1
  605. package/emotion/es/components/Pagination/Pagination.component-test.js +293 -0
  606. package/emotion/es/components/Pagination/Pagination.config.js +21 -130
  607. package/emotion/es/components/Pagination/Pagination.js +5 -3
  608. package/emotion/es/components/Pagination/Pagination.stories.tsx +139 -0
  609. package/emotion/es/components/Pagination/index.js +1 -1
  610. package/emotion/es/components/Popover/Popover.config.js +10 -34
  611. package/emotion/es/components/Popover/Popover.js +2 -2
  612. package/emotion/es/components/Popover/Popover.stories.tsx +127 -0
  613. package/emotion/es/components/Popover/index.js +1 -1
  614. package/emotion/es/components/Popover/style.css +4 -0
  615. package/emotion/es/components/Popup/Popup.js +4 -2
  616. package/emotion/es/components/Popup/Popup.stories.tsx +171 -0
  617. package/emotion/es/components/Popup/index.js +1 -1
  618. package/emotion/es/components/Portal/Portal.stories.tsx +57 -0
  619. package/emotion/es/components/Portal/index.js +1 -1
  620. package/emotion/es/components/Price/Price.config.js +7 -7
  621. package/emotion/es/components/Price/Price.js +5 -3
  622. package/emotion/es/components/Price/Price.stories.tsx +34 -0
  623. package/emotion/es/components/Price/index.js +1 -1
  624. package/emotion/es/components/Progress/Progress.config.js +16 -86
  625. package/emotion/es/components/Progress/Progress.js +3 -3
  626. package/emotion/es/components/Progress/Progress.stories.tsx +32 -0
  627. package/emotion/es/components/Progress/index.js +1 -1
  628. package/emotion/es/components/Radiobox/Radiobox.config.js +26 -97
  629. package/emotion/es/components/Radiobox/Radiobox.js +5 -4
  630. package/emotion/es/components/Radiobox/Radiobox.stories.tsx +139 -0
  631. package/emotion/es/components/Radiobox/index.js +1 -1
  632. package/emotion/es/components/Range/Range.config.js +19 -148
  633. package/emotion/es/components/Range/Range.js +4 -2
  634. package/emotion/es/components/Range/Range.stories.tsx +343 -0
  635. package/emotion/es/components/Range/index.js +1 -1
  636. package/emotion/es/components/Rating/Rating.config.js +15 -108
  637. package/emotion/es/components/Rating/Rating.js +2 -2
  638. package/emotion/es/components/Rating/Rating.stories.tsx +125 -0
  639. package/emotion/es/components/Rating/index.js +1 -1
  640. package/emotion/es/components/SSRProvider/index.js +1 -1
  641. package/emotion/es/components/Segment/Segment.js +10 -5
  642. package/emotion/es/components/Segment/Segment.stories.tsx +162 -0
  643. package/emotion/es/components/Segment/SegmentGroup.config.js +29 -121
  644. package/emotion/es/components/Segment/SegmentItem.config.js +20 -115
  645. package/emotion/es/components/Segment/index.js +1 -1
  646. package/emotion/es/components/Select/Select.config.js +29 -295
  647. package/emotion/es/components/Select/Select.js +9 -36
  648. package/emotion/es/components/Select/Select.stories.tsx +642 -0
  649. package/emotion/es/components/Select/index.js +1 -1
  650. package/emotion/es/components/Select/style.css +37 -0
  651. package/emotion/es/components/Sheet/Sheet.config.js +13 -54
  652. package/emotion/es/components/Sheet/Sheet.js +5 -3
  653. package/emotion/es/components/Sheet/Sheet.stories.tsx +361 -0
  654. package/emotion/es/components/Sheet/index.js +1 -1
  655. package/emotion/es/components/Skeleton/LineSkeleton.config.js +26 -221
  656. package/emotion/es/components/Skeleton/Skeleton.js +4 -4
  657. package/emotion/es/components/Skeleton/Skeleton.stories.tsx +116 -0
  658. package/emotion/es/components/Skeleton/index.js +1 -1
  659. package/emotion/es/components/Slider/Slider.component-test.js +220 -0
  660. package/emotion/es/components/Slider/Slider.config.js +17 -138
  661. package/emotion/es/components/Slider/Slider.js +5 -3
  662. package/emotion/es/components/Slider/Slider.stories.tsx +277 -0
  663. package/emotion/es/components/Slider/index.js +1 -1
  664. package/emotion/es/components/Spinner/Spinner.config.js +18 -98
  665. package/emotion/es/components/Spinner/Spinner.js +6 -8
  666. package/emotion/es/components/Spinner/Spinner.stories.tsx +109 -0
  667. package/emotion/es/components/Spinner/index.js +1 -1
  668. package/emotion/es/components/Steps/Steps.config.js +13 -96
  669. package/emotion/es/components/Steps/Steps.js +3 -3
  670. package/emotion/es/components/Steps/Steps.stories.tsx +191 -0
  671. package/emotion/es/components/Steps/index.js +1 -1
  672. package/emotion/es/components/Switch/Switch.config.js +26 -140
  673. package/emotion/es/components/Switch/Switch.js +3 -3
  674. package/emotion/es/components/Switch/Switch.stories.tsx +100 -0
  675. package/emotion/es/components/Switch/index.js +1 -1
  676. package/emotion/es/components/Table/Table.config.js +16 -248
  677. package/emotion/es/components/Table/Table.js +5 -3
  678. package/emotion/es/components/Table/Table.stories.tsx +551 -0
  679. package/emotion/es/components/Table/index.js +1 -1
  680. package/emotion/es/components/Tabs/TabItem.js +11 -10
  681. package/emotion/es/components/Tabs/Tabs.js +11 -10
  682. package/emotion/es/components/Tabs/Tabs.stories.tsx +639 -0
  683. package/emotion/es/components/Tabs/TabsController.js +7 -5
  684. package/emotion/es/components/Tabs/horizontal/HorizontalTabItem.config.js +25 -221
  685. package/emotion/es/components/Tabs/horizontal/HorizontalTabs.config.js +32 -257
  686. package/emotion/es/components/Tabs/index.js +1 -1
  687. package/emotion/es/components/Tabs/vertical/VerticalTabItem.config.js +19 -116
  688. package/emotion/es/components/Tabs/vertical/VerticalTabs.config.js +19 -89
  689. package/emotion/es/components/TextArea/TextArea.config.js +37 -358
  690. package/emotion/es/components/TextArea/TextArea.js +5 -3
  691. package/emotion/es/components/TextArea/TextArea.stories.tsx +228 -0
  692. package/emotion/es/components/TextArea/index.js +1 -1
  693. package/emotion/es/components/TextField/TextField.config.js +35 -329
  694. package/emotion/es/components/TextField/TextField.js +4 -2
  695. package/emotion/es/components/TextField/TextField.stories.tsx +260 -0
  696. package/emotion/es/components/TextField/index.js +1 -1
  697. package/emotion/es/components/Toast/Toast.config.js +30 -118
  698. package/emotion/es/components/Toast/Toast.js +4 -4
  699. package/emotion/es/components/Toast/Toast.stories.tsx +156 -0
  700. package/emotion/es/components/Toast/index.js +1 -1
  701. package/emotion/es/components/ToastNew/ToastNew.config.js +16 -71
  702. package/emotion/es/components/ToastNew/ToastNew.js +3 -3
  703. package/emotion/es/components/ToastNew/ToastNew.stories.tsx +87 -0
  704. package/emotion/es/components/ToastNew/index.js +1 -1
  705. package/emotion/es/components/Tokens/Colors/Colors.stories.tsx +196 -0
  706. package/emotion/es/components/Tokens/Colors/Colors.styles.js +19 -90
  707. package/emotion/es/components/Tokens/NumberTokens/CornerRadius.stories.tsx +93 -0
  708. package/emotion/es/components/Tokens/NumberTokens/NumberTokens.styles.js +8 -37
  709. package/emotion/es/components/Tokens/NumberTokens/Spacing.stories.tsx +93 -0
  710. package/emotion/es/components/Tokens/Typography/Typography.stories.tsx +277 -0
  711. package/emotion/es/components/Tokens/Typography/Typography.styles.js +36 -135
  712. package/emotion/es/components/Toolbar/Toolbar.config.js +13 -48
  713. package/emotion/es/components/Toolbar/Toolbar.js +6 -4
  714. package/emotion/es/components/Toolbar/Toolbar.stories.tsx +64 -0
  715. package/emotion/es/components/Toolbar/index.js +1 -1
  716. package/emotion/es/components/Tooltip/Tooltip.config.js +14 -62
  717. package/emotion/es/components/Tooltip/Tooltip.js +2 -2
  718. package/emotion/es/components/Tooltip/Tooltip.stories.tsx +152 -0
  719. package/emotion/es/components/Tooltip/index.js +1 -1
  720. package/emotion/es/components/Tree/Tree.config.js +13 -74
  721. package/emotion/es/components/Tree/Tree.js +2 -2
  722. package/emotion/es/components/Tree/Tree.stories.tsx +146 -0
  723. package/emotion/es/components/Tree/index.js +1 -1
  724. package/emotion/es/components/Typography/Body.config.js +38 -131
  725. package/emotion/es/components/Typography/Dspl.config.js +24 -83
  726. package/emotion/es/components/Typography/Heading.config.js +38 -131
  727. package/emotion/es/components/Typography/Text.config.js +31 -107
  728. package/emotion/es/components/Typography/Typography.js +35 -35
  729. package/emotion/es/components/Typography/Typography.stories.tsx +243 -0
  730. package/emotion/es/components/Typography/index.js +1 -1
  731. package/emotion/es/components/ViewContainer/ViewContainer.config.js +8 -36
  732. package/emotion/es/components/ViewContainer/ViewContainer.js +2 -2
  733. package/emotion/es/components/ViewContainer/index.js +1 -1
  734. package/emotion/es/index.js +1 -2
  735. package/emotion/es/mixins/index.js +1 -1
  736. package/emotion/es/tokens/index.js +1 -1
  737. package/es/components/Accordion/Accordion.config.js +14 -92
  738. package/es/components/Accordion/Accordion.js +3 -3
  739. package/es/components/Accordion/index.js +1 -1
  740. package/es/components/Attach/Attach.config.js +21 -258
  741. package/es/components/Attach/Attach.js +4 -2
  742. package/es/components/Attach/index.js +1 -1
  743. package/es/components/Autocomplete/Autocomplete.config.js +25 -238
  744. package/es/components/Autocomplete/Autocomplete.js +2 -2
  745. package/es/components/Autocomplete/index.js +1 -1
  746. package/es/components/Avatar/Avatar.config.js +26 -188
  747. package/es/components/Avatar/Avatar.js +3 -3
  748. package/es/components/Avatar/index.js +1 -1
  749. package/es/components/AvatarGroup/AvatarGroup.js +2 -2
  750. package/es/components/AvatarGroup/index.js +1 -1
  751. package/es/components/Badge/Badge.config.js +25 -136
  752. package/es/components/Badge/Badge.js +4 -2
  753. package/es/components/Badge/index.js +1 -1
  754. package/es/components/Breadcrumbs/Breadcrumbs.config.js +13 -51
  755. package/es/components/Breadcrumbs/Breadcrumbs.js +5 -3
  756. package/es/components/Breadcrumbs/index.js +1 -1
  757. package/es/components/Button/Button.config.js +25 -165
  758. package/es/components/Button/Button.js +28 -89
  759. package/es/components/Button/index.js +1 -1
  760. package/es/components/ButtonBase/index.js +1 -1
  761. package/es/components/ButtonGroup/ButtonGroup.config.js +33 -219
  762. package/es/components/ButtonGroup/ButtonGroup.js +4 -2
  763. package/es/components/ButtonGroup/index.js +1 -1
  764. package/es/components/Calendar/Calendar.js +12 -12
  765. package/es/components/Calendar/CalendarBase.config.js +13 -119
  766. package/es/components/Calendar/CalendarDouble.config.js +13 -119
  767. package/es/components/Calendar/index.js +1 -1
  768. package/es/components/Card/Card.config.js +15 -72
  769. package/es/components/Card/Card.js +6 -4
  770. package/es/components/Card/index.js +1 -1
  771. package/es/components/Cell/Cell.config.js +11 -101
  772. package/es/components/Cell/Cell.js +5 -3
  773. package/es/components/Cell/index.js +1 -1
  774. package/es/components/Checkbox/Checkbox.config.js +20 -95
  775. package/es/components/Checkbox/Checkbox.js +4 -3
  776. package/es/components/Checkbox/index.js +1 -1
  777. package/es/components/Chip/Chip.config.js +20 -153
  778. package/es/components/Chip/Chip.js +5 -3
  779. package/es/components/Chip/index.js +1 -1
  780. package/es/components/ChipGroup/ChipGroup.config.js +19 -118
  781. package/es/components/ChipGroup/ChipGroup.js +2 -2
  782. package/es/components/ChipGroup/index.js +1 -1
  783. package/es/components/Combobox/Combobox.config.js +25 -304
  784. package/es/components/Combobox/Combobox.js +9 -36
  785. package/es/components/Combobox/index.js +1 -1
  786. package/es/components/Counter/Counter.config.js +16 -86
  787. package/es/components/Counter/Counter.js +4 -2
  788. package/es/components/Counter/index.js +1 -1
  789. package/es/components/DatePicker/DatePicker.config.js +19 -255
  790. package/es/components/DatePicker/DatePicker.js +4 -4
  791. package/es/components/DatePicker/index.js +1 -1
  792. package/es/components/Divider/Divider.config.js +22 -100
  793. package/es/components/Divider/Divider.js +4 -2
  794. package/es/components/Divider/index.js +1 -1
  795. package/es/components/Drawer/Drawer.config.js +17 -70
  796. package/es/components/Drawer/Drawer.js +16 -8
  797. package/es/components/Drawer/index.js +1 -1
  798. package/es/components/Dropdown/Dropdown.config.js +13 -85
  799. package/es/components/Dropdown/Dropdown.js +9 -36
  800. package/es/components/Dropdown/index.js +1 -1
  801. package/es/components/Dropzone/Dropzone.config.js +16 -77
  802. package/es/components/Dropzone/Dropzone.js +2 -2
  803. package/es/components/Dropzone/index.js +1 -1
  804. package/es/components/EmptyState/EmptyState.config.js +13 -105
  805. package/es/components/EmptyState/EmptyState.js +2 -2
  806. package/es/components/EmptyState/index.js +1 -1
  807. package/es/components/Flow/Flow.config.js +3 -3
  808. package/es/components/Flow/Flow.js +2 -2
  809. package/es/components/Flow/index.js +1 -1
  810. package/es/components/Grid/Grid.config.js +14 -62
  811. package/es/components/Grid/Grid.js +2 -2
  812. package/es/components/Grid/index.js +1 -1
  813. package/es/components/IconButton/IconButton.config.js +23 -137
  814. package/es/components/IconButton/IconButton.js +5 -3
  815. package/es/components/IconButton/index.js +1 -1
  816. package/es/components/Image/Image.component-test.js +86 -0
  817. package/es/components/Image/Image.js +5 -3
  818. package/es/components/Image/index.js +1 -1
  819. package/es/components/Indicator/Indicator.config.js +21 -129
  820. package/es/components/Indicator/Indicator.js +3 -3
  821. package/es/components/Indicator/index.js +1 -1
  822. package/es/components/Link/Link.config.js +24 -205
  823. package/es/components/Link/Link.js +4 -3
  824. package/es/components/Link/index.js +1 -1
  825. package/es/components/Mask/Mask.js +1 -1
  826. package/es/components/Mask/index.js +1 -1
  827. package/es/components/Modal/Modal.config.js +10 -38
  828. package/es/components/Modal/Modal.js +5 -3
  829. package/es/components/Modal/index.js +1 -1
  830. package/es/components/Notification/Notification.config.js +21 -154
  831. package/es/components/Notification/Notification.js +15 -11
  832. package/es/components/Notification/index.js +1 -1
  833. package/es/components/NumberFormat/NumberFormat.js +9 -1
  834. package/es/components/NumberFormat/index.js +1 -1
  835. package/es/components/NumberInput/NumberInput.config.js +29 -145
  836. package/es/components/NumberInput/NumberInput.js +2 -2
  837. package/es/components/NumberInput/index.js +1 -1
  838. package/es/components/Overlay/index.js +1 -1
  839. package/es/components/Pagination/Pagination.component-test.js +293 -0
  840. package/es/components/Pagination/Pagination.config.js +21 -130
  841. package/es/components/Pagination/Pagination.js +5 -3
  842. package/es/components/Pagination/index.js +1 -1
  843. package/es/components/Popover/Popover.config.js +10 -34
  844. package/es/components/Popover/Popover.js +2 -2
  845. package/es/components/Popover/index.js +1 -1
  846. package/es/components/Popup/Popup.js +4 -2
  847. package/es/components/Popup/index.js +1 -1
  848. package/es/components/Portal/index.js +1 -1
  849. package/es/components/Price/Price.config.js +7 -7
  850. package/es/components/Price/Price.js +5 -3
  851. package/es/components/Price/index.js +1 -1
  852. package/es/components/Progress/Progress.config.js +16 -86
  853. package/es/components/Progress/Progress.js +3 -3
  854. package/es/components/Progress/index.js +1 -1
  855. package/es/components/Radiobox/Radiobox.config.js +26 -97
  856. package/es/components/Radiobox/Radiobox.js +5 -4
  857. package/es/components/Radiobox/index.js +1 -1
  858. package/es/components/Range/Range.config.js +19 -148
  859. package/es/components/Range/Range.js +4 -2
  860. package/es/components/Range/index.js +1 -1
  861. package/es/components/Rating/Rating.config.js +15 -108
  862. package/es/components/Rating/Rating.js +2 -2
  863. package/es/components/Rating/index.js +1 -1
  864. package/es/components/SSRProvider/index.js +1 -1
  865. package/es/components/Segment/Segment.js +10 -5
  866. package/es/components/Segment/SegmentGroup.config.js +29 -121
  867. package/es/components/Segment/SegmentItem.config.js +20 -115
  868. package/es/components/Segment/index.js +1 -1
  869. package/es/components/Select/Select.config.js +29 -295
  870. package/es/components/Select/Select.js +9 -36
  871. package/es/components/Select/index.js +1 -1
  872. package/es/components/Sheet/Sheet.config.js +13 -54
  873. package/es/components/Sheet/Sheet.js +5 -3
  874. package/es/components/Sheet/index.js +1 -1
  875. package/es/components/Skeleton/LineSkeleton.config.js +26 -221
  876. package/es/components/Skeleton/Skeleton.js +4 -4
  877. package/es/components/Skeleton/index.js +1 -1
  878. package/es/components/Slider/Slider.component-test.js +220 -0
  879. package/es/components/Slider/Slider.config.js +17 -138
  880. package/es/components/Slider/Slider.js +5 -3
  881. package/es/components/Slider/index.js +1 -1
  882. package/es/components/Spinner/Spinner.config.js +18 -98
  883. package/es/components/Spinner/Spinner.js +6 -8
  884. package/es/components/Spinner/index.js +1 -1
  885. package/es/components/Steps/Steps.config.js +13 -96
  886. package/es/components/Steps/Steps.js +3 -3
  887. package/es/components/Steps/index.js +1 -1
  888. package/es/components/Switch/Switch.config.js +26 -140
  889. package/es/components/Switch/Switch.js +3 -3
  890. package/es/components/Switch/index.js +1 -1
  891. package/es/components/Table/Table.config.js +16 -248
  892. package/es/components/Table/Table.js +5 -3
  893. package/es/components/Table/index.js +1 -1
  894. package/es/components/Tabs/TabItem.js +11 -10
  895. package/es/components/Tabs/Tabs.js +11 -10
  896. package/es/components/Tabs/TabsController.js +7 -5
  897. package/es/components/Tabs/horizontal/HorizontalTabItem.config.js +25 -221
  898. package/es/components/Tabs/horizontal/HorizontalTabs.config.js +32 -257
  899. package/es/components/Tabs/index.js +1 -1
  900. package/es/components/Tabs/vertical/VerticalTabItem.config.js +19 -116
  901. package/es/components/Tabs/vertical/VerticalTabs.config.js +19 -89
  902. package/es/components/TextArea/TextArea.config.js +37 -358
  903. package/es/components/TextArea/TextArea.js +5 -3
  904. package/es/components/TextArea/index.js +1 -1
  905. package/es/components/TextField/TextField.config.js +35 -329
  906. package/es/components/TextField/TextField.js +4 -2
  907. package/es/components/TextField/index.js +1 -1
  908. package/es/components/Toast/Toast.config.js +30 -118
  909. package/es/components/Toast/Toast.js +4 -4
  910. package/es/components/Toast/index.js +1 -1
  911. package/es/components/ToastNew/ToastNew.config.js +16 -71
  912. package/es/components/ToastNew/ToastNew.js +3 -3
  913. package/es/components/ToastNew/index.js +1 -1
  914. package/es/components/Tokens/Colors/Colors.styles.js +43 -90
  915. package/es/components/Tokens/NumberTokens/NumberTokens.styles.js +18 -37
  916. package/es/components/Tokens/Typography/Typography.styles.js +68 -135
  917. package/es/components/Toolbar/Toolbar.config.js +13 -48
  918. package/es/components/Toolbar/Toolbar.js +6 -4
  919. package/es/components/Toolbar/index.js +1 -1
  920. package/es/components/Tooltip/Tooltip.config.js +14 -62
  921. package/es/components/Tooltip/Tooltip.js +2 -2
  922. package/es/components/Tooltip/index.js +1 -1
  923. package/es/components/Tree/Tree.config.js +13 -74
  924. package/es/components/Tree/Tree.js +2 -2
  925. package/es/components/Tree/index.js +1 -1
  926. package/es/components/Typography/Body.config.js +38 -131
  927. package/es/components/Typography/Dspl.config.js +24 -83
  928. package/es/components/Typography/Heading.config.js +38 -131
  929. package/es/components/Typography/Text.config.js +31 -107
  930. package/es/components/Typography/Typography.js +35 -35
  931. package/es/components/Typography/index.js +1 -1
  932. package/es/components/ViewContainer/ViewContainer.config.js +8 -36
  933. package/es/components/ViewContainer/ViewContainer.js +2 -2
  934. package/es/components/ViewContainer/index.js +1 -1
  935. package/es/index.js +1 -2
  936. package/es/mixins/index.js +1 -1
  937. package/es/tokens/index.js +1 -1
  938. package/index.d.ts +0 -1
  939. package/index.js +729 -82
  940. package/mixins/index.js +20 -61
  941. package/package.json +12 -12
  942. package/tokens/index.js +255 -126
  943. package/components/Carousel/Carousel.config.d.ts +0 -14
  944. package/components/Carousel/Carousel.config.js +0 -62
  945. package/components/Carousel/Carousel.d.ts +0 -9
  946. package/components/Carousel/Carousel.js +0 -14
  947. package/components/Carousel/index.d.ts +0 -2
  948. package/components/Carousel/index.js +0 -20
  949. package/emotion/cjs/components/Carousel/Carousel.config.js +0 -62
  950. package/emotion/cjs/components/Carousel/Carousel.js +0 -14
  951. package/emotion/cjs/components/Carousel/index.js +0 -20
  952. package/emotion/cjs/helpers/index.js +0 -25
  953. package/emotion/es/components/Carousel/Carousel.config.js +0 -52
  954. package/emotion/es/components/Carousel/Carousel.js +0 -5
  955. package/emotion/es/components/Carousel/index.js +0 -2
  956. package/es/components/Carousel/Carousel.config.js +0 -52
  957. package/es/components/Carousel/Carousel.js +0 -5
  958. package/es/components/Carousel/index.js +0 -2
  959. /package/emotion/{es/helpers/index.js → cjs/helpers/index.ts} +0 -0
  960. /package/{es/helpers/index.js → emotion/es/helpers/index.ts} +0 -0
@@ -1,162 +1,29 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
+ value: true
4
5
  });
5
- Object.defineProperty(exports, "config", {
6
- enumerable: true,
7
- get: function() {
8
- return config;
9
- }
10
- });
11
- var _emotion = require("@salutejs/plasma-new-hope/emotion");
12
- function _tagged_template_literal(strings, raw) {
13
- if (!raw) {
14
- raw = strings.slice(0);
15
- }
16
- return Object.freeze(Object.defineProperties(strings, {
17
- raw: {
18
- value: Object.freeze(raw)
19
- }
20
- }));
21
- }
22
- function _templateObject() {
23
- var data = _tagged_template_literal([
24
- "\n ",
25
- ": var(--surface-solid-card);\n ",
26
- ": var(--outline-solid-primary);\n ",
27
- ": var(--outline-negative);\n ",
28
- ": var(--outline-accent);\n\n ",
29
- ": var(--text-primary);\n ",
30
- ": var(--text-primary);\n ",
31
- ": var(--text-secondary);\n ",
32
- ": var(--text-negative);\n ",
33
- ": var(--text-positive);\n\n ",
34
- ": var(--surface-negative);\n\n ",
35
- ": var(--text-primary);\n ",
36
- ": var(--text-secondary);\n ",
37
- ": var(--text-tertiary);\n ",
38
- ": var(--text-accent);\n\n ",
39
- ": var(--outline-solid-primary-hover);\n ",
40
- ": var(--outline-accent);\n ",
41
- ": var(--outline-negative);\n ",
42
- ": var(--outline-negative);\n ",
43
- ": var(--outline-accent);\n ",
44
- ": var(--outline-accent);\n\n ",
45
- ": var(--text-accent);\n ",
46
- ": var(--text-secondary);\n ",
47
- ": var(--text-secondary);\n "
48
- ]);
49
- _templateObject = function _templateObject() {
50
- return data;
51
- };
52
- return data;
53
- }
54
- function _templateObject1() {
55
- var data = _tagged_template_literal([
56
- "\n ",
57
- ": 0.625rem;\n ",
58
- ": 0.125rem;\n\n ",
59
- ": 0 0.375rem;\n ",
60
- ": var(--plasma-typo-body-s-font-family);\n ",
61
- ": var(--plasma-typo-body-s-font-style);\n ",
62
- ": var(--plasma-typo-body-s-font-size);\n ",
63
- ": var(--plasma-typo-body-s-bold-font-weight);\n ",
64
- ": var(--plasma-typo-body-s-letter-spacing);\n ",
65
- ": var(--plasma-typo-body-s-line-height);\n\n ",
66
- ": 0 0.375rem 0 0.75rem;\n ",
67
- ": 0;\n\n ",
68
- ": 0.5rem;\n\n ",
69
- ": var(--plasma-typo-body-s-font-family);\n ",
70
- ": var(--plasma-typo-body-s-font-style);\n ",
71
- ": var(--plasma-typo-body-s-font-size);\n ",
72
- ": var(--plasma-typo-body-s-font-weight);\n ",
73
- ": var(--plasma-typo-body-s-letter-spacing);\n ",
74
- ": var(--plasma-typo-body-s-line-height);\n\n ",
75
- ": 0.375rem;\n ",
76
- ": 0.375rem;\n ",
77
- ": 0 0 0 0;\n ",
78
- ": 0.3125rem auto auto -0.6875rem;\n ",
79
- ": 0 0 auto auto;\n ",
80
- ": 0.25rem -0.625rem auto auto;\n\n ",
81
- ": 2.5rem;\n ",
82
- ": 0.625rem;\n ",
83
- ": 0.125rem;\n ",
84
- ": 0.6875rem 0.75rem 0.6875rem 0.75rem;\n ",
85
- ": var(--plasma-typo-body-m-font-family);\n ",
86
- ": var(--plasma-typo-body-m-font-style);\n ",
87
- ": var(--plasma-typo-body-m-font-size);\n ",
88
- ": var(--plasma-typo-body-m-font-weight);\n ",
89
- ": var(--plasma-typo-body-m-letter-spacing);\n ",
90
- ": var(--plasma-typo-body-m-line-height);\n\n ",
91
- ": 0.25rem 0 0 0;\n ",
92
- ": var(--plasma-typo-body-s-font-family);\n ",
93
- ": var(--plasma-typo-body-s-font-style);\n ",
94
- ": var(--plasma-typo-body-s-font-size);\n ",
95
- ": var(--plasma-typo-body-s-font-weight);\n ",
96
- ": var(--plasma-typo-body-s-letter-spacing);\n ",
97
- ": var(--plasma-typo-body-s-line-height);\n\n ",
98
- ": -0.1875rem 0.25rem -0.1875rem -0.125rem;\n ",
99
- ": -0.1875rem -0.125rem -0.1875rem 0.75rem;\n ",
100
- ": 0 0.25rem 0 0;\n ",
101
- ": 0 0 0 0.25rem;\n "
102
- ]);
103
- _templateObject1 = function _templateObject() {
104
- return data;
105
- };
106
- return data;
107
- }
108
- function _templateObject2() {
109
- var data = _tagged_template_literal([
110
- "\n ",
111
- ": 1;\n ",
112
- ": var(--surface-solid-primary);\n ",
113
- ": var(--surface-solid-primary);\n ",
114
- ": var(--surface-solid-primary);\n ",
115
- ": var(--text-secondary);\n ",
116
- ": var(--text-secondary);\n "
117
- ]);
118
- _templateObject2 = function _templateObject() {
119
- return data;
120
- };
121
- return data;
122
- }
123
- function _templateObject3() {
124
- var data = _tagged_template_literal([
125
- "\n ",
126
- ": var(--surface-solid-card);\n ",
127
- ": var(--text-primary);\n ",
128
- ": var(--outline-solid-primary);\n ",
129
- ": var(--text-secondary);\n ",
130
- ": var(--text-secondary);\n ",
131
- ": 1;\n ",
132
- ": 1;\n ",
133
- ": 0.4;\n\n ",
134
- ": var(--text-primary);\n ",
135
- ": transparent;\n ",
136
- ": var(--text-secondary);\n "
137
- ]);
138
- _templateObject3 = function _templateObject() {
139
- return data;
140
- };
141
- return data;
142
- }
143
- var config = {
144
- defaults: {
145
- view: 'default',
146
- size: 's'
6
+ exports.config = void 0;
7
+ var _emotion = /*#__PURE__*/require("@salutejs/plasma-new-hope/emotion");
8
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
9
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
10
+ var config = exports.config = {
11
+ defaults: {
12
+ view: 'default',
13
+ size: 's'
14
+ },
15
+ variations: {
16
+ view: {
17
+ "default": /*#__PURE__*/(0, _emotion.css)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--surface-solid-card);\n ", ": var(--outline-solid-primary);\n ", ": var(--outline-negative);\n ", ": var(--outline-accent);\n\n ", ": var(--text-primary);\n ", ": var(--text-primary);\n ", ": var(--text-secondary);\n ", ": var(--text-negative);\n ", ": var(--text-positive);\n\n ", ": var(--surface-negative);\n\n ", ": var(--text-primary);\n ", ": var(--text-secondary);\n ", ": var(--text-tertiary);\n ", ": var(--text-accent);\n\n ", ": var(--outline-solid-primary-hover);\n ", ": var(--outline-accent);\n ", ": var(--outline-negative);\n ", ": var(--outline-negative);\n ", ": var(--outline-accent);\n ", ": var(--outline-accent);\n\n ", ": var(--text-accent);\n ", ": var(--text-secondary);\n ", ": var(--text-secondary);\n "])), _emotion.rangeTokens.background, _emotion.rangeTokens.borderColor, _emotion.rangeTokens.borderColorError, _emotion.rangeTokens.borderColorSuccess, _emotion.rangeTokens.dividerColor, _emotion.rangeTokens.labelColor, _emotion.rangeTokens.leftHelperColor, _emotion.rangeTokens.leftHelperColorError, _emotion.rangeTokens.leftHelperColorSuccess, _emotion.rangeTokens.indicatorColor, _emotion.rangeTokens.textFieldColor, _emotion.rangeTokens.textFieldPlaceholderColor, _emotion.rangeTokens.textFieldPlaceholderColorFocus, _emotion.rangeTokens.textFieldCaretColor, _emotion.rangeTokens.textFieldBorderColorHover, _emotion.rangeTokens.textFieldBorderColorFocus, _emotion.rangeTokens.textFieldBorderColorError, _emotion.rangeTokens.textFieldBorderColorErrorFocus, _emotion.rangeTokens.textFieldBorderColorSuccess, _emotion.rangeTokens.textFieldBorderColorSuccessFocus, _emotion.rangeTokens.focusColor, _emotion.rangeTokens.textFieldTextAfterColor, _emotion.rangeTokens.textFieldTextBeforeColor)
18
+ },
19
+ size: {
20
+ s: /*#__PURE__*/(0, _emotion.css)(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.625rem;\n ", ": 0.125rem;\n\n ", ": 0 0.375rem;\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-bold-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": 0 0.375rem 0 0.75rem;\n ", ": 0;\n\n ", ": 0.5rem;\n\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": 0.375rem;\n ", ": 0.375rem;\n ", ": 0 0 0 0;\n ", ": 0.3125rem auto auto -0.6875rem;\n ", ": 0 0 auto auto;\n ", ": 0.25rem -0.625rem auto auto;\n\n ", ": 2.5rem;\n ", ": 0.625rem;\n ", ": 0.125rem;\n ", ": 0.6875rem 0.75rem 0.6875rem 0.75rem;\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": 0.25rem 0 0 0;\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": -0.1875rem 0.25rem -0.1875rem -0.125rem;\n ", ": -0.1875rem -0.125rem -0.1875rem 0.75rem;\n ", ": 0 0.25rem 0 0;\n ", ": 0 0 0 0.25rem;\n "])), _emotion.rangeTokens.borderRadius, _emotion.rangeTokens.borderWidth, _emotion.rangeTokens.dividerPadding, _emotion.rangeTokens.dividerFontFamily, _emotion.rangeTokens.dividerFontStyle, _emotion.rangeTokens.dividerFontSize, _emotion.rangeTokens.dividerFontWeight, _emotion.rangeTokens.dividerLetterSpacing, _emotion.rangeTokens.dividerLineHeight, _emotion.rangeTokens.leftContentMargin, _emotion.rangeTokens.rightContentMargin, _emotion.rangeTokens.labelOffset, _emotion.rangeTokens.labelFontFamily, _emotion.rangeTokens.labelFontStyle, _emotion.rangeTokens.labelFontSize, _emotion.rangeTokens.labelFontWeight, _emotion.rangeTokens.labelLetterSpacing, _emotion.rangeTokens.labelLineHeight, _emotion.rangeTokens.indicatorSize, _emotion.rangeTokens.indicatorSizeOuter, _emotion.rangeTokens.indicatorPlacement, _emotion.rangeTokens.indicatorOuterPlacement, _emotion.rangeTokens.indicatorPlacementRight, _emotion.rangeTokens.indicatorOuterPlacementRight, _emotion.rangeTokens.textFieldHeight, _emotion.rangeTokens.textFieldBorderRadius, _emotion.rangeTokens.textFieldBorderWidth, _emotion.rangeTokens.textFieldPadding, _emotion.rangeTokens.textFieldFontFamily, _emotion.rangeTokens.textFieldFontStyle, _emotion.rangeTokens.textFieldFontSize, _emotion.rangeTokens.textFieldFontWeight, _emotion.rangeTokens.textFieldLetterSpacing, _emotion.rangeTokens.textFieldLineHeight, _emotion.rangeTokens.leftHelperOffset, _emotion.rangeTokens.leftHelperFontFamily, _emotion.rangeTokens.leftHelperFontStyle, _emotion.rangeTokens.leftHelperFontSize, _emotion.rangeTokens.leftHelperFontWeight, _emotion.rangeTokens.leftHelperLetterSpacing, _emotion.rangeTokens.leftHelperLineHeight, _emotion.rangeTokens.textFieldLeftContentMargin, _emotion.rangeTokens.textFieldRightContentMargin, _emotion.rangeTokens.textFieldTextBeforeMargin, _emotion.rangeTokens.textFieldTextAfterMargin)
21
+ },
22
+ disabled: {
23
+ "true": /*#__PURE__*/(0, _emotion.css)(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1;\n ", ": var(--surface-solid-primary);\n ", ": var(--surface-solid-primary);\n ", ": var(--surface-solid-primary);\n ", ": var(--text-secondary);\n ", ": var(--text-secondary);\n "])), _emotion.rangeTokens.disabledOpacity, _emotion.rangeTokens.background, _emotion.rangeTokens.borderColor, _emotion.rangeTokens.textFieldBorderColorFocus, _emotion.rangeTokens.textFieldColor, _emotion.rangeTokens.textFieldPlaceholderColor)
147
24
  },
148
- variations: {
149
- view: {
150
- default: (0, _emotion.css)(_templateObject(), _emotion.rangeTokens.background, _emotion.rangeTokens.borderColor, _emotion.rangeTokens.borderColorError, _emotion.rangeTokens.borderColorSuccess, _emotion.rangeTokens.dividerColor, _emotion.rangeTokens.labelColor, _emotion.rangeTokens.leftHelperColor, _emotion.rangeTokens.leftHelperColorError, _emotion.rangeTokens.leftHelperColorSuccess, _emotion.rangeTokens.indicatorColor, _emotion.rangeTokens.textFieldColor, _emotion.rangeTokens.textFieldPlaceholderColor, _emotion.rangeTokens.textFieldPlaceholderColorFocus, _emotion.rangeTokens.textFieldCaretColor, _emotion.rangeTokens.textFieldBorderColorHover, _emotion.rangeTokens.textFieldBorderColorFocus, _emotion.rangeTokens.textFieldBorderColorError, _emotion.rangeTokens.textFieldBorderColorErrorFocus, _emotion.rangeTokens.textFieldBorderColorSuccess, _emotion.rangeTokens.textFieldBorderColorSuccessFocus, _emotion.rangeTokens.focusColor, _emotion.rangeTokens.textFieldTextAfterColor, _emotion.rangeTokens.textFieldTextBeforeColor)
151
- },
152
- size: {
153
- s: (0, _emotion.css)(_templateObject1(), _emotion.rangeTokens.borderRadius, _emotion.rangeTokens.borderWidth, _emotion.rangeTokens.dividerPadding, _emotion.rangeTokens.dividerFontFamily, _emotion.rangeTokens.dividerFontStyle, _emotion.rangeTokens.dividerFontSize, _emotion.rangeTokens.dividerFontWeight, _emotion.rangeTokens.dividerLetterSpacing, _emotion.rangeTokens.dividerLineHeight, _emotion.rangeTokens.leftContentMargin, _emotion.rangeTokens.rightContentMargin, _emotion.rangeTokens.labelOffset, _emotion.rangeTokens.labelFontFamily, _emotion.rangeTokens.labelFontStyle, _emotion.rangeTokens.labelFontSize, _emotion.rangeTokens.labelFontWeight, _emotion.rangeTokens.labelLetterSpacing, _emotion.rangeTokens.labelLineHeight, _emotion.rangeTokens.indicatorSize, _emotion.rangeTokens.indicatorSizeOuter, _emotion.rangeTokens.indicatorPlacement, _emotion.rangeTokens.indicatorOuterPlacement, _emotion.rangeTokens.indicatorPlacementRight, _emotion.rangeTokens.indicatorOuterPlacementRight, _emotion.rangeTokens.textFieldHeight, _emotion.rangeTokens.textFieldBorderRadius, _emotion.rangeTokens.textFieldBorderWidth, _emotion.rangeTokens.textFieldPadding, _emotion.rangeTokens.textFieldFontFamily, _emotion.rangeTokens.textFieldFontStyle, _emotion.rangeTokens.textFieldFontSize, _emotion.rangeTokens.textFieldFontWeight, _emotion.rangeTokens.textFieldLetterSpacing, _emotion.rangeTokens.textFieldLineHeight, _emotion.rangeTokens.leftHelperOffset, _emotion.rangeTokens.leftHelperFontFamily, _emotion.rangeTokens.leftHelperFontStyle, _emotion.rangeTokens.leftHelperFontSize, _emotion.rangeTokens.leftHelperFontWeight, _emotion.rangeTokens.leftHelperLetterSpacing, _emotion.rangeTokens.leftHelperLineHeight, _emotion.rangeTokens.textFieldLeftContentMargin, _emotion.rangeTokens.textFieldRightContentMargin, _emotion.rangeTokens.textFieldTextBeforeMargin, _emotion.rangeTokens.textFieldTextAfterMargin)
154
- },
155
- disabled: {
156
- true: (0, _emotion.css)(_templateObject2(), _emotion.rangeTokens.disabledOpacity, _emotion.rangeTokens.background, _emotion.rangeTokens.borderColor, _emotion.rangeTokens.textFieldBorderColorFocus, _emotion.rangeTokens.textFieldColor, _emotion.rangeTokens.textFieldPlaceholderColor)
157
- },
158
- readOnly: {
159
- true: (0, _emotion.css)(_templateObject3(), _emotion.rangeTokens.backgroundReadOnly, _emotion.rangeTokens.labelColorReadOnly, _emotion.rangeTokens.borderColorReadOnly, _emotion.rangeTokens.leftHelperColorReadOnly, _emotion.rangeTokens.dividerColorReadOnly, _emotion.rangeTokens.readOnlyOpacity, _emotion.rangeTokens.dividerOpacityReadOnly, _emotion.rangeTokens.rightContentOpacityReadOnly, _emotion.rangeTokens.textFieldColorReadOnly, _emotion.rangeTokens.textFieldBackgroundColorReadOnly, _emotion.rangeTokens.textFieldPlaceholderColorReadOnly)
160
- }
25
+ readOnly: {
26
+ "true": /*#__PURE__*/(0, _emotion.css)(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--surface-solid-card);\n ", ": var(--text-primary);\n ", ": var(--outline-solid-primary);\n ", ": var(--text-secondary);\n ", ": var(--text-secondary);\n ", ": 1;\n ", ": 1;\n ", ": 0.4;\n\n ", ": var(--text-primary);\n ", ": transparent;\n ", ": var(--text-secondary);\n "])), _emotion.rangeTokens.backgroundReadOnly, _emotion.rangeTokens.labelColorReadOnly, _emotion.rangeTokens.borderColorReadOnly, _emotion.rangeTokens.leftHelperColorReadOnly, _emotion.rangeTokens.dividerColorReadOnly, _emotion.rangeTokens.readOnlyOpacity, _emotion.rangeTokens.dividerOpacityReadOnly, _emotion.rangeTokens.rightContentOpacityReadOnly, _emotion.rangeTokens.textFieldColorReadOnly, _emotion.rangeTokens.textFieldBackgroundColorReadOnly, _emotion.rangeTokens.textFieldPlaceholderColorReadOnly)
161
27
  }
162
- };
28
+ }
29
+ };
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
+ value: true
4
5
  });
5
- Object.defineProperty(exports, "Range", {
6
- enumerable: true,
7
- get: function() {
8
- return Range;
9
- }
10
- });
11
- var _emotion = require("@salutejs/plasma-new-hope/emotion");
12
- var _Rangeconfig = require("./Range.config");
13
- var mergedConfig = (0, _emotion.mergeConfig)(_emotion.rangeConfig, _Rangeconfig.config);
14
- var Range = (0, _emotion.component)(mergedConfig);
6
+ exports.Range = void 0;
7
+ var _emotion = /*#__PURE__*/require("@salutejs/plasma-new-hope/emotion");
8
+ var _Range = /*#__PURE__*/require("./Range.config");
9
+ var mergedConfig = /*#__PURE__*/(0, _emotion.mergeConfig)(_emotion.rangeConfig, _Range.config);
10
+
11
+ /**
12
+ * Компонент Range.
13
+ */
14
+ var Range = exports.Range = /*#__PURE__*/(0, _emotion.component)(mergedConfig);
@@ -0,0 +1,343 @@
1
+ import React, { ChangeEvent, ComponentProps, Dispatch, SetStateAction, useState } from 'react';
2
+ import type { StoryObj, Meta } from '@storybook/react';
3
+ import { action } from '@storybook/addon-actions';
4
+ import { disableProps, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
5
+ import { IconSearch, IconSber, IconArrowRight } from '@salutejs/plasma-icons';
6
+
7
+ import { IconButton } from '../IconButton';
8
+
9
+ import { Range } from './Range';
10
+
11
+ const onChangeFirstValue = action('onChangeFirstValue');
12
+ const onChangeSecondValue = action('onChangeSecondValue');
13
+ const onSearchFirstValue = action('onSearchFirstValue');
14
+ const onSearchSecondValue = action('onSearchSecondValue');
15
+ const onFocusFirstTextfield = action('onFocusFirstTextfield');
16
+ const onFocusSecondTextfield = action('onFocusSecondTextfield');
17
+ const onBlurFirstTextfield = action('onBlurFirstTextfield');
18
+ const onBlurSecondTextfield = action('onBlurSecondTextfield');
19
+
20
+ const sizes = ['s'];
21
+ const views = ['default'];
22
+ const dividers = ['none', 'dash', 'icon'];
23
+ const requiredPlacements = ['left', 'right'];
24
+
25
+ const meta: Meta<typeof Range> = {
26
+ title: 'Data Entry/Range',
27
+ component: Range,
28
+ decorators: [InSpacingDecorator],
29
+ argTypes: {
30
+ view: {
31
+ options: views,
32
+ control: {
33
+ type: 'inline-radio',
34
+ },
35
+ },
36
+ size: {
37
+ options: sizes,
38
+ control: {
39
+ type: 'inline-radio',
40
+ },
41
+ },
42
+ requiredPlacement: {
43
+ options: requiredPlacements,
44
+ control: {
45
+ type: 'select',
46
+ },
47
+ if: {
48
+ arg: 'required',
49
+ truthy: true,
50
+ },
51
+ },
52
+ hasRequiredIndicator: {
53
+ control: {
54
+ type: 'boolean',
55
+ },
56
+ if: {
57
+ arg: 'required',
58
+ truthy: true,
59
+ },
60
+ },
61
+ ...disableProps(['view']),
62
+ },
63
+ };
64
+
65
+ export default meta;
66
+
67
+ type StoryPropsDefault = ComponentProps<typeof Range> & {
68
+ enableContentLeft: boolean;
69
+ enableContentRight: boolean;
70
+ enableFirstTextfieldContentLeft: boolean;
71
+ enableSecondTextfieldContentLeft: boolean;
72
+ enableFirstTextfieldContentRight: boolean;
73
+ enableSecondTextfieldContentRight: boolean;
74
+ };
75
+
76
+ const getSizeForIcon = (size) => {
77
+ const map = {
78
+ m: 's',
79
+ l: 's',
80
+ s: 's',
81
+ xs: 'xs',
82
+ };
83
+ if (map[size]) {
84
+ return map[size];
85
+ }
86
+
87
+ return size;
88
+ };
89
+
90
+ const ActionButton = ({ size, readOnly }) => {
91
+ const iconSize = size === 'xs' ? 'xs' : 's';
92
+ return (
93
+ <IconButton view="clear" size={size} disabled={readOnly}>
94
+ <IconSearch color={readOnly ? 'var(--text-secondary)' : 'inherit'} size={getSizeForIcon(size)} />
95
+ </IconButton>
96
+ );
97
+ };
98
+
99
+ const StoryDefault = ({
100
+ dividerVariant,
101
+ enableContentLeft,
102
+ enableContentRight,
103
+ firstTextfieldTextBefore,
104
+ secondTextfieldTextBefore,
105
+ enableFirstTextfieldContentLeft,
106
+ enableSecondTextfieldContentLeft,
107
+ enableFirstTextfieldContentRight,
108
+ enableSecondTextfieldContentRight,
109
+ size,
110
+ ...rest
111
+ }: StoryPropsDefault) => {
112
+ const [firstValue, setFirstValue] = useState('');
113
+ const [secondValue, setSecondValue] = useState('');
114
+
115
+ const iconSize = 's';
116
+ const showDividerIcon = dividerVariant === 'icon';
117
+ const showDefaultTextBefore = dividerVariant === 'none';
118
+
119
+ const dividerIconProps = {
120
+ dividerIcon: showDividerIcon ? <IconArrowRight size={iconSize} /> : null,
121
+ dividerVariant,
122
+ };
123
+
124
+ return (
125
+ <Range
126
+ size={size}
127
+ firstValue={firstValue}
128
+ secondValue={secondValue}
129
+ contentLeft={enableContentLeft ? <IconSber color="inherit" size={iconSize} /> : undefined}
130
+ contentRight={enableContentRight ? <ActionButton size={size} readOnly={rest.readOnly} /> : undefined}
131
+ firstTextfieldContentLeft={
132
+ enableFirstTextfieldContentLeft ? <IconSber color="inherit" size={iconSize} /> : undefined
133
+ }
134
+ firstTextfieldContentRight={
135
+ enableFirstTextfieldContentRight ? (
136
+ <IconSber color="inherit" size={iconSize} readOnly={rest.readOnly} />
137
+ ) : undefined
138
+ }
139
+ secondTextfieldContentLeft={
140
+ enableSecondTextfieldContentLeft ? <IconSber color="inherit" size={iconSize} /> : undefined
141
+ }
142
+ secondTextfieldContentRight={
143
+ enableSecondTextfieldContentRight ? (
144
+ <IconSber color="inherit" size={iconSize} readOnly={rest.readOnly} />
145
+ ) : undefined
146
+ }
147
+ firstTextfieldTextBefore={
148
+ showDefaultTextBefore ? firstTextfieldTextBefore || 'С' : firstTextfieldTextBefore
149
+ }
150
+ secondTextfieldTextBefore={
151
+ showDefaultTextBefore ? secondTextfieldTextBefore || 'ПО' : secondTextfieldTextBefore
152
+ }
153
+ onChangeFirstValue={(e) => {
154
+ setFirstValue(e.target.value);
155
+ onChangeFirstValue(e, e.target.value);
156
+ }}
157
+ onChangeSecondValue={(e) => {
158
+ setSecondValue(e.target.value);
159
+ onChangeSecondValue(e, e.target.value);
160
+ }}
161
+ onSearchFirstValue={onSearchFirstValue}
162
+ onSearchSecondValue={onSearchSecondValue}
163
+ onFocusFirstTextfield={onFocusFirstTextfield}
164
+ onFocusSecondTextfield={onFocusSecondTextfield}
165
+ onBlurFirstTextfield={onBlurFirstTextfield}
166
+ onBlurSecondTextfield={onBlurSecondTextfield}
167
+ {...dividerIconProps}
168
+ {...rest}
169
+ />
170
+ );
171
+ };
172
+
173
+ export const Default: StoryObj<StoryPropsDefault> = {
174
+ argTypes: {
175
+ dividerVariant: {
176
+ options: dividers,
177
+ control: {
178
+ type: 'inline-radio',
179
+ },
180
+ },
181
+ },
182
+ args: {
183
+ label: 'Лейбл',
184
+ leftHelper: 'Подсказка к полю',
185
+ firstPlaceholder: 'Заполните поле 1',
186
+ secondPlaceholder: 'Заполните поле 2',
187
+ size: 's',
188
+ view: 'default',
189
+ required: false,
190
+ requiredPlacement: 'right',
191
+ hasRequiredIndicator: true,
192
+ disabled: false,
193
+ readOnly: false,
194
+ firstTextfieldTextBefore: 'С',
195
+ secondTextfieldTextBefore: 'ПО',
196
+ enableContentLeft: true,
197
+ enableContentRight: true,
198
+ dividerVariant: 'dash',
199
+ enableFirstTextfieldContentLeft: false,
200
+ enableFirstTextfieldContentRight: false,
201
+ enableSecondTextfieldContentLeft: false,
202
+ enableSecondTextfieldContentRight: false,
203
+ firstValueError: false,
204
+ secondValueError: false,
205
+ firstValueSuccess: false,
206
+ secondValueSuccess: false,
207
+ },
208
+ render: (args) => <StoryDefault {...args} />,
209
+ };
210
+
211
+ const StoryDemo = ({ enableContentLeft, enableContentRight, size, ...rest }: StoryPropsDefault) => {
212
+ const [firstValue, setFirstValue] = useState('');
213
+ const [secondValue, setSecondValue] = useState('');
214
+
215
+ const [firstValueError, setFirstValueError] = useState(false);
216
+ const [secondValueError, setSecondValueError] = useState(false);
217
+
218
+ const [firstValueSuccess, setFirstValueSuccess] = useState(false);
219
+ const [secondValueSuccess, setSecondValueSuccess] = useState(false);
220
+
221
+ const checkValue = (value: string) => /^([1-9][0-9]*|)$/.test(value);
222
+
223
+ const handleChangeValue = (
224
+ e: ChangeEvent<HTMLInputElement>,
225
+ setter: Dispatch<SetStateAction<string>>,
226
+ error: boolean,
227
+ errorSetter: Dispatch<SetStateAction<boolean>>,
228
+ success: boolean,
229
+ successSetter: Dispatch<SetStateAction<boolean>>,
230
+ ) => {
231
+ const { value } = e.target;
232
+ if (!checkValue(value)) {
233
+ return;
234
+ }
235
+
236
+ if (error) {
237
+ errorSetter(false);
238
+ }
239
+
240
+ if (success) {
241
+ successSetter(false);
242
+ }
243
+
244
+ setter(value);
245
+ };
246
+
247
+ const firstValueConstraint = (value: number) =>
248
+ value <= 0 || value >= 9 || (secondValue && value >= Number(secondValue) && !secondValueError);
249
+ const secondValueConstraint = (value: number) =>
250
+ value <= 0 || value > 10 || (firstValue && value <= Number(firstValue) && !firstValueError);
251
+
252
+ const handleCommitValue = (
253
+ value: string,
254
+ constraint: (currentValue: number) => boolean,
255
+ errorSetter: Dispatch<SetStateAction<boolean>>,
256
+ successSetter: Dispatch<SetStateAction<boolean>>,
257
+ ) => {
258
+ if (!value) {
259
+ return;
260
+ }
261
+
262
+ if (!checkValue(value)) {
263
+ return errorSetter(true);
264
+ }
265
+
266
+ if (constraint(Number(value))) {
267
+ return errorSetter(true);
268
+ }
269
+
270
+ successSetter(true);
271
+ };
272
+
273
+ const iconSize = size === 'xs' ? 'xs' : 's';
274
+
275
+ return (
276
+ <Range
277
+ dividerVariant="dash"
278
+ size={size}
279
+ firstValue={firstValue}
280
+ secondValue={secondValue}
281
+ firstValueError={firstValueError}
282
+ secondValueError={secondValueError}
283
+ firstValueSuccess={firstValueSuccess}
284
+ secondValueSuccess={secondValueSuccess}
285
+ contentLeft={enableContentLeft ? <IconSber color="inherit" size={iconSize} /> : undefined}
286
+ contentRight={enableContentRight ? <ActionButton size={size} readOnly={rest.readOnly} /> : undefined}
287
+ onChangeFirstValue={(e) => {
288
+ handleChangeValue(
289
+ e,
290
+ setFirstValue,
291
+ firstValueError,
292
+ setFirstValueError,
293
+ firstValueSuccess,
294
+ setFirstValueSuccess,
295
+ );
296
+ }}
297
+ onChangeSecondValue={(e) => {
298
+ handleChangeValue(
299
+ e,
300
+ setSecondValue,
301
+ secondValueError,
302
+ setSecondValueError,
303
+ secondValueSuccess,
304
+ setSecondValueSuccess,
305
+ );
306
+ }}
307
+ onSearchFirstValue={(e) => {
308
+ const { value } = e.target as HTMLInputElement;
309
+ handleCommitValue(value, firstValueConstraint, setFirstValueError, setFirstValueSuccess);
310
+ }}
311
+ onSearchSecondValue={(e) => {
312
+ const { value } = e.target as HTMLInputElement;
313
+ handleCommitValue(value, secondValueConstraint, setSecondValueError, setSecondValueSuccess);
314
+ }}
315
+ onFocusFirstTextfield={onFocusFirstTextfield}
316
+ onFocusSecondTextfield={onFocusSecondTextfield}
317
+ onBlurFirstTextfield={onBlurFirstTextfield}
318
+ onBlurSecondTextfield={onBlurSecondTextfield}
319
+ {...rest}
320
+ />
321
+ );
322
+ };
323
+
324
+ export const Demo: StoryObj<StoryPropsDefault> = {
325
+ args: {
326
+ label: 'Введите кол-во товара',
327
+ leftHelper: 'Кол-во товара не может быть меньше 1 и превышать 10',
328
+ firstPlaceholder: '1',
329
+ secondPlaceholder: '5',
330
+ size: 's',
331
+ view: 'default',
332
+ required: false,
333
+ requiredPlacement: 'right',
334
+ hasRequiredIndicator: true,
335
+ disabled: false,
336
+ readOnly: false,
337
+ firstTextfieldTextBefore: '',
338
+ secondTextfieldTextBefore: '',
339
+ enableContentLeft: true,
340
+ enableContentRight: true,
341
+ },
342
+ render: (args) => <StoryDemo {...args} />,
343
+ };
@@ -1,20 +1,19 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
+ value: true
4
5
  });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: Object.getOwnPropertyDescriptor(all, name).get
9
- });
10
- }
11
- _export(exports, {
12
- get Range () {
13
- return _Range.Range;
14
- },
15
- get rangeTokens () {
16
- return _emotion.rangeTokens;
17
- }
6
+ Object.defineProperty(exports, "Range", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _Range.Range;
10
+ }
18
11
  });
19
- var _Range = require("./Range");
20
- var _emotion = require("@salutejs/plasma-new-hope/emotion");
12
+ Object.defineProperty(exports, "rangeTokens", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _emotion.rangeTokens;
16
+ }
17
+ });
18
+ var _Range = /*#__PURE__*/require("./Range");
19
+ var _emotion = /*#__PURE__*/require("@salutejs/plasma-new-hope/emotion");