@salutejs/plasma-new-hope 0.77.1-canary.1197.8831064988.0 → 0.78.0-canary.1185.8884845022.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (332) 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 +136 -53
  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 +116 -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/TextField/TextField.js +2 -2
  65. package/cjs/components/TextField/TextField.js.map +1 -1
  66. package/cjs/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
  67. package/cjs/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
  68. package/cjs/index.css +13 -8
  69. package/cjs/index.js +5 -2
  70. package/cjs/index.js.map +1 -1
  71. package/es/components/Combobox/Combobox.css +12 -7
  72. package/es/components/Combobox/Combobox.js +1 -1
  73. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +10 -6
  74. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +3 -3
  75. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +10 -6
  76. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +3 -3
  77. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +10 -6
  78. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +3 -3
  79. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +10 -6
  80. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +3 -3
  81. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -23
  82. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +82 -11
  83. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js.map +1 -1
  84. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +19 -10
  85. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  86. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_s4sk53.css +4 -0
  87. package/es/components/Combobox/utils/index.js +19 -0
  88. package/es/components/Combobox/utils/index.js.map +1 -0
  89. package/es/components/Dropdown/Dropdown.css +20 -2
  90. package/es/components/Dropdown/Dropdown.js +142 -59
  91. package/es/components/Dropdown/Dropdown.js.map +1 -1
  92. package/es/components/Dropdown/Dropdown.styles.js +39 -7
  93. package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
  94. package/es/components/Dropdown/Dropdown.styles_1tihqkp.css +3 -0
  95. package/es/components/Dropdown/Dropdown.tokens.js +12 -24
  96. package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
  97. package/es/components/Dropdown/hooks/useHashMaps.js +27 -0
  98. package/es/components/Dropdown/hooks/useHashMaps.js.map +1 -0
  99. package/es/components/Dropdown/hooks/useKeyboardNavigation.js +196 -0
  100. package/es/components/Dropdown/hooks/useKeyboardNavigation.js.map +1 -0
  101. package/es/components/Dropdown/reducers/focusedPathReducer.js +33 -0
  102. package/es/components/Dropdown/reducers/focusedPathReducer.js.map +1 -0
  103. package/es/components/Dropdown/reducers/pathReducer.js +37 -0
  104. package/es/components/Dropdown/reducers/pathReducer.js.map +1 -0
  105. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +112 -0
  106. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -0
  107. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +7 -4
  108. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +80 -100
  109. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  110. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +30 -4
  111. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  112. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1o4szyu.css +5 -0
  113. package/es/components/Dropdown/utils/index.js +14 -14
  114. package/es/components/Dropdown/utils/index.js.map +1 -1
  115. package/es/components/Pagination/Pagination.css +39 -7
  116. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +39 -7
  117. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +2 -2
  118. package/es/components/Select/Select.css +39 -7
  119. package/es/components/Select/Select.js +3 -3
  120. package/es/components/Select/ui/SelectDivider/SelectDivider.css +10 -6
  121. package/es/components/Select/ui/SelectDivider/SelectDivider.js +3 -3
  122. package/es/components/Select/ui/SelectFooter/SelectFooter.css +10 -6
  123. package/es/components/Select/ui/SelectFooter/SelectFooter.js +3 -3
  124. package/es/components/Select/ui/SelectGroup/SelectGroup.css +10 -6
  125. package/es/components/Select/ui/SelectGroup/SelectGroup.js +3 -3
  126. package/es/components/Select/ui/SelectHeader/SelectHeader.css +10 -6
  127. package/es/components/Select/ui/SelectHeader/SelectHeader.js +3 -3
  128. package/es/components/Select/ui/SelectItem/SelectItem.css +59 -7
  129. package/es/components/Select/ui/SelectItem/SelectItem.js +4 -4
  130. package/es/components/Select/ui/SelectItem/SelectItem.js.map +1 -1
  131. package/es/components/Select/ui/SelectItem/SelectItem.styles.js +3 -3
  132. package/es/components/Select/ui/SelectItem/SelectItem.styles.js.map +1 -1
  133. package/es/components/Select/ui/SelectItem/SelectItem.styles_1jgsd1a.css +1 -0
  134. package/es/components/TextField/TextField.js +3 -3
  135. package/es/components/TextField/TextField.js.map +1 -1
  136. package/es/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
  137. package/es/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
  138. package/es/index.css +13 -8
  139. package/es/index.js +3 -1
  140. package/es/index.js.map +1 -1
  141. package/package.json +3 -3
  142. package/styled-components/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +91 -2
  143. package/styled-components/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +27 -7
  144. package/styled-components/cjs/components/Combobox/utils/index.js +23 -0
  145. package/styled-components/cjs/components/Dropdown/Dropdown.js +138 -53
  146. package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +22 -7
  147. package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +12 -24
  148. package/styled-components/cjs/components/Dropdown/hooks/useHashMaps.js +29 -0
  149. package/styled-components/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +199 -0
  150. package/styled-components/cjs/components/Dropdown/index.js +9 -1
  151. package/styled-components/cjs/components/Dropdown/reducers/focusedPathReducer.js +40 -0
  152. package/styled-components/cjs/components/Dropdown/reducers/pathReducer.js +44 -0
  153. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +113 -0
  154. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.type.js +5 -0
  155. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +77 -105
  156. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +30 -15
  157. package/styled-components/cjs/components/Dropdown/ui/index.js +14 -13
  158. package/styled-components/cjs/components/Dropdown/utils/index.js +14 -13
  159. package/styled-components/cjs/components/Dropdown/variations/_size/tokens.json +1 -9
  160. package/styled-components/cjs/components/Dropdown/variations/_view/tokens.json +1 -1
  161. package/styled-components/cjs/components/Select/ui/SelectItem/SelectItem.js +2 -2
  162. package/styled-components/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +2 -2
  163. package/styled-components/cjs/components/TextField/TextField.js +4 -4
  164. package/styled-components/cjs/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
  165. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +25 -0
  166. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.js +11 -0
  167. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +295 -0
  168. package/styled-components/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +90 -3
  169. package/styled-components/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +23 -6
  170. package/styled-components/es/components/Combobox/utils/index.js +15 -0
  171. package/styled-components/es/components/Dropdown/Dropdown.js +140 -54
  172. package/styled-components/es/components/Dropdown/Dropdown.styles.js +18 -5
  173. package/styled-components/es/components/Dropdown/Dropdown.tokens.js +12 -24
  174. package/styled-components/es/components/Dropdown/hooks/useHashMaps.js +23 -0
  175. package/styled-components/es/components/Dropdown/hooks/useKeyboardNavigation.js +193 -0
  176. package/styled-components/es/components/Dropdown/index.js +1 -0
  177. package/styled-components/es/components/Dropdown/reducers/focusedPathReducer.js +34 -0
  178. package/styled-components/es/components/Dropdown/reducers/pathReducer.js +38 -0
  179. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +107 -0
  180. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.type.js +1 -0
  181. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +78 -107
  182. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +27 -11
  183. package/styled-components/es/components/Dropdown/ui/index.js +2 -1
  184. package/styled-components/es/components/Dropdown/utils/index.js +13 -13
  185. package/styled-components/es/components/Dropdown/variations/_size/tokens.json +1 -9
  186. package/styled-components/es/components/Dropdown/variations/_view/tokens.json +1 -1
  187. package/styled-components/es/components/Select/ui/SelectItem/SelectItem.js +2 -2
  188. package/styled-components/es/components/Select/ui/SelectItem/SelectItem.styles.js +2 -2
  189. package/styled-components/es/components/TextField/TextField.js +4 -4
  190. package/styled-components/es/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
  191. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +19 -0
  192. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.js +5 -0
  193. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +295 -0
  194. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.d.ts +15 -13
  195. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.d.ts.map +1 -1
  196. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.d.ts +5 -1
  197. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.d.ts.map +1 -1
  198. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.type.d.ts +59 -2
  199. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.type.d.ts.map +1 -1
  200. package/types/components/Combobox/utils/index.d.ts +4 -0
  201. package/types/components/Combobox/utils/index.d.ts.map +1 -0
  202. package/types/components/Dropdown/Dropdown.d.ts +4 -4
  203. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  204. package/types/components/Dropdown/Dropdown.styles.d.ts +8 -1
  205. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  206. package/types/components/Dropdown/Dropdown.tokens.d.ts +9 -22
  207. package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
  208. package/types/components/Dropdown/Dropdown.types.d.ts +64 -40
  209. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  210. package/types/components/Dropdown/hooks/useHashMaps.d.ts +6 -0
  211. package/types/components/Dropdown/hooks/useHashMaps.d.ts.map +1 -0
  212. package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts +23 -0
  213. package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts.map +1 -0
  214. package/types/components/Dropdown/index.d.ts +3 -1
  215. package/types/components/Dropdown/index.d.ts.map +1 -1
  216. package/types/components/Dropdown/reducers/focusedPathReducer.d.ts +16 -0
  217. package/types/components/Dropdown/reducers/focusedPathReducer.d.ts.map +1 -0
  218. package/types/components/Dropdown/reducers/pathReducer.d.ts +20 -0
  219. package/types/components/Dropdown/reducers/pathReducer.d.ts.map +1 -0
  220. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts +5 -0
  221. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts.map +1 -0
  222. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts +26 -0
  223. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts.map +1 -0
  224. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts +2 -56
  225. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  226. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +5 -1
  227. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
  228. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts +44 -38
  229. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts.map +1 -1
  230. package/types/components/Dropdown/ui/index.d.ts +2 -1
  231. package/types/components/Dropdown/ui/index.d.ts.map +1 -1
  232. package/types/components/Dropdown/utils/index.d.ts +5 -3
  233. package/types/components/Dropdown/utils/index.d.ts.map +1 -1
  234. package/types/components/Select/ui/SelectItem/SelectItem.d.ts +2 -2
  235. package/types/components/Select/ui/SelectItem/SelectItem.type.d.ts +2 -2
  236. package/types/components/Select/utils/index.d.ts +1 -1
  237. package/types/components/TextField/TextField.d.ts +2 -2
  238. package/types/components/TextField/TextField.d.ts.map +1 -1
  239. package/types/components/_Icon/Icon.assets/DisclosureRight.d.ts.map +1 -1
  240. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts.map +1 -0
  241. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +13 -0
  242. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -0
  243. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +2 -2
  244. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
  245. package/types/examples/plasma_web/components/TextField/TextField.d.ts +2 -2
  246. package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
  247. package/types/examples/sds_engineer/components/TextField/TextField.d.ts +2 -2
  248. package/types/examples/sds_engineer/components/TextField/TextField.d.ts.map +1 -1
  249. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_936wgl.css +0 -1
  250. package/cjs/components/Dropdown/Dropdown.styles_1daxhqh.css +0 -2
  251. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1juhjtq.css +0 -4
  252. package/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base.js +0 -9
  253. package/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base.js.map +0 -1
  254. package/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base_x642ct.css +0 -1
  255. package/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base.js +0 -9
  256. package/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base.js.map +0 -1
  257. package/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base_x642ct.css +0 -1
  258. package/cjs/components/Select/ui/SelectItem/SelectItem.styles_6h17aw.css +0 -1
  259. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_936wgl.css +0 -1
  260. package/es/components/Dropdown/Dropdown.styles_1daxhqh.css +0 -2
  261. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1juhjtq.css +0 -4
  262. package/es/components/Dropdown/ui/DropdownItem/variations/_size/base.js +0 -5
  263. package/es/components/Dropdown/ui/DropdownItem/variations/_size/base.js.map +0 -1
  264. package/es/components/Dropdown/ui/DropdownItem/variations/_size/base_x642ct.css +0 -1
  265. package/es/components/Dropdown/ui/DropdownItem/variations/_view/base.js +0 -5
  266. package/es/components/Dropdown/ui/DropdownItem/variations/_view/base.js.map +0 -1
  267. package/es/components/Dropdown/ui/DropdownItem/variations/_view/base_x642ct.css +0 -1
  268. package/es/components/Select/ui/SelectItem/SelectItem.styles_6h17aw.css +0 -1
  269. package/styled-components/cjs/components/Dropdown/Dropdown.template-doc.mdx +0 -80
  270. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base.js +0 -8
  271. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_size/tokens.json +0 -19
  272. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base.js +0 -8
  273. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_view/tokens.json +0 -9
  274. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +0 -27
  275. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.js +0 -13
  276. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +0 -194
  277. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +0 -27
  278. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.js +0 -13
  279. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
  280. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +0 -27
  281. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.js +0 -13
  282. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +0 -195
  283. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +0 -27
  284. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.js +0 -13
  285. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
  286. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.config.js +0 -22
  287. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.js +0 -21
  288. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.stories.tsx +0 -277
  289. package/styled-components/es/components/Dropdown/Dropdown.template-doc.mdx +0 -80
  290. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_size/base.js +0 -2
  291. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_size/tokens.json +0 -19
  292. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_view/base.js +0 -2
  293. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_view/tokens.json +0 -9
  294. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +0 -21
  295. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.js +0 -7
  296. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +0 -194
  297. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +0 -21
  298. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.js +0 -7
  299. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
  300. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +0 -21
  301. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.js +0 -7
  302. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +0 -195
  303. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +0 -21
  304. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.js +0 -7
  305. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
  306. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.config.js +0 -16
  307. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.js +0 -15
  308. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.stories.tsx +0 -277
  309. package/types/components/Dropdown/ui/DropdownItem/variations/_size/base.d.ts +0 -2
  310. package/types/components/Dropdown/ui/DropdownItem/variations/_size/base.d.ts.map +0 -1
  311. package/types/components/Dropdown/ui/DropdownItem/variations/_view/base.d.ts +0 -2
  312. package/types/components/Dropdown/ui/DropdownItem/variations/_view/base.d.ts.map +0 -1
  313. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.d.ts.map +0 -1
  314. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.d.ts +0 -30
  315. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.d.ts.map +0 -1
  316. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.d.ts +0 -18
  317. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.d.ts.map +0 -1
  318. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.d.ts +0 -30
  319. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.d.ts.map +0 -1
  320. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts +0 -18
  321. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts.map +0 -1
  322. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.d.ts +0 -30
  323. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.d.ts.map +0 -1
  324. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts +0 -18
  325. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts.map +0 -1
  326. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.d.ts +0 -30
  327. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.d.ts.map +0 -1
  328. package/types/examples/sds_engineer/components/Dropdown/Dropdown.config.d.ts +0 -15
  329. package/types/examples/sds_engineer/components/Dropdown/Dropdown.config.d.ts.map +0 -1
  330. package/types/examples/sds_engineer/components/Dropdown/Dropdown.d.ts +0 -51
  331. package/types/examples/sds_engineer/components/Dropdown/Dropdown.d.ts.map +0 -1
  332. /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,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
