@salutejs/plasma-new-hope 0.197.0-canary.1588.11972699441.0 → 0.197.1-canary.1569.11973386056.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. package/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  2. package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  3. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  4. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  5. package/cjs/components/Calendar/store/reducer.js +2 -2
  6. package/cjs/components/Calendar/store/reducer.js.map +1 -1
  7. package/cjs/components/Switch/Switch.css +2 -2
  8. package/cjs/components/Switch/Switch.tokens.js +9 -7
  9. package/cjs/components/Switch/Switch.tokens.js.map +1 -1
  10. package/cjs/components/Switch/_toggleSize/base.js +1 -1
  11. package/cjs/components/Switch/_toggleSize/base.js.map +1 -1
  12. package/cjs/components/Switch/_toggleSize/base_1e2ou53.css +1 -0
  13. package/cjs/components/Switch/_view/base.js +1 -1
  14. package/{es/components/Switch/_view/base_15atbyp.css → cjs/components/Switch/_view/base_qbpw2g.css} +1 -1
  15. package/cjs/components/Typography/Body/Body.css +1 -1
  16. package/cjs/components/Typography/Old/Button/Button.css +1 -1
  17. package/cjs/components/Typography/Old/Paragraph/Paragraph.css +1 -1
  18. package/cjs/components/Typography/Old/Paragraph/Paragraph.styles.js +1 -1
  19. package/cjs/components/Typography/Old/Paragraph/Paragraph.styles.js.map +1 -1
  20. package/{es/components/Typography/Old/Paragraph/Paragraph.styles_f6q9s8.css → cjs/components/Typography/Old/Paragraph/Paragraph.styles_179bahu.css} +1 -1
  21. package/cjs/components/Typography/Old/Subtitle/Subtitle.css +1 -1
  22. package/cjs/components/Typography/Old/Subtitle/Subtitle.js +1 -7
  23. package/cjs/components/Typography/Old/Subtitle/Subtitle.js.map +1 -1
  24. package/cjs/components/Typography/Old/Subtitle/Subtitle.styles.js +1 -1
  25. package/cjs/components/Typography/Old/Subtitle/Subtitle.styles.js.map +1 -1
  26. package/{es/components/Typography/Old/Subtitle/Subtitle.styles_g6d0r2.css → cjs/components/Typography/Old/Subtitle/Subtitle.styles_1plleej.css} +1 -1
  27. package/cjs/components/Typography/Old/TypographyOld.js +2 -4
  28. package/cjs/components/Typography/Old/TypographyOld.js.map +1 -1
  29. package/cjs/components/Typography/Old/TypographyOld.styles.js +1 -1
  30. package/cjs/components/Typography/Old/TypographyOld.styles.js.map +1 -1
  31. package/cjs/components/Typography/Old/{TypographyOld.styles_168abbx.css → TypographyOld.styles_17w0rtq.css} +1 -1
  32. package/cjs/components/Typography/Old/Underline/Underline.css +1 -1
  33. package/cjs/components/Typography/Old/Underline/Underline.styles.js +1 -1
  34. package/cjs/components/Typography/Old/Underline/Underline.styles.js.map +1 -1
  35. package/cjs/components/Typography/Old/Underline/{Underline.styles_1x2vb5e.css → Underline.styles_vsz834.css} +1 -1
  36. package/cjs/components/Typography/Typography.js +2 -4
  37. package/cjs/components/Typography/Typography.js.map +1 -1
  38. package/cjs/components/Typography/Typography.styles.js +1 -1
  39. package/cjs/components/Typography/Typography.styles.js.map +1 -1
  40. package/cjs/components/Typography/{Typography.styles_fa07dt.css → Typography.styles_6mr47g.css} +1 -1
  41. package/cjs/components/Typography/tokens.js +0 -1
  42. package/cjs/components/Typography/tokens.js.map +1 -1
  43. package/cjs/index.css +7 -7
  44. package/emotion/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  45. package/emotion/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  46. package/emotion/cjs/components/Calendar/store/reducer.js +2 -2
  47. package/emotion/cjs/components/Switch/Switch.tokens.js +9 -7
  48. package/emotion/cjs/components/Switch/_toggleSize/base.js +1 -1
  49. package/emotion/cjs/components/Typography/Old/Paragraph/Paragraph.styles.js +1 -1
  50. package/emotion/cjs/components/Typography/Old/Subtitle/Subtitle.js +1 -7
  51. package/emotion/cjs/components/Typography/Old/Subtitle/Subtitle.styles.js +1 -1
  52. package/emotion/cjs/components/Typography/Old/TypographyOld.js +2 -4
  53. package/emotion/cjs/components/Typography/Old/TypographyOld.styles.js +1 -1
  54. package/emotion/cjs/components/Typography/Old/Underline/Underline.styles.js +1 -1
  55. package/emotion/cjs/components/Typography/Typography.js +2 -4
  56. package/emotion/cjs/components/Typography/Typography.styles.js +1 -1
  57. package/emotion/cjs/components/Typography/Typography.template-doc.mdx +0 -4
  58. package/emotion/cjs/components/Typography/tokens.js +0 -1
  59. package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.config.js +8 -8
  60. package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.outline.config.js +8 -8
  61. package/emotion/cjs/examples/plasma_web/components/Switch/Switch.config.js +8 -8
  62. package/emotion/cjs/examples/plasma_web/components/Switch/Switch.outline.config.js +8 -8
  63. package/emotion/cjs/examples/typograpy/components/Body/Body.stories.tsx +1 -9
  64. package/emotion/cjs/examples/typograpy/components/Dspl/Dspl.stories.tsx +1 -9
  65. package/emotion/cjs/examples/typograpy/components/Heading/Heading.stories.tsx +1 -9
  66. package/emotion/cjs/examples/typograpy/components/Old/Body/Body.stories.tsx +1 -9
  67. package/emotion/cjs/examples/typograpy/components/Old/Button/Button.stories.tsx +1 -9
  68. package/emotion/cjs/examples/typograpy/components/Old/Caption/Caption.stories.tsx +1 -9
  69. package/emotion/cjs/examples/typograpy/components/Old/Display/Display.stories.tsx +1 -9
  70. package/emotion/cjs/examples/typograpy/components/Old/Footnote/Footnote.stories.tsx +1 -9
  71. package/emotion/cjs/examples/typograpy/components/Old/Headline/Headline.stories.tsx +1 -9
  72. package/emotion/cjs/examples/typograpy/components/Old/Paragraph/Paragraph.stories.tsx +1 -9
  73. package/emotion/cjs/examples/typograpy/components/Old/Subtitle/Subtitle.stories.tsx +1 -11
  74. package/emotion/cjs/examples/typograpy/components/Old/Underline/Underline.stories.tsx +1 -9
  75. package/emotion/cjs/examples/typograpy/components/Text/Text.stories.tsx +1 -9
  76. package/emotion/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  77. package/emotion/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  78. package/emotion/es/components/Calendar/store/reducer.js +2 -2
  79. package/emotion/es/components/Switch/Switch.tokens.js +9 -7
  80. package/emotion/es/components/Switch/_toggleSize/base.js +2 -2
  81. package/emotion/es/components/Typography/Old/Paragraph/Paragraph.styles.js +1 -1
  82. package/emotion/es/components/Typography/Old/Subtitle/Subtitle.js +1 -7
  83. package/emotion/es/components/Typography/Old/Subtitle/Subtitle.styles.js +2 -2
  84. package/emotion/es/components/Typography/Old/TypographyOld.js +2 -4
  85. package/emotion/es/components/Typography/Old/TypographyOld.styles.js +1 -1
  86. package/emotion/es/components/Typography/Old/Underline/Underline.styles.js +1 -1
  87. package/emotion/es/components/Typography/Typography.js +2 -4
  88. package/emotion/es/components/Typography/Typography.styles.js +1 -1
  89. package/emotion/es/components/Typography/Typography.template-doc.mdx +0 -4
  90. package/emotion/es/components/Typography/tokens.js +0 -1
  91. package/emotion/es/examples/plasma_b2c/components/Switch/Switch.config.js +8 -8
  92. package/emotion/es/examples/plasma_b2c/components/Switch/Switch.outline.config.js +8 -8
  93. package/emotion/es/examples/plasma_web/components/Switch/Switch.config.js +8 -8
  94. package/emotion/es/examples/plasma_web/components/Switch/Switch.outline.config.js +8 -8
  95. package/emotion/es/examples/typograpy/components/Body/Body.stories.tsx +1 -9
  96. package/emotion/es/examples/typograpy/components/Dspl/Dspl.stories.tsx +1 -9
  97. package/emotion/es/examples/typograpy/components/Heading/Heading.stories.tsx +1 -9
  98. package/emotion/es/examples/typograpy/components/Old/Body/Body.stories.tsx +1 -9
  99. package/emotion/es/examples/typograpy/components/Old/Button/Button.stories.tsx +1 -9
  100. package/emotion/es/examples/typograpy/components/Old/Caption/Caption.stories.tsx +1 -9
  101. package/emotion/es/examples/typograpy/components/Old/Display/Display.stories.tsx +1 -9
  102. package/emotion/es/examples/typograpy/components/Old/Footnote/Footnote.stories.tsx +1 -9
  103. package/emotion/es/examples/typograpy/components/Old/Headline/Headline.stories.tsx +1 -9
  104. package/emotion/es/examples/typograpy/components/Old/Paragraph/Paragraph.stories.tsx +1 -9
  105. package/emotion/es/examples/typograpy/components/Old/Subtitle/Subtitle.stories.tsx +1 -11
  106. package/emotion/es/examples/typograpy/components/Old/Underline/Underline.stories.tsx +1 -9
  107. package/emotion/es/examples/typograpy/components/Text/Text.stories.tsx +1 -9
  108. package/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  109. package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  110. package/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  111. package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  112. package/es/components/Calendar/store/reducer.js +2 -2
  113. package/es/components/Calendar/store/reducer.js.map +1 -1
  114. package/es/components/Switch/Switch.css +2 -2
  115. package/es/components/Switch/Switch.tokens.js +9 -7
  116. package/es/components/Switch/Switch.tokens.js.map +1 -1
  117. package/es/components/Switch/_toggleSize/base.js +1 -1
  118. package/es/components/Switch/_toggleSize/base.js.map +1 -1
  119. package/es/components/Switch/_toggleSize/base_1e2ou53.css +1 -0
  120. package/es/components/Switch/_view/base.js +1 -1
  121. package/{cjs/components/Switch/_view/base_15atbyp.css → es/components/Switch/_view/base_qbpw2g.css} +1 -1
  122. package/es/components/Typography/Body/Body.css +1 -1
  123. package/es/components/Typography/Old/Button/Button.css +1 -1
  124. package/es/components/Typography/Old/Paragraph/Paragraph.css +1 -1
  125. package/es/components/Typography/Old/Paragraph/Paragraph.styles.js +1 -1
  126. package/es/components/Typography/Old/Paragraph/Paragraph.styles.js.map +1 -1
  127. package/{cjs/components/Typography/Old/Paragraph/Paragraph.styles_f6q9s8.css → es/components/Typography/Old/Paragraph/Paragraph.styles_179bahu.css} +1 -1
  128. package/es/components/Typography/Old/Subtitle/Subtitle.css +1 -1
  129. package/es/components/Typography/Old/Subtitle/Subtitle.js +1 -7
  130. package/es/components/Typography/Old/Subtitle/Subtitle.js.map +1 -1
  131. package/es/components/Typography/Old/Subtitle/Subtitle.styles.js +1 -1
  132. package/es/components/Typography/Old/Subtitle/Subtitle.styles.js.map +1 -1
  133. package/{cjs/components/Typography/Old/Subtitle/Subtitle.styles_g6d0r2.css → es/components/Typography/Old/Subtitle/Subtitle.styles_1plleej.css} +1 -1
  134. package/es/components/Typography/Old/TypographyOld.js +2 -4
  135. package/es/components/Typography/Old/TypographyOld.js.map +1 -1
  136. package/es/components/Typography/Old/TypographyOld.styles.js +1 -1
  137. package/es/components/Typography/Old/TypographyOld.styles.js.map +1 -1
  138. package/es/components/Typography/Old/{TypographyOld.styles_168abbx.css → TypographyOld.styles_17w0rtq.css} +1 -1
  139. package/es/components/Typography/Old/Underline/Underline.css +1 -1
  140. package/es/components/Typography/Old/Underline/Underline.styles.js +1 -1
  141. package/es/components/Typography/Old/Underline/Underline.styles.js.map +1 -1
  142. package/es/components/Typography/Old/Underline/{Underline.styles_1x2vb5e.css → Underline.styles_vsz834.css} +1 -1
  143. package/es/components/Typography/Typography.js +2 -4
  144. package/es/components/Typography/Typography.js.map +1 -1
  145. package/es/components/Typography/Typography.styles.js +1 -1
  146. package/es/components/Typography/Typography.styles.js.map +1 -1
  147. package/es/components/Typography/{Typography.styles_fa07dt.css → Typography.styles_6mr47g.css} +1 -1
  148. package/es/components/Typography/tokens.js +0 -1
  149. package/es/components/Typography/tokens.js.map +1 -1
  150. package/es/index.css +7 -7
  151. package/package.json +2 -2
  152. package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  153. package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  154. package/styled-components/cjs/components/Calendar/store/reducer.js +2 -2
  155. package/styled-components/cjs/components/Switch/Switch.tokens.js +9 -7
  156. package/styled-components/cjs/components/Switch/_toggleSize/base.js +1 -1
  157. package/styled-components/cjs/components/Typography/Old/Paragraph/Paragraph.styles.js +1 -1
  158. package/styled-components/cjs/components/Typography/Old/Subtitle/Subtitle.js +1 -7
  159. package/styled-components/cjs/components/Typography/Old/Subtitle/Subtitle.styles.js +1 -1
  160. package/styled-components/cjs/components/Typography/Old/TypographyOld.js +2 -4
  161. package/styled-components/cjs/components/Typography/Old/TypographyOld.styles.js +1 -1
  162. package/styled-components/cjs/components/Typography/Old/Underline/Underline.styles.js +1 -1
  163. package/styled-components/cjs/components/Typography/Typography.js +2 -4
  164. package/styled-components/cjs/components/Typography/Typography.styles.js +1 -1
  165. package/styled-components/cjs/components/Typography/Typography.template-doc.mdx +0 -4
  166. package/styled-components/cjs/components/Typography/tokens.js +0 -1
  167. package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.config.js +3 -3
  168. package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.outline.config.js +3 -3
  169. package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.config.js +3 -3
  170. package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.outline.config.js +3 -3
  171. package/styled-components/cjs/examples/typograpy/components/Body/Body.stories.tsx +1 -9
  172. package/styled-components/cjs/examples/typograpy/components/Dspl/Dspl.stories.tsx +1 -9
  173. package/styled-components/cjs/examples/typograpy/components/Heading/Heading.stories.tsx +1 -9
  174. package/styled-components/cjs/examples/typograpy/components/Old/Body/Body.stories.tsx +1 -9
  175. package/styled-components/cjs/examples/typograpy/components/Old/Button/Button.stories.tsx +1 -9
  176. package/styled-components/cjs/examples/typograpy/components/Old/Caption/Caption.stories.tsx +1 -9
  177. package/styled-components/cjs/examples/typograpy/components/Old/Display/Display.stories.tsx +1 -9
  178. package/styled-components/cjs/examples/typograpy/components/Old/Footnote/Footnote.stories.tsx +1 -9
  179. package/styled-components/cjs/examples/typograpy/components/Old/Headline/Headline.stories.tsx +1 -9
  180. package/styled-components/cjs/examples/typograpy/components/Old/Paragraph/Paragraph.stories.tsx +1 -9
  181. package/styled-components/cjs/examples/typograpy/components/Old/Subtitle/Subtitle.stories.tsx +1 -11
  182. package/styled-components/cjs/examples/typograpy/components/Old/Underline/Underline.stories.tsx +1 -9
  183. package/styled-components/cjs/examples/typograpy/components/Text/Text.stories.tsx +1 -9
  184. package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  185. package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  186. package/styled-components/es/components/Calendar/store/reducer.js +2 -2
  187. package/styled-components/es/components/Switch/Switch.tokens.js +9 -7
  188. package/styled-components/es/components/Switch/_toggleSize/base.js +2 -2
  189. package/styled-components/es/components/Typography/Old/Paragraph/Paragraph.styles.js +1 -1
  190. package/styled-components/es/components/Typography/Old/Subtitle/Subtitle.js +1 -7
  191. package/styled-components/es/components/Typography/Old/Subtitle/Subtitle.styles.js +2 -2
  192. package/styled-components/es/components/Typography/Old/TypographyOld.js +2 -4
  193. package/styled-components/es/components/Typography/Old/TypographyOld.styles.js +1 -1
  194. package/styled-components/es/components/Typography/Old/Underline/Underline.styles.js +1 -1
  195. package/styled-components/es/components/Typography/Typography.js +2 -4
  196. package/styled-components/es/components/Typography/Typography.styles.js +1 -1
  197. package/styled-components/es/components/Typography/Typography.template-doc.mdx +0 -4
  198. package/styled-components/es/components/Typography/tokens.js +0 -1
  199. package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.config.js +3 -3
  200. package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.outline.config.js +3 -3
  201. package/styled-components/es/examples/plasma_web/components/Switch/Switch.config.js +3 -3
  202. package/styled-components/es/examples/plasma_web/components/Switch/Switch.outline.config.js +3 -3
  203. package/styled-components/es/examples/typograpy/components/Body/Body.stories.tsx +1 -9
  204. package/styled-components/es/examples/typograpy/components/Dspl/Dspl.stories.tsx +1 -9
  205. package/styled-components/es/examples/typograpy/components/Heading/Heading.stories.tsx +1 -9
  206. package/styled-components/es/examples/typograpy/components/Old/Body/Body.stories.tsx +1 -9
  207. package/styled-components/es/examples/typograpy/components/Old/Button/Button.stories.tsx +1 -9
  208. package/styled-components/es/examples/typograpy/components/Old/Caption/Caption.stories.tsx +1 -9
  209. package/styled-components/es/examples/typograpy/components/Old/Display/Display.stories.tsx +1 -9
  210. package/styled-components/es/examples/typograpy/components/Old/Footnote/Footnote.stories.tsx +1 -9
  211. package/styled-components/es/examples/typograpy/components/Old/Headline/Headline.stories.tsx +1 -9
  212. package/styled-components/es/examples/typograpy/components/Old/Paragraph/Paragraph.stories.tsx +1 -9
  213. package/styled-components/es/examples/typograpy/components/Old/Subtitle/Subtitle.stories.tsx +1 -11
  214. package/styled-components/es/examples/typograpy/components/Old/Underline/Underline.stories.tsx +1 -9
  215. package/styled-components/es/examples/typograpy/components/Text/Text.stories.tsx +1 -9
  216. package/types/components/Calendar/store/reducer.d.ts +1 -1
  217. package/types/components/Calendar/store/reducer.d.ts.map +1 -1
  218. package/types/components/Switch/Switch.tokens.d.ts +4 -2
  219. package/types/components/Switch/Switch.tokens.d.ts.map +1 -1
  220. package/types/components/Switch/_toggleSize/base.d.ts.map +1 -1
  221. package/types/components/Typography/Body/Body.d.ts +0 -2
  222. package/types/components/Typography/Body/Body.d.ts.map +1 -1
  223. package/types/components/Typography/Dspl/Dspl.d.ts +0 -2
  224. package/types/components/Typography/Dspl/Dspl.d.ts.map +1 -1
  225. package/types/components/Typography/Heading/Heading.d.ts +0 -2
  226. package/types/components/Typography/Heading/Heading.d.ts.map +1 -1
  227. package/types/components/Typography/Old/Paragraph/Paragraph.styles.d.ts.map +1 -1
  228. package/types/components/Typography/Old/Subtitle/Subtitle.d.ts.map +1 -1
  229. package/types/components/Typography/Old/Subtitle/Subtitle.styles.d.ts.map +1 -1
  230. package/types/components/Typography/Old/TypographyOld.d.ts.map +1 -1
  231. package/types/components/Typography/Old/TypographyOld.styles.d.ts.map +1 -1
  232. package/types/components/Typography/Old/Underline/Underline.styles.d.ts.map +1 -1
  233. package/types/components/Typography/Text/Text.d.ts +0 -2
  234. package/types/components/Typography/Text/Text.d.ts.map +1 -1
  235. package/types/components/Typography/Typography.d.ts +0 -1
  236. package/types/components/Typography/Typography.d.ts.map +1 -1
  237. package/types/components/Typography/Typography.styles.d.ts.map +1 -1
  238. package/types/components/Typography/Typography.types.d.ts +0 -1
  239. package/types/components/Typography/Typography.types.d.ts.map +1 -1
  240. package/types/components/Typography/tokens.d.ts +0 -1
  241. package/types/components/Typography/tokens.d.ts.map +1 -1
  242. package/types/examples/plasma_b2c/components/Editable/Editable.d.ts +0 -4
  243. package/types/examples/plasma_b2c/components/Editable/Editable.d.ts.map +1 -1
  244. package/types/examples/plasma_b2c/components/Switch/Switch.config.d.ts.map +1 -1
  245. package/types/examples/plasma_b2c/components/Switch/Switch.outline.config.d.ts.map +1 -1
  246. package/types/examples/plasma_web/components/Editable/Editable.d.ts +0 -4
  247. package/types/examples/plasma_web/components/Editable/Editable.d.ts.map +1 -1
  248. package/types/examples/plasma_web/components/Switch/Switch.config.d.ts.map +1 -1
  249. package/types/examples/plasma_web/components/Switch/Switch.outline.config.d.ts.map +1 -1
  250. package/types/examples/typograpy/components/Body/Body.d.ts +0 -1
  251. package/types/examples/typograpy/components/Body/Body.d.ts.map +1 -1
  252. package/types/examples/typograpy/components/Dspl/Dspl.d.ts +0 -1
  253. package/types/examples/typograpy/components/Dspl/Dspl.d.ts.map +1 -1
  254. package/types/examples/typograpy/components/Heading/Heading.d.ts +0 -1
  255. package/types/examples/typograpy/components/Heading/Heading.d.ts.map +1 -1
  256. package/types/examples/typograpy/components/Text/Text.d.ts +0 -1
  257. package/types/examples/typograpy/components/Text/Text.d.ts.map +1 -1
  258. package/cjs/components/Switch/_toggleSize/base_1d0b3t4.css +0 -1
  259. package/es/components/Switch/_toggleSize/base_1d0b3t4.css +0 -1
