@salutejs/plasma-new-hope 0.80.0-canary.1194.9085423232.0 → 0.81.0-canary.1203.9092095304.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (569) hide show
  1. package/cjs/components/Calendar/Calendar.types.js.map +1 -1
  2. package/cjs/components/Calendar/CalendarBase/CalendarBase.js +3 -1
  3. package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  4. package/cjs/components/Calendar/hooks/useDays.js +6 -3
  5. package/cjs/components/Calendar/hooks/useDays.js.map +1 -1
  6. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +2 -1
  7. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
  8. package/cjs/components/Checkbox/Checkbox.css +13 -0
  9. package/cjs/components/Checkbox/Checkbox.js +22 -59
  10. package/cjs/components/Checkbox/Checkbox.js.map +1 -1
  11. package/cjs/components/Checkbox/Checkbox.styles.js +47 -0
  12. package/cjs/components/Checkbox/Checkbox.styles.js.map +1 -0
  13. package/cjs/components/Checkbox/Checkbox.styles_1266095.css +7 -0
  14. package/cjs/components/Checkbox/Checkbox.tokens.js +41 -0
  15. package/cjs/components/Checkbox/Checkbox.tokens.js.map +1 -0
  16. package/cjs/components/Checkbox/IconsSvg.js +9 -9
  17. package/cjs/components/Checkbox/IconsSvg.js.map +1 -1
  18. package/cjs/components/Checkbox/{_disabled → variations/_disabled}/base.js +2 -2
  19. package/cjs/components/Checkbox/variations/_disabled/base.js.map +1 -0
  20. package/cjs/components/Checkbox/variations/_disabled/base_1krdtt6.css +1 -0
  21. package/cjs/components/Checkbox/variations/_focused/base.js +14 -0
  22. package/cjs/components/Checkbox/variations/_focused/base.js.map +1 -0
  23. package/cjs/components/Checkbox/variations/_focused/base_hr4zpz.css +1 -0
  24. package/cjs/components/{Radiobox → Checkbox/variations}/_size/base.js +1 -1
  25. package/cjs/components/Checkbox/variations/_size/base.js.map +1 -0
  26. package/cjs/components/Checkbox/{_size → variations/_view}/base.js +2 -2
  27. package/cjs/components/Checkbox/variations/_view/base.js.map +1 -0
  28. package/cjs/components/Checkbox/variations/_view/base_x252cy.css +1 -0
  29. package/cjs/components/Combobox/hooks/useFocusController.js +0 -1
  30. package/cjs/components/Combobox/hooks/useFocusController.js.map +1 -1
  31. package/cjs/components/Radiobox/Radiobox.css +16 -0
  32. package/cjs/components/Radiobox/Radiobox.js +23 -32
  33. package/cjs/components/Radiobox/Radiobox.js.map +1 -1
  34. package/cjs/components/Radiobox/Radiobox.styles.js +19 -0
  35. package/cjs/components/Radiobox/Radiobox.styles.js.map +1 -0
  36. package/cjs/components/Radiobox/Radiobox.styles_1skfuon.css +2 -0
  37. package/cjs/components/Radiobox/Radiobox.tokens.js +41 -0
  38. package/cjs/components/Radiobox/Radiobox.tokens.js.map +1 -0
  39. package/cjs/components/{Checkbox/_focused → Radiobox/variations/_disabled}/base.js +2 -2
  40. package/cjs/components/Radiobox/variations/_disabled/base.js.map +1 -0
  41. package/cjs/components/Radiobox/variations/_disabled/base_6ae9j2.css +1 -0
  42. package/cjs/components/{Checkbox/_view → Radiobox/variations/_focused}/base.js +2 -2
  43. package/cjs/components/Radiobox/variations/_focused/base.js.map +1 -0
  44. package/cjs/components/Radiobox/{_focused/base_1nruwxa.css → variations/_focused/base_1d7o4za.css} +1 -1
  45. package/cjs/components/{Slider/variations/_disabled → Radiobox/variations/_size}/base.js +1 -1
  46. package/cjs/components/Radiobox/variations/_size/base.js.map +1 -0
  47. package/cjs/components/Radiobox/variations/_view/base.js +9 -0
  48. package/cjs/components/Radiobox/variations/_view/base.js.map +1 -0
  49. package/cjs/components/Radiobox/{_view/base_wj0ueq.css → variations/_view/base_11n1fn3.css} +1 -1
  50. package/cjs/components/TextField/TextField.js +3 -12
  51. package/cjs/components/TextField/TextField.js.map +1 -1
  52. package/cjs/engines/common.js +0 -4
  53. package/cjs/engines/common.js.map +1 -1
  54. package/cjs/engines/index.js.map +1 -1
  55. package/cjs/index.css +15 -40
  56. package/cjs/index.js +4 -14
  57. package/cjs/index.js.map +1 -1
  58. package/cjs/utils/index.js.map +1 -1
  59. package/es/components/Calendar/Calendar.types.js.map +1 -1
  60. package/es/components/Calendar/CalendarBase/CalendarBase.js +3 -1
  61. package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  62. package/es/components/Calendar/hooks/useDays.js +6 -3
  63. package/es/components/Calendar/hooks/useDays.js.map +1 -1
  64. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +2 -1
  65. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
  66. package/es/components/Checkbox/Checkbox.css +13 -0
  67. package/es/components/Checkbox/Checkbox.js +12 -43
  68. package/es/components/Checkbox/Checkbox.js.map +1 -1
  69. package/es/components/Checkbox/Checkbox.styles.js +37 -0
  70. package/es/components/Checkbox/Checkbox.styles.js.map +1 -0
  71. package/es/components/Checkbox/Checkbox.styles_1266095.css +7 -0
  72. package/es/components/Checkbox/Checkbox.tokens.js +36 -0
  73. package/es/components/Checkbox/Checkbox.tokens.js.map +1 -0
  74. package/es/components/Checkbox/IconsSvg.js +9 -9
  75. package/es/components/Checkbox/IconsSvg.js.map +1 -1
  76. package/es/components/Checkbox/{_focused → variations/_disabled}/base.js +2 -2
  77. package/es/components/Checkbox/variations/_disabled/base.js.map +1 -0
  78. package/es/components/Checkbox/variations/_disabled/base_1krdtt6.css +1 -0
  79. package/es/components/Checkbox/variations/_focused/base.js +10 -0
  80. package/es/components/Checkbox/variations/_focused/base.js.map +1 -0
  81. package/es/components/Checkbox/variations/_focused/base_hr4zpz.css +1 -0
  82. package/es/components/{Radiobox → Checkbox/variations}/_size/base.js +1 -1
  83. package/es/components/Checkbox/variations/_size/base.js.map +1 -0
  84. package/es/components/Checkbox/{_view → variations/_view}/base.js +2 -2
  85. package/es/components/Checkbox/variations/_view/base.js.map +1 -0
  86. package/es/components/Checkbox/variations/_view/base_x252cy.css +1 -0
  87. package/es/components/Combobox/hooks/useFocusController.js +0 -1
  88. package/es/components/Combobox/hooks/useFocusController.js.map +1 -1
  89. package/es/components/Radiobox/Radiobox.css +16 -0
  90. package/es/components/Radiobox/Radiobox.js +12 -21
  91. package/es/components/Radiobox/Radiobox.js.map +1 -1
  92. package/es/components/Radiobox/Radiobox.styles.js +14 -0
  93. package/es/components/Radiobox/Radiobox.styles.js.map +1 -0
  94. package/es/components/Radiobox/Radiobox.styles_1skfuon.css +2 -0
  95. package/es/components/Radiobox/Radiobox.tokens.js +36 -0
  96. package/es/components/Radiobox/Radiobox.tokens.js.map +1 -0
  97. package/es/components/{Checkbox → Radiobox/variations}/_disabled/base.js +2 -2
  98. package/es/components/Radiobox/variations/_disabled/base.js.map +1 -0
  99. package/es/components/Radiobox/variations/_disabled/base_6ae9j2.css +1 -0
  100. package/es/components/Radiobox/variations/_focused/base.js +5 -0
  101. package/es/components/Radiobox/variations/_focused/base.js.map +1 -0
  102. package/es/components/Radiobox/{_focused/base_1nruwxa.css → variations/_focused/base_1d7o4za.css} +1 -1
  103. package/es/components/{Checkbox → Radiobox/variations}/_size/base.js +1 -1
  104. package/es/components/Radiobox/variations/_size/base.js.map +1 -0
  105. package/es/components/Radiobox/variations/_view/base.js +5 -0
  106. package/es/components/Radiobox/variations/_view/base.js.map +1 -0
  107. package/es/components/Radiobox/{_view/base_wj0ueq.css → variations/_view/base_11n1fn3.css} +1 -1
  108. package/es/components/TextField/TextField.js +3 -12
  109. package/es/components/TextField/TextField.js.map +1 -1
  110. package/es/engines/common.js +0 -4
  111. package/es/engines/common.js.map +1 -1
  112. package/es/engines/index.js.map +1 -1
  113. package/es/index.css +15 -40
  114. package/es/index.js +2 -8
  115. package/es/index.js.map +1 -1
  116. package/es/utils/index.js.map +1 -1
  117. package/package.json +2 -3
  118. package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +3 -1
  119. package/styled-components/cjs/components/Calendar/hooks/useDays.js +6 -3
  120. package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +2 -1
  121. package/styled-components/cjs/components/Checkbox/Checkbox.js +20 -40
  122. package/styled-components/cjs/components/Checkbox/Checkbox.styles.js +33 -0
  123. package/styled-components/cjs/components/Checkbox/Checkbox.tokens.js +39 -0
  124. package/styled-components/cjs/components/Checkbox/IconsSvg.js +9 -9
  125. package/styled-components/cjs/components/Checkbox/index.js +8 -1
  126. package/styled-components/cjs/components/Checkbox/variations/_disabled/base.js +10 -0
  127. package/styled-components/cjs/components/Checkbox/variations/_focused/base.js +32 -0
  128. package/styled-components/cjs/components/Checkbox/variations/_view/base.js +10 -0
  129. package/styled-components/cjs/components/Checkbox/variations/_view/tokens.json +1 -0
  130. package/styled-components/cjs/components/Radiobox/Radiobox.js +15 -22
  131. package/styled-components/cjs/components/Radiobox/Radiobox.styles.js +19 -0
  132. package/styled-components/cjs/components/Radiobox/Radiobox.tokens.js +39 -0
  133. package/styled-components/cjs/components/Radiobox/index.js +8 -1
  134. package/styled-components/cjs/components/{Checkbox → Radiobox/variations}/_disabled/base.js +2 -1
  135. package/styled-components/cjs/components/Radiobox/variations/_focused/base.js +27 -0
  136. package/styled-components/cjs/components/Radiobox/variations/_view/base.js +9 -0
  137. package/styled-components/cjs/components/TextField/TextField.js +3 -12
  138. package/styled-components/cjs/engines/common.js +0 -4
  139. package/styled-components/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +18 -6
  140. package/styled-components/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.config.js +14 -14
  141. package/styled-components/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +1 -0
  142. package/styled-components/cjs/examples/plasma_b2c/components/Radiobox/Radiobox.config.js +13 -12
  143. package/styled-components/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +18 -6
  144. package/styled-components/cjs/examples/plasma_web/components/Checkbox/Checkbox.config.js +14 -14
  145. package/styled-components/cjs/examples/plasma_web/components/Checkbox/Checkbox.stories.tsx +1 -0
  146. package/styled-components/cjs/examples/plasma_web/components/Radiobox/Radiobox.config.js +13 -12
  147. package/styled-components/cjs/examples/sds_engineer/components/Calendar/Calendar.stories.tsx +18 -6
  148. package/styled-components/cjs/examples/sds_engineer/components/Checkbox/Checkbox.config.js +14 -14
  149. package/styled-components/cjs/examples/sds_engineer/components/Radiobox/Radiobox.config.js +13 -12
  150. package/styled-components/cjs/hooks/index.js +1 -8
  151. package/styled-components/cjs/index.js +0 -11
  152. package/styled-components/cjs/utils/index.js +0 -7
  153. package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +3 -1
  154. package/styled-components/es/components/Calendar/hooks/useDays.js +6 -3
  155. package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.js +2 -1
  156. package/styled-components/es/components/Checkbox/Checkbox.js +12 -33
  157. package/styled-components/es/components/Checkbox/Checkbox.styles.js +25 -0
  158. package/styled-components/es/components/Checkbox/Checkbox.tokens.js +33 -0
  159. package/styled-components/es/components/Checkbox/IconsSvg.js +9 -9
  160. package/styled-components/es/components/Checkbox/index.js +2 -1
  161. package/styled-components/es/components/Checkbox/variations/_disabled/base.js +4 -0
  162. package/styled-components/es/components/Checkbox/variations/_focused/base.js +27 -0
  163. package/styled-components/es/components/Checkbox/variations/_view/base.js +4 -0
  164. package/styled-components/es/components/Checkbox/variations/_view/tokens.json +1 -0
  165. package/styled-components/es/components/Radiobox/Radiobox.js +13 -22
  166. package/styled-components/es/components/Radiobox/Radiobox.styles.js +12 -0
  167. package/styled-components/es/components/Radiobox/Radiobox.tokens.js +33 -0
  168. package/styled-components/es/components/Radiobox/index.js +2 -1
  169. package/styled-components/es/components/Radiobox/variations/_disabled/base.js +3 -0
  170. package/styled-components/es/components/Radiobox/variations/_focused/base.js +21 -0
  171. package/styled-components/es/components/Radiobox/variations/_view/base.js +3 -0
  172. package/styled-components/es/components/TextField/TextField.js +3 -12
  173. package/styled-components/es/engines/common.js +0 -4
  174. package/styled-components/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +18 -6
  175. package/styled-components/es/examples/plasma_b2c/components/Checkbox/Checkbox.config.js +14 -14
  176. package/styled-components/es/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +1 -0
  177. package/styled-components/es/examples/plasma_b2c/components/Radiobox/Radiobox.config.js +13 -12
  178. package/styled-components/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +18 -6
  179. package/styled-components/es/examples/plasma_web/components/Checkbox/Checkbox.config.js +14 -14
  180. package/styled-components/es/examples/plasma_web/components/Checkbox/Checkbox.stories.tsx +1 -0
  181. package/styled-components/es/examples/plasma_web/components/Radiobox/Radiobox.config.js +13 -12
  182. package/styled-components/es/examples/sds_engineer/components/Calendar/Calendar.stories.tsx +18 -6
  183. package/styled-components/es/examples/sds_engineer/components/Checkbox/Checkbox.config.js +14 -14
  184. package/styled-components/es/examples/sds_engineer/components/Radiobox/Radiobox.config.js +13 -12
  185. package/styled-components/es/hooks/index.js +1 -2
  186. package/styled-components/es/index.js +1 -2
  187. package/styled-components/es/utils/index.js +0 -1
  188. package/types/components/Calendar/Calendar.types.d.ts +4 -0
  189. package/types/components/Calendar/Calendar.types.d.ts.map +1 -1
  190. package/types/components/Calendar/CalendarBase/CalendarBase.d.ts.map +1 -1
  191. package/types/components/Calendar/hooks/useDays.d.ts +1 -1
  192. package/types/components/Calendar/hooks/useDays.d.ts.map +1 -1
  193. package/types/components/Calendar/ui/CalendarDays/CalendarDays.d.ts.map +1 -1
  194. package/types/components/Calendar/ui/CalendarDays/CalendarDays.types.d.ts +1 -0
  195. package/types/components/Calendar/ui/CalendarDays/CalendarDays.types.d.ts.map +1 -1
  196. package/types/components/Checkbox/Checkbox.d.ts +4 -37
  197. package/types/components/Checkbox/Checkbox.d.ts.map +1 -1
  198. package/types/components/Checkbox/Checkbox.styles.d.ts +9 -0
  199. package/types/components/Checkbox/Checkbox.styles.d.ts.map +1 -0
  200. package/types/components/Checkbox/Checkbox.tokens.d.ts +34 -0
  201. package/types/components/Checkbox/Checkbox.tokens.d.ts.map +1 -0
  202. package/types/components/Checkbox/Checkbox.types.d.ts +29 -0
  203. package/types/components/Checkbox/Checkbox.types.d.ts.map +1 -0
  204. package/types/components/Checkbox/IconsSvg.d.ts.map +1 -1
  205. package/types/components/Checkbox/index.d.ts +2 -1
  206. package/types/components/Checkbox/index.d.ts.map +1 -1
  207. package/types/components/Checkbox/variations/_disabled/base.d.ts.map +1 -0
  208. package/types/components/Checkbox/variations/_focused/base.d.ts +6 -0
  209. package/types/components/Checkbox/variations/_focused/base.d.ts.map +1 -0
  210. package/types/components/Checkbox/variations/_size/base.d.ts.map +1 -0
  211. package/types/components/Checkbox/variations/_view/base.d.ts.map +1 -0
  212. package/types/components/Radiobox/Radiobox.d.ts +1 -1
  213. package/types/components/Radiobox/Radiobox.d.ts.map +1 -1
  214. package/types/components/Radiobox/Radiobox.styles.d.ts +4 -0
  215. package/types/components/Radiobox/Radiobox.styles.d.ts.map +1 -0
  216. package/types/components/Radiobox/Radiobox.tokens.d.ts +34 -0
  217. package/types/components/Radiobox/Radiobox.tokens.d.ts.map +1 -0
  218. package/types/components/Radiobox/index.d.ts +1 -0
  219. package/types/components/Radiobox/index.d.ts.map +1 -1
  220. package/types/components/Radiobox/variations/_disabled/base.d.ts.map +1 -0
  221. package/types/components/Radiobox/variations/_focused/base.d.ts.map +1 -0
  222. package/types/components/Radiobox/variations/_size/base.d.ts.map +1 -0
  223. package/types/components/Radiobox/variations/_view/base.d.ts.map +1 -0
  224. package/types/components/TextField/TextField.d.ts.map +1 -1
  225. package/types/engines/common.d.ts +3 -3
  226. package/types/engines/common.d.ts.map +1 -1
  227. package/types/engines/index.d.ts +1 -1
  228. package/types/engines/index.d.ts.map +1 -1
  229. package/types/engines/types.d.ts +0 -4
  230. package/types/engines/types.d.ts.map +1 -1
  231. package/types/examples/plasma_b2c/components/Checkbox/Checkbox.config.d.ts +0 -1
  232. package/types/examples/plasma_b2c/components/Checkbox/Checkbox.config.d.ts.map +1 -1
  233. package/types/examples/plasma_b2c/components/Checkbox/Checkbox.d.ts +1 -1
  234. package/types/examples/plasma_b2c/components/Checkbox/Checkbox.d.ts.map +1 -1
  235. package/types/examples/plasma_b2c/components/Radiobox/Radiobox.config.d.ts.map +1 -1
  236. package/types/examples/plasma_web/components/Checkbox/Checkbox.config.d.ts +0 -1
  237. package/types/examples/plasma_web/components/Checkbox/Checkbox.config.d.ts.map +1 -1
  238. package/types/examples/plasma_web/components/Checkbox/Checkbox.d.ts +1 -1
  239. package/types/examples/plasma_web/components/Checkbox/Checkbox.d.ts.map +1 -1
  240. package/types/examples/plasma_web/components/Radiobox/Radiobox.config.d.ts.map +1 -1
  241. package/types/examples/sds_engineer/components/Checkbox/Checkbox.config.d.ts +0 -1
  242. package/types/examples/sds_engineer/components/Checkbox/Checkbox.config.d.ts.map +1 -1
  243. package/types/examples/sds_engineer/components/Checkbox/Checkbox.d.ts +1 -1
  244. package/types/examples/sds_engineer/components/Checkbox/Checkbox.d.ts.map +1 -1
  245. package/types/examples/sds_engineer/components/Radiobox/Radiobox.config.d.ts.map +1 -1
  246. package/types/hooks/index.d.ts +0 -1
  247. package/types/hooks/index.d.ts.map +1 -1
  248. package/types/index.d.ts +0 -1
  249. package/types/index.d.ts.map +1 -1
  250. package/types/utils/index.d.ts +0 -1
  251. package/types/utils/index.d.ts.map +1 -1
  252. package/cjs/components/Checkbox/Checkbox_1q4l832.css +0 -7
  253. package/cjs/components/Checkbox/_disabled/base.js.map +0 -1
  254. package/cjs/components/Checkbox/_disabled/base_fyu17z.css +0 -1
  255. package/cjs/components/Checkbox/_focused/base.js.map +0 -1
  256. package/cjs/components/Checkbox/_focused/base_po5iiu.css +0 -1
  257. package/cjs/components/Checkbox/_size/base.js.map +0 -1
  258. package/cjs/components/Checkbox/_view/base.js.map +0 -1
  259. package/cjs/components/Checkbox/_view/base_1vqr3f.css +0 -1
  260. package/cjs/components/Radiobox/Radiobox_1ri2eqv.css +0 -2
  261. package/cjs/components/Radiobox/_disabled/base.js +0 -9
  262. package/cjs/components/Radiobox/_disabled/base.js.map +0 -1
  263. package/cjs/components/Radiobox/_disabled/base_1jca5bk.css +0 -1
  264. package/cjs/components/Radiobox/_focused/base.js +0 -9
  265. package/cjs/components/Radiobox/_focused/base.js.map +0 -1
  266. package/cjs/components/Radiobox/_size/base.js.map +0 -1
  267. package/cjs/components/Radiobox/_view/base.js +0 -9
  268. package/cjs/components/Radiobox/_view/base.js.map +0 -1
  269. package/cjs/components/Slider/Slider.css +0 -69
  270. package/cjs/components/Slider/Slider.js +0 -53
  271. package/cjs/components/Slider/Slider.js.map +0 -1
  272. package/cjs/components/Slider/Slider.tokens.js +0 -79
  273. package/cjs/components/Slider/Slider.tokens.js.map +0 -1
  274. package/cjs/components/Slider/components/Double/Double.css +0 -62
  275. package/cjs/components/Slider/components/Double/Double.js +0 -274
  276. package/cjs/components/Slider/components/Double/Double.js.map +0 -1
  277. package/cjs/components/Slider/components/Double/Double.styles.js +0 -61
  278. package/cjs/components/Slider/components/Double/Double.styles.js.map +0 -1
  279. package/cjs/components/Slider/components/Double/Double.styles_1jhda4u.css +0 -7
  280. package/cjs/components/Slider/components/Single/Single.css +0 -16
  281. package/cjs/components/Slider/components/Single/Single.js +0 -160
  282. package/cjs/components/Slider/components/Single/Single.js.map +0 -1
  283. package/cjs/components/Slider/components/Single/Single.styles.js +0 -45
  284. package/cjs/components/Slider/components/Single/Single.styles.js.map +0 -1
  285. package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +0 -6
  286. package/cjs/components/Slider/components/SliderBase/SliderBase.css +0 -4
  287. package/cjs/components/Slider/components/SliderBase/SliderBase.js +0 -82
  288. package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +0 -1
  289. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +0 -33
  290. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +0 -1
  291. package/cjs/components/Slider/components/SliderBase/SliderBase.styles_7is2ll.css +0 -4
  292. package/cjs/components/Slider/ui/Handle/Handle.css +0 -4
  293. package/cjs/components/Slider/ui/Handle/Handle.js +0 -174
  294. package/cjs/components/Slider/ui/Handle/Handle.js.map +0 -1
  295. package/cjs/components/Slider/ui/Handle/Handle.styles.js +0 -21
  296. package/cjs/components/Slider/ui/Handle/Handle.styles.js.map +0 -1
  297. package/cjs/components/Slider/ui/Handle/Handle.styles_9m0x33.css +0 -2
  298. package/cjs/components/Slider/ui/Thumb/Thumb.css +0 -1
  299. package/cjs/components/Slider/ui/Thumb/Thumb.js +0 -31
  300. package/cjs/components/Slider/ui/Thumb/Thumb.js.map +0 -1
  301. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +0 -15
  302. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +0 -1
  303. package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +0 -1
  304. package/cjs/components/Slider/utils/index.js +0 -56
  305. package/cjs/components/Slider/utils/index.js.map +0 -1
  306. package/cjs/components/Slider/variations/_disabled/base.js.map +0 -1
  307. package/cjs/components/Slider/variations/_size/base.js +0 -9
  308. package/cjs/components/Slider/variations/_size/base.js.map +0 -1
  309. package/cjs/components/Slider/variations/_view/base.js +0 -9
  310. package/cjs/components/Slider/variations/_view/base.js.map +0 -1
  311. package/cjs/components/Slider/variations/_view/base_x642ct.css +0 -1
  312. package/cjs/hooks/useIsomorphicLayoutEffect.js +0 -15
  313. package/cjs/hooks/useIsomorphicLayoutEffect.js.map +0 -1
  314. package/cjs/utils/canUseDOM.js +0 -12
  315. package/cjs/utils/canUseDOM.js.map +0 -1
  316. package/es/components/Checkbox/Checkbox_1q4l832.css +0 -7
  317. package/es/components/Checkbox/_disabled/base.js.map +0 -1
  318. package/es/components/Checkbox/_disabled/base_fyu17z.css +0 -1
  319. package/es/components/Checkbox/_focused/base.js.map +0 -1
  320. package/es/components/Checkbox/_focused/base_po5iiu.css +0 -1
  321. package/es/components/Checkbox/_size/base.js.map +0 -1
  322. package/es/components/Checkbox/_size/base_x642ct.css +0 -1
  323. package/es/components/Checkbox/_view/base.js.map +0 -1
  324. package/es/components/Checkbox/_view/base_1vqr3f.css +0 -1
  325. package/es/components/Radiobox/Radiobox_1ri2eqv.css +0 -2
  326. package/es/components/Radiobox/_disabled/base.js +0 -5
  327. package/es/components/Radiobox/_disabled/base.js.map +0 -1
  328. package/es/components/Radiobox/_disabled/base_1jca5bk.css +0 -1
  329. package/es/components/Radiobox/_focused/base.js +0 -5
  330. package/es/components/Radiobox/_focused/base.js.map +0 -1
  331. package/es/components/Radiobox/_size/base.js.map +0 -1
  332. package/es/components/Radiobox/_size/base_x642ct.css +0 -1
  333. package/es/components/Radiobox/_view/base.js +0 -5
  334. package/es/components/Radiobox/_view/base.js.map +0 -1
  335. package/es/components/Slider/Slider.css +0 -69
  336. package/es/components/Slider/Slider.js +0 -48
  337. package/es/components/Slider/Slider.js.map +0 -1
  338. package/es/components/Slider/Slider.tokens.js +0 -74
  339. package/es/components/Slider/Slider.tokens.js.map +0 -1
  340. package/es/components/Slider/components/Double/Double.css +0 -62
  341. package/es/components/Slider/components/Double/Double.js +0 -270
  342. package/es/components/Slider/components/Double/Double.js.map +0 -1
  343. package/es/components/Slider/components/Double/Double.styles.js +0 -51
  344. package/es/components/Slider/components/Double/Double.styles.js.map +0 -1
  345. package/es/components/Slider/components/Double/Double.styles_1jhda4u.css +0 -7
  346. package/es/components/Slider/components/Single/Single.css +0 -16
  347. package/es/components/Slider/components/Single/Single.js +0 -156
  348. package/es/components/Slider/components/Single/Single.js.map +0 -1
  349. package/es/components/Slider/components/Single/Single.styles.js +0 -36
  350. package/es/components/Slider/components/Single/Single.styles.js.map +0 -1
  351. package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +0 -6
  352. package/es/components/Slider/components/SliderBase/SliderBase.css +0 -4
  353. package/es/components/Slider/components/SliderBase/SliderBase.js +0 -78
  354. package/es/components/Slider/components/SliderBase/SliderBase.js.map +0 -1
  355. package/es/components/Slider/components/SliderBase/SliderBase.styles.js +0 -26
  356. package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +0 -1
  357. package/es/components/Slider/components/SliderBase/SliderBase.styles_7is2ll.css +0 -4
  358. package/es/components/Slider/ui/Handle/Handle.css +0 -4
  359. package/es/components/Slider/ui/Handle/Handle.js +0 -170
  360. package/es/components/Slider/ui/Handle/Handle.js.map +0 -1
  361. package/es/components/Slider/ui/Handle/Handle.styles.js +0 -16
  362. package/es/components/Slider/ui/Handle/Handle.styles.js.map +0 -1
  363. package/es/components/Slider/ui/Handle/Handle.styles_9m0x33.css +0 -2
  364. package/es/components/Slider/ui/Thumb/Thumb.css +0 -1
  365. package/es/components/Slider/ui/Thumb/Thumb.js +0 -27
  366. package/es/components/Slider/ui/Thumb/Thumb.js.map +0 -1
  367. package/es/components/Slider/ui/Thumb/Thumb.styles.js +0 -11
  368. package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +0 -1
  369. package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +0 -1
  370. package/es/components/Slider/utils/index.js +0 -50
  371. package/es/components/Slider/utils/index.js.map +0 -1
  372. package/es/components/Slider/variations/_disabled/base.js +0 -5
  373. package/es/components/Slider/variations/_disabled/base.js.map +0 -1
  374. package/es/components/Slider/variations/_disabled/base_x642ct.css +0 -1
  375. package/es/components/Slider/variations/_size/base.js +0 -5
  376. package/es/components/Slider/variations/_size/base.js.map +0 -1
  377. package/es/components/Slider/variations/_size/base_x642ct.css +0 -1
  378. package/es/components/Slider/variations/_view/base.js +0 -5
  379. package/es/components/Slider/variations/_view/base.js.map +0 -1
  380. package/es/components/Slider/variations/_view/base_x642ct.css +0 -1
  381. package/es/hooks/useIsomorphicLayoutEffect.js +0 -11
  382. package/es/hooks/useIsomorphicLayoutEffect.js.map +0 -1
  383. package/es/utils/canUseDOM.js +0 -8
  384. package/es/utils/canUseDOM.js.map +0 -1
  385. package/styled-components/cjs/components/Checkbox/_focused/base.js +0 -26
  386. package/styled-components/cjs/components/Checkbox/_view/base.js +0 -8
  387. package/styled-components/cjs/components/Checkbox/_view/tokens.json +0 -1
  388. package/styled-components/cjs/components/Radiobox/_disabled/base.js +0 -8
  389. package/styled-components/cjs/components/Radiobox/_focused/base.js +0 -26
  390. package/styled-components/cjs/components/Radiobox/_view/base.js +0 -8
  391. package/styled-components/cjs/components/Slider/Slider.js +0 -52
  392. package/styled-components/cjs/components/Slider/Slider.tokens.js +0 -77
  393. package/styled-components/cjs/components/Slider/components/Double/Double.js +0 -286
  394. package/styled-components/cjs/components/Slider/components/Double/Double.styles.js +0 -36
  395. package/styled-components/cjs/components/Slider/components/Double/Double.types.js +0 -5
  396. package/styled-components/cjs/components/Slider/components/Single/Single.js +0 -172
  397. package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +0 -27
  398. package/styled-components/cjs/components/Slider/components/Single/Single.types.js +0 -5
  399. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +0 -83
  400. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +0 -21
  401. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.types.js +0 -5
  402. package/styled-components/cjs/components/Slider/components/index.js +0 -27
  403. package/styled-components/cjs/components/Slider/index.js +0 -32
  404. package/styled-components/cjs/components/Slider/ui/Handle/Handle.js +0 -183
  405. package/styled-components/cjs/components/Slider/ui/Handle/Handle.styles.js +0 -15
  406. package/styled-components/cjs/components/Slider/ui/Handle/Handle.types.js +0 -5
  407. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +0 -32
  408. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +0 -18
  409. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.types.js +0 -5
  410. package/styled-components/cjs/components/Slider/ui/index.js +0 -63
  411. package/styled-components/cjs/components/Slider/utils/index.js +0 -55
  412. package/styled-components/cjs/components/Slider/variations/_disabled/base.js +0 -8
  413. package/styled-components/cjs/components/Slider/variations/_disabled/tokens.json +0 -4
  414. package/styled-components/cjs/components/Slider/variations/_size/base.js +0 -8
  415. package/styled-components/cjs/components/Slider/variations/_size/tokens.json +0 -0
  416. package/styled-components/cjs/components/Slider/variations/_view/base.js +0 -8
  417. package/styled-components/cjs/components/Slider/variations/_view/tokens.json +0 -0
  418. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +0 -29
  419. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.js +0 -16
  420. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +0 -150
  421. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +0 -29
  422. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.js +0 -16
  423. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +0 -150
  424. package/styled-components/cjs/hooks/useIsomorphicLayoutEffect.js +0 -12
  425. package/styled-components/cjs/utils/canUseDOM.js +0 -11
  426. package/styled-components/es/components/Checkbox/_disabled/base.js +0 -2
  427. package/styled-components/es/components/Checkbox/_focused/base.js +0 -20
  428. package/styled-components/es/components/Checkbox/_view/base.js +0 -2
  429. package/styled-components/es/components/Checkbox/_view/tokens.json +0 -1
  430. package/styled-components/es/components/Radiobox/_disabled/base.js +0 -2
  431. package/styled-components/es/components/Radiobox/_focused/base.js +0 -20
  432. package/styled-components/es/components/Radiobox/_view/base.js +0 -2
  433. package/styled-components/es/components/Slider/Slider.js +0 -43
  434. package/styled-components/es/components/Slider/Slider.tokens.js +0 -71
  435. package/styled-components/es/components/Slider/components/Double/Double.js +0 -278
  436. package/styled-components/es/components/Slider/components/Double/Double.styles.js +0 -29
  437. package/styled-components/es/components/Slider/components/Double/Double.types.js +0 -1
  438. package/styled-components/es/components/Slider/components/Single/Single.js +0 -164
  439. package/styled-components/es/components/Slider/components/Single/Single.styles.js +0 -20
  440. package/styled-components/es/components/Slider/components/Single/Single.types.js +0 -1
  441. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +0 -74
  442. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +0 -14
  443. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.types.js +0 -1
  444. package/styled-components/es/components/Slider/components/index.js +0 -3
  445. package/styled-components/es/components/Slider/index.js +0 -3
  446. package/styled-components/es/components/Slider/ui/Handle/Handle.js +0 -174
  447. package/styled-components/es/components/Slider/ui/Handle/Handle.styles.js +0 -8
  448. package/styled-components/es/components/Slider/ui/Handle/Handle.types.js +0 -1
  449. package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +0 -25
  450. package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +0 -11
  451. package/styled-components/es/components/Slider/ui/Thumb/Thumb.types.js +0 -1
  452. package/styled-components/es/components/Slider/ui/index.js +0 -5
  453. package/styled-components/es/components/Slider/utils/index.js +0 -47
  454. package/styled-components/es/components/Slider/variations/_disabled/base.js +0 -2
  455. package/styled-components/es/components/Slider/variations/_disabled/tokens.json +0 -4
  456. package/styled-components/es/components/Slider/variations/_size/base.js +0 -2
  457. package/styled-components/es/components/Slider/variations/_size/tokens.json +0 -0
  458. package/styled-components/es/components/Slider/variations/_view/base.js +0 -2
  459. package/styled-components/es/components/Slider/variations/_view/tokens.json +0 -0
  460. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +0 -23
  461. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.js +0 -10
  462. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +0 -150
  463. package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +0 -23
  464. package/styled-components/es/examples/plasma_web/components/Slider/Slider.js +0 -10
  465. package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +0 -150
  466. package/styled-components/es/hooks/useIsomorphicLayoutEffect.js +0 -7
  467. package/styled-components/es/utils/canUseDOM.js +0 -5
  468. package/types/components/Checkbox/_disabled/base.d.ts.map +0 -1
  469. package/types/components/Checkbox/_focused/base.d.ts.map +0 -1
  470. package/types/components/Checkbox/_size/base.d.ts.map +0 -1
  471. package/types/components/Checkbox/_view/base.d.ts.map +0 -1
  472. package/types/components/Radiobox/_disabled/base.d.ts.map +0 -1
  473. package/types/components/Radiobox/_focused/base.d.ts.map +0 -1
  474. package/types/components/Radiobox/_size/base.d.ts.map +0 -1
  475. package/types/components/Radiobox/_view/base.d.ts +0 -2
  476. package/types/components/Radiobox/_view/base.d.ts.map +0 -1
  477. package/types/components/Slider/Slider.d.ts +0 -27
  478. package/types/components/Slider/Slider.d.ts.map +0 -1
  479. package/types/components/Slider/Slider.tokens.d.ts +0 -72
  480. package/types/components/Slider/Slider.tokens.d.ts.map +0 -1
  481. package/types/components/Slider/Slider.types.d.ts +0 -3
  482. package/types/components/Slider/Slider.types.d.ts.map +0 -1
  483. package/types/components/Slider/components/Double/Double.d.ts +0 -4
  484. package/types/components/Slider/components/Double/Double.d.ts.map +0 -1
  485. package/types/components/Slider/components/Double/Double.styles.d.ts +0 -43
  486. package/types/components/Slider/components/Double/Double.styles.d.ts.map +0 -1
  487. package/types/components/Slider/components/Double/Double.types.d.ts +0 -65
  488. package/types/components/Slider/components/Double/Double.types.d.ts.map +0 -1
  489. package/types/components/Slider/components/Single/Single.d.ts +0 -4
  490. package/types/components/Slider/components/Single/Single.d.ts.map +0 -1
  491. package/types/components/Slider/components/Single/Single.styles.d.ts +0 -8
  492. package/types/components/Slider/components/Single/Single.styles.d.ts.map +0 -1
  493. package/types/components/Slider/components/Single/Single.types.d.ts +0 -55
  494. package/types/components/Slider/components/Single/Single.types.d.ts.map +0 -1
  495. package/types/components/Slider/components/SliderBase/SliderBase.d.ts +0 -4
  496. package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +0 -1
  497. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +0 -6
  498. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +0 -1
  499. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +0 -45
  500. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +0 -1
  501. package/types/components/Slider/components/index.d.ts +0 -6
  502. package/types/components/Slider/components/index.d.ts.map +0 -1
  503. package/types/components/Slider/index.d.ts +0 -6
  504. package/types/components/Slider/index.d.ts.map +0 -1
  505. package/types/components/Slider/ui/Handle/Handle.d.ts +0 -9
  506. package/types/components/Slider/ui/Handle/Handle.d.ts.map +0 -1
  507. package/types/components/Slider/ui/Handle/Handle.styles.d.ts +0 -4
  508. package/types/components/Slider/ui/Handle/Handle.styles.d.ts.map +0 -1
  509. package/types/components/Slider/ui/Handle/Handle.types.d.ts +0 -24
  510. package/types/components/Slider/ui/Handle/Handle.types.d.ts.map +0 -1
  511. package/types/components/Slider/ui/Thumb/Thumb.d.ts +0 -4
  512. package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +0 -1
  513. package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts +0 -5
  514. package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +0 -1
  515. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +0 -12
  516. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +0 -1
  517. package/types/components/Slider/ui/index.d.ts +0 -6
  518. package/types/components/Slider/ui/index.d.ts.map +0 -1
  519. package/types/components/Slider/utils/index.d.ts +0 -33
  520. package/types/components/Slider/utils/index.d.ts.map +0 -1
  521. package/types/components/Slider/variations/_disabled/base.d.ts +0 -2
  522. package/types/components/Slider/variations/_disabled/base.d.ts.map +0 -1
  523. package/types/components/Slider/variations/_size/base.d.ts +0 -2
  524. package/types/components/Slider/variations/_size/base.d.ts.map +0 -1
  525. package/types/components/Slider/variations/_view/base.d.ts +0 -2
  526. package/types/components/Slider/variations/_view/base.d.ts.map +0 -1
  527. package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts +0 -22
  528. package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +0 -1
  529. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +0 -21
  530. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +0 -1
  531. package/types/examples/plasma_web/components/Slider/Slider.config.d.ts +0 -22
  532. package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +0 -1
  533. package/types/examples/plasma_web/components/Slider/Slider.d.ts +0 -21
  534. package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +0 -1
  535. package/types/hooks/useIsomorphicLayoutEffect.d.ts +0 -6
  536. package/types/hooks/useIsomorphicLayoutEffect.d.ts.map +0 -1
  537. package/types/utils/canUseDOM.d.ts +0 -6
  538. package/types/utils/canUseDOM.d.ts.map +0 -1
  539. /package/cjs/components/Checkbox/{_size → variations/_size}/base_x642ct.css +0 -0
  540. /package/cjs/components/Radiobox/{_size → variations/_size}/base_x642ct.css +0 -0
  541. /package/{cjs/components/Slider/variations/_disabled → es/components/Checkbox/variations/_size}/base_x642ct.css +0 -0
  542. /package/{cjs/components/Slider → es/components/Radiobox}/variations/_size/base_x642ct.css +0 -0
  543. /package/styled-components/cjs/components/{Slider/Slider.types.js → Checkbox/Checkbox.types.js} +0 -0
  544. /package/styled-components/cjs/components/Checkbox/{_disabled → variations/_disabled}/tokens.json +0 -0
  545. /package/styled-components/cjs/components/Checkbox/{_focused → variations/_focused}/tokens.json +0 -0
  546. /package/styled-components/cjs/components/Checkbox/{_size → variations/_size}/base.js +0 -0
  547. /package/styled-components/cjs/components/Checkbox/{_size → variations/_size}/tokens.json +0 -0
  548. /package/styled-components/cjs/components/Radiobox/{_disabled → variations/_disabled}/tokens.json +0 -0
  549. /package/styled-components/cjs/components/Radiobox/{_focused → variations/_focused}/tokens.json +0 -0
  550. /package/styled-components/cjs/components/Radiobox/{_size → variations/_size}/base.js +0 -0
  551. /package/styled-components/cjs/components/Radiobox/{_size → variations/_size}/tokens.json +0 -0
  552. /package/styled-components/cjs/components/Radiobox/{_view → variations/_view}/tokens.json +0 -0
  553. /package/styled-components/es/components/{Slider/Slider.types.js → Checkbox/Checkbox.types.js} +0 -0
  554. /package/styled-components/es/components/Checkbox/{_disabled → variations/_disabled}/tokens.json +0 -0
  555. /package/styled-components/es/components/Checkbox/{_focused → variations/_focused}/tokens.json +0 -0
  556. /package/styled-components/es/components/Checkbox/{_size → variations/_size}/base.js +0 -0
  557. /package/styled-components/es/components/Checkbox/{_size → variations/_size}/tokens.json +0 -0
  558. /package/styled-components/es/components/Radiobox/{_disabled → variations/_disabled}/tokens.json +0 -0
  559. /package/styled-components/es/components/Radiobox/{_focused → variations/_focused}/tokens.json +0 -0
  560. /package/styled-components/es/components/Radiobox/{_size → variations/_size}/base.js +0 -0
  561. /package/styled-components/es/components/Radiobox/{_size → variations/_size}/tokens.json +0 -0
  562. /package/styled-components/es/components/Radiobox/{_view → variations/_view}/tokens.json +0 -0
  563. /package/types/components/Checkbox/{_disabled → variations/_disabled}/base.d.ts +0 -0
  564. /package/types/components/Checkbox/{_focused → variations/_size}/base.d.ts +0 -0
  565. /package/types/components/Checkbox/{_size → variations/_view}/base.d.ts +0 -0
  566. /package/types/components/{Checkbox/_view → Radiobox/variations/_disabled}/base.d.ts +0 -0
  567. /package/types/components/Radiobox/{_disabled → variations/_focused}/base.d.ts +0 -0
  568. /package/types/components/Radiobox/{_focused → variations/_size}/base.d.ts +0 -0
  569. /package/types/components/Radiobox/{_size → variations/_view}/base.d.ts +0 -0