+ {"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,gBAAU,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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AAQ,EAAE;AACNnD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
@@ -1,18 +1,30 @@
1
- import './ComboboxItem.styles_936wgl.css';
1
+ import './ComboboxItem.styles_s4sk53.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- require('react');
7
- require('@salutejs/plasma-core');
8
- require('@linaria/react');
9
- require('@linaria/core');
6
+ var react = require('@linaria/react');
10
7
  require('focus-visible');
11
- require('react-dom');
12
- require('react-popper');
13
- require('../../../../utils/react.js');
14
8
 
15
- var base = "b1thh7ji";
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";
16
25
 
26
+ exports.StyledContentLeft = StyledContentLeft;
27
+ exports.StyledContentRight = StyledContentRight;
28
+ exports.StyledText = StyledText;
17
29
  exports.base = base;
18
30
  //# 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,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;;;;;;;"}
@@ -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,23 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
6
+ var React = require('react');
7
+
8
+ var isReactObject = function isReactObject(element) {
9
+ return _rollupPluginBabelHelpers.typeof(element) === 'object' || typeof element === 'function';
10
+ };
11
+ var getValidComponent = function getValidComponent(element, props) {
12
+ if ( /*#__PURE__*/React.isValidElement(element)) {
13
+ return /*#__PURE__*/React.cloneElement(element, props);
14
+ }
15
+ if (isReactObject(element)) {
16
+ var Component = element;
17
+ return /*#__PURE__*/React.createElement(Component, props);
18
+ }
19
+ return element;
20
+ };
21
+
22
+ exports.getValidComponent = getValidComponent;
23
+ //# 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,gCAAA,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,oBAAc,CAACJ,OAAO,CAAC,EAAE;AACzB,IAAA,oBAAOK,kBAAY,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;}
@@ -4,82 +4,165 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
6
6
  var React = require('react');
7
- var plasmaCore = require('@salutejs/plasma-core');
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');
8
15
  var base = require('./variations/_view/base.js');
9
16
  var base$1 = require('./variations/_size/base.js');
10
17
  var Dropdown_styles = require('./Dropdown.styles.js');
11
- var index = require('./utils/index.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"];
12
23
 
13
- var _excluded = ["id", "target", "children", "hasArrow", "role", "view", "size", "frame", "onToggle", "isFocusTrapped", "isOpen", "placement", "trigger", "offset", "preventOverflow", "closeOnOverlayClick", "closeOnEsc"];
14
24
  /**
15
- * Выпадающий список без внешнего контроля видимости.
25
+ * Выпадающий список.
16
26
  */
17
27
  var dropdownRoot = function dropdownRoot(Root) {
18
- return /*#__PURE__*/React.forwardRef(function (_ref, outerRootRef) {
19
- var id = _ref.id,
20
- target = _ref.target,
28
+ return /*#__PURE__*/React.forwardRef(function (_ref, ref) {
29
+ var items = _ref.items,
21
30
  children = _ref.children,
22
- hasArrow = _ref.hasArrow,
23
- role = _ref.role,
24
- view = _ref.view,
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
31
  _ref$placement = _ref.placement,
33
32
  placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
34
- _ref$trigger = _ref.trigger,
35
- trigger = _ref$trigger === void 0 ? 'click' : _ref$trigger,
36
33
  _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,
34
+ offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
40
35
  _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,
36
+ closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
37
+ onToggle = _ref.onToggle,
38
+ size = _ref.size,
39
+ 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,
51
+ _ref$trigger = _ref.trigger,
52
+ trigger = _ref$trigger === void 0 ? 'click' : _ref$trigger,
53
+ _ref$variant = _ref.variant,
54
+ variant = _ref$variant === void 0 ? 'normal' : _ref$variant,
55
+ hasArrow = _ref.hasArrow,
44
56
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
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,
57
+ var _useReducer = React.useReducer(pathReducer.pathReducer, []),
58
+ _useReducer2 = _rollupPluginBabelHelpers.slicedToArray(_useReducer, 2),
59
+ path = _useReducer2[0],
60
+ dispatchPath = _useReducer2[1];
61
+ var _useReducer3 = React.useReducer(focusedPathReducer.focusedPathReducer, []),
62
+ _useReducer4 = _rollupPluginBabelHelpers.slicedToArray(_useReducer3, 2),
63
+ focusedPath = _useReducer4[0],
64
+ dispatchFocusedPath = _useReducer4[1];
65
+ var _useHashMaps = useHashMaps.useHashMaps(items),
66
+ _useHashMaps2 = _rollupPluginBabelHelpers.slicedToArray(_useHashMaps, 2),
67
+ pathMap = _useHashMaps2[0],
68
+ focusedToValueMap = _useHashMaps2[1];
69
+ var handleGlobalToggle = function handleGlobalToggle(opened, event) {
70
+ if (opened) {
71
+ dispatchPath({
72
+ type: 'opened_first_level'
73
+ });
74
+ } else {
75
+ dispatchFocusedPath({
76
+ type: 'reset'
77
+ });
78
+ dispatchPath({
79
+ type: 'reset'
80
+ });
81
+ }
82
+ if (onToggle) {
83
+ onToggle(opened, event);
84
+ }
85
+ };
86
+ var _useKeyNavigation = useKeyboardNavigation.useKeyNavigation({
87
+ focusedPath: focusedPath,
88
+ dispatchFocusedPath: dispatchFocusedPath,
89
+ path: path,
90
+ dispatchPath: dispatchPath,
91
+ pathMap: pathMap,
92
+ focusedToValueMap: focusedToValueMap,
93
+ handleGlobalToggle: handleGlobalToggle,
94
+ closeOnSelect: closeOnSelect,
95
+ onItemSelect: onItemSelect,
96
+ onItemClick: onItemClick
97
+ }),
98
+ onKeyDown = _useKeyNavigation.onKeyDown;
99
+ var isCurrentListOpen = Boolean(path[0]);
100
+ var getActiveDescendant = function getActiveDescendant() {
101
+ var _focusedToValueMap$ge;
102
+ var focusedPathAsString = focusedPath.reduce(function (acc, n) {
103
+ return "".concat(acc, "/").concat(n);
104
+ }, '').replace(/^(\/)/, '');
105
+ return focusedToValueMap === null || focusedToValueMap === void 0 || (_focusedToValueMap$ge = focusedToValueMap.get(focusedPathAsString)) === null || _focusedToValueMap$ge === void 0 ? void 0 : _focusedToValueMap$ge.value.toString();
106
+ };
107
+ return /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
108
+ className: index.cx(className, Dropdown_tokens.classes.dropdownRoot),
109
+ ref: ref,
110
+ view: view,
111
+ size: size,
112
+ items: items
113
+ }, rest), /*#__PURE__*/React.createElement(Dropdown_styles.StyledPopover, {
114
+ isOpen: isCurrentListOpen,
55
115
  usePortal: false,
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,
116
+ onToggle: handleGlobalToggle,
62
117
  offset: offset,
63
- preventOverflow: preventOverflow,
64
- hasArrow: hasArrow,
65
- placement: index.getPlacements(placement),
118
+ placement: index$1.getPlacements(placement),
66
119
  trigger: trigger,
67
120
  closeOnOverlayClick: closeOnOverlayClick,
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)));
121
+ isFocusTrapped: false,
122
+ target: index$1.childrenWithProps(children, {
123
+ role: 'combobox',
124
+ 'aria-controls': 'listbox1',
125
+ 'aria-expanded': isCurrentListOpen,
126
+ 'aria-haspopup': 'listbox',
127
+ 'aria-activedescendant': getActiveDescendant(),
128
+ onKeyDown: onKeyDown
129
+ })
130
+ }, /*#__PURE__*/React.createElement(Dropdown_styles.Ul, {
131
+ listHeight: listHeight,
132
+ listOverflow: listOverflow,
133
+ role: "listbox",
134
+ id: "listbox1",
135
+ listWidth: listWidth
136
+ }, items.map(function (item, index) {
137
+ return /*#__PURE__*/React.createElement(DropdownInner.DropdownInner, {
138
+ key: "".concat(index, "/0"),
139
+ item: item,
140
+ currentLevel: 0,
141
+ focusedPath: focusedPath,
142
+ trigger: trigger,
143
+ path: path,
144
+ dispatchPath: dispatchPath,
145
+ index: index,
146
+ itemRole: itemRole,
147
+ listHeight: listHeight,
148
+ listOverflow: listOverflow,
149
+ handleGlobalToggle: handleGlobalToggle,
150
+ closeOnSelect: closeOnSelect,
151
+ onHover: onHover,
152
+ onItemSelect: onItemSelect,
153
+ onItemClick: onItemClick,
154
+ listWidth: listWidth,
155
+ variant: variant,
156
+ hasArrow: hasArrow
157
+ });
158
+ }))));
76
159
  });
