@salutejs/plasma-new-hope 0.78.0-canary.1203.8970261959.0 → 0.78.0-dev.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (450) hide show
  1. package/cjs/components/Calendar/Calendar.types.js.map +1 -1
  2. package/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -3
  3. package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  4. package/cjs/components/Calendar/hooks/useDays.js +3 -6
  5. package/cjs/components/Calendar/hooks/useDays.js.map +1 -1
  6. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +1 -2
  7. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
  8. package/cjs/components/Combobox/Combobox.css +20 -7
  9. package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +18 -6
  10. package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +2 -2
  11. package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +18 -6
  12. package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +2 -2
  13. package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +18 -6
  14. package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +2 -2
  15. package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +18 -6
  16. package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +2 -2
  17. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -23
  18. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +81 -10
  19. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js.map +1 -1
  20. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +21 -9
  21. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  22. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_s4sk53.css +4 -0
  23. package/cjs/components/Combobox/utils/index.js +23 -0
  24. package/cjs/components/Combobox/utils/index.js.map +1 -0
  25. package/cjs/components/Dropdown/Dropdown.css +28 -2
  26. package/cjs/components/Dropdown/Dropdown.js +141 -54
  27. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  28. package/cjs/components/Dropdown/Dropdown.styles.js +40 -7
  29. package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
  30. package/cjs/components/Dropdown/Dropdown.styles_1tihqkp.css +3 -0
  31. package/cjs/components/Dropdown/Dropdown.tokens.js +26 -23
  32. package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
  33. package/cjs/components/Dropdown/hooks/useHashMaps.js +34 -0
  34. package/cjs/components/Dropdown/hooks/useHashMaps.js.map +1 -0
  35. package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +247 -0
  36. package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js.map +1 -0
  37. package/cjs/components/Dropdown/reducers/focusedPathReducer.js +37 -0
  38. package/cjs/components/Dropdown/reducers/focusedPathReducer.js.map +1 -0
  39. package/cjs/components/Dropdown/reducers/pathReducer.js +41 -0
  40. package/cjs/components/Dropdown/reducers/pathReducer.js.map +1 -0
  41. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +125 -0
  42. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -0
  43. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +7 -4
  44. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +79 -100
  45. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  46. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +31 -5
  47. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  48. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1o4szyu.css +5 -0
  49. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +30 -0
  50. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -0
  51. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles_12e50g5.css +4 -0
  52. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -0
  53. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js +112 -0
  54. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js.map +1 -0
  55. package/cjs/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_size/base.js +1 -1
  56. package/cjs/components/Dropdown/ui/DropdownItemOld/variations/_size/base.js.map +1 -0
  57. package/cjs/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_view/base.js +1 -1
  58. package/cjs/components/Dropdown/ui/DropdownItemOld/variations/_view/base.js.map +1 -0
  59. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +29 -0
  60. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -0
  61. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles_3w3l45.css +2 -0
  62. package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.css +7 -0
  63. package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +99 -0
  64. package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js.map +1 -0
  65. package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.js +115 -0
  66. package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.js.map +1 -0
  67. package/cjs/components/Dropdown/ui/DropdownOld/utils/index.js +23 -0
  68. package/cjs/components/Dropdown/ui/DropdownOld/utils/index.js.map +1 -0
  69. package/cjs/components/Dropdown/ui/DropdownOld/variations/_size/base.js +9 -0
  70. package/cjs/components/Dropdown/ui/DropdownOld/variations/_size/base.js.map +1 -0
  71. package/cjs/components/Dropdown/ui/DropdownOld/variations/_view/base.js +9 -0
  72. package/cjs/components/Dropdown/ui/DropdownOld/variations/_view/base.js.map +1 -0
  73. package/cjs/components/Dropdown/utils/index.js +16 -0
  74. package/cjs/components/Dropdown/utils/index.js.map +1 -1
  75. package/cjs/components/Pagination/Pagination.css +17 -7
  76. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -7
  77. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
  78. package/cjs/components/Select/Select.css +17 -7
  79. package/cjs/components/Select/ui/SelectDivider/SelectDivider.css +18 -6
  80. package/cjs/components/Select/ui/SelectDivider/SelectDivider.js +2 -2
  81. package/cjs/components/Select/ui/SelectFooter/SelectFooter.css +18 -6
  82. package/cjs/components/Select/ui/SelectFooter/SelectFooter.js +2 -2
  83. package/cjs/components/Select/ui/SelectGroup/SelectGroup.css +18 -6
  84. package/cjs/components/Select/ui/SelectGroup/SelectGroup.js +2 -2
  85. package/cjs/components/Select/ui/SelectHeader/SelectHeader.css +18 -6
  86. package/cjs/components/Select/ui/SelectHeader/SelectHeader.js +2 -2
  87. package/cjs/components/Select/ui/SelectItem/SelectItem.css +19 -7
  88. package/cjs/components/Select/ui/SelectItem/SelectItem.js +3 -3
  89. package/cjs/components/Select/ui/SelectItem/SelectItem.js.map +1 -1
  90. package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +2 -2
  91. package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js.map +1 -1
  92. package/cjs/components/Select/ui/SelectItem/{SelectItem.styles_6h17aw.css → SelectItem.styles_vk39mp.css} +1 -1
  93. package/cjs/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
  94. package/cjs/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
  95. package/cjs/index.css +21 -8
  96. package/cjs/index.js +13 -2
  97. package/cjs/index.js.map +1 -1
  98. package/es/components/Calendar/Calendar.types.js.map +1 -1
  99. package/es/components/Calendar/CalendarBase/CalendarBase.js +1 -3
  100. package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  101. package/es/components/Calendar/hooks/useDays.js +3 -6
  102. package/es/components/Calendar/hooks/useDays.js.map +1 -1
  103. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +1 -2
  104. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
  105. package/es/components/Combobox/Combobox.css +20 -7
  106. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +18 -6
  107. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +2 -2
  108. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +18 -6
  109. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +2 -2
  110. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +18 -6
  111. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +2 -2
  112. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +18 -6
  113. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +2 -2
  114. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -23
  115. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +82 -11
  116. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js.map +1 -1
  117. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +19 -10
  118. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  119. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_s4sk53.css +4 -0
  120. package/es/components/Combobox/utils/index.js +19 -0
  121. package/es/components/Combobox/utils/index.js.map +1 -0
  122. package/es/components/Dropdown/Dropdown.css +28 -2
  123. package/es/components/Dropdown/Dropdown.js +147 -60
  124. package/es/components/Dropdown/Dropdown.js.map +1 -1
  125. package/es/components/Dropdown/Dropdown.styles.js +39 -7
  126. package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
  127. package/es/components/Dropdown/Dropdown.styles_1tihqkp.css +3 -0
  128. package/es/components/Dropdown/Dropdown.tokens.js +26 -23
  129. package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
  130. package/es/components/Dropdown/hooks/useHashMaps.js +30 -0
  131. package/es/components/Dropdown/hooks/useHashMaps.js.map +1 -0
  132. package/es/components/Dropdown/hooks/useKeyboardNavigation.js +242 -0
  133. package/es/components/Dropdown/hooks/useKeyboardNavigation.js.map +1 -0
  134. package/es/components/Dropdown/reducers/focusedPathReducer.js +33 -0
  135. package/es/components/Dropdown/reducers/focusedPathReducer.js.map +1 -0
  136. package/es/components/Dropdown/reducers/pathReducer.js +37 -0
  137. package/es/components/Dropdown/reducers/pathReducer.js.map +1 -0
  138. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +121 -0
  139. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -0
  140. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +7 -4
  141. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +80 -100
  142. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  143. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +30 -5
  144. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  145. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1o4szyu.css +5 -0
  146. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +23 -0
  147. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -0
  148. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles_12e50g5.css +4 -0
  149. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -0
  150. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js +107 -0
  151. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js.map +1 -0
  152. package/es/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_size/base.js +1 -1
  153. package/es/components/Dropdown/ui/DropdownItemOld/variations/_size/base.js.map +1 -0
  154. package/es/components/Dropdown/ui/DropdownItemOld/variations/_size/base_x642ct.css +1 -0
  155. package/es/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_view/base.js +1 -1
  156. package/es/components/Dropdown/ui/DropdownItemOld/variations/_view/base.js.map +1 -0
  157. package/es/components/Dropdown/ui/DropdownItemOld/variations/_view/base_x642ct.css +1 -0
  158. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +24 -0
  159. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -0
  160. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles_3w3l45.css +2 -0
  161. package/es/components/Dropdown/ui/DropdownOld/DropdownOld.css +7 -0
  162. package/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +94 -0
  163. package/es/components/Dropdown/ui/DropdownOld/DropdownOld.js.map +1 -0
  164. package/es/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.js +111 -0
  165. package/es/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.js.map +1 -0
  166. package/es/components/Dropdown/ui/DropdownOld/utils/index.js +18 -0
  167. package/es/components/Dropdown/ui/DropdownOld/utils/index.js.map +1 -0
  168. package/es/components/Dropdown/ui/DropdownOld/variations/_size/base.js +5 -0
  169. package/es/components/Dropdown/ui/DropdownOld/variations/_size/base.js.map +1 -0
  170. package/es/components/Dropdown/ui/DropdownOld/variations/_size/base_x642ct.css +1 -0
  171. package/es/components/Dropdown/ui/DropdownOld/variations/_view/base.js +5 -0
  172. package/es/components/Dropdown/ui/DropdownOld/variations/_view/base.js.map +1 -0
  173. package/es/components/Dropdown/ui/DropdownOld/variations/_view/base_x642ct.css +1 -0
  174. package/es/components/Dropdown/utils/index.js +16 -2
  175. package/es/components/Dropdown/utils/index.js.map +1 -1
  176. package/es/components/Pagination/Pagination.css +17 -7
  177. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -7
  178. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
  179. package/es/components/Select/Select.css +17 -7
  180. package/es/components/Select/ui/SelectDivider/SelectDivider.css +18 -6
  181. package/es/components/Select/ui/SelectDivider/SelectDivider.js +2 -2
  182. package/es/components/Select/ui/SelectFooter/SelectFooter.css +18 -6
  183. package/es/components/Select/ui/SelectFooter/SelectFooter.js +2 -2
  184. package/es/components/Select/ui/SelectGroup/SelectGroup.css +18 -6
  185. package/es/components/Select/ui/SelectGroup/SelectGroup.js +2 -2
  186. package/es/components/Select/ui/SelectHeader/SelectHeader.css +18 -6
  187. package/es/components/Select/ui/SelectHeader/SelectHeader.js +2 -2
  188. package/es/components/Select/ui/SelectItem/SelectItem.css +19 -7
  189. package/es/components/Select/ui/SelectItem/SelectItem.js +3 -3
  190. package/es/components/Select/ui/SelectItem/SelectItem.js.map +1 -1
  191. package/es/components/Select/ui/SelectItem/SelectItem.styles.js +2 -2
  192. package/es/components/Select/ui/SelectItem/SelectItem.styles.js.map +1 -1
  193. package/es/components/Select/ui/SelectItem/{SelectItem.styles_6h17aw.css → SelectItem.styles_vk39mp.css} +1 -1
  194. package/es/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
  195. package/es/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
  196. package/es/index.css +21 -8
  197. package/es/index.js +6 -1
  198. package/es/index.js.map +1 -1
  199. package/package.json +2 -2
  200. package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -3
  201. package/styled-components/cjs/components/Calendar/hooks/useDays.js +3 -6
  202. package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +1 -2
  203. package/styled-components/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +91 -2
  204. package/styled-components/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +27 -7
  205. package/styled-components/cjs/components/Combobox/utils/index.js +23 -0
  206. package/styled-components/cjs/components/Dropdown/Dropdown.js +140 -54
  207. package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +22 -7
  208. package/styled-components/cjs/components/Dropdown/Dropdown.template-doc.mdx +325 -66
  209. package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +26 -23
  210. package/styled-components/cjs/components/Dropdown/hooks/useHashMaps.js +32 -0
  211. package/styled-components/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +249 -0
  212. package/styled-components/cjs/components/Dropdown/index.js +9 -1
  213. package/styled-components/cjs/components/Dropdown/reducers/focusedPathReducer.js +40 -0
  214. package/styled-components/cjs/components/Dropdown/reducers/pathReducer.js +44 -0
  215. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +117 -0
  216. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.type.js +5 -0
  217. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +77 -105
  218. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +24 -19
  219. package/styled-components/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +33 -0
  220. package/styled-components/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.type.js +5 -0
  221. package/styled-components/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js +119 -0
  222. package/styled-components/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +19 -0
  223. package/styled-components/cjs/components/Dropdown/ui/DropdownOld/Dropdown.types.js +5 -0
  224. package/styled-components/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +101 -0
  225. package/styled-components/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.js +118 -0
  226. package/styled-components/cjs/components/Dropdown/ui/DropdownOld/utils/index.js +21 -0
  227. package/styled-components/cjs/components/Dropdown/ui/DropdownOld/variations/_size/base.js +8 -0
  228. package/styled-components/cjs/components/Dropdown/ui/DropdownOld/variations/_size/tokens.json +1 -0
  229. package/styled-components/cjs/components/Dropdown/ui/DropdownOld/variations/_view/base.js +8 -0
  230. package/styled-components/cjs/components/Dropdown/ui/DropdownOld/variations/_view/tokens.json +1 -0
  231. package/styled-components/cjs/components/Dropdown/ui/index.js +39 -5
  232. package/styled-components/cjs/components/Dropdown/utils/index.js +15 -1
  233. package/styled-components/cjs/components/Dropdown/variations/_size/tokens.json +1 -9
  234. package/styled-components/cjs/components/Dropdown/variations/_view/tokens.json +1 -1
  235. package/styled-components/cjs/components/Select/ui/SelectItem/SelectItem.js +1 -1
  236. package/styled-components/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
  237. package/styled-components/cjs/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
  238. package/styled-components/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +6 -18
  239. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +25 -0
  240. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.js +11 -0
  241. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +292 -0
  242. package/styled-components/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +6 -18
  243. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +25 -0
  244. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.js +11 -0
  245. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +292 -0
  246. package/styled-components/cjs/examples/sds_engineer/components/Calendar/Calendar.stories.tsx +6 -18
  247. package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +1 -3
  248. package/styled-components/es/components/Calendar/hooks/useDays.js +3 -6
  249. package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.js +1 -2
  250. package/styled-components/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +90 -3
  251. package/styled-components/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +23 -6
  252. package/styled-components/es/components/Combobox/utils/index.js +15 -0
  253. package/styled-components/es/components/Dropdown/Dropdown.js +142 -55
  254. package/styled-components/es/components/Dropdown/Dropdown.styles.js +18 -5
  255. package/styled-components/es/components/Dropdown/Dropdown.template-doc.mdx +325 -66
  256. package/styled-components/es/components/Dropdown/Dropdown.tokens.js +26 -23
  257. package/styled-components/es/components/Dropdown/hooks/useHashMaps.js +26 -0
  258. package/styled-components/es/components/Dropdown/hooks/useKeyboardNavigation.js +243 -0
  259. package/styled-components/es/components/Dropdown/index.js +1 -0
  260. package/styled-components/es/components/Dropdown/reducers/focusedPathReducer.js +34 -0
  261. package/styled-components/es/components/Dropdown/reducers/pathReducer.js +38 -0
  262. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +111 -0
  263. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.type.js +1 -0
  264. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +78 -107
  265. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +21 -15
  266. package/styled-components/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +25 -0
  267. package/styled-components/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.type.js +1 -0
  268. package/styled-components/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js +111 -0
  269. package/styled-components/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +13 -0
  270. package/styled-components/es/components/Dropdown/ui/DropdownOld/Dropdown.types.js +1 -0
  271. package/styled-components/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +92 -0
  272. package/styled-components/es/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.js +112 -0
  273. package/styled-components/es/components/Dropdown/ui/DropdownOld/utils/index.js +15 -0
  274. package/styled-components/es/components/Dropdown/ui/DropdownOld/variations/_size/base.js +2 -0
  275. package/styled-components/es/components/Dropdown/ui/DropdownOld/variations/_size/tokens.json +1 -0
  276. package/styled-components/es/components/Dropdown/ui/DropdownOld/variations/_view/base.js +2 -0
  277. package/styled-components/es/components/Dropdown/ui/DropdownOld/variations/_view/tokens.json +1 -0
  278. package/styled-components/es/components/Dropdown/ui/index.js +5 -1
  279. package/styled-components/es/components/Dropdown/utils/index.js +15 -1
  280. package/styled-components/es/components/Dropdown/variations/_size/tokens.json +1 -9
  281. package/styled-components/es/components/Dropdown/variations/_view/tokens.json +1 -1
  282. package/styled-components/es/components/Select/ui/SelectItem/SelectItem.js +2 -2
  283. package/styled-components/es/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
  284. package/styled-components/es/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
  285. package/styled-components/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +6 -18
  286. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +19 -0
  287. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.js +5 -0
  288. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +292 -0
  289. package/styled-components/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +6 -18
  290. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +19 -0
  291. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.js +5 -0
  292. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +292 -0
  293. package/styled-components/es/examples/sds_engineer/components/Calendar/Calendar.stories.tsx +6 -18
  294. package/types/components/Calendar/Calendar.types.d.ts +0 -4
  295. package/types/components/Calendar/Calendar.types.d.ts.map +1 -1
  296. package/types/components/Calendar/CalendarBase/CalendarBase.d.ts.map +1 -1
  297. package/types/components/Calendar/hooks/useDays.d.ts +1 -1
  298. package/types/components/Calendar/hooks/useDays.d.ts.map +1 -1
  299. package/types/components/Calendar/ui/CalendarDays/CalendarDays.d.ts.map +1 -1
  300. package/types/components/Calendar/ui/CalendarDays/CalendarDays.types.d.ts +0 -1
  301. package/types/components/Calendar/ui/CalendarDays/CalendarDays.types.d.ts.map +1 -1
  302. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.d.ts +15 -13
  303. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.d.ts.map +1 -1
  304. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.d.ts +5 -1
  305. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.d.ts.map +1 -1
  306. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.type.d.ts +59 -2
  307. package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.type.d.ts.map +1 -1
  308. package/types/components/Combobox/utils/index.d.ts +4 -0
  309. package/types/components/Combobox/utils/index.d.ts.map +1 -0
  310. package/types/components/Dropdown/Dropdown.d.ts +4 -4
  311. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  312. package/types/components/Dropdown/Dropdown.styles.d.ts +8 -1
  313. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  314. package/types/components/Dropdown/Dropdown.tokens.d.ts +24 -22
  315. package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
  316. package/types/components/Dropdown/Dropdown.types.d.ts +64 -40
  317. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  318. package/types/components/Dropdown/hooks/useHashMaps.d.ts +6 -0
  319. package/types/components/Dropdown/hooks/useHashMaps.d.ts.map +1 -0
  320. package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts +37 -0
  321. package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts.map +1 -0
  322. package/types/components/Dropdown/index.d.ts +3 -1
  323. package/types/components/Dropdown/index.d.ts.map +1 -1
  324. package/types/components/Dropdown/reducers/focusedPathReducer.d.ts +16 -0
  325. package/types/components/Dropdown/reducers/focusedPathReducer.d.ts.map +1 -0
  326. package/types/components/Dropdown/reducers/pathReducer.d.ts +20 -0
  327. package/types/components/Dropdown/reducers/pathReducer.d.ts.map +1 -0
  328. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts +5 -0
  329. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts.map +1 -0
  330. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts +26 -0
  331. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts.map +1 -0
  332. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts +2 -56
  333. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  334. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +5 -2
  335. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
  336. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts +44 -38
  337. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts.map +1 -1
  338. package/types/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.d.ts +7 -0
  339. package/types/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.d.ts.map +1 -0
  340. package/types/components/Dropdown/ui/DropdownItemOld/DropdownItem.type.d.ts +60 -0
  341. package/types/components/Dropdown/ui/DropdownItemOld/DropdownItem.type.d.ts.map +1 -0
  342. package/types/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.d.ts +58 -0
  343. package/types/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.d.ts.map +1 -0
  344. package/types/components/Dropdown/ui/DropdownItemOld/variations/_size/base.d.ts.map +1 -0
  345. package/types/components/Dropdown/ui/DropdownItemOld/variations/_view/base.d.ts.map +1 -0
  346. package/types/components/Dropdown/ui/DropdownOld/Dropdown.styles.d.ts +8 -0
  347. package/types/components/Dropdown/ui/DropdownOld/Dropdown.styles.d.ts.map +1 -0
  348. package/types/components/Dropdown/ui/DropdownOld/Dropdown.types.d.ts +76 -0
  349. package/types/components/Dropdown/ui/DropdownOld/Dropdown.types.d.ts.map +1 -0
  350. package/types/components/Dropdown/ui/DropdownOld/DropdownOld.d.ts +26 -0
  351. package/types/components/Dropdown/ui/DropdownOld/DropdownOld.d.ts.map +1 -0
  352. package/types/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.d.ts +113 -0
  353. package/types/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.d.ts.map +1 -0
  354. package/types/components/Dropdown/ui/DropdownOld/utils/index.d.ts +4 -0
  355. package/types/components/Dropdown/ui/DropdownOld/utils/index.d.ts.map +1 -0
  356. package/types/components/Dropdown/ui/DropdownOld/variations/_size/base.d.ts +2 -0
  357. package/types/components/Dropdown/ui/DropdownOld/variations/_size/base.d.ts.map +1 -0
  358. package/types/components/Dropdown/ui/DropdownOld/variations/_view/base.d.ts +2 -0
  359. package/types/components/Dropdown/ui/DropdownOld/variations/_view/base.d.ts.map +1 -0
  360. package/types/components/Dropdown/ui/index.d.ts +5 -1
  361. package/types/components/Dropdown/ui/index.d.ts.map +1 -1
  362. package/types/components/Dropdown/utils/index.d.ts +5 -2
  363. package/types/components/Dropdown/utils/index.d.ts.map +1 -1
  364. package/types/components/Select/ui/SelectItem/SelectItem.d.ts +2 -2
  365. package/types/components/Select/ui/SelectItem/SelectItem.d.ts.map +1 -1
  366. package/types/components/Select/ui/SelectItem/SelectItem.type.d.ts +2 -2
  367. package/types/components/Select/utils/index.d.ts +1 -1
  368. package/types/components/_Icon/Icon.assets/DisclosureRight.d.ts.map +1 -1
  369. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts.map +1 -0
  370. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +13 -0
  371. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -0
  372. package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts.map +1 -0
  373. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +13 -0
  374. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -0
  375. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_936wgl.css +0 -1
  376. package/cjs/components/Dropdown/Dropdown.styles_1daxhqh.css +0 -2
  377. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1juhjtq.css +0 -4
  378. package/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base.js.map +0 -1
  379. package/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base.js.map +0 -1
  380. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_936wgl.css +0 -1
  381. package/es/components/Dropdown/Dropdown.styles_1daxhqh.css +0 -2
  382. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1juhjtq.css +0 -4
  383. package/es/components/Dropdown/ui/DropdownItem/variations/_size/base.js.map +0 -1
  384. package/es/components/Dropdown/ui/DropdownItem/variations/_view/base.js.map +0 -1
  385. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_size/tokens.json +0 -19
  386. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_view/tokens.json +0 -9
  387. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +0 -27
  388. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.js +0 -13
  389. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +0 -194
  390. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +0 -27
  391. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.js +0 -13
  392. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
  393. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +0 -27
  394. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.js +0 -13
  395. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +0 -195
  396. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +0 -27
  397. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.js +0 -13
  398. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
  399. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.config.js +0 -22
  400. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.js +0 -21
  401. package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.stories.tsx +0 -277
  402. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_size/tokens.json +0 -19
  403. package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_view/tokens.json +0 -9
  404. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +0 -21
  405. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.js +0 -7
  406. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +0 -194
  407. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +0 -21
  408. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.js +0 -7
  409. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
  410. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +0 -21
  411. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.js +0 -7
  412. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +0 -195
  413. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +0 -21
  414. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.js +0 -7
  415. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
  416. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.config.js +0 -16
  417. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.js +0 -15
  418. package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.stories.tsx +0 -277
  419. package/types/components/Dropdown/ui/DropdownItem/variations/_size/base.d.ts.map +0 -1
  420. package/types/components/Dropdown/ui/DropdownItem/variations/_view/base.d.ts.map +0 -1
  421. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.d.ts.map +0 -1
  422. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.d.ts +0 -30
  423. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.d.ts.map +0 -1
  424. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.d.ts.map +0 -1
  425. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.d.ts +0 -30
  426. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.d.ts.map +0 -1
  427. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts +0 -18
  428. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts.map +0 -1
  429. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.d.ts +0 -30
  430. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.d.ts.map +0 -1
  431. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts +0 -18
  432. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts.map +0 -1
  433. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.d.ts +0 -30
  434. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.d.ts.map +0 -1
  435. package/types/examples/sds_engineer/components/Dropdown/Dropdown.config.d.ts +0 -15
  436. package/types/examples/sds_engineer/components/Dropdown/Dropdown.config.d.ts.map +0 -1
  437. package/types/examples/sds_engineer/components/Dropdown/Dropdown.d.ts +0 -51
  438. package/types/examples/sds_engineer/components/Dropdown/Dropdown.d.ts.map +0 -1
  439. /package/cjs/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_size/base_x642ct.css +0 -0
  440. /package/cjs/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_view/base_x642ct.css +0 -0
  441. /package/{es/components/Dropdown/ui/DropdownItem → cjs/components/Dropdown/ui/DropdownOld}/variations/_size/base_x642ct.css +0 -0
  442. /package/{es/components/Dropdown/ui/DropdownItem → cjs/components/Dropdown/ui/DropdownOld}/variations/_view/base_x642ct.css +0 -0
  443. /package/styled-components/cjs/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_size/base.js +0 -0
  444. /package/styled-components/cjs/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_view/base.js +0 -0
  445. /package/styled-components/es/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_size/base.js +0 -0
  446. /package/styled-components/es/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_view/base.js +0 -0
  447. /package/types/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_size/base.d.ts +0 -0
  448. /package/types/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_view/base.d.ts +0 -0
  449. /package/types/examples/plasma_b2c/components/Dropdown/{Normal/Dropdown.config.d.ts → Dropdown.config.d.ts} +0 -0
  450. /package/types/examples/{plasma_b2c/components/Dropdown/Tight → plasma_web/components/Dropdown}/Dropdown.config.d.ts +0 -0
