@salutejs/plasma-new-hope 0.77.1-canary.1201.8930079977.0 → 0.77.1-canary.1202.8938243709.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (343) hide show
  1. package/cjs/components/Combobox/Combobox.css +7 -17
  2. package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +6 -15
  3. package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +2 -2
  4. package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +6 -15
  5. package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +2 -2
  6. package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +6 -15
  7. package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +2 -2
  8. package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +6 -15
  9. package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +2 -2
  10. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.css +23 -4
  11. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +10 -81
  12. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js.map +1 -1
  13. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +9 -21
  14. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  15. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_936wgl.css +1 -0
  16. package/cjs/components/Dropdown/Dropdown.css +2 -25
  17. package/cjs/components/Dropdown/Dropdown.js +54 -138
  18. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  19. package/cjs/components/Dropdown/Dropdown.styles.js +7 -40
  20. package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
  21. package/cjs/components/Dropdown/Dropdown.styles_1daxhqh.css +2 -0
  22. package/cjs/components/Dropdown/Dropdown.tokens.js +23 -26
  23. package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
  24. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +4 -7
  25. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +100 -79
  26. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  27. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +5 -90
  28. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  29. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1juhjtq.css +4 -0
  30. package/cjs/components/Dropdown/ui/{DropdownItemOld → DropdownItem}/variations/_size/base.js +1 -1
  31. package/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base.js.map +1 -0
  32. package/cjs/components/Dropdown/ui/{DropdownItemOld → DropdownItem}/variations/_view/base.js +1 -1
  33. package/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base.js.map +1 -0
  34. package/cjs/components/Dropdown/utils/index.js +0 -16
  35. package/cjs/components/Dropdown/utils/index.js.map +1 -1
  36. package/cjs/components/Pagination/Pagination.css +7 -14
  37. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +7 -14
  38. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
  39. package/cjs/components/Select/Select.css +7 -14
  40. package/cjs/components/Select/ui/SelectDivider/SelectDivider.css +6 -15
  41. package/cjs/components/Select/ui/SelectDivider/SelectDivider.js +2 -2
  42. package/cjs/components/Select/ui/SelectFooter/SelectFooter.css +6 -15
  43. package/cjs/components/Select/ui/SelectFooter/SelectFooter.js +2 -2
  44. package/cjs/components/Select/ui/SelectGroup/SelectGroup.css +6 -15
  45. package/cjs/components/Select/ui/SelectGroup/SelectGroup.js +2 -2
  46. package/cjs/components/Select/ui/SelectHeader/SelectHeader.css +6 -15
  47. package/cjs/components/Select/ui/SelectHeader/SelectHeader.js +2 -2
  48. package/cjs/components/Select/ui/SelectItem/SelectItem.css +7 -16
  49. package/cjs/components/Select/ui/SelectItem/SelectItem.js +3 -3
  50. package/cjs/components/Select/ui/SelectItem/SelectItem.js.map +1 -1
  51. package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +2 -2
  52. package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js.map +1 -1
  53. package/cjs/components/Select/ui/SelectItem/{SelectItem.styles_vk39mp.css → SelectItem.styles_6h17aw.css} +1 -1
  54. package/cjs/components/_Icon/Icon.assets/DisclosureRight.js +2 -1
  55. package/cjs/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
  56. package/cjs/index.css +8 -18
  57. package/cjs/index.js +2 -8
  58. package/cjs/index.js.map +1 -1
  59. package/es/components/Combobox/Combobox.css +7 -17
  60. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +6 -15
  61. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +2 -2
  62. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +6 -15
  63. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +2 -2
  64. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +6 -15
  65. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +2 -2
  66. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +6 -15
  67. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +2 -2
  68. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.css +23 -4
  69. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +11 -82
  70. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js.map +1 -1
  71. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +10 -19
  72. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  73. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_936wgl.css +1 -0
  74. package/es/components/Dropdown/Dropdown.css +2 -25
  75. package/es/components/Dropdown/Dropdown.js +60 -144
  76. package/es/components/Dropdown/Dropdown.js.map +1 -1
  77. package/es/components/Dropdown/Dropdown.styles.js +7 -39
  78. package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
  79. package/es/components/Dropdown/Dropdown.styles_1daxhqh.css +2 -0
  80. package/es/components/Dropdown/Dropdown.tokens.js +23 -26
  81. package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
  82. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +4 -7
  83. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +100 -80
  84. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  85. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +5 -89
  86. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  87. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1juhjtq.css +4 -0
  88. package/es/components/Dropdown/ui/{DropdownItemOld → DropdownItem}/variations/_size/base.js +1 -1
  89. package/es/components/Dropdown/ui/DropdownItem/variations/_size/base.js.map +1 -0
  90. package/es/components/Dropdown/ui/{DropdownItemOld → DropdownItem}/variations/_view/base.js +1 -1
  91. package/es/components/Dropdown/ui/DropdownItem/variations/_view/base.js.map +1 -0
  92. package/es/components/Dropdown/utils/index.js +2 -16
  93. package/es/components/Dropdown/utils/index.js.map +1 -1
  94. package/es/components/Pagination/Pagination.css +7 -14
  95. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +7 -14
  96. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
  97. package/es/components/Select/Select.css +7 -14
  98. package/es/components/Select/ui/SelectDivider/SelectDivider.css +6 -15
  99. package/es/components/Select/ui/SelectDivider/SelectDivider.js +2 -2
  100. package/es/components/Select/ui/SelectFooter/SelectFooter.css +6 -15
  101. package/es/components/Select/ui/SelectFooter/SelectFooter.js +2 -2
  102. package/es/components/Select/ui/SelectGroup/SelectGroup.css +6 -15
  103. package/es/components/Select/ui/SelectGroup/SelectGroup.js +2 -2
  104. package/es/components/Select/ui/SelectHeader/SelectHeader.css +6 -15
  105. package/es/components/Select/ui/SelectHeader/SelectHeader.js +2 -2
  106. package/es/components/Select/ui/SelectItem/SelectItem.css +7 -16
  107. package/es/components/Select/ui/SelectItem/SelectItem.js +3 -3
  108. package/es/components/Select/ui/SelectItem/SelectItem.js.map +1 -1
  109. package/es/components/Select/ui/SelectItem/SelectItem.styles.js +2 -2
  110. package/es/components/Select/ui/SelectItem/SelectItem.styles.js.map +1 -1
  111. package/es/components/Select/ui/SelectItem/{SelectItem.styles_vk39mp.css → SelectItem.styles_6h17aw.css} +1 -1
  112. package/es/components/_Icon/Icon.assets/DisclosureRight.js +2 -1
  113. package/es/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
  114. package/es/index.css +8 -18
  115. package/es/index.js +1 -4
  116. package/es/index.js.map +1 -1
  117. package/package.json +2 -2
  118. package/styled-components/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +2 -91
  119. package/styled-components/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +7 -27
  120. package/styled-components/cjs/components/Dropdown/Dropdown.js +54 -140
  121. package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +7 -22
  122. package/styled-components/cjs/components/Dropdown/Dropdown.template-doc.mdx +80 -0
  123. package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +23 -26
  124. package/styled-components/cjs/components/Dropdown/index.js +1 -9
  125. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +105 -77
  126. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +18 -83
  127. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_size/tokens.json +19 -0
  128. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_view/tokens.json +9 -0
  129. package/styled-components/cjs/components/Dropdown/ui/index.js +5 -19
  130. package/styled-components/cjs/components/Dropdown/utils/index.js +1 -15
  131. package/styled-components/cjs/components/Dropdown/variations/_size/tokens.json +9 -1
  132. package/styled-components/cjs/components/Dropdown/variations/_view/tokens.json +1 -1
  133. package/styled-components/cjs/components/Select/ui/SelectItem/SelectItem.js +1 -1
  134. package/styled-components/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
  135. package/styled-components/cjs/components/_Icon/Icon.assets/DisclosureRight.js +2 -1
  136. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +27 -0
  137. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.js +13 -0
  138. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +194 -0
  139. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +27 -0
  140. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.js +13 -0
  141. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +195 -0
  142. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +27 -0
  143. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.js +13 -0
  144. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +195 -0
  145. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +27 -0
  146. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.js +13 -0
  147. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +195 -0
  148. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.config.js +22 -0
  149. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.js +21 -0
  150. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.stories.tsx +277 -0
  151. package/styled-components/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +3 -90
  152. package/styled-components/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +6 -23
  153. package/styled-components/es/components/Dropdown/Dropdown.js +55 -142
  154. package/styled-components/es/components/Dropdown/Dropdown.styles.js +5 -18
  155. package/styled-components/es/components/Dropdown/Dropdown.template-doc.mdx +80 -0
  156. package/styled-components/es/components/Dropdown/Dropdown.tokens.js +23 -26
  157. package/styled-components/es/components/Dropdown/index.js +0 -1
  158. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +107 -78
  159. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +14 -80
  160. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_size/tokens.json +19 -0
  161. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_view/tokens.json +9 -0
  162. package/styled-components/es/components/Dropdown/ui/index.js +1 -3
  163. package/styled-components/es/components/Dropdown/utils/index.js +1 -15
  164. package/styled-components/es/components/Dropdown/variations/_size/tokens.json +9 -1
  165. package/styled-components/es/components/Dropdown/variations/_view/tokens.json +1 -1
  166. package/styled-components/es/components/Select/ui/SelectItem/SelectItem.js +2 -2
  167. package/styled-components/es/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
  168. package/styled-components/es/components/_Icon/Icon.assets/DisclosureRight.js +2 -1
  169. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +21 -0
  170. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.js +7 -0
  171. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +194 -0
  172. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +21 -0
  173. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.js +7 -0
  174. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +195 -0
  175. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +21 -0
  176. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.js +7 -0
  177. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +195 -0
  178. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +21 -0
  179. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.js +7 -0
  180. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +195 -0
  181. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.config.js +16 -0
  182. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.js +15 -0
  183. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.stories.tsx +277 -0
  184. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.d.ts +13 -15
  185. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.d.ts.map +1 -1
  186. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.d.ts +1 -5
  187. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.d.ts.map +1 -1
  188. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.type.d.ts +2 -59
  189. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.type.d.ts.map +1 -1
  190. package/types/components/Dropdown/Dropdown.d.ts +4 -4
  191. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  192. package/types/components/Dropdown/Dropdown.styles.d.ts +1 -8
  193. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  194. package/types/components/Dropdown/Dropdown.tokens.d.ts +22 -24
  195. package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
  196. package/types/components/Dropdown/Dropdown.types.d.ts +40 -64
  197. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  198. package/types/components/Dropdown/index.d.ts +1 -3
  199. package/types/components/Dropdown/index.d.ts.map +1 -1
  200. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts +56 -2
  201. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  202. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +2 -5
  203. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
  204. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts +38 -44
  205. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts.map +1 -1
  206. package/types/components/Dropdown/ui/DropdownItem/variations/_size/base.d.ts.map +1 -0
  207. package/types/components/Dropdown/ui/DropdownItem/variations/_view/base.d.ts.map +1 -0
  208. package/types/components/Dropdown/ui/index.d.ts +1 -3
  209. package/types/components/Dropdown/ui/index.d.ts.map +1 -1
  210. package/types/components/Dropdown/utils/index.d.ts +2 -5
  211. package/types/components/Dropdown/utils/index.d.ts.map +1 -1
  212. package/types/components/Select/ui/SelectItem/SelectItem.d.ts +2 -2
  213. package/types/components/Select/ui/SelectItem/SelectItem.d.ts.map +1 -1
  214. package/types/components/Select/ui/SelectItem/SelectItem.type.d.ts +2 -2
  215. package/types/components/Select/utils/index.d.ts +1 -1
  216. package/types/components/_Icon/Icon.assets/DisclosureRight.d.ts.map +1 -1
  217. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.d.ts.map +1 -0
  218. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.d.ts +30 -0
  219. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.d.ts.map +1 -0
  220. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.d.ts +18 -0
  221. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.d.ts.map +1 -0
  222. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.d.ts +30 -0
  223. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.d.ts.map +1 -0
  224. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts +18 -0
  225. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts.map +1 -0
  226. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.d.ts +30 -0
  227. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.d.ts.map +1 -0
  228. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts +18 -0
  229. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts.map +1 -0
  230. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.d.ts +30 -0
  231. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.d.ts.map +1 -0
  232. package/types/examples/sds_engineer/components/Dropdown/Dropdown.config.d.ts +15 -0
  233. package/types/examples/sds_engineer/components/Dropdown/Dropdown.config.d.ts.map +1 -0
  234. package/types/examples/sds_engineer/components/Dropdown/Dropdown.d.ts +51 -0
  235. package/types/examples/sds_engineer/components/Dropdown/Dropdown.d.ts.map +1 -0
  236. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_s4sk53.css +0 -4
  237. package/cjs/components/Combobox/utils/index.js +0 -23
  238. package/cjs/components/Combobox/utils/index.js.map +0 -1
  239. package/cjs/components/Dropdown/Dropdown.styles_1tihqkp.css +0 -3
  240. package/cjs/components/Dropdown/hooks/useHashMaps.js +0 -31
  241. package/cjs/components/Dropdown/hooks/useHashMaps.js.map +0 -1
  242. package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +0 -200
  243. package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js.map +0 -1
  244. package/cjs/components/Dropdown/reducers/focusedPathReducer.js +0 -37
  245. package/cjs/components/Dropdown/reducers/focusedPathReducer.js.map +0 -1
  246. package/cjs/components/Dropdown/reducers/pathReducer.js +0 -41
  247. package/cjs/components/Dropdown/reducers/pathReducer.js.map +0 -1
  248. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +0 -119
  249. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +0 -1
  250. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1o4szyu.css +0 -5
  251. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -30
  252. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +0 -1
  253. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles_12e50g5.css +0 -4
  254. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +0 -4
  255. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js +0 -112
  256. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js.map +0 -1
  257. package/cjs/components/Dropdown/ui/DropdownItemOld/variations/_size/base.js.map +0 -1
  258. package/cjs/components/Dropdown/ui/DropdownItemOld/variations/_view/base.js.map +0 -1
  259. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_s4sk53.css +0 -4
  260. package/es/components/Combobox/utils/index.js +0 -19
  261. package/es/components/Combobox/utils/index.js.map +0 -1
  262. package/es/components/Dropdown/Dropdown.styles_1tihqkp.css +0 -3
  263. package/es/components/Dropdown/hooks/useHashMaps.js +0 -27
  264. package/es/components/Dropdown/hooks/useHashMaps.js.map +0 -1
  265. package/es/components/Dropdown/hooks/useKeyboardNavigation.js +0 -196
  266. package/es/components/Dropdown/hooks/useKeyboardNavigation.js.map +0 -1
  267. package/es/components/Dropdown/reducers/focusedPathReducer.js +0 -33
  268. package/es/components/Dropdown/reducers/focusedPathReducer.js.map +0 -1
  269. package/es/components/Dropdown/reducers/pathReducer.js +0 -37
  270. package/es/components/Dropdown/reducers/pathReducer.js.map +0 -1
  271. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +0 -115
  272. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +0 -1
  273. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1o4szyu.css +0 -5
  274. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -23
  275. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +0 -1
  276. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles_12e50g5.css +0 -4
  277. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +0 -4
  278. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js +0 -107
  279. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js.map +0 -1
  280. package/es/components/Dropdown/ui/DropdownItemOld/variations/_size/base.js.map +0 -1
  281. package/es/components/Dropdown/ui/DropdownItemOld/variations/_view/base.js.map +0 -1
  282. package/styled-components/cjs/components/Combobox/utils/index.js +0 -23
  283. package/styled-components/cjs/components/Dropdown/hooks/useHashMaps.js +0 -29
  284. package/styled-components/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +0 -199
  285. package/styled-components/cjs/components/Dropdown/reducers/focusedPathReducer.js +0 -40
  286. package/styled-components/cjs/components/Dropdown/reducers/pathReducer.js +0 -44
  287. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +0 -114
  288. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.type.js +0 -5
  289. package/styled-components/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -33
  290. package/styled-components/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.type.js +0 -5
  291. package/styled-components/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js +0 -119
  292. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +0 -25
  293. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.js +0 -11
  294. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +0 -292
  295. package/styled-components/es/components/Combobox/utils/index.js +0 -15
  296. package/styled-components/es/components/Dropdown/hooks/useHashMaps.js +0 -23
  297. package/styled-components/es/components/Dropdown/hooks/useKeyboardNavigation.js +0 -193
  298. package/styled-components/es/components/Dropdown/reducers/focusedPathReducer.js +0 -34
  299. package/styled-components/es/components/Dropdown/reducers/pathReducer.js +0 -38
  300. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +0 -108
  301. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.type.js +0 -1
  302. package/styled-components/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -25
  303. package/styled-components/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.type.js +0 -1
  304. package/styled-components/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js +0 -111
  305. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +0 -19
  306. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.js +0 -5
  307. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +0 -292
  308. package/types/components/Combobox/utils/index.d.ts +0 -4
  309. package/types/components/Combobox/utils/index.d.ts.map +0 -1
  310. package/types/components/Dropdown/hooks/useHashMaps.d.ts +0 -6
  311. package/types/components/Dropdown/hooks/useHashMaps.d.ts.map +0 -1
  312. package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts +0 -23
  313. package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts.map +0 -1
  314. package/types/components/Dropdown/reducers/focusedPathReducer.d.ts +0 -16
  315. package/types/components/Dropdown/reducers/focusedPathReducer.d.ts.map +0 -1
  316. package/types/components/Dropdown/reducers/pathReducer.d.ts +0 -20
  317. package/types/components/Dropdown/reducers/pathReducer.d.ts.map +0 -1
  318. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts +0 -5
  319. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts.map +0 -1
  320. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts +0 -26
  321. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts.map +0 -1
  322. package/types/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.d.ts +0 -7
  323. package/types/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.d.ts.map +0 -1
  324. package/types/components/Dropdown/ui/DropdownItemOld/DropdownItem.type.d.ts +0 -60
  325. package/types/components/Dropdown/ui/DropdownItemOld/DropdownItem.type.d.ts.map +0 -1
  326. package/types/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.d.ts +0 -58
  327. package/types/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.d.ts.map +0 -1
  328. package/types/components/Dropdown/ui/DropdownItemOld/variations/_size/base.d.ts.map +0 -1
  329. package/types/components/Dropdown/ui/DropdownItemOld/variations/_view/base.d.ts.map +0 -1
  330. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts.map +0 -1
  331. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +0 -13
  332. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +0 -1
  333. /package/cjs/components/Dropdown/ui/{DropdownItemOld → DropdownItem}/variations/_size/base_x642ct.css +0 -0
  334. /package/cjs/components/Dropdown/ui/{DropdownItemOld → DropdownItem}/variations/_view/base_x642ct.css +0 -0
  335. /package/es/components/Dropdown/ui/{DropdownItemOld → DropdownItem}/variations/_size/base_x642ct.css +0 -0
  336. /package/es/components/Dropdown/ui/{DropdownItemOld → DropdownItem}/variations/_view/base_x642ct.css +0 -0
  337. /package/styled-components/cjs/components/Dropdown/ui/{DropdownItemOld → DropdownItem}/variations/_size/base.js +0 -0
  338. /package/styled-components/cjs/components/Dropdown/ui/{DropdownItemOld → DropdownItem}/variations/_view/base.js +0 -0
  339. /package/styled-components/es/components/Dropdown/ui/{DropdownItemOld → DropdownItem}/variations/_size/base.js +0 -0
  340. /package/styled-components/es/components/Dropdown/ui/{DropdownItemOld → DropdownItem}/variations/_view/base.js +0 -0
  341. /package/types/components/Dropdown/ui/{DropdownItemOld → DropdownItem}/variations/_size/base.d.ts +0 -0
  342. /package/types/components/Dropdown/ui/{DropdownItemOld → DropdownItem}/variations/_view/base.d.ts +0 -0
  343. /package/types/examples/plasma_b2c/components/Dropdown/{Dropdown.config.d.ts → Normal/Dropdown.config.d.ts} +0 -0
