@salutejs/plasma-new-hope 0.195.0-canary.1572.11914481185.0 → 0.195.0-dev.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) hide show
  1. package/cjs/components/Badge/Badge.css +4 -4
  2. package/cjs/components/Badge/Badge.js +17 -7
  3. package/cjs/components/Badge/Badge.js.map +1 -1
  4. package/cjs/components/Badge/Badge.tokens.js +10 -5
  5. package/cjs/components/Badge/Badge.tokens.js.map +1 -1
  6. package/cjs/components/Badge/variations/_clear/base.js +1 -1
  7. package/cjs/components/Badge/variations/_clear/base.js.map +1 -1
  8. package/cjs/components/Badge/variations/_clear/base_wiboj8.css +1 -0
  9. package/cjs/components/Badge/variations/_size/base.js +1 -1
  10. package/cjs/components/Badge/variations/_size/base.js.map +1 -1
  11. package/{es/components/Badge/variations/_size/base_to0y5x.css → cjs/components/Badge/variations/_size/base_bu5opk.css} +1 -1
  12. package/cjs/components/Badge/variations/_transparent/base.js +1 -1
  13. package/cjs/components/Badge/variations/_transparent/base.js.map +1 -1
  14. package/cjs/components/Badge/variations/_transparent/base_aapqhz.css +1 -0
  15. package/cjs/components/Badge/variations/_view/base.js +1 -1
  16. package/cjs/components/Badge/variations/_view/base.js.map +1 -1
  17. package/cjs/components/Badge/variations/_view/base_j3xzf3.css +1 -0
  18. package/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  19. package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  20. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  21. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  22. package/cjs/components/Calendar/store/reducer.js +2 -2
  23. package/cjs/components/Calendar/store/reducer.js.map +1 -1
  24. package/cjs/components/Combobox/ComboboxNew/Combobox.js +18 -4
  25. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  26. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  27. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  28. package/cjs/components/Combobox/ComboboxOld/Combobox.css +5 -4
  29. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +5 -4
  30. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +5 -4
  31. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +5 -4
  32. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +5 -4
  33. package/cjs/components/Dropdown/Dropdown.css +5 -4
  34. package/cjs/components/Dropdown/Dropdown.js +4 -2
  35. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  36. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +5 -4
  37. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -2
  38. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  39. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +7 -1
  40. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  41. package/cjs/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_1b439rx.css → DropdownItem.styles_14yih1y.css} +1 -0
  42. package/cjs/components/Select/Select.js +0 -1
  43. package/cjs/components/Select/Select.js.map +1 -1
  44. package/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -2
  45. package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  46. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +18 -3
  47. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  48. package/cjs/index.css +9 -8
  49. package/emotion/cjs/components/Badge/Badge.js +17 -7
  50. package/emotion/cjs/components/Badge/Badge.template-doc.mdx +40 -16
  51. package/emotion/cjs/components/Badge/Badge.tokens.js +10 -6
  52. package/emotion/cjs/components/Badge/variations/_clear/base.js +1 -1
  53. package/emotion/cjs/components/Badge/variations/_size/base.js +2 -1
  54. package/emotion/cjs/components/Badge/variations/_transparent/base.js +1 -1
  55. package/emotion/cjs/components/Badge/variations/_view/base.js +1 -1
  56. package/emotion/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  57. package/emotion/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  58. package/emotion/cjs/components/Calendar/store/reducer.js +2 -2
  59. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +22 -4
  60. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  61. package/emotion/cjs/components/Dropdown/Dropdown.js +4 -2
  62. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -2
  63. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +15 -11
  64. package/emotion/cjs/components/Select/Select.js +0 -1
  65. package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -2
  66. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +24 -3
  67. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
  68. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  69. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.config.js +14 -14
  70. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  71. package/emotion/es/components/Badge/Badge.js +18 -8
  72. package/emotion/es/components/Badge/Badge.template-doc.mdx +40 -16
  73. package/emotion/es/components/Badge/Badge.tokens.js +9 -5
  74. package/emotion/es/components/Badge/variations/_clear/base.js +2 -2
  75. package/emotion/es/components/Badge/variations/_size/base.js +3 -2
  76. package/emotion/es/components/Badge/variations/_transparent/base.js +2 -2
  77. package/emotion/es/components/Badge/variations/_view/base.js +2 -2
  78. package/emotion/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  79. package/emotion/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  80. package/emotion/es/components/Calendar/store/reducer.js +2 -2
  81. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +22 -4
  82. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  83. package/emotion/es/components/Dropdown/Dropdown.js +4 -2
  84. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -3
  85. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +15 -11
  86. package/emotion/es/components/Select/Select.js +0 -1
  87. package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +1 -2
  88. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +24 -3
  89. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
  90. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  91. package/emotion/es/examples/plasma_web/components/Badge/Badge.config.js +14 -14
  92. package/emotion/es/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  93. package/es/components/Badge/Badge.css +4 -4
  94. package/es/components/Badge/Badge.js +20 -10
  95. package/es/components/Badge/Badge.js.map +1 -1
  96. package/es/components/Badge/Badge.tokens.js +10 -6
  97. package/es/components/Badge/Badge.tokens.js.map +1 -1
  98. package/es/components/Badge/variations/_clear/base.js +1 -1
  99. package/es/components/Badge/variations/_clear/base.js.map +1 -1
  100. package/es/components/Badge/variations/_clear/base_wiboj8.css +1 -0
  101. package/es/components/Badge/variations/_size/base.js +1 -1
  102. package/es/components/Badge/variations/_size/base.js.map +1 -1
  103. package/{cjs/components/Badge/variations/_size/base_to0y5x.css → es/components/Badge/variations/_size/base_bu5opk.css} +1 -1
  104. package/es/components/Badge/variations/_transparent/base.js +1 -1
  105. package/es/components/Badge/variations/_transparent/base.js.map +1 -1
  106. package/es/components/Badge/variations/_transparent/base_aapqhz.css +1 -0
  107. package/es/components/Badge/variations/_view/base.js +1 -1
  108. package/es/components/Badge/variations/_view/base.js.map +1 -1
  109. package/es/components/Badge/variations/_view/base_j3xzf3.css +1 -0
  110. package/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  111. package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  112. package/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  113. package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  114. package/es/components/Calendar/store/reducer.js +2 -2
  115. package/es/components/Calendar/store/reducer.js.map +1 -1
  116. package/es/components/Combobox/ComboboxNew/Combobox.js +19 -5
  117. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  118. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  119. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  120. package/es/components/Combobox/ComboboxOld/Combobox.css +5 -4
  121. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +5 -4
  122. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +5 -4
  123. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +5 -4
  124. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +5 -4
  125. package/es/components/Dropdown/Dropdown.css +5 -4
  126. package/es/components/Dropdown/Dropdown.js +4 -2
  127. package/es/components/Dropdown/Dropdown.js.map +1 -1
  128. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +5 -4
  129. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -3
  130. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  131. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +7 -2
  132. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  133. package/es/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_1b439rx.css → DropdownItem.styles_14yih1y.css} +1 -0
  134. package/es/components/Select/Select.js +0 -1
  135. package/es/components/Select/Select.js.map +1 -1
  136. package/es/components/Select/ui/Inner/ui/Item/Item.js +1 -2
  137. package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  138. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +19 -4
  139. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  140. package/es/index.css +9 -8
  141. package/package.json +3 -2
  142. package/styled-components/cjs/components/Badge/Badge.js +17 -7
  143. package/styled-components/cjs/components/Badge/Badge.template-doc.mdx +40 -16
  144. package/styled-components/cjs/components/Badge/Badge.tokens.js +10 -6
  145. package/styled-components/cjs/components/Badge/variations/_clear/base.js +1 -1
  146. package/styled-components/cjs/components/Badge/variations/_size/base.js +2 -1
  147. package/styled-components/cjs/components/Badge/variations/_transparent/base.js +1 -1
  148. package/styled-components/cjs/components/Badge/variations/_view/base.js +1 -1
  149. package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  150. package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  151. package/styled-components/cjs/components/Calendar/store/reducer.js +2 -2
  152. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +22 -4
  153. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  154. package/styled-components/cjs/components/Dropdown/Dropdown.js +4 -2
  155. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -2
  156. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +5 -2
  157. package/styled-components/cjs/components/Select/Select.js +0 -1
  158. package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -2
  159. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +24 -3
  160. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
  161. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  162. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.config.js +5 -5
  163. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  164. package/styled-components/es/components/Badge/Badge.js +18 -8
  165. package/styled-components/es/components/Badge/Badge.template-doc.mdx +40 -16
  166. package/styled-components/es/components/Badge/Badge.tokens.js +9 -5
  167. package/styled-components/es/components/Badge/variations/_clear/base.js +2 -2
  168. package/styled-components/es/components/Badge/variations/_size/base.js +3 -2
  169. package/styled-components/es/components/Badge/variations/_transparent/base.js +2 -2
  170. package/styled-components/es/components/Badge/variations/_view/base.js +2 -2
  171. package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  172. package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  173. package/styled-components/es/components/Calendar/store/reducer.js +2 -2
  174. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +22 -4
  175. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  176. package/styled-components/es/components/Dropdown/Dropdown.js +4 -2
  177. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -3
  178. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +5 -2
  179. package/styled-components/es/components/Select/Select.js +0 -1
  180. package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +1 -2
  181. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +24 -3
  182. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
  183. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  184. package/styled-components/es/examples/plasma_web/components/Badge/Badge.config.js +5 -5
  185. package/styled-components/es/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  186. package/types/components/Badge/Badge.d.ts.map +1 -1
  187. package/types/components/Badge/Badge.tokens.d.ts +8 -4
  188. package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
  189. package/types/components/Badge/Badge.types.d.ts +18 -5
  190. package/types/components/Badge/Badge.types.d.ts.map +1 -1
  191. package/types/components/Badge/variations/_clear/base.d.ts.map +1 -1
  192. package/types/components/Badge/variations/_size/base.d.ts.map +1 -1
  193. package/types/components/Calendar/store/reducer.d.ts +1 -1
  194. package/types/components/Calendar/store/reducer.d.ts.map +1 -1
  195. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  196. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +1 -2
  197. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  198. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.d.ts.map +1 -1
  199. package/types/components/Dropdown/Dropdown.d.ts +50 -2
  200. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  201. package/types/components/Dropdown/Dropdown.types.d.ts +11 -6
  202. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  203. package/types/components/Dropdown/index.d.ts +1 -0
  204. package/types/components/Dropdown/index.d.ts.map +1 -1
  205. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  206. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +1 -0
  207. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
  208. package/types/components/Select/Select.d.ts.map +1 -1
  209. package/types/components/Select/Select.types.d.ts +1 -2
  210. package/types/components/Select/Select.types.d.ts.map +1 -1
  211. package/types/components/Select/ui/Inner/ui/Item/Item.d.ts.map +1 -1
  212. package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
  213. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
  214. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +61 -4
  215. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
  216. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +25 -1
  217. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -1
  218. package/types/examples/plasma_web/components/Badge/Badge.config.d.ts.map +1 -1
  219. package/types/examples/plasma_web/components/Badge/Badge.d.ts +61 -4
  220. package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
  221. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +25 -1
  222. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -1
  223. package/cjs/components/Badge/variations/_clear/base_oopyb7.css +0 -1
  224. package/cjs/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
  225. package/cjs/components/Badge/variations/_view/base_qlxank.css +0 -1
  226. package/es/components/Badge/variations/_clear/base_oopyb7.css +0 -1
  227. package/es/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
  228. package/es/components/Badge/variations/_view/base_qlxank.css +0 -1
