@salutejs/plasma-new-hope 0.174.0-canary.1503.11466452273.0 → 0.174.0-canary.1503.11500823810.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (525) hide show
  1. package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -1
  2. package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -1
  3. package/cjs/components/Attach/Attach.js +3 -4
  4. package/cjs/components/Attach/Attach.js.map +1 -1
  5. package/cjs/components/Attach/components/AttachButton/AttachButton.js +0 -1
  6. package/cjs/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
  7. package/cjs/components/Attach/ui/Button/Button.styles.js +0 -1
  8. package/cjs/components/Attach/ui/Button/Button.styles.js.map +1 -1
  9. package/cjs/components/Attach/ui/Cell/Cell.styles.js +0 -2
  10. package/cjs/components/Attach/ui/Cell/Cell.styles.js.map +1 -1
  11. package/cjs/components/Attach/ui/IconButton/IconButton.styles.js +0 -1
  12. package/cjs/components/Attach/ui/IconButton/IconButton.styles.js.map +1 -1
  13. package/cjs/components/Attach/utils/getFileicon.js +3 -4
  14. package/cjs/components/Attach/utils/getFileicon.js.map +1 -1
  15. package/cjs/components/Attach/utils/index.js +0 -3
  16. package/cjs/components/Attach/utils/index.js.map +1 -1
  17. package/cjs/components/Autocomplete/Autocomplete.js +5 -6
  18. package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
  19. package/cjs/components/Autocomplete/Autocomplete.styles.js +2 -3
  20. package/cjs/components/Autocomplete/Autocomplete.styles.js.map +1 -1
  21. package/cjs/components/Autocomplete/ui/TextField/TextField.styles.js +1 -2
  22. package/cjs/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
  23. package/cjs/components/Avatar/Avatar.js +2 -3
  24. package/cjs/components/Avatar/Avatar.js.map +1 -1
  25. package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +2 -4
  26. package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  27. package/cjs/components/Button/Button.styles.js +0 -3
  28. package/cjs/components/Button/Button.styles.js.map +1 -1
  29. package/cjs/components/Calendar/CalendarBase/CalendarBase.js +5 -5
  30. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +8 -8
  31. package/cjs/components/Calendar/hooks/useDays.js +2 -2
  32. package/cjs/components/Calendar/hooks/useKeyNavigation.js +1 -1
  33. package/cjs/components/Calendar/hooks/useMonths.js +2 -2
  34. package/cjs/components/Calendar/hooks/useQuarters.js +2 -2
  35. package/cjs/components/Calendar/hooks/useYears.js +2 -2
  36. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +9 -5
  37. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
  38. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
  39. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  40. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
  41. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  42. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +9 -5
  43. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  44. package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +9 -5
  45. package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
  46. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +9 -5
  47. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  48. package/cjs/components/Combobox/ComboboxNew/Combobox.js +11 -12
  49. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  50. package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
  51. package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
  52. package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
  53. package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  54. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
  55. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
  56. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -6
  57. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  58. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -3
  59. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  60. package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
  61. package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
  62. package/cjs/components/Combobox/ComboboxOld/Combobox.js +4 -10
  63. package/cjs/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  64. package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
  65. package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
  66. package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
  67. package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
  68. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
  69. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
  70. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -10
  71. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
  72. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -10
  73. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
  74. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -10
  75. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
  76. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -10
  77. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
  78. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
  79. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  80. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
  81. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
  82. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
  83. package/cjs/components/DatePicker/DatePickerBase.styles.js +1 -7
  84. package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -1
  85. package/cjs/components/DatePicker/RangeDate/RangeDate.js +1 -1
  86. package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
  87. package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
  88. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
  89. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
  90. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
  91. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
  92. package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
  93. package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
  94. package/cjs/components/Drawer/Drawer.js +5 -10
  95. package/cjs/components/Drawer/Drawer.js.map +1 -1
  96. package/cjs/components/Drawer/Drawer.styles.js +0 -4
  97. package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
  98. package/cjs/components/Drawer/hooks/useDrawer.js +0 -4
  99. package/cjs/components/Drawer/hooks/useDrawer.js.map +1 -1
  100. package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
  101. package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
  102. package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
  103. package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
  104. package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
  105. package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
  106. package/cjs/components/Dropdown/Dropdown.js +3 -10
  107. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  108. package/cjs/components/Dropdown/Dropdown.styles.js +2 -3
  109. package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
  110. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -9
  111. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  112. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -2
  113. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  114. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -2
  115. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
  116. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
  117. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
  118. package/cjs/components/Editable/Editable.js +3 -4
  119. package/cjs/components/Editable/Editable.js.map +1 -1
  120. package/cjs/components/Editable/utils/clearSelection.js +0 -2
  121. package/cjs/components/Editable/utils/clearSelection.js.map +1 -1
  122. package/cjs/components/Editable/utils/selectText.js +0 -2
  123. package/cjs/components/Editable/utils/selectText.js.map +1 -1
  124. package/cjs/components/EmptyState/EmptyState.styles.js +1 -2
  125. package/cjs/components/EmptyState/EmptyState.styles.js.map +1 -1
  126. package/cjs/components/IconButton/IconButton.js +1 -1
  127. package/cjs/components/IconButton/IconButton.styles.js +0 -8
  128. package/cjs/components/IconButton/IconButton.styles.js.map +1 -1
  129. package/cjs/components/Modal/Modal.js +6 -8
  130. package/cjs/components/Modal/Modal.js.map +1 -1
  131. package/cjs/components/Modal/hooks/useModal.js +0 -4
  132. package/cjs/components/Modal/hooks/useModal.js.map +1 -1
  133. package/cjs/components/Notification/Notification.css +11 -11
  134. package/cjs/components/Notification/Notification.styles.js +3 -4
  135. package/cjs/components/Notification/Notification.styles.js.map +1 -1
  136. package/cjs/components/Notification/{Notification.styles_7h8hp0.css → Notification.styles_1cf2gwd.css} +1 -1
  137. package/cjs/components/Notification/Notification.tokens.js +2 -1
  138. package/cjs/components/Notification/Notification.tokens.js.map +1 -1
  139. package/cjs/components/Notification/NotificationsPortal.js +4 -5
  140. package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
  141. package/cjs/components/Notification/NotificationsProvider.css +11 -11
  142. package/cjs/components/Pagination/Pagination.styles.js +1 -2
  143. package/cjs/components/Pagination/Pagination.styles.js.map +1 -1
  144. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
  145. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  146. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
  147. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
  148. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
  149. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
  150. package/cjs/components/Popover/Popover.js +1 -1
  151. package/cjs/components/Popup/Popup.js +2 -2
  152. package/cjs/components/Popup/PopupContext.js +1 -1
  153. package/cjs/components/Range/Range.styles.js +0 -1
  154. package/cjs/components/Range/Range.styles.js.map +1 -1
  155. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
  156. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
  157. package/cjs/components/Select/Select.js +11 -12
  158. package/cjs/components/Select/Select.js.map +1 -1
  159. package/cjs/components/Select/Select.styles.js +2 -5
  160. package/cjs/components/Select/Select.styles.js.map +1 -1
  161. package/cjs/components/Select/hooks/usePathMaps.js +0 -2
  162. package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
  163. package/cjs/components/Select/ui/Inner/Inner.js +1 -2
  164. package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
  165. package/cjs/components/Select/ui/Inner/ui/Item/Item.js +4 -5
  166. package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  167. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +0 -1
  168. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  169. package/cjs/components/Select/ui/Target/ui/Button/Button.js +1 -1
  170. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
  171. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  172. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
  173. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
  174. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  175. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
  176. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
  177. package/cjs/components/Select/utils/getButtonLabel.js +0 -2
  178. package/cjs/components/Select/utils/getButtonLabel.js.map +1 -1
  179. package/cjs/components/Sheet/Sheet.js +3 -3
  180. package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
  181. package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
  182. package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
  183. package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
  184. package/cjs/components/Slider/Slider.js +0 -8
  185. package/cjs/components/Slider/Slider.js.map +1 -1
  186. package/cjs/components/Slider/components/Double/Double.js +1 -2
  187. package/cjs/components/Slider/components/Double/Double.js.map +1 -1
  188. package/cjs/components/Slider/components/Double/Double.styles.js +0 -1
  189. package/cjs/components/Slider/components/Double/Double.styles.js.map +1 -1
  190. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
  191. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  192. package/cjs/components/Slider/components/Single/Single.js +1 -2
  193. package/cjs/components/Slider/components/Single/Single.js.map +1 -1
  194. package/cjs/components/Slider/components/SliderBase/SliderBase.js +1 -1
  195. package/cjs/components/Steps/Steps.js +1 -1
  196. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
  197. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  198. package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
  199. package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
  200. package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
  201. package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
  202. package/cjs/components/TextArea/TextArea.js +3 -3
  203. package/cjs/components/TextArea/TextArea.js.map +1 -1
  204. package/cjs/components/TextArea/TextArea.styles.js +4 -5
  205. package/cjs/components/TextArea/TextArea.styles.js.map +1 -1
  206. package/cjs/components/TextArea/ui/Hint/Hint.js +1 -2
  207. package/cjs/components/TextArea/ui/Hint/Hint.js.map +1 -1
  208. package/cjs/components/TextField/TextField.js +4 -4
  209. package/cjs/components/TextField/TextField.js.map +1 -1
  210. package/cjs/components/TextField/TextField.styles.js +3 -4
  211. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  212. package/cjs/components/TextField/ui/Hint/Hint.js +1 -2
  213. package/cjs/components/TextField/ui/Hint/Hint.js.map +1 -1
  214. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
  215. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
  216. package/cjs/components/Toast/Toast.styles.js +1 -1
  217. package/cjs/components/Toast/ToastController.js +1 -1
  218. package/cjs/components/Toast/utils.js +1 -2
  219. package/cjs/components/Toast/utils.js.map +1 -1
  220. package/cjs/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  221. package/cjs/components/Tooltip/Tooltip.js +2 -3
  222. package/cjs/components/Tooltip/Tooltip.js.map +1 -1
  223. package/cjs/engines/index.js +0 -2
  224. package/cjs/engines/index.js.map +1 -1
  225. package/cjs/hooks/useIsomorphicLayoutEffect.js +0 -1
  226. package/cjs/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  227. package/cjs/index.css +11 -11
  228. package/cjs/index.js +48 -51
  229. package/cjs/index.js.map +1 -1
  230. package/cjs/utils/index.js +0 -5
  231. package/cjs/utils/index.js.map +1 -1
  232. package/emotion/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -1
  233. package/emotion/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -1
  234. package/emotion/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -1
  235. package/emotion/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -1
  236. package/emotion/cjs/components/Notification/Notification.styles.js +11 -11
  237. package/emotion/cjs/components/Notification/Notification.tokens.js +2 -1
  238. package/emotion/cjs/components/Notification/NotificationsPortal.js +2 -2
  239. package/emotion/cjs/components/TextArea/TextArea.js +2 -2
  240. package/emotion/cjs/components/TextArea/TextArea.styles.js +20 -20
  241. package/emotion/cjs/components/TextField/TextField.js +2 -2
  242. package/emotion/cjs/components/TextField/TextField.styles.js +24 -24
  243. package/emotion/es/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -1
  244. package/emotion/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -1
  245. package/emotion/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -1
  246. package/emotion/es/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -1
  247. package/emotion/es/components/Notification/Notification.styles.js +11 -11
  248. package/emotion/es/components/Notification/Notification.tokens.js +2 -1
  249. package/emotion/es/components/Notification/NotificationsPortal.js +2 -2
  250. package/emotion/es/components/TextArea/TextArea.js +2 -2
  251. package/emotion/es/components/TextArea/TextArea.styles.js +20 -20
  252. package/emotion/es/components/TextField/TextField.js +2 -2
  253. package/emotion/es/components/TextField/TextField.styles.js +24 -24
  254. package/emotion/package.json +2 -1
  255. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -1
  256. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -1
  257. package/es/components/Attach/Attach.js +3 -4
  258. package/es/components/Attach/Attach.js.map +1 -1
  259. package/es/components/Attach/components/AttachButton/AttachButton.js +0 -1
  260. package/es/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
  261. package/es/components/Attach/ui/Button/Button.styles.js +0 -1
  262. package/es/components/Attach/ui/Button/Button.styles.js.map +1 -1
  263. package/es/components/Attach/ui/Cell/Cell.styles.js +0 -2
  264. package/es/components/Attach/ui/Cell/Cell.styles.js.map +1 -1
  265. package/es/components/Attach/ui/IconButton/IconButton.styles.js +0 -1
  266. package/es/components/Attach/ui/IconButton/IconButton.styles.js.map +1 -1
  267. package/es/components/Attach/utils/getFileicon.js +3 -4
  268. package/es/components/Attach/utils/getFileicon.js.map +1 -1
  269. package/es/components/Attach/utils/index.js +0 -3
  270. package/es/components/Attach/utils/index.js.map +1 -1
  271. package/es/components/Autocomplete/Autocomplete.js +5 -6
  272. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  273. package/es/components/Autocomplete/Autocomplete.styles.js +2 -3
  274. package/es/components/Autocomplete/Autocomplete.styles.js.map +1 -1
  275. package/es/components/Autocomplete/ui/TextField/TextField.styles.js +1 -2
  276. package/es/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
  277. package/es/components/Avatar/Avatar.js +2 -3
  278. package/es/components/Avatar/Avatar.js.map +1 -1
  279. package/es/components/Breadcrumbs/Breadcrumbs.styles.js +2 -4
  280. package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  281. package/es/components/Button/Button.styles.js +0 -3
  282. package/es/components/Button/Button.styles.js.map +1 -1
  283. package/es/components/Calendar/CalendarBase/CalendarBase.js +5 -5
  284. package/es/components/Calendar/CalendarDouble/CalendarDouble.js +8 -8
  285. package/es/components/Calendar/hooks/useDays.js +2 -2
  286. package/es/components/Calendar/hooks/useKeyNavigation.js +1 -1
  287. package/es/components/Calendar/hooks/useMonths.js +2 -2
  288. package/es/components/Calendar/hooks/useQuarters.js +2 -2
  289. package/es/components/Calendar/hooks/useYears.js +2 -2
  290. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +9 -5
  291. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
  292. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
  293. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  294. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
  295. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  296. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +9 -5
  297. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  298. package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +9 -5
  299. package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
  300. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +9 -5
  301. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  302. package/es/components/Combobox/ComboboxNew/Combobox.js +11 -12
  303. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  304. package/es/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
  305. package/es/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
  306. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
  307. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  308. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
  309. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
  310. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -6
  311. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  312. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -3
  313. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  314. package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
  315. package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
  316. package/es/components/Combobox/ComboboxOld/Combobox.js +4 -10
  317. package/es/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  318. package/es/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
  319. package/es/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
  320. package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
  321. package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
  322. package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
  323. package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
  324. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -10
  325. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
  326. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -10
  327. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
  328. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -10
  329. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
  330. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -10
  331. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
  332. package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
  333. package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  334. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
  335. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
  336. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
  337. package/es/components/DatePicker/DatePickerBase.styles.js +1 -7
  338. package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -1
  339. package/es/components/DatePicker/RangeDate/RangeDate.js +1 -1
  340. package/es/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
  341. package/es/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
  342. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
  343. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
  344. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
  345. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
  346. package/es/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
  347. package/es/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
  348. package/es/components/Drawer/Drawer.js +5 -10
  349. package/es/components/Drawer/Drawer.js.map +1 -1
  350. package/es/components/Drawer/Drawer.styles.js +0 -4
  351. package/es/components/Drawer/Drawer.styles.js.map +1 -1
  352. package/es/components/Drawer/hooks/useDrawer.js +0 -4
  353. package/es/components/Drawer/hooks/useDrawer.js.map +1 -1
  354. package/es/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
  355. package/es/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
  356. package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
  357. package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
  358. package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
  359. package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
  360. package/es/components/Dropdown/Dropdown.js +3 -10
  361. package/es/components/Dropdown/Dropdown.js.map +1 -1
  362. package/es/components/Dropdown/Dropdown.styles.js +2 -3
  363. package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
  364. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -9
  365. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  366. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -2
  367. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  368. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -2
  369. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
  370. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
  371. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
  372. package/es/components/Editable/Editable.js +3 -4
  373. package/es/components/Editable/Editable.js.map +1 -1
  374. package/es/components/Editable/utils/clearSelection.js +0 -2
  375. package/es/components/Editable/utils/clearSelection.js.map +1 -1
  376. package/es/components/Editable/utils/selectText.js +0 -2
  377. package/es/components/Editable/utils/selectText.js.map +1 -1
  378. package/es/components/EmptyState/EmptyState.styles.js +1 -2
  379. package/es/components/EmptyState/EmptyState.styles.js.map +1 -1
  380. package/es/components/IconButton/IconButton.js +1 -1
  381. package/es/components/IconButton/IconButton.styles.js +0 -8
  382. package/es/components/IconButton/IconButton.styles.js.map +1 -1
  383. package/es/components/Modal/Modal.js +6 -8
  384. package/es/components/Modal/Modal.js.map +1 -1
  385. package/es/components/Modal/hooks/useModal.js +0 -4
  386. package/es/components/Modal/hooks/useModal.js.map +1 -1
  387. package/es/components/Notification/Notification.css +11 -11
  388. package/es/components/Notification/Notification.styles.js +3 -4
  389. package/es/components/Notification/Notification.styles.js.map +1 -1
  390. package/es/components/Notification/{Notification.styles_7h8hp0.css → Notification.styles_1cf2gwd.css} +1 -1
  391. package/es/components/Notification/Notification.tokens.js +2 -1
  392. package/es/components/Notification/Notification.tokens.js.map +1 -1
  393. package/es/components/Notification/NotificationsPortal.js +4 -5
  394. package/es/components/Notification/NotificationsPortal.js.map +1 -1
  395. package/es/components/Notification/NotificationsProvider.css +11 -11
  396. package/es/components/Pagination/Pagination.styles.js +1 -2
  397. package/es/components/Pagination/Pagination.styles.js.map +1 -1
  398. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
  399. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  400. package/es/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
  401. package/es/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
  402. package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
  403. package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
  404. package/es/components/Popover/Popover.js +1 -1
  405. package/es/components/Popup/Popup.js +2 -2
  406. package/es/components/Popup/PopupContext.js +1 -1
  407. package/es/components/Range/Range.styles.js +0 -1
  408. package/es/components/Range/Range.styles.js.map +1 -1
  409. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
  410. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
  411. package/es/components/Select/Select.js +11 -12
  412. package/es/components/Select/Select.js.map +1 -1
  413. package/es/components/Select/Select.styles.js +2 -5
  414. package/es/components/Select/Select.styles.js.map +1 -1
  415. package/es/components/Select/hooks/usePathMaps.js +0 -2
  416. package/es/components/Select/hooks/usePathMaps.js.map +1 -1
  417. package/es/components/Select/ui/Inner/Inner.js +1 -2
  418. package/es/components/Select/ui/Inner/Inner.js.map +1 -1
  419. package/es/components/Select/ui/Inner/ui/Item/Item.js +4 -5
  420. package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  421. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js +0 -1
  422. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  423. package/es/components/Select/ui/Target/ui/Button/Button.js +1 -1
  424. package/es/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
  425. package/es/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  426. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
  427. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
  428. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  429. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
  430. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
  431. package/es/components/Select/utils/getButtonLabel.js +0 -2
  432. package/es/components/Select/utils/getButtonLabel.js.map +1 -1
  433. package/es/components/Sheet/Sheet.js +3 -3
  434. package/es/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
  435. package/es/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
  436. package/es/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
  437. package/es/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
  438. package/es/components/Slider/Slider.js +0 -8
  439. package/es/components/Slider/Slider.js.map +1 -1
  440. package/es/components/Slider/components/Double/Double.js +1 -2
  441. package/es/components/Slider/components/Double/Double.js.map +1 -1
  442. package/es/components/Slider/components/Double/Double.styles.js +0 -1
  443. package/es/components/Slider/components/Double/Double.styles.js.map +1 -1
  444. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
  445. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  446. package/es/components/Slider/components/Single/Single.js +1 -2
  447. package/es/components/Slider/components/Single/Single.js.map +1 -1
  448. package/es/components/Slider/components/SliderBase/SliderBase.js +1 -1
  449. package/es/components/Steps/Steps.js +1 -1
  450. package/es/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
  451. package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  452. package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
  453. package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
  454. package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
  455. package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
  456. package/es/components/TextArea/TextArea.js +3 -3
  457. package/es/components/TextArea/TextArea.js.map +1 -1
  458. package/es/components/TextArea/TextArea.styles.js +4 -5
  459. package/es/components/TextArea/TextArea.styles.js.map +1 -1
  460. package/es/components/TextArea/ui/Hint/Hint.js +1 -2
  461. package/es/components/TextArea/ui/Hint/Hint.js.map +1 -1
  462. package/es/components/TextField/TextField.js +4 -4
  463. package/es/components/TextField/TextField.js.map +1 -1
  464. package/es/components/TextField/TextField.styles.js +3 -4
  465. package/es/components/TextField/TextField.styles.js.map +1 -1
  466. package/es/components/TextField/ui/Hint/Hint.js +1 -2
  467. package/es/components/TextField/ui/Hint/Hint.js.map +1 -1
  468. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
  469. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
  470. package/es/components/Toast/Toast.styles.js +1 -1
  471. package/es/components/Toast/ToastController.js +1 -1
  472. package/es/components/Toast/utils.js +1 -2
  473. package/es/components/Toast/utils.js.map +1 -1
  474. package/es/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  475. package/es/components/Tooltip/Tooltip.js +2 -3
  476. package/es/components/Tooltip/Tooltip.js.map +1 -1
  477. package/es/engines/index.js +0 -2
  478. package/es/engines/index.js.map +1 -1
  479. package/es/hooks/useIsomorphicLayoutEffect.js +0 -1
  480. package/es/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  481. package/es/index.css +11 -11
  482. package/es/index.js +21 -24
  483. package/es/index.js.map +1 -1
  484. package/es/utils/index.js +0 -3
  485. package/es/utils/index.js.map +1 -1
  486. package/package.json +5 -2
  487. package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -1
  488. package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -1
  489. package/styled-components/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -1
  490. package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -1
  491. package/styled-components/cjs/components/Notification/Notification.styles.js +1 -1
  492. package/styled-components/cjs/components/Notification/Notification.tokens.js +2 -1
  493. package/styled-components/cjs/components/Notification/NotificationsPortal.js +1 -1
  494. package/styled-components/cjs/components/TextArea/TextArea.js +1 -1
  495. package/styled-components/cjs/components/TextArea/TextArea.styles.js +2 -2
  496. package/styled-components/cjs/components/TextField/TextField.js +1 -1
  497. package/styled-components/cjs/components/TextField/TextField.styles.js +2 -2
  498. package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -1
  499. package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -1
  500. package/styled-components/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -1
  501. package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -1
  502. package/styled-components/es/components/Notification/Notification.styles.js +1 -1
  503. package/styled-components/es/components/Notification/Notification.tokens.js +2 -1
  504. package/styled-components/es/components/Notification/NotificationsPortal.js +1 -1
  505. package/styled-components/es/components/TextArea/TextArea.js +1 -1
  506. package/styled-components/es/components/TextArea/TextArea.styles.js +2 -2
  507. package/styled-components/es/components/TextField/TextField.js +1 -1
  508. package/styled-components/es/components/TextField/TextField.styles.js +2 -2
  509. package/styled-components/package.json +2 -1
  510. package/types/components/Calendar/ui/CalendarDays/CalendarDays.d.ts.map +1 -1
  511. package/types/components/Calendar/ui/CalendarMonths/CalendarMonths.d.ts.map +1 -1
  512. package/types/components/Calendar/ui/CalendarQuarters/CalendarQuarters.d.ts.map +1 -1
  513. package/types/components/Calendar/ui/CalendarYears/CalendarYears.d.ts.map +1 -1
  514. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts +4 -0
  515. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts.map +1 -1
  516. package/types/components/Notification/Notification.styles.d.ts.map +1 -1
  517. package/types/components/Notification/Notification.tokens.d.ts +1 -0
  518. package/types/components/Notification/Notification.tokens.d.ts.map +1 -1
  519. package/types/components/Notification/NotificationsPortal.d.ts.map +1 -1
  520. package/types/components/TextArea/TextArea.styles.d.ts +1 -1
  521. package/types/components/TextArea/TextArea.styles.d.ts.map +1 -1
  522. package/types/components/TextField/TextField.styles.d.ts +1 -1
  523. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  524. package/types/utils/index.d.ts +1 -1
  525. package/types/utils/index.d.ts.map +1 -1