@@ -1,48 +1,17 @@
1
- import './Checkbox_1q4l832.css';
2
1
  import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
3
2
  import React, { forwardRef, useRef, useEffect, useMemo } from 'react';
4
- import { styled } from '@linaria/react';
5
3
  import { useForkRef, safeUseId, extractTextFrom } from '@salutejs/plasma-core';
6
4
  import { cx } from '../../utils/index.js';
7
- import { base as base$2 } from './_view/base.js';
8
- import { base as base$1 } from './_size/base.js';
9
- import { base as base$3 } from './_disabled/base.js';
10
- import { base as base$4 } from './_focused/base.js';
5
+ import { base as base$2 } from './variations/_view/base.js';
6
+ import { base as base$1 } from './variations/_size/base.js';
7
+ import { base as base$3 } from './variations/_disabled/base.js';
8
+ import { base as base$4 } from './variations/_focused/base.js';
11
9
  import { Indeterminate, Done } from './IconsSvg.js';
10
+ import { StyledInput, StyledContentWrapper, StyledTrigger, StyledContent, StyledLabel, StyledDescription, base } from './Checkbox.styles.js';
11
+ import { classes } from './Checkbox.tokens.js';
12
12
 
13
13
  var _Indeterminate, _Done;
14
14
  var _excluded = ["size", "view", "focused", "disabled", "id", "label", "description", "indeterminate", "style", "className", "singleLine", "aria-label"];
