@salutejs/plasma-new-hope 0.78.0-canary.1185.8913944828.0 → 0.78.0-canary.1195.8913931601.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (423) hide show
  1. package/cjs/components/Combobox/Combobox.css +7 -12
  2. package/cjs/components/Combobox/Combobox.js +1 -1
  3. package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +6 -10
  4. package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +3 -3
  5. package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +6 -10
  6. package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +3 -3
  7. package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +6 -10
  8. package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +3 -3
  9. package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +6 -10
  10. package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +3 -3
  11. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.css +23 -4
  12. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +10 -81
  13. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js.map +1 -1
  14. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +9 -21
  15. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  16. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_936wgl.css +1 -0
  17. package/cjs/components/Dropdown/Dropdown.css +2 -20
  18. package/cjs/components/Dropdown/Dropdown.js +54 -138
  19. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  20. package/cjs/components/Dropdown/Dropdown.styles.js +7 -40
  21. package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
  22. package/cjs/components/Dropdown/Dropdown.styles_1daxhqh.css +2 -0
  23. package/cjs/components/Dropdown/Dropdown.tokens.js +24 -12
  24. package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
  25. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +4 -7
  26. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +100 -79
  27. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  28. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +4 -31
  29. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  30. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1juhjtq.css +4 -0
  31. package/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base.js +9 -0
  32. package/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base.js.map +1 -0
  33. package/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base_x642ct.css +1 -0
  34. package/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base.js +9 -0
  35. package/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base.js.map +1 -0
  36. package/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base_x642ct.css +1 -0
  37. package/cjs/components/Dropdown/utils/index.js +13 -14
  38. package/cjs/components/Dropdown/utils/index.js.map +1 -1
  39. package/cjs/components/IconButton/IconButton.css +25 -0
  40. package/cjs/components/IconButton/IconButton.js +84 -0
  41. package/cjs/components/IconButton/IconButton.js.map +1 -0
  42. package/cjs/components/IconButton/IconButton.styles.js +25 -0
  43. package/cjs/components/IconButton/IconButton.styles.js.map +1 -0
  44. package/cjs/components/IconButton/IconButton.styles_12iyaye.css +2 -0
  45. package/cjs/components/IconButton/IconButton.tokens.js +36 -0
  46. package/cjs/components/IconButton/IconButton.tokens.js.map +1 -0
  47. package/cjs/components/IconButton/variations/_disabled/base.js +9 -0
  48. package/cjs/components/IconButton/variations/_disabled/base.js.map +1 -0
  49. package/cjs/components/IconButton/variations/_disabled/base_x642ct.css +1 -0
  50. package/cjs/components/IconButton/variations/_focused/base.js +9 -0
  51. package/cjs/components/IconButton/variations/_focused/base.js.map +1 -0
  52. package/cjs/components/IconButton/variations/_focused/base_x642ct.css +1 -0
  53. package/cjs/components/IconButton/variations/_size/base.js +9 -0
  54. package/cjs/components/IconButton/variations/_size/base.js.map +1 -0
  55. package/cjs/components/IconButton/variations/_size/base_x642ct.css +1 -0
  56. package/cjs/components/IconButton/variations/_view/base.js +9 -0
  57. package/cjs/components/IconButton/variations/_view/base.js.map +1 -0
  58. package/cjs/components/IconButton/variations/_view/base_x642ct.css +1 -0
  59. package/cjs/components/Pagination/Pagination.css +7 -39
  60. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +7 -39
  61. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +2 -2
  62. package/cjs/components/Select/Select.css +7 -39
  63. package/cjs/components/Select/Select.js +3 -3
  64. package/cjs/components/Select/ui/SelectDivider/SelectDivider.css +6 -10
  65. package/cjs/components/Select/ui/SelectDivider/SelectDivider.js +3 -3
  66. package/cjs/components/Select/ui/SelectFooter/SelectFooter.css +6 -10
  67. package/cjs/components/Select/ui/SelectFooter/SelectFooter.js +3 -3
  68. package/cjs/components/Select/ui/SelectGroup/SelectGroup.css +6 -10
  69. package/cjs/components/Select/ui/SelectGroup/SelectGroup.js +3 -3
  70. package/cjs/components/Select/ui/SelectHeader/SelectHeader.css +6 -10
  71. package/cjs/components/Select/ui/SelectHeader/SelectHeader.js +3 -3
  72. package/cjs/components/Select/ui/SelectItem/SelectItem.css +7 -59
  73. package/cjs/components/Select/ui/SelectItem/SelectItem.js +4 -4
  74. package/cjs/components/Select/ui/SelectItem/SelectItem.js.map +1 -1
  75. package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +3 -3
  76. package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js.map +1 -1
  77. package/cjs/components/Select/ui/SelectItem/SelectItem.styles_6h17aw.css +1 -0
  78. package/cjs/components/_Icon/Icon.assets/DisclosureRight.js +2 -1
  79. package/cjs/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
  80. package/cjs/index.css +11 -13
  81. package/cjs/index.js +8 -5
  82. package/cjs/index.js.map +1 -1
  83. package/es/components/Combobox/Combobox.css +7 -12
  84. package/es/components/Combobox/Combobox.js +1 -1
  85. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +6 -10
  86. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +3 -3
  87. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +6 -10
  88. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +3 -3
  89. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +6 -10
  90. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +3 -3
  91. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +6 -10
  92. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +3 -3
  93. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.css +23 -4
  94. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +11 -82
  95. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js.map +1 -1
  96. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +10 -19
  97. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  98. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_936wgl.css +1 -0
  99. package/es/components/Dropdown/Dropdown.css +2 -20
  100. package/es/components/Dropdown/Dropdown.js +60 -144
  101. package/es/components/Dropdown/Dropdown.js.map +1 -1
  102. package/es/components/Dropdown/Dropdown.styles.js +7 -39
  103. package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
  104. package/es/components/Dropdown/Dropdown.styles_1daxhqh.css +2 -0
  105. package/es/components/Dropdown/Dropdown.tokens.js +24 -12
  106. package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
  107. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +4 -7
  108. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +100 -80
  109. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  110. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +4 -30
  111. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  112. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1juhjtq.css +4 -0
  113. package/es/components/Dropdown/ui/DropdownItem/variations/_size/base.js +5 -0
  114. package/es/components/Dropdown/ui/DropdownItem/variations/_size/base.js.map +1 -0
  115. package/es/components/Dropdown/ui/DropdownItem/variations/_size/base_x642ct.css +1 -0
  116. package/es/components/Dropdown/ui/DropdownItem/variations/_view/base.js +5 -0
  117. package/es/components/Dropdown/ui/DropdownItem/variations/_view/base.js.map +1 -0
  118. package/es/components/Dropdown/ui/DropdownItem/variations/_view/base_x642ct.css +1 -0
  119. package/es/components/Dropdown/utils/index.js +14 -14
  120. package/es/components/Dropdown/utils/index.js.map +1 -1
  121. package/es/components/IconButton/IconButton.css +25 -0
  122. package/es/components/IconButton/IconButton.js +79 -0
  123. package/es/components/IconButton/IconButton.js.map +1 -0
  124. package/es/components/IconButton/IconButton.styles.js +20 -0
  125. package/es/components/IconButton/IconButton.styles.js.map +1 -0
  126. package/es/components/IconButton/IconButton.styles_12iyaye.css +2 -0
  127. package/es/components/IconButton/IconButton.tokens.js +31 -0
  128. package/es/components/IconButton/IconButton.tokens.js.map +1 -0
  129. package/es/components/IconButton/variations/_disabled/base.js +5 -0
  130. package/es/components/IconButton/variations/_disabled/base.js.map +1 -0
  131. package/es/components/IconButton/variations/_disabled/base_x642ct.css +1 -0
  132. package/es/components/IconButton/variations/_focused/base.js +5 -0
  133. package/es/components/IconButton/variations/_focused/base.js.map +1 -0
  134. package/es/components/IconButton/variations/_focused/base_x642ct.css +1 -0
  135. package/es/components/IconButton/variations/_size/base.js +5 -0
  136. package/es/components/IconButton/variations/_size/base.js.map +1 -0
  137. package/es/components/IconButton/variations/_size/base_x642ct.css +1 -0
  138. package/es/components/IconButton/variations/_view/base.js +5 -0
  139. package/es/components/IconButton/variations/_view/base.js.map +1 -0
  140. package/es/components/IconButton/variations/_view/base_x642ct.css +1 -0
  141. package/es/components/Pagination/Pagination.css +7 -39
  142. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +7 -39
  143. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +2 -2
  144. package/es/components/Select/Select.css +7 -39
  145. package/es/components/Select/Select.js +3 -3
  146. package/es/components/Select/ui/SelectDivider/SelectDivider.css +6 -10
  147. package/es/components/Select/ui/SelectDivider/SelectDivider.js +3 -3
  148. package/es/components/Select/ui/SelectFooter/SelectFooter.css +6 -10
  149. package/es/components/Select/ui/SelectFooter/SelectFooter.js +3 -3
  150. package/es/components/Select/ui/SelectGroup/SelectGroup.css +6 -10
  151. package/es/components/Select/ui/SelectGroup/SelectGroup.js +3 -3
  152. package/es/components/Select/ui/SelectHeader/SelectHeader.css +6 -10
  153. package/es/components/Select/ui/SelectHeader/SelectHeader.js +3 -3
  154. package/es/components/Select/ui/SelectItem/SelectItem.css +7 -59
  155. package/es/components/Select/ui/SelectItem/SelectItem.js +4 -4
  156. package/es/components/Select/ui/SelectItem/SelectItem.js.map +1 -1
  157. package/es/components/Select/ui/SelectItem/SelectItem.styles.js +3 -3
  158. package/es/components/Select/ui/SelectItem/SelectItem.styles.js.map +1 -1
  159. package/es/components/Select/ui/SelectItem/SelectItem.styles_6h17aw.css +1 -0
  160. package/es/components/_Icon/Icon.assets/DisclosureRight.js +2 -1
  161. package/es/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
  162. package/es/index.css +11 -13
  163. package/es/index.js +3 -3
  164. package/package.json +2 -2
  165. package/styled-components/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +2 -91
  166. package/styled-components/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +7 -27
  167. package/styled-components/cjs/components/Dropdown/Dropdown.js +54 -140
  168. package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +7 -22
  169. package/styled-components/cjs/components/Dropdown/Dropdown.template-doc.mdx +80 -0
  170. package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +24 -12
  171. package/styled-components/cjs/components/Dropdown/index.js +1 -9
  172. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +105 -77
  173. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +15 -30
  174. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base.js +8 -0
  175. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_size/tokens.json +19 -0
  176. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base.js +8 -0
  177. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_view/tokens.json +9 -0
  178. package/styled-components/cjs/components/Dropdown/ui/index.js +13 -14
  179. package/styled-components/cjs/components/Dropdown/utils/index.js +13 -14
  180. package/styled-components/cjs/components/Dropdown/variations/_size/tokens.json +9 -1
  181. package/styled-components/cjs/components/Dropdown/variations/_view/tokens.json +1 -1
  182. package/styled-components/cjs/components/IconButton/IconButton.js +86 -0
  183. package/styled-components/cjs/components/IconButton/IconButton.styles.js +19 -0
  184. package/styled-components/cjs/components/IconButton/IconButton.tokens.js +34 -0
  185. package/styled-components/cjs/components/IconButton/index.js +31 -0
  186. package/styled-components/cjs/components/IconButton/variations/_disabled/base.js +8 -0
  187. package/styled-components/cjs/components/IconButton/variations/_disabled/tokens.json +1 -0
  188. package/styled-components/cjs/components/IconButton/variations/_focused/base.js +8 -0
  189. package/styled-components/cjs/components/IconButton/variations/_focused/tokens.json +1 -0
  190. package/styled-components/cjs/components/IconButton/variations/_size/base.js +8 -0
  191. package/styled-components/cjs/components/IconButton/variations/_size/tokens.json +1 -0
  192. package/styled-components/cjs/components/IconButton/variations/_view/base.js +8 -0
  193. package/styled-components/cjs/components/IconButton/variations/_view/tokens.json +1 -0
  194. package/styled-components/cjs/components/Select/ui/SelectItem/SelectItem.js +2 -2
  195. package/styled-components/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +2 -2
  196. package/styled-components/cjs/components/_Icon/Icon.assets/DisclosureRight.js +2 -1
  197. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +27 -0
  198. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.js +13 -0
  199. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +194 -0
  200. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +27 -0
  201. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.js +13 -0
  202. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +195 -0
  203. package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.config.js +46 -0
  204. package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.js +11 -0
  205. package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.stories.tsx +65 -0
  206. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +27 -0
  207. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.js +13 -0
  208. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +195 -0
  209. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +27 -0
  210. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.js +13 -0
  211. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +195 -0
  212. package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.config.js +46 -0
  213. package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.js +11 -0
  214. package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.stories.tsx +65 -0
  215. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.config.js +22 -0
  216. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.js +21 -0
  217. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.stories.tsx +277 -0
  218. package/styled-components/cjs/index.js +11 -0
  219. package/styled-components/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +3 -90
  220. package/styled-components/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +6 -23
  221. package/styled-components/es/components/Dropdown/Dropdown.js +55 -142
  222. package/styled-components/es/components/Dropdown/Dropdown.styles.js +5 -18
  223. package/styled-components/es/components/Dropdown/Dropdown.template-doc.mdx +80 -0
  224. package/styled-components/es/components/Dropdown/Dropdown.tokens.js +24 -12
  225. package/styled-components/es/components/Dropdown/index.js +0 -1
  226. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +107 -78
  227. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +11 -27
  228. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_size/base.js +2 -0
  229. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_size/tokens.json +19 -0
  230. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_view/base.js +2 -0
  231. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_view/tokens.json +9 -0
  232. package/styled-components/es/components/Dropdown/ui/index.js +1 -2
  233. package/styled-components/es/components/Dropdown/utils/index.js +13 -13
  234. package/styled-components/es/components/Dropdown/variations/_size/tokens.json +9 -1
  235. package/styled-components/es/components/Dropdown/variations/_view/tokens.json +1 -1
  236. package/styled-components/es/components/IconButton/IconButton.js +77 -0
  237. package/styled-components/es/components/IconButton/IconButton.styles.js +11 -0
  238. package/styled-components/es/components/IconButton/IconButton.tokens.js +28 -0
  239. package/styled-components/es/components/IconButton/index.js +2 -0
  240. package/styled-components/es/components/IconButton/variations/_disabled/base.js +2 -0
  241. package/styled-components/es/components/IconButton/variations/_disabled/tokens.json +1 -0
  242. package/styled-components/es/components/IconButton/variations/_focused/base.js +2 -0
  243. package/styled-components/es/components/IconButton/variations/_focused/tokens.json +1 -0
  244. package/styled-components/es/components/IconButton/variations/_size/base.js +2 -0
  245. package/styled-components/es/components/IconButton/variations/_size/tokens.json +1 -0
  246. package/styled-components/es/components/IconButton/variations/_view/base.js +2 -0
  247. package/styled-components/es/components/IconButton/variations/_view/tokens.json +1 -0
  248. package/styled-components/es/components/Select/ui/SelectItem/SelectItem.js +2 -2
  249. package/styled-components/es/components/Select/ui/SelectItem/SelectItem.styles.js +2 -2
  250. package/styled-components/es/components/_Icon/Icon.assets/DisclosureRight.js +2 -1
  251. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +21 -0
  252. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.js +7 -0
  253. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +194 -0
  254. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +21 -0
  255. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.js +7 -0
  256. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +195 -0
  257. package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.config.js +40 -0
  258. package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.js +5 -0
  259. package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.stories.tsx +65 -0
  260. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +21 -0
  261. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.js +7 -0
  262. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +195 -0
  263. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +21 -0
  264. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.js +7 -0
  265. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +195 -0
  266. package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.config.js +40 -0
  267. package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.js +5 -0
  268. package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.stories.tsx +65 -0
  269. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.config.js +16 -0
  270. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.js +15 -0
  271. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.stories.tsx +277 -0
  272. package/styled-components/es/index.js +1 -0
  273. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.d.ts +13 -15
  274. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.d.ts.map +1 -1
  275. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.d.ts +1 -5
  276. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.d.ts.map +1 -1
  277. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.type.d.ts +2 -59
  278. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.type.d.ts.map +1 -1
  279. package/types/components/Dropdown/Dropdown.d.ts +4 -4
  280. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  281. package/types/components/Dropdown/Dropdown.styles.d.ts +1 -8
  282. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  283. package/types/components/Dropdown/Dropdown.tokens.d.ts +22 -9
  284. package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
  285. package/types/components/Dropdown/Dropdown.types.d.ts +40 -64
  286. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  287. package/types/components/Dropdown/index.d.ts +1 -3
  288. package/types/components/Dropdown/index.d.ts.map +1 -1
  289. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts +56 -2
  290. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  291. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +1 -5
  292. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
  293. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts +38 -44
  294. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts.map +1 -1
  295. package/types/components/Dropdown/ui/DropdownItem/variations/_size/base.d.ts +2 -0
  296. package/types/components/Dropdown/ui/DropdownItem/variations/_size/base.d.ts.map +1 -0
  297. package/types/components/Dropdown/ui/DropdownItem/variations/_view/base.d.ts +2 -0
  298. package/types/components/Dropdown/ui/DropdownItem/variations/_view/base.d.ts.map +1 -0
  299. package/types/components/Dropdown/ui/index.d.ts +1 -2
  300. package/types/components/Dropdown/ui/index.d.ts.map +1 -1
  301. package/types/components/Dropdown/utils/index.d.ts +3 -5
  302. package/types/components/Dropdown/utils/index.d.ts.map +1 -1
  303. package/types/components/IconButton/IconButton.d.ts +30 -0
  304. package/types/components/IconButton/IconButton.d.ts.map +1 -0
  305. package/types/components/IconButton/IconButton.styles.d.ts +4 -0
  306. package/types/components/IconButton/IconButton.styles.d.ts.map +1 -0
  307. package/types/components/IconButton/IconButton.tokens.d.ts +29 -0
  308. package/types/components/IconButton/IconButton.tokens.d.ts.map +1 -0
  309. package/types/components/IconButton/IconButton.types.d.ts +13 -0
  310. package/types/components/IconButton/IconButton.types.d.ts.map +1 -0
  311. package/types/components/IconButton/index.d.ts +4 -0
  312. package/types/components/IconButton/index.d.ts.map +1 -0
  313. package/types/components/IconButton/variations/_disabled/base.d.ts +2 -0
  314. package/types/components/IconButton/variations/_disabled/base.d.ts.map +1 -0
  315. package/types/components/IconButton/variations/_focused/base.d.ts +2 -0
  316. package/types/components/IconButton/variations/_focused/base.d.ts.map +1 -0
  317. package/types/components/IconButton/variations/_size/base.d.ts +2 -0
  318. package/types/components/IconButton/variations/_size/base.d.ts.map +1 -0
  319. package/types/components/IconButton/variations/_view/base.d.ts +2 -0
  320. package/types/components/IconButton/variations/_view/base.d.ts.map +1 -0
  321. package/types/components/Select/ui/SelectItem/SelectItem.d.ts +2 -2
  322. package/types/components/Select/ui/SelectItem/SelectItem.type.d.ts +2 -2
  323. package/types/components/Select/utils/index.d.ts +1 -1
  324. package/types/components/_Icon/Icon.assets/DisclosureRight.d.ts.map +1 -1
  325. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.d.ts.map +1 -0
  326. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.d.ts +30 -0
  327. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.d.ts.map +1 -0
  328. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.d.ts +18 -0
  329. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.d.ts.map +1 -0
  330. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.d.ts +30 -0
  331. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.d.ts.map +1 -0
  332. package/types/examples/plasma_b2c/components/IconButton/IconButton.config.d.ts +39 -0
  333. package/types/examples/plasma_b2c/components/IconButton/IconButton.config.d.ts.map +1 -0
  334. package/types/examples/plasma_b2c/components/IconButton/IconButton.d.ts +33 -0
  335. package/types/examples/plasma_b2c/components/IconButton/IconButton.d.ts.map +1 -0
  336. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts +18 -0
  337. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts.map +1 -0
  338. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.d.ts +30 -0
  339. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.d.ts.map +1 -0
  340. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts +18 -0
  341. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts.map +1 -0
  342. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.d.ts +30 -0
  343. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.d.ts.map +1 -0
  344. package/types/examples/plasma_web/components/IconButton/IconButton.config.d.ts +39 -0
  345. package/types/examples/plasma_web/components/IconButton/IconButton.config.d.ts.map +1 -0
  346. package/types/examples/plasma_web/components/IconButton/IconButton.d.ts +33 -0
  347. package/types/examples/plasma_web/components/IconButton/IconButton.d.ts.map +1 -0
  348. package/types/examples/sds_engineer/components/Dropdown/Dropdown.config.d.ts +15 -0
  349. package/types/examples/sds_engineer/components/Dropdown/Dropdown.config.d.ts.map +1 -0
  350. package/types/examples/sds_engineer/components/Dropdown/Dropdown.d.ts +51 -0
  351. package/types/examples/sds_engineer/components/Dropdown/Dropdown.d.ts.map +1 -0
  352. package/types/index.d.ts +1 -0
  353. package/types/index.d.ts.map +1 -1
  354. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_s4sk53.css +0 -4
  355. package/cjs/components/Combobox/utils/index.js +0 -23
  356. package/cjs/components/Combobox/utils/index.js.map +0 -1
  357. package/cjs/components/Dropdown/Dropdown.styles_1tihqkp.css +0 -3
  358. package/cjs/components/Dropdown/hooks/useHashMaps.js +0 -31
  359. package/cjs/components/Dropdown/hooks/useHashMaps.js.map +0 -1
  360. package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +0 -200
  361. package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js.map +0 -1
  362. package/cjs/components/Dropdown/reducers/focusedPathReducer.js +0 -37
  363. package/cjs/components/Dropdown/reducers/focusedPathReducer.js.map +0 -1
  364. package/cjs/components/Dropdown/reducers/pathReducer.js +0 -41
  365. package/cjs/components/Dropdown/reducers/pathReducer.js.map +0 -1
  366. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +0 -117
  367. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +0 -1
  368. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1o4szyu.css +0 -5
  369. package/cjs/components/Select/ui/SelectItem/SelectItem.styles_1jgsd1a.css +0 -1
  370. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_s4sk53.css +0 -4
  371. package/es/components/Combobox/utils/index.js +0 -19
  372. package/es/components/Combobox/utils/index.js.map +0 -1
  373. package/es/components/Dropdown/Dropdown.styles_1tihqkp.css +0 -3
  374. package/es/components/Dropdown/hooks/useHashMaps.js +0 -27
  375. package/es/components/Dropdown/hooks/useHashMaps.js.map +0 -1
  376. package/es/components/Dropdown/hooks/useKeyboardNavigation.js +0 -196
  377. package/es/components/Dropdown/hooks/useKeyboardNavigation.js.map +0 -1
  378. package/es/components/Dropdown/reducers/focusedPathReducer.js +0 -33
  379. package/es/components/Dropdown/reducers/focusedPathReducer.js.map +0 -1
  380. package/es/components/Dropdown/reducers/pathReducer.js +0 -37
  381. package/es/components/Dropdown/reducers/pathReducer.js.map +0 -1
  382. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +0 -113
  383. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +0 -1
  384. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1o4szyu.css +0 -5
  385. package/es/components/Select/ui/SelectItem/SelectItem.styles_1jgsd1a.css +0 -1
  386. package/styled-components/cjs/components/Combobox/utils/index.js +0 -23
  387. package/styled-components/cjs/components/Dropdown/hooks/useHashMaps.js +0 -29
  388. package/styled-components/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +0 -199
  389. package/styled-components/cjs/components/Dropdown/reducers/focusedPathReducer.js +0 -40
  390. package/styled-components/cjs/components/Dropdown/reducers/pathReducer.js +0 -44
  391. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +0 -114
  392. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +0 -25
  393. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.js +0 -11
  394. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +0 -294
  395. package/styled-components/es/components/Combobox/utils/index.js +0 -15
  396. package/styled-components/es/components/Dropdown/hooks/useHashMaps.js +0 -23
  397. package/styled-components/es/components/Dropdown/hooks/useKeyboardNavigation.js +0 -193
  398. package/styled-components/es/components/Dropdown/reducers/focusedPathReducer.js +0 -34
  399. package/styled-components/es/components/Dropdown/reducers/pathReducer.js +0 -38
  400. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +0 -108
  401. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +0 -19
  402. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.js +0 -5
  403. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +0 -294
  404. package/types/components/Combobox/utils/index.d.ts +0 -4
  405. package/types/components/Combobox/utils/index.d.ts.map +0 -1
  406. package/types/components/Dropdown/hooks/useHashMaps.d.ts +0 -6
  407. package/types/components/Dropdown/hooks/useHashMaps.d.ts.map +0 -1
  408. package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts +0 -23
  409. package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts.map +0 -1
  410. package/types/components/Dropdown/reducers/focusedPathReducer.d.ts +0 -16
  411. package/types/components/Dropdown/reducers/focusedPathReducer.d.ts.map +0 -1
  412. package/types/components/Dropdown/reducers/pathReducer.d.ts +0 -20
  413. package/types/components/Dropdown/reducers/pathReducer.d.ts.map +0 -1
  414. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts +0 -5
  415. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts.map +0 -1
  416. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts +0 -26
  417. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts.map +0 -1
  418. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts.map +0 -1
  419. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +0 -13
  420. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +0 -1
  421. /package/styled-components/cjs/components/{Dropdown/ui/DropdownInner/DropdownInner.type.js → IconButton/IconButton.types.js} +0 -0
  422. /package/styled-components/es/components/{Dropdown/ui/DropdownInner/DropdownInner.type.js → IconButton/IconButton.types.js} +0 -0
  423. /package/types/examples/plasma_b2c/components/Dropdown/{Dropdown.config.d.ts → Normal/Dropdown.config.d.ts} +0 -0