@@ -1,7 +1,33 @@
1
+ .DropdownDivider_styles_v3xor1_s1brpi5d__3a791565{background:var(--plasma-dropdown-divider-color);width:var(--plasma-dropdown-divider-width);height:var(--plasma-dropdown-divider-height);margin:var(--plasma-dropdown-divider-margin-top) var(--plasma-dropdown-divider-margin-right) var(--plasma-dropdown-divider-margin-bottom) var(--plasma-dropdown-divider-margin-left);}
2
+
3
+ .DropdownFooter_styles_1j4sg1p_stiw0r3__41ff7287{background:var(--plasma-dropdown-footer-background);font-family:var(--plasma-dropdown-footer-font-family);font-size:var(--plasma-dropdown-footer-font-size);font-style:var(--plasma-dropdown-footer-font-style);font-weight:var(--plasma-dropdown-footer-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-footer-line-height);-moz-letter-spacing:var(--plasma-dropdown-footer-line-height);-ms-letter-spacing:var(--plasma-dropdown-footer-line-height);letter-spacing:var(--plasma-dropdown-footer-line-height);line-height:var(--plasma-dropdown-footer-font-weight);width:var(--plasma-dropdown-footer-width);height:var(--plasma-dropdown-footer-height);padding:var(--plasma-dropdown-footer-padding-top) var(--plasma-dropdown-footer-padding-right) var(--plasma-dropdown-footer-padding-bottom) var(--plasma-dropdown-footer-padding-left);margin:var(--plasma-dropdown-footer-margin-top) var(--plasma-dropdown-footer-margin-right) var(--plasma-dropdown-footer-margin-bottom) var(--plasma-dropdown-footer-margin-left);}
4
+
5
+ .DropdownGroup_styles_1o990eo_scop7qk__fca8c58e{background:var(--plasma-dropdown-group-background);width:var(--plasma-dropdown-group-width);height:var(--plasma-dropdown-group-height);padding:var(--plasma-dropdown-group-padding-top) var(--plasma-dropdown-group-padding-right) var(--plasma-dropdown-group-padding-bottom) var(--plasma-dropdown-group-padding-left);margin:var(--plasma-dropdown-group-margin-top) var(--plasma-dropdown-group-margin-right) var(--plasma-dropdown-group-margin-bottom) var(--plasma-dropdown-group-margin-left);}
6
+ .DropdownGroup_styles_1o990eo_s1oaw95y__fca8c58e{font-family:var(--plasma-dropdown-group-label-font-family);font-size:var(--plasma-dropdown-group-label-font-size);font-style:var(--plasma-dropdown-group-label-font-style);font-weight:var(--plasma-dropdown-group-label-font-weight);-webkit-letter-spacing:var(--plasma-dropdown-group-label-letter-spacing);-moz-letter-spacing:var(--plasma-dropdown-group-label-letter-spacing);-ms-letter-spacing:var(--plasma-dropdown-group-label-letter-spacing);letter-spacing:var(--plasma-dropdown-group-label-letter-spacing);line-height:var(--plasma-dropdown-group-label-line-height);color:var(--plasma-dropdown-group-label-color);padding:var(--plasma-dropdown-group-label-padding-top) var(--plasma-dropdown-group-label-padding-right) var(--plasma-dropdown-group-label-padding-bottom) var(--plasma-dropdown-group-label-padding-left);margin:var(--plasma-dropdown-group-label-margin-top) var(--plasma-dropdown-group-label-margin-right) var(--plasma-dropdown-group-label-margin-bottom) var(--plasma-dropdown-group-label-margin-left);}
7
+
8
+ .DropdownHeader_styles_196gwgm_s133b1g2__3510806e{background:var(--plasma-dropdown-header-background);font-family:var(--plasma-dropdown-header-font-family);font-size:var(--plasma-dropdown-header-font-size);font-style:var(--plasma-dropdown-header-font-style);font-weight:var(--plasma-dropdown-header-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-header-line-height);-moz-letter-spacing:var(--plasma-dropdown-header-line-height);-ms-letter-spacing:var(--plasma-dropdown-header-line-height);letter-spacing:var(--plasma-dropdown-header-line-height);line-height:var(--plasma-dropdown-header-font-weight);width:var(--plasma-dropdown-header-width);height:var(--plasma-dropdown-header-height);padding:var(--plasma-dropdown-header-padding-top) var(--plasma-dropdown-header-padding-right) var(--plasma-dropdown-header-padding-bottom) var(--plasma-dropdown-header-padding-left);margin:var(--plasma-dropdown-header-margin-top) var(--plasma-dropdown-header-margin-right) var(--plasma-dropdown-header-margin-bottom) var(--plasma-dropdown-header-margin-left);}
9
+
10
+ .IconRoot_7pl7ig_svvlqhf__32c458a1{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:var(--svvlqhf-0);height:var(--svvlqhf-0);-webkit-flex:0 0 var(--svvlqhf-0);-ms-flex:0 0 var(--svvlqhf-0);flex:0 0 var(--svvlqhf-0);}
11
+
12
+ .DropdownItem_styles_1o4szyu_s1gkzlls__6703745b{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
13
+ .DropdownItem_styles_1o4szyu_sz6s14y__6703745b{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
14
+ .DropdownItem_styles_1o4szyu_d1m97l2m__6703745b{line-height:0;color:var(--plasma-dropdown-disclosure-icon-color);}
15
+ .DropdownItem_styles_1o4szyu_soib72h__6703745b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-flex:1;-ms-flex:1;flex:1;}
16
+ .DropdownItem_styles_1o4szyu_w6l2f0g__6703745b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:0;box-sizing:content-box;padding-top:var(--w6l2f0g-0);padding-right:var(--plasma-dropdown-item-padding-right);padding-bottom:var(--w6l2f0g-1);padding-left:var(--plasma-dropdown-item-padding-left);font-family:var(--plasma-dropdown-item-font-family);font-size:var(--plasma-dropdown-item-font-size);font-style:var(--plasma-dropdown-item-font-style);font-weight:var(--plasma-dropdown-item-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-item-line-height);-moz-letter-spacing:var(--plasma-dropdown-item-line-height);-ms-letter-spacing:var(--plasma-dropdown-item-line-height);letter-spacing:var(--plasma-dropdown-item-line-height);line-height:var(--plasma-dropdown-item-font-weight);background:var(--plasma-dropdown-item-background);color:var(--plasma-dropdown-item-color);border-radius:var(--plasma-dropdown-item-border-radius);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b:hover:not(.DropdownItem_styles_1o4szyu_dropdownItemIsDisabled__6703745b){cursor:pointer;background:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b.DropdownItem_styles_1o4szyu_dropdownItemIsActive__6703745b{background:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b.DropdownItem_styles_1o4szyu_dropdownItemIsDisabled__6703745b{opacity:var(--plasma-dropdown-disabled-opacity);cursor:not-allowed;}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b:focus{outline:none;}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:var(--plasma-dropdown-item-border-radius);-webkit-transition:none;transition:none;pointer-events:none;}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b.DropdownItem_styles_1o4szyu_dropdownItemIsFocused__6703745b:before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-dropdown-focus-color);}
17
+
18
+ .DropdownItem_styles_12e50g5_s1iqs5in__94ac8eef{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-width:var(--plasma-dropdown-item-content-left-width);color:var(--plasma-dropdown-item-content-left-color);}
19
+ .DropdownItem_styles_12e50g5_sfg3dyd__94ac8eef{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-width:var(--plasma-dropdown-item-content-right-width);color:var(--plasma-dropdown-item-content-right-color);}
20
+ .DropdownItem_styles_12e50g5_s1dea6tl__94ac8eef{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
21
+ .DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef{box-sizing:content-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;width:auto;font-family:var(--plasma-dropdown-item-font-family);font-size:var(--plasma-dropdown-item-font-size);font-style:var(--plasma-dropdown-item-font-style);font-weight:var(--plasma-dropdown-item-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-item-line-height);-moz-letter-spacing:var(--plasma-dropdown-item-line-height);-ms-letter-spacing:var(--plasma-dropdown-item-line-height);letter-spacing:var(--plasma-dropdown-item-line-height);line-height:var(--plasma-dropdown-item-font-weight);background:var(--plasma-dropdown-item-background);color:var(--plasma-dropdown-item-color);border-radius:var(--plasma-dropdown-item-border-radius);width:var(--plasma-dropdown-item-width);height:var(--plasma-dropdown-item-height);padding:var(--plasma-dropdown-item-padding-top) var(--plasma-dropdown-item-padding-right) var(--plasma-dropdown-item-padding-bottom) var(--plasma-dropdown-item-padding-left);margin:var(--plasma-dropdown-item-margin-top) var(--plasma-dropdown-item-margin-right) var(--plasma-dropdown-item-margin-bottom) var(--plasma-dropdown-item-margin-left);}.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef:focus{outline:none;}.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:var(--plasma-dropdown-item-border-radius);-webkit-transition:none;transition:none;pointer-events:none;}.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef.DropdownItem_styles_12e50g5_focusVisible__94ac8eef:focus::before,.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-dropdown-focus-color);}.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef:hover:not(.DropdownItem_styles_12e50g5_dropdownItemIsDisabled__94ac8eef){cursor:pointer;background:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef.DropdownItem_styles_12e50g5_dropdownItemIsSelected__94ac8eef{color:var(--plasma-dropdown-item-color-selected);background:var(--plasma-dropdown-item-background-selected);}.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef.DropdownItem_styles_12e50g5_dropdownItemIsSelected__94ac8eef:hover:not(.DropdownItem_styles_12e50g5_dropdownItemIsDisabled__94ac8eef){background:var(--plasma-dropdown-item-background-selected-hover);}.DropdownItem_styles_12e50g5_b1b2nce8__94ac8eef.DropdownItem_styles_12e50g5_dropdownItemIsDisabled__94ac8eef{opacity:var(--plasma-dropdown-disabled-opacity);cursor:not-allowed;}
22
+
23
+ .Dropdown_styles_3w3l45_s1rwu6ky__59648b20 .Dropdown_styles_3w3l45_popoverTarget__59648b20{display:block;}
24
+ .Dropdown_styles_3w3l45_s10jhp3l__59648b20{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);}
25
+
1
26
  .Popover_styles_rmr9za_s1g1xbt5__0bafa6fb{display:inline-block;}
