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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (555) hide show
  1. package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -1
  2. package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -1
  3. package/cjs/components/Attach/Attach.js +3 -4
  4. package/cjs/components/Attach/Attach.js.map +1 -1
  5. package/cjs/components/Attach/components/AttachButton/AttachButton.js +0 -1
  6. package/cjs/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
  7. package/cjs/components/Attach/ui/Button/Button.styles.js +0 -1
  8. package/cjs/components/Attach/ui/Button/Button.styles.js.map +1 -1
  9. package/cjs/components/Attach/ui/Cell/Cell.styles.js +0 -2
  10. package/cjs/components/Attach/ui/Cell/Cell.styles.js.map +1 -1
  11. package/cjs/components/Attach/ui/IconButton/IconButton.styles.js +0 -1
  12. package/cjs/components/Attach/ui/IconButton/IconButton.styles.js.map +1 -1
  13. package/cjs/components/Attach/utils/getFileicon.js +3 -4
  14. package/cjs/components/Attach/utils/getFileicon.js.map +1 -1
  15. package/cjs/components/Attach/utils/index.js +0 -3
  16. package/cjs/components/Attach/utils/index.js.map +1 -1
  17. package/cjs/components/Autocomplete/Autocomplete.js +5 -6
  18. package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
  19. package/cjs/components/Autocomplete/Autocomplete.styles.js +2 -3
  20. package/cjs/components/Autocomplete/Autocomplete.styles.js.map +1 -1
  21. package/cjs/components/Autocomplete/ui/TextField/TextField.styles.js +1 -2
  22. package/cjs/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
  23. package/cjs/components/Avatar/Avatar.js +2 -3
  24. package/cjs/components/Avatar/Avatar.js.map +1 -1
  25. package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +2 -4
  26. package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  27. package/cjs/components/Button/Button.styles.js +0 -3
  28. package/cjs/components/Button/Button.styles.js.map +1 -1
  29. package/cjs/components/Calendar/CalendarBase/CalendarBase.js +5 -5
  30. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +8 -8
  31. package/cjs/components/Calendar/hooks/useDays.js +2 -2
  32. package/cjs/components/Calendar/hooks/useKeyNavigation.js +1 -1
  33. package/cjs/components/Calendar/hooks/useMonths.js +2 -2
  34. package/cjs/components/Calendar/hooks/useQuarters.js +2 -2
  35. package/cjs/components/Calendar/hooks/useYears.js +2 -2
  36. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +9 -5
  37. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
  38. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
  39. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  40. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
  41. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  42. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +9 -5
  43. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  44. package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +9 -5
  45. package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
  46. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +9 -5
  47. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  48. package/cjs/components/Combobox/ComboboxNew/Combobox.css +10 -10
  49. package/cjs/components/Combobox/ComboboxNew/Combobox.js +11 -12
  50. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  51. package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
  52. package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
  53. package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
  54. package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  55. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +10 -10
  56. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
  57. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
  58. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +10 -10
  59. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +6 -8
  60. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  61. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +7 -23
  62. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  63. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/{Item.styles_1us8jz1.css → Item.styles_y71664.css} +1 -1
  64. package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
  65. package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
  66. package/cjs/components/Combobox/ComboboxOld/Combobox.css +1 -1
  67. package/cjs/components/Combobox/ComboboxOld/Combobox.js +4 -11
  68. package/cjs/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  69. package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
  70. package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
  71. package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
  72. package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
  73. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
  74. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
  75. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +1 -1
  76. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -11
  77. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
  78. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +1 -1
  79. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -11
  80. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
  81. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +1 -1
  82. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -11
  83. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
  84. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +1 -1
  85. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -11
  86. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
  87. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
  88. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  89. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
  90. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
  91. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
  92. package/cjs/components/DatePicker/DatePickerBase.styles.js +1 -7
  93. package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -1
  94. package/cjs/components/DatePicker/RangeDate/RangeDate.js +1 -1
  95. package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
  96. package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
  97. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
  98. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
  99. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
  100. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
  101. package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
  102. package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
  103. package/cjs/components/Drawer/Drawer.js +5 -10
  104. package/cjs/components/Drawer/Drawer.js.map +1 -1
  105. package/cjs/components/Drawer/Drawer.styles.js +0 -4
  106. package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
  107. package/cjs/components/Drawer/hooks/useDrawer.js +0 -4
  108. package/cjs/components/Drawer/hooks/useDrawer.js.map +1 -1
  109. package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
  110. package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
  111. package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
  112. package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
  113. package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
  114. package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
  115. package/cjs/components/Dropdown/Dropdown.css +1 -1
  116. package/cjs/components/Dropdown/Dropdown.js +3 -9
  117. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  118. package/cjs/components/Dropdown/Dropdown.styles.js +1 -1
  119. package/cjs/components/Dropdown/{Dropdown.styles_18f0qpm.css → Dropdown.styles_1ix6io8.css} +1 -1
  120. package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
  121. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -8
  122. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  123. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +1 -1
  124. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -3
  125. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  126. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -3
  127. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  128. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -2
  129. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
  130. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
  131. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
  132. package/cjs/components/Editable/Editable.js +3 -4
  133. package/cjs/components/Editable/Editable.js.map +1 -1
  134. package/cjs/components/Editable/utils/clearSelection.js +0 -2
  135. package/cjs/components/Editable/utils/clearSelection.js.map +1 -1
  136. package/cjs/components/Editable/utils/selectText.js +0 -2
  137. package/cjs/components/Editable/utils/selectText.js.map +1 -1
  138. package/cjs/components/EmptyState/EmptyState.styles.js +1 -2
  139. package/cjs/components/EmptyState/EmptyState.styles.js.map +1 -1
  140. package/cjs/components/IconButton/IconButton.js +1 -1
  141. package/cjs/components/IconButton/IconButton.styles.js +0 -8
  142. package/cjs/components/IconButton/IconButton.styles.js.map +1 -1
  143. package/cjs/components/Modal/Modal.js +6 -8
  144. package/cjs/components/Modal/Modal.js.map +1 -1
  145. package/cjs/components/Modal/hooks/useModal.js +0 -4
  146. package/cjs/components/Modal/hooks/useModal.js.map +1 -1
  147. package/cjs/components/Notification/Notification.styles.js +2 -3
  148. package/cjs/components/Notification/Notification.styles.js.map +1 -1
  149. package/cjs/components/Notification/NotificationsPortal.js +3 -4
  150. package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
  151. package/cjs/components/Pagination/Pagination.styles.js +1 -2
  152. package/cjs/components/Pagination/Pagination.styles.js.map +1 -1
  153. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
  154. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  155. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
  156. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
  157. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
  158. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
  159. package/cjs/components/Popover/Popover.js +1 -1
  160. package/cjs/components/Popup/Popup.js +2 -2
  161. package/cjs/components/Popup/PopupContext.js +1 -1
  162. package/cjs/components/Range/Range.styles.js +0 -1
  163. package/cjs/components/Range/Range.styles.js.map +1 -1
  164. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
  165. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
  166. package/cjs/components/Select/Select.js +11 -12
  167. package/cjs/components/Select/Select.js.map +1 -1
  168. package/cjs/components/Select/Select.styles.js +2 -5
  169. package/cjs/components/Select/Select.styles.js.map +1 -1
  170. package/cjs/components/Select/hooks/usePathMaps.js +0 -2
  171. package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
  172. package/cjs/components/Select/ui/Inner/Inner.js +1 -2
  173. package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
  174. package/cjs/components/Select/ui/Inner/ui/Item/Item.js +4 -5
  175. package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  176. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +0 -1
  177. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  178. package/cjs/components/Select/ui/Target/ui/Button/Button.js +1 -1
  179. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
  180. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  181. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
  182. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
  183. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  184. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
  185. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
  186. package/cjs/components/Select/utils/getButtonLabel.js +0 -2
  187. package/cjs/components/Select/utils/getButtonLabel.js.map +1 -1
  188. package/cjs/components/Sheet/Sheet.js +3 -3
  189. package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
  190. package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
  191. package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
  192. package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
  193. package/cjs/components/Slider/Slider.js +0 -8
  194. package/cjs/components/Slider/Slider.js.map +1 -1
  195. package/cjs/components/Slider/components/Double/Double.js +1 -2
  196. package/cjs/components/Slider/components/Double/Double.js.map +1 -1
  197. package/cjs/components/Slider/components/Double/Double.styles.js +0 -1
  198. package/cjs/components/Slider/components/Double/Double.styles.js.map +1 -1
  199. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
  200. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  201. package/cjs/components/Slider/components/Single/Single.js +1 -2
  202. package/cjs/components/Slider/components/Single/Single.js.map +1 -1
  203. package/cjs/components/Slider/components/SliderBase/SliderBase.js +1 -1
  204. package/cjs/components/Steps/Steps.js +1 -1
  205. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
  206. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  207. package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
  208. package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
  209. package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
  210. package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
  211. package/cjs/components/TextArea/TextArea.js +3 -3
  212. package/cjs/components/TextArea/TextArea.js.map +1 -1
  213. package/cjs/components/TextArea/TextArea.styles.js +4 -5
  214. package/cjs/components/TextArea/TextArea.styles.js.map +1 -1
  215. package/cjs/components/TextArea/ui/Hint/Hint.js +1 -2
  216. package/cjs/components/TextArea/ui/Hint/Hint.js.map +1 -1
  217. package/cjs/components/TextField/TextField.js +4 -4
  218. package/cjs/components/TextField/TextField.js.map +1 -1
  219. package/cjs/components/TextField/TextField.styles.js +3 -4
  220. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  221. package/cjs/components/TextField/ui/Hint/Hint.js +1 -2
  222. package/cjs/components/TextField/ui/Hint/Hint.js.map +1 -1
  223. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
  224. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
  225. package/cjs/components/Toast/Toast.styles.js +1 -1
  226. package/cjs/components/Toast/ToastController.js +1 -1
  227. package/cjs/components/Toast/utils.js +1 -2
  228. package/cjs/components/Toast/utils.js.map +1 -1
  229. package/cjs/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  230. package/cjs/components/Tooltip/Tooltip.js +2 -3
  231. package/cjs/components/Tooltip/Tooltip.js.map +1 -1
  232. package/cjs/engines/index.js +0 -2
  233. package/cjs/engines/index.js.map +1 -1
  234. package/cjs/hooks/useIsomorphicLayoutEffect.js +0 -1
  235. package/cjs/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  236. package/cjs/index.css +10 -10
  237. package/cjs/index.js +48 -51
  238. package/cjs/index.js.map +1 -1
  239. package/cjs/utils/index.js +0 -5
  240. package/cjs/utils/index.js.map +1 -1
  241. package/emotion/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -1
  242. package/emotion/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -1
  243. package/emotion/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -1
  244. package/emotion/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -1
  245. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  246. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +14 -20
  247. package/emotion/cjs/components/Dropdown/Dropdown.tokens.js +1 -1
  248. package/emotion/cjs/components/TextArea/TextArea.js +2 -2
  249. package/emotion/cjs/components/TextArea/TextArea.styles.js +20 -20
  250. package/emotion/cjs/components/TextField/TextField.js +2 -2
  251. package/emotion/cjs/components/TextField/TextField.styles.js +24 -24
  252. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
  253. package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
  254. package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +12 -12
  255. package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
  256. package/emotion/es/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -1
  257. package/emotion/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -1
  258. package/emotion/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -1
  259. package/emotion/es/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -1
  260. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  261. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +14 -20
  262. package/emotion/es/components/Dropdown/Dropdown.tokens.js +1 -1
  263. package/emotion/es/components/TextArea/TextArea.js +2 -2
  264. package/emotion/es/components/TextArea/TextArea.styles.js +20 -20
  265. package/emotion/es/components/TextField/TextField.js +2 -2
  266. package/emotion/es/components/TextField/TextField.styles.js +24 -24
  267. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
  268. package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
  269. package/emotion/es/examples/plasma_web/components/Combobox/Combobox.config.js +12 -12
  270. package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
  271. package/emotion/package.json +2 -1
  272. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -1
  273. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -1
  274. package/es/components/Attach/Attach.js +3 -4
  275. package/es/components/Attach/Attach.js.map +1 -1
  276. package/es/components/Attach/components/AttachButton/AttachButton.js +0 -1
  277. package/es/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
  278. package/es/components/Attach/ui/Button/Button.styles.js +0 -1
  279. package/es/components/Attach/ui/Button/Button.styles.js.map +1 -1
  280. package/es/components/Attach/ui/Cell/Cell.styles.js +0 -2
  281. package/es/components/Attach/ui/Cell/Cell.styles.js.map +1 -1
  282. package/es/components/Attach/ui/IconButton/IconButton.styles.js +0 -1
  283. package/es/components/Attach/ui/IconButton/IconButton.styles.js.map +1 -1
  284. package/es/components/Attach/utils/getFileicon.js +3 -4
  285. package/es/components/Attach/utils/getFileicon.js.map +1 -1
  286. package/es/components/Attach/utils/index.js +0 -3
  287. package/es/components/Attach/utils/index.js.map +1 -1
  288. package/es/components/Autocomplete/Autocomplete.js +5 -6
  289. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  290. package/es/components/Autocomplete/Autocomplete.styles.js +2 -3
  291. package/es/components/Autocomplete/Autocomplete.styles.js.map +1 -1
  292. package/es/components/Autocomplete/ui/TextField/TextField.styles.js +1 -2
  293. package/es/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
  294. package/es/components/Avatar/Avatar.js +2 -3
  295. package/es/components/Avatar/Avatar.js.map +1 -1
  296. package/es/components/Breadcrumbs/Breadcrumbs.styles.js +2 -4
  297. package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  298. package/es/components/Button/Button.styles.js +0 -3
  299. package/es/components/Button/Button.styles.js.map +1 -1
  300. package/es/components/Calendar/CalendarBase/CalendarBase.js +5 -5
  301. package/es/components/Calendar/CalendarDouble/CalendarDouble.js +8 -8
  302. package/es/components/Calendar/hooks/useDays.js +2 -2
  303. package/es/components/Calendar/hooks/useKeyNavigation.js +1 -1
  304. package/es/components/Calendar/hooks/useMonths.js +2 -2
  305. package/es/components/Calendar/hooks/useQuarters.js +2 -2
  306. package/es/components/Calendar/hooks/useYears.js +2 -2
  307. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +9 -5
  308. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
  309. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
  310. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  311. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
  312. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  313. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +9 -5
  314. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  315. package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +9 -5
  316. package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
  317. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +9 -5
  318. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  319. package/es/components/Combobox/ComboboxNew/Combobox.css +10 -10
  320. package/es/components/Combobox/ComboboxNew/Combobox.js +11 -12
  321. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  322. package/es/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
  323. package/es/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
  324. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
  325. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  326. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +10 -10
  327. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
  328. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
  329. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +10 -10
  330. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +6 -8
  331. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  332. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +7 -23
  333. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  334. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/{Item.styles_1us8jz1.css → Item.styles_y71664.css} +1 -1
  335. package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
  336. package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
  337. package/es/components/Combobox/ComboboxOld/Combobox.css +1 -1
  338. package/es/components/Combobox/ComboboxOld/Combobox.js +4 -11
  339. package/es/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  340. package/es/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
  341. package/es/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
  342. package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
  343. package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
  344. package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
  345. package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
  346. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +1 -1
  347. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -11
  348. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
  349. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +1 -1
  350. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -11
  351. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
  352. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +1 -1
  353. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -11
  354. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
  355. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +1 -1
  356. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -11
  357. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
  358. package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
  359. package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  360. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
  361. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
  362. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
  363. package/es/components/DatePicker/DatePickerBase.styles.js +1 -7
  364. package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -1
  365. package/es/components/DatePicker/RangeDate/RangeDate.js +1 -1
  366. package/es/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
  367. package/es/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
  368. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
  369. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
  370. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
  371. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
  372. package/es/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
  373. package/es/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
  374. package/es/components/Drawer/Drawer.js +5 -10
  375. package/es/components/Drawer/Drawer.js.map +1 -1
  376. package/es/components/Drawer/Drawer.styles.js +0 -4
  377. package/es/components/Drawer/Drawer.styles.js.map +1 -1
  378. package/es/components/Drawer/hooks/useDrawer.js +0 -4
  379. package/es/components/Drawer/hooks/useDrawer.js.map +1 -1
  380. package/es/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
  381. package/es/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
  382. package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
  383. package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
  384. package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
  385. package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
  386. package/es/components/Dropdown/Dropdown.css +1 -1
  387. package/es/components/Dropdown/Dropdown.js +3 -9
  388. package/es/components/Dropdown/Dropdown.js.map +1 -1
  389. package/es/components/Dropdown/Dropdown.styles.js +1 -1
  390. package/es/components/Dropdown/{Dropdown.styles_18f0qpm.css → Dropdown.styles_1ix6io8.css} +1 -1
  391. package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
  392. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -8
  393. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  394. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +1 -1
  395. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -3
  396. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  397. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -3
  398. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  399. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -2
  400. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
  401. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
  402. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
  403. package/es/components/Editable/Editable.js +3 -4
  404. package/es/components/Editable/Editable.js.map +1 -1
  405. package/es/components/Editable/utils/clearSelection.js +0 -2
  406. package/es/components/Editable/utils/clearSelection.js.map +1 -1
  407. package/es/components/Editable/utils/selectText.js +0 -2
  408. package/es/components/Editable/utils/selectText.js.map +1 -1
  409. package/es/components/EmptyState/EmptyState.styles.js +1 -2
  410. package/es/components/EmptyState/EmptyState.styles.js.map +1 -1
  411. package/es/components/IconButton/IconButton.js +1 -1
  412. package/es/components/IconButton/IconButton.styles.js +0 -8
  413. package/es/components/IconButton/IconButton.styles.js.map +1 -1
  414. package/es/components/Modal/Modal.js +6 -8
  415. package/es/components/Modal/Modal.js.map +1 -1
  416. package/es/components/Modal/hooks/useModal.js +0 -4
  417. package/es/components/Modal/hooks/useModal.js.map +1 -1
  418. package/es/components/Notification/Notification.styles.js +2 -3
  419. package/es/components/Notification/Notification.styles.js.map +1 -1
  420. package/es/components/Notification/NotificationsPortal.js +3 -4
  421. package/es/components/Notification/NotificationsPortal.js.map +1 -1
  422. package/es/components/Pagination/Pagination.styles.js +1 -2
  423. package/es/components/Pagination/Pagination.styles.js.map +1 -1
  424. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
  425. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  426. package/es/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
  427. package/es/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
  428. package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
  429. package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
  430. package/es/components/Popover/Popover.js +1 -1
  431. package/es/components/Popup/Popup.js +2 -2
  432. package/es/components/Popup/PopupContext.js +1 -1
  433. package/es/components/Range/Range.styles.js +0 -1
  434. package/es/components/Range/Range.styles.js.map +1 -1
  435. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
  436. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
  437. package/es/components/Select/Select.js +11 -12
  438. package/es/components/Select/Select.js.map +1 -1
  439. package/es/components/Select/Select.styles.js +2 -5
  440. package/es/components/Select/Select.styles.js.map +1 -1
  441. package/es/components/Select/hooks/usePathMaps.js +0 -2
  442. package/es/components/Select/hooks/usePathMaps.js.map +1 -1
  443. package/es/components/Select/ui/Inner/Inner.js +1 -2
  444. package/es/components/Select/ui/Inner/Inner.js.map +1 -1
  445. package/es/components/Select/ui/Inner/ui/Item/Item.js +4 -5
  446. package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  447. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js +0 -1
  448. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  449. package/es/components/Select/ui/Target/ui/Button/Button.js +1 -1
  450. package/es/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
  451. package/es/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  452. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
  453. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
  454. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  455. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
  456. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
  457. package/es/components/Select/utils/getButtonLabel.js +0 -2
  458. package/es/components/Select/utils/getButtonLabel.js.map +1 -1
  459. package/es/components/Sheet/Sheet.js +3 -3
  460. package/es/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
  461. package/es/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
  462. package/es/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
  463. package/es/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
  464. package/es/components/Slider/Slider.js +0 -8
  465. package/es/components/Slider/Slider.js.map +1 -1
  466. package/es/components/Slider/components/Double/Double.js +1 -2
  467. package/es/components/Slider/components/Double/Double.js.map +1 -1
  468. package/es/components/Slider/components/Double/Double.styles.js +0 -1
  469. package/es/components/Slider/components/Double/Double.styles.js.map +1 -1
  470. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
  471. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  472. package/es/components/Slider/components/Single/Single.js +1 -2
  473. package/es/components/Slider/components/Single/Single.js.map +1 -1
  474. package/es/components/Slider/components/SliderBase/SliderBase.js +1 -1
  475. package/es/components/Steps/Steps.js +1 -1
  476. package/es/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
  477. package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  478. package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
  479. package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
  480. package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
  481. package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
  482. package/es/components/TextArea/TextArea.js +3 -3
  483. package/es/components/TextArea/TextArea.js.map +1 -1
  484. package/es/components/TextArea/TextArea.styles.js +4 -5
  485. package/es/components/TextArea/TextArea.styles.js.map +1 -1
  486. package/es/components/TextArea/ui/Hint/Hint.js +1 -2
  487. package/es/components/TextArea/ui/Hint/Hint.js.map +1 -1
  488. package/es/components/TextField/TextField.js +4 -4
  489. package/es/components/TextField/TextField.js.map +1 -1
  490. package/es/components/TextField/TextField.styles.js +3 -4
  491. package/es/components/TextField/TextField.styles.js.map +1 -1
  492. package/es/components/TextField/ui/Hint/Hint.js +1 -2
  493. package/es/components/TextField/ui/Hint/Hint.js.map +1 -1
  494. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
  495. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
  496. package/es/components/Toast/Toast.styles.js +1 -1
  497. package/es/components/Toast/ToastController.js +1 -1
  498. package/es/components/Toast/utils.js +1 -2
  499. package/es/components/Toast/utils.js.map +1 -1
  500. package/es/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  501. package/es/components/Tooltip/Tooltip.js +2 -3
  502. package/es/components/Tooltip/Tooltip.js.map +1 -1
  503. package/es/engines/index.js +0 -2
  504. package/es/engines/index.js.map +1 -1
  505. package/es/hooks/useIsomorphicLayoutEffect.js +0 -1
  506. package/es/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  507. package/es/index.css +10 -10
  508. package/es/index.js +21 -24
  509. package/es/index.js.map +1 -1
  510. package/es/utils/index.js +0 -3
  511. package/es/utils/index.js.map +1 -1
  512. package/package.json +5 -2
  513. package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -1
  514. package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -1
  515. package/styled-components/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -1
  516. package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -1
  517. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  518. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +4 -10
  519. package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +1 -1
  520. package/styled-components/cjs/components/TextArea/TextArea.js +1 -1
  521. package/styled-components/cjs/components/TextArea/TextArea.styles.js +2 -2
  522. package/styled-components/cjs/components/TextField/TextField.js +1 -1
  523. package/styled-components/cjs/components/TextField/TextField.styles.js +2 -2
  524. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +4 -4
  525. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +4 -4
  526. package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +4 -4
  527. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +4 -4
  528. package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -1
  529. package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -1
  530. package/styled-components/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -1
  531. package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -1
  532. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  533. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +4 -10
  534. package/styled-components/es/components/Dropdown/Dropdown.tokens.js +1 -1
  535. package/styled-components/es/components/TextArea/TextArea.js +1 -1
  536. package/styled-components/es/components/TextArea/TextArea.styles.js +2 -2
  537. package/styled-components/es/components/TextField/TextField.js +1 -1
  538. package/styled-components/es/components/TextField/TextField.styles.js +2 -2
  539. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +4 -4
  540. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +4 -4
  541. package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.config.js +4 -4
  542. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +4 -4
  543. package/styled-components/package.json +2 -1
  544. package/types/components/Calendar/ui/CalendarDays/CalendarDays.d.ts.map +1 -1
  545. package/types/components/Calendar/ui/CalendarMonths/CalendarMonths.d.ts.map +1 -1
  546. package/types/components/Calendar/ui/CalendarQuarters/CalendarQuarters.d.ts.map +1 -1
  547. package/types/components/Calendar/ui/CalendarYears/CalendarYears.d.ts.map +1 -1
  548. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.d.ts.map +1 -1
  549. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.d.ts.map +1 -1
  550. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts +4 -0
  551. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts.map +1 -1
  552. package/types/components/TextArea/TextArea.styles.d.ts +1 -1
  553. package/types/components/TextArea/TextArea.styles.d.ts.map +1 -1
  554. package/types/components/TextField/TextField.styles.d.ts +1 -1
  555. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\nimport { useFocusTrap, useForkRef, safeUseId } from '@salutejs/plasma-core';\n\nimport { component, mergeConfig } from '../../engines';\nimport type { RootProps } from '../../engines';\nimport { usePopupContext } from '../Popup';\nimport { Overlay } from '../Overlay';\nimport { DEFAULT_Z_INDEX } from '../Popup/utils';\nimport { panelConfig } from '../Panel';\nimport { cx, getSizeValueFromProp } from '../../utils';\n\nimport { classes, tokens } from './Drawer.tokens';\nimport type { DrawerProps } from './Drawer.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as borderRadiusCSS } from './variations/_borderRadius/base';\nimport { StyledPopup } from './Drawer.styles';\nimport { getIdLastDrawer } from './DrawerContext';\nimport { useDrawer } from './hooks';\n\n// issue #823\nconst mergedPanelConfig = mergeConfig(panelConfig);\nconst Panel = component(mergedPanelConfig);\n\nexport const drawerRoot = (Root: RootProps<HTMLDivElement, DrawerProps>) =>\n forwardRef<HTMLDivElement, DrawerProps>(\n (\n {\n id,\n zIndex,\n popupInfo,\n withBlur,\n children,\n view,\n size,\n width,\n height,\n isOpen,\n opened,\n initialFocusRef,\n focusAfterRef,\n className,\n onClose,\n onOverlayClick,\n onEscKeyDown,\n offset,\n frame,\n borderRadius = 'none',\n placement = 'right',\n closeOnEsc = true,\n closeOnOverlayClick = true,\n asModal = true,\n ...rest\n },\n outerRef,\n ) => {\n const innerIsOpen = Boolean(isOpen || opened);\n\n const trapRef = useFocusTrap(true, initialFocusRef, focusAfterRef);\n const popupController = usePopupContext();\n\n const innerRef = useForkRef<HTMLDivElement>(trapRef, outerRef);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.drawerOverlayWithBlurColor})`\n : `var(${tokens.drawerOverlayColor})`;\n const innerWidth = width ? getSizeValueFromProp(width) : '100%';\n const innerHeight = height ? getSizeValueFromProp(height) : '100%';\n\n const placementClass = placement ? classes[`${placement}Placement` as keyof typeof classes] : undefined;\n\n const { drawerInfo } = useDrawer({\n id: innerId,\n isOpen: innerIsOpen,\n closeOnEsc,\n onEscKeyDown,\n onClose,\n popupInfo,\n disableScroll: asModal,\n });\n const transparent = useMemo(() => getIdLastDrawer(popupController.items) !== innerId, [\n innerId,\n popupController.items,\n ]);\n\n const onDrawerOverlayKeyDown = (event: React.MouseEvent<HTMLDivElement>) => {\n if (onOverlayClick) {\n onOverlayClick(event);\n return;\n }\n\n if (onClose) {\n onClose();\n }\n };\n\n return (\n <StyledPopup\n id={innerId}\n ref={asModal ? innerRef : outerRef}\n className={cx(placementClass)}\n opened={innerIsOpen}\n zIndex={zIndex}\n placement={placement}\n popupInfo={drawerInfo}\n frame={frame}\n width={innerWidth}\n height={innerHeight}\n offset={offset}\n withAnimation\n overlay={\n asModal && (\n <Root view={view}>\n <Overlay\n className={classes.overlay}\n zIndex={zIndex || DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n transparent={transparent}\n isClickable={closeOnOverlayClick}\n onOverlayClick={onDrawerOverlayKeyDown}\n />\n </Root>\n )\n }\n {...rest}\n >\n <Root\n view={view}\n size={size}\n style={{ width: innerWidth, height: innerHeight }}\n borderRadius={borderRadius}\n >\n <Panel width={innerWidth} height={innerHeight} className={className}>\n {children}\n </Panel>\n </Root>\n </StyledPopup>\n );\n },\n );\n\nexport const drawerConfig = {\n name: 'Drawer',\n tag: 'div',\n layout: drawerRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n borderRadius: {\n css: borderRadiusCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n borderRadius: 'none',\n },\n};\n"],"names":["mergedPanelConfig","mergeConfig","panelConfig","Panel","component","drawerRoot","Root","forwardRef","_ref","outerRef","id","zIndex","popupInfo","withBlur","children","view","size","width","height","isOpen","opened","initialFocusRef","focusAfterRef","className","onClose","onOverlayClick","onEscKeyDown","offset","frame","_ref$borderRadius","borderRadius","_ref$placement","placement","_ref$closeOnEsc","closeOnEsc","_ref$closeOnOverlayCl","closeOnOverlayClick","_ref$asModal","asModal","rest","_objectWithoutProperties","_excluded","innerIsOpen","Boolean","trapRef","useFocusTrap","popupController","usePopupContext","innerRef","useForkRef","uniqId","safeUseId","innerId","overlayBackgroundToken","concat","tokens","drawerOverlayWithBlurColor","drawerOverlayColor","innerWidth","getSizeValueFromProp","innerHeight","placementClass","classes","undefined","_useDrawer","useDrawer","disableScroll","drawerInfo","transparent","useMemo","getIdLastDrawer","items","onDrawerOverlayKeyDown","event","React","createElement","StyledPopup","_extends","ref","cx","withAnimation","overlay","Overlay","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","style","drawerConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","borderRadiusCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoBA;AACA,IAAMA,iBAAiB,gBAAGC,WAAW,CAACC,WAAW,CA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AAK;AACVC,EAAAA,MAAM,EAAErF,UAAU;AAClBsF,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACR7E,IAAAA,IAAI,EAAE;AACF8E,MAAAA,GAAG,EAAEC,IAAAA;KACR;AACD9E,IAAAA,IAAI,EAAE;AACF6E,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDjE,IAAAA,YAAY,EAAE;AACV+D,MAAAA,GAAG,EAAEG,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNlF,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTc,IAAAA,YAAY,EAAE,MAAA;AAClB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\nimport { useFocusTrap, useForkRef, safeUseId } from '@salutejs/plasma-core';\n\nimport { component, mergeConfig } from '../../engines';\nimport type { RootProps } from '../../engines';\nimport { usePopupContext } from '../Popup';\nimport { Overlay } from '../Overlay';\nimport { DEFAULT_Z_INDEX } from '../Popup/utils';\nimport { panelConfig } from '../Panel';\nimport { cx, getSizeValueFromProp } from '../../utils';\n\nimport { classes, tokens } from './Drawer.tokens';\nimport type { DrawerProps } from './Drawer.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as borderRadiusCSS } from './variations/_borderRadius/base';\nimport { StyledPopup } from './Drawer.styles';\nimport { getIdLastDrawer } from './DrawerContext';\nimport { useDrawer } from './hooks';\n\n// issue #823\nconst mergedPanelConfig = mergeConfig(panelConfig);\nconst Panel = component(mergedPanelConfig);\n\nexport const drawerRoot = (Root: RootProps<HTMLDivElement, DrawerProps>) =>\n forwardRef<HTMLDivElement, DrawerProps>(\n (\n {\n id,\n zIndex,\n popupInfo,\n withBlur,\n children,\n view,\n size,\n width,\n height,\n isOpen,\n opened,\n initialFocusRef,\n focusAfterRef,\n className,\n onClose,\n onOverlayClick,\n onEscKeyDown,\n offset,\n frame,\n borderRadius = 'none',\n placement = 'right',\n closeOnEsc = true,\n closeOnOverlayClick = true,\n asModal = true,\n ...rest\n },\n outerRef,\n ) => {\n const innerIsOpen = Boolean(isOpen || opened);\n\n const trapRef = useFocusTrap(true, initialFocusRef, focusAfterRef);\n const popupController = usePopupContext();\n\n const innerRef = useForkRef<HTMLDivElement>(trapRef, outerRef);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.drawerOverlayWithBlurColor})`\n : `var(${tokens.drawerOverlayColor})`;\n const innerWidth = width ? getSizeValueFromProp(width) : '100%';\n const innerHeight = height ? getSizeValueFromProp(height) : '100%';\n\n const placementClass = placement ? classes[`${placement}Placement` as keyof typeof classes] : undefined;\n\n const { drawerInfo } = useDrawer({\n id: innerId,\n isOpen: innerIsOpen,\n closeOnEsc,\n onEscKeyDown,\n onClose,\n popupInfo,\n disableScroll: asModal,\n });\n const transparent = useMemo(() => getIdLastDrawer(popupController.items) !== innerId, [\n innerId,\n popupController.items,\n ]);\n\n const onDrawerOverlayKeyDown = (event: React.MouseEvent<HTMLDivElement>) => {\n if (onOverlayClick) {\n onOverlayClick(event);\n return;\n }\n\n if (onClose) {\n onClose();\n }\n };\n\n return (\n <StyledPopup\n id={innerId}\n ref={asModal ? innerRef : outerRef}\n className={cx(placementClass)}\n opened={innerIsOpen}\n zIndex={zIndex}\n placement={placement}\n popupInfo={drawerInfo}\n frame={frame}\n width={innerWidth}\n height={innerHeight}\n offset={offset}\n withAnimation\n overlay={\n asModal && (\n <Root view={view}>\n <Overlay\n className={classes.overlay}\n zIndex={zIndex || DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n transparent={transparent}\n isClickable={closeOnOverlayClick}\n onOverlayClick={onDrawerOverlayKeyDown}\n />\n </Root>\n )\n }\n {...rest}\n >\n <Root\n view={view}\n size={size}\n style={{ width: innerWidth, height: innerHeight }}\n borderRadius={borderRadius}\n >\n <Panel width={innerWidth} height={innerHeight} className={className}>\n {children}\n </Panel>\n </Root>\n </StyledPopup>\n );\n },\n );\n\nexport const drawerConfig = {\n name: 'Drawer',\n tag: 'div',\n layout: drawerRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n borderRadius: {\n css: borderRadiusCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n borderRadius: 'none',\n },\n};\n"],"names":["mergedPanelConfig","mergeConfig","panelConfig","Panel","component","drawerRoot","Root","forwardRef","_ref","outerRef","id","zIndex","popupInfo","withBlur","children","view","size","width","height","isOpen","opened","initialFocusRef","focusAfterRef","className","onClose","onOverlayClick","onEscKeyDown","offset","frame","_ref$borderRadius","borderRadius","_ref$placement","placement","_ref$closeOnEsc","closeOnEsc","_ref$closeOnOverlayCl","closeOnOverlayClick","_ref$asModal","asModal","rest","_objectWithoutProperties","_excluded","innerIsOpen","Boolean","trapRef","useFocusTrap","popupController","usePopupContext","innerRef","useForkRef","uniqId","safeUseId","innerId","overlayBackgroundToken","concat","tokens","drawerOverlayWithBlurColor","drawerOverlayColor","innerWidth","getSizeValueFromProp","innerHeight","placementClass","classes","undefined","_useDrawer","useDrawer","disableScroll","drawerInfo","transparent","useMemo","getIdLastDrawer","items","onDrawerOverlayKeyDown","event","React","createElement","StyledPopup","_extends","ref","cx","withAnimation","overlay","Overlay","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","style","drawerConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","borderRadiusCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA;AACA,IAAMA,iBAAiB,gBAAGC,WAAW,CAACC,WAAW,CAAC,CAAA;AAClD,IAAMC,KAAK,gBAAGC,SAAS,CAACJ,iBAAiB,CAAC,CAAA;IAE7BK,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C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AE;AACF8E,MAAAA,GAAG,EAAEC,IAAAA;KACR;AACD9E,IAAAA,IAAI,EAAE;AACF6E,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDjE,IAAAA,YAAY,EAAE;AACV+D,MAAAA,GAAG,EAAEG,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNlF,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTc,IAAAA,YAAY,EAAE,MAAA;AAClB,GAAA;AACJ;;;;"}