@@ -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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,CACjF,CAAC,GAEHvC,QAEF,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMiD,kBAAkB,GAAG;AAC9B9C,EAAAA,IAAI,EAAE,cAAc;AACpB+C,EAAAA,GAAG,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,25 +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
1
  .Popover_styles_rmr9za_s1g1xbt5__0bafa6fb{display:inline-block;}
19
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;}
20
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);}
21
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;}
22
5
 
23
- .Dropdown_styles_1tihqkp_sn7uamp__39673f55 .Dropdown_styles_1tihqkp_popoverWrapper__39673f55,.Dropdown_styles_1tihqkp_sn7uamp__39673f55 .Dropdown_styles_1tihqkp_popoverTarget__39673f55{display:block;}
24
- .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);}
25
- .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
- require('focus-visible');
14
- var DropdownInner = require('./ui/DropdownInner/DropdownInner.js');
7
+ var plasmaCore = require('@salutejs/plasma-core');
15
8
  var base = require('./variations/_view/base.js');
16
9
  var base$1 = require('./variations/_size/base.js');
17
10
  var Dropdown_styles = require('./Dropdown.styles.js');
18
- var index$1 = require('./utils/index.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,GAA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8D,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEjG,YAAY;AACpBkG,EAAAA,IAAI,EAAJA,oBAAI;AACJC,EAAAA,UAAU,EAAE;AACRpF,IAAAA,IAAI,EAAE;AACFqF,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDvF,IAAAA,IAAI,EAAE;AACFsF,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNxF,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/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,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AE;AACpCE,MAAAA,OAAO,EAAEA,OAAQ;AACjBM,MAAAA,mBAAmB,EAAEA,mBAAoB;AACzCE,MAAAA,UAAU,EAAEA,UAAW;AACvBd,MAAAA,cAAc,EAAEA,cAAe;AAC/BH,MAAAA,KAAK,EAAEA,KAAAA;AAAM,KAAA,eAEbgC,KAAA,CAAAC,aAAA,CAAC5C,IAAI,EAAAmD,iCAAA,CAAA;AAACF,MAAAA,GAAG,EAAEX,SAAU;AAAC7B,MAAAA,IAAI,EAAEA,IAAK;AAACC,MAAAA,IAAI,EAAEA,IAAAA;KAAUmB,EAAAA,IAAI,CAClDc,eAAAA,KAAA,CAAAC,aAAA,CAACQ,8BAAc,EAAE9C,IAAAA,EAAAA,QAAyB,CACxC,CACK,CAAC,CAAA;AAExB,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
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.styles.js","sources":["../../../src/components/Dropdown/Dropdown.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { component } from '../../engines';\nimport { popoverConfig, popoverClasses } from '../Popover';\n\nimport { getCorrectHeight } from './utils';\nimport { DropdownProps } from './Dropdown.types';\nimport { tokens } from './Dropdown.tokens';\n\nconst Popover = component(popoverConfig);\n\nexport const StyledPopover = styled(Popover)`\n .${String(popoverClasses.wrapper)}, .${String(popoverClasses.target)} {\n display: block;\n }\n`;\n\nexport const Ul = styled.ul<{\n listHeight: DropdownProps['listHeight'];\n listOverflow: DropdownProps['listOverflow'];\n isInnerUl?: boolean;\n listWidth?: DropdownProps['listWidth'];\n}>`\n box-sizing: border-box;\n\n background: var(${tokens.background});\n box-shadow: var(${tokens.boxShadow});\n\n border-radius: var(${tokens.borderRadius});\n width: ${({ listWidth }) => listWidth || `var(${tokens.width})`};\n height: ${({ listHeight }) => (listHeight ? getCorrectHeight(listHeight) : 'auto')};\n overflow: ${({ listOverflow }) => listOverflow || 'initial'};\n\n margin: ${({ isInnerUl }) => (isInnerUl ? `calc(var(${tokens.padding}) * -1) 0 0 var(${tokens.padding})` : 0)};\n padding: var(${tokens.padding});\n`;\n\nexport const base = css`\n display: inline-block;\n`;\n"],"names":["Popover","component","popoverConfig","_exp","StyledPopover","styled","name","class","propsAsIs","_exp7","_ref","listWidth","concat","tokens","width","_exp8","_ref2","listHeight","getCorrectHeight","_exp9","_ref3","listOverflow","_exp10","_ref4","isInnerUl","padding","Ul","vars","base"],"mappings":";;;;;;;;;;;AAUA,IAAMA,OAAO,gBAAGC,gBAAS,CAACC,uBAAa,CAAC,CAAA;AAAC,IAAAC,IAAA,GATvBA,SASuBA,IAAAA,GAAA;AAAA,EAAA,OAELH,OAAO,CAAA;AAAA,CAAA,CAAA;AAApC,IAAMI,aAAa,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG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AA;AAAA,CAAA,CAAA;AAhB1G,IAAMC,EAAE,gBAAGrB,YAAM,CAAA,IAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,IAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAmB,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAYXlB,KAAsD,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cACrDM,KAAwE,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cACtEI,KAA+C,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cAEjDG,MAAmG,EAAA,CAAA;AAAA,GAAA;AAAA,CAEhH,EAAA;AAEM,IAAMM,IAAI,GAEhB;;;;;;"}
1
+ {"version":3,"file":"Dropdown.styles.js","sources":["../../../src/components/Dropdown/Dropdown.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component } from '../../engines';\nimport { popoverConfig, popoverClasses } from '../Popover';\n\nimport { tokens } from './Dropdown.tokens';\n\n// issue #823\nconst Popover = component(popoverConfig);\n\nexport const StyledPopover = styled(Popover)`\n .${String(popoverClasses.target)} {\n display: block;\n }\n`;\n\nexport const StyledDropdown = styled.div`\n box-sizing: border-box;\n\n background: var(${tokens.background});\n box-shadow: var(${tokens.boxShadow});\n\n border-radius: var(${tokens.borderRadius});\n width: var(${tokens.width});\n height: var(${tokens.height});\n\n padding: var(${tokens.paddingTop}) var(${tokens.paddingRight}) var(${tokens.paddingBottom})\n var(${tokens.paddingLeft});\n`;\n"],"names":["Popover","component","popoverConfig","_exp","StyledPopover","styled","name","class","propsAsIs","StyledDropdown"],"mappings":";;;;;;;;;AAOA;AACA,IAAMA,OAAO,gBAAGC,gBAAS,CAACC,uBAAa,CAAC,CAAA;AAAC,IAAAC,IAAA,GAPvBA,SAOuBA,IAAAA,GAAA;AAAA,EAAA,OAELH,OAAO,CAAA;AAAA,CAAA,CAAA;AAApC,IAAMI,aAAa,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAIlC,EAAA;AAEM,IAAMC,cAAc,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,gBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAYnC;;;;;"}
@@ -0,0 +1,2 @@
1
+ .sn7uamp .popover-target{display:block;}
2
+ .sjr7fmv{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);}
@@ -3,37 +3,47 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var classes = {
6
- dropdownRoot: 'dropdown-root',
7
- dropdownItemIsFocused: 'dropdown-item-is-focused',
8
- dropdownItemIsDisabled: 'dropdown-item-is-disabled',
9
- dropdownItemIsActive: 'dropdown-item-is-active'
6
+ dropdownItemIsSelected: 'dropdown-item-is-selected',
7
+ dropdownItemIsDisabled: 'dropdown-item-is-disabled'
10
8
  };