@@ -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 { useMonths } from '../../hooks';\nimport { innerTokens, tokens } from '../../Calendar.tokens';\nimport { ROW_MONTH_STEP, canSelectDate, getInRange, getSideInRange, isSameDay, isSelectProcess } from '../../utils';\nimport { DateStructureItem } from '../DateStructureItem/DateStructureItem';\n\nimport type { CalendarMonthsProps } from './CalendarMonths.types';\nimport { StyledCalendarMonths, StyledFlex } from './CalendarMonths.styles';\n\n/**\n * Компонент месяцев в календаре.\n */\nexport const CalendarMonths: React.FC<CalendarMonthsProps> = ({\n date: currentDate,\n value,\n selectIndexes,\n eventList,\n disabledList,\n min,\n max,\n outerRefs,\n isDouble,\n isSecond,\n hoveredMonth,\n onChangeMonth,\n onHoverMonth,\n onSetSelected,\n onKeyDown,\n locale,\n}) => {\n const [months, selected] = useMonths({ date: currentDate, value, eventList, disabledList, min, max, locale });\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const offset = isSecond ? ROW_MONTH_STEP : 0;\n\n const monthItemTokens = {\n [`${innerTokens.dateStructureFontFamily}`]: `var(${tokens.calendarMonthFontFamily})`,\n [`${innerTokens.dateStructureFontSize}`]: `var(${tokens.calendarMonthFontSize})`,\n [`${innerTokens.dateStructureFontWeight}`]: `var(${tokens.calendarMonthFontWeight})`,\n [`${innerTokens.dateStructureFontLineHeight}`]: `var(${tokens.calendarMonthFontLineHeight})`,\n [`${innerTokens.dateStructureFontLetterSpacing}`]: `var(${tokens.calendarMonthFontLetterSpacing})`,\n [`${innerTokens.dateStructureFontStyle}`]: `var(${tokens.calendarMonthFontStyle})`,\n [`${innerTokens.dateStructureSelectedFontWeight}`]: `var(${tokens.calendarMonthSelectedFontWeight})`,\n [`${innerTokens.dateStructureWidth}`]: `var(${tokens.calendarMonthItemWidth})`,\n [`${innerTokens.dateStructureHeight}`]: `var(${tokens.calendarMonthItemHeight})`,\n [`${innerTokens.dateStructureBorderRadius}`]: `var(${tokens.calendarMonthItemBorderRadius})`,\n };\n\n const getSelectedDate = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const { day, monthIndex, year } = event.currentTarget.dataset;\n\n const selectedDate = {\n day: Number(day),\n monthIndex: Number(monthIndex),\n year: Number(year),\n };\n\n if (!canSelectDate(selectedDate, value, disabledList)) {\n return;\n }\n\n return selectedDate;\n },\n [disabledList, value],\n );\n\n const handleOnChangeMonth = useCallback(\n (i: number, j: number) => (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const selectedDate = getSelectedDate(event);\n\n if (!selectedDate) {\n return;\n }\n\n onChangeMonth(selectedDate, [i + offset, j]);\n\n if (isSelectProcess(value)) {\n onHoverMonth?.(undefined);\n }\n },\n [getSelectedDate, onChangeMonth, offset, value, onHoverMonth],\n );\n\n const handleOnHoverMonth = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const selectedDate = getSelectedDate(event);\n const isSelectedDone = Array.isArray(value) && value[0] && value[1];\n\n if (!selectedDate || !Array.isArray(value) || isSelectedDone) {\n return;\n }\n\n onHoverMonth?.(selectedDate);\n },\n [getSelectedDate, onHoverMonth, value],\n );\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i + offset][j] = element;\n },\n [offset, 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(\n (\n {\n monthName,\n monthIndex,\n isSelected,\n isCurrent,\n monthFullName,\n date,\n events,\n isOutOfMinMaxRange,\n inRange,\n disabled,\n disabledArrowKey,\n disabledDates,\n },\n j,\n ) => {\n return (\n <DateStructureItem\n ref={(element: HTMLDivElement) => getRefs(element, i, j)}\n style={monthItemTokens}\n eventList={events}\n disabled={disabled}\n day={date.day}\n year={date.year}\n monthIndex={monthIndex}\n isFocused={\n i + offset === selectIndexes?.[0] &&\n j === selectIndexes?.[1] &&\n !isOutOfMinMaxRange\n }\n isSelected={isSelected}\n isCurrent={isCurrent}\n isDouble={isDouble}\n isHovered={isSameDay(date, hoveredMonth)}\n inRange={getInRange(value, date, hoveredMonth, inRange)}\n sideInRange={getSideInRange(value, date, hoveredMonth, isSelected)}\n onClick={disabled ? undefined : handleOnChangeMonth(i, j)}\n onMouseOver={disabled ? undefined : handleOnHoverMonth}\n key={`StyledMonth-${i}-${j}`}\n role=\"gridcell\"\n aria-label={monthFullName}\n disabledArrowKey={disabledArrowKey}\n disabledMonths={disabledDates}\n isDayInCurrentMonth\n >\n {monthName}\n </DateStructureItem>\n );\n },\n )}\n </StyledFlex>\n ))}\n </StyledCalendarMonths>\n );\n};\n"],"names":["CalendarMonths","_ref","currentDate","date","value","selectIndexes","eventList","disabledList","min","max","outerRefs","isDouble","isSecond","hoveredMonth","onChangeMonth","onHoverMonth","onSetSelected","onKeyDown","locale","_useMonths","useMonths","_useMonths2","_slicedToArray","months","selected","selectedRef","useRef","onSetSelectedRef","offset","ROW_MONTH_STEP","monthItemTokens","_defineProperty","concat","innerTokens","dateStructureFontFamily","tokens","calendarMonthFontFamily","dateStructureFontSize","calendarMonthFontSize","dateStructureFontWeight","calendarMonthFontWeight","dateStructureFontLineHeight","calendarMonthFontLineHeight","dateStructureFontLetterSpacing","calendarMonthFontLetterSpacing","dateStructureFontStyle","calendarMonthFontStyle","dateStructureSelectedFontWeight","calendarMonthSelectedFontWeight","dateStructureWidth","calendarMonthItemWidth","dateStructureHeight","calendarMonthItemHeight","dateStructureBorderRadius","calendarMonthItemBorderRadius","getSelectedDate","useCallback","event","_event$currentTarget$","currentTarget","dataset","day","monthIndex","year","selectedDate","Number","canSelectDate","handleOnChangeMonth","i","j","nativeEvent","stopImmediatePropagation","isSelectProcess","undefined","handleOnHoverMonth","isSelectedDone","Array","isArray","getRefs","element","current","useEffect","_onSetSelectedRef$cur","call","React","createElement","StyledCalendarMonths","role","map","month","StyledFlex","key","_ref2","monthName","isSelected","isCurrent","monthFullName","events","isOutOfMinMaxRange","inRange","disabled","disabledArrowKey","disabledDates","DateStructureItem","ref","style","isFocused","isHovered","isSameDay","getInRange","sideInRange","getSideInRange","onClick","onMouseOver","disabledMonths","isDayInCurrentMonth"],"mappings":";;;;;;;;;;AAUA;AACA;AACA;IACaA,cAA6C,GAAG,SAAhDA,cAA6CA,CAAAC,IAAA,EAiBpD;AAAA,EAAA,IAhBIC,WAAW,GAAAD,IAAA,CAAjBE,IAAI;IACJC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,aAAa,GAAAJ,IAAA,CAAbI,aAAa;IACbC,SAAS,GAAAL,IAAA,CAATK,SAAS;IACTC,YAAY,GAAAN,IAAA,CAAZM,YAAY;IACZC,GAAG,GAAAP,IAAA,CAAHO,GAAG;IACHC,GAAG,GAAAR,IAAA,CAAHQ,GAAG;IACHC,SAAS,GAAAT,IAAA,CAATS,SAAS;IACTC,QAAQ,GAAAV,IAAA,CAARU,QAAQ;IACRC,QAAQ,GAAAX,IAAA,CAARW,QAAQ;IACRC,YAAY,GAAAZ,IAAA,CAAZY,YAAY;IACZC,aAAa,GAAAb,IAAA,CAAba,aAAa;IACbC,YAAY,GAAAd,IAAA,CAAZc,YAAY;IACZC,aAAa,GAAAf,IAAA,CAAbe,aAAa;IACbC,SAAS,GAAAhB,IAAA,CAATgB,SAAS;IACTC,MAAM,GAAAjB,IAAA,CAANiB,MAAM,CAAA;EAEN,IAAAC,UAAA,GAA2BC,SAAS,CAAC;AAAEjB,MAAAA,IAAI,EAAED,WAAW;AAAEE,MAAAA,KAAK,EAALA,KAAK;AAAEE,MAAAA,SAAS,EAATA,SAAS;AAAEC,MAAAA,YAAY,EAAZA,YAAY;AAAEC,MAAAA,GAAG,EAAHA,GAAG;AAAEC,MAAAA,GAAG,EAAHA,GAAG;AAAES,MAAAA,MAAM,EAANA,MAAAA;AAAO,KAAC,CAAC;IAAAG,WAAA,GAAAC,cAAA,CAAAH,UAAA,EAAA,CAAA,CAAA;AAAtGI,IAAAA,MAAM,GAAAF,WAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,QAAQ,GAA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,YAAY,EAAEsF,OAAO,CAAE;QACxDW,WAAW,EAAEC,cAAc,CAAC3G,KAAK,EAAED,IAAI,EAAEU,YAAY,EAAEiF,UAAU,CAAE;QACnEkB,OAAO,EAAEZ,QAAQ,GAAG3B,SAAS,GAAGN,mBAAmB,CAACC,CAAC,EAAEC,CAAC,CAAE;AAC1D4C,QAAAA,WAAW,EAAEb,QAAQ,GAAG3B,SAAS,GAAGC,kBAAmB;QACvDiB,GAAG,EAAA,cAAA,CAAA3D,MAAA,CAAiBoC,CAAC,OAAApC,MAAA,CAAIqC,CAAC,CAAG;AAC7BkB,QAAAA,IAAI,EAAC,UAAU;AACf,QAAA,YAAA,EAAYS,aAAc;AAC1BK,QAAAA,gBAAgB,EAAEA,gBAAiB;AACnCa,QAAAA,cAAc,EAAEZ,aAAc;QAC9Ba,mBAAmB,EAAA,IAAA;AAAA,OAAA,EAElBtB,SACc,CAAC,CAAA;AAE5B,KACJ,CACQ,CAAC,CAAA;AAAA,GAChB,CACiB,CAAC,CAAA;AAE/B;;;;"}
1
+ {"version":3,"file":"CalendarMonths.js","sources":["../../../../../src/components/Calendar/ui/CalendarMonths/CalendarMonths.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from 'react';\n\nimport { useMonths } from '../../hooks';\nimport { innerTokens, tokens } from '../../Calendar.tokens';\nimport { ROW_MONTH_STEP, canSelectDate, getInRange, getSideInRange, isSameDay, isSelectProcess } from '../../utils';\nimport { DateStructureItem } from '../DateStructureItem/DateStructureItem';\n\nimport type { CalendarMonthsProps } from './CalendarMonths.types';\nimport { StyledCalendarMonths, StyledFlex } from './CalendarMonths.styles';\n\n/**\n * Компонент месяцев в календаре.\n */\nexport const CalendarMonths: React.FC<CalendarMonthsProps> = ({\n date: currentDate,\n value,\n selectIndexes,\n eventList,\n disabledList,\n min,\n max,\n outerRefs,\n isDouble,\n isSecond,\n hoveredMonth,\n onChangeMonth,\n onHoverMonth,\n onSetSelected,\n onKeyDown,\n locale,\n}) => {\n const [months, selected] = useMonths({ date: currentDate, value, eventList, disabledList, min, max, locale });\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const offset = isSecond ? ROW_MONTH_STEP : 0;\n\n const monthItemTokens = {\n [`${innerTokens.dateStructureFontFamily}`]: `var(${tokens.calendarMonthFontFamily})`,\n [`${innerTokens.dateStructureFontSize}`]: `var(${tokens.calendarMonthFontSize})`,\n [`${innerTokens.dateStructureFontWeight}`]: `var(${tokens.calendarMonthFontWeight})`,\n [`${innerTokens.dateStructureFontLineHeight}`]: `var(${tokens.calendarMonthFontLineHeight})`,\n [`${innerTokens.dateStructureFontLetterSpacing}`]: `var(${tokens.calendarMonthFontLetterSpacing})`,\n [`${innerTokens.dateStructureFontStyle}`]: `var(${tokens.calendarMonthFontStyle})`,\n [`${innerTokens.dateStructureSelectedFontWeight}`]: `var(${tokens.calendarMonthSelectedFontWeight})`,\n [`${innerTokens.dateStructureWidth}`]: `var(${tokens.calendarMonthItemWidth})`,\n [`${innerTokens.dateStructureHeight}`]: `var(${tokens.calendarMonthItemHeight})`,\n [`${innerTokens.dateStructureBorderRadius}`]: `var(${tokens.calendarMonthItemBorderRadius})`,\n };\n\n const getSelectedDate = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const { day, monthIndex, year } = event.currentTarget.dataset;\n\n const selectedDate = {\n day: Number(day),\n monthIndex: Number(monthIndex),\n year: Number(year),\n };\n\n if (!canSelectDate(selectedDate, value, disabledList)) {\n return;\n }\n\n return selectedDate;\n },\n [disabledList, value],\n );\n\n const handleOnChangeMonth = useCallback(\n (i: number, j: number) => (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const selectedDate = getSelectedDate(event);\n\n if (!selectedDate) {\n return;\n }\n\n onChangeMonth(selectedDate, [i + offset, j]);\n\n if (isSelectProcess(value)) {\n onHoverMonth?.(undefined);\n }\n },\n [getSelectedDate, onChangeMonth, offset, value, onHoverMonth],\n );\n\n const handleOnHoverMonth = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const selectedDate = getSelectedDate(event);\n const isSelectedDone = Array.isArray(value) && value[0] && value[1];\n\n if (!selectedDate || !Array.isArray(value) || isSelectedDone) {\n return;\n }\n\n onHoverMonth?.(selectedDate);\n },\n [getSelectedDate, onHoverMonth, value],\n );\n\n const handleMouseOutGrid = () => onHoverMonth?.(undefined);\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i + offset][j] = element;\n },\n [offset, outerRefs],\n );\n\n useEffect(() => {\n if (selectedRef.current) {\n onSetSelectedRef.current?.(selectedRef.current);\n }\n }, []);\n\n return (\n <StyledCalendarMonths\n role=\"grid\"\n aria-labelledby=\"id-grid-label\"\n onKeyDown={onKeyDown}\n onMouseLeave={handleMouseOutGrid}\n >\n {months.map((month, i) => (\n <StyledFlex role=\"row\" key={i}>\n {month.map(\n (\n {\n monthName,\n monthIndex,\n isSelected,\n isCurrent,\n monthFullName,\n date,\n events,\n isOutOfMinMaxRange,\n inRange,\n disabled,\n disabledArrowKey,\n disabledDates,\n },\n j,\n ) => {\n return (\n <DateStructureItem\n ref={(element: HTMLDivElement) => getRefs(element, i, j)}\n style={monthItemTokens}\n eventList={events}\n disabled={disabled}\n day={date.day}\n year={date.year}\n monthIndex={monthIndex}\n isFocused={\n i + offset === selectIndexes?.[0] &&\n j === selectIndexes?.[1] &&\n !isOutOfMinMaxRange\n }\n isSelected={isSelected}\n isCurrent={isCurrent}\n isDouble={isDouble}\n isHovered={isSameDay(date, hoveredMonth)}\n inRange={getInRange(value, date, hoveredMonth, inRange)}\n sideInRange={getSideInRange(value, date, hoveredMonth, isSelected)}\n onClick={disabled ? undefined : handleOnChangeMonth(i, j)}\n onMouseOver={disabled ? undefined : handleOnHoverMonth}\n key={`StyledMonth-${i}-${j}`}\n role=\"gridcell\"\n aria-label={monthFullName}\n disabledArrowKey={disabledArrowKey}\n disabledMonths={disabledDates}\n isDayInCurrentMonth\n >\n {monthName}\n </DateStructureItem>\n );\n },\n )}\n </StyledFlex>\n ))}\n </StyledCalendarMonths>\n );\n};\n"],"names":["CalendarMonths","_ref","currentDate","date","value","selectIndexes","eventList","disabledList","min","max","outerRefs","isDouble","isSecond","hoveredMonth","onChangeMonth","onHoverMonth","onSetSelected","onKeyDown","locale","_useMonths","useMonths","_useMonths2","_slicedToArray","months","selected","selectedRef","useRef","onSetSelectedRef","offset","ROW_MONTH_STEP","monthItemTokens","_defineProperty","concat","innerTokens","dateStructureFontFamily","tokens","calendarMonthFontFamily","dateStructureFontSize","calendarMonthFontSize","dateStructureFontWeight","calendarMonthFontWeight","dateStructureFontLineHeight","calendarMonthFontLineHeight","dateStructureFontLetterSpacing","calendarMonthFontLetterSpacing","dateStructureFontStyle","calendarMonthFontStyle","dateStructureSelectedFontWeight","calendarMonthSelectedFontWeight","dateStructureWidth","calendarMonthItemWidth","dateStructureHeight","calendarMonthItemHeight","dateStructureBorderRadius","calendarMonthItemBorderRadius","getSelectedDate","useCallback","event","_event$currentTarget$","currentTarget","dataset","day","monthIndex","year","selectedDate","Number","canSelectDate","handleOnChangeMonth","i","j","nativeEvent","stopImmediatePropagation","isSelectProcess","undefined","handleOnHoverMonth","isSelectedDone","Array","isArray","handleMouseOutGrid","getRefs","element","current","useEffect","_onSetSelectedRef$cur","call","React","createElement","StyledCalendarMonths","role","onMouseLeave","map","month","StyledFlex","key","_ref2","monthName","isSelected","isCurrent","monthFullName","events","isOutOfMinMaxRange","inRange","disabled","disabledArrowKey","disabledDates","DateStructureItem","ref","style","isFocused","isHovered","isSameDay","getInRange","sideInRange","getSideInRange","onClick","onMouseOver","disabledMonths","isDayInCurrentMonth"],"mappings":";;;;;;;;;;AAUA;AACA;AACA;IACaA,cAA6C,GAAG,SAAhDA,cAA6CA,CAAAC,IAAA,EAiBpD;AAA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AAO,EAAEU,UAAU,CAAC3G,KAAK,EAAED,IAAI,EAAEU,YAAY,EAAEwF,OAAO,CAAE;QACxDW,WAAW,EAAEC,cAAc,CAAC7G,KAAK,EAAED,IAAI,EAAEU,YAAY,EAAEmF,UAAU,CAAE;QACnEkB,OAAO,EAAEZ,QAAQ,GAAG7B,SAAS,GAAGN,mBAAmB,CAACC,CAAC,EAAEC,CAAC,CAAE;AAC1D8C,QAAAA,WAAW,EAAEb,QAAQ,GAAG7B,SAAS,GAAGC,kBAAmB;QACvDmB,GAAG,EAAA,cAAA,CAAA7D,MAAA,CAAiBoC,CAAC,OAAApC,MAAA,CAAIqC,CAAC,CAAG;AAC7BmB,QAAAA,IAAI,EAAC,UAAU;AACf,QAAA,YAAA,EAAYU,aAAc;AAC1BK,QAAAA,gBAAgB,EAAEA,gBAAiB;AACnCa,QAAAA,cAAc,EAAEZ,aAAc;QAC9Ba,mBAAmB,EAAA,IAAA;AAAA,OAAA,EAElBtB,SACc,CAAC,CAAA;AAE5B,KACJ,CACQ,CAAC,CAAA;AAAA,GAChB,CACiB,CAAC,CAAA;AAE/B;;;;"}
@@ -1,12 +1,12 @@
1
1
  import { slicedToArray as _slicedToArray, defineProperty as _defineProperty } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
2
2
  import React, { useRef, useCallback, useEffect } from 'react';
3
- import { ROW_QUARTER_STEP } from '../../utils/constants.js';
4
- import { canSelectDate } from '../../utils/calendarGridHelper.js';
5
- import { isSelectProcess, isSameDay, getInRange, getSideInRange } from '../../utils/calendarRangeHelper.js';
6
- import { useQuarters } from '../../hooks/useQuarters.js';
7
3
  import { tokens, innerTokens } from '../../Calendar.tokens.js';
8
4
  import { DateStructureItem } from '../DateStructureItem/DateStructureItem.js';
9
5
  import { StyledCalendarQuarters, StyledFlex } from './CalendarQuarters.styles.js';
6
+ import { useQuarters } from '../../hooks/useQuarters.js';
7
+ import { ROW_QUARTER_STEP } from '../../utils/constants.js';
8
+ import { canSelectDate } from '../../utils/calendarGridHelper.js';
9
+ import { isSelectProcess, isSameDay, getInRange, getSideInRange } from '../../utils/calendarRangeHelper.js';
10
10
 
11
11
  /**
12
12
  * Компонент кварталов в календаре.
@@ -83,6 +83,9 @@ var CalendarQuarters = function CalendarQuarters(_ref) {
83
83
  }
84
84
  onHoverQuarter === null || onHoverQuarter === void 0 || onHoverQuarter(selectedDate);
85
85
  }, [getSelectedDate, onHoverQuarter, value]);
86
+ var handleMouseOutGrid = function handleMouseOutGrid() {
87
+ return onHoverQuarter === null || onHoverQuarter === void 0 ? void 0 : onHoverQuarter(undefined);
88
+ };
86
89
  var getRefs = useCallback(function (element, i, j) {
87
90
  outerRefs.current[i + offset][j] = element;
88
91
  }, [offset, outerRefs]);
@@ -95,7 +98,8 @@ var CalendarQuarters = function CalendarQuarters(_ref) {
95
98
  return /*#__PURE__*/React.createElement(StyledCalendarQuarters, {
96
99
  role: "grid",
97
100
  "aria-labelledby": "id-grid-label",
98
- onKeyDown: onKeyDown
101
+ onKeyDown: onKeyDown,
102
+ onMouseLeave: handleMouseOutGrid
99
103
  }, quarters.map(function (quarter, i) {
100
104
  return /*#__PURE__*/React.createElement(StyledFlex, {
101
105
  role: "row",
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarQuarters.js","sources":["../../../../../src/components/Calendar/ui/CalendarQuarters/CalendarQuarters.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from 'react';\n\nimport { useQuarters } from '../../hooks';\nimport { innerTokens, tokens } from '../../Calendar.tokens';\nimport { ROW_QUARTER_STEP, canSelectDate, getInRange, getSideInRange, isSameDay, isSelectProcess } from '../../utils';\nimport { DateStructureItem } from '../DateStructureItem/DateStructureItem';\n\nimport type { CalendarQuartersProps } from './CalendarQuarters.types';\nimport { StyledCalendarQuarters, StyledFlex } from './CalendarQuarters.styles';\n\n/**\n * Компонент кварталов в календаре.\n */\nexport const CalendarQuarters: React.FC<CalendarQuartersProps> = ({\n date: currentDate,\n value,\n selectIndexes,\n eventList,\n disabledList,\n min,\n max,\n outerRefs,\n isDouble,\n isSecond,\n hoveredQuarter,\n onChangeQuarter,\n onHoverQuarter,\n onSetSelected,\n onKeyDown,\n}) => {\n const [quarters, selected] = useQuarters({ date: currentDate, value, eventList, disabledList, min, max });\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const offset = isSecond ? ROW_QUARTER_STEP : 0;\n\n const quarterItemTokens = {\n [`${innerTokens.dateStructureFontFamily}`]: `var(${tokens.calendarQuarterFontFamily})`,\n [`${innerTokens.dateStructureFontSize}`]: `var(${tokens.calendarQuarterFontSize})`,\n [`${innerTokens.dateStructureFontWeight}`]: `var(${tokens.calendarQuarterFontWeight})`,\n [`${innerTokens.dateStructureFontLineHeight}`]: `var(${tokens.calendarQuarterFontLineHeight})`,\n [`${innerTokens.dateStructureFontLetterSpacing}`]: `var(${tokens.calendarQuarterFontLetterSpacing})`,\n [`${innerTokens.dateStructureFontStyle}`]: `var(${tokens.calendarQuarterFontStyle})`,\n [`${innerTokens.dateStructureSelectedFontWeight}`]: `var(${tokens.calendarQuarterSelectedFontWeight})`,\n [`${innerTokens.dateStructureWidth}`]: `var(${tokens.calendarQuarterItemWidth})`,\n [`${innerTokens.dateStructureHeight}`]: `var(${tokens.calendarQuarterItemHeight})`,\n [`${innerTokens.dateStructureBorderRadius}`]: `var(${tokens.calendarQuarterItemBorderRadius})`,\n };\n\n const getSelectedDate = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const { day, monthIndex, year } = event.currentTarget.dataset;\n\n const selectedDate = {\n day: Number(day),\n monthIndex: Number(monthIndex),\n year: Number(year),\n };\n\n if (!canSelectDate(selectedDate, value, disabledList)) {\n return;\n }\n\n return selectedDate;\n },\n [disabledList, value],\n );\n\n const handleOnChangeQuarter = useCallback(\n (i: number, j: number, quarterName: string) => (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const selectedDate = getSelectedDate(event);\n\n if (!selectedDate) {\n return;\n }\n\n onChangeQuarter(selectedDate, [i + offset, j], quarterName);\n\n if (isSelectProcess(value)) {\n onHoverQuarter?.(undefined);\n }\n },\n [getSelectedDate, onChangeQuarter, offset, value, onHoverQuarter],\n );\n\n const handleOnHoverQuarter = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const selectedDate = getSelectedDate(event);\n const isSelectedDone = Array.isArray(value) && value[0] && value[1];\n\n if (!selectedDate || !Array.isArray(value) || isSelectedDone) {\n return;\n }\n\n onHoverQuarter?.(selectedDate);\n },\n [getSelectedDate, onHoverQuarter, value],\n );\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i + offset][j] = element;\n },\n [offset, outerRefs],\n );\n\n useEffect(() => {\n if (selectedRef.current) {\n onSetSelectedRef.current?.(selectedRef.current);\n }\n }, []);\n\n return (\n <StyledCalendarQuarters role=\"grid\" aria-labelledby=\"id-grid-label\" onKeyDown={onKeyDown}>\n {quarters.map((quarter, i) => (\n <StyledFlex role=\"row\" key={i}>\n {quarter.map(\n (\n {\n quarterName,\n isSelected,\n isCurrent,\n date,\n events,\n isOutOfMinMaxRange,\n inRange,\n disabled,\n disabledArrowKey,\n disabledDates,\n },\n j,\n ) => {\n return (\n <DateStructureItem\n ref={(element: HTMLDivElement) => getRefs(element, i, j)}\n style={quarterItemTokens}\n eventList={events}\n disabled={disabled}\n day={date.day}\n year={date.year}\n monthIndex={date.monthIndex}\n isFocused={\n i + offset === selectIndexes?.[0] &&\n j === selectIndexes?.[1] &&\n !isOutOfMinMaxRange\n }\n isSelected={isSelected}\n isCurrent={isCurrent}\n isDouble={isDouble}\n isHovered={isSameDay(date, hoveredQuarter)}\n inRange={getInRange(value, date, hoveredQuarter, inRange)}\n sideInRange={getSideInRange(value, date, hoveredQuarter, isSelected)}\n onClick={disabled ? undefined : handleOnChangeQuarter(i, j, String(quarterName))}\n onMouseOver={disabled ? undefined : handleOnHoverQuarter}\n key={`StyledQuarter-${i}-${j}`}\n role=\"gridcell\"\n aria-label={quarterName}\n disabledArrowKey={disabledArrowKey}\n disabledMonths={disabledDates}\n isDayInCurrentMonth\n >\n {quarterName}\n </DateStructureItem>\n );\n },\n )}\n </StyledFlex>\n ))}\n </StyledCalendarQuarters>\n );\n};\n"],"names":["CalendarQuarters","_ref","currentDate","date","value","selectIndexes","eventList","disabledList","min","max","outerRefs","isDouble","isSecond","hoveredQuarter","onChangeQuarter","onHoverQuarter","onSetSelected","onKeyDown","_useQuarters","useQuarters","_useQuarters2","_slicedToArray","quarters","selected","selectedRef","useRef","onSetSelectedRef","offset","ROW_QUARTER_STEP","quarterItemTokens","_defineProperty","concat","innerTokens","dateStructureFontFamily","tokens","calendarQuarterFontFamily","dateStructureFontSize","calendarQuarterFontSize","dateStructureFontWeight","calendarQuarterFontWeight","dateStructureFontLineHeight","calendarQuarterFontLineHeight","dateStructureFontLetterSpacing","calendarQuarterFontLetterSpacing","dateStructureFontStyle","calendarQuarterFontStyle","dateStructureSelectedFontWeight","calendarQuarterSelectedFontWeight","dateStructureWidth","calendarQuarterItemWidth","dateStructureHeight","calendarQuarterItemHeight","dateStructureBorderRadius","calendarQuarterItemBorderRadius","getSelectedDate","useCallback","event","_event$currentTarget$","currentTarget","dataset","day","monthIndex","year","selectedDate","Number","canSelectDate","handleOnChangeQuarter","i","j","quarterName","nativeEvent","stopImmediatePropagation","isSelectProcess","undefined","handleOnHoverQuarter","isSelectedDone","Array","isArray","getRefs","element","current","useEffect","_onSetSelectedRef$cur","call","React","createElement","StyledCalendarQuarters","role","map","quarter","StyledFlex","key","_ref2","isSelected","isCurrent","events","isOutOfMinMaxRange","inRange","disabled","disabledArrowKey","disabledDates","DateStructureItem","ref","style","isFocused","isHovered","isSameDay","getInRange","sideInRange","getSideInRange","onClick","String","onMouseOver","disabledMonths","isDayInCurrentMonth"],"mapp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AqB,CAACC,CAAC,EAAEC,CAAC,EAAE2C,MAAM,CAAC1C,WAAW,CAAC,CAAE;AACjF2C,QAAAA,WAAW,EAAEd,QAAQ,GAAGzB,SAAS,GAAGC,oBAAqB;QACzDiB,GAAG,EAAA,gBAAA,CAAA5D,MAAA,CAAmBoC,CAAC,OAAApC,MAAA,CAAIqC,CAAC,CAAG;AAC/BmB,QAAAA,IAAI,EAAC,UAAU;AACf,QAAA,YAAA,EAAYlB,WAAY;AACxB8B,QAAAA,gBAAgB,EAAEA,gBAAiB;AACnCc,QAAAA,cAAc,EAAEb,aAAc;QAC9Bc,mBAAmB,EAAA,IAAA;AAAA,OAAA,EAElB7C,WACc,CAAC,CAAA;AAE5B,KACJ,CACQ,CAAC,CAAA;AAAA,GAChB,CACmB,CAAC,CAAA;AAEjC;;;;"}
1
+ {"version":3,"file":"CalendarQuarters.js","sources":["../../../../../src/components/Calendar/ui/CalendarQuarters/CalendarQuarters.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from 'react';\n\nimport { useQuarters } from '../../hooks';\nimport { innerTokens, tokens } from '../../Calendar.tokens';\nimport { ROW_QUARTER_STEP, canSelectDate, getInRange, getSideInRange, isSameDay, isSelectProcess } from '../../utils';\nimport { DateStructureItem } from '../DateStructureItem/DateStructureItem';\n\nimport type { CalendarQuartersProps } from './CalendarQuarters.types';\nimport { StyledCalendarQuarters, StyledFlex } from './CalendarQuarters.styles';\n\n/**\n * Компонент кварталов в календаре.\n */\nexport const CalendarQuarters: React.FC<CalendarQuartersProps> = ({\n date: currentDate,\n value,\n selectIndexes,\n eventList,\n disabledList,\n min,\n max,\n outerRefs,\n isDouble,\n isSecond,\n hoveredQuarter,\n onChangeQuarter,\n onHoverQuarter,\n onSetSelected,\n onKeyDown,\n}) => {\n const [quarters, selected] = useQuarters({ date: currentDate, value, eventList, disabledList, min, max });\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const offset = isSecond ? ROW_QUARTER_STEP : 0;\n\n const quarterItemTokens = {\n [`${innerTokens.dateStructureFontFamily}`]: `var(${tokens.calendarQuarterFontFamily})`,\n [`${innerTokens.dateStructureFontSize}`]: `var(${tokens.calendarQuarterFontSize})`,\n [`${innerTokens.dateStructureFontWeight}`]: `var(${tokens.calendarQuarterFontWeight})`,\n [`${innerTokens.dateStructureFontLineHeight}`]: `var(${tokens.calendarQuarterFontLineHeight})`,\n [`${innerTokens.dateStructureFontLetterSpacing}`]: `var(${tokens.calendarQuarterFontLetterSpacing})`,\n [`${innerTokens.dateStructureFontStyle}`]: `var(${tokens.calendarQuarterFontStyle})`,\n [`${innerTokens.dateStructureSelectedFontWeight}`]: `var(${tokens.calendarQuarterSelectedFontWeight})`,\n [`${innerTokens.dateStructureWidth}`]: `var(${tokens.calendarQuarterItemWidth})`,\n [`${innerTokens.dateStructureHeight}`]: `var(${tokens.calendarQuarterItemHeight})`,\n [`${innerTokens.dateStructureBorderRadius}`]: `var(${tokens.calendarQuarterItemBorderRadius})`,\n };\n\n const getSelectedDate = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const { day, monthIndex, year } = event.currentTarget.dataset;\n\n const selectedDate = {\n day: Number(day),\n monthIndex: Number(monthIndex),\n year: Number(year),\n };\n\n if (!canSelectDate(selectedDate, value, disabledList)) {\n return;\n }\n\n return selectedDate;\n },\n [disabledList, value],\n );\n\n const handleOnChangeQuarter = useCallback(\n (i: number, j: number, quarterName: string) => (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const selectedDate = getSelectedDate(event);\n\n if (!selectedDate) {\n return;\n }\n\n onChangeQuarter(selectedDate, [i + offset, j], quarterName);\n\n if (isSelectProcess(value)) {\n onHoverQuarter?.(undefined);\n }\n },\n [getSelectedDate, onChangeQuarter, offset, value, onHoverQuarter],\n );\n\n const handleOnHoverQuarter = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const selectedDate = getSelectedDate(event);\n const isSelectedDone = Array.isArray(value) && value[0] && value[1];\n\n if (!selectedDate || !Array.isArray(value) || isSelectedDone) {\n return;\n }\n\n onHoverQuarter?.(selectedDate);\n },\n [getSelectedDate, onHoverQuarter, value],\n );\n\n const handleMouseOutGrid = () => onHoverQuarter?.(undefined);\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i + offset][j] = element;\n },\n [offset, outerRefs],\n );\n\n useEffect(() => {\n if (selectedRef.current) {\n onSetSelectedRef.current?.(selectedRef.current);\n }\n }, []);\n\n return (\n <StyledCalendarQuarters\n role=\"grid\"\n aria-labelledby=\"id-grid-label\"\n onKeyDown={onKeyDown}\n onMouseLeave={handleMouseOutGrid}\n >\n {quarters.map((quarter, i) => (\n <StyledFlex role=\"row\" key={i}>\n {quarter.map(\n (\n {\n quarterName,\n isSelected,\n isCurrent,\n date,\n events,\n isOutOfMinMaxRange,\n inRange,\n disabled,\n disabledArrowKey,\n disabledDates,\n },\n j,\n ) => {\n return (\n <DateStructureItem\n ref={(element: HTMLDivElement) => getRefs(element, i, j)}\n style={quarterItemTokens}\n eventList={events}\n disabled={disabled}\n day={date.day}\n year={date.year}\n monthIndex={date.monthIndex}\n isFocused={\n i + offset === selectIndexes?.[0] &&\n j === selectIndexes?.[1] &&\n !isOutOfMinMaxRange\n }\n isSelected={isSelected}\n isCurrent={isCurrent}\n isDouble={isDouble}\n isHovered={isSameDay(date, hoveredQuarter)}\n inRange={getInRange(value, date, hoveredQuarter, inRange)}\n sideInRange={getSideInRange(value, date, hoveredQuarter, isSelected)}\n onClick={disabled ? undefined : handleOnChangeQuarter(i, j, String(quarterName))}\n onMouseOver={disabled ? undefined : handleOnHoverQuarter}\n key={`StyledQuarter-${i}-${j}`}\n role=\"gridcell\"\n aria-label={quarterName}\n disabledArrowKey={disabledArrowKey}\n disabledMonths={disabledDates}\n isDayInCurrentMonth\n >\n {quarterName}\n </DateStructureItem>\n );\n },\n )}\n </StyledFlex>\n ))}\n </StyledCalendarQuarters>\n );\n};\n"],"names":["CalendarQuarters","_ref","currentDate","date","value","selectIndexes","eventList","disabledList","min","max","outerRefs","isDouble","isSecond","hoveredQuarter","onChangeQuarter","onHoverQuarter","onSetSelected","onKeyDown","_useQuarters","useQuarters","_useQuarters2","_slicedToArray","quarters","selected","selectedRef","useRef","onSetSelectedRef","offset","ROW_QUARTER_STEP","quarterItemTokens","_defineProperty","concat","innerTokens","dateStructureFontFamily","tokens","calendarQuarterFontFamily","dateStructureFontSize","calendarQuarterFontSize","dateStructureFontWeight","calendarQuarterFontWeight","dateStructureFontLineHeight","calendarQuarterFontLineHeight","dateStructureFontLetterSpacing","calendarQuarterFontLetterSpacing","dateStructureFontStyle","calendarQuarterFontStyle","dateStructureSelectedFontWeight","calendarQuarterSelectedFontWeight","dateStructureWidth","calendarQuarterItemWidth","dateStructureHeight","calendarQuarterItemHeight","dateStructureBorderRadius","calendarQuarterItemBorderRadius","getSelectedDate","useCallback","event","_event$currentTarget$","currentTarget","dataset","day","monthIndex","year","selectedDate","Number","canSelectDate","handleOnChangeQuarter","i","j","quarterName","nativeEvent","stopImmediatePropagation","isSelectProcess","undefined","handleOnHoverQuarter","isSelectedDone","Array","isArray","handleMouseOutGrid","getRefs","element","current","useEffect","_onSetSelectedRef$cur","call","React","createElement","StyledCalendarQuarters","role","onMouseLeave","map","quarter","StyledFlex","key","_ref2","isSelected","isCurrent","events","isOutOfMinMaxRange","inRange","disabled","disabledArrowKey","disabledDates","DateStructureItem","ref","style","isFocused","isHovered","isSameDay","getInRange","sideInRange","getSideInRange","onClick","String","onMouseOver","disabledMonths","isDayInCurrentMonth"],"mappings":";;;;;;;;;;AAUA;AACA;AACA;IACaA,gBAAiD,GAAG,SAApDA,gBAAiDA,CAAAC,IAAA,EAgBxD;AAAA,EAAA,IAfIC,WAAW,GAAAD,IAAA,CAAjBE,IAAI;IAC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,CAAE;AACrEiB,QAAAA,OAAO,EAAEZ,QAAQ,GAAG3B,SAAS,GAAGP,qBAAqB,CAACC,CAAC,EAAEC,CAAC,EAAE6C,MAAM,CAAC5C,WAAW,CAAC,CAAE;AACjF6C,QAAAA,WAAW,EAAEd,QAAQ,GAAG3B,SAAS,GAAGC,oBAAqB;QACzDmB,GAAG,EAAA,gBAAA,CAAA9D,MAAA,CAAmBoC,CAAC,OAAApC,MAAA,CAAIqC,CAAC,CAAG;AAC/BoB,QAAAA,IAAI,EAAC,UAAU;AACf,QAAA,YAAA,EAAYnB,WAAY;AACxBgC,QAAAA,gBAAgB,EAAEA,gBAAiB;AACnCc,QAAAA,cAAc,EAAEb,aAAc;QAC9Bc,mBAAmB,EAAA,IAAA;AAAA,OAAA,EAElB/C,WACc,CAAC,CAAA;AAE5B,KACJ,CACQ,CAAC,CAAA;AAAA,GAChB,CACmB,CAAC,CAAA;AAEjC;;;;"}
@@ -1,12 +1,12 @@
1
1
  import { slicedToArray as _slicedToArray, defineProperty as _defineProperty } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