@@ -1,10 +1,6 @@
1
1
  import './Drawer.styles_14ek4ft.css';
2
2
  import { styled } from '@linaria/react';
3
- import '@linaria/core';
4
3
  import { component } from '../../engines/common.js';
5
- import 'react';
6
- import '../../utils/react.js';
7
- import 'react-dom';
8
4
  import { popupConfig } from '../Popup/Popup.js';
9
5
 
10
6
  var Popup = /*#__PURE__*/component(popupConfig);
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.styles.js","sources":["../../../src/components/Drawer/Drawer.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component } from '../../engines';\nimport { popupClasses, popupConfig } from '../Popup';\n\nimport type { DrawerPlacement } from './Drawer.types';\nimport { classes } from './Drawer.tokens';\n\nconst Popup = component(popupConfig);\n\nconst animationVariants = {\n right: {\n show: {\n start: 'translate(100%, -50%)',\n end: 'translate(0, -50%)',\n },\n hide: {\n start: 'translate(0, -50%)',\n end: 'translate(100%, -50%)',\n },\n },\n bottom: {\n show: {\n start: 'translate(-50%, 100%)',\n end: 'translate(-50%, 0)',\n },\n hide: {\n start: 'translate(-50%, 0)',\n end: 'translate(-50%, 100%)',\n },\n },\n left: {\n show: {\n start: 'translate(-100%, -50%)',\n end: 'translate(0, -50%)',\n },\n hide: {\n start: 'translate(0, -50%)',\n end: 'translate(-100%, -50%)',\n },\n },\n top: {\n show: {\n start: 'translate(-50%, -100%)',\n end: 'translate(-50%, 0)',\n },\n hide: {\n start: 'translate(-50%, 0)',\n end: 'translate(-50%, -100%)',\n },\n },\n};\n\nconst templateAnimationStyle = (placement: DrawerPlacement) => `\n &.${classes[`${placement}Placement` as keyof typeof classes]} {\n && .${popupClasses.root} {\n animation: ${placement}ShowAnimation 0.2s forwards;\n }\n\n &&.${popupClasses.endAnimation} .${popupClasses.root} {\n animation: ${placement}HideAnimation 0.2s forwards;\n }\n\n @keyframes ${placement}ShowAnimation {\n 0% {\n transform: ${animationVariants[placement].show.start};\n opacity: 0;\n }\n\n 100% {\n transform: ${animationVariants[placement].show.end};\n opacity: 1;\n }\n }\n\n @keyframes ${placement}HideAnimation {\n 0% {\n transform: ${animationVariants[placement].hide.start};\n opacity: 1;\n }\n\n 100% {\n transform: ${animationVariants[placement].hide.end};\n opacity: 0;\n }\n }\n }\n `;\n\nconst getAnimationStyles = () => {\n return Object.keys(animationVariants).reduce((acc, placement) => {\n acc += templateAnimationStyle(placement as DrawerPlacement);\n return acc;\n }, '');\n};\n\nexport const StyledPopup = styled(Popup)<{\n placement: DrawerPlacement;\n width?: number | string;\n height?: number | string;\n}>`\n &&.${classes.overlay} {\n animation: fadeIn 0.2s forwards;\n }\n\n &&.${popupClasses.endAnimation} .${classes.overlay} {\n animation: fadeOut 0.2s forwards;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n\n @keyframes fadeOut {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n }\n }\n\n && .${popupClasses.root}, && .${popupClasses.root} > div {\n width: ${({ width }) => width || 'auto'};\n height: ${({ height }) => height || 'auto'};\n }\n\n ${getAnimationStyles()}\n`;\n"],"names":["Popup","component","popupConfig","_exp","_exp7","_ref","width","_exp8","_ref2","height","StyledPopup","styled","name","class","propsAsIs","vars"],"mappings":";;;;;;;;AAQA,IAAMA,KAAK,gBAAGC,SAAS,CAACC,WAAW,CAAC,CAAA;AAAC,IAAAC,IAAA,GAPnBA,SAOmBA,IAAAA,GAAA;AAAA,EAAA,OAwFHH,KAAK,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAI,KAAA,GA/FrBA,SA+FqBA,KAAAA,GAAA;AAAA,EAAA,OAkCtB,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,KAAAA,GAAAA,IAAAA,CAAAA,KAAAA,CAAAA;IAAAA,OAAYA,KAAK,IAAI,MAAM,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,KAAA,GAjI7BA,SAiI6BA,KAAAA,GAAA;AAAA,EAAA,OAC7B,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,MAAAA,GAAAA,KAAAA,CAAAA,MAAAA,CAAAA;IAAAA,OAAaA,MAAM,IAAI,MAAM,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAnC3C,IAAMC,WAAW,gBAAGC,MAAM,CAAAR,IAAA,EAAA,CAAA,CAAA;AAAAS,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAAC,EAAAA,IAAA,EAAA;AAAA,IAAA,YAAA,EAAA,cAkChBX,KAA8B,EAAA,CAAA;AAAA,IAAA,YAAA,EAAA,cAC7BG,KAAgC,EAAA,CAAA;AAAA,GAAA;AAAA,CAIjD;;;;"}
1
+ {"version":3,"file":"Drawer.styles.js","sources":["../../../src/components/Drawer/Drawer.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component } from '../../engines';\nimport { popupClasses, popupConfig } from '../Popup';\n\nimport type { DrawerPlacement } from './Drawer.types';\nimport { classes } from './Drawer.tokens';\n\nconst Popup = component(popupConfig);\n\nconst animationVariants = {\n right: {\n show: {\n start: 'translate(100%, -50%)',\n end: 'translate(0, -50%)',\n },\n hide: {\n start: 'translate(0, -50%)',\n end: 'translate(100%, -50%)',\n },\n },\n bottom: {\n show: {\n start: 'translate(-50%, 100%)',\n end: 'translate(-50%, 0)',\n },\n hide: {\n start: 'translate(-50%, 0)',\n end: 'translate(-50%, 100%)',\n },\n },\n left: {\n show: {\n start: 'translate(-100%, -50%)',\n end: 'translate(0, -50%)',\n },\n hide: {\n start: 'translate(0, -50%)',\n end: 'translate(-100%, -50%)',\n },\n },\n top: {\n show: {\n start: 'translate(-50%, -100%)',\n end: 'translate(-50%, 0)',\n },\n hide: {\n start: 'translate(-50%, 0)',\n end: 'translate(-50%, -100%)',\n },\n },\n};\n\nconst templateAnimationStyle = (placement: DrawerPlacement) => `\n &.${classes[`${placement}Placement` as keyof typeof classes]} {\n && .${popupClasses.root} {\n animation: ${placement}ShowAnimation 0.2s forwards;\n }\n\n &&.${popupClasses.endAnimation} .${popupClasses.root} {\n animation: ${placement}HideAnimation 0.2s forwards;\n }\n\n @keyframes ${placement}ShowAnimation {\n 0% {\n transform: ${animationVariants[placement].show.start};\n opacity: 0;\n }\n\n 100% {\n transform: ${animationVariants[placement].show.end};\n opacity: 1;\n }\n }\n\n @keyframes ${placement}HideAnimation {\n 0% {\n transform: ${animationVariants[placement].hide.start};\n opacity: 1;\n }\n\n 100% {\n transform: ${animationVariants[placement].hide.end};\n opacity: 0;\n }\n }\n }\n `;\n\nconst getAnimationStyles = () => {\n return Object.keys(animationVariants).reduce((acc, placement) => {\n acc += templateAnimationStyle(placement as DrawerPlacement);\n return acc;\n }, '');\n};\n\nexport const StyledPopup = styled(Popup)<{\n placement: DrawerPlacement;\n width?: number | string;\n height?: number | string;\n}>`\n &&.${classes.overlay} {\n animation: fadeIn 0.2s forwards;\n }\n\n &&.${popupClasses.endAnimation} .${classes.overlay} {\n animation: fadeOut 0.2s forwards;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n\n @keyframes fadeOut {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n }\n }\n\n && .${popupClasses.root}, && .${popupClasses.root} > div {\n width: ${({ width }) => width || 'auto'};\n height: ${({ height }) => height || 'auto'};\n }\n\n ${getAnimationStyles()}\n`;\n"],"names":["Popup","component","popupConfig","_exp","_exp7","_ref","width","_exp8","_ref2","height","StyledPopup","styled","name","class","propsAsIs","vars"],"mappings":";;;;AAQA,IAAMA,KAAK,gBAAGC,SAAS,CAACC,WAAW,CAAC,CAAA;AAAC,IAAAC,IAAA,GAPnBA,SAOmBA,IAAAA,GAAA;AAAA,EAAA,OAwFHH,KAAK,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAI,KAAA,GA/FrBA,SA+FqBA,KAAAA,GAAA;AAAA,EAAA,OAkCtB,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,KAAAA,GAAAA,IAAAA,CAAAA,KAAAA,CAAAA;IAAAA,OAAYA,KAAK,IAAI,MAAM,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,KAAA,GAjI7BA,SAiI6BA,KAAAA,GAAA;AAAA,EAAA,OAC7B,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,MAAAA,GAAAA,KAAAA,CAAAA,MAAAA,CAAAA;IAAAA,OAAaA,MAAM,IAAI,MAAM,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAnC3C,IAAMC,WAAW,gBAAGC,MAAM,CAAAR,IAAA,EAAA,CAAA,CAAA;AAAAS,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAAC,EAAAA,IAAA,EAAA;AAAA,IAAA,YAAA,EAAA,cAkChBX,KAA8B,EAAA,CAAA;AAAA,IAAA,YAAA,EAAA,cAC7BG,KAAgC,EAAA,CAAA;AAAA,GAAA;AAAA,CAIjD;;;;"}
@@ -2,11 +2,7 @@ import { objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPlugin
2
2
  import { useRef, useCallback, useEffect } from 'react';
3
3
  import { getIdLastDrawer, hasDrawers } from '../DrawerContext.js';
4
4
  import { usePopupContext } from '../../Popup/PopupContext.js';
5
- import '@salutejs/plasma-core';
6
5
  import { canUseDOM } from '../../../utils/canUseDOM.js';
7
- import '../../../utils/react.js';
8
- import 'react-dom';
9
- import '@linaria/react';
10
6
 
11
7
  var ESCAPE_KEYCODE = 27;
12
8
  var useDrawer = function useDrawer(_ref) {
@@ -1 +1 @@
1
- {"version":3,"file":"useDrawer.js","sources":["../../../../src/components/Drawer/hooks/useDrawer.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from 'react';\n\nimport { DrawerInfo, getIdLastDrawer, hasDrawers } from '../DrawerContext';\nimport { DrawerHookArgs } from '../Drawer.types';\nimport { usePopupContext } from '../../Popup';\nimport { canUseDOM } from '../../../utils';\n\nconst ESCAPE_KEYCODE = 27;\n\nexport const useDrawer = ({\n id,\n isOpen,\n popupInfo,\n onEscKeyDown,\n onClose,\n closeOnEsc = true,\n disableScroll = true,\n}: DrawerHookArgs) => {\n const popupController = usePopupContext();\n const overflow = useRef<string>(canUseDOM ? document.body.style.overflow : 'initial');\n\n // При ESC закрывает текущее окно, если это возможно\n const onKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (!closeOnEsc) {\n return;\n }\n if (event.keyCode === ESCAPE_KEYCODE && getIdLastDrawer(popupController.items) === id) {\n if (onEscKeyDown) {\n onEscKeyDown(event);\n return;\n }\n\n if (onClose) {\n onClose();\n }\n }\n },\n [onClose, onEscKeyDown, popupController.items, closeOnEsc],\n );\n\n useEffect(() => {\n window.addEventListener('keydown', onKeyDown);\n return () => {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, [onKeyDown]);\n\n // linaria не поддерживает динамический global\n useEffect(() => {\n if (!canUseDOM) {\n return;\n }\n\n if (isOpen && disableScroll) {\n overflow.current = document.body.style.overflow;\n\n document.body.style.overflow = 'hidden';\n }\n }, [isOpen, disableScroll]);\n\n useEffect(() => {\n if (!canUseDOM) {\n return;\n }\n\n if (!isOpen && !hasDrawers(popupController.items)) {\n document.body.style.overflow = overflow.current;\n }\n }, [isOpen, popupController.items]);\n\n const drawerInfo: DrawerInfo = {\n id,\n info: {\n isDrawer: true,\n },\n ...popupInfo,\n };\n\n return { drawerInfo };\n};\n"],"names":["ESCAPE_KEYCODE","useDrawer","_ref","id","isOpen","popupInfo","onEscKeyDown","onClose","_ref$closeOnEsc","closeOnEsc","_ref$disableScroll","disableScroll","popupController","usePopupContext","overflow","useRef","canUseDOM","document","body","style","onKeyDown","useCallback","event","keyCode","getIdLastDrawer","items","useEffect","window","addEventListener","removeEventListener","current","hasDrawers","drawerInfo","_objectSpread","info","isDrawer"],"mappings":";;;;;;;;;;AAOA,IAAMA,cAAc,GAAG,EAAE,CAAA;IAEZC,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAQA;AAAA,EAAA,IAPlBC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IACFC,MAAM,GAAAF,IAAA,CAANE,MAAM;IACNC,SAAS,GAAAH,IAAA,CAATG,SAAS;IACTC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IACZC,OAAO,GAAAL,IAAA,CAAPK,OAAO;IAAAC,eAAA,GAAAN,IAAA,CACPO,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,eAAA;IAAAE,kBAAA,GAAAR,IAAA,CACjBS,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,kBAAA,CAAA;AAEpB,EAAA,IAAME,eAAe,GAAGC,eAAe,EAAE,CAAA;AACzC,EAAA,IAAMC,QAAQ,GAAGC,MAAM,CAASC,SAAS,GAAGC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAACL,QAAQ,GAAG,SAAS,CAAC,CAAA;;AAErF;AACA,EAAA,IAAMM,SAAS,GAAGC,WAAW,CACzB,UAACC,KAAoB,EAAK;IACtB,IAAI,CAACb,UAAU,EAAE;AACb,MAAA,OAAA;AACJ,KAAA;AACA,IAAA,IAAIa,KAAK,CAACC,OAAO,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AGA,QAAQ,CAACgB,OAAO,CAAA;AACnD,KAAA;GACH,EAAE,CAAC1B,MAAM,EAAEQ,eAAe,CAACa,KAAK,CAAC,CAAC,CAAA;EAEnC,IAAMO,UAAsB,GAAAC,cAAA,CAAA;AACxB9B,IAAAA,EAAE,EAAFA,EAAE;AACF+B,IAAAA,IAAI,EAAE;AACFC,MAAAA,QAAQ,EAAE,IAAA;AACd,KAAA;AAAC,GAAA,EACE9B,SAAS,CACf,CAAA;EAED,OAAO;AAAE2B,IAAAA,UAAU,EAAVA,UAAAA;GAAY,CAAA;AACzB;;;;"}
1
+ {"version":3,"file":"useDrawer.js","sources":["../../../../src/components/Drawer/hooks/useDrawer.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from 'react';\n\nimport { DrawerInfo, getIdLastDrawer, hasDrawers } from '../DrawerContext';\nimport { DrawerHookArgs } from '../Drawer.types';\nimport { usePopupContext } from '../../Popup';\nimport { canUseDOM } from '../../../utils';\n\nconst ESCAPE_KEYCODE = 27;\n\nexport const useDrawer = ({\n id,\n isOpen,\n popupInfo,\n onEscKeyDown,\n onClose,\n closeOnEsc = true,\n disableScroll = true,\n}: DrawerHookArgs) => {\n const popupController = usePopupContext();\n const overflow = useRef<string>(canUseDOM ? document.body.style.overflow : 'initial');\n\n // При ESC закрывает текущее окно, если это возможно\n const onKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (!closeOnEsc) {\n return;\n }\n if (event.keyCode === ESCAPE_KEYCODE && getIdLastDrawer(popupController.items) === id) {\n if (onEscKeyDown) {\n onEscKeyDown(event);\n return;\n }\n\n if (onClose) {\n onClose();\n }\n }\n },\n [onClose, onEscKeyDown, popupController.items, closeOnEsc],\n );\n\n useEffect(() => {\n window.addEventListener('keydown', onKeyDown);\n return () => {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, [onKeyDown]);\n\n // linaria не поддерживает динамический global\n useEffect(() => {\n if (!canUseDOM) {\n return;\n }\n\n if (isOpen && disableScroll) {\n overflow.current = document.body.style.overflow;\n\n document.body.style.overflow = 'hidden';\n }\n }, [isOpen, disableScroll]);\n\n useEffect(() => {\n if (!canUseDOM) {\n return;\n }\n\n if (!isOpen && !hasDrawers(popupController.items)) {\n document.body.style.overflow = overflow.current;\n }\n }, [isOpen, popupController.items]);\n\n const drawerInfo: DrawerInfo = {\n id,\n info: {\n isDrawer: true,\n },\n ...popupInfo,\n };\n\n return { drawerInfo };\n};\n"],"names":["ESCAPE_KEYCODE","useDrawer","_ref","id","isOpen","popupInfo","onEscKeyDown","onClose","_ref$closeOnEsc","closeOnEsc","_ref$disableScroll","disableScroll","popupController","usePopupContext","overflow","useRef","canUseDOM","document","body","style","onKeyDown","useCallback","event","keyCode","getIdLastDrawer","items","useEffect","window","addEventListener","removeEventListener","current","hasDrawers","drawerInfo","_objectSpread","info","isDrawer"],"mappings":";;;;;;AAOA,IAAMA,cAAc,GAAG,EAAE,CAAA;IAEZC,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAQA;AAAA,EAAA,IAPlBC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IACFC,MAAM,GAAAF,IAAA,CAANE,MAAM;IACNC,SAAS,GAAAH,IAAA,CAATG,SAAS;IACTC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IACZC,OAAO,GAAAL,IAAA,CAAPK,OAAO;IAAAC,eAAA,GAAAN,IAAA,CACPO,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,eAAA;IAAAE,kBAAA,GAAAR,IAAA,CACjBS,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,kBAAA,CAAA;AAEpB,EAAA,IAAME,eAAe,GAAGC,eAAe,EAAE,CAAA;AACzC,EAAA,IAAMC,QAAQ,GAAGC,MAAM,CAASC,SAAS,GAAGC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAACL,QAAQ,GAAG,SAAS,C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,EAAE;AACZ,MAAA,OAAA;AACJ,KAAA;IAEA,IAAI,CAACZ,MAAM,IAAI,CAAC2B,UAAU,CAACnB,eAAe,CAACa,KAAK,CAAC,EAAE;MAC/CR,QAAQ,CAACC,IAAI,CAACC,KAAK,CAACL,QAAQ,GAAGA,QAAQ,CAACgB,OAAO,CAAA;AACnD,KAAA;GACH,EAAE,CAAC1B,MAAM,EAAEQ,eAAe,CAACa,KAAK,CAAC,CAAC,CAAA;EAEnC,IAAMO,UAAsB,GAAAC,cAAA,CAAA;AACxB9B,IAAAA,EAAE,EAAFA,EAAE;AACF+B,IAAAA,IAAI,EAAE;AACFC,MAAAA,QAAQ,EAAE,IAAA;AACd,KAAA;AAAC,GAAA,EACE9B,SAAS,CACf,CAAA;EAED,OAAO;AAAE2B,IAAAA,UAAU,EAAVA,UAAAA;GAAY,CAAA;AACzB;;;;"}
@@ -1,12 +1,5 @@
1
1
  import { objectSpread2 as _objectSpread2 } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
2
- import 'react';
3
- import '../../../../utils/react.js';
4
- import '@linaria/react';
5
2
  import { panelContentRoot, panelContentConfig } from '../../../Panel/ui/PanelContent/PanelContent.js';
6
- import '@linaria/core';
7
- import 'focus-visible';
8
- import 'styled-components';
9
- import '@salutejs/plasma-core';
10
3
 
11
4
  var drawerContentRoot = panelContentRoot;
12
5
  var drawerContentConfig = /*#__PURE__*/_objectSpread2( /*#__PURE__*/_objectSpread2({}, panelContentConfig), {}, {
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerContent.js","sources":["../../../../../src/components/Drawer/ui/DrawerContent/DrawerContent.tsx"],"sourcesContent":["import { panelContentConfig, panelContentRoot } from '../../../Panel';\n\nexport const drawerContentRoot = panelContentRoot;\n\nexport const drawerContentConfig = {\n ...panelContentConfig,\n name: 'DrawerContent',\n layout: drawerContentRoot,\n};\n"],"names":["drawerContentRoot","panelContentRoot","drawerContentConfig","_objectSpread","panelContentConfig","name","layout"],"mappings":";;;;;;;;;;AAEO,IAAMA,iBAAiB,GAAGC,iBAAgB;IAEpCC,mBAAmB,gBAAAC,cAAA,eAAAA,cAAA,KACzBC,kBAAkB,CAAA,EAAA,EAAA,EAAA;AACrBC,EAAAA,IAAI,EAAE,eAAe;AACrBC,EAAAA,MAAM,EAAEN,iBAAAA;AAAiB,CAC5B;;;;"}
1
+ {"version":3,"file":"DrawerContent.js","sources":["../../../../../src/components/Drawer/ui/DrawerContent/DrawerContent.tsx"],"sourcesContent":["import { panelContentConfig, panelContentRoot } from '../../../Panel';\n\nexport const drawerContentRoot = panelContentRoot;\n\nexport const drawerContentConfig = {\n ...panelContentConfig,\n name: 'DrawerContent',\n layout: drawerContentRoot,\n};\n"],"names":["drawerContentRoot","panelContentRoot","drawerContentConfig","_objectSpread","panelContentConfig","name","layout"],"mappings":";;;AAEO,IAAMA,iBAAiB,GAAGC,iBAAgB;IAEpCC,mBAAmB,gBAAAC,cAAA,eAAAA,cAAA,KACzBC,kBAAkB,CAAA,EAAA,EAAA,EAAA;AACrBC,EAAAA,IAAI,EAAE,eAAe;AACrBC,EAAAA,MAAM,EAAEN,iBAAAA;AAAiB,CAC5B;;;;"}
@@ -1,12 +1,5 @@
1
1
  import { objectSpread2 as _objectSpread2 } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
2
- import 'react';
3
- import '../../../../utils/react.js';
4
- import '@linaria/react';
5
2
  import { panelFooterRoot, panelFooterConfig } from '../../../Panel/ui/PanelFooter/PanelFooter.js';
6
- import '@linaria/core';
7
- import 'focus-visible';
8
- import 'styled-components';
9
- import '@salutejs/plasma-core';
10
3
 
11
4
  var drawerFooterRoot = panelFooterRoot;
12
5
  var drawerFooterConfig = /*#__PURE__*/_objectSpread2( /*#__PURE__*/_objectSpread2({}, panelFooterConfig), {}, {
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerFooter.js","sources":["../../../../../src/components/Drawer/ui/DrawerFooter/DrawerFooter.tsx"],"sourcesContent":["import { panelFooterConfig, panelFooterRoot } from '../../../Panel';\n\nexport const drawerFooterRoot = panelFooterRoot;\n\nexport const drawerFooterConfig = {\n ...panelFooterConfig,\n name: 'DrawerFooter',\n layout: drawerFooterRoot,\n};\n"],"names":["drawerFooterRoot","panelFooterRoot","drawerFooterConfig","_objectSpread","panelFooterConfig","name","layout"],"mappings":";;;;;;;;;;AAEO,IAAMA,gBAAgB,GAAGC,gBAAe;IAElCC,kBAAkB,gBAAAC,cAAA,eAAAA,cAAA,KACxBC,iBAAiB,CAAA,EAAA,EAAA,EAAA;AACpBC,EAAAA,IAAI,EAAE,cAAc;AACpBC,EAAAA,MAAM,EAAEN,gBAAAA;AAAgB,CAC3B;;;;"}
1
+ {"version":3,"file":"DrawerFooter.js","sources":["../../../../../src/components/Drawer/ui/DrawerFooter/DrawerFooter.tsx"],"sourcesContent":["import { panelFooterConfig, panelFooterRoot } from '../../../Panel';\n\nexport const drawerFooterRoot = panelFooterRoot;\n\nexport const drawerFooterConfig = {\n ...panelFooterConfig,\n name: 'DrawerFooter',\n layout: drawerFooterRoot,\n};\n"],"names":["drawerFooterRoot","panelFooterRoot","drawerFooterConfig","_objectSpread","panelFooterConfig","name","layout"],"mappings":";;;AAEO,IAAMA,gBAAgB,GAAGC,gBAAe;IAElCC,kBAAkB,gBAAAC,cAAA,eAAAA,cAAA,KACxBC,iBAAiB,CAAA,EAAA,EAAA,EAAA;AACpBC,EAAAA,IAAI,EAAE,cAAc;AACpBC,EAAAA,MAAM,EAAEN,gBAAAA;AAAgB,CAC3B;;;;"}
@@ -1,7 +1,4 @@
1
1
  import { objectSpread2 as _objectSpread2 } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
2
- import 'react';
3
- import '../../../../utils/react.js';
4
- import '@linaria/react';
5
2
  import { panelHeaderRoot, panelHeaderConfig } from '../../../Panel/ui/PanelHeader/PanelHeader.js';
6
3
 
7
4
  var drawerHeaderRoot = panelHeaderRoot;
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerHeader.js","sources":["../../../../../src/components/Drawer/ui/DrawerHeader/DrawerHeader.tsx"],"sourcesContent":["import { panelHeaderConfig, panelHeaderRoot } from '../../../Panel';\n\nexport const drawerHeaderRoot = panelHeaderRoot;\n\nexport const drawerHeaderConfig = {\n ...panelHeaderConfig,\n name: 'DrawerHeader',\n layout: drawerHeaderRoot,\n};\n"],"names":["drawerHeaderRoot","panelHeaderRoot","drawerHeaderConfig","_objectSpread","panelHeaderConfig","name","layout"],"mappings":";;;;;;AAEO,IAAMA,gBAAgB,GAAGC,gBAAe;IAElCC,kBAAkB,gBAAAC,cAAA,eAAAA,cAAA,KACxBC,iBAAiB,CAAA,EAAA,EAAA,EAAA;AACpBC,EAAAA,IAAI,EAAE,cAAc;AACpBC,EAAAA,MAAM,EAAEN,gBAAAA;AAAgB,CAC3B;;;;"}
1
+ {"version":3,"file":"DrawerHeader.js","sources":["../../../../../src/components/Drawer/ui/DrawerHeader/DrawerHeader.tsx"],"sourcesContent":["import { panelHeaderConfig, panelHeaderRoot } from '../../../Panel';\n\nexport const drawerHeaderRoot = panelHeaderRoot;\n\nexport const drawerHeaderConfig = {\n ...panelHeaderConfig,\n name: 'DrawerHeader',\n layout: drawerHeaderRoot,\n};\n"],"names":["drawerHeaderRoot","panelHeaderRoot","drawerHeaderConfig","_objectSpread","panelHeaderConfig","name","layout"],"mappings":";;;AAEO,IAAMA,gBAAgB,GAAGC,gBAAe;IAElCC,kBAAkB,gBAAAC,cAAA,eAAAA,cAAA,KACxBC,iBAAiB,CAAA,EAAA,EAAA,EAAA;AACpBC,EAAAA,IAAI,EAAE,cAAc;AACpBC,EAAAA,MAAM,EAAEN,gBAAAA;AAAgB,CAC3B;;;;"}
@@ -44,5 +44,5 @@
44
44
  .Dropdown_styles_3w3l45_s1rwu6ky__59648b20 .Dropdown_styles_3w3l45_popoverTarget__59648b20{display:block;}
45
45
  .Dropdown_styles_3w3l45_s10jhp3l__59648b20{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
46
46
 
47
- .Dropdown_styles_18f0qpm_un7uamp__64c00440{box-sizing:border-box;width:var(--un7uamp-0);height:var(--un7uamp-1);margin:var(--un7uamp-2);padding:var(--plasma-dropdown-padding) 0;overflow:var(--un7uamp-3);background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04);border-radius:var(--plasma-dropdown-border-radius);}
47
+ .Dropdown_styles_1ix6io8_un7uamp__de6f45f2{box-sizing:border-box;width:var(--un7uamp-0);height:var(--un7uamp-1);margin:var(--un7uamp-2);padding:var(--plasma-dropdown-padding) 0;overflow:var(--un7uamp-3);background:var(--surface-solid-card-brightness);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04);border-radius:var(--plasma-dropdown-border-radius);}
48
48
 
@@ -2,27 +2,21 @@ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _
2
2
  import React, { createContext, forwardRef, useReducer, useRef } from 'react';
3
3
  import { safeUseId } from '@salutejs/plasma-core';
4
4
  import { cx } from '../../utils/index.js';
5
- import { useOutsideClick } from '../../hooks/useOutsideClick.js';
6
5
  import { pathReducer } from './reducers/pathReducer.js';
7
6
  import { focusedPathReducer } from './reducers/focusedPathReducer.js';
8
- import '@linaria/react';
9
- import { classes } from './Dropdown.tokens.js';
10
7
  import { base as base$1 } from './variations/_view/base.js';
11
8
  import { base as base$2 } from './variations/_size/base.js';
12
9
  import { Ul, base } from './Dropdown.styles.js';
13
10
  import { childrenWithProps } from './utils/index.js';
11
+ import { classes } from './Dropdown.tokens.js';
14
12
  import { useKeyNavigation } from './hooks/useKeyboardNavigation.js';
15
13
  import { useHashMaps } from './hooks/useHashMaps.js';
16
14
  import { FloatingPopover } from './FloatingPopover.js';
17
- import '@linaria/core';
18
- import 'focus-visible';
19
- import { DropdownInner } from './ui/DropdownInner/DropdownInner.js';
20
- import 'styled-components';
21
- import 'react-popper';
22
- import 'react-dom';
23
15
  import { getItemByFocused } from './utils/getItemByFocused.js';
16
+ import { useOutsideClick } from '../../hooks/useOutsideClick.js';
24
17
  import { getPlacement } from './utils/getPlacement.js';
25
18
  import { getItemId } from './utils/getItemId.js';
19
+ import { DropdownInner } from './ui/DropdownInner/DropdownInner.js';
26
20
 
27
21
  var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "portal"];
28
22
  var Context = /*#__PURE__*/createContext({});
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { createContext, forwardRef, useReducer, useRef } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { pathReducer } from './reducers/pathReducer';\nimport { focusedPathReducer } from './reducers/focusedPathReducer';\nimport { DropdownInner } from './ui';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { Ul, base } from './Dropdown.styles';\nimport { childrenWithProps, getItemByFocused, getItemId, getPlacement } from './utils';\nimport type { DropdownProps, HandleGlobalToggleType, ItemContext } from './Dropdown.types';\nimport { classes } from './Dropdown.tokens';\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport { useHashMaps } from './hooks/useHashMaps';\nimport { FloatingPopover } from './FloatingPopover';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Выпадающий список.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps, 'items'>>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n items,\n children,\n placement,\n offset,\n closeOnOverlayClick = true,\n onToggle,\n size,\n view,\n itemRole = 'treeitem',\n className,\n listWidth,\n listHeight,\n listOverflow,\n closeOnSelect = true,\n onHover,\n onItemSelect,\n onItemClick,\n trigger = 'click',\n variant = 'normal',\n hasArrow = true,\n portal,\n ...rest\n },\n ref,\n ) => {\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n\n const [pathMap, focusedToValueMap] = useHashMaps(items);\n\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';\n\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n\n const treeId = safeUseId();\n\n // Логика работы при клике за пределами выпадающего списка\n const targetRef = useOutsideClick<HTMLUListElement>((event) => {\n if (!isCurrentListOpen || !closeOnOverlayClick) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n\n if (onToggle) {\n onToggle(false, event);\n }\n }, floatingPopoverRef);\n\n const handleGlobalToggle: HandleGlobalToggleType = (opened, event) => {\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n\n if (onToggle) {\n onToggle(opened, event);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleGlobalToggle,\n closeOnSelect,\n onItemSelect,\n onItemClick,\n });\n\n const isCurrentListOpen = Boolean(path[0]);\n\n return (\n <Context.Provider\n value={{\n focusedPath,\n size,\n variant,\n itemRole,\n handleGlobalToggle,\n closeOnSelect,\n onHover,\n onItemClick,\n onItemSelect,\n hasArrow,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={handleGlobalToggle}\n placement={getPlacement(placement)}\n offset={offset}\n portal={portal}\n trigger={trigger}\n target={childrenWithProps(children, {\n role: 'combobox',\n 'aria-controls': `${treeId}_tree_level_1`,\n 'aria-expanded': isCurrentListOpen,\n 'aria-activedescendant': activeDescendantItemValue\n ? getItemId(treeId, activeDescendantItemValue.toString())\n : '',\n onKeyDown,\n })}\n >\n <Root\n className={cx(className, classes.dropdownRoot)}\n ref={ref}\n view={view}\n size={size}\n style={{ display: 'inline-block' }}\n {...rest}\n >\n <Ul\n ref={targetRef}\n id={`${treeId}_tree_level_1`}\n role=\"tree\"\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n >\n {items.map((item, index) => (\n <DropdownInner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n trigger={trigger}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["Context","createContext","dropdownRoot","Root","forwardRef","_ref","ref","_getItemByFocused","items","children","placement","offset","_ref$closeOnOverlayCl","closeOnOverlayClick","onToggle","size","view","_ref$itemRole","itemRole","className","listWidth","listHeight","listOverflow","_ref$closeOnSelect","closeOnSelect","onHover","onItemSelect","onItemClick","_ref$trigger","trigger","_ref$variant","variant","_ref$hasArrow","hasArrow","portal","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","pathReducer","_useReducer2","_slicedToArray","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useHashMaps","useHashMaps","_useHashMaps2","pathMap","focusedToValueMap","activeDescendantItemValue","getItemByFocused","value","floatingPopoverRef","useRef","treeId","safeUseId","targetRef","useOutsideClick","event","isCurrentListOpen","type","handleGlobalToggle","opened","_useKeyNavigation","useKeyNavigation","onKeyDown","Boolean","React","createElement","Provider","FloatingPopover","getPlacement","target","childrenWithProps","role","concat","getItemId","toString","_extends","cx","classes","style","display","Ul","id","map","item","index","DropdownInner","key","currentLevel","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;IAoBaA,OAAO,gBAAGC,aAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA6D,EAAA;AAAA,EAAA,oBACtFC,UAAU,CACN,UAAAC,IAAA,EAyBIC,GAAG,EACF;AAAA,IAAA,IAAAC,iBAAA,CAAA;AAAA,IAAA,IAxBGC,KAAK,GAAAH,IAAA,CAALG,KAAK;MACLC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,SAAS,GAAAL,IAAA,CAATK,SAAS;MACTC,MAAM,GAAAN,IAAA,CAANM,MAAM;MAAAC,qBAAA,GAAAP,IAAA,CACNQ,mBAAmB;AAAnBA,MAAAA,mBAAmB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,qBAAA;MAC1BE,QAAQ,GAAAT,IAAA,CAARS,QAAQ;MACRC,IAAI,GAAAV,IAAA,CAAJU,IAAI;MACJC,IAAI,GAAAX,IAAA,CAAJW,IAAI;MAAAC,aAAA,GAAAZ,IAAA,CACJa,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,aAAA;MACrBE,SAAS,GAAAd,IAAA,CAATc,SAAS;MACTC,SAAS,GAAAf,IAAA,CAATe,SAAS;MACTC,UAAU,GAAAhB,IAAA,CAAVgB,UAAU;MACVC,YAAY,GAAAjB,IAAA,CAAZiB,YAAY;MAAAC,kBAAA,GAAAlB,IAAA,CACZmB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;;;;"}
1
+ {"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { createContext, forwardRef, useReducer, useRef } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { pathReducer } from './reducers/pathReducer';\nimport { focusedPathReducer } from './reducers/focusedPathReducer';\nimport { DropdownInner } from './ui';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { Ul, base } from './Dropdown.styles';\nimport { childrenWithProps, getItemByFocused, getItemId, getPlacement } from './utils';\nimport type { DropdownProps, HandleGlobalToggleType, ItemContext } from './Dropdown.types';\nimport { classes } from './Dropdown.tokens';\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport { useHashMaps } from './hooks/useHashMaps';\nimport { FloatingPopover } from './FloatingPopover';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Выпадающий список.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps, 'items'>>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n items,\n children,\n placement,\n offset,\n closeOnOverlayClick = true,\n onToggle,\n size,\n view,\n itemRole = 'treeitem',\n className,\n listWidth,\n listHeight,\n listOverflow,\n closeOnSelect = true,\n onHover,\n onItemSelect,\n onItemClick,\n trigger = 'click',\n variant = 'normal',\n hasArrow = true,\n portal,\n ...rest\n },\n ref,\n ) => {\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n\n const [pathMap, focusedToValueMap] = useHashMaps(items);\n\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';\n\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n\n const treeId = safeUseId();\n\n // Логика работы при клике за пределами выпадающего списка\n const targetRef = useOutsideClick<HTMLUListElement>((event) => {\n if (!isCurrentListOpen || !closeOnOverlayClick) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n\n if (onToggle) {\n onToggle(false, event);\n }\n }, floatingPopoverRef);\n\n const handleGlobalToggle: HandleGlobalToggleType = (opened, event) => {\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n\n if (onToggle) {\n onToggle(opened, event);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleGlobalToggle,\n closeOnSelect,\n onItemSelect,\n onItemClick,\n });\n\n const isCurrentListOpen = Boolean(path[0]);\n\n return (\n <Context.Provider\n value={{\n focusedPath,\n size,\n variant,\n itemRole,\n handleGlobalToggle,\n closeOnSelect,\n onHover,\n onItemClick,\n onItemSelect,\n hasArrow,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={handleGlobalToggle}\n placement={getPlacement(placement)}\n offset={offset}\n portal={portal}\n trigger={trigger}\n target={childrenWithProps(children, {\n role: 'combobox',\n 'aria-controls': `${treeId}_tree_level_1`,\n 'aria-expanded': isCurrentListOpen,\n 'aria-activedescendant': activeDescendantItemValue\n ? getItemId(treeId, activeDescendantItemValue.toString())\n : '',\n onKeyDown,\n })}\n >\n <Root\n className={cx(className, classes.dropdownRoot)}\n ref={ref}\n view={view}\n size={size}\n style={{ display: 'inline-block' }}\n {...rest}\n >\n <Ul\n ref={targetRef}\n id={`${treeId}_tree_level_1`}\n role=\"tree\"\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n >\n {items.map((item, index) => (\n <DropdownInner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n trigger={trigger}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["Context","createContext","dropdownRoot","Root","forwardRef","_ref","ref","_getItemByFocused","items","children","placement","offset","_ref$closeOnOverlayCl","closeOnOverlayClick","onToggle","size","view","_ref$itemRole","itemRole","className","listWidth","listHeight","listOverflow","_ref$closeOnSelect","closeOnSelect","onHover","onItemSelect","onItemClick","_ref$trigger","trigger","_ref$variant","variant","_ref$hasArrow","hasArrow","portal","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","pathReducer","_useReducer2","_slicedToArray","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useHashMaps","useHashMaps","_useHashMaps2","pathMap","focusedToValueMap","activeDescendantItemValue","getItemByFocused","value","floatingPopoverRef","useRef","treeId","safeUseId","targetRef","useOutsideClick","event","isCurrentListOpen","type","handleGlobalToggle","opened","_useKeyNavigation","useKeyNavigation","onKeyDown","Boolean","React","createElement","Provider","FloatingPopover","getPlacement","target","childrenWithProps","role","concat","getItemId","toString","_extends","cx","classes","style","display","Ul","id","map","item","index","DropdownInner","key","currentLevel","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;IAoBaA,OAAO,gBAAGC,aAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA6D,EAAA;AAAA,EAAA,oBACtFC,UAAU,CACN,UAAAC,IAAA,EAyBIC,GAAG,EACF;AAAA,IAAA,IAAAC,iBAAA,CAAA;AAAA,IAAA,IAxBGC,KAAK,G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YAAY,EAAEA,YAAa;AAC3BiD,QAAAA,KAAK,EAAEA,KAAM;AACbxE,QAAAA,UAAU,EAAEA,UAAW;AACvBC,QAAAA,YAAY,EAAEA,YAAa;AAC3BF,QAAAA,SAAS,EAAEA,SAAAA;AAAU,OACxB,CAAC,CAAA;AAAA,KACL,CACD,CACF,CACO,CACH,CAAC,CAAA;AAE3B,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM6E,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElG,YAAY;AACpBmG,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACRtF,IAAAA,IAAI,EAAE;AACFuF,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDzF,IAAAA,IAAI,EAAE;AACFwF,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN1F,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
@@ -1,4 +1,4 @@
1
- import './Dropdown.styles_18f0qpm.css';
1
+ import './Dropdown.styles_1ix6io8.css';
2
2
  import { styled } from '@linaria/react';
3
3
  import { getCorrectHeight } from './utils/index.js';
4
4
  import { tokens } from './Dropdown.tokens.js';
@@ -1,2 +1,2 @@
1
- .un7uamp{box-sizing:border-box;width:var(--un7uamp-0);height:var(--un7uamp-1);margin:var(--un7uamp-2);padding:var(--plasma-dropdown-padding) 0;overflow:var(--un7uamp-3);background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04);border-radius:var(--plasma-dropdown-border-radius);}
1
+ .un7uamp{box-sizing:border-box;width:var(--un7uamp-0);height:var(--un7uamp-1);margin:var(--un7uamp-2);padding:var(--plasma-dropdown-padding) 0;overflow:var(--un7uamp-3);background:var(--surface-solid-card-brightness);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04);border-radius:var(--plasma-dropdown-border-radius);}
2
2
 
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.tokens.js","sources":["../../../src/components/Dropdown/Dropdown.tokens.ts"],"sourcesContent":["export const classes = {\n dropdownRoot: 'dropdown-root',\n dropdownItemIsFocused: 'dropdown-item-is-focused',\n dropdownItemIsDisabled: 'dropdown-item-is-disabled',\n dropdownItemIsActive: 'dropdown-item-is-active',\n dropdownItemIsSelected: 'dropdown-item-is-selected',\n};\n\nexport const tokens = {\n background: '--plasma-dropdown-background',\n boxShadow: '--plasma-dropdown-box-shadow',\n width: '--plasma-dropdown-width',\n borderRadius: '--plasma-dropdown-border-radius',\n padding: '--plasma-dropdown-padding',\n disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',\n disabledOpacity: '--plasma-dropdown-disabled-opacity',\n focusColor: '--plasma-dropdown-focus-color', // Old\n\n dividerColor: '--plasma-dropdown-divider-color',\n dividerMarginTop: '--plasma-dropdown-divider-margin-top',\n dividerMarginTopTight: '--plasma-dropdown-divider-margin-top-tight',\n dividerMarginRight: '--plasma-dropdown-divider-margin-right',\n dividerMarginBottom: '--plasma-dropdown-divider-margin-bottom',\n dividerMarginBottomTight: '--plasma-dropdown-divider-margin-bottom-tight',\n dividerMarginLeft: '--plasma-dropdown-divider-margin-left',\n\n itemBackground: '--plasma-dropdown-item-background',\n itemBackgroundHover: '--plasma-dropdown-item-background-hover',\n itemBackgroundSelected: '--plasma-dropdown-item-background-selected', // Old\n itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover', // Old\n itemColor: '--plasma-dropdown-item-color', // Old\n itemColorSelected: '--plasma-dropdown-item-color-selected', // Old\n itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover', // Old\n itemBorderRadius: '--plasma-dropdown-item-border-radius',\n itemWidth: '--plasma-dropdown-item-width', // Old\n itemHeight: '--plasma-dropdown-item-height', // Old\n itemMarginTop: '--plasma-dropdown-item-margin-top', // Old\n itemMarginRight: '--plasma-dropdown-item-margin-right', // Old\n itemMarginBottom: '--plasma-dropdown-item-margin-bottom', // Old\n itemMarginLeft: '--plasma-dropdown-item-margin-left', // Old\n itemPaddingTop: '--plasma-dropdown-item-padding-top', // Old\n itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight', // Old\n itemPaddingRight: '--plasma-dropdown-item-padding-right', // Old\n itemPaddingBottom: '--plasma-dropdown-item-padding-bottom', // Old\n itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight', // Old\n itemPaddingLeft: '--plasma-dropdown-item-padding-left', // Old\n itemContentLeftWidth: '--plasma-dropdown-item-content-left-width', // Old\n itemContentLeftColor: '--plasma-dropdown-item-content-left-color', // Old\n itemContentRightWidth: '--plasma-dropdown-item-content-right-width', // Old\n itemContentRightColor: '--plasma-dropdown-item-content-right-color', // Old\n itemFontFamily: '--plasma-dropdown-item-font-family',\n itemFontSize: '--plasma-dropdown-item-font-size',\n itemFontStyle: '--plasma-dropdown-item-font-style',\n itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',\n itemFontLetterSpacing: '--plasma-dropdown-item-line-height',\n itemFontLineHeight: '--plasma-dropdown-item-font-weight',\n itemPadding: '--plasma-dropdown-item-padding',\n itemPaddingTight: '--plasma-dropdown-item-padding-tight',\n\n cellPadding: '--plasma-dropdown-cell-padding',\n cellPaddingLeftContent: '--plasma-dropdown-cell-padding-left-content',\n cellPaddingContent: '--plasma-dropdown-cell-padding-content',\n cellPaddingRightContent: '--plasma-dropdown-cell-padding-right-content',\n cellTextboxGap: '--plasma-dropdown-cell-textbox-gap',\n cellGap: '--plasma-dropdown-cell-gap',\n cellTitleFontFamily: '--plasma-dropdown-cell-title-font-family',\n cellTitleFontSize: '--plasma-dropdown-cell-title-font-size',\n cellTitleFontStyle: '--plasma-dropdown-cell-title-font-style',\n cellTitleFontWeight: '--plasma-dropdown-cell-title-font-weight',\n cellTitleLetterSpacing: '--plasma-dropdown-cell-title-letter-spacing',\n cellTitleLineHeight: '--plasma-dropdown-cell-title-line-height',\n\n // TODO: Remove below tokens as soon as they are no longer needed\n footerBackground: '--plasma-dropdown-footer-background',\n footerWidth: '--plasma-dropdown-footer-width',\n footerHeight: '--plasma-dropdown-footer-height',\n footerPaddingTop: '--plasma-dropdown-footer-padding-top',\n footerPaddingRight: '--plasma-dropdown-footer-padding-right',\n footerPaddingBottom: '--plasma-dropdown-footer-padding-bottom',\n footerPaddingLeft: '--plasma-dropdown-footer-padding-left',\n footerMarginTop: '--plasma-dropdown-footer-margin-top',\n footerMarginRight: '--plasma-dropdown-footer-margin-right',\n footerMarginBottom: '--plasma-dropdown-footer-margin-bottom',\n footerMarginLeft: '--plasma-dropdown-footer-margin-left',\n footerFontFamily: '--plasma-dropdown-footer-font-family',\n footerFontSize: '--plasma-dropdown-footer-font-size',\n footerFontStyle: '--plasma-dropdown-footer-font-style',\n footerFontWeightBold: '--plasma-dropdown-footer-letter-spacing',\n footerFontLetterSpacing: '--plasma-dropdown-footer-line-height',\n footerFontLineHeight: '--plasma-dropdown-footer-font-weight',\n\n headerBackground: '--plasma-dropdown-header-background',\n headerWidth: '--plasma-dropdown-header-width',\n headerHeight: '--plasma-dropdown-header-height',\n headerPaddingTop: '--plasma-dropdown-header-padding-top',\n headerPaddingRight: '--plasma-dropdown-header-padding-right',\n headerPaddingBottom: '--plasma-dropdown-header-padding-bottom',\n headerPaddingLeft: '--plasma-dropdown-header-padding-left',\n headerMarginTop: '--plasma-dropdown-header-margin-top',\n headerMarginRight: '--plasma-dropdown-header-margin-right',\n headerMarginBottom: '--plasma-dropdown-header-margin-bottom',\n headerMarginLeft: '--plasma-dropdown-header-margin-left',\n headerFontFamily: '--plasma-dropdown-header-font-family',\n headerFontSize: '--plasma-dropdown-header-font-size',\n headerFontStyle: '--plasma-dropdown-header-font-style',\n headerFontWeightBold: '--plasma-dropdown-header-letter-spacing',\n headerFontLetterSpacing: '--plasma-dropdown-header-line-height',\n headerFontLineHeight: '--plasma-dropdown-header-font-weight',\n\n dividerWidth: '--plasma-dropdown-divider-width',\n dividerHeight: '--plasma-dropdown-divider-height',\n\n groupBackground: '--plasma-dropdown-group-background',\n groupWidth: '--plasma-dropdown-group-width',\n groupHeight: '--plasma-dropdown-group-height',\n groupPaddingTop: '--plasma-dropdown-group-padding-top',\n groupPaddingRight: '--plasma-dropdown-group-padding-right',\n groupPaddingBottom: '--plasma-dropdown-group-padding-bottom',\n groupPaddingLeft: '--plasma-dropdown-group-padding-left',\n groupMarginTop: '--plasma-dropdown-group-margin-top',\n groupMarginRight: '--plasma-dropdown-group-margin-right',\n groupMarginBottom: '--plasma-dropdown-group-margin-bottom',\n groupMarginLeft: '--plasma-dropdown-group-margin-left',\n groupLabelColor: '--plasma-dropdown-group-label-color',\n groupLabelFontFamily: '--plasma-dropdown-group-label-font-family',\n groupLabelFontSize: '--plasma-dropdown-group-label-font-size',\n groupLabelFontStyle: '--plasma-dropdown-group-label-font-style',\n groupLabelFontWeight: '--plasma-dropdown-group-label-font-weight',\n groupLabelLetterSpacing: '--plasma-dropdown-group-label-letter-spacing',\n groupLabelLineHeight: '--plasma-dropdown-group-label-line-height',\n groupLabelPaddingTop: '--plasma-dropdown-group-label-padding-top',\n groupLabelPaddingRight: '--plasma-dropdown-group-label-padding-right',\n groupLabelPaddingBottom: '--plasma-dropdown-group-label-padding-bottom',\n groupLabelPaddingLeft: '--plasma-dropdown-group-label-padding-left',\n groupLabelMarginTop: '--plasma-dropdown-group-label-margin-top',\n groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',\n groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',\n groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',\n};\n\nexport const constants = {\n focusColor: '--surface-accent',\n background: '--surface-solid-card',\n boxShadow: '0px 4px 14px -4px rgba(8, 8, 8, 0.08), 0px 1px 4px -1px rgba(0, 0, 0, 0.04)',\n disclosureIconColor: '--text-secondary',\n itemBackground: '--plasma-colors-transparent',\n itemBackgroundHover: '--surface-transparent-secondary',\n opacity: '0.4',\n cellTitleColor: '--text-primary',\n cellBackgroundColor: '--plasma-colors-transparent',\n};\n"],"names":["classes","dropdownRoot","dropdownItemIsFocused","dropdownItemIsDisabled","dropdownItemIsActive","dropdownItemIsSelected","tokens","background","boxShadow","width","borderRadius","padding","disclosureIconColor","disabledOpacity","focusColor","dividerColor","dividerMarginTop","dividerMarginTopTight","dividerMarginRight","dividerMarginBottom","dividerMarginBottomTight","dividerMarginLeft","itemBackground","itemBackgroundHover","itemBackgroundSelected","itemBackgroundSelectedHover","itemColor","itemColorSelected","itemColorSelectedHover","itemBorderRadius","itemWidth","itemHeight","itemMarginTop","itemMarginRight","itemMarginBottom","itemMarginLeft","itemPaddingTop","itemPaddingTopTight","itemPaddingRight","itemPaddingBottom","itemPaddingBottomTight","itemPaddingLeft","itemContentLeftWidth","itemContentLeftColor","itemContentRightWidth","itemContentRightColor","itemFontFamily","itemFontSize","itemFontStyle","itemFontWeightBold","itemFontLetterSpacing","itemFontLineHeight","itemPadding","itemPaddingTight","cellPadding","cellPaddingLeftContent","cellPaddingContent","cellPaddingRightContent","cellTextboxGap","cellGap","cellTitleFontFamily","cellTitleFontSize","cellTitleFontStyle","cellTitleFontWeight","cellTitleLetterSpacing","cellTitleLineHeight","footerBackground","footerWidth","footerHeight","footerPaddingTop","footerPaddingRight","footerPaddingBottom","footerPaddingLeft","footerMarginTop","footerMarginRight","footerMarginBottom","footerMarginLeft","footerFontFamily","footerFontSize","footerFontStyle","footerFontWeightBold","footerFontLetterSpacing","footerFontLineHeight","headerBackground","headerWidth","headerHeight","headerPaddingTop","headerPaddingRight","headerPaddingBottom","headerPaddingLeft","headerMarginTop","headerMarginRight","headerMarginBottom","headerMarginLeft","headerFontFamily","headerFontSize","headerFontStyle","headerFontWeightBold","headerFontLetterSpacing","headerFontLineHeight","dividerWidth","dividerHeight","groupBackground","groupWidth","groupHeight","groupPaddingTop","groupPaddingRight","groupPaddingBottom","groupPaddingLeft","groupMarginTop","groupMarginRight","groupMarginBottom","groupMarginLeft","groupLabelColor","groupLabelFontFamily","groupLabelFontSize","groupLabelFontStyle","groupLabelFontWeight","groupLabelLetterSpacing","groupLabelLineHeight","groupLabelPaddingTop","groupLabelPaddingRight","groupLabelPaddingBottom","groupLabelPaddingLeft","groupLabelMarginTop","groupLabelMarginRight","groupLabelMarginBottom","groupLabelMarginLeft"],"mappings":"AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,YAAY,EAAE,eAAe;AAC7BC,EAAAA,qBAAqB,EAAE,0BAA0B;AACjDC,EAAAA,sBAAsB,EAAE,2BAA2B;AACnDC,EAAAA,oBAAoB,EAAE,yBAAyB;AAC/CC,EAAAA,sBAAsB,EAAE,2BAAA;AAC5B,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,8BAA8B;AAC1CC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,KAAK,EAAE,yBAAyB;AAChCC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,OAAO,EAAE,2BAA2B;AACpCC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,eAAe,EAAE,oCAAoC;AACrDC,EAAAA,UAAU,EAAE,+BAA+B;AAAE;;AAE7CC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,kBAAkB,EAAE,wCAAwC;AAC5DC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,wBAAwB,EAAE,+CAA+C;AACzEC,EAAAA,iBAAiB,EAAE,uCAAuC;AAE1DC,EAAAA,cAAc,EAAE,mCAAmC;AACnDC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,sBAAsB,EAAE,4CAA4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AAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,mBAAmB,EAAE,0CAA0C;AAC/DC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,oBAAoB,EAAE,2CAAA;AAC1B;;;;"}
1
+ {"version":3,"file":"Dropdown.tokens.js","sources":["../../../src/components/Dropdown/Dropdown.tokens.ts"],"sourcesContent":["export const classes = {\n dropdownRoot: 'dropdown-root',\n dropdownItemIsFocused: 'dropdown-item-is-focused',\n dropdownItemIsDisabled: 'dropdown-item-is-disabled',\n dropdownItemIsActive: 'dropdown-item-is-active',\n dropdownItemIsSelected: 'dropdown-item-is-selected',\n};\n\nexport const tokens = {\n background: '--plasma-dropdown-background',\n boxShadow: '--plasma-dropdown-box-shadow',\n width: '--plasma-dropdown-width',\n borderRadius: '--plasma-dropdown-border-radius',\n padding: '--plasma-dropdown-padding',\n disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',\n disabledOpacity: '--plasma-dropdown-disabled-opacity',\n focusColor: '--plasma-dropdown-focus-color', // Old\n\n dividerColor: '--plasma-dropdown-divider-color',\n dividerMarginTop: '--plasma-dropdown-divider-margin-top',\n dividerMarginTopTight: '--plasma-dropdown-divider-margin-top-tight',\n dividerMarginRight: '--plasma-dropdown-divider-margin-right',\n dividerMarginBottom: '--plasma-dropdown-divider-margin-bottom',\n dividerMarginBottomTight: '--plasma-dropdown-divider-margin-bottom-tight',\n dividerMarginLeft: '--plasma-dropdown-divider-margin-left',\n\n itemBackground: '--plasma-dropdown-item-background',\n itemBackgroundHover: '--plasma-dropdown-item-background-hover',\n itemBackgroundSelected: '--plasma-dropdown-item-background-selected', // Old\n itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover', // Old\n itemColor: '--plasma-dropdown-item-color', // Old\n itemColorSelected: '--plasma-dropdown-item-color-selected', // Old\n itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover', // Old\n itemBorderRadius: '--plasma-dropdown-item-border-radius',\n itemWidth: '--plasma-dropdown-item-width', // Old\n itemHeight: '--plasma-dropdown-item-height', // Old\n itemMarginTop: '--plasma-dropdown-item-margin-top', // Old\n itemMarginRight: '--plasma-dropdown-item-margin-right', // Old\n itemMarginBottom: '--plasma-dropdown-item-margin-bottom', // Old\n itemMarginLeft: '--plasma-dropdown-item-margin-left', // Old\n itemPaddingTop: '--plasma-dropdown-item-padding-top', // Old\n itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight', // Old\n itemPaddingRight: '--plasma-dropdown-item-padding-right', // Old\n itemPaddingBottom: '--plasma-dropdown-item-padding-bottom', // Old\n itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight', // Old\n itemPaddingLeft: '--plasma-dropdown-item-padding-left', // Old\n itemContentLeftWidth: '--plasma-dropdown-item-content-left-width', // Old\n itemContentLeftColor: '--plasma-dropdown-item-content-left-color', // Old\n itemContentRightWidth: '--plasma-dropdown-item-content-right-width', // Old\n itemContentRightColor: '--plasma-dropdown-item-content-right-color', // Old\n itemFontFamily: '--plasma-dropdown-item-font-family',\n itemFontSize: '--plasma-dropdown-item-font-size',\n itemFontStyle: '--plasma-dropdown-item-font-style',\n itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',\n itemFontLetterSpacing: '--plasma-dropdown-item-line-height',\n itemFontLineHeight: '--plasma-dropdown-item-font-weight',\n itemPadding: '--plasma-dropdown-item-padding',\n itemPaddingTight: '--plasma-dropdown-item-padding-tight',\n\n cellPadding: '--plasma-dropdown-cell-padding',\n cellPaddingLeftContent: '--plasma-dropdown-cell-padding-left-content',\n cellPaddingContent: '--plasma-dropdown-cell-padding-content',\n cellPaddingRightContent: '--plasma-dropdown-cell-padding-right-content',\n cellTextboxGap: '--plasma-dropdown-cell-textbox-gap',\n cellGap: '--plasma-dropdown-cell-gap',\n cellTitleFontFamily: '--plasma-dropdown-cell-title-font-family',\n cellTitleFontSize: '--plasma-dropdown-cell-title-font-size',\n cellTitleFontStyle: '--plasma-dropdown-cell-title-font-style',\n cellTitleFontWeight: '--plasma-dropdown-cell-title-font-weight',\n cellTitleLetterSpacing: '--plasma-dropdown-cell-title-letter-spacing',\n cellTitleLineHeight: '--plasma-dropdown-cell-title-line-height',\n\n // TODO: Remove below tokens as soon as they are no longer needed\n footerBackground: '--plasma-dropdown-footer-background',\n footerWidth: '--plasma-dropdown-footer-width',\n footerHeight: '--plasma-dropdown-footer-height',\n footerPaddingTop: '--plasma-dropdown-footer-padding-top',\n footerPaddingRight: '--plasma-dropdown-footer-padding-right',\n footerPaddingBottom: '--plasma-dropdown-footer-padding-bottom',\n footerPaddingLeft: '--plasma-dropdown-footer-padding-left',\n footerMarginTop: '--plasma-dropdown-footer-margin-top',\n footerMarginRight: '--plasma-dropdown-footer-margin-right',\n footerMarginBottom: '--plasma-dropdown-footer-margin-bottom',\n footerMarginLeft: '--plasma-dropdown-footer-margin-left',\n footerFontFamily: '--plasma-dropdown-footer-font-family',\n footerFontSize: '--plasma-dropdown-footer-font-size',\n footerFontStyle: '--plasma-dropdown-footer-font-style',\n footerFontWeightBold: '--plasma-dropdown-footer-letter-spacing',\n footerFontLetterSpacing: '--plasma-dropdown-footer-line-height',\n footerFontLineHeight: '--plasma-dropdown-footer-font-weight',\n\n headerBackground: '--plasma-dropdown-header-background',\n headerWidth: '--plasma-dropdown-header-width',\n headerHeight: '--plasma-dropdown-header-height',\n headerPaddingTop: '--plasma-dropdown-header-padding-top',\n headerPaddingRight: '--plasma-dropdown-header-padding-right',\n headerPaddingBottom: '--plasma-dropdown-header-padding-bottom',\n headerPaddingLeft: '--plasma-dropdown-header-padding-left',\n headerMarginTop: '--plasma-dropdown-header-margin-top',\n headerMarginRight: '--plasma-dropdown-header-margin-right',\n headerMarginBottom: '--plasma-dropdown-header-margin-bottom',\n headerMarginLeft: '--plasma-dropdown-header-margin-left',\n headerFontFamily: '--plasma-dropdown-header-font-family',\n headerFontSize: '--plasma-dropdown-header-font-size',\n headerFontStyle: '--plasma-dropdown-header-font-style',\n headerFontWeightBold: '--plasma-dropdown-header-letter-spacing',\n headerFontLetterSpacing: '--plasma-dropdown-header-line-height',\n headerFontLineHeight: '--plasma-dropdown-header-font-weight',\n\n dividerWidth: '--plasma-dropdown-divider-width',\n dividerHeight: '--plasma-dropdown-divider-height',\n\n groupBackground: '--plasma-dropdown-group-background',\n groupWidth: '--plasma-dropdown-group-width',\n groupHeight: '--plasma-dropdown-group-height',\n groupPaddingTop: '--plasma-dropdown-group-padding-top',\n groupPaddingRight: '--plasma-dropdown-group-padding-right',\n groupPaddingBottom: '--plasma-dropdown-group-padding-bottom',\n groupPaddingLeft: '--plasma-dropdown-group-padding-left',\n groupMarginTop: '--plasma-dropdown-group-margin-top',\n groupMarginRight: '--plasma-dropdown-group-margin-right',\n groupMarginBottom: '--plasma-dropdown-group-margin-bottom',\n groupMarginLeft: '--plasma-dropdown-group-margin-left',\n groupLabelColor: '--plasma-dropdown-group-label-color',\n groupLabelFontFamily: '--plasma-dropdown-group-label-font-family',\n groupLabelFontSize: '--plasma-dropdown-group-label-font-size',\n groupLabelFontStyle: '--plasma-dropdown-group-label-font-style',\n groupLabelFontWeight: '--plasma-dropdown-group-label-font-weight',\n groupLabelLetterSpacing: '--plasma-dropdown-group-label-letter-spacing',\n groupLabelLineHeight: '--plasma-dropdown-group-label-line-height',\n groupLabelPaddingTop: '--plasma-dropdown-group-label-padding-top',\n groupLabelPaddingRight: '--plasma-dropdown-group-label-padding-right',\n groupLabelPaddingBottom: '--plasma-dropdown-group-label-padding-bottom',\n groupLabelPaddingLeft: '--plasma-dropdown-group-label-padding-left',\n groupLabelMarginTop: '--plasma-dropdown-group-label-margin-top',\n groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',\n groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',\n groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',\n};\n\nexport const constants = {\n focusColor: '--surface-accent',\n background: '--surface-solid-card-brightness',\n boxShadow: '0px 4px 14px -4px rgba(8, 8, 8, 0.08), 0px 1px 4px -1px rgba(0, 0, 0, 0.04)',\n disclosureIconColor: '--text-secondary',\n itemBackground: '--plasma-colors-transparent',\n itemBackgroundHover: '--surface-transparent-secondary',\n opacity: '0.4',\n cellTitleColor: '--text-primary',\n cellBackgroundColor: '--plasma-colors-transparent',\n};\n"],"names":["classes","dropdownRoot","dropdownItemIsFocused","dropdownItemIsDisabled","dropdownItemIsActive","dropdownItemIsSelected","tokens","background","boxShadow","width","borderRadius","padding","disclosureIconColor","disabledOpacity","focusColor","dividerColor","dividerMarginTop","dividerMarginTopTight","dividerMarginRight","dividerMarginBottom","dividerMarginBottomTight","dividerMarginLeft","itemBackground","itemBackgroundHover","itemBackgroundSelected","itemBackgroundSelectedHover","itemColor","itemColorSelected","itemColorSelectedHover","itemBorderRadius","itemWidth","itemHeight","itemMarginTop","itemMarginRight","itemMarginBottom","itemMarginLeft","itemPaddingTop","itemPaddingTopTight","itemPaddingRight","itemPaddingBottom","itemPaddingBottomTight","itemPaddingLeft","itemContentLeftWidth","itemContentLeftColor","itemContentRightWidth","itemContentRightColor","itemFontFamily","itemFontSize","itemFontStyle","itemFontWeightBold","itemFontLetterSpacing","itemFontLineHeight","itemPadding","itemPaddingTight","cellPadding","cellPaddingLeftContent","cellPaddingContent","cellPaddingRightContent","cellTextboxGap","cellGap","cellTitleFontFamily","cellTitleFontSize","cellTitleFontStyle","cellTitleFontWeight","cellTitleLetterSpacing","cellTitleLineHeight","footerBackground","footerWidth","footerHeight","footerPaddingTop","footerPaddingRight","footerPaddingBottom","footerPaddingLeft","footerMarginTop","footerMarginRight","footerMarginBottom","footerMarginLeft","footerFontFamily","footerFontSize","footerFontStyle","footerFontWeightBold","footerFontLetterSpacing","footerFontLineHeight","headerBackground","headerWidth","headerHeight","headerPaddingTop","headerPaddingRight","headerPaddingBottom","headerPaddingLeft","headerMarginTop","headerMarginRight","headerMarginBottom","headerMarginLeft","headerFontFamily","headerFontSize","headerFontStyle","headerFontWeightBold","headerFontLetterSpacing","headerFontLineHeight","dividerWidth","dividerHeight","groupBackground","groupWidth","groupHeight","groupPaddingTop","groupPaddingRight","groupPaddingBottom","groupPaddingLeft","groupMarginTop","groupMarginRight","groupMarginBottom","groupMarginLeft","groupLabelColor","groupLabelFontFamily","groupLabelFontSize","groupLabelFontStyle","groupLabelFontWeight","groupLabelLetterSpacing","groupLabelLineHeight","groupLabelPaddingTop","groupLabelPaddingRight","groupLabelPaddingBottom","groupLabelPaddingLeft","groupLabelMarginTop","groupLabelMarginRight","groupLabelMarginBottom","groupLabelMarginLeft"],"mappings":"AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,YAAY,EAAE,eAAe;AAC7BC,EAAAA,qBAAqB,EAAE,0BAA0B;AACjDC,EAAAA,sBAAsB,EAAE,2BAA2B;AACnDC,EAAAA,oBAAoB,EAAE,yBAAyB;AAC/CC,EAAAA,sBAAsB,EAAE,2BAAA;AAC5B,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,8BAA8B;AAC1CC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,KAAK,EAAE,yBAAyB;AAChCC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,OAAO,EAAE,2BAA2B;AACpCC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,eAAe,EAAE,oCAAoC;AACrDC,EAAAA,UAAU,EAAE,+BAA+B;AAAE;;AAE7CC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,kBAAkB,EAAE,wCAAwC;AAC5DC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,wBAAwB,EAAE,+CAA+C;AACzEC,EAAAA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AAE,2CAA2C;AACjEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,mBAAmB,EAAE,0CAA0C;AAC/DC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,oBAAoB,EAAE,2CAAA;AAC1B;;;;"}
@@ -1,15 +1,8 @@
1
1
  import React from 'react';
2
2
  import { safeUseId } from '@salutejs/plasma-core';
3
- import '@linaria/react';
4
- import { DropdownItem } from '../DropdownItem/DropdownItem.js';
5
3
  import { Ul } from '../../Dropdown.styles.js';
6
4
  import { FloatingPopover } from '../../FloatingPopover.js';
7
- import '../../../../utils/react.js';
8
- import 'focus-visible';
9
- import 'styled-components';
10
- import '@linaria/core';
11
- import 'react-popper';
12
- import 'react-dom';
5
+ import { DropdownItem } from '../DropdownItem/DropdownItem.js';
13
6
 
14
7
  var DropdownInner = function DropdownInner(_ref) {
15
8
  var item = _ref.item,
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownInner.js","sources":["../../../../../src/components/Dropdown/ui/DropdownInner/DropdownInner.tsx"],"sourcesContent":["import React from 'react';\nimport type { FC } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { DropdownItem } from '..';\nimport { Ul } from '../../Dropdown.styles';\nimport { FloatingPopover } from '../../FloatingPopover';\n\nimport { DropdownInnerProps } from './DropdownInner.type';\n\nconst DropdownInner: FC<DropdownInnerProps> = ({\n item,\n currentLevel,\n path,\n dispatchPath,\n index,\n trigger,\n listHeight,\n listOverflow,\n listWidth,\n}) => {\n const handleToggle = (opened: boolean): void => {\n if (opened) {\n dispatchPath({ type: 'changed_on_level', value: item.value.toString(), level: currentLevel + 1 });\n } else {\n dispatchPath({ type: 'cut_by_level', level: currentLevel + 1 });\n }\n };\n\n const isCurrentListOpen = path[currentLevel + 1] === item.value.toString();\n\n const treeId = safeUseId();\n const listId = `${treeId}_tree_level_${currentLevel + 2}`;\n const nextLevel = currentLevel + 1;\n\n if (item?.items) {\n return (\n <FloatingPopover\n placement=\"right-start\"\n opened={isCurrentListOpen}\n onToggle={handleToggle}\n trigger={trigger}\n target={\n <DropdownItem\n item={item}\n index={index}\n path={path}\n currentLevel={currentLevel}\n ariaControls={listId}\n ariaExpanded={isCurrentListOpen}\n ariaLevel={nextLevel}\n ariaLabel={item.label}\n />\n }\n isInner\n >\n <Ul\n id={listId}\n role=\"group\"\n isInnerUl\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n >\n {item.items.map((innerItem, innerIndex) => (\n <DropdownInner\n key={`${innerIndex}/${currentLevel}`}\n item={innerItem}\n currentLevel={nextLevel}\n path={path}\n dispatchPath={dispatchPath}\n index={innerIndex}\n trigger={trigger}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </FloatingPopover>\n );\n }\n\n return <DropdownItem item={item} path={path} index={index} currentLevel={currentLevel} ariaLevel={nextLevel} />;\n};\n\nexport { DropdownInner };\n"],"names":["DropdownInner","_ref","item","currentLevel","path","dispatchPath","index","trigger","listHeight","listOverflow","listWidth","handleToggle","opened","type","value","toString","level","isCurrentListOpen","treeId","safeUseId","listId","concat","nextLevel","items","React","createElement","FloatingPopover","placement","onToggle","target","DropdownItem","ariaControls","ariaExpanded","ariaLevel","ariaLabel","label","isInner","Ul","id","role","isInnerUl","map","innerItem","innerIndex","key"],"mappings":";;;;;;;;;;;;;AAUA,IAAMA,aAAqC,GAAG,SAAxCA,aAAqCA,CAAAC,IAAA,EAUrC;AAAA,EAAA,IATFC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,YAAY,GAAAF,IAAA,CAAZE,YA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AAA,UAAU,EAAEA,UAAW;AACvBC,QAAAA,YAAY,EAAEA,YAAa;AAC3BC,QAAAA,SAAS,EAAEA,SAAAA;AAAU,OACxB,CAAC,CAAA;KACL,CACD,CACS,CAAC,CAAA;AAE1B,GAAA;AAEA,EAAA,oBAAOc,KAAA,CAAAC,aAAA,CAACK,YAAY,EAAA;AAAC5B,IAAAA,IAAI,EAAEA,IAAK;AAACE,IAAAA,IAAI,EAAEA,IAAK;AAACE,IAAAA,KAAK,EAAEA,KAAM;AAACH,IAAAA,YAAY,EAAEA,YAAa;AAAC8B,IAAAA,SAAS,EAAEX,SAAAA;AAAU,GAAE,CAAC,CAAA;AACnH;;;;"}
1
+ {"version":3,"file":"DropdownInner.js","sources":["../../../../../src/components/Dropdown/ui/DropdownInner/DropdownInner.tsx"],"sourcesContent":["import React from 'react';\nimport type { FC } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { DropdownItem } from '..';\nimport { Ul } from '../../Dropdown.styles';\nimport { FloatingPopover } from '../../FloatingPopover';\n\nimport { DropdownInnerProps } from './DropdownInner.type';\n\nconst DropdownInner: FC<DropdownInnerProps> = ({\n item,\n currentLevel,\n path,\n dispatchPath,\n index,\n trigger,\n listHeight,\n listOverflow,\n listWidth,\n}) => {\n const handleToggle = (opened: boolean): void => {\n if (opened) {\n dispatchPath({ type: 'changed_on_level', value: item.value.toString(), level: currentLevel + 1 });\n } else {\n dispatchPath({ type: 'cut_by_level', level: currentLevel + 1 });\n }\n };\n\n const isCurrentListOpen = path[currentLevel + 1] === item.value.toString();\n\n const treeId = safeUseId();\n const listId = `${treeId}_tree_level_${currentLevel + 2}`;\n const nextLevel = currentLevel + 1;\n\n if (item?.items) {\n return (\n <FloatingPopover\n placement=\"right-start\"\n opened={isCurrentListOpen}\n onToggle={handleToggle}\n trigger={trigger}\n target={\n <DropdownItem\n item={item}\n index={index}\n path={path}\n currentLevel={currentLevel}\n ariaControls={listId}\n ariaExpanded={isCurrentListOpen}\n ariaLevel={nextLevel}\n ariaLabel={item.label}\n />\n }\n isInner\n >\n <Ul\n id={listId}\n role=\"group\"\n isInnerUl\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n >\n {item.items.map((innerItem, innerIndex) => (\n <DropdownInner\n key={`${innerIndex}/${currentLevel}`}\n item={innerItem}\n currentLevel={nextLevel}\n path={path}\n dispatchPath={dispatchPath}\n index={innerIndex}\n trigger={trigger}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </FloatingPopover>\n );\n }\n\n return <DropdownItem item={item} path={path} index={index} currentLevel={currentLevel} ariaLevel={nextLevel} />;\n};\n\nexport { DropdownInner };\n"],"names":["DropdownInner","_ref","item","currentLevel","path","dispatchPath","index","trigger","listHeight","listOverflow","listWidth","handleToggle","opened","type","value","toString","level","isCurrentListOpen","treeId","safeUseId","listId","concat","nextLevel","items","React","createElement","FloatingPopover","placement","onToggle","target","DropdownItem","ariaControls","ariaExpanded","ariaLevel","ariaLabel","label","isInner","Ul","id","role","isInnerUl","map","innerItem","innerIndex","key"],"mappings":";;;;;;AAUA,IAAMA,aAAqC,GAAG,SAAxCA,aAAqCA,CAAAC,IAAA,EAUrC;AAAA,EAAA,IATFC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,YAAY,GAAAF,IAAA,CAAZE,YAAY;IACZC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IACJC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IACZC,KAAK,GAAAL,IAAA,CAALK,KAAK;IACLC,OAAO,GAAAN,IAAA,CAAPM,OAAO;IACPC,UAAU,GAAAP,IAAA,CAAVO,UAAU;IACVC,YAAY,GAAAR,IAAA,CAAZQ,YAAY;IACZC,SAAS,GAAAT,IAAA,CAATS,SAAS,CAAA;AAET,EAAA,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,MAAe,EAAW;AAC5C,IAAA,IAAIA,MAAM,EAAE;AACRP,MAA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AAU,GAAE,CAAC,CAAA;AACnH;;;;"}
@@ -22,7 +22,7 @@
22
22
  .Dropdown_styles_3w3l45_s1rwu6ky__59648b20 .Dropdown_styles_3w3l45_popoverTarget__59648b20{display:block;}
23
23
  .Dropdown_styles_3w3l45_s10jhp3l__59648b20{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
24
24
 
25
- .Dropdown_styles_18f0qpm_un7uamp__64c00440{box-sizing:border-box;width:var(--un7uamp-0);height:var(--un7uamp-1);margin:var(--un7uamp-2);padding:var(--plasma-dropdown-padding) 0;overflow:var(--un7uamp-3);background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04);border-radius:var(--plasma-dropdown-border-radius);}
25
+ .Dropdown_styles_1ix6io8_un7uamp__de6f45f2{box-sizing:border-box;width:var(--un7uamp-0);height:var(--un7uamp-1);margin:var(--un7uamp-2);padding:var(--plasma-dropdown-padding) 0;overflow:var(--un7uamp-3);background:var(--surface-solid-card-brightness);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04);border-radius:var(--plasma-dropdown-border-radius);}
26
26
 
27
27
 
28
28
  .CellTextboxLabel_styles_1x97zqi_supiagz__b05150dd{color:var(--plasma-cell-label-color);font-size:var(--plasma-cell-label-font-size);font-weight:var(--plasma-cell-label-font-weight);font-family:var(--plasma-cell-label-font-family);font-style:var(--plasma-cell-label-font-style);line-height:var(--plasma-cell-label-line-height);-webkit-letter-spacing:var(--plasma-cell-label-letter-spacing);-moz-letter-spacing:var(--plasma-cell-label-letter-spacing);-ms-letter-spacing:var(--plasma-cell-label-letter-spacing);letter-spacing:var(--plasma-cell-label-letter-spacing);}
@@ -1,11 +1,10 @@
1
1
  import React, { useRef, useContext, useEffect } from 'react';
2
2
  import { classes } from '../../Dropdown.tokens.js';
3
3
  import { cx } from '../../../../utils/index.js';
4
- import '@linaria/react';
5
- import { IconDisclosureRight } from '../../../_Icon/Icons/IconDisclosureRight.js';
6
4
  import { Context } from '../../Dropdown.js';
7
- import { getItemId } from '../../utils/getItemId.js';
8
5
  import { Divider, Wrapper, CellWrapper, StyledCell, DisclosureIconWrapper } from './DropdownItem.styles.js';
6
+ import { getItemId } from '../../utils/getItemId.js';
7
+ import { IconDisclosureRight } from '../../../_Icon/Icons/IconDisclosureRight.js';
9
8
 
10
9
  var DropdownItem = function DropdownItem(_ref) {
11
10
  var item = _ref.item,
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownItem.js","sources":["../../../../../src/components/Dropdown/ui/DropdownItem/DropdownItem.tsx"],"sourcesContent":["import React, { useEffect, useRef, FC, useContext } from 'react';\n\nimport { classes } from '../../Dropdown.tokens';\nimport { cx } from '../../../../utils';\nimport { IconDisclosureRight } from '../../../_Icon';\nimport { Context } from '../../Dropdown';\nimport { getItemId } from '../../utils';\n\nimport { Wrapper, DisclosureIconWrapper, Divider, CellWrapper, StyledCell } from './DropdownItem.styles';\nimport type { DropdownItemProps } from './DropdownItem.type';\n\nexport const DropdownItem: FC<DropdownItemProps> = ({\n item,\n path,\n currentLevel,\n index,\n ariaControls,\n ariaExpanded,\n ariaLevel,\n ariaLabel,\n}) => {\n const { value, label, disabled, isDisabled, contentLeft, contentRight, dividerBefore, dividerAfter } = item;\n\n const ref = useRef<HTMLLIElement | null>(null);\n\n const {\n focusedPath,\n size,\n variant,\n itemRole,\n handleGlobalToggle,\n closeOnSelect,\n onHover,\n onItemSelect,\n onItemClick,\n hasArrow,\n treeId,\n } = useContext(Context);\n\n const hasDescendants = Boolean(item.items);\n const disclosureIconSize = size === 'xs' ? 'xs' : 's';\n const isDisabledClassName = disabled || isDisabled ? classes.dropdownItemIsDisabled : undefined;\n const focusedClass =\n currentLevel === focusedPath.length - 1 && index === focusedPath?.[currentLevel]\n ? classes.dropdownItemIsFocused\n : undefined;\n const activeClass = value === path?.[currentLevel + 1] ? classes.dropdownItemIsActive : undefined;\n\n useEffect(() => {\n if (focusedClass && ref?.current) {\n ref.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'center',\n });\n }\n }, [focusedClass]);\n\n const handleClick = (event: React.MouseEvent<HTMLLIElement>): void => {\n if (disabled || isDisabled) {\n return;\n }\n\n if (onItemSelect) {\n onItemSelect(item, event);\n }\n\n if (onItemClick) {\n onItemClick(item, event);\n }\n\n // Закрываем весь дропдаун целиком при клике на айтем без потомков. Только при closeOnSelect === true.\n if (closeOnSelect && !hasDescendants) {\n handleGlobalToggle(false, event);\n }\n };\n\n const handleHover = () => {\n if (onHover) {\n onHover(index);\n }\n };\n\n return (\n <>\n {dividerBefore && <Divider variant={variant} />}\n\n <Wrapper\n ref={ref}\n className={cx(isDisabledClassName, focusedClass, activeClass)}\n id={getItemId(treeId, value.toString())}\n role={itemRole}\n onClick={handleClick}\n onMouseEnter={handleHover}\n variant={variant}\n aria-disabled={disabled || isDisabled}\n aria-controls={ariaControls}\n aria-expanded={ariaExpanded}\n aria-level={ariaLevel}\n aria-label={ariaLabel}\n >\n <CellWrapper>\n <StyledCell\n contentLeft={contentLeft}\n contentRight={contentRight}\n alignContentLeft=\"center\"\n alignContentRight=\"center\"\n title={label}\n />\n </CellWrapper>\n\n {item.items && hasArrow && (\n <DisclosureIconWrapper>\n <IconDisclosureRight size={disclosureIconSize} color=\"inherit\" />\n </DisclosureIconWrapper>\n )}\n </Wrapper>\n\n {dividerAfter && <Divider variant={variant} />}\n </>\n );\n};\n"],"names":["DropdownItem","_ref","item","path","currentLevel","index","ariaControls","ariaExpanded","ariaLevel","ariaLabel","value","label","disabled","isDisabled","contentLeft","contentRight","dividerBefore","dividerAfter","ref","useRef","_useContext","useContext","Context","focusedPath","size","variant","itemRole","handleGlobalToggle","closeOnSelect","onHover","onItemSelect","onItemClick","hasArrow","treeId","hasDescendants","Boolean","items","disclosureIconSize","isDisabledClassName","classes","dropdownItemIsDisabled","undefined","focusedClass","length","dropdownItemIsFocused","activeClass","dropdownItemIsActive","useEffect","current","scrollIntoView","behavior","block","inline","handleClick","event","handleHover","React","createElement","Fragment","Divider","Wrapper","className","cx","id","getItemId","toString","role","onClick","onMouseEnter","CellWrapper","StyledCell","alignContentLeft","alignContentRight","title","DisclosureIconWrapper","IconDisclosureRight","color"],"mappings":";;;;;;;;;IAWaA,YAAmC,GAAG,SAAtCA,YAAmCA,CAAAC,IAAA,EAS1C;AAAA,EAAA,IARFC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IACZC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,YAAY,GAAAL,IAAA,CAAZK,YAAY;IACZC,YAAY,GAAAN,IAAA,CAAZM,YAAY;IACZC,SAAS,GAAAP,IAAA,CAATO,SAAS;IACTC,SAAS,GAAAR,IAAA,CAATQ,SAAS,CAAA;AAET,EAAA,IAAQC,KAAK,GAA0FR,IAAI,CAAnGQ,KAAK;IAAEC,KAAK,GAAmFT,IAAI,CAA5FS,KAAK;IAAEC,QAAQ,GAAyEV,IAAI,CAArFU,QAAQ;IAAEC,UAAU,GAA6DX,IAAI,CAA3EW,UAAU;IAAEC,WAAW,GAAgDZ,IAAI,CAA/DY,WAAW;IAAEC,YAAY,GAAkCb,IAAI,CAAlDa,YAAY;IAAEC,aAAa,GAAmBd,IAAI,CAApCc,aAAa;IAAEC,YAAY,GAAKf,IAAI,CAArBe,YAAY,CAAA;AAElG,EAAA,IAAMC,GAAG,GAAGC,MAAM,CAAuB,IAAI,CAAC,CAAA;AAE9C,EAAA,IAAAC,WAAA,GAYIC,UAAU,CAACC,OAAO,CAAC;IAXnBC,WAAW,GA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SAAS,EAAEC,EAAE,CAACxB,mBAAmB,EAAEI,YAAY,EAAEG,WAAW,CAAE;IAC9DkB,EAAE,EAAEC,SAAS,CAAC/B,MAAM,EAAEvB,KAAK,CAACuD,QAAQ,EAAE,CAAE;AACxCC,IAAAA,IAAI,EAAExC,QAAS;AACfyC,IAAAA,OAAO,EAAEd,WAAY;AACrBe,IAAAA,YAAY,EAAEb,WAAY;AAC1B9B,IAAAA,OAAO,EAAEA,OAAQ;IACjB,eAAeb,EAAAA,QAAQ,IAAIC,UAAW;AACtC,IAAA,eAAA,EAAeP,YAAa;AAC5B,IAAA,eAAA,EAAeC,YAAa;AAC5B,IAAA,YAAA,EAAYC,SAAU;IACtB,YAAYC,EAAAA,SAAAA;GAEZ+C,eAAAA,KAAA,CAAAC,aAAA,CAACY,WAAW,qBACRb,KAAA,CAAAC,aAAA,CAACa,UAAU,EAAA;AACPxD,IAAAA,WAAW,EAAEA,WAAY;AACzBC,IAAAA,YAAY,EAAEA,YAAa;AAC3BwD,IAAAA,gBAAgB,EAAC,QAAQ;AACzBC,IAAAA,iBAAiB,EAAC,QAAQ;AAC1BC,IAAAA,KAAK,EAAE9D,KAAAA;AAAM,GAChB,CACQ,CAAC,EAEbT,IAAI,CAACkC,KAAK,IAAIJ,QAAQ,iBACnBwB,KAAA,CAAAC,aAAA,CAACiB,qBAAqB,EAAA,IAAA,eAClBlB,KAAA,CAAAC,aAAA,CAACkB,mBAAmB,EAAA;AAACnD,IAAAA,IAAI,EAAEa,kBAAmB;AAACuC,IAAAA,KAAK,EAAC,SAAA;GAAW,CAC7C,CAEtB,CAAC,EAET3D,YAAY,iBAAIuC,KAAA,CAAAC,aAAA,CAACE,OAAO,EAAA;AAAClC,IAAAA,OAAO,EAAEA,OAAAA;AAAQ,GAAE,CAC/C,CAAC,CAAA;AAEX;;;;"}
1
+ {"version":3,"file":"DropdownItem.js","sources":["../../../../../src/components/Dropdown/ui/DropdownItem/DropdownItem.tsx"],"sourcesContent":["import React, { useEffect, useRef, FC, useContext } from 'react';\n\nimport { classes } from '../../Dropdown.tokens';\nimport { cx } from '../../../../utils';\nimport { IconDisclosureRight } from '../../../_Icon';\nimport { Context } from '../../Dropdown';\nimport { getItemId } from '../../utils';\n\nimport { Wrapper, DisclosureIconWrapper, Divider, CellWrapper, StyledCell } from './DropdownItem.styles';\nimport type { DropdownItemProps } from './DropdownItem.type';\n\nexport const DropdownItem: FC<DropdownItemProps> = ({\n item,\n path,\n currentLevel,\n index,\n ariaControls,\n ariaExpanded,\n ariaLevel,\n ariaLabel,\n}) => {\n const { value, label, disabled, isDisabled, contentLeft, contentRight, dividerBefore, dividerAfter } = item;\n\n const ref = useRef<HTMLLIElement | null>(null);\n\n const {\n focusedPath,\n size,\n variant,\n itemRole,\n handleGlobalToggle,\n closeOnSelect,\n onHover,\n onItemSelect,\n onItemClick,\n hasArrow,\n treeId,\n } = useContext(Context);\n\n const hasDescendants = Boolean(item.items);\n const disclosureIconSize = size === 'xs' ? 'xs' : 's';\n const isDisabledClassName = disabled || isDisabled ? classes.dropdownItemIsDisabled : undefined;\n const focusedClass =\n currentLevel === focusedPath.length - 1 && index === focusedPath?.[currentLevel]\n ? classes.dropdownItemIsFocused\n : undefined;\n const activeClass = value === path?.[currentLevel + 1] ? classes.dropdownItemIsActive : undefined;\n\n useEffect(() => {\n if (focusedClass && ref?.current) {\n ref.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'center',\n });\n }\n }, [focusedClass]);\n\n const handleClick = (event: React.MouseEvent<HTMLLIElement>): void => {\n if (disabled || isDisabled) {\n return;\n }\n\n if (onItemSelect) {\n onItemSelect(item, event);\n }\n\n if (onItemClick) {\n onItemClick(item, event);\n }\n\n // Закрываем весь дропдаун целиком при клике на айтем без потомков. Только при closeOnSelect === true.\n if (closeOnSelect && !hasDescendants) {\n handleGlobalToggle(false, event);\n }\n };\n\n const handleHover = () => {\n if (onHover) {\n onHover(index);\n }\n };\n\n return (\n <>\n {dividerBefore && <Divider variant={variant} />}\n\n <Wrapper\n ref={ref}\n className={cx(isDisabledClassName, focusedClass, activeClass)}\n id={getItemId(treeId, value.toString())}\n role={itemRole}\n onClick={handleClick}\n onMouseEnter={handleHover}\n variant={variant}\n aria-disabled={disabled || isDisabled}\n aria-controls={ariaControls}\n aria-expanded={ariaExpanded}\n aria-level={ariaLevel}\n aria-label={ariaLabel}\n >\n <CellWrapper>\n <StyledCell\n contentLeft={contentLeft}\n contentRight={contentRight}\n alignContentLeft=\"center\"\n alignContentRight=\"center\"\n title={label}\n />\n </CellWrapper>\n\n {item.items && hasArrow && (\n <DisclosureIconWrapper>\n <IconDisclosureRight size={disclosureIconSize} color=\"inherit\" />\n </DisclosureIconWrapper>\n )}\n </Wrapper>\n\n {dividerAfter && <Divider variant={variant} />}\n </>\n );\n};\n"],"names":["DropdownItem","_ref","item","path","currentLevel","index","ariaControls","ariaExpanded","ariaLevel","ariaLabel","value","label","disabled","isDisabled","contentLeft","contentRight","dividerBefore","dividerAfter","ref","useRef","_useContext","useContext","Context","focusedPath","size","variant","itemRole","handleGlobalToggle","closeOnSelect","onHover","onItemSelect","onItemClick","hasArrow","treeId","hasDescendants","Boolean","items","disclosureIconSize","isDisabledClassName","classes","dropdownItemIsDisabled","undefined","focusedClass","length","dropdownItemIsFocused","activeClass","dropdownItemIsActive","useEffect","current","scrollIntoView","behavior","block","inline","handleClick","event","handleHover","React","createElement","Fragment","Divider","Wrapper","className","cx","id","getItemId","toString","role","onClick","onMouseEnter","CellWrapper","StyledCell","alignContentLeft","alignContentRight","title","DisclosureIconWrapper","IconDisclosureRight","color"],"mappings":";;;;;;;;IAWaA,YAAmC,GAAG,SAAtCA,YAAmCA,CAAAC,IAAA,EAS1C;AAAA,EAAA,IARFC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IACZC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,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,IAAAA,YAAY,EAAEA,YAAa;AAC3BwD,IAAAA,gBAAgB,EAAC,QAAQ;AACzBC,IAAAA,iBAAiB,EAAC,QAAQ;AAC1BC,IAAAA,KAAK,EAAE9D,KAAAA;AAAM,GAChB,CACQ,CAAC,EAEbT,IAAI,CAACkC,KAAK,IAAIJ,QAAQ,iBACnBwB,KAAA,CAAAC,aAAA,CAACiB,qBAAqB,EAAA,IAAA,eAClBlB,KAAA,CAAAC,aAAA,CAACkB,mBAAmB,EAAA;AAACnD,IAAAA,IAAI,EAAEa,kBAAmB;AAACuC,IAAAA,KAAK,EAAC,SAAA;GAAW,CAC7C,CAEtB,CAAC,EAET3D,YAAY,iBAAIuC,KAAA,CAAAC,aAAA,CAACE,OAAO,EAAA;AAAClC,IAAAA,OAAO,EAAEA,OAAAA;AAAQ,GAAE,CAC/C,CAAC,CAAA;AAEX;;;;"}
@@ -1,10 +1,8 @@
1
1
  import './DropdownItem.styles_17va0nk.css';
2
2
  import { styled } from '@linaria/react';
3
3
  import { tokens } from '../../Dropdown.tokens.js';
4
- import 'react';
5
- import { cellConfig } from '../../../Cell/Cell.js';
6
- import '@linaria/core';
7
4
  import { component, mergeConfig } from '../../../../engines/common.js';
5
+ import { cellConfig } from '../../../Cell/Cell.js';
8
6
 
9
7
  var mergedCellConfig = /*#__PURE__*/mergeConfig(cellConfig);
10
8
  var Cell = /*#__PURE__*/component(mergedCellConfig);