11
9
  var tokens = {
12
10
  background: '--plasma-dropdown-background',
13
11
  boxShadow: '--plasma-dropdown-box-shadow',
14
12
  width: '--plasma-dropdown-width',
13
+ height: '--plasma-dropdown-height',
15
14
  borderRadius: '--plasma-dropdown-border-radius',
16
- padding: '--plasma-dropdown-padding',
17
- disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',
15
+ paddingTop: '--plasma-dropdown-padding-top',
16
+ paddingRight: '--plasma-dropdown-padding-right',
17
+ paddingBottom: '--plasma-dropdown-padding-bottom',
18
+ paddingLeft: '--plasma-dropdown-padding-left',
18
19
  itemBackground: '--plasma-dropdown-item-background',
19
20
  itemColor: '--plasma-dropdown-item-color',
20
21
  itemBackgroundHover: '--plasma-dropdown-item-background-hover',
22
+ itemBackgroundSelected: '--plasma-dropdown-item-background-selected',
23
+ itemColorSelected: '--plasma-dropdown-item-color-selected',
24
+ itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover',
25
+ itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover',
26
+ itemWidth: '--plasma-dropdown-item-width',
27
+ itemHeight: '--plasma-dropdown-item-height',
21
28
  itemBorderRadius: '--plasma-dropdown-item-border-radius',
22
29
  itemPaddingTop: '--plasma-dropdown-item-padding-top',
23
- itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight',
24
30
  itemPaddingRight: '--plasma-dropdown-item-padding-right',
25
31
  itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',
26
- itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight',
27
32
  itemPaddingLeft: '--plasma-dropdown-item-padding-left',
33
+ itemMarginTop: '--plasma-dropdown-item-margin-top',
34
+ itemMarginRight: '--plasma-dropdown-item-margin-right',
35
+ itemMarginBottom: '--plasma-dropdown-item-margin-bottom',
36
+ itemMarginLeft: '--plasma-dropdown-item-margin-left',
28
37
  itemFontFamily: '--plasma-dropdown-item-font-family',
29
38
  itemFontSize: '--plasma-dropdown-item-font-size',
30
39
  itemFontStyle: '--plasma-dropdown-item-font-style',
31
40
  itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',
32
41
  itemFontLetterSpacing: '--plasma-dropdown-item-line-height',
33
42
  itemFontLineHeight: '--plasma-dropdown-item-font-weight',
34
- disabledOpacity: '--plasma-dropdown-disabled-opacity',
35
- focusColor: '--plasma-dropdown-focus-color',
36
- // TODO: Remove below tokens as soon as they are no longer needed
43
+ itemContentLeftColor: '--plasma-dropdown-item-content-left-color',
44
+ itemContentRightColor: '--plasma-dropdown-item-content-right-color',
45
+ itemContentLeftWidth: '--plasma-dropdown-item-content-left-width',
46
+ itemContentRightWidth: '--plasma-dropdown-item-content-right-width',
37
47
  footerBackground: '--plasma-dropdown-footer-background',
38
48
  footerWidth: '--plasma-dropdown-footer-width',
39
49
  footerHeight: '--plasma-dropdown-footer-height',
@@ -100,7 +110,9 @@ var tokens = {
100
110
  groupLabelMarginTop: '--plasma-dropdown-group-label-margin-top',
101
111
  groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',
102
112
  groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',
103
- groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left'
113
+ groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',
114
+ disabledOpacity: '--plasma-dropdown-disabled-opacity',
115
+ focusColor: '--plasma-dropdown-focus-color'
104
116
  };
105
117
 
106
118
  exports.classes = classes;