77
160
  };
78
161
  var dropdownConfig = {
79
162
  name: 'Dropdown',
80
163
  tag: 'div',
81
164
  layout: dropdownRoot,
82
- base: '',
165
+ base: Dropdown_styles.base,
83
166
  variations: {
84
167
  view: {
85
168
  css: base.base
@@ -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,gBAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IApBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;MACRC,IAAI,GAAAN,IAAA,CAAJM,IAAI;MACJC,IAAI,GAAAP,IAAA,CAAJO,IAAI;MACJC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;MACJC,KAAK,GAAAT,IAAA,CAALS,KAAK;MACLC,SAAQ,GAAAV,IAAA,CAARU,QAAQ;MAAAC,mBAAA,GAAAX,IAAA,CACRY,cAAc;AAAdA,MAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,mBAAA;MAAAE,WAAA,GAAAb,IAAA,CACrBc,MAAM;AAANA,MAAAA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,WAAA;MAAAE,cAAA,GAAAf,IAAA,CACdgB,SAAS;AAATA,MAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,cAAA;MAAAE,YAAA,GAAAjB,IAAA,CAClBkB,OAAO;AAAPA,MAAAA,OAAO,GAAAD,YAAA,K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D,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
+ {"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 = 'auto',\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,\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","hasArrow","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","pathReducer","_useReducer2","_slicedToArray","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useHashMaps","useHashMaps","_useHashMaps2","pathMap","focusedToValueMap","handleGlobalToggle","opened","event","type","_useKeyNavigation","useKeyNavigation","onKeyDown","isCurrentListOpen","Boolean","getActiveDescendant","_focusedToValueMap$ge","focusedPathAsString","reduce","acc","n","concat","replace","get","value","toString","React","createElement","_extends","cx","classes","StyledPopover","isOpen","usePortal","getPlacements","isFocusTrapped","target","childrenWithProps","role","Ul","id","map","item","index","DropdownInner","key","currentLevel","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA8C,EAAA;AAAA,EAAA,oBACvEC,gBAAU,CACN,UAAAC,IAAA,EAwBIC,GAAG,EACF;AAAA,IAAA,IAvBGC,KAAK,GAAAF,IAAA,CAALE,KAAK;MACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;MAAAC,cAAA,GAAAJ,IAAA,CACRK,SAAS;AAATA,MAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,cAAA;MAAAE,WAAA,GAAAN,IAAA,CAClBO,MAAM;MAANA,MAAM,GAAAD,WA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,4 @@
1
- import './Dropdown.styles_1daxhqh.css';
1
+ import './Dropdown.styles_1tihqkp.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7,8 +7,9 @@ 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');
10
12
 
11
- // issue #823
12
13
  var Popover = /*#__PURE__*/common.component(Popover$1.popoverConfig);
13
14
  var _exp = function _exp() {
14
15
  return Popover;
@@ -18,12 +19,44 @@ var StyledPopover = /*#__PURE__*/react.styled(_exp())({
18
19
  "class": "sn7uamp",
19
20
  propsAsIs: true
20
21
  });
21
- var StyledDropdown = /*#__PURE__*/react.styled('div')({
22
- name: "StyledDropdown",
23
- "class": "sjr7fmv",
24
- propsAsIs: false
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
+ }
25
56
  });
57
+ var base = "byfocd2";
26
58
 
27
- exports.StyledDropdown = StyledDropdown;
28
59
  exports.StyledPopover = StyledPopover;
60
+ exports.Ul = Ul;
61
+ exports.base = base;
29
62
  //# 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,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;;;;;"}
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;A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AAiBA,SAAS,GAAA,WAAA,CAAAZ,MAAA,CAAeC,sBAAM,CAACY,OAAQ,EAAAb,kBAAAA,CAAAA,CAAAA,MAAA,CAAkBC,sBAAM,CAACY,OAAQ,SAAK,CAAE,CAAA;AAAA,GAAA,CAAA;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;;;;;;"}
@@ -0,0 +1,3 @@
1
+ .sn7uamp .popover-wrapper,.sn7uamp .popover-target{display:block;}
2
+ .ujr7fmv{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);}
3
+ .byfocd2{display:inline-block;}
@@ -3,47 +3,37 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var classes = {
6
- dropdownItemIsSelected: 'dropdown-item-is-selected',
7
- dropdownItemIsDisabled: 'dropdown-item-is-disabled'
6
+ dropdownRoot: 'dropdown-root',
7
+ dropdownItemIsFocused: 'dropdown-item-is-focused',
8
+ dropdownItemIsDisabled: 'dropdown-item-is-disabled',
9
+ dropdownItemIsActive: 'dropdown-item-is-active'
8
10
  };
9
11
  var tokens = {
10
12
  background: '--plasma-dropdown-background',
11
13
  boxShadow: '--plasma-dropdown-box-shadow',
12
14
  width: '--plasma-dropdown-width',
13
- height: '--plasma-dropdown-height',
14
15
  borderRadius: '--plasma-dropdown-border-radius',
15
- paddingTop: '--plasma-dropdown-padding-top',
16
- paddingRight: '--plasma-dropdown-padding-right',
17
- paddingBottom: '--plasma-dropdown-padding-bottom',
18
- paddingLeft: '--plasma-dropdown-padding-left',
16
+ padding: '--plasma-dropdown-padding',
17
+ disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',
19
18
  itemBackground: '--plasma-dropdown-item-background',
20
19
  itemColor: '--plasma-dropdown-item-color',
21
20
  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',
28
21
  itemBorderRadius: '--plasma-dropdown-item-border-radius',
29
22
  itemPaddingTop: '--plasma-dropdown-item-padding-top',
23
+ itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight',
30
24
  itemPaddingRight: '--plasma-dropdown-item-padding-right',
31
25
  itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',
26
+ itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight',
32
27
  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',
37
28
  itemFontFamily: '--plasma-dropdown-item-font-family',
38
29
  itemFontSize: '--plasma-dropdown-item-font-size',
39
30
  itemFontStyle: '--plasma-dropdown-item-font-style',
40
31
  itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',
41
32
  itemFontLetterSpacing: '--plasma-dropdown-item-line-height',
42
33
  itemFontLineHeight: '--plasma-dropdown-item-font-weight',
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',
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
47
37
  footerBackground: '--plasma-dropdown-footer-background',
48
38
  footerWidth: '--plasma-dropdown-footer-width',
49
39
  footerHeight: '--plasma-dropdown-footer-height',
@@ -110,9 +100,7 @@ var tokens = {
110
100
  groupLabelMarginTop: '--plasma-dropdown-group-label-margin-top',
111
101
  groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',
112
102
  groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',
113
- groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',
114
- disabledOpacity: '--plasma-dropdown-disabled-opacity',
115
- focusColor: '--plasma-dropdown-focus-color'
103
+ groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left'
116
104
  };
117
105
 
118
106
  exports.classes = classes;