@@ -1,12 +1,12 @@
1
- .base_qlxank_b5zny0e__7dda249c{color:var(--plasma-badge-color);background-color:var(--plasma-badge-background);}
1
+ .base_j3xzf3_b5zny0e__f0386786{color:var(--plasma-badge-custom-color,var(--plasma-badge-color));background-color:var(--plasma-badge-custom-background,var(--plasma-badge-background));}
2
2
 
3
- .base_to0y5x_bb8jvo5__5c9e1c86{font-family:var(--plasma-badge-font-family);font-size:var(--plasma-badge-font-size);font-style:var(--plasma-badge-font-style);font-weight:var(--plasma-badge-font-weight);-webkit-letter-spacing:var(--plasma-badge-letter-spacing);-moz-letter-spacing:var(--plasma-badge-letter-spacing);-ms-letter-spacing:var(--plasma-badge-letter-spacing);letter-spacing:var(--plasma-badge-letter-spacing);line-height:var(--plasma-badge-lineheight);border-radius:var(--plasma-badge-border-radius);height:var(--plasma-badge-height);padding-top:var(--plasma-badge-padding-top);padding-right:var(--plasma-badge-padding-right);padding-bottom:var(--plasma-badge-padding-bottom);padding-left:var(--plasma-badge-padding-left);}
3
+ .base_bu5opk_bb8jvo5__18c67c14{font-family:var(--plasma-badge-font-family);font-size:var(--plasma-badge-font-size);font-style:var(--plasma-badge-font-style);font-weight:var(--plasma-badge-font-weight);-webkit-letter-spacing:var(--plasma-badge-letter-spacing);-moz-letter-spacing:var(--plasma-badge-letter-spacing);-ms-letter-spacing:var(--plasma-badge-letter-spacing);letter-spacing:var(--plasma-badge-letter-spacing);line-height:var(--plasma-badge-lineheight);border-radius:var(--plasma-badge-border-radius);height:var(--plasma-badge-height);padding:var(--plasma-badge-padding);}.base_bu5opk_bb8jvo5__18c67c14.base_bu5opk_badgeIconOnly__18c67c14{padding:var(--plasma-badge-padding-icon-only);}.base_bu5opk_bb8jvo5__18c67c14.base_bu5opk_badgeIconOnly__18c67c14 .base_bu5opk_s1t43xoe__18c67c14{margin:0;}
4
4
 
