@salutejs/plasma-new-hope 0.174.0-canary.1497.11463811587.0 → 0.174.0-canary.1497.11480463527.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (475) 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 +4 -4
  37. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
  38. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  39. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
  40. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  41. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +4 -4
  42. package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +4 -4
  43. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +4 -4
  44. package/cjs/components/Combobox/ComboboxNew/Combobox.js +11 -12
  45. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  46. package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
  47. package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
  48. package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
  49. package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  50. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
  51. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
  52. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -6
  53. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  54. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -3
  55. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  56. package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
  57. package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
  58. package/cjs/components/Combobox/ComboboxOld/Combobox.css +1 -1
  59. package/cjs/components/Combobox/ComboboxOld/Combobox.js +4 -11
  60. package/cjs/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  61. package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
  62. package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
  63. package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
  64. package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
  65. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
  66. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
  67. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +1 -1
  68. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -11
  69. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
  70. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +1 -1
  71. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -11
  72. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
  73. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +1 -1
  74. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -11
  75. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
  76. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +1 -1
  77. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -11
  78. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
  79. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
  80. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  81. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
  82. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
  83. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
  84. package/cjs/components/DatePicker/DatePickerBase.styles.js +1 -7
  85. package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -1
  86. package/cjs/components/DatePicker/RangeDate/RangeDate.js +1 -1
  87. package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
  88. package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
  89. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
  90. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
  91. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
  92. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
  93. package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
  94. package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
  95. package/cjs/components/Drawer/Drawer.js +5 -10
  96. package/cjs/components/Drawer/Drawer.js.map +1 -1
  97. package/cjs/components/Drawer/Drawer.styles.js +0 -4
  98. package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
  99. package/cjs/components/Drawer/hooks/useDrawer.js +0 -4
  100. package/cjs/components/Drawer/hooks/useDrawer.js.map +1 -1
  101. package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
  102. package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
  103. package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
  104. package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
  105. package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
  106. package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
  107. package/cjs/components/Dropdown/Dropdown.css +1 -1
  108. package/cjs/components/Dropdown/Dropdown.js +3 -9
  109. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  110. package/cjs/components/Dropdown/Dropdown.styles.js +1 -1
  111. package/cjs/components/Dropdown/{Dropdown.styles_18f0qpm.css → Dropdown.styles_1ix6io8.css} +1 -1
  112. package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
  113. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -8
  114. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  115. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +1 -1
  116. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -3
  117. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  118. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -3
  119. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  120. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -2
  121. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
  122. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
  123. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
  124. package/cjs/components/Editable/Editable.js +3 -4
  125. package/cjs/components/Editable/Editable.js.map +1 -1
  126. package/cjs/components/Editable/utils/clearSelection.js +0 -2
  127. package/cjs/components/Editable/utils/clearSelection.js.map +1 -1
  128. package/cjs/components/Editable/utils/selectText.js +0 -2
  129. package/cjs/components/Editable/utils/selectText.js.map +1 -1
  130. package/cjs/components/EmptyState/EmptyState.styles.js +1 -2
  131. package/cjs/components/EmptyState/EmptyState.styles.js.map +1 -1
  132. package/cjs/components/IconButton/IconButton.js +1 -1
  133. package/cjs/components/IconButton/IconButton.styles.js +0 -8
  134. package/cjs/components/IconButton/IconButton.styles.js.map +1 -1
  135. package/cjs/components/Modal/Modal.js +6 -8
  136. package/cjs/components/Modal/Modal.js.map +1 -1
  137. package/cjs/components/Modal/hooks/useModal.js +0 -4
  138. package/cjs/components/Modal/hooks/useModal.js.map +1 -1
  139. package/cjs/components/Notification/Notification.styles.js +2 -3
  140. package/cjs/components/Notification/Notification.styles.js.map +1 -1
  141. package/cjs/components/Notification/NotificationsPortal.js +3 -4
  142. package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
  143. package/cjs/components/Pagination/Pagination.styles.js +1 -2
  144. package/cjs/components/Pagination/Pagination.styles.js.map +1 -1
  145. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
  146. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  147. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
  148. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
  149. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
  150. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
  151. package/cjs/components/Popover/Popover.js +1 -1
  152. package/cjs/components/Popup/Popup.js +2 -2
  153. package/cjs/components/Popup/PopupContext.js +1 -1
  154. package/cjs/components/Range/Range.styles.js +0 -1
  155. package/cjs/components/Range/Range.styles.js.map +1 -1
  156. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
  157. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
  158. package/cjs/components/Select/Select.js +11 -12
  159. package/cjs/components/Select/Select.js.map +1 -1
  160. package/cjs/components/Select/Select.styles.js +2 -5
  161. package/cjs/components/Select/Select.styles.js.map +1 -1
  162. package/cjs/components/Select/hooks/usePathMaps.js +0 -2
  163. package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
  164. package/cjs/components/Select/ui/Inner/Inner.js +1 -2
  165. package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
  166. package/cjs/components/Select/ui/Inner/ui/Item/Item.js +4 -5
  167. package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  168. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +0 -1
  169. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  170. package/cjs/components/Select/ui/Target/ui/Button/Button.js +1 -1
  171. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
  172. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  173. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
  174. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
  175. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  176. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
  177. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
  178. package/cjs/components/Select/utils/getButtonLabel.js +0 -2
  179. package/cjs/components/Select/utils/getButtonLabel.js.map +1 -1
  180. package/cjs/components/Sheet/Sheet.js +3 -3
  181. package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
  182. package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
  183. package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
  184. package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
  185. package/cjs/components/Slider/Slider.js +0 -8
  186. package/cjs/components/Slider/Slider.js.map +1 -1
  187. package/cjs/components/Slider/components/Double/Double.js +1 -2
  188. package/cjs/components/Slider/components/Double/Double.js.map +1 -1
  189. package/cjs/components/Slider/components/Double/Double.styles.js +0 -1
  190. package/cjs/components/Slider/components/Double/Double.styles.js.map +1 -1
  191. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
  192. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  193. package/cjs/components/Slider/components/Single/Single.js +1 -2
  194. package/cjs/components/Slider/components/Single/Single.js.map +1 -1
  195. package/cjs/components/Slider/components/SliderBase/SliderBase.js +1 -1
  196. package/cjs/components/Steps/Steps.js +1 -1
  197. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
  198. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  199. package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
  200. package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
  201. package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
  202. package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
  203. package/cjs/components/TextArea/TextArea.js +2 -2
  204. package/cjs/components/TextArea/TextArea.styles.js +2 -3
  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 +3 -3
  209. package/cjs/components/TextField/TextField.styles.js +1 -2
  210. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  211. package/cjs/components/TextField/ui/Hint/Hint.js +1 -2
  212. package/cjs/components/TextField/ui/Hint/Hint.js.map +1 -1
  213. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
  214. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
  215. package/cjs/components/Toast/Toast.styles.js +1 -1
  216. package/cjs/components/Toast/ToastController.js +1 -1
  217. package/cjs/components/Toast/utils.js +1 -2
  218. package/cjs/components/Toast/utils.js.map +1 -1
  219. package/cjs/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  220. package/cjs/components/Tooltip/Tooltip.js +2 -3
  221. package/cjs/components/Tooltip/Tooltip.js.map +1 -1
  222. package/cjs/engines/index.js +0 -2
  223. package/cjs/engines/index.js.map +1 -1
  224. package/cjs/hooks/useIsomorphicLayoutEffect.js +0 -1
  225. package/cjs/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  226. package/cjs/index.css +1 -1
  227. package/cjs/index.js +48 -51
  228. package/cjs/index.js.map +1 -1
  229. package/cjs/utils/index.js +0 -5
  230. package/cjs/utils/index.js.map +1 -1
  231. package/emotion/cjs/components/Dropdown/Dropdown.tokens.js +1 -1
  232. package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
  233. package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
  234. package/emotion/es/components/Dropdown/Dropdown.tokens.js +1 -1
  235. package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
  236. package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
  237. package/emotion/package.json +2 -1
  238. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -1
  239. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -1
  240. package/es/components/Attach/Attach.js +3 -4
  241. package/es/components/Attach/Attach.js.map +1 -1
  242. package/es/components/Attach/components/AttachButton/AttachButton.js +0 -1
  243. package/es/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
  244. package/es/components/Attach/ui/Button/Button.styles.js +0 -1
  245. package/es/components/Attach/ui/Button/Button.styles.js.map +1 -1
  246. package/es/components/Attach/ui/Cell/Cell.styles.js +0 -2
  247. package/es/components/Attach/ui/Cell/Cell.styles.js.map +1 -1
  248. package/es/components/Attach/ui/IconButton/IconButton.styles.js +0 -1
  249. package/es/components/Attach/ui/IconButton/IconButton.styles.js.map +1 -1
  250. package/es/components/Attach/utils/getFileicon.js +3 -4
  251. package/es/components/Attach/utils/getFileicon.js.map +1 -1
  252. package/es/components/Attach/utils/index.js +0 -3
  253. package/es/components/Attach/utils/index.js.map +1 -1
  254. package/es/components/Autocomplete/Autocomplete.js +5 -6
  255. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  256. package/es/components/Autocomplete/Autocomplete.styles.js +2 -3
  257. package/es/components/Autocomplete/Autocomplete.styles.js.map +1 -1
  258. package/es/components/Autocomplete/ui/TextField/TextField.styles.js +1 -2
  259. package/es/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
  260. package/es/components/Avatar/Avatar.js +2 -3
  261. package/es/components/Avatar/Avatar.js.map +1 -1
  262. package/es/components/Breadcrumbs/Breadcrumbs.styles.js +2 -4
  263. package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  264. package/es/components/Button/Button.styles.js +0 -3
  265. package/es/components/Button/Button.styles.js.map +1 -1
  266. package/es/components/Calendar/CalendarBase/CalendarBase.js +5 -5
  267. package/es/components/Calendar/CalendarDouble/CalendarDouble.js +8 -8
  268. package/es/components/Calendar/hooks/useDays.js +2 -2
  269. package/es/components/Calendar/hooks/useKeyNavigation.js +1 -1
  270. package/es/components/Calendar/hooks/useMonths.js +2 -2
  271. package/es/components/Calendar/hooks/useQuarters.js +2 -2
  272. package/es/components/Calendar/hooks/useYears.js +2 -2
  273. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +4 -4
  274. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
  275. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  276. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
  277. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  278. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +4 -4
  279. package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +4 -4
  280. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +4 -4
  281. package/es/components/Combobox/ComboboxNew/Combobox.js +11 -12
  282. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  283. package/es/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
  284. package/es/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
  285. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
  286. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  287. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
  288. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
  289. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -6
  290. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  291. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -3
  292. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  293. package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
  294. package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
  295. package/es/components/Combobox/ComboboxOld/Combobox.css +1 -1
  296. package/es/components/Combobox/ComboboxOld/Combobox.js +4 -11
  297. package/es/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  298. package/es/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
  299. package/es/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
  300. package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
  301. package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
  302. package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
  303. package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
  304. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +1 -1
  305. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -11
  306. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
  307. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +1 -1
  308. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -11
  309. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
  310. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +1 -1
  311. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -11
  312. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
  313. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +1 -1
  314. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -11
  315. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
  316. package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
  317. package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  318. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
  319. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
  320. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
  321. package/es/components/DatePicker/DatePickerBase.styles.js +1 -7
  322. package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -1
  323. package/es/components/DatePicker/RangeDate/RangeDate.js +1 -1
  324. package/es/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
  325. package/es/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
  326. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
  327. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
  328. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
  329. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
  330. package/es/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
  331. package/es/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
  332. package/es/components/Drawer/Drawer.js +5 -10
  333. package/es/components/Drawer/Drawer.js.map +1 -1
  334. package/es/components/Drawer/Drawer.styles.js +0 -4
  335. package/es/components/Drawer/Drawer.styles.js.map +1 -1
  336. package/es/components/Drawer/hooks/useDrawer.js +0 -4
  337. package/es/components/Drawer/hooks/useDrawer.js.map +1 -1
  338. package/es/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
  339. package/es/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
  340. package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
  341. package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
  342. package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
  343. package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
  344. package/es/components/Dropdown/Dropdown.css +1 -1
  345. package/es/components/Dropdown/Dropdown.js +3 -9
  346. package/es/components/Dropdown/Dropdown.js.map +1 -1
  347. package/es/components/Dropdown/Dropdown.styles.js +1 -1
  348. package/es/components/Dropdown/{Dropdown.styles_18f0qpm.css → Dropdown.styles_1ix6io8.css} +1 -1
  349. package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
  350. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -8
  351. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  352. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +1 -1
  353. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -3
  354. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  355. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -3
  356. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  357. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -2
  358. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
  359. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
  360. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
  361. package/es/components/Editable/Editable.js +3 -4
  362. package/es/components/Editable/Editable.js.map +1 -1
  363. package/es/components/Editable/utils/clearSelection.js +0 -2
  364. package/es/components/Editable/utils/clearSelection.js.map +1 -1
  365. package/es/components/Editable/utils/selectText.js +0 -2
  366. package/es/components/Editable/utils/selectText.js.map +1 -1
  367. package/es/components/EmptyState/EmptyState.styles.js +1 -2
  368. package/es/components/EmptyState/EmptyState.styles.js.map +1 -1
  369. package/es/components/IconButton/IconButton.js +1 -1
  370. package/es/components/IconButton/IconButton.styles.js +0 -8
  371. package/es/components/IconButton/IconButton.styles.js.map +1 -1
  372. package/es/components/Modal/Modal.js +6 -8
  373. package/es/components/Modal/Modal.js.map +1 -1
  374. package/es/components/Modal/hooks/useModal.js +0 -4
  375. package/es/components/Modal/hooks/useModal.js.map +1 -1
  376. package/es/components/Notification/Notification.styles.js +2 -3
  377. package/es/components/Notification/Notification.styles.js.map +1 -1
  378. package/es/components/Notification/NotificationsPortal.js +3 -4
  379. package/es/components/Notification/NotificationsPortal.js.map +1 -1
  380. package/es/components/Pagination/Pagination.styles.js +1 -2
  381. package/es/components/Pagination/Pagination.styles.js.map +1 -1
  382. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
  383. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  384. package/es/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
  385. package/es/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
  386. package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
  387. package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
  388. package/es/components/Popover/Popover.js +1 -1
  389. package/es/components/Popup/Popup.js +2 -2
  390. package/es/components/Popup/PopupContext.js +1 -1
  391. package/es/components/Range/Range.styles.js +0 -1
  392. package/es/components/Range/Range.styles.js.map +1 -1
  393. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
  394. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
  395. package/es/components/Select/Select.js +11 -12
  396. package/es/components/Select/Select.js.map +1 -1
  397. package/es/components/Select/Select.styles.js +2 -5
  398. package/es/components/Select/Select.styles.js.map +1 -1
  399. package/es/components/Select/hooks/usePathMaps.js +0 -2
  400. package/es/components/Select/hooks/usePathMaps.js.map +1 -1
  401. package/es/components/Select/ui/Inner/Inner.js +1 -2
  402. package/es/components/Select/ui/Inner/Inner.js.map +1 -1
  403. package/es/components/Select/ui/Inner/ui/Item/Item.js +4 -5
  404. package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  405. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js +0 -1
  406. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  407. package/es/components/Select/ui/Target/ui/Button/Button.js +1 -1
  408. package/es/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
  409. package/es/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  410. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
  411. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
  412. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  413. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
  414. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
  415. package/es/components/Select/utils/getButtonLabel.js +0 -2
  416. package/es/components/Select/utils/getButtonLabel.js.map +1 -1
  417. package/es/components/Sheet/Sheet.js +3 -3
  418. package/es/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
  419. package/es/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
  420. package/es/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
  421. package/es/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
  422. package/es/components/Slider/Slider.js +0 -8
  423. package/es/components/Slider/Slider.js.map +1 -1
  424. package/es/components/Slider/components/Double/Double.js +1 -2
  425. package/es/components/Slider/components/Double/Double.js.map +1 -1
  426. package/es/components/Slider/components/Double/Double.styles.js +0 -1
  427. package/es/components/Slider/components/Double/Double.styles.js.map +1 -1
  428. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
  429. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  430. package/es/components/Slider/components/Single/Single.js +1 -2
  431. package/es/components/Slider/components/Single/Single.js.map +1 -1
  432. package/es/components/Slider/components/SliderBase/SliderBase.js +1 -1
  433. package/es/components/Steps/Steps.js +1 -1
  434. package/es/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
  435. package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  436. package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
  437. package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
  438. package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
  439. package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
  440. package/es/components/TextArea/TextArea.js +2 -2
  441. package/es/components/TextArea/TextArea.styles.js +2 -3
  442. package/es/components/TextArea/TextArea.styles.js.map +1 -1
  443. package/es/components/TextArea/ui/Hint/Hint.js +1 -2
  444. package/es/components/TextArea/ui/Hint/Hint.js.map +1 -1
  445. package/es/components/TextField/TextField.js +3 -3
  446. package/es/components/TextField/TextField.styles.js +1 -2
  447. package/es/components/TextField/TextField.styles.js.map +1 -1
  448. package/es/components/TextField/ui/Hint/Hint.js +1 -2
  449. package/es/components/TextField/ui/Hint/Hint.js.map +1 -1
  450. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
  451. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
  452. package/es/components/Toast/Toast.styles.js +1 -1
  453. package/es/components/Toast/ToastController.js +1 -1
  454. package/es/components/Toast/utils.js +1 -2
  455. package/es/components/Toast/utils.js.map +1 -1
  456. package/es/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  457. package/es/components/Tooltip/Tooltip.js +2 -3
  458. package/es/components/Tooltip/Tooltip.js.map +1 -1
  459. package/es/engines/index.js +0 -2
  460. package/es/engines/index.js.map +1 -1
  461. package/es/hooks/useIsomorphicLayoutEffect.js +0 -1
  462. package/es/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  463. package/es/index.css +1 -1
  464. package/es/index.js +21 -24
  465. package/es/index.js.map +1 -1
  466. package/es/utils/index.js +0 -3
  467. package/es/utils/index.js.map +1 -1
  468. package/package.json +5 -2
  469. package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +1 -1
  470. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +4 -4
  471. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +4 -4
  472. package/styled-components/es/components/Dropdown/Dropdown.tokens.js +1 -1
  473. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +4 -4
  474. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +4 -4
  475. package/styled-components/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import React, { forwardRef, useMemo, ReactElement } from 'react';\nimport { styled } from '@linaria/react';\n\nimport { RootProps, component, mergeConfig } from '../../engines';\nimport { cx } from '../../utils';\nimport { indicatorConfig, indicatorTokens } from '../Indicator';\n\nimport { classes, tokens } from './Avatar.tokens';\nimport { base, Wrapper, Image, StatusIcon, Text } from './Avatar.styles';\nimport { base as viewCSS } from './variations/_size/base';\nimport { base as focusedCSS } from './variations/_focused/base';\nimport { getInitialsForName } from './utils';\nimport type { AvatarProps, StatusLabels } from './Avatar.types';\n\nconst StatusLabelsDefault: StatusLabels = {\n active: 'Активен',\n inactive: 'Неактивен',\n};\n\nconst getAvatarContent = ({\n customText,\n url,\n initials,\n name,\n}: Omit<AvatarProps, 'size'> & { initials?: string }): ReactElement => {\n if (customText) {\n return <Text>{customText}</Text>;\n }\n\n if (url) {\n return <Image src={url} alt={name} />;\n }\n\n return <Text>{initials}</Text>;\n};\n\nconst getAriaLabel = ({\n url,\n name,\n status,\n 'aria-label': ariaLabelProp,\n statusLabels,\n}: Pick<AvatarProps, 'url' | 'status' | 'name' | 'aria-label'> & {\n statusLabels: StatusLabels;\n}) => {\n if (!url) {\n return;\n }\n\n // INFO: включаем aria-label чтобы озвучить что на изображении\n const ariaLabel = !ariaLabelProp || ariaLabelProp.trim() === '' ? name : ariaLabelProp;\n\n return status ? `${ariaLabel}. ${statusLabels[status]}` : ariaLabel;\n};\n\nconst mergedConfig = mergeConfig(indicatorConfig);\n\nconst Indicator: React.FunctionComponent<\n React.HTMLAttributes<HTMLDivElement> & { status: AvatarProps['status'] }\n> = component(mergedConfig) as never;\n\nconst StyledIndicator = styled(Indicator)`\n ${indicatorTokens.size}: var(${tokens.statusIconSize});\n ${indicatorTokens.color}: ${({ status }) =>\n status === 'active' ? `var(${tokens.statusOnlineColor})` : `var(${tokens.statusOfflineColor})`}\n`;\n\nexport const avatarRoot = (Root: RootProps<HTMLDivElement, AvatarProps>) => {\n return forwardRef<HTMLDivElement, AvatarProps>((props, ref) => {\n const {\n size: avatarSize,\n name,\n url,\n customText,\n status,\n className,\n focused = true,\n isScalable,\n statusLabels = StatusLabelsDefault,\n ...rest\n } = props;\n\n const initials = useMemo(() => getInitialsForName(name), [name]);\n const ariaLabel = getAriaLabel({\n ...props,\n statusLabels,\n });\n\n return (\n <Root\n ref={ref}\n size={avatarSize}\n className={cx(classes.avatarItem, className)}\n aria-label={ariaLabel}\n focused={focused}\n {...rest}\n >\n <Wrapper isScalable={isScalable}>{getAvatarContent({ customText, url, initials, name })}</Wrapper>\n\n {status && (\n <StatusIcon>\n <StyledIndicator aria-label={statusLabels[status]} status={status} />\n </StatusIcon>\n )}\n </Root>\n );\n });\n};\n\nexport const avatarConfig = {\n name: 'Avatar',\n tag: 'div',\n layout: avatarRoot,\n base,\n variations: {\n size: {\n css: viewCSS,\n },\n focused: {\n css: focusedCSS,\n },\n },\n defaults: {\n size: 'm',\n },\n};\n"],"names":["StatusLabelsDefault","active","inactive","getAvatarContent","_ref","customText","url","initials","name","React","createElement","Text","Image","src","alt","getAriaLabel","_ref2","status","ariaLabelProp","statusLabels","ariaLabel","trim","concat","mergedConfig","mergeConfig","indicatorConfig","Indicator","component","_exp","_exp5","_ref3","tokens","statusOnlineColor","statusOfflineColor","StyledIndicator","styled","class","propsAsIs","vars","avatarRoot","Root","forwardRef","props","ref","avatarSize","size","className","_props$focused","focused","isScalable","_props$statusLabels","rest","_excluded","useMemo","getInitialsForName","_objectSpread","_extends","c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A;AAAQ,KAAA,EACbG,IAAI,CAER1C,eAAAA,KAAA,CAAAC,aAAA,CAACkD,qBAAO,EAAA;AAACX,MAAAA,UAAU,EAAEA,UAAAA;AAAW,KAAA,EAAE9C,gBAAgB,CAAC;AAAEE,MAAAA,UAAU,EAAVA,UAAU;AAAEC,MAAAA,GAAG,EAAHA,GAAG;AAAEC,MAAAA,QAAQ,EAARA,QAAQ;AAAEC,MAAAA,IAAAA,EAAAA,IAAAA;AAAK,KAAC,CAAW,CAAA,EAEhGS,MAAM,iBACHR,KAAA,CAAAC,aAAA,CAACmD,wBAAU,EACPpD,IAAAA,eAAAA,KAAA,CAAAC,aAAA,CAACwB,eAAe,EAAA;MAAC,YAAYf,EAAAA,YAAY,CAACF,MAAM,CAAE;AAACA,MAAAA,MAAM,EAAEA,MAAAA;KAAO,CAC1D,CAEd,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AACN,EAAC;AAEM,IAAM6C,YAAY,GAAG;AACxBtD,EAAAA,IAAI,EAAE,QAAQ;AACduD,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEzB,UAAU;AAClB0B,EAAAA,IAAI,EAAJA,kBAAI;AACJC,EAAAA,UAAU,EAAE;AACRrB,IAAAA,IAAI,EAAE;AACFsB,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDpB,IAAAA,OAAO,EAAE;AACLmB,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNzB,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"Avatar.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import React, { forwardRef, useMemo, ReactElement } from 'react';\nimport { styled } from '@linaria/react';\n\nimport { RootProps, component, mergeConfig } from '../../engines';\nimport { cx } from '../../utils';\nimport { indicatorConfig, indicatorTokens } from '../Indicator';\n\nimport { classes, tokens } from './Avatar.tokens';\nimport { base, Wrapper, Image, StatusIcon, Text } from './Avatar.styles';\nimport { base as viewCSS } from './variations/_size/base';\nimport { base as focusedCSS } from './variations/_focused/base';\nimport { getInitialsForName } from './utils';\nimport type { AvatarProps, StatusLabels } from './Avatar.types';\n\nconst StatusLabelsDefault: StatusLabels = {\n active: 'Активен',\n inactive: 'Неактивен',\n};\n\nconst getAvatarContent = ({\n customText,\n url,\n initials,\n name,\n}: Omit<AvatarProps, 'size'> & { initials?: string }): ReactElement => {\n if (customText) {\n return <Text>{customText}</Text>;\n }\n\n if (url) {\n return <Image src={url} alt={name} />;\n }\n\n return <Text>{initials}</Text>;\n};\n\nconst getAriaLabel = ({\n url,\n name,\n status,\n 'aria-label': ariaLabelProp,\n statusLabels,\n}: Pick<AvatarProps, 'url' | 'status' | 'name' | 'aria-label'> & {\n statusLabels: StatusLabels;\n}) => {\n if (!url) {\n return;\n }\n\n // INFO: включаем aria-label чтобы озвучить что на изображении\n const ariaLabel = !ariaLabelProp || ariaLabelProp.trim() === '' ? name : ariaLabelProp;\n\n return status ? `${ariaLabel}. ${statusLabels[status]}` : ariaLabel;\n};\n\nconst mergedConfig = mergeConfig(indicatorConfig);\n\nconst Indicator: React.FunctionComponent<\n React.HTMLAttributes<HTMLDivElement> & { status: AvatarProps['status'] }\n> = component(mergedConfig) as never;\n\nconst StyledIndicator = styled(Indicator)`\n ${indicatorTokens.size}: var(${tokens.statusIconSize});\n ${indicatorTokens.color}: ${({ status }) =>\n status === 'active' ? `var(${tokens.statusOnlineColor})` : `var(${tokens.statusOfflineColor})`}\n`;\n\nexport const avatarRoot = (Root: RootProps<HTMLDivElement, AvatarProps>) => {\n return forwardRef<HTMLDivElement, AvatarProps>((props, ref) => {\n const {\n size: avatarSize,\n name,\n url,\n customText,\n status,\n className,\n focused = true,\n isScalable,\n statusLabels = StatusLabelsDefault,\n ...rest\n } = props;\n\n const initials = useMemo(() => getInitialsForName(name), [name]);\n const ariaLabel = getAriaLabel({\n ...props,\n statusLabels,\n });\n\n return (\n <Root\n ref={ref}\n size={avatarSize}\n className={cx(classes.avatarItem, className)}\n aria-label={ariaLabel}\n focused={focused}\n {...rest}\n >\n <Wrapper isScalable={isScalable}>{getAvatarContent({ customText, url, initials, name })}</Wrapper>\n\n {status && (\n <StatusIcon>\n <StyledIndicator aria-label={statusLabels[status]} status={status} />\n </StatusIcon>\n )}\n </Root>\n );\n });\n};\n\nexport const avatarConfig = {\n name: 'Avatar',\n tag: 'div',\n layout: avatarRoot,\n base,\n variations: {\n size: {\n css: viewCSS,\n },\n focused: {\n css: focusedCSS,\n },\n },\n defaults: {\n size: 'm',\n },\n};\n"],"names":["StatusLabelsDefault","active","inactive","getAvatarContent","_ref","customText","url","initials","name","React","createElement","Text","Image","src","alt","getAriaLabel","_ref2","status","ariaLabelProp","statusLabels","ariaLabel","trim","concat","mergedConfig","mergeConfig","indicatorConfig","Indicator","component","_exp","_exp5","_ref3","tokens","statusOnlineColor","statusOfflineColor","StyledIndicator","styled","class","propsAsIs","vars","avatarRoot","Root","forwardRef","props","ref","avatarSize","size","className","_props$focused","focused","isScalable","_props$statusLabels","rest","_excluded","useMemo","getInitialsForName","_objectSpread","_extends","cx","classes","avatarItem","Wrapper","StatusIcon","avatarConfig","tag","layout","base","variations","css","viewCSS","focusedCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;AAcA,IAAMA,mBAAiC,GAAG;AACtCC,EAAAA,MAAM,EAAE,SAAS;AACjBC,EAAAA,QAAQ,EAAE,WAAA;AACd,CAAC,CAAA;AAED,IAAMC,gBAAgB,GAAGA,SAAnBA,gBAAgBA,CAAAC,IAAA,EAKiD;AAAA,EAAA,IAJnEC,UAAU,GAAAD,IAAA,CAAVC,UAAU;IACVC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IACHC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,IAAAA,GAAAA,IAAAA,CAAAA,IAAAA,CAAAA;AAEA,EAAA,IAAIH,UAAU,EAAE;AACZ,IAAA,oBAAOI,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,CAC1D,CAEd,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AACN,EAAC;AAEM,IAAM6C,YAAY,GAAG;AACxBtD,EAAAA,IAAI,EAAE,QAAQ;AACduD,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEzB,UAAU;AAClB0B,EAAAA,IAAI,EAAJA,kBAAI;AACJC,EAAAA,UAAU,EAAE;AACRrB,IAAAA,IAAI,EAAE;AACFsB,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDpB,IAAAA,OAAO,EAAE;AACLmB,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNzB,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
@@ -4,12 +4,10 @@ import './Breadcrumbs.styles_19b6ey4.css';
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var react = require('@linaria/react');
7
- var Link$1 = require('../Link/Link.js');
8
- require('@linaria/core');
7
+ var Breadcrumbs_tokens = require('./Breadcrumbs.tokens.js');
9
8
  var common = require('../../engines/common.js');
10
- require('react');
11
9
  var IconDisclosureRight = require('../_Icon/Icons/IconDisclosureRight.js');
12
- var Breadcrumbs_tokens = require('./Breadcrumbs.tokens.js');
10
+ var Link$1 = require('../Link/Link.js');
13
11
 
14
12
  var mergedLinkConfig = /*#__PURE__*/common.mergeConfig(Link$1.linkConfig);
15
13
  var Link = /*#__PURE__*/common.component(mergedLinkConfig);
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.styles.js","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { linkConfig } from '../Link';\nimport { component, mergeConfig } from '../../engines';\nimport { IconDisclosureRight } from '../_Icon';\nimport { addFocus } from '../../mixins';\n\nimport { tokens } from './Breadcrumbs.tokens';\n\nconst mergedLinkConfig = mergeConfig(linkConfig);\nconst Link = component(mergedLinkConfig);\n\nexport const StyledLink = styled(Link)<{ isHref: boolean }>`\n opacity: ${({ isHref }) => (isHref ? 1 : `var(${tokens.breadcrumbsOpacity})`)};\n cursor: ${({ isHref }) => (isHref ? 'pointer' : 'auto')};\n color: ${({ isHref }) => (isHref ? `var(${tokens.breadcrumbsColor})` : `var(${tokens.breadcrumbsColorText})`)};\n\n --plasma-link-disabled-opacity: var(${tokens.breadcrumbsOpacity});\n\n ${addFocus({\n outlineOffset: '0rem',\n outlineSize: '0.125rem',\n outlineRadius: '0rem',\n outlineColor: `var(${tokens.breadcrumbsFocusOutlineColor})`,\n })}\n`;\n\nexport const base = css`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(${tokens.breadcrumbsGap});\n\n color: var(${tokens.breadcrumbsColor});\n font-family: var(${tokens.breadcrumbsFontFamily});\n font-size: var(${tokens.breadcrumbsFontSize});\n font-weight: var(${tokens.breadcrumbsFontWeight});\n font-style: var(${tokens.breadcrumbsFontStyle});\n letter-spacing: var(${tokens.breadcrumbsLetterSpacing});\n line-height: var(${tokens.breadcrumbsLineHeight});\n`;\n\nexport const Separator = styled(IconDisclosureRight)`\n color: var(${tokens.breadcrumbsColorSeparator});\n opacity: var(${tokens.breadcrumbsOpacity});\n`;\n"],"names":["mergedLinkConfig","mergeConfig","linkConfig","Link","component","_exp","_exp2","_ref","isHref","concat","tokens","breadcrumbsOpacity","_exp3","_ref2","_exp4","_ref3","breadcrumbsColor","breadcrumbsColorText","StyledLink","styled","name","class","propsAsIs","vars","base","_exp15","IconDisclosureRight","Separator"],"mappings":";;;;;;;;;;;;AAUA,IAAMA,gBAAgB,gBAAGC,kBAAW,CAACC,iBAAU,CAAC,CAAA;AAChD,IAAMC,IAAI,gBAAGC,gBAAS,CAACJ,gBAAgB,CAAC,CAAA;AAAC,IAAAK,IAAA,GAVvBA,SAUuBA,IAAAA,GAAA;AAAA,EAAA,OAERF,IAAI,CAAA;AAAA,CAAA,CAAA;AAAA,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AAA,CAAA;AAAA,GAAA;AAAA,CAUhH,EAAA;AAEM,IAAMU,IAAI,GAahB,UAAA;AAAC,IAAAC,MAAA,GAxCgBA,SAwChBA,MAAAA,GAAA;AAAA,EAAA,OAE8BC,uCAAmB,CAAA;AAAA,CAAA,CAAA;AAA5C,IAAMC,SAAS,gBAAGR,YAAM,CAAAM,MAAA,EAAA,CAAA,CAAA;AAAAL,EAAAA,IAAA,EAAA,WAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAG9B;;;;;;"}
1
+ {"version":3,"file":"Breadcrumbs.styles.js","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { linkConfig } from '../Link';\nimport { component, mergeConfig } from '../../engines';\nimport { IconDisclosureRight } from '../_Icon';\nimport { addFocus } from '../../mixins';\n\nimport { tokens } from './Breadcrumbs.tokens';\n\nconst mergedLinkConfig = mergeConfig(linkConfig);\nconst Link = component(mergedLinkConfig);\n\nexport const StyledLink = styled(Link)<{ isHref: boolean }>`\n opacity: ${({ isHref }) => (isHref ? 1 : `var(${tokens.breadcrumbsOpacity})`)};\n cursor: ${({ isHref }) => (isHref ? 'pointer' : 'auto')};\n color: ${({ isHref }) => (isHref ? `var(${tokens.breadcrumbsColor})` : `var(${tokens.breadcrumbsColorText})`)};\n\n --plasma-link-disabled-opacity: var(${tokens.breadcrumbsOpacity});\n\n ${addFocus({\n outlineOffset: '0rem',\n outlineSize: '0.125rem',\n outlineRadius: '0rem',\n outlineColor: `var(${tokens.breadcrumbsFocusOutlineColor})`,\n })}\n`;\n\nexport const base = css`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(${tokens.breadcrumbsGap});\n\n color: var(${tokens.breadcrumbsColor});\n font-family: var(${tokens.breadcrumbsFontFamily});\n font-size: var(${tokens.breadcrumbsFontSize});\n font-weight: var(${tokens.breadcrumbsFontWeight});\n font-style: var(${tokens.breadcrumbsFontStyle});\n letter-spacing: var(${tokens.breadcrumbsLetterSpacing});\n line-height: var(${tokens.breadcrumbsLineHeight});\n`;\n\nexport const Separator = styled(IconDisclosureRight)`\n color: var(${tokens.breadcrumbsColorSeparator});\n opacity: var(${tokens.breadcrumbsOpacity});\n`;\n"],"names":["mergedLinkConfig","mergeConfig","linkConfig","Link","component","_exp","_exp2","_ref","isHref","concat","tokens","breadcrumbsOpacity","_exp3","_ref2","_exp4","_ref3","breadcrumbsColor","breadcrumbsColorText","StyledLink","styled","name","class","propsAsIs","vars","base","_exp15","IconDisclosureRight","Separator"],"mappings":";;;;;;;;;;AAUA,IAAMA,gBAAgB,gBAAGC,kBAAW,CAACC,iBAAU,CAAC,CAAA;AAChD,IAAMC,IAAI,gBAAGC,gBAAS,CAACJ,gBAAgB,CAAC,CAAA;AAAC,IAAAK,IAAA,GAVvBA,SAUuBA,IAAAA,GAAA;AAAA,EAAA,OAERF,IAAI,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAG,KAAA,GAZnBA,SAYmBA,KAAAA,GAAA;AAAA,EAAA,OACtB,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,MAAAA,GAAAA,IAAAA,CAAAA,MAAAA,CAAAA;IAAAA,OAAcA,MAAM,GAAG,CAAC,GAAA,MAAA,CAAAC,MAAA,CAAUC,yBAAM,CAACC,kBAAmB,EAAG,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,KAAA,GAb/DA,SAa+DA,KAAAA,GAAA;AAAA,EAAA,OACnE,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGL,MAAAA,GAAAA,KAAAA,CAAAA,MAAAA,CAAAA;AAAAA,IAAAA,OAAcA,MAAM,GAAG,SAAS,GAAG,MAAO,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAM,KAAA,GAdzCA,SAcyCA,KAAAA,GAAA;AAAA,EAAA,OAC9C,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGP,MAAAA,GAAAA,KAAAA,CAAAA,MAAAA,CAAAA;AAAAA,IAAAA,OAAcA,MAAM,GAAA,MAAA,CAAAC,MAAA,CAAUC,yBAAM,CAACM,gBAAiB,EAAA,GAAA,CAAA,GAAA,MAAA,CAAAP,MAAA,CAAYC,yBAAM,CAACO,oBAAqB,EAAG,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAH1G,IAAMC,UAAU,gBAAGC,YAAM,CAAAd,IAAA,EAAA,CAAA,CAAA;AAAAe,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAAC,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cACjBjB,KAAkE,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cACnEM,KAA6C,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cAC9CE,KAAoG,EAAA,CAAA;AAAA,GAAA;AAAA,CAUhH,EAAA;AAEM,IAAMU,IAAI,GAahB,UAAA;AAAC,IAAAC,MAAA,GAxCgBA,SAwChBA,MAAAA,GAAA;AAAA,EAAA,OAE8BC,uCAAmB,CAAA;AAAA,CAAA,CAAA;AAA5C,IAAMC,SAAS,gBAAGR,YAAM,CAAAM,MAAA,EAAA,CAAA,CAAA;AAAAL,EAAAA,IAAA,EAAA,WAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAG9B;;;;;;"}
@@ -4,9 +4,6 @@ import './Button.styles_1sopr3d.css';
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var react = require('@linaria/react');
7
- require('focus-visible');
8
- require('styled-components');
9
- require('@linaria/core');
10
7
  var common = require('../../engines/common.js');