15
- var StyledInput = /*#__PURE__*/styled('input')({
16
- name: "StyledInput",
17
- "class": "so9l3q2",
18
- propsAsIs: false
19
- });
20
- var StyledTrigger = /*#__PURE__*/styled('div')({
21
- name: "StyledTrigger",
22
- "class": "s1o5tixe",
23
- propsAsIs: false
24
- });
25
- var StyledContentWrapper = /*#__PURE__*/styled('label')({
26
- name: "StyledContentWrapper",
27
- "class": "s136y9ve",
28
- propsAsIs: false
29
- });
30
- var StyledContent = /*#__PURE__*/styled('div')({
31
- name: "StyledContent",
32
- "class": "s8lcvtu",
33
- propsAsIs: false
34
- });
35
- var StyledLabel = /*#__PURE__*/styled('span')({
36
- name: "StyledLabel",
37
- "class": "s1dif9mh",
38
- propsAsIs: false
39
- });
40
- var StyledDescription = /*#__PURE__*/styled('div')({
41
- name: "StyledDescription",
42
- "class": "s1v492xg",
43
- propsAsIs: false
44
- });
45
- var base = "b1kn3qi9";
46
15
  var checkboxRoot = function checkboxRoot(Root) {
47
16
  return /*#__PURE__*/forwardRef(function (props, ref) {
48
17
  var size = props.size,
@@ -76,15 +45,15 @@ var checkboxRoot = function checkboxRoot(Root) {
76
45
  var isLabelAriaHidden = typeof label === 'string';
77
46
  var canFocused = focused ? 0 : -1;
78
47
  var hasContent = label || description;
79
- var singleLineClass = singleLine ? 'single-line' : undefined;
80
- var resetMargins = !hasContent ? 'reset-margins' : undefined;
48
+ var singleLineClass = singleLine ? classes.singleLine : undefined;
49
+ var onlyDescriptionClass = !label && description ? classes.onlyDescription : undefined;
81
50
  return /*#__PURE__*/React.createElement(Root, {
82
51
  view: view,
83
52
  size: size,
84
53
  disabled: disabled,
85
54
  focused: focused,
86
55
  style: style,
87
- className: cx(className, resetMargins),
56
+ className: className,
88
57
  tabIndex: -1
89
58
  }, /*#__PURE__*/React.createElement(StyledInput, _extends({}, rest, {
90
59
  id: checkboxId,
@@ -97,7 +66,7 @@ var checkboxRoot = function checkboxRoot(Root) {
97
66
  })), /*#__PURE__*/React.createElement(StyledContentWrapper, {
98
67
  htmlFor: checkboxId
99
68
  }, /*#__PURE__*/React.createElement(StyledTrigger, {
100
- className: cx('checkbox-trigger', resetMargins)
69
+ className: classes.checkboxTrigger
101
70
  }, indeterminate ? _Indeterminate || (_Indeterminate = /*#__PURE__*/React.createElement(Indeterminate, null)) : _Done || (_Done = /*#__PURE__*/React.createElement(Done, null))), hasContent && /*#__PURE__*/React.createElement(StyledContent, {
102
71
  className: singleLineClass
103
72
  }, label && /*#__PURE__*/React.createElement(StyledLabel, {
@@ -105,7 +74,7 @@ var checkboxRoot = function checkboxRoot(Root) {
105
74
  id: uniqLabelId,
106
75
  "aria-hidden": isLabelAriaHidden
107
76
  }, label), description && /*#__PURE__*/React.createElement(StyledDescription, {
108
- className: singleLineClass,
77
+ className: cx(singleLineClass, onlyDescriptionClass),
109
78
  id: uniqDescriptionId
110
79
  }, description))));
111
80
  });
@@ -135,5 +104,5 @@ var checkboxConfig = {
135
104
  }
136
105
  };
137
106
 
138
- export { StyledContent, StyledContentWrapper, StyledDescription, StyledInput, StyledLabel, StyledTrigger, checkboxConfig, checkboxRoot };
107
+ export { checkboxConfig, checkboxRoot };
139
108
  //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useMemo, useRef } from 'react';\nimport { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\nimport { safeUseId, useForkRef, extractTextFrom } from '@salutejs/plasma-core';\nimport type { InputHTMLAttributes } from '@salutejs/plasma-core';\n\nimport { applyNoUserSelect, applyEllipsis } from '../../mixins';\nimport type { Filter, RootProps } from '../../engines/types';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './_view/base';\nimport { base as sizeCSS } from './_size/base';\nimport { base as disabledCSS } from './_disabled/base';\nimport { base as focusedCSS } from './_focused/base';\nimport { Done, Indeterminate } from './IconsSvg';\n\nexport const StyledInput = styled.input`\n position: absolute;\n\n &:focus {\n outline: 0 none;\n }\n\n /* Спрятать от IE */\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n`;\n\nexport const StyledTrigger = styled.div`\n margin: var(--plasma-checkbox-trigger-margin);\n\n width: var(--plasma-checkbox-trigger-size);\n height: var(--plasma-checkbox-trigger-size);\n border-radius: var(--plasma-checkbox-trigger-border-radius);\n\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n\n background: transparent;\n border: 0.125rem solid var(--plasma-checkbox-trigger-border-color);\n box-sizing: border-box;\n\n flex-shrink: 0;\n flex-grow: 0;\n\n input:not(:indeterminate) + label & div {\n transform: scale(0);\n transition: transform 0.15s ease-in-out;\n }\n\n input:checked + label & div {\n transform: scale(1);\n }\n`;\n\nexport const StyledContentWrapper = styled.label`\n position: relative;\n align-items: flex-start;\n display: flex;\n width: 100%;\n cursor: inherit;\n`;\n\nexport const StyledContent = styled.div`\n display: flex;\n flex-direction: column;\n\n margin-top: var(--plasma-checkbox-content-top-offset);\n margin-left: var(--plasma-checkbox-content-left-offset);\n`;\n\nexport const StyledLabel = styled.span`\n font-family: var(--plasma-checkbox-label-font-family);\n font-size: var(--plasma-checkbox-label-font-size);\n font-style: var(--plasma-checkbox-label-font-style);\n font-weight: var(--plasma-checkbox-label-font-weight);\n letter-spacing: var(--plasma-checkbox-label-letter-spacing);\n line-height: var(--plasma-checkbox-label-line-height);\n`;\n\nexport const StyledDescription = styled.div`\n margin-top: 0.25rem;\n color: var(--plasma-checkbox-description-color);\n\n font-family: var(--plasma-checkbox-description-font-family);\n font-size: var(--plasma-checkbox-description-font-size);\n font-style: var(--plasma-checkbox-description-font-style);\n font-weight: var(--plasma-checkbox-description-font-weight);\n letter-spacing: var(--plasma-checkbox-description-letter-spacing);\n line-height: var(--plasma-checkbox-description-line-height);\n`;\n\nconst base = css`\n .single-line {\n ${applyEllipsis()};\n }\n\n margin: var(--plasma-checkbox-margin);\n\n &.reset-margins {\n margin: 0;\n }\n\n ${applyNoUserSelect()};\n\n position: relative;\n align-items: flex-start;\n display: flex;\n cursor: pointer;\n`;\n\nexport interface BaseboxProps {\n /**\n * Уникальный идентификатор контрола\n */\n id?: string;\n /**\n * Метка-подпись к элементу\n */\n label?: React.ReactNode;\n /**\n * Описание элемента\n */\n description?: React.ReactNode;\n /**\n * Title и description в одну строку или с переносом строк\n */\n singleLine?: boolean;\n /**\n * Неопределенное состояние компонента - когда часть потомков не выбрана.\n */\n indeterminate?: boolean;\n size?: string;\n view?: string;\n focused?: boolean;\n}\n\ntype CheckboxProps = Filter<InputHTMLAttributes<HTMLInputElement>, 'size'> & BaseboxProps;\n\nexport const checkboxRoot = (Root: RootProps<HTMLInputElement, CheckboxProps>) =>\n forwardRef<HTMLInputElement, CheckboxProps>((props, ref) => {\n const {\n size,\n view,\n focused,\n disabled,\n id,\n label,\n description,\n indeterminate,\n style,\n className,\n singleLine = false,\n 'aria-label': ariaLabelExternal,\n ...rest\n } = props;\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const forkRef = useForkRef(inputRef, ref);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.indeterminate = Boolean(indeterminate);\n }\n }, [inputRef, indeterminate]);\n\n const uniqId = safeUseId();\n const uniqLabelId = `label-${uniqId}`;\n const uniqDescriptionId = `description-${uniqId}`;\n const checkboxId = id || `input-${uniqId}`;\n\n const ariaLabel = useMemo(() => ariaLabelExternal || extractTextFrom(label), [ariaLabelExternal, label]);\n const isLabelAriaHidden = typeof label === 'string';\n const canFocused = focused ? 0 : -1;\n const hasContent = label || description;\n const singleLineClass = singleLine ? 'single-line' : undefined;\n const resetMargins = !hasContent ? 'reset-margins' : undefined;\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n focused={focused}\n style={style}\n className={cx(className, resetMargins)}\n tabIndex={-1}\n >\n <StyledInput\n {...rest}\n id={checkboxId}\n ref={forkRef}\n type=\"checkbox\"\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={uniqDescriptionId}\n tabIndex={canFocused}\n />\n <StyledContentWrapper htmlFor={checkboxId}>\n <StyledTrigger className={cx('checkbox-trigger', resetMargins)}>\n {indeterminate ? <Indeterminate /> : <Done />}\n </StyledTrigger>\n {hasContent && (\n <StyledContent className={singleLineClass}>\n {label && (\n <StyledLabel\n className={singleLineClass}\n id={uniqLabelId}\n aria-hidden={isLabelAriaHidden}\n >\n {label}\n </StyledLabel>\n )}\n {description && (\n <StyledDescription className={singleLineClass} id={uniqDescriptionId}>\n {description}\n </StyledDescription>\n )}\n </StyledContent>\n )}\n </StyledContentWrapper>\n </Root>\n );\n });\n\nexport const checkboxConfig = {\n name: 'Checkbox',\n tag: 'div',\n layout: checkboxRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n disabled: {\n css: disabledCSS,\n },\n focused: {\n css: focusedCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'accent',\n },\n};\n"],"names":["StyledInput","styled","name","class","propsAsIs","StyledTrigger","StyledContentWrapper","StyledContent","StyledLabel","StyledDescription","base","checkboxRoot","Root","forwardRef","props","ref","size","view","focused","disabled","id","label","description","indeterminate","style","className","_props$singleLine","singleLine","ariaLabelExternal","rest","_excluded","inputRef","useRef","forkRef","useForkRef","useEffect","current","Boolean","uniqId","safeUseId","uniqLabelId","concat","uniqDescriptionId","checkboxId","ariaLabel","useMemo","extractTextFrom","isLabelAriaHidden","canFocused","hasContent","singleLineClass","undefined","resetMargins","React","createElement","cx","tabIndex","_extends","type","htmlFor","_Indeterminate","Indeterminate","_Done","Done","checkboxConfig","tag","layout","variations","css","sizeCSS","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D,IAAAA,IAAI,EAAE;AACFoD,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDpD,IAAAA,IAAI,EAAE;AACFmD,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDnD,IAAAA,QAAQ,EAAE;AACNiD,MAAAA,GAAG,EAAEG,MAAAA;KACR;AACDrD,IAAAA,OAAO,EAAE;AACLkD,MAAAA,GAAG,EAAEI,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNzD,IAAAA,IAAI,EAAE,GAAG;AACTC,IAAAA,IAAI,EAAE,QAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Checkbox.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useMemo, useRef } from 'react';\nimport { safeUseId, useForkRef, extractTextFrom } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines/types';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as focusedCSS } from './variations/_focused/base';\nimport { Done, Indeterminate } from './IconsSvg';\nimport {\n StyledContent,\n StyledContentWrapper,\n StyledDescription,\n StyledInput,\n StyledLabel,\n StyledTrigger,\n base,\n} from './Checkbox.styles';\nimport type { CheckboxProps } from './Checkbox.types';\nimport { classes } from './Checkbox.tokens';\n\nexport const checkboxRoot = (Root: RootProps<HTMLInputElement, CheckboxProps>) =>\n forwardRef<HTMLInputElement, CheckboxProps>((props, ref) => {\n const {\n size,\n view,\n focused,\n disabled,\n id,\n label,\n description,\n indeterminate,\n style,\n className,\n singleLine = false,\n 'aria-label': ariaLabelExternal,\n ...rest\n } = props;\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const forkRef = useForkRef(inputRef, ref);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.indeterminate = Boolean(indeterminate);\n }\n }, [inputRef, indeterminate]);\n\n const uniqId = safeUseId();\n const uniqLabelId = `label-${uniqId}`;\n const uniqDescriptionId = `description-${uniqId}`;\n const checkboxId = id || `input-${uniqId}`;\n\n const ariaLabel = useMemo(() => ariaLabelExternal || extractTextFrom(label), [ariaLabelExternal, label]);\n const isLabelAriaHidden = typeof label === 'string';\n const canFocused = focused ? 0 : -1;\n const hasContent = label || description;\n const singleLineClass = singleLine ? classes.singleLine : undefined;\n const onlyDescriptionClass = !label && description ? classes.onlyDescription : undefined;\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n focused={focused}\n style={style}\n className={className}\n tabIndex={-1}\n >\n <StyledInput\n {...rest}\n id={checkboxId}\n ref={forkRef}\n type=\"checkbox\"\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={uniqDescriptionId}\n tabIndex={canFocused}\n />\n <StyledContentWrapper htmlFor={checkboxId}>\n <StyledTrigger className={classes.checkboxTrigger}>\n {indeterminate ? <Indeterminate /> : <Done />}\n </StyledTrigger>\n {hasContent && (\n <StyledContent className={singleLineClass}>\n {label && (\n <StyledLabel\n className={singleLineClass}\n id={uniqLabelId}\n aria-hidden={isLabelAriaHidden}\n >\n {label}\n </StyledLabel>\n )}\n {description && (\n <StyledDescription\n className={cx(singleLineClass, onlyDescriptionClass)}\n id={uniqDescriptionId}\n >\n {description}\n </StyledDescription>\n )}\n </StyledContent>\n )}\n </StyledContentWrapper>\n </Root>\n );\n });\n\nexport const checkboxConfig = {\n name: 'Checkbox',\n tag: 'div',\n layout: checkboxRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n disabled: {\n css: disabledCSS,\n },\n focused: {\n css: focusedCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'accent',\n },\n};\n"],"names":["checkboxRoot","Root","forwardRef","props","ref","size","view","focused","disabled","id","label","description","indeterminate","style","className","_props$singleLine","singleLine","ariaLabelExternal","rest","_objectWithoutProperties","_excluded","inputRef","useRef","forkRef","useForkRef","useEffect","current","Boolean","uniqId","safeUseId","uniqLabelId","concat","uniqDescriptionId","checkboxId","ariaLabel","useMemo","extractTextFrom","isLabelAriaHidden","canFocused","hasContent","singleLineClass","classes","undefined","onlyDescriptionClass","onlyDescription","React","createElement","tabIndex","StyledInput","_extends","type","StyledContentWrapper","htmlFor","StyledTrigger","checkboxTrigger","_Indeterminate","Indeterminate","_Done","Done","StyledContent","StyledLabel","StyledDescription","cx","checkboxConfig","name","tag","layout","base","variations","css","sizeCSS","viewCSS","disabledCSS","focusedCSS","defaults"],"mappings":";;;;;;;;;;;;;;IAuBaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAAgD,EAAA;AAAA,EAAA,oBACzEC,UAAU,CAAkC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACxD,IAAA,IACIC,IAAI,GAaJF,KAAK,CAbLE,IAAI;MACJC,IAAI,GAYJH,KAAK,CAZLG,IAAI;MACJC,OAAO,GAWPJ,KAAK,CAXLI,OAAO;MACPC,QAAQ,GAURL,KAAK,CAVLK,QAAQ;MACRC,EAAE,GASFN,KAAK,CATLM,EAAE;MACFC,KAAK,GAQLP,KAAK,CARLO,KAAK;MACLC,WAAW,GAOXR,KAAK,CAPLQ,WAAW;MACXC,aAAa,GAMbT,KAAK,CANLS,aAAa;MACbC,KAAK,GAKLV,KAAK,CALLU,KAAK;MACLC,SAAS,GAITX,KAAK,CAJLW,SAAS;MAAAC,iBAAA,GAITZ,KAAK,CAHLa,UAAU;AAAVA,MAAAA,UAAU,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,iBAAA;MACJE,iBAAiB,GAE/Bd,KAAK,CAFL,YAAY,CAAA;AACTe,MAAAA,IAAI,GAAAC,wBAAA,CACPhB,KAAK,EAAAiB,SAAA,CAAA,CAAA;AAET,IAAA,IAAMC,QAAQ,GAAGC,MAAM,CAA0B,IAAI,CAAC,CAAA;AACtD,IAAA,IAAMC,OAAO,GAAGC,UAAU,CAACH,QAAQ,EAAEj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AC,aAAA,CAACe,iBAAiB,EAAA;AACd/C,MAAAA,SAAS,EAAEgD,EAAE,CAACtB,eAAe,EAAEG,oBAAoB,CAAE;AACrDlC,MAAAA,EAAE,EAAEuB,iBAAAA;AAAkB,KAAA,EAErBrB,WACc,CAEZ,CAED,CACpB,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMoD,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElE,YAAY;AACpBmE,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACR/D,IAAAA,IAAI,EAAE;AACFgE,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDhE,IAAAA,IAAI,EAAE;AACF+D,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACD/D,IAAAA,QAAQ,EAAE;AACN6D,MAAAA,GAAG,EAAEG,MAAAA;KACR;AACDjE,IAAAA,OAAO,EAAE;AACL8D,MAAAA,GAAG,EAAEI,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNrE,IAAAA,IAAI,EAAE,GAAG;AACTC,IAAAA,IAAI,EAAE,QAAA;AACV,GAAA;AACJ;;;;"}
@@ -0,0 +1,37 @@
1
+ import './Checkbox.styles_1266095.css';
2
+ import { styled } from '@linaria/react';
3
+
4
+ var base = "b1udywkg";
5
+ var StyledInput = /*#__PURE__*/styled('input')({
6
+ name: "StyledInput",
7
+ "class": "s165w87d",
8
+ propsAsIs: false
9
+ });
10
+ var StyledTrigger = /*#__PURE__*/styled('div')({
11
+ name: "StyledTrigger",
12
+ "class": "sft3zxv",
13
+ propsAsIs: false
14
+ });
15
+ var StyledContentWrapper = /*#__PURE__*/styled('label')({
16
+ name: "StyledContentWrapper",
17
+ "class": "s1u3nd7e",
18
+ propsAsIs: false
19
+ });
20
+ var StyledContent = /*#__PURE__*/styled('div')({
21
+ name: "StyledContent",
22
+ "class": "shwv1in",
23
+ propsAsIs: false
24
+ });
25
+ var StyledLabel = /*#__PURE__*/styled('span')({
26
+ name: "StyledLabel",
27
+ "class": "s1my1ay",
28
+ propsAsIs: false
29
+ });
30
+ var StyledDescription = /*#__PURE__*/styled('div')({
31
+ name: "StyledDescription",
32
+ "class": "s14u8fnn",
33
+ propsAsIs: false
34
+ });
35
+
36
+ export { StyledContent, StyledContentWrapper, StyledDescription, StyledInput, StyledLabel, StyledTrigger, base };
37
+ //# sourceMappingURL=Checkbox.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.styles.js","sources":["../../../src/components/Checkbox/Checkbox.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { applyEllipsis, applyNoUserSelect } from '../../mixins';\n\nimport { classes, tokens } from './Checkbox.tokens';\n\nexport const base = css`\n margin: var(${tokens.margin});\n\n ${applyNoUserSelect()};\n\n position: relative;\n align-items: flex-start;\n display: flex;\n cursor: pointer;\n\n .${classes.singleLine} {\n ${applyEllipsis()};\n }\n`;\n\nexport const StyledInput = styled.input`\n position: absolute;\n\n &:focus {\n outline: 0 none;\n }\n\n /* Спрятать от IE */\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n`;\n\nexport const StyledTrigger = styled.div`\n margin: var(${tokens.triggerMargin});\n\n width: var(${tokens.triggerSize});\n height: var(${tokens.triggerSize});\n border-radius: var(${tokens.triggerBorderRadius});\n\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n\n background: transparent;\n border: 0.125rem solid var(${tokens.triggerBorderColor});\n box-sizing: border-box;\n\n flex-shrink: 0;\n flex-grow: 0;\n\n input:not(:indeterminate) + label & div {\n transform: scale(0);\n transition: transform 0.15s ease-in-out;\n }\n\n input:checked + label & div {\n transform: scale(1);\n }\n`;\n\nexport const StyledContentWrapper = styled.label`\n position: relative;\n align-items: flex-start;\n display: flex;\n width: 100%;\n cursor: inherit;\n`;\n\nexport const StyledContent = styled.div`\n display: flex;\n flex-direction: column;\n\n margin-top: var(${tokens.contentTopOffset});\n margin-left: var(${tokens.contentLeftOffset});\n`;\n\nexport const StyledLabel = styled.span`\n font-family: var(${tokens.labelFontFamily});\n font-size: var(${tokens.labelFontSize});\n font-style: var(${tokens.labelFontStyle});\n font-weight: var(${tokens.labelFontWeight});\n letter-spacing: var(${tokens.labelLetterSpacing});\n line-height: var(${tokens.labelLineHeight});\n`;\n\nexport const StyledDescription = styled.div`\n margin-top: var(${tokens.descriptionMarginTop});\n color: var(${tokens.descriptionColor});\n\n font-family: var(${tokens.descriptionFontFamily});\n font-size: var(${tokens.descriptionFontSize});\n font-style: var(${tokens.descriptionFontStyle});\n font-weight: var(${tokens.descriptionFontWeight});\n letter-spacing: var(${tokens.descriptionLetterSpacing});\n line-height: var(${tokens.descriptionLineHeight});\n\n &.${classes.onlyDescription} {\n margin-top: 0;\n }\n`;\n"],"names":["base","StyledInput","styled","name","class","propsAsIs","StyledTrigger","StyledContentWrapper","StyledContent","StyledLabel","StyledDescription"],"mappings":";;AAOO,IAAMA,IAAI,GAahB,WAAA;AAEM,IAAMC,WAAW,gBAAGC,MAAM,CAAA,OAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAYhC,EAAA;AAEM,IAAMC,aAAa,gBAAGJ,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CA2BlC,EAAA;AAEM,IAAME,oBAAoB,gBAAGL,MAAM,CAAA,OAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,sBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAMzC,EAAA;AAEM,IAAMG,aAAa,gBAAGN,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAMlC,EAAA;AAEM,IAAMI,WAAW,gBAAGP,MAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAOhC,EAAA;AAEM,IAAMK,iBAAiB,gBAAGR,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,mBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CActC;;;;"}
@@ -0,0 +1,7 @@
1
+ .b1udywkg{margin:var(--plasma-checkbox-margin);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;}.b1udywkg .single-line{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
2
+ .s165w87d{position:absolute;width:1px;height:1px;overflow:hidden;-webkit-clip:rect(0 0 0 0);clip:rect(0 0 0 0);}.s165w87d:focus{outline:0 none;}
3
+ .sft3zxv{margin:var(--plasma-checkbox-trigger-margin);width:var(--plasma-checkbox-trigger-size);height:var(--plasma-checkbox-trigger-size);border-radius:var(--plasma-checkbox-trigger-border-radius);position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background:transparent;border:0.125rem solid var(--plasma-checkbox-trigger-border-color);box-sizing:border-box;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;}input:not(:indeterminate) + label .sft3zxv div{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transition:-webkit-transform 0.15s ease-in-out;-webkit-transition:transform 0.15s ease-in-out;transition:transform 0.15s ease-in-out;}input:checked + label .sft3zxv div{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}
4
+ .s1u3nd7e{position:relative;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;cursor:inherit;}
5
+ .shwv1in{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-top:var(--plasma-checkbox-content-top-offset);margin-left:var(--plasma-checkbox-content-left-offset);}
6
+ .s1my1ay{font-family:var(--plasma-checkbox-label-font-family);font-size:var(--plasma-checkbox-label-font-size);font-style:var(--plasma-checkbox-label-font-style);font-weight:var(--plasma-checkbox-label-font-weight);-webkit-letter-spacing:var(--plasma-checkbox-label-letter-spacing);-moz-letter-spacing:var(--plasma-checkbox-label-letter-spacing);-ms-letter-spacing:var(--plasma-checkbox-label-letter-spacing);letter-spacing:var(--plasma-checkbox-label-letter-spacing);line-height:var(--plasma-checkbox-label-line-height);}
7
+ .s14u8fnn{margin-top:var(--plasma-checkbox-description-margin-top);color:var(--plasma-checkbox-description-color);font-family:var(--plasma-checkbox-description-font-family);font-size:var(--plasma-checkbox-description-font-size);font-style:var(--plasma-checkbox-description-font-style);font-weight:var(--plasma-checkbox-description-font-weight);-webkit-letter-spacing:var(--plasma-checkbox-description-letter-spacing);-moz-letter-spacing:var(--plasma-checkbox-description-letter-spacing);-ms-letter-spacing:var(--plasma-checkbox-description-letter-spacing);letter-spacing:var(--plasma-checkbox-description-letter-spacing);line-height:var(--plasma-checkbox-description-line-height);}.s14u8fnn.only-description{margin-top:0;}
@@ -0,0 +1,36 @@
1
+ var classes = {
2
+ singleLine: 'single-line',
3
+ checkboxTrigger: 'checkbox-trigger',
4
+ onlyDescription: 'only-description'
5
+ };
6
+ var tokens = {
7
+ margin: '--plasma-checkbox-margin',
8
+ triggerMargin: '--plasma-checkbox-trigger-margin',
9
+ triggerSize: '--plasma-checkbox-trigger-size',
10
+ triggerBorderRadius: '--plasma-checkbox-trigger-border-radius',
11
+ contentTopOffset: '--plasma-checkbox-content-top-offset',
12
+ contentLeftOffset: '--plasma-checkbox-content-left-offset',
13
+ labelFontFamily: '--plasma-checkbox-label-font-family',
14
+ labelFontSize: '--plasma-checkbox-label-font-size',
15
+ labelFontStyle: '--plasma-checkbox-label-font-style',
16
+ labelFontWeight: '--plasma-checkbox-label-font-weight',
17
+ labelLetterSpacing: '--plasma-checkbox-label-letter-spacing',
18
+ labelLineHeight: '--plasma-checkbox-label-line-height',
19
+ descriptionMarginTop: '--plasma-checkbox-description-margin-top',
20
+ descriptionOnlyMarginTop: '--plasma-checkbox-description-only-margin-top',
21
+ descriptionFontFamily: '--plasma-checkbox-description-font-family',
22
+ descriptionFontSize: '--plasma-checkbox-description-font-size',
23
+ descriptionFontStyle: '--plasma-checkbox-description-font-style',
24
+ descriptionFontWeight: '--plasma-checkbox-description-font-weight',
25
+ descriptionLetterSpacing: '--plasma-checkbox-description-letter-spacing',
26
+ descriptionLineHeight: '--plasma-checkbox-description-line-height',
27
+ fillColor: '--plasma-checkbox-fill-color',
28
+ iconColor: '--plasma-checkbox-icon-color',
29
+ descriptionColor: '--plasma-checkbox-description-color',
30
+ triggerBorderColor: '--plasma-checkbox-trigger-border-color',
31
+ focusColor: '--plasma-checkbox-focus-color',
32
+ disabledOpacity: '--plasma-checkbox-disabled-opacity'
33
+ };
34
+
35
+ export { classes, tokens };
36
+ //# sourceMappingURL=Checkbox.tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.tokens.js","sources":["../../../src/components/Checkbox/Checkbox.tokens.ts"],"sourcesContent":["export const classes = {\n singleLine: 'single-line',\n checkboxTrigger: 'checkbox-trigger',\n onlyDescription: 'only-description',\n};\n\nexport const tokens = {\n margin: '--plasma-checkbox-margin',\n triggerMargin: '--plasma-checkbox-trigger-margin',\n triggerSize: '--plasma-checkbox-trigger-size',\n triggerBorderRadius: '--plasma-checkbox-trigger-border-radius',\n contentTopOffset: '--plasma-checkbox-content-top-offset',\n contentLeftOffset: '--plasma-checkbox-content-left-offset',\n labelFontFamily: '--plasma-checkbox-label-font-family',\n labelFontSize: '--plasma-checkbox-label-font-size',\n labelFontStyle: '--plasma-checkbox-label-font-style',\n labelFontWeight: '--plasma-checkbox-label-font-weight',\n labelLetterSpacing: '--plasma-checkbox-label-letter-spacing',\n labelLineHeight: '--plasma-checkbox-label-line-height',\n descriptionMarginTop: '--plasma-checkbox-description-margin-top',\n descriptionOnlyMarginTop: '--plasma-checkbox-description-only-margin-top',\n descriptionFontFamily: '--plasma-checkbox-description-font-family',\n descriptionFontSize: '--plasma-checkbox-description-font-size',\n descriptionFontStyle: '--plasma-checkbox-description-font-style',\n descriptionFontWeight: '--plasma-checkbox-description-font-weight',\n descriptionLetterSpacing: '--plasma-checkbox-description-letter-spacing',\n descriptionLineHeight: '--plasma-checkbox-description-line-height',\n\n fillColor: '--plasma-checkbox-fill-color',\n iconColor: '--plasma-checkbox-icon-color',\n descriptionColor: '--plasma-checkbox-description-color',\n triggerBorderColor: '--plasma-checkbox-trigger-border-color',\n\n focusColor: '--plasma-checkbox-focus-color',\n disabledOpacity: '--plasma-checkbox-disabled-opacity',\n};\n"],"names":["classes","singleLine","checkboxTrigger","onlyDescription","tokens","margin","triggerMargin","triggerSize","triggerBorderRadius","contentTopOffset","contentLeftOffset","labelFontFamily","labelFontSize","labelFontStyle","labelFontWeight","labelLetterSpacing","labelLineHeight","descriptionMarginTop","descriptionOnlyMarginTop","descriptionFontFamily","descriptionFontSize","descriptionFontStyle","descriptionFontWeight","descriptionLetterSpacing","descriptionLineHeight","fillColor","iconColor","descriptionColor","triggerBorderColor","focusColor","disabledOpacity"],"mappings":"AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,eAAe,EAAE,kBAAkB;AACnCC,EAAAA,eAAe,EAAE,kBAAA;AACrB,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,MAAM,EAAE,0BAA0B;AAClCC,EAAAA,aAAa,EAAE,kCAAkC;AACjDC,EAAAA,WAAW,EAAE,gCAAgC;AAC7CC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,iBAAiB,EAAE,uCAAuC;AAC1DC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,aAAa,EAAE,mCAAmC;AAClDC,EAAAA,cAAc,EAAE,oCAAoC;AACpDC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,kBAAkB,EAAE,wCAAwC;AAC5DC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,oBAAoB,EAAE,0CAA0C;AAChEC,EAAAA,wBAAwB,EAAE,+CAA+C;AACzEC,EAAAA,qBAAqB,EAAE,2CAA2C;AAClEC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,oBAAoB,EAAE,0CAA0C;AAChEC,EAAAA,qBAAqB,EAAE,2CAA2C;AAClEC,EAAAA,wBAAwB,EAAE,8CAA8C;AACxEC,EAAAA,qBAAqB,EAAE,2CAA2C;AAElEC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,gBAAgB,EAAE,qCAAqC;AACvDC,EAAAA,kBAAkB,EAAE,wCAAwC;AAE5DC,EAAAA,UAAU,EAAE,+BAA+B;AAC3CC,EAAAA,eAAe,EAAE,oCAAA;AACrB;;;;"}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
+ import { tokens } from './Checkbox.tokens.js';
2
3
 
3
- var _path, _path2;
4
4
  var Done = function Done() {
5
5
  return /*#__PURE__*/React.createElement("div", {
6
6
  style: {
@@ -11,12 +11,12 @@ var Done = function Done() {
11
11
  viewBox: "0 0 18 18",
12
12
  fill: "none",
13
13
  style: {
14
- width: 'var(--plasma-checkbox-trigger-size)'
14
+ width: "var(".concat(tokens.triggerSize, ")")
15
15
  }
16
- }, _path || (_path = /*#__PURE__*/React.createElement("path", {
17
- fill: "var(--plasma-checkbox-icon-color)",
16
+ }, /*#__PURE__*/React.createElement("path", {
17
+ fill: "var(".concat(tokens.iconColor, ")"),
18
18
  d: "m5.70711,8.15582c-0.39053,-0.39052 -1.02369,-0.39052 -1.41422,0c-0.39052,0.39053 -0.39052,1.02369 0,1.41422l3.70666,3.70666l6.71095,-6.70248c0.3908,-0.39027 0.3912,-1.02344 0.0009,-1.41421c-0.3903,-0.39077 -1.02344,-0.39117 -1.41421,-0.00089l-5.29674,5.29004l-2.29334,-2.29334z"
19
- }))));
19
+ })));
20
20
  };
21
21
  var Indeterminate = function Indeterminate() {
22
22
  return /*#__PURE__*/React.createElement("div", {
@@ -28,14 +28,14 @@ var Indeterminate = function Indeterminate() {
28
28
  viewBox: "0 0 18 18",
29
29
  fill: "none",
30
30
  style: {
31
- width: 'var(--plasma-checkbox-trigger-size)'
31
+ width: "var(".concat(tokens.triggerSize, ")")
32
32
  }
33
- }, _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
33
+ }, /*#__PURE__*/React.createElement("path", {
34
34
  strokeLinecap: "round",
35
35
  strokeWidth: "2",
36
- stroke: "var(--plasma-checkbox-icon-color)",
36
+ stroke: "var(".concat(tokens.iconColor, ")"),
37
37
  d: "m5.09449,9.0315l8,0"
38
- }))));
38
+ })));
39
39
  };
