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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (315) hide show
  1. package/cjs/components/Combobox/ComboboxNew/Combobox.css +10 -10
  2. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +10 -10
  3. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +10 -10
  4. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  5. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  6. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +20 -6
  7. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  8. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/{Item.styles_y71664.css → Item.styles_1us8jz1.css} +1 -1
  9. package/cjs/components/Combobox/ComboboxOld/Combobox.css +14 -28
  10. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +18 -32
  11. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +18 -32
  12. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +18 -32
  13. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +18 -32
  14. package/cjs/components/Dropdown/Dropdown.css +16 -30
  15. package/cjs/components/Dropdown/Dropdown.js +37 -60
  16. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  17. package/cjs/components/Dropdown/Dropdown.styles.js +26 -14
  18. package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
  19. package/cjs/components/Dropdown/Dropdown.styles_1tihqkp.css +3 -0
  20. package/cjs/components/Dropdown/Dropdown.tokens.js +1 -24
  21. package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
  22. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +51 -17
  23. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  24. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +6 -46
  25. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +18 -29
  26. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  27. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +31 -25
  28. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  29. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_blclup.css +6 -0
  30. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +1 -1
  31. package/cjs/components/Dropdown/ui/DropdownItemOld/{DropdownItem.styles_1lyg81y.css → DropdownItem.styles_12e50g5.css} +1 -1
  32. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -4
  33. package/cjs/components/Dropdown/utils/index.js.map +1 -1
  34. package/cjs/components/Notification/Notification.css +11 -11
  35. package/cjs/components/Notification/Notification.js +2 -2
  36. package/cjs/components/Notification/Notification.js.map +1 -1
  37. package/cjs/components/Notification/Notification.styles.js +1 -1
  38. package/cjs/components/Notification/Notification.styles.js.map +1 -1
  39. package/cjs/components/Notification/{Notification.styles_7h8hp0.css → Notification.styles_1cf2gwd.css} +1 -1
  40. package/cjs/components/Notification/Notification.tokens.js +2 -1
  41. package/cjs/components/Notification/Notification.tokens.js.map +1 -1
  42. package/cjs/components/Notification/Notification.types.js.map +1 -1
  43. package/cjs/components/Notification/NotificationsPortal.js +5 -3
  44. package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
  45. package/cjs/components/Notification/NotificationsProvider.css +11 -11
  46. package/cjs/components/Notification/NotificationsProvider.js +3 -1
  47. package/cjs/components/Notification/NotificationsProvider.js.map +1 -1
  48. package/cjs/components/Select/Select.js +1 -1
  49. package/cjs/components/Select/utils/getCorrectHeight.js.map +1 -1
  50. package/cjs/hooks/useOutsideClick.js +1 -1
  51. package/cjs/hooks/useOutsideClick.js.map +1 -1
  52. package/cjs/index.css +33 -31
  53. package/cjs/index.js +1 -1
  54. package/cjs/utils/index.js.map +1 -1
  55. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  56. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +20 -14
  57. package/emotion/cjs/components/Dropdown/Dropdown.js +37 -58
  58. package/emotion/cjs/components/Dropdown/Dropdown.styles.js +25 -9
  59. package/emotion/cjs/components/Dropdown/Dropdown.tokens.js +2 -36
  60. package/emotion/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +51 -17
  61. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +18 -29
  62. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +41 -21
  63. package/emotion/cjs/components/Dropdown/utils/index.js +1 -23
  64. package/emotion/cjs/components/Notification/Notification.js +2 -2
  65. package/emotion/cjs/components/Notification/Notification.styles.js +11 -11
  66. package/emotion/cjs/components/Notification/Notification.template-doc.mdx +15 -7
  67. package/emotion/cjs/components/Notification/Notification.tokens.js +2 -1
  68. package/emotion/cjs/components/Notification/NotificationsPortal.js +6 -4
  69. package/emotion/cjs/components/Notification/NotificationsProvider.js +3 -1
  70. package/emotion/cjs/components/Notification/index.js +4 -4
  71. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
  72. package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
  73. package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +5 -6
  74. package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.js +5 -3
  75. package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +25 -4
  76. package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +12 -12
  77. package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
  78. package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +5 -6
  79. package/emotion/cjs/examples/plasma_web/components/Notification/Notification.js +5 -3
  80. package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +25 -4
  81. package/emotion/cjs/hooks/useOutsideClick.js +1 -1
  82. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  83. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +20 -14
  84. package/emotion/es/components/Dropdown/Dropdown.js +40 -60
  85. package/emotion/es/components/Dropdown/Dropdown.styles.js +25 -9
  86. package/emotion/es/components/Dropdown/Dropdown.tokens.js +1 -35
  87. package/emotion/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +52 -18
  88. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +20 -31
  89. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +42 -22
  90. package/emotion/es/components/Dropdown/utils/index.js +1 -4
  91. package/emotion/es/components/Notification/Notification.js +1 -1
  92. package/emotion/es/components/Notification/Notification.styles.js +11 -11
  93. package/emotion/es/components/Notification/Notification.template-doc.mdx +15 -7
  94. package/emotion/es/components/Notification/Notification.tokens.js +2 -1
  95. package/emotion/es/components/Notification/NotificationsPortal.js +6 -4
  96. package/emotion/es/components/Notification/NotificationsProvider.js +3 -1
  97. package/emotion/es/components/Notification/index.js +1 -1
  98. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
  99. package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +6 -6
  100. package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +5 -6
  101. package/emotion/es/examples/plasma_b2c/components/Notification/Notification.js +6 -4
  102. package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +25 -4
  103. package/emotion/es/examples/plasma_web/components/Combobox/Combobox.config.js +12 -12
  104. package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +6 -6
  105. package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +5 -6
  106. package/emotion/es/examples/plasma_web/components/Notification/Notification.js +6 -4
  107. package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +25 -4
  108. package/emotion/es/hooks/useOutsideClick.js +1 -1
  109. package/es/components/Combobox/ComboboxNew/Combobox.css +10 -10
  110. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +10 -10
  111. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +10 -10
  112. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  113. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  114. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +20 -6
  115. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  116. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/{Item.styles_y71664.css → Item.styles_1us8jz1.css} +1 -1
  117. package/es/components/Combobox/ComboboxOld/Combobox.css +14 -28
  118. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +18 -32
  119. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +18 -32
  120. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +18 -32
  121. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +18 -32
  122. package/es/components/Dropdown/Dropdown.css +16 -30
  123. package/es/components/Dropdown/Dropdown.js +40 -62
  124. package/es/components/Dropdown/Dropdown.js.map +1 -1
  125. package/es/components/Dropdown/Dropdown.styles.js +26 -15
  126. package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
  127. package/es/components/Dropdown/Dropdown.styles_1tihqkp.css +3 -0
  128. package/es/components/Dropdown/Dropdown.tokens.js +1 -24
  129. package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
  130. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +52 -18
  131. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  132. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +6 -46
  133. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +20 -31
  134. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  135. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +29 -24
  136. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  137. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_blclup.css +6 -0
  138. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +1 -1
  139. package/es/components/Dropdown/ui/DropdownItemOld/{DropdownItem.styles_1lyg81y.css → DropdownItem.styles_12e50g5.css} +1 -1
  140. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -4
  141. package/es/components/Dropdown/utils/index.js.map +1 -1
  142. package/es/components/Notification/Notification.css +11 -11
  143. package/es/components/Notification/Notification.js +2 -2
  144. package/es/components/Notification/Notification.js.map +1 -1
  145. package/es/components/Notification/Notification.styles.js +1 -1
  146. package/es/components/Notification/Notification.styles.js.map +1 -1
  147. package/es/components/Notification/{Notification.styles_7h8hp0.css → Notification.styles_1cf2gwd.css} +1 -1
  148. package/es/components/Notification/Notification.tokens.js +2 -1
  149. package/es/components/Notification/Notification.tokens.js.map +1 -1
  150. package/es/components/Notification/Notification.types.js.map +1 -1
  151. package/es/components/Notification/NotificationsPortal.js +5 -3
  152. package/es/components/Notification/NotificationsPortal.js.map +1 -1
  153. package/es/components/Notification/NotificationsProvider.css +11 -11
  154. package/es/components/Notification/NotificationsProvider.js +3 -1
  155. package/es/components/Notification/NotificationsProvider.js.map +1 -1
  156. package/es/components/Select/Select.js +1 -1
  157. package/es/components/Select/utils/getCorrectHeight.js.map +1 -1
  158. package/es/hooks/useOutsideClick.js +1 -1
  159. package/es/hooks/useOutsideClick.js.map +1 -1
  160. package/es/index.css +33 -31
  161. package/es/index.js +1 -1
  162. package/es/utils/index.js.map +1 -1
  163. package/package.json +2 -2
  164. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  165. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +10 -4
  166. package/styled-components/cjs/components/Dropdown/Dropdown.js +37 -58
  167. package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +15 -9
  168. package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +2 -36
  169. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +51 -17
  170. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +18 -29
  171. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +19 -17
  172. package/styled-components/cjs/components/Dropdown/utils/index.js +1 -23
  173. package/styled-components/cjs/components/Notification/Notification.js +2 -2
  174. package/styled-components/cjs/components/Notification/Notification.styles.js +1 -1
  175. package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +15 -7
  176. package/styled-components/cjs/components/Notification/Notification.tokens.js +2 -1
  177. package/styled-components/cjs/components/Notification/NotificationsPortal.js +5 -3
  178. package/styled-components/cjs/components/Notification/NotificationsProvider.js +3 -1
  179. package/styled-components/cjs/components/Notification/index.js +4 -4
  180. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +4 -4
  181. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
  182. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +5 -6
  183. package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.js +5 -3
  184. package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +25 -4
  185. package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +4 -4
  186. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
  187. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +5 -6
  188. package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.js +5 -3
  189. package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +25 -4
  190. package/styled-components/cjs/hooks/useOutsideClick.js +1 -1
  191. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  192. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +10 -4
  193. package/styled-components/es/components/Dropdown/Dropdown.js +40 -60
  194. package/styled-components/es/components/Dropdown/Dropdown.styles.js +15 -9
  195. package/styled-components/es/components/Dropdown/Dropdown.tokens.js +1 -35
  196. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +52 -18
  197. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +20 -31
  198. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +20 -18
  199. package/styled-components/es/components/Dropdown/utils/index.js +1 -4
  200. package/styled-components/es/components/Notification/Notification.js +1 -1
  201. package/styled-components/es/components/Notification/Notification.styles.js +1 -1
  202. package/styled-components/es/components/Notification/Notification.template-doc.mdx +15 -7
  203. package/styled-components/es/components/Notification/Notification.tokens.js +2 -1
  204. package/styled-components/es/components/Notification/NotificationsPortal.js +5 -3
  205. package/styled-components/es/components/Notification/NotificationsProvider.js +3 -1
  206. package/styled-components/es/components/Notification/index.js +1 -1
  207. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +4 -4
  208. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +6 -6
  209. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +5 -6
  210. package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.js +6 -4
  211. package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +25 -4
  212. package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.config.js +4 -4
  213. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +6 -6
  214. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +5 -6
  215. package/styled-components/es/examples/plasma_web/components/Notification/Notification.js +6 -4
  216. package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +25 -4
  217. package/styled-components/es/hooks/useOutsideClick.js +1 -1
  218. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.d.ts.map +1 -1
  219. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.d.ts.map +1 -1
  220. package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts +1 -2
  221. package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts.map +1 -1
  222. package/types/components/Dropdown/Dropdown.d.ts +1 -2
  223. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  224. package/types/components/Dropdown/Dropdown.styles.d.ts +6 -1
  225. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  226. package/types/components/Dropdown/Dropdown.tokens.d.ts +0 -25
  227. package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
  228. package/types/components/Dropdown/Dropdown.types.d.ts +4 -30
  229. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  230. package/types/components/Dropdown/index.d.ts +1 -1
  231. package/types/components/Dropdown/index.d.ts.map +1 -1
  232. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts.map +1 -1
  233. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts +12 -1
  234. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts.map +1 -1
  235. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  236. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +3 -32
  237. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
  238. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts +14 -1
  239. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts.map +1 -1
  240. package/types/components/Dropdown/utils/index.d.ts +0 -3
  241. package/types/components/Dropdown/utils/index.d.ts.map +1 -1
  242. package/types/components/Notification/Notification.d.ts +3 -3
  243. package/types/components/Notification/Notification.d.ts.map +1 -1
  244. package/types/components/Notification/Notification.styles.d.ts.map +1 -1
  245. package/types/components/Notification/Notification.tokens.d.ts +1 -0
  246. package/types/components/Notification/Notification.tokens.d.ts.map +1 -1
  247. package/types/components/Notification/Notification.types.d.ts +11 -5
  248. package/types/components/Notification/Notification.types.d.ts.map +1 -1
  249. package/types/components/Notification/NotificationsPortal.d.ts.map +1 -1
  250. package/types/components/Notification/NotificationsProvider.d.ts +4 -3
  251. package/types/components/Notification/NotificationsProvider.d.ts.map +1 -1
  252. package/types/components/Notification/index.d.ts +2 -2
  253. package/types/components/Notification/index.d.ts.map +1 -1
  254. package/types/components/Select/utils/getCorrectHeight.d.ts +2 -2
  255. package/types/components/Select/utils/getCorrectHeight.d.ts.map +1 -1
  256. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts +3 -3
  257. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts.map +1 -1
  258. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +4 -4
  259. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -1
  260. package/types/examples/plasma_b2c/components/Notification/Notification.d.ts +4 -2
  261. package/types/examples/plasma_b2c/components/Notification/Notification.d.ts.map +1 -1
  262. package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts +3 -3
  263. package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts.map +1 -1
  264. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +4 -4
  265. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -1
  266. package/types/examples/plasma_web/components/Notification/Notification.d.ts +4 -13
  267. package/types/examples/plasma_web/components/Notification/Notification.d.ts.map +1 -1
  268. package/types/hooks/useOutsideClick.d.ts +1 -1
  269. package/types/hooks/useOutsideClick.d.ts.map +1 -1
  270. package/types/utils/index.d.ts +1 -1
  271. package/types/utils/index.d.ts.map +1 -1
  272. package/cjs/components/Dropdown/Dropdown.styles_1ix6io8.css +0 -2
  273. package/cjs/components/Dropdown/FloatingPopover.js +0 -104
  274. package/cjs/components/Dropdown/FloatingPopover.js.map +0 -1
  275. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_17va0nk.css +0 -5
  276. package/cjs/components/Dropdown/utils/getItemByFocused.js +0 -13
  277. package/cjs/components/Dropdown/utils/getItemByFocused.js.map +0 -1
  278. package/cjs/components/Dropdown/utils/getItemId.js +0 -10
  279. package/cjs/components/Dropdown/utils/getItemId.js.map +0 -1
  280. package/cjs/components/Dropdown/utils/getPlacement.js +0 -16
  281. package/cjs/components/Dropdown/utils/getPlacement.js.map +0 -1
  282. package/emotion/cjs/components/Dropdown/FloatingPopover.js +0 -109
  283. package/emotion/cjs/components/Dropdown/utils/getItemByFocused.js +0 -12
  284. package/emotion/cjs/components/Dropdown/utils/getItemId.js +0 -9
  285. package/emotion/cjs/components/Dropdown/utils/getPlacement.js +0 -15
  286. package/emotion/es/components/Dropdown/FloatingPopover.js +0 -102
  287. package/emotion/es/components/Dropdown/utils/getItemByFocused.js +0 -6
  288. package/emotion/es/components/Dropdown/utils/getItemId.js +0 -3
  289. package/emotion/es/components/Dropdown/utils/getPlacement.js +0 -9
  290. package/es/components/Dropdown/Dropdown.styles_1ix6io8.css +0 -2
  291. package/es/components/Dropdown/FloatingPopover.js +0 -100
  292. package/es/components/Dropdown/FloatingPopover.js.map +0 -1
  293. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_17va0nk.css +0 -5
  294. package/es/components/Dropdown/utils/getItemByFocused.js +0 -9
  295. package/es/components/Dropdown/utils/getItemByFocused.js.map +0 -1
  296. package/es/components/Dropdown/utils/getItemId.js +0 -6
  297. package/es/components/Dropdown/utils/getItemId.js.map +0 -1
  298. package/es/components/Dropdown/utils/getPlacement.js +0 -12
  299. package/es/components/Dropdown/utils/getPlacement.js.map +0 -1
  300. package/styled-components/cjs/components/Dropdown/FloatingPopover.js +0 -109
  301. package/styled-components/cjs/components/Dropdown/utils/getItemByFocused.js +0 -12
  302. package/styled-components/cjs/components/Dropdown/utils/getItemId.js +0 -9
  303. package/styled-components/cjs/components/Dropdown/utils/getPlacement.js +0 -15
  304. package/styled-components/es/components/Dropdown/FloatingPopover.js +0 -102
  305. package/styled-components/es/components/Dropdown/utils/getItemByFocused.js +0 -6
  306. package/styled-components/es/components/Dropdown/utils/getItemId.js +0 -3
  307. package/styled-components/es/components/Dropdown/utils/getPlacement.js +0 -9
  308. package/types/components/Dropdown/FloatingPopover.d.ts +0 -5
  309. package/types/components/Dropdown/FloatingPopover.d.ts.map +0 -1
  310. package/types/components/Dropdown/utils/getItemByFocused.d.ts +0 -4
  311. package/types/components/Dropdown/utils/getItemByFocused.d.ts.map +0 -1
  312. package/types/components/Dropdown/utils/getItemId.d.ts +0 -2
  313. package/types/components/Dropdown/utils/getItemId.d.ts.map +0 -1
  314. package/types/components/Dropdown/utils/getPlacement.d.ts +0 -3
  315. package/types/components/Dropdown/utils/getPlacement.d.ts.map +0 -1
