@salutejs/plasma-new-hope 0.92.0-dev.0 → 0.93.0-canary.1224.9665090614.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (617) hide show
  1. package/cjs/components/Calendar/Calendar.tokens.js +67 -28
  2. package/cjs/components/Calendar/Calendar.tokens.js.map +1 -1
  3. package/cjs/components/Calendar/Calendar.types.js.map +1 -1
  4. package/cjs/components/Calendar/CalendarBase/CalendarBase.css +57 -29
  5. package/cjs/components/Calendar/CalendarBase/CalendarBase.js +6 -0
  6. package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  7. package/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +1 -1
  8. package/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js.map +1 -1
  9. package/cjs/components/Calendar/CalendarBase/{CalendarBase.styles_rv9ax9.css → CalendarBase.styles_1m6uih1.css} +1 -1
  10. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.css +58 -30
  11. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +6 -0
  12. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  13. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.styles.js +1 -1
  14. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.styles.js.map +1 -1
  15. package/{es/components/Calendar/CalendarDouble/CalendarDouble.styles_1rc2ejs.css → cjs/components/Calendar/CalendarDouble/CalendarDouble.styles_e9ada0.css} +2 -2
  16. package/cjs/components/Calendar/hoc/withRange.js.map +1 -1
  17. package/cjs/components/Calendar/hooks/useDays.js +1 -1
  18. package/cjs/components/Calendar/hooks/useDays.js.map +1 -1
  19. package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.css +4 -4
  20. package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js +9 -9
  21. package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js.map +1 -1
  22. package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles_fznpy7.css +4 -0
  23. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.css +7 -7
  24. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +1 -1
  25. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles.js.map +1 -1
  26. package/cjs/components/Calendar/ui/CalendarDays/{CalendarDays.styles_bnrjbd.css → CalendarDays.styles_1oq8sud.css} +1 -1
  27. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.css +36 -8
  28. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +31 -17
  29. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  30. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +27 -12
  31. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  32. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_gnorek.css +8 -0
  33. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.css +4 -4
  34. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
  35. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  36. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +1 -1
  37. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js.map +1 -1
  38. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_wmlwil.css +4 -0
  39. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.css +4 -4
  40. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
  41. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  42. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +1 -1
  43. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js.map +1 -1
  44. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles_f2aje6.css +4 -0
  45. package/cjs/components/Calendar/utils/index.js.map +1 -1
  46. package/cjs/components/Combobox/Combobox.js +2 -2
  47. package/cjs/components/Combobox/Combobox.js.map +1 -1
  48. package/cjs/components/DatePicker/DatePicker.tokens.js +189 -0
  49. package/cjs/components/DatePicker/DatePicker.tokens.js.map +1 -0
  50. package/cjs/components/DatePicker/DatePickerBase.styles.js +30 -0
  51. package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -0
  52. package/cjs/components/DatePicker/DatePickerBase.styles_1thp2xv.css +1 -0
  53. package/cjs/components/DatePicker/RangeDate/RangeDate.css +152 -0
  54. package/cjs/components/DatePicker/RangeDate/RangeDate.js +285 -0
  55. package/cjs/components/DatePicker/RangeDate/RangeDate.js.map +1 -0
  56. package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +51 -0
  57. package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -0
  58. package/cjs/components/DatePicker/RangeDate/RangeDate.styles_ww61h9.css +5 -0
  59. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +144 -0
  60. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +83 -0
  61. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -0
  62. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +42 -0
  63. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -0
  64. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_wp3vfj.css +2 -0
  65. package/cjs/components/DatePicker/RangeDate/variations/_disabled/base.js +9 -0
  66. package/cjs/components/DatePicker/RangeDate/variations/_disabled/base.js.map +1 -0
  67. package/cjs/components/DatePicker/RangeDate/variations/_disabled/base_tl4jc7.css +1 -0
  68. package/cjs/components/DatePicker/RangeDate/variations/_readonly/base.js +9 -0
  69. package/cjs/components/DatePicker/RangeDate/variations/_readonly/base.js.map +1 -0
  70. package/cjs/components/DatePicker/RangeDate/variations/_readonly/base_f58pkk.css +1 -0
  71. package/cjs/components/DatePicker/RangeDate/variations/_size/base.js +9 -0
  72. package/cjs/components/DatePicker/RangeDate/variations/_size/base.js.map +1 -0
  73. package/cjs/components/DatePicker/RangeDate/variations/_size/base_1911nyw.css +1 -0
  74. package/cjs/components/DatePicker/RangeDate/variations/_view/base.js +9 -0
  75. package/cjs/components/DatePicker/RangeDate/variations/_view/base.js.map +1 -0
  76. package/cjs/components/DatePicker/RangeDate/variations/_view/base_11yn9y8.css +1 -0
  77. package/cjs/components/DatePicker/SingleDate/SingleDate.css +134 -0
  78. package/cjs/components/DatePicker/SingleDate/SingleDate.js +183 -0
  79. package/cjs/components/DatePicker/SingleDate/SingleDate.js.map +1 -0
  80. package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +51 -0
  81. package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -0
  82. package/cjs/components/DatePicker/SingleDate/SingleDate.styles_18b5qkz.css +5 -0
  83. package/cjs/components/DatePicker/SingleDate/variations/_disabled/base.js +9 -0
  84. package/cjs/components/DatePicker/SingleDate/variations/_disabled/base.js.map +1 -0
  85. package/cjs/components/DatePicker/SingleDate/variations/_disabled/base_1rfgfsz.css +1 -0
  86. package/cjs/components/DatePicker/SingleDate/variations/_readonly/base.js +9 -0
  87. package/cjs/components/DatePicker/SingleDate/variations/_readonly/base.js.map +1 -0
  88. package/cjs/components/DatePicker/SingleDate/variations/_readonly/base_1jucwp.css +1 -0
  89. package/cjs/components/DatePicker/SingleDate/variations/_size/base.js +9 -0
  90. package/cjs/components/DatePicker/SingleDate/variations/_size/base.js.map +1 -0
  91. package/cjs/components/DatePicker/SingleDate/variations/_size/base_lf7y25.css +1 -0
  92. package/cjs/components/DatePicker/SingleDate/variations/_view/base.js +9 -0
  93. package/cjs/components/DatePicker/SingleDate/variations/_view/base.js.map +1 -0
  94. package/cjs/components/DatePicker/SingleDate/variations/_view/base_15vaheb.css +1 -0
  95. package/cjs/components/DatePicker/hooks/useDatePicker.js +79 -0
  96. package/cjs/components/DatePicker/hooks/useDatePicker.js.map +1 -0
  97. package/cjs/components/DatePicker/utils/dateHelper.js +84 -0
  98. package/cjs/components/DatePicker/utils/dateHelper.js.map +1 -0
  99. package/cjs/components/Dropdown/Dropdown.js +4 -2
  100. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  101. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +8 -4
  102. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  103. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +6 -5
  104. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  105. package/cjs/components/Dropdown/utils/index.js +0 -17
  106. package/cjs/components/Dropdown/utils/index.js.map +1 -1
  107. package/cjs/components/Range/Range.css +6 -6
  108. package/cjs/components/Range/Range.js +17 -2
  109. package/cjs/components/Range/Range.js.map +1 -1
  110. package/cjs/components/Range/Range.styles.js +1 -1
  111. package/cjs/components/Range/Range.styles.js.map +1 -1
  112. package/cjs/components/Range/Range.styles_9rort8.css +8 -0
  113. package/cjs/components/Select/Select.js +2 -2
  114. package/cjs/components/Select/Select.js.map +1 -1
  115. package/cjs/components/Slider/Slider.css +3 -3
  116. package/cjs/components/Slider/components/Double/Double.css +3 -3
  117. package/cjs/components/TextField/TextField.tokens.js +1 -1
  118. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  119. package/cjs/components/TextField/variations/_read-only/base.js +1 -1
  120. package/cjs/components/TextField/variations/_read-only/base_1vu13zn.css +1 -0
  121. package/cjs/components/TextField/variations/_size/base.js +1 -1
  122. package/cjs/components/TextField/variations/_size/base.js.map +1 -1
  123. package/cjs/components/TextField/variations/_size/base_orwx1f.css +1 -0
  124. package/cjs/components/TextField/variations/_view/base.js +1 -1
  125. package/cjs/components/TextField/variations/_view/base_18ea6z7.css +1 -0
  126. package/cjs/components/_Icon/Icon.assets/DisclosureDownFill.js +23 -0
  127. package/cjs/components/_Icon/Icon.assets/DisclosureDownFill.js.map +1 -0
  128. package/cjs/components/_Icon/Icon.assets/DisclosureLeft.js +1 -1
  129. package/cjs/components/_Icon/Icon.assets/DisclosureLeft.js.map +1 -1
  130. package/cjs/components/_Icon/Icon.assets/DisclosureRight.js +5 -15
  131. package/cjs/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
  132. package/cjs/components/_Icon/Icons/IconDisclosureDownFill.js +23 -0
  133. package/cjs/components/_Icon/Icons/IconDisclosureDownFill.js.map +1 -0
  134. package/cjs/index.css +71 -38
  135. package/cjs/index.js +12 -0
  136. package/cjs/index.js.map +1 -1
  137. package/cjs/utils/datejs.js +12 -0
  138. package/cjs/utils/datejs.js.map +1 -0
  139. package/cjs/utils/getPopoverPlacement.js +23 -0
  140. package/cjs/utils/getPopoverPlacement.js.map +1 -0
  141. package/cjs/utils/index.js.map +1 -1
  142. package/es/components/Calendar/Calendar.tokens.js +67 -28
  143. package/es/components/Calendar/Calendar.tokens.js.map +1 -1
  144. package/es/components/Calendar/Calendar.types.js.map +1 -1
  145. package/es/components/Calendar/CalendarBase/CalendarBase.css +57 -29
  146. package/es/components/Calendar/CalendarBase/CalendarBase.js +7 -1
  147. package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  148. package/es/components/Calendar/CalendarBase/CalendarBase.styles.js +1 -1
  149. package/es/components/Calendar/CalendarBase/CalendarBase.styles.js.map +1 -1
  150. package/es/components/Calendar/CalendarBase/{CalendarBase.styles_rv9ax9.css → CalendarBase.styles_1m6uih1.css} +1 -1
  151. package/es/components/Calendar/CalendarDouble/CalendarDouble.css +58 -30
  152. package/es/components/Calendar/CalendarDouble/CalendarDouble.js +7 -1
  153. package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  154. package/es/components/Calendar/CalendarDouble/CalendarDouble.styles.js +1 -1
  155. package/es/components/Calendar/CalendarDouble/CalendarDouble.styles.js.map +1 -1
  156. package/{cjs/components/Calendar/CalendarDouble/CalendarDouble.styles_1rc2ejs.css → es/components/Calendar/CalendarDouble/CalendarDouble.styles_e9ada0.css} +2 -2
  157. package/es/components/Calendar/hoc/withRange.js.map +1 -1
  158. package/es/components/Calendar/hooks/useDays.js +1 -1
  159. package/es/components/Calendar/hooks/useDays.js.map +1 -1
  160. package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.css +4 -4
  161. package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js +9 -9
  162. package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js.map +1 -1
  163. package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles_fznpy7.css +4 -0
  164. package/es/components/Calendar/ui/CalendarDays/CalendarDays.css +7 -7
  165. package/es/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +1 -1
  166. package/es/components/Calendar/ui/CalendarDays/CalendarDays.styles.js.map +1 -1
  167. package/es/components/Calendar/ui/CalendarDays/{CalendarDays.styles_bnrjbd.css → CalendarDays.styles_1oq8sud.css} +1 -1
  168. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.css +36 -8
  169. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +32 -18
  170. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  171. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +26 -13
  172. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  173. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_gnorek.css +8 -0
  174. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.css +4 -4
  175. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
  176. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  177. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +1 -1
  178. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js.map +1 -1
  179. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_wmlwil.css +4 -0
  180. package/es/components/Calendar/ui/CalendarYears/CalendarYears.css +4 -4
  181. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
  182. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  183. package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +1 -1
  184. package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js.map +1 -1
  185. package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles_f2aje6.css +4 -0
  186. package/es/components/Calendar/utils/index.js.map +1 -1
  187. package/es/components/Combobox/Combobox.js +1 -1
  188. package/es/components/Combobox/Combobox.js.map +1 -1
  189. package/es/components/DatePicker/DatePicker.tokens.js +184 -0
  190. package/es/components/DatePicker/DatePicker.tokens.js.map +1 -0
  191. package/es/components/DatePicker/DatePickerBase.styles.js +26 -0
  192. package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -0
  193. package/es/components/DatePicker/DatePickerBase.styles_1thp2xv.css +1 -0
  194. package/es/components/DatePicker/RangeDate/RangeDate.css +152 -0
  195. package/es/components/DatePicker/RangeDate/RangeDate.js +280 -0
  196. package/es/components/DatePicker/RangeDate/RangeDate.js.map +1 -0
  197. package/es/components/DatePicker/RangeDate/RangeDate.styles.js +43 -0
  198. package/es/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -0
  199. package/es/components/DatePicker/RangeDate/RangeDate.styles_ww61h9.css +5 -0
  200. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +144 -0
  201. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +79 -0
  202. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -0
  203. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +37 -0
  204. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -0
  205. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_wp3vfj.css +2 -0
  206. package/es/components/DatePicker/RangeDate/variations/_disabled/base.js +5 -0
  207. package/es/components/DatePicker/RangeDate/variations/_disabled/base.js.map +1 -0
  208. package/es/components/DatePicker/RangeDate/variations/_disabled/base_tl4jc7.css +1 -0
  209. package/es/components/DatePicker/RangeDate/variations/_readonly/base.js +5 -0
  210. package/es/components/DatePicker/RangeDate/variations/_readonly/base.js.map +1 -0
  211. package/es/components/DatePicker/RangeDate/variations/_readonly/base_f58pkk.css +1 -0
  212. package/es/components/DatePicker/RangeDate/variations/_size/base.js +5 -0
  213. package/es/components/DatePicker/RangeDate/variations/_size/base.js.map +1 -0
  214. package/es/components/DatePicker/RangeDate/variations/_size/base_1911nyw.css +1 -0
  215. package/es/components/DatePicker/RangeDate/variations/_view/base.js +5 -0
  216. package/es/components/DatePicker/RangeDate/variations/_view/base.js.map +1 -0
  217. package/es/components/DatePicker/RangeDate/variations/_view/base_11yn9y8.css +1 -0
  218. package/es/components/DatePicker/SingleDate/SingleDate.css +134 -0
  219. package/es/components/DatePicker/SingleDate/SingleDate.js +178 -0
  220. package/es/components/DatePicker/SingleDate/SingleDate.js.map +1 -0
  221. package/es/components/DatePicker/SingleDate/SingleDate.styles.js +43 -0
  222. package/es/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -0
  223. package/es/components/DatePicker/SingleDate/SingleDate.styles_18b5qkz.css +5 -0
  224. package/es/components/DatePicker/SingleDate/variations/_disabled/base.js +5 -0
  225. package/es/components/DatePicker/SingleDate/variations/_disabled/base.js.map +1 -0
  226. package/es/components/DatePicker/SingleDate/variations/_disabled/base_1rfgfsz.css +1 -0
  227. package/es/components/DatePicker/SingleDate/variations/_readonly/base.js +5 -0
  228. package/es/components/DatePicker/SingleDate/variations/_readonly/base.js.map +1 -0
  229. package/es/components/DatePicker/SingleDate/variations/_readonly/base_1jucwp.css +1 -0
  230. package/es/components/DatePicker/SingleDate/variations/_size/base.js +5 -0
  231. package/es/components/DatePicker/SingleDate/variations/_size/base.js.map +1 -0
  232. package/es/components/DatePicker/SingleDate/variations/_size/base_lf7y25.css +1 -0
  233. package/es/components/DatePicker/SingleDate/variations/_view/base.js +5 -0
  234. package/es/components/DatePicker/SingleDate/variations/_view/base.js.map +1 -0
  235. package/es/components/DatePicker/SingleDate/variations/_view/base_15vaheb.css +1 -0
  236. package/es/components/DatePicker/hooks/useDatePicker.js +75 -0
  237. package/es/components/DatePicker/hooks/useDatePicker.js.map +1 -0
  238. package/es/components/DatePicker/utils/dateHelper.js +76 -0
  239. package/es/components/DatePicker/utils/dateHelper.js.map +1 -0
  240. package/es/components/Dropdown/Dropdown.js +4 -2
  241. package/es/components/Dropdown/Dropdown.js.map +1 -1
  242. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +8 -4
  243. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  244. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +6 -5
  245. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  246. package/es/components/Dropdown/utils/index.js +1 -16
  247. package/es/components/Dropdown/utils/index.js.map +1 -1
  248. package/es/components/Range/Range.css +6 -6
  249. package/es/components/Range/Range.js +18 -3
  250. package/es/components/Range/Range.js.map +1 -1
  251. package/es/components/Range/Range.styles.js +1 -1
  252. package/es/components/Range/Range.styles.js.map +1 -1
  253. package/es/components/Range/Range.styles_9rort8.css +8 -0
  254. package/es/components/Select/Select.js +1 -1
  255. package/es/components/Select/Select.js.map +1 -1
  256. package/es/components/Slider/Slider.css +3 -3
  257. package/es/components/Slider/components/Double/Double.css +3 -3
  258. package/es/components/TextField/TextField.tokens.js +1 -1
  259. package/es/components/TextField/TextField.tokens.js.map +1 -1
  260. package/es/components/TextField/variations/_read-only/base.js +1 -1
  261. package/es/components/TextField/variations/_read-only/base_1vu13zn.css +1 -0
  262. package/es/components/TextField/variations/_size/base.js +1 -1
  263. package/es/components/TextField/variations/_size/base.js.map +1 -1
  264. package/es/components/TextField/variations/_size/base_orwx1f.css +1 -0
  265. package/es/components/TextField/variations/_view/base.js +1 -1
  266. package/es/components/TextField/variations/_view/base_18ea6z7.css +1 -0
  267. package/es/components/_Icon/Icon.assets/DisclosureDownFill.js +19 -0
  268. package/es/components/_Icon/Icon.assets/DisclosureDownFill.js.map +1 -0
  269. package/es/components/_Icon/Icon.assets/DisclosureLeft.js +1 -1
  270. package/es/components/_Icon/Icon.assets/DisclosureLeft.js.map +1 -1
  271. package/es/components/_Icon/Icon.assets/DisclosureRight.js +5 -15
  272. package/es/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
  273. package/es/components/_Icon/Icons/IconDisclosureDownFill.js +19 -0
  274. package/es/components/_Icon/Icons/IconDisclosureDownFill.js.map +1 -0
  275. package/es/index.css +71 -38
  276. package/es/index.js +4 -0
  277. package/es/index.js.map +1 -1
  278. package/es/utils/datejs.js +8 -0
  279. package/es/utils/datejs.js.map +1 -0
  280. package/es/utils/getPopoverPlacement.js +18 -0
  281. package/es/utils/getPopoverPlacement.js.map +1 -0
  282. package/es/utils/index.js.map +1 -1
  283. package/package.json +3 -2
  284. package/styled-components/cjs/components/Calendar/Calendar.tokens.js +67 -28
  285. package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +6 -0
  286. package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +2 -1
  287. package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +6 -0
  288. package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.styles.js +2 -2
  289. package/styled-components/cjs/components/Calendar/hooks/useDays.js +1 -1
  290. package/styled-components/cjs/components/Calendar/mixins/active.js +12 -0
  291. package/styled-components/cjs/components/Calendar/mixins/flex.js +8 -0
  292. package/styled-components/cjs/components/Calendar/mixins/index.js +30 -29
  293. package/styled-components/cjs/components/Calendar/mixins/selected.js +24 -0
  294. package/styled-components/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js +27 -20
  295. package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +2 -1
  296. package/styled-components/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +30 -16
  297. package/styled-components/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +29 -11
  298. package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
  299. package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +26 -12
  300. package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
  301. package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +26 -14
  302. package/styled-components/cjs/components/Combobox/Combobox.js +6 -7
  303. package/styled-components/cjs/components/DatePicker/DatePicker.template-doc.mdx +150 -0
  304. package/styled-components/cjs/components/DatePicker/DatePicker.tokens.js +187 -0
  305. package/styled-components/cjs/components/DatePicker/DatePickerBase.styles.js +19 -0
  306. package/styled-components/cjs/components/DatePicker/DatePickerBase.types.js +5 -0
  307. package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.js +293 -0
  308. package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +33 -0
  309. package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.types.js +5 -0
  310. package/styled-components/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +81 -0
  311. package/styled-components/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +26 -0
  312. package/styled-components/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.types.js +5 -0
  313. package/styled-components/cjs/components/DatePicker/RangeDate/variations/_disabled/base.js +9 -0
  314. package/styled-components/cjs/components/DatePicker/RangeDate/variations/_disabled/tokens.json +0 -0
  315. package/styled-components/cjs/components/DatePicker/RangeDate/variations/_readonly/base.js +10 -0
  316. package/styled-components/cjs/components/DatePicker/RangeDate/variations/_readonly/tokens.json +4 -0
  317. package/styled-components/cjs/components/DatePicker/RangeDate/variations/_size/base.js +10 -0
  318. package/styled-components/cjs/components/DatePicker/RangeDate/variations/_size/tokens.json +0 -0
  319. package/styled-components/cjs/components/DatePicker/RangeDate/variations/_view/base.js +10 -0
  320. package/styled-components/cjs/components/DatePicker/RangeDate/variations/_view/tokens.json +0 -0
  321. package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.js +190 -0
  322. package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +33 -0
  323. package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.types.js +5 -0
  324. package/styled-components/cjs/components/DatePicker/SingleDate/variations/_disabled/base.js +9 -0
  325. package/styled-components/cjs/components/DatePicker/SingleDate/variations/_disabled/tokens.json +4 -0
  326. package/styled-components/cjs/components/DatePicker/SingleDate/variations/_readonly/base.js +10 -0
  327. package/styled-components/cjs/components/DatePicker/SingleDate/variations/_readonly/tokens.json +4 -0
  328. package/styled-components/cjs/components/DatePicker/SingleDate/variations/_size/base.js +10 -0
  329. package/styled-components/cjs/components/DatePicker/SingleDate/variations/_size/tokens.json +16 -0
  330. package/styled-components/cjs/components/DatePicker/SingleDate/variations/_view/base.js +10 -0
  331. package/styled-components/cjs/components/DatePicker/SingleDate/variations/_view/tokens.json +1 -0
  332. package/styled-components/cjs/components/DatePicker/hooks/useDatePicker.js +77 -0
  333. package/styled-components/cjs/components/DatePicker/index.js +44 -0
  334. package/styled-components/cjs/components/DatePicker/utils/dateHelper.js +78 -0
  335. package/styled-components/cjs/components/Dropdown/Dropdown.js +3 -2
  336. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +8 -4
  337. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +6 -5
  338. package/styled-components/cjs/components/Dropdown/utils/index.js +1 -16
  339. package/styled-components/cjs/components/Range/Range.js +17 -2
  340. package/styled-components/cjs/components/Range/Range.styles.js +3 -2
  341. package/styled-components/cjs/components/Select/Select.js +7 -8
  342. package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -1
  343. package/styled-components/cjs/components/TextField/variations/_size/base.js +1 -1
  344. package/styled-components/cjs/components/_Icon/Icon.assets/DisclosureDownFill.js +22 -0
  345. package/styled-components/cjs/components/_Icon/Icon.assets/DisclosureLeft.js +1 -1
  346. package/styled-components/cjs/components/_Icon/Icon.assets/DisclosureRight.js +5 -15
  347. package/styled-components/cjs/components/_Icon/Icons/IconDisclosureDownFill.js +22 -0
  348. package/styled-components/cjs/components/_Icon/index.js +7 -0
  349. package/styled-components/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +24 -6
  350. package/styled-components/cjs/examples/plasma_b2c/components/Calendar/CalendarBase.config.js +5 -2
  351. package/styled-components/cjs/examples/plasma_b2c/components/Calendar/CalendarDouble.config.js +5 -2
  352. package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.config.js +31 -0
  353. package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.js +13 -0
  354. package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +257 -0
  355. package/styled-components/cjs/examples/plasma_b2c/components/Range/Range.config.js +4 -4
  356. package/styled-components/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +24 -6
  357. package/styled-components/cjs/examples/plasma_web/components/Calendar/CalendarBase.config.js +5 -2
  358. package/styled-components/cjs/examples/plasma_web/components/Calendar/CalendarDouble.config.js +5 -2
  359. package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.config.js +31 -0
  360. package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.js +13 -0
  361. package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +257 -0
  362. package/styled-components/cjs/examples/plasma_web/components/Range/Range.config.js +4 -4
  363. package/styled-components/cjs/examples/sds_engineer/components/Calendar/Calendar.stories.tsx +24 -6
  364. package/styled-components/cjs/examples/sds_engineer/components/Calendar/CalendarBase.config.js +5 -2
  365. package/styled-components/cjs/examples/sds_engineer/components/Calendar/CalendarDouble.config.js +5 -2
  366. package/styled-components/cjs/index.js +11 -0
  367. package/styled-components/cjs/utils/datejs.js +11 -0
  368. package/styled-components/cjs/utils/getPopoverPlacement.js +21 -0
  369. package/styled-components/cjs/utils/index.js +22 -0
  370. package/styled-components/es/components/Calendar/Calendar.tokens.js +67 -28
  371. package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +7 -1
  372. package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.styles.js +2 -1
  373. package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +7 -1
  374. package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.styles.js +2 -2
  375. package/styled-components/es/components/Calendar/hooks/useDays.js +1 -1
  376. package/styled-components/es/components/Calendar/mixins/active.js +6 -0
  377. package/styled-components/es/components/Calendar/mixins/flex.js +2 -0
  378. package/styled-components/es/components/Calendar/mixins/index.js +3 -27
  379. package/styled-components/es/components/Calendar/mixins/selected.js +18 -0
  380. package/styled-components/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js +26 -19
  381. package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +2 -1
  382. package/styled-components/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +32 -18
  383. package/styled-components/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +29 -11
  384. package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
  385. package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +25 -11
  386. package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
  387. package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +25 -13
  388. package/styled-components/es/components/Combobox/Combobox.js +1 -2
  389. package/styled-components/es/components/DatePicker/DatePicker.template-doc.mdx +150 -0
  390. package/styled-components/es/components/DatePicker/DatePicker.tokens.js +181 -0
  391. package/styled-components/es/components/DatePicker/DatePickerBase.styles.js +12 -0
  392. package/styled-components/es/components/DatePicker/DatePickerBase.types.js +1 -0
  393. package/styled-components/es/components/DatePicker/RangeDate/RangeDate.js +284 -0
  394. package/styled-components/es/components/DatePicker/RangeDate/RangeDate.styles.js +25 -0
  395. package/styled-components/es/components/DatePicker/RangeDate/RangeDate.types.js +1 -0
  396. package/styled-components/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +74 -0
  397. package/styled-components/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +19 -0
  398. package/styled-components/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.types.js +1 -0
  399. package/styled-components/es/components/DatePicker/RangeDate/variations/_disabled/base.js +3 -0
  400. package/styled-components/es/components/DatePicker/RangeDate/variations/_disabled/tokens.json +0 -0
  401. package/styled-components/es/components/DatePicker/RangeDate/variations/_readonly/base.js +4 -0
  402. package/styled-components/es/components/DatePicker/RangeDate/variations/_readonly/tokens.json +4 -0
  403. package/styled-components/es/components/DatePicker/RangeDate/variations/_size/base.js +4 -0
  404. package/styled-components/es/components/DatePicker/RangeDate/variations/_size/tokens.json +0 -0
  405. package/styled-components/es/components/DatePicker/RangeDate/variations/_view/base.js +4 -0
  406. package/styled-components/es/components/DatePicker/RangeDate/variations/_view/tokens.json +0 -0
  407. package/styled-components/es/components/DatePicker/SingleDate/SingleDate.js +181 -0
  408. package/styled-components/es/components/DatePicker/SingleDate/SingleDate.styles.js +25 -0
  409. package/styled-components/es/components/DatePicker/SingleDate/SingleDate.types.js +1 -0
  410. package/styled-components/es/components/DatePicker/SingleDate/variations/_disabled/base.js +3 -0
  411. package/styled-components/es/components/DatePicker/SingleDate/variations/_disabled/tokens.json +4 -0
  412. package/styled-components/es/components/DatePicker/SingleDate/variations/_readonly/base.js +4 -0
  413. package/styled-components/es/components/DatePicker/SingleDate/variations/_readonly/tokens.json +4 -0
  414. package/styled-components/es/components/DatePicker/SingleDate/variations/_size/base.js +4 -0
  415. package/styled-components/es/components/DatePicker/SingleDate/variations/_size/tokens.json +16 -0
  416. package/styled-components/es/components/DatePicker/SingleDate/variations/_view/base.js +4 -0
  417. package/styled-components/es/components/DatePicker/SingleDate/variations/_view/tokens.json +1 -0
  418. package/styled-components/es/components/DatePicker/hooks/useDatePicker.js +71 -0
  419. package/styled-components/es/components/DatePicker/index.js +3 -0
  420. package/styled-components/es/components/DatePicker/utils/dateHelper.js +72 -0
  421. package/styled-components/es/components/Dropdown/Dropdown.js +4 -3
  422. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +8 -4
  423. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +6 -5
  424. package/styled-components/es/components/Dropdown/utils/index.js +0 -15
  425. package/styled-components/es/components/Range/Range.js +18 -3
  426. package/styled-components/es/components/Range/Range.styles.js +3 -2
  427. package/styled-components/es/components/Select/Select.js +1 -2
  428. package/styled-components/es/components/TextField/TextField.tokens.js +1 -1
  429. package/styled-components/es/components/TextField/variations/_size/base.js +1 -1
  430. package/styled-components/es/components/_Icon/Icon.assets/DisclosureDownFill.js +15 -0
  431. package/styled-components/es/components/_Icon/Icon.assets/DisclosureLeft.js +1 -1
  432. package/styled-components/es/components/_Icon/Icon.assets/DisclosureRight.js +5 -15
  433. package/styled-components/es/components/_Icon/Icons/IconDisclosureDownFill.js +15 -0
  434. package/styled-components/es/components/_Icon/index.js +1 -0
  435. package/styled-components/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +24 -6
  436. package/styled-components/es/examples/plasma_b2c/components/Calendar/CalendarBase.config.js +5 -2
  437. package/styled-components/es/examples/plasma_b2c/components/Calendar/CalendarDouble.config.js +5 -2
  438. package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.config.js +25 -0
  439. package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.js +7 -0
  440. package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +257 -0
  441. package/styled-components/es/examples/plasma_b2c/components/Range/Range.config.js +4 -4
  442. package/styled-components/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +24 -6
  443. package/styled-components/es/examples/plasma_web/components/Calendar/CalendarBase.config.js +5 -2
  444. package/styled-components/es/examples/plasma_web/components/Calendar/CalendarDouble.config.js +5 -2
  445. package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.config.js +25 -0
  446. package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.js +7 -0
  447. package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +257 -0
  448. package/styled-components/es/examples/plasma_web/components/Range/Range.config.js +4 -4
  449. package/styled-components/es/examples/sds_engineer/components/Calendar/Calendar.stories.tsx +24 -6
  450. package/styled-components/es/examples/sds_engineer/components/Calendar/CalendarBase.config.js +5 -2
  451. package/styled-components/es/examples/sds_engineer/components/Calendar/CalendarDouble.config.js +5 -2
  452. package/styled-components/es/index.js +2 -1
  453. package/styled-components/es/utils/datejs.js +4 -0
  454. package/styled-components/es/utils/getPopoverPlacement.js +15 -0
  455. package/styled-components/es/utils/index.js +1 -0
  456. package/types/components/Accordion/utils/index.d.ts +1 -1
  457. package/types/components/Calendar/Calendar.tokens.d.ts +60 -26
  458. package/types/components/Calendar/Calendar.tokens.d.ts.map +1 -1
  459. package/types/components/Calendar/Calendar.types.d.ts +1 -1
  460. package/types/components/Calendar/Calendar.types.d.ts.map +1 -1
  461. package/types/components/Calendar/CalendarBase/CalendarBase.d.ts +27 -3
  462. package/types/components/Calendar/CalendarBase/CalendarBase.d.ts.map +1 -1
  463. package/types/components/Calendar/CalendarBase/CalendarBase.styles.d.ts.map +1 -1
  464. package/types/components/Calendar/CalendarDouble/CalendarDouble.d.ts +30 -3
  465. package/types/components/Calendar/CalendarDouble/CalendarDouble.d.ts.map +1 -1
  466. package/types/components/Calendar/hooks/useDays.d.ts.map +1 -1
  467. package/types/components/Calendar/mixins/active.d.ts +17 -0
  468. package/types/components/Calendar/mixins/active.d.ts.map +1 -0
  469. package/types/components/Calendar/mixins/flex.d.ts +3 -0
  470. package/types/components/Calendar/mixins/flex.d.ts.map +1 -0
  471. package/types/components/Calendar/mixins/index.d.ts +3 -8
  472. package/types/components/Calendar/mixins/index.d.ts.map +1 -1
  473. package/types/components/Calendar/mixins/selected.d.ts +40 -0
  474. package/types/components/Calendar/mixins/selected.d.ts.map +1 -0
  475. package/types/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.d.ts.map +1 -1
  476. package/types/components/Calendar/ui/CalendarDays/CalendarDays.styles.d.ts.map +1 -1
  477. package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.d.ts.map +1 -1
  478. package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.d.ts +47 -7
  479. package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.d.ts.map +1 -1
  480. package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.types.d.ts +1 -0
  481. package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.types.d.ts.map +1 -1
  482. package/types/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.d.ts.map +1 -1
  483. package/types/components/Calendar/ui/CalendarYears/CalendarYears.styles.d.ts.map +1 -1
  484. package/types/components/Calendar/utils/index.d.ts +1 -1
  485. package/types/components/Calendar/utils/index.d.ts.map +1 -1
  486. package/types/components/Combobox/Combobox.d.ts.map +1 -1
  487. package/types/components/DatePicker/DatePicker.tokens.d.ts +182 -0
  488. package/types/components/DatePicker/DatePicker.tokens.d.ts.map +1 -0
  489. package/types/components/DatePicker/DatePickerBase.styles.d.ts +8 -0
  490. package/types/components/DatePicker/DatePickerBase.styles.d.ts.map +1 -0
  491. package/types/components/DatePicker/DatePickerBase.types.d.ts +37 -0
  492. package/types/components/DatePicker/DatePickerBase.types.d.ts.map +1 -0
  493. package/types/components/DatePicker/RangeDate/RangeDate.d.ts +110 -0
  494. package/types/components/DatePicker/RangeDate/RangeDate.d.ts.map +1 -0
  495. package/types/components/DatePicker/RangeDate/RangeDate.styles.d.ts +115 -0
  496. package/types/components/DatePicker/RangeDate/RangeDate.styles.d.ts.map +1 -0
  497. package/types/components/DatePicker/RangeDate/RangeDate.types.d.ts +76 -0
  498. package/types/components/DatePicker/RangeDate/RangeDate.types.d.ts.map +1 -0
  499. package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.d.ts +4 -0
  500. package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.d.ts.map +1 -0
  501. package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.d.ts +5 -0
  502. package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.d.ts.map +1 -0
  503. package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.types.d.ts +29 -0
  504. package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.types.d.ts.map +1 -0
  505. package/types/components/DatePicker/RangeDate/variations/_disabled/base.d.ts +2 -0
  506. package/types/components/DatePicker/RangeDate/variations/_disabled/base.d.ts.map +1 -0
  507. package/types/components/DatePicker/RangeDate/variations/_readonly/base.d.ts +2 -0
  508. package/types/components/DatePicker/RangeDate/variations/_readonly/base.d.ts.map +1 -0
  509. package/types/components/DatePicker/RangeDate/variations/_size/base.d.ts +2 -0
  510. package/types/components/DatePicker/RangeDate/variations/_size/base.d.ts.map +1 -0
  511. package/types/components/DatePicker/RangeDate/variations/_view/base.d.ts +2 -0
  512. package/types/components/DatePicker/RangeDate/variations/_view/base.d.ts.map +1 -0
  513. package/types/components/DatePicker/SingleDate/SingleDate.d.ts +31 -0
  514. package/types/components/DatePicker/SingleDate/SingleDate.d.ts.map +1 -0
  515. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts +45 -0
  516. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -0
  517. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts +120 -0
  518. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts.map +1 -0
  519. package/types/components/DatePicker/SingleDate/variations/_disabled/base.d.ts +2 -0
  520. package/types/components/DatePicker/SingleDate/variations/_disabled/base.d.ts.map +1 -0
  521. package/types/components/DatePicker/SingleDate/variations/_readonly/base.d.ts +2 -0
  522. package/types/components/DatePicker/SingleDate/variations/_readonly/base.d.ts.map +1 -0
  523. package/types/components/DatePicker/SingleDate/variations/_size/base.d.ts +2 -0
  524. package/types/components/DatePicker/SingleDate/variations/_size/base.d.ts.map +1 -0
  525. package/types/components/DatePicker/SingleDate/variations/_view/base.d.ts +2 -0
  526. package/types/components/DatePicker/SingleDate/variations/_view/base.d.ts.map +1 -0
  527. package/types/components/DatePicker/hooks/useDatePicker.d.ts +10 -0
  528. package/types/components/DatePicker/hooks/useDatePicker.d.ts.map +1 -0
  529. package/types/components/DatePicker/index.d.ts +6 -0
  530. package/types/components/DatePicker/index.d.ts.map +1 -0
  531. package/types/components/DatePicker/utils/dateHelper.d.ts +10 -0
  532. package/types/components/DatePicker/utils/dateHelper.d.ts.map +1 -0
  533. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  534. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts.map +1 -1
  535. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts +1 -0
  536. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts.map +1 -1
  537. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  538. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts +1 -0
  539. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts.map +1 -1
  540. package/types/components/Dropdown/utils/index.d.ts +1 -3
  541. package/types/components/Dropdown/utils/index.d.ts.map +1 -1
  542. package/types/components/Range/Range.d.ts +3 -3
  543. package/types/components/Range/Range.d.ts.map +1 -1
  544. package/types/components/Range/Range.styles.d.ts.map +1 -1
  545. package/types/components/Range/Range.types.d.ts +8 -3
  546. package/types/components/Range/Range.types.d.ts.map +1 -1
  547. package/types/components/Range/index.d.ts +1 -1
  548. package/types/components/Range/index.d.ts.map +1 -1
  549. package/types/components/Select/Select.d.ts.map +1 -1
  550. package/types/components/TextField/variations/_size/base.d.ts.map +1 -1
  551. package/types/components/_Icon/Icon.assets/DisclosureDownFill.d.ts +4 -0
  552. package/types/components/_Icon/Icon.assets/DisclosureDownFill.d.ts.map +1 -0
  553. package/types/components/_Icon/Icon.assets/DisclosureRight.d.ts.map +1 -1
  554. package/types/components/_Icon/Icons/IconDisclosureDownFill.d.ts +4 -0
  555. package/types/components/_Icon/Icons/IconDisclosureDownFill.d.ts.map +1 -0
  556. package/types/components/_Icon/index.d.ts +1 -0
  557. package/types/components/_Icon/index.d.ts.map +1 -1
  558. package/types/examples/plasma_b2c/components/Calendar/Calendar.d.ts +15 -4
  559. package/types/examples/plasma_b2c/components/Calendar/Calendar.d.ts.map +1 -1
  560. package/types/examples/plasma_b2c/components/Calendar/CalendarBase.config.d.ts +3 -0
  561. package/types/examples/plasma_b2c/components/Calendar/CalendarBase.config.d.ts.map +1 -1
  562. package/types/examples/plasma_b2c/components/Calendar/CalendarDouble.config.d.ts +3 -0
  563. package/types/examples/plasma_b2c/components/Calendar/CalendarDouble.config.d.ts.map +1 -1
  564. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.config.d.ts +24 -0
  565. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.config.d.ts.map +1 -0
  566. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts +75 -0
  567. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts.map +1 -0
  568. package/types/examples/plasma_b2c/components/Range/Range.d.ts +3 -3
  569. package/types/examples/plasma_b2c/components/Range/Range.d.ts.map +1 -1
  570. package/types/examples/plasma_web/components/Calendar/Calendar.d.ts +15 -4
  571. package/types/examples/plasma_web/components/Calendar/Calendar.d.ts.map +1 -1
  572. package/types/examples/plasma_web/components/Calendar/CalendarBase.config.d.ts +3 -0
  573. package/types/examples/plasma_web/components/Calendar/CalendarBase.config.d.ts.map +1 -1
  574. package/types/examples/plasma_web/components/Calendar/CalendarDouble.config.d.ts +3 -0
  575. package/types/examples/plasma_web/components/Calendar/CalendarDouble.config.d.ts.map +1 -1
  576. package/types/examples/plasma_web/components/DatePicker/DatePicker.config.d.ts +24 -0
  577. package/types/examples/plasma_web/components/DatePicker/DatePicker.config.d.ts.map +1 -0
  578. package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts +75 -0
  579. package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts.map +1 -0
  580. package/types/examples/plasma_web/components/Range/Range.d.ts +3 -3
  581. package/types/examples/plasma_web/components/Range/Range.d.ts.map +1 -1
  582. package/types/examples/sds_engineer/components/Calendar/Calendar.d.ts +15 -4
  583. package/types/examples/sds_engineer/components/Calendar/Calendar.d.ts.map +1 -1
  584. package/types/examples/sds_engineer/components/Calendar/CalendarBase.config.d.ts +3 -0
  585. package/types/examples/sds_engineer/components/Calendar/CalendarBase.config.d.ts.map +1 -1
  586. package/types/examples/sds_engineer/components/Calendar/CalendarDouble.config.d.ts +3 -0
  587. package/types/examples/sds_engineer/components/Calendar/CalendarDouble.config.d.ts.map +1 -1
  588. package/types/index.d.ts +1 -0
  589. package/types/index.d.ts.map +1 -1
  590. package/types/utils/datejs.d.ts +3 -0
  591. package/types/utils/datejs.d.ts.map +1 -0
  592. package/types/utils/getPopoverPlacement.d.ts +5 -0
  593. package/types/utils/getPopoverPlacement.d.ts.map +1 -0
  594. package/types/utils/index.d.ts +1 -0
  595. package/types/utils/index.d.ts.map +1 -1
  596. package/cjs/components/Calendar/mixins/index.js +0 -18
  597. package/cjs/components/Calendar/mixins/index.js.map +0 -1
  598. package/cjs/components/Calendar/mixins/index_o3bz9l.css +0 -1
  599. package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles_xf9c5e.css +0 -4
  600. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_1c4p417.css +0 -6
  601. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_1jnzviu.css +0 -4
  602. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles_1lubnwe.css +0 -4
  603. package/cjs/components/Range/Range.styles_mc4w65.css +0 -8
  604. package/cjs/components/TextField/variations/_read-only/base_134hshp.css +0 -1
  605. package/cjs/components/TextField/variations/_size/base_ntoddv.css +0 -1
  606. package/cjs/components/TextField/variations/_view/base_19gxyva.css +0 -1
  607. package/es/components/Calendar/mixins/index.js +0 -14
  608. package/es/components/Calendar/mixins/index.js.map +0 -1
  609. package/es/components/Calendar/mixins/index_o3bz9l.css +0 -1
  610. package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles_xf9c5e.css +0 -4
  611. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_1c4p417.css +0 -6
  612. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_1jnzviu.css +0 -4
  613. package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles_1lubnwe.css +0 -4
  614. package/es/components/Range/Range.styles_mc4w65.css +0 -8
  615. package/es/components/TextField/variations/_read-only/base_134hshp.css +0 -1
  616. package/es/components/TextField/variations/_size/base_ntoddv.css +0 -1
  617. package/es/components/TextField/variations/_view/base_19gxyva.css +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarHeader.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { buttonFocus, flexCenter } from '../../mixins';\nimport { tokens } from '../../Calendar.tokens';\n\nexport const StyledCalendarHeader = styled.div`\n padding: 1rem 1.5rem 0;\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\n\nexport const StyledHeader = styled(buttonFocus)`\n color: var(${tokens.calendarContentPrimaryColor});\n cursor: pointer;\n padding: 0.5rem 0;\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\n\nexport const StyledHeaderDouble = styled.h4`\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n margin-top: 0;\n margin-bottom: 0;\n padding: 0.5rem 0;\n flex: 1;\n\n ${String(flexCenter)};\n\n &:first-of-type {\n margin-right: 3rem;\n }\n\n &:last-of-type {\n margin-left: 3rem;\n }\n`;\n\nexport const StyledArrows = styled.div`\n padding: 0.5rem 0;\n width: var(${tokens.calendarHeaderArrowContainerWidth});\n\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\n\nexport const StyledArrow = styled(buttonFocus)`\n display: flex;\n cursor: pointer;\n`;\n\nexport const StyledNavigation = styled.div`\n width: 100%;\n\n ${String(flexCenter)};\n`;\n"],"names":["StyledCalendarHeader","styled","name","class","propsAsIs","_exp7","buttonFocus","StyledHeader","StyledHeaderDouble","StyledArrows","_exp23","StyledArrow","StyledNavigation"],"mappings":";;;;;;;AAKO,IAAMA,oBAAoB,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,sBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAYzC,EAAA;AAAC,IAAAC,KAAA,GAhBgBA,SAgBhBA,KAAAA,GAAA;AAAA,EAAA,OAEiCC,iBAAW,CAAA;AAAA,CAAA,CAAA;AAAvC,IAAMC,YAAY,gBAAGN,YAAM,CAAAI,KAAA,EAAA,CAAA,CAAA;AAAAH,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAcjC,EAAA;AAEM,IAAMI,kBAAkB,gBAAGP,YAAM,CAAA,IAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,oBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAqBvC,EAAA;AAEM,IAAMK,YAAY,gBAAGR,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAOjC,EAAA;AAAC,IAAAM,MAAA,GAhEgBA,SAgEhBA,MAAAA,GAAA;AAAA,EAAA,OAEgCJ,iBAAW,CAAA;AAAA,CAAA,CAAA;AAAtC,IAAMK,WAAW,gBAAGV,YAAM,CAAAS,MAAA,EAAA,CAAA,CAAA;AAAAR,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAGhC,EAAA;AAEM,IAAMQ,gBAAgB,gBAAGX,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAIrC;;;;;;;;;"}
1
+ {"version":3,"file":"CalendarHeader.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Calendar.tokens';\nimport { component, mergeConfig } from '../../../../engines';\nimport { iconButtonConfig, iconButtonTokens } from '../../../IconButton';\nimport { flexCenter } from '../../mixins';\nimport { addFocus } from '../../../../mixins';\n\nconst mergedIconButtonConfig = mergeConfig(iconButtonConfig);\nconst IconButton = component(mergedIconButtonConfig);\n\nexport const StyledCalendarHeader = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: var(${tokens.calendarHeaderWrapperPadding});\n`;\n\nexport const StyledHeader = styled.button`\n border: none;\n background-color: transparent;\n padding: 0;\n outline: none;\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n padding: var(${tokens.calendarHeaderPadding});\n\n color: var(${tokens.calendarContentPrimaryColor});\n\n cursor: pointer;\n display: flex;\n gap: var(${tokens.calendarHeaderDateGap});\n justify-content: space-between;\n align-items: center;\n\n &:hover,\n &:active {\n color: var(${tokens.calendarContentSecondaryColor});\n }\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: '0.563rem',\n })};\n`;\n\nexport const StyledHeaderDate = styled.span`\n ${flexCenter};\n pointer-events: none;\n`;\n\nexport const StyledArrows = styled.div`\n display: flex;\n gap: var(${tokens.calendarHeaderArrowGap});\n padding: var(${tokens.calendarHeaderArrowPadding});\n`;\n\n// NOTE: переопределение токенов IconButton\nexport const StyledArrow = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${tokens.iconButtonColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${tokens.iconButtonBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${tokens.iconButtonColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${tokens.iconButtonBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${tokens.iconButtonColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${tokens.iconButtonBackgroundColorActive});\n ${iconButtonTokens.iconButtonHeight}: var(${tokens.iconButtonHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${tokens.iconButtonWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${tokens.iconButtonPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${tokens.iconButtonRadius});\n ${iconButtonTokens.iconButtonFocusColor}: var(${tokens.iconButtonFocusColor});\n`;\n\nexport const StyledNavigation = styled.div`\n width: 100%;\n ${flexCenter};\n`;\n\nexport const StyledDoubleHeaderWrapper = styled.div`\n width: 100%;\n display: grid;\n grid-template-columns: var(${tokens.iconButtonWidth}) 1fr var(${tokens.iconButtonWidth});\n grid-template-areas: 'a b c';\n\n ${StyledArrow} {\n grid-area: a;\n }\n\n &.${classes.doubleHeaderLastDateWrapper} ${StyledArrow} {\n grid-area: c;\n }\n`;\n\nexport const StyledHeaderDouble = styled.h4`\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n\n grid-area: b;\n justify-self: center;\n cursor: pointer;\n display: flex;\n gap: var(${tokens.calendarHeaderDateGap});\n justify-content: space-between;\n align-items: center;\n margin: 0;\n\n ${String(flexCenter)};\n`;\n"],"names":["mergedIconButtonConfig","mergeConfig","iconButtonConfig","IconButton","component","StyledCalendarHeader","styled","name","class","propsAsIs","StyledHeader","StyledHeaderDate","StyledArrows","_exp16","StyledArrow","StyledNavigation","StyledDoubleHeaderWrapper","StyledHeaderDouble"],"mappings":";;;;;;;;;AAQA,IAAMA,sBAAsB,gB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;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGrC,EAAA;AAEM,IAAMO,yBAAyB,gBAAGV,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,2BAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAa9C,EAAA;AAEM,IAAMQ,kBAAkB,gBAAGX,YAAM,CAAA,IAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,oBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAkBvC;;;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ .sjaqipy{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:var(--plasma-calendar-header-wrapper-padding);}
2
+ .s1k7jebr{border:none;background-color:transparent;padding:0;outline:none;font-family:var(--plasma-calendar-header-font-family);font-size:var(--plasma-calendar-header-font-size);font-style:var(--plasma-calendar-header-font-style);font-weight:var(--plasma-calendar-header-font-weight-bold);-webkit-letter-spacing:var(--plasma-calendar-header-font-letter-spacing);-moz-letter-spacing:var(--plasma-calendar-header-font-letter-spacing);-ms-letter-spacing:var(--plasma-calendar-header-font-letter-spacing);letter-spacing:var(--plasma-calendar-header-font-letter-spacing);line-height:var(--plasma-calendar-header-line-height);padding:var(--plasma-calendar-header-padding);color:var(--plasma-calendar-content-primary-color);cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-calendar-header-date-gap);-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;}.s1k7jebr:hover,.s1k7jebr:active{color:var(--plasma-calendar-content-secondary-color);}.s1k7jebr::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:0.563rem;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.s1k7jebr.focus-visible:focus::before,.s1k7jebr[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}
3
+ .s1b07tlr{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;pointer-events:none;}
4
+ .s13yvda3{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-calendar-arrow-container-gap);padding:var(--plasma-calendar-arrow-container-padding);}
5
+ .s1i8jkj2{--plasma-icon-button-color:var(--plasma-calendar-icon-button-color);--plasma-icon-button-background-color:var(--plasma-calendar-icon-button-background);--plasma-icon-button-color-hover:var(--plasma-calendar-icon-button-color-hover);--plasma-icon-button-background-color-hover:var(--plasma-calendar-icon-button-background-hover);--plasma-icon-button-color-active:var(--plasma-calendar-icon-button-color-active);--plasma-icon-button-background-color-active:var(--plasma-calendar-icon-button-background-active);--plasma-icon-button-height:var(--plasma-calendar-icon-button-height);--plasma-icon-button-width:var(--plasma-calendar-icon-button-width);--plasma-icon-button-padding:var(--plasma-calendar-icon-button-padding);--plasma-icon-button-radius:var(--plasma-calendar-icon-button-radius);--plasma-icon-button-focus-color:var(--plasma-calendar-icon-button-focus-color);}
6
+ .sw3by8z{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
7
+ .sdke0q6{width:100%;display:grid;grid-template-columns:var(--plasma-calendar-icon-button-width) 1fr var(--plasma-calendar-icon-button-width);grid-template-areas:'a b c';}.sdke0q6 .s1i8jkj2{grid-area:a;}.sdke0q6.double-header--last-date-wrapper .s1i8jkj2{grid-area:c;}
8
+ .sdtpxcv{font-family:var(--plasma-calendar-header-font-family);font-size:var(--plasma-calendar-header-font-size);font-style:var(--plasma-calendar-header-font-style);font-weight:var(--plasma-calendar-header-font-weight-bold);-webkit-letter-spacing:var(--plasma-calendar-header-font-letter-spacing);-moz-letter-spacing:var(--plasma-calendar-header-font-letter-spacing);-ms-letter-spacing:var(--plasma-calendar-header-font-letter-spacing);letter-spacing:var(--plasma-calendar-header-font-letter-spacing);line-height:var(--plasma-calendar-header-line-height);grid-area:b;justify-self:center;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-calendar-header-date-gap);-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
@@ -1,4 +1,4 @@
1
- .CalendarMonths_styles_1jnzviu_s2fb05v__623e79aa{padding:0.5rem 1.5rem 1.5rem;box-sizing:border-box;}
2
- .CalendarMonths_styles_1jnzviu_s1nlg4aa__623e79aa{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
3
- .CalendarMonths_styles_1jnzviu_s1cvx4bk__623e79aa{border-radius:0.438rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
4
- .CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa{font-family:var(--plasma-calendar-month-font-family);font-size:var(--plasma-calendar-month-font-size);font-style:var(--plasma-calendar-month-font-style);font-weight:var(--plasma-calendar-month-font-weight);-webkit-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);-moz-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);-ms-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);letter-spacing:var(--plasma-calendar-month-font-letter-spacing);line-height:var(--plasma-calendar-month-line-height);position:relative;box-sizing:border-box;min-height:3.5rem;border-radius:var(--plasma-calendar-item-border-radius);-webkit-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;--calendar_private-selected-min-width:5.25rem;--calendar_private-selected-min-height:3.25rem;--calendar_private-selected-background:var(--plasma-calendar-selected-item-background);--calendar_private-selected-color:var(--plasma-calendar-selected-item-color);--calendar_private-selectable-background-hover:var(--plasma-calendar-selectable-item-bg-hover);--calendar_private-current-border-color:var(--plasma-calendar-current-item-border-color);--calendar_private-current-background-hover:var(--plasma-calendar-current-item-bg-hover);--calendar_private-current-color-hover:var(--plasma-calendar-current-item-color-hover);--calendar_private-current-child-background-hover:var(--plasma-calendar-current-item-child-bg-hover);--calendar_private-active-background:var(--plasma-calendar-active-item-bg);--calendar_private-active-color-hover:var(--plasma-calendar-active-item-color);--calendar_private-hovered-background:var(--plasma-calendar-hovered-item-bg);--calendar_private-hovered-color:var(--plasma-calendar-hovered-item-color);outline:none;cursor:pointer;}.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa::before{content:'';position:absolute;top:-0.063rem;left:-0.063rem;right:-0.063rem;bottom:-0.063rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:0.563rem;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa.CalendarMonths_styles_1jnzviu_focusVisible__623e79aa:focus::before,.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa:hover:not(.CalendarMonths_styles_1jnzviu_itemSelected__623e79aa){background-color:var(--calendar_private-selectable-background-hover);}.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa:hover:not(.CalendarMonths_styles_1jnzviu_itemSelected__623e79aa):active{background-color:var(--calendar_private-active-background);color:var(--calendar_private-active-color);font-weight:var(--plasma-typo-body-s-bold-font-weight);}.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa.CalendarMonths_styles_1jnzviu_itemSelected__623e79aa{border:0;background-color:var(--calendar_private-selected-background);color:var(--calendar_private-selected-color);cursor:default;font-weight:var(--plasma-typo-body-s-bold-font-weight);}.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa.CalendarMonths_styles_1jnzviu_itemCurrent__623e79aa{border:0.063rem solid var(--calendar_private-current-border-color);}.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa.CalendarMonths_styles_1jnzviu_itemCurrent__623e79aa:not(.CalendarMonths_styles_1jnzviu_itemSelected__623e79aa):hover{background-color:var(--calendar_private-current-background-hover);color:var(--calendar_private-current-color-hover);}.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa.CalendarMonths_styles_1jnzviu_itemCurrent__623e79aa:not(.CalendarMonths_styles_1jnzviu_itemSelected__623e79aa):hover > div:first-of-type{background-color:var(--calendar_private-current-child-background-hover);min-width:var(--calendar_private-selected-min-width);min-height:var(--calendar_private-selected-min-height);}.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa.CalendarMonths_styles_1jnzviu_itemCurrent__623e79aa:not(.CalendarMonths_styles_1jnzviu_itemSelected__623e79aa):hover:active{background-color:var(--calendar_private-active-background);color:var(--calendar_private-active-color);font-weight:var(--plasma-typo-body-s-bold-font-weight);}.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa.CalendarMonths_styles_1jnzviu_itemHovered__623e79aa,.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa.CalendarMonths_styles_1jnzviu_itemHovered__623e79aa:hover{background-color:var(--calendar_private-hovered-background);color:var(--calendar_private-hovered-color);cursor:pointer;font-weight:var(--plasma-typo-body-s-bold-font-weight);}.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa.CalendarMonths_styles_1jnzviu_itemHovered__623e79aa:active,.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa.CalendarMonths_styles_1jnzviu_itemHovered__623e79aa:hover:active{background-color:var(--calendar_private-active-background);color:var(--calendar_private-active-color);font-weight:var(--plasma-typo-body-s-bold-font-weight);}.CalendarMonths_styles_1jnzviu_s14caaqm__623e79aa:active{background-color:var(--calendar_private-active-background);color:var(--calendar_private-active-color);font-weight:var(--plasma-typo-body-s-bold-font-weight);}
1
+ .CalendarMonths_styles_wmlwil_s2fb05v__7dae290b{padding:var(--plasma-calendar-months-padding);box-sizing:border-box;}
2
+ .CalendarMonths_styles_wmlwil_s1nlg4aa__7dae290b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
3
+ .CalendarMonths_styles_wmlwil_s1cvx4bk__7dae290b{border-radius:calc(var(--plasma-calendar-month-item-border-radius) - 0.125rem);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
4
+ .CalendarMonths_styles_wmlwil_s14caaqm__7dae290b{font-family:var(--plasma-calendar-month-font-family);font-size:var(--plasma-calendar-month-font-size);font-style:var(--plasma-calendar-month-font-style);font-weight:var(--plasma-calendar-month-font-weight);-webkit-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);-moz-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);-ms-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);letter-spacing:var(--plasma-calendar-month-font-letter-spacing);line-height:var(--plasma-calendar-month-line-height);position:relative;box-sizing:border-box;min-height:var(--plasma-calendar-month-item-height);min-width:var(--plasma-calendar-month-item-width);border-radius:var(--plasma-calendar-month-item-border-radius);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;outline:none;cursor:pointer;position:relative;}.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b:hover{background-color:var(--plasma-calendar-selectable-item-bg-hover);}.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b.CalendarMonths_styles_wmlwil_itemHovered__7dae290b,.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b.CalendarMonths_styles_wmlwil_itemHovered__7dae290b:hover{background-color:var(--plasma-calendar-selected-item-background);color:var(--plasma-calendar-selected-item-color);cursor:pointer;font-weight:var(--plasma-calendar-month-selected-font-weight);}.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b.CalendarMonths_styles_wmlwil_itemSelected__7dae290b:not(.CalendarMonths_styles_wmlwil_itemCurrent__7dae290b){border:0;background-color:var(--plasma-calendar-selected-item-background);color:var(--plasma-calendar-selected-item-color);cursor:default;font-weight:var(--plasma-calendar-month-selected-font-weight);}.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b:active{background-color:var(--plasma-calendar-active-item-bg);color:var(--plasma-calendar-active-item-color);font-weight:var(--plasma-calendar-month-selected-font-weight);}.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b.CalendarMonths_styles_wmlwil_itemCurrent__7dae290b{border:0.063rem solid var(--plasma-calendar-current-item-border-color);}.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b.CalendarMonths_styles_wmlwil_itemCurrent__7dae290b.CalendarMonths_styles_wmlwil_itemSelected__7dae290b{background-color:initial;color:var(--plasma-calendar-selected-item-color);font-weight:var(--plasma-calendar-month-selected-font-weight);}.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b.CalendarMonths_styles_wmlwil_itemCurrent__7dae290b.CalendarMonths_styles_wmlwil_itemSelected__7dae290b > div:first-of-type{background-color:var(--plasma-calendar-selected-item-background);min-width:calc(var(--plasma-calendar-month-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-month-item-height) - 0.25rem);}.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-calendar-month-item-border-radius) + 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b.CalendarMonths_styles_wmlwil_focusVisible__7dae290b:focus::before,.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b.CalendarMonths_styles_wmlwil_itemCurrent__7dae290b{position:relative;}.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b.CalendarMonths_styles_wmlwil_itemCurrent__7dae290b::before{content:'';position:absolute;top:-0.1875rem;left:-0.1875rem;right:-0.1875rem;bottom:-0.1875rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-calendar-month-item-border-radius) - 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b.CalendarMonths_styles_wmlwil_itemCurrent__7dae290b.CalendarMonths_styles_wmlwil_focusVisible__7dae290b:focus::before,.CalendarMonths_styles_wmlwil_s14caaqm__7dae290b.CalendarMonths_styles_wmlwil_itemCurrent__7dae290b[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}
@@ -59,7 +59,7 @@ var CalendarMonths = function CalendarMonths(_ref) {
59
59
  isCurrent = _ref2.isCurrent,
60
60
  monthFullName = _ref2.monthFullName;
61
61
  var selectedClass = isSelected ? Calendar_tokens.classes.selectedItem : undefined;
62
- var currentClass = !isSelected && isCurrent ? Calendar_tokens.classes.currentItem : undefined;
62
+ var currentClass = isCurrent ? Calendar_tokens.classes.currentItem : undefined;
63
63
  return /*#__PURE__*/React.createElement(CalendarMonths_styles.StyledMonthRoot, {
64
64
  id: "month-test-".concat(i, "-").concat(j),
65
65
  className: index.cx(selectedClass, currentClass, Calendar_tokens.classes.selectableItem),
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarMonths.js","sources":["../../../../../src/components/Calendar/ui/CalendarMonths/CalendarMonths.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from 'react';\n\nimport { cx } from '../../../../utils';\nimport { useMonths } from '../../hooks';\nimport { classes } from '../../Calendar.tokens';\n\nimport type { CalendarMonthsProps } from './CalendarMonths.types';\nimport { StyledCalendarMonths, StyledFlex, StyledMonth, StyledMonthRoot } from './CalendarMonths.styles';\n\n/**\n * Компонент месяцев в календаре.\n */\nexport const CalendarMonths: React.FC<CalendarMonthsProps> = ({\n date: currentDate,\n selectIndexes,\n outerRefs,\n onChangeMonth,\n onSetSelected,\n onKeyDown,\n}) => {\n const [months, selected] = useMonths(currentDate);\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const handleOnChangeMonth = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const { monthIndex } = event.currentTarget.dataset;\n onChangeMonth(Number(monthIndex));\n },\n [onChangeMonth],\n );\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i][j] = element;\n },\n [outerRefs],\n );\n\n useEffect(() => {\n if (selectedRef.current) {\n onSetSelectedRef.current?.(selectedRef.current);\n }\n }, []);\n\n return (\n <StyledCalendarMonths role=\"grid\" aria-labelledby=\"id-grid-label\" onKeyDown={onKeyDown}>\n {months.map((month, i) => (\n <StyledFlex role=\"row\" key={i}>\n {month.map(({ monthName, monthIndex, isSelected, isCurrent, monthFullName }, j) => {\n const selectedClass = isSelected ? classes.selectedItem : undefined;\n const currentClass = !isSelected && isCurrent ? classes.currentItem : undefined;\n\n return (\n <StyledMonthRoot\n id={`month-test-${i}-${j}`}\n className={cx(selectedClass, currentClass, classes.selectableItem)}\n ref={(element: HTMLDivElement) => getRefs(element, i, j)}\n tabIndex={i === selectIndexes?.[0] && j === selectIndexes?.[1] ? 0 : -1}\n onClick={handleOnChangeMonth}\n data-month-index={monthIndex}\n aria-selected={isSelected}\n role=\"gridcell\"\n key={`StyledMonth-${i}-${j}`}\n aria-label={monthFullName}\n >\n <StyledMonth>{monthName}</StyledMonth>\n </StyledMonthRoot>\n );\n })}\n </StyledFlex>\n ))}\n </StyledCalendarMonths>\n );\n};\n"],"names":["CalendarMonths","_ref","currentDate","date","selectIndexes","outerRefs","onChangeMonth","onSetSelected","onKeyDown","_useMonths","useMonths","_useMonths2","_slicedToArray","months","selected","selectedRef","useRef","onSetSelectedRef","handleOnChangeMonth","useCallback","event","nativeEvent","stopImmediatePropagation","monthIndex","currentTarget","dataset","Number","getRefs","element","i","j","current","useEffect","_onSetSelectedRef$cur","call","React","createElement","StyledCalendarMonths","role","map","month","StyledFlex","key","_ref2","monthName","isSelected","isCurrent","monthFullName","selectedClass","classes","selectedItem","undefined","currentClass","currentItem","StyledMonthRoot","id","concat","className","cx","selectableItem","ref","tabIndex","onClick","StyledMonth"],"mappings":";;;;;;;;;;;AASA;AACA;AACA;IACaA,cAA6C,GAAG,SAAhDA,cAA6CA,CAAAC,IAAA,EAOpD;AAAA,EAAA,IANIC,WAAW,GAAAD,IAAA,CAAjBE,IAAI;IACJC,aAAa,GAAAH,IAAA,CAAbG,aAAa;IACbC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IACTC,aAAa,GAAAL,IAAA,CAAbK,aAAa;IACbC,aAAa,GAAAN,IAAA,CAAbM,aAAa;IACbC,SAAS,GAAAP,IAAA,CAATO,SAAS,CAAA;AAET,EAAA,IAAAC,UAAA,GAA2BC,mBAAS,CAACR,WAAW,CAAC;IAAAS,WAAA,GAAAC,uCAAA,CAAAH,UAAA,EAAA,CAAA,CAAA;AAA1CI,IAAAA,MAAM,GAAAF,WAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,QAAQ,GAAAH,WAAA,CAAA,CAAA,CAAA,CAAA;AACvB,EAAA,IAAMI,WAAW,GAAGC,YAAM,CAACF,QAAQ,CAAC,CAAA;AACpC,EAAA,IAAMG,gBAAgB,GAAGD,YAAM,CAACT,aAAa,CAAC,CAAA;AAE9C,EAAA,IAAMW,mBAAmB,GAAGC,iBAAW,CACnC,UAACC,KAAuC,EAAK;AACzC;AACZ;AACA;AACA;AACA;AACYA,IAAAA,KAAK,CAACC,WAAW,CAACC,wBAAwB,EAAE,CAAA;IAE5C,IAAQC,UAAU,GAAKH,KAAK,CAACI,aAAa,CAACC,OAAO,CAA1CF,UAAU,CAAA;AAClBjB,IAAAA,aAAa,CAACoB,MAAM,CAACH,UAAU,CAAC,CAAC,CAAA;AACrC,GAAC,EACD,CAACjB,aAAa,CAClB,CAAC,C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;"}
1
+ {"version":3,"file":"CalendarMonths.js","sources":["../../../../../src/components/Calendar/ui/CalendarMonths/CalendarMonths.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from 'react';\n\nimport { cx } from '../../../../utils';\nimport { useMonths } from '../../hooks';\nimport { classes } from '../../Calendar.tokens';\n\nimport type { CalendarMonthsProps } from './CalendarMonths.types';\nimport { StyledCalendarMonths, StyledFlex, StyledMonth, StyledMonthRoot } from './CalendarMonths.styles';\n\n/**\n * Компонент месяцев в календаре.\n */\nexport const CalendarMonths: React.FC<CalendarMonthsProps> = ({\n date: currentDate,\n selectIndexes,\n outerRefs,\n onChangeMonth,\n onSetSelected,\n onKeyDown,\n}) => {\n const [months, selected] = useMonths(currentDate);\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const handleOnChangeMonth = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const { monthIndex } = event.currentTarget.dataset;\n onChangeMonth(Number(monthIndex));\n },\n [onChangeMonth],\n );\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i][j] = element;\n },\n [outerRefs],\n );\n\n useEffect(() => {\n if (selectedRef.current) {\n onSetSelectedRef.current?.(selectedRef.current);\n }\n }, []);\n\n return (\n <StyledCalendarMonths role=\"grid\" aria-labelledby=\"id-grid-label\" onKeyDown={onKeyDown}>\n {months.map((month, i) => (\n <StyledFlex role=\"row\" key={i}>\n {month.map(({ monthName, monthIndex, isSelected, isCurrent, monthFullName }, j) => {\n const selectedClass = isSelected ? classes.selectedItem : undefined;\n const currentClass = isCurrent ? classes.currentItem : undefined;\n\n return (\n <StyledMonthRoot\n id={`month-test-${i}-${j}`}\n className={cx(selectedClass, currentClass, classes.selectableItem)}\n ref={(element: HTMLDivElement) => getRefs(element, i, j)}\n tabIndex={i === selectIndexes?.[0] && j === selectIndexes?.[1] ? 0 : -1}\n onClick={handleOnChangeMonth}\n data-month-index={monthIndex}\n aria-selected={isSelected}\n role=\"gridcell\"\n key={`StyledMonth-${i}-${j}`}\n aria-label={monthFullName}\n >\n <StyledMonth>{monthName}</StyledMonth>\n </StyledMonthRoot>\n );\n })}\n </StyledFlex>\n ))}\n </StyledCalendarMonths>\n );\n};\n"],"names":["CalendarMonths","_ref","currentDate","date","selectIndexes","outerRefs","onChangeMonth","onSetSelected","onKeyDown","_useMonths","useMonths","_useMonths2","_slicedToArray","months","selected","selectedRef","useRef","onSetSelectedRef","handleOnChangeMonth","useCallback","event","nativeEvent","stopImmediatePropagation","monthIndex","currentTarget","dataset","Number","getRefs","element","i","j","current","useEffect","_onSetSelectedRef$cur","call","React","createElement","StyledCalendarMonths","role","map","month","StyledFlex","key","_ref2","monthName","isSelected","isCurrent","monthFullName","selectedClass","classes","selectedItem","undefined","currentClass","currentItem","StyledMonthRoot","id","concat","className","cx","selectableItem","ref","tabIndex","onClick","StyledMonth"],"mappings":";;;;;;;;;;;AASA;AACA;AACA;IACaA,cAA6C,GAAG,SAAhDA,cAA6CA,CAAAC,IAAA,EAOpD;AAAA,EAAA,IANIC,WAAW,GAAAD,IAAA,CAAjBE,IAAI;IACJC,aAAa,GAAAH,IAAA,CAAbG,aAAa;IACbC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IACTC,aAAa,GAAAL,IAAA,CAAbK,aAAa;IACbC,aAAa,GAAAN,IAAA,CAAbM,aAAa;IACbC,SAAS,GAAAP,IAAA,CAATO,SAAS,CAAA;AAET,EAAA,IAAAC,UAAA,GAA2BC,mBAAS,CAACR,WAAW,CAAC;IAAAS,WAAA,GAAAC,uCAAA,CAAAH,UAAA,EAAA,CAAA,CAAA;AAA1CI,IAAAA,MAAM,GAAAF,WAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,QAAQ,GAAAH,WAAA,CAAA,CAAA,C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AAG,GAAA,CAAC,GAAG,CAAC,CAAE;AACxE0D,QAAAA,OAAO,EAAE5C,mBAAoB;AAC7B,QAAA,kBAAA,EAAkBK,UAAW;AAC7B,QAAA,eAAA,EAAesB,UAAW;AAC1BP,QAAAA,IAAI,EAAC,UAAU;QACfI,GAAG,EAAA,cAAA,CAAAc,MAAA,CAAiB3B,CAAC,OAAA2B,MAAA,CAAI1B,CAAC,CAAG;QAC7B,YAAYiB,EAAAA,aAAAA;OAEZZ,eAAAA,KAAA,CAAAC,aAAA,CAAC2B,iCAAW,EAAEnB,IAAAA,EAAAA,SAAuB,CACxB,CAAC,CAAA;AAE1B,KAAC,CACO,CAAC,CAAA;AAAA,GAChB,CACiB,CAAC,CAAA;AAE/B;;;;"}
@@ -1,4 +1,4 @@
1
- import './CalendarMonths.styles_1jnzviu.css';
1
+ import './CalendarMonths.styles_wmlwil.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarMonths.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { flexCenter, selectedMixin } from '../../mixins';\nimport { tokens } from '../../Calendar.tokens';\nimport { addFocus } from '../../../../mixins';\n\nexport const StyledCalendarMonths = styled.div`\n padding: 0.5rem 1.5rem 1.5rem;\n box-sizing: border-box;\n`;\n\nexport const StyledFlex = styled.div`\n ${String(flexCenter)};\n`;\n\nexport const StyledMonth = styled.div`\n border-radius: 0.438rem;\n\n ${String(flexCenter)};\n`;\n\nconst selectable = `\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.063rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: '0.563rem',\n })};\n\n --calendar_private-selected-min-width: 5.25rem;\n --calendar_private-selected-min-height: 3.25rem;\n --calendar_private-selected-background: var(${tokens.calendarSelectedItemBackground});\n --calendar_private-selected-color: var(${tokens.calendarSelectedItemColor});\n --calendar_private-selectable-background-hover: var(${tokens.calendarSelectableItemBackgroundHover});\n --calendar_private-current-border-color: var(${tokens.calendarCurrentItemBorderColor});\n --calendar_private-current-background-hover: var(${tokens.calendarCurrentItemBackgroundHover});\n --calendar_private-current-color-hover: var(${tokens.calendarCurrentItemColorHover});\n --calendar_private-current-child-background-hover: var(${tokens.calendarCurrentItemChildBackgroundHover});\n --calendar_private-active-background: var(${tokens.calendarActiveItemBackground});\n --calendar_private-active-color-hover: var(${tokens.calendarActiveItemColor});\n --calendar_private-hovered-background: var(${tokens.calendarHoveredItemBackground});\n --calendar_private-hovered-color: var(${tokens.calendarHoveredItemColor});\n\n ${String(selectedMixin)};\n`;\n\nexport const StyledMonthRoot = styled.div`\n font-family: var(${tokens.calendarMonthFontFamily});\n font-size: var(${tokens.calendarMonthFontSize});\n font-style: var(${tokens.calendarMonthFontStyle});\n font-weight: var(${tokens.calendarMonthFontWeight});\n letter-spacing: var(${tokens.calendarMonthFontLetterSpacing});\n line-height: var(${tokens.calendarMonthFontLineHeight});\n\n position: relative;\n box-sizing: border-box;\n\n min-height: 3.5rem;\n\n border-radius: var(${tokens.calendarItemBorderRadius});\n\n flex: 1;\n\n ${String(flexCenter)};\n ${String(selectable)};\n`;\n"],"names":["StyledCalendarMonths","styled","name","class","propsAsIs","StyledFlex","StyledMonth","StyledMonthRoot"],"mappings":";;;;;;AAMO,IAAMA,oBAAoB,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,sBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGzC,EAAA;AAEM,IAAMC,UAAU,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE/B,EAAA;AAEM,IAAME,WAAW,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAIhC,EAAA;AA2BM,IAAMG,eAAe,gBAAGN,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,iBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAmBpC;;;;;;;"}
1
+ {"version":3,"file":"CalendarMonths.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Calendar.tokens';\nimport { addFocus } from '../../../../mixins';\nimport { addSelected, flexCenter } from '../../mixins';\n\nexport const StyledCalendarMonths = styled.div`\n padding: var(${tokens.calendarMonthsPadding});\n box-sizing: border-box;\n`;\n\nexport const StyledFlex = styled.div`\n ${String(flexCenter)};\n`;\n\nexport const StyledMonth = styled.div`\n border-radius: calc(var(${tokens.calendarMonthItemBorderRadius}) - 0.125rem);\n\n ${String(flexCenter)};\n`;\n\nexport const StyledMonthRoot = styled.div`\n font-family: var(${tokens.calendarMonthFontFamily});\n font-size: var(${tokens.calendarMonthFontSize});\n font-style: var(${tokens.calendarMonthFontStyle});\n font-weight: var(${tokens.calendarMonthFontWeight});\n letter-spacing: var(${tokens.calendarMonthFontLetterSpacing});\n line-height: var(${tokens.calendarMonthFontLineHeight});\n position: relative;\n box-sizing: border-box;\n\n min-height: var(${tokens.calendarMonthItemHeight});\n min-width: var(${tokens.calendarMonthItemWidth});\n\n border-radius: var(${tokens.calendarMonthItemBorderRadius});\n\n ${String(flexCenter)};\n\n ${addSelected({\n minWidth: `calc(var(${tokens.calendarMonthItemWidth}) - 0.25rem)`,\n minHeight: `calc(var(${tokens.calendarMonthItemHeight}) - 0.25rem)`,\n selectedFontWeight: `var(${tokens.calendarMonthSelectedFontWeight})`,\n selectedBackground: `var(${tokens.calendarSelectedItemBackground})`,\n selectedColor: `var(${tokens.calendarSelectedItemColor})`,\n selectableBackgroundHover: `var(${tokens.calendarSelectableItemBackgroundHover})`,\n currentBorderColor: `var(${tokens.calendarCurrentItemBorderColor})`,\n activeBackground: `var(${tokens.calendarActiveItemBackground})`,\n activeColor: `var(${tokens.calendarActiveItemColor})`,\n })};\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: `calc(var(${tokens.calendarMonthItemBorderRadius}) + 0.125rem)`,\n })};\n\n &.${classes.currentItem} {\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.1875rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: `calc(var(${tokens.calendarMonthItemBorderRadius}) - 0.125rem)`,\n })};\n }\n`;\n"],"names":["StyledCalendarMonths","styled","name","class","propsAsIs","StyledFlex","StyledMonth","StyledMonthRoot"],"mappings":";;;;;;AAMO,IAAMA,oBAAoB,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,sBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGzC,EAAA;AAEM,IAAMC,UAAU,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE/B,EAAA;AAEM,IAAME,WAAW,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAIhC,EAAA;AAEM,IAAMG,eAAe,gBAAGN,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,iBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CA4CpC;;;;;;;"}
@@ -0,0 +1,4 @@
1
+ .s2fb05v{padding:var(--plasma-calendar-months-padding);box-sizing:border-box;}
2
+ .s1nlg4aa{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
3
+ .s1cvx4bk{border-radius:calc(var(--plasma-calendar-month-item-border-radius) - 0.125rem);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
4
+ .s14caaqm{font-family:var(--plasma-calendar-month-font-family);font-size:var(--plasma-calendar-month-font-size);font-style:var(--plasma-calendar-month-font-style);font-weight:var(--plasma-calendar-month-font-weight);-webkit-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);-moz-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);-ms-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);letter-spacing:var(--plasma-calendar-month-font-letter-spacing);line-height:var(--plasma-calendar-month-line-height);position:relative;box-sizing:border-box;min-height:var(--plasma-calendar-month-item-height);min-width:var(--plasma-calendar-month-item-width);border-radius:var(--plasma-calendar-month-item-border-radius);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;outline:none;cursor:pointer;position:relative;}.s14caaqm:hover{background-color:var(--plasma-calendar-selectable-item-bg-hover);}.s14caaqm.item-hovered,.s14caaqm.item-hovered:hover{background-color:var(--plasma-calendar-selected-item-background);color:var(--plasma-calendar-selected-item-color);cursor:pointer;font-weight:var(--plasma-calendar-month-selected-font-weight);}.s14caaqm.item-selected:not(.item-current){border:0;background-color:var(--plasma-calendar-selected-item-background);color:var(--plasma-calendar-selected-item-color);cursor:default;font-weight:var(--plasma-calendar-month-selected-font-weight);}.s14caaqm:active{background-color:var(--plasma-calendar-active-item-bg);color:var(--plasma-calendar-active-item-color);font-weight:var(--plasma-calendar-month-selected-font-weight);}.s14caaqm.item-current{border:0.063rem solid var(--plasma-calendar-current-item-border-color);}.s14caaqm.item-current.item-selected{background-color:initial;color:var(--plasma-calendar-selected-item-color);font-weight:var(--plasma-calendar-month-selected-font-weight);}.s14caaqm.item-current.item-selected > div:first-of-type{background-color:var(--plasma-calendar-selected-item-background);min-width:calc(var(--plasma-calendar-month-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-month-item-height) - 0.25rem);}.s14caaqm::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-calendar-month-item-border-radius) + 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.s14caaqm.focus-visible:focus::before,.s14caaqm[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}.s14caaqm.item-current{position:relative;}.s14caaqm.item-current::before{content:'';position:absolute;top:-0.1875rem;left:-0.1875rem;right:-0.1875rem;bottom:-0.1875rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-calendar-month-item-border-radius) - 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.s14caaqm.item-current.focus-visible:focus::before,.s14caaqm.item-current[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}
@@ -1,4 +1,4 @@
1
- .CalendarYears_styles_1lubnwe_sq90exc__a926589b{padding:0.5rem 1.5rem 1.5rem;box-sizing:border-box;}
2
- .CalendarYears_styles_1lubnwe_sp45mzt__a926589b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
3
- .CalendarYears_styles_1lubnwe_s1rv7a6a__a926589b{border-radius:0.438rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
4
- .CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b{font-family:var(--plasma-calendar-year-font-family);font-size:var(--plasma-calendar-year-font-size);font-style:var(--plasma-calendar-year-font-style);font-weight:var(--plasma-calendar-year-font-weight);-webkit-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);-moz-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);-ms-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);letter-spacing:var(--plasma-calendar-year-font-letter-spacing);line-height:var(--plasma-calendar-year-line-height);position:relative;box-sizing:border-box;min-height:3.5rem;border-radius:var(--plasma-calendar-item-border-radius);-webkit-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;--calendar_private-selected-min-width:5.25rem;--calendar_private-selected-min-height:3.25rem;--calendar_private-selected-background:var(--plasma-calendar-selected-item-background);--calendar_private-selected-color:var(--plasma-calendar-selected-item-color);--calendar_private-selectable-background-hover:var(--plasma-calendar-selectable-item-bg-hover);--calendar_private-current-border-color:var(--plasma-calendar-current-item-border-color);--calendar_private-current-background-hover:var(--plasma-calendar-current-item-bg-hover);--calendar_private-current-color-hover:var(--plasma-calendar-current-item-color-hover);--calendar_private-current-child-background-hover:var(--plasma-calendar-current-item-child-bg-hover);--calendar_private-active-background:var(--plasma-calendar-active-item-bg);--calendar_private-active-color:var(--plasma-calendar-active-item-color);--calendar_private-hovered-background:var(--plasma-calendar-hovered-item-bg);--calendar_private-hovered-color:var(--plasma-calendar-hovered-item-color);outline:none;cursor:pointer;}.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b::before{content:'';position:absolute;top:-0.063rem;left:-0.063rem;right:-0.063rem;bottom:-0.063rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:0.563rem;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b.CalendarYears_styles_1lubnwe_focusVisible__a926589b:focus::before,.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b:hover:not(.CalendarYears_styles_1lubnwe_itemSelected__a926589b){background-color:var(--calendar_private-selectable-background-hover);}.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b:hover:not(.CalendarYears_styles_1lubnwe_itemSelected__a926589b):active{background-color:var(--calendar_private-active-background);color:var(--calendar_private-active-color);font-weight:var(--plasma-typo-body-s-bold-font-weight);}.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b.CalendarYears_styles_1lubnwe_itemSelected__a926589b{border:0;background-color:var(--calendar_private-selected-background);color:var(--calendar_private-selected-color);cursor:default;font-weight:var(--plasma-typo-body-s-bold-font-weight);}.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b.CalendarYears_styles_1lubnwe_itemCurrent__a926589b{border:0.063rem solid var(--calendar_private-current-border-color);}.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b.CalendarYears_styles_1lubnwe_itemCurrent__a926589b:not(.CalendarYears_styles_1lubnwe_itemSelected__a926589b):hover{background-color:var(--calendar_private-current-background-hover);color:var(--calendar_private-current-color-hover);}.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b.CalendarYears_styles_1lubnwe_itemCurrent__a926589b:not(.CalendarYears_styles_1lubnwe_itemSelected__a926589b):hover > div:first-of-type{background-color:var(--calendar_private-current-child-background-hover);min-width:var(--calendar_private-selected-min-width);min-height:var(--calendar_private-selected-min-height);}.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b.CalendarYears_styles_1lubnwe_itemCurrent__a926589b:not(.CalendarYears_styles_1lubnwe_itemSelected__a926589b):hover:active{background-color:var(--calendar_private-active-background);color:var(--calendar_private-active-color);font-weight:var(--plasma-typo-body-s-bold-font-weight);}.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b.CalendarYears_styles_1lubnwe_itemHovered__a926589b,.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b.CalendarYears_styles_1lubnwe_itemHovered__a926589b:hover{background-color:var(--calendar_private-hovered-background);color:var(--calendar_private-hovered-color);cursor:pointer;font-weight:var(--plasma-typo-body-s-bold-font-weight);}.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b.CalendarYears_styles_1lubnwe_itemHovered__a926589b:active,.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b.CalendarYears_styles_1lubnwe_itemHovered__a926589b:hover:active{background-color:var(--calendar_private-active-background);color:var(--calendar_private-active-color);font-weight:var(--plasma-typo-body-s-bold-font-weight);}.CalendarYears_styles_1lubnwe_s1fgpu0g__a926589b:active{background-color:var(--calendar_private-active-background);color:var(--calendar_private-active-color);font-weight:var(--plasma-typo-body-s-bold-font-weight);}
1
+ .CalendarYears_styles_f2aje6_sq90exc__599b4140{padding:var(--plasma-calendar-years-padding);box-sizing:border-box;}
2
+ .CalendarYears_styles_f2aje6_sp45mzt__599b4140{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
3
+ .CalendarYears_styles_f2aje6_s1rv7a6a__599b4140{border-radius:calc(var(--plasma-calendar-year-item-border-radius) - 0.125rem);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
4
+ .CalendarYears_styles_f2aje6_s1fgpu0g__599b4140{font-family:var(--plasma-calendar-year-font-family);font-size:var(--plasma-calendar-year-font-size);font-style:var(--plasma-calendar-year-font-style);font-weight:var(--plasma-calendar-year-font-weight);-webkit-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);-moz-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);-ms-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);letter-spacing:var(--plasma-calendar-year-font-letter-spacing);line-height:var(--plasma-calendar-year-line-height);position:relative;box-sizing:border-box;min-height:var(--plasma-calendar-year-item-height);min-width:var(--plasma-calendar-year-item-width);border-radius:var(--plasma-calendar-year-item-border-radius);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;outline:none;cursor:pointer;position:relative;}.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140:hover{background-color:var(--plasma-calendar-selectable-item-bg-hover);}.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140.CalendarYears_styles_f2aje6_itemHovered__599b4140,.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140.CalendarYears_styles_f2aje6_itemHovered__599b4140:hover{background-color:var(--plasma-calendar-selected-item-background);color:var(--plasma-calendar-selected-item-color);cursor:pointer;font-weight:var(--plasma-calendar-year-selected-font-weight);}.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140.CalendarYears_styles_f2aje6_itemSelected__599b4140:not(.CalendarYears_styles_f2aje6_itemCurrent__599b4140){border:0;background-color:var(--plasma-calendar-selected-item-background);color:var(--plasma-calendar-selected-item-color);cursor:default;font-weight:var(--plasma-calendar-year-selected-font-weight);}.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140:active{background-color:var(--plasma-calendar-active-item-bg);color:var(--plasma-calendar-active-item-color);font-weight:var(--plasma-calendar-year-selected-font-weight);}.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140.CalendarYears_styles_f2aje6_itemCurrent__599b4140{border:0.063rem solid var(--plasma-calendar-current-item-border-color);}.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140.CalendarYears_styles_f2aje6_itemCurrent__599b4140.CalendarYears_styles_f2aje6_itemSelected__599b4140{background-color:initial;color:var(--plasma-calendar-selected-item-color);font-weight:var(--plasma-calendar-year-selected-font-weight);}.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140.CalendarYears_styles_f2aje6_itemCurrent__599b4140.CalendarYears_styles_f2aje6_itemSelected__599b4140 > div:first-of-type{background-color:var(--plasma-calendar-selected-item-background);min-width:calc(var(--plasma-calendar-year-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-year-item-height) - 0.25rem);}.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-calendar-year-item-border-radius) + 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140.CalendarYears_styles_f2aje6_focusVisible__599b4140:focus::before,.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140.CalendarYears_styles_f2aje6_itemCurrent__599b4140{position:relative;}.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140.CalendarYears_styles_f2aje6_itemCurrent__599b4140::before{content:'';position:absolute;top:-0.1875rem;left:-0.1875rem;right:-0.1875rem;bottom:-0.1875rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-calendar-year-item-border-radius) - 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140.CalendarYears_styles_f2aje6_itemCurrent__599b4140.CalendarYears_styles_f2aje6_focusVisible__599b4140:focus::before,.CalendarYears_styles_f2aje6_s1fgpu0g__599b4140.CalendarYears_styles_f2aje6_itemCurrent__599b4140[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}
@@ -58,7 +58,7 @@ var CalendarYears = function CalendarYears(_ref) {
58
58
  isSelected = _ref2.isSelected,
59
59
  isCurrent = _ref2.isCurrent;
60
60
  var selectedClass = isSelected ? Calendar_tokens.classes.selectedItem : undefined;
61
- var currentClass = !isSelected && isCurrent ? Calendar_tokens.classes.currentItem : undefined;
61
+ var currentClass = isCurrent ? Calendar_tokens.classes.currentItem : undefined;
62
62
  return /*#__PURE__*/React.createElement(CalendarYears_styles.StyledYearRoot, {
63
63
  className: index.cx(selectedClass, currentClass, Calendar_tokens.classes.selectableItem),
64
64
  ref: function ref(element) {
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarYears.js","sources":["../../../../../src/components/Calendar/ui/CalendarYears/CalendarYears.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from 'react';\n\nimport { cx } from '../../../../utils';\nimport { useYears } from '../../hooks';\nimport { classes } from '../../Calendar.tokens';\n\nimport type { CalendarYearsProps } from './CalendarYears.types';\nimport { StyledCalendarYears, StyledFlex, StyledYear, StyledYearRoot } from './CalendarYears.styles';\n\n/**\n * Компонент годов в календаре.\n */\nexport const CalendarYears: React.FC<CalendarYearsProps> = ({\n date: currentDate,\n startYear,\n selectIndexes,\n outerRefs,\n onChangeYear,\n onSetSelected,\n onKeyDown,\n}) => {\n const [years, selected] = useYears(currentDate, startYear);\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const handleOnChangeYear = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const { year } = event.currentTarget.dataset;\n onChangeYear(Number(year));\n },\n [onChangeYear],\n );\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i][j] = element;\n },\n [outerRefs],\n );\n\n useEffect(() => {\n if (selectedRef.current) {\n onSetSelectedRef.current?.(selectedRef.current);\n }\n }, []);\n\n return (\n <StyledCalendarYears role=\"grid\" aria-labelledby=\"id-grid-label\" onKeyDown={onKeyDown}>\n {years.map((year, i) => (\n <StyledFlex role=\"row\" key={i}>\n {year.map(({ yearValue, isSelected, isCurrent }, j) => {\n const selectedClass = isSelected ? classes.selectedItem : undefined;\n const currentClass = !isSelected && isCurrent ? classes.currentItem : undefined;\n\n return (\n <StyledYearRoot\n className={cx(selectedClass, currentClass, classes.selectableItem)}\n ref={(element: HTMLDivElement) => getRefs(element, i, j)}\n tabIndex={i === selectIndexes?.[0] && j === selectIndexes?.[1] ? 0 : -1}\n onClick={handleOnChangeYear}\n data-year={yearValue}\n aria-selected={isSelected}\n role=\"gridcell\"\n key={`StyledYear-${i}-${j}`}\n aria-label={String(yearValue)}\n >\n <StyledYear>{yearValue}</StyledYear>\n </StyledYearRoot>\n );\n })}\n </StyledFlex>\n ))}\n </StyledCalendarYears>\n );\n};\n"],"names":["CalendarYears","_ref","currentDate","date","startYear","selectIndexes","outerRefs","onChangeYear","onSetSelected","onKeyDown","_useYears","useYears","_useYears2","_slicedToArray","years","selected","selectedRef","useRef","onSetSelectedRef","handleOnChangeYear","useCallback","event","nativeEvent","stopImmediatePropagation","year","currentTarget","dataset","Number","getRefs","element","i","j","current","useEffect","_onSetSelectedRef$cur","call","React","createElement","StyledCalendarYears","role","map","StyledFlex","key","_ref2","yearValue","isSelected","isCurrent","selectedClass","classes","selectedItem","undefined","currentClass","currentItem","StyledYearRoot","className","cx","selectableItem","ref","tabIndex","onClick","concat","String","StyledYear"],"mappings":";;;;;;;;;;;AASA;AACA;AACA;IACaA,aAA2C,GAAG,SAA9CA,aAA2CA,CAAAC,IAAA,EAQlD;AAAA,EAAA,IAPIC,WAAW,GAAAD,IAAA,CAAjBE,IAAI;IACJC,SAAS,GAAAH,IAAA,CAATG,SAAS;IACTC,aAAa,GAAAJ,IAAA,CAAbI,aAAa;IACbC,SAAS,GAAAL,IAAA,CAATK,SAAS;IACTC,YAAY,GAAAN,IAAA,CAAZM,YAAY;IACZC,aAAa,GAAAP,IAAA,CAAbO,aAAa;IACbC,SAAS,GAAAR,IAAA,CAATQ,SAAS,CAAA;AAET,EAAA,IAAAC,SAAA,GAA0BC,iBAAQ,CAACT,WAAW,EAAEE,SAAS,CAAC;IAAAQ,UAAA,GAAAC,uCAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAnDI,IAAAA,KAAK,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,QAAQ,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AACtB,EAAA,IAAMI,WAAW,GAAGC,YAAM,CAACF,QAAQ,CAAC,CAAA;AACpC,EAAA,IAAMG,gBAAgB,GAAGD,YAAM,CAACT,aAAa,CAAC,CAAA;AAE9C,EAAA,IAAMW,kBAA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AAAA,KAAA,CAAAC,aAAA,CAACyB,+BAAU,EAAElB,IAAAA,EAAAA,SAAsB,CACvB,CAAC,CAAA;AAEzB,KAAC,CACO,CAAC,CAAA;AAAA,GAChB,CACgB,CAAC,CAAA;AAE9B;;;;"}
1
+ {"version":3,"file":"CalendarYears.js","sources":["../../../../../src/components/Calendar/ui/CalendarYears/CalendarYears.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from 'react';\n\nimport { cx } from '../../../../utils';\nimport { useYears } from '../../hooks';\nimport { classes } from '../../Calendar.tokens';\n\nimport type { CalendarYearsProps } from './CalendarYears.types';\nimport { StyledCalendarYears, StyledFlex, StyledYear, StyledYearRoot } from './CalendarYears.styles';\n\n/**\n * Компонент годов в календаре.\n */\nexport const CalendarYears: React.FC<CalendarYearsProps> = ({\n date: currentDate,\n startYear,\n selectIndexes,\n outerRefs,\n onChangeYear,\n onSetSelected,\n onKeyDown,\n}) => {\n const [years, selected] = useYears(currentDate, startYear);\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const handleOnChangeYear = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const { year } = event.currentTarget.dataset;\n onChangeYear(Number(year));\n },\n [onChangeYear],\n );\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i][j] = element;\n },\n [outerRefs],\n );\n\n useEffect(() => {\n if (selectedRef.current) {\n onSetSelectedRef.current?.(selectedRef.current);\n }\n }, []);\n\n return (\n <StyledCalendarYears role=\"grid\" aria-labelledby=\"id-grid-label\" onKeyDown={onKeyDown}>\n {years.map((year, i) => (\n <StyledFlex role=\"row\" key={i}>\n {year.map(({ yearValue, isSelected, isCurrent }, j) => {\n const selectedClass = isSelected ? classes.selectedItem : undefined;\n const currentClass = isCurrent ? classes.currentItem : undefined;\n\n return (\n <StyledYearRoot\n className={cx(selectedClass, currentClass, classes.selectableItem)}\n ref={(element: HTMLDivElement) => getRefs(element, i, j)}\n tabIndex={i === selectIndexes?.[0] && j === selectIndexes?.[1] ? 0 : -1}\n onClick={handleOnChangeYear}\n data-year={yearValue}\n aria-selected={isSelected}\n role=\"gridcell\"\n key={`StyledYear-${i}-${j}`}\n aria-label={String(yearValue)}\n >\n <StyledYear>{yearValue}</StyledYear>\n </StyledYearRoot>\n );\n })}\n </StyledFlex>\n ))}\n </StyledCalendarYears>\n );\n};\n"],"names":["CalendarYears","_ref","currentDate","date","startYear","selectIndexes","outerRefs","onChangeYear","onSetSelected","onKeyDown","_useYears","useYears","_useYears2","_slicedToArray","years","selected","selectedRef","useRef","onSetSelectedRef","handleOnChangeYear","useCallback","event","nativeEvent","stopImmediatePropagation","year","currentTarget","dataset","Number","getRefs","element","i","j","current","useEffect","_onSetSelectedRef$cur","call","React","createElement","StyledCalendarYears","role","map","StyledFlex","key","_ref2","yearValue","isSelected","isCurrent","selectedClass","classes","selectedItem","undefined","currentClass","currentItem","StyledYearRoot","className","cx","selectableItem","ref","tabIndex","onClick","concat","String","StyledYear"],"mappings":";;;;;;;;;;;AASA;AACA;AACA;IACaA,aAA2C,GAAG,SAA9CA,aAA2CA,CAAAC,IAAA,EAQlD;AAAA,EAAA,IAPIC,WAAW,GAAAD,IAAA,CAAjBE,IAAI;IACJC,SAAS,GAAAH,IAAA,CAATG,SAAS;IACTC,aAAa,GAAAJ,IAAA,CAAbI,aAAa;IACbC,SAAS,GAAAL,IAAA,CAATK,SAAS;IACTC,YAAY,GAAAN,IAAA,CAAZM,YAAY;IACZC,aAAa,GAAAP,IAAA,CAAbO,aAAa;IACbC,SAAS,GAAAR,IAAA,CAATQ,SAAS,CAAA;AAET,EAAA,IAAAC,SAAA,GAA0BC,iBAAQ,CAACT,WAAW,EAAEE,SAAS,CAAC;IAAAQ,UAAA,GAAAC,uCAAA,CAAA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QAAAA,OAAO,EAAExC,kBAAmB;AAC5B,QAAA,WAAA,EAAWyB,SAAU;AACrB,QAAA,eAAA,EAAeC,UAAW;AAC1BN,QAAAA,IAAI,EAAC,UAAU;QACfG,GAAG,EAAA,aAAA,CAAAkB,MAAA,CAAgB9B,CAAC,OAAA8B,MAAA,CAAI7B,CAAC,CAAG;QAC5B,YAAY8B,EAAAA,MAAM,CAACjB,SAAS,CAAA;OAE5BR,eAAAA,KAAA,CAAAC,aAAA,CAACyB,+BAAU,EAAElB,IAAAA,EAAAA,SAAsB,CACvB,CAAC,CAAA;AAEzB,KAAC,CACO,CAAC,CAAA;AAAA,GAChB,CACgB,CAAC,CAAA;AAE9B;;;;"}
@@ -1,4 +1,4 @@
1
- import './CalendarYears.styles_1lubnwe.css';
1
+ import './CalendarYears.styles_f2aje6.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarYears.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarYears/CalendarYears.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { flexCenter, selectedMixin } from '../../mixins';\nimport { tokens } from '../../Calendar.tokens';\nimport { addFocus } from '../../../../mixins';\n\nexport const StyledCalendarYears = styled.div`\n padding: 0.5rem 1.5rem 1.5rem;\n box-sizing: border-box;\n`;\n\nexport const StyledFlex = styled.div`\n ${String(flexCenter)};\n`;\n\nexport const StyledYear = styled.div`\n border-radius: 0.438rem;\n\n ${String(flexCenter)};\n`;\n\nconst selectable = () => `\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.063rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: '0.563rem',\n })};\n\n --calendar_private-selected-min-width: 5.25rem;\n --calendar_private-selected-min-height: 3.25rem;\n --calendar_private-selected-background: var(${tokens.calendarSelectedItemBackground});\n --calendar_private-selected-color: var(${tokens.calendarSelectedItemColor});\n --calendar_private-selectable-background-hover: var(${tokens.calendarSelectableItemBackgroundHover});\n --calendar_private-current-border-color: var(${tokens.calendarCurrentItemBorderColor});\n --calendar_private-current-background-hover: var(${tokens.calendarCurrentItemBackgroundHover});\n --calendar_private-current-color-hover: var(${tokens.calendarCurrentItemColorHover});\n --calendar_private-current-child-background-hover: var(${tokens.calendarCurrentItemChildBackgroundHover});\n --calendar_private-active-background: var(${tokens.calendarActiveItemBackground});\n --calendar_private-active-color: var(${tokens.calendarActiveItemColor});\n --calendar_private-hovered-background: var(${tokens.calendarHoveredItemBackground});\n --calendar_private-hovered-color: var(${tokens.calendarHoveredItemColor});\n \n ${String(selectedMixin)};\n`;\n\nexport const StyledYearRoot = styled.div`\n font-family: var(${tokens.calendarYearFontFamily});\n font-size: var(${tokens.calendarYearFontSize});\n font-style: var(${tokens.calendarYearFontStyle});\n font-weight: var(${tokens.calendarYearFontWeight});\n letter-spacing: var(${tokens.calendarYearFontLetterSpacing});\n line-height: var(${tokens.calendarYearFontLineHeight});\n position: relative;\n box-sizing: border-box;\n\n min-height: 3.5rem;\n\n border-radius: var(${tokens.calendarItemBorderRadius});\n\n flex: 1;\n\n ${String(flexCenter)};\n ${selectable()};\n`;\n"],"names":["StyledCalendarYears","styled","name","class","propsAsIs","StyledFlex","StyledYear","StyledYearRoot"],"mappings":";;;;;;AAMO,IAAMA,mBAAmB,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,qBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGxC,EAAA;AAEM,IAAMC,UAAU,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE/B,EAAA;AAEM,IAAME,UAAU,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAI/B,EAAA;AA2BM,IAAMG,cAAc,gBAAGN,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,gBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAkBnC;;;;;;;"}
1
+ {"version":3,"file":"CalendarYears.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarYears/CalendarYears.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Calendar.tokens';\nimport { addFocus } from '../../../../mixins';\nimport { addSelected, flexCenter } from '../../mixins';\n\nexport const StyledCalendarYears = styled.div`\n padding: var(${tokens.calendarYearsPadding});\n box-sizing: border-box;\n`;\n\nexport const StyledFlex = styled.div`\n ${String(flexCenter)};\n`;\n\nexport const StyledYear = styled.div`\n border-radius: calc(var(${tokens.calendarYearItemBorderRadius}) - 0.125rem);\n\n ${String(flexCenter)};\n`;\n\nexport const StyledYearRoot = styled.div`\n font-family: var(${tokens.calendarYearFontFamily});\n font-size: var(${tokens.calendarYearFontSize});\n font-style: var(${tokens.calendarYearFontStyle});\n font-weight: var(${tokens.calendarYearFontWeight});\n letter-spacing: var(${tokens.calendarYearFontLetterSpacing});\n line-height: var(${tokens.calendarYearFontLineHeight});\n position: relative;\n box-sizing: border-box;\n\n min-height: var(${tokens.calendarYearItemHeight});\n min-width: var(${tokens.calendarYearItemWidth});\n\n border-radius: var(${tokens.calendarYearItemBorderRadius});\n\n ${String(flexCenter)};\n\n ${addSelected({\n minWidth: `calc(var(${tokens.calendarYearItemWidth}) - 0.25rem)`,\n minHeight: `calc(var(${tokens.calendarYearItemHeight}) - 0.25rem)`,\n selectedFontWeight: `var(${tokens.calendarYearSelectedFontWeight})`,\n selectedBackground: `var(${tokens.calendarSelectedItemBackground})`,\n selectedColor: `var(${tokens.calendarSelectedItemColor})`,\n selectableBackgroundHover: `var(${tokens.calendarSelectableItemBackgroundHover})`,\n currentBorderColor: `var(${tokens.calendarCurrentItemBorderColor})`,\n activeBackground: `var(${tokens.calendarActiveItemBackground})`,\n activeColor: `var(${tokens.calendarActiveItemColor})`,\n })};\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: `calc(var(${tokens.calendarYearItemBorderRadius}) + 0.125rem)`,\n })};\n\n &.${classes.currentItem} {\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.1875rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: `calc(var(${tokens.calendarYearItemBorderRadius}) - 0.125rem)`,\n })};\n }\n`;\n"],"names":["StyledCalendarYears","styled","name","class","propsAsIs","StyledFlex","StyledYear","StyledYearRoot"],"mappings":";;;;;;AAMO,IAAMA,mBAAmB,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,qBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGxC,EAAA;AAEM,IAAMC,UAAU,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE/B,EAAA;AAEM,IAAME,UAAU,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAI/B,EAAA;AAEM,IAAMG,cAAc,gBAAGN,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,gBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CA4CnC;;;;;;;"}
@@ -0,0 +1,4 @@
1
+ .sq90exc{padding:var(--plasma-calendar-years-padding);box-sizing:border-box;}
2
+ .sp45mzt{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
3
+ .s1rv7a6a{border-radius:calc(var(--plasma-calendar-year-item-border-radius) - 0.125rem);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
4
+ .s1fgpu0g{font-family:var(--plasma-calendar-year-font-family);font-size:var(--plasma-calendar-year-font-size);font-style:var(--plasma-calendar-year-font-style);font-weight:var(--plasma-calendar-year-font-weight);-webkit-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);-moz-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);-ms-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);letter-spacing:var(--plasma-calendar-year-font-letter-spacing);line-height:var(--plasma-calendar-year-line-height);position:relative;box-sizing:border-box;min-height:var(--plasma-calendar-year-item-height);min-width:var(--plasma-calendar-year-item-width);border-radius:var(--plasma-calendar-year-item-border-radius);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;outline:none;cursor:pointer;position:relative;}.s1fgpu0g:hover{background-color:var(--plasma-calendar-selectable-item-bg-hover);}.s1fgpu0g.item-hovered,.s1fgpu0g.item-hovered:hover{background-color:var(--plasma-calendar-selected-item-background);color:var(--plasma-calendar-selected-item-color);cursor:pointer;font-weight:var(--plasma-calendar-year-selected-font-weight);}.s1fgpu0g.item-selected:not(.item-current){border:0;background-color:var(--plasma-calendar-selected-item-background);color:var(--plasma-calendar-selected-item-color);cursor:default;font-weight:var(--plasma-calendar-year-selected-font-weight);}.s1fgpu0g:active{background-color:var(--plasma-calendar-active-item-bg);color:var(--plasma-calendar-active-item-color);font-weight:var(--plasma-calendar-year-selected-font-weight);}.s1fgpu0g.item-current{border:0.063rem solid var(--plasma-calendar-current-item-border-color);}.s1fgpu0g.item-current.item-selected{background-color:initial;color:var(--plasma-calendar-selected-item-color);font-weight:var(--plasma-calendar-year-selected-font-weight);}.s1fgpu0g.item-current.item-selected > div:first-of-type{background-color:var(--plasma-calendar-selected-item-background);min-width:calc(var(--plasma-calendar-year-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-year-item-height) - 0.25rem);}.s1fgpu0g::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-calendar-year-item-border-radius) + 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.s1fgpu0g.focus-visible:focus::before,.s1fgpu0g[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}.s1fgpu0g.item-current{position:relative;}.s1fgpu0g.item-current::before{content:'';position:absolute;top:-0.1875rem;left:-0.1875rem;right:-0.1875rem;bottom:-0.1875rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-calendar-year-item-border-radius) - 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.s1fgpu0g.item-current.focus-visible:focus::before,.s1fgpu0g.item-current[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Calendar/utils/index.ts"],"sourcesContent":["import type { CalendarStateType } from '../store/types';\nimport type { CalendarValueType, DateObject, DisabledDay, ItemProps } from '../Calendar.types';\n\nexport const ROW_STEP = 6;\n\nexport const YEAR_RENDER_COUNT = 12;\n\nexport const SHORT_DAY_NAMES = ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'] as const;\n\nexport const FULL_DAY_NAMES: Record<typeof SHORT_DAY_NAMES[number], string> = {\n Пн: 'Понедельник',\n Вт: 'Вторник',\n Ср: 'Среда',\n Чт: 'Четверг',\n Пт: 'Пятница',\n Сб: 'Суббота',\n Вс: 'Воскресенье',\n};\n\nexport const SHORT_MONTH_NAME = ['Янв', 'Фев', 'Март', 'Апр', 'Май', 'Июнь', 'Июль', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'];\n\nexport const MONTH_NAMES = [\n 'Январь',\n 'Февраль',\n 'Март',\n 'Апрель',\n 'Май',\n 'Июнь',\n 'Июль',\n 'Август',\n 'Сентябрь',\n 'Октябрь',\n 'Ноябрь',\n 'Декабрь',\n];\n\nexport const getDaysInMonth = (monthIndex: number, year: number) => new Date(year, monthIndex + 1, 0).getDate();\n\nexport const getOffsetDayInWeek = (monthIndex: number, year: number) => (new Date(year, monthIndex).getDay() || 7) - 1;\n\nexport const getStartYear = (year: number) => Math.trunc((year - 1) * 0.1) * 10 - 1;\n\nexport const getNextDate = (currentYear: number, currentMonth: number) =>\n currentMonth + 1 === MONTH_NAMES.length ? [currentYear + 1, 0] : [currentYear, currentMonth + 1];\n\nexport const getPrevDate = (currentYear: number, currentMonth: number) =>\n currentMonth - 1 < 0 ? [currentYear - 1, 11] : [currentYear, currentMonth - 1];\n\nexport const getDateFromValue = (date: Date | undefined): DateObject => {\n const state = date || new Date();\n\n return {\n day: date !== undefined ? state.getDate() : 0,\n monthIndex: state.getMonth(),\n year: state.getFullYear(),\n };\n};\n\nexport const getDateFromNow = (): DateObject => {\n const nowDate = new Date();\n\n return {\n day: nowDate.getDate(),\n monthIndex: nowDate.getMonth(),\n year: nowDate.getFullYear(),\n };\n};\n\nexport const IsCurrentDay = (date: DateObject, currentDay: number) => {\n const { day, monthIndex: currentMonthIndex, year: currentYear } = getDateFromNow();\n return day === currentDay && date.monthIndex === currentMonthIndex && date.year === currentYear;\n};\n\nexport const isSelectedDay = (date: DateObject, currentDay: number, value?: Date) => {\n if (!value) {\n return false;\n }\n\n const { day, monthIndex, year } = getDateFromValue(value);\n return day === currentDay && date.monthIndex === monthIndex && date.year === year;\n};\n\nexport const isCurrentMonth = (date: DateObject, monthIndex: number) => {\n const { monthIndex: currentMonthIndex, year: currentYear } = getDateFromNow();\n return monthIndex === currentMonthIndex && date.year === currentYear;\n};\n\nexport const isSelectedMonth = (date: DateObject, monthIndex: number) => date.monthIndex === monthIndex;\n\nexport const isCurrentYear = (year: number) => {\n const { year: currentYear } = getDateFromNow();\n return year === currentYear;\n};\n\nexport const isSelectedYear = (date: DateObject, year: number) => date.year === year;\n\nexport const getSortedValues = (values: [Date | undefined, (Date | undefined)?]) =>\n values.sort((start, end) => {\n if (!start || !end) {\n return -1;\n }\n\n return start.getTime() - end.getTime();\n });\n\nexport const isDayInRange = (\n year: number,\n monthIndex: number,\n currentDay: number,\n values: [Date | undefined, Date?],\n) => {\n const [startValue, endValue] = getSortedValues(values);\n\n if (!endValue || !startValue) {\n return false;\n }\n\n const day = new Date(year, monthIndex, currentDay);\n return startValue < day && day <= endValue;\n};\n\nexport const isSameDay = (firstDate: DateObject, secondDate?: DateObject) =>\n secondDate &&\n firstDate.day === secondDate.day &&\n firstDate.monthIndex === secondDate.monthIndex &&\n firstDate.year === secondDate.year;\n\nexport const isValueUpdate = (value: Date | [Date, Date?], prevValue: Date | [Date, Date?]) => {\n if (!Array.isArray(value) && !Array.isArray(prevValue)) {\n return prevValue?.getTime() !== value?.getTime();\n }\n\n if (Array.isArray(value) && Array.isArray(prevValue)) {\n return prevValue[0]?.getTime() !== value[0]?.getTime() || prevValue[1]?.getTime() !== value[1]?.getTime();\n }\n\n return false;\n};\n\n/**\n * Метод проверяет, находится ли календарь в режиме выбора второго значения.\n */\nexport const isSelectProcess = (array: unknown | unknown[]): array is [Date, Date?] =>\n Array.isArray(array) && !array[1];\n\n/**\n * Метод возвращает сторону, когда выбор второго значения диапазона завершён.\n */\nexport const getSideForSelected = (date: DateObject, startValue: Date, endValue: Date) => {\n const currentDateTime = new Date(date.year, date.monthIndex, date.day).getTime();\n const startValueTime = startValue.getTime();\n const endValueTime = endValue.getTime();\n\n if (currentDateTime === startValueTime) {\n return 'right';\n }\n\n if (currentDateTime === endValueTime) {\n return 'left';\n }\n\n return undefined;\n};\n\n/**\n * Метод возвращает сторону, во время выбора второго значения диапазона.\n */\nexport const getSideForHovered = (date: DateObject, hoveredDay: DateObject, startValue: Date, isSelected?: boolean) => {\n const dateHover = new Date(hoveredDay.year, hoveredDay.monthIndex, hoveredDay.day);\n const isHovered = isSameDay(date, hoveredDay);\n\n if ((isSelected && startValue > dateHover) || (isHovered && startValue < dateHover)) {\n return 'left';\n }\n\n if ((isSelected && startValue < dateHover) || (isHovered && startValue > dateHover)) {\n return 'right';\n }\n\n return undefined;\n};\n\n/**\n * Метод возвращает сторону, с которой нужно отрисовать направление полоски диапазона.\n */\nexport const getSideInRange = (\n value: CalendarValueType,\n date: DateObject,\n hoveredDay?: DateObject,\n isSelected?: boolean,\n) => {\n if (!Array.isArray(value)) {\n return undefined;\n }\n\n const [startValue, endValue] = value;\n\n if (startValue && isSelected && endValue) {\n return getSideForSelected(date, startValue, endValue);\n }\n\n if (startValue && hoveredDay) {\n return getSideForHovered(date, hoveredDay, startValue, isSelected);\n }\n\n return undefined;\n};\n\n/**\n * Метод проверяет, находится ли выбранный день в диапазоне.\n */\nexport const getInRange = (value: CalendarValueType, date: DateObject, hoveredDay?: DateObject, inRange?: boolean) => {\n if (!isSelectProcess(value) || !hoveredDay) {\n return inRange;\n }\n\n const dateSelected = value[0];\n const dateHover = new Date(hoveredDay.year, hoveredDay.monthIndex, hoveredDay.day);\n const dateCurrent = new Date(date.year, date.monthIndex, date.day);\n\n if (\n (dateSelected < dateCurrent && dateCurrent < dateHover) ||\n (dateSelected > dateCurrent && dateCurrent > dateHover)\n ) {\n return true;\n }\n\n return inRange;\n};\n\n/**\n * Метод проверяет, можно ли выбрать день.\n */\nexport const canSelectDate = (\n { year, monthIndex, day }: DateObject,\n value: CalendarValueType,\n disabledList?: DisabledDay[],\n) => {\n if (!isSelectProcess(value)) {\n return true;\n }\n\n const hoverDate = new Date(year, monthIndex, day);\n const [startDate] = value;\n\n if (!disabledList?.length) {\n return true;\n }\n\n const offDisabledRange = disabledList.some(\n ({ date }) => (startDate < date && date < hoverDate) || (startDate > date && date > hoverDate),\n );\n\n return !offDisabledRange;\n};\n\n/**\n * Метод для получения двумерного массива и возвращения выбранного элемента.\n */\nexport const getMatrix = <T extends ItemProps>(items: T[], rowSize = 7): readonly [T[][], number[] | undefined] => {\n const newItems = [...items];\n\n let selected: [number, number] | undefined;\n\n const result = newItems.reduce((acc: T[][], item, index) => {\n if (index % rowSize === 0) {\n acc.push([]);\n }\n\n acc[acc.length - 1].push(item);\n\n if (item.isSelected) {\n selected = [acc.length - 1, index % rowSize];\n }\n\n return acc;\n }, []);\n\n return [result, selected] as const;\n};\n\nexport const getCalendarType = (type: CalendarStateType) => {\n switch (type) {\n case 'Months':\n return 'год';\n case 'Years':\n return 'период';\n default:\n return 'месяц';\n }\n};\n"],"names":["ROW_STEP","YEAR_RENDER_COUNT","SHORT_DAY_NAMES","FULL_DAY_NAMES","Пн","Вт","Ср","Чт","Пт","Сб","Вс","SHORT_MONTH_NAME","MONTH_NAMES","getDaysInMonth","monthIndex","year","Date","getDate","getOffsetDayInWeek","getDay","getStartYear","Math","trunc","getNextDate","currentYear","currentMonth","length","getPrevDate","getDateFromValue","date","state","day","undefined","getMonth","getFullYear","getDateFromNow","nowDate","IsCurrentDay","currentDay","_getDateFromNow","currentMonthIndex","isSelectedDay","value","_getDateFromValue","isCurrentMonth","_getDateFromNow2","isSelectedMonth","isCurrentYear","_getDateFromNow3","isSelectedYear","getSortedValues","values","sort","start","end","getTime","isDayInRange","_getSortedValues","_getSortedValues2","_slicedToArray","startValue","endValue","isSameDay","firstDate","secondDate","isValueUpdate","prevValue","Array","isArray","_prevValue$","_value$","_prevValue$2","_value$2","isSelectProcess","array","getSideForSelected","currentDateTime","startValueTime","endValueTime","getSideForHovered","hoveredDay","isSelected","dateHover","isHovered","getSideInRange","_value","getInRange","inRange","dateSelected","dateCurrent","canSelectDate","_ref","disabledList","hoverDate","_value2","startDate","offDisabledRange","some","_ref2","getMatrix","items","rowSize","arguments","newItems","_toConsumableArray","selected","result","reduce","acc","item","index","push","getCalendarType","type"],"mappings":";;;;;;AAGO,IAAMA,QAAQ,GAAG,EAAC;AAElB,IAAMC,iBAAiB,GAAG,GAAE;IAEtBC,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAU;AAE3E,IAAMC,cAA8D,GAAG;AAC1EC,EAAAA,EAAE,EAAE,aAAa;AACjBC,EAAAA,EAAE,EAAE,SAAS;AACbC,EAAAA,EAAE,EAAE,OAAO;AACXC,EAAAA,EAAE,EAAE,SAAS;AACbC,EAAAA,EAAE,EAAE,SAAS;AACbC,EAAAA,EAAE,EAAE,SAAS;AACbC,EAAAA,EAAE,EAAE,aAAA;AACR,EAAC;AAEM,IAAMC,gBAAgB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC;AAEhH,IAAMC,WAAW,GAAG,CACvB,QAAQ,EACR,SAAS,EACT,MAAM,EACN,QAAQ,EACR,KAAK,EACL,MAAM,EACN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A,eAAeA,CAAIC,IAAuB,EAAK;AACxD,EAAA,QAAQA,IAAI;AACR,IAAA,KAAK,QAAQ;AACT,MAAA,OAAO,KAAK,CAAA;AAChB,IAAA,KAAK,OAAO;AACR,MAAA,OAAO,QAAQ,CAAA;AACnB,IAAA;AACI,MAAA,OAAO,OAAO,CAAA;AACtB,GAAA;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Calendar/utils/index.ts"],"sourcesContent":["import type { CalendarStateType } from '../store/types';\nimport type { CalendarValueType, DateObject, DisabledDay, ItemProps } from '../Calendar.types';\n\nexport const ROW_STEP = 6;\n\nexport const YEAR_RENDER_COUNT = 12;\n\nexport const SHORT_DAY_NAMES = ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'] as const;\n\nexport const FULL_DAY_NAMES: Record<typeof SHORT_DAY_NAMES[number], string> = {\n Пн: 'Понедельник',\n Вт: 'Вторник',\n Ср: 'Среда',\n Чт: 'Четверг',\n Пт: 'Пятница',\n Сб: 'Суббота',\n Вс: 'Воскресенье',\n};\n\nexport const SHORT_MONTH_NAME = ['Янв', 'Фев', 'Март', 'Апр', 'Май', 'Июнь', 'Июль', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'];\n\nexport const MONTH_NAMES = [\n 'Январь',\n 'Февраль',\n 'Март',\n 'Апрель',\n 'Май',\n 'Июнь',\n 'Июль',\n 'Август',\n 'Сентябрь',\n 'Октябрь',\n 'Ноябрь',\n 'Декабрь',\n];\n\nexport const getDaysInMonth = (monthIndex: number, year: number) => new Date(year, monthIndex + 1, 0).getDate();\n\nexport const getOffsetDayInWeek = (monthIndex: number, year: number) => (new Date(year, monthIndex).getDay() || 7) - 1;\n\nexport const getStartYear = (year: number) => Math.trunc((year - 1) * 0.1) * 10 - 1;\n\nexport const getNextDate = (currentYear: number, currentMonth: number) =>\n currentMonth + 1 === MONTH_NAMES.length ? [currentYear + 1, 0] : [currentYear, currentMonth + 1];\n\nexport const getPrevDate = (currentYear: number, currentMonth: number) =>\n currentMonth - 1 < 0 ? [currentYear - 1, 11] : [currentYear, currentMonth - 1];\n\nexport const getDateFromValue = (date: Date | undefined): DateObject => {\n const state = date || new Date();\n\n return {\n day: date !== undefined ? state.getDate() : 0,\n monthIndex: state.getMonth(),\n year: state.getFullYear(),\n };\n};\n\nexport const getDateFromNow = (): DateObject => {\n const nowDate = new Date();\n\n return {\n day: nowDate.getDate(),\n monthIndex: nowDate.getMonth(),\n year: nowDate.getFullYear(),\n };\n};\n\nexport const IsCurrentDay = (date: DateObject, currentDay: number) => {\n const { day, monthIndex: currentMonthIndex, year: currentYear } = getDateFromNow();\n return day === currentDay && date.monthIndex === currentMonthIndex && date.year === currentYear;\n};\n\nexport const isSelectedDay = (date: DateObject, currentDay: number, value?: Date) => {\n if (!value) {\n return false;\n }\n\n const { day, monthIndex, year } = getDateFromValue(value);\n return day === currentDay && date.monthIndex === monthIndex && date.year === year;\n};\n\nexport const isCurrentMonth = (date: DateObject, monthIndex: number) => {\n const { monthIndex: currentMonthIndex, year: currentYear } = getDateFromNow();\n return monthIndex === currentMonthIndex && date.year === currentYear;\n};\n\nexport const isSelectedMonth = (date: DateObject, monthIndex: number) => date.monthIndex === monthIndex;\n\nexport const isCurrentYear = (year: number) => {\n const { year: currentYear } = getDateFromNow();\n return year === currentYear;\n};\n\nexport const isSelectedYear = (date: DateObject, year: number) => date.year === year;\n\nexport const getSortedValues = (values: [Date | undefined, (Date | undefined)?]) =>\n values.sort((start, end) => {\n if (!start || !end) {\n return -1;\n }\n\n return start.getTime() - end.getTime();\n });\n\nexport const isDayInRange = (\n year: number,\n monthIndex: number,\n currentDay: number,\n values: [Date | undefined, Date?],\n) => {\n const [startValue, endValue] = getSortedValues(values);\n\n if (!endValue || !startValue) {\n return false;\n }\n\n const day = new Date(year, monthIndex, currentDay);\n return startValue < day && day <= endValue;\n};\n\nexport const isSameDay = (firstDate: DateObject, secondDate?: DateObject) =>\n secondDate &&\n firstDate.day === secondDate.day &&\n firstDate.monthIndex === secondDate.monthIndex &&\n firstDate.year === secondDate.year;\n\nexport const isValueUpdate = (value: Date | [Date?, Date?], prevValue: Date | [Date?, Date?]) => {\n if (!Array.isArray(value) && !Array.isArray(prevValue)) {\n return prevValue?.getTime() !== value?.getTime();\n }\n\n if (Array.isArray(value) && Array.isArray(prevValue)) {\n return prevValue[0]?.getTime() !== value[0]?.getTime() || prevValue[1]?.getTime() !== value[1]?.getTime();\n }\n\n return false;\n};\n\n/**\n * Метод проверяет, находится ли календарь в режиме выбора второго значения.\n */\nexport const isSelectProcess = (array: unknown | unknown[]): array is [Date, Date?] =>\n Array.isArray(array) && !array[1];\n\n/**\n * Метод возвращает сторону, когда выбор второго значения диапазона завершён.\n */\nexport const getSideForSelected = (date: DateObject, startValue: Date, endValue: Date) => {\n const currentDateTime = new Date(date.year, date.monthIndex, date.day).getTime();\n const startValueTime = startValue.getTime();\n const endValueTime = endValue.getTime();\n\n if (currentDateTime === startValueTime) {\n return 'right';\n }\n\n if (currentDateTime === endValueTime) {\n return 'left';\n }\n\n return undefined;\n};\n\n/**\n * Метод возвращает сторону, во время выбора второго значения диапазона.\n */\nexport const getSideForHovered = (date: DateObject, hoveredDay: DateObject, startValue: Date, isSelected?: boolean) => {\n const dateHover = new Date(hoveredDay.year, hoveredDay.monthIndex, hoveredDay.day);\n const isHovered = isSameDay(date, hoveredDay);\n\n if ((isSelected && startValue > dateHover) || (isHovered && startValue < dateHover)) {\n return 'left';\n }\n\n if ((isSelected && startValue < dateHover) || (isHovered && startValue > dateHover)) {\n return 'right';\n }\n\n return undefined;\n};\n\n/**\n * Метод возвращает сторону, с которой нужно отрисовать направление полоски диапазона.\n */\nexport const getSideInRange = (\n value: CalendarValueType,\n date: DateObject,\n hoveredDay?: DateObject,\n isSelected?: boolean,\n) => {\n if (!Array.isArray(value)) {\n return undefined;\n }\n\n const [startValue, endValue] = value;\n\n if (startValue && isSelected && endValue) {\n return getSideForSelected(date, startValue, endValue);\n }\n\n if (startValue && hoveredDay) {\n return getSideForHovered(date, hoveredDay, startValue, isSelected);\n }\n\n return undefined;\n};\n\n/**\n * Метод проверяет, находится ли выбранный день в диапазоне.\n */\nexport const getInRange = (value: CalendarValueType, date: DateObject, hoveredDay?: DateObject, inRange?: boolean) => {\n if (!isSelectProcess(value) || !hoveredDay) {\n return inRange;\n }\n\n const dateSelected = value[0];\n const dateHover = new Date(hoveredDay.year, hoveredDay.monthIndex, hoveredDay.day);\n const dateCurrent = new Date(date.year, date.monthIndex, date.day);\n\n if (\n (dateSelected < dateCurrent && dateCurrent < dateHover) ||\n (dateSelected > dateCurrent && dateCurrent > dateHover)\n ) {\n return true;\n }\n\n return inRange;\n};\n\n/**\n * Метод проверяет, можно ли выбрать день.\n */\nexport const canSelectDate = (\n { year, monthIndex, day }: DateObject,\n value: CalendarValueType,\n disabledList?: DisabledDay[],\n) => {\n if (!isSelectProcess(value)) {\n return true;\n }\n\n const hoverDate = new Date(year, monthIndex, day);\n const [startDate] = value;\n\n if (!disabledList?.length) {\n return true;\n }\n\n const offDisabledRange = disabledList.some(\n ({ date }) => (startDate < date && date < hoverDate) || (startDate > date && date > hoverDate),\n );\n\n return !offDisabledRange;\n};\n\n/**\n * Метод для получения двумерного массива и возвращения выбранного элемента.\n */\nexport const getMatrix = <T extends ItemProps>(items: T[], rowSize = 7): readonly [T[][], number[] | undefined] => {\n const newItems = [...items];\n\n let selected: [number, number] | undefined;\n\n const result = newItems.reduce((acc: T[][], item, index) => {\n if (index % rowSize === 0) {\n acc.push([]);\n }\n\n acc[acc.length - 1].push(item);\n\n if (item.isSelected) {\n selected = [acc.length - 1, index % rowSize];\n }\n\n return acc;\n }, []);\n\n return [result, selected] as const;\n};\n\nexport const getCalendarType = (type: CalendarStateType) => {\n switch (type) {\n case 'Months':\n return 'год';\n case 'Years':\n return 'период';\n default:\n return 'месяц';\n }\n};\n"],"names":["ROW_STEP","YEAR_RENDER_COUNT","SHORT_DAY_NAMES","FULL_DAY_NAMES","Пн","Вт","Ср","Чт","Пт","Сб","Вс","SHORT_MONTH_NAME","MONTH_NAMES","getDaysInMonth","monthIndex","year","Date","getDate","getOffsetDayInWeek","getDay","getStartYear","Math","trunc","getNextDate","currentYear","currentMonth","length","getPrevDate","getDateFromValue","date","state","day","undefined","getMonth","getFullYear","getDateFromNow","nowDate","IsCurrentDay","currentDay","_getDateFromNow","currentMonthIndex","isSelectedDay","value","_getDateFromValue","isCurrentMonth","_getDateFromNow2","isSelectedMonth","isCurrentYear","_getDateFromNow3","isSelectedYear","getSortedValues","values","sort","start","end","getTime","isDayInRange","_getSortedValues","_getSortedValues2","_slicedToArray","startValue","endValue","isSameDay","firstDate","secondDate","isValueUpdate","prevValue","Array","isArray","_prevValue$","_value$","_prevValue$2","_value$2","isSelectProcess","array","getSideForSelected","currentDateTime","startValueTime","endValueTime","getSideForHovered","hoveredDay","isSelected","dateHover","isHovered","getSideInRange","_value","getInRange","inRange","dateSelected","dateCurrent","canSelectDate","_ref","disabledList","hoverDate","_value2","startDate","offDisabledRange","some","_ref2","getMatrix","items","rowSize","arguments","newItems","_toConsumableArray","selected","result","reduce","acc","item","index","push","getCalendarType","type"],"mappings":";;;;;;AAGO,IAAMA,QAAQ,GAAG,EAAC;AAElB,IAAMC,iBAAiB,GAAG,GAAE;IAEtBC,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAU;AAE3E,IAAMC,cAA8D,GAAG;AAC1EC,EAAAA,EAAE,EAAE,aAAa;AACjBC,EAAAA,EAAE,EAAE,SAAS;AACbC,EAAAA,EAAE,EAAE,OAAO;AACXC,EAAAA,EAAE,EAAE,SAAS;AACbC,EAAAA,EAAE,EAAE,SAAS;AACbC,EAAAA,EAAE,EAAE,SAAS;AACbC,EAAAA,EAAE,EAAE,aAAA;AACR,EAAC;AAEM,IAAMC,gBAAgB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QAAQ,GAAG,CAACG,GAAG,CAAClF,MAAM,GAAG,CAAC,EAAEoF,KAAK,GAAGT,OAAO,CAAC,CAAA;AAChD,KAAA;AAEA,IAAA,OAAOO,GAAG,CAAA;GACb,EAAE,EAAE,CAAC,CAAA;AAEN,EAAA,OAAO,CAACF,MAAM,EAAED,QAAQ,CAAC,CAAA;AAC7B,EAAC;IAEYO,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,IAAuB,EAAK;AACxD,EAAA,QAAQA,IAAI;AACR,IAAA,KAAK,QAAQ;AACT,MAAA,OAAO,KAAK,CAAA;AAChB,IAAA,KAAK,OAAO;AACR,MAAA,OAAO,QAAQ,CAAA;AACnB,IAAA;AACI,MAAA,OAAO,OAAO,CAAA;AACtB,GAAA;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -6,7 +6,6 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
6
6
  var React = require('react');