11
8
  var Spinner$1 = require('../Spinner/Spinner.js');
12
9
 
@@ -1 +1 @@
1
- {"version":3,"file":"Button.styles.js","sources":["../../../src/components/Button/Button.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { applyEllipsis, addFocus } from '../../mixins';\nimport { component, mergeConfig } from '../../engines';\nimport { spinnerConfig, spinnerTokens } from '../Spinner';\n\nimport { classes, tokens } from './Button.tokens';\n\n// issue #823\nconst mergedConfig = mergeConfig(spinnerConfig);\nconst Spinner = component(mergedConfig);\n\nexport const ButtonText = styled.span`\n min-width: 4ch;\n flex-shrink: 2;\n\n ${applyEllipsis()}\n\n\n &.${String(classes.contentRelaxed)} {\n text-align: start;\n flex-grow: 2;\n }\n`;\n\nexport const ButtonValue = styled.span`\n color: var(${tokens.buttonValueColor});\n\n margin: var(${tokens.buttonValueMargin});\n\n min-width: 4ch;\n\n ${applyEllipsis()}\n`;\n\n// TODO: #720\nexport const LoadWrap = styled.div<{ contentPlacing: string; isLoading?: boolean }>`\n opacity: ${({ isLoading }) => (isLoading ? '0' : '1')};\n display: flex;\n align-items: inherit;\n justify-content: ${({ contentPlacing }) => contentPlacing};\n height: 100%;\n width: 100%;\n`;\n\nexport const Loader = styled.div`\n position: absolute;\n`;\n\nexport const StyledSpinner = styled(Spinner)`\n ${spinnerTokens.size}: var(${tokens.buttonSpinnerSize});\n ${spinnerTokens.color}: var(${tokens.buttonSpinnerColor});\n`;\n\nexport const StyledContentLeft = styled.div`\n display: flex;\n margin: var(${tokens.buttonLeftContentMargin});\n align-self: var(${tokens.buttonLeftContentAlignSelf});\n`;\n\nexport const StyledContentRight = styled.div`\n display: flex;\n margin: var(${tokens.buttonRightContentMargin});\n align-self: var(${tokens.buttonRightContentAlignSelf});\n`;\n\nexport const base = css`\n position: relative;\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n justify-content: center;\n\n appearance: none;\n border: none;\n cursor: pointer;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n a& {\n text-decoration: none;\n }\n\n /* NOTE:\n --plasma_computed-btn-br-radius is defined in Button.tsx\n */\n --plasma_private-btn-br: var(--plasma_computed-btn-br);\n border-radius: var(--plasma_private-btn-br);\n\n &&.${String(classes.buttonSquare)} {\n width: var(${tokens.buttonHeight});\n padding: 0;\n }\n`;\n\n// INFO: Для возможности переиспользования стилей в других компонентах\nexport const baseContent = `\n position: relative;\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n justify-content: center;\n\n appearance: none;\n border: none;\n cursor: pointer;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n a& {\n text-decoration: none;\n }\n\n /* NOTE:\n --plasma_computed-btn-br-radius is defined in Button.tsx\n */\n --plasma_private-btn-br: var(--plasma_computed-btn-br);\n border-radius: var(--plasma_private-btn-br);\n\n &&.${String(classes.buttonSquare)} {\n width: var(${tokens.buttonHeight});\n padding: 0;\n }\n\n color: var(${tokens.buttonColor});\n background-color: var(${tokens.buttonBackgroundColor});\n\n :hover {\n color: var(${tokens.buttonColorHover}, var(${tokens.buttonColor}));\n background-color: var(${tokens.buttonBackgroundColorHover}, var(${tokens.buttonBackgroundColor}));\n\n scale: var(${tokens.buttonScaleHover});\n }\n\n :active {\n color: var(${tokens.buttonColorActive}, var(${tokens.buttonColor}));\n background-color: var(${tokens.buttonBackgroundColorActive}, var(${tokens.buttonBackgroundColor}));\n\n scale: var(${tokens.buttonScaleActive});\n }\n\n height: var(${tokens.buttonHeight});\n width: var(${tokens.buttonWidth});\n\n /* TODO: #714 move these calc's to plasma-mapping | ds-generator and add Math.round() */\n padding: 0 var(${tokens.buttonPadding}, calc(var(${tokens.buttonHeight}) * 1.618 / 4));\n\n font-family: var(${tokens.buttonFontFamily});\n font-size: var(${tokens.buttonFontSize});\n font-style: var(${tokens.buttonFontStyle});\n font-weight: var(${tokens.buttonFontWeight});\n letter-spacing: var(${tokens.buttonLetterSpacing});\n line-height: var(${tokens.buttonLineHeight});\n\n /* TODO: #710 make it token API ? */\n --plasma_private-btn-outline-size: var(--plasma-button-outline-size, 0.0625rem);\n\n :focus {\n outline: none;\n }\n\n ${addFocus({\n outlineOffset: '-0.125rem',\n outlineSize: 'var(--plasma_private-btn-outline-size)',\n outlineRadius: 'calc(0.125rem + var(--plasma_private-btn-br))',\n outlineColor: `var(${tokens.buttonFocusColor})`,\n })}\n\n &[disabled] {\n opacity: var(${tokens.buttonDisabledOpacity});\n cursor: not-allowed;\n\n :hover,\n :active {\n scale: none;\n\n color: var(${tokens.buttonColor});\n background-color: var(${tokens.buttonBackgroundColor});\n }\n }\n\n &.${classes.fixedStretching} {\n width: var(${tokens.buttonWidth});\n }\n &.${classes.filledStretching} {\n width: 100%;\n }\n &.${classes.autoStretching} {\n width: fit-content;\n }\n`;\n"],"names":["mergedConfig","mergeConfig","spinnerConfig","Spinner","component","ButtonText","styled","name","class","propsAsIs","ButtonValue","_exp6","_ref","isLoading","_exp7","_ref2","contentPlacing","LoadWrap","vars","Loader","_exp8","StyledSpinner","StyledContentLeft","StyledContentRight","base"],"mappings":";;;;;;;;;;;AASA;AACA,IAAMA,YAAY,gBAAGC,kBAAW,CAACC,uBAAa,CAAC,CAAA;AAC/C,IAAMC,OAAO,gBAAGC,gBAAS,CAACJ,YAAY,CAAC,CAAA;AAEhC,IAAMK,UAAU,gBAAGC,YAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAW/B,EAAA;AAEM,IAAMC,WAAW,gBAAGJ,YAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAQhC,EAAA;;AAED;AAAA,IAAAE,KAAA,GAnCkBA,SAmClBA,KAAAA,GAAA;AAAA,EAAA,OAEe,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,SAAAA,GAA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,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAItC,EAAA;AAEM,IAAMc,kBAAkB,gBAAGjB,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,oBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAIvC,EAAA;AAEM,IAAMe,IAAI,GA0BhB;;;;;;;;;;;"}
1
+ {"version":3,"file":"Button.styles.js","sources":["../../../src/components/Button/Button.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { applyEllipsis, addFocus } from '../../mixins';\nimport { component, mergeConfig } from '../../engines';\nimport { spinnerConfig, spinnerTokens } from '../Spinner';\n\nimport { classes, tokens } from './Button.tokens';\n\n// issue #823\nconst mergedConfig = mergeConfig(spinnerConfig);\nconst Spinner = component(mergedConfig);\n\nexport const ButtonText = styled.span`\n min-width: 4ch;\n flex-shrink: 2;\n\n ${applyEllipsis()}\n\n\n &.${String(classes.contentRelaxed)} {\n text-align: start;\n flex-grow: 2;\n }\n`;\n\nexport const ButtonValue = styled.span`\n color: var(${tokens.buttonValueColor});\n\n margin: var(${tokens.buttonValueMargin});\n\n min-width: 4ch;\n\n ${applyEllipsis()}\n`;\n\n// TODO: #720\nexport const LoadWrap = styled.div<{ contentPlacing: string; isLoading?: boolean }>`\n opacity: ${({ isLoading }) => (isLoading ? '0' : '1')};\n display: flex;\n align-items: inherit;\n justify-content: ${({ contentPlacing }) => contentPlacing};\n height: 100%;\n width: 100%;\n`;\n\nexport const Loader = styled.div`\n position: absolute;\n`;\n\nexport const StyledSpinner = styled(Spinner)`\n ${spinnerTokens.size}: var(${tokens.buttonSpinnerSize});\n ${spinnerTokens.color}: var(${tokens.buttonSpinnerColor});\n`;\n\nexport const StyledContentLeft = styled.div`\n display: flex;\n margin: var(${tokens.buttonLeftContentMargin});\n align-self: var(${tokens.buttonLeftContentAlignSelf});\n`;\n\nexport const StyledContentRight = styled.div`\n display: flex;\n margin: var(${tokens.buttonRightContentMargin});\n align-self: var(${tokens.buttonRightContentAlignSelf});\n`;\n\nexport const base = css`\n position: relative;\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n justify-content: center;\n\n appearance: none;\n border: none;\n cursor: pointer;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n a& {\n text-decoration: none;\n }\n\n /* NOTE:\n --plasma_computed-btn-br-radius is defined in Button.tsx\n */\n --plasma_private-btn-br: var(--plasma_computed-btn-br);\n border-radius: var(--plasma_private-btn-br);\n\n &&.${String(classes.buttonSquare)} {\n width: var(${tokens.buttonHeight});\n padding: 0;\n }\n`;\n\n// INFO: Для возможности переиспользования стилей в других компонентах\nexport const baseContent = `\n position: relative;\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n justify-content: center;\n\n appearance: none;\n border: none;\n cursor: pointer;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\n a& {\n text-decoration: none;\n }\n\n /* NOTE:\n --plasma_computed-btn-br-radius is defined in Button.tsx\n */\n --plasma_private-btn-br: var(--plasma_computed-btn-br);\n border-radius: var(--plasma_private-btn-br);\n\n &&.${String(classes.buttonSquare)} {\n width: var(${tokens.buttonHeight});\n padding: 0;\n }\n\n color: var(${tokens.buttonColor});\n background-color: var(${tokens.buttonBackgroundColor});\n\n :hover {\n color: var(${tokens.buttonColorHover}, var(${tokens.buttonColor}));\n background-color: var(${tokens.buttonBackgroundColorHover}, var(${tokens.buttonBackgroundColor}));\n\n scale: var(${tokens.buttonScaleHover});\n }\n\n :active {\n color: var(${tokens.buttonColorActive}, var(${tokens.buttonColor}));\n background-color: var(${tokens.buttonBackgroundColorActive}, var(${tokens.buttonBackgroundColor}));\n\n scale: var(${tokens.buttonScaleActive});\n }\n\n height: var(${tokens.buttonHeight});\n width: var(${tokens.buttonWidth});\n\n /* TODO: #714 move these calc's to plasma-mapping | ds-generator and add Math.round() */\n padding: 0 var(${tokens.buttonPadding}, calc(var(${tokens.buttonHeight}) * 1.618 / 4));\n\n font-family: var(${tokens.buttonFontFamily});\n font-size: var(${tokens.buttonFontSize});\n font-style: var(${tokens.buttonFontStyle});\n font-weight: var(${tokens.buttonFontWeight});\n letter-spacing: var(${tokens.buttonLetterSpacing});\n line-height: var(${tokens.buttonLineHeight});\n\n /* TODO: #710 make it token API ? */\n --plasma_private-btn-outline-size: var(--plasma-button-outline-size, 0.0625rem);\n\n :focus {\n outline: none;\n }\n\n ${addFocus({\n outlineOffset: '-0.125rem',\n outlineSize: 'var(--plasma_private-btn-outline-size)',\n outlineRadius: 'calc(0.125rem + var(--plasma_private-btn-br))',\n outlineColor: `var(${tokens.buttonFocusColor})`,\n })}\n\n &[disabled] {\n opacity: var(${tokens.buttonDisabledOpacity});\n cursor: not-allowed;\n\n :hover,\n :active {\n scale: none;\n\n color: var(${tokens.buttonColor});\n background-color: var(${tokens.buttonBackgroundColor});\n }\n }\n\n &.${classes.fixedStretching} {\n width: var(${tokens.buttonWidth});\n }\n &.${classes.filledStretching} {\n width: 100%;\n }\n &.${classes.autoStretching} {\n width: fit-content;\n }\n`;\n"],"names":["mergedConfig","mergeConfig","spinnerConfig","Spinner","component","ButtonText","styled","name","class","propsAsIs","ButtonValue","_exp6","_ref","isLoading","_exp7","_ref2","contentPlacing","LoadWrap","vars","Loader","_exp8","StyledSpinner","StyledContentLeft","StyledContentRight","base"],"mappings":";;;;;;;;AASA;AACA,IAAMA,YAAY,gBAAGC,kBAAW,CAACC,uBAAa,CAAC,CAAA;AAC/C,IAAMC,OAAO,gBAAGC,gBAAS,CAACJ,YAAY,CAAC,CAAA;AAEhC,IAAMK,UAAU,gBAAGC,YAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAW/B,EAAA;AAEM,IAAM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AAA;AAApC,IAAMkB,aAAa,gBAAGf,YAAM,CAAAc,KAAA,EAAA,CAAA,CAAA;AAAAb,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAGlC,EAAA;AAEM,IAAMa,iBAAiB,gBAAGhB,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,mBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAItC,EAAA;AAEM,IAAMc,kBAAkB,gBAAGjB,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,oBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAIvC,EAAA;AAEM,IAAMe,IAAI,GA0BhB;;;;;;;;;;;"}
@@ -6,18 +6,18 @@ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHel
6
6
  var React = require('react');