@@ -4,11 +4,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.dropdownRoot = exports.dropdownConfig = exports.Context = void 0;
7
+ exports.dropdownRoot = exports.dropdownConfig = void 0;
8
8
  var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
9
- var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
10
9
  var _utils = /*#__PURE__*/require("../../utils");
11
- var _hooks = /*#__PURE__*/require("../../hooks");
12
10
  var _pathReducer = /*#__PURE__*/require("./reducers/pathReducer");
13
11
  var _focusedPathReducer = /*#__PURE__*/require("./reducers/focusedPathReducer");
14
12
  var _ui = /*#__PURE__*/require("./ui");
@@ -19,7 +17,6 @@ var _utils2 = /*#__PURE__*/require("./utils");
19
17
  var _Dropdown2 = /*#__PURE__*/require("./Dropdown.tokens");
20
18
  var _useKeyboardNavigation = /*#__PURE__*/require("./hooks/useKeyboardNavigation");
21
19
  var _useHashMaps3 = /*#__PURE__*/require("./hooks/useHashMaps");
22
- var _FloatingPopover = /*#__PURE__*/require("./FloatingPopover");
23
20
  var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "portal"];
24
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
25
22
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
@@ -32,18 +29,17 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
32
29
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
33
30
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
34
31
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
35
- var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)({});
36
-
37
32
  /**
38
33
  * Выпадающий список.
39
34
  */