5
5
  .base_zpvffd_b3w4z61__f9738ae7.base_zpvffd_badgePilled__f9738ae7{border-radius:var(--plasma-badge-pilled-border-radius);}
6
6
 
7
- .base_1l6036y_binquhc__5cc72580.base_1l6036y_badgeTransparent__5cc72580{color:var(--plasma-badge-color-transparent);background-color:var(--plasma-badge-background-transparent);}
7
+ .base_aapqhz_binquhc__81eb1c83.base_aapqhz_badgeTransparent__81eb1c83{color:var(--plasma-badge-custom-color,var(--plasma-badge-color-transparent));background-color:var(--plasma-badge-custom-background,var(--plasma-badge-background-transparent));}
8
8
 
9
- .base_oopyb7_b1e1wuvi__72387433.base_oopyb7_badgeClear__72387433{color:var(--plasma-badge-color-clear);background-color:transparent;padding:0;}
9
+ .base_wiboj8_b1e1wuvi__44d619d2.base_wiboj8_badgeClear__44d619d2{color:var(--plasma-badge-custom-color,var(--plasma-badge-color-clear));background-color:var(--plasma-badge-custom-background,var(--plasma-badge-background-clear));}
10
10
 
11
11
  .Badge_styles_hhbwyi_s1t43xoe__47a1842a{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-badge-left-content-margin-left);margin-right:var(--plasma-badge-left-content-margin-right);}
12
12
 
@@ -13,16 +13,20 @@ var base$4 = require('./variations/_clear/base.js');
13
13
  var Badge_styles = require('./Badge.styles.js');
14
14
  var Badge_tokens = require('./Badge.tokens.js');
15
15
 
16
- var _excluded = ["children", "className", "text", "contentLeft", "contentRight", "size", "view", "pilled", "transparent", "clear", "maxWidth"];
16
+ var _excluded = ["children", "className", "style", "text", "contentLeft", "contentRight", "size", "view", "customColor", "customBackgroundColor", "pilled", "transparent", "clear", "maxWidth"];
17
17
  var badgeRoot = function badgeRoot(Root) {
18
18
  return /*#__PURE__*/React.forwardRef(function (props, ref) {
19
+ var _StyledContentLeft, _StyledContentMain, _StyledContentMain2, _StyledContentRight;
19
20
  var children = props.children,
20
21
  className = props.className,
22
+ style = props.style,
21
23
  text = props.text,
22
24
  contentLeft = props.contentLeft,
23
25
  contentRight = props.contentRight,
24
26
  size = props.size,
25
27
  view = props.view,
28
+ customColor = props.customColor,
29
+ customBackgroundColor = props.customBackgroundColor,
26
30
  _props$pilled = props.pilled,
27
31
  pilled = _props$pilled === void 0 ? false : _props$pilled,
28
32
  _props$transparent = props.transparent,
@@ -37,19 +41,25 @@ var badgeRoot = function badgeRoot(Root) {
37
41
  var clearClass = clear ? Badge_tokens.classes.badgeClear : undefined;
38
42
  var truncateClass = maxWidth !== 'auto' ? Badge_tokens.classes.badgeTruncate : undefined;
39
43
  var txt = !text && typeof children === 'string' ? children : text;
44
+ var iconOnlyClass = !txt && contentLeft ? Badge_tokens.classes.iconOnly : undefined;
45
+ var BadgeContent = function BadgeContent() {
46
+ if (contentLeft) {
47
+ return /*#__PURE__*/React.createElement(React.Fragment, null, _StyledContentLeft || (_StyledContentLeft = /*#__PURE__*/React.createElement(Badge_styles.StyledContentLeft, null, contentLeft)), txt ? _StyledContentMain || (_StyledContentMain = /*#__PURE__*/React.createElement(Badge_styles.StyledContentMain, null, txt)) : children);
48
+ }
49
+ return /*#__PURE__*/React.createElement(React.Fragment, null, txt ? _StyledContentMain2 || (_StyledContentMain2 = /*#__PURE__*/React.createElement(Badge_styles.StyledContentMain, null, txt)) : children, contentRight && (_StyledContentRight || (_StyledContentRight = /*#__PURE__*/React.createElement(Badge_styles.StyledContentRight, null, contentRight))));
50
+ };
40
51
  return /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
41
52
  ref: ref,
42
- className: index.cx(pilledClass, transparentClass, clearClass, truncateClass, className),
53
+ className: index.cx(pilledClass, transparentClass, clearClass, truncateClass, iconOnlyClass, className),
43
54
  view: view,
44
55
  size: size,
45
56
  pilled: pilled,
46
57
  transparent: transparent,
47
- clear: clear
48
- }, rest, {
49
- style: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, rest.style), {}, {
58
+ clear: clear,
59
+ style: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, style), {}, _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({
50
60
  maxWidth: maxWidth
51
- })
52
- }), contentLeft && /*#__PURE__*/React.createElement(Badge_styles.StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(Badge_styles.StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(Badge_styles.StyledContentRight, null, contentRight));
61
+ }, Badge_tokens.privateTokens.customBackground, customBackgroundColor), Badge_tokens.privateTokens.customColor, customColor))
62
+ }, rest), /*#__PURE__*/React.createElement(BadgeContent, null));
53
63
  });
