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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (318) hide show
  1. package/cjs/components/Combobox/Combobox.css +12 -7
  2. package/cjs/components/Combobox/Combobox.js +1 -1
  3. package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +10 -6
  4. package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +3 -3
  5. package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +10 -6
  6. package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +3 -3
  7. package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +10 -6
  8. package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +3 -3
  9. package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +10 -6
  10. package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +3 -3
  11. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -23
  12. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +81 -10
  13. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js.map +1 -1
  14. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +21 -9
  15. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  16. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_s4sk53.css +4 -0
  17. package/cjs/components/Combobox/utils/index.js +23 -0
  18. package/cjs/components/Combobox/utils/index.js.map +1 -0
  19. package/cjs/components/Dropdown/Dropdown.css +20 -2
  20. package/cjs/components/Dropdown/Dropdown.js +138 -54
  21. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  22. package/cjs/components/Dropdown/Dropdown.styles.js +40 -7
  23. package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
  24. package/cjs/components/Dropdown/Dropdown.styles_1tihqkp.css +3 -0
  25. package/cjs/components/Dropdown/Dropdown.tokens.js +12 -24
  26. package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
  27. package/cjs/components/Dropdown/hooks/useHashMaps.js +31 -0
  28. package/cjs/components/Dropdown/hooks/useHashMaps.js.map +1 -0
  29. package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +200 -0
  30. package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js.map +1 -0
  31. package/cjs/components/Dropdown/reducers/focusedPathReducer.js +37 -0
  32. package/cjs/components/Dropdown/reducers/focusedPathReducer.js.map +1 -0
  33. package/cjs/components/Dropdown/reducers/pathReducer.js +41 -0
  34. package/cjs/components/Dropdown/reducers/pathReducer.js.map +1 -0
  35. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +117 -0
  36. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -0
  37. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +7 -4
  38. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +79 -100
  39. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  40. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +31 -4
  41. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  42. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1o4szyu.css +5 -0
  43. package/cjs/components/Dropdown/utils/index.js +14 -13
  44. package/cjs/components/Dropdown/utils/index.js.map +1 -1
  45. package/cjs/components/Pagination/Pagination.css +39 -7
  46. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +39 -7
  47. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +2 -2
  48. package/cjs/components/Select/Select.css +39 -7
  49. package/cjs/components/Select/Select.js +3 -3
  50. package/cjs/components/Select/ui/SelectDivider/SelectDivider.css +10 -6
  51. package/cjs/components/Select/ui/SelectDivider/SelectDivider.js +3 -3
  52. package/cjs/components/Select/ui/SelectFooter/SelectFooter.css +10 -6
  53. package/cjs/components/Select/ui/SelectFooter/SelectFooter.js +3 -3
  54. package/cjs/components/Select/ui/SelectGroup/SelectGroup.css +10 -6
  55. package/cjs/components/Select/ui/SelectGroup/SelectGroup.js +3 -3
  56. package/cjs/components/Select/ui/SelectHeader/SelectHeader.css +10 -6
  57. package/cjs/components/Select/ui/SelectHeader/SelectHeader.js +3 -3
  58. package/cjs/components/Select/ui/SelectItem/SelectItem.css +59 -7
  59. package/cjs/components/Select/ui/SelectItem/SelectItem.js +4 -4
  60. package/cjs/components/Select/ui/SelectItem/SelectItem.js.map +1 -1
  61. package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +3 -3
  62. package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js.map +1 -1
  63. package/cjs/components/Select/ui/SelectItem/SelectItem.styles_1jgsd1a.css +1 -0
  64. package/cjs/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
  65. package/cjs/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
  66. package/cjs/index.css +13 -8
  67. package/cjs/index.js +5 -2
  68. package/cjs/index.js.map +1 -1
  69. package/es/components/Combobox/Combobox.css +12 -7
  70. package/es/components/Combobox/Combobox.js +1 -1
  71. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +10 -6
  72. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +3 -3
  73. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +10 -6
  74. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +3 -3
  75. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +10 -6
  76. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +3 -3
  77. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +10 -6
  78. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +3 -3
  79. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -23
  80. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +82 -11
  81. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js.map +1 -1
  82. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +19 -10
  83. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  84. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_s4sk53.css +4 -0
  85. package/es/components/Combobox/utils/index.js +19 -0
  86. package/es/components/Combobox/utils/index.js.map +1 -0
  87. package/es/components/Dropdown/Dropdown.css +20 -2
  88. package/es/components/Dropdown/Dropdown.js +144 -60
  89. package/es/components/Dropdown/Dropdown.js.map +1 -1
  90. package/es/components/Dropdown/Dropdown.styles.js +39 -7
  91. package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
  92. package/es/components/Dropdown/Dropdown.styles_1tihqkp.css +3 -0
  93. package/es/components/Dropdown/Dropdown.tokens.js +12 -24
  94. package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
  95. package/es/components/Dropdown/hooks/useHashMaps.js +27 -0
  96. package/es/components/Dropdown/hooks/useHashMaps.js.map +1 -0
  97. package/es/components/Dropdown/hooks/useKeyboardNavigation.js +196 -0
  98. package/es/components/Dropdown/hooks/useKeyboardNavigation.js.map +1 -0
  99. package/es/components/Dropdown/reducers/focusedPathReducer.js +33 -0
  100. package/es/components/Dropdown/reducers/focusedPathReducer.js.map +1 -0
  101. package/es/components/Dropdown/reducers/pathReducer.js +37 -0
  102. package/es/components/Dropdown/reducers/pathReducer.js.map +1 -0
  103. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +113 -0
  104. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -0
  105. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +7 -4
  106. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +80 -100
  107. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  108. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +30 -4
  109. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  110. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1o4szyu.css +5 -0
  111. package/es/components/Dropdown/utils/index.js +14 -14
  112. package/es/components/Dropdown/utils/index.js.map +1 -1
  113. package/es/components/Pagination/Pagination.css +39 -7
  114. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +39 -7
  115. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +2 -2
  116. package/es/components/Select/Select.css +39 -7
  117. package/es/components/Select/Select.js +3 -3
  118. package/es/components/Select/ui/SelectDivider/SelectDivider.css +10 -6
  119. package/es/components/Select/ui/SelectDivider/SelectDivider.js +3 -3
  120. package/es/components/Select/ui/SelectFooter/SelectFooter.css +10 -6
  121. package/es/components/Select/ui/SelectFooter/SelectFooter.js +3 -3
  122. package/es/components/Select/ui/SelectGroup/SelectGroup.css +10 -6
  123. package/es/components/Select/ui/SelectGroup/SelectGroup.js +3 -3
  124. package/es/components/Select/ui/SelectHeader/SelectHeader.css +10 -6
  125. package/es/components/Select/ui/SelectHeader/SelectHeader.js +3 -3
  126. package/es/components/Select/ui/SelectItem/SelectItem.css +59 -7
  127. package/es/components/Select/ui/SelectItem/SelectItem.js +4 -4
  128. package/es/components/Select/ui/SelectItem/SelectItem.js.map +1 -1
  129. package/es/components/Select/ui/SelectItem/SelectItem.styles.js +3 -3
  130. package/es/components/Select/ui/SelectItem/SelectItem.styles.js.map +1 -1
  131. package/es/components/Select/ui/SelectItem/SelectItem.styles_1jgsd1a.css +1 -0
  132. package/es/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
  133. package/es/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
  134. package/es/index.css +13 -8
  135. package/es/index.js +3 -1
  136. package/es/index.js.map +1 -1
  137. package/package.json +2 -2
  138. package/styled-components/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +91 -2
  139. package/styled-components/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +27 -7
  140. package/styled-components/cjs/components/Combobox/utils/index.js +23 -0
  141. package/styled-components/cjs/components/Dropdown/Dropdown.js +140 -54
  142. package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +22 -7
  143. package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +12 -24
  144. package/styled-components/cjs/components/Dropdown/hooks/useHashMaps.js +29 -0
  145. package/styled-components/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +199 -0
  146. package/styled-components/cjs/components/Dropdown/index.js +9 -1
  147. package/styled-components/cjs/components/Dropdown/reducers/focusedPathReducer.js +40 -0
  148. package/styled-components/cjs/components/Dropdown/reducers/pathReducer.js +44 -0
  149. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +114 -0
  150. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.type.js +5 -0
  151. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +77 -105
  152. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +30 -15
  153. package/styled-components/cjs/components/Dropdown/ui/index.js +14 -13
  154. package/styled-components/cjs/components/Dropdown/utils/index.js +14 -13
  155. package/styled-components/cjs/components/Dropdown/variations/_size/tokens.json +1 -9
  156. package/styled-components/cjs/components/Dropdown/variations/_view/tokens.json +1 -1
  157. package/styled-components/cjs/components/Select/ui/SelectItem/SelectItem.js +2 -2
  158. package/styled-components/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +2 -2
  159. package/styled-components/cjs/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
  160. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +25 -0
  161. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.js +11 -0
  162. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +294 -0
  163. package/styled-components/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +90 -3
  164. package/styled-components/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +23 -6
  165. package/styled-components/es/components/Combobox/utils/index.js +15 -0
  166. package/styled-components/es/components/Dropdown/Dropdown.js +142 -55
  167. package/styled-components/es/components/Dropdown/Dropdown.styles.js +18 -5
  168. package/styled-components/es/components/Dropdown/Dropdown.tokens.js +12 -24
  169. package/styled-components/es/components/Dropdown/hooks/useHashMaps.js +23 -0
  170. package/styled-components/es/components/Dropdown/hooks/useKeyboardNavigation.js +193 -0
  171. package/styled-components/es/components/Dropdown/index.js +1 -0
  172. package/styled-components/es/components/Dropdown/reducers/focusedPathReducer.js +34 -0
  173. package/styled-components/es/components/Dropdown/reducers/pathReducer.js +38 -0
  174. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +108 -0
  175. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.type.js +1 -0
  176. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +78 -107
  177. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +27 -11
  178. package/styled-components/es/components/Dropdown/ui/index.js +2 -1
  179. package/styled-components/es/components/Dropdown/utils/index.js +13 -13
  180. package/styled-components/es/components/Dropdown/variations/_size/tokens.json +1 -9
  181. package/styled-components/es/components/Dropdown/variations/_view/tokens.json +1 -1
  182. package/styled-components/es/components/Select/ui/SelectItem/SelectItem.js +2 -2
  183. package/styled-components/es/components/Select/ui/SelectItem/SelectItem.styles.js +2 -2
  184. package/styled-components/es/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
  185. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +19 -0
  186. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.js +5 -0
  187. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +294 -0
  188. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.d.ts +15 -13
  189. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.d.ts.map +1 -1
  190. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.d.ts +5 -1
  191. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.d.ts.map +1 -1
  192. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.type.d.ts +59 -2
  193. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.type.d.ts.map +1 -1
  194. package/types/components/Combobox/utils/index.d.ts +4 -0
  195. package/types/components/Combobox/utils/index.d.ts.map +1 -0
  196. package/types/components/Dropdown/Dropdown.d.ts +4 -4
  197. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  198. package/types/components/Dropdown/Dropdown.styles.d.ts +8 -1
  199. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  200. package/types/components/Dropdown/Dropdown.tokens.d.ts +9 -22
  201. package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
  202. package/types/components/Dropdown/Dropdown.types.d.ts +64 -40
  203. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  204. package/types/components/Dropdown/hooks/useHashMaps.d.ts +6 -0
  205. package/types/components/Dropdown/hooks/useHashMaps.d.ts.map +1 -0
  206. package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts +23 -0
  207. package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts.map +1 -0
  208. package/types/components/Dropdown/index.d.ts +3 -1
  209. package/types/components/Dropdown/index.d.ts.map +1 -1
  210. package/types/components/Dropdown/reducers/focusedPathReducer.d.ts +16 -0
  211. package/types/components/Dropdown/reducers/focusedPathReducer.d.ts.map +1 -0
  212. package/types/components/Dropdown/reducers/pathReducer.d.ts +20 -0
  213. package/types/components/Dropdown/reducers/pathReducer.d.ts.map +1 -0
  214. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts +5 -0
  215. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts.map +1 -0
  216. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts +26 -0
  217. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts.map +1 -0
  218. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts +2 -56
  219. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  220. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +5 -1
  221. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
  222. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts +44 -38
  223. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts.map +1 -1
  224. package/types/components/Dropdown/ui/index.d.ts +2 -1
  225. package/types/components/Dropdown/ui/index.d.ts.map +1 -1
  226. package/types/components/Dropdown/utils/index.d.ts +5 -3
  227. package/types/components/Dropdown/utils/index.d.ts.map +1 -1
  228. package/types/components/Select/ui/SelectItem/SelectItem.d.ts +2 -2
  229. package/types/components/Select/ui/SelectItem/SelectItem.type.d.ts +2 -2
  230. package/types/components/Select/utils/index.d.ts +1 -1
  231. package/types/components/_Icon/Icon.assets/DisclosureRight.d.ts.map +1 -1
  232. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts.map +1 -0
  233. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +13 -0
  234. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -0
  235. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_936wgl.css +0 -1
  236. package/cjs/components/Dropdown/Dropdown.styles_1daxhqh.css +0 -2
  237. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1juhjtq.css +0 -4
  238. package/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base.js +0 -9
  239. package/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base.js.map +0 -1
  240. package/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base_x642ct.css +0 -1
  241. package/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base.js +0 -9
  242. package/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base.js.map +0 -1
  243. package/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base_x642ct.css +0 -1
  244. package/cjs/components/Select/ui/SelectItem/SelectItem.styles_6h17aw.css +0 -1
  245. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_936wgl.css +0 -1
  246. package/es/components/Dropdown/Dropdown.styles_1daxhqh.css +0 -2
  247. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1juhjtq.css +0 -4
  248. package/es/components/Dropdown/ui/DropdownItem/variations/_size/base.js +0 -5
  249. package/es/components/Dropdown/ui/DropdownItem/variations/_size/base.js.map +0 -1
  250. package/es/components/Dropdown/ui/DropdownItem/variations/_size/base_x642ct.css +0 -1
  251. package/es/components/Dropdown/ui/DropdownItem/variations/_view/base.js +0 -5
  252. package/es/components/Dropdown/ui/DropdownItem/variations/_view/base.js.map +0 -1
  253. package/es/components/Dropdown/ui/DropdownItem/variations/_view/base_x642ct.css +0 -1
  254. package/es/components/Select/ui/SelectItem/SelectItem.styles_6h17aw.css +0 -1
  255. package/styled-components/cjs/components/Dropdown/Dropdown.template-doc.mdx +0 -80
  256. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base.js +0 -8
  257. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_size/tokens.json +0 -19
  258. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base.js +0 -8
  259. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_view/tokens.json +0 -9
  260. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +0 -27
  261. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.js +0 -13
  262. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +0 -194
  263. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +0 -27
  264. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.js +0 -13
  265. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
  266. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +0 -27
  267. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.js +0 -13
  268. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +0 -195
  269. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +0 -27
  270. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.js +0 -13
  271. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
  272. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.config.js +0 -22
  273. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.js +0 -21
  274. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.stories.tsx +0 -277
  275. package/styled-components/es/components/Dropdown/Dropdown.template-doc.mdx +0 -80
  276. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_size/base.js +0 -2
  277. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_size/tokens.json +0 -19
  278. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_view/base.js +0 -2
  279. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_view/tokens.json +0 -9
  280. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +0 -21
  281. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.js +0 -7
  282. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +0 -194
  283. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +0 -21
  284. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.js +0 -7
  285. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
  286. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +0 -21
  287. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.js +0 -7
  288. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +0 -195
  289. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +0 -21
  290. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.js +0 -7
  291. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
  292. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.config.js +0 -16
  293. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.js +0 -15
  294. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.stories.tsx +0 -277
  295. package/types/components/Dropdown/ui/DropdownItem/variations/_size/base.d.ts +0 -2
  296. package/types/components/Dropdown/ui/DropdownItem/variations/_size/base.d.ts.map +0 -1
  297. package/types/components/Dropdown/ui/DropdownItem/variations/_view/base.d.ts +0 -2
  298. package/types/components/Dropdown/ui/DropdownItem/variations/_view/base.d.ts.map +0 -1
  299. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.d.ts.map +0 -1
  300. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.d.ts +0 -30
  301. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.d.ts.map +0 -1
  302. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.d.ts +0 -18
  303. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.d.ts.map +0 -1
  304. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.d.ts +0 -30
  305. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.d.ts.map +0 -1
  306. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts +0 -18
  307. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts.map +0 -1
  308. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.d.ts +0 -30
  309. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.d.ts.map +0 -1
  310. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts +0 -18
  311. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts.map +0 -1
  312. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.d.ts +0 -30
  313. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.d.ts.map +0 -1
  314. package/types/examples/sds_engineer/components/Dropdown/Dropdown.config.d.ts +0 -15
  315. package/types/examples/sds_engineer/components/Dropdown/Dropdown.config.d.ts.map +0 -1
  316. package/types/examples/sds_engineer/components/Dropdown/Dropdown.d.ts +0 -51
  317. package/types/examples/sds_engineer/components/Dropdown/Dropdown.d.ts.map +0 -1
  318. /package/types/examples/plasma_b2c/components/Dropdown/{Normal/Dropdown.config.d.ts → Dropdown.config.d.ts} +0 -0