40
35
  var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
41
36
  return /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
42
- var _getItemByFocused;
43
37
  var items = _ref.items,
44
38
  children = _ref.children,
45
- placement = _ref.placement,
46
- offset = _ref.offset,
39
+ _ref$placement = _ref.placement,
40
+ placement = _ref$placement === void 0 ? 'bottom' : _ref$placement,
41
+ _ref$offset = _ref.offset,
42
+ offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
47
43
  _ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
48
44
  closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
49
45
  onToggle = _ref.onToggle,
@@ -80,25 +76,6 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
80
76
  _useHashMaps2 = _slicedToArray(_useHashMaps, 2),
81
77
  pathMap = _useHashMaps2[0],
82
78
  focusedToValueMap = _useHashMaps2[1];
83
- var activeDescendantItemValue = ((_getItemByFocused = (0, _utils2.getItemByFocused)(focusedPath, focusedToValueMap)) === null || _getItemByFocused === void 0 ? void 0 : _getItemByFocused.value) || '';
84
- var floatingPopoverRef = (0, _react.useRef)(null);
85
- var treeId = (0, _plasmaCore.safeUseId)();
86
-
87
- // Логика работы при клике за пределами выпадающего списка
88
- var targetRef = (0, _hooks.useOutsideClick)(function (event) {
89
- if (!isCurrentListOpen || !closeOnOverlayClick) {
90
- return;
91
- }
92
- dispatchPath({
93
- type: 'reset'
94
- });
95
- dispatchFocusedPath({
96
- type: 'reset'
97
- });
98
- if (onToggle) {
99
- onToggle(false, event);
100
- }
101
- }, floatingPopoverRef);
102
79
  var handleGlobalToggle = function handleGlobalToggle(opened, event) {
103
80
  if (opened) {
104
81
  dispatchPath({
@@ -130,64 +107,66 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
130
107
  }),
131
108
  onKeyDown = _useKeyNavigation.onKeyDown;
132
109
  var isCurrentListOpen = Boolean(path[0]);
133
- return /*#__PURE__*/_react["default"].createElement(Context.Provider, {
134
- value: {
135
- focusedPath: focusedPath,
136
- size: size,
137
- variant: variant,
138
- itemRole: itemRole,
139
- handleGlobalToggle: handleGlobalToggle,
140
- closeOnSelect: closeOnSelect,
141
- onHover: onHover,
142
- onItemClick: onItemClick,
143
- onItemSelect: onItemSelect,
144
- hasArrow: hasArrow,
145
- treeId: treeId
146
- }
147
- }, /*#__PURE__*/_react["default"].createElement(_FloatingPopover.FloatingPopover, {
148
- ref: floatingPopoverRef,
110
+ var getActiveDescendant = function getActiveDescendant() {
111
+ var _focusedToValueMap$ge;
112
+ var focusedPathAsString = focusedPath.reduce(function (acc, n) {
113
+ return "".concat(acc, "/").concat(n);
114
+ }, '').replace(/^(\/)/, '');
115
+ return focusedToValueMap === null || focusedToValueMap === void 0 || (_focusedToValueMap$ge = focusedToValueMap.get(focusedPathAsString)) === null || _focusedToValueMap$ge === void 0 ? void 0 : _focusedToValueMap$ge.value.toString();
116
+ };
117
+ return /*#__PURE__*/_react["default"].createElement(_Dropdown.StyledPopover, {
149
118
  opened: isCurrentListOpen,
150
119
  onToggle: handleGlobalToggle,
151
- placement: (0, _utils2.getPlacement)(placement),
152
120
  offset: offset,
153
- portal: portal,
121
+ placement: (0, _utils.getPlacements)(placement),
154
122
  trigger: trigger,
123
+ closeOnOverlayClick: closeOnOverlayClick,
124
+ isFocusTrapped: false,
155
125
  target: (0, _utils2.childrenWithProps)(children, {
156
126
  role: 'combobox',
157
- 'aria-controls': "".concat(treeId, "_tree_level_1"),
127
+ 'aria-controls': 'tree_level_1',
158
128
  'aria-expanded': isCurrentListOpen,
159
- 'aria-activedescendant': activeDescendantItemValue ? (0, _utils2.getItemId)(treeId, activeDescendantItemValue.toString()) : '',
129
+ 'aria-activedescendant': getActiveDescendant(),
160
130
  onKeyDown: onKeyDown
161
- })
131
+ }),
132
+ preventOverflow: false,
133
+ usePortal: Boolean(portal),
134
+ frame: portal
162
135
  }, /*#__PURE__*/_react["default"].createElement(Root, _extends({
163
136
  className: (0, _utils.cx)(className, _Dropdown2.classes.dropdownRoot),
164
137
  ref: ref,
165
138
  view: view,
166
- size: size,
167
- style: {
168
- display: 'inline-block'
169
- }
139
+ size: size
170
140
  }, rest), /*#__PURE__*/_react["default"].createElement(_Dropdown.Ul, {
171
- ref: targetRef,
172
- id: "".concat(treeId, "_tree_level_1"),
173
- role: "tree",
174
141
  listHeight: listHeight,
175
142
  listOverflow: listOverflow,
143
+ role: "tree",
144
+ id: "tree_level_1",
176
145
  listWidth: listWidth
177
146
  }, items.map(function (item, index) {
178
147
  return /*#__PURE__*/_react["default"].createElement(_ui.DropdownInner, {
179
148
  key: "".concat(index, "/0"),
180
149
  item: item,
181
150
  currentLevel: 0,
151
+ focusedPath: focusedPath,
182
152
  trigger: trigger,
183
153
  path: path,
184
154
  dispatchPath: dispatchPath,
185
155
  index: index,
156
+ itemRole: itemRole,
186
157
  listHeight: listHeight,
187
158
  listOverflow: listOverflow,
188
- listWidth: listWidth
159
+ handleGlobalToggle: handleGlobalToggle,
160
+ closeOnSelect: closeOnSelect,
161
+ onHover: onHover,
162
+ onItemSelect: onItemSelect,
163
+ onItemClick: onItemClick,
164
+ listWidth: listWidth,
165
+ variant: variant,
166
+ hasArrow: hasArrow,
167
+ size: size
189
168
  });
190
- })))));
169
+ }))));
191
170
  });