@@ -62,7 +62,7 @@ var calendarBaseRoot = function calendarBaseRoot(Root) {
62
62
  _useState8 = _slicedToArray(_useState7, 2),
63
63
  outOfRangeKey = _useState8[0],
64
64
  setOutOfRangeKey = _useState8[1];
65
- var _useReducer = useReducer(reducer, getInitialState(value, type)),
65
+ var _useReducer = useReducer(reducer, getInitialState(value, min, type)),
66
66
  _useReducer2 = _slicedToArray(_useReducer, 2),
67
67
  state = _useReducer2[0],
68
68
  dispatch = _useReducer2[1];
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarBase.js","sources":["../../../../src/components/Calendar/CalendarBase/CalendarBase.tsx"],"sourcesContent":["import React, {\n useCallback,\n useMemo,\n useReducer,\n useState,\n KeyboardEvent,\n HTMLAttributes,\n forwardRef,\n useEffect,\n} from 'react';\n\nimport type { Calendar, CalendarConfigProps, DateObject } from '../Calendar.types';\nimport { getInitialState, reducer, sizeMap } from '../store/reducer';\nimport { ActionType, CalendarState } from '../store/types';\nimport { isValueUpdate } from '../utils';\nimport { useKeyNavigation, useCalendarNavigation, useCalendarDateChange } from '../hooks';\nimport { CalendarDays, CalendarHeader, CalendarMonths, CalendarQuarters, CalendarYears } from '../ui';\nimport { RootProps } from '../../../engines';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { IsOutOfRange, StyledCalendar } from './CalendarBase.styles';\n\nexport type CalendarBaseProps = Calendar & CalendarConfigProps;\n\n/**\n * Компонент календаря.\n */\nexport const calendarBaseRoot = (Root: RootProps<HTMLDivElement, HTMLAttributes<HTMLDivElement>>) =>\n forwardRef<HTMLDivElement, CalendarBaseProps>(\n (\n {\n value: externalValue,\n min,\n max,\n includeEdgeDates,\n type = 'Days',\n eventList,\n disabledList,\n eventMonthList,\n disabledMonthList,\n eventQuarterList,\n disabledQuarterList,\n eventYearList,\n disabledYearList,\n onChangeValue,\n locale = 'ru',\n ...rest\n },\n outerRootRef,\n ) => {\n const [firstValue, secondValue] = useMemo(\n () => (Array.isArray(externalValue) ? externalValue : [externalValue]),\n [externalValue],\n );\n const value = secondValue || firstValue;\n\n const [hoveredItem, setHoveredItem] = useState<DateObject | undefined>();\n const [prevType, setPrevType] = useState(type);\n const [prevValue, setPrevValue] = useState(value);\n const [outOfRangeKey, setOutOfRangeKey] = useState<number>(0);\n\n const [state, dispatch] = useReducer(reducer, getInitialState(value, type));\n\n const { date, calendarState, startYear, size } = state;\n\n const { handleNext, handlePrev } = useCalendarNavigation({\n calendarState,\n date,\n dispatch,\n });\n\n const [selectIndexes, onKeyDown, onSelectIndexes, outerRefs, isOutOfRange] = useKeyNavigation({\n size,\n calendarState,\n onNext: handleNext,\n onPrev: handlePrev,\n });\n\n const {\n handleOnChangeDay,\n handleOnChangeMonth,\n handleOnChangeQuarter,\n handleOnChangeYear,\n handleUpdateCalendarState,\n } = useCalendarDateChange({ type, onChangeValue, onSelectIndexes, dispatch });\n\n // Изменяем ключ каждый раз как пытаемся перейти на даты которые находятся за пределами min/max ограничений.\n // Это необходимо для того чтобы screen-reader корректно озвучивал уведомление aria-live=\"assertive\"\n // о том что нет доступных дат\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n setOutOfRangeKey((previousState) => Number(!previousState));\n\n onKeyDown(event);\n },\n [onKeyDown],\n );\n\n useEffect(() => {\n if (prevType !== calendarState) {\n dispatch({\n type: ActionType.UPDATE_CALENDAR_STATE,\n payload: { calendarState, size: sizeMap[calendarState].single },\n });\n\n setPrevType(calendarState);\n }\n }, [calendarState]);\n\n useEffect(() => {\n if (!prevValue) {\n setPrevValue(value);\n }\n\n if ((value && prevValue && isValueUpdate(value, prevValue)) || (value && !prevValue)) {\n dispatch({\n type: ActionType.UPDATE_DATE,\n payload: { value },\n });\n\n setPrevValue(value);\n }\n }, [value, prevValue]);\n\n return (\n <Root ref={outerRootRef} aria-label=\"Выбор даты\" {...rest}>\n {isOutOfRange && (\n <IsOutOfRange\n key={outOfRangeKey}\n aria-atomic=\"true\"\n role=\"alert\"\n aria-live=\"assertive\"\n aria-relevant=\"additions\"\n >\n Далее нет доступных дат.\n </IsOutOfRange>\n )}\n <CalendarHeader\n size={rest.size}\n firstDate={date}\n startYear={startYear}\n type={calendarState}\n onPrev={handlePrev}\n onNext={handleNext}\n onUpdateCalendarState={handleUpdateCalendarState}\n locale={locale}\n />\n {calendarState === CalendarState.Days && (\n <CalendarDays\n value={externalValue}\n date={date}\n min={min}\n max={max}\n eventList={eventList}\n disabledList={disabledList}\n includeEdgeDates={includeEdgeDates}\n hoveredDay={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeDay={handleOnChangeDay}\n onSetSelected={onSelectIndexes}\n onHoverDay={setHoveredItem}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n locale={locale}\n />\n )}\n {calendarState === CalendarState.Months && (\n <CalendarMonths\n value={externalValue}\n date={date}\n min={min}\n max={max}\n eventList={eventMonthList}\n disabledList={disabledMonthList}\n hoveredMonth={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeMonth={handleOnChangeMonth}\n onSetSelected={onSelectIndexes}\n onHoverMonth={setHoveredItem}\n onKeyDown={onKeyDown}\n outerRefs={outerRefs}\n locale={locale}\n />\n )}\n {calendarState === CalendarState.Quarters && (\n <CalendarQuarters\n value={externalValue}\n date={date}\n min={min}\n max={max}\n eventList={eventQuarterList}\n disabledList={disabledQuarterList}\n hoveredQuarter={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeQuarter={handleOnChangeQuarter}\n onSetSelected={onSelectIndexes}\n onHoverQuarter={setHoveredItem}\n onKeyDown={onKeyDown}\n outerRefs={outerRefs}\n />\n )}\n {calendarState === CalendarState.Years && (\n <CalendarYears\n value={externalValue}\n date={date}\n startYear={startYear}\n selectIndexes={selectIndexes}\n min={min}\n max={max}\n eventList={eventYearList}\n disabledList={disabledYearList}\n hoveredYear={hoveredItem}\n onChangeYear={handleOnChangeYear}\n onSetSelected={onSelectIndexes}\n onHoverYear={setHoveredItem}\n onKeyDown={onKeyDown}\n outerRefs={outerRefs}\n />\n )}\n </Root>\n );\n },\n );\n\nexport const calendarBaseConfig = {\n name: 'CalendarBase',\n tag: 'div',\n layout: calendarBaseRoot,\n base: StyledCalendar,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["calendarBaseRoot","Root","forwardRef","_ref","outerRootRef","externalValue","value","min","max","includeEdgeDates","_ref$type","type","eventList","disabledList","eventMonthList","disabledMonthList","eventQuarterList","disabledQuarterList","eventYearList","disabledYearList","onChangeValue","_ref$locale","locale","rest","_objectWithoutProperties","_excluded","_useMemo","useMemo","Array","isArray","_useMemo2","_slicedToArray","firstValue","secondValue","_useState","useState","_useState2","hoveredItem","setHoveredItem","_useState3","_useState4","prevType","setPrevType","_useState5","_useState6","prevValue","setPrevValue","_useState7","_useState8","outOfRangeKey","setOutOfRangeKey","_useReducer","useReducer","reducer","getInitialState","_useReducer2","state","dispatch","date","calendarState","startYear","size","_useCalendarNavigatio","useCalendarNavigation","handleNext","handlePrev","_useKeyNavigation","useKeyNavigation","onNext","onPrev","_useKeyNavigation2","selectIndexes","onKeyDown","onSelectIndexes","outerRefs","isOutOfRange","_useCalendarDateChang","useCalendarDateChange","handleOnChangeDay","handleOnChangeMonth","handleOnChangeQuarter","handleOnChangeYear","handleUpdateCalendarState","handleKeyDown","useCallback","event","previousState","Number","useEffect","ActionType","UPDATE_CALENDAR_STATE","payload","sizeMap","single","isValueUpdate","UPDATE_DATE","React","createElement","_extends","ref","IsOutOfRange","key","role","CalendarHeader","firstDate","onUpdateCalendarState","CalendarState","Days","CalendarDays","hoveredDay","onChangeDay","onSetSelected","onHoverDay","Months","CalendarMonths","hoveredMonth","onChangeMonth","onHoverMonth","Quarters","CalendarQuarters","hoveredQuarter","onChangeQuarter","onHoverQuarter","Years","CalendarYears","hoveredYear","onChangeYear","onHoverYear","calendarBaseConfig","name","tag","layout","base","StyledCalendar","variations","view","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;AAyBA;AACA;AACA;IACaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,IAA+D,EAAA;AAAA,EAAA,oBAC5FC,UAAU,CACN,UAAAC,IAAA,EAmBIC,YAAY,EACX;AAAA,IAAA,IAlBUC,aAAa,GAAAF,IA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EAAE;AACNJ,IAAAA,IAAI,EAAE,SAAS;AACf1E,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"CalendarBase.js","sources":["../../../../src/components/Calendar/CalendarBase/CalendarBase.tsx"],"sourcesContent":["import React, {\n useCallback,\n useMemo,\n useReducer,\n useState,\n KeyboardEvent,\n HTMLAttributes,\n forwardRef,\n useEffect,\n} from 'react';\n\nimport type { Calendar, CalendarConfigProps, DateObject } from '../Calendar.types';\nimport { getInitialState, reducer, sizeMap } from '../store/reducer';\nimport { ActionType, CalendarState } from '../store/types';\nimport { isValueUpdate } from '../utils';\nimport { useKeyNavigation, useCalendarNavigation, useCalendarDateChange } from '../hooks';\nimport { CalendarDays, CalendarHeader, CalendarMonths, CalendarQuarters, CalendarYears } from '../ui';\nimport { RootProps } from '../../../engines';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { IsOutOfRange, StyledCalendar } from './CalendarBase.styles';\n\nexport type CalendarBaseProps = Calendar & CalendarConfigProps;\n\n/**\n * Компонент календаря.\n */\nexport const calendarBaseRoot = (Root: RootProps<HTMLDivElement, HTMLAttributes<HTMLDivElement>>) =>\n forwardRef<HTMLDivElement, CalendarBaseProps>(\n (\n {\n value: externalValue,\n min,\n max,\n includeEdgeDates,\n type = 'Days',\n eventList,\n disabledList,\n eventMonthList,\n disabledMonthList,\n eventQuarterList,\n disabledQuarterList,\n eventYearList,\n disabledYearList,\n onChangeValue,\n locale = 'ru',\n ...rest\n },\n outerRootRef,\n ) => {\n const [firstValue, secondValue] = useMemo(\n () => (Array.isArray(externalValue) ? externalValue : [externalValue]),\n [externalValue],\n );\n const value = secondValue || firstValue;\n\n const [hoveredItem, setHoveredItem] = useState<DateObject | undefined>();\n const [prevType, setPrevType] = useState(type);\n const [prevValue, setPrevValue] = useState(value);\n const [outOfRangeKey, setOutOfRangeKey] = useState<number>(0);\n\n const [state, dispatch] = useReducer(reducer, getInitialState(value, min, type));\n\n const { date, calendarState, startYear, size } = state;\n\n const { handleNext, handlePrev } = useCalendarNavigation({\n calendarState,\n date,\n dispatch,\n });\n\n const [selectIndexes, onKeyDown, onSelectIndexes, outerRefs, isOutOfRange] = useKeyNavigation({\n size,\n calendarState,\n onNext: handleNext,\n onPrev: handlePrev,\n });\n\n const {\n handleOnChangeDay,\n handleOnChangeMonth,\n handleOnChangeQuarter,\n handleOnChangeYear,\n handleUpdateCalendarState,\n } = useCalendarDateChange({ type, onChangeValue, onSelectIndexes, dispatch });\n\n // Изменяем ключ каждый раз как пытаемся перейти на даты которые находятся за пределами min/max ограничений.\n // Это необходимо для того чтобы screen-reader корректно озвучивал уведомление aria-live=\"assertive\"\n // о том что нет доступных дат\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n setOutOfRangeKey((previousState) => Number(!previousState));\n\n onKeyDown(event);\n },\n [onKeyDown],\n );\n\n useEffect(() => {\n if (prevType !== calendarState) {\n dispatch({\n type: ActionType.UPDATE_CALENDAR_STATE,\n payload: { calendarState, size: sizeMap[calendarState].single },\n });\n\n setPrevType(calendarState);\n }\n }, [calendarState]);\n\n useEffect(() => {\n if (!prevValue) {\n setPrevValue(value);\n }\n\n if ((value && prevValue && isValueUpdate(value, prevValue)) || (value && !prevValue)) {\n dispatch({\n type: ActionType.UPDATE_DATE,\n payload: { value },\n });\n\n setPrevValue(value);\n }\n }, [value, prevValue]);\n\n return (\n <Root ref={outerRootRef} aria-label=\"Выбор даты\" {...rest}>\n {isOutOfRange && (\n <IsOutOfRange\n key={outOfRangeKey}\n aria-atomic=\"true\"\n role=\"alert\"\n aria-live=\"assertive\"\n aria-relevant=\"additions\"\n >\n Далее нет доступных дат.\n </IsOutOfRange>\n )}\n <CalendarHeader\n size={rest.size}\n firstDate={date}\n startYear={startYear}\n type={calendarState}\n onPrev={handlePrev}\n onNext={handleNext}\n onUpdateCalendarState={handleUpdateCalendarState}\n locale={locale}\n />\n {calendarState === CalendarState.Days && (\n <CalendarDays\n value={externalValue}\n date={date}\n min={min}\n max={max}\n eventList={eventList}\n disabledList={disabledList}\n includeEdgeDates={includeEdgeDates}\n hoveredDay={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeDay={handleOnChangeDay}\n onSetSelected={onSelectIndexes}\n onHoverDay={setHoveredItem}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n locale={locale}\n />\n )}\n {calendarState === CalendarState.Months && (\n <CalendarMonths\n value={externalValue}\n date={date}\n min={min}\n max={max}\n eventList={eventMonthList}\n disabledList={disabledMonthList}\n hoveredMonth={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeMonth={handleOnChangeMonth}\n onSetSelected={onSelectIndexes}\n onHoverMonth={setHoveredItem}\n onKeyDown={onKeyDown}\n outerRefs={outerRefs}\n locale={locale}\n />\n )}\n {calendarState === CalendarState.Quarters && (\n <CalendarQuarters\n value={externalValue}\n date={date}\n min={min}\n max={max}\n eventList={eventQuarterList}\n disabledList={disabledQuarterList}\n hoveredQuarter={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeQuarter={handleOnChangeQuarter}\n onSetSelected={onSelectIndexes}\n onHoverQuarter={setHoveredItem}\n onKeyDown={onKeyDown}\n outerRefs={outerRefs}\n />\n )}\n {calendarState === CalendarState.Years && (\n <CalendarYears\n value={externalValue}\n date={date}\n startYear={startYear}\n selectIndexes={selectIndexes}\n min={min}\n max={max}\n eventList={eventYearList}\n disabledList={disabledYearList}\n hoveredYear={hoveredItem}\n onChangeYear={handleOnChangeYear}\n onSetSelected={onSelectIndexes}\n onHoverYear={setHoveredItem}\n onKeyDown={onKeyDown}\n outerRefs={outerRefs}\n />\n )}\n </Root>\n );\n },\n );\n\nexport const calendarBaseConfig = {\n name: 'CalendarBase',\n tag: 'div',\n layout: calendarBaseRoot,\n base: StyledCalendar,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["calendarBaseRoot","Root","forwardRef","_ref","outerRootRef","externalValue","value","min","max","includeEdgeDates","_ref$type","type","eventList","disabledList","eventMonthList","disabledMonthList","eventQuarterList","disabledQuarterList","eventYearList","disabledYearList","onChangeValue","_ref$locale","locale","rest","_objectWithoutProperties","_excluded","_useMemo","useMemo","Array","isArray","_useMemo2","_slicedToArray","firstValue","secondValue","_useState","useState","_useState2","hoveredItem","setHoveredItem","_useState3","_useState4","prevType","setPrevType","_useState5","_useState6","prevValue","setPrevValue","_useState7","_useState8","outOfRangeKey","setOutOfRangeKey","_useReducer","useReducer","reducer","getInitialState","_useReducer2","state","dispatch","date","calendarState","startYear","size","_useCalendarNavigatio","useCalendarNavigation","handleNext","handlePrev","_useKeyNavigation","useKeyNavigation","onNext","onPrev","_useKeyNavigation2","selectIndexes","onKeyDown","onSelectIndexes","outerRefs","isOutOfRange","_useCalendarDateChang","useCalendarDateChange","handleOnChangeDay","handleOnChangeMonth","handleOnChangeQuarter","handleOnChangeYear","handleUpdateCalendarState","handleKeyDown","useCallback","event","previousState","Number","useEffect","ActionType","UPDATE_CALENDAR_STATE","payload","sizeMap","single","isValueUpdate","UPDATE_DATE","React","createElement","_extends","ref","IsOutOfRange","key","role","CalendarHeader","firstDate","onUpdateCalendarState","CalendarState","Days","CalendarDays","hoveredDay","onChangeDay","onSetSelected","onHoverDay","Months","CalendarMonths","hoveredMonth","onChangeMonth","onHoverMonth","Quarters","CalendarQuarters","hoveredQuarter","onChangeQuarter","onHoverQuarter","Years","CalendarYears","hoveredYear","onChangeYear","onHoverYear","calendarBaseConfig","name","tag","layout","base","StyledCalendar","variations","view","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;AAyBA;AACA;AACA;IACaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,IAA+D,EAAA;AAAA,EAAA,oBAC5FC,UAAU,CACN,UAAAC,IAAA,EAmBIC,YAAY,EACX;AAAA,IAAA,IAlBU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,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNJ,IAAAA,IAAI,EAAE,SAAS;AACf1E,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
@@ -65,7 +65,7 @@ var calendarDoubleRoot = function calendarDoubleRoot(Root) {
65
65
  _useState8 = _slicedToArray(_useState7, 2),
66
66
  outOfRangeKey = _useState8[0],
67
67
  setOutOfRangeKey = _useState8[1];
68
- var _useReducer = useReducer(reducer, getInitialState(value, type, true)),
68
+ var _useReducer = useReducer(reducer, getInitialState(value, min, type, true)),
69
69
  _useReducer2 = _slicedToArray(_useReducer, 2),
70
70
  state = _useReducer2[0],
71
71
  dispatch = _useReducer2[1];
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarDouble.js","sources":["../../../../src/components/Calendar/CalendarDouble/CalendarDouble.tsx"],"sourcesContent":["import React, {\n useState,\n useCallback,\n useMemo,\n forwardRef,\n HTMLAttributes,\n KeyboardEvent,\n useEffect,\n useReducer,\n} from 'react';\n\nimport type { Calendar, CalendarConfigProps, DateObject } from '../Calendar.types';\nimport { YEAR_RENDER_COUNT, getNextDate, isValueUpdate } from '../utils';\nimport { useKeyNavigation, useCalendarNavigation, useCalendarDateChange } from '../hooks';\nimport { CalendarDays, CalendarHeader, CalendarMonths, CalendarQuarters, CalendarYears } from '../ui';\nimport { RootProps } from '../../../engines/types';\nimport { getInitialState, reducer, sizeMap } from '../store/reducer';\nimport { ActionType, CalendarState } from '../store/types';\nimport { IsOutOfRange } from '../CalendarBase/CalendarBase.styles';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { StyledCalendar, StyledSeparator, StyledWrapper } from './CalendarDouble.styles';\n\nexport type CalendarDoubleProps = Calendar & CalendarConfigProps;\n\n/**\n * Компонент двойного календаря.\n */\nexport const calendarDoubleRoot = (Root: RootProps<HTMLDivElement, HTMLAttributes<HTMLDivElement>>) =>\n forwardRef<HTMLDivElement, CalendarDoubleProps>(\n (\n {\n value: externalValue,\n min,\n max,\n includeEdgeDates,\n type = 'Days',\n eventList,\n disabledList,\n eventMonthList,\n disabledMonthList,\n eventQuarterList,\n disabledQuarterList,\n eventYearList,\n disabledYearList,\n onChangeValue,\n locale = 'ru',\n ...rest\n },\n outerRootRef,\n ) => {\n const [firstValue, secondValue] = useMemo(\n () => (Array.isArray(externalValue) ? externalValue : [externalValue]),\n [externalValue],\n );\n const value = secondValue || firstValue;\n\n const [hoveredItem, setHoveredItem] = useState<DateObject | undefined>();\n const [prevType, setPrevType] = useState(type);\n const [prevValue, setPrevValue] = useState(value);\n const [outOfRangeKey, setOutOfRangeKey] = useState<number>(0);\n\n const [state, dispatch] = useReducer(reducer, getInitialState(value, type, true));\n\n const { date, calendarState, startYear, size } = state;\n\n const [firstDate, setFirstDate] = useState<DateObject>(date);\n const [secondDate, setSecondDate] = useState<DateObject>(date);\n\n const { handleNext, handlePrev } = useCalendarNavigation({\n calendarState,\n date,\n dispatch,\n });\n\n const [selectIndexes, onKeyDown, onSelectIndexes, outerRefs, isOutOfRange] = useKeyNavigation({\n isDouble: true,\n size,\n calendarState,\n onNext: handleNext,\n onPrev: handlePrev,\n });\n\n const {\n handleOnChangeDay,\n handleOnChangeMonth,\n handleOnChangeQuarter,\n handleOnChangeYear,\n handleUpdateCalendarState,\n } = useCalendarDateChange({ type, onChangeValue, onSelectIndexes, dispatch });\n\n const updateSecondDate = () => {\n if (calendarState === CalendarState.Days) {\n const [nextYear, nextMonthIndex] = getNextDate(date.year, date.monthIndex);\n setSecondDate({ year: nextYear, monthIndex: nextMonthIndex, day: date.day });\n }\n\n if (calendarState === CalendarState.Months || calendarState === CalendarState.Quarters) {\n setSecondDate({ year: date.year + 1, monthIndex: date.monthIndex, day: date.day });\n }\n\n if (calendarState === CalendarState.Years) {\n setSecondDate({ year: startYear + YEAR_RENDER_COUNT, monthIndex: date.monthIndex, day: date.day });\n }\n };\n\n const getBoundaryDates = () => {\n // NOTE: Если установить индекс дня равным \"0\", то берется последнее число предыдущего месяца\n if (calendarState === CalendarState.Days) {\n return [\n new Date(firstDate.year, firstDate.monthIndex, 1),\n new Date(secondDate.year, secondDate.monthIndex + 1, 0),\n ];\n }\n\n if (calendarState === CalendarState.Months || calendarState === CalendarState.Quarters) {\n return [new Date(firstDate.year, 0), new Date(secondDate.year, 12, 0)];\n }\n\n const endVisibleYear = startYear + YEAR_RENDER_COUNT * 2 - 1;\n return [new Date(startYear, 0), new Date(endVisibleYear, 11)];\n };\n\n // Изменяем ключ каждый раз как пытаемся перейти на даты которые находятся за пределами min/max ограничений.\n // Это необходимо для того чтобы screen-reader корректно озвучивал уведомление aria-live=\"assertive\"\n // о том что нет доступных дат\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n setOutOfRangeKey((previousState) => Number(!previousState));\n\n onKeyDown(event);\n },\n [onKeyDown],\n );\n\n useEffect(() => {\n if (prevType !== calendarState) {\n dispatch({\n type: ActionType.UPDATE_CALENDAR_STATE,\n payload: { calendarState, size: sizeMap[calendarState].double },\n });\n\n setPrevType(calendarState);\n }\n }, [calendarState]);\n\n useEffect(() => {\n if (!prevValue) {\n setPrevValue(value);\n }\n\n if ((value && prevValue && isValueUpdate(value, prevValue)) || (value && !prevValue)) {\n const [minVisibleDate, maxVisibleDate] = getBoundaryDates();\n\n if (value > maxVisibleDate || value < minVisibleDate) {\n dispatch({\n type: ActionType.UPDATE_DATE,\n payload: { value },\n });\n }\n\n setPrevValue(value);\n }\n }, [value, prevValue]);\n\n useEffect(() => {\n setFirstDate(date);\n\n updateSecondDate();\n }, [date, calendarState]);\n\n return (\n <Root ref={outerRootRef} aria-label=\"Выбор даты\" {...rest}>\n {isOutOfRange && (\n <IsOutOfRange\n key={outOfRangeKey}\n aria-atomic=\"true\"\n role=\"alert\"\n aria-live=\"assertive\"\n aria-relevant=\"additions\"\n >\n Далее нет доступных дат.\n </IsOutOfRange>\n )}\n <CalendarHeader\n isDouble\n size={rest.size}\n firstDate={firstDate}\n secondDate={secondDate}\n startYear={startYear}\n type={calendarState}\n onPrev={handlePrev}\n onNext={handleNext}\n onUpdateCalendarState={handleUpdateCalendarState}\n locale={locale}\n />\n\n <StyledWrapper>\n {calendarState === CalendarState.Days && (\n <>\n <CalendarDays\n value={externalValue}\n date={firstDate}\n min={min}\n max={max}\n eventList={eventList}\n disabledList={disabledList}\n includeEdgeDates={includeEdgeDates}\n hoveredDay={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeDay={handleOnChangeDay}\n onHoverDay={setHoveredItem}\n onSetSelected={onSelectIndexes}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n locale={locale}\n isDouble\n />\n <StyledSeparator />\n <CalendarDays\n value={externalValue}\n date={secondDate}\n min={min}\n max={max}\n eventList={eventList}\n disabledList={disabledList}\n includeEdgeDates={includeEdgeDates}\n hoveredDay={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeDay={handleOnChangeDay}\n onHoverDay={setHoveredItem}\n onSetSelected={onSelectIndexes}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n locale={locale}\n isDouble\n isSecond\n />\n </>\n )}\n {calendarState === CalendarState.Months && (\n <>\n <CalendarMonths\n value={externalValue}\n date={firstDate}\n min={min}\n max={max}\n eventList={eventMonthList}\n disabledList={disabledMonthList}\n hoveredMonth={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeMonth={handleOnChangeMonth}\n onSetSelected={onSelectIndexes}\n onHoverMonth={setHoveredItem}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n locale={locale}\n isDouble\n />\n <StyledSeparator />\n <CalendarMonths\n value={externalValue}\n date={secondDate}\n min={min}\n max={max}\n eventList={eventMonthList}\n disabledList={disabledMonthList}\n hoveredMonth={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeMonth={handleOnChangeMonth}\n onSetSelected={onSelectIndexes}\n onHoverMonth={setHoveredItem}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n locale={locale}\n isDouble\n isSecond\n />\n </>\n )}\n {calendarState === CalendarState.Quarters && (\n <>\n <CalendarQuarters\n value={externalValue}\n date={firstDate}\n min={min}\n max={max}\n eventList={eventQuarterList}\n disabledList={disabledQuarterList}\n hoveredQuarter={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeQuarter={handleOnChangeQuarter}\n onSetSelected={onSelectIndexes}\n onHoverQuarter={setHoveredItem}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n isDouble\n />\n <StyledSeparator />\n <CalendarQuarters\n value={externalValue}\n date={secondDate}\n min={min}\n max={max}\n eventList={eventQuarterList}\n disabledList={disabledQuarterList}\n hoveredQuarter={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeQuarter={handleOnChangeQuarter}\n onSetSelected={onSelectIndexes}\n onHoverQuarter={setHoveredItem}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n isDouble\n isSecond\n />\n </>\n )}\n {calendarState === CalendarState.Years && (\n <>\n <CalendarYears\n value={externalValue}\n date={firstDate}\n startYear={startYear}\n selectIndexes={selectIndexes}\n min={min}\n max={max}\n eventList={eventYearList}\n disabledList={disabledYearList}\n hoveredYear={hoveredItem}\n onChangeYear={handleOnChangeYear}\n onSetSelected={onSelectIndexes}\n onHoverYear={setHoveredItem}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n isDouble\n />\n <StyledSeparator />\n <CalendarYears\n value={externalValue}\n date={secondDate}\n startYear={startYear + YEAR_RENDER_COUNT}\n selectIndexes={selectIndexes}\n min={min}\n max={max}\n eventList={eventYearList}\n disabledList={disabledYearList}\n hoveredYear={hoveredItem}\n onChangeYear={handleOnChangeYear}\n onSetSelected={onSelectIndexes}\n onHoverYear={setHoveredItem}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n isDouble\n isSecond\n />\n </>\n )}\n </StyledWrapper>\n </Root>\n );\n },\n );\n\nexport const calendarDoubleConfig = {\n name: 'CalendarDouble',\n tag: 'div',\n layout: calendarDoubleRoot,\n base: StyledCalendar,\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["calendarDoubleRoot","Root","forwardRef","_ref","outerRootRef","externalValue","value","min","max","includeEdgeDates","_ref$type","type","eventList","disabledList","eventMonthList","disabledMonthList","eventQuarterList","disabledQuarterList","eventYearList","disabledYearList","onChangeValue","_ref$locale","locale","rest","_objectWithoutProperties","_excluded","_useMemo","useMemo","Array","isArray","_useMemo2","_slicedToArray","firstValue","secondValue","_useState","useState","_useState2","hoveredItem","setHoveredItem","_useState3","_useState4","prevType","setPrevType","_useState5","_useState6","prevValue","setPrevValue","_useState7","_useState8","outOfRangeKey","setOutOfRangeKey","_useReducer","useReducer","reducer","getInitialState","_useReducer2","state","dispatch","date","calendarState","startYear","size","_useState9","_useState10","firstDate","setFirstDate","_useState11","_useState12","secondDate","setSecondDate","_useCalendarNavigatio","useCalendarNavigation","handleNext","handlePrev","_useKeyNavigation","useKeyNavigation","isDouble","onNext","onPrev","_useKeyNavigation2","selectIndexes","onKeyDown","onSelectIndexes","outerRefs","isOutOfRange","_useCalendarDateChang","useCalendarDateChange","handleOnChangeDay","handleOnChangeMonth","handleOnChangeQuarter","handleOnChangeYear","handleUpdateCalendarState","updateSecondDate","CalendarState","Days","_getNextDate","getNextDate","year","monthIndex","_getNextDate2","nextYear","nextMonthIndex","day","Months","Quarters","Years","YEAR_RENDER_COUNT","getBoundaryDates","Date","endVisibleYear","handleKeyDown","useCallback","event","previousState","Number","useEffect","ActionType","UPDATE_CALENDAR_STATE","payload","sizeMap","isValueUpdate","_getBoundaryDates","_getBoundaryDates2","minVisibleDate","maxVisibleDate","UPDATE_DATE","React","createElement","_extends","ref","IsOutOfRange","key","role","CalendarHeader","onUpdateCalendarState","StyledWrapper","Fragment","CalendarDays","hoveredDay","onChangeDay","onHoverDay","onSetSelected","_StyledSeparator","StyledSeparator","isSecond","CalendarMonths","hoveredMonth","onChangeMonth","onHoverMonth","_StyledSeparator2","CalendarQuarters","hoveredQuarter","onChangeQuarter","onHoverQuarter","_StyledSeparator3","CalendarYears","hoveredYear","onChangeYear","onHoverYear","_StyledSeparator4","calendarDoubleConfig","name","tag","layout","base","StyledCalendar","variations","view","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAyBA;AACA;AACA;IACaA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,IAA+D,EAAA;AAAA,EAAA,oBAC9FC,UAAU,CACN,UAAAC,IAAA,EAmBIC,YAAY,EACX;AAAA,IAAA,IAlBUC,aAAa,GAAAF,IAAA,CAApBG,KAAK;MACLC,GAAG,GAAAJ,IAAA,CAAHI,GAAG;MACHC,GAAG,GAAAL,IAAA,CAAHK,GAAG;MACHC,gBAAgB,GAAAN,IAAA,CAAhBM,gBAAgB;MAAAC,SAAA,GAAAP,IAAA,CAChBQ,IAAI;AAAJA,MAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,SAAA;MACbE,SAAS,GAAAT,IAAA,CAATS,SAAS;MACTC,YAAY,GAAAV,IAAA,CAAZU,YAAY;MACZC,cAAc,GAAAX,IAAA,CAAdW,cAAc;MACdC,iBAAiB,GAAAZ,IAAA,CAAjBY,iBAAiB;MACjBC,gBAAgB,GAAAb,IAAA,CAAhBa,gBAAgB;MAChBC,mBAAmB,GAAAd,IAAA,CAAnBc,mBAAmB;MACnBC,aAAa,GAAAf,IAAA,CAAbe,aAAa;MACbC,gBAAgB,GAAAhB,IAAA,CAAhBgB,gBAAgB;MAChBC,aAAa,GAAAjB,IAAA,CAAbiB,aAAa;MAAAC,WAAA,GAAAlB,IAAA,CACbmB,MAAM;AAANA,MAAAA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,WAAA;AACVE,MAAAA,IAAI,GAAAC,wBAAA,CAAArB,IAAA,EAAAsB,SAAA,CAAA,CAAA;IAIX,IAAAC,QAAA,GAAkCC,OAAO,CACrC,YAAA;QAAA,OAA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Q,EAAA,IAAA;KACX,CACH,CAEK,CACb,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMgB,oBAAoB,GAAG;AAChCC,EAAAA,IAAI,EAAE,gBAAgB;AACtBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEnK,kBAAkB;AAC1BoK,EAAAA,IAAI,EAAEC,cAAc;AACpBC,EAAAA,UAAU,EAAE;AACRC,IAAAA,IAAI,EAAE;AACFC,MAAAA,GAAG,EAAEC,IAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNH,IAAAA,IAAI,EAAE,SAAS;AACf1G,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"CalendarDouble.js","sources":["../../../../src/components/Calendar/CalendarDouble/CalendarDouble.tsx"],"sourcesContent":["import React, {\n useState,\n useCallback,\n useMemo,\n forwardRef,\n HTMLAttributes,\n KeyboardEvent,\n useEffect,\n useReducer,\n} from 'react';\n\nimport type { Calendar, CalendarConfigProps, DateObject } from '../Calendar.types';\nimport { YEAR_RENDER_COUNT, getNextDate, isValueUpdate } from '../utils';\nimport { useKeyNavigation, useCalendarNavigation, useCalendarDateChange } from '../hooks';\nimport { CalendarDays, CalendarHeader, CalendarMonths, CalendarQuarters, CalendarYears } from '../ui';\nimport { RootProps } from '../../../engines/types';\nimport { getInitialState, reducer, sizeMap } from '../store/reducer';\nimport { ActionType, CalendarState } from '../store/types';\nimport { IsOutOfRange } from '../CalendarBase/CalendarBase.styles';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { StyledCalendar, StyledSeparator, StyledWrapper } from './CalendarDouble.styles';\n\nexport type CalendarDoubleProps = Calendar & CalendarConfigProps;\n\n/**\n * Компонент двойного календаря.\n */\nexport const calendarDoubleRoot = (Root: RootProps<HTMLDivElement, HTMLAttributes<HTMLDivElement>>) =>\n forwardRef<HTMLDivElement, CalendarDoubleProps>(\n (\n {\n value: externalValue,\n min,\n max,\n includeEdgeDates,\n type = 'Days',\n eventList,\n disabledList,\n eventMonthList,\n disabledMonthList,\n eventQuarterList,\n disabledQuarterList,\n eventYearList,\n disabledYearList,\n onChangeValue,\n locale = 'ru',\n ...rest\n },\n outerRootRef,\n ) => {\n const [firstValue, secondValue] = useMemo(\n () => (Array.isArray(externalValue) ? externalValue : [externalValue]),\n [externalValue],\n );\n const value = secondValue || firstValue;\n\n const [hoveredItem, setHoveredItem] = useState<DateObject | undefined>();\n const [prevType, setPrevType] = useState(type);\n const [prevValue, setPrevValue] = useState(value);\n const [outOfRangeKey, setOutOfRangeKey] = useState<number>(0);\n\n const [state, dispatch] = useReducer(reducer, getInitialState(value, min, type, true));\n\n const { date, calendarState, startYear, size } = state;\n\n const [firstDate, setFirstDate] = useState<DateObject>(date);\n const [secondDate, setSecondDate] = useState<DateObject>(date);\n\n const { handleNext, handlePrev } = useCalendarNavigation({\n calendarState,\n date,\n dispatch,\n });\n\n const [selectIndexes, onKeyDown, onSelectIndexes, outerRefs, isOutOfRange] = useKeyNavigation({\n isDouble: true,\n size,\n calendarState,\n onNext: handleNext,\n onPrev: handlePrev,\n });\n\n const {\n handleOnChangeDay,\n handleOnChangeMonth,\n handleOnChangeQuarter,\n handleOnChangeYear,\n handleUpdateCalendarState,\n } = useCalendarDateChange({ type, onChangeValue, onSelectIndexes, dispatch });\n\n const updateSecondDate = () => {\n if (calendarState === CalendarState.Days) {\n const [nextYear, nextMonthIndex] = getNextDate(date.year, date.monthIndex);\n setSecondDate({ year: nextYear, monthIndex: nextMonthIndex, day: date.day });\n }\n\n if (calendarState === CalendarState.Months || calendarState === CalendarState.Quarters) {\n setSecondDate({ year: date.year + 1, monthIndex: date.monthIndex, day: date.day });\n }\n\n if (calendarState === CalendarState.Years) {\n setSecondDate({ year: startYear + YEAR_RENDER_COUNT, monthIndex: date.monthIndex, day: date.day });\n }\n };\n\n const getBoundaryDates = () => {\n // NOTE: Если установить индекс дня равным \"0\", то берется последнее число предыдущего месяца\n if (calendarState === CalendarState.Days) {\n return [\n new Date(firstDate.year, firstDate.monthIndex, 1),\n new Date(secondDate.year, secondDate.monthIndex + 1, 0),\n ];\n }\n\n if (calendarState === CalendarState.Months || calendarState === CalendarState.Quarters) {\n return [new Date(firstDate.year, 0), new Date(secondDate.year, 12, 0)];\n }\n\n const endVisibleYear = startYear + YEAR_RENDER_COUNT * 2 - 1;\n return [new Date(startYear, 0), new Date(endVisibleYear, 11)];\n };\n\n // Изменяем ключ каждый раз как пытаемся перейти на даты которые находятся за пределами min/max ограничений.\n // Это необходимо для того чтобы screen-reader корректно озвучивал уведомление aria-live=\"assertive\"\n // о том что нет доступных дат\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n setOutOfRangeKey((previousState) => Number(!previousState));\n\n onKeyDown(event);\n },\n [onKeyDown],\n );\n\n useEffect(() => {\n if (prevType !== calendarState) {\n dispatch({\n type: ActionType.UPDATE_CALENDAR_STATE,\n payload: { calendarState, size: sizeMap[calendarState].double },\n });\n\n setPrevType(calendarState);\n }\n }, [calendarState]);\n\n useEffect(() => {\n if (!prevValue) {\n setPrevValue(value);\n }\n\n if ((value && prevValue && isValueUpdate(value, prevValue)) || (value && !prevValue)) {\n const [minVisibleDate, maxVisibleDate] = getBoundaryDates();\n\n if (value > maxVisibleDate || value < minVisibleDate) {\n dispatch({\n type: ActionType.UPDATE_DATE,\n payload: { value },\n });\n }\n\n setPrevValue(value);\n }\n }, [value, prevValue]);\n\n useEffect(() => {\n setFirstDate(date);\n\n updateSecondDate();\n }, [date, calendarState]);\n\n return (\n <Root ref={outerRootRef} aria-label=\"Выбор даты\" {...rest}>\n {isOutOfRange && (\n <IsOutOfRange\n key={outOfRangeKey}\n aria-atomic=\"true\"\n role=\"alert\"\n aria-live=\"assertive\"\n aria-relevant=\"additions\"\n >\n Далее нет доступных дат.\n </IsOutOfRange>\n )}\n <CalendarHeader\n isDouble\n size={rest.size}\n firstDate={firstDate}\n secondDate={secondDate}\n startYear={startYear}\n type={calendarState}\n onPrev={handlePrev}\n onNext={handleNext}\n onUpdateCalendarState={handleUpdateCalendarState}\n locale={locale}\n />\n\n <StyledWrapper>\n {calendarState === CalendarState.Days && (\n <>\n <CalendarDays\n value={externalValue}\n date={firstDate}\n min={min}\n max={max}\n eventList={eventList}\n disabledList={disabledList}\n includeEdgeDates={includeEdgeDates}\n hoveredDay={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeDay={handleOnChangeDay}\n onHoverDay={setHoveredItem}\n onSetSelected={onSelectIndexes}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n locale={locale}\n isDouble\n />\n <StyledSeparator />\n <CalendarDays\n value={externalValue}\n date={secondDate}\n min={min}\n max={max}\n eventList={eventList}\n disabledList={disabledList}\n includeEdgeDates={includeEdgeDates}\n hoveredDay={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeDay={handleOnChangeDay}\n onHoverDay={setHoveredItem}\n onSetSelected={onSelectIndexes}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n locale={locale}\n isDouble\n isSecond\n />\n </>\n )}\n {calendarState === CalendarState.Months && (\n <>\n <CalendarMonths\n value={externalValue}\n date={firstDate}\n min={min}\n max={max}\n eventList={eventMonthList}\n disabledList={disabledMonthList}\n hoveredMonth={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeMonth={handleOnChangeMonth}\n onSetSelected={onSelectIndexes}\n onHoverMonth={setHoveredItem}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n locale={locale}\n isDouble\n />\n <StyledSeparator />\n <CalendarMonths\n value={externalValue}\n date={secondDate}\n min={min}\n max={max}\n eventList={eventMonthList}\n disabledList={disabledMonthList}\n hoveredMonth={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeMonth={handleOnChangeMonth}\n onSetSelected={onSelectIndexes}\n onHoverMonth={setHoveredItem}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n locale={locale}\n isDouble\n isSecond\n />\n </>\n )}\n {calendarState === CalendarState.Quarters && (\n <>\n <CalendarQuarters\n value={externalValue}\n date={firstDate}\n min={min}\n max={max}\n eventList={eventQuarterList}\n disabledList={disabledQuarterList}\n hoveredQuarter={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeQuarter={handleOnChangeQuarter}\n onSetSelected={onSelectIndexes}\n onHoverQuarter={setHoveredItem}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n isDouble\n />\n <StyledSeparator />\n <CalendarQuarters\n value={externalValue}\n date={secondDate}\n min={min}\n max={max}\n eventList={eventQuarterList}\n disabledList={disabledQuarterList}\n hoveredQuarter={hoveredItem}\n selectIndexes={selectIndexes}\n onChangeQuarter={handleOnChangeQuarter}\n onSetSelected={onSelectIndexes}\n onHoverQuarter={setHoveredItem}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n isDouble\n isSecond\n />\n </>\n )}\n {calendarState === CalendarState.Years && (\n <>\n <CalendarYears\n value={externalValue}\n date={firstDate}\n startYear={startYear}\n selectIndexes={selectIndexes}\n min={min}\n max={max}\n eventList={eventYearList}\n disabledList={disabledYearList}\n hoveredYear={hoveredItem}\n onChangeYear={handleOnChangeYear}\n onSetSelected={onSelectIndexes}\n onHoverYear={setHoveredItem}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n isDouble\n />\n <StyledSeparator />\n <CalendarYears\n value={externalValue}\n date={secondDate}\n startYear={startYear + YEAR_RENDER_COUNT}\n selectIndexes={selectIndexes}\n min={min}\n max={max}\n eventList={eventYearList}\n disabledList={disabledYearList}\n hoveredYear={hoveredItem}\n onChangeYear={handleOnChangeYear}\n onSetSelected={onSelectIndexes}\n onHoverYear={setHoveredItem}\n onKeyDown={handleKeyDown}\n outerRefs={outerRefs}\n isDouble\n isSecond\n />\n </>\n )}\n </StyledWrapper>\n </Root>\n );\n },\n );\n\nexport const calendarDoubleConfig = {\n name: 'CalendarDouble',\n tag: 'div',\n layout: calendarDoubleRoot,\n base: StyledCalendar,\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["calendarDoubleRoot","Root","forwardRef","_ref","outerRootRef","externalValue","value","min","max","includeEdgeDates","_ref$type","type","eventList","disabledList","eventMonthList","disabledMonthList","eventQuarterList","disabledQuarterList","eventYearList","disabledYearList","onChangeValue","_ref$locale","locale","rest","_objectWithoutProperties","_excluded","_useMemo","useMemo","Array","isArray","_useMemo2","_slicedToArray","firstValue","secondValue","_useState","useState","_useState2","hoveredItem","setHoveredItem","_useState3","_useState4","prevType","setPrevType","_useState5","_useState6","prevValue","setPrevValue","_useState7","_useState8","outOfRangeKey","setOutOfRangeKey","_useReducer","useReducer","reducer","getInitialState","_useReducer2","state","dispatch","date","calendarState","startYear","size","_useState9","_useState10","firstDate","setFirstDate","_useState11","_useState12","secondDate","setSecondDate","_useCalendarNavigatio","useCalendarNavigation","handleNext","handlePrev","_useKeyNavigation","useKeyNavigation","isDouble","onNext","onPrev","_useKeyNavigation2","selectIndexes","onKeyDown","onSelectIndexes","outerRefs","isOutOfRange","_useCalendarDateChang","useCalendarDateChange","handleOnChangeDay","handleOnChangeMonth","handleOnChangeQuarter","handleOnChangeYear","handleUpdateCalendarState","updateSecondDate","CalendarState","Days","_getNextDate","getNextDate","year","monthIndex","_getNextDate2","nextYear","nextMonthIndex","day","Months","Quarters","Years","YEAR_RENDER_COUNT","getBoundaryDates","Date","endVisibleYear","handleKeyDown","useCallback","event","previousState","Number","useEffect","ActionType","UPDATE_CALENDAR_STATE","payload","sizeMap","isValueUpdate","_getBoundaryDates","_getBoundaryDates2","minVisibleDate","maxVisibleDate","UPDATE_DATE","React","createElement","_extends","ref","IsOutOfRange","key","role","CalendarHeader","onUpdateCalendarState","StyledWrapper","Fragment","CalendarDays","hoveredDay","onChangeDay","onHoverDay","onSetSelected","_StyledSeparator","StyledSeparator","isSecond","CalendarMonths","hoveredMonth","onChangeMonth","onHoverMonth","_StyledSeparator2","CalendarQuarters","hoveredQuarter","onChangeQuarter","onHoverQuarter","_StyledSeparator3","CalendarYears","hoveredYear","onChangeYear","onHoverYear","_StyledSeparator4","calendarDoubleConfig","name","tag","layout","base","StyledCalendar","variations","view","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAyBA;AACA;AACA;IACaA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,IAA+D,EAAA;AAAA,EAAA,oBAC9FC,UAAU,CACN,UAAAC,IAAA,EAmBIC,YAAY,EACX;AAAA,IAAA,IAlBUC,aAAa,GAAAF,IAAA,CAApBG,KAAK;MACLC,GAAG,GAAAJ,IAAA,CAAHI,GAAG;MACHC,GAAG,GAAAL,IAAA,CAAHK,GAAG;MACHC,gBAAgB,GAAAN,IAAA,CAAhBM,gBAAgB;MAAAC,SAAA,GAAAP,IAAA,CAChBQ,IAAI;AAAJA,MAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,SAAA;MACbE,SAAS,GAAAT,IAAA,CAATS,SAAS;MACTC,YAAY,GAAAV,IAAA,CAAZU,YAAY;MACZC,cAAc,GAAAX,IAAA,CAAdW,cAAc;MACdC,iBAAiB,GAAAZ,IAAA,CAAjBY,iBAAiB;MACjBC,gBAAgB,GAAAb,IAAA,CAAhBa,gBAAgB;MAChBC,mBAAmB,GAAAd,IAAA,CAAnBc,mBAAmB;MACnBC,aAAa,GAAAf,IAAA,CAAbe,aAAa;MACbC,gBAAgB,GAAAhB,IAAA,CAAhBgB,gBAAgB;MAChBC,aAAa,GAAAjB,IAAA,CAAbiB,aAAa;MAAAC,WAAA,GAAAlB,IAAA,CACbmB,MAAM;AAANA,MAAAA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,WAAA;AACVE,MAAAA,IAAI,GAAAC,wBAAA,CAAArB,IAAA,EAAAsB,SAAA,CAAA,CAAA;IAIX,IAAAC,QAAA,GAAkCC,OAAO,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rBP,QAAQ,EAAA,IAAA;MACRoE,QAAQ,EAAA,IAAA;KACX,CACH,CAEK,CACb,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMgB,oBAAoB,GAAG;AAChCC,EAAAA,IAAI,EAAE,gBAAgB;AACtBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEnK,kBAAkB;AAC1BoK,EAAAA,IAAI,EAAEC,cAAc;AACpBC,EAAAA,UAAU,EAAE;AACRC,IAAAA,IAAI,EAAE;AACFC,MAAAA,GAAG,EAAEC,IAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNH,IAAAA,IAAI,EAAE,SAAS;AACf1G,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
@@ -20,8 +20,8 @@ var sizeMap = {
20
20
  "double": [3, 1]
21
21
  }
22
22
  };
23
- var getInitialState = function getInitialState(value, calendarState, isDouble) {
24
- var initDate = value || new Date();
23
+ var getInitialState = function getInitialState(value, min, calendarState, isDouble) {
24
+ var initDate = value || min || new Date();
25
25
  var date = getDateFromValue(initDate);
26
26
  var resSize = isDouble ? sizeMap[calendarState]["double"] : sizeMap[calendarState].single;
27
27
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"reducer.js","sources":["../../../../src/components/Calendar/store/reducer.ts"],"sourcesContent":["import { getDateFromValue, getNextDate, getPrevDate, getStartYear } from '../utils';\n\nimport { CalendarStateType, Action, ActionType, InitialState, SizeMap } from './types';\n\nexport const sizeMap: SizeMap = {\n Days: {\n single: [5, 6],\n double: [11, 6],\n },\n Months: {\n single: [3, 2],\n double: [7, 2],\n },\n Years: {\n single: [3, 2],\n double: [7, 2],\n },\n Quarters: {\n single: [1, 1],\n double: [3, 1],\n },\n};\n\nexport const getInitialState = (\n value: Date | undefined,\n calendarState: CalendarStateType,\n isDouble?: boolean,\n): InitialState => {\n const initDate = value || new Date();\n const date = getDateFromValue(initDate);\n\n const resSize: [number, number] = isDouble ? sizeMap[calendarState].double : sizeMap[calendarState].single;\n\n return {\n date: { ...date, day: value !== undefined ? date.day : 0 },\n startYear: getStartYear(date.year),\n calendarState,\n size: resSize,\n };\n};\n\nexport const reducer = (state: InitialState, action: Action): InitialState => {\n switch (action.type) {\n case ActionType.PREVIOUS_MONTH: {\n const { year, monthIndex } = action.payload;\n const [prevYear, prevMonthIndex] = getPrevDate(year, monthIndex);\n\n return {\n ...state,\n date: {\n day: state.date.day,\n monthIndex: prevMonthIndex,\n year: prevYear,\n },\n };\n }\n case ActionType.NEXT_MONTH: {\n const { monthIndex, year } = action.payload;\n const [nextYear, nextMonthIndex] = getNextDate(year, monthIndex);\n\n return {\n ...state,\n date: {\n day: state.date.day,\n monthIndex: nextMonthIndex,\n year: nextYear,\n },\n };\n }\n case ActionType.PREVIOUS_YEAR: {\n const { step } = action.payload;\n\n return {\n ...state,\n startYear: state.startYear - step,\n date: {\n day: state.date.day,\n monthIndex: state.date.monthIndex,\n year: state.date.year - step,\n },\n };\n }\n case ActionType.NEXT_YEAR: {\n const { step } = action.payload;\n\n return {\n ...state,\n startYear: state.startYear + step,\n date: {\n day: state.date.day,\n monthIndex: state.date.monthIndex,\n year: state.date.year + step,\n },\n };\n }\n case ActionType.PREVIOUS_START_YEAR: {\n const { yearsCount } = action.payload;\n\n return {\n ...state,\n startYear: state.startYear - yearsCount,\n };\n }\n case ActionType.NEXT_START_YEAR: {\n const { yearsCount } = action.payload;\n\n return {\n ...state,\n startYear: state.startYear + yearsCount,\n };\n }\n case ActionType.UPDATE_DATE: {\n const { value } = action.payload;\n const date = getDateFromValue(value);\n const startYear = getStartYear(value.getFullYear());\n\n return {\n ...state,\n date,\n startYear,\n };\n }\n case ActionType.UPDATE_MONTH: {\n const { calendarState, monthIndex, size } = action.payload;\n\n return {\n ...state,\n size,\n calendarState,\n date: {\n day: state.date.day,\n monthIndex,\n year: state.date.year,\n },\n };\n }\n case ActionType.UPDATE_YEAR: {\n const { calendarState, year, size } = action.payload;\n\n return {\n ...state,\n size,\n calendarState,\n date: {\n day: state.date.day,\n monthIndex: state.date.monthIndex,\n year,\n },\n };\n }\n case ActionType.UPDATE_CALENDAR_STATE: {\n const { calendarState, size } = action.payload;\n\n return {\n ...state,\n calendarState,\n size: size || state.size,\n };\n }\n default:\n return state;\n }\n};\n"],"names":["sizeMap","Days","single","Months","Years","Quarters","getInitialState","value","calendarState","isDouble","initDate","Date","date","getDateFromValue","resSize","_objectSpread","day","undefined","startYear","getStartYear","year","size","reducer","state","action","type","ActionType","PREVIOUS_MONTH","_action$payload","payload","monthIndex","_getPrevDate","getPrevDate","_getPrevDate2","_slicedToArray","prevYear","prevMonthIndex","NEXT_MONTH","_action$payload2","_getNextDate","getNextDate","_getNextDate2","nextYear","nextMonthIndex","PREVIOUS_YEAR","step","NEXT_YEAR","PREVIOUS_START_YEAR","yearsCount","NEXT_START_YEAR","UPDATE_DATE","getFullYear","UPDATE_MONTH","_action$payload3","UPDATE_YEAR","_action$payload4","UPDATE_CALENDAR_STATE","_action$payload5"],"mappings":";;;;AAIO,IAAMA,OAAgB,GAAG;AAC5BC,EAAAA,IAAI,EAAE;AACFC,IAAAA,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,EAAA,CAAC,EAAE,EAAE,CAAC,CAAA;GACjB;AACDC,EAAAA,MAAM,EAAE;AACJD,IAAAA,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,EAAA,CAAC,CAAC,EAAE,CAAC,CAAA;GAChB;AACDE,EAAAA,KAAK,EAAE;AACHF,IAAAA,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,EAAA,CAAC,CAAC,EAAE,CAAC,CAAA;GAChB;AACDG,EAAAA,QAAQ,EAAE;AACNH,IAAAA,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,EAAA,CAAC,CAAC,EAAE,CAAC,CAAA;AACj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ducer.ts"],"sourcesContent":["import { getDateFromValue, getNextDate, getPrevDate, getStartYear } from '../utils';\n\nimport { CalendarStateType, Action, ActionType, InitialState, SizeMap } from './types';\n\nexport const sizeMap: SizeMap = {\n Days: {\n single: [5, 6],\n double: [11, 6],\n },\n Months: {\n single: [3, 2],\n double: [7, 2],\n },\n Years: {\n single: [3, 2],\n double: [7, 2],\n },\n Quarters: {\n single: [1, 1],\n double: [3, 1],\n },\n};\n\nexport const getInitialState = (\n value: Date | undefined,\n min: Date | undefined,\n calendarState: CalendarStateType,\n isDouble?: boolean,\n): InitialState => {\n const initDate = value || min || new Date();\n const date = getDateFromValue(initDate);\n\n const resSize: [number, number] = isDouble ? sizeMap[calendarState].double : sizeMap[calendarState].single;\n\n return {\n date: { ...date, day: value !== undefined ? date.day : 0 },\n startYear: getStartYear(date.year),\n calendarState,\n size: resSize,\n };\n};\n\nexport const reducer = (state: InitialState, action: Action): InitialState => {\n switch (action.type) {\n case ActionType.PREVIOUS_MONTH: {\n const { year, monthIndex } = action.payload;\n const [prevYear, prevMonthIndex] = getPrevDate(year, monthIndex);\n\n return {\n ...state,\n date: {\n day: state.date.day,\n monthIndex: prevMonthIndex,\n year: prevYear,\n },\n };\n }\n case ActionType.NEXT_MONTH: {\n const { monthIndex, year } = action.payload;\n const [nextYear, nextMonthIndex] = getNextDate(year, monthIndex);\n\n return {\n ...state,\n date: {\n day: state.date.day,\n monthIndex: nextMonthIndex,\n year: nextYear,\n },\n };\n }\n case ActionType.PREVIOUS_YEAR: {\n const { step } = action.payload;\n\n return {\n ...state,\n startYear: state.startYear - step,\n date: {\n day: state.date.day,\n monthIndex: state.date.monthIndex,\n year: state.date.year - step,\n },\n };\n }\n case ActionType.NEXT_YEAR: {\n const { step } = action.payload;\n\n return {\n ...state,\n startYear: state.startYear + step,\n date: {\n day: state.date.day,\n monthIndex: state.date.monthIndex,\n year: state.date.year + step,\n },\n };\n }\n case ActionType.PREVIOUS_START_YEAR: {\n const { yearsCount } = action.payload;\n\n return {\n ...state,\n startYear: state.startYear - yearsCount,\n };\n }\n case ActionType.NEXT_START_YEAR: {\n const { yearsCount } = action.payload;\n\n return {\n ...state,\n startYear: state.startYear + yearsCount,\n };\n }\n case ActionType.UPDATE_DATE: {\n const { value } = action.payload;\n const date = getDateFromValue(value);\n const startYear = getStartYear(value.getFullYear());\n\n return {\n ...state,\n date,\n startYear,\n };\n }\n case ActionType.UPDATE_MONTH: {\n const { calendarState, monthIndex, size } = action.payload;\n\n return {\n ...state,\n size,\n calendarState,\n date: {\n day: state.date.day,\n monthIndex,\n year: state.date.year,\n },\n };\n }\n case ActionType.UPDATE_YEAR: {\n const { calendarState, year, size } = action.payload;\n\n return {\n ...state,\n size,\n calendarState,\n date: {\n day: state.date.day,\n monthIndex: state.date.monthIndex,\n year,\n },\n };\n }\n case ActionType.UPDATE_CALENDAR_STATE: {\n const { calendarState, size } = action.payload;\n\n return {\n ...state,\n calendarState,\n size: size || state.size,\n };\n }\n default:\n return state;\n }\n};\n"],"names":["sizeMap","Days","single","Months","Years","Quarters","getInitialState","value","min","calendarState","isDouble","initDate","Date","date","getDateFromValue","resSize","_objectSpread","day","undefined","startYear","getStartYear","year","size","reducer","state","action","type","ActionType","PREVIOUS_MONTH","_action$payload","payload","monthIndex","_getPrevDate","getPrevDate","_getPrevDate2","_slicedToArray","prevYear","prevMonthIndex","NEXT_MONTH","_action$payload2","_getNextDate","getNextDate","_getNextDate2","nextYear","nextMonthIndex","PREVIOUS_YEAR","step","NEXT_YEAR","PREVIOUS_START_YEAR","yearsCount","NEXT_START_YEAR","UPDATE_DATE","getFullYear","UPDATE_MONTH","_action$payload3","UPDATE_YEAR","_action$payload4","UPDATE_CALENDAR_STATE","_action$payload5"],"mappings":";;;;AAIO,IAAMA,OAAgB,GAAG;AAC5BC,EAAAA,IAAI,EAAE;AACFC,IAAAA,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,EAAA,CAAC,EAAE,EAAE,CAAC,CA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ACK,OAAO;UAAtCrB,eAAa,GAAAiD,gBAAA,CAAbjD,aAAa;UAAEa,MAAI,GAAAoC,gBAAA,CAAJpC,IAAI,CAAA;AAE3B,QAAA,OAAAN,cAAA,CAAAA,cAAA,CAAA,EAAA,EACOQ,KAAK,CAAA,EAAA,EAAA,EAAA;AACRf,UAAAA,aAAa,EAAbA,eAAa;AACba,UAAAA,IAAI,EAAEA,MAAI,IAAIE,KAAK,CAACF,IAAAA;AAAI,SAAA,CAAA,CAAA;AAEhC,OAAA;AACA,IAAA;AACI,MAAA,OAAOE,KAAK,CAAA;AACpB,GAAA;AACJ;;;;"}
@@ -1,8 +1,8 @@
1
1
  .base_1tcl212_bm1v11h__e2c572a3 .base_1tcl212_s10fscgc__e2c572a3{font-family:var(--plasma-switch-font-family);font-style:var(--plasma-switch-font-style);font-weight:var(--plasma-switch-font-weight);-webkit-letter-spacing:var(--plasma-switch-letter-spacing);-moz-letter-spacing:var(--plasma-switch-letter-spacing);-ms-letter-spacing:var(--plasma-switch-letter-spacing);letter-spacing:var(--plasma-switch-letter-spacing);line-height:var(--plasma-switch-line-height);font-size:var(--plasma-switch-font-size);}.base_1tcl212_bm1v11h__e2c572a3 .base_1tcl212_sdjnckq__e2c572a3{font-family:var(--plasma-switch-description-font-family);font-style:var(--plasma-switch-description-font-style);font-weight:var(--plasma-switch-description-font-weight);-webkit-letter-spacing:var(--plasma-switch-description-letter-spacing);-moz-letter-spacing:var(--plasma-switch-description-letter-spacing);-ms-letter-spacing:var(--plasma-switch-description-letter-spacing);letter-spacing:var(--plasma-switch-description-letter-spacing);line-height:var(--plasma-switch-description-line-height);font-size:var(--plasma-switch-description-font-size);}.base_1tcl212_bm1v11h__e2c572a3 .base_1tcl212_s1ilr5eq__e2c572a3{margin:var(--plasma_private-switch__label-offset,0);}
2
2
 
3
- .base_1d0b3t4_b1wld3h3__ac2a0bcf .base_1d0b3t4_s2cs3kf__ac2a0bcf{box-sizing:border-box;-webkit-flex:0 0 var(--plasma-switch__track-width);-ms-flex:0 0 var(--plasma-switch__track-width);flex:0 0 var(--plasma-switch__track-width);border-style:solid;border-width:var(--plasma-switch__track-border);border-radius:var(--plasma-switch__track-border-radius);width:var(--plasma-switch__track-width);height:var(--plasma-switch__track-height);}.base_1d0b3t4_b1wld3h3__ac2a0bcf .base_1d0b3t4_s2cs3kf__ac2a0bcf::after{width:var(--plasma-switch__thumb-size);height:var(--plasma-switch__thumb-size);border-radius:var(--plasma-switch__thumb-border-radius);margin:auto var(--plasma-switch__thumb-offset);}.base_1d0b3t4_b1wld3h3__ac2a0bcf:active:not([disabled]) .base_1d0b3t4_s2cs3kf__ac2a0bcf::after{width:calc(var(--plasma-switch__thumb-size) * var(--plasma-switch__thumb-scale,1));}
3
+ .base_1e2ou53_b1wld3h3__301e5c69 .base_1e2ou53_s2cs3kf__301e5c69{box-sizing:border-box;-webkit-flex:0 0 var(--plasma-switch__track-width);-ms-flex:0 0 var(--plasma-switch__track-width);flex:0 0 var(--plasma-switch__track-width);border-style:solid;border-width:var(--plasma-switch__track_checked_false-border-width);border-radius:var(--plasma-switch__track-border-radius);width:var(--plasma-switch__track-width);height:var(--plasma-switch__track-height);}.base_1e2ou53_b1wld3h3__301e5c69 .base_1e2ou53_s2cs3kf__301e5c69::after{width:var(--plasma-switch__thumb-size);height:var(--plasma-switch__thumb-size);border-radius:var(--plasma-switch__thumb-border-radius);margin:auto var(--plasma-switch__thumb_checked_false-offset);}.base_1e2ou53_b1wld3h3__301e5c69 .base_1e2ou53_ssthlx1__301e5c69:checked ~ .base_1e2ou53_s2cs3kf__301e5c69{border-width:var(--plasma-switch__track_checked_true-border-width,var(--plasma-switch__track_checked_false-border-width));}.base_1e2ou53_b1wld3h3__301e5c69 .base_1e2ou53_ssthlx1__301e5c69:checked ~ .base_1e2ou53_s2cs3kf__301e5c69::after{margin:auto var(--plasma-switch__thumb_checked_true-offset);}.base_1e2ou53_b1wld3h3__301e5c69:active:not([disabled]) .base_1e2ou53_s2cs3kf__301e5c69::after{width:calc(var(--plasma-switch__thumb-size) * var(--plasma-switch__thumb-scale,1));}
4
4
 
5
- .base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_s2cs3kf__64acd499{background-color:var(--plasma-switch__track_checked_false-bg-color);border-color:var(--plasma-switch__track-checked_false-border-color);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:not([disabled]) ~ .base_15atbyp_s2cs3kf__64acd499:hover{background-color:var(--plasma-switch__track_checked_false_hovered_true-bg-color,var(--plasma-switch__track_checked_false-bg-color));border-color:var(--plasma-switch__track-checked_false_hovered_true-border-color,var(--plasma-switch__track-checked_false-border-color));}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:checked ~ .base_15atbyp_s2cs3kf__64acd499{background-color:var(--plasma-switch__track_checked_true-bg-color);border-color:var(--plasma-switch__track-checked_true-border-color);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:checked:not([disabled]) ~ .base_15atbyp_s2cs3kf__64acd499:hover{background-color:var(--plasma-switch__track_checked_true_hovered_true-bg-color,var(--plasma-switch__track_checked_true-bg-color));border-color:var(--plasma-switch__track-checked_true_hovered_true-border-color,var(--plasma-switch__track-checked_true-border-color));}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_s2cs3kf__64acd499::after{background-color:var(--plasma-switch__thumb-checked_false-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:checked ~ .base_15atbyp_s2cs3kf__64acd499::after{background-color:var(--plasma-switch__thumb_checked_true-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow_checked_true,var(--plasma-switch__thumb-box-shadow));}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_s1ilr5eq__64acd499{color:var(--plasma-switch__label-color);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_sdjnckq__64acd499{color:var(--plasma-switch__description-color);}
5
+ .base_qbpw2g_b1g0jmh3__f31e8aee .base_qbpw2g_s2cs3kf__f31e8aee{background-color:var(--plasma-switch__track_checked_false-bg-color);border-color:var(--plasma-switch__track_checked_false-border-color);}.base_qbpw2g_b1g0jmh3__f31e8aee .base_qbpw2g_ssthlx1__f31e8aee:not([disabled]) ~ .base_qbpw2g_s2cs3kf__f31e8aee:hover{background-color:var(--plasma-switch__track_checked_false_hovered_true-bg-color,var(--plasma-switch__track_checked_false-bg-color));border-color:var(--plasma-switch__track_checked_false_hovered_true-border-color,var(--plasma-switch__track_checked_false-border-color));}.base_qbpw2g_b1g0jmh3__f31e8aee .base_qbpw2g_ssthlx1__f31e8aee:checked ~ .base_qbpw2g_s2cs3kf__f31e8aee{background-color:var(--plasma-switch__track_checked_true-bg-color);border-color:var(--plasma-switch__track_checked_true-border-color);}.base_qbpw2g_b1g0jmh3__f31e8aee .base_qbpw2g_ssthlx1__f31e8aee:checked:not([disabled]) ~ .base_qbpw2g_s2cs3kf__f31e8aee:hover{background-color:var(--plasma-switch__track_checked_true_hovered_true-bg-color,var(--plasma-switch__track_checked_true-bg-color));border-color:var(--plasma-switch__track_checked_true_hovered_true-border-color,var(--plasma-switch__track_checked_true-border-color));}.base_qbpw2g_b1g0jmh3__f31e8aee .base_qbpw2g_s2cs3kf__f31e8aee::after{background-color:var(--plasma-switch__thumb_checked_false-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow);}.base_qbpw2g_b1g0jmh3__f31e8aee .base_qbpw2g_ssthlx1__f31e8aee:checked ~ .base_qbpw2g_s2cs3kf__f31e8aee::after{background-color:var(--plasma-switch__thumb_checked_true-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow_checked_true,var(--plasma-switch__thumb-box-shadow));}.base_qbpw2g_b1g0jmh3__f31e8aee .base_qbpw2g_s1ilr5eq__f31e8aee{color:var(--plasma-switch__label-color);}.base_qbpw2g_b1g0jmh3__f31e8aee .base_qbpw2g_sdjnckq__f31e8aee{color:var(--plasma-switch__description-color);}
6
6
 
7
7
  .base_sz3n0x_bvwxj2r__a36bed54 .base_sz3n0x_s2cs3kf__a36bed54::before{content:'';position:absolute;inset:-0.125rem;display:block;box-sizing:content-box;border-radius:calc(0.125rem + var(--plasma-switch__track-border-radius));border:0.125rem solid transparent;pointer-events:none;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;}.base_sz3n0x_bvwxj2r__a36bed54 .base_sz3n0x_ssthlx1__a36bed54.base_sz3n0x_focusVisible__a36bed54 ~ .base_sz3n0x_s2cs3kf__a36bed54::before{box-shadow:0 0 0 0.125rem var(--plasma-switch__track-focus-color);}
8
8
 
@@ -23,11 +23,12 @@ var tokens = {
23
23
  verticalGap: '--plasma-switch-vertical-gap',
24
24
  trackWidth: '--plasma-switch__track-width',
25
25
  trackHeight: '--plasma-switch__track-height',
26
- trackBorderWidth: '--plasma-switch__track-border',
27
- trackBorderColorOn: '--plasma-switch__track-checked_true-border-color',
28
- trackBorderColorOnHover: '--plasma-switch__track-checked_true_hovered_true-border-color',
29
- trackBorderColorOff: '--plasma-switch__track-checked_false-border-color',
30
- trackBorderColorOffHover: '--plasma-switch__track-checked_false_hovered_true-border-color',
26
+ trackBorderWidthOn: '--plasma-switch__track_checked_true-border-width',
27
+ trackBorderWidthOff: '--plasma-switch__track_checked_false-border-width',
28
+ trackBorderColorOn: '--plasma-switch__track_checked_true-border-color',
29
+ trackBorderColorOnHover: '--plasma-switch__track_checked_true_hovered_true-border-color',
30
+ trackBorderColorOff: '--plasma-switch__track_checked_false-border-color',
31
+ trackBorderColorOffHover: '--plasma-switch__track_checked_false_hovered_true-border-color',
31
32
  trackBorderRadius: '--plasma-switch__track-border-radius',
32
33
  // NOTE: could be intersection with checked
33
34
  trackBackgroundColorOn: '--plasma-switch__track_checked_true-bg-color',
@@ -36,11 +37,12 @@ var tokens = {
36
37
  trackBackgroundColorOffHover: '--plasma-switch__track_checked_false_hovered_true-bg-color',
37
38
  trackFocusColor: '--plasma-switch__track-focus-color',
38
39
  thumbSize: '--plasma-switch__thumb-size',
39
- thumbOffset: '--plasma-switch__thumb-offset',
40
+ thumbOffsetOn: '--plasma-switch__thumb_checked_true-offset',
41
+ thumbOffsetOff: '--plasma-switch__thumb_checked_false-offset',
40
42
  thumbBorderRadius: '--plasma-switch__thumb-border-radius',
41
43
  thumbPressScale: '--plasma-switch__thumb-scale',
42
44
  thumbBackgroundColorOn: '--plasma-switch__thumb_checked_true-bg-color',
43
- thumbBackgroundColorOff: '--plasma-switch__thumb-checked_false-bg-color',
45
+ thumbBackgroundColorOff: '--plasma-switch__thumb_checked_false-bg-color',
44
46
  thumbBoxShadow: '--plasma-switch__thumb-box-shadow',
45
47
  thumbBoxShadowOn: '--plasma-switch__thumb-box-shadow_checked_true',
46
48
  labelOffsetPrivate: '--plasma_private-switch__label-offset'
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.tokens.js","sources":["../../../src/components/Switch/Switch.tokens.ts"],"sourcesContent":["export const tokens = {\n fontFamily: '--plasma-switch-font-family',\n fontStyle: '--plasma-switch-font-style',\n fontSize: '--plasma-switch-font-size',\n fontWeight: '--plasma-switch-font-weight',\n letterSpacing: '--plasma-switch-letter-spacing',\n lineHeight: '--plasma-switch-line-height',\n\n /* Токены description */\n descriptionFontFamily: '--plasma-switch-description-font-family',\n descriptionFontStyle: '--plasma-switch-description-font-style',\n descriptionFontSize: '--plasma-switch-description-font-size',\n descriptionFontWeight: '--plasma-switch-description-font-weight',\n descriptionLetterSpacing: '--plasma-switch-description-letter-spacing',\n descriptionLineHeight: '--plasma-switch-description-line-height',\n\n /* Цвет подписи */\n labelColor: '--plasma-switch__label-color',\n labelOffset: '--plasma-switch__label-offset',\n\n /* Цвет описания */\n descriptionColor: '--plasma-switch__description-color',\n descriptionOffset: '--plasma-switch__description-offset',\n\n /** Прозрачность для всего компонента в состоянии disabled */\n disabledOpacity: '--plasma-switch-disabled-opacity',\n\n verticalGap: '--plasma-switch-vertical-gap',\n trackWidth: '--plasma-switch__track-width',\n trackHeight: '--plasma-switch__track-height',\n trackBorderWidth: '--plasma-switch__track-border',\n trackBorderColorOn: '--plasma-switch__track-checked_true-border-color',\n trackBorderColorOnHover: '--plasma-switch__track-checked_true_hovered_true-border-color',\n trackBorderColorOff: '--plasma-switch__track-checked_false-border-color',\n trackBorderColorOffHover: '--plasma-switch__track-checked_false_hovered_true-border-color',\n\n trackBorderRadius: '--plasma-switch__track-border-radius',\n // NOTE: could be intersection with checked\n trackBackgroundColorOn: '--plasma-switch__track_checked_true-bg-color',\n trackBackgroundColorOnHover: '--plasma-switch__track_checked_true_hovered_true-bg-color',\n trackBackgroundColorOff: '--plasma-switch__track_checked_false-bg-color',\n trackBackgroundColorOffHover: '--plasma-switch__track_checked_false_hovered_true-bg-color',\n\n trackFocusColor: '--plasma-switch__track-focus-color',\n\n thumbSize: '--plasma-switch__thumb-size',\n thumbOffset: '--plasma-switch__thumb-offset',\n thumbBorderRadius: '--plasma-switch__thumb-border-radius',\n\n thumbPressScale: '--plasma-switch__thumb-scale',\n\n thumbBackgroundColorOn: '--plasma-switch__thumb_checked_true-bg-color',\n thumbBackgroundColorOff: '--plasma-switch__thumb-checked_false-bg-color',\n thumbBoxShadow: '--plasma-switch__thumb-box-shadow',\n thumbBoxShadowOn: '--plasma-switch__thumb-box-shadow_checked_true',\n\n labelOffsetPrivate: '--plasma_private-switch__label-offset',\n};\n\nexport const classes = {\n beforeSwitchLabelPosition: 'switch-label-position-before',\n afterSwitchLabelPosition: 'switch-label-position-after',\n};\n"],"names":["tokens","fontFamily","fontStyle","fontSize","fontWeight","letterSpacing","lineHeight","descriptionFontFamily","descriptionFontStyle","descriptionFontSize","descriptionFontWeight","descriptionLetterSpacing","descriptionLineHeight","labelColor","labelOffset","descriptionColor","descriptionOffset","disabledOpacity","verticalGap","trackWidth","trackHeight","trackBorderWidth","trackBorderColorOn","trackBorderColorOnHover","trackBorderColorOff","trackBorderColorOffHover","trackBorderRadius","trackBackgroundColorOn","trackBackgroundColorOnHover","trackBackgroundColorOff","trackBackgroundColorOffHover","trackFocusColor","thumbSize","thumbOffset","thumbBorderRadius","thumbPressScale","thumbBackgroundColorOn","thumbBackgroundColorOff","thumbBoxShadow","thumbBoxShadowOn","labelOffsetPrivate","classes","beforeSwitchLabelPosition","afterSwitchLabelPosition"],"mappings":"AAAO,IAAMA,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,6BAA6B;AACzCC,EAAAA,SAAS,EAAE,4BAA4B;AACvCC,EAAAA,QAAQ,EAAE,2BAA2B;AACrCC,EAAAA,UAAU,EAAE,6BAA6B;AACzCC,EAAAA,aAAa,EAAE,gCAAgC;AAC/CC,EAAAA,UAAU,EAAE,6BAA6B;AAEzC;AACAC,EAAAA,qBAAqB,EAAE,yCAAyC;AAChEC,EAAAA,oBAAoB,EAAE,wCAAwC;AAC9DC,EAAAA,mBAAmB,EAAE,uCAAuC;AAC5DC,EAAAA,qBAAqB,EAAE,yCAAyC;AAChEC,EAAAA,wBAAwB,EAAE,4CAA4C;AACtEC,EAAAA,qBAAqB,EAAE,yCAAyC;AAEhE;AACAC,EAAAA,UAAU,EAAE,8BAA8B;AAC1CC,EAAAA,WAAW,EAAE,+BAA+B;AAE5C;AACAC,EAAAA,gBAAgB,EAAE,oCAAoC;AACtDC,EAAAA,iBAAiB,EAAE,qCAAqC;AAExD;AACAC,EAAAA,eAAe,EAAE,kCAAkC;AAEnDC,EAAAA,WAAW,EAAE,8BAA8B;AAC3CC,EAAAA,UAAU,EAAE,8BAA8B;AAC1CC,EAAAA,WAAW,EAAE,+BAA+B;AAC5CC,EAAAA,gBAAgB,EAAE,+BAA+B;AACjDC,EAAAA,kBAAkB,EAAE,kDAAkD;AACtEC,EAAAA,uBAAuB,EAAE,+DAA+D;AACxFC,EAAAA,mBAAmB,EAAE,mDAAmD;AACxEC,EAAAA,wBAAwB,EAAE,gEAAgE;AAE1FC,EAAAA,iBAAiB,EAAE,sCAAsC;AACzD;AACAC,EAAAA,sBAAsB,EAAE,8CAA8C;AACtEC,EAAAA,2BAA2B,EAAE,2DAA2D;AACxFC,EAAAA,uBAAuB,EAAE,+CAA+C;AACxEC,EAAAA,4BAA4B,EAAE,4DAA4D;AAE1FC,EAAAA,eAAe,EAAE,oCAAoC;AAErDC,EAAAA,SAAS,EAAE,6BAA6B;AACxCC,EAAAA,WAAW,EAAE,+BAA+B;AAC5CC,EAAAA,iBAAiB,EAAE,sCAAsC;AAEzDC,EAAAA,eAAe,EAAE,8BAA8B;AAE/CC,EAAAA,sBAAsB,EAAE,8CAA8C;AACtEC,EAAAA,uBAAuB,EAAE,+CAA+C;AACxEC,EAAAA,cAAc,EAAE,mCAAmC;AACnDC,EAAAA,gBAAgB,EAAE,gDAAgD;AAElEC,EAAAA,kBAAkB,EAAE,uCAAA;AACxB,EAAC;AAEM,IAAMC,OAAO,GAAG;AACnBC,EAAAA,yBAAyB,EAAE,8BAA8B;AACzDC,EAAAA,wBAAwB,EAAE,6BAAA;AAC9B;;;;"}
1
+ {"version":3,"file":"Switch.tokens.js","sources":["../../../src/components/Switch/Switch.tokens.ts"],"sourcesContent":["export const tokens = {\n fontFamily: '--plasma-switch-font-family',\n fontStyle: '--plasma-switch-font-style',\n fontSize: '--plasma-switch-font-size',\n fontWeight: '--plasma-switch-font-weight',\n letterSpacing: '--plasma-switch-letter-spacing',\n lineHeight: '--plasma-switch-line-height',\n\n /* Токены description */\n descriptionFontFamily: '--plasma-switch-description-font-family',\n descriptionFontStyle: '--plasma-switch-description-font-style',\n descriptionFontSize: '--plasma-switch-description-font-size',\n descriptionFontWeight: '--plasma-switch-description-font-weight',\n descriptionLetterSpacing: '--plasma-switch-description-letter-spacing',\n descriptionLineHeight: '--plasma-switch-description-line-height',\n\n /* Цвет подписи */\n labelColor: '--plasma-switch__label-color',\n labelOffset: '--plasma-switch__label-offset',\n\n /* Цвет описания */\n descriptionColor: '--plasma-switch__description-color',\n descriptionOffset: '--plasma-switch__description-offset',\n\n /** Прозрачность для всего компонента в состоянии disabled */\n disabledOpacity: '--plasma-switch-disabled-opacity',\n\n verticalGap: '--plasma-switch-vertical-gap',\n trackWidth: '--plasma-switch__track-width',\n trackHeight: '--plasma-switch__track-height',\n trackBorderWidthOn: '--plasma-switch__track_checked_true-border-width',\n trackBorderWidthOff: '--plasma-switch__track_checked_false-border-width',\n trackBorderColorOn: '--plasma-switch__track_checked_true-border-color',\n trackBorderColorOnHover: '--plasma-switch__track_checked_true_hovered_true-border-color',\n trackBorderColorOff: '--plasma-switch__track_checked_false-border-color',\n trackBorderColorOffHover: '--plasma-switch__track_checked_false_hovered_true-border-color',\n\n trackBorderRadius: '--plasma-switch__track-border-radius',\n // NOTE: could be intersection with checked\n trackBackgroundColorOn: '--plasma-switch__track_checked_true-bg-color',\n trackBackgroundColorOnHover: '--plasma-switch__track_checked_true_hovered_true-bg-color',\n trackBackgroundColorOff: '--plasma-switch__track_checked_false-bg-color',\n trackBackgroundColorOffHover: '--plasma-switch__track_checked_false_hovered_true-bg-color',\n\n trackFocusColor: '--plasma-switch__track-focus-color',\n\n thumbSize: '--plasma-switch__thumb-size',\n thumbOffsetOn: '--plasma-switch__thumb_checked_true-offset',\n thumbOffsetOff: '--plasma-switch__thumb_checked_false-offset',\n thumbBorderRadius: '--plasma-switch__thumb-border-radius',\n\n thumbPressScale: '--plasma-switch__thumb-scale',\n\n thumbBackgroundColorOn: '--plasma-switch__thumb_checked_true-bg-color',\n thumbBackgroundColorOff: '--plasma-switch__thumb_checked_false-bg-color',\n thumbBoxShadow: '--plasma-switch__thumb-box-shadow',\n thumbBoxShadowOn: '--plasma-switch__thumb-box-shadow_checked_true',\n\n labelOffsetPrivate: '--plasma_private-switch__label-offset',\n};\n\nexport const classes = {\n beforeSwitchLabelPosition: 'switch-label-position-before',\n afterSwitchLabelPosition: 'switch-label-position-after',\n};\n"],"names":["tokens","fontFamily","fontStyle","fontSize","fontWeight","letterSpacing","lineHeight","descriptionFontFamily","descriptionFontStyle","descriptionFontSize","descriptionFontWeight","descriptionLetterSpacing","descriptionLineHeight","labelColor","labelOffset","descriptionColor","descriptionOffset","disabledOpacity","verticalGap","trackWidth","trackHeight","trackBorderWidthOn","trackBorderWidthOff","trackBorderColorOn","trackBorderColorOnHover","trackBorderColorOff","trackBorderColorOffHover","trackBorderRadius","trackBackgroundColorOn","trackBackgroundColorOnHover","trackBackgroundColorOff","trackBackgroundColorOffHover","trackFocusColor","thumbSize","thumbOffsetOn","thumbOffsetOff","thumbBorderRadius","thumbPressScale","thumbBackgroundColorOn","thumbBackgroundColorOff","thumbBoxShadow","thumbBoxShadowOn","labelOffsetPrivate","classes","beforeSwitchLabelPosition","afterSwitchLabelPosition"],"mappings":"AAAO,IAAMA,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,6BAA6B;AACzCC,EAAAA,SAAS,EAAE,4BAA4B;AACvCC,EAAAA,QAAQ,EAAE,2BAA2B;AACrCC,EAAAA,UAAU,EAAE,6BAA6B;AACzCC,EAAAA,aAAa,EAAE,gCAAgC;AAC/CC,EAAAA,UAAU,EAAE,6BAA6B;AAEzC;AACAC,EAAAA,qBAAqB,EAAE,yCAAyC;AAChEC,EAAAA,oBAAoB,EAAE,wCAAwC;AAC9DC,EAAAA,mBAAmB,EAAE,uCAAuC;AAC5DC,EAAAA,qBAAqB,EAAE,yCAAyC;AAChEC,EAAAA,wBAAwB,EAAE,4CAA4C;AACtEC,EAAAA,qBAAqB,EAAE,yCAAyC;AAEhE;AACAC,EAAAA,UAAU,EAAE,8BAA8B;AAC1CC,EAAAA,WAAW,EAAE,+BAA+B;AAE5C;AACAC,EAAAA,gBAAgB,EAAE,oCAAoC;AACtDC,EAAAA,iBAAiB,EAAE,qCAAqC;AAExD;AACAC,EAAAA,eAAe,EAAE,kCAAkC;AAEnDC,EAAAA,WAAW,EAAE,8BAA8B;AAC3CC,EAAAA,UAAU,EAAE,8BAA8B;AAC1CC,EAAAA,WAAW,EAAE,+BAA+B;AAC5CC,EAAAA,kBAAkB,EAAE,kDAAkD;AACtEC,EAAAA,mBAAmB,EAAE,mDAAmD;AACxEC,EAAAA,kBAAkB,EAAE,kDAAkD;AACtEC,EAAAA,uBAAuB,EAAE,+DAA+D;AACxFC,EAAAA,mBAAmB,EAAE,mDAAmD;AACxEC,EAAAA,wBAAwB,EAAE,gEAAgE;AAE1FC,EAAAA,iBAAiB,EAAE,sCAAsC;AACzD;AACAC,EAAAA,sBAAsB,EAAE,8CAA8C;AACtEC,EAAAA,2BAA2B,EAAE,2DAA2D;AACxFC,EAAAA,uBAAuB,EAAE,+CAA+C;AACxEC,EAAAA,4BAA4B,EAAE,4DAA4D;AAE1FC,EAAAA,eAAe,EAAE,oCAAoC;AAErDC,EAAAA,SAAS,EAAE,6BAA6B;AACxCC,EAAAA,aAAa,EAAE,4CAA4C;AAC3DC,EAAAA,cAAc,EAAE,6CAA6C;AAC7DC,EAAAA,iBAAiB,EAAE,sCAAsC;AAEzDC,EAAAA,eAAe,EAAE,8BAA8B;AAE/CC,EAAAA,sBAAsB,EAAE,8CAA8C;AACtEC,EAAAA,uBAAuB,EAAE,+CAA+C;AACxEC,EAAAA,cAAc,EAAE,mCAAmC;AACnDC,EAAAA,gBAAgB,EAAE,gDAAgD;AAElEC,EAAAA,kBAAkB,EAAE,uCAAA;AACxB,EAAC;AAEM,IAAMC,OAAO,GAAG;AACnBC,EAAAA,yBAAyB,EAAE,8BAA8B;AACzDC,EAAAA,wBAAwB,EAAE,6BAAA;AAC9B;;;;"}
@@ -1,4 +1,4 @@
1
- import './base_1d0b3t4.css';
1
+ import './base_1e2ou53.css';
2
2
  var base = "b1wld3h3";
3
3
 
4
4
  export { base };
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sources":["../../../../src/components/Switch/_toggleSize/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { tokens } from '../Switch.tokens';\nimport { StyledTrigger } from '../Switch.styles';\n\nexport const base = css`\n ${StyledTrigger} {\n box-sizing: border-box;\n flex: 0 0 var(${tokens.trackWidth});\n\n border-style: solid;\n border-width: var(${tokens.trackBorderWidth});\n border-radius: var(${tokens.trackBorderRadius});\n\n width: var(${tokens.trackWidth});\n height: var(${tokens.trackHeight});\n\n &::after {\n width: var(${tokens.thumbSize});\n height: var(${tokens.thumbSize});\n border-radius: var(${tokens.thumbBorderRadius});\n margin: auto var(${tokens.thumbOffset});\n }\n }\n\n :active:not([disabled]) ${StyledTrigger}::after {\n width: calc(var(${tokens.thumbSize}) * var(${tokens.thumbPressScale}, 1));\n }\n`;\n"],"names":["base"],"mappings":"AAKO,IAAMA,IAAI,GAuBhB;;;;"}
1
+ {"version":3,"file":"base.js","sources":["../../../../src/components/Switch/_toggleSize/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { tokens } from '../Switch.tokens';\nimport { StyledInput, StyledTrigger } from '../Switch.styles';\n\nexport const base = css`\n ${StyledTrigger} {\n box-sizing: border-box;\n flex: 0 0 var(${tokens.trackWidth});\n\n border-style: solid;\n border-width: var(${tokens.trackBorderWidthOff});\n border-radius: var(${tokens.trackBorderRadius});\n\n width: var(${tokens.trackWidth});\n height: var(${tokens.trackHeight});\n\n &::after {\n width: var(${tokens.thumbSize});\n height: var(${tokens.thumbSize});\n border-radius: var(${tokens.thumbBorderRadius});\n margin: auto var(${tokens.thumbOffsetOff});\n }\n }\n\n ${StyledInput}:checked ~ ${StyledTrigger} {\n border-width: var(${tokens.trackBorderWidthOn}, var(${tokens.trackBorderWidthOff}));\n\n &::after {\n margin: auto var(${tokens.thumbOffsetOn});\n }\n }\n\n :active:not([disabled]) ${StyledTrigger}::after {\n width: calc(var(${tokens.thumbSize}) * var(${tokens.thumbPressScale}, 1));\n }\n`;\n"],"names":["base"],"mappings":"AAKO,IAAMA,IAAI,GA+BhB;;;;"}
@@ -0,0 +1 @@
1
+ .b1wld3h3 .s2cs3kf{box-sizing:border-box;-webkit-flex:0 0 var(--plasma-switch__track-width);-ms-flex:0 0 var(--plasma-switch__track-width);flex:0 0 var(--plasma-switch__track-width);border-style:solid;border-width:var(--plasma-switch__track_checked_false-border-width);border-radius:var(--plasma-switch__track-border-radius);width:var(--plasma-switch__track-width);height:var(--plasma-switch__track-height);}.b1wld3h3 .s2cs3kf::after{width:var(--plasma-switch__thumb-size);height:var(--plasma-switch__thumb-size);border-radius:var(--plasma-switch__thumb-border-radius);margin:auto var(--plasma-switch__thumb_checked_false-offset);}.b1wld3h3 .ssthlx1:checked ~ .s2cs3kf{border-width:var(--plasma-switch__track_checked_true-border-width,var(--plasma-switch__track_checked_false-border-width));}.b1wld3h3 .ssthlx1:checked ~ .s2cs3kf::after{margin:auto var(--plasma-switch__thumb_checked_true-offset);}.b1wld3h3:active:not([disabled]) .s2cs3kf::after{width:calc(var(--plasma-switch__thumb-size) * var(--plasma-switch__thumb-scale,1));}
@@ -1,4 +1,4 @@
1
- import './base_15atbyp.css';
1
+ import './base_qbpw2g.css';
2
2
  var base = "b1g0jmh3";
3
3
 
4
4
  export { base };
@@ -1 +1 @@
1
- .b1g0jmh3 .s2cs3kf{background-color:var(--plasma-switch__track_checked_false-bg-color);border-color:var(--plasma-switch__track-checked_false-border-color);}.b1g0jmh3 .ssthlx1:not([disabled]) ~ .s2cs3kf:hover{background-color:var(--plasma-switch__track_checked_false_hovered_true-bg-color,var(--plasma-switch__track_checked_false-bg-color));border-color:var(--plasma-switch__track-checked_false_hovered_true-border-color,var(--plasma-switch__track-checked_false-border-color));}.b1g0jmh3 .ssthlx1:checked ~ .s2cs3kf{background-color:var(--plasma-switch__track_checked_true-bg-color);border-color:var(--plasma-switch__track-checked_true-border-color);}.b1g0jmh3 .ssthlx1:checked:not([disabled]) ~ .s2cs3kf:hover{background-color:var(--plasma-switch__track_checked_true_hovered_true-bg-color,var(--plasma-switch__track_checked_true-bg-color));border-color:var(--plasma-switch__track-checked_true_hovered_true-border-color,var(--plasma-switch__track-checked_true-border-color));}.b1g0jmh3 .s2cs3kf::after{background-color:var(--plasma-switch__thumb-checked_false-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow);}.b1g0jmh3 .ssthlx1:checked ~ .s2cs3kf::after{background-color:var(--plasma-switch__thumb_checked_true-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow_checked_true,var(--plasma-switch__thumb-box-shadow));}.b1g0jmh3 .s1ilr5eq{color:var(--plasma-switch__label-color);}.b1g0jmh3 .sdjnckq{color:var(--plasma-switch__description-color);}
1
+ .b1g0jmh3 .s2cs3kf{background-color:var(--plasma-switch__track_checked_false-bg-color);border-color:var(--plasma-switch__track_checked_false-border-color);}.b1g0jmh3 .ssthlx1:not([disabled]) ~ .s2cs3kf:hover{background-color:var(--plasma-switch__track_checked_false_hovered_true-bg-color,var(--plasma-switch__track_checked_false-bg-color));border-color:var(--plasma-switch__track_checked_false_hovered_true-border-color,var(--plasma-switch__track_checked_false-border-color));}.b1g0jmh3 .ssthlx1:checked ~ .s2cs3kf{background-color:var(--plasma-switch__track_checked_true-bg-color);border-color:var(--plasma-switch__track_checked_true-border-color);}.b1g0jmh3 .ssthlx1:checked:not([disabled]) ~ .s2cs3kf:hover{background-color:var(--plasma-switch__track_checked_true_hovered_true-bg-color,var(--plasma-switch__track_checked_true-bg-color));border-color:var(--plasma-switch__track_checked_true_hovered_true-border-color,var(--plasma-switch__track_checked_true-border-color));}.b1g0jmh3 .s2cs3kf::after{background-color:var(--plasma-switch__thumb_checked_false-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow);}.b1g0jmh3 .ssthlx1:checked ~ .s2cs3kf::after{background-color:var(--plasma-switch__thumb_checked_true-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow_checked_true,var(--plasma-switch__thumb-box-shadow));}.b1g0jmh3 .s1ilr5eq{color:var(--plasma-switch__label-color);}.b1g0jmh3 .sdjnckq{color:var(--plasma-switch__description-color);}
@@ -1 +1 @@
1
- .Typography_styles_fa07dt_b1ru04lg__867729cb{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);overflow-wrap:normal;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual;hyphens:manual;}.Typography_styles_fa07dt_b1ru04lg__867729cb.Typography_styles_fa07dt_typographyBold__867729cb{font-weight:var(--typo-font-weight-bold);}.Typography_styles_fa07dt_b1ru04lg__867729cb.Typography_styles_fa07dt_withNoWrap__867729cb{white-space:nowrap;}.Typography_styles_fa07dt_b1ru04lg__867729cb.Typography_styles_fa07dt_withBreakWord__867729cb{overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
1
+ .Typography_styles_6mr47g_b1ru04lg__ff3be7fe{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);overflow-wrap:normal;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual;hyphens:manual;}.Typography_styles_6mr47g_b1ru04lg__ff3be7fe.Typography_styles_6mr47g_typographyBold__ff3be7fe{font-weight:var(--typo-font-weight-bold);}.Typography_styles_6mr47g_b1ru04lg__ff3be7fe.Typography_styles_6mr47g_withBreakWord__ff3be7fe{overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
@@ -1 +1 @@
1
- .TypographyOld_styles_168abbx_b9p5ato__094dcd73{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);overflow-wrap:normal;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual;hyphens:manual;}.TypographyOld_styles_168abbx_b9p5ato__094dcd73.TypographyOld_styles_168abbx_withNoWrap__094dcd73{white-space:nowrap;}.TypographyOld_styles_168abbx_b9p5ato__094dcd73.TypographyOld_styles_168abbx_withBreakWord__094dcd73{overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
1
+ .TypographyOld_styles_17w0rtq_b9p5ato__18359621{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);overflow-wrap:normal;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual;hyphens:manual;}.TypographyOld_styles_17w0rtq_b9p5ato__18359621.TypographyOld_styles_17w0rtq_withBreakWord__18359621{overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
@@ -1 +1 @@
1
- .Paragraph_styles_f6q9s8_bgybk92__e9eeb09f{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);margin:0;overflow-wrap:normal;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual;hyphens:manual;}.Paragraph_styles_f6q9s8_bgybk92__e9eeb09f.Paragraph_styles_f6q9s8_withNoWrap__e9eeb09f{white-space:nowrap;}.Paragraph_styles_f6q9s8_bgybk92__e9eeb09f.Paragraph_styles_f6q9s8_withBreakWord__e9eeb09f{overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
1
+ .Paragraph_styles_179bahu_bgybk92__d9a8cadb{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);margin:0;overflow-wrap:normal;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual;hyphens:manual;}.Paragraph_styles_179bahu_bgybk92__d9a8cadb.Paragraph_styles_179bahu_withBreakWord__d9a8cadb{overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
@@ -1,4 +1,4 @@
1
- import './Paragraph.styles_f6q9s8.css';
1
+ import './Paragraph.styles_179bahu.css';
2
2
  var base = "bgybk92";
3
3
 
4
4
  export { base };
@@ -1 +1 @@
1
- {"version":3,"file":"Paragraph.styles.js","sources":["../../../../../src/components/Typography/Old/Paragraph/Paragraph.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../tokens';\nimport { applyHyphens, applyHyphensNormal } from '../../../../mixins';\n\nexport const base = css`\n font-family: var(${tokens.typoFontFamily});\n font-size: var(${tokens.typoFontSize});\n font-style: var(${tokens.typoFontStyle});\n letter-spacing: var(${tokens.typoFontLetterSpacing});\n line-height: var(${tokens.typoFontLineHeight});\n font-weight: var(${tokens.typoFontWeight});\n margin: 0;\n\n &.${classes.typoWithNoWrap} {\n white-space: nowrap;\n }\n\n ${applyHyphensNormal};\n\n &.${classes.typoWithBreakWord} {\n ${applyHyphens};\n }\n`;\n"],"names":["base"],"mappings":"AAKO,IAAMA,IAAI,GAkBhB;;;;"}
1
+ {"version":3,"file":"Paragraph.styles.js","sources":["../../../../../src/components/Typography/Old/Paragraph/Paragraph.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../tokens';\nimport { applyHyphens, applyHyphensNormal } from '../../../../mixins';\n\nexport const base = css`\n font-family: var(${tokens.typoFontFamily});\n font-size: var(${tokens.typoFontSize});\n font-style: var(${tokens.typoFontStyle});\n letter-spacing: var(${tokens.typoFontLetterSpacing});\n line-height: var(${tokens.typoFontLineHeight});\n font-weight: var(${tokens.typoFontWeight});\n margin: 0;\n\n ${String(applyHyphensNormal)};\n\n &.${String(classes.typoWithBreakWord)} {\n ${String(applyHyphens)};\n }\n`;\n"],"names":["base"],"mappings":"AAKO,IAAMA,IAAI,GAchB;;;;"}
@@ -1 +1 @@
1
- .bgybk92{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);margin:0;overflow-wrap:normal;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual;hyphens:manual;}.bgybk92.with-no-wrap{white-space:nowrap;}.bgybk92.with-break-word{overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
1
+ .bgybk92{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);margin:0;overflow-wrap:normal;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual;hyphens:manual;}.bgybk92.with-break-word{overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
@@ -1 +1 @@
1
- .Subtitle_styles_g6d0r2_b810c19__dce1fd86{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}.Subtitle_styles_g6d0r2_b810c19__dce1fd86.Subtitle_styles_g6d0r2_withNoWrap__dce1fd86{white-space:nowrap;}
1
+ .Subtitle_styles_1plleej_b810c19__d9c54bce{font-family:var(--typo-font-family);font-size:var(--typo-font-size);font-style:var(--typo-font-style);-webkit-letter-spacing:var(--typo-font-letter-spacing);-moz-letter-spacing:var(--typo-font-letter-spacing);-ms-letter-spacing:var(--typo-font-letter-spacing);letter-spacing:var(--typo-font-letter-spacing);line-height:var(--typo-font-line-height);font-weight:var(--typo-font-weight);overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
@@ -2,25 +2,19 @@ import { objectWithoutProperties as _objectWithoutProperties, extends as _extend
2
2
  import React, { forwardRef } from 'react';
3
3
  import { applySpacing } from '../../../../mixins/applySpacing.js';
4
4
  import { base as base$1 } from '../../variations/_size/base.js';
5
- import { classes } from '../../tokens.js';
6
- import { cx } from '../../../../utils/index.js';
7
5
  import { base } from './Subtitle.styles.js';
8
6
 
9
- var _excluded = ["size", "children", "color", "noWrap", "className", "style"];
7
+ var _excluded = ["size", "children", "color", "style"];
10
8
  var subtitleRoot = function subtitleRoot(Root) {
11
9
  return /*#__PURE__*/forwardRef(function (props, ref) {
12
10
  var size = props.size,
13
11
  children = props.children,
14
12
  color = props.color,
15
- noWrap = props.noWrap,
16
- className = props.className,
17
13
  style = props.style,
18
14
  rest = _objectWithoutProperties(props, _excluded);
19
- var withNoWrap = noWrap ? classes.typoWithNoWrap : undefined;
20
15
  return /*#__PURE__*/React.createElement(Root, _extends({
21
16
  size: size,
22
17
  ref: ref,
23
- className: cx(withNoWrap, className),
24
18
  style: _objectSpread2(_objectSpread2({
25
19
  color: color
26
20
  }, style), applySpacing(rest))