7
7
  var reducer = require('../store/reducer.js');
8
8
  var types = require('../store/types.js');
9
- var calendarRangeHelper = require('../utils/calendarRangeHelper.js');
10
- var useKeyNavigation = require('../hooks/useKeyNavigation.js');
9
+ var base = require('./variations/_view/base.js');
10
+ var base$1 = require('./variations/_size/base.js');
11
+ var CalendarBase_styles = require('./CalendarBase.styles.js');
11
12
  var useCalendarNavigation = require('../hooks/useCalendarNavigation.js');
13
+ var useKeyNavigation = require('../hooks/useKeyNavigation.js');
12
14
  var useCalendarDateChange = require('../hooks/useCalendarDateChange.js');
13
15
  var CalendarHeader = require('../ui/CalendarHeader/CalendarHeader.js');
14
16
  var CalendarDays = require('../ui/CalendarDays/CalendarDays.js');
15
17
  var CalendarMonths = require('../ui/CalendarMonths/CalendarMonths.js');
16
18
  var CalendarQuarters = require('../ui/CalendarQuarters/CalendarQuarters.js');
17
19
  var CalendarYears = require('../ui/CalendarYears/CalendarYears.js');
18
- var base = require('./variations/_view/base.js');
19
- var base$1 = require('./variations/_size/base.js');
20
- var CalendarBase_styles = require('./CalendarBase.styles.js');
20
+ var calendarRangeHelper = require('../utils/calendarRangeHelper.js');
21
21
 