@@ -1 +1 @@
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,iBAAgB;AAEzC,IAAMC,kBAAkB,GAAG;AAC9BC,EAAAA,IAAI,EAAE,cAAc;AACpBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEL,gBAAgB;AACxBM,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACRC,IAAAA,IAAI,EAAE;AACFC,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDC,IAAAA,IAAI,EAAE;AACFF,MAAAA,GAAG,EAAEG,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNL,IAAAA,IAAI,EAAE,SAAS;AACfG,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"ComboboxItem.js","sources":["../../../../../src/components/Combobox/ui/ComboboxItem/ComboboxItem.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../../../engines';\nimport { classes } from '../../Combobox.tokens';\nimport { getValidComponent } from '../../utils';\nimport { cx } from '../../../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledContentLeft, StyledContentRight, StyledText, base } from './ComboboxItem.styles';\nimport { ComboboxItemProps } from './ComboboxItem.type';\n\nexport const comboboxItemRoot = (Root: RootProps<HTMLDivElement, ComboboxItemProps>) =>\n forwardRef<HTMLDivElement, ComboboxItemProps>(\n (\n {\n id,\n className,\n children,\n text,\n isSelected,\n name,\n checked,\n value,\n view,\n size,\n disabled,\n role = 'option',\n contentLeft: ContentLeftComponent,\n contentRight: ContentRightComponent,\n onSelect,\n onClick,\n onChange,\n ...rest\n },\n outerRootRef,\n ) => {\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n\n const withComboboxItemIsSelected = checked || isSelected ? classes.comboboxItemIsDisabled : undefined;\n const withComboboxItemIsDisabled = disabled ? classes.comboboxItemIsDisabled : undefined;\n\n const handleOnClick = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n if (disabled) {\n return;\n }\n\n onClick?.(event);\n\n if (onSelect && !ContentLeftComponent) {\n onSelect(value, text);\n }\n },\n [onSelect, disabled],\n );\n\n const handleOnChange = useCallback(\n (event: React.MouseEvent<HTMLInputElement>) => {\n if (disabled) {\n return;\n }\n\n onChange?.(event);\n\n if (onSelect && ContentLeftComponent) {\n onSelect(value, text);\n }\n },\n [onSelect, disabled],\n );\n\n const contentProps = {\n name,\n value,\n checked: checked || isSelected,\n disabled,\n tabIndex: -1,\n ...(!disabled && { onChange: handleOnChange }),\n };\n\n const ContentLeft = useMemo(() => getValidComponent(ContentLeftComponent, contentProps), [\n ContentRightComponent,\n contentProps,\n ]);\n\n const ContentRight = useMemo(() => getValidComponent(ContentRightComponent, contentProps), [\n ContentRightComponent,\n contentProps,\n ]);\n\n return (\n <Root\n className={cx(withComboboxItemIsSelected, withComboboxItemIsDisabled, className)}\n view={view}\n size={size}\n id={innerId}\n isSelected={isSelected}\n role={role}\n ref={outerRootRef}\n tabIndex={0}\n aria-disabled={disabled}\n aria-selected={isSelected}\n onClick={handleOnClick}\n data-value={value}\n {...rest}\n >\n {text ? (\n <>\n <StyledContentLeft>{ContentLeftComponent && ContentLeft}</StyledContentLeft>\n <StyledText>{text}</StyledText>\n <StyledContentRight>{ContentRightComponent && ContentRight}</StyledContentRight>\n </>\n ) : (\n children\n )}\n </Root>\n );\n },\n );\n\nexport const comboboxItemConfig = {\n name: 'ComboboxItem',\n tag: 'div',\n layout: comboboxItemRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["comboboxItemRoot","Root","forwardRef","_ref","outerRootRef","id","className","children","text","isSelected","name","checked","value","view","size","disabled","_ref$role","role","ContentLeftComponent","contentLeft","ContentRightComponent","contentRight","onSelect","onClick","onChange","rest","_objectWithoutProperties","_excluded","uniqId","safeUseId","innerId","withComboboxItemIsSelected","classes","comboboxItemIsDisabled","undefined","withComboboxItemIsDisabled","handleOnClick","useCallback","event","handleOnChange","contentProps","_objectSpread","tabIndex","ContentLeft","useMemo","getValidComponent","ContentRight","React","createElement","_extends","cx","ref","Fragment","StyledContentLeft","StyledText","StyledContentRight","comboboxItemConfig","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;IAaaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,IAAkD,EAAA;AAAA,EAAA,oBAC/EC,UAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IApBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,SAAS,GAAAH,IAAA,CAATG,SAAS;MACTC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,IAAI,GAAAL,IAAA,CAAJK,IAAI;MACJC,UAAU,GAAAN,IAAA,CAAVM,UAAU;MACVC,IAAI,GAAAP,IAAA,CAAJO,IAAI;MACJC,OAAO,GAAAR,IAAA,CAAPQ,OAAO;MACPC,KAAK,GAAAT,IAAA,CAALS,KAAK;MACLC,IAAI,GAAAV,IAAA,CAAJU,IAAI;MACJC,IAAI,GAAAX,IAAA,CAAJW,IAAI;MACJC,QAAQ,GAAAZ,IAAA,CAARY,QAAQ;MAAAC,SAAA,GAAAb,IAAA,CACRc,IAAI;AAAJA,MAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA;MACFE,oBAAoB,GAAAf,IAAA,CAAjCgB,WAAW;MACGC,qBAAqB,GAAAjB,IAAA,CAAnCkB,YAAY;MACZC,QAAQ,GAAAnB,IAAA,CAARmB,QAAQ;MACRC,OAAO,GAAApB,IAAA,CAAPoB,OAAO;MACPC,QAAQ,GAAArB,IAAA,CAARqB,QAA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ACIL,IAAAA,eAAAA,KAAA,CAAAC,aAAA,CAACK,iBAAiB,EAAEnC,IAAAA,EAAAA,oBAAoB,IAAIyB,WAA+B,CAAC,eAC5EI,KAAA,CAAAC,aAAA,CAACM,UAAU,QAAE9C,IAAiB,CAAC,eAC/BuC,KAAA,CAAAC,aAAA,CAACO,kBAAkB,QAAEnC,qBAAqB,IAAI0B,YAAiC,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,IAAI;AACJC,EAAAA,UAAU,EAAE;AACR/C,IAAAA,IAAI,EAAE;AACFgD,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDhD,IAAAA,IAAI,EAAE;AACF+C,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNnD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
@@ -1,14 +1,23 @@
1
- import './ComboboxItem.styles_936wgl.css';
2
- import 'react';
3
- import '@salutejs/plasma-core';
4
- import '@linaria/react';
5
- import '@linaria/core';
1
+ import './ComboboxItem.styles_s4sk53.css';
2
+ import { styled } from '@linaria/react';
6
3
  import 'focus-visible';
7
- import 'react-dom';
8
- import 'react-popper';
9
- import '../../../../utils/react.js';
10
4
 
11
- var base = "b1thh7ji";
5
+ var StyledContentLeft = /*#__PURE__*/styled('div')({
6
+ name: "StyledContentLeft",
7
+ "class": "s1thh7ji",
8
+ propsAsIs: false
9
+ });
10
+ var StyledContentRight = /*#__PURE__*/styled('div')({
11
+ name: "StyledContentRight",
12
+ "class": "s1exy6xj",
13
+ propsAsIs: false
14
+ });
15
+ var StyledText = /*#__PURE__*/styled('div')({
16
+ name: "StyledText",
17
+ "class": "s18437sq",
18
+ propsAsIs: false
19
+ });
20
+ var base = "bvoi56l";
12
21
 
13
- export { base };
22
+ export { StyledContentLeft, StyledContentRight, StyledText, base };
14
23
  //# 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';\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;;;;"}
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,MAAM,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,MAAM,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,MAAM,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;;;;"}
@@ -0,0 +1,4 @@
1
+ .s1thh7ji{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-width:var(--plasma-combobox-item-content-left-width);color:var(--plasma-combobox-item-content-left-color);}
2
+ .s1exy6xj{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-width:var(--plasma-combobox-item-content-right-width);color:var(--plasma-combobox-item-content-right-color);}
3
+ .s18437sq{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
4
+ .bvoi56l{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-combobox-item-font-family);font-size:var(--plasma-combobox-item-font-size);font-style:var(--plasma-combobox-item-font-style);font-weight:var(--plasma-combobox-item-letter-spacing);-webkit-letter-spacing:var(--plasma-combobox-item-line-height);-moz-letter-spacing:var(--plasma-combobox-item-line-height);-ms-letter-spacing:var(--plasma-combobox-item-line-height);letter-spacing:var(--plasma-combobox-item-line-height);line-height:var(--plasma-combobox-item-font-weight);background:var(--plasma-combobox-item-background);color:var(--plasma-combobox-item-color);border-radius:var(--plasma-combobox-item-border-radius);width:var(--plasma-combobox-item-width);height:var(--plasma-combobox-item-height);padding:var(--plasma-combobox-item-padding-top) var(--plasma-combobox-item-padding-right) var(--plasma-combobox-item-padding-bottom) var(--plasma-combobox-item-padding-left);margin:var(--plasma-combobox-item-margin-top) var(--plasma-combobox-item-margin-right) var(--plasma-combobox-item-margin-bottom) var(--plasma-combobox-item-margin-left);}.bvoi56l:focus{outline:none;}.bvoi56l::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-combobox-item-border-radius);-webkit-transition:none;transition:none;pointer-events:none;}.bvoi56l.focus-visible:focus::before,.bvoi56l[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-combobox-focus-color);}.bvoi56l:hover:not(.combobox-item-is-disabled){cursor:pointer;background:var(--plasma-combobox-item-background-hover);}.bvoi56l.combobox-item-is-selected{color:var(--plasma-combobox-item-color-selected);background:var(--plasma-combobox-item-background-selected);}.bvoi56l.combobox-item-is-selected:hover:not(.combobox-item-is-disabled){background:var(--plasma-combobox-item-background-selected-hover);}.bvoi56l.combobox-item-is-disabled{opacity:var(--plasma-combobox-disabled-opacity);cursor:not-allowed;}
@@ -0,0 +1,19 @@
1
+ import { typeof as _typeof } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import React, { isValidElement, cloneElement } from 'react';
3
+
4
+ var isReactObject = function isReactObject(element) {
5
+ return _typeof(element) === 'object' || typeof element === 'function';
6
+ };
7
+ var getValidComponent = function getValidComponent(element, props) {
8
+ if ( /*#__PURE__*/isValidElement(element)) {
9
+ return /*#__PURE__*/cloneElement(element, props);
10
+ }
11
+ if (isReactObject(element)) {
12
+ var Component = element;
13
+ return /*#__PURE__*/React.createElement(Component, props);
14
+ }
15
+ return element;
16
+ };
17
+
18
+ export { getValidComponent };
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Combobox/utils/index.tsx"],"sourcesContent":["import React, { cloneElement, isValidElement } from 'react';\nimport type { ElementType, ReactNode } from 'react';\n\nconst isReactObject = (element: any): element is ElementType => {\n return typeof element === 'object' || typeof element === 'function';\n};\n\nexport const getValidComponent = (element: ElementType | ReactNode, props: object) => {\n if (isValidElement(element)) {\n return cloneElement(element, props);\n }\n\n if (isReactObject(element)) {\n const Component = element;\n\n return <Component {...props} />;\n }\n\n return element;\n};\n"],"names":["isReactObject","element","_typeof","getValidComponent","props","isValidElement","cloneElement","Component","React","createElement"],"mappings":";;;AAGA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,OAAY,EAA6B;EAC5D,OAAOC,OAAA,CAAOD,OAAO,CAAA,KAAK,QAAQ,IAAI,OAAOA,OAAO,KAAK,UAAU,CAAA;AACvE,CAAC,CAAA;AAEM,IAAME,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIF,OAAgC,EAAEG,KAAa,EAAK;AAClF,EAAA,kBAAIC,cAAc,CAACJ,OAAO,CAAC,EAAE;AACzB,IAAA,oBAAOK,YAAY,CAACL,OAAO,EAAEG,KAAK,CAAC,CAAA;AACvC,GAAA;AAEA,EAAA,IAAIJ,aAAa,CAACC,OAAO,CAAC,EAAE;IACxB,IAAMM,SAAS,GAAGN,OAAO,CAAA;AAEzB,IAAA,oBAAOO,KAAA,CAAAC,aAAA,CAACF,SAAS,EAAKH,KAAQ,CAAC,CAAA;AACnC,GAAA;AAEA,EAAA,OAAOH,OAAO,CAAA;AAClB;;;;"}
@@ -1,7 +1,25 @@
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
+
1
18
  .Popover_styles_rmr9za_s1g1xbt5__0bafa6fb{display:inline-block;}