@@ -2,91 +2,20 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
6
- var React = require('react');
7
- var plasmaCore = require('@salutejs/plasma-core');
8
- var Combobox_tokens = require('../../Combobox.tokens.js');
9
- var index = require('../../utils/index.js');
10
- var index$1 = require('../../../../utils/index.js');
5
+ require('react');
6
+ require('@salutejs/plasma-core');
7
+ require('@linaria/react');
8
+ require('@linaria/core');
9
+ require('focus-visible');
10
+ require('react-dom');
11
+ require('react-popper');
12
+ require('../../../../utils/react.js');
13
+ var DropdownItem = require('../../../Dropdown/ui/DropdownItem/DropdownItem.js');
11
14
  var base = require('./variations/_view/base.js');
12
15
  var base$1 = require('./variations/_size/base.js');
13
16
  var ComboboxItem_styles = require('./ComboboxItem.styles.js');
14
17
 
15
- var _excluded = ["id", "className", "children", "text", "isSelected", "name", "checked", "value", "view", "size", "disabled", "role", "contentLeft", "contentRight", "onSelect", "onClick", "onChange"];
16
- var comboboxItemRoot = function comboboxItemRoot(Root) {
17
- return /*#__PURE__*/React.forwardRef(function (_ref, outerRootRef) {
18
- var id = _ref.id,
19
- className = _ref.className,
20
- children = _ref.children,
21
- text = _ref.text,
22
- isSelected = _ref.isSelected,
23
- name = _ref.name,
24
- checked = _ref.checked,
25
- value = _ref.value,
26
- view = _ref.view,
27
- size = _ref.size,
28
- disabled = _ref.disabled,
29
- _ref$role = _ref.role,
30
- role = _ref$role === void 0 ? 'option' : _ref$role,
31
- ContentLeftComponent = _ref.contentLeft,
32
- ContentRightComponent = _ref.contentRight,
33
- onSelect = _ref.onSelect,
34
- onClick = _ref.onClick,
35
- onChange = _ref.onChange,
36
- rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
37
- var uniqId = plasmaCore.safeUseId();
38
- var innerId = id || uniqId;
39
- var withComboboxItemIsSelected = checked || isSelected ? Combobox_tokens.classes.comboboxItemIsDisabled : undefined;
40
- var withComboboxItemIsDisabled = disabled ? Combobox_tokens.classes.comboboxItemIsDisabled : undefined;
41
- var handleOnClick = React.useCallback(function (event) {
42
- if (disabled) {
43
- return;
44
- }
45
- onClick === null || onClick === void 0 || onClick(event);
46
- if (onSelect && !ContentLeftComponent) {
47
- onSelect(value, text);
48
- }
49
- }, [onSelect, disabled]);
50
- var handleOnChange = React.useCallback(function (event) {
51
- if (disabled) {
52
- return;
53
- }
54
- onChange === null || onChange === void 0 || onChange(event);
55
- if (onSelect && ContentLeftComponent) {
56
- onSelect(value, text);
57
- }
58
- }, [onSelect, disabled]);
59
- var contentProps = _rollupPluginBabelHelpers.objectSpread2({
60
- name: name,
61
- value: value,
62
- checked: checked || isSelected,
63
- disabled: disabled,
64
- tabIndex: -1
65
- }, !disabled && {
66
- onChange: handleOnChange
67
- });
68
- var ContentLeft = React.useMemo(function () {
69
- return index.getValidComponent(ContentLeftComponent, contentProps);
70
- }, [ContentRightComponent, contentProps]);
71
- var ContentRight = React.useMemo(function () {
72
- return index.getValidComponent(ContentRightComponent, contentProps);
73
- }, [ContentRightComponent, contentProps]);
74
- return /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
75
- className: index$1.cx(withComboboxItemIsSelected, withComboboxItemIsDisabled, className),
76
- view: view,
77
- size: size,
78
- id: innerId,
79
- isSelected: isSelected,
80
- role: role,
81
- ref: outerRootRef,
82
- tabIndex: 0,
83
- "aria-disabled": disabled,
84
- "aria-selected": isSelected,
85
- onClick: handleOnClick,
86
- "data-value": value
87
- }, rest), text ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ComboboxItem_styles.StyledContentLeft, null, ContentLeftComponent && ContentLeft), /*#__PURE__*/React.createElement(ComboboxItem_styles.StyledText, null, text), /*#__PURE__*/React.createElement(ComboboxItem_styles.StyledContentRight, null, ContentRightComponent && ContentRight)) : children);
88
- });
89
- };
18
+ var comboboxItemRoot = DropdownItem.dropdownItemRoot;
90
19
  var comboboxItemConfig = {
91
20
  name: 'ComboboxItem',
92
21
  tag: 'div',
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxItem.js","sources":["../../../../../src/components/Combobox/ui/ComboboxItem/ComboboxItem.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../../../engines';\nimport { classes } from '../../Combobox.tokens';\nimport { getValidComponent } from '../../utils';\nimport { cx } from '../../../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledContentLeft, StyledContentRight, StyledText, base } from './ComboboxItem.styles';\nimport { ComboboxItemProps } from './ComboboxItem.type';\n\nexport const comboboxItemRoot = (Root: RootProps<HTMLDivElement, ComboboxItemProps>) =>\n forwardRef<HTMLDivElement, ComboboxItemProps>(\n (\n {\n id,\n className,\n children,\n text,\n isSelected,\n name,\n checked,\n value,\n view,\n size,\n disabled,\n role = 'option',\n contentLeft: ContentLeftComponent,\n contentRight: ContentRightComponent,\n onSelect,\n onClick,\n onChange,\n ...rest\n },\n outerRootRef,\n ) => {\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n\n const withComboboxItemIsSelected = checked || isSelected ? classes.comboboxItemIsDisabled : undefined;\n const withComboboxItemIsDisabled = disabled ? classes.comboboxItemIsDisabled : undefined;\n\n const handleOnClick = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n if (disabled) {\n return;\n }\n\n onClick?.(event);\n\n if (onSelect && !ContentLeftComponent) {\n onSelect(value, text);\n }\n },\n [onSelect, disabled],\n );\n\n const handleOnChange = useCallback(\n (event: React.MouseEvent<HTMLInputElement>) => {\n if (disabled) {\n return;\n }\n\n onChange?.(event);\n\n if (onSelect && ContentLeftComponent) {\n onSelect(value, text);\n }\n },\n [onSelect, disabled],\n );\n\n const contentProps = {\n name,\n value,\n checked: checked || isSelected,\n disabled,\n tabIndex: -1,\n ...(!disabled && { onChange: handleOnChange }),\n };\n\n const ContentLeft = useMemo(() => getValidComponent(ContentLeftComponent, contentProps), [\n ContentRightComponent,\n contentProps,\n ]);\n\n const ContentRight = useMemo(() => getValidComponent(ContentRightComponent, contentProps), [\n ContentRightComponent,\n contentProps,\n ]);\n\n return (\n <Root\n className={cx(withComboboxItemIsSelected, withComboboxItemIsDisabled, className)}\n view={view}\n size={size}\n id={innerId}\n isSelected={isSelected}\n role={role}\n ref={outerRootRef}\n tabIndex={0}\n aria-disabled={disabled}\n aria-selected={isSelected}\n onClick={handleOnClick}\n data-value={value}\n {...rest}\n >\n {text ? (\n <>\n <StyledContentLeft>{ContentLeftComponent && ContentLeft}</StyledContentLeft>\n <StyledText>{text}</StyledText>\n <StyledContentRight>{ContentRightComponent && ContentRight}</StyledContentRight>\n </>\n ) : (\n children\n )}\n </Root>\n );\n },\n );\n\nexport const comboboxItemConfig = {\n name: 'ComboboxItem',\n tag: 'div',\n layout: comboboxItemRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["comboboxItemRoot","Root","forwardRef","_ref","outerRootRef","id","className","children","text","isSelected","name","checked","value","view","size","disabled","_ref$role","role","ContentLeftComponent","contentLeft","ContentRightComponent","contentRight","onSelect","onClick","onChange","rest","_objectWithoutProperties","_excluded","uniqId","safeUseId","innerId","withComboboxItemIsSelected","classes","comboboxItemIsDisabled","undefined","withComboboxItemIsDisabled","handleOnClick","useCallback","event","handleOnChange","contentProps","_objectSpread","tabIndex","ContentLeft","useMemo","getValidComponent","ContentRight","React","createElement","_extends","cx","ref","Fragment","StyledContentLeft","StyledText","StyledContentRight","comboboxItemConfig","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;IAaaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,IAAkD,EAAA;AAAA,EA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G,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE1D,gBAAgB;AACxB2D,EAAAA,IAAI,EAAJA,wBAAI;AACJC,EAAAA,UAAU,EAAE;AACR/C,IAAAA,IAAI,EAAE;AACFgD,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDhD,IAAAA,IAAI,EAAE;AACF+C,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNnD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"ComboboxItem.js","sources":["../../../../../src/components/Combobox/ui/ComboboxItem/ComboboxItem.tsx"],"sourcesContent":["import { dropdownItemRoot } from '../../../Dropdown';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base } from './ComboboxItem.styles';\n\nexport const comboboxItemRoot = dropdownItemRoot;\n\nexport const comboboxItemConfig = {\n name: 'ComboboxItem',\n tag: 'div',\n layout: comboboxItemRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["comboboxItemRoot","dropdownItemRoot","comboboxItemConfig","name","tag","layout","base","variations","view","css","viewCSS","size","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;AAMO,IAAMA,gBAAgB,GAAGC,8BAAgB;AAEzC,IAAMC,kBAAkB,GAAG;AAC9BC,EAAAA,IAAI,EAAE,cAAc;AACpBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEL,gBAAgB;AACxBM,EAAAA,IAAI,EAAJA,wBAAI;AACJC,EAAAA,UAAU,EAAE;AACRC,IAAAA,IAAI,EAAE;AACFC,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDC,IAAAA,IAAI,EAAE;AACFF,MAAAA,GAAG,EAAEG,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNL,IAAAA,IAAI,EAAE,SAAS;AACfG,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
@@ -1,30 +1,18 @@
1
- import './ComboboxItem.styles_s4sk53.css';
1
+ import './ComboboxItem.styles_936wgl.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var react = require('@linaria/react');
6
+ require('react');
7
+ require('@salutejs/plasma-core');
8
+ require('@linaria/react');
9
+ require('@linaria/core');
7
10
  require('focus-visible');
11
+ require('react-dom');
12
+ require('react-popper');
13
+ require('../../../../utils/react.js');
8
14
 
9
- var StyledContentLeft = /*#__PURE__*/react.styled('div')({
10
- name: "StyledContentLeft",
11
- "class": "s1thh7ji",
12
- propsAsIs: false
13
- });
14
- var StyledContentRight = /*#__PURE__*/react.styled('div')({
15
- name: "StyledContentRight",
16
- "class": "s1exy6xj",
17
- propsAsIs: false
18
- });
19
- var StyledText = /*#__PURE__*/react.styled('div')({
20
- name: "StyledText",
21
- "class": "s18437sq",
22
- propsAsIs: false
23
- });
24
- var base = "bvoi56l";
15
+ var base = "b1thh7ji";
25
16
 
26
- exports.StyledContentLeft = StyledContentLeft;
27
- exports.StyledContentRight = StyledContentRight;
28
- exports.StyledText = StyledText;
29
17
  exports.base = base;
30
18
  //# sourceMappingURL=ComboboxItem.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxItem.styles.js","sources":["../../../../../src/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Combobox.tokens';\nimport { addFocus, applyEllipsis } from '../../../../mixins';\n\nexport const StyledContentLeft = styled.div`\n display: inline-flex;\n\n min-width: var(${tokens.itemContentLeftWidth});\n color: var(${tokens.itemContentLeftColor});\n`;\n\nexport const StyledContentRight = styled.div`\n margin-left: auto;\n display: inline-flex;\n\n min-width: var(${tokens.itemContentRightWidth});\n color: var(${tokens.itemContentRightColor});\n`;\n\nexport const StyledText = styled.div`\n ${applyEllipsis()};\n`;\n\n// INFO: Для возможности переиспользования стилей в других компонентах\nexport const baseContent = `\n box-sizing: content-box;\n display: flex;\n align-items: center;\n user-select: none;\n\n :focus {\n outline: none;\n }\n\n ${addFocus({\n outlineSize: '0.0625rem',\n outlineOffset: '0',\n outlineColor: `var(${tokens.focusColor})`,\n outlineRadius: `var(${tokens.itemBorderRadius})`,\n hasTransition: false,\n })};\n\n width: 100%;\n\n font-family: var(${tokens.itemFontFamily});\n font-size: var(${tokens.itemFontSize});\n font-style: var(${tokens.itemFontStyle});\n font-weight: var(${tokens.itemFontWeightBold});\n letter-spacing: var(${tokens.itemFontLetterSpacing});\n line-height: var(${tokens.itemFontLineHeight});\n\n background: var(${tokens.itemBackground});\n color: var(${tokens.itemColor});\n border-radius: var(${tokens.itemBorderRadius});\n\n width: var(${tokens.itemWidth});\n height: var(${tokens.itemHeight});\n\n padding: var(${tokens.itemPaddingTop}) var(${tokens.itemPaddingRight}) var(${tokens.itemPaddingBottom})\n var(${tokens.itemPaddingLeft});\n\n margin: var(${tokens.itemMarginTop}) var(${tokens.itemMarginRight}) var(${tokens.itemMarginBottom})\n var(${tokens.itemMarginLeft});\n\n &:hover:not(.${classes.comboboxItemIsDisabled}) {\n cursor: pointer;\n background: var(${tokens.itemBackgroundHover});\n }\n\n &.${String(classes.comboboxItemIsSelected)} {\n color: var(${tokens.itemColorSelected});\n background: var(${tokens.itemBackgroundSelected});\n\n &:hover:not(.${classes.comboboxItemIsDisabled}) {\n background: var(${tokens.itemBackgroundSelectedHover});\n }\n }\n\n &.${classes.comboboxItemIsDisabled} {\n opacity: var(${tokens.disabledOpacity});\n cursor: not-allowed;\n }\n`;\n\nexport const base = css`\n ${baseContent};\n`;\n"],"names":["StyledContentLeft","styled","name","class","propsAsIs","StyledContentRight","StyledText","base"],"mappings":";;;;;;;AAMO,IAAMA,iBAAiB,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,mBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAKtC,EAAA;AAEM,IAAMC,kBAAkB,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,oBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAMvC,EAAA;AAEM,IAAME,UAAU,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE/B,EAAA;AA+DM,IAAMG,IAAI,GAEhB;;;;;;;"}
1
+ {"version":3,"file":"ComboboxItem.styles.js","sources":["../../../../../src/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { tokens } from '../../Combobox.tokens';\nimport { dropdownTokens } from '../../../Dropdown';\nimport { baseContent as dropdownItemBase } from '../../../Dropdown/ui/DropdownItem/DropdownItem.styles';\n\n// NOTE: Необходимое переопределение токенов из компонента DropdownItem т.к. используются его части\nexport const mappingOverride = `\n ${dropdownTokens.itemBackground}: var(${tokens.itemBackground});\n ${dropdownTokens.itemColor}: var(${tokens.itemColor});\n ${dropdownTokens.itemBackgroundHover}: var(${tokens.itemBackgroundHover});\n ${dropdownTokens.itemBackgroundSelected}: var(${tokens.itemBackgroundSelected});\n ${dropdownTokens.itemColorSelected}: var(${tokens.itemColorSelected});\n ${dropdownTokens.itemBackgroundSelectedHover}: var(${tokens.itemBackgroundSelectedHover});\n ${dropdownTokens.itemColorSelectedHover}: var(${tokens.itemColorSelectedHover});\n ${dropdownTokens.itemContentLeftColor}: var(${tokens.itemContentLeftColor});\n ${dropdownTokens.itemContentRightColor}: var(${tokens.itemContentRightColor});\n ${dropdownTokens.disabledOpacity}: var(${tokens.disabledOpacity});\n ${dropdownTokens.focusColor}: var(${tokens.focusColor});\n ${dropdownTokens.itemWidth}: var(${tokens.itemWidth});\n ${dropdownTokens.itemHeight}: var(${tokens.itemHeight});\n ${dropdownTokens.itemBorderRadius}: var(${tokens.itemBorderRadius});\n ${dropdownTokens.itemPaddingTop}: var(${tokens.itemPaddingTop});\n ${dropdownTokens.itemPaddingRight}: var(${tokens.itemPaddingRight});\n ${dropdownTokens.itemPaddingBottom}: var(${tokens.itemPaddingBottom});\n ${dropdownTokens.itemPaddingLeft}: var(${tokens.itemPaddingLeft});\n ${dropdownTokens.itemMarginTop}: var(${tokens.itemMarginTop});\n ${dropdownTokens.itemMarginRight}: var(${tokens.itemMarginRight});\n ${dropdownTokens.itemMarginBottom}: var(${tokens.itemMarginBottom});\n ${dropdownTokens.itemMarginLeft}: var(${tokens.itemMarginLeft});\n ${dropdownTokens.itemFontFamily}: var(${tokens.itemFontFamily});\n ${dropdownTokens.itemFontSize}: var(${tokens.itemFontSize});\n ${dropdownTokens.itemFontStyle}: var(${tokens.itemFontStyle});\n ${dropdownTokens.itemFontWeightBold}: var(${tokens.itemFontWeightBold});\n ${dropdownTokens.itemFontLetterSpacing}: var(${tokens.itemFontLetterSpacing});\n ${dropdownTokens.itemFontLineHeight}: var(${tokens.itemFontLineHeight});\n ${dropdownTokens.itemContentLeftWidth}: var(${tokens.itemContentLeftWidth});\n ${dropdownTokens.itemContentRightWidth}: var(${tokens.itemContentRightWidth});\n`;\n\nexport const base = css`\n ${dropdownItemBase};\n ${mappingOverride};\n`;\n"],"names":["base"],"mappings":";;;;;;;;;;;;;AAwCO,IAAMA,IAAI,GAGhB;;;;"}
@@ -0,0 +1 @@
1
+ .b1thh7ji{box-sizing:content-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;width:100%;font-family:var(--plasma-dropdown-item-font-family);font-size:var(--plasma-dropdown-item-font-size);font-style:var(--plasma-dropdown-item-font-style);font-weight:var(--plasma-dropdown-item-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-item-line-height);-moz-letter-spacing:var(--plasma-dropdown-item-line-height);-ms-letter-spacing:var(--plasma-dropdown-item-line-height);letter-spacing:var(--plasma-dropdown-item-line-height);line-height:var(--plasma-dropdown-item-font-weight);background:var(--plasma-dropdown-item-background);color:var(--plasma-dropdown-item-color);border-radius:var(--plasma-dropdown-item-border-radius);width:var(--plasma-dropdown-item-width);height:var(--plasma-dropdown-item-height);padding:var(--plasma-dropdown-item-padding-top) var(--plasma-dropdown-item-padding-right) var(--plasma-dropdown-item-padding-bottom) var(--plasma-dropdown-item-padding-left);margin:var(--plasma-dropdown-item-margin-top) var(--plasma-dropdown-item-margin-right) var(--plasma-dropdown-item-margin-bottom) var(--plasma-dropdown-item-margin-left);--plasma-dropdown-item-background:var(--plasma-combobox-item-background);--plasma-dropdown-item-color:var(--plasma-combobox-item-color);--plasma-dropdown-item-background-hover:var(--plasma-combobox-item-background-hover);--plasma-dropdown-item-background-selected:var(--plasma-combobox-item-background-selected);--plasma-dropdown-item-color-selected:var(--plasma-combobox-item-color-selected);--plasma-dropdown-item-background-selected-hover:var(--plasma-combobox-item-background-selected-hover);--plasma-dropdown-item-color-selected-hover:var(--plasma-combobox-item-color-selected-hover);--plasma-dropdown-item-content-left-color:var(--plasma-combobox-item-content-left-color);--plasma-dropdown-item-content-right-color:var(--plasma-combobox-item-content-right-color);--plasma-dropdown-disabled-opacity:var(--plasma-combobox-disabled-opacity);--plasma-dropdown-focus-color:var(--plasma-combobox-focus-color);--plasma-dropdown-item-width:var(--plasma-combobox-item-width);--plasma-dropdown-item-height:var(--plasma-combobox-item-height);--plasma-dropdown-item-border-radius:var(--plasma-combobox-item-border-radius);--plasma-dropdown-item-padding-top:var(--plasma-combobox-item-padding-top);--plasma-dropdown-item-padding-right:var(--plasma-combobox-item-padding-right);--plasma-dropdown-item-padding-bottom:var(--plasma-combobox-item-padding-bottom);--plasma-dropdown-item-padding-left:var(--plasma-combobox-item-padding-left);--plasma-dropdown-item-margin-top:var(--plasma-combobox-item-margin-top);--plasma-dropdown-item-margin-right:var(--plasma-combobox-item-margin-right);--plasma-dropdown-item-margin-bottom:var(--plasma-combobox-item-margin-bottom);--plasma-dropdown-item-margin-left:var(--plasma-combobox-item-margin-left);--plasma-dropdown-item-font-family:var(--plasma-combobox-item-font-family);--plasma-dropdown-item-font-size:var(--plasma-combobox-item-font-size);--plasma-dropdown-item-font-style:var(--plasma-combobox-item-font-style);--plasma-dropdown-item-letter-spacing:var(--plasma-combobox-item-letter-spacing);--plasma-dropdown-item-line-height:var(--plasma-combobox-item-line-height);--plasma-dropdown-item-font-weight:var(--plasma-combobox-item-font-weight);--plasma-dropdown-item-content-left-width:var(--plasma-combobox-item-content-left-width);--plasma-dropdown-item-content-right-width:var(--plasma-combobox-item-content-right-width);}.b1thh7ji:focus{outline:none;}.b1thh7ji::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:var(--plasma-dropdown-item-border-radius);-webkit-transition:none;transition:none;pointer-events:none;}.b1thh7ji.focus-visible:focus::before,.b1thh7ji[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-dropdown-focus-color);}.b1thh7ji:hover:not(.dropdown-item-is-disabled){cursor:pointer;background:var(--plasma-dropdown-item-background-hover);}.b1thh7ji.dropdown-item-is-selected{color:var(--plasma-dropdown-item-color-selected);background:var(--plasma-dropdown-item-background-selected);}.b1thh7ji.dropdown-item-is-selected:hover:not(.dropdown-item-is-disabled){background:var(--plasma-dropdown-item-background-selected-hover);}.b1thh7ji.dropdown-item-is-disabled{opacity:var(--plasma-dropdown-disabled-opacity);cursor:not-allowed;}
@@ -1,30 +1,7 @@
1
- .DropdownDivider_styles_v3xor1_s1brpi5d__3a791565{background:var(--plasma-dropdown-divider-color);width:var(--plasma-dropdown-divider-width);height:var(--plasma-dropdown-divider-height);margin:var(--plasma-dropdown-divider-margin-top) var(--plasma-dropdown-divider-margin-right) var(--plasma-dropdown-divider-margin-bottom) var(--plasma-dropdown-divider-margin-left);}
2
-
3
- .DropdownFooter_styles_1j4sg1p_stiw0r3__41ff7287{background:var(--plasma-dropdown-footer-background);font-family:var(--plasma-dropdown-footer-font-family);font-size:var(--plasma-dropdown-footer-font-size);font-style:var(--plasma-dropdown-footer-font-style);font-weight:var(--plasma-dropdown-footer-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-footer-line-height);-moz-letter-spacing:var(--plasma-dropdown-footer-line-height);-ms-letter-spacing:var(--plasma-dropdown-footer-line-height);letter-spacing:var(--plasma-dropdown-footer-line-height);line-height:var(--plasma-dropdown-footer-font-weight);width:var(--plasma-dropdown-footer-width);height:var(--plasma-dropdown-footer-height);padding:var(--plasma-dropdown-footer-padding-top) var(--plasma-dropdown-footer-padding-right) var(--plasma-dropdown-footer-padding-bottom) var(--plasma-dropdown-footer-padding-left);margin:var(--plasma-dropdown-footer-margin-top) var(--plasma-dropdown-footer-margin-right) var(--plasma-dropdown-footer-margin-bottom) var(--plasma-dropdown-footer-margin-left);}
4
-
5
- .DropdownGroup_styles_1o990eo_scop7qk__fca8c58e{background:var(--plasma-dropdown-group-background);width:var(--plasma-dropdown-group-width);height:var(--plasma-dropdown-group-height);padding:var(--plasma-dropdown-group-padding-top) var(--plasma-dropdown-group-padding-right) var(--plasma-dropdown-group-padding-bottom) var(--plasma-dropdown-group-padding-left);margin:var(--plasma-dropdown-group-margin-top) var(--plasma-dropdown-group-margin-right) var(--plasma-dropdown-group-margin-bottom) var(--plasma-dropdown-group-margin-left);}
6
- .DropdownGroup_styles_1o990eo_s1oaw95y__fca8c58e{font-family:var(--plasma-dropdown-group-label-font-family);font-size:var(--plasma-dropdown-group-label-font-size);font-style:var(--plasma-dropdown-group-label-font-style);font-weight:var(--plasma-dropdown-group-label-font-weight);-webkit-letter-spacing:var(--plasma-dropdown-group-label-letter-spacing);-moz-letter-spacing:var(--plasma-dropdown-group-label-letter-spacing);-ms-letter-spacing:var(--plasma-dropdown-group-label-letter-spacing);letter-spacing:var(--plasma-dropdown-group-label-letter-spacing);line-height:var(--plasma-dropdown-group-label-line-height);color:var(--plasma-dropdown-group-label-color);padding:var(--plasma-dropdown-group-label-padding-top) var(--plasma-dropdown-group-label-padding-right) var(--plasma-dropdown-group-label-padding-bottom) var(--plasma-dropdown-group-label-padding-left);margin:var(--plasma-dropdown-group-label-margin-top) var(--plasma-dropdown-group-label-margin-right) var(--plasma-dropdown-group-label-margin-bottom) var(--plasma-dropdown-group-label-margin-left);}
7
-
8
- .DropdownHeader_styles_196gwgm_s133b1g2__3510806e{background:var(--plasma-dropdown-header-background);font-family:var(--plasma-dropdown-header-font-family);font-size:var(--plasma-dropdown-header-font-size);font-style:var(--plasma-dropdown-header-font-style);font-weight:var(--plasma-dropdown-header-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-header-line-height);-moz-letter-spacing:var(--plasma-dropdown-header-line-height);-ms-letter-spacing:var(--plasma-dropdown-header-line-height);letter-spacing:var(--plasma-dropdown-header-line-height);line-height:var(--plasma-dropdown-header-font-weight);width:var(--plasma-dropdown-header-width);height:var(--plasma-dropdown-header-height);padding:var(--plasma-dropdown-header-padding-top) var(--plasma-dropdown-header-padding-right) var(--plasma-dropdown-header-padding-bottom) var(--plasma-dropdown-header-padding-left);margin:var(--plasma-dropdown-header-margin-top) var(--plasma-dropdown-header-margin-right) var(--plasma-dropdown-header-margin-bottom) var(--plasma-dropdown-header-margin-left);}
9
-
10
- .IconRoot_7pl7ig_svvlqhf__32c458a1{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:var(--svvlqhf-0);height:var(--svvlqhf-0);-webkit-flex:0 0 var(--svvlqhf-0);-ms-flex:0 0 var(--svvlqhf-0);flex:0 0 var(--svvlqhf-0);}
11
-
12
- .DropdownItem_styles_1o4szyu_s1gkzlls__6703745b{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
13
- .DropdownItem_styles_1o4szyu_sz6s14y__6703745b{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
14
- .DropdownItem_styles_1o4szyu_d1m97l2m__6703745b{line-height:0;color:var(--plasma-dropdown-disclosure-icon-color);}
15
- .DropdownItem_styles_1o4szyu_soib72h__6703745b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-flex:1;-ms-flex:1;flex:1;}
16
- .DropdownItem_styles_1o4szyu_w6l2f0g__6703745b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:0;box-sizing:content-box;padding-top:var(--w6l2f0g-0);padding-right:var(--plasma-dropdown-item-padding-right);padding-bottom:var(--w6l2f0g-1);padding-left:var(--plasma-dropdown-item-padding-left);font-family:var(--plasma-dropdown-item-font-family);font-size:var(--plasma-dropdown-item-font-size);font-style:var(--plasma-dropdown-item-font-style);font-weight:var(--plasma-dropdown-item-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-item-line-height);-moz-letter-spacing:var(--plasma-dropdown-item-line-height);-ms-letter-spacing:var(--plasma-dropdown-item-line-height);letter-spacing:var(--plasma-dropdown-item-line-height);line-height:var(--plasma-dropdown-item-font-weight);background:var(--plasma-dropdown-item-background);color:var(--plasma-dropdown-item-color);border-radius:var(--plasma-dropdown-item-border-radius);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b:hover:not(.DropdownItem_styles_1o4szyu_dropdownItemIsDisabled__6703745b){cursor:pointer;background:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b.DropdownItem_styles_1o4szyu_dropdownItemIsActive__6703745b{background:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b.DropdownItem_styles_1o4szyu_dropdownItemIsDisabled__6703745b{opacity:var(--plasma-dropdown-disabled-opacity);cursor:not-allowed;}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b:focus{outline:none;}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:var(--plasma-dropdown-item-border-radius);-webkit-transition:none;transition:none;pointer-events:none;}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b.DropdownItem_styles_1o4szyu_dropdownItemIsFocused__6703745b:before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-dropdown-focus-color);}
17
-
18
- .DropdownItem_styles_12e50g5_s1iqs5in__94ac8eef{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-width:var(--plasma-dropdown-item-content-left-width);color:var(--plasma-dropdown-item-content-left-color);}
19
- .DropdownItem_styles_12e50g5_sfg3dyd__94ac8eef{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-width:var(--plasma-dropdown-item-content-right-width);color:var(--plasma-dropdown-item-content-right-color);}
20
- .DropdownItem_styles_12e50g5_s1dea6tl__94ac8eef{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
21
- .DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef{box-sizing:content-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;width:auto;font-family:var(--plasma-dropdown-item-font-family);font-size:var(--plasma-dropdown-item-font-size);font-style:var(--plasma-dropdown-item-font-style);font-weight:var(--plasma-dropdown-item-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-item-line-height);-moz-letter-spacing:var(--plasma-dropdown-item-line-height);-ms-letter-spacing:var(--plasma-dropdown-item-line-height);letter-spacing:var(--plasma-dropdown-item-line-height);line-height:var(--plasma-dropdown-item-font-weight);background:var(--plasma-dropdown-item-background);color:var(--plasma-dropdown-item-color);border-radius:var(--plasma-dropdown-item-border-radius);width:var(--plasma-dropdown-item-width);height:var(--plasma-dropdown-item-height);padding:var(--plasma-dropdown-item-padding-top) var(--plasma-dropdown-item-padding-right) var(--plasma-dropdown-item-padding-bottom) var(--plasma-dropdown-item-padding-left);margin:var(--plasma-dropdown-item-margin-top) var(--plasma-dropdown-item-margin-right) var(--plasma-dropdown-item-margin-bottom) var(--plasma-dropdown-item-margin-left);}.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef:focus{outline:none;}.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:var(--plasma-dropdown-item-border-radius);-webkit-transition:none;transition:none;pointer-events:none;}.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef.DropdownItem_styles_12e50g5_focusVisible__94ac8eef:focus::before,.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-dropdown-focus-color);}.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef:hover:not(.DropdownItem_styles_12e50g5_dropdownItemIsDisabled__94ac8eef){cursor:pointer;background:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef.DropdownItem_styles_12e50g5_dropdownItemIsSelected__94ac8eef{color:var(--plasma-dropdown-item-color-selected);background:var(--plasma-dropdown-item-background-selected);}.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef.DropdownItem_styles_12e50g5_dropdownItemIsSelected__94ac8eef:hover:not(.DropdownItem_styles_12e50g5_dropdownItemIsDisabled__94ac8eef){background:var(--plasma-dropdown-item-background-selected-hover);}.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef.DropdownItem_styles_12e50g5_dropdownItemIsDisabled__94ac8eef{opacity:var(--plasma-dropdown-disabled-opacity);cursor:not-allowed;}
22
-
23
1
  .Popover_styles_rmr9za_s1g1xbt5__0bafa6fb{display:inline-block;}
24
2
  .Popover_styles_rmr9za_s12xwbyh__0bafa6fb{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;box-sizing:border-box;position:relative;}
25
3
  .Popover_styles_rmr9za_s1pd4d8a__0bafa6fb{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb::before{position:absolute;width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);-webkit-mask-image:var(--plasma-popover-arrow-mask-image);mask-image:var(--plasma-popover-arrow-mask-image);background:var(--plasma-popover-arrow-background);content:'';-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}
26
4
  .Popover_styles_rmr9za_s16xlixz__0bafa6fb{position:absolute;z-index:var(--s16xlixz-0);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{right:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{left:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:unset !important;bottom:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}
27
5
 
28
- .Dropdown_styles_1tihqkp_sn7uamp__39673f55 .Dropdown_styles_1tihqkp_popoverWrapper__39673f55,.Dropdown_styles_1tihqkp_sn7uamp__39673f55 .Dropdown_styles_1tihqkp_popoverTarget__39673f55{display:block;}
29
- .Dropdown_styles_1tihqkp_ujr7fmv__39673f55{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(--ujr7fmv-0);height:var(--ujr7fmv-1);overflow:var(--ujr7fmv-2);margin:var(--ujr7fmv-3);padding:var(--plasma-dropdown-padding);}
30
- .Dropdown_styles_1tihqkp_byfocd2__39673f55{display:inline-block;}
6
+ .Dropdown_styles_1daxhqh_sn7uamp__488e0a19 .Dropdown_styles_1daxhqh_popoverTarget__488e0a19{display:block;}
7
+ .Dropdown_styles_1daxhqh_sjr7fmv__488e0a19{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);}
@@ -4,166 +4,82 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
6
6
  var React = require('react');
7
- var index = require('../../utils/index.js');
8
- var pathReducer = require('./reducers/pathReducer.js');
9
- var focusedPathReducer = require('./reducers/focusedPathReducer.js');
10
- require('@salutejs/plasma-core');
11
- require('@linaria/react');
12
- var Dropdown_tokens = require('./Dropdown.tokens.js');
13
- var DropdownInner = require('./ui/DropdownInner/DropdownInner.js');
14
- var index$1 = require('./utils/index.js');
15
- require('focus-visible');
7
+ var plasmaCore = require('@salutejs/plasma-core');
16
8
  var base = require('./variations/_view/base.js');
17
9
  var base$1 = require('./variations/_size/base.js');
18
10
  var Dropdown_styles = require('./Dropdown.styles.js');
19
- var useKeyboardNavigation = require('./hooks/useKeyboardNavigation.js');
20
- var useHashMaps = require('./hooks/useHashMaps.js');
21
-
22
- var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow"];
11
+ var index = require('./utils/index.js');
23
12
 
13
+ var _excluded = ["id", "target", "children", "hasArrow", "role", "view", "size", "frame", "onToggle", "isFocusTrapped", "isOpen", "placement", "trigger", "offset", "preventOverflow", "closeOnOverlayClick", "closeOnEsc"];
24
14
  /**
25
- * Выпадающий список.
15
+ * Выпадающий список без внешнего контроля видимости.
26
16
  */
27
17
  var dropdownRoot = function dropdownRoot(Root) {
28
- return /*#__PURE__*/React.forwardRef(function (_ref, ref) {
29
- var items = _ref.items,
18
+ return /*#__PURE__*/React.forwardRef(function (_ref, outerRootRef) {
19
+ var id = _ref.id,
20
+ target = _ref.target,
30
21
  children = _ref.children,
31
- _ref$placement = _ref.placement,
32
- placement = _ref$placement === void 0 ? 'bottom' : _ref$placement,
33
- _ref$offset = _ref.offset,
34
- offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
35
- _ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
36
- closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
37
- onToggle = _ref.onToggle,
38
- size = _ref.size,
22
+ hasArrow = _ref.hasArrow,
23
+ role = _ref.role,
39
24
  view = _ref.view,
40
- _ref$itemRole = _ref.itemRole,
41
- itemRole = _ref$itemRole === void 0 ? 'option' : _ref$itemRole,
42
- className = _ref.className,
43
- listWidth = _ref.listWidth,
44
- listHeight = _ref.listHeight,
45
- listOverflow = _ref.listOverflow,
46
- _ref$closeOnSelect = _ref.closeOnSelect,
47
- closeOnSelect = _ref$closeOnSelect === void 0 ? true : _ref$closeOnSelect,
48
- onHover = _ref.onHover,
49
- onItemSelect = _ref.onItemSelect,
50
- onItemClick = _ref.onItemClick,
25
+ size = _ref.size,
26
+ frame = _ref.frame,
27
+ _onToggle = _ref.onToggle,
28
+ _ref$isFocusTrapped = _ref.isFocusTrapped,
29
+ isFocusTrapped = _ref$isFocusTrapped === void 0 ? true : _ref$isFocusTrapped,
30
+ _ref$isOpen = _ref.isOpen,
31
+ isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
32
+ _ref$placement = _ref.placement,
33
+ placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
51
34
  _ref$trigger = _ref.trigger,
52
35
  trigger = _ref$trigger === void 0 ? 'click' : _ref$trigger,
53
- _ref$variant = _ref.variant,
54
- variant = _ref$variant === void 0 ? 'normal' : _ref$variant,
55
- _ref$hasArrow = _ref.hasArrow,
56
- hasArrow = _ref$hasArrow === void 0 ? true : _ref$hasArrow,
36
+ _ref$offset = _ref.offset,
37
+ offset = _ref$offset === void 0 ? [0, 6] : _ref$offset,
38
+ _ref$preventOverflow = _ref.preventOverflow,
39
+ preventOverflow = _ref$preventOverflow === void 0 ? false : _ref$preventOverflow,
40
+ _ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
41
+ closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? false : _ref$closeOnOverlayCl,
42
+ _ref$closeOnEsc = _ref.closeOnEsc,
43
+ closeOnEsc = _ref$closeOnEsc === void 0 ? false : _ref$closeOnEsc,
57
44
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
58
- var _useReducer = React.useReducer(pathReducer.pathReducer, []),
59
- _useReducer2 = _rollupPluginBabelHelpers.slicedToArray(_useReducer, 2),
60
- path = _useReducer2[0],
61
- dispatchPath = _useReducer2[1];
62
- var _useReducer3 = React.useReducer(focusedPathReducer.focusedPathReducer, []),
63
- _useReducer4 = _rollupPluginBabelHelpers.slicedToArray(_useReducer3, 2),
64
- focusedPath = _useReducer4[0],
65
- dispatchFocusedPath = _useReducer4[1];
66
- var _useHashMaps = useHashMaps.useHashMaps(items),
67
- _useHashMaps2 = _rollupPluginBabelHelpers.slicedToArray(_useHashMaps, 2),
68
- pathMap = _useHashMaps2[0],
69
- focusedToValueMap = _useHashMaps2[1];
70
- var handleGlobalToggle = function handleGlobalToggle(opened, event) {
71
- if (opened) {
72
- dispatchPath({
73
- type: 'opened_first_level'
74
- });
75
- } else {
76
- dispatchFocusedPath({
77
- type: 'reset'
78
- });
79
- dispatchPath({
80
- type: 'reset'
81
- });
82
- }
83
- if (onToggle) {
84
- onToggle(opened, event);
85
- }
86
- };
87
- var _useKeyNavigation = useKeyboardNavigation.useKeyNavigation({
88
- focusedPath: focusedPath,
89
- dispatchFocusedPath: dispatchFocusedPath,
90
- path: path,
91
- dispatchPath: dispatchPath,
92
- pathMap: pathMap,
93
- focusedToValueMap: focusedToValueMap,
94
- handleGlobalToggle: handleGlobalToggle,
95
- closeOnSelect: closeOnSelect,
96
- onItemSelect: onItemSelect,
97
- onItemClick: onItemClick
98
- }),
99
- onKeyDown = _useKeyNavigation.onKeyDown;
100
- var isCurrentListOpen = Boolean(path[0]);
101
- var getActiveDescendant = function getActiveDescendant() {
102
- var _focusedToValueMap$ge;
103
- var focusedPathAsString = focusedPath.reduce(function (acc, n) {
104
- return "".concat(acc, "/").concat(n);
105
- }, '').replace(/^(\/)/, '');
106
- return focusedToValueMap === null || focusedToValueMap === void 0 || (_focusedToValueMap$ge = focusedToValueMap.get(focusedPathAsString)) === null || _focusedToValueMap$ge === void 0 ? void 0 : _focusedToValueMap$ge.value.toString();
107
- };
108
- return /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
109
- className: index.cx(className, Dropdown_tokens.classes.dropdownRoot),
110
- ref: ref,
111
- view: view,
112
- size: size,
113
- items: items
114
- }, rest), /*#__PURE__*/React.createElement(Dropdown_styles.StyledPopover, {
115
- isOpen: isCurrentListOpen,
45
+ var uniqId = plasmaCore.useUniqId();
46
+ var innerId = id || uniqId;
47
+ var rootRef = React.useRef(null);
48
+ var dropdownRef = React.useRef(null);
49
+ var handleRef = plasmaCore.useForkRef(rootRef, outerRootRef);
50
+ var trapRef = plasmaCore.useFocusTrap(isOpen && isFocusTrapped);
51
+ var dropdownForkRef = plasmaCore.useForkRef(dropdownRef, trapRef);
52
+ return /*#__PURE__*/React.createElement(Dropdown_styles.StyledPopover, {
53
+ role: role,
54
+ isOpen: isOpen,
116
55
  usePortal: false,
117
- onToggle: handleGlobalToggle,
56
+ onToggle: function onToggle(is, event) {
57
+ return _onToggle === null || _onToggle === void 0 ? void 0 : _onToggle(is, event);
58
+ },
59
+ id: innerId,
60
+ ref: dropdownForkRef,
61
+ target: target,
118
62
  offset: offset,
119
- placement: index$1.getPlacements(placement),
63
+ preventOverflow: preventOverflow,
64
+ hasArrow: hasArrow,
65
+ placement: index.getPlacements(placement),
120
66
  trigger: trigger,
121
67
  closeOnOverlayClick: closeOnOverlayClick,
122
- isFocusTrapped: false,
123
- target: index$1.childrenWithProps(children, {
124
- role: 'combobox',
125
- 'aria-controls': 'listbox1',
126
- 'aria-expanded': isCurrentListOpen,
127
- 'aria-haspopup': 'listbox',
128
- 'aria-activedescendant': getActiveDescendant(),
129
- onKeyDown: onKeyDown
130
- })
131
- }, /*#__PURE__*/React.createElement(Dropdown_styles.Ul, {
132
- listHeight: listHeight,
133
- listOverflow: listOverflow,
134
- role: "listbox",
135
- id: "listbox1",
136
- listWidth: listWidth
137
- }, items.map(function (item, index) {
138
- return /*#__PURE__*/React.createElement(DropdownInner.DropdownInner, {
139
- key: "".concat(index, "/0"),
140
- item: item,
141
- currentLevel: 0,
142
- focusedPath: focusedPath,
143
- trigger: trigger,
144
- path: path,
145
- dispatchPath: dispatchPath,
146
- index: index,
147
- itemRole: itemRole,
148
- listHeight: listHeight,
149
- listOverflow: listOverflow,
150
- handleGlobalToggle: handleGlobalToggle,
151
- closeOnSelect: closeOnSelect,
152
- onHover: onHover,
153
- onItemSelect: onItemSelect,
154
- onItemClick: onItemClick,
155
- listWidth: listWidth,
156
- variant: variant,
157
- hasArrow: hasArrow
158
- });
159
- }))));
68
+ closeOnEsc: closeOnEsc,
69
+ isFocusTrapped: isFocusTrapped,
70
+ frame: frame
71
+ }, /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
72
+ ref: handleRef,
73
+ view: view,
74
+ size: size
75
+ }, rest), /*#__PURE__*/React.createElement(Dropdown_styles.StyledDropdown, null, children)));
160
76
  });