192
171
  };
193
172
  var dropdownConfig = exports.dropdownConfig = {
@@ -3,26 +3,42 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.base = exports.Ul = void 0;
6
+ exports.base = exports.Ul = exports.StyledPopover = void 0;
7
7
  var _base = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("@emotion/styled/base"));
8
8
  var _react = /*#__PURE__*/require("@emotion/react");
9
+ var _engines = /*#__PURE__*/require("../../engines");
10
+ var _Popover = /*#__PURE__*/require("../Popover");
9
11
  var _utils = /*#__PURE__*/require("./utils");
10
12
  var _Dropdown = /*#__PURE__*/require("./Dropdown.tokens");
11
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
15
+ var Popover = /*#__PURE__*/(0, _engines.component)(_Popover.popoverConfig);
16
+ var StyledPopover = exports.StyledPopover = /*#__PURE__*/(0, _base["default"])(Popover, {
17
+ target: "euqmbvx1",
18
+ label: "plasma-new-hope__StyledPopover"
19
+ })(".", /*#__PURE__*/String(_Popover.popoverClasses.wrapper), ",.", /*#__PURE__*/String(_Popover.popoverClasses.target), "{display:block;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvRHJvcGRvd24vRHJvcGRvd24uc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVk0QyIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0Ryb3Bkb3duL0Ryb3Bkb3duLnN0eWxlcy50cyIsInNv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t0b2tlbnMuYmFja2dyb3VuZH0pO1xuICAgIGJveC1zaGFkb3c6IHZhcigke3Rva2Vucy5ib3hTaGFkb3d9KTtcblxuICAgIGJvcmRlci1yYWRpdXM6IHZhcigke3Rva2Vucy5ib3JkZXJSYWRpdXN9KTtcbiAgICB3aWR0aDogJHsoeyBsaXN0V2lkdGggfSkgPT4gbGlzdFdpZHRoIHx8IGB2YXIoJHt0b2tlbnMud2lkdGh9KWB9O1xuICAgIGhlaWdodDogJHsoeyBsaXN0SGVpZ2h0IH0pID0+IChsaXN0SGVpZ2h0ID8gZ2V0Q29ycmVjdEhlaWdodChsaXN0SGVpZ2h0KSA6ICdhdXRvJyl9O1xuICAgIG92ZXJmbG93OiAkeyh7IGxpc3RPdmVyZmxvdyB9KSA9PiBsaXN0T3ZlcmZsb3cgfHwgJ2luaXRpYWwnfTtcblxuICAgIG1hcmdpbjogJHsoeyBpc0lubmVyVWwgfSkgPT4gKGlzSW5uZXJVbCA/IGBjYWxjKHZhcigke3Rva2Vucy5wYWRkaW5nfSkgKiAtMSkgMCAwIHZhcigke3Rva2Vucy5wYWRkaW5nfSlgIDogMCl9O1xuICAgIHBhZGRpbmc6IHZhcigke3Rva2Vucy5wYWRkaW5nfSk7XG5gO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BcbiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5gO1xuIl19 */"));
12
20
  var Ul = exports.Ul = /*#__PURE__*/(0, _base["default"])("ul", {
13
21
  target: "euqmbvx0",
14
22
  label: "plasma-new-hope__Ul"
15
- })("box-sizing:border-box;width:", function (_ref) {
23
+ })("box-sizing:border-box;background:var(", _Dropdown.tokens.background, ");box-shadow:var(", _Dropdown.tokens.boxShadow, ");border-radius:var(", _Dropdown.tokens.borderRadius, ");width:", function (_ref) {
16
24
  var listWidth = _ref.listWidth;
17
25
  return listWidth || "var(".concat(_Dropdown.tokens.width, ")");
18
26
  }, ";height:", function (_ref2) {
19
27
  var listHeight = _ref2.listHeight;
20
28
  return listHeight ? (0, _utils.getCorrectHeight)(listHeight) : 'auto';
21
- }, ";margin:", function (_ref3) {
22
- var isInnerUl = _ref3.isInnerUl;
23
- return isInnerUl ? "calc(var(".concat(_Dropdown.tokens.padding, ") * -1) 0.125rem 0") : 0;
24
- }, ";padding:var(", _Dropdown.tokens.padding, ") 0;overflow:", function (_ref4) {
25
- var listOverflow = _ref4.listOverflow;
29
+ }, ";overflow:", function (_ref3) {
30
+ var listOverflow = _ref3.listOverflow;
26
31
  return listOverflow || 'initial';
27
- }, ";background:var(", _Dropdown.constants.background, ");box-shadow:", _Dropdown.constants.boxShadow, ";border-radius:var(", _Dropdown.tokens.borderRadius, ");" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvRHJvcGRvd24vRHJvcGRvd24uc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVlFIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvRHJvcGRvd24vRHJvcGRvd24uc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5pbXBvcnQgeyBnZXRDb3JyZWN0SGVpZ2h0IH0gZnJvbSAnLi91dGlscyc7XG5pbXBvcnQgeyBEcm9wZG93blByb3BzIH0gZnJvbSAnLi9Ecm9wZG93bi50eXBlcyc7XG5pbXBvcnQgeyB0b2tlbnMsIGNvbnN0YW50cyB9IGZyb20gJy4vRHJvcGRvd24udG9rZW5zJztcblxuZXhwb3J0IGNvbnN0IFVsID0gc3R5bGVkLnVsPHtcbiAgICBsaXN0SGVpZ2h0OiBEcm9wZG93blByb3BzWydsaXN0SGVpZ2h0J107XG4gICAgbGlzdE92ZXJmbG93OiBEcm9wZG93blByb3BzWydsaXN0T3ZlcmZsb3cnXTtcbiAgICBsaXN0V2lkdGg/OiBEcm9wZG93blByb3BzWydsaXN0V2lkdGgnXTtcbiAgICBpc0lubmVyVWw/OiBib29sZWFuO1xufT5gXG4gICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgICB3aWR0aDogJHsoeyBsaXN0V2lkdGggfSkgPT4gbGlzdFdpZHRoIHx8IGB2YXIoJHt0b2tlbnMud2lkdGh9KWB9O1xuICAgIGhlaWdodDogJHsoeyBsaXN0SGVpZ2h0IH0pID0+IChsaXN0SGVpZ2h0ID8gZ2V0Q29ycmVjdEhlaWdodChsaXN0SGVpZ2h0KSA6ICdhdXRvJyl9O1xuICAgIG1hcmdpbjogJHsoeyBpc0lubmVyVWwgfSkgPT4gKGlzSW5uZXJVbCA/IGBjYWxjKHZhcigke3Rva2Vucy5wYWRkaW5nfSkgKiAtMSkgMC4xMjVyZW0gMGAgOiAwKX07XG4gICAgcGFkZGluZzogdmFyKCR7dG9rZW5zLnBhZGRpbmd9KSAwO1xuICAgIG92ZXJmbG93OiAkeyh7IGxpc3RPdmVyZmxvdyB9KSA9PiBsaXN0T3ZlcmZsb3cgfHwgJ2luaXRpYWwnfTtcbiAgICBiYWNrZ3JvdW5kOiB2YXIoJHtjb25zdGFudHMuYmFja2dyb3VuZH0pO1xuICAgIGJveC1zaGFkb3c6ICR7Y29uc3RhbnRzLmJveFNoYWRvd307XG4gICAgYm9yZGVyLXJhZGl1czogdmFyKCR7dG9rZW5zLmJvcmRlclJhZGl1c30pO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJhc2UgPSBjc3NgYDtcbiJdfQ== */"));
28
- var base = exports.base = /*#__PURE__*/(0, _react.css)(";label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=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lnaHQgPyBnZXRDb3JyZWN0SGVpZ2h0KGxpc3RIZWlnaHQpIDogJ2F1dG8nKX07XG4gICAgbWFyZ2luOiAkeyh7IGlzSW5uZXJVbCB9KSA9PiAoaXNJbm5lclVsID8gYGNhbGModmFyKCR7dG9rZW5zLnBhZGRpbmd9KSAqIC0xKSAwLjEyNXJlbSAwYCA6IDApfTtcbiAgICBwYWRkaW5nOiB2YXIoJHt0b2tlbnMucGFkZGluZ30pIDA7XG4gICAgb3ZlcmZsb3c6ICR7KHsgbGlzdE92ZXJmbG93IH0pID0+IGxpc3RPdmVyZmxvdyB8fCAnaW5pdGlhbCd9O1xuICAgIGJhY2tncm91bmQ6IHZhcigke2NvbnN0YW50cy5iYWNrZ3JvdW5kfSk7XG4gICAgYm94LXNoYWRvdzogJHtjb25zdGFudHMuYm94U2hhZG93fTtcbiAgICBib3JkZXItcmFkaXVzOiB2YXIoJHt0b2tlbnMuYm9yZGVyUmFkaXVzfSk7XG5gO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BgO1xuIl19 */"));
32
+ }, ";margin:", function (_ref4) {
33
+ var isInnerUl = _ref4.isInnerUl;
34
+ return isInnerUl ? "calc(var(".concat(_Dropdown.tokens.padding, ") * -1) 0 0 var(").concat(_Dropdown.tokens.padding, ")") : 0;
35
+ }, ";padding:var(", _Dropdown.tokens.padding, ");" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvRHJvcGRvd24vRHJvcGRvd24uc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVCRSIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0Ryb3Bkb3duL0Ryb3Bkb3duLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50I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dyb3VuZH0pO1xuICAgIGJveC1zaGFkb3c6IHZhcigke3Rva2Vucy5ib3hTaGFkb3d9KTtcblxuICAgIGJvcmRlci1yYWRpdXM6IHZhcigke3Rva2Vucy5ib3JkZXJSYWRpdXN9KTtcbiAgICB3aWR0aDogJHsoeyBsaXN0V2lkdGggfSkgPT4gbGlzdFdpZHRoIHx8IGB2YXIoJHt0b2tlbnMud2lkdGh9KWB9O1xuICAgIGhlaWdodDogJHsoeyBsaXN0SGVpZ2h0IH0pID0+IChsaXN0SGVpZ2h0ID8gZ2V0Q29ycmVjdEhlaWdodChsaXN0SGVpZ2h0KSA6ICdhdXRvJyl9O1xuICAgIG92ZXJmbG93OiAkeyh7IGxpc3RPdmVyZmxvdyB9KSA9PiBsaXN0T3ZlcmZsb3cgfHwgJ2luaXRpYWwnfTtcblxuICAgIG1hcmdpbjogJHsoeyBpc0lubmVyVWwgfSkgPT4gKGlzSW5uZXJVbCA/IGBjYWxjKHZhcigke3Rva2Vucy5wYWRkaW5nfSkgKiAtMSkgMCAwIHZhcigke3Rva2Vucy5wYWRkaW5nfSlgIDogMCl9O1xuICAgIHBhZGRpbmc6IHZhcigke3Rva2Vucy5wYWRkaW5nfSk7XG5gO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BcbiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5gO1xuIl19 */"));
36
+ var base = exports.base = process.env.NODE_ENV === "production" ? {
37
+ name: "1mufh2u-plasma-new-hope__base",
38
+ styles: "display:inline-block;label:plasma-new-hope__base;"
39
+ } : {
40
+ name: "1mufh2u-plasma-new-hope__base",
41
+ styles: "display:inline-block;label:plasma-new-hope__base;",
42
+ map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvRHJvcGRvd24vRHJvcGRvd24uc3R5bGVzLnRzIl0sIm5hbW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lYW47XG4gICAgbGlzdFdpZHRoPzogRHJvcGRvd25Qcm9wc1snbGlzdFdpZHRoJ107XG59PmBcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXG4gICAgYmFja2dyb3VuZDogdmFyKCR7dG9rZW5zLmJhY2tncm91bmR9KTtcbiAgICBib3gtc2hhZG93OiB2YXIoJHt0b2tlbnMuYm94U2hhZG93fSk7XG5cbiAgICBib3JkZXItcmFkaXVzOiB2YXIoJHt0b2tlbnMuYm9yZGVyUmFkaXVzfSk7XG4gICAgd2lkdGg6ICR7KHsgbGlzdFdpZHRoIH0pID0+IGxpc3RXaWR0aCB8fCBgdmFyKCR7dG9rZW5zLndpZHRofSlgfTtcbiAgICBoZWlnaHQ6ICR7KHsgbGlzdEhlaWdodCB9KSA9PiAobGlzdEhlaWdodCA/IGdldENvcnJlY3RIZWlnaHQobGlzdEhlaWdodCkgOiAnYXV0bycpfTtcbiAgICBvdmVyZmxvdzogJHsoeyBsaXN0T3ZlcmZsb3cgfSkgPT4gbGlzdE92ZXJmbG93IHx8ICdpbml0aWFsJ307XG5cbiAgICBtYXJnaW46ICR7KHsgaXNJbm5lclVsIH0pID0+IChpc0lubmVyVWwgPyBgY2FsYyh2YXIoJHt0b2tlbnMucGFkZGluZ30pICogLTEpIDAgMCB2YXIoJHt0b2tlbnMucGFkZGluZ30pYCA6IDApfTtcbiAgICBwYWRkaW5nOiB2YXIoJHt0b2tlbnMucGFkZGluZ30pO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJhc2UgPSBjc3NgXG4gICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuYDtcbiJdfQ== */",
43
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
44
+ };
@@ -3,13 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.tokens = exports.constants = exports.classes = void 0;
6
+ exports.tokens = exports.classes = void 0;
7
7
  var classes = exports.classes = {
8
8
  dropdownRoot: 'dropdown-root',
9
9
  dropdownItemIsFocused: 'dropdown-item-is-focused',
10
10
  dropdownItemIsDisabled: 'dropdown-item-is-disabled',
11
11
  dropdownItemIsActive: 'dropdown-item-is-active',
12
- dropdownItemIsSelected: 'dropdown-item-is-selected'
12
+ dropdownItemIsSelected: 'dropdownItemIsSelected'
13
13
  };