22
22
  var _excluded = ["value", "min", "max", "includeEdgeDates", "type", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "onChangeValue", "locale"];
23
23
  /**
@@ -4,22 +4,22 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
6
6
  var React = require('react');
7
+ var reducer = require('../store/reducer.js');
7
8
  var types = require('../store/types.js');
8
- var constants = require('../utils/constants.js');
9
- var calendarGridHelper = require('../utils/calendarGridHelper.js');
10
- var calendarRangeHelper = require('../utils/calendarRangeHelper.js');
11
- var useKeyNavigation = require('../hooks/useKeyNavigation.js');
9
+ var CalendarBase_styles = require('../CalendarBase/CalendarBase.styles.js');
10
+ var base = require('./variations/_view/base.js');
11
+ var CalendarDouble_styles = require('./CalendarDouble.styles.js');
12
12
  var useCalendarNavigation = require('../hooks/useCalendarNavigation.js');
13
+ var useKeyNavigation = require('../hooks/useKeyNavigation.js');
13
14
  var useCalendarDateChange = require('../hooks/useCalendarDateChange.js');
14
15
  var CalendarHeader = require('../ui/CalendarHeader/CalendarHeader.js');
15
16
  var CalendarDays = require('../ui/CalendarDays/CalendarDays.js');
16
17
  var CalendarMonths = require('../ui/CalendarMonths/CalendarMonths.js');
17
18
  var CalendarQuarters = require('../ui/CalendarQuarters/CalendarQuarters.js');
18
19
  var CalendarYears = require('../ui/CalendarYears/CalendarYears.js');
19
- var reducer = require('../store/reducer.js');
20
- var CalendarBase_styles = require('../CalendarBase/CalendarBase.styles.js');
21
- var base = require('./variations/_view/base.js');
22
- var CalendarDouble_styles = require('./CalendarDouble.styles.js');
20
+ var calendarRangeHelper = require('../utils/calendarRangeHelper.js');
21
+ var constants = require('../utils/constants.js');
22
+ var calendarGridHelper = require('../utils/calendarGridHelper.js');
23
23
 
24
24
  var _StyledSeparator, _StyledSeparator2, _StyledSeparator3, _StyledSeparator4;
25
25
  var _excluded = ["value", "min", "max", "includeEdgeDates", "type", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "onChangeValue", "locale"];
@@ -4,10 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
6
6
  var React = require('react');
7
- var getDateWithModification = require('../utils/getDateWithModification.js');
7
+ var types = require('../store/types.js');
8
8
  var calendarGridHelper = require('../utils/calendarGridHelper.js');
9
+ var getDateWithModification = require('../utils/getDateWithModification.js');
9
10
  var calendarRangeHelper = require('../utils/calendarRangeHelper.js');
10
- var types = require('../store/types.js');
11
11
 
12
12
  /**
13
13
  * Метод возвращающий массив дней в предыдущем месяце.
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
6
6
  var React = require('react');
7
7
  var Calendar_types = require('../Calendar.types.js');
8
- var constants = require('../utils/constants.js');
9
8
  var reducer = require('../store/reducer.js');
9
+ var constants = require('../utils/constants.js');
10
10
 
11
11
  /**
12
12
  * Метод для получения стороны двойного календаря.
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var getDateWithModification = require('../utils/getDateWithModification.js');
6
+ var types = require('../store/types.js');
7
7
  var constants = require('../utils/constants.js');
8
8
  var calendarGridHelper = require('../utils/calendarGridHelper.js');
9
9
  var calendarRangeHelper = require('../utils/calendarRangeHelper.js');
10
- var types = require('../store/types.js');
10
+ var getDateWithModification = require('../utils/getDateWithModification.js');
11
11
 
12
12
  /**
13
13
  * Хук для получения списка месяцев.
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var getDateWithModification = require('../utils/getDateWithModification.js');
6
+ var types = require('../store/types.js');
7
7
  var constants = require('../utils/constants.js');
8
8
  var calendarGridHelper = require('../utils/calendarGridHelper.js');
9
9
  var calendarRangeHelper = require('../utils/calendarRangeHelper.js');
10
- var types = require('../store/types.js');
10
+ var getDateWithModification = require('../utils/getDateWithModification.js');
11
11
 
12
12
  /**
13
13
  * Хук для получения списка месяцев.
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var getDateWithModification = require('../utils/getDateWithModification.js');
6
+ var types = require('../store/types.js');
7
7
  var constants = require('../utils/constants.js');
8
8
  var calendarGridHelper = require('../utils/calendarGridHelper.js');
9
9
  var calendarRangeHelper = require('../utils/calendarRangeHelper.js');
10
- var types = require('../store/types.js');
10
+ var getDateWithModification = require('../utils/getDateWithModification.js');
11
11
 
12
12
  /**
13
13
  * Хук для получения списка годов.
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
6
6
  var React = require('react');
7
- var useDays = require('../../hooks/useDays.js');
8
- var constants = require('../../utils/constants.js');
9
- var calendarGridHelper = require('../../utils/calendarGridHelper.js');
10
- var calendarRangeHelper = require('../../utils/calendarRangeHelper.js');
11
7
  var DateStructureItem = require('../DateStructureItem/DateStructureItem.js');
12
8
  var Calendar_tokens = require('../../Calendar.tokens.js');
13
9
  var CalendarDays_styles = require('./CalendarDays.styles.js');
10
+ var useDays = require('../../hooks/useDays.js');
11
+ var calendarGridHelper = require('../../utils/calendarGridHelper.js');
12
+ var calendarRangeHelper = require('../../utils/calendarRangeHelper.js');
13
+ var constants = require('../../utils/constants.js');
14
14
 
15
15
  var _StyledCalendarDaysHi;
16
16
  /**
@@ -3,16 +3,15 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- require('@linaria/react');
7
- var IconDisclosureLeft = require('../../../_Icon/Icons/IconDisclosureLeft.js');
8
- var IconDisclosureRight = require('../../../_Icon/Icons/IconDisclosureRight.js');
9
- var IconDisclosureDownFill = require('../../../_Icon/Icons/IconDisclosureDownFill.js');
10
6
  var types = require('../../store/types.js');
11
- var constants = require('../../utils/constants.js');
12
- var calendarGridHelper = require('../../utils/calendarGridHelper.js');
13
7
  var Calendar_tokens = require('../../Calendar.tokens.js');
14
8
  var reducer = require('../../store/reducer.js');
15
9
  var CalendarHeader_styles = require('./CalendarHeader.styles.js');
10
+ var IconDisclosureDownFill = require('../../../_Icon/Icons/IconDisclosureDownFill.js');
11
+ var IconDisclosureLeft = require('../../../_Icon/Icons/IconDisclosureLeft.js');
12
+ var IconDisclosureRight = require('../../../_Icon/Icons/IconDisclosureRight.js');
13
+ var calendarGridHelper = require('../../utils/calendarGridHelper.js');
14
+ var constants = require('../../utils/constants.js');
16
15
 
17
16
  /**
18
17
  * Компонент шапки календаря.
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarHeader.js","sources":["../../../../../src/components/Calendar/ui/CalendarHeader/CalendarHeader.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\n\nimport { IconDisclosureDownFill, IconDisclosureLeft, IconDisclosureRight } from '../../../_Icon';\nimport { CalendarState } from '../../store/types';\nimport { getCalendarType, MONTH_NAMES, YEAR_RENDER_COUNT } from '../../utils';\nimport type { DateObject } from '../../Calendar.types';\nimport { classes } from '../../Calendar.tokens';\nimport { sizeMap } from '../../store/reducer';\n\nimport type { CalendarHeaderProps } from './CalendarHeader.types';\nimport {\n StyledArrow,\n StyledArrows,\n StyledCalendarHeader,\n StyledDoubleHeaderWrapper,\n StyledHeader,\n StyledHeaderDate,\n StyledHeaderDouble,\n StyledNavigation,\n} from './CalendarHeader.styles';\n\n/**\n * Компонент шапки календаря.\n */\nexport const CalendarHeader: React.FC<CalendarHeaderProps> = ({\n type = 'Days',\n startYear = 0,\n size,\n firstDate,\n secondDate,\n isDouble,\n onPrev,\n onNext,\n onUpdateCalendarState,\n locale,\n}) => {\n const handleCalendarState = useCallback(() => {\n const newSize: [number, number] = isDouble ? sizeMap.Months.double : sizeMap.Months.single;\n\n if (type === CalendarState.Days) {\n onUpdateCalendarState?.(CalendarState.Months, newSize);\n }\n\n if (type === CalendarState.Months || type === CalendarState.Quarters) {\n onUpdateCalendarState?.(CalendarState.Years, newSize);\n }\n }, [type, onUpdateCalendarState]);\n\n const getHeaderContent = useCallback(\n (date?: DateObject, secondPart?: boolean) => {\n if (!date) {\n return '';\n }\n\n if (type === CalendarState.Days) {\n return (\n <>\n <StyledHeaderDate>{MONTH_NAMES[locale][date.monthIndex]}</StyledHeaderDate>\n <StyledHeaderDate>\n {date.year}\n <IconDisclosureDownFill color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledHeaderDate>\n </>\n );\n }\n\n if (type === CalendarState.Months || type === CalendarState.Quarters) {\n return (\n <StyledHeaderDate>\n {date.year}\n <IconDisclosureDownFill color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledHeaderDate>\n );\n }\n\n if (type === CalendarState.Years) {\n const yearValue = secondPart ? startYear + 12 : startYear;\n\n return (\n <StyledHeaderDate>\n {yearValue}—{yearValue + YEAR_RENDER_COUNT - 1}\n <IconDisclosureDownFill color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledHeaderDate>\n );\n }\n\n return '';\n },\n [type, startYear, size, locale],\n );\n\n const currentCalendarType = getCalendarType(type);\n\n const PreviousButton = useMemo(\n () => (\n <StyledArrow aria-label={`Предыдущий ${currentCalendarType}`} onClick={() => onPrev()}>\n <IconDisclosureLeft color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledArrow>\n ),\n [currentCalendarType, size, onPrev],\n );\n\n const NextButton = useMemo(\n () => (\n <StyledArrow aria-label={`Следующий ${currentCalendarType}`} onClick={() => onNext()}>\n <IconDisclosureRight color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledArrow>\n ),\n [currentCalendarType, size, onNext],\n );\n\n return (\n <StyledCalendarHeader>\n {isDouble ? (\n <StyledNavigation>\n <StyledDoubleHeaderWrapper>\n {PreviousButton}\n <StyledHeaderDouble onClick={handleCalendarState} aria-live=\"polite\">\n {getHeaderContent(firstDate)}\n </StyledHeaderDouble>\n </StyledDoubleHeaderWrapper>\n <StyledDoubleHeaderWrapper className={classes.doubleHeaderLastDateWrapper}>\n <StyledHeaderDouble onClick={handleCalendarState} aria-live=\"polite\">\n {getHeaderContent(secondDate, true)}\n </StyledHeaderDouble>\n {NextButton}\n </StyledDoubleHeaderWrapper>\n </StyledNavigation>\n ) : (\n <>\n <StyledHeader\n type=\"button\"\n aria-live=\"polite\"\n id=\"id-grid-label\"\n onClick={handleCalendarState}\n tabIndex={0}\n >\n {getHeaderContent(firstDate)}\n </StyledHeader>\n <StyledArrows>\n {PreviousButton}\n {NextButton}\n </StyledArrows>\n </>\n )}\n </StyledCalendarHeader>\n );\n};\n"],"names":["CalendarHeader","_ref","_ref$type","type","_ref$startYear","startYear","size","firstDate","secondDate","isDouble","onPrev","onNext","onUpdateCalendarState","locale","handleCalendarState","useCallback","newSize","sizeMap","Months","single","CalendarState","Days","Quarters","Years","getHeaderContent","date","secondPart","React","createElement","Fragment","StyledHeaderDate","MONTH_NAMES","monthIndex","year","IconDisclosureDownFill","color","yearValue","YEAR_RENDER_COUNT","currentCalendarType","getCalendarType","PreviousButton","useMemo","StyledArrow","concat","onClick","IconDisclosureLeft","NextButton","IconDisclosureRight","StyledCalendarHeader","StyledNavigation","StyledDoubleHeaderWrapper","StyledHeaderDouble","className","classes","doubleHeaderLastDateWrapper","StyledHeader","id","tabIndex","StyledArrows"],"mappings":";;;;;;;;;;;;;;;;AAqBA;AACA;AACA;IACa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AA,QAAQ,EAAE,CAAA;AAAE,GAAA,EAEXjC,gBAAgB,CAACjB,SAAS,CACjB,CAAC,eACfoB,KAAA,CAAAC,aAAA,CAAC8B,kCAAY,EACRlB,IAAAA,EAAAA,cAAc,EACdM,UACS,CAChB,CAEY,CAAC,CAAA;AAE/B;;;;"}
1
+ {"version":3,"file":"CalendarHeader.js","sources":["../../../../../src/components/Calendar/ui/CalendarHeader/CalendarHeader.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\n\nimport { IconDisclosureDownFill, IconDisclosureLeft, IconDisclosureRight } from '../../../_Icon';\nimport { CalendarState } from '../../store/types';\nimport { getCalendarType, MONTH_NAMES, YEAR_RENDER_COUNT } from '../../utils';\nimport type { DateObject } from '../../Calendar.types';\nimport { classes } from '../../Calendar.tokens';\nimport { sizeMap } from '../../store/reducer';\n\nimport type { CalendarHeaderProps } from './CalendarHeader.types';\nimport {\n StyledArrow,\n StyledArrows,\n StyledCalendarHeader,\n StyledDoubleHeaderWrapper,\n StyledHeader,\n StyledHeaderDate,\n StyledHeaderDouble,\n StyledNavigation,\n} from './CalendarHeader.styles';\n\n/**\n * Компонент шапки календаря.\n */\nexport const CalendarHeader: React.FC<CalendarHeaderProps> = ({\n type = 'Days',\n startYear = 0,\n size,\n firstDate,\n secondDate,\n isDouble,\n onPrev,\n onNext,\n onUpdateCalendarState,\n locale,\n}) => {\n const handleCalendarState = useCallback(() => {\n const newSize: [number, number] = isDouble ? sizeMap.Months.double : sizeMap.Months.single;\n\n if (type === CalendarState.Days) {\n onUpdateCalendarState?.(CalendarState.Months, newSize);\n }\n\n if (type === CalendarState.Months || type === CalendarState.Quarters) {\n onUpdateCalendarState?.(CalendarState.Years, newSize);\n }\n }, [type, onUpdateCalendarState]);\n\n const getHeaderContent = useCallback(\n (date?: DateObject, secondPart?: boolean) => {\n if (!date) {\n return '';\n }\n\n if (type === CalendarState.Days) {\n return (\n <>\n <StyledHeaderDate>{MONTH_NAMES[locale][date.monthIndex]}</StyledHeaderDate>\n <StyledHeaderDate>\n {date.year}\n <IconDisclosureDownFill color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledHeaderDate>\n </>\n );\n }\n\n if (type === CalendarState.Months || type === CalendarState.Quarters) {\n return (\n <StyledHeaderDate>\n {date.year}\n <IconDisclosureDownFill color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledHeaderDate>\n );\n }\n\n if (type === CalendarState.Years) {\n const yearValue = secondPart ? startYear + 12 : startYear;\n\n return (\n <StyledHeaderDate>\n {yearValue}—{yearValue + YEAR_RENDER_COUNT - 1}\n <IconDisclosureDownFill color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledHeaderDate>\n );\n }\n\n return '';\n },\n [type, startYear, size, locale],\n );\n\n const currentCalendarType = getCalendarType(type);\n\n const PreviousButton = useMemo(\n () => (\n <StyledArrow aria-label={`Предыдущий ${currentCalendarType}`} onClick={() => onPrev()}>\n <IconDisclosureLeft color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledArrow>\n ),\n [currentCalendarType, size, onPrev],\n );\n\n const NextButton = useMemo(\n () => (\n <StyledArrow aria-label={`Следующий ${currentCalendarType}`} onClick={() => onNext()}>\n <IconDisclosureRight color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledArrow>\n ),\n [currentCalendarType, size, onNext],\n );\n\n return (\n <StyledCalendarHeader>\n {isDouble ? (\n <StyledNavigation>\n <StyledDoubleHeaderWrapper>\n {PreviousButton}\n <StyledHeaderDouble onClick={handleCalendarState} aria-live=\"polite\">\n {getHeaderContent(firstDate)}\n </StyledHeaderDouble>\n </StyledDoubleHeaderWrapper>\n <StyledDoubleHeaderWrapper className={classes.doubleHeaderLastDateWrapper}>\n <StyledHeaderDouble onClick={handleCalendarState} aria-live=\"polite\">\n {getHeaderContent(secondDate, true)}\n </StyledHeaderDouble>\n {NextButton}\n </StyledDoubleHeaderWrapper>\n </StyledNavigation>\n ) : (\n <>\n <StyledHeader\n type=\"button\"\n aria-live=\"polite\"\n id=\"id-grid-label\"\n onClick={handleCalendarState}\n tabIndex={0}\n >\n {getHeaderContent(firstDate)}\n </StyledHeader>\n <StyledArrows>\n {PreviousButton}\n {NextButton}\n </StyledArrows>\n </>\n )}\n </StyledCalendarHeader>\n );\n};\n"],"names":["CalendarHeader","_ref","_ref$type","type","_ref$startYear","startYear","size","firstDate","secondDate","isDouble","onPrev","onNext","onUpdateCalendarState","locale","handleCalendarState","useCallback","newSize","sizeMap","Months","single","CalendarState","Days","Quarters","Years","getHeaderContent","date","secondPart","React","createElement","Fragment","StyledHeaderDate","MONTH_NAMES","monthIndex","year","IconDisclosureDownFill","color","yearValue","YEAR_RENDER_COUNT","currentCalendarType","getCalendarType","PreviousButton","useMemo","StyledArrow","concat","onClick","IconDisclosureLeft","NextButton","IconDisclosureRight","StyledCalendarHeader","StyledNavigation","StyledDoubleHeaderWrapper","StyledHeaderDouble","className","classes","doubleHeaderLastDateWrapper","StyledHeader","id","tabIndex","StyledArrows"],"mappings":";;;;;;;;;;;;;;;AAqBA;AACA;AACA;IACaA,cAA6C,GAAG,SAAhDA,cAA6CA,CAAAC,IAAA,EAWpD;AAAA,EAAA,IAAAC,SAAA,GAAAD,IAAA,CAVFE,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,SAAA;IAAAE,cAAA,GAAAH,IAAA,CACbI,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,cAAA;IACbE,IAAI,GAAAL,IAAA,CAAJK,IAAI;IACJC,SAAS,GAAAN,IAAA,CAATM,SAAS;IACTC,UAAU,GAAAP,IAAA,CAAVO,UAAU;IACVC,QAAQ,GAAAR,IAAA,CAARQ,QAAQ;IACRC,MAAM,GAAAT,IAAA,CAANS,MAAM;IACNC,MAAM,GAAAV,IAAA,CAANU,MAAM;IACNC,qBAAqB,G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AA,CAACuB,wCAAkB,EAAA;AAACP,IAAAA,OAAO,EAAE9B,mBAAoB;IAAC,WAAU,EAAA,QAAA;GACvDU,EAAAA,gBAAgB,CAACjB,SAAS,CACX,CACG,CAAC,eAC5BoB,KAAA,CAAAC,aAAA,CAACsB,+CAAyB,EAAA;IAACE,SAAS,EAAEC,uBAAO,CAACC,2BAAAA;AAA4B,GAAA,eACtE3B,KAAA,CAAAC,aAAA,CAACuB,wCAAkB,EAAA;AAACP,IAAAA,OAAO,EAAE9B,mBAAoB;IAAC,WAAU,EAAA,QAAA;GACvDU,EAAAA,gBAAgB,CAAChB,UAAU,EAAE,IAAI,CAClB,CAAC,EACpBsC,UACsB,CACb,CAAC,gBAEnBnB,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAE,QAAA,qBACIF,KAAA,CAAAC,aAAA,CAAC2B,kCAAY,EAAA;AACTpD,IAAAA,IAAI,EAAC,QAAQ;AACb,IAAA,WAAA,EAAU,QAAQ;AAClBqD,IAAAA,EAAE,EAAC,eAAe;AAClBZ,IAAAA,OAAO,EAAE9B,mBAAoB;AAC7B2C,IAAAA,QAAQ,EAAE,CAAA;AAAE,GAAA,EAEXjC,gBAAgB,CAACjB,SAAS,CACjB,CAAC,eACfoB,KAAA,CAAAC,aAAA,CAAC8B,kCAAY,EACRlB,IAAAA,EAAAA,cAAc,EACdM,UACS,CAChB,CAEY,CAAC,CAAA;AAE/B;;;;"}
@@ -4,7 +4,6 @@ import './CalendarHeader.styles_1jfelqf.css';
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var react = require('@linaria/react');
7
- require('@linaria/core');
8
7
  var common = require('../../../../engines/common.js');
9
8
  var IconButton$1 = require('../../../IconButton/IconButton.js');
10
9
 
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarHeader.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Calendar.tokens';\nimport { component, mergeConfig } from '../../../../engines';\nimport { iconButtonConfig, iconButtonTokens } from '../../../IconButton';\nimport { flexCenter } from '../../mixins';\nimport { addFocus } from '../../../../mixins';\n\nconst mergedIconButtonConfig = mergeConfig(iconButtonConfig);\nconst IconButton = component(mergedIconButtonConfig);\n\nexport const StyledCalendarHeader = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: var(${tokens.calendarHeaderWrapperPadding});\n`;\n\nexport const StyledHeader = styled.button`\n border: none;\n background-color: transparent;\n padding: 0;\n outline: none;\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n padding: var(${tokens.calendarHeaderPadding});\n\n color: var(${tokens.calendarContentPrimaryColor});\n\n cursor: pointer;\n display: flex;\n gap: var(${tokens.calendarHeaderDateGap});\n justify-content: space-between;\n align-items: center;\n\n &:hover,\n &:active {\n color: var(${tokens.calendarContentSecondaryColor});\n }\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: '0.563rem',\n })};\n`;\n\nexport const StyledHeaderDate = styled.span`\n ${flexCenter};\n pointer-events: none;\n`;\n\nexport const StyledArrows = styled.div`\n display: flex;\n gap: var(${tokens.calendarHeaderArrowGap});\n padding: var(${tokens.calendarHeaderArrowPadding});\n`;\n\n// NOTE: переопределение токенов IconButton\nexport const StyledArrow = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${tokens.iconButtonColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${tokens.iconButtonBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${tokens.iconButtonColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${tokens.iconButtonBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${tokens.iconButtonColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${tokens.iconButtonBackgroundColorActive});\n ${iconButtonTokens.iconButtonHeight}: var(${tokens.iconButtonHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${tokens.iconButtonWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${tokens.iconButtonPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${tokens.iconButtonRadius});\n ${iconButtonTokens.iconButtonFocusColor}: var(${tokens.iconButtonFocusColor});\n`;\n\nexport const StyledNavigation = styled.div`\n width: 100%;\n ${flexCenter};\n`;\n\nexport const StyledDoubleHeaderWrapper = styled.div`\n width: 100%;\n display: grid;\n align-items: center;\n grid-template-columns: var(${tokens.iconButtonWidth}) 1fr var(${tokens.iconButtonWidth});\n grid-template-areas: 'a b c';\n\n ${StyledArrow} {\n grid-area: a;\n }\n\n &.${classes.doubleHeaderLastDateWrapper} ${StyledArrow} {\n grid-area: c;\n }\n`;\n\nexport const StyledHeaderDouble = styled.button`\n border: none;\n background-color: transparent;\n padding: 0;\n outline: none;\n\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n\n color: var(${tokens.calendarContentPrimaryColor});\n\n grid-area: b;\n justify-self: center;\n cursor: pointer;\n display: flex;\n gap: var(${tokens.calendarHeaderDateGap});\n justify-content: space-between;\n align-items: center;\n margin: 0;\n height: fit-content;\n\n ${String(flexCenter)};\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: '0.563rem',\n })};\n`;\n"],"names":["mergedIconButtonConfig","mergeConfig","iconButtonConfig","IconButton","component","StyledCalendarHeader","styled","name","class","propsAsIs","StyledHeader","StyledHeaderDate","StyledArrows","_exp16","StyledArrow","StyledNavigation","StyledDoubleHeaderWrapper","StyledHeaderDouble"],"mappings":";;;;;;;;;AAQA,IAAMA,sBAAsB,gBAAGC,kBAAW,CAACC,6BAAgB,CAAC,CAAA;AAC5D,IAAMC,UAAU,gBAAGC,gBAAS,CAACJ,sBAAsB,CAAC,CAAA;AAE7C,IAAMK,oBAAoB,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,sBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAKzC,EAAA;AAEM,IAAMC,YAAY,gBAAGJ,YAAM,CAAA,QAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAgCjC,EAAA;AAEM,IAAME,gBAAgB,gBAAGL,YAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGrC,EAAA;AAEM,IAAMG,YAAY,gBAAGN,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAIjC,EAAA;;AAED;AAAA,IAAAI,MAAA,GA9DkBA,SA8DlBA,MAAAA,GAAA;AAAA,EAAA,OACkCV,UAAU,CAAA;AAAA,CAAA,CAAA;AAArC,IAAMW,WAAW,gBAAGR,YAAM,CAAAO,MAAA,EAAA,CAAA,CAAA;AAAAN,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAYhC,EAAA;AAEM,IAAMM,gBAAgB,gBAAGT,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGrC,EAAA;AAEM,IAAMO,yBAAyB,gBAAGV,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,2BAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAc9C,EAAA;AAEM,IAAMQ,kBAAkB,gBAAGX,YAAM,CAAA,QAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,oBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAiCvC;;;;;;;;;;;"}
1
+ {"version":3,"file":"CalendarHeader.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Calendar.tokens';\nimport { component, mergeConfig } from '../../../../engines';\nimport { iconButtonConfig, iconButtonTokens } from '../../../IconButton';\nimport { flexCenter } from '../../mixins';\nimport { addFocus } from '../../../../mixins';\n\nconst mergedIconButtonConfig = mergeConfig(iconButtonConfig);\nconst IconButton = component(mergedIconButtonConfig);\n\nexport const StyledCalendarHeader = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: var(${tokens.calendarHeaderWrapperPadding});\n`;\n\nexport const StyledHeader = styled.button`\n border: none;\n background-color: transparent;\n padding: 0;\n outline: none;\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n padding: var(${tokens.calendarHeaderPadding});\n\n color: var(${tokens.calendarContentPrimaryColor});\n\n cursor: pointer;\n display: flex;\n gap: var(${tokens.calendarHeaderDateGap});\n justify-content: space-between;\n align-items: center;\n\n &:hover,\n &:active {\n color: var(${tokens.calendarContentSecondaryColor});\n }\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: '0.563rem',\n })};\n`;\n\nexport const StyledHeaderDate = styled.span`\n ${flexCenter};\n pointer-events: none;\n`;\n\nexport const StyledArrows = styled.div`\n display: flex;\n gap: var(${tokens.calendarHeaderArrowGap});\n padding: var(${tokens.calendarHeaderArrowPadding});\n`;\n\n// NOTE: переопределение токенов IconButton\nexport const StyledArrow = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${tokens.iconButtonColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${tokens.iconButtonBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${tokens.iconButtonColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${tokens.iconButtonBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${tokens.iconButtonColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${tokens.iconButtonBackgroundColorActive});\n ${iconButtonTokens.iconButtonHeight}: var(${tokens.iconButtonHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${tokens.iconButtonWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${tokens.iconButtonPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${tokens.iconButtonRadius});\n ${iconButtonTokens.iconButtonFocusColor}: var(${tokens.iconButtonFocusColor});\n`;\n\nexport const StyledNavigation = styled.div`\n width: 100%;\n ${flexCenter};\n`;\n\nexport const StyledDoubleHeaderWrapper = styled.div`\n width: 100%;\n display: grid;\n align-items: center;\n grid-template-columns: var(${tokens.iconButtonWidth}) 1fr var(${tokens.iconButtonWidth});\n grid-template-areas: 'a b c';\n\n ${StyledArrow} {\n grid-area: a;\n }\n\n &.${classes.doubleHeaderLastDateWrapper} ${StyledArrow} {\n grid-area: c;\n }\n`;\n\nexport const StyledHeaderDouble = styled.button`\n border: none;\n background-color: transparent;\n padding: 0;\n outline: none;\n\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n\n color: var(${tokens.calendarContentPrimaryColor});\n\n grid-area: b;\n justify-self: center;\n cursor: pointer;\n display: flex;\n gap: var(${tokens.calendarHeaderDateGap});\n justify-content: space-between;\n align-items: center;\n margin: 0;\n height: fit-content;\n\n ${String(flexCenter)};\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: '0.563rem',\n })};\n`;\n"],"names":["mergedIconButtonConfig","mergeConfig","iconButtonConfig","IconButton","component","StyledCalendarHeader","styled","name","class","propsAsIs","StyledHeader","StyledHeaderDate","StyledArrows","_exp16","StyledArrow","StyledNavigation","StyledDoubleHeaderWrapper","StyledHeaderDouble"],"mappings":";;;;;;;;AAQA,IAAMA,sBAAsB,gBAAGC,kBAAW,CAACC,6BAAgB,CAAC,CAAA;AAC5D,IAAMC,UAAU,gBAAGC,gBAAS,CAACJ,sBAAsB,CAAC,CAAA;AAE7C,IAAMK,oBAAoB,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,sBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA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CAAA,QAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,oBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAiCvC;;;;;;;;;;;"}
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
6
6
  var React = require('react');
7
- var constants = require('../../utils/constants.js');
8
- var calendarGridHelper = require('../../utils/calendarGridHelper.js');
9
- var calendarRangeHelper = require('../../utils/calendarRangeHelper.js');
10
- var useMonths = require('../../hooks/useMonths.js');
11
7
  var Calendar_tokens = require('../../Calendar.tokens.js');
12
8
  var DateStructureItem = require('../DateStructureItem/DateStructureItem.js');
13
9
  var CalendarMonths_styles = require('./CalendarMonths.styles.js');
10
+ var useMonths = require('../../hooks/useMonths.js');
11
+ var constants = require('../../utils/constants.js');
12
+ var calendarGridHelper = require('../../utils/calendarGridHelper.js');
13
+ var calendarRangeHelper = require('../../utils/calendarRangeHelper.js');
14
14
 
15
15
  /**
16
16
  * Компонент месяцев в календаре.
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
6
6
  var React = require('react');
7
- var constants = require('../../utils/constants.js');
8
- var calendarGridHelper = require('../../utils/calendarGridHelper.js');
9
- var calendarRangeHelper = require('../../utils/calendarRangeHelper.js');
10
- var useQuarters = require('../../hooks/useQuarters.js');
11
7
  var Calendar_tokens = require('../../Calendar.tokens.js');
12
8
  var DateStructureItem = require('../DateStructureItem/DateStructureItem.js');
13
9
  var CalendarQuarters_styles = require('./CalendarQuarters.styles.js');
10
+ var useQuarters = require('../../hooks/useQuarters.js');
11
+ var constants = require('../../utils/constants.js');
12
+ var calendarGridHelper = require('../../utils/calendarGridHelper.js');
13
+ var calendarRangeHelper = require('../../utils/calendarRangeHelper.js');
14
14
 
15
15
  /**
16
16
  * Компонент кварталов в календаре.
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
6
6
  var React = require('react');
7
- var constants = require('../../utils/constants.js');
8
- var calendarGridHelper = require('../../utils/calendarGridHelper.js');
9
- var calendarRangeHelper = require('../../utils/calendarRangeHelper.js');
10
- var useYears = require('../../hooks/useYears.js');
11
7
  var Calendar_tokens = require('../../Calendar.tokens.js');
12
8
  var DateStructureItem = require('../DateStructureItem/DateStructureItem.js');
13
9
  var CalendarYears_styles = require('./CalendarYears.styles.js');
10
+ var useYears = require('../../hooks/useYears.js');
11
+ var constants = require('../../utils/constants.js');
12
+ var calendarGridHelper = require('../../utils/calendarGridHelper.js');
13
+ var calendarRangeHelper = require('../../utils/calendarRangeHelper.js');
14
14
 
15
15
  /**
16
16
  * Компонент годов в календаре.
@@ -5,27 +5,26 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
6
6
  var React = require('react');
7
7
  var plasmaCore = require('@salutejs/plasma-core');
8
- require('../../../utils/react.js');
9
- var isEmpty = require('../../../utils/isEmpty.js');
10
- var useOutsideClick = require('../../../hooks/useOutsideClick.js');
11
- var sizeToIconSize = require('../../Select/utils/sizeToIconSize.js');
12
8
  var Combobox_tokens = require('./Combobox.tokens.js');
13
9
  var FloatingPopover = require('./FloatingPopover.js');
14
10
  var useKeyboardNavigation = require('./hooks/useKeyboardNavigation.js');
11
+ var getPathMaps = require('./hooks/getPathMaps.js');
12
+ var Combobox_styles = require('./Combobox.styles.js');
13
+ var base = require('./variations/_view/base.js');
14
+ var base$1 = require('./variations/_size/base.js');
15
15
  var initialItemsTransform = require('./utils/initialItemsTransform.js');
16
+ var filterItems = require('./utils/filterItems.js');
17
+ var pathReducer = require('./reducers/pathReducer.js');
18
+ var focusedPathReducer = require('./reducers/focusedPathReducer.js');
19
+ var useOutsideClick = require('../../../hooks/useOutsideClick.js');
20
+ var isEmpty = require('../../../utils/isEmpty.js');
16
21
  var updateDescendants = require('./utils/updateDescendants.js');
17
22
  var updateAncestors = require('./utils/updateAncestors.js');
18
23
  var updateSingleAncestors = require('./utils/updateSingleAncestors.js');
19
- var filterItems = require('./utils/filterItems.js');
24
+ var Target_styles = require('./ui/Target/Target.styles.js');
25
+ var sizeToIconSize = require('../../Select/utils/sizeToIconSize.js');
20
26
  var getItemId = require('./utils/getItemId.js');
21
27
  var Inner = require('./ui/Inner/Inner.js');
22
- var Target_styles = require('./ui/Target/Target.styles.js');
23
- var pathReducer = require('./reducers/pathReducer.js');
24
- var focusedPathReducer = require('./reducers/focusedPathReducer.js');
25
- var getPathMaps = require('./hooks/getPathMaps.js');
26
- var Combobox_styles = require('./Combobox.styles.js');
27
- var base = require('./variations/_view/base.js');
28
- var base$1 = require('./variations/_size/base.js');
29
28
 
30
29
  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"];
31
30
  var Context = /*#__PURE__*/React.createContext({});