54
64
  };
55
65
  var badgeConfig = {
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as pilledCSS } from './variations/_pilled/base';\nimport { base as transparentCSS } from './variations/_transparent/base';\nimport { base as clearCSS } from './variations/_clear/base';\nimport type { BadgeProps, BadgeRootProps } from './Badge.types';\nimport { StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Badge.styles';\nimport { classes } from './Badge.tokens';\n\nexport const badgeRoot = (Root: RootProps<HTMLDivElement, BadgeRootProps>) =>\n forwardRef<HTMLDivElement, BadgeProps>((props, ref) => {\n const {\n children,\n className,\n text,\n contentLeft,\n contentRight,\n size,\n view,\n pilled = false,\n transparent = false,\n clear = false,\n maxWidth = 'auto',\n ...rest\n } = props;\n\n const pilledClass = pilled ? classes.badgePilled : undefined;\n const transparentClass = transparent ? classes.badgeTransparent : undefined;\n const clearClass = clear ? classes.badgeClear : undefined;\n const truncateClass = maxWidth !== 'auto' ? classes.badgeTruncate : undefined;\n\n const txt = !text && typeof children === 'string' ? children : text;\n\n return (\n <Root\n ref={ref}\n className={cx(pilledClass, transparentClass, clearClass, truncateClass, className)}\n view={view}\n size={size}\n pilled={pilled}\n transparent={transparent}\n clear={clear}\n {...rest}\n style={{\n ...rest.style,\n maxWidth,\n }}\n >\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n {txt ? <StyledContentMain>{txt}</StyledContentMain> : children}\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n </Root>\n );\n });\n\nexport const badgeConfig = {\n name: 'Badge',\n tag: 'div',\n layout: badgeRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n pilled: {\n css: pilledCSS,\n attrs: true,\n },\n transparent: {\n css: transparentCSS,\n attrs: true,\n },\n clear: {\n css: clearCSS,\n attrs: true,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["badgeRoot","Root","forwardRef","props","ref","children","className","text","contentLeft","contentRight","size","view","_props$pilled","pilled","_props$transparent","transparent","_props$clear","clear","_props$maxWidth","maxWidth","rest","_objectWithoutProperties","_excluded","pilledClass","classes","badgePilled","undefined","transparentClass","badgeTransparent","clearClass","badgeClear","truncateClass","badgeTruncate","txt","React","createElement","_extends","cx","style","_objectSpread","StyledContentLeft","StyledContentMain","StyledContentRight","badgeConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","pilledCSS","attrs","transparentCSS","clearCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;IAc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AAA,IAAI,EAAJA,iBAAI;AACJC,EAAAA,UAAU,EAAE;AACRrC,IAAAA,IAAI,EAAE;AACFsC,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDxC,IAAAA,IAAI,EAAE;AACFuC,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACDtC,IAAAA,MAAM,EAAE;AACJoC,MAAAA,GAAG,EAAEG,WAAS;AACdC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDtC,IAAAA,WAAW,EAAE;AACTkC,MAAAA,GAAG,EAAEK,WAAc;AACnBD,MAAAA,KAAK,EAAE,IAAA;KACV;AACDpC,IAAAA,KAAK,EAAE;AACHgC,MAAAA,GAAG,EAAEM,WAAQ;AACbF,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDG,EAAAA,QAAQ,EAAE;AACN7C,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import React, { CSSProperties, forwardRef } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as pilledCSS } from './variations/_pilled/base';\nimport { base as transparentCSS } from './variations/_transparent/base';\nimport { base as clearCSS } from './variations/_clear/base';\nimport type { BadgeProps, BadgeRootProps } from './Badge.types';\nimport { StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Badge.styles';\nimport { classes, privateTokens } from './Badge.tokens';\n\nexport const badgeRoot = (Root: RootProps<HTMLDivElement, BadgeRootProps>) =>\n forwardRef<HTMLDivElement, BadgeProps>((props, ref) => {\n const {\n children,\n className,\n style,\n text,\n contentLeft,\n contentRight,\n size,\n view,\n customColor,\n customBackgroundColor,\n pilled = false,\n transparent = false,\n clear = false,\n maxWidth = 'auto',\n ...rest\n } = props;\n\n const pilledClass = pilled ? classes.badgePilled : undefined;\n const transparentClass = transparent ? classes.badgeTransparent : undefined;\n const clearClass = clear ? classes.badgeClear : undefined;\n const truncateClass = maxWidth !== 'auto' ? classes.badgeTruncate : undefined;\n\n const txt = !text && typeof children === 'string' ? children : text;\n const iconOnlyClass = !txt && contentLeft ? classes.iconOnly : undefined;\n\n const BadgeContent = () => {\n if (contentLeft) {\n return (\n <>\n <StyledContentLeft>{contentLeft}</StyledContentLeft>\n {txt ? <StyledContentMain>{txt}</StyledContentMain> : children}\n </>\n );\n }\n\n return (\n <>\n {txt ? <StyledContentMain>{txt}</StyledContentMain> : children}\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n </>\n );\n };\n\n return (\n <Root\n ref={ref}\n className={cx(pilledClass, transparentClass, clearClass, truncateClass, iconOnlyClass, className)}\n view={view}\n size={size}\n pilled={pilled}\n transparent={transparent}\n clear={clear}\n style={\n {\n ...style,\n maxWidth,\n [privateTokens.customBackground]: customBackgroundColor,\n [privateTokens.customColor]: customColor,\n } as CSSProperties\n }\n {...rest}\n >\n <BadgeContent />\n </Root>\n );\n });\n\nexport const badgeConfig = {\n name: 'Badge',\n tag: 'div',\n layout: badgeRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n pilled: {\n css: pilledCSS,\n attrs: true,\n },\n transparent: {\n css: transparentCSS,\n attrs: true,\n },\n clear: {\n css: clearCSS,\n attrs: true,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["badgeRoot","Root","forwardRef","props","ref","_StyledContentLeft","_StyledContentMain","_StyledContentMain2","_StyledContentRight","children","className","style","text","contentLeft","contentRight","size","view","customColor","customBackgroundColor","_props$pilled","pilled","_props$transparent","transparent","_props$clear","clear","_props$maxWidth","maxWidth","rest","_objectWithoutProperties","_excluded","pilledClass","classes","badgePilled","undefined","transparentClass","badgeTransparent","clearClass","badgeClear","truncateClass","badgeTruncate","txt","iconOnlyClass","iconOnly","BadgeContent","React","createElement","Fragment","StyledContentLeft","StyledContentMain","StyledContentRight","_extends","cx","_objectSpread","_defineProperty","privateTokens","customBackground","badgeConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","pilledCSS","attrs","transparentCSS","clearCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;IAcaA,SAAS,GAAG,SAAZA,SAASA,CAAIC,IAA+C,EAAA;AAAA,EAAA,oBACrEC,gBAAU,CAA6B,UAACC,KAAK,EAAEC,GAAG,EAAK;AAAA,IAAA,IAAAC,kBAAA,EAAAC,kBAAA,EAAAC,mBAAA,EAAAC,mBAAA,CAAA;AACnD,IAAA,IACIC,QAAQ,GAeRN,KAAK,CAfLM,QAAQ;MACRC,SAAS,GAcTP,KAAK,CAdLO,SAAS;MACTC,KAAK,GAaLR,KAAK,CAbLQ,KAAK;MACLC,IAAI,GAYJT,KAAK,CAZLS,IAAI;MACJC,WAAW,GAWXV,KAAK,CAXLU,WAAW;MACXC,YAAY,GAUZX,KAAK,CAVLW,YAAY;MACZC,IAAI,GASJZ,KAAK,CATLY,IAAI;MACJC,IAAI,GAQJb,KAAK,CARLa,IAAI;MACJC,WAAW,GAOXd,KAAK,CAPLc,WAAW;MACXC,qBAAqB,GAMrBf,KAAK,CANLe,qBAAqB;MAAAC,aAAA,GAMrBhB,KAAK,CALLiB,MAAM;AAANA,MAAAA,MAAM,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;MAAAE,kBAAA,GAKdlB,KAAK,CAJLmB,WAAW;AAAXA,MAAAA,WAAW,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,kBAAA;MAAAE,YAAA,GAInBpB,KAAK,CAHLqB,KAAK;AAALA,MAAAA,KAAK,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,YAAA;MAAAE,eAAA,GAGbtB,KAAK,CAFLuB,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,eAAA,KAA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AA;KACR;AACDhD,IAAAA,IAAI,EAAE;AACF+C,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACD5C,IAAAA,MAAM,EAAE;AACJ0C,MAAAA,GAAG,EAAEG,WAAS;AACdC,MAAAA,KAAK,EAAE,IAAA;KACV;AACD5C,IAAAA,WAAW,EAAE;AACTwC,MAAAA,GAAG,EAAEK,WAAc;AACnBD,MAAAA,KAAK,EAAE,IAAA;KACV;AACD1C,IAAAA,KAAK,EAAE;AACHsC,MAAAA,GAAG,EAAEM,WAAQ;AACbF,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDG,EAAAA,QAAQ,EAAE;AACNrD,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
@@ -6,7 +6,12 @@ var classes = {
6
6
  badgePilled: 'badge-pilled',
7
7
  badgeTransparent: 'badge-transparent',
8
8
  badgeClear: 'badge-clear',
9
- badgeTruncate: 'badge-truncate'
9
+ badgeTruncate: 'badge-truncate',
10
+ iconOnly: 'badge-icon-only'
11
+ };
12
+ var privateTokens = {
13
+ customBackground: '--plasma-badge-custom-background',
14
+ customColor: '--plasma-badge-custom-color'
10
15
  };
11
16
  var tokens = {
12
17
  background: '--plasma-badge-background',
@@ -14,13 +19,12 @@ var tokens = {
14
19
  backgroundTransparent: '--plasma-badge-background-transparent',
15
20
  colorTransparent: '--plasma-badge-color-transparent',
16
21
  colorClear: '--plasma-badge-color-clear',
22
+ backgroundClear: '--plasma-badge-background-clear',
17
23
  borderRadius: '--plasma-badge-border-radius',
18
24
  pilledBorderRadius: '--plasma-badge-pilled-border-radius',
19
25
  height: '--plasma-badge-height',
20
- paddingTop: '--plasma-badge-padding-top',
21
- paddingRight: '--plasma-badge-padding-right',
22
- paddingBottom: '--plasma-badge-padding-bottom',
23
- paddingLeft: '--plasma-badge-padding-left',
26
+ padding: '--plasma-badge-padding',
27
+ paddingIconOnly: '--plasma-badge-padding-icon-only',
24
28
  fontFamily: '--plasma-badge-font-family',
25
29
  fontSize: '--plasma-badge-font-size',
26
30
  fontStyle: '--plasma-badge-font-style',
@@ -34,5 +38,6 @@ var tokens = {
34
38
  };
35
39
 
36
40
  exports.classes = classes;
41
+ exports.privateTokens = privateTokens;
37
42
  exports.tokens = tokens;
38
43
  //# sourceMappingURL=Badge.tokens.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.tokens.js","sources":["../../../src/components/Badge/Badge.tokens.ts"],"sourcesContent":["export const classes = {\n badgePilled: 'badge-pilled',\n badgeTransparent: 'badge-transparent',\n badgeClear: 'badge-clear',\n badgeTruncate: 'badge-truncate',\n};\n\nexport const tokens = {\n background: '--plasma-badge-background',\n color: '--plasma-badge-color',\n backgroundTransparent: '--plasma-badge-background-transparent',\n colorTransparent: '--plasma-badge-color-transparent',\n colorClear: '--plasma-badge-color-clear',\n\n borderRadius: '--plasma-badge-border-radius',\n pilledBorderRadius: '--plasma-badge-pilled-border-radius',\n height: '--plasma-badge-height',\n paddingTop: '--plasma-badge-padding-top',\n paddingRight: '--plasma-badge-padding-right',\n paddingBottom: '--plasma-badge-padding-bottom',\n paddingLeft: '--plasma-badge-padding-left',\n\n fontFamily: '--plasma-badge-font-family',\n fontSize: '--plasma-badge-font-size',\n fontStyle: '--plasma-badge-font-style',\n fontWeight: '--plasma-badge-font-weight',\n letterSpacing: '--plasma-badge-letter-spacing',\n lineHeight: '--plasma-badge-lineheight',\n\n leftContentMarginLeft: '--plasma-badge-left-content-margin-left',\n leftContentMarginRight: '--plasma-badge-left-content-margin-right',\n rightContentMarginLeft: '--plasma-badge-right-content-margin-left',\n rightContentMarginRight: '--plasma-badge-right-content-margin-right',\n};\n"],"names":["classes","badgePilled","badgeTransparent","badgeClear","badgeTruncate","tokens","background","color","backgroundTransparent","colorTransparent","colorClear","borderRadius","pilledBorderRadius","height","paddingTop","paddingRight","paddingBottom","paddingLeft","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","leftContentMarginLeft","leftContentMarginRight","rightContentMarginLeft","rightContentMarginRight"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,gBAAgB,EAAE,mBAAmB;AACrCC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,aAAa,EAAE,gBAAA;AACnB,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,2BAA2B;AACvCC,EAAAA,KAAK,EAAE,sBAAsB;AAC7BC,EAAAA,qBAAqB,EAAE,uCAAuC;AAC9DC,EAAAA,gBAAgB,EAAE,kCAAkC;AACpDC,EAAAA,UAAU,EAAE,4BAA4B;AAExCC,EAAAA,YAAY,EAAE,8BAA8B;AAC5CC,EAAAA,kBAAkB,EAAE,qCAAqC;AACzDC,EAAAA,MAAM,EAAE,uBAAuB;AAC/BC,EAAAA,UAAU,EAAE,4BAA4B;AACxCC,EAAAA,YAAY,EAAE,8BAA8B;AAC5CC,EAAAA,aAAa,EAAE,+BAA+B;AAC9CC,EAAAA,WAAW,EAAE,6BAA6B;AAE1CC,EAAAA,UAAU,EAAE,4BAA4B;AACxCC,EAAAA,QAAQ,EAAE,0BAA0B;AACpCC,EAAAA,SAAS,EAAE,2BAA2B;AACtCC,EAAAA,UAAU,EAAE,4BAA4B;AACxCC,EAAAA,aAAa,EAAE,+BAA+B;AAC9CC,EAAAA,UAAU,EAAE,2BAA2B;AAEvCC,EAAAA,qBAAqB,EAAE,yCAAyC;AAChEC,EAAAA,sBAAsB,EAAE,0CAA0C;AAClEC,EAAAA,sBAAsB,EAAE,0CAA0C;AAClEC,EAAAA,uBAAuB,EAAE,2CAAA;AAC7B;;;;;"}
1
+ {"version":3,"file":"Badge.tokens.js","sources":["../../../src/components/Badge/Badge.tokens.ts"],"sourcesContent":["export const classes = {\n badgePilled: 'badge-pilled',\n badgeTransparent: 'badge-transparent',\n badgeClear: 'badge-clear',\n badgeTruncate: 'badge-truncate',\n iconOnly: 'badge-icon-only',\n};\n\nexport const privateTokens = {\n customBackground: '--plasma-badge-custom-background',\n customColor: '--plasma-badge-custom-color',\n};\n\nexport const tokens = {\n background: '--plasma-badge-background',\n color: '--plasma-badge-color',\n backgroundTransparent: '--plasma-badge-background-transparent',\n colorTransparent: '--plasma-badge-color-transparent',\n colorClear: '--plasma-badge-color-clear',\n backgroundClear: '--plasma-badge-background-clear',\n\n borderRadius: '--plasma-badge-border-radius',\n pilledBorderRadius: '--plasma-badge-pilled-border-radius',\n height: '--plasma-badge-height',\n padding: '--plasma-badge-padding',\n paddingIconOnly: '--plasma-badge-padding-icon-only',\n\n fontFamily: '--plasma-badge-font-family',\n fontSize: '--plasma-badge-font-size',\n fontStyle: '--plasma-badge-font-style',\n fontWeight: '--plasma-badge-font-weight',\n letterSpacing: '--plasma-badge-letter-spacing',\n lineHeight: '--plasma-badge-lineheight',\n\n leftContentMarginLeft: '--plasma-badge-left-content-margin-left',\n leftContentMarginRight: '--plasma-badge-left-content-margin-right',\n rightContentMarginLeft: '--plasma-badge-right-content-margin-left',\n rightContentMarginRight: '--plasma-badge-right-content-margin-right',\n};\n"],"names":["classes","badgePilled","badgeTransparent","badgeClear","badgeTruncate","iconOnly","privateTokens","customBackground","customColor","tokens","background","color","backgroundTransparent","colorTransparent","colorClear","backgroundClear","borderRadius","pilledBorderRadius","height","padding","paddingIconOnly","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","leftContentMarginLeft","leftContentMarginRight","rightContentMarginLeft","rightContentMarginRight"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,gBAAgB,EAAE,mBAAmB;AACrCC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,aAAa,EAAE,gBAAgB;AAC/BC,EAAAA,QAAQ,EAAE,iBAAA;AACd,EAAC;AAEM,IAAMC,aAAa,GAAG;AACzBC,EAAAA,gBAAgB,EAAE,kCAAkC;AACpDC,EAAAA,WAAW,EAAE,6BAAA;AACjB,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,2BAA2B;AACvCC,EAAAA,KAAK,EAAE,sBAAsB;AAC7BC,EAAAA,qBAAqB,EAAE,uCAAuC;AAC9DC,EAAAA,gBAAgB,EAAE,kCAAkC;AACpDC,EAAAA,UAAU,EAAE,4BAA4B;AACxCC,EAAAA,eAAe,EAAE,iCAAiC;AAElDC,EAAAA,YAAY,EAAE,8BAA8B;AAC5CC,EAAAA,kBAAkB,EAAE,qCAAqC;AACzDC,EAAAA,MAAM,EAAE,uBAAuB;AAC/BC,EAAAA,OAAO,EAAE,wBAAwB;AACjCC,EAAAA,eAAe,EAAE,kCAAkC;AAEnDC,EAAAA,UAAU,EAAE,4BAA4B;AACxCC,EAAAA,QAAQ,EAAE,0BAA0B;AACpCC,EAAAA,SAAS,EAAE,2BAA2B;AACtCC,EAAAA,UAAU,EAAE,4BAA4B;AACxCC,EAAAA,aAAa,EAAE,+BAA+B;AAC9CC,EAAAA,UAAU,EAAE,2BAA2B;AAEvCC,EAAAA,qBAAqB,EAAE,yCAAyC;AAChEC,EAAAA,sBAAsB,EAAE,0CAA0C;AAClEC,EAAAA,sBAAsB,EAAE,0CAA0C;AAClEC,EAAAA,uBAAuB,EAAE,2CAAA;AAC7B;;;;;;"}
@@ -1,4 +1,4 @@
1
- import './base_oopyb7.css';
1
+ import './base_wiboj8.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sources":["../../../../../src/components/Badge/variations/_clear/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../Badge.tokens';\n\nexport const base = css`\n &.${classes.badgeClear} {\n color: var(${tokens.colorClear});\n background-color: transparent;\n padding: 0;\n }\n`;\n"],"names":["base"],"mappings":";;;;AAIO,IAAMA,IAAI,GAMhB;;;;"}
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Badge/variations/_clear/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, privateTokens, tokens } from '../../Badge.tokens';\n\nexport const base = css`\n &.${classes.badgeClear} {\n color: var(${privateTokens.customColor}, var(${tokens.colorClear}));\n background-color: var(${privateTokens.customBackground}, var(${tokens.backgroundClear}));\n }\n`;\n"],"names":["base"],"mappings":";;;;AAIO,IAAMA,IAAI,GAKhB;;;;"}
@@ -0,0 +1 @@
1
+ .b1e1wuvi.badge-clear{color:var(--plasma-badge-custom-color,var(--plasma-badge-color-clear));background-color:var(--plasma-badge-custom-background,var(--plasma-badge-background-clear));}
@@ -1,4 +1,4 @@
1
- import './base_to0y5x.css';
1
+ import './base_bu5opk.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sources":["../../../../../src/components/Badge/variations/_size/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { tokens } from '../../Badge.tokens';\n\nexport const base = css`\n font-family: var(${tokens.fontFamily});\n font-size: var(${tokens.fontSize});\n font-style: var(${tokens.fontStyle});\n font-weight: var(${tokens.fontWeight});\n letter-spacing: var(${tokens.letterSpacing});\n line-height: var(${tokens.lineHeight});\n\n border-radius: var(${tokens.borderRadius});\n\n height: var(${tokens.height});\n\n padding-top: var(${tokens.paddingTop});\n padding-right: var(${tokens.paddingRight});\n padding-bottom: var(${tokens.paddingBottom});\n padding-left: var(${tokens.paddingLeft});\n`;\n"],"names":["base"],"mappings":";;;;AAIO,IAAMA,IAAI,GAgBhB;;;;"}
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Badge/variations/_size/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../Badge.tokens';\nimport { StyledContentLeft } from '../../Badge.styles';\n\nexport const base = css`\n font-family: var(${tokens.fontFamily});\n font-size: var(${tokens.fontSize});\n font-style: var(${tokens.fontStyle});\n font-weight: var(${tokens.fontWeight});\n letter-spacing: var(${tokens.letterSpacing});\n line-height: var(${tokens.lineHeight});\n\n border-radius: var(${tokens.borderRadius});\n\n height: var(${tokens.height});\n\n padding: var(${tokens.padding});\n\n &.${classes.iconOnly} {\n padding: var(${tokens.paddingIconOnly});\n\n ${StyledContentLeft} {\n margin: 0;\n }\n }\n`;\n"],"names":["base"],"mappings":";;;;AAKO,IAAMA,IAAI,GAqBhB;;;;"}
@@ -1 +1 @@
1
- .bb8jvo5{font-family:var(--plasma-badge-font-family);font-size:var(--plasma-badge-font-size);font-style:var(--plasma-badge-font-style);font-weight:var(--plasma-badge-font-weight);-webkit-letter-spacing:var(--plasma-badge-letter-spacing);-moz-letter-spacing:var(--plasma-badge-letter-spacing);-ms-letter-spacing:var(--plasma-badge-letter-spacing);letter-spacing:var(--plasma-badge-letter-spacing);line-height:var(--plasma-badge-lineheight);border-radius:var(--plasma-badge-border-radius);height:var(--plasma-badge-height);padding-top:var(--plasma-badge-padding-top);padding-right:var(--plasma-badge-padding-right);padding-bottom:var(--plasma-badge-padding-bottom);padding-left:var(--plasma-badge-padding-left);}
1
+ .bb8jvo5{font-family:var(--plasma-badge-font-family);font-size:var(--plasma-badge-font-size);font-style:var(--plasma-badge-font-style);font-weight:var(--plasma-badge-font-weight);-webkit-letter-spacing:var(--plasma-badge-letter-spacing);-moz-letter-spacing:var(--plasma-badge-letter-spacing);-ms-letter-spacing:var(--plasma-badge-letter-spacing);letter-spacing:var(--plasma-badge-letter-spacing);line-height:var(--plasma-badge-lineheight);border-radius:var(--plasma-badge-border-radius);height:var(--plasma-badge-height);padding:var(--plasma-badge-padding);}.bb8jvo5.badge-icon-only{padding:var(--plasma-badge-padding-icon-only);}.bb8jvo5.badge-icon-only .s1t43xoe{margin:0;}
@@ -1,4 +1,4 @@
1
- import './base_1l6036y.css';
1
+ import './base_aapqhz.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sources":["../../../../../src/components/Badge/variations/_transparent/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../Badge.tokens';\n\nexport const base = css`\n &.${classes.badgeTransparent} {\n color: var(${tokens.colorTransparent});\n background-color: var(${tokens.backgroundTransparent});\n }\n`;\n"],"names":["base"],"mappings":";;;;AAIO,IAAMA,IAAI,GAKhB;;;;"}
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Badge/variations/_transparent/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, privateTokens, tokens } from '../../Badge.tokens';\n\nexport const base = css`\n &.${classes.badgeTransparent} {\n color: var(${privateTokens.customColor}, var(${tokens.colorTransparent}));\n background-color: var(${privateTokens.customBackground}, var(${tokens.backgroundTransparent}));\n }\n`;\n"],"names":["base"],"mappings":";;;;AAIO,IAAMA,IAAI,GAKhB;;;;"}
@@ -0,0 +1 @@
1
+ .binquhc.badge-transparent{color:var(--plasma-badge-custom-color,var(--plasma-badge-color-transparent));background-color:var(--plasma-badge-custom-background,var(--plasma-badge-background-transparent));}
@@ -1,4 +1,4 @@
1
- import './base_qlxank.css';
1
+ import './base_j3xzf3.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sources":["../../../../../src/components/Badge/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { tokens } from '../../Badge.tokens';\n\nexport const base = css`\n color: var(${tokens.color});\n background-color: var(${tokens.background});\n`;\n"],"names":["base"],"mappings":";;;;AAIO,IAAMA,IAAI,GAGhB;;;;"}
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Badge/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { privateTokens, tokens } from '../../Badge.tokens';\n\nexport const base = css`\n color: var(${privateTokens.customColor}, var(${tokens.color}));\n background-color: var(${privateTokens.customBackground}, var(${tokens.background}));\n`;\n"],"names":["base"],"mappings":";;;;AAIO,IAAMA,IAAI,GAGhB;;;;"}
@@ -0,0 +1 @@
1
+ .b5zny0e{color:var(--plasma-badge-custom-color,var(--plasma-badge-color));background-color:var(--plasma-badge-custom-background,var(--plasma-badge-background));}
@@ -66,7 +66,7 @@ var calendarBaseRoot = function calendarBaseRoot(Root) {
66
66
  _useState8 = _rollupPluginBabelHelpers.slicedToArray(_useState7, 2),
67
67
  outOfRangeKey = _useState8[0],
68
68
  setOutOfRangeKey = _useState8[1];
69
- var _useReducer = React.useReducer(reducer.reducer, reducer.getInitialState(value, min, type)),
69
+ var _useReducer = React.useReducer(reducer.reducer, reducer.getInitialState(value, type)),
70
70
  _useReducer2 = _rollupPluginBabelHelpers.slicedToArray(_useReducer, 2),
71
71
  state = _useReducer2[0],
72
72
  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, 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,gBAAU,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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,MAAAA,aAAa,EAAEtC,eAAgB;AAC/BsD,MAAAA,WAAW,EAAEzF,cAAe;AAC5BkC,MAAAA,SAAS,EAAEA,SAAU;AACrBE,MAAAA,SAAS,EAAEA,SAAAA;AAAU,KACxB,CAEH,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMsD,kBAAkB,GAAG;AAC9BC,EAAAA,IAAI,EAAE,cAAc;AACpBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEnI,gBAAgB;AACxBoI,EAAAA,IAAI,EAAEC,kCAAc;AACpBC,EAAAA,UAAU,EAAE;AACRC,IAAAA,IAAI,EAAE;AACFC,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD5E,IAAAA,IAAI,EAAE;AACF2E,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,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, 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,gBAAU,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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,WAAY;AACzByF,MAAAA,YAAY,EAAE7C,kBAAmB;AACjC8B,MAAAA,aAAa,EAAEtC,eAAgB;AAC/BsD,MAAAA,WAAW,EAAEzF,cAAe;AAC5BkC,MAAAA,SAAS,EAAEA,SAAU;AACrBE,MAAAA,SAAS,EAAEA,SAAAA;AAAU,KACxB,CAEH,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMsD,kBAAkB,GAAG;AAC9BC,EAAAA,IAAI,EAAE,cAAc;AACpBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEnI,gBAAgB;AACxBoI,EAAAA,IAAI,EAAEC,kCAAc;AACpBC,EAAAA,UAAU,EAAE;AACRC,IAAAA,IAAI,EAAE;AACFC,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD5E,IAAAA,IAAI,EAAE;AACF2E,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNJ,IAAAA,IAAI,EAAE,SAAS;AACf1E,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
@@ -69,7 +69,7 @@ var calendarDoubleRoot = function calendarDoubleRoot(Root) {
69
69
  _useState8 = _rollupPluginBabelHelpers.slicedToArray(_useState7, 2),
70
70
  outOfRangeKey = _useState8[0],
71
71
  setOutOfRangeKey = _useState8[1];
72
- var _useReducer = React.useReducer(reducer.reducer, reducer.getInitialState(value, min, type, true)),
72
+ var _useReducer = React.useReducer(reducer.reducer, reducer.getInitialState(value, type, true)),
73
73
  _useReducer2 = _rollupPluginBabelHelpers.slicedToArray(_useReducer, 2),
74
74
  state = _useReducer2[0],
75
75
  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, 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,gBAAU,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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alendarDouble/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,gBAAU,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;MAAA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AA;AACV,GAAA;AACJ;;;;;"}
@@ -24,8 +24,8 @@ var sizeMap = {
24
24
  "double": [3, 1]
25
25
  }
26
26
  };
27
- var getInitialState = function getInitialState(value, min, calendarState, isDouble) {
28
- var initDate = value || min || new Date();
27
+ var getInitialState = function getInitialState(value, calendarState, isDouble) {
28
+ var initDate = value || new Date();
29
29
  var date = calendarGridHelper.getDateFromValue(initDate);
30
30
  var resSize = isDouble ? sizeMap[calendarState]["double"] : sizeMap[calendarState].single;
31
31
  return {