40
40
 
41
41
  export { Done, Indeterminate };
@@ -1 +1 @@
1
- {"version":3,"file":"IconsSvg.js","sources":["../../../src/components/Checkbox/IconsSvg.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Done = () => (\n <div style={{ display: 'inline-flex' }}>\n <svg width=\"100%\" viewBox=\"0 0 18 18\" fill=\"none\" style={{ width: 'var(--plasma-checkbox-trigger-size)' }}>\n <path\n fill=\"var(--plasma-checkbox-icon-color)\"\n d=\"m5.70711,8.15582c-0.39053,-0.39052 -1.02369,-0.39052 -1.41422,0c-0.39052,0.39053 -0.39052,1.02369 0,1.41422l3.70666,3.70666l6.71095,-6.70248c0.3908,-0.39027 0.3912,-1.02344 0.0009,-1.41421c-0.3903,-0.39077 -1.02344,-0.39117 -1.41421,-0.00089l-5.29674,5.29004l-2.29334,-2.29334z\"\n />\n </svg>\n </div>\n);\n\nexport const Indeterminate = () => (\n <div style={{ display: 'inline-flex' }}>\n <svg width=\"100%\" viewBox=\"0 0 18 18\" fill=\"none\" style={{ width: 'var(--plasma-checkbox-trigger-size)' }}>\n <path\n strokeLinecap=\"round\"\n strokeWidth=\"2\"\n stroke=\"var(--plasma-checkbox-icon-color)\"\n d=\"m5.09449,9.0315l8,0\"\n />\n </svg>\n </div>\n);\n"],"names":["Done","React","createElement","style","display","width","viewBox","fill","_path","d","Indeterminate","_path2","strokeLinecap","strokeWidth","stroke"],"mappings":";;;AAEaA,IAAAA,IAAI,GAAG,SAAPA,IAAIA,GAAA;EAAA,oBACbC,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,OAAO,EAAE,aAAA;AAAc,KAAA;GACjCH,eAAAA,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKG,IAAAA,KAAK,EAAC,MAAM;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,IAAI,EAAC,MAAM;AAACJ,IAAAA,KAAK,EAAE;AAAEE,MAAAA,KAAK,EAAE,qCAAA;AAAsC,KAAA;AAAE,GAAA,EAAAG,KAAA,KAAAA,KAAA,gBACtGP,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACIK,IAAAA,IAAI,EAAC,mCAAmC;AACxCE,IAAAA,CAAC,EAAC,uRAAA;GACL,CAAC,CACD,CACJ,CAAC,CAAA;AAAA,EACT;AAEYC,IAAAA,aAAa,GAAG,SAAhBA,aAAaA,GAAA;EAAA,oBACtBT,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,OAAO,EAAE,aAAA;AAAc,KAAA;GACjCH,eAAAA,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKG,IAAAA,KAAK,EAAC,MAAM;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,IAAI,EAAC,MAAM;AAACJ,IAAAA,KAAK,EAAE;AAAEE,MAAAA,KAAK,EAAE,qCAAA;AAAsC,KAAA;AAAE,GAAA,EAAAM,MAAA,KAAAA,MAAA,gBACtGV,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACIU,IAAAA,aAAa,EAAC,OAAO;AACrBC,IAAAA,WAAW,EAAC,GAAG;AACfC,IAAAA,MAAM,EAAC,mCAAmC;AAC1CL,IAAAA,CAAC,EAAC,qBAAA;GACL,CAAC,CACD,CACJ,CAAC,CAAA;AAAA;;;;"}
1
+ {"version":3,"file":"IconsSvg.js","sources":["../../../src/components/Checkbox/IconsSvg.tsx"],"sourcesContent":["import React from 'react';\n\nimport { tokens } from './Checkbox.tokens';\n\nexport const Done = () => (\n <div style={{ display: 'inline-flex' }}>\n <svg width=\"100%\" viewBox=\"0 0 18 18\" fill=\"none\" style={{ width: `var(${tokens.triggerSize})` }}>\n <path\n fill={`var(${tokens.iconColor})`}\n d=\"m5.70711,8.15582c-0.39053,-0.39052 -1.02369,-0.39052 -1.41422,0c-0.39052,0.39053 -0.39052,1.02369 0,1.41422l3.70666,3.70666l6.71095,-6.70248c0.3908,-0.39027 0.3912,-1.02344 0.0009,-1.41421c-0.3903,-0.39077 -1.02344,-0.39117 -1.41421,-0.00089l-5.29674,5.29004l-2.29334,-2.29334z\"\n />\n </svg>\n </div>\n);\n\nexport const Indeterminate = () => (\n <div style={{ display: 'inline-flex' }}>\n <svg width=\"100%\" viewBox=\"0 0 18 18\" fill=\"none\" style={{ width: `var(${tokens.triggerSize})` }}>\n <path strokeLinecap=\"round\" strokeWidth=\"2\" stroke={`var(${tokens.iconColor})`} d=\"m5.09449,9.0315l8,0\" />\n </svg>\n </div>\n);\n"],"names":["Done","React","createElement","style","display","width","viewBox","fill","concat","tokens","triggerSize","iconColor","d","Indeterminate","strokeLinecap","strokeWidth","stroke"],"mappings":";;;AAIaA,IAAAA,IAAI,GAAG,SAAPA,IAAIA,GAAA;EAAA,oBACbC,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,OAAO,EAAE,aAAA;AAAc,KAAA;GACjCH,eAAAA,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKG,IAAAA,KAAK,EAAC,MAAM;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,IAAI,EAAC,MAAM;AAACJ,IAAAA,KAAK,EAAE;AAAEE,MAAAA,KAAK,EAAAG,MAAAA,CAAAA,MAAA,CAASC,MAAM,CAACC,WAAW,EAAA,GAAA,CAAA;AAAI,KAAA;GAC3FT,eAAAA,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACIK,IAAAA,IAAI,SAAAC,MAAA,CAASC,MAAM,CAACE,SAAS,EAAI,GAAA,CAAA;AACjCC,IAAAA,CAAC,EAAC,uRAAA;GACL,CACA,CACJ,CAAC,CAAA;AAAA,EACT;AAEYC,IAAAA,aAAa,GAAG,SAAhBA,aAAaA,GAAA;EAAA,oBACtBZ,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,OAAO,EAAE,aAAA;AAAc,KAAA;GACjCH,eAAAA,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKG,IAAAA,KAAK,EAAC,MAAM;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,IAAI,EAAC,MAAM;AAACJ,IAAAA,KAAK,EAAE;AAAEE,MAAAA,KAAK,EAAAG,MAAAA,CAAAA,MAAA,CAASC,MAAM,CAACC,WAAW,EAAA,GAAA,CAAA;AAAI,KAAA;GAC3FT,eAAAA,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMY,IAAAA,aAAa,EAAC,OAAO;AAACC,IAAAA,WAAW,EAAC,GAAG;AAACC,IAAAA,MAAM,SAAAR,MAAA,CAASC,MAAM,CAACE,SAAS,EAAI,GAAA,CAAA;AAACC,IAAAA,CAAC,EAAC,qBAAA;GAAuB,CACxG,CACJ,CAAC,CAAA;AAAA;;;;"}
@@ -1,5 +1,5 @@
1
- import './base_po5iiu.css';
2
- var base = "brrdlt4";
1
+ import './base_1krdtt6.css';
2
+ var base = "bxbqqc3";
3
3
 