2
19
  .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;}
3
20
  .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);}
4
21
  .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;}
5
22
 
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);}
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;}
@@ -1,87 +1,171 @@
1
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
- import React, { forwardRef, useRef } from 'react';
3
- import { useUniqId, useForkRef, useFocusTrap } from '@salutejs/plasma-core';
4
- import { base } from './variations/_view/base.js';
5
- import { base as base$1 } from './variations/_size/base.js';
6
- import { StyledPopover, StyledDropdown } from './Dropdown.styles.js';
7
- import { getPlacements } from './utils/index.js';
1
+ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import React, { forwardRef, useReducer } from 'react';
3
+ import { cx } from '../../utils/index.js';
4
+ import { pathReducer } from './reducers/pathReducer.js';
5
+ import { focusedPathReducer } from './reducers/focusedPathReducer.js';
6
+ import '@salutejs/plasma-core';
7
+ import '@linaria/react';
8
+ import { classes } from './Dropdown.tokens.js';
9
+ import 'focus-visible';
10
+ import { DropdownInner } from './ui/DropdownInner/DropdownInner.js';
11
+ import { base as base$1 } from './variations/_view/base.js';
12
+ import { base as base$2 } from './variations/_size/base.js';
13
+ import { StyledPopover, Ul, base } from './Dropdown.styles.js';
14
+ import { getPlacements, childrenWithProps } from './utils/index.js';
15
+ import { useKeyNavigation } from './hooks/useKeyboardNavigation.js';
16
+ import { useHashMaps } from './hooks/useHashMaps.js';
17
+
18
+ var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow"];
8
19
 
