@salutejs/plasma-new-hope 0.80.0-canary.1176.9060349970.0 → 0.80.0-canary.1194.9064180211.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (536) hide show
  1. package/cjs/components/Checkbox/Checkbox.js +59 -22
  2. package/cjs/components/Checkbox/Checkbox.js.map +1 -1
  3. package/cjs/components/Checkbox/Checkbox_1q4l832.css +7 -0
  4. package/cjs/components/Checkbox/IconsSvg.js +9 -9
  5. package/cjs/components/Checkbox/IconsSvg.js.map +1 -1
  6. package/cjs/components/{Radiobox/variations → Checkbox}/_disabled/base.js +2 -2
  7. package/cjs/components/Checkbox/_disabled/base.js.map +1 -0
  8. package/cjs/components/Checkbox/_disabled/base_fyu17z.css +1 -0
  9. package/cjs/components/Checkbox/{variations/_disabled → _focused}/base.js +2 -2
  10. package/cjs/components/Checkbox/_focused/base.js.map +1 -0
  11. package/cjs/components/Checkbox/_focused/base_po5iiu.css +1 -0
  12. package/cjs/components/{Radiobox/variations → Checkbox}/_size/base.js +1 -1
  13. package/cjs/components/Checkbox/_size/base.js.map +1 -0
  14. package/cjs/components/Checkbox/{variations/_view → _view}/base.js +2 -2
  15. package/cjs/components/Checkbox/_view/base.js.map +1 -0
  16. package/cjs/components/Checkbox/_view/base_1vqr3f.css +1 -0
  17. package/cjs/components/Combobox/hooks/useFocusController.js +1 -0
  18. package/cjs/components/Combobox/hooks/useFocusController.js.map +1 -1
  19. package/cjs/components/Radiobox/Radiobox.js +32 -23
  20. package/cjs/components/Radiobox/Radiobox.js.map +1 -1
  21. package/cjs/components/Radiobox/Radiobox_1ri2eqv.css +2 -0
  22. package/cjs/components/Radiobox/_disabled/base.js +9 -0
  23. package/cjs/components/Radiobox/_disabled/base.js.map +1 -0
  24. package/cjs/components/Radiobox/_disabled/base_1jca5bk.css +1 -0
  25. package/cjs/components/Radiobox/_focused/base.js +9 -0
  26. package/cjs/components/Radiobox/_focused/base.js.map +1 -0
  27. package/cjs/components/Radiobox/{variations/_focused/base_1d7o4za.css → _focused/base_1nruwxa.css} +1 -1
  28. package/cjs/components/{Checkbox/variations → Radiobox}/_size/base.js +1 -1
  29. package/cjs/components/Radiobox/_size/base.js.map +1 -0
  30. package/cjs/components/Radiobox/_view/base.js +9 -0
  31. package/cjs/components/Radiobox/_view/base.js.map +1 -0
  32. package/cjs/components/Radiobox/{variations/_view/base_11n1fn3.css → _view/base_wj0ueq.css} +1 -1
  33. package/cjs/components/Slider/Slider.css +69 -0
  34. package/cjs/components/Slider/Slider.js +53 -0
  35. package/cjs/components/Slider/Slider.js.map +1 -0
  36. package/cjs/components/Slider/Slider.tokens.js +79 -0
  37. package/cjs/components/Slider/Slider.tokens.js.map +1 -0
  38. package/cjs/components/Slider/components/Double/Double.css +62 -0
  39. package/cjs/components/Slider/components/Double/Double.js +274 -0
  40. package/cjs/components/Slider/components/Double/Double.js.map +1 -0
  41. package/cjs/components/Slider/components/Double/Double.styles.js +61 -0
  42. package/cjs/components/Slider/components/Double/Double.styles.js.map +1 -0
  43. package/cjs/components/Slider/components/Double/Double.styles_1jhda4u.css +7 -0
  44. package/cjs/components/Slider/components/Single/Single.css +16 -0
  45. package/cjs/components/Slider/components/Single/Single.js +160 -0
  46. package/cjs/components/Slider/components/Single/Single.js.map +1 -0
  47. package/cjs/components/Slider/components/Single/Single.styles.js +45 -0
  48. package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -0
  49. package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
  50. package/cjs/components/Slider/components/SliderBase/SliderBase.css +4 -0
  51. package/cjs/components/Slider/components/SliderBase/SliderBase.js +82 -0
  52. package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +1 -0
  53. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +33 -0
  54. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -0
  55. package/cjs/components/Slider/components/SliderBase/SliderBase.styles_7is2ll.css +4 -0
  56. package/cjs/components/Slider/ui/Handle/Handle.css +4 -0
  57. package/cjs/components/Slider/ui/Handle/Handle.js +174 -0
  58. package/cjs/components/Slider/ui/Handle/Handle.js.map +1 -0
  59. package/cjs/components/Slider/ui/Handle/Handle.styles.js +21 -0
  60. package/cjs/components/Slider/ui/Handle/Handle.styles.js.map +1 -0
  61. package/cjs/components/Slider/ui/Handle/Handle.styles_9m0x33.css +2 -0
  62. package/cjs/components/Slider/ui/Thumb/Thumb.css +1 -0
  63. package/cjs/components/Slider/ui/Thumb/Thumb.js +31 -0
  64. package/cjs/components/Slider/ui/Thumb/Thumb.js.map +1 -0
  65. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +15 -0
  66. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -0
  67. package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
  68. package/cjs/components/Slider/utils/index.js +56 -0
  69. package/cjs/components/Slider/utils/index.js.map +1 -0
  70. package/cjs/components/Slider/variations/_disabled/base.js +9 -0
  71. package/cjs/components/Slider/variations/_disabled/base.js.map +1 -0
  72. package/cjs/components/Slider/variations/_size/base.js +9 -0
  73. package/cjs/components/Slider/variations/_size/base.js.map +1 -0
  74. package/cjs/components/Slider/variations/_view/base.js +9 -0
  75. package/cjs/components/Slider/variations/_view/base.js.map +1 -0
  76. package/cjs/components/Slider/variations/_view/base_x642ct.css +1 -0
  77. package/cjs/components/TextField/TextField.js +12 -3
  78. package/cjs/components/TextField/TextField.js.map +1 -1
  79. package/cjs/engines/common.js +4 -0
  80. package/cjs/engines/common.js.map +1 -1
  81. package/cjs/engines/index.js.map +1 -1
  82. package/cjs/hooks/useIsomorphicLayoutEffect.js +15 -0
  83. package/cjs/hooks/useIsomorphicLayoutEffect.js.map +1 -0
  84. package/cjs/index.css +40 -15
  85. package/cjs/index.js +14 -4
  86. package/cjs/index.js.map +1 -1
  87. package/cjs/utils/canUseDOM.js +12 -0
  88. package/cjs/utils/canUseDOM.js.map +1 -0
  89. package/cjs/utils/index.js.map +1 -1
  90. package/es/components/Checkbox/Checkbox.js +43 -12
  91. package/es/components/Checkbox/Checkbox.js.map +1 -1
  92. package/es/components/Checkbox/Checkbox_1q4l832.css +7 -0
  93. package/es/components/Checkbox/IconsSvg.js +9 -9
  94. package/es/components/Checkbox/IconsSvg.js.map +1 -1
  95. package/es/components/{Radiobox/variations → Checkbox}/_disabled/base.js +2 -2
  96. package/es/components/Checkbox/_disabled/base.js.map +1 -0
  97. package/es/components/Checkbox/_disabled/base_fyu17z.css +1 -0
  98. package/es/components/Checkbox/{variations/_disabled → _focused}/base.js +2 -2
  99. package/es/components/Checkbox/_focused/base.js.map +1 -0
  100. package/es/components/Checkbox/_focused/base_po5iiu.css +1 -0
  101. package/es/components/{Radiobox/variations → Checkbox}/_size/base.js +1 -1
  102. package/es/components/Checkbox/_size/base.js.map +1 -0
  103. package/es/components/Checkbox/_size/base_x642ct.css +1 -0
  104. package/es/components/Checkbox/{variations/_view → _view}/base.js +2 -2
  105. package/es/components/Checkbox/_view/base.js.map +1 -0
  106. package/es/components/Checkbox/_view/base_1vqr3f.css +1 -0
  107. package/es/components/Combobox/hooks/useFocusController.js +1 -0
  108. package/es/components/Combobox/hooks/useFocusController.js.map +1 -1
  109. package/es/components/Radiobox/Radiobox.js +21 -12
  110. package/es/components/Radiobox/Radiobox.js.map +1 -1
  111. package/es/components/Radiobox/Radiobox_1ri2eqv.css +2 -0
  112. package/es/components/Radiobox/_disabled/base.js +5 -0
  113. package/es/components/Radiobox/_disabled/base.js.map +1 -0
  114. package/es/components/Radiobox/_disabled/base_1jca5bk.css +1 -0
  115. package/es/components/Radiobox/_focused/base.js +5 -0
  116. package/es/components/Radiobox/_focused/base.js.map +1 -0
  117. package/es/components/Radiobox/{variations/_focused/base_1d7o4za.css → _focused/base_1nruwxa.css} +1 -1
  118. package/es/components/{Checkbox/variations → Radiobox}/_size/base.js +1 -1
  119. package/es/components/Radiobox/_size/base.js.map +1 -0
  120. package/es/components/Radiobox/_size/base_x642ct.css +1 -0
  121. package/es/components/Radiobox/_view/base.js +5 -0
  122. package/es/components/Radiobox/_view/base.js.map +1 -0
  123. package/es/components/Radiobox/{variations/_view/base_11n1fn3.css → _view/base_wj0ueq.css} +1 -1
  124. package/es/components/Slider/Slider.css +69 -0
  125. package/es/components/Slider/Slider.js +48 -0
  126. package/es/components/Slider/Slider.js.map +1 -0
  127. package/es/components/Slider/Slider.tokens.js +74 -0
  128. package/es/components/Slider/Slider.tokens.js.map +1 -0
  129. package/es/components/Slider/components/Double/Double.css +62 -0
  130. package/es/components/Slider/components/Double/Double.js +270 -0
  131. package/es/components/Slider/components/Double/Double.js.map +1 -0
  132. package/es/components/Slider/components/Double/Double.styles.js +51 -0
  133. package/es/components/Slider/components/Double/Double.styles.js.map +1 -0
  134. package/es/components/Slider/components/Double/Double.styles_1jhda4u.css +7 -0
  135. package/es/components/Slider/components/Single/Single.css +16 -0
  136. package/es/components/Slider/components/Single/Single.js +156 -0
  137. package/es/components/Slider/components/Single/Single.js.map +1 -0
  138. package/es/components/Slider/components/Single/Single.styles.js +36 -0
  139. package/es/components/Slider/components/Single/Single.styles.js.map +1 -0
  140. package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
  141. package/es/components/Slider/components/SliderBase/SliderBase.css +4 -0
  142. package/es/components/Slider/components/SliderBase/SliderBase.js +78 -0
  143. package/es/components/Slider/components/SliderBase/SliderBase.js.map +1 -0
  144. package/es/components/Slider/components/SliderBase/SliderBase.styles.js +26 -0
  145. package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -0
  146. package/es/components/Slider/components/SliderBase/SliderBase.styles_7is2ll.css +4 -0
  147. package/es/components/Slider/ui/Handle/Handle.css +4 -0
  148. package/es/components/Slider/ui/Handle/Handle.js +170 -0
  149. package/es/components/Slider/ui/Handle/Handle.js.map +1 -0
  150. package/es/components/Slider/ui/Handle/Handle.styles.js +16 -0
  151. package/es/components/Slider/ui/Handle/Handle.styles.js.map +1 -0
  152. package/es/components/Slider/ui/Handle/Handle.styles_9m0x33.css +2 -0
  153. package/es/components/Slider/ui/Thumb/Thumb.css +1 -0
  154. package/es/components/Slider/ui/Thumb/Thumb.js +27 -0
  155. package/es/components/Slider/ui/Thumb/Thumb.js.map +1 -0
  156. package/es/components/Slider/ui/Thumb/Thumb.styles.js +11 -0
  157. package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -0
  158. package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
  159. package/es/components/Slider/utils/index.js +50 -0
  160. package/es/components/Slider/utils/index.js.map +1 -0
  161. package/es/components/Slider/variations/_disabled/base.js +5 -0
  162. package/es/components/Slider/variations/_disabled/base.js.map +1 -0
  163. package/es/components/Slider/variations/_disabled/base_x642ct.css +1 -0
  164. package/es/components/Slider/variations/_size/base.js +5 -0
  165. package/es/components/Slider/variations/_size/base.js.map +1 -0
  166. package/es/components/Slider/variations/_size/base_x642ct.css +1 -0
  167. package/es/components/Slider/variations/_view/base.js +5 -0
  168. package/es/components/Slider/variations/_view/base.js.map +1 -0
  169. package/es/components/Slider/variations/_view/base_x642ct.css +1 -0
  170. package/es/components/TextField/TextField.js +12 -3
  171. package/es/components/TextField/TextField.js.map +1 -1
  172. package/es/engines/common.js +4 -0
  173. package/es/engines/common.js.map +1 -1
  174. package/es/engines/index.js.map +1 -1
  175. package/es/hooks/useIsomorphicLayoutEffect.js +11 -0
  176. package/es/hooks/useIsomorphicLayoutEffect.js.map +1 -0
  177. package/es/index.css +40 -15
  178. package/es/index.js +8 -2
  179. package/es/index.js.map +1 -1
  180. package/es/utils/canUseDOM.js +8 -0
  181. package/es/utils/canUseDOM.js.map +1 -0
  182. package/es/utils/index.js.map +1 -1
  183. package/package.json +3 -2
  184. package/styled-components/cjs/components/Checkbox/Checkbox.js +40 -20
  185. package/styled-components/cjs/components/Checkbox/IconsSvg.js +9 -9
  186. package/styled-components/cjs/components/{Radiobox/variations → Checkbox}/_disabled/base.js +1 -2
  187. package/styled-components/cjs/components/Checkbox/_focused/base.js +26 -0
  188. package/styled-components/cjs/components/Checkbox/_view/base.js +8 -0
  189. package/styled-components/cjs/components/Checkbox/_view/tokens.json +1 -0
  190. package/styled-components/cjs/components/Checkbox/index.js +1 -8
  191. package/styled-components/cjs/components/Radiobox/Radiobox.js +22 -15
  192. package/styled-components/cjs/components/Radiobox/_disabled/base.js +8 -0
  193. package/styled-components/cjs/components/Radiobox/_focused/base.js +26 -0
  194. package/styled-components/cjs/components/Radiobox/_view/base.js +8 -0
  195. package/styled-components/cjs/components/Radiobox/index.js +1 -8
  196. package/styled-components/cjs/components/Slider/Slider.js +52 -0
  197. package/styled-components/cjs/components/Slider/Slider.tokens.js +77 -0
  198. package/styled-components/cjs/components/Slider/components/Double/Double.js +286 -0
  199. package/styled-components/cjs/components/Slider/components/Double/Double.styles.js +36 -0
  200. package/styled-components/cjs/components/Slider/components/Double/Double.types.js +5 -0
  201. package/styled-components/cjs/components/Slider/components/Single/Single.js +172 -0
  202. package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +27 -0
  203. package/styled-components/cjs/components/Slider/components/Single/Single.types.js +5 -0
  204. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +83 -0
  205. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +21 -0
  206. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.types.js +5 -0
  207. package/styled-components/cjs/components/Slider/components/index.js +27 -0
  208. package/styled-components/cjs/components/Slider/index.js +32 -0
  209. package/styled-components/cjs/components/Slider/ui/Handle/Handle.js +183 -0
  210. package/styled-components/cjs/components/Slider/ui/Handle/Handle.styles.js +15 -0
  211. package/styled-components/cjs/components/Slider/ui/Handle/Handle.types.js +5 -0
  212. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +32 -0
  213. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +18 -0
  214. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.types.js +5 -0
  215. package/styled-components/cjs/components/Slider/ui/index.js +63 -0
  216. package/styled-components/cjs/components/Slider/utils/index.js +55 -0
  217. package/styled-components/cjs/components/Slider/variations/_disabled/base.js +8 -0
  218. package/styled-components/cjs/components/Slider/variations/_disabled/tokens.json +4 -0
  219. package/styled-components/cjs/components/Slider/variations/_size/base.js +8 -0
  220. package/styled-components/cjs/components/Slider/variations/_size/tokens.json +0 -0
  221. package/styled-components/cjs/components/Slider/variations/_view/base.js +8 -0
  222. package/styled-components/cjs/components/Slider/variations/_view/tokens.json +0 -0
  223. package/styled-components/cjs/components/TextField/TextField.js +12 -3
  224. package/styled-components/cjs/engines/common.js +4 -0
  225. package/styled-components/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.config.js +14 -14
  226. package/styled-components/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +0 -1
  227. package/styled-components/cjs/examples/plasma_b2c/components/Radiobox/Radiobox.config.js +12 -13
  228. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +29 -0
  229. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.js +16 -0
  230. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +150 -0
  231. package/styled-components/cjs/examples/plasma_web/components/Checkbox/Checkbox.config.js +14 -14
  232. package/styled-components/cjs/examples/plasma_web/components/Checkbox/Checkbox.stories.tsx +0 -1
  233. package/styled-components/cjs/examples/plasma_web/components/Radiobox/Radiobox.config.js +12 -13
  234. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +29 -0
  235. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.js +16 -0
  236. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +150 -0
  237. package/styled-components/cjs/examples/sds_engineer/components/Checkbox/Checkbox.config.js +14 -14
  238. package/styled-components/cjs/examples/sds_engineer/components/Radiobox/Radiobox.config.js +12 -13
  239. package/styled-components/cjs/hooks/index.js +8 -1
  240. package/styled-components/cjs/hooks/useIsomorphicLayoutEffect.js +12 -0
  241. package/styled-components/cjs/index.js +11 -0
  242. package/styled-components/cjs/utils/canUseDOM.js +11 -0
  243. package/styled-components/cjs/utils/index.js +7 -0
  244. package/styled-components/es/components/Checkbox/Checkbox.js +33 -12
  245. package/styled-components/es/components/Checkbox/IconsSvg.js +9 -9
  246. package/styled-components/es/components/Checkbox/_disabled/base.js +2 -0
  247. package/styled-components/es/components/Checkbox/_focused/base.js +20 -0
  248. package/styled-components/es/components/Checkbox/_view/base.js +2 -0
  249. package/styled-components/es/components/Checkbox/_view/tokens.json +1 -0
  250. package/styled-components/es/components/Checkbox/index.js +1 -2
  251. package/styled-components/es/components/Radiobox/Radiobox.js +22 -13
  252. package/styled-components/es/components/Radiobox/_disabled/base.js +2 -0
  253. package/styled-components/es/components/Radiobox/_focused/base.js +20 -0
  254. package/styled-components/es/components/Radiobox/_view/base.js +2 -0
  255. package/styled-components/es/components/Radiobox/index.js +1 -2
  256. package/styled-components/es/components/Slider/Slider.js +43 -0
  257. package/styled-components/es/components/Slider/Slider.tokens.js +71 -0
  258. package/styled-components/es/components/Slider/components/Double/Double.js +278 -0
  259. package/styled-components/es/components/Slider/components/Double/Double.styles.js +29 -0
  260. package/styled-components/es/components/Slider/components/Double/Double.types.js +1 -0
  261. package/styled-components/es/components/Slider/components/Single/Single.js +164 -0
  262. package/styled-components/es/components/Slider/components/Single/Single.styles.js +20 -0
  263. package/styled-components/es/components/Slider/components/Single/Single.types.js +1 -0
  264. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +74 -0
  265. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +14 -0
  266. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.types.js +1 -0
  267. package/styled-components/es/components/Slider/components/index.js +3 -0
  268. package/styled-components/es/components/Slider/index.js +3 -0
  269. package/styled-components/es/components/Slider/ui/Handle/Handle.js +174 -0
  270. package/styled-components/es/components/Slider/ui/Handle/Handle.styles.js +8 -0
  271. package/styled-components/es/components/Slider/ui/Handle/Handle.types.js +1 -0
  272. package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +25 -0
  273. package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +11 -0
  274. package/styled-components/es/components/Slider/ui/Thumb/Thumb.types.js +1 -0
  275. package/styled-components/es/components/Slider/ui/index.js +5 -0
  276. package/styled-components/es/components/Slider/utils/index.js +47 -0
  277. package/styled-components/es/components/Slider/variations/_disabled/base.js +2 -0
  278. package/styled-components/es/components/Slider/variations/_disabled/tokens.json +4 -0
  279. package/styled-components/es/components/Slider/variations/_size/base.js +2 -0
  280. package/styled-components/es/components/Slider/variations/_size/tokens.json +0 -0
  281. package/styled-components/es/components/Slider/variations/_view/base.js +2 -0
  282. package/styled-components/es/components/Slider/variations/_view/tokens.json +0 -0
  283. package/styled-components/es/components/TextField/TextField.js +12 -3
  284. package/styled-components/es/engines/common.js +4 -0
  285. package/styled-components/es/examples/plasma_b2c/components/Checkbox/Checkbox.config.js +14 -14
  286. package/styled-components/es/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +0 -1
  287. package/styled-components/es/examples/plasma_b2c/components/Radiobox/Radiobox.config.js +12 -13
  288. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +23 -0
  289. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.js +10 -0
  290. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +150 -0
  291. package/styled-components/es/examples/plasma_web/components/Checkbox/Checkbox.config.js +14 -14
  292. package/styled-components/es/examples/plasma_web/components/Checkbox/Checkbox.stories.tsx +0 -1
  293. package/styled-components/es/examples/plasma_web/components/Radiobox/Radiobox.config.js +12 -13
  294. package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +23 -0
  295. package/styled-components/es/examples/plasma_web/components/Slider/Slider.js +10 -0
  296. package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +150 -0
  297. package/styled-components/es/examples/sds_engineer/components/Checkbox/Checkbox.config.js +14 -14
  298. package/styled-components/es/examples/sds_engineer/components/Radiobox/Radiobox.config.js +12 -13
  299. package/styled-components/es/hooks/index.js +2 -1
  300. package/styled-components/es/hooks/useIsomorphicLayoutEffect.js +7 -0
  301. package/styled-components/es/index.js +2 -1
  302. package/styled-components/es/utils/canUseDOM.js +5 -0
  303. package/styled-components/es/utils/index.js +1 -0
  304. package/types/components/Checkbox/Checkbox.d.ts +37 -4
  305. package/types/components/Checkbox/Checkbox.d.ts.map +1 -1
  306. package/types/components/Checkbox/IconsSvg.d.ts.map +1 -1
  307. package/types/components/Checkbox/_disabled/base.d.ts.map +1 -0
  308. package/types/components/Checkbox/_focused/base.d.ts.map +1 -0
  309. package/types/components/Checkbox/_size/base.d.ts.map +1 -0
  310. package/types/components/Checkbox/_view/base.d.ts.map +1 -0
  311. package/types/components/Checkbox/index.d.ts +1 -2
  312. package/types/components/Checkbox/index.d.ts.map +1 -1
  313. package/types/components/Radiobox/Radiobox.d.ts +1 -1
  314. package/types/components/Radiobox/Radiobox.d.ts.map +1 -1
  315. package/types/components/Radiobox/_disabled/base.d.ts.map +1 -0
  316. package/types/components/Radiobox/_focused/base.d.ts.map +1 -0
  317. package/types/components/Radiobox/_size/base.d.ts.map +1 -0
  318. package/types/components/Radiobox/_view/base.d.ts +2 -0
  319. package/types/components/Radiobox/_view/base.d.ts.map +1 -0
  320. package/types/components/Radiobox/index.d.ts +0 -1
  321. package/types/components/Radiobox/index.d.ts.map +1 -1
  322. package/types/components/Slider/Slider.d.ts +27 -0
  323. package/types/components/Slider/Slider.d.ts.map +1 -0
  324. package/types/components/Slider/Slider.tokens.d.ts +72 -0
  325. package/types/components/Slider/Slider.tokens.d.ts.map +1 -0
  326. package/types/components/Slider/Slider.types.d.ts +3 -0
  327. package/types/components/Slider/Slider.types.d.ts.map +1 -0
  328. package/types/components/Slider/components/Double/Double.d.ts +4 -0
  329. package/types/components/Slider/components/Double/Double.d.ts.map +1 -0
  330. package/types/components/Slider/components/Double/Double.styles.d.ts +43 -0
  331. package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -0
  332. package/types/components/Slider/components/Double/Double.types.d.ts +65 -0
  333. package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -0
  334. package/types/components/Slider/components/Single/Single.d.ts +4 -0
  335. package/types/components/Slider/components/Single/Single.d.ts.map +1 -0
  336. package/types/components/Slider/components/Single/Single.styles.d.ts +8 -0
  337. package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -0
  338. package/types/components/Slider/components/Single/Single.types.d.ts +55 -0
  339. package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -0
  340. package/types/components/Slider/components/SliderBase/SliderBase.d.ts +4 -0
  341. package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +1 -0
  342. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +6 -0
  343. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +1 -0
  344. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +45 -0
  345. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +1 -0
  346. package/types/components/Slider/components/index.d.ts +6 -0
  347. package/types/components/Slider/components/index.d.ts.map +1 -0
  348. package/types/components/Slider/index.d.ts +6 -0
  349. package/types/components/Slider/index.d.ts.map +1 -0
  350. package/types/components/Slider/ui/Handle/Handle.d.ts +9 -0
  351. package/types/components/Slider/ui/Handle/Handle.d.ts.map +1 -0
  352. package/types/components/Slider/ui/Handle/Handle.styles.d.ts +4 -0
  353. package/types/components/Slider/ui/Handle/Handle.styles.d.ts.map +1 -0
  354. package/types/components/Slider/ui/Handle/Handle.types.d.ts +24 -0
  355. package/types/components/Slider/ui/Handle/Handle.types.d.ts.map +1 -0
  356. package/types/components/Slider/ui/Thumb/Thumb.d.ts +4 -0
  357. package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +1 -0
  358. package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts +5 -0
  359. package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +1 -0
  360. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +12 -0
  361. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +1 -0
  362. package/types/components/Slider/ui/index.d.ts +6 -0
  363. package/types/components/Slider/ui/index.d.ts.map +1 -0
  364. package/types/components/Slider/utils/index.d.ts +33 -0
  365. package/types/components/Slider/utils/index.d.ts.map +1 -0
  366. package/types/components/Slider/variations/_disabled/base.d.ts +2 -0
  367. package/types/components/Slider/variations/_disabled/base.d.ts.map +1 -0
  368. package/types/components/Slider/variations/_size/base.d.ts +2 -0
  369. package/types/components/Slider/variations/_size/base.d.ts.map +1 -0
  370. package/types/components/Slider/variations/_view/base.d.ts +2 -0
  371. package/types/components/Slider/variations/_view/base.d.ts.map +1 -0
  372. package/types/components/TextField/TextField.d.ts.map +1 -1
  373. package/types/engines/common.d.ts +3 -3
  374. package/types/engines/common.d.ts.map +1 -1
  375. package/types/engines/index.d.ts +1 -1
  376. package/types/engines/index.d.ts.map +1 -1
  377. package/types/engines/types.d.ts +4 -0
  378. package/types/engines/types.d.ts.map +1 -1
  379. package/types/examples/plasma_b2c/components/Checkbox/Checkbox.config.d.ts +1 -0
  380. package/types/examples/plasma_b2c/components/Checkbox/Checkbox.config.d.ts.map +1 -1
  381. package/types/examples/plasma_b2c/components/Checkbox/Checkbox.d.ts +1 -1
  382. package/types/examples/plasma_b2c/components/Checkbox/Checkbox.d.ts.map +1 -1
  383. package/types/examples/plasma_b2c/components/Radiobox/Radiobox.config.d.ts.map +1 -1
  384. package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts +22 -0
  385. package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +1 -0
  386. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +21 -0
  387. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -0
  388. package/types/examples/plasma_web/components/Checkbox/Checkbox.config.d.ts +1 -0
  389. package/types/examples/plasma_web/components/Checkbox/Checkbox.config.d.ts.map +1 -1
  390. package/types/examples/plasma_web/components/Checkbox/Checkbox.d.ts +1 -1
  391. package/types/examples/plasma_web/components/Checkbox/Checkbox.d.ts.map +1 -1
  392. package/types/examples/plasma_web/components/Radiobox/Radiobox.config.d.ts.map +1 -1
  393. package/types/examples/plasma_web/components/Slider/Slider.config.d.ts +22 -0
  394. package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +1 -0
  395. package/types/examples/plasma_web/components/Slider/Slider.d.ts +21 -0
  396. package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +1 -0
  397. package/types/examples/sds_engineer/components/Checkbox/Checkbox.config.d.ts +1 -0
  398. package/types/examples/sds_engineer/components/Checkbox/Checkbox.config.d.ts.map +1 -1
  399. package/types/examples/sds_engineer/components/Checkbox/Checkbox.d.ts +1 -1
  400. package/types/examples/sds_engineer/components/Checkbox/Checkbox.d.ts.map +1 -1
  401. package/types/examples/sds_engineer/components/Radiobox/Radiobox.config.d.ts.map +1 -1
  402. package/types/hooks/index.d.ts +1 -0
  403. package/types/hooks/index.d.ts.map +1 -1
  404. package/types/hooks/useIsomorphicLayoutEffect.d.ts +6 -0
  405. package/types/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
  406. package/types/index.d.ts +1 -0
  407. package/types/index.d.ts.map +1 -1
  408. package/types/utils/canUseDOM.d.ts +6 -0
  409. package/types/utils/canUseDOM.d.ts.map +1 -0
  410. package/types/utils/index.d.ts +1 -0
  411. package/types/utils/index.d.ts.map +1 -1
  412. package/cjs/components/Checkbox/Checkbox.css +0 -13
  413. package/cjs/components/Checkbox/Checkbox.styles.js +0 -47
  414. package/cjs/components/Checkbox/Checkbox.styles.js.map +0 -1
  415. package/cjs/components/Checkbox/Checkbox.styles_1266095.css +0 -7
  416. package/cjs/components/Checkbox/Checkbox.tokens.js +0 -41
  417. package/cjs/components/Checkbox/Checkbox.tokens.js.map +0 -1
  418. package/cjs/components/Checkbox/variations/_disabled/base.js.map +0 -1
  419. package/cjs/components/Checkbox/variations/_disabled/base_1krdtt6.css +0 -1
  420. package/cjs/components/Checkbox/variations/_focused/base.js +0 -14
  421. package/cjs/components/Checkbox/variations/_focused/base.js.map +0 -1
  422. package/cjs/components/Checkbox/variations/_focused/base_hr4zpz.css +0 -1
  423. package/cjs/components/Checkbox/variations/_size/base.js.map +0 -1
  424. package/cjs/components/Checkbox/variations/_view/base.js.map +0 -1
  425. package/cjs/components/Checkbox/variations/_view/base_x252cy.css +0 -1
  426. package/cjs/components/Radiobox/Radiobox.css +0 -16
  427. package/cjs/components/Radiobox/Radiobox.styles.js +0 -19
  428. package/cjs/components/Radiobox/Radiobox.styles.js.map +0 -1
  429. package/cjs/components/Radiobox/Radiobox.styles_1skfuon.css +0 -2
  430. package/cjs/components/Radiobox/Radiobox.tokens.js +0 -41
  431. package/cjs/components/Radiobox/Radiobox.tokens.js.map +0 -1
  432. package/cjs/components/Radiobox/variations/_disabled/base.js.map +0 -1
  433. package/cjs/components/Radiobox/variations/_disabled/base_6ae9j2.css +0 -1
  434. package/cjs/components/Radiobox/variations/_focused/base.js +0 -9
  435. package/cjs/components/Radiobox/variations/_focused/base.js.map +0 -1
  436. package/cjs/components/Radiobox/variations/_size/base.js.map +0 -1
  437. package/cjs/components/Radiobox/variations/_view/base.js +0 -9
  438. package/cjs/components/Radiobox/variations/_view/base.js.map +0 -1
  439. package/es/components/Checkbox/Checkbox.css +0 -13
  440. package/es/components/Checkbox/Checkbox.styles.js +0 -37
  441. package/es/components/Checkbox/Checkbox.styles.js.map +0 -1
  442. package/es/components/Checkbox/Checkbox.styles_1266095.css +0 -7
  443. package/es/components/Checkbox/Checkbox.tokens.js +0 -36
  444. package/es/components/Checkbox/Checkbox.tokens.js.map +0 -1
  445. package/es/components/Checkbox/variations/_disabled/base.js.map +0 -1
  446. package/es/components/Checkbox/variations/_disabled/base_1krdtt6.css +0 -1
  447. package/es/components/Checkbox/variations/_focused/base.js +0 -10
  448. package/es/components/Checkbox/variations/_focused/base.js.map +0 -1
  449. package/es/components/Checkbox/variations/_focused/base_hr4zpz.css +0 -1
  450. package/es/components/Checkbox/variations/_size/base.js.map +0 -1
  451. package/es/components/Checkbox/variations/_view/base.js.map +0 -1
  452. package/es/components/Checkbox/variations/_view/base_x252cy.css +0 -1
  453. package/es/components/Radiobox/Radiobox.css +0 -16
  454. package/es/components/Radiobox/Radiobox.styles.js +0 -14
  455. package/es/components/Radiobox/Radiobox.styles.js.map +0 -1
  456. package/es/components/Radiobox/Radiobox.styles_1skfuon.css +0 -2
  457. package/es/components/Radiobox/Radiobox.tokens.js +0 -36
  458. package/es/components/Radiobox/Radiobox.tokens.js.map +0 -1
  459. package/es/components/Radiobox/variations/_disabled/base.js.map +0 -1
  460. package/es/components/Radiobox/variations/_disabled/base_6ae9j2.css +0 -1
  461. package/es/components/Radiobox/variations/_focused/base.js +0 -5
  462. package/es/components/Radiobox/variations/_focused/base.js.map +0 -1
  463. package/es/components/Radiobox/variations/_size/base.js.map +0 -1
  464. package/es/components/Radiobox/variations/_view/base.js +0 -5
  465. package/es/components/Radiobox/variations/_view/base.js.map +0 -1
  466. package/styled-components/cjs/components/Checkbox/Checkbox.styles.js +0 -33
  467. package/styled-components/cjs/components/Checkbox/Checkbox.tokens.js +0 -39
  468. package/styled-components/cjs/components/Checkbox/variations/_disabled/base.js +0 -10
  469. package/styled-components/cjs/components/Checkbox/variations/_focused/base.js +0 -32
  470. package/styled-components/cjs/components/Checkbox/variations/_view/base.js +0 -10
  471. package/styled-components/cjs/components/Checkbox/variations/_view/tokens.json +0 -1
  472. package/styled-components/cjs/components/Radiobox/Radiobox.styles.js +0 -19
  473. package/styled-components/cjs/components/Radiobox/Radiobox.tokens.js +0 -39
  474. package/styled-components/cjs/components/Radiobox/variations/_focused/base.js +0 -27
  475. package/styled-components/cjs/components/Radiobox/variations/_view/base.js +0 -9
  476. package/styled-components/es/components/Checkbox/Checkbox.styles.js +0 -25
  477. package/styled-components/es/components/Checkbox/Checkbox.tokens.js +0 -33
  478. package/styled-components/es/components/Checkbox/variations/_disabled/base.js +0 -4
  479. package/styled-components/es/components/Checkbox/variations/_focused/base.js +0 -27
  480. package/styled-components/es/components/Checkbox/variations/_view/base.js +0 -4
  481. package/styled-components/es/components/Checkbox/variations/_view/tokens.json +0 -1
  482. package/styled-components/es/components/Radiobox/Radiobox.styles.js +0 -12
  483. package/styled-components/es/components/Radiobox/Radiobox.tokens.js +0 -33
  484. package/styled-components/es/components/Radiobox/variations/_disabled/base.js +0 -3
  485. package/styled-components/es/components/Radiobox/variations/_focused/base.js +0 -21
  486. package/styled-components/es/components/Radiobox/variations/_view/base.js +0 -3
  487. package/types/components/Checkbox/Checkbox.styles.d.ts +0 -9
  488. package/types/components/Checkbox/Checkbox.styles.d.ts.map +0 -1
  489. package/types/components/Checkbox/Checkbox.tokens.d.ts +0 -34
  490. package/types/components/Checkbox/Checkbox.tokens.d.ts.map +0 -1
  491. package/types/components/Checkbox/Checkbox.types.d.ts +0 -29
  492. package/types/components/Checkbox/Checkbox.types.d.ts.map +0 -1
  493. package/types/components/Checkbox/variations/_disabled/base.d.ts.map +0 -1
  494. package/types/components/Checkbox/variations/_focused/base.d.ts +0 -6
  495. package/types/components/Checkbox/variations/_focused/base.d.ts.map +0 -1
  496. package/types/components/Checkbox/variations/_size/base.d.ts.map +0 -1
  497. package/types/components/Checkbox/variations/_view/base.d.ts.map +0 -1
  498. package/types/components/Radiobox/Radiobox.styles.d.ts +0 -4
  499. package/types/components/Radiobox/Radiobox.styles.d.ts.map +0 -1
  500. package/types/components/Radiobox/Radiobox.tokens.d.ts +0 -34
  501. package/types/components/Radiobox/Radiobox.tokens.d.ts.map +0 -1
  502. package/types/components/Radiobox/variations/_disabled/base.d.ts.map +0 -1
  503. package/types/components/Radiobox/variations/_focused/base.d.ts.map +0 -1
  504. package/types/components/Radiobox/variations/_size/base.d.ts.map +0 -1
  505. package/types/components/Radiobox/variations/_view/base.d.ts.map +0 -1
  506. /package/cjs/components/Checkbox/{variations/_size → _size}/base_x642ct.css +0 -0
  507. /package/cjs/components/Radiobox/{variations/_size → _size}/base_x642ct.css +0 -0
  508. /package/{es/components/Checkbox/variations/_size → cjs/components/Slider/variations/_disabled}/base_x642ct.css +0 -0
  509. /package/{es/components/Radiobox → cjs/components/Slider}/variations/_size/base_x642ct.css +0 -0
  510. /package/styled-components/cjs/components/Checkbox/{variations/_disabled → _disabled}/tokens.json +0 -0
  511. /package/styled-components/cjs/components/Checkbox/{variations/_focused → _focused}/tokens.json +0 -0
  512. /package/styled-components/cjs/components/Checkbox/{variations/_size → _size}/base.js +0 -0
  513. /package/styled-components/cjs/components/Checkbox/{variations/_size → _size}/tokens.json +0 -0
  514. /package/styled-components/cjs/components/Radiobox/{variations/_disabled → _disabled}/tokens.json +0 -0
  515. /package/styled-components/cjs/components/Radiobox/{variations/_focused → _focused}/tokens.json +0 -0
  516. /package/styled-components/cjs/components/Radiobox/{variations/_size → _size}/base.js +0 -0
  517. /package/styled-components/cjs/components/Radiobox/{variations/_size → _size}/tokens.json +0 -0
  518. /package/styled-components/cjs/components/Radiobox/{variations/_view → _view}/tokens.json +0 -0
  519. /package/styled-components/cjs/components/{Checkbox/Checkbox.types.js → Slider/Slider.types.js} +0 -0
  520. /package/styled-components/es/components/Checkbox/{variations/_disabled → _disabled}/tokens.json +0 -0
  521. /package/styled-components/es/components/Checkbox/{variations/_focused → _focused}/tokens.json +0 -0
  522. /package/styled-components/es/components/Checkbox/{variations/_size → _size}/base.js +0 -0
  523. /package/styled-components/es/components/Checkbox/{variations/_size → _size}/tokens.json +0 -0
  524. /package/styled-components/es/components/Radiobox/{variations/_disabled → _disabled}/tokens.json +0 -0
  525. /package/styled-components/es/components/Radiobox/{variations/_focused → _focused}/tokens.json +0 -0
  526. /package/styled-components/es/components/Radiobox/{variations/_size → _size}/base.js +0 -0
  527. /package/styled-components/es/components/Radiobox/{variations/_size → _size}/tokens.json +0 -0
  528. /package/styled-components/es/components/Radiobox/{variations/_view → _view}/tokens.json +0 -0
  529. /package/styled-components/es/components/{Checkbox/Checkbox.types.js → Slider/Slider.types.js} +0 -0
  530. /package/types/components/Checkbox/{variations/_disabled → _disabled}/base.d.ts +0 -0
  531. /package/types/components/Checkbox/{variations/_size → _focused}/base.d.ts +0 -0
  532. /package/types/components/Checkbox/{variations/_view → _size}/base.d.ts +0 -0
  533. /package/types/components/{Radiobox/variations/_disabled → Checkbox/_view}/base.d.ts +0 -0
  534. /package/types/components/Radiobox/{variations/_focused → _disabled}/base.d.ts +0 -0
  535. /package/types/components/Radiobox/{variations/_size → _focused}/base.d.ts +0 -0
  536. /package/types/components/Radiobox/{variations/_view → _size}/base.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/utils/index.ts"],"sourcesContent":["import { CSSProperties } from '@linaria/core';\n\nexport { extractTextFrom } from './extractTextFrom';\nexport { getSizeValueFromProp } from './getSizeValueFromProp';\nexport { IS_REACT_18, safeUseId } from './react';\nexport { isNumber } from './isNumber';\n\nexport const cx = (...classes: (string | undefined)[]) => classes.filter((classItem) => classItem).join(' ');\n\nexport const composableStyle = (s: TemplateStringsArray, ...expr: Array<string | number | CSSProperties>): string => {\n let res = '';\n for (let i = 0; i < Math.max(s.length, expr.length); ++i) {\n res += s[i] ?? '';\n res += expr[i] ?? '';\n }\n\n return res;\n};\n"],"names":["cx","_len","arguments","length","classes","Array","_key","filter","classItem","join","composableStyle","s","res","i","Math","max","_s$i","_ref","undefined"],"mappings":";;;;;;;AAOaA,IAAAA,EAAE,GAAG,SAALA,EAAEA,GAAA;AAAA,EAAA,KAAA,IAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAOC,OAAO,GAAAC,IAAAA,KAAA,CAAAJ,IAAA,GAAAK,IAAA,GAAA,CAAA,EAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,EAAA,EAAA;AAAPF,IAAAA,OAAO,CAAAE,IAAA,CAAAJ,GAAAA,SAAA,CAAAI,IAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,OAA6BF,OAAO,CAACG,MAAM,CAAC,UAACC,SAAS,EAAA;AAAA,IAAA,OAAKA,SAAS,CAAA;AAAA,GAAA,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAA;AAAA,EAAA;IAE/FC,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,CAAuB,EAA8D;EACjH,IAAIC,GAAG,GAAG,EAAE,CAAA;EACZ,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,IAAI,CAACC,GAAG,CAACJ,CAAC,CAACR,MAAM,EAAAD,SAAA,CAAAC,MAAA,IAAA,CAAA,GAAA,CAAA,GAAAD,SAAA,CAAAC,MAAA,GAAA,CAAa,CAAC,EAAE,EAAEU,CAAC,EAAE;IAAA,IAAAG,IAAA,EAAAC,IAAA,CAAA;AACtDL,IAAAA,GAAG,IAAAI,CAAAA,IAAA,GAAIL,CAAC,CAACE,CAAC,CAAC,MAAA,IAAA,IAAAG,IAAA,KAAA,KAAA,CAAA,GAAAA,IAAA,GAAI,EAAE,CAAA;IACjBJ,GAAG,IAAA,CAAAK,IAAA,GAASJ,CAAC,YAAAX,SAAA,CAAAC,MAAA,IAADU,CAAC,OAAAK,SAAA,GAAAhB,SAAA,CAADW,CAAC,mBAAAI,IAAA,KAAA,KAAA,CAAA,GAAAA,IAAA,GAAK,EAAE,CAAA;AACxB,GAAA;AAEA,EAAA,OAAOL,GAAG,CAAA;AACd;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/utils/index.ts"],"sourcesContent":["import { CSSProperties } from '@linaria/core';\n\nexport { canUseDOM } from './canUseDOM';\nexport { extractTextFrom } from './extractTextFrom';\nexport { getSizeValueFromProp } from './getSizeValueFromProp';\nexport { IS_REACT_18, safeUseId } from './react';\nexport { isNumber } from './isNumber';\n\nexport const cx = (...classes: (string | undefined)[]) => classes.filter((classItem) => classItem).join(' ');\n\nexport const composableStyle = (s: TemplateStringsArray, ...expr: Array<string | number | CSSProperties>): string => {\n let res = '';\n for (let i = 0; i < Math.max(s.length, expr.length); ++i) {\n res += s[i] ?? '';\n res += expr[i] ?? '';\n }\n\n return res;\n};\n"],"names":["cx","_len","arguments","length","classes","Array","_key","filter","classItem","join","composableStyle","s","res","i","Math","max","_s$i","_ref","undefined"],"mappings":";;;;;;;AAQaA,IAAAA,EAAE,GAAG,SAALA,EAAEA,GAAA;AAAA,EAAA,KAAA,IAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAOC,OAAO,GAAAC,IAAAA,KAAA,CAAAJ,IAAA,GAAAK,IAAA,GAAA,CAAA,EAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,EAAA,EAAA;AAAPF,IAAAA,OAAO,CAAAE,IAAA,CAAAJ,GAAAA,SAAA,CAAAI,IAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,OAA6BF,OAAO,CAACG,MAAM,CAAC,UAACC,SAAS,EAAA;AAAA,IAAA,OAAKA,SAAS,CAAA;AAAA,GAAA,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAA;AAAA,EAAA;IAE/FC,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,CAAuB,EAA8D;EACjH,IAAIC,GAAG,GAAG,EAAE,CAAA;EACZ,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,IAAI,CAACC,GAAG,CAACJ,CAAC,CAACR,MAAM,EAAAD,SAAA,CAAAC,MAAA,IAAA,CAAA,GAAA,CAAA,GAAAD,SAAA,CAAAC,MAAA,GAAA,CAAa,CAAC,EAAE,EAAEU,CAAC,EAAE;IAAA,IAAAG,IAAA,EAAAC,IAAA,CAAA;AACtDL,IAAAA,GAAG,IAAAI,CAAAA,IAAA,GAAIL,CAAC,CAACE,CAAC,CAAC,MAAA,IAAA,IAAAG,IAAA,KAAA,KAAA,CAAA,GAAAA,IAAA,GAAI,EAAE,CAAA;IACjBJ,GAAG,IAAA,CAAAK,IAAA,GAASJ,CAAC,YAAAX,SAAA,CAAAC,MAAA,IAADU,CAAC,OAAAK,SAAA,GAAAhB,SAAA,CAADW,CAAC,mBAAAI,IAAA,KAAA,KAAA,CAAA,GAAAA,IAAA,GAAK,EAAE,CAAA;AACxB,GAAA;AAEA,EAAA,OAAOL,GAAG,CAAA;AACd;;;;;;;"}