2
27
  .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
28
  .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
29
  .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
30
 
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);}
31
+ .Dropdown_styles_1tihqkp_sn7uamp__39673f55 .Dropdown_styles_1tihqkp_popoverWrapper__39673f55,.Dropdown_styles_1tihqkp_sn7uamp__39673f55 .Dropdown_styles_1tihqkp_popoverTarget__39673f55{display:block;}
32
+ .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);}
33
+ .Dropdown_styles_1tihqkp_byfocd2__39673f55{display:inline-block;}
@@ -4,82 +4,169 @@ 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
+ var DropdownInner = require('./ui/DropdownInner/DropdownInner.js');
14
+ var index$1 = require('./utils/index.js');
15
+ require('focus-visible');
16
+ require('@linaria/core');
17
+ require('react-dom');
18
+ require('react-popper');
8
19
  var base = require('./variations/_view/base.js');
9
20
  var base$1 = require('./variations/_size/base.js');
10
21
  var Dropdown_styles = require('./Dropdown.styles.js');
11
- var index = require('./utils/index.js');
22
+ var useKeyboardNavigation = require('./hooks/useKeyboardNavigation.js');
23
+ var useHashMaps = require('./hooks/useHashMaps.js');
24
+
25
+ var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow"];
12
26
 
13
- var _excluded = ["id", "target", "children", "hasArrow", "role", "view", "size", "frame", "onToggle", "isFocusTrapped", "isOpen", "placement", "trigger", "offset", "preventOverflow", "closeOnOverlayClick", "closeOnEsc"];
14
27
  /**
15
- * Выпадающий список без внешнего контроля видимости.
28
+ * Выпадающий список.
16
29
  */