9
- var _excluded = ["id", "target", "children", "hasArrow", "role", "view", "size", "frame", "onToggle", "isFocusTrapped", "isOpen", "placement", "trigger", "offset", "preventOverflow", "closeOnOverlayClick", "closeOnEsc"];
10
20
  /**
11
- * Выпадающий список без внешнего контроля видимости.
21
+ * Выпадающий список.
12
22
  */
13
23
  var dropdownRoot = function dropdownRoot(Root) {
14
- return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
15
- var id = _ref.id,
16
- target = _ref.target,
24
+ return /*#__PURE__*/forwardRef(function (_ref, ref) {
25
+ var items = _ref.items,
17
26
  children = _ref.children,
18
- hasArrow = _ref.hasArrow,
19
- role = _ref.role,
20
- view = _ref.view,
21
- size = _ref.size,
22
- frame = _ref.frame,
23
- _onToggle = _ref.onToggle,
24
- _ref$isFocusTrapped = _ref.isFocusTrapped,
25
- isFocusTrapped = _ref$isFocusTrapped === void 0 ? true : _ref$isFocusTrapped,
26
- _ref$isOpen = _ref.isOpen,
27
- isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
28
27
  _ref$placement = _ref.placement,
29
- placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
30
- _ref$trigger = _ref.trigger,
31
- trigger = _ref$trigger === void 0 ? 'click' : _ref$trigger,
28
+ placement = _ref$placement === void 0 ? 'bottom' : _ref$placement,
32
29
  _ref$offset = _ref.offset,
33
- offset = _ref$offset === void 0 ? [0, 6] : _ref$offset,
34
- _ref$preventOverflow = _ref.preventOverflow,
35
- preventOverflow = _ref$preventOverflow === void 0 ? false : _ref$preventOverflow,
30
+ offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
36
31
  _ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
37
- closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? false : _ref$closeOnOverlayCl,
38
- _ref$closeOnEsc = _ref.closeOnEsc,
39
- closeOnEsc = _ref$closeOnEsc === void 0 ? false : _ref$closeOnEsc,
32
+ closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
33
+ onToggle = _ref.onToggle,
34
+ size = _ref.size,
35
+ view = _ref.view,
36
+ _ref$itemRole = _ref.itemRole,
37
+ itemRole = _ref$itemRole === void 0 ? 'option' : _ref$itemRole,
38
+ className = _ref.className,
39
+ listWidth = _ref.listWidth,
40
+ listHeight = _ref.listHeight,
41
+ listOverflow = _ref.listOverflow,
42
+ _ref$closeOnSelect = _ref.closeOnSelect,
43
+ closeOnSelect = _ref$closeOnSelect === void 0 ? true : _ref$closeOnSelect,
44
+ onHover = _ref.onHover,
45
+ onItemSelect = _ref.onItemSelect,
46
+ onItemClick = _ref.onItemClick,
47
+ _ref$trigger = _ref.trigger,
48
+ trigger = _ref$trigger === void 0 ? 'click' : _ref$trigger,
49
+ _ref$variant = _ref.variant,
50
+ variant = _ref$variant === void 0 ? 'normal' : _ref$variant,
51
+ _ref$hasArrow = _ref.hasArrow,
52
+ hasArrow = _ref$hasArrow === void 0 ? true : _ref$hasArrow,
40
53
  rest = _objectWithoutProperties(_ref, _excluded);
41
- var uniqId = useUniqId();
42
- var innerId = id || uniqId;
43
- var rootRef = useRef(null);
44
- var dropdownRef = useRef(null);
45
- var handleRef = useForkRef(rootRef, outerRootRef);
46
- var trapRef = useFocusTrap(isOpen && isFocusTrapped);
47
- var dropdownForkRef = useForkRef(dropdownRef, trapRef);
48
- return /*#__PURE__*/React.createElement(StyledPopover, {
49
- role: role,
50
- isOpen: isOpen,
54
+ var _useReducer = useReducer(pathReducer, []),
55
+ _useReducer2 = _slicedToArray(_useReducer, 2),
56
+ path = _useReducer2[0],
57
+ dispatchPath = _useReducer2[1];
58
+ var _useReducer3 = useReducer(focusedPathReducer, []),
59
+ _useReducer4 = _slicedToArray(_useReducer3, 2),
60
+ focusedPath = _useReducer4[0],
61
+ dispatchFocusedPath = _useReducer4[1];
62
+ var _useHashMaps = useHashMaps(items),
63
+ _useHashMaps2 = _slicedToArray(_useHashMaps, 2),
64
+ pathMap = _useHashMaps2[0],
65
+ focusedToValueMap = _useHashMaps2[1];
66
+ var handleGlobalToggle = function handleGlobalToggle(opened, event) {
67
+ if (opened) {
68
+ dispatchPath({
69
+ type: 'opened_first_level'
70
+ });
71
+ } else {
72
+ dispatchFocusedPath({
73
+ type: 'reset'
74
+ });
75
+ dispatchPath({
76
+ type: 'reset'
77
+ });
78
+ }
79
+ if (onToggle) {
80
+ onToggle(opened, event);
81
+ }
82
+ };
83
+ var _useKeyNavigation = useKeyNavigation({
84
+ focusedPath: focusedPath,
85
+ dispatchFocusedPath: dispatchFocusedPath,
86
+ path: path,
87
+ dispatchPath: dispatchPath,
88
+ pathMap: pathMap,
89
+ focusedToValueMap: focusedToValueMap,
90
+ handleGlobalToggle: handleGlobalToggle,
91
+ closeOnSelect: closeOnSelect,
92
+ onItemSelect: onItemSelect,
93
+ onItemClick: onItemClick
94
+ }),
95
+ onKeyDown = _useKeyNavigation.onKeyDown;
96
+ var isCurrentListOpen = Boolean(path[0]);
97
+ var getActiveDescendant = function getActiveDescendant() {
98
+ var _focusedToValueMap$ge;
99
+ var focusedPathAsString = focusedPath.reduce(function (acc, n) {
100
+ return "".concat(acc, "/").concat(n);
101
+ }, '').replace(/^(\/)/, '');
102
+ return focusedToValueMap === null || focusedToValueMap === void 0 || (_focusedToValueMap$ge = focusedToValueMap.get(focusedPathAsString)) === null || _focusedToValueMap$ge === void 0 ? void 0 : _focusedToValueMap$ge.value.toString();
103
+ };
104
+ return /*#__PURE__*/React.createElement(Root, _extends({
105
+ className: cx(className, classes.dropdownRoot),
106
+ ref: ref,
107
+ view: view,
108
+ size: size,
109
+ items: items
110
+ }, rest), /*#__PURE__*/React.createElement(StyledPopover, {
111
+ isOpen: isCurrentListOpen,
51
112
  usePortal: false,
52
- onToggle: function onToggle(is, event) {
53
- return _onToggle === null || _onToggle === void 0 ? void 0 : _onToggle(is, event);
54
- },
55
- id: innerId,
56
- ref: dropdownForkRef,
57
- target: target,
113
+ onToggle: handleGlobalToggle,
58
114
  offset: offset,
59
- preventOverflow: preventOverflow,
60
- hasArrow: hasArrow,
61
115
  placement: getPlacements(placement),
62
116
  trigger: trigger,
63
117
  closeOnOverlayClick: closeOnOverlayClick,
64
- closeOnEsc: closeOnEsc,
65
- isFocusTrapped: isFocusTrapped,
66
- frame: frame
67
- }, /*#__PURE__*/React.createElement(Root, _extends({
68
- ref: handleRef,
69
- view: view,
70
- size: size
71
- }, rest), /*#__PURE__*/React.createElement(StyledDropdown, null, children)));
118
+ isFocusTrapped: false,
119
+ target: childrenWithProps(children, {
120
+ role: 'combobox',
121
+ 'aria-controls': 'listbox1',
122
+ 'aria-expanded': isCurrentListOpen,
123
+ 'aria-haspopup': 'listbox',
124
+ 'aria-activedescendant': getActiveDescendant(),
125
+ onKeyDown: onKeyDown
126
+ })
127
+ }, /*#__PURE__*/React.createElement(Ul, {
128
+ listHeight: listHeight,
129
+ listOverflow: listOverflow,
130
+ role: "listbox",
131
+ id: "listbox1",
132
+ listWidth: listWidth
133
+ }, items.map(function (item, index) {
134
+ return /*#__PURE__*/React.createElement(DropdownInner, {
135
+ key: "".concat(index, "/0"),
136
+ item: item,
137
+ currentLevel: 0,
138
+ focusedPath: focusedPath,
139
+ trigger: trigger,
140
+ path: path,
141
+ dispatchPath: dispatchPath,
142
+ index: index,
143
+ itemRole: itemRole,
144
+ listHeight: listHeight,
145
+ listOverflow: listOverflow,
146
+ handleGlobalToggle: handleGlobalToggle,
147
+ closeOnSelect: closeOnSelect,
148
+ onHover: onHover,
149
+ onItemSelect: onItemSelect,
150
+ onItemClick: onItemClick,
151
+ listWidth: listWidth,
152
+ variant: variant,
153
+ hasArrow: hasArrow
154
+ });
155
+ }))));
72
156
  });
73
157
  };