@@ -1,17 +1,48 @@
1
+ import './Checkbox_1q4l832.css';
1
2
  import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
3
  import React, { forwardRef, useRef, useEffect, useMemo } from 'react';
4
+ import { styled } from '@linaria/react';
3
5
  import { useForkRef, safeUseId, extractTextFrom } from '@salutejs/plasma-core';
4
6
  import { cx } from '../../utils/index.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';
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';
9
11
  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";
15
46
  var checkboxRoot = function checkboxRoot(Root) {
16
47
  return /*#__PURE__*/forwardRef(function (props, ref) {
17
48
  var size = props.size,
@@ -45,15 +76,15 @@ var checkboxRoot = function checkboxRoot(Root) {
45
76
  var isLabelAriaHidden = typeof label === 'string';
46
77
  var canFocused = focused ? 0 : -1;
47
78
  var hasContent = label || description;
48
- var singleLineClass = singleLine ? classes.singleLine : undefined;
49
- var onlyDescriptionClass = !label && description ? classes.onlyDescription : undefined;
79
+ var singleLineClass = singleLine ? 'single-line' : undefined;
80
+ var resetMargins = !hasContent ? 'reset-margins' : undefined;
50
81
  return /*#__PURE__*/React.createElement(Root, {
51
82
  view: view,
52
83
  size: size,
53
84
  disabled: disabled,
54
85
  focused: focused,
55
86
  style: style,
56
- className: className,
87
+ className: cx(className, resetMargins),
57
88
  tabIndex: -1
58
89
  }, /*#__PURE__*/React.createElement(StyledInput, _extends({}, rest, {
59
90
  id: checkboxId,
@@ -66,7 +97,7 @@ var checkboxRoot = function checkboxRoot(Root) {
66
97
  })), /*#__PURE__*/React.createElement(StyledContentWrapper, {
67
98
  htmlFor: checkboxId
68
99
  }, /*#__PURE__*/React.createElement(StyledTrigger, {
69
- className: classes.checkboxTrigger
100
+ className: cx('checkbox-trigger', resetMargins)
70
101
  }, indeterminate ? _Indeterminate || (_Indeterminate = /*#__PURE__*/React.createElement(Indeterminate, null)) : _Done || (_Done = /*#__PURE__*/React.createElement(Done, null))), hasContent && /*#__PURE__*/React.createElement(StyledContent, {
71
102
  className: singleLineClass
72
103
  }, label && /*#__PURE__*/React.createElement(StyledLabel, {
@@ -74,7 +105,7 @@ var checkboxRoot = function checkboxRoot(Root) {
74
105
  id: uniqLabelId,
75
106
  "aria-hidden": isLabelAriaHidden
76
107
  }, label), description && /*#__PURE__*/React.createElement(StyledDescription, {
77
- className: cx(singleLineClass, onlyDescriptionClass),
108
+ className: singleLineClass,
78
109
  id: uniqDescriptionId
79
110
  }, description))));
80
111
  });
@@ -104,5 +135,5 @@ var checkboxConfig = {
104
135
  }
105
136
  };
106
137
 
107
- export { checkboxConfig, checkboxRoot };
138
+ export { StyledContent, StyledContentWrapper, StyledDescription, StyledInput, StyledLabel, StyledTrigger, checkboxConfig, checkboxRoot };
108
139
  //# 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 { 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,IA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AAAA,iBAAAA;KAEZ3B,EAAAA,KACQ,CAChB,EACAC,WAAW,iBACRkC,KAAA,CAAAC,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;;;;"}
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","viewCSS","disabledCSS","focusedCSS","defaults"],"mappings":";;;;;;;;;;;;;AAgBO,IAAMA,WAAW,gBAAGC,MAAM,CA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ACFmD,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;;;;"}
@@ -0,0 +1,7 @@
1
+ .so9l3q2{position:absolute;width:1px;height:1px;overflow:hidden;-webkit-clip:rect(0 0 0 0);clip:rect(0 0 0 0);}.so9l3q2:focus{outline:0 none;}
2
+ .s1o5tixe{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 .s1o5tixe 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 .s1o5tixe div{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}
3
+ .s136y9ve{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;}
4
+ .s8lcvtu{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);}
5
+ .s1dif9mh{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);}
6
+ .s1v492xg{margin-top:0.25rem;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);}
7
+ .b1kn3qi9{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;}.b1kn3qi9 .single-line{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.b1kn3qi9.reset-margins{margin:0;}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { tokens } from './Checkbox.tokens.js';
3
2
 
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(".concat(tokens.triggerSize, ")")
14
+ width: 'var(--plasma-checkbox-trigger-size)'
15
15
  }
16
- }, /*#__PURE__*/React.createElement("path", {
17
- fill: "var(".concat(tokens.iconColor, ")"),
16
+ }, _path || (_path = /*#__PURE__*/React.createElement("path", {
17
+ fill: "var(--plasma-checkbox-icon-color)",
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(".concat(tokens.triggerSize, ")")
31
+ width: 'var(--plasma-checkbox-trigger-size)'
32
32
  }
33
- }, /*#__PURE__*/React.createElement("path", {
33
+ }, _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
34
34
  strokeLinecap: "round",
35
35
  strokeWidth: "2",
36
- stroke: "var(".concat(tokens.iconColor, ")"),
36
+ stroke: "var(--plasma-checkbox-icon-color)",
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\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
+ {"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,5 +1,5 @@
1
- import './base_6ae9j2.css';
2
- var base = "bmkf7xj";
1
+ import './base_fyu17z.css';
2
+ var base = "b7dgytu";
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/_disabled/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css`\n input:disabled + label {\n opacity: var(--plasma-checkbox-disabled-opacity);\n }\n\n input:disabled + label {\n cursor: not-allowed;\n }\n`;\n"],"names":["base"],"mappings":"AAEO,IAAMA,IAAI,GAQhB;;;;"}
@@ -0,0 +1 @@
1
+ .b7dgytu input:disabled + label{opacity:var(--plasma-checkbox-disabled-opacity);}.b7dgytu input:disabled + label{cursor:not-allowed;}
@@ -1,5 +1,5 @@
1
- import './base_1krdtt6.css';
2
- var base = "bxbqqc3";
1
+ import './base_po5iiu.css';
2
+ var base = "brrdlt4";
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/_focused/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { addFocus } from '../../../mixins';\n\nexport const base = css`\n .checkbox-trigger {\n ${addFocus({\n outlineOffset: '0',\n outlineSize: '0.125rem',\n outlineRadius: 'var(--plasma-checkbox-trigger-border-radius)',\n outlineColor: 'transparent',\n })}\n }\n\n input[data-focus-visible-added] + label .checkbox-trigger {\n border-color: transparent;\n ${addFocus({\n outlineOffset: '-0.188rem',\n outlineSize: '0.125rem',\n outlineRadius: 'var(--plasma-checkbox-trigger-border-radius)',\n outlineColor: 'var(--plasma-checkbox-focus-color)',\n customFocusRules: `\n &::before {\n box-shadow: 0 0 0 0.125rem var(--plasma-checkbox-focus-color);\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 .checkbox-trigger {\n ${addFocus({\n outlineOffset: '-0.125rem',\n outlineSize: '0.063rem',\n outlineRadius: 'calc(var(--plasma-checkbox-trigger-border-radius) + 0.125rem)',\n outlineColor: 'var(--plasma-checkbox-focus-color)',\n customFocusRules: `\n &::before {\n box-shadow: 0 0 0 0.063rem var(--plasma-checkbox-focus-color);\n }\n `,\n })}\n }\n`;\n"],"names":["base"],"mappings":"AAIO,IAAMA,IAAI,GAuChB;;;;"}
@@ -0,0 +1 @@
1
+ .brrdlt4 .checkbox-trigger{position:relative;}.brrdlt4 .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;}.brrdlt4 .checkbox-trigger.focus-visible:focus::before,.brrdlt4 .checkbox-trigger[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem transparent;}.brrdlt4 input[data-focus-visible-added] + label .checkbox-trigger{border-color:transparent;position:relative;}.brrdlt4 input[data-focus-visible-added] + label .checkbox-trigger::before{content:'';position:absolute;top:-0.188rem;left:-0.188rem;right:-0.188rem;bottom:-0.188rem;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;}.brrdlt4 input[data-focus-visible-added] + label .checkbox-trigger::before{box-shadow:0 0 0 0.125rem var(--plasma-checkbox-focus-color);}.brrdlt4 input[data-focus-visible-added]:checked + label .checkbox-trigger,.brrdlt4 input[type='checkbox'][data-focus-visible-added]:indeterminate + label .checkbox-trigger{position:relative;}.brrdlt4 input[data-focus-visible-added]:checked + label .checkbox-trigger::before,.brrdlt4 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;}.brrdlt4 input[data-focus-visible-added]:checked + label .checkbox-trigger::before,.brrdlt4 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 = "b1eflyxe";
2
+ var base = "b17b3eb7";
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/_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_x252cy.css';
2
- var base = "b17hdes8";
1
+ import './base_1vqr3f.css';
2
+ var base = "bjda290";
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/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css`\n input[type='checkbox']:indeterminate + label .checkbox-trigger {\n border: none;\n background: var(--plasma-checkbox-fill-color);\n border-color: var(--plasma-checkbox-fill-color);\n }\n\n input:checked + label .checkbox-trigger {\n border: none;\n background: var(--plasma-checkbox-fill-color);\n border-color: var(--plasma-checkbox-fill-color);\n }\n`;\n"],"names":["base"],"mappings":"AAEO,IAAMA,IAAI,GAYhB;;;;"}
@@ -0,0 +1 @@
1
+ .bjda290 input[type='checkbox']:indeterminate + label .checkbox-trigger{border:none;background:var(--plasma-checkbox-fill-color);border-color:var(--plasma-checkbox-fill-color);}.bjda290 input:checked + label .checkbox-trigger{border:none;background:var(--plasma-checkbox-fill-color);border-color:var(--plasma-checkbox-fill-color);}
@@ -1,6 +1,7 @@
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';
4
5
 
5
6
  var useFocusController = function useFocusController(_ref) {
6
7
  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,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,IAAM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KAAK,EAAE,CAAA;GAC5B,CAAA;AAED,EAAA,IAAMe,YAAY,GAAG,SAAfA,YAAYA,GAAS;IAAA,IAAAC,oBAAA,EAAAC,oBAAA,CAAA;AACvB,IAAA,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;;;;"}
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,GAAA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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,17 +1,26 @@
1
+ import './Radiobox_1ri2eqv.css';
1
2
  import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
3
  import React, { forwardRef, useMemo } from 'react';
4
+ import { styled } from '@linaria/react';
3
5
  import { safeUseId, extractTextFrom } from '@salutejs/plasma-core';
4
- import { StyledInput, StyledContentWrapper, StyledTrigger, StyledContent, StyledLabel, StyledDescription } from '../Checkbox/Checkbox.styles.js';
6
+ import { StyledInput, StyledContentWrapper, StyledTrigger, StyledContent, StyledLabel, StyledDescription } from '../Checkbox/Checkbox.js';
5
7
  import { cx } from '../../utils/index.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';
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';
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";
15
24
  var radioboxRoot = function radioboxRoot(Root) {
16
25
  return /*#__PURE__*/forwardRef(function (props, ref) {
17
26
  var size = props.size,
@@ -37,15 +46,15 @@ var radioboxRoot = function radioboxRoot(Root) {
37
46
  var isLabelAriaHidden = typeof label === 'string';
38
47
  var canFocused = focused ? 0 : -1;
39
48
  var hasContent = label || description;
40
- var singleLineClass = singleLine ? classes.singleLine : undefined;
41
- var onlyDescriptionClass = !label && description ? classes.onlyDescription : undefined;
49
+ var singleLineClass = singleLine ? 'single-line' : undefined;
50
+ var resetMargins = !hasContent ? 'reset-margins' : undefined;
42
51
  return /*#__PURE__*/React.createElement(Root, {
43
52
  view: view,
44
53
  size: size,
45
54
  disabled: disabled,
46
55
  focused: focused,
47
56
  style: style,
48
- className: className,
57
+ className: cx(className, resetMargins),
49
58
  tabIndex: -1
50
59
  }, /*#__PURE__*/React.createElement(StyledInput, _extends({}, rest, {
51
60
  id: radioboxId,
@@ -58,11 +67,11 @@ var radioboxRoot = function radioboxRoot(Root) {
58
67
  })), /*#__PURE__*/React.createElement(StyledContentWrapper, {
59
68
  htmlFor: radioboxId
60
69
  }, /*#__PURE__*/React.createElement(StyledTrigger, {
61
- className: classes.radioboxTrigger
70
+ className: cx('radiobox-trigger', resetMargins)
62
71
  }, _StyledEllipse || (_StyledEllipse = /*#__PURE__*/React.createElement(StyledEllipse, null))), hasContent && /*#__PURE__*/React.createElement(StyledContent, {
63
72
  className: singleLineClass
64
73
  }, label && /*#__PURE__*/React.createElement(StyledLabel, {
65
- className: cx(singleLineClass, onlyDescriptionClass),
74
+ className: singleLineClass,
66
75
  id: uniqLabelId,
67
76
  "aria-hidden": isLabelAriaHidden
68
77
  }, label), description && /*#__PURE__*/React.createElement(StyledDescription, {
@@ -1 +1 @@
1
- {"version":3,"file":"Radiobox.js","sources":["../../../src/components/Radiobox/Radiobox.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\nimport { safeUseId, extractTextFrom } from '@salutejs/plasma-core';\nimport type { InputHTMLAttributes } from '@salutejs/plasma-core';\n\nimport type { Filter, RootProps } from '../../engines/types';\nimport {\n StyledContentWrapper,\n StyledDescription,\n StyledInput,\n StyledLabel,\n StyledContent,\n StyledTrigger,\n} from '../Checkbox/Checkbox.styles';\nimport { BaseboxProps } from '../Checkbox/Checkbox.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 { StyledEllipse, base } from './Radiobox.styles';\nimport { classes } from './Radiobox.tokens';\n\ntype RadioboxProps = Filter<InputHTMLAttributes<HTMLInputElement>, 'size'> & Omit<BaseboxProps, 'indeterminate'>;\n\nexport const radioboxRoot = (Root: RootProps<HTMLInputElement, RadioboxProps>) =>\n forwardRef<HTMLInputElement, RadioboxProps>((props, ref) => {\n const {\n size,\n view,\n focused,\n disabled,\n id,\n label,\n description,\n style,\n className,\n singleLine = false,\n 'aria-label': ariaLabelExternal,\n ...rest\n } = props;\n\n const uniqId = safeUseId();\n const uniqLabelId = `label-${uniqId}`;\n const uniqDescriptionId = `description-${uniqId}`;\n const radioboxId = 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={radioboxId}\n ref={ref}\n type=\"radio\"\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={uniqDescriptionId}\n tabIndex={canFocused}\n />\n <StyledContentWrapper htmlFor={radioboxId}>\n <StyledTrigger className={classes.radioboxTrigger}>\n <StyledEllipse />\n </StyledTrigger>\n {hasContent && (\n <StyledContent className={singleLineClass}>\n {label && (\n <StyledLabel\n className={cx(singleLineClass, onlyDescriptionClass)}\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 radioboxConfig = {\n name: 'Radiobox',\n tag: 'div',\n layout: radioboxRoot,\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":["radioboxRoot","Root","forwardRef","props","ref","size","view","focused","disabled","id","label","description","style","className","_props$singleLine","singleLine","ariaLabelExternal","rest","_objectWithoutProperties","_excluded","uniqId","safeUseId","uniqLabelId","concat","uniqDescriptionId","radioboxId","ariaLabel","useMemo","extractTextFrom","isLabelAriaHidden","canFocused","hasContent","singleLineClass","classes","undefined","onlyDescriptionClass","onlyDescription","React","createElement","tabIndex","StyledInput","_extends","type","StyledContentWrapper","htmlFor","StyledTrigger","radioboxTrigger","_StyledEllipse","StyledEllipse","StyledContent","StyledLabel","cx","StyledDescription","radioboxConfig","name","tag","layout","base","variations","css","sizeCSS","viewCSS","disabledCSS","focusedCSS","defaults"],"mappings":";;;;;;;;;;;;;;IAyBaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAAgD,EAAA;AAAA,EAAA,oBACzEC,UAAU,CAAkC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACxD,IAAA,IACIC,IAAI,GAYJF,KAAK,C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AAAC,aAAA,CAACY,WAAW,EAAA;AACRrC,MAAAA,SAAS,EAAEsC,EAAE,CAACnB,eAAe,EAAEG,oBAAoB,CAAE;AACrD1B,MAAAA,EAAE,EAAEa,WAAY;MAChB,aAAaO,EAAAA,iBAAAA;KAEZnB,EAAAA,KACQ,CAChB,EACAC,WAAW,iBACR0B,KAAA,CAAAC,aAAA,CAACc,iBAAiB,EAAA;AAACvC,MAAAA,SAAS,EAAEmB,eAAgB;AAACvB,MAAAA,EAAE,EAAEe,iBAAAA;AAAkB,KAAA,EAChEb,WACc,CAEZ,CAED,CACpB,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAM0C,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAExD,YAAY;AACpByD,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACRrD,IAAAA,IAAI,EAAE;AACFsD,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDtD,IAAAA,IAAI,EAAE;AACFqD,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDrD,IAAAA,QAAQ,EAAE;AACNmD,MAAAA,GAAG,EAAEG,MAAAA;KACR;AACDvD,IAAAA,OAAO,EAAE;AACLoD,MAAAA,GAAG,EAAEI,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN3D,IAAAA,IAAI,EAAE,GAAG;AACTC,IAAAA,IAAI,EAAE,QAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Radiobox.js","sources":["../../../src/components/Radiobox/Radiobox.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\nimport { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\nimport { safeUseId, 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 {\n StyledContentWrapper,\n StyledDescription,\n StyledInput,\n StyledLabel,\n StyledContent,\n StyledTrigger,\n BaseboxProps,\n} from '../Checkbox/Checkbox';\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';\n\n// NOTE: Необходимое переопределение токенов из компонента Checkbox т.к. используются его части\nconst mappingOverride = `\n --plasma-checkbox-label-font-family: var(--plasma-radiobox-label-font-family);\n --plasma-checkbox-label-font-size: var(--plasma-radiobox-label-font-size);\n --plasma-checkbox-label-font-style: var(--plasma-radiobox-label-font-style);\n --plasma-checkbox-label-font-weight: var(--plasma-radiobox-label-font-weight);\n --plasma-checkbox-label-letter-spacing: var(--plasma-radiobox-label-letter-spacing);\n --plasma-checkbox-label-line-height: var(--plasma-radiobox-label-line-height);\n --plasma-checkbox-description-font-family: var(--plasma-radiobox-description-font-family);\n --plasma-checkbox-description-font-size: var(--plasma-radiobox-description-font-size);\n --plasma-checkbox-description-font-style: var(--plasma-radiobox-description-font-style);\n --plasma-checkbox-description-font-weight: var(--plasma-radiobox-description-font-weight);\n --plasma-checkbox-description-letter-spacing: var(--plasma-radiobox-description-letter-spacing);\n --plasma-checkbox-description-line-height: var(--plasma-radiobox-description-line-height);\n --plasma-checkbox-fill-color: var(--plasma-radiobox-fill-color);\n --plasma-checkbox-description-color: var(--plasma-radiobox-description-color);\n --plasma-checkbox-trigger-border-color: var(--plasma-radiobox-trigger-border-color);\n --plasma-checkbox-content-top-offset: var(--plasma-radiobox-content-top-offset);\n --plasma-checkbox-content-left-offset: var(--plasma-radiobox-content-left-offset);\n --plasma-checkbox-trigger-size: var(--plasma-radiobox-trigger-size);\n --plasma-checkbox-trigger-border-radius: var(--plasma-radiobox-trigger-border-radius);\n --plasma-checkbox-trigger-margin: var(--plasma-radiobox-trigger-margin); \n`;\n\nconst StyledEllipse = styled.div`\n width: var(--plasma-radiobox-ellipse-size);\n height: var(--plasma-radiobox-ellipse-size);\n border-radius: var(--plasma-radiobox-ellipse-size);\n\n background-color: var(--plasma-radiobox-ellipse-color);\n transition: transform 0.3s ease-in-out;\n transform: scale(0);\n\n input:checked + label & {\n transform: scale(1);\n }\n`;\n\nconst base = css`\n ${mappingOverride};\n\n .single-line {\n ${applyEllipsis()};\n }\n\n margin: var(--plasma-radiobox-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\ntype RadioboxProps = Filter<InputHTMLAttributes<HTMLInputElement>, 'size'> & Omit<BaseboxProps, 'indeterminate'>;\n\nexport const radioboxRoot = (Root: RootProps<HTMLInputElement, RadioboxProps>) =>\n forwardRef<HTMLInputElement, RadioboxProps>((props, ref) => {\n const {\n size,\n view,\n focused,\n disabled,\n id,\n label,\n description,\n style,\n className,\n singleLine = false,\n 'aria-label': ariaLabelExternal,\n ...rest\n } = props;\n\n const uniqId = safeUseId();\n const uniqLabelId = `label-${uniqId}`;\n const uniqDescriptionId = `description-${uniqId}`;\n const radioboxId = 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={radioboxId}\n ref={ref}\n type=\"radio\"\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={uniqDescriptionId}\n tabIndex={canFocused}\n />\n <StyledContentWrapper htmlFor={radioboxId}>\n <StyledTrigger className={cx('radiobox-trigger', resetMargins)}>\n <StyledEllipse />\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 radioboxConfig = {\n name: 'Radiobox',\n tag: 'div',\n layout: radioboxRoot,\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":["StyledEllipse","styled","name","class","propsAsIs","base","radioboxRoot","Root","forwardRef","props","ref","size","view","focused","disabled","id","label","description","style","className","_props$singleLine","singleLine","ariaLabelExternal","rest","_excluded","uniqId","safeUseId","uniqLabelId","concat","uniqDescriptionId","radioboxId","ariaLabel","useMemo","extractTextFrom","isLabelAriaHidden","canFocused","hasContent","singleLineClass","undefined","resetMargins","React","createElement","cx","tabIndex","StyledInput","_extends","type","StyledContentWrapper","htmlFor","StyledTrigger","_StyledEllipse","StyledContent","StyledLabel","StyledDescription","radioboxConfig","tag","layout","variations","css","sizeCSS","viewCSS","disabledCSS","focusedCSS","defaults"],"mappings":";;;;;;;;;;;;;;AAwBA;;AAwBA,IAAMA,aAAa,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAY3B,CAAA,CAAA;AAED,IAAMC,IAAI,GAmBT,UAAA,CAAA;IAIYC,YAAY,GAAGA,SAAfA,YAAYA,CAAIC,IAAgD,EAAA;AAAA,EAAA,oBACzEC,UAAU,CAAkC,UA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CAACU,aAAa,EAAA;AAAChC,MAAAA,SAAS,EAAEkB,eAAAA;AAAgB,KAAA,EACrCrB,KAAK,iBACFwB,KAAA,CAAAC,aAAA,CAACW,WAAW,EAAA;AACRjC,MAAAA,SAAS,EAAEkB,eAAgB;AAC3BtB,MAAAA,EAAE,EAAEY,WAAY;MAChB,aAAaO,EAAAA,iBAAAA;KAEZlB,EAAAA,KACQ,CAChB,EACAC,WAAW,iBACRuB,KAAA,CAAAC,aAAA,CAACY,iBAAiB,EAAA;AAAClC,MAAAA,SAAS,EAAEkB,eAAgB;AAACtB,MAAAA,EAAE,EAAEc,iBAAAA;AAAkB,KAAA,EAChEZ,WACc,CAEZ,CAED,CACpB,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMqC,cAAc,GAAG;AAC1BpD,EAAAA,IAAI,EAAE,UAAU;AAChBqD,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElD,YAAY;AACpBD,EAAAA,IAAI,EAAJA,IAAI;AACJoD,EAAAA,UAAU,EAAE;AACR9C,IAAAA,IAAI,EAAE;AACF+C,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACD/C,IAAAA,IAAI,EAAE;AACF8C,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACD9C,IAAAA,QAAQ,EAAE;AACN4C,MAAAA,GAAG,EAAEG,MAAAA;KACR;AACDhD,IAAAA,OAAO,EAAE;AACL6C,MAAAA,GAAG,EAAEI,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNpD,IAAAA,IAAI,EAAE,GAAG;AACTC,IAAAA,IAAI,EAAE,QAAA;AACV,GAAA;AACJ;;;;"}
@@ -0,0 +1,2 @@
1
+ .sv18cw2{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 .sv18cw2{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}
2
+ .b1ls92xy{--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-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;}.b1ls92xy .single-line{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.b1ls92xy.reset-margins{margin:0;}
@@ -0,0 +1,5 @@
1
+ import './base_1jca5bk.css';
2
+ var base = "bya1zrj";
3
+
4
+ export { base };
5
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../src/components/Radiobox/_disabled/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css`\n input:disabled + label {\n opacity: var(--plasma-radiobox-disabled-opacity);\n }\n\n input:disabled + label {\n cursor: not-allowed;\n }\n`;\n"],"names":["base"],"mappings":"AAEO,IAAMA,IAAI,GAQhB;;;;"}
@@ -0,0 +1 @@
1
+ .bya1zrj input:disabled + label{opacity:var(--plasma-radiobox-disabled-opacity);}.bya1zrj input:disabled + label{cursor:not-allowed;}
@@ -0,0 +1,5 @@
1
+ import './base_1nruwxa.css';
2
+ var base = "bp7016u";
3
+
4
+ export { base };
5
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../src/components/Radiobox/_focused/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { addFocus } from '../../../mixins';\n\nexport const base = css`\n .radiobox-trigger {\n ${addFocus({\n outlineOffset: '0',\n outlineSize: '0.125rem',\n outlineRadius: 'var(--plasma-radiobox-trigger-border-radius)',\n outlineColor: 'transparent',\n })}\n }\n\n input[data-focus-visible-added] + label .radiobox-trigger {\n border-color: transparent;\n ${addFocus({\n outlineOffset: '-0.188rem',\n outlineSize: '0.125rem',\n outlineRadius: 'var(--plasma-radiobox-trigger-border-radius)',\n outlineColor: 'var(--plasma-radiobox-focus-color)',\n customFocusRules: `\n &::before {\n box-shadow: 0 0 0 0.125rem var(--plasma-radiobox-focus-color);\n }\n `,\n })}\n }\n\n input[data-focus-visible-added]:checked + label .radiobox-trigger {\n ${addFocus({\n outlineOffset: '-0.125rem',\n outlineSize: '0.063rem',\n outlineRadius: 'calc(var(--plasma-radiobox-trigger-border-radius) + 0.125rem)',\n outlineColor: 'var(--plasma-radiobox-focus-color)',\n customFocusRules: `\n &::before {\n box-shadow: 0 0 0 0.063rem var(--plasma-radiobox-focus-color);\n }\n `,\n })}\n }\n`;\n"],"names":["base"],"mappings":"AAIO,IAAMA,IAAI,GAsChB;;;;"}
@@ -1 +1 @@
1
- .buxu4te .radiobox-trigger{position:relative;}.buxu4te .radiobox-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-radiobox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.buxu4te .radiobox-trigger.focus-visible:focus::before,.buxu4te .radiobox-trigger[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem transparent;}.buxu4te input[data-focus-visible-added] + label .radiobox-trigger{border-color:transparent;position:relative;}.buxu4te input[data-focus-visible-added] + label .radiobox-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-radiobox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.buxu4te input[data-focus-visible-added] + label .radiobox-trigger::before{box-shadow:0 0 0 0.125rem var(--plasma-radiobox-focus-color);}.buxu4te input[data-focus-visible-added]:checked + label .radiobox-trigger{position:relative;}.buxu4te input[data-focus-visible-added]:checked + label .radiobox-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-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;}.buxu4te input[data-focus-visible-added]:checked + label .radiobox-trigger::before{box-shadow:0 0 0 0.063rem var(--plasma-radiobox-focus-color);}
1
+ .bp7016u .radiobox-trigger{position:relative;}.bp7016u .radiobox-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-radiobox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.bp7016u .radiobox-trigger.focus-visible:focus::before,.bp7016u .radiobox-trigger[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem transparent;}.bp7016u input[data-focus-visible-added] + label .radiobox-trigger{border-color:transparent;position:relative;}.bp7016u input[data-focus-visible-added] + label .radiobox-trigger::before{content:'';position:absolute;top:-0.188rem;left:-0.188rem;right:-0.188rem;bottom:-0.188rem;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;}.bp7016u input[data-focus-visible-added] + label .radiobox-trigger::before{box-shadow:0 0 0 0.125rem var(--plasma-radiobox-focus-color);}.bp7016u input[data-focus-visible-added]:checked + label .radiobox-trigger{position:relative;}.bp7016u input[data-focus-visible-added]:checked + label .radiobox-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-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;}.bp7016u input[data-focus-visible-added]:checked + label .radiobox-trigger::before{box-shadow:0 0 0 0.063rem var(--plasma-radiobox-focus-color);}
@@ -1,5 +1,5 @@
1
1
  import './base_x642ct.css';
2
- var base = "b1pmvrpn";
2
+ var base = "b1rxty3y";
3
3
 
4
4
  export { base };
5
5
  //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../src/components/Radiobox/_size/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":"AAEO,IAAMA,IAAI,GAAQ;;;;"}
@@ -0,0 +1,5 @@
1
+ import './base_wj0ueq.css';
2
+ var base = "b1lfwhkj";
3
+
4
+ export { base };
5
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../src/components/Radiobox/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css`\n input:checked + label .radiobox-trigger {\n border: none;\n background: var(--plasma-radiobox-fill-color);\n border-color: var(--plasma-radiobox-fill-color);\n }\n`;\n"],"names":["base"],"mappings":"AAEO,IAAMA,IAAI,GAMhB;;;;"}
@@ -1 +1 @@
1
- .b1yt66an input:checked + label .radiobox-trigger{border:none;background:var(--plasma-radiobox-fill-color);border-color:var(--plasma-radiobox-fill-color);}
1
+ .b1lfwhkj input:checked + label .radiobox-trigger{border:none;background:var(--plasma-radiobox-fill-color);border-color:var(--plasma-radiobox-fill-color);}