7
7
  var plasmaCore = require('@salutejs/plasma-core');
8
8
  var index$1 = require('../../utils/index.js');
9
- var index$2 = require('../Dropdown/utils/index.js');
10
9
  var index = require('../Select/utils/index.js');
11
10
  var useKeyNavigation = require('../Select/hooks/useKeyNavigation.js');
12
11
  var useForceUpdate = require('../../hooks/useForceUpdate.js');
@@ -21,6 +20,7 @@ require('react-popper');
21
20
  require('styled-components');
22
21
  var ComboboxTarget = require('./ui/ComboboxTarget/ComboboxTarget.js');
23
22
  var Combobox_styles = require('./Combobox.styles.js');
23
+ var getPopoverPlacement = require('../../utils/getPopoverPlacement.js');
24
24
 
25
25
  var _excluded = ["name", "form", "readOnly", "disabled", "label", "placeholder", "id", "children", "role", "view", "size", "frame", "usePortal", "negativeResultContent", "enumerationType", "opened", "placement", "onToggle", "onKeyDown", "filterFunction"];
26
26
  /**
@@ -222,7 +222,7 @@ var comboboxRoot = function comboboxRoot(Root) {
222
222
  ,
223
223
  id: innerId,
224
224
  offset: offset,
225
- placement: index$2.getPlacements(placement),
225
+ placement: getPopoverPlacement.getPlacements(placement),
226
226
  usePortal: usePortal,
227
227
  selectWidth: dynamicTargetWidth,
228
228
  frame: frame,
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.js","sources":["../../../src/components/Combobox/Combobox.tsx"],"sourcesContent":["import React, { Children, forwardRef, useEffect, useRef, useState } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { getPlacements } from '../Dropdown/utils';\nimport { getChildren, getNewSelected, getValues } from '../Select/utils';\nimport { useKeyNavigation } from '../Select/hooks';\nimport { useDidMountEffect, useForceUpdate } from '../../hooks';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { ComboboxTarget } from './ui';\nimport { ComboboxItemNotFound, StyledPopover, StyledRoot, StyledCombobox, StyledNativeSelect } from './Combobox.styles';\nimport type { ComboboxPrimitiveValue, ComboboxProps } from './Combobox.types';\n\n/**\n * Выпадающий список без внешнего контроля видимости.\n */\nexport const comboboxRoot = (Root: RootProps<HTMLInputElement, ComboboxProps>) =>\n forwardRef<HTMLInputElement, ComboboxProps>(\n (\n {\n name,\n form,\n readOnly,\n disabled,\n label,\n placeholder,\n id,\n children,\n role,\n view,\n size,\n frame,\n usePortal,\n negativeResultContent = 'Элементы не найдены',\n enumerationType = 'comma',\n opened = false,\n placement = 'bottom',\n onToggle,\n onKeyDown,\n filterFunction,\n ...rest\n },\n outerRootRef,\n ) => {\n const forceUpdate = useForceUpdate();\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const { valueType = 'single', value } = rest;\n const offset = [0, 4] as [number, number];\n\n const [ref, setRef] = useState<HTMLInputElement | null>(null);\n\n const targetRef = useRef<HTMLInputElement>(null);\n const chipsRefs = useRef<Array<HTMLButtonElement>>([]);\n const comboboxRef = useRef<HTMLDivElement>(null);\n const itemsRefs = useRef<Array<HTMLDivElement>>([]);\n const inputRef = useRef<HTMLInputElement>(null);\n const handleRef = useForkRef<HTMLInputElement>(targetRef, outerRootRef);\n const controlledRefs = { targetRef, chipsRefs, selectRef: comboboxRef, itemsRefs, inputRef };\n\n const [innerOpened, setInnerOpened] = useState(opened);\n const [search, setSearch] = useState<string | undefined>('');\n const [filterValue, setFilterValue] = useState(search);\n\n // INFO: нужно высчитывать для корректной работы портала\n const dynamicTargetWidth = targetRef.current?.offsetWidth;\n\n // INFO: Из-за того, что классы передаются через ref,\n // состояние пропсов после изменения view, size\n // всегда предыдущее, поэтому нужно делать форс-ререндер\n useDidMountEffect(() => {\n forceUpdate();\n }, [view, size]);\n\n useEffect(() => {\n if (disabled || readOnly) {\n return;\n }\n\n setInnerOpened(opened);\n }, [opened, disabled, readOnly]);\n\n useEffect(() => {\n // INFO: Для кейсов, когда значение выбрано и нужно вывести весь список\n if (opened) {\n setFilterValue('');\n }\n }, []);\n\n const onInnerToggle = (openValue: boolean, event: React.SyntheticEvent | Event) => {\n if (disabled || readOnly) {\n return;\n }\n\n // INFO: Для кейсов, когда значение выбрано и нужно вывести весь список\n if (!innerOpened) {\n setFilterValue('');\n }\n\n if (onToggle) {\n onToggle(openValue, event);\n\n return;\n }\n\n setInnerOpened(openValue);\n };\n\n const closedWithoutChanges = useRef(true);\n\n const updateValue = (item: HTMLElement, event: React.SyntheticEvent | Event) => {\n const {\n dataset: { value: newValue },\n } = item;\n\n if (rest.valueType === 'multiple') {\n const newSelected = getNewSelected(rest.value, newValue, rest.valueType);\n rest.onChangeValue?.(newSelected);\n\n return;\n }\n\n const newSelected = getNewSelected(rest.value, newValue, 'single');\n\n rest.onChangeValue?.(newSelected);\n\n onInnerToggle?.(false, event);\n\n closedWithoutChanges.current = false;\n };\n\n const onClickChildrenItem = (event: React.MouseEvent<HTMLDivElement>) => {\n // INFO: Для корректной работы компонента Popper\n event.stopPropagation();\n\n const item = event.currentTarget as HTMLElement;\n\n updateValue(item, event);\n };\n\n const onChangeChipValue = (newValue?: Array<ComboboxPrimitiveValue>) => {\n if (rest.valueType !== 'multiple') {\n return;\n }\n\n rest.onChangeValue?.(newValue);\n };\n\n const { onKeyDownTarget, onKeyDownSelect } = useKeyNavigation({\n controlledRefs,\n opened: innerOpened,\n enumerationType,\n valueType,\n componentType: 'combobox',\n value,\n search: filterValue,\n updateOpened: onInnerToggle,\n updateValue,\n });\n\n const childrenArray = Children.toArray(children) as React.ReactElement[];\n\n const childrenMemo = getChildren(\n childrenArray,\n { onClick: onClickChildrenItem, childrenRefs: itemsRefs },\n value,\n filterValue,\n filterFunction,\n ).filter(Boolean);\n\n const values = getValues(childrenArray, value);\n\n const onSearch = (newSearch?: string, newOpened?: boolean) => {\n setSearch(newSearch);\n setFilterValue(newSearch);\n setInnerOpened(newOpened ?? true);\n };\n\n const onKeyDownHandle = (event: React.KeyboardEvent<HTMLInputElement>) => {\n onKeyDown?.(event);\n onKeyDownTarget(event);\n };\n\n return (\n <StyledRoot ref={comboboxRef}>\n <StyledNativeSelect\n aria-invalid=\"false\"\n aria-hidden=\"true\"\n aria-readonly={readOnly}\n tabIndex={-1}\n form={form}\n name={name}\n value={`${value}`}\n disabled={disabled || readOnly}\n />\n <StyledPopover\n role={role}\n isOpen={innerOpened}\n onToggle={onInnerToggle}\n target={\n <ComboboxTarget\n opened={innerOpened}\n values={values}\n label={label}\n placeholder={placeholder}\n search={search}\n enumerationType={enumerationType}\n valueType={valueType}\n readOnly={readOnly}\n disabled={disabled}\n size={size}\n closedWithoutChanges={closedWithoutChanges}\n ref={handleRef}\n chipsRefs={chipsRefs}\n inputRef={inputRef}\n id={innerId}\n onChange={onChangeChipValue}\n onSearch={onSearch}\n onKeyDown={onKeyDownHandle}\n {...rest}\n />\n }\n className={cx(ref?.classList.toString())} // INFO: Прокидываем стили для Popover\n id={innerId}\n offset={offset}\n placement={getPlacements(placement)}\n usePortal={usePortal}\n selectWidth={dynamicTargetWidth}\n frame={frame}\n trigger=\"click\"\n isFocusTrapped={false}\n preventOverflow={false}\n closeOnEsc={false}\n closeOnOverlayClick\n >\n <Root ref={setRef} view={view} size={size}>\n <StyledCombobox onKeyDown={onKeyDownSelect}>\n {childrenMemo.length ? (\n childrenMemo\n ) : (\n <ComboboxItemNotFound>{negativeResultContent}</ComboboxItemNotFound>\n )}\n </StyledCombobox>\n </Root>\n </StyledPopover>\n </StyledRoot>\n );\n },\n );\n\nexport const comboboxConfig = {\n name: 'Combobox',\n tag: 'div',\n layout: comboboxRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["comboboxRoot","Root","forwardRef","_ref","outerRootRef","_targetRef$current","name","form","readOnly","disabled","label","placeholder","id","children","role","view","size","frame","usePortal","_ref$negativeResultCo","negativeResultContent","_ref$enumerationType","enumerationType","_ref$opened","opened","_ref$placement","placement","onToggle","onKeyDown","filterFunction","rest","_objectWithoutProperties","_excluded","forceUpdate","useForceUpdate","uniqId","safeUseId","innerId","_rest$valueType","valueType","value","offset","_useState","useState","_useState2","_slicedToArray","ref","setRef","targetRef","useRef","chipsRefs","comboboxRef","itemsRefs","inputRef","handleRef","useForkRef","controlledRefs","selectRef","_useState3","_useState4","innerOpened","setInnerOpened","_useState5","_useState6","search","setSearch","_useState7","_useState8","filterValue","setFilterValue","dynamicTargetWidth","current","offsetWidth","useDidMountEffect","useEffect","onInnerToggle","openValue","event","closedWithoutChanges","updateValue","item","_rest$onChangeValue2","newValue","dataset","_rest$onChangeValue","newSelected","getNewSelected","onChangeValue","call","onClickChildrenItem","stopPropagation","currentTarget","onChangeChipValue","_rest$onChangeValue3","_useKeyNavigation","useKeyNavigation","componentType","updateOpened","onKeyDownTarget","onKeyDownSelect","childrenArray","Children","toArray","childrenMemo","getChildren","onClick","childrenRefs","filter","Boolean","values","getValues","onSearch","newSearch","newOpened","onKeyDownHandle","React","createElement","StyledRoot","StyledNativeSelect","tabIndex","concat","StyledPopover","isOpen","target","ComboboxTarget","_extends","onChange","className","cx","classList","toString","getPlacements","selectWidth","trigger","isFocusTrapped","preventOverflow","closeOnEsc","closeOnOverlayClick","StyledCombobox","length","ComboboxItemNotFound","comboboxConfig","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAAgD,EAAA;AAAA,EAAA,oBACzEC,gBAAU,CACN,UAAAC,IAAA,EAwBIC,YAAY,EACX;AAAA,IAAA,IAAAC,kBAAA,CAAA;AAAA,IAAA,IAvBGC,IAAI,GAAAH,IAAA,CAAJG,IAAI;MACJC,IAAI,GAAAJ,IAAA,CAAJI,IAAI;MACJC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;MACRC,QAAQ,GAAAN,IAAA,CAARM,QAAQ;MACRC,KAAK,GAAAP,IAAA,CAALO,KAAK;MACLC,WAAW,GAAAR,IAAA,CAAXQ,WAAW;MACXC,EAAE,GAAAT,IAAA,CAAFS,EAAE;MACFC,QAAQ,GAAAV,IAAA,CAARU,QAAQ;MACRC,IAAI,GAAAX,IAAA,CAAJW,IAAI;MACJC,IAAI,GAAAZ,IAAA,CAAJY,IAAI;MACJC,IAAI,GAAAb,IAAA,CAAJa,IAAI;MACJC,KAAK,GAAAd,IAAA,CAALc,KAAK;MACLC,SAAS,GAAAf,IAAA,CAATe,SAAS;MAAAC,qBAAA,GAAAhB,IAAA,CACTiB,qBAAqB;AAArBA,MAAAA,qBAAqB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,qBAAqB,GAAAA,qBAAA;MAAAE,oBAAA,GAAAlB,IAAA,CAC7CmB,eAAe;AAAfA,MAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,oBAAA;MAAAE,WAAA,GAAApB,IAAA,CACzBqB,MAAM;AAANA,MAAAA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAA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AAAgB,KAAA,EACtCI,YAAY,CAACoC,MAAM,GAChBpC,YAAY,gBAEZY,KAAA,CAAAC,aAAA,CAACwB,oCAAoB,EAAExH,IAAAA,EAAAA,qBAA4C,CAE3D,CACd,CACK,CACP,CAAC,CAAA;AAErB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMyH,cAAc,GAAG;AAC1BvI,EAAAA,IAAI,EAAE,UAAU;AAChBwI,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE/I,YAAY;AACpBgJ,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRlI,IAAAA,IAAI,EAAE;AACFmI,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDnI,IAAAA,IAAI,EAAE;AACFkI,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNtI,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"Combobox.js","sources":["../../../src/components/Combobox/Combobox.tsx"],"sourcesContent":["import React, { Children, forwardRef, useEffect, useRef, useState } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx, getPlacements } from '../../utils';\nimport { getChildren, getNewSelected, getValues } from '../Select/utils';\nimport { useKeyNavigation } from '../Select/hooks';\nimport { useDidMountEffect, useForceUpdate } from '../../hooks';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { ComboboxTarget } from './ui';\nimport { ComboboxItemNotFound, StyledPopover, StyledRoot, StyledCombobox, StyledNativeSelect } from './Combobox.styles';\nimport type { ComboboxPrimitiveValue, ComboboxProps } from './Combobox.types';\n\n/**\n * Выпадающий список без внешнего контроля видимости.\n */\nexport const comboboxRoot = (Root: RootProps<HTMLInputElement, ComboboxProps>) =>\n forwardRef<HTMLInputElement, ComboboxProps>(\n (\n {\n name,\n form,\n readOnly,\n disabled,\n label,\n placeholder,\n id,\n children,\n role,\n view,\n size,\n frame,\n usePortal,\n negativeResultContent = 'Элементы не найдены',\n enumerationType = 'comma',\n opened = false,\n placement = 'bottom',\n onToggle,\n onKeyDown,\n filterFunction,\n ...rest\n },\n outerRootRef,\n ) => {\n const forceUpdate = useForceUpdate();\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const { valueType = 'single', value } = rest;\n const offset = [0, 4] as [number, number];\n\n const [ref, setRef] = useState<HTMLInputElement | null>(null);\n\n const targetRef = useRef<HTMLInputElement>(null);\n const chipsRefs = useRef<Array<HTMLButtonElement>>([]);\n const comboboxRef = useRef<HTMLDivElement>(null);\n const itemsRefs = useRef<Array<HTMLDivElement>>([]);\n const inputRef = useRef<HTMLInputElement>(null);\n const handleRef = useForkRef<HTMLInputElement>(targetRef, outerRootRef);\n const controlledRefs = { targetRef, chipsRefs, selectRef: comboboxRef, itemsRefs, inputRef };\n\n const [innerOpened, setInnerOpened] = useState(opened);\n const [search, setSearch] = useState<string | undefined>('');\n const [filterValue, setFilterValue] = useState(search);\n\n // INFO: нужно высчитывать для корректной работы портала\n const dynamicTargetWidth = targetRef.current?.offsetWidth;\n\n // INFO: Из-за того, что классы передаются через ref,\n // состояние пропсов после изменения view, size\n // всегда предыдущее, поэтому нужно делать форс-ререндер\n useDidMountEffect(() => {\n forceUpdate();\n }, [view, size]);\n\n useEffect(() => {\n if (disabled || readOnly) {\n return;\n }\n\n setInnerOpened(opened);\n }, [opened, disabled, readOnly]);\n\n useEffect(() => {\n // INFO: Для кейсов, когда значение выбрано и нужно вывести весь список\n if (opened) {\n setFilterValue('');\n }\n }, []);\n\n const onInnerToggle = (openValue: boolean, event: React.SyntheticEvent | Event) => {\n if (disabled || readOnly) {\n return;\n }\n\n // INFO: Для кейсов, когда значение выбрано и нужно вывести весь список\n if (!innerOpened) {\n setFilterValue('');\n }\n\n if (onToggle) {\n onToggle(openValue, event);\n\n return;\n }\n\n setInnerOpened(openValue);\n };\n\n const closedWithoutChanges = useRef(true);\n\n const updateValue = (item: HTMLElement, event: React.SyntheticEvent | Event) => {\n const {\n dataset: { value: newValue },\n } = item;\n\n if (rest.valueType === 'multiple') {\n const newSelected = getNewSelected(rest.value, newValue, rest.valueType);\n rest.onChangeValue?.(newSelected);\n\n return;\n }\n\n const newSelected = getNewSelected(rest.value, newValue, 'single');\n\n rest.onChangeValue?.(newSelected);\n\n onInnerToggle?.(false, event);\n\n closedWithoutChanges.current = false;\n };\n\n const onClickChildrenItem = (event: React.MouseEvent<HTMLDivElement>) => {\n // INFO: Для корректной работы компонента Popper\n event.stopPropagation();\n\n const item = event.currentTarget as HTMLElement;\n\n updateValue(item, event);\n };\n\n const onChangeChipValue = (newValue?: Array<ComboboxPrimitiveValue>) => {\n if (rest.valueType !== 'multiple') {\n return;\n }\n\n rest.onChangeValue?.(newValue);\n };\n\n const { onKeyDownTarget, onKeyDownSelect } = useKeyNavigation({\n controlledRefs,\n opened: innerOpened,\n enumerationType,\n valueType,\n componentType: 'combobox',\n value,\n search: filterValue,\n updateOpened: onInnerToggle,\n updateValue,\n });\n\n const childrenArray = Children.toArray(children) as React.ReactElement[];\n\n const childrenMemo = getChildren(\n childrenArray,\n { onClick: onClickChildrenItem, childrenRefs: itemsRefs },\n value,\n filterValue,\n filterFunction,\n ).filter(Boolean);\n\n const values = getValues(childrenArray, value);\n\n const onSearch = (newSearch?: string, newOpened?: boolean) => {\n setSearch(newSearch);\n setFilterValue(newSearch);\n setInnerOpened(newOpened ?? true);\n };\n\n const onKeyDownHandle = (event: React.KeyboardEvent<HTMLInputElement>) => {\n onKeyDown?.(event);\n onKeyDownTarget(event);\n };\n\n return (\n <StyledRoot ref={comboboxRef}>\n <StyledNativeSelect\n aria-invalid=\"false\"\n aria-hidden=\"true\"\n aria-readonly={readOnly}\n tabIndex={-1}\n form={form}\n name={name}\n value={`${value}`}\n disabled={disabled || readOnly}\n />\n <StyledPopover\n role={role}\n isOpen={innerOpened}\n onToggle={onInnerToggle}\n target={\n <ComboboxTarget\n opened={innerOpened}\n values={values}\n label={label}\n placeholder={placeholder}\n search={search}\n enumerationType={enumerationType}\n valueType={valueType}\n readOnly={readOnly}\n disabled={disabled}\n size={size}\n closedWithoutChanges={closedWithoutChanges}\n ref={handleRef}\n chipsRefs={chipsRefs}\n inputRef={inputRef}\n id={innerId}\n onChange={onChangeChipValue}\n onSearch={onSearch}\n onKeyDown={onKeyDownHandle}\n {...rest}\n />\n }\n className={cx(ref?.classList.toString())} // INFO: Прокидываем стили для Popover\n id={innerId}\n offset={offset}\n placement={getPlacements(placement)}\n usePortal={usePortal}\n selectWidth={dynamicTargetWidth}\n frame={frame}\n trigger=\"click\"\n isFocusTrapped={false}\n preventOverflow={false}\n closeOnEsc={false}\n closeOnOverlayClick\n >\n <Root ref={setRef} view={view} size={size}>\n <StyledCombobox onKeyDown={onKeyDownSelect}>\n {childrenMemo.length ? (\n childrenMemo\n ) : (\n <ComboboxItemNotFound>{negativeResultContent}</ComboboxItemNotFound>\n )}\n </StyledCombobox>\n </Root>\n </StyledPopover>\n </StyledRoot>\n );\n },\n );\n\nexport const comboboxConfig = {\n name: 'Combobox',\n tag: 'div',\n layout: comboboxRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["comboboxRoot","Root","forwardRef","_ref","outerRootRef","_targetRef$current","name","form","readOnly","disabled","label","placeholder","id","children","role","view","size","frame","usePortal","_ref$negativeResultCo","negativeResultContent","_ref$enumerationType","enumerationType","_ref$opened","opened","_ref$placement","placement","onToggle","onKeyDown","filterFunction","rest","_objectWithoutProperties","_excluded","forceUpdate","useForceUpdate","uniqId","safeUseId","innerId","_rest$valueType","valueType","value","offset","_useState","useState","_useState2","_slicedToArray","ref","setRef","targetRef","useRef","chipsRefs","comboboxRef","itemsRefs","inputRef","handleRef","useForkRef","controlledRefs","selectRef","_useState3","_useState4","innerOpened","setInnerOpened","_useState5","_useState6","search","setSearch","_useState7","_useState8","filterValue","setFilterValue","dynamicTargetWidth","current","offsetWidth","useDidMountEffect","useEffect","onInnerToggle","openValue","event","closedWithoutChanges","updateValue","item","_rest$onChangeValue2","newValue","dataset","_rest$onChangeValue","newSelected","getNewSelected","onChangeValue","call","onClickChildrenItem","stopPropagation","currentTarget","onChangeChipValue","_rest$onChangeValue3","_useKeyNavigation","useKeyNavigation","componentType","updateOpened","onKeyDownTarget","onKeyDownSelect","childrenArray","Children","toArray","childrenMemo","getChildren","onClick","childrenRefs","filter","Boolean","values","getValues","onSearch","newSearch","newOpened","onKeyDownHandle","React","createElement","StyledRoot","StyledNativeSelect","tabIndex","concat","StyledPopover","isOpen","target","ComboboxTarget","_extends","onChange","className","cx","classList","toString","getPlacements","selectWidth","trigger","isFocusTrapped","preventOverflow","closeOnEsc","closeOnOverlayClick","StyledCombobox","length","ComboboxItemNotFound","comboboxConfig","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAeA;AACA;AACA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAAgD,EAAA;AAAA,EAAA,oBACzEC,gBAAU,CACN,UAAAC,IAAA,EAwBIC,YAAY,EACX;AAAA,IAAA,IAAAC,kBAAA,CAAA;AAAA,IAAA,IAvBGC,IAAI,GAAAH,IAAA,CAAJG,IAAI;MACJC,IAAI,GAAAJ,IAAA,CAAJI,IAAI;MACJC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;MACRC,QAAQ,GAAAN,IAAA,CAARM,QAAQ;MACRC,KAAK,GAAAP,IAAA,CAALO,KAAK;MACLC,WAAW,GAAAR,IAAA,CAAXQ,WAAW;MACXC,EAAE,GAAAT,IAAA,CAAFS,EAAE;MACFC,QAAQ,GAAAV,IAAA,CAARU,QAAQ;MACRC,IAAI,GAAAX,IAAA,CAAJW,IAAI;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