14
14
  var tokens = exports.tokens = {
15
15
  background: '--plasma-dropdown-background',
@@ -20,8 +20,6 @@ var tokens = exports.tokens = {
20
20
  disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',
21
21
  disabledOpacity: '--plasma-dropdown-disabled-opacity',
22
22
  focusColor: '--plasma-dropdown-focus-color',
23
- // Old
24
-
25
23
  dividerColor: '--plasma-dropdown-divider-color',
26
24
  dividerMarginTop: '--plasma-dropdown-divider-margin-top',
27
25
  dividerMarginTopTight: '--plasma-dropdown-divider-margin-top-tight',
@@ -36,7 +34,6 @@ var tokens = exports.tokens = {
36
34
  itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover',
37
35
  // Old
38
36
  itemColor: '--plasma-dropdown-item-color',
39
- // Old
40
37
  itemColorSelected: '--plasma-dropdown-item-color-selected',
41
38
  // Old
42
39
  itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover',
@@ -55,17 +52,11 @@ var tokens = exports.tokens = {
55
52
  itemMarginLeft: '--plasma-dropdown-item-margin-left',
56
53
  // Old
57
54
  itemPaddingTop: '--plasma-dropdown-item-padding-top',
58
- // Old
59
55
  itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight',
60
- // Old
61
56
  itemPaddingRight: '--plasma-dropdown-item-padding-right',
62
- // Old
63
57
  itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',
64
- // Old
65
58
  itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight',
66
- // Old
67
59
  itemPaddingLeft: '--plasma-dropdown-item-padding-left',
68
- // Old
69
60
  itemContentLeftWidth: '--plasma-dropdown-item-content-left-width',
70
61
  // Old
71
62
  itemContentLeftColor: '--plasma-dropdown-item-content-left-color',
@@ -80,20 +71,6 @@ var tokens = exports.tokens = {
80
71
  itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',
81
72
  itemFontLetterSpacing: '--plasma-dropdown-item-line-height',
82
73
  itemFontLineHeight: '--plasma-dropdown-item-font-weight',
83
- itemPadding: '--plasma-dropdown-item-padding',
84
- itemPaddingTight: '--plasma-dropdown-item-padding-tight',
85
- cellPadding: '--plasma-dropdown-cell-padding',
86
- cellPaddingLeftContent: '--plasma-dropdown-cell-padding-left-content',
87
- cellPaddingContent: '--plasma-dropdown-cell-padding-content',
88
- cellPaddingRightContent: '--plasma-dropdown-cell-padding-right-content',
89
- cellTextboxGap: '--plasma-dropdown-cell-textbox-gap',
90
- cellGap: '--plasma-dropdown-cell-gap',
91
- cellTitleFontFamily: '--plasma-dropdown-cell-title-font-family',
92
- cellTitleFontSize: '--plasma-dropdown-cell-title-font-size',
93
- cellTitleFontStyle: '--plasma-dropdown-cell-title-font-style',
94
- cellTitleFontWeight: '--plasma-dropdown-cell-title-font-weight',
95
- cellTitleLetterSpacing: '--plasma-dropdown-cell-title-letter-spacing',
96
- cellTitleLineHeight: '--plasma-dropdown-cell-title-line-height',
97
74
  // TODO: Remove below tokens as soon as they are no longer needed
98
75
  footerBackground: '--plasma-dropdown-footer-background',
99
76
  footerWidth: '--plasma-dropdown-footer-width',
@@ -157,15 +134,4 @@ var tokens = exports.tokens = {
157
134
  groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',
158
135
  groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',
159
136
  groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left'
160
- };
161
- var constants = exports.constants = {
162
- focusColor: '--surface-accent',
163
- background: '--surface-solid-card-brightness',
164
- boxShadow: '0px 4px 14px -4px rgba(8, 8, 8, 0.08), 0px 1px 4px -1px rgba(0, 0, 0, 0.04)',
165
- disclosureIconColor: '--text-secondary',
166
- itemBackground: '--plasma-colors-transparent',
167
- itemBackgroundHover: '--surface-transparent-secondary',
168
- opacity: '0.4',
169
- cellTitleColor: '--text-primary',
170
- cellBackgroundColor: '--plasma-colors-transparent'
171
137
  };
@@ -5,21 +5,29 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.DropdownInner = void 0;
7
7
  var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
8
- var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
9
8
  var _ = /*#__PURE__*/require("..");
10
9
  var _Dropdown = /*#__PURE__*/require("../../Dropdown.styles");
11
- var _FloatingPopover = /*#__PURE__*/require("../../FloatingPopover");
12
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
11
  var DropdownInner = exports.DropdownInner = function DropdownInner(_ref) {
14
12
  var item = _ref.item,
15
13
  currentLevel = _ref.currentLevel,
14
+ focusedPath = _ref.focusedPath,
16
15
  path = _ref.path,
17
16
  dispatchPath = _ref.dispatchPath,
18
17
  index = _ref.index,
19
18
  trigger = _ref.trigger,
19
+ itemRole = _ref.itemRole,
20
20
  listHeight = _ref.listHeight,
21
21
  listOverflow = _ref.listOverflow,
22
- listWidth = _ref.listWidth;
22
+ handleGlobalToggle = _ref.handleGlobalToggle,
23
+ closeOnSelect = _ref.closeOnSelect,
24
+ onHover = _ref.onHover,
25
+ onItemSelect = _ref.onItemSelect,
26
+ onItemClick = _ref.onItemClick,
27
+ listWidth = _ref.listWidth,
28
+ variant = _ref.variant,
29
+ hasArrow = _ref.hasArrow,
30
+ size = _ref.size;
23
31
  var handleToggle = function handleToggle(opened) {
24
32
  if (opened) {
25
33
  dispatchPath({
@@ -35,53 +43,79 @@ var DropdownInner = exports.DropdownInner = function DropdownInner(_ref) {
35
43
  }
36
44
  };
37
45
  var isCurrentListOpen = path[currentLevel + 1] === item.value.toString();
38
- var treeId = (0, _plasmaCore.safeUseId)();
39
- var listId = "".concat(treeId, "_tree_level_").concat(currentLevel + 2);
46
+ var listId = "tree_level_".concat(currentLevel + 2);
40
47
  var nextLevel = currentLevel + 1;
41
48
  if (item !== null && item !== void 0 && item.items) {
42
- return /*#__PURE__*/_react["default"].createElement(_FloatingPopover.FloatingPopover, {
43
- placement: "right-start",
49
+ return /*#__PURE__*/_react["default"].createElement(_Dropdown.StyledPopover, {
44
50
  opened: isCurrentListOpen,
45
- onToggle: handleToggle,
51
+ usePortal: false,
52
+ placement: "right-start",
46
53
  trigger: trigger,
47
54
  target: /*#__PURE__*/_react["default"].createElement(_.DropdownItem, {
48
55
  item: item,
49
56
  index: index,
50
57
  path: path,
58
+ focusedPath: focusedPath,
51
59
  currentLevel: currentLevel,
60
+ itemRole: itemRole,
61
+ onHover: onHover,
62
+ onItemSelect: onItemSelect,
63
+ onItemClick: onItemClick,
64
+ variant: variant,
65
+ hasArrow: hasArrow,
52
66
  ariaControls: listId,
53
67
  ariaExpanded: isCurrentListOpen,
54
68
  ariaLevel: nextLevel,
55
- ariaLabel: item.label
69
+ ariaLabel: item.label,
70
+ size: size
56
71
  }),
57
- isInner: true
72
+ onToggle: handleToggle,
73
+ isFocusTrapped: false,
74
+ preventOverflow: false
58
75
  }, /*#__PURE__*/_react["default"].createElement(_Dropdown.Ul, {
59
- id: listId,
60
- role: "group",
61
- isInnerUl: true,
62
76
  listHeight: listHeight,
63
77
  listOverflow: listOverflow,
64
- listWidth: listWidth
78
+ role: "group",
79
+ id: listId,
80
+ listWidth: listWidth,
81
+ isInnerUl: true
65
82
  }, item.items.map(function (innerItem, innerIndex) {
66
83
  return /*#__PURE__*/_react["default"].createElement(DropdownInner, {
67
84
  key: "".concat(innerIndex, "/").concat(currentLevel),
68
85
  item: innerItem,
69
86
  currentLevel: nextLevel,
87
+ focusedPath: focusedPath,
70
88
  path: path,
71
89
  dispatchPath: dispatchPath,
72
90
  index: innerIndex,
73
91
  trigger: trigger,
92
+ itemRole: itemRole,
74
93
  listHeight: listHeight,
75
94
  listOverflow: listOverflow,
76
- listWidth: listWidth
95
+ handleGlobalToggle: handleGlobalToggle,
96
+ closeOnSelect: closeOnSelect,
97
+ onHover: onHover,
98
+ onItemSelect: onItemSelect,
99
+ onItemClick: onItemClick,
100
+ listWidth: listWidth,
101
+ variant: variant,
102
+ hasArrow: hasArrow,
103
+ size: size
77
104
  });
78
105
  })));
79
106
  }
80
107
  return /*#__PURE__*/_react["default"].createElement(_.DropdownItem, {
81
108
  item: item,
82
- path: path,
83
109
  index: index,
110
+ focusedPath: focusedPath,
84
111
  currentLevel: currentLevel,
85
- ariaLevel: nextLevel
112
+ itemRole: itemRole,
113
+ handleGlobalToggle: handleGlobalToggle,
114
+ closeOnSelect: closeOnSelect,
115
+ onHover: onHover,
116
+ onItemSelect: onItemSelect,
117
+ onItemClick: onItemClick,
118
+ variant: variant,
119
+ size: size
86
120
  });
87
121
  };
@@ -9,20 +9,29 @@ var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react")
9
9
  var _Dropdown = /*#__PURE__*/require("../../Dropdown.tokens");
10
10
  var _utils = /*#__PURE__*/require("../../../../utils");
11
11
  var _Icon = /*#__PURE__*/require("../../../_Icon");
12
- var _Dropdown2 = /*#__PURE__*/require("../../Dropdown");
13
- var _utils2 = /*#__PURE__*/require("../../utils");
14
12
  var _DropdownItem = /*#__PURE__*/require("./DropdownItem.styles");
15
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
14
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
17
15
  var DropdownItem = exports.DropdownItem = function DropdownItem(_ref) {
18
16
  var item = _ref.item,
19
17
  path = _ref.path,
18
+ focusedPath = _ref.focusedPath,
20
19
  currentLevel = _ref.currentLevel,
21
20
  index = _ref.index,
21
+ itemRole = _ref.itemRole,
22
+ closeOnSelect = _ref.closeOnSelect,
23
+ handleGlobalToggle = _ref.handleGlobalToggle,
24
+ onHover = _ref.onHover,
25
+ onItemSelect = _ref.onItemSelect,
26
+ onItemClick = _ref.onItemClick,
22
27
  ariaControls = _ref.ariaControls,
23
28
  ariaExpanded = _ref.ariaExpanded,
29
+ ariaHasPopup = _ref.ariaHasPopup,
24
30
  ariaLevel = _ref.ariaLevel,
25
- ariaLabel = _ref.ariaLabel;
31
+ ariaLabel = _ref.ariaLabel,
32
+ variant = _ref.variant,
33
+ hasArrow = _ref.hasArrow,
34
+ size = _ref.size;
26
35
  var value = item.value,
27
36
  label = item.label,
28
37
  disabled = item.disabled,
@@ -32,19 +41,6 @@ var DropdownItem = exports.DropdownItem = function DropdownItem(_ref) {
32
41
  dividerBefore = item.dividerBefore,
33
42
  dividerAfter = item.dividerAfter;
34
43
  var ref = (0, _react.useRef)(null);
35
- var _useContext = (0, _react.useContext)(_Dropdown2.Context),
36
- focusedPath = _useContext.focusedPath,
37
- size = _useContext.size,
38
- variant = _useContext.variant,
39
- itemRole = _useContext.itemRole,
40
- handleGlobalToggle = _useContext.handleGlobalToggle,
41
- closeOnSelect = _useContext.closeOnSelect,
42
- onHover = _useContext.onHover,
43
- onItemSelect = _useContext.onItemSelect,
44
- onItemClick = _useContext.onItemClick,
45
- hasArrow = _useContext.hasArrow,
46
- treeId = _useContext.treeId;
47
- var hasDescendants = Boolean(item.items);
48
44
  var disclosureIconSize = size === 'xs' ? 'xs' : 's';
49
45
  var isDisabledClassName = disabled || isDisabled ? _Dropdown.classes.dropdownItemIsDisabled : undefined;
50
46
  var focusedClass = currentLevel === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentLevel]) ? _Dropdown.classes.dropdownItemIsFocused : undefined;
@@ -68,9 +64,7 @@ var DropdownItem = exports.DropdownItem = function DropdownItem(_ref) {
68
64
  if (onItemClick) {
69
65
  onItemClick(item, event);
70
66
  }
71
-
72
- // Закрываем весь дропдаун целиком при клике на айтем без потомков. Только при closeOnSelect === true.
73
- if (closeOnSelect && !hasDescendants) {
67
+ if (handleGlobalToggle && closeOnSelect) {
74
68
  handleGlobalToggle(false, event);
75
69
  }
76
70
  };
@@ -82,25 +76,20 @@ var DropdownItem = exports.DropdownItem = function DropdownItem(_ref) {
82
76
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, dividerBefore && /*#__PURE__*/_react["default"].createElement(_DropdownItem.Divider, {
83
77
  variant: variant
84
78
  }), /*#__PURE__*/_react["default"].createElement(_DropdownItem.Wrapper, {
85
- ref: ref,
86
79
  className: (0, _utils.cx)(isDisabledClassName, focusedClass, activeClass),
87
- id: (0, _utils2.getItemId)(treeId, value.toString()),
80
+ id: value.toString(),
88
81
  role: itemRole,
82
+ ref: ref,
83
+ "aria-disabled": disabled || isDisabled,
89
84
  onClick: handleClick,
90
85
  onMouseEnter: handleHover,
91
86
  variant: variant,
92
- "aria-disabled": disabled || isDisabled,
93
87
  "aria-controls": ariaControls,
94
88
  "aria-expanded": ariaExpanded,
89
+ "aria-haspopup": ariaHasPopup,
95
90
  "aria-level": ariaLevel,
96
91
  "aria-label": ariaLabel
97
- }, /*#__PURE__*/_react["default"].createElement(_DropdownItem.CellWrapper, null, /*#__PURE__*/_react["default"].createElement(_DropdownItem.StyledCell, {
98
- contentLeft: contentLeft,
99
- contentRight: contentRight,
100
- alignContentLeft: "center",
101
- alignContentRight: "center",
102
- title: label
103
- })), item.items && hasArrow && /*#__PURE__*/_react["default"].createElement(_DropdownItem.DisclosureIconWrapper, null, /*#__PURE__*/_react["default"].createElement(_Icon.IconDisclosureRight, {
92
+ }, contentLeft && /*#__PURE__*/_react["default"].createElement(_DropdownItem.StyledContentLeft, null, contentLeft), /*#__PURE__*/_react["default"].createElement(_DropdownItem.StyledText, null, label), contentRight && /*#__PURE__*/_react["default"].createElement(_DropdownItem.StyledContentRight, null, contentRight), item.items && hasArrow && /*#__PURE__*/_react["default"].createElement(_DropdownItem.DisclosureIconWrapper, null, /*#__PURE__*/_react["default"].createElement(_Icon.IconDisclosureRight, {
104
93
  size: disclosureIconSize,
105
94
  color: "inherit"
106
95
  }))), dividerAfter && /*#__PURE__*/_react["default"].createElement(_DropdownItem.Divider, {