161
77
  };
162
78
  var dropdownConfig = {
163
79
  name: 'Dropdown',
164
80
  tag: 'div',
165
81
  layout: dropdownRoot,
166
- base: Dropdown_styles.base,
82
+ base: '',
167
83
  variations: {
168
84
  view: {
169
85
  css: base.base
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { forwardRef, useReducer } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\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, StyledPopover, base } from './Dropdown.styles';\nimport { getPlacements, childrenWithProps } from './utils';\nimport type { DropdownProps, HandleGlobalToggleType } from './Dropdown.types';\nimport { classes } from './Dropdown.tokens';\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport { useHashMaps } from './hooks/useHashMaps';\n\n/**\n * Выпадающий список.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, DropdownProps>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n items,\n children,\n placement = 'bottom',\n offset = [0, 0],\n closeOnOverlayClick = true,\n onToggle,\n size,\n view,\n itemRole = 'option',\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 ...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 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 const getActiveDescendant = () => {\n const focusedPathAsString = focusedPath.reduce((acc, n) => `${acc}/${n}`, '').replace(/^(\\/)/, '');\n return focusedToValueMap?.get(focusedPathAsString)?.value.toString();\n };\n\n return (\n <Root\n className={cx(className, classes.dropdownRoot)}\n ref={ref}\n view={view}\n size={size}\n items={items}\n {...rest}\n >\n <StyledPopover\n isOpen={isCurrentListOpen}\n usePortal={false}\n onToggle={handleGlobalToggle}\n offset={offset}\n placement={getPlacements(placement)}\n trigger={trigger}\n closeOnOverlayClick={closeOnOverlayClick}\n isFocusTrapped={false}\n target={childrenWithProps(children, {\n role: 'combobox',\n 'aria-controls': 'listbox1',\n 'aria-expanded': isCurrentListOpen,\n 'aria-haspopup': 'listbox',\n 'aria-activedescendant': getActiveDescendant(),\n onKeyDown,\n })}\n >\n <Ul\n listHeight={listHeight}\n listOverflow={listOverflow}\n role=\"listbox\"\n id=\"listbox1\"\n listWidth={listWidth}\n >\n {items.map((item, index) => (\n <DropdownInner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n focusedPath={focusedPath}\n trigger={trigger}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n itemRole={itemRole}\n listHeight={listHeight}\n listOverflow={listOverflow}\n handleGlobalToggle={handleGlobalToggle}\n closeOnSelect={closeOnSelect}\n onHover={onHover}\n onItemSelect={onItemSelect}\n onItemClick={onItemClick}\n listWidth={listWidth}\n variant={variant}\n hasArrow={hasArrow}\n />\n ))}\n </Ul>\n </StyledPopover>\n </Root>\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":["dropdownRoot","Root","forwardRef","_ref","ref","items","children","_ref$placement","placement","_ref$offset","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","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","pathReducer","_useReducer2","_slicedToArray","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useHashMaps","useHashMaps","_useHashMaps2","pathMap","focusedToValueMap","handleGlobalToggle","opened","event","type","_useKeyNavigation","useKeyNavigation","onKeyDown","isCurrentListOpen","Boolean","getActiveDescendant","_focusedToValueMap$ge","focusedPathAsString","reduce","acc","n","concat","replace","get","value","toString","React","createElement","_extends","cx","classes","StyledPopover","isOpen","usePortal","getPlacements","isFocusTrapped","target","childrenWithProps","role","Ul","id","map","item","index","DropdownInner","key","currentLevel","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA8C,EAAA;AAAA,EAAA,oBACvEC,gBAAU,CACN,UAAAC,IAAA,EAwBIC,GAAG,EACF;AAAA,IAAA,IAvBGC,KAAK,GAAAF,IAAA,CAALE,KAAK;MACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;MAAAC,cAAA,GAAAJ,IAAA,CACRK,SAAS;AAATA,MAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,cAAA;MAAAE,WAAA,GAAAN,IAAA,CACpBO,MAAM;MAANA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,CAAC,CAAC,EAAE,CAAC,CAAC,GAAAA,WAAA;MAAAE,qBAAA,GAAAR,IAAA,CACfS,mBAA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/Dropdown.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport { useFocusTrap, useForkRef, useUniqId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledDropdown, StyledPopover } from './Dropdown.styles';\nimport { getPlacements } from './utils';\nimport type { DropdownProps } from './Dropdown.types';\n\n/**\n * Выпадающий список без внешнего контроля видимости.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, DropdownProps>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n id,\n target,\n children,\n hasArrow,\n role,\n view,\n size,\n frame,\n onToggle,\n isFocusTrapped = true,\n isOpen = false,\n placement = 'auto',\n trigger = 'click',\n offset = [0, 6],\n preventOverflow = false,\n closeOnOverlayClick = false,\n closeOnEsc = false,\n ...rest\n },\n outerRootRef,\n ) => {\n const uniqId = useUniqId();\n const innerId = id || uniqId;\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n\n const trapRef = useFocusTrap(isOpen && isFocusTrapped);\n\n const dropdownForkRef = useForkRef<HTMLDivElement>(dropdownRef, trapRef);\n\n return (\n <StyledPopover\n role={role}\n isOpen={isOpen}\n usePortal={false}\n onToggle={(is, event) => onToggle?.(is, event)}\n id={innerId}\n ref={dropdownForkRef}\n target={target}\n offset={offset}\n preventOverflow={preventOverflow}\n hasArrow={hasArrow}\n placement={getPlacements(placement)}\n trigger={trigger}\n closeOnOverlayClick={closeOnOverlayClick}\n closeOnEsc={closeOnEsc}\n isFocusTrapped={isFocusTrapped}\n frame={frame}\n >\n <Root ref={handleRef} view={view} size={size} {...rest}>\n <StyledDropdown>{children}</StyledDropdown>\n </Root>\n </StyledPopover>\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":["dropdownRoot","Root","forwardRef","_ref","outerRootRef","id","target","children","hasArrow","role","view","size","frame","onToggle","_ref$isFocusTrapped","isFocusTrapped","_ref$isOpen","isOpen","_ref$placement","placement","_ref$trigger","trigger","_ref$offset","offset","_ref$preventOverflow","preventOverflow","_ref$closeOnOverlayCl","closeOnOverlayClick","_ref$closeOnEsc","closeOnEsc","rest","_objectWithoutProperties","_excluded","uniqId","useUniqId","innerId","rootRef","useRef","dropdownRef","handleRef","useForkRef","trapRef","useFocusTrap","dropdownForkRef","React","createElement","StyledPopover","usePortal","is","event","ref","getPlacements","_extends","StyledDropdown","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;AAWA;AACA;AACA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA8C,EAAA;AAAA,EAAA,oBACvEC,gBAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IApBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;MACRC,IAAI,GAAAN,IAAA,CAAJM,IAAI;MACJC,IAAI,GAAAP,IAAA,CAAJO,IAAI;MACJC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;MACJC,KAAK,GAAAT,IAAA,CAALS,KAAK;MACLC,SAAQ,GAAAV,IAAA,CAARU,QAAQ;MAAAC,mBAAA,GAAAX,IAAA,CACRY,cAAc;AAAdA,MAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,mBAAA;MAAAE,WAAA,GAAAb,IAAA,CACrBc,MAAM;AAANA,MAAAA,MAA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AExB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM+C,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEzD,YAAY;AACpB0D,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRjD,IAAAA,IAAI,EAAE;AACFkD,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDlD,IAAAA,IAAI,EAAE;AACFiD,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNrD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
@@ -1,4 +1,4 @@
1
- import './Dropdown.styles_1tihqkp.css';
1
+ import './Dropdown.styles_1daxhqh.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7,9 +7,8 @@ var react = require('@linaria/react');
7
7
  require('@linaria/core');
8
8
  var common = require('../../engines/common.js');
9
9
  var Popover$1 = require('../Popover/Popover.js');
10
- var index = require('./utils/index.js');
11
- var Dropdown_tokens = require('./Dropdown.tokens.js');
12
10
 
11
+ // issue #823
13
12
  var Popover = /*#__PURE__*/common.component(Popover$1.popoverConfig);
14
13
  var _exp = function _exp() {
15
14
  return Popover;
@@ -19,44 +18,12 @@ var StyledPopover = /*#__PURE__*/react.styled(_exp())({
19
18
  "class": "sn7uamp",
20
19
  propsAsIs: true
21
20
  });
22
- var _exp7 = function _exp7() {
23
- return function (_ref) {
24
- var listWidth = _ref.listWidth;
25
- return listWidth || "var(".concat(Dropdown_tokens.tokens.width, ")");
26
- };
27
- };
28
- var _exp8 = function _exp8() {
29
- return function (_ref2) {
30
- var listHeight = _ref2.listHeight;
31
- return listHeight ? index.getCorrectHeight(listHeight) : 'auto';
32
- };
33
- };
34
- var _exp9 = function _exp9() {
35
- return function (_ref3) {
36
- var listOverflow = _ref3.listOverflow;
37
- return listOverflow || 'initial';
38
- };
39
- };
40
- var _exp10 = function _exp10() {
41
- return function (_ref4) {
42
- var isInnerUl = _ref4.isInnerUl;
43
- return isInnerUl ? "calc(var(".concat(Dropdown_tokens.tokens.padding, ") * -1) 0 0 var(").concat(Dropdown_tokens.tokens.padding, ")") : 0;
44
- };
45
- };
46
- var Ul = /*#__PURE__*/react.styled('ul')({
47
- name: "Ul",
48
- "class": "ujr7fmv",
49
- propsAsIs: false,
50
- vars: {
51
- "ujr7fmv-0": [/*#__PURE__*/_exp7()],
52
- "ujr7fmv-1": [/*#__PURE__*/_exp8()],
53
- "ujr7fmv-2": [/*#__PURE__*/_exp9()],
54
- "ujr7fmv-3": [/*#__PURE__*/_exp10()]
55
- }
21
+ var StyledDropdown = /*#__PURE__*/react.styled('div')({
22
+ name: "StyledDropdown",
23
+ "class": "sjr7fmv",
24
+ propsAsIs: false
56
25
  });
57
- var base = "byfocd2";
58
26
 
27
+ exports.StyledDropdown = StyledDropdown;
59
28
  exports.StyledPopover = StyledPopover;
60
- exports.Ul = Ul;
61
- exports.base = base;
62
29
  //# sourceMappingURL=Dropdown.styles.js.map