2
2
  import React, { useRef, useCallback, useEffect } from 'react';
3
- import { ROW_YEAR_STEP } from '../../utils/constants.js';
4
- import { canSelectDate } from '../../utils/calendarGridHelper.js';
5
- import { isSelectProcess, isSameDay, getInRange, getSideInRange } from '../../utils/calendarRangeHelper.js';
6
- import { useYears } from '../../hooks/useYears.js';
7
3
  import { tokens, innerTokens } from '../../Calendar.tokens.js';
8
4
  import { DateStructureItem } from '../DateStructureItem/DateStructureItem.js';
9
5
  import { StyledCalendarYears, StyledFlex } from './CalendarYears.styles.js';
6
+ import { useYears } from '../../hooks/useYears.js';
7
+ import { ROW_YEAR_STEP } from '../../utils/constants.js';
8
+ import { canSelectDate } from '../../utils/calendarGridHelper.js';
9
+ import { isSelectProcess, isSameDay, getInRange, getSideInRange } from '../../utils/calendarRangeHelper.js';
10
10
 
11
11
  /**
12
12
  * Компонент годов в календаре.
@@ -85,6 +85,9 @@ var CalendarYears = function CalendarYears(_ref) {
85
85
  }
86
86
  onHoverYear === null || onHoverYear === void 0 || onHoverYear(selectedDate);
87
87
  }, [getSelectedDate, onHoverYear, value]);
88
+ var handleMouseOutGrid = function handleMouseOutGrid() {
89
+ return onHoverYear === null || onHoverYear === void 0 ? void 0 : onHoverYear(undefined);
90
+ };
88
91
  var getRefs = useCallback(function (element, i, j) {
89
92
  outerRefs.current[i + offset][j] = element;
90
93
  }, [outerRefs]);
@@ -97,7 +100,8 @@ var CalendarYears = function CalendarYears(_ref) {
97
100
  return /*#__PURE__*/React.createElement(StyledCalendarYears, {
98
101
  role: "grid",
99
102
  "aria-labelledby": "id-grid-label",
100
- onKeyDown: onKeyDown
103
+ onKeyDown: onKeyDown,
104
+ onMouseLeave: handleMouseOutGrid
101
105
  }, years.map(function (year, i) {
102
106
  return /*#__PURE__*/React.createElement(StyledFlex, {
103
107
  role: "row",
@@ -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 { useYears } from '../../hooks';\nimport { innerTokens, tokens } from '../../Calendar.tokens';\nimport { ROW_YEAR_STEP, canSelectDate, getInRange, getSideInRange, isSameDay, isSelectProcess } from '../../utils';\nimport { DateStructureItem } from '../DateStructureItem/DateStructureItem';\n\nimport type { CalendarYearsProps } from './CalendarYears.types';\nimport { StyledCalendarYears, StyledFlex } from './CalendarYears.styles';\n\n/**\n * Компонент годов в календаре.\n */\nexport const CalendarYears: React.FC<CalendarYearsProps> = ({\n date: currentDate,\n value,\n startYear,\n selectIndexes,\n eventList,\n disabledList,\n min,\n max,\n outerRefs,\n isDouble,\n isSecond,\n hoveredYear,\n onChangeYear,\n onHoverYear,\n onSetSelected,\n onKeyDown,\n}) => {\n const [years, selected] = useYears({ date: currentDate, value, startYear, eventList, disabledList, min, max });\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const offset = isSecond ? ROW_YEAR_STEP : 0;\n\n const yearItemTokens = {\n [`${innerTokens.dateStructureFontFamily}`]: `var(${tokens.calendarYearFontFamily})`,\n [`${innerTokens.dateStructureFontSize}`]: `var(${tokens.calendarYearFontSize})`,\n [`${innerTokens.dateStructureFontWeight}`]: `var(${tokens.calendarYearFontWeight})`,\n [`${innerTokens.dateStructureFontLineHeight}`]: `var(${tokens.calendarYearFontLineHeight})`,\n [`${innerTokens.dateStructureFontLetterSpacing}`]: `var(${tokens.calendarYearFontLetterSpacing})`,\n [`${innerTokens.dateStructureFontStyle}`]: `var(${tokens.calendarYearFontStyle})`,\n [`${innerTokens.dateStructureSelectedFontWeight}`]: `var(${tokens.calendarYearSelectedFontWeight})`,\n [`${innerTokens.dateStructureWidth}`]: `var(${tokens.calendarYearItemWidth})`,\n [`${innerTokens.dateStructureHeight}`]: `var(${tokens.calendarYearItemHeight})`,\n [`${innerTokens.dateStructureBorderRadius}`]: `var(${tokens.calendarYearItemBorderRadius})`,\n };\n\n const getSelectedDate = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const { day, monthIndex, year } = event.currentTarget.dataset;\n\n const selectedDate = {\n day: Number(day),\n monthIndex: Number(monthIndex),\n year: Number(year),\n };\n\n if (!canSelectDate(selectedDate, value, disabledList)) {\n return;\n }\n\n return selectedDate;\n },\n [disabledList, value],\n );\n\n const handleOnChangeYear = useCallback(\n (i: number, j: number) => (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const selectedDate = getSelectedDate(event);\n\n if (!selectedDate) {\n return;\n }\n\n onChangeYear(selectedDate, [i + offset, j]);\n\n if (isSelectProcess(value)) {\n onHoverYear?.(undefined);\n }\n },\n [getSelectedDate, onChangeYear, offset, value, onHoverYear],\n );\n\n const handleOnHoverYear = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const selectedDate = getSelectedDate(event);\n const isSelectedDone = Array.isArray(value) && value[0] && value[1];\n\n if (!selectedDate || !Array.isArray(value) || isSelectedDone) {\n return;\n }\n\n onHoverYear?.(selectedDate);\n },\n [getSelectedDate, onHoverYear, value],\n );\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i + offset][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(\n (\n {\n yearValue,\n isSelected,\n isCurrent,\n date,\n events,\n isOutOfMinMaxRange,\n inRange,\n disabled,\n disabledArrowKey,\n disabledDates,\n },\n j,\n ) => {\n return (\n <DateStructureItem\n ref={(element: HTMLDivElement) => getRefs(element, i, j)}\n style={yearItemTokens}\n eventList={events}\n disabled={disabled}\n day={date.day}\n year={yearValue}\n monthIndex={date.monthIndex}\n isFocused={\n i + offset === selectIndexes?.[0] &&\n j === selectIndexes?.[1] &&\n !isOutOfMinMaxRange\n }\n isSelected={isSelected}\n isCurrent={isCurrent}\n isDouble={isDouble}\n isHovered={isSameDay(date, hoveredYear)}\n inRange={getInRange(value, date, hoveredYear, inRange)}\n sideInRange={getSideInRange(value, date, hoveredYear, isSelected)}\n onClick={disabled ? undefined : handleOnChangeYear(i, j)}\n onMouseOver={disabled ? undefined : handleOnHoverYear}\n key={`StyledYear-${i}-${j}`}\n role=\"gridcell\"\n data-year={yearValue}\n data-month-index={date.monthIndex}\n data-day={date.day}\n aria-label={String(yearValue)}\n disabledArrowKey={disabledArrowKey}\n disabledMonths={disabledDates}\n isDayInCurrentMonth\n >\n {yearValue}\n </DateStructureItem>\n );\n },\n )}\n </StyledFlex>\n ))}\n </StyledCalendarYears>\n );\n};\n"],"names":["CalendarYears","_ref","currentDate","date","value","startYear","selectIndexes","eventList","disabledList","min","max","outerRefs","isDouble","isSecond","hoveredYear","onChangeYear","onHoverYear","onSetSelected","onKeyDown","_useYears","useYears","_useYears2","_slicedToArray","years","selected","selectedRef","useRef","onSetSelectedRef","offset","ROW_YEAR_STEP","yearItemTokens","_defineProperty","concat","innerTokens","dateStructureFontFamily","tokens","calendarYearFontFamily","dateStructureFontSize","calendarYearFontSize","dateStructureFontWeight","calendarYearFontWeight","dateStructureFontLineHeight","calendarYearFontLineHeight","dateStructureFontLetterSpacing","calendarYearFontLetterSpacing","dateStructureFontStyle","calendarYearFontStyle","dateStructureSelectedFontWeight","calendarYearSelectedFontWeight","dateStructureWidth","calendarYearItemWidth","dateStructureHeight","calendarYearItemHeight","dateStructureBorderRadius","calendarYearItemBorderRadius","getSelectedDate","useCallback","event","_event$currentTarget$","currentTarget","dataset","day","monthIndex","year","selectedDate","Number","canSelectDate","handleOnChangeYear","i","j","nativeEvent","stopImmediatePropagation","isSelectProcess","undefined","handleOnHoverYear","isSelectedDone","Array","isArray","getRefs","element","current","useEffect","_onSetSelectedRef$cur","call","React","createElement","StyledCalendarYears","role","map","StyledFlex","key","_ref2","yearValue","isSelected","isCurrent","events","isOutOfMinMaxRange","inRange","disabled","disabledArrowKey","disabledDates","DateStructureItem","ref","style","isFocused","isHovered","isSameDay","getInRange","sideInRange","getSideInRange","onClick","onMouseOver","String","disabledMonths","isDayInCurrentMonth"],"mappings":";;;;;;;;;;AAUA;AACA;AACA;IACaA,aAA2C,GAAG,SAA9CA,aAA2CA,CAAAC,IAAA,EAiBlD;AAAA,EAAA,IAhBIC,WAAW,GAAAD,IAAA,CAAjBE,IAAI;IACJC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IACTC,aAAa,GAAAL,IAAA,CAAbK,aAAa;IACbC,SAAS,GAAAN,IAAA,CAATM,SAAS;IACTC,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W;QAClC,UAAU3D,EAAAA,IAAI,CAAC0D,GAAI;QACnB,YAAYmD,EAAAA,MAAM,CAACpB,SAAS,CAAE;AAC9BO,QAAAA,gBAAgB,EAAEA,gBAAiB;AACnCc,QAAAA,cAAc,EAAEb,aAAc;QAC9Bc,mBAAmB,EAAA,IAAA;AAAA,OAAA,EAElBtB,SACc,CAAC,CAAA;AAE5B,KACJ,CACQ,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 { useYears } from '../../hooks';\nimport { innerTokens, tokens } from '../../Calendar.tokens';\nimport { ROW_YEAR_STEP, canSelectDate, getInRange, getSideInRange, isSameDay, isSelectProcess } from '../../utils';\nimport { DateStructureItem } from '../DateStructureItem/DateStructureItem';\n\nimport type { CalendarYearsProps } from './CalendarYears.types';\nimport { StyledCalendarYears, StyledFlex } from './CalendarYears.styles';\n\n/**\n * Компонент годов в календаре.\n */\nexport const CalendarYears: React.FC<CalendarYearsProps> = ({\n date: currentDate,\n value,\n startYear,\n selectIndexes,\n eventList,\n disabledList,\n min,\n max,\n outerRefs,\n isDouble,\n isSecond,\n hoveredYear,\n onChangeYear,\n onHoverYear,\n onSetSelected,\n onKeyDown,\n}) => {\n const [years, selected] = useYears({ date: currentDate, value, startYear, eventList, disabledList, min, max });\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const offset = isSecond ? ROW_YEAR_STEP : 0;\n\n const yearItemTokens = {\n [`${innerTokens.dateStructureFontFamily}`]: `var(${tokens.calendarYearFontFamily})`,\n [`${innerTokens.dateStructureFontSize}`]: `var(${tokens.calendarYearFontSize})`,\n [`${innerTokens.dateStructureFontWeight}`]: `var(${tokens.calendarYearFontWeight})`,\n [`${innerTokens.dateStructureFontLineHeight}`]: `var(${tokens.calendarYearFontLineHeight})`,\n [`${innerTokens.dateStructureFontLetterSpacing}`]: `var(${tokens.calendarYearFontLetterSpacing})`,\n [`${innerTokens.dateStructureFontStyle}`]: `var(${tokens.calendarYearFontStyle})`,\n [`${innerTokens.dateStructureSelectedFontWeight}`]: `var(${tokens.calendarYearSelectedFontWeight})`,\n [`${innerTokens.dateStructureWidth}`]: `var(${tokens.calendarYearItemWidth})`,\n [`${innerTokens.dateStructureHeight}`]: `var(${tokens.calendarYearItemHeight})`,\n [`${innerTokens.dateStructureBorderRadius}`]: `var(${tokens.calendarYearItemBorderRadius})`,\n };\n\n const getSelectedDate = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const { day, monthIndex, year } = event.currentTarget.dataset;\n\n const selectedDate = {\n day: Number(day),\n monthIndex: Number(monthIndex),\n year: Number(year),\n };\n\n if (!canSelectDate(selectedDate, value, disabledList)) {\n return;\n }\n\n return selectedDate;\n },\n [disabledList, value],\n );\n\n const handleOnChangeYear = useCallback(\n (i: number, j: number) => (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const selectedDate = getSelectedDate(event);\n\n if (!selectedDate) {\n return;\n }\n\n onChangeYear(selectedDate, [i + offset, j]);\n\n if (isSelectProcess(value)) {\n onHoverYear?.(undefined);\n }\n },\n [getSelectedDate, onChangeYear, offset, value, onHoverYear],\n );\n\n const handleOnHoverYear = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const selectedDate = getSelectedDate(event);\n const isSelectedDone = Array.isArray(value) && value[0] && value[1];\n\n if (!selectedDate || !Array.isArray(value) || isSelectedDone) {\n return;\n }\n\n onHoverYear?.(selectedDate);\n },\n [getSelectedDate, onHoverYear, value],\n );\n\n const handleMouseOutGrid = () => onHoverYear?.(undefined);\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i + offset][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\n role=\"grid\"\n aria-labelledby=\"id-grid-label\"\n onKeyDown={onKeyDown}\n onMouseLeave={handleMouseOutGrid}\n >\n {years.map((year, i) => (\n <StyledFlex role=\"row\" key={i}>\n {year.map(\n (\n {\n yearValue,\n isSelected,\n isCurrent,\n date,\n events,\n isOutOfMinMaxRange,\n inRange,\n disabled,\n disabledArrowKey,\n disabledDates,\n },\n j,\n ) => {\n return (\n <DateStructureItem\n ref={(element: HTMLDivElement) => getRefs(element, i, j)}\n style={yearItemTokens}\n eventList={events}\n disabled={disabled}\n day={date.day}\n year={yearValue}\n monthIndex={date.monthIndex}\n isFocused={\n i + offset === selectIndexes?.[0] &&\n j === selectIndexes?.[1] &&\n !isOutOfMinMaxRange\n }\n isSelected={isSelected}\n isCurrent={isCurrent}\n isDouble={isDouble}\n isHovered={isSameDay(date, hoveredYear)}\n inRange={getInRange(value, date, hoveredYear, inRange)}\n sideInRange={getSideInRange(value, date, hoveredYear, isSelected)}\n onClick={disabled ? undefined : handleOnChangeYear(i, j)}\n onMouseOver={disabled ? undefined : handleOnHoverYear}\n key={`StyledYear-${i}-${j}`}\n role=\"gridcell\"\n data-year={yearValue}\n data-month-index={date.monthIndex}\n data-day={date.day}\n aria-label={String(yearValue)}\n disabledArrowKey={disabledArrowKey}\n disabledMonths={disabledDates}\n isDayInCurrentMonth\n >\n {yearValue}\n </DateStructureItem>\n );\n },\n )}\n </StyledFlex>\n ))}\n </StyledCalendarYears>\n );\n};\n"],"names":["CalendarYears","_ref","currentDate","date","value","startYear","selectIndexes","eventList","disabledList","min","max","outerRefs","isDouble","isSecond","hoveredYear","onChangeYear","onHoverYear","onSetSelected","onKeyDown","_useYears","useYears","_useYears2","_slicedToArray","years","selected","selectedRef","useRef","onSetSelectedRef","offset","ROW_YEAR_STEP","yearItemTokens","_defineProperty","concat","innerTokens","dateStructureFontFamily","tokens","calendarYearFontFamily","dateStructureFontSize","calendarYearFontSize","dateStructureFontWeight","calendarYearFontWeight","dateStructureFontLineHeight","calendarYearFontLineHeight","dateStructureFontLetterSpacing","calendarYearFontLetterSpacing","dateStructureFontStyle","calendarYearFontStyle","dateStructureSelectedFontWeight","calendarYearSelectedFontWeight","dateStructureWidth","calendarYearItemWidth","dateStructureHeight","calendarYearItemHeight","dateStructureBorderRadius","calendarYearItemBorderRadius","getSelectedDate","useCallback","event","_event$currentTarget$","currentTarget","dataset","day","monthIndex","year","selectedDate","Number","canSelectDate","handleOnChangeYear","i","j","nativeEvent","stopImmediatePropagation","isSelectProcess","undefined","handleOnHoverYear","isSelectedDone","Array","isArray","handleMouseOutGrid","getRefs","element","current","useEffect","_onSetSelectedRef$cur","call","React","createElement","StyledCalendarYears","role","onMouseLeave","map","StyledFlex","key","_ref2","yearValue","isSelected","isCurrent","events","isOutOfMinMaxRange","inRange","disabled","disabledArrowKey","disabledDates","DateStructureItem","ref","style","isFocused","isHovered","isSameDay","getInRange","sideInRange","getSideInRange","onClick","onMouseOver","String","disabledMonths","isDayInCurrentMonth"],"mappings":";;;;;;;;;;AAUA;AACA;AACA;IACaA,aAA2C,GAAG,SAA9CA,aAA2CA,CAAAC,IAAA,EAiBlD;AAAA,EAAA,IAhBIC,WAAW,GAAAD,IAAA,CAAjBE,IAAI;IACJC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IACTC,aAAa,GAAAL,IAAA,CAAbK,aAAa;IACbC,SAAS,GAAAN,IAAA,CAATM,SAAS;IACTC,YAAY,GAAAP,IAAA,CAAZO,YAAY;IACZC,GAAG,GAAAR,IAAA,CAAHQ,GAAG;IACHC,GAAG,GAAAT,IAAA,CAAHS,GAAG;IACHC,SAAS,GAAAV,IAAA,CAATU,SAAS;IACTC,QAAQ,GAAAX,IAAA,CAAR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ACrB,kBAAkB3F,EAAAA,IAAI,CAAC2D,UAAW;QAClC,UAAU3D,EAAAA,IAAI,CAAC0D,GAAI;QACnB,YAAYqD,EAAAA,MAAM,CAACpB,SAAS,CAAE;AAC9BO,QAAAA,gBAAgB,EAAEA,gBAAiB;AACnCc,QAAAA,cAAc,EAAEb,aAAc;QAC9Bc,mBAAmB,EAAA,IAAA;AAAA,OAAA,EAElBtB,SACc,CAAC,CAAA;AAE5B,KACJ,CACQ,CAAC,CAAA;AAAA,GAChB,CACgB,CAAC,CAAA;AAE9B;;;;"}
@@ -1,27 +1,26 @@
1
1
  import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
2
  import React, { forwardRef, useMemo, useState, useRef, useReducer, useLayoutEffect, createContext } from 'react';
3
3
  import { useForkRef, safeUseId } from '@salutejs/plasma-core';
4
- import '../../../utils/react.js';
5
- import { isEmpty } from '../../../utils/isEmpty.js';
6
- import { useOutsideClick } from '../../../hooks/useOutsideClick.js';
7
- import { sizeToIconSize } from '../../Select/utils/sizeToIconSize.js';
8
4
  import { classes } from './Combobox.tokens.js';
9
5
  import { FloatingPopover } from './FloatingPopover.js';
10
6
  import { getItemByFocused, useKeyNavigation } from './hooks/useKeyboardNavigation.js';
7
+ import { getTreeMaps, getPathMap } from './hooks/getPathMaps.js';
8
+ import { IconArrowWrapper, StyledArrow, Ul, StyledEmptyState, base } from './Combobox.styles.js';
9
+ import { base as base$1 } from './variations/_view/base.js';
10
+ import { base as base$2 } from './variations/_size/base.js';
11
11
  import { initialItemsTransform } from './utils/initialItemsTransform.js';
12
+ import { filterItems } from './utils/filterItems.js';
13
+ import { pathReducer } from './reducers/pathReducer.js';
14
+ import { focusedPathReducer } from './reducers/focusedPathReducer.js';
15
+ import { useOutsideClick } from '../../../hooks/useOutsideClick.js';
16
+ import { isEmpty } from '../../../utils/isEmpty.js';
12
17
  import { updateDescendants } from './utils/updateDescendants.js';
13
18
  import { updateAncestors } from './utils/updateAncestors.js';
14
19
  import { updateSingleAncestors } from './utils/updateSingleAncestors.js';
15
- import { filterItems } from './utils/filterItems.js';
20
+ import { StyledTextField } from './ui/Target/Target.styles.js';
21
+ import { sizeToIconSize } from '../../Select/utils/sizeToIconSize.js';
16
22
  import { getItemId } from './utils/getItemId.js';
17
23
  import { Inner } from './ui/Inner/Inner.js';
18
- import { StyledTextField } from './ui/Target/Target.styles.js';
19
- import { pathReducer } from './reducers/pathReducer.js';
20
- import { focusedPathReducer } from './reducers/focusedPathReducer.js';
21
- import { getTreeMaps, getPathMap } from './hooks/getPathMaps.js';
22
- import { IconArrowWrapper, StyledArrow, Ul, StyledEmptyState, base } from './Combobox.styles.js';
23
- import { base as base$1 } from './variations/_view/base.js';
24
- import { base as base$2 } from './variations/_size/base.js';
25
24
 
26
25
  var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect"];
27
26
  var Context = /*#__PURE__*/createContext({});
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.js","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"sourcesContent":["import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef } from 'react';\nimport type { ChangeEvent } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../../engines';\nimport { isEmpty } from '../../../utils';\nimport { useOutsideClick } from '../../../hooks';\nimport { sizeToIconSize } from '../../Select/utils';\n\nimport { classes } from './Combobox.tokens';\nimport { FloatingPopover } from './FloatingPopover';\nimport { useKeyNavigation, getItemByFocused } from './hooks/useKeyboardNavigation';\nimport {\n initialItemsTransform,\n updateAncestors,\n updateDescendants,\n updateSingleAncestors,\n filterItems,\n getItemId,\n} from './utils';\nimport { Inner, StyledTextField } from './ui';\nimport { pathReducer, focusedPathReducer } from './reducers';\nimport { getPathMap, getTreeMaps } from './hooks/getPathMaps';\nimport { Ul, base, StyledArrow, IconArrowWrapper, StyledEmptyState } from './Combobox.styles';\nimport type { ItemContext, ComboboxProps } from './Combobox.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport type { ItemOptionTransformed } from './ui/Inner/ui/Item/Item.types';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.\n */\nexport const comboboxRoot = (Root: RootProps<HTMLInputElement, Omit<ComboboxProps, 'items'>>) =>\n forwardRef<HTMLInputElement, ComboboxProps>((props, ref) => {\n const {\n multiple,\n value: outerValue,\n onChange: outerOnChange,\n isTargetAmount,\n items,\n placement = 'bottom-start',\n label,\n placeholder,\n helperText,\n contentLeft,\n textBefore,\n textAfter,\n variant = 'normal',\n listOverflow,\n listHeight,\n listWidth,\n portal,\n renderItem,\n view,\n size,\n labelPlacement,\n readOnly = false,\n disabled = false,\n alwaysOpened = false,\n filter,\n closeAfterSelect: outerCloseAfterSelect,\n ...rest\n } = props;\n // Создаем структуры для быстрой работы с деревом\n const [valueToCheckedMap, valueToItemMap, labelToItemMap] = useMemo(() => getTreeMaps(items), [items]);\n\n const [textValue, setTextValue] = useState(valueToItemMap.get(outerValue as string)?.label || '');\n const [internalValue, setInternalValue] = useState<string | string[]>(multiple ? [] : '');\n\n const value = outerValue || internalValue;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n const inputForkRef = useForkRef(inputRef, ref);\n const treeId = safeUseId();\n\n const transformedItems = useMemo(() => initialItemsTransform(items || []), [items]);\n\n const filteredItems = filterItems(\n transformedItems,\n textValue,\n valueToItemMap.get(value as string)?.label as string,\n filter,\n );\n\n const [pathMap, focusedToValueMap] = useMemo(() => getPathMap(filteredItems), [filteredItems, textValue]);\n\n // Состояния дерева элементов\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n const [checked, setChecked] = useState(valueToCheckedMap);\n\n const isCurrentListOpen = alwaysOpened || Boolean(path[0]);\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';\n const withArrowInverse = isCurrentListOpen ? classes.arrowInverse : undefined;\n const closeAfterSelect = outerCloseAfterSelect ?? !multiple;\n\n // Логика работы при клике за пределами выпадающего списка\n const targetRef = useOutsideClick<HTMLUListElement>(() => {\n if (!isCurrentListOpen) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n\n // Проверяем, отличается ли значение в инпуте от выбранного value после закрытия дропдауна.\n // Если изменилось, то возвращаем label выбранного айтема.\n // Если нет выбранного элемента, то стираем значение инпута.\n if (textValue !== value) {\n if (isEmpty(value)) {\n setTextValue('');\n } else {\n setTextValue(valueToItemMap.get(value as string)?.label || '');\n }\n }\n }, floatingPopoverRef);\n\n const onChange = (newValue: string | Array<string>) => {\n if (outerOnChange) {\n outerOnChange(newValue as any);\n }\n\n setInternalValue(newValue);\n };\n\n const handleClickArrow = () => {\n if (disabled || readOnly) {\n return;\n }\n\n if (isCurrentListOpen) {\n dispatchPath({ type: 'reset' });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n }\n\n dispatchFocusedPath({ type: 'reset' });\n };\n\n // Обработчик изменения значения в инпуте\n const handleTextValueChange = (e: ChangeEvent<HTMLInputElement>) => {\n setTextValue(e.target.value);\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'reset' });\n };\n\n // Обработчик чипов\n const handleChipsChange = (chipLabels: any[]) => {\n onChange(chipLabels.map((chipLabel) => labelToItemMap.get(chipLabel)!.value));\n };\n\n // Обработчик открытия/закрытия выпадающего списка\n const handleListToggle = (opened: boolean) => {\n if (disabled || readOnly) {\n return;\n }\n\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n };\n\n // Обработчик выбора чекбоксов (только при multiple)\n const handleCheckboxChange = (item: ItemOptionTransformed) => {\n if (!multiple) {\n return;\n }\n\n const checkedCopy = new Map(checked);\n\n if (!checkedCopy.get(item.value)) {\n checkedCopy.set(item.value, true);\n updateDescendants(item, checkedCopy, true);\n } else {\n checkedCopy.set(item.value, false);\n updateDescendants(item, checkedCopy, false);\n }\n\n updateAncestors(item, checkedCopy);\n\n const newValues: Array<string> = [];\n\n valueToItemMap.forEach((item, key) => {\n if (checkedCopy.get(key)) {\n newValues.push(item.value);\n }\n });\n\n if (!alwaysOpened && closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(newValues);\n }\n\n // После выбора/снятия чекбокса скроллим к инпуту\n setTimeout(() => {\n if (inputRef.current) {\n inputRef.current.scrollIntoView({\n behavior: 'smooth',\n inline: 'start',\n });\n }\n }, 1);\n };\n\n // Обработчик клика по айтему выпадающего списка\n const handleItemClick = (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (!isEmpty(item?.items)) {\n return;\n }\n\n if (multiple) {\n handleCheckboxChange(item);\n return;\n }\n\n if (e) {\n e.stopPropagation();\n }\n\n const checkedCopy = new Map(checked);\n\n const isCurrentChecked = checkedCopy.get(item.value);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isCurrentChecked) {\n checkedCopy.set(item.value, 'done');\n updateSingleAncestors(item, checkedCopy, 'dot');\n }\n\n setTextValue(isCurrentChecked ? '' : item.label);\n\n if (!alwaysOpened && closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(isCurrentChecked ? '' : item.value);\n }\n };\n\n const getChips = (): string[] => {\n if (multiple) {\n if (value.length === 0) return [];\n\n if (isTargetAmount) {\n return [`Выбрано ${value.length}`];\n }\n\n return (value as []).map((value) => valueToItemMap.get(value)!.label);\n }\n\n return [];\n };\n\n const handlePressDown = (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (isEmpty(item.items)) {\n handleItemClick(item, e);\n } else if (multiple) {\n handleCheckboxChange(item);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n multiselect: multiple,\n setTextValue,\n });\n\n // В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.\n // Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.\n useLayoutEffect(() => {\n const checkedCopy = new Map(checked);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isEmpty(value)) {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n checkedCopy.set(val, true);\n updateDescendants(valueToItemMap.get(val)!, checkedCopy, true);\n updateAncestors(valueToItemMap.get(val)!, checkedCopy);\n });\n } else {\n checkedCopy.set(value, 'done');\n updateSingleAncestors(valueToItemMap.get(value)!, checkedCopy, 'dot');\n }\n }\n\n setChecked(checkedCopy);\n }, [value]);\n\n return (\n <Root size={size} view={view} labelPlacement={labelPlacement} disabled={disabled} readOnly={readOnly}>\n <div>\n <Context.Provider\n value={{\n focusedPath,\n checked,\n multiple,\n size,\n handleCheckboxChange,\n handleItemClick,\n variant,\n renderItem,\n valueToItemMap,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={(opened: boolean) => opened && handleListToggle(true)}\n placement={placement}\n portal={portal}\n target={(referenceRef) => (\n <StyledTextField\n ref={inputForkRef}\n inputWrapperRef={referenceRef}\n value={textValue}\n onChange={handleTextValueChange}\n size={size}\n view={view}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n label={label}\n placeholder={placeholder}\n contentLeft={contentLeft}\n contentRight={\n <IconArrowWrapper disabled={disabled} onClick={handleClickArrow}>\n <StyledArrow\n color=\"inherit\"\n size={sizeToIconSize(size)}\n className={withArrowInverse}\n />\n </IconArrowWrapper>\n }\n textBefore={textBefore}\n textAfter={textAfter}\n onKeyDown={onKeyDown}\n leftHelper={helperText}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-controls={`${treeId}_tree_level_1`}\n aria-expanded={isCurrentListOpen}\n aria-activedescendant={\n activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''\n }\n {...(multiple\n ? {\n enumerationType: 'chip',\n chips: getChips(),\n onChangeChips: handleChipsChange,\n }\n : { enumerationType: 'plain' })}\n {...rest}\n onEnterDisabled // Пропс для отключения обработчика Enter внутри Textfield\n />\n )}\n >\n <Root\n size={size}\n view={view}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n >\n <Ul\n role=\"tree\"\n id={`${treeId}_tree_level_1`}\n aria-multiselectable={Boolean(multiple)}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n ref={targetRef}\n >\n {isEmpty(filteredItems) ? (\n <StyledEmptyState\n className={classes.emptyStateWrapper}\n size={size}\n description=\"Ничего не найдено\"\n />\n ) : (\n filteredItems.map((item, index) => (\n <Inner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listWidth={listWidth}\n />\n ))\n )}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n </div>\n </Root>\n );\n });\n\nexport const comboboxConfig = {\n name: 'Select',\n tag: 'div',\n layout: comboboxRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n readOnly: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n labelPlacement: 'outer',\n },\n};\n"],"names":["Context","createContext","comboboxRoot","Root","forwardRef","props","ref","_valueToItemMap$get","_valueToItemMap$get2","_getItemByFocused","multiple","outerValue","value","outerOnChange","onChange","isTargetAmount","items","_props$placement","placement","label","placeholder","helperText","contentLeft","textBefore","textAfter","_props$variant","variant","listOverflow","listHeight","listWidth","portal","renderItem","view","size","labelPlacement","_props$readOnly","readOnly","_props$disabled","disabled","_props$alwaysOpened","alwaysOpened","filter","outerCloseAfterSelect","closeAfterSelect","rest","_objectWithoutProperties","_excluded","_useMemo","useMemo","getTreeMaps","_useMemo2","_slicedToArray","valueToCheckedMap","valueToItemMap","labelToItemMap","_useState","useState","get","_useState2","textValue","setTextValue","_useState3","_useState4","internalValue","setInternalValue","inputRef","useRef","floatingPopoverRef","inputForkRef","useForkRef","treeId","safeUseId","transformedItems","initialItemsTransform","filteredItems","filterItems","_useMemo3","getPathMap","_useMemo4","pathMap","focusedToValueMap","_useReducer","useReducer","pathReducer","_useReducer2","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useState5","_useState6","checked","setChecked","isCurrentListOpen","Boolean","activeDescendantItemValue","getItemByFocused","withArrowInverse","classes","arrowInverse","undefined","targetRef","useOutsideClick","type","isEmpty","_valueToItemMap$get3","newValue","handleClickArrow","handleTextValueChange","e","target","handleChipsChange","chipLabels","map","chipLabel","handleListToggle","opened","handleCheckboxChange","item","checkedCopy","Map","set","updateDescendants","updateAncestors","newValues","forEach","key","push","setTimeout","current","scrollIntoView","behavior","inline","handleItemClick","stopPropagation","isCurrentChecked","_","updateSingleAncestors","getChips","length","concat","handlePressDown","_useKeyNavigation","useKeyNavigation","multiselect","onKeyDown","useLayoutEffect","Array","isArray","val","React","createElement","Provider","FloatingPopover","onToggle","referenceRef","StyledTextField","_extends","inputWrapperRef","contentRight","IconArrowWrapper","onClick","StyledArrow","color","sizeToIconSize","className","leftHelper","role","getItemId","enumerationType","chips","onChangeChips","onEnterDisabled","Ul","id","StyledEmptyState","emptyStateWrapper","description","index","Inner","currentLevel","comboboxConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IA6BaA,OAAO,gBAAGC,aAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA+D,EAAA;AAAA,EAAA,oBACxFC,UAAU,CAAkC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAAA,IAAA,IAAAC,mBAAA,EAAAC,oBAAA,EAAAC,iBAAA,CAAA;AACxD,IAAA,IACIC,QAAQ,GA2BRL,KAAK,CA3BLK,QAAQ;MACDC,UAAU,GA0BjBN,KAAK,CA1BLO,KAAK;MACKC,aAAa,GAyBvBR,KAAK,CAzBLS,QAAQ;MACRC,cAAc,GAwBdV,KAAK,CAxBLU,cAAc;MACdC,KAAK,GAuBLX,KAAK,CAvBLW,KAAK;MAAAC,gBAAA,GAuBLZ,KAAK,CAtBLa,SAAS;AAATA,MAAAA,SAAS,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,cAAc,GAAAA,gBAAA;MAC1BE,KAAK,GAqBLd,KAAK,CArBLc,KAAK;MACLC,WAAW,GAoBXf,KAAK,CApBLe,WAAW;MACXC,UAAU,GAmBVhB,KAAK,CAnBLgB,UAAU;MACVC,WAAW,GAkBXjB,KAAK,CAlBLiB,WAAW;MACXC,UAAU,GAiBVlB,KAAK,CAjBLkB,UAAU;MACVC,SAAS,GAgBTnB,KAAK,CAhBLmB,SAAS;MAAAC,cAAA,GAgBTpB,KAAK,CAfLqB,OAAO;AAAPA,MAAAA,OAAO,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,cAAA;MAClBE,YAAY,GAcZtB,KAAK,CAdLsB,YAAY;MACZC,UAAU,GAaVvB,KAAK,CAbLuB,UAAU;MACVC,SAAS,GAYTxB,KAAK,CAZLwB,SAAS;MACTC,MAAM,GAWNzB,KAAK,CAXLyB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AAI;AACJC,EAAAA,UAAU,EAAE;AACR7J,IAAAA,IAAI,EAAE;AACF8J,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACD9J,IAAAA,IAAI,EAAE;AACF6J,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACD5J,IAAAA,QAAQ,EAAE;AACN0J,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNjK,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTC,IAAAA,cAAc,EAAE,OAAA;AACpB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Combobox.js","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"sourcesContent":["import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef } from 'react';\nimport type { ChangeEvent } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../../engines';\nimport { isEmpty } from '../../../utils';\nimport { useOutsideClick } from '../../../hooks';\nimport { sizeToIconSize } from '../../Select/utils';\n\nimport { classes } from './Combobox.tokens';\nimport { FloatingPopover } from './FloatingPopover';\nimport { useKeyNavigation, getItemByFocused } from './hooks/useKeyboardNavigation';\nimport {\n initialItemsTransform,\n updateAncestors,\n updateDescendants,\n updateSingleAncestors,\n filterItems,\n getItemId,\n} from './utils';\nimport { Inner, StyledTextField } from './ui';\nimport { pathReducer, focusedPathReducer } from './reducers';\nimport { getPathMap, getTreeMaps } from './hooks/getPathMaps';\nimport { Ul, base, StyledArrow, IconArrowWrapper, StyledEmptyState } from './Combobox.styles';\nimport type { ItemContext, ComboboxProps } from './Combobox.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport type { ItemOptionTransformed } from './ui/Inner/ui/Item/Item.types';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.\n */\nexport const comboboxRoot = (Root: RootProps<HTMLInputElement, Omit<ComboboxProps, 'items'>>) =>\n forwardRef<HTMLInputElement, ComboboxProps>((props, ref) => {\n const {\n multiple,\n value: outerValue,\n onChange: outerOnChange,\n isTargetAmount,\n items,\n placement = 'bottom-start',\n label,\n placeholder,\n helperText,\n contentLeft,\n textBefore,\n textAfter,\n variant = 'normal',\n listOverflow,\n listHeight,\n listWidth,\n portal,\n renderItem,\n view,\n size,\n labelPlacement,\n readOnly = false,\n disabled = false,\n alwaysOpened = false,\n filter,\n closeAfterSelect: outerCloseAfterSelect,\n ...rest\n } = props;\n // Создаем структуры для быстрой работы с деревом\n const [valueToCheckedMap, valueToItemMap, labelToItemMap] = useMemo(() => getTreeMaps(items), [items]);\n\n const [textValue, setTextValue] = useState(valueToItemMap.get(outerValue as string)?.label || '');\n const [internalValue, setInternalValue] = useState<string | string[]>(multiple ? [] : '');\n\n const value = outerValue || internalValue;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n const inputForkRef = useForkRef(inputRef, ref);\n const treeId = safeUseId();\n\n const transformedItems = useMemo(() => initialItemsTransform(items || []), [items]);\n\n const filteredItems = filterItems(\n transformedItems,\n textValue,\n valueToItemMap.get(value as string)?.label as string,\n filter,\n );\n\n const [pathMap, focusedToValueMap] = useMemo(() => getPathMap(filteredItems), [filteredItems, textValue]);\n\n // Состояния дерева элементов\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n const [checked, setChecked] = useState(valueToCheckedMap);\n\n const isCurrentListOpen = alwaysOpened || Boolean(path[0]);\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';\n const withArrowInverse = isCurrentListOpen ? classes.arrowInverse : undefined;\n const closeAfterSelect = outerCloseAfterSelect ?? !multiple;\n\n // Логика работы при клике за пределами выпадающего списка\n const targetRef = useOutsideClick<HTMLUListElement>(() => {\n if (!isCurrentListOpen) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n\n // Проверяем, отличается ли значение в инпуте от выбранного value после закрытия дропдауна.\n // Если изменилось, то возвращаем label выбранного айтема.\n // Если нет выбранного элемента, то стираем значение инпута.\n if (textValue !== value) {\n if (isEmpty(value)) {\n setTextValue('');\n } else {\n setTextValue(valueToItemMap.get(value as string)?.label || '');\n }\n }\n }, floatingPopoverRef);\n\n const onChange = (newValue: string | Array<string>) => {\n if (outerOnChange) {\n outerOnChange(newValue as any);\n }\n\n setInternalValue(newValue);\n };\n\n const handleClickArrow = () => {\n if (disabled || readOnly) {\n return;\n }\n\n if (isCurrentListOpen) {\n dispatchPath({ type: 'reset' });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n }\n\n dispatchFocusedPath({ type: 'reset' });\n };\n\n // Обработчик изменения значения в инпуте\n const handleTextValueChange = (e: ChangeEvent<HTMLInputElement>) => {\n setTextValue(e.target.value);\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'reset' });\n };\n\n // Обработчик чипов\n const handleChipsChange = (chipLabels: any[]) => {\n onChange(chipLabels.map((chipLabel) => labelToItemMap.get(chipLabel)!.value));\n };\n\n // Обработчик открытия/закрытия выпадающего списка\n const handleListToggle = (opened: boolean) => {\n if (disabled || readOnly) {\n return;\n }\n\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n };\n\n // Обработчик выбора чекбоксов (только при multiple)\n const handleCheckboxChange = (item: ItemOptionTransformed) => {\n if (!multiple) {\n return;\n }\n\n const checkedCopy = new Map(checked);\n\n if (!checkedCopy.get(item.value)) {\n checkedCopy.set(item.value, true);\n updateDescendants(item, checkedCopy, true);\n } else {\n checkedCopy.set(item.value, false);\n updateDescendants(item, checkedCopy, false);\n }\n\n updateAncestors(item, checkedCopy);\n\n const newValues: Array<string> = [];\n\n valueToItemMap.forEach((item, key) => {\n if (checkedCopy.get(key)) {\n newValues.push(item.value);\n }\n });\n\n if (!alwaysOpened && closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(newValues);\n }\n\n // После выбора/снятия чекбокса скроллим к инпуту\n setTimeout(() => {\n if (inputRef.current) {\n inputRef.current.scrollIntoView({\n behavior: 'smooth',\n inline: 'start',\n });\n }\n }, 1);\n };\n\n // Обработчик клика по айтему выпадающего списка\n const handleItemClick = (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (!isEmpty(item?.items)) {\n return;\n }\n\n if (multiple) {\n handleCheckboxChange(item);\n return;\n }\n\n if (e) {\n e.stopPropagation();\n }\n\n const checkedCopy = new Map(checked);\n\n const isCurrentChecked = checkedCopy.get(item.value);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isCurrentChecked) {\n checkedCopy.set(item.value, 'done');\n updateSingleAncestors(item, checkedCopy, 'dot');\n }\n\n setTextValue(isCurrentChecked ? '' : item.label);\n\n if (!alwaysOpened && closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(isCurrentChecked ? '' : item.value);\n }\n };\n\n const getChips = (): string[] => {\n if (multiple) {\n if (value.length === 0) return [];\n\n if (isTargetAmount) {\n return [`Выбрано ${value.length}`];\n }\n\n return (value as []).map((value) => valueToItemMap.get(value)!.label);\n }\n\n return [];\n };\n\n const handlePressDown = (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (isEmpty(item.items)) {\n handleItemClick(item, e);\n } else if (multiple) {\n handleCheckboxChange(item);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n multiselect: multiple,\n setTextValue,\n });\n\n // В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.\n // Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.\n useLayoutEffect(() => {\n const checkedCopy = new Map(checked);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isEmpty(value)) {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n checkedCopy.set(val, true);\n updateDescendants(valueToItemMap.get(val)!, checkedCopy, true);\n updateAncestors(valueToItemMap.get(val)!, checkedCopy);\n });\n } else {\n checkedCopy.set(value, 'done');\n updateSingleAncestors(valueToItemMap.get(value)!, checkedCopy, 'dot');\n }\n }\n\n setChecked(checkedCopy);\n }, [value]);\n\n return (\n <Root size={size} view={view} labelPlacement={labelPlacement} disabled={disabled} readOnly={readOnly}>\n <div>\n <Context.Provider\n value={{\n focusedPath,\n checked,\n multiple,\n size,\n handleCheckboxChange,\n handleItemClick,\n variant,\n renderItem,\n valueToItemMap,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={(opened: boolean) => opened && handleListToggle(true)}\n placement={placement}\n portal={portal}\n target={(referenceRef) => (\n <StyledTextField\n ref={inputForkRef}\n inputWrapperRef={referenceRef}\n value={textValue}\n onChange={handleTextValueChange}\n size={size}\n view={view}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n label={label}\n placeholder={placeholder}\n contentLeft={contentLeft}\n contentRight={\n <IconArrowWrapper disabled={disabled} onClick={handleClickArrow}>\n <StyledArrow\n color=\"inherit\"\n size={sizeToIconSize(size)}\n className={withArrowInverse}\n />\n </IconArrowWrapper>\n }\n textBefore={textBefore}\n textAfter={textAfter}\n onKeyDown={onKeyDown}\n leftHelper={helperText}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-controls={`${treeId}_tree_level_1`}\n aria-expanded={isCurrentListOpen}\n aria-activedescendant={\n activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''\n }\n {...(multiple\n ? {\n enumerationType: 'chip',\n chips: getChips(),\n onChangeChips: handleChipsChange,\n }\n : { enumerationType: 'plain' })}\n {...rest}\n onEnterDisabled // Пропс для отключения обработчика Enter внутри Textfield\n />\n )}\n >\n <Root\n size={size}\n view={view}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n >\n <Ul\n role=\"tree\"\n id={`${treeId}_tree_level_1`}\n aria-multiselectable={Boolean(multiple)}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n ref={targetRef}\n >\n {isEmpty(filteredItems) ? (\n <StyledEmptyState\n className={classes.emptyStateWrapper}\n size={size}\n description=\"Ничего не найдено\"\n />\n ) : (\n filteredItems.map((item, index) => (\n <Inner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listWidth={listWidth}\n />\n ))\n )}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n </div>\n </Root>\n );\n });\n\nexport const comboboxConfig = {\n name: 'Select',\n tag: 'div',\n layout: comboboxRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n readOnly: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n labelPlacement: 'outer',\n },\n};\n"],"names":["Context","createContext","comboboxRoot","Root","forwardRef","props","ref","_valueToItemMap$get","_valueToItemMap$get2","_getItemByFocused","multiple","outerValue","value","outerOnChange","onChange","isTargetAmount","items","_props$placement","placement","label","placeholder","helperText","contentLeft","textBefore","textAfter","_props$variant","variant","listOverflow","listHeight","listWidth","portal","renderItem","view","size","labelPlacement","_props$readOnly","readOnly","_props$disabled","disabled","_props$alwaysOpened","alwaysOpened","filter","outerCloseAfterSelect","closeAfterSelect","rest","_objectWithoutProperties","_excluded","_useMemo","useMemo","getTreeMaps","_useMemo2","_slicedToArray","valueToCheckedMap","valueToItemMap","labelToItemMap","_useState","useState","get","_useState2","textValue","setTextValue","_useState3","_useState4","internalValue","setInternalValue","inputRef","useRef","floatingPopoverRef","inputForkRef","useForkRef","treeId","safeUseId","transformedItems","initialItemsTransform","filteredItems","filterItems","_useMemo3","getPathMap","_useMemo4","pathMap","focusedToValueMap","_useReducer","useReducer","pathReducer","_useReducer2","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useState5","_useState6","checked","setChecked","isCurrentListOpen","Boolean","activeDescendantItemValue","getItemByFocused","withArrowInverse","classes","arrowInverse","undefined","targetRef","useOutsideClick","type","isEmpty","_valueToItemMap$get3","newValue","handleClickArrow","handleTextValueChange","e","target","handleChipsChange","chipLabels","map","chipLabel","handleListToggle","opened","handleCheckboxChange","item","checkedCopy","Map","set","updateDescendants","updateAncestors","newValues","forEach","key","push","setTimeout","current","scrollIntoView","behavior","inline","handleItemClick","stopPropagation","isCurrentChecked","_","updateSingleAncestors","getChips","length","concat","handlePressDown","_useKeyNavigation","useKeyNavigation","multiselect","onKeyDown","useLayoutEffect","Array","isArray","val","React","createElement","Provider","FloatingPopover","onToggle","referenceRef","StyledTextField","_extends","inputWrapperRef","contentRight","IconArrowWrapper","onClick","StyledArrow","color","sizeToIconSize","className","leftHelper","role","getItemId","enumerationType","chips","onChangeChips","onEnterDisabled","Ul","id","StyledEmptyState","emptyStateWrapper","description","index","Inner","currentLevel","comboboxConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IA6BaA,OAAO,gBAAGC,aAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA+D,EAAA;AAAA,EAAA,oBACxFC,UAAU,CAAkC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAAA,IAAA,IAAAC,mBAAA,EAAAC,oBAAA,EAAAC,iBAAA,CAAA;AACxD,IAAA,IACIC,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AA;AACJ;;;;"}
@@ -1,11 +1,9 @@
1
1
  import './Combobox.styles_1s09ifw.css';
2
2
  import { styled } from '@linaria/react';
3
- import { emptyStateConfig } from '../../EmptyState/EmptyState.js';
4
- import 'react';
3
+ import { tokens, constants } from './Combobox.tokens.js';
5
4
  import { IconDisclosureDownCentered } from '../../_Icon/Icons/IconDisclosureDownCentered.js';
6
- import '@linaria/core';
7
5
  import { component, mergeConfig } from '../../../engines/common.js';
8
- import { tokens, constants } from './Combobox.tokens.js';
6
+ import { emptyStateConfig } from '../../EmptyState/EmptyState.js';
9
7
 
10
8
  var mergedConfig = /*#__PURE__*/mergeConfig(emptyStateConfig);
11
9
  var EmptyState = /*#__PURE__*/component(mergedConfig);