4
4
  export { base };
5
5
  //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Checkbox/variations/_disabled/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { StyledContentWrapper } from '../../Checkbox.styles';\nimport { tokens } from '../../Checkbox.tokens';\n\nexport const base = css`\n input:disabled + ${StyledContentWrapper} {\n opacity: var(${tokens.disabledOpacity});\n }\n\n input:disabled + ${StyledContentWrapper} {\n cursor: not-allowed;\n }\n`;\n"],"names":["base"],"mappings":"AAKO,IAAMA,IAAI,GAQhB;;;;"}
@@ -0,0 +1 @@
1
+ .bxbqqc3 input:disabled + .s1u3nd7e{opacity:var(--plasma-checkbox-disabled-opacity);}.bxbqqc3 input:disabled + .s1u3nd7e{cursor:not-allowed;}
@@ -0,0 +1,10 @@
1
+ import './base_hr4zpz.css';
2
+ /**
3
+ * INFO: на 36 строке нет возможности использвать .${classes.checkboxTrigger},
4
+ * потому что линтер правит селектор и он применяется некорректно
5
+ */
6
+
7
+ var base = "b1y5wkm1";
8
+
9
+ export { base };
10
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Checkbox/variations/_focused/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { addFocus } from '../../../../mixins';\nimport { classes, tokens } from '../../Checkbox.tokens';\n\n/**\n * INFO: на 36 строке нет возможности использвать .${classes.checkboxTrigger},\n * потому что линтер правит селектор и он применяется некорректно\n */\n\nexport const base = css`\n .${classes.checkboxTrigger} {\n ${addFocus({\n outlineOffset: '0',\n outlineSize: '0.125rem',\n outlineRadius: `var(${tokens.triggerBorderRadius})`,\n outlineColor: 'transparent',\n })}\n }\n\n input[data-focus-visible-added] + label .${classes.checkboxTrigger} {\n border-color: transparent;\n ${addFocus({\n outlineOffset: '-0.125rem',\n outlineSize: '0.125rem',\n outlineRadius: `var(${tokens.triggerBorderRadius})`,\n outlineColor: `var(${tokens.focusColor})`,\n customFocusRules: `\n &::before {\n box-shadow: 0 0 0 0.125rem var(${tokens.focusColor});\n }\n `,\n })}\n }\n\n input[data-focus-visible-added]:checked + label .checkbox-trigger,\n input[type='checkbox'][data-focus-visible-added]:indeterminate + label .${classes.checkboxTrigger} {\n ${addFocus({\n outlineOffset: '-0.125rem',\n outlineSize: '0.063rem',\n outlineRadius: `calc(var(${tokens.triggerBorderRadius}) + 0.125rem)`,\n outlineColor: `var(${tokens.focusColor})`,\n customFocusRules: `\n &::before {\n box-shadow: 0 0 0 0.063rem var(${tokens.focusColor});\n }\n `,\n })}\n }\n`;\n"],"names":["base"],"mappings":"AAKA;AACA;AACA;AACA;;AAEO,IAAMA,IAAI,GAuChB;;;;"}
@@ -0,0 +1 @@
1
+ .b1y5wkm1 .checkbox-trigger{position:relative;}.b1y5wkm1 .checkbox-trigger::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:var(--plasma-checkbox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.b1y5wkm1 .checkbox-trigger.focus-visible:focus::before,.b1y5wkm1 .checkbox-trigger[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem transparent;}.b1y5wkm1 input[data-focus-visible-added] + label .checkbox-trigger{border-color:transparent;position:relative;}.b1y5wkm1 input[data-focus-visible-added] + label .checkbox-trigger::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:var(--plasma-checkbox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.b1y5wkm1 input[data-focus-visible-added] + label .checkbox-trigger::before{box-shadow:0 0 0 0.125rem var(--plasma-checkbox-focus-color);}.b1y5wkm1 input[data-focus-visible-added]:checked + label .checkbox-trigger,.b1y5wkm1 input[type='checkbox'][data-focus-visible-added]:indeterminate + label .checkbox-trigger{position:relative;}.b1y5wkm1 input[data-focus-visible-added]:checked + label .checkbox-trigger::before,.b1y5wkm1 input[type='checkbox'][data-focus-visible-added]:indeterminate + label .checkbox-trigger::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-checkbox-trigger-border-radius) + 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.b1y5wkm1 input[data-focus-visible-added]:checked + label .checkbox-trigger::before,.b1y5wkm1 input[type='checkbox'][data-focus-visible-added]:indeterminate + label .checkbox-trigger::before{box-shadow:0 0 0 0.063rem var(--plasma-checkbox-focus-color);}
@@ -1,5 +1,5 @@
1
1
  import './base_x642ct.css';
2
- var base = "b1rxty3y";
2
+ var base = "b1pmvrpn";
3
3
 
4
4
  export { base };
5
5
  //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Checkbox/variations/_size/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":"AAEO,IAAMA,IAAI,GAAQ;;;;"}
@@ -1,5 +1,5 @@
1
- import './base_1vqr3f.css';
2
- var base = "bjda290";
1
+ import './base_x252cy.css';
2
+ var base = "b17hdes8";
3
3
 
4
4
  export { base };
5
5
  //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Checkbox/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { StyledContentWrapper, StyledTrigger } from '../../Checkbox.styles';\nimport { tokens } from '../../Checkbox.tokens';\n\nexport const base = css`\n input[type='checkbox']:indeterminate + ${StyledContentWrapper} ${StyledTrigger} {\n border: none;\n background: var(${tokens.fillColor});\n border-color: var(${tokens.fillColor});\n }\n\n input:checked + ${StyledContentWrapper} ${StyledTrigger} {\n border: none;\n background: var(${tokens.fillColor});\n border-color: var(${tokens.fillColor});\n }\n`;\n"],"names":["base"],"mappings":"AAKO,IAAMA,IAAI,GAYhB;;;;"}
@@ -0,0 +1 @@
1
+ .b17hdes8 input[type='checkbox']:indeterminate + .s1u3nd7e .sft3zxv{border:none;background:var(--plasma-checkbox-fill-color);border-color:var(--plasma-checkbox-fill-color);}.b17hdes8 input:checked + .s1u3nd7e .sft3zxv{border:none;background:var(--plasma-checkbox-fill-color);border-color:var(--plasma-checkbox-fill-color);}
@@ -1,7 +1,6 @@
1
1
  import { useEffect } from 'react';
2
2
  import { usePreviousValue } from '../../../hooks/usePreviousValue.js';
3
3
  import { useDidMountEffect } from '../../../hooks/useDidMountEffect.js';
4
- import '../../../utils/react.js';
5
4
 
6
5
  var useFocusController = function useFocusController(_ref) {
7
6
  var _ref$controlledRefs = _ref.controlledRefs,
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusController.js","sources":["../../../../src/components/Combobox/hooks/useFocusController.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { useDidMountEffect, usePreviousValue } from '../../../hooks';\nimport type { UseFocusControllerProps } from '../Combobox.types';\n\nexport const useFocusController = ({\n controlledRefs: { contentRef, inputHelperRef, inputRef },\n opened,\n hasValue,\n textContent,\n search,\n values,\n readOnly,\n valueType,\n closedWithoutChanges,\n updateSearch,\n updateFocused,\n onChipClick,\n}: UseFocusControllerProps) => {\n const prevSearch = usePreviousValue(search);\n const prevValues = usePreviousValue(values);\n const prevOpened = usePreviousValue(opened);\n\n useDidMountEffect(() => {\n if (!opened) {\n updateFocused(false);\n contentRef.current?.scrollTo({ left: 0 });\n }\n\n const hasFocusAfterClose = prevOpened !== undefined && !opened && !closedWithoutChanges?.current;\n\n if (opened || hasFocusAfterClose) {\n inputRef.current?.focus();\n }\n\n // INFO: Помогает определить, произошло ли закрытие выпадающего меню при выборе значения.\n // Нужно для того, чтобы не фокусироваться на инпуте\n // ОЧЕНЬ не нравится это решение, но оно работает\n if (closedWithoutChanges?.current === false) {\n closedWithoutChanges.current = true;\n }\n }, [opened]);\n\n useDidMountEffect(() => {\n const prevValuesCount = prevValues?.length || 0;\n const valuesCount = values?.length || 0;\n\n if ((opened || prevOpened) && prevValuesCount < valuesCount) {\n inputRef.current?.focus();\n }\n }, [values, readOnly]);\n\n useDidMountEffect(() => {\n if (!inputRef.current) {\n return;\n }\n\n // INFO: Для multiple\n if (search === '') {\n inputRef.current.style.flex = '1';\n }\n\n // INFO: Для single\n if (!opened && prevSearch !== search) {\n inputRef.current.style.flex = '1';\n }\n\n // INFO: Для кейсов, когда значение вырезано\n if (!inputRef.current.value.length) {\n inputRef.current.style.flex = '1';\n return;\n }\n\n if (valueType === 'multiple' && inputHelperRef.current) {\n const { clientWidth } = inputHelperRef.current;\n inputRef.current.style.flex = `1 0 ${clientWidth}px`;\n }\n }, [readOnly, search, valueType]);\n\n useEffect(() => {\n const newSearch = hasValue ? textContent : '';\n\n // INFO: Заполнить поле input при первой инициализации\n if (prevOpened !== undefined && opened) {\n return;\n }\n\n if (valueType === 'single') {\n updateSearch?.(newSearch, false);\n }\n\n if (valueType === 'multiple') {\n updateSearch?.('', false);\n }\n }, [updateSearch, values, opened, hasValue, textContent, valueType]);\n\n const onClickText = (event: React.MouseEvent<HTMLButtonElement>) => {\n onChipClick?.(event);\n inputRef.current?.focus();\n };\n\n const onFocusInput = () => {\n if (readOnly) {\n return;\n }\n\n // INFO: Жёсткий хак, нужный для корректного выделения всей строки после выбора значения.\n // Проблема возникает из-за очередности срабатывания useEffect, который сначала вызывает фокус\n // на элемент, а потом обновляет состояние inputRef\n if (valueType === 'single') {\n setTimeout(() => {\n inputRef.current?.select();\n });\n }\n\n contentRef.current?.scrollTo({ left: contentRef.current?.scrollWidth });\n\n updateFocused(true);\n };\n\n const onBlurInput = () => {\n if (!opened) {\n updateFocused(false);\n }\n };\n\n return { onClickText, onFocusInput, onBlurInput } as const;\n};\n"],"names":["useFocusController","_ref","_ref$controlledRefs","controlledRefs","contentRef","inputHelperRef","inputRef","opened","hasValue","textContent","search","values","readOnly","valueType","closedWithoutChanges","updateSearch","updateFocused","onChipClick","prevSearch","usePreviousValue","prevValues","prevOpened","useDidMountEffect","_contentRef$current","current","scrollTo","left","hasFocusAfterClose","undefined","_inputRef$current","focus","prevValuesCount","length","valuesCount","_inputRef$current2","style","flex","value","clientWidth","concat","useEffect","newSearch","onClickText","event","_inputRef$current3","onFocusInput","_contentRef$current2","_contentRef$current3","setTimeout","_inputRef$current4","select","scrollWidth","onBlurInput"],"mappings":";;;;;IAKaA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAaA;AAAA,EAAA,IAAAC,mBAAA,GAAAD,IAAA,CAZ3BE,cAAc;IAAIC,UAAU,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,CAAoBrB,QAAQ,CAAC;MAAEC,IAAI,EAAA,CAAAqB,oBAAA,GAAE3C,UAAU,CAACoB,OAAO,MAAAuB,IAAAA,IAAAA,oBAAA,KAAlBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,oBAAA,CAAoBI,WAAAA;AAAY,KAAC,CAAC,CAAA;IAEvEnC,aAAa,CAAC,IAAI,CAAC,CAAA;GACtB,CAAA;AAED,EAAA,IAAMoC,WAAW,GAAG,SAAdA,WAAWA,GAAS;IACtB,IAAI,CAAC7C,MAAM,EAAE;MACTS,aAAa,CAAC,KAAK,CAAC,CAAA;AACxB,KAAA;GACH,CAAA;EAED,OAAO;AAAE0B,IAAAA,WAAW,EAAXA,WAAW;AAAEG,IAAAA,YAAY,EAAZA,YAAY;AAAEO,IAAAA,WAAW,EAAXA,WAAAA;GAAa,CAAA;AACrD;;;;"}
1
+ {"version":3,"file":"useFocusController.js","sources":["../../../../src/components/Combobox/hooks/useFocusController.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { useDidMountEffect, usePreviousValue } from '../../../hooks';\nimport type { UseFocusControllerProps } from '../Combobox.types';\n\nexport const useFocusController = ({\n controlledRefs: { contentRef, inputHelperRef, inputRef },\n opened,\n hasValue,\n textContent,\n search,\n values,\n readOnly,\n valueType,\n closedWithoutChanges,\n updateSearch,\n updateFocused,\n onChipClick,\n}: UseFocusControllerProps) => {\n const prevSearch = usePreviousValue(search);\n const prevValues = usePreviousValue(values);\n const prevOpened = usePreviousValue(opened);\n\n useDidMountEffect(() => {\n if (!opened) {\n updateFocused(false);\n contentRef.current?.scrollTo({ left: 0 });\n }\n\n const hasFocusAfterClose = prevOpened !== undefined && !opened && !closedWithoutChanges?.current;\n\n if (opened || hasFocusAfterClose) {\n inputRef.current?.focus();\n }\n\n // INFO: Помогает определить, произошло ли закрытие выпадающего меню при выборе значения.\n // Нужно для того, чтобы не фокусироваться на инпуте\n // ОЧЕНЬ не нравится это решение, но оно работает\n if (closedWithoutChanges?.current === false) {\n closedWithoutChanges.current = true;\n }\n }, [opened]);\n\n useDidMountEffect(() => {\n const prevValuesCount = prevValues?.length || 0;\n const valuesCount = values?.length || 0;\n\n if ((opened || prevOpened) && prevValuesCount < valuesCount) {\n inputRef.current?.focus();\n }\n }, [values, readOnly]);\n\n useDidMountEffect(() => {\n if (!inputRef.current) {\n return;\n }\n\n // INFO: Для multiple\n if (search === '') {\n inputRef.current.style.flex = '1';\n }\n\n // INFO: Для single\n if (!opened && prevSearch !== search) {\n inputRef.current.style.flex = '1';\n }\n\n // INFO: Для кейсов, когда значение вырезано\n if (!inputRef.current.value.length) {\n inputRef.current.style.flex = '1';\n return;\n }\n\n if (valueType === 'multiple' && inputHelperRef.current) {\n const { clientWidth } = inputHelperRef.current;\n inputRef.current.style.flex = `1 0 ${clientWidth}px`;\n }\n }, [readOnly, search, valueType]);\n\n useEffect(() => {\n const newSearch = hasValue ? textContent : '';\n\n // INFO: Заполнить поле input при первой инициализации\n if (prevOpened !== undefined && opened) {\n return;\n }\n\n if (valueType === 'single') {\n updateSearch?.(newSearch, false);\n }\n\n if (valueType === 'multiple') {\n updateSearch?.('', false);\n }\n }, [updateSearch, values, opened, hasValue, textContent, valueType]);\n\n const onClickText = (event: React.MouseEvent<HTMLButtonElement>) => {\n onChipClick?.(event);\n inputRef.current?.focus();\n };\n\n const onFocusInput = () => {\n if (readOnly) {\n return;\n }\n\n // INFO: Жёсткий хак, нужный для корректного выделения всей строки после выбора значения.\n // Проблема возникает из-за очередности срабатывания useEffect, который сначала вызывает фокус\n // на элемент, а потом обновляет состояние inputRef\n if (valueType === 'single') {\n setTimeout(() => {\n inputRef.current?.select();\n });\n }\n\n contentRef.current?.scrollTo({ left: contentRef.current?.scrollWidth });\n\n updateFocused(true);\n };\n\n const onBlurInput = () => {\n if (!opened) {\n updateFocused(false);\n }\n };\n\n return { onClickText, onFocusInput, onBlurInput } as const;\n};\n"],"names":["useFocusController","_ref","_ref$controlledRefs","controlledRefs","contentRef","inputHelperRef","inputRef","opened","hasValue","textContent","search","values","readOnly","valueType","closedWithoutChanges","updateSearch","updateFocused","onChipClick","prevSearch","usePreviousValue","prevValues","prevOpened","useDidMountEffect","_contentRef$current","current","scrollTo","left","hasFocusAfterClose","undefined","_inputRef$current","focus","prevValuesCount","length","valuesCount","_inputRef$current2","style","flex","value","clientWidth","concat","useEffect","newSearch","onClickText","event","_inputRef$current3","onFocusInput","_contentRef$current2","_contentRef$current3","setTimeout","_inputRef$current4","select","scrollWidth","onBlurInput"],"mappings":";;;;IAKaA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAaA;AAAA,EAAA,IAAAC,mBAAA,GAAAD,IAAA,CAZ3BE,cAAc;IAAIC,UAAU,GAAAF,mBAAA,CAAVE,UAAU;IAAEC,cAAc,GAAAH,mBAAA,CAAdG,cAAc;IAAEC,QAAQ,GAAAJ,mBAAA,CAARI,QAAQ;IACtDC,MAAM,GAAAN,IAAA,CAANM,MAAM;IACNC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;IACRC,WAAW,GAAAR,IAAA,CAAXQ,WAAW;IACXC,MAAM,GAAAT,IAAA,CAANS,MAAM;IACNC,MAAM,GAAAV,IAAA,CAANU,MAAM;IACNC,QAAQ,GAAAX,IAAA,CAARW,QAAQ;IACRC,SAAS,GAAAZ,IAAA,CAATY,SAAS;IACTC,oBAAoB,GAAAb,IAAA,CAApBa,oBAAoB;IACpBC,YAAY,GAAAd,IAAA,CAAZc,YAAY;IACZC,aAAa,GAAAf,IAAA,CAAbe,aAAa;IACbC,WAAW,GAAAhB,IAAA,CAAXgB,WAAW,CAAA;AAEX,EAAA,IAAMC,UAAU,GAAGC,gBAAgB,CAACT,MAAM,CAAC,CAAA;AAC3C,EAAA,IAAMU,UAAU,GAAGD,gBAAgB,CAACR,MAAM,CAAC,CAAA;AAC3C,EAAA,IAAMU,UAAU,GAAGF,gBAAgB,CAACZ,MAAM,CAAC,CAAA;AAE3Ce,EAAAA,i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,IAAInC,QAAQ,EAAE;AACV,MAAA,OAAA;AACJ,KAAA;;AAEA;AACA;AACA;IACA,IAAIC,SAAS,KAAK,QAAQ,EAAE;AACxBmC,MAAAA,UAAU,CAAC,YAAM;AAAA,QAAA,IAAAC,kBAAA,CAAA;AACb,QAAA,CAAAA,kBAAA,GAAA3C,QAAQ,CAACkB,OAAO,MAAA,IAAA,IAAAyB,kBAAA,KAAA,KAAA,CAAA,IAAhBA,kBAAA,CAAkBC,MAAM,EAAE,CAAA;AAC9B,OAAC,CAAC,CAAA;AACN,KAAA;IAEA,CAAAJ,oBAAA,GAAA1C,UAAU,CAACoB,OAAO,MAAAsB,IAAAA,IAAAA,oBAAA,KAAlBA,KAAAA,CAAAA,IAAAA,oBAAA,CAAoBrB,QAAQ,CAAC;MAAEC,IAAI,EAAA,CAAAqB,oBAAA,GAAE3C,UAAU,CAACoB,OAAO,MAAAuB,IAAAA,IAAAA,oBAAA,KAAlBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,oBAAA,CAAoBI,WAAAA;AAAY,KAAC,CAAC,CAAA;IAEvEnC,aAAa,CAAC,IAAI,CAAC,CAAA;GACtB,CAAA;AAED,EAAA,IAAMoC,WAAW,GAAG,SAAdA,WAAWA,GAAS;IACtB,IAAI,CAAC7C,MAAM,EAAE;MACTS,aAAa,CAAC,KAAK,CAAC,CAAA;AACxB,KAAA;GACH,CAAA;EAED,OAAO;AAAE0B,IAAAA,WAAW,EAAXA,WAAW;AAAEG,IAAAA,YAAY,EAAZA,YAAY;AAAEO,IAAAA,WAAW,EAAXA,WAAAA;GAAa,CAAA;AACrD;;;;"}
@@ -0,0 +1,16 @@
1
+ .Checkbox_styles_1266095_b1udywkg__e7223270{margin:var(--plasma-checkbox-margin);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;}.Checkbox_styles_1266095_b1udywkg__e7223270 .Checkbox_styles_1266095_singleLine__e7223270{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
2
+ .Checkbox_styles_1266095_s165w87d__e7223270{position:absolute;width:1px;height:1px;overflow:hidden;-webkit-clip:rect(0 0 0 0);clip:rect(0 0 0 0);}.Checkbox_styles_1266095_s165w87d__e7223270:focus{outline:0 none;}
3
+ .Checkbox_styles_1266095_sft3zxv__e7223270{margin:var(--plasma-checkbox-trigger-margin);width:var(--plasma-checkbox-trigger-size);height:var(--plasma-checkbox-trigger-size);border-radius:var(--plasma-checkbox-trigger-border-radius);position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background:transparent;border:0.125rem solid var(--plasma-checkbox-trigger-border-color);box-sizing:border-box;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;}input:not(:indeterminate) + label .Checkbox_styles_1266095_sft3zxv__e7223270 div{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transition:-webkit-transform 0.15s ease-in-out;-webkit-transition:transform 0.15s ease-in-out;transition:transform 0.15s ease-in-out;}input:checked + label .Checkbox_styles_1266095_sft3zxv__e7223270 div{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}
4
+ .Checkbox_styles_1266095_s1u3nd7e__e7223270{position:relative;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;cursor:inherit;}
5
+ .Checkbox_styles_1266095_shwv1in__e7223270{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-top:var(--plasma-checkbox-content-top-offset);margin-left:var(--plasma-checkbox-content-left-offset);}
6
+ .Checkbox_styles_1266095_s1my1ay__e7223270{font-family:var(--plasma-checkbox-label-font-family);font-size:var(--plasma-checkbox-label-font-size);font-style:var(--plasma-checkbox-label-font-style);font-weight:var(--plasma-checkbox-label-font-weight);-webkit-letter-spacing:var(--plasma-checkbox-label-letter-spacing);-moz-letter-spacing:var(--plasma-checkbox-label-letter-spacing);-ms-letter-spacing:var(--plasma-checkbox-label-letter-spacing);letter-spacing:var(--plasma-checkbox-label-letter-spacing);line-height:var(--plasma-checkbox-label-line-height);}
7
+ .Checkbox_styles_1266095_s14u8fnn__e7223270{margin-top:var(--plasma-checkbox-description-margin-top);color:var(--plasma-checkbox-description-color);font-family:var(--plasma-checkbox-description-font-family);font-size:var(--plasma-checkbox-description-font-size);font-style:var(--plasma-checkbox-description-font-style);font-weight:var(--plasma-checkbox-description-font-weight);-webkit-letter-spacing:var(--plasma-checkbox-description-letter-spacing);-moz-letter-spacing:var(--plasma-checkbox-description-letter-spacing);-ms-letter-spacing:var(--plasma-checkbox-description-letter-spacing);letter-spacing:var(--plasma-checkbox-description-letter-spacing);line-height:var(--plasma-checkbox-description-line-height);}.Checkbox_styles_1266095_s14u8fnn__e7223270.Checkbox_styles_1266095_onlyDescription__e7223270{margin-top:0;}
8
+
9
+ .base_11n1fn3_b1yt66an__50fb7cfc input:checked + label .base_11n1fn3_radioboxTrigger__50fb7cfc{border:none;background:var(--plasma-radiobox-fill-color);border-color:var(--plasma-radiobox-fill-color);}
10
+
11
+ .base_6ae9j2_bmkf7xj__b9915620 input:disabled + label{opacity:var(--plasma-radiobox-disabled-opacity);}.base_6ae9j2_bmkf7xj__b9915620 input:disabled + label{cursor:not-allowed;}
12
+
13
+ .base_1d7o4za_buxu4te__19288bae .base_1d7o4za_radioboxTrigger__19288bae{position:relative;}.base_1d7o4za_buxu4te__19288bae .base_1d7o4za_radioboxTrigger__19288bae::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:var(--plasma-radiobox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1d7o4za_buxu4te__19288bae .base_1d7o4za_radioboxTrigger__19288bae.base_1d7o4za_focusVisible__19288bae:focus::before,.base_1d7o4za_buxu4te__19288bae .base_1d7o4za_radioboxTrigger__19288bae[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem transparent;}.base_1d7o4za_buxu4te__19288bae input[data-focus-visible-added] + label .base_1d7o4za_radioboxTrigger__19288bae{border-color:transparent;position:relative;}.base_1d7o4za_buxu4te__19288bae input[data-focus-visible-added] + label .base_1d7o4za_radioboxTrigger__19288bae::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:var(--plasma-radiobox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1d7o4za_buxu4te__19288bae input[data-focus-visible-added] + label .base_1d7o4za_radioboxTrigger__19288bae::before{box-shadow:0 0 0 0.125rem var(--plasma-radiobox-focus-color);}.base_1d7o4za_buxu4te__19288bae input[data-focus-visible-added]:checked + label .base_1d7o4za_radioboxTrigger__19288bae{position:relative;}.base_1d7o4za_buxu4te__19288bae input[data-focus-visible-added]:checked + label .base_1d7o4za_radioboxTrigger__19288bae::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-radiobox-trigger-border-radius) + 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1d7o4za_buxu4te__19288bae input[data-focus-visible-added]:checked + label .base_1d7o4za_radioboxTrigger__19288bae::before{box-shadow:0 0 0 0.063rem var(--plasma-radiobox-focus-color);}
14
+
15
+ .Radiobox_styles_1skfuon_s14xglkp__585ca743{width:var(--plasma-radiobox-ellipse-size);height:var(--plasma-radiobox-ellipse-size);border-radius:var(--plasma-radiobox-ellipse-size);background-color:var(--plasma-radiobox-ellipse-color);-webkit-transition:-webkit-transform 0.3s ease-in-out;-webkit-transition:transform 0.3s ease-in-out;transition:transform 0.3s ease-in-out;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);}input:checked + label .Radiobox_styles_1skfuon_s14xglkp__585ca743{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}
16
+ .Radiobox_styles_1skfuon_bdte4ex__585ca743{--plasma-checkbox-label-font-family:var(--plasma-radiobox-label-font-family);--plasma-checkbox-label-font-size:var(--plasma-radiobox-label-font-size);--plasma-checkbox-label-font-style:var(--plasma-radiobox-label-font-style);--plasma-checkbox-label-font-weight:var(--plasma-radiobox-label-font-weight);--plasma-checkbox-label-letter-spacing:var(--plasma-radiobox-label-letter-spacing);--plasma-checkbox-label-line-height:var(--plasma-radiobox-label-line-height);--plasma-checkbox-description-margin-top:var(--plasma-checkbox-description-margin-top);--plasma-checkbox-description-font-family:var(--plasma-radiobox-description-font-family);--plasma-checkbox-description-font-size:var(--plasma-radiobox-description-font-size);--plasma-checkbox-description-font-style:var(--plasma-radiobox-description-font-style);--plasma-checkbox-description-font-weight:var(--plasma-radiobox-description-font-weight);--plasma-checkbox-description-letter-spacing:var(--plasma-radiobox-description-letter-spacing);--plasma-checkbox-description-line-height:var(--plasma-radiobox-description-line-height);--plasma-checkbox-fill-color:var(--plasma-radiobox-fill-color);--plasma-checkbox-description-color:var(--plasma-radiobox-description-color);--plasma-checkbox-trigger-border-color:var(--plasma-radiobox-trigger-border-color);--plasma-checkbox-content-top-offset:var(--plasma-radiobox-content-top-offset);--plasma-checkbox-content-left-offset:var(--plasma-radiobox-content-left-offset);--plasma-checkbox-trigger-size:var(--plasma-radiobox-trigger-size);--plasma-checkbox-trigger-border-radius:var(--plasma-radiobox-trigger-border-radius);--plasma-checkbox-trigger-margin:var(--plasma-radiobox-trigger-margin);margin:var(--plasma-radiobox-margin);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;}.Radiobox_styles_1skfuon_bdte4ex__585ca743 .Radiobox_styles_1skfuon_singleLine__585ca743{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
@@ -1,26 +1,17 @@
1
- import './Radiobox_1ri2eqv.css';
2
1
  import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
3
2
  import React, { forwardRef, useMemo } from 'react';
4
- import { styled } from '@linaria/react';
5
3
  import { safeUseId, extractTextFrom } from '@salutejs/plasma-core';
6
- import { StyledInput, StyledContentWrapper, StyledTrigger, StyledContent, StyledLabel, StyledDescription } from '../Checkbox/Checkbox.js';
4
+ import { StyledInput, StyledContentWrapper, StyledTrigger, StyledContent, StyledLabel, StyledDescription } from '../Checkbox/Checkbox.styles.js';
7
5
  import { cx } from '../../utils/index.js';
8
- import { base as base$2 } from './_view/base.js';
9
- import { base as base$1 } from './_size/base.js';
10
- import { base as base$3 } from './_disabled/base.js';
11
- import { base as base$4 } from './_focused/base.js';
6
+ import { base as base$2 } from './variations/_view/base.js';
7
+ import { base as base$1 } from './variations/_size/base.js';
8
+ import { base as base$3 } from './variations/_disabled/base.js';
9
+ import { base as base$4 } from './variations/_focused/base.js';
10
+ import { StyledEllipse, base } from './Radiobox.styles.js';
11
+ import { classes } from './Radiobox.tokens.js';
12
12
 
13
13
  var _StyledEllipse;
14
14
  var _excluded = ["size", "view", "focused", "disabled", "id", "label", "description", "style", "className", "singleLine", "aria-label"];
15
-
16
- // NOTE: Необходимое переопределение токенов из компонента Checkbox т.к. используются его части
17
-
18
- var StyledEllipse = /*#__PURE__*/styled('div')({
19
- name: "StyledEllipse",
20
- "class": "sv18cw2",
21
- propsAsIs: false
22
- });
23
- var base = "b1ls92xy";
24
15
  var radioboxRoot = function radioboxRoot(Root) {
25
16
  return /*#__PURE__*/forwardRef(function (props, ref) {
26
17
  var size = props.size,
@@ -46,15 +37,15 @@ var radioboxRoot = function radioboxRoot(Root) {
46
37
  var isLabelAriaHidden = typeof label === 'string';
47
38
  var canFocused = focused ? 0 : -1;
48
39
  var hasContent = label || description;
49
- var singleLineClass = singleLine ? 'single-line' : undefined;
50
- var resetMargins = !hasContent ? 'reset-margins' : undefined;
40
+ var singleLineClass = singleLine ? classes.singleLine : undefined;
41
+ var onlyDescriptionClass = !label && description ? classes.onlyDescription : undefined;
51
42
  return /*#__PURE__*/React.createElement(Root, {
52
43
  view: view,
53
44
  size: size,
54
45
  disabled: disabled,
55
46
  focused: focused,
56
47
  style: style,
57
- className: cx(className, resetMargins),
48
+ className: className,
58
49
  tabIndex: -1
59
50
  }, /*#__PURE__*/React.createElement(StyledInput, _extends({}, rest, {
60
51
  id: radioboxId,
@@ -67,11 +58,11 @@ var radioboxRoot = function radioboxRoot(Root) {
67
58
  })), /*#__PURE__*/React.createElement(StyledContentWrapper, {
68
59
  htmlFor: radioboxId
69
60
  }, /*#__PURE__*/React.createElement(StyledTrigger, {
70
- className: cx('radiobox-trigger', resetMargins)
61
+ className: classes.radioboxTrigger
71
62
  }, _StyledEllipse || (_StyledEllipse = /*#__PURE__*/React.createElement(StyledEllipse, null))), hasContent && /*#__PURE__*/React.createElement(StyledContent, {
72
63
  className: singleLineClass
73
64
  }, label && /*#__PURE__*/React.createElement(StyledLabel, {
74
- className: singleLineClass,
65
+ className: cx(singleLineClass, onlyDescriptionClass),
75
66
  id: uniqLabelId,
76
67
  "aria-hidden": isLabelAriaHidden
77
68
  }, label), description && /*#__PURE__*/React.createElement(StyledDescription, {