17
30
  var dropdownRoot = function dropdownRoot(Root) {
18
- return /*#__PURE__*/React.forwardRef(function (_ref, outerRootRef) {
19
- var id = _ref.id,
20
- target = _ref.target,
31
+ return /*#__PURE__*/React.forwardRef(function (_ref, ref) {
32
+ var items = _ref.items,
21
33
  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
34
  _ref$placement = _ref.placement,
33
- placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
34
- _ref$trigger = _ref.trigger,
35
- trigger = _ref$trigger === void 0 ? 'click' : _ref$trigger,
35
+ placement = _ref$placement === void 0 ? 'bottom' : _ref$placement,
36
36
  _ref$offset = _ref.offset,
37
- offset = _ref$offset === void 0 ? [0, 6] : _ref$offset,
38
- _ref$preventOverflow = _ref.preventOverflow,
39
- preventOverflow = _ref$preventOverflow === void 0 ? false : _ref$preventOverflow,
37
+ offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
40
38
  _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,
39
+ closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
40
+ onToggle = _ref.onToggle,
41
+ size = _ref.size,
42
+ view = _ref.view,
43
+ _ref$itemRole = _ref.itemRole,
44
+ itemRole = _ref$itemRole === void 0 ? 'treeitem' : _ref$itemRole,
45
+ className = _ref.className,
46
+ listWidth = _ref.listWidth,
47
+ listHeight = _ref.listHeight,
48
+ listOverflow = _ref.listOverflow,
49
+ _ref$closeOnSelect = _ref.closeOnSelect,
50
+ closeOnSelect = _ref$closeOnSelect === void 0 ? true : _ref$closeOnSelect,
51
+ onHover = _ref.onHover,
52
+ onItemSelect = _ref.onItemSelect,
53
+ onItemClick = _ref.onItemClick,
54
+ _ref$trigger = _ref.trigger,
55
+ trigger = _ref$trigger === void 0 ? 'click' : _ref$trigger,
56
+ _ref$variant = _ref.variant,
57
+ variant = _ref$variant === void 0 ? 'normal' : _ref$variant,
58
+ _ref$hasArrow = _ref.hasArrow,
59
+ hasArrow = _ref$hasArrow === void 0 ? true : _ref$hasArrow,
44
60
  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,
61
+ var _useReducer = React.useReducer(pathReducer.pathReducer, []),
62
+ _useReducer2 = _rollupPluginBabelHelpers.slicedToArray(_useReducer, 2),
63
+ path = _useReducer2[0],
64
+ dispatchPath = _useReducer2[1];
65
+ var _useReducer3 = React.useReducer(focusedPathReducer.focusedPathReducer, []),
66
+ _useReducer4 = _rollupPluginBabelHelpers.slicedToArray(_useReducer3, 2),
67
+ focusedPath = _useReducer4[0],
68
+ dispatchFocusedPath = _useReducer4[1];
69
+ var _useHashMaps = useHashMaps.useHashMaps(items),
70
+ _useHashMaps2 = _rollupPluginBabelHelpers.slicedToArray(_useHashMaps, 2),
71
+ pathMap = _useHashMaps2[0],
72
+ focusedToValueMap = _useHashMaps2[1];
73
+ var handleGlobalToggle = function handleGlobalToggle(opened, event) {
74
+ if (opened) {
75
+ dispatchPath({
76
+ type: 'opened_first_level'
77
+ });
78
+ } else {
79
+ dispatchFocusedPath({
80
+ type: 'reset'
81
+ });
82
+ dispatchPath({
83
+ type: 'reset'
84
+ });
85
+ }
86
+ if (onToggle) {
87
+ onToggle(opened, event);
88
+ }
89
+ };
90
+ var _useKeyNavigation = useKeyboardNavigation.useKeyNavigation({
91
+ focusedPath: focusedPath,
92
+ dispatchFocusedPath: dispatchFocusedPath,
93
+ path: path,
94
+ dispatchPath: dispatchPath,
95
+ pathMap: pathMap,
96
+ focusedToValueMap: focusedToValueMap,
97
+ handleGlobalToggle: handleGlobalToggle,
98
+ closeOnSelect: closeOnSelect,
99
+ onItemSelect: onItemSelect,
100
+ onItemClick: onItemClick
101
+ }),
102
+ onKeyDown = _useKeyNavigation.onKeyDown;
103
+ var isCurrentListOpen = Boolean(path[0]);
104
+ var getActiveDescendant = function getActiveDescendant() {
105
+ var _focusedToValueMap$ge;
106
+ var focusedPathAsString = focusedPath.reduce(function (acc, n) {
107
+ return "".concat(acc, "/").concat(n);
108
+ }, '').replace(/^(\/)/, '');
109
+ return focusedToValueMap === null || focusedToValueMap === void 0 || (_focusedToValueMap$ge = focusedToValueMap.get(focusedPathAsString)) === null || _focusedToValueMap$ge === void 0 ? void 0 : _focusedToValueMap$ge.value.toString();
110
+ };
111
+ return /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
112
+ className: index.cx(className, Dropdown_tokens.classes.dropdownRoot),
113
+ ref: ref,
114
+ view: view,
115
+ size: size,
116
+ items: items
117
+ }, rest), /*#__PURE__*/React.createElement(Dropdown_styles.StyledPopover, {
118
+ isOpen: isCurrentListOpen,
55
119
  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,
120
+ onToggle: handleGlobalToggle,
62
121
  offset: offset,
63
- preventOverflow: preventOverflow,
64
- hasArrow: hasArrow,
65
- placement: index.getPlacements(placement),
122
+ placement: index$1.getPlacements(placement),
66
123
  trigger: trigger,
67
124
  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)));
125
+ isFocusTrapped: false,
126
+ target: index$1.childrenWithProps(children, {
127
+ role: 'combobox',
128
+ 'aria-controls': 'tree_level_1',
129
+ 'aria-expanded': isCurrentListOpen,
130
+ 'aria-activedescendant': getActiveDescendant(),
131
+ onKeyDown: onKeyDown
132
+ }),
133
+ preventOverflow: false
134
+ }, /*#__PURE__*/React.createElement(Dropdown_styles.Ul, {
135
+ listHeight: listHeight,
136
+ listOverflow: listOverflow,
137
+ role: "tree",
138
+ id: "tree_level_1",
139
+ listWidth: listWidth
140
+ }, items.map(function (item, index) {
141
+ return /*#__PURE__*/React.createElement(DropdownInner.DropdownInner, {
142
+ key: "".concat(index, "/0"),
143
+ item: item,
144
+ currentLevel: 0,
145
+ focusedPath: focusedPath,
146
+ trigger: trigger,
147
+ path: path,
148
+ dispatchPath: dispatchPath,
149
+ index: index,
150
+ itemRole: itemRole,
151
+ listHeight: listHeight,
152
+ listOverflow: listOverflow,
153
+ handleGlobalToggle: handleGlobalToggle,
154
+ closeOnSelect: closeOnSelect,
155
+ onHover: onHover,
156
+ onItemSelect: onItemSelect,
157
+ onItemClick: onItemClick,
158
+ listWidth: listWidth,
159
+ variant: variant,
160
+ hasArrow: hasArrow
161
+ });
162
+ }))));
76
163
  });