74
158
  var dropdownConfig = {
75
159
  name: 'Dropdown',
76
160
  tag: 'div',
77
161
  layout: dropdownRoot,
78
- base: '',
162
+ base: base,
79
163
  variations: {
80
164
  view: {
81
- css: base
165
+ css: base$1
82
166
  },
83
167
  size: {
84
- css: base$1
168
+ css: base$2
85
169
  }
86
170
  },
87
171
  defaults: {
@@ -1 +1 @@
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,UAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IApBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;MACRC,IAAI,GAAAN,IAAA,CAAJM,IAAI;MACJC,IAAI,GAA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KAAAA;AAAM,KAAA,eAEbgC,KAAA,CAAAC,aAAA,CAAC5C,IAAI,EAAAmD,QAAA,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,cAAc,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,IAAAA;KACR;AACDlD,IAAAA,IAAI,EAAE;AACFiD,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNrD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { forwardRef, useReducer } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport { pathReducer } from './reducers/pathReducer';\nimport { focusedPathReducer } from './reducers/focusedPathReducer';\nimport { DropdownInner } from './ui';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { Ul, StyledPopover, base } from './Dropdown.styles';\nimport { getPlacements, childrenWithProps } from './utils';\nimport type { DropdownProps, HandleGlobalToggleType } from './Dropdown.types';\nimport { classes } from './Dropdown.tokens';\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport { useHashMaps } from './hooks/useHashMaps';\n\n/**\n * Выпадающий список.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, DropdownProps>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n items,\n children,\n placement = 'bottom',\n offset = [0, 0],\n closeOnOverlayClick = true,\n onToggle,\n size,\n view,\n itemRole = 'option',\n className,\n listWidth,\n listHeight,\n listOverflow,\n closeOnSelect = true,\n onHover,\n onItemSelect,\n onItemClick,\n trigger = 'click',\n variant = 'normal',\n hasArrow = true,\n ...rest\n },\n ref,\n ) => {\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n\n const [pathMap, focusedToValueMap] = useHashMaps(items);\n\n const handleGlobalToggle: HandleGlobalToggleType = (opened, event) => {\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n\n if (onToggle) {\n onToggle(opened, event);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleGlobalToggle,\n closeOnSelect,\n onItemSelect,\n onItemClick,\n });\n\n const isCurrentListOpen = Boolean(path[0]);\n\n const getActiveDescendant = () => {\n const focusedPathAsString = focusedPath.reduce((acc, n) => `${acc}/${n}`, '').replace(/^(\\/)/, '');\n return focusedToValueMap?.get(focusedPathAsString)?.value.toString();\n };\n\n return (\n <Root\n className={cx(className, classes.dropdownRoot)}\n ref={ref}\n view={view}\n size={size}\n items={items}\n {...rest}\n >\n <StyledPopover\n isOpen={isCurrentListOpen}\n usePortal={false}\n onToggle={handleGlobalToggle}\n offset={offset}\n placement={getPlacements(placement)}\n trigger={trigger}\n closeOnOverlayClick={closeOnOverlayClick}\n isFocusTrapped={false}\n target={childrenWithProps(children, {\n role: 'combobox',\n 'aria-controls': 'listbox1',\n 'aria-expanded': isCurrentListOpen,\n 'aria-haspopup': 'listbox',\n 'aria-activedescendant': getActiveDescendant(),\n onKeyDown,\n })}\n >\n <Ul\n listHeight={listHeight}\n listOverflow={listOverflow}\n role=\"listbox\"\n id=\"listbox1\"\n listWidth={listWidth}\n >\n {items.map((item, index) => (\n <DropdownInner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n focusedPath={focusedPath}\n trigger={trigger}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n itemRole={itemRole}\n listHeight={listHeight}\n listOverflow={listOverflow}\n handleGlobalToggle={handleGlobalToggle}\n closeOnSelect={closeOnSelect}\n onHover={onHover}\n onItemSelect={onItemSelect}\n onItemClick={onItemClick}\n listWidth={listWidth}\n variant={variant}\n hasArrow={hasArrow}\n />\n ))}\n </Ul>\n </StyledPopover>\n </Root>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["dropdownRoot","Root","forwardRef","_ref","ref","items","children","_ref$placement","placement","_ref$offset","offset","_ref$closeOnOverlayCl","closeOnOverlayClick","onToggle","size","view","_ref$itemRole","itemRole","className","listWidth","listHeight","listOverflow","_ref$closeOnSelect","closeOnSelect","onHover","onItemSelect","onItemClick","_ref$trigger","trigger","_ref$variant","variant","_ref$hasArrow","hasArrow","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","pathReducer","_useReducer2","_slicedToArray","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useHashMaps","useHashMaps","_useHashMaps2","pathMap","focusedToValueMap","handleGlobalToggle","opened","event","type","_useKeyNavigation","useKeyNavigation","onKeyDown","isCurrentListOpen","Boolean","getActiveDescendant","_focusedToValueMap$ge","focusedPathAsString","reduce","acc","n","concat","replace","get","value","toString","React","createElement","_extends","cx","classes","StyledPopover","isOpen","usePortal","getPlacements","isFocusTrapped","target","childrenWithProps","role","Ul","id","map","item","index","DropdownInner","key","currentLevel","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA8C,EAAA;AAAA,EAAA,oBACvEC,UAAU,CACN,UAAAC,IAAA,EAwBIC,GAAG,EACF;AAAA,IAAA,IAvBGC,KAAK,GAAAF,IAAA,CAALE,KAAK;MACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;MAAAC,cAAA,GAAAJ,IAAA,CACRK,SAAS;AAATA,MAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,cAAA;MAAAE,WAAA,GAAAN,IAAA,CACpBO,MAAM;MAANA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,CAAC,CAAC,EAAE,CAAC,CAAC,GAAAA,WAAA;MAAAE,qBAAA,GAAAR,IAAA,CACfS,mBAAmB;AAAnBA,MAAAA,mBAAmB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,qBAAA;MAC1BE,QAAQ,GAAAV,IAAA,CAARU,QAAQ;MACRC,IAAI,GAAAX,IAAA,CAAJW,IAAI;MACJC,IAAI,GAAAZ,IAAA,CAAJY,IAAI;MAAAC,aAAA,GAAAb,IAAA,CACJc,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,aAAA;MACnBE,SAAS,GAAAf,IAAA,CAATe,SAAS;MACTC,SAAS,GAAAhB,IAAA,CAATgB,SAAS;MACTC,UAAU,GAAAjB,IAAA,CAAViB,UAAU;MACVC,YAAY,GAAAlB,IAAA,CAAZkB,YAAY;MAAAC,kBAAA,GAAAnB,IAAA,CACZoB,aAAa;AAAbA,MAAAA,aAAa,GAAAD,kB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SAAU;AACrBW,QAAAA,OAAO,EAAEA,OAAQ;AACjBE,QAAAA,QAAQ,EAAEA,QAAAA;AAAS,OACtB,CAAC,CAAA;KACL,CACD,CACO,CACb,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM8D,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEjG,YAAY;AACpBkG,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACRpF,IAAAA,IAAI,EAAE;AACFqF,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDvF,IAAAA,IAAI,EAAE;AACFsF,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNxF,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
@@ -1,10 +1,11 @@
1
- import './Dropdown.styles_1daxhqh.css';
1
+ import './Dropdown.styles_1tihqkp.css';
2
2
  import { styled } from '@linaria/react';
3
3
  import '@linaria/core';
4
4
  import { component } from '../../engines/common.js';
5
5
  import { popoverConfig } from '../Popover/Popover.js';
6
+ import { getCorrectHeight } from './utils/index.js';
7
+ import { tokens } from './Dropdown.tokens.js';
6
8
 
7
- // issue #823
8
9
  var Popover = /*#__PURE__*/component(popoverConfig);
9
10
  var _exp = function _exp() {
10
11
  return Popover;
@@ -14,11 +15,42 @@ var StyledPopover = /*#__PURE__*/styled(_exp())({
14
15
  "class": "sn7uamp",
15
16
  propsAsIs: true
16
17
  });
17
- var StyledDropdown = /*#__PURE__*/styled('div')({
18
- name: "StyledDropdown",
19
- "class": "sjr7fmv",
20
- propsAsIs: false
18
+ var _exp7 = function _exp7() {
19
+ return function (_ref) {
20
+ var listWidth = _ref.listWidth;
21
+ return listWidth || "var(".concat(tokens.width, ")");
22
+ };
23
+ };
24
+ var _exp8 = function _exp8() {
25
+ return function (_ref2) {
26
+ var listHeight = _ref2.listHeight;
27
+ return listHeight ? getCorrectHeight(listHeight) : 'auto';
28
+ };
29
+ };
30
+ var _exp9 = function _exp9() {
31
+ return function (_ref3) {
32
+ var listOverflow = _ref3.listOverflow;
33
+ return listOverflow || 'initial';
34
+ };
35
+ };
36
+ var _exp10 = function _exp10() {
37
+ return function (_ref4) {
38
+ var isInnerUl = _ref4.isInnerUl;
39
+ return isInnerUl ? "calc(var(".concat(tokens.padding, ") * -1) 0 0 var(").concat(tokens.padding, ")") : 0;
40
+ };
41
+ };
42
+ var Ul = /*#__PURE__*/styled('ul')({
43
+ name: "Ul",
44
+ "class": "ujr7fmv",
45
+ propsAsIs: false,
46
+ vars: {
47
+ "ujr7fmv-0": [/*#__PURE__*/_exp7()],
48
+ "ujr7fmv-1": [/*#__PURE__*/_exp8()],
49
+ "ujr7fmv-2": [/*#__PURE__*/_exp9()],
50
+ "ujr7fmv-3": [/*#__PURE__*/_exp10()]
51
+ }
21
52
  });
53
+ var base = "byfocd2";
22
54
 
23
- export { StyledDropdown, StyledPopover };
55
+ export { StyledPopover, Ul, base };
24
56
  //# 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';\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,SAAS,CAACC,aAAa,CAAC,CAAA;AAAC,IAAAC,IAAA,GAPvBA,SAOuBA,IAAAA,GAAA;AAAA,EAAA,OAELH,OAAO,CAAA;AAAA,CAAA,CAAA;AAApC,IAAMI,aAAa,gBAAGC,MAAM,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,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,gBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAYnC;;;;"}
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,SAAS,CAACC,aAAa,CAAC,CAAA;AAAC,IAAAC,IAAA,GATvBA,SASuBA,IAAAA,GAAA;AAAA,EAAA,OAELH,OAAO,CAAA;AAAA,CAAA,CAAA;AAApC,IAAMI,aAAa,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAIlC,EAAA;AAAC,IAAAC,KAAA,GAfgBA,SAehBA,KAAAA,GAAA;AAAA,EAAA,OAcW,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,SAAAA,GAAAA,IAAAA,CAAAA,SAAAA,CAAAA;AAAAA,IAAAA,OAAgBA,SAAS,IAAAC,MAAAA,CAAAA,MAAA,CAAWC,MAAM,CAACC,KAAM,EAAE,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,KAAA,GA7BjDA,SA6BiDA,KAAAA,GAAA;AAAA,EAAA,OACrD,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,UAAAA,GAAAA,KAAAA,CAAAA,UAAAA,CAAAA;AAAAA,IAAAA,OAAkBA,UAAU,GAAGC,gBAAgB,CAACD,UAAU,CAAC,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);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);}
3
+ .byfocd2{display:inline-block;}
@@ -1,45 +1,35 @@
1
1
  var classes = {
2
- dropdownItemIsSelected: 'dropdown-item-is-selected',
3
- dropdownItemIsDisabled: 'dropdown-item-is-disabled'
2
+ dropdownRoot: 'dropdown-root',
3
+ dropdownItemIsFocused: 'dropdown-item-is-focused',
4
+ dropdownItemIsDisabled: 'dropdown-item-is-disabled',
5
+ dropdownItemIsActive: 'dropdown-item-is-active'
4
6
  };
5
7
  var tokens = {
6
8
  background: '--plasma-dropdown-background',
7
9
  boxShadow: '--plasma-dropdown-box-shadow',
8
10
  width: '--plasma-dropdown-width',
9
- height: '--plasma-dropdown-height',
10
11
  borderRadius: '--plasma-dropdown-border-radius',
11
- paddingTop: '--plasma-dropdown-padding-top',
12
- paddingRight: '--plasma-dropdown-padding-right',
13
- paddingBottom: '--plasma-dropdown-padding-bottom',
14
- paddingLeft: '--plasma-dropdown-padding-left',
12
+ padding: '--plasma-dropdown-padding',
13
+ disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',
15
14
  itemBackground: '--plasma-dropdown-item-background',
16
15
  itemColor: '--plasma-dropdown-item-color',
17
16
  itemBackgroundHover: '--plasma-dropdown-item-background-hover',
18
- itemBackgroundSelected: '--plasma-dropdown-item-background-selected',
19
- itemColorSelected: '--plasma-dropdown-item-color-selected',
20
- itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover',
21
- itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover',
22
- itemWidth: '--plasma-dropdown-item-width',
23
- itemHeight: '--plasma-dropdown-item-height',
24
17
  itemBorderRadius: '--plasma-dropdown-item-border-radius',
25
18
  itemPaddingTop: '--plasma-dropdown-item-padding-top',
19
+ itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight',
26
20
  itemPaddingRight: '--plasma-dropdown-item-padding-right',
27
21
  itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',
22
+ itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight',
28
23
  itemPaddingLeft: '--plasma-dropdown-item-padding-left',
29
- itemMarginTop: '--plasma-dropdown-item-margin-top',
30
- itemMarginRight: '--plasma-dropdown-item-margin-right',
31
- itemMarginBottom: '--plasma-dropdown-item-margin-bottom',
32
- itemMarginLeft: '--plasma-dropdown-item-margin-left',
33
24
  itemFontFamily: '--plasma-dropdown-item-font-family',
34
25
  itemFontSize: '--plasma-dropdown-item-font-size',
35
26
  itemFontStyle: '--plasma-dropdown-item-font-style',
36
27
  itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',
37
28
  itemFontLetterSpacing: '--plasma-dropdown-item-line-height',
38
29
  itemFontLineHeight: '--plasma-dropdown-item-font-weight',
39
- itemContentLeftColor: '--plasma-dropdown-item-content-left-color',
40
- itemContentRightColor: '--plasma-dropdown-item-content-right-color',
41
- itemContentLeftWidth: '--plasma-dropdown-item-content-left-width',
42
- itemContentRightWidth: '--plasma-dropdown-item-content-right-width',
30
+ disabledOpacity: '--plasma-dropdown-disabled-opacity',
31
+ focusColor: '--plasma-dropdown-focus-color',
32
+ // TODO: Remove below tokens as soon as they are no longer needed
43
33
  footerBackground: '--plasma-dropdown-footer-background',
44
34
  footerWidth: '--plasma-dropdown-footer-width',
45
35
  footerHeight: '--plasma-dropdown-footer-height',
@@ -106,9 +96,7 @@ var tokens = {
106
96
  groupLabelMarginTop: '--plasma-dropdown-group-label-margin-top',
107
97
  groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',
108
98
  groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',
109
- groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',
110
- disabledOpacity: '--plasma-dropdown-disabled-opacity',
111
- focusColor: '--plasma-dropdown-focus-color'
99
+ groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left'
112
100
  };
113
101
 
114
102
  export { classes, tokens };