77
164
  };
78
165
  var dropdownConfig = {
79
166
  name: 'Dropdown',
80
167
  tag: 'div',
81
168
  layout: dropdownRoot,
82
- base: '',
169
+ base: Dropdown_styles.base,
83
170
  variations: {
84
171
  view: {
85
172
  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,GAA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ACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM+C,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEzD,YAAY;AACpB0D,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRjD,IAAAA,IAAI,EAAE;AACFkD,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDlD,IAAAA,IAAI,EAAE;AACFiD,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNrD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"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 = 'treeitem',\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': 'tree_level_1',\n 'aria-expanded': isCurrentListOpen,\n 'aria-activedescendant': getActiveDescendant(),\n onKeyDown,\n })}\n preventOverflow={false}\n >\n <Ul\n listHeight={listHeight}\n listOverflow={listOverflow}\n role=\"tree\"\n id=\"tree_level_1\"\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","preventOverflow","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,E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EAAAA,MAAM,EAAElG,YAAY;AACpBmG,EAAAA,IAAI,EAAJA,oBAAI;AACJC,EAAAA,UAAU,EAAE;AACRrF,IAAAA,IAAI,EAAE;AACFsF,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDxF,IAAAA,IAAI,EAAE;AACFuF,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNzF,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
@@ -1,4 +1,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;AAAC,IAAAC,IAAA,GATvBA,SASuBA,IAAAA,GAAA;AAAA,EAAA,OAELH,OAAO,CAAA;AAAA,CAAA,CAAA;AAApC,IAAMI,aAAa,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,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,sBAAM,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,sBAAgB,CAACD,UAAU,CAAC,GAAG,MAAO,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAE,KAAA,GA9BpEA,SA8BoEA,KAAAA,GAAA;AAAA,EAAA,OACtE,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,YAAAA,GAAAA,KAAAA,CAAAA,YAAAA,CAAAA;IAAAA,OAAmBA,YAAY,IAAI,SAAS,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,MAAA,GA/B7CA,SA+B6CA,MAAAA,GAAA;AAAA,EAAA,OAEjD,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,SAAAA,GAAAA,KAAAA,CAAAA,SAAAA,CAAAA;AAAAA,IAAAA,OAAiBA,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,38 @@
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',
10
+ dropdownItemIsSelected: 'dropdownItemIsSelected'
8
11
  };
9
12
  var tokens = {
10
13
  background: '--plasma-dropdown-background',
11
14
  boxShadow: '--plasma-dropdown-box-shadow',
12
15
  width: '--plasma-dropdown-width',
13
- height: '--plasma-dropdown-height',
14
16
  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',
17
+ padding: '--plasma-dropdown-padding',
18
+ disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',
19
19
  itemBackground: '--plasma-dropdown-item-background',
20
20
  itemColor: '--plasma-dropdown-item-color',
21
21
  itemBackgroundHover: '--plasma-dropdown-item-background-hover',
22
- itemBackgroundSelected: '--plasma-dropdown-item-background-selected',
23
- itemColorSelected: '--plasma-dropdown-item-color-selected',
24
- itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover',
25
- itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover',
26
- itemWidth: '--plasma-dropdown-item-width',
27
- itemHeight: '--plasma-dropdown-item-height',
28
22
  itemBorderRadius: '--plasma-dropdown-item-border-radius',
29
23
  itemPaddingTop: '--plasma-dropdown-item-padding-top',
24
+ itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight',
30
25
  itemPaddingRight: '--plasma-dropdown-item-padding-right',
31
26
  itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',
27
+ itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight',
32
28
  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
29
  itemFontFamily: '--plasma-dropdown-item-font-family',
38
30
  itemFontSize: '--plasma-dropdown-item-font-size',
39
31
  itemFontStyle: '--plasma-dropdown-item-font-style',
40
32
  itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',
41
33
  itemFontLetterSpacing: '--plasma-dropdown-item-line-height',
42
34
  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',
35
+ disabledOpacity: '--plasma-dropdown-disabled-opacity',
36
+ focusColor: '--plasma-dropdown-focus-color',
37
+ // TODO: Remove below tokens as soon as they are no longer needed
47
38
  footerBackground: '--plasma-dropdown-footer-background',
48
39
  footerWidth: '--plasma-dropdown-footer-width',
49
40
  footerHeight: '--plasma-dropdown-footer-height',
@@ -111,8 +102,20 @@ var tokens = {
111
102
  groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',
112
103
  groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',
113
104
  groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',
114
- disabledOpacity: '--plasma-dropdown-disabled-opacity',
115
- focusColor: '--plasma-dropdown-focus-color'
105
+ itemBackgroundSelected: '--plasma-dropdown-item-background-selected',
106
+ itemColorSelected: '--plasma-dropdown-item-color-selected',
107
+ itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover',
108
+ itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover',
109
+ itemContentLeftColor: '--plasma-dropdown-item-content-left-color',
110
+ itemContentRightColor: '--plasma-dropdown-item-content-right-color',
111
+ itemWidth: '--plasma-dropdown-item-width',
112
+ itemHeight: '--plasma-dropdown-item-height',
113
+ itemMarginTop: '--plasma-dropdown-item-margin-top',
114
+ itemMarginRight: '--plasma-dropdown-item-margin-right',
115
+ itemMarginBottom: '--plasma-dropdown-item-margin-bottom',
116
+ itemMarginLeft: '--plasma-dropdown-item-margin-left',
117
+ itemContentLeftWidth: '--plasma-dropdown-item-content-left-width',
118
+ itemContentRightWidth: '--plasma-dropdown-item-content-right-width'
116
119
  };
117
120
 
118
121
  exports.classes = classes;
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.tokens.js","sources":["../../../src/components/Dropdown/Dropdown.tokens.ts"],"sourcesContent":["export const classes = {\n dropdownItemIsSelected: 'dropdown-item-is-selected',\n dropdownItemIsDisabled: 'dropdown-item-is-disabled',\n};\n\nexport const tokens = {\n background: '--plasma-dropdown-background',\n boxShadow: '--plasma-dropdown-box-shadow',\n width: '--plasma-dropdown-width',\n height: '--plasma-dropdown-height',\n borderRadius: '--plasma-dropdown-border-radius',\n paddingTop: '--plasma-dropdown-padding-top',\n paddingRight: '--plasma-dropdown-padding-right',\n paddingBottom: '--plasma-dropdown-padding-bottom',\n paddingLeft: '--plasma-dropdown-padding-left',\n\n itemBackground: '--plasma-dropdown-item-background',\n itemColor: '--plasma-dropdown-item-color',\n itemBackgroundHover: '--plasma-dropdown-item-background-hover',\n itemBackgroundSelected: '--plasma-dropdown-item-background-selected',\n itemColorSelected: '--plasma-dropdown-item-color-selected',\n itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover',\n itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover',\n itemWidth: '--plasma-dropdown-item-width',\n itemHeight: '--plasma-dropdown-item-height',\n itemBorderRadius: '--plasma-dropdown-item-border-radius',\n itemPaddingTop: '--plasma-dropdown-item-padding-top',\n itemPaddingRight: '--plasma-dropdown-item-padding-right',\n itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',\n itemPaddingLeft: '--plasma-dropdown-item-padding-left',\n itemMarginTop: '--plasma-dropdown-item-margin-top',\n itemMarginRight: '--plasma-dropdown-item-margin-right',\n itemMarginBottom: '--plasma-dropdown-item-margin-bottom',\n itemMarginLeft: '--plasma-dropdown-item-margin-left',\n itemFontFamily: '--plasma-dropdown-item-font-family',\n itemFontSize: '--plasma-dropdown-item-font-size',\n itemFontStyle: '--plasma-dropdown-item-font-style',\n itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',\n itemFontLetterSpacing: '--plasma-dropdown-item-line-height',\n itemFontLineHeight: '--plasma-dropdown-item-font-weight',\n itemContentLeftColor: '--plasma-dropdown-item-content-left-color',\n itemContentRightColor: '--plasma-dropdown-item-content-right-color',\n itemContentLeftWidth: '--plasma-dropdown-item-content-left-width',\n itemContentRightWidth: '--plasma-dropdown-item-content-right-width',\n\n footerBackground: '--plasma-dropdown-footer-background',\n footerWidth: '--plasma-dropdown-footer-width',\n footerHeight: '--plasma-dropdown-footer-height',\n footerPaddingTop: '--plasma-dropdown-footer-padding-top',\n footerPaddingRight: '--plasma-dropdown-footer-padding-right',\n footerPaddingBottom: '--plasma-dropdown-footer-padding-bottom',\n footerPaddingLeft: '--plasma-dropdown-footer-padding-left',\n footerMarginTop: '--plasma-dropdown-footer-margin-top',\n footerMarginRight: '--plasma-dropdown-footer-margin-right',\n footerMarginBottom: '--plasma-dropdown-footer-margin-bottom',\n footerMarginLeft: '--plasma-dropdown-footer-margin-left',\n footerFontFamily: '--plasma-dropdown-footer-font-family',\n footerFontSize: '--plasma-dropdown-footer-font-size',\n footerFontStyle: '--plasma-dropdown-footer-font-style',\n footerFontWeightBold: '--plasma-dropdown-footer-letter-spacing',\n footerFontLetterSpacing: '--plasma-dropdown-footer-line-height',\n footerFontLineHeight: '--plasma-dropdown-footer-font-weight',\n\n headerBackground: '--plasma-dropdown-header-background',\n headerWidth: '--plasma-dropdown-header-width',\n headerHeight: '--plasma-dropdown-header-height',\n headerPaddingTop: '--plasma-dropdown-header-padding-top',\n headerPaddingRight: '--plasma-dropdown-header-padding-right',\n headerPaddingBottom: '--plasma-dropdown-header-padding-bottom',\n headerPaddingLeft: '--plasma-dropdown-header-padding-left',\n headerMarginTop: '--plasma-dropdown-header-margin-top',\n headerMarginRight: '--plasma-dropdown-header-margin-right',\n headerMarginBottom: '--plasma-dropdown-header-margin-bottom',\n headerMarginLeft: '--plasma-dropdown-header-margin-left',\n headerFontFamily: '--plasma-dropdown-header-font-family',\n headerFontSize: '--plasma-dropdown-header-font-size',\n headerFontStyle: '--plasma-dropdown-header-font-style',\n headerFontWeightBold: '--plasma-dropdown-header-letter-spacing',\n headerFontLetterSpacing: '--plasma-dropdown-header-line-height',\n headerFontLineHeight: '--plasma-dropdown-header-font-weight',\n\n dividerColor: '--plasma-dropdown-divider-color',\n dividerWidth: '--plasma-dropdown-divider-width',\n dividerHeight: '--plasma-dropdown-divider-height',\n dividerMarginTop: '--plasma-dropdown-divider-margin-top',\n dividerMarginRight: '--plasma-dropdown-divider-margin-right',\n dividerMarginBottom: '--plasma-dropdown-divider-margin-bottom',\n dividerMarginLeft: '--plasma-dropdown-divider-margin-left',\n\n groupBackground: '--plasma-dropdown-group-background',\n groupWidth: '--plasma-dropdown-group-width',\n groupHeight: '--plasma-dropdown-group-height',\n groupPaddingTop: '--plasma-dropdown-group-padding-top',\n groupPaddingRight: '--plasma-dropdown-group-padding-right',\n groupPaddingBottom: '--plasma-dropdown-group-padding-bottom',\n groupPaddingLeft: '--plasma-dropdown-group-padding-left',\n groupMarginTop: '--plasma-dropdown-group-margin-top',\n groupMarginRight: '--plasma-dropdown-group-margin-right',\n groupMarginBottom: '--plasma-dropdown-group-margin-bottom',\n groupMarginLeft: '--plasma-dropdown-group-margin-left',\n groupLabelColor: '--plasma-dropdown-group-label-color',\n groupLabelFontFamily: '--plasma-dropdown-group-label-font-family',\n groupLabelFontSize: '--plasma-dropdown-group-label-font-size',\n groupLabelFontStyle: '--plasma-dropdown-group-label-font-style',\n groupLabelFontWeight: '--plasma-dropdown-group-label-font-weight',\n groupLabelLetterSpacing: '--plasma-dropdown-group-label-letter-spacing',\n groupLabelLineHeight: '--plasma-dropdown-group-label-line-height',\n groupLabelPaddingTop: '--plasma-dropdown-group-label-padding-top',\n groupLabelPaddingRight: '--plasma-dropdown-group-label-padding-right',\n groupLabelPaddingBottom: '--plasma-dropdown-group-label-padding-bottom',\n groupLabelPaddingLeft: '--plasma-dropdown-group-label-padding-left',\n groupLabelMarginTop: '--plasma-dropdown-group-label-margin-top',\n groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',\n groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',\n groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',\n\n disabledOpacity: '--plasma-dropdown-disabled-opacity',\n focusColor: '--plasma-dropdown-focus-color',\n};\n"],"names":["classes","dropdownItemIsSelected","dropdownItemIsDisabled","tokens","background","boxShadow","width","height","borderRadius","paddingTop","paddingRight","paddingBottom","paddingLeft","itemBackground","itemColor","itemBackgroundHover","itemBackgroundSelected","itemColorSelected","itemBackgroundSelectedHover","itemColorSelectedHover","itemWidth","itemHeight","itemBorderRadius","itemPaddingTop","itemPaddingRight","itemPaddingBottom","itemPaddingLeft","itemMarginTop","itemMarginRight","itemMarginBottom","itemMarginLeft","itemFontFamily","itemFontSize","itemFontStyle","itemFontWeightBold","itemFontLetterSpacing","itemFontLineHeight","itemContentLeftColor","itemContentRightColor","itemContentLeftWidth","itemContentRightWidth","footerBackground","footerWidth","footerHeight","footerPaddingTop","footerPaddingRight","footerPaddingBottom","footerPaddingLeft","footerMarginTop","footerMarginRight","footerMarginBottom","footerMarginLeft","footerFontFamily","footerFontSize","footerFontStyle","footerFontWeightBold","footerFontLetterSpacing","footerFontLineHeight","headerBackground","headerWidth","headerHeight","headerPaddingTop","headerPaddingRight","headerPaddingBottom","headerPaddingLeft","headerMarginTop","headerMarginRight","headerMarginBottom","headerMarginLeft","headerFontFamily","headerFontSize","headerFontStyle","headerFontWeightBold","headerFontLetterSpacing","headerFontLineHeight","dividerColor","dividerWidth","dividerHeight","dividerMarginTop","dividerMarginRight","dividerMarginBottom","dividerMarginLeft","groupBackground","groupWidth","groupHeight","groupPaddingTop","groupPaddingRight","groupPaddingBottom","groupPaddingLeft","groupMarginTop","groupMarginRight","groupMarginBottom","groupMarginLeft","groupLabelColor","groupLabelFontFamily","groupLabelFontSize","groupLabelFontStyle","groupLabelFontWeight","groupLabelLetterSpacing","groupLabelLineHeight","groupLabelPaddingTop","groupLabelPaddingRight","groupLabelPaddingBottom","groupLabelPaddingLeft","groupLabelMarginTop","groupLabelMarginRight","groupLabelMarginBottom","groupLabelMarginLeft","disabledOpacity","focusColor"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,sBAAsB,EAAE,2BAA2B;AACnDC,EAAAA,sBAAsB,EAAE,2BAAA;AAC5B,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,8BAA8B;AAC1CC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,KAAK,EAAE,yBAAyB;AAChCC,EAAAA,MAAM,EAAE,0BAA0B;AAClCC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,UAAU,EAAE,+BAA+B;AAC3CC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,aAAa,EAAE,kCAAkC;AACjDC,EAAAA,WAAW,EAAE,gCAAgC;AAE7CC,EAAAA,cAAc,EAAE,mCAAmC;AACnDC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,sBAAsB,EAAE,4CAA4C;AACpEC,EAAAA,iBAAiB,EAAE,uCAAuC;AAC1D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AAgC;AAC7CC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,iBAAiB,EAAE,uCAAuC;AAC1DC,EAAAA,kBAAkB,EAAE,wCAAwC;AAC5DC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,cAAc,EAAE,oCAAoC;AACpDC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,iBAAiB,EAAE,uCAAuC;AAC1DC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,kBAAkB,EAAE,yCAAyC;AAC7DC,EAAAA,mBAAmB,EAAE,0CAA0C;AAC/DC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,mBAAmB,EAAE,0CAA0C;AAC/DC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,oBAAoB,EAAE,2CAA2C;AAEjEC,EAAAA,eAAe,EAAE,oCAAoC;AACrDC,EAAAA,UAAU,EAAE,+BAAA;AAChB;;;;;"}
1
+ {"version":3,"file":"Dropdown.tokens.js","sources":["../../../src/components/Dropdown/Dropdown.tokens.ts"],"sourcesContent":["export const classes = {\n dropdownRoot: 'dropdown-root',\n dropdownItemIsFocused: 'dropdown-item-is-focused',\n dropdownItemIsDisabled: 'dropdown-item-is-disabled',\n dropdownItemIsActive: 'dropdown-item-is-active',\n dropdownItemIsSelected: 'dropdownItemIsSelected',\n};\n\nexport const tokens = {\n background: '--plasma-dropdown-background',\n boxShadow: '--plasma-dropdown-box-shadow',\n width: '--plasma-dropdown-width',\n borderRadius: '--plasma-dropdown-border-radius',\n padding: '--plasma-dropdown-padding',\n disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',\n\n itemBackground: '--plasma-dropdown-item-background',\n itemColor: '--plasma-dropdown-item-color',\n itemBackgroundHover: '--plasma-dropdown-item-background-hover',\n itemBorderRadius: '--plasma-dropdown-item-border-radius',\n itemPaddingTop: '--plasma-dropdown-item-padding-top',\n itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight',\n itemPaddingRight: '--plasma-dropdown-item-padding-right',\n itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',\n itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight',\n itemPaddingLeft: '--plasma-dropdown-item-padding-left',\n\n itemFontFamily: '--plasma-dropdown-item-font-family',\n itemFontSize: '--plasma-dropdown-item-font-size',\n itemFontStyle: '--plasma-dropdown-item-font-style',\n itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',\n itemFontLetterSpacing: '--plasma-dropdown-item-line-height',\n itemFontLineHeight: '--plasma-dropdown-item-font-weight',\n\n disabledOpacity: '--plasma-dropdown-disabled-opacity',\n focusColor: '--plasma-dropdown-focus-color',\n\n // TODO: Remove below tokens as soon as they are no longer needed\n footerBackground: '--plasma-dropdown-footer-background',\n footerWidth: '--plasma-dropdown-footer-width',\n footerHeight: '--plasma-dropdown-footer-height',\n footerPaddingTop: '--plasma-dropdown-footer-padding-top',\n footerPaddingRight: '--plasma-dropdown-footer-padding-right',\n footerPaddingBottom: '--plasma-dropdown-footer-padding-bottom',\n footerPaddingLeft: '--plasma-dropdown-footer-padding-left',\n footerMarginTop: '--plasma-dropdown-footer-margin-top',\n footerMarginRight: '--plasma-dropdown-footer-margin-right',\n footerMarginBottom: '--plasma-dropdown-footer-margin-bottom',\n footerMarginLeft: '--plasma-dropdown-footer-margin-left',\n footerFontFamily: '--plasma-dropdown-footer-font-family',\n footerFontSize: '--plasma-dropdown-footer-font-size',\n footerFontStyle: '--plasma-dropdown-footer-font-style',\n footerFontWeightBold: '--plasma-dropdown-footer-letter-spacing',\n footerFontLetterSpacing: '--plasma-dropdown-footer-line-height',\n footerFontLineHeight: '--plasma-dropdown-footer-font-weight',\n\n headerBackground: '--plasma-dropdown-header-background',\n headerWidth: '--plasma-dropdown-header-width',\n headerHeight: '--plasma-dropdown-header-height',\n headerPaddingTop: '--plasma-dropdown-header-padding-top',\n headerPaddingRight: '--plasma-dropdown-header-padding-right',\n headerPaddingBottom: '--plasma-dropdown-header-padding-bottom',\n headerPaddingLeft: '--plasma-dropdown-header-padding-left',\n headerMarginTop: '--plasma-dropdown-header-margin-top',\n headerMarginRight: '--plasma-dropdown-header-margin-right',\n headerMarginBottom: '--plasma-dropdown-header-margin-bottom',\n headerMarginLeft: '--plasma-dropdown-header-margin-left',\n headerFontFamily: '--plasma-dropdown-header-font-family',\n headerFontSize: '--plasma-dropdown-header-font-size',\n headerFontStyle: '--plasma-dropdown-header-font-style',\n headerFontWeightBold: '--plasma-dropdown-header-letter-spacing',\n headerFontLetterSpacing: '--plasma-dropdown-header-line-height',\n headerFontLineHeight: '--plasma-dropdown-header-font-weight',\n\n dividerColor: '--plasma-dropdown-divider-color',\n dividerWidth: '--plasma-dropdown-divider-width',\n dividerHeight: '--plasma-dropdown-divider-height',\n dividerMarginTop: '--plasma-dropdown-divider-margin-top',\n dividerMarginRight: '--plasma-dropdown-divider-margin-right',\n dividerMarginBottom: '--plasma-dropdown-divider-margin-bottom',\n dividerMarginLeft: '--plasma-dropdown-divider-margin-left',\n\n groupBackground: '--plasma-dropdown-group-background',\n groupWidth: '--plasma-dropdown-group-width',\n groupHeight: '--plasma-dropdown-group-height',\n groupPaddingTop: '--plasma-dropdown-group-padding-top',\n groupPaddingRight: '--plasma-dropdown-group-padding-right',\n groupPaddingBottom: '--plasma-dropdown-group-padding-bottom',\n groupPaddingLeft: '--plasma-dropdown-group-padding-left',\n groupMarginTop: '--plasma-dropdown-group-margin-top',\n groupMarginRight: '--plasma-dropdown-group-margin-right',\n groupMarginBottom: '--plasma-dropdown-group-margin-bottom',\n groupMarginLeft: '--plasma-dropdown-group-margin-left',\n groupLabelColor: '--plasma-dropdown-group-label-color',\n groupLabelFontFamily: '--plasma-dropdown-group-label-font-family',\n groupLabelFontSize: '--plasma-dropdown-group-label-font-size',\n groupLabelFontStyle: '--plasma-dropdown-group-label-font-style',\n groupLabelFontWeight: '--plasma-dropdown-group-label-font-weight',\n groupLabelLetterSpacing: '--plasma-dropdown-group-label-letter-spacing',\n groupLabelLineHeight: '--plasma-dropdown-group-label-line-height',\n groupLabelPaddingTop: '--plasma-dropdown-group-label-padding-top',\n groupLabelPaddingRight: '--plasma-dropdown-group-label-padding-right',\n groupLabelPaddingBottom: '--plasma-dropdown-group-label-padding-bottom',\n groupLabelPaddingLeft: '--plasma-dropdown-group-label-padding-left',\n groupLabelMarginTop: '--plasma-dropdown-group-label-margin-top',\n groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',\n groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',\n groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',\n\n itemBackgroundSelected: '--plasma-dropdown-item-background-selected',\n itemColorSelected: '--plasma-dropdown-item-color-selected',\n itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover',\n itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover',\n itemContentLeftColor: '--plasma-dropdown-item-content-left-color',\n itemContentRightColor: '--plasma-dropdown-item-content-right-color',\n itemWidth: '--plasma-dropdown-item-width',\n itemHeight: '--plasma-dropdown-item-height',\n itemMarginTop: '--plasma-dropdown-item-margin-top',\n itemMarginRight: '--plasma-dropdown-item-margin-right',\n itemMarginBottom: '--plasma-dropdown-item-margin-bottom',\n itemMarginLeft: '--plasma-dropdown-item-margin-left',\n itemContentLeftWidth: '--plasma-dropdown-item-content-left-width',\n itemContentRightWidth: '--plasma-dropdown-item-content-right-width',\n};\n"],"names":["classes","dropdownRoot","dropdownItemIsFocused","dropdownItemIsDisabled","dropdownItemIsActive","dropdownItemIsSelected","tokens","background","boxShadow","width","borderRadius","padding","disclosureIconColor","itemBackground","itemColor","itemBackgroundHover","itemBorderRadius","itemPaddingTop","itemPaddingTopTight","itemPaddingRight","itemPaddingBottom","itemPaddingBottomTight","itemPaddingLeft","itemFontFamily","itemFontSize","itemFontStyle","itemFontWeightBold","itemFontLetterSpacing","itemFontLineHeight","disabledOpacity","focusColor","footerBackground","footerWidth","footerHeight","footerPaddingTop","footerPaddingRight","footerPaddingBottom","footerPaddingLeft","footerMarginTop","footerMarginRight","footerMarginBottom","footerMarginLeft","footerFontFamily","footerFontSize","footerFontStyle","footerFontWeightBold","footerFontLetterSpacing","footerFontLineHeight","headerBackground","headerWidth","headerHeight","headerPaddingTop","headerPaddingRight","headerPaddingBottom","headerPaddingLeft","headerMarginTop","headerMarginRight","headerMarginBottom","headerMarginLeft","headerFontFamily","headerFontSize","headerFontStyle","headerFontWeightBold","headerFontLetterSpacing","headerFontLineHeight","dividerColor","dividerWidth","dividerHeight","dividerMarginTop","dividerMarginRight","dividerMarginBottom","dividerMarginLeft","groupBackground","groupWidth","groupHeight","groupPaddingTop","groupPaddingRight","groupPaddingBottom","groupPaddingLeft","groupMarginTop","groupMarginRight","groupMarginBottom","groupMarginLeft","groupLabelColor","groupLabelFontFamily","groupLabelFontSize","groupLabelFontStyle","groupLabelFontWeight","groupLabelLetterSpacing","groupLabelLineHeight","groupLabelPaddingTop","groupLabelPaddingRight","groupLabelPaddingBottom","groupLabelPaddingLeft","groupLabelMarginTop","groupLabelMarginRight","groupLabelMarginBottom","groupLabelMarginLeft","itemBackgroundSelected","itemColorSelected","itemBackgroundSelectedHover","itemColorSelectedHover","itemContentLeftColor","itemContentRightColor","itemWidth","itemHeight","itemMarginTop","itemMarginRight","itemMarginBottom","itemMarginLeft","itemContentLeftWidth","itemContentRightWidth"],"mappings":";;;;AAAO,IAAMA,OAAO,GA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AE,kDAAkD;AAC/EC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,UAAU,EAAE,+BAA+B;AAC3CC,EAAAA,aAAa,EAAE,mCAAmC;AAClDC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,cAAc,EAAE,oCAAoC;AACpDC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,qBAAqB,EAAE,4CAAA;AAC3B;;;;;"}
@@ -0,0 +1,34 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+
7
+ // Данный хук рекурсивно проходится по дереву items и создает 2 мапы: мапу путей и мапу фокусов.
8
+ // Нужно для получения всей информации об item, зная только путь до него.
9
+
10
+ var useHashMaps = function useHashMaps(items) {
11
+ return React.useMemo(function () {
12
+ var pathMap = new Map();
13
+ var focusedToValueMap = new Map();
14
+ pathMap.set('root', items.length);
15
+ var rec = function rec(items) {
16
+ var prevIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
17
+ items.forEach(function (item, index) {
18
+ var value = item.value,
19
+ innerItems = item.items;
20
+ var currIndex = "".concat(prevIndex, "/").concat(index).replace(/^(\/)/, '');
21
+ focusedToValueMap.set(currIndex, item);
22
+ if (innerItems) {
23
+ pathMap.set(value, innerItems.length);
24
+ rec(innerItems, currIndex);
25
+ }
26
+ });
27
+ };
28
+ rec(items);
29
+ return [pathMap, focusedToValueMap];
30
+ }, [items]);
31
+ };
32
+
33
+ exports.useHashMaps = useHashMaps;
34
+ //# sourceMappingURL=useHashMaps.js.map