@salutejs/plasma-new-hope 0.187.1-canary.1517.11744378817.0 → 0.188.0-canary.1550.11768426274.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (555) hide show
  1. package/cjs/components/Autocomplete/Autocomplete.css +21 -22
  2. package/cjs/components/Chip/Chip.js +3 -1
  3. package/cjs/components/Chip/Chip.js.map +1 -1
  4. package/cjs/components/Combobox/ComboboxNew/Combobox.css +21 -22
  5. package/cjs/components/Combobox/ComboboxNew/Combobox.js +0 -1
  6. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  7. package/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +0 -1
  8. package/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js.map +1 -1
  9. package/cjs/components/Combobox/ComboboxNew/FloatingPopover.js +18 -4
  10. package/cjs/components/Combobox/ComboboxNew/FloatingPopover.js.map +1 -1
  11. package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  12. package/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +1 -50
  13. package/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js.map +1 -1
  14. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +21 -22
  15. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +21 -22
  16. package/cjs/components/DatePicker/RangeDate/RangeDate.css +21 -22
  17. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +21 -22
  18. package/cjs/components/DatePicker/SingleDate/SingleDate.css +21 -22
  19. package/cjs/components/Dropdown/FloatingPopover.js.map +1 -1
  20. package/cjs/components/Pagination/Pagination.css +86 -37
  21. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +86 -37
  22. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
  23. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  24. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles_10zfeps.css +3 -0
  25. package/cjs/components/Range/Range.css +21 -22
  26. package/cjs/components/Select/FloatingPopover.js +87 -0
  27. package/cjs/components/Select/FloatingPopover.js.map +1 -0
  28. package/cjs/components/Select/Select.css +83 -34
  29. package/cjs/components/Select/Select.js +179 -139
  30. package/cjs/components/Select/Select.js.map +1 -1
  31. package/cjs/components/Select/Select.styles.js +17 -50
  32. package/cjs/components/Select/Select.styles.js.map +1 -1
  33. package/cjs/components/Select/Select.styles_96j02v.css +2 -0
  34. package/cjs/components/Select/Select.tokens.js +122 -78
  35. package/cjs/components/Select/Select.tokens.js.map +1 -1
  36. package/cjs/components/Select/hooks/useKeyboardNavigation.js +19 -72
  37. package/cjs/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
  38. package/cjs/components/Select/hooks/usePathMaps.js +4 -1
  39. package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
  40. package/cjs/components/Select/ui/Inner/Inner.css +83 -34
  41. package/cjs/components/Select/ui/Inner/Inner.js +9 -9
  42. package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
  43. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +83 -34
  44. package/cjs/components/Select/ui/Inner/ui/Item/Item.js +16 -12
  45. package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  46. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +34 -51
  47. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  48. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles_1kgvsdc.css +9 -0
  49. package/cjs/components/Select/ui/Target/Target.css +58 -17
  50. package/cjs/components/Select/ui/Target/Target.js +34 -16
  51. package/cjs/components/Select/ui/Target/Target.js.map +1 -1
  52. package/cjs/components/Select/ui/Target/ui/Button/Button.css +5 -5
  53. package/cjs/components/Select/ui/Target/ui/Button/Button.js +10 -14
  54. package/cjs/components/Select/ui/Target/ui/Button/Button.js.map +1 -1
  55. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +1 -1
  56. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  57. package/cjs/components/Select/ui/Target/ui/Button/Button.styles_10g64me.css +5 -0
  58. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +53 -38
  59. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +84 -97
  60. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  61. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +35 -107
  62. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  63. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_xyln0f.css +3 -0
  64. package/cjs/components/Select/utils/getFallbackPlacements.js +15 -0
  65. package/cjs/components/Select/utils/getFallbackPlacements.js.map +1 -0
  66. package/cjs/components/Select/utils/getItemId.js +10 -0
  67. package/cjs/components/Select/utils/getItemId.js.map +1 -0
  68. package/cjs/components/Select/utils/getPlacement.js +13 -0
  69. package/cjs/components/Select/utils/getPlacement.js.map +1 -0
  70. package/cjs/components/Select/utils/getView.js +2 -2
  71. package/cjs/components/Select/utils/getView.js.map +1 -1
  72. package/cjs/components/Slider/Slider.css +21 -22
  73. package/cjs/components/Slider/components/Double/Double.css +21 -22
  74. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +21 -22
  75. package/cjs/components/Steps/Steps.css +10 -10
  76. package/cjs/components/Steps/Steps.js +14 -21
  77. package/cjs/components/Steps/Steps.js.map +1 -1
  78. package/cjs/components/Steps/Steps.styles.js +1 -1
  79. package/cjs/components/Steps/Steps.styles.js.map +1 -1
  80. package/cjs/components/Steps/{Steps.styles_wa45kj.css → Steps.styles_1xmqxqu.css} +1 -1
  81. package/cjs/components/Steps/Steps.tokens.js +0 -1
  82. package/cjs/components/Steps/Steps.tokens.js.map +1 -1
  83. package/cjs/components/Steps/ui/StepItem/StepItem.css +9 -9
  84. package/cjs/components/Steps/ui/StepItem/StepItem.js +7 -29
  85. package/cjs/components/Steps/ui/StepItem/StepItem.js.map +1 -1
  86. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +6 -6
  87. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  88. package/cjs/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +9 -0
  89. package/cjs/components/TextField/TextField.js +7 -0
  90. package/cjs/components/TextField/TextField.js.map +1 -1
  91. package/cjs/components/TextField/TextField.styles.js +14 -22
  92. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  93. package/{es/components/TextField/TextField.styles_grgg7q.css → cjs/components/TextField/TextField.styles_j7dqpn.css} +6 -7
  94. package/cjs/components/TextField/ui/Hint/Hint.css +20 -21
  95. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +7 -1
  96. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
  97. package/cjs/components/TextField/variations/_clear/base.js +1 -1
  98. package/cjs/components/TextField/variations/_clear/{base_1i91sjp.css → base_1396md2.css} +1 -1
  99. package/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  100. package/cjs/components/TextField/variations/_label-placement/base_gttvto.css +1 -0
  101. package/cjs/components/TextField/variations/_read-only/base.js +1 -1
  102. package/cjs/components/TextField/variations/_read-only/{base_17ypmu7.css → base_1jvcf9a.css} +1 -1
  103. package/cjs/components/TextField/variations/_size/base.js +1 -1
  104. package/cjs/components/TextField/variations/_size/{base_1xdmaqh.css → base_1tei47x.css} +1 -1
  105. package/cjs/components/TextField/variations/_view/base.js +1 -1
  106. package/cjs/components/TextField/variations/_view/{base_qhyte8.css → base_8ogww5.css} +1 -1
  107. package/cjs/index.css +57 -72
  108. package/emotion/cjs/components/Chip/Chip.js +3 -1
  109. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +0 -1
  110. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +0 -1
  111. package/emotion/cjs/components/Combobox/ComboboxNew/FloatingPopover.js +19 -5
  112. package/emotion/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +1 -50
  113. package/emotion/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +3 -3
  114. package/emotion/cjs/components/Select/FloatingPopover.js +91 -0
  115. package/emotion/cjs/components/Select/Select.js +177 -136
  116. package/emotion/cjs/components/Select/Select.styles.js +13 -31
  117. package/emotion/cjs/components/Select/Select.tokens.js +125 -60
  118. package/emotion/cjs/components/Select/hooks/useKeyboardNavigation.js +19 -73
  119. package/emotion/cjs/components/Select/hooks/usePathMaps.js +4 -1
  120. package/emotion/cjs/components/Select/reducers/index.js +0 -11
  121. package/emotion/cjs/components/Select/ui/Inner/Inner.js +9 -9
  122. package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +15 -12
  123. package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +26 -49
  124. package/emotion/cjs/components/Select/ui/Target/Target.js +38 -18
  125. package/emotion/cjs/components/Select/ui/Target/ui/Button/Button.js +13 -16
  126. package/emotion/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +6 -6
  127. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +88 -99
  128. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +25 -75
  129. package/emotion/cjs/components/Select/utils/getFallbackPlacements.js +14 -0
  130. package/emotion/cjs/components/Select/utils/getItemId.js +9 -0
  131. package/emotion/cjs/components/Select/utils/getPlacement.js +12 -0
  132. package/emotion/cjs/components/Select/utils/getView.js +2 -2
  133. package/emotion/cjs/components/Select/utils/index.js +22 -1
  134. package/emotion/cjs/components/Steps/Steps.js +14 -23
  135. package/emotion/cjs/components/Steps/Steps.styles.js +1 -1
  136. package/emotion/cjs/components/Steps/Steps.tokens.js +0 -1
  137. package/emotion/cjs/components/Steps/ui/StepItem/StepItem.js +7 -29
  138. package/emotion/cjs/components/Steps/ui/StepItem/StepItem.styles.js +11 -22
  139. package/emotion/cjs/components/TextField/TextField.js +8 -1
  140. package/emotion/cjs/components/TextField/TextField.styles.js +36 -40
  141. package/emotion/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +7 -1
  142. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
  143. package/emotion/cjs/examples/plasma_b2c/components/Select/Select.config.js +28 -20
  144. package/emotion/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +47 -40
  145. package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +5 -5
  146. package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
  147. package/emotion/cjs/examples/plasma_web/components/Select/Select.config.js +28 -20
  148. package/emotion/cjs/examples/plasma_web/components/Select/Select.stories.tsx +47 -40
  149. package/emotion/cjs/examples/plasma_web/components/Steps/Steps.config.js +5 -5
  150. package/emotion/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
  151. package/emotion/es/components/Chip/Chip.js +3 -1
  152. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +0 -1
  153. package/emotion/es/components/Combobox/ComboboxNew/Combobox.tokens.js +0 -1
  154. package/emotion/es/components/Combobox/ComboboxNew/FloatingPopover.js +18 -4
  155. package/emotion/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +1 -50
  156. package/emotion/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +3 -3
  157. package/emotion/es/components/Select/FloatingPopover.js +84 -0
  158. package/emotion/es/components/Select/Select.js +182 -141
  159. package/emotion/es/components/Select/Select.styles.js +12 -30
  160. package/emotion/es/components/Select/Select.tokens.js +125 -60
  161. package/emotion/es/components/Select/hooks/useKeyboardNavigation.js +18 -72
  162. package/emotion/es/components/Select/hooks/usePathMaps.js +4 -1
  163. package/emotion/es/components/Select/reducers/index.js +1 -2
  164. package/emotion/es/components/Select/ui/Inner/Inner.js +10 -10
  165. package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +18 -15
  166. package/emotion/es/components/Select/ui/Inner/ui/Item/Item.styles.js +25 -48
  167. package/emotion/es/components/Select/ui/Target/Target.js +35 -17
  168. package/emotion/es/components/Select/ui/Target/ui/Button/Button.js +11 -16
  169. package/emotion/es/components/Select/ui/Target/ui/Button/Button.styles.js +6 -6
  170. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +86 -99
  171. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +25 -75
  172. package/emotion/es/components/Select/utils/getFallbackPlacements.js +8 -0
  173. package/emotion/es/components/Select/utils/getItemId.js +3 -0
  174. package/emotion/es/components/Select/utils/getPlacement.js +6 -0
  175. package/emotion/es/components/Select/utils/getView.js +2 -2
  176. package/emotion/es/components/Select/utils/index.js +4 -1
  177. package/emotion/es/components/Steps/Steps.js +15 -24
  178. package/emotion/es/components/Steps/Steps.styles.js +1 -1
  179. package/emotion/es/components/Steps/Steps.tokens.js +0 -1
  180. package/emotion/es/components/Steps/ui/StepItem/StepItem.js +7 -29
  181. package/emotion/es/components/Steps/ui/StepItem/StepItem.styles.js +11 -22
  182. package/emotion/es/components/TextField/TextField.js +8 -1
  183. package/emotion/es/components/TextField/TextField.styles.js +36 -40
  184. package/emotion/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +7 -1
  185. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
  186. package/emotion/es/examples/plasma_b2c/components/Select/Select.config.js +29 -21
  187. package/emotion/es/examples/plasma_b2c/components/Select/Select.stories.tsx +47 -40
  188. package/emotion/es/examples/plasma_b2c/components/Steps/Steps.config.js +5 -5
  189. package/emotion/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
  190. package/emotion/es/examples/plasma_web/components/Select/Select.config.js +29 -21
  191. package/emotion/es/examples/plasma_web/components/Select/Select.stories.tsx +47 -40
  192. package/emotion/es/examples/plasma_web/components/Steps/Steps.config.js +5 -5
  193. package/emotion/es/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
  194. package/es/components/Autocomplete/Autocomplete.css +21 -22
  195. package/es/components/Chip/Chip.js +3 -1
  196. package/es/components/Chip/Chip.js.map +1 -1
  197. package/es/components/Combobox/ComboboxNew/Combobox.css +21 -22
  198. package/es/components/Combobox/ComboboxNew/Combobox.js +0 -1
  199. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  200. package/es/components/Combobox/ComboboxNew/Combobox.tokens.js +0 -1
  201. package/es/components/Combobox/ComboboxNew/Combobox.tokens.js.map +1 -1
  202. package/es/components/Combobox/ComboboxNew/FloatingPopover.js +18 -4
  203. package/es/components/Combobox/ComboboxNew/FloatingPopover.js.map +1 -1
  204. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  205. package/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +1 -50
  206. package/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js.map +1 -1
  207. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +21 -22
  208. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +21 -22
  209. package/es/components/DatePicker/RangeDate/RangeDate.css +21 -22
  210. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +21 -22
  211. package/es/components/DatePicker/SingleDate/SingleDate.css +21 -22
  212. package/es/components/Dropdown/FloatingPopover.js.map +1 -1
  213. package/es/components/Pagination/Pagination.css +86 -37
  214. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +86 -37
  215. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
  216. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  217. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles_10zfeps.css +3 -0
  218. package/es/components/Range/Range.css +21 -22
  219. package/es/components/Select/FloatingPopover.js +83 -0
  220. package/es/components/Select/FloatingPopover.js.map +1 -0
  221. package/es/components/Select/Select.css +83 -34
  222. package/es/components/Select/Select.js +182 -142
  223. package/es/components/Select/Select.js.map +1 -1
  224. package/es/components/Select/Select.styles.js +18 -48
  225. package/es/components/Select/Select.styles.js.map +1 -1
  226. package/es/components/Select/Select.styles_96j02v.css +2 -0
  227. package/es/components/Select/Select.tokens.js +123 -78
  228. package/es/components/Select/Select.tokens.js.map +1 -1
  229. package/es/components/Select/hooks/useKeyboardNavigation.js +19 -73
  230. package/es/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
  231. package/es/components/Select/hooks/usePathMaps.js +4 -1
  232. package/es/components/Select/hooks/usePathMaps.js.map +1 -1
  233. package/es/components/Select/ui/Inner/Inner.css +83 -34
  234. package/es/components/Select/ui/Inner/Inner.js +10 -10
  235. package/es/components/Select/ui/Inner/Inner.js.map +1 -1
  236. package/es/components/Select/ui/Inner/ui/Item/Item.css +83 -34
  237. package/es/components/Select/ui/Inner/ui/Item/Item.js +18 -14
  238. package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  239. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js +33 -50
  240. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  241. package/es/components/Select/ui/Inner/ui/Item/Item.styles_1kgvsdc.css +9 -0
  242. package/es/components/Select/ui/Target/Target.css +58 -17
  243. package/es/components/Select/ui/Target/Target.js +35 -17
  244. package/es/components/Select/ui/Target/Target.js.map +1 -1
  245. package/es/components/Select/ui/Target/ui/Button/Button.css +5 -5
  246. package/es/components/Select/ui/Target/ui/Button/Button.js +11 -15
  247. package/es/components/Select/ui/Target/ui/Button/Button.js.map +1 -1
  248. package/es/components/Select/ui/Target/ui/Button/Button.styles.js +1 -1
  249. package/es/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  250. package/es/components/Select/ui/Target/ui/Button/Button.styles_10g64me.css +5 -0
  251. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +53 -38
  252. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +86 -99
  253. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  254. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +36 -99
  255. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  256. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles_xyln0f.css +3 -0
  257. package/es/components/Select/utils/getFallbackPlacements.js +11 -0
  258. package/es/components/Select/utils/getFallbackPlacements.js.map +1 -0
  259. package/es/components/Select/utils/getItemId.js +6 -0
  260. package/es/components/Select/utils/getItemId.js.map +1 -0
  261. package/es/components/Select/utils/getPlacement.js +9 -0
  262. package/es/components/Select/utils/getPlacement.js.map +1 -0
  263. package/es/components/Select/utils/getView.js +2 -2
  264. package/es/components/Select/utils/getView.js.map +1 -1
  265. package/es/components/Slider/Slider.css +21 -22
  266. package/es/components/Slider/components/Double/Double.css +21 -22
  267. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +21 -22
  268. package/es/components/Steps/Steps.css +10 -10
  269. package/es/components/Steps/Steps.js +16 -23
  270. package/es/components/Steps/Steps.js.map +1 -1
  271. package/es/components/Steps/Steps.styles.js +1 -1
  272. package/es/components/Steps/Steps.styles.js.map +1 -1
  273. package/es/components/Steps/{Steps.styles_wa45kj.css → Steps.styles_1xmqxqu.css} +1 -1
  274. package/es/components/Steps/Steps.tokens.js +0 -1
  275. package/es/components/Steps/Steps.tokens.js.map +1 -1
  276. package/es/components/Steps/ui/StepItem/StepItem.css +9 -9
  277. package/es/components/Steps/ui/StepItem/StepItem.js +8 -30
  278. package/es/components/Steps/ui/StepItem/StepItem.js.map +1 -1
  279. package/es/components/Steps/ui/StepItem/StepItem.styles.js +6 -6
  280. package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  281. package/es/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +9 -0
  282. package/es/components/TextField/TextField.js +7 -0
  283. package/es/components/TextField/TextField.js.map +1 -1
  284. package/es/components/TextField/TextField.styles.js +14 -22
  285. package/es/components/TextField/TextField.styles.js.map +1 -1
  286. package/{cjs/components/TextField/TextField.styles_grgg7q.css → es/components/TextField/TextField.styles_j7dqpn.css} +6 -7
  287. package/es/components/TextField/ui/Hint/Hint.css +20 -21
  288. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +7 -1
  289. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
  290. package/es/components/TextField/variations/_clear/base.js +1 -1
  291. package/es/components/TextField/variations/_clear/{base_1i91sjp.css → base_1396md2.css} +1 -1
  292. package/es/components/TextField/variations/_label-placement/base.js +1 -1
  293. package/es/components/TextField/variations/_label-placement/base_gttvto.css +1 -0
  294. package/es/components/TextField/variations/_read-only/base.js +1 -1
  295. package/es/components/TextField/variations/_read-only/{base_17ypmu7.css → base_1jvcf9a.css} +1 -1
  296. package/es/components/TextField/variations/_size/base.js +1 -1
  297. package/es/components/TextField/variations/_size/{base_1xdmaqh.css → base_1tei47x.css} +1 -1
  298. package/es/components/TextField/variations/_view/base.js +1 -1
  299. package/es/components/TextField/variations/_view/{base_qhyte8.css → base_8ogww5.css} +1 -1
  300. package/es/index.css +57 -72
  301. package/package.json +2 -2
  302. package/styled-components/cjs/components/Chip/Chip.js +3 -1
  303. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +0 -1
  304. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +0 -1
  305. package/styled-components/cjs/components/Combobox/ComboboxNew/FloatingPopover.js +19 -5
  306. package/styled-components/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +1 -50
  307. package/styled-components/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
  308. package/styled-components/cjs/components/Select/FloatingPopover.js +91 -0
  309. package/styled-components/cjs/components/Select/Select.js +177 -136
  310. package/styled-components/cjs/components/Select/Select.styles.js +11 -26
  311. package/styled-components/cjs/components/Select/Select.tokens.js +125 -60
  312. package/styled-components/cjs/components/Select/hooks/useKeyboardNavigation.js +19 -73
  313. package/styled-components/cjs/components/Select/hooks/usePathMaps.js +4 -1
  314. package/styled-components/cjs/components/Select/reducers/index.js +0 -11
  315. package/styled-components/cjs/components/Select/ui/Inner/Inner.js +9 -9
  316. package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +15 -12
  317. package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +19 -25
  318. package/styled-components/cjs/components/Select/ui/Target/Target.js +38 -18
  319. package/styled-components/cjs/components/Select/ui/Target/ui/Button/Button.js +13 -16
  320. package/styled-components/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +3 -3
  321. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +88 -99
  322. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -62
  323. package/styled-components/cjs/components/Select/utils/getFallbackPlacements.js +14 -0
  324. package/styled-components/cjs/components/Select/utils/getItemId.js +9 -0
  325. package/styled-components/cjs/components/Select/utils/getPlacement.js +12 -0
  326. package/styled-components/cjs/components/Select/utils/getView.js +2 -2
  327. package/styled-components/cjs/components/Select/utils/index.js +22 -1
  328. package/styled-components/cjs/components/Steps/Steps.js +14 -23
  329. package/styled-components/cjs/components/Steps/Steps.styles.js +1 -1
  330. package/styled-components/cjs/components/Steps/Steps.tokens.js +0 -1
  331. package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.js +7 -29
  332. package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.styles.js +6 -17
  333. package/styled-components/cjs/components/TextField/TextField.js +7 -0
  334. package/styled-components/cjs/components/TextField/TextField.styles.js +12 -15
  335. package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +7 -1
  336. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +1 -1
  337. package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.config.js +28 -20
  338. package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +47 -40
  339. package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +1 -1
  340. package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
  341. package/styled-components/cjs/examples/plasma_web/components/Select/Select.config.js +28 -20
  342. package/styled-components/cjs/examples/plasma_web/components/Select/Select.stories.tsx +47 -40
  343. package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.config.js +1 -1
  344. package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
  345. package/styled-components/es/components/Chip/Chip.js +3 -1
  346. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +0 -1
  347. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.tokens.js +0 -1
  348. package/styled-components/es/components/Combobox/ComboboxNew/FloatingPopover.js +18 -4
  349. package/styled-components/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +1 -50
  350. package/styled-components/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
  351. package/styled-components/es/components/Select/FloatingPopover.js +84 -0
  352. package/styled-components/es/components/Select/Select.js +182 -141
  353. package/styled-components/es/components/Select/Select.styles.js +10 -25
  354. package/styled-components/es/components/Select/Select.tokens.js +125 -60
  355. package/styled-components/es/components/Select/hooks/useKeyboardNavigation.js +18 -72
  356. package/styled-components/es/components/Select/hooks/usePathMaps.js +4 -1
  357. package/styled-components/es/components/Select/reducers/index.js +1 -2
  358. package/styled-components/es/components/Select/ui/Inner/Inner.js +10 -10
  359. package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +18 -15
  360. package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.styles.js +18 -24
  361. package/styled-components/es/components/Select/ui/Target/Target.js +35 -17
  362. package/styled-components/es/components/Select/ui/Target/ui/Button/Button.js +11 -16
  363. package/styled-components/es/components/Select/ui/Target/ui/Button/Button.styles.js +3 -3
  364. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +86 -99
  365. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -62
  366. package/styled-components/es/components/Select/utils/getFallbackPlacements.js +8 -0
  367. package/styled-components/es/components/Select/utils/getItemId.js +3 -0
  368. package/styled-components/es/components/Select/utils/getPlacement.js +6 -0
  369. package/styled-components/es/components/Select/utils/getView.js +2 -2
  370. package/styled-components/es/components/Select/utils/index.js +4 -1
  371. package/styled-components/es/components/Steps/Steps.js +15 -24
  372. package/styled-components/es/components/Steps/Steps.styles.js +1 -1
  373. package/styled-components/es/components/Steps/Steps.tokens.js +0 -1
  374. package/styled-components/es/components/Steps/ui/StepItem/StepItem.js +7 -29
  375. package/styled-components/es/components/Steps/ui/StepItem/StepItem.styles.js +6 -17
  376. package/styled-components/es/components/TextField/TextField.js +7 -0
  377. package/styled-components/es/components/TextField/TextField.styles.js +12 -15
  378. package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +7 -1
  379. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +1 -1
  380. package/styled-components/es/examples/plasma_b2c/components/Select/Select.config.js +29 -21
  381. package/styled-components/es/examples/plasma_b2c/components/Select/Select.stories.tsx +47 -40
  382. package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.config.js +1 -1
  383. package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
  384. package/styled-components/es/examples/plasma_web/components/Select/Select.config.js +29 -21
  385. package/styled-components/es/examples/plasma_web/components/Select/Select.stories.tsx +47 -40
  386. package/styled-components/es/examples/plasma_web/components/Steps/Steps.config.js +1 -1
  387. package/styled-components/es/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
  388. package/types/components/Chip/Chip.d.ts.map +1 -1
  389. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  390. package/types/components/Combobox/ComboboxNew/Combobox.tokens.d.ts +0 -1
  391. package/types/components/Combobox/ComboboxNew/Combobox.tokens.d.ts.map +1 -1
  392. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +1 -1
  393. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  394. package/types/components/Combobox/ComboboxNew/FloatingPopover.d.ts.map +1 -1
  395. package/types/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.d.ts +1 -3
  396. package/types/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.d.ts.map +1 -1
  397. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +28 -28
  398. package/types/components/Select/FloatingPopover.d.ts +5 -0
  399. package/types/components/Select/FloatingPopover.d.ts.map +1 -0
  400. package/types/components/Select/Select.d.ts +5 -11
  401. package/types/components/Select/Select.d.ts.map +1 -1
  402. package/types/components/Select/Select.styles.d.ts +0 -9
  403. package/types/components/Select/Select.styles.d.ts.map +1 -1
  404. package/types/components/Select/Select.tokens.d.ts +121 -58
  405. package/types/components/Select/Select.tokens.d.ts.map +1 -1
  406. package/types/components/Select/Select.types.d.ts +29 -17
  407. package/types/components/Select/Select.types.d.ts.map +1 -1
  408. package/types/components/Select/hooks/useKeyboardNavigation.d.ts +5 -11
  409. package/types/components/Select/hooks/useKeyboardNavigation.d.ts.map +1 -1
  410. package/types/components/Select/hooks/usePathMaps.d.ts +2 -1
  411. package/types/components/Select/hooks/usePathMaps.d.ts.map +1 -1
  412. package/types/components/Select/index.d.ts +1 -1
  413. package/types/components/Select/index.d.ts.map +1 -1
  414. package/types/components/Select/reducers/index.d.ts +0 -1
  415. package/types/components/Select/reducers/index.d.ts.map +1 -1
  416. package/types/components/Select/ui/Inner/Inner.d.ts.map +1 -1
  417. package/types/components/Select/ui/Inner/ui/Item/Item.d.ts.map +1 -1
  418. package/types/components/Select/ui/Inner/ui/Item/Item.styles.d.ts +32 -2
  419. package/types/components/Select/ui/Inner/ui/Item/Item.styles.d.ts.map +1 -1
  420. package/types/components/Select/ui/Inner/ui/Item/Item.types.d.ts +9 -0
  421. package/types/components/Select/ui/Inner/ui/Item/Item.types.d.ts.map +1 -1
  422. package/types/components/Select/ui/Target/Target.d.ts +14 -2
  423. package/types/components/Select/ui/Target/Target.d.ts.map +1 -1
  424. package/types/components/Select/ui/Target/Target.types.d.ts +10 -9
  425. package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
  426. package/types/components/Select/ui/Target/ui/Button/Button.d.ts +1 -1
  427. package/types/components/Select/ui/Target/ui/Button/Button.d.ts.map +1 -1
  428. package/types/components/Select/ui/Target/ui/Button/Button.types.d.ts +1 -1
  429. package/types/components/Select/ui/Target/ui/Button/Button.types.d.ts.map +1 -1
  430. package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts +1 -1
  431. package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
  432. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts +628 -60
  433. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
  434. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -4
  435. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
  436. package/types/components/Select/utils/getFallbackPlacements.d.ts +4 -0
  437. package/types/components/Select/utils/getFallbackPlacements.d.ts.map +1 -0
  438. package/types/components/Select/utils/getItemId.d.ts +2 -0
  439. package/types/components/Select/utils/getItemId.d.ts.map +1 -0
  440. package/types/components/Select/utils/getPlacement.d.ts +4 -0
  441. package/types/components/Select/utils/getPlacement.d.ts.map +1 -0
  442. package/types/components/Select/utils/getView.d.ts +1 -1
  443. package/types/components/Select/utils/getView.d.ts.map +1 -1
  444. package/types/components/Select/utils/index.d.ts +3 -0
  445. package/types/components/Select/utils/index.d.ts.map +1 -1
  446. package/types/components/Steps/Steps.d.ts.map +1 -1
  447. package/types/components/Steps/Steps.styles.d.ts.map +1 -1
  448. package/types/components/Steps/Steps.tokens.d.ts +0 -1
  449. package/types/components/Steps/Steps.tokens.d.ts.map +1 -1
  450. package/types/components/Steps/ui/StepItem/StepItem.d.ts.map +1 -1
  451. package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts +2 -2
  452. package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts.map +1 -1
  453. package/types/components/TextField/TextField.d.ts.map +1 -1
  454. package/types/components/TextField/TextField.styles.d.ts +1 -3
  455. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  456. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts +3 -1
  457. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts.map +1 -1
  458. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +24 -24
  459. package/types/examples/plasma_b2c/components/Select/Select.config.d.ts +15 -7
  460. package/types/examples/plasma_b2c/components/Select/Select.config.d.ts.map +1 -1
  461. package/types/examples/plasma_b2c/components/Select/Select.d.ts +41 -34
  462. package/types/examples/plasma_b2c/components/Select/Select.d.ts.map +1 -1
  463. package/types/examples/plasma_b2c/components/Steps/Steps.config.d.ts.map +1 -1
  464. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +24 -24
  465. package/types/examples/plasma_web/components/Select/Select.config.d.ts +15 -7
  466. package/types/examples/plasma_web/components/Select/Select.config.d.ts.map +1 -1
  467. package/types/examples/plasma_web/components/Select/Select.d.ts +41 -34
  468. package/types/examples/plasma_web/components/Select/Select.d.ts.map +1 -1
  469. package/types/examples/plasma_web/components/Steps/Steps.config.d.ts.map +1 -1
  470. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles_1fesyfv.css +0 -3
  471. package/cjs/components/Select/Select.styles_768h42.css +0 -5
  472. package/cjs/components/Select/reducers/focusedChipIndexReducer.js +0 -39
  473. package/cjs/components/Select/reducers/focusedChipIndexReducer.js.map +0 -1
  474. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles_8oe5oy.css +0 -9
  475. package/cjs/components/Select/ui/Target/ui/Button/Button.styles_lxxm4p.css +0 -5
  476. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_1damf5p.css +0 -12
  477. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.css +0 -21
  478. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +0 -36
  479. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js.map +0 -1
  480. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +0 -22
  481. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +0 -1
  482. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles_1a752pa.css +0 -1
  483. package/cjs/components/Select/variations/_size/base.js +0 -9
  484. package/cjs/components/Select/variations/_size/base.js.map +0 -1
  485. package/cjs/components/Select/variations/_size/base_x642ct.css +0 -1
  486. package/cjs/components/Select/variations/_view/base.js +0 -9
  487. package/cjs/components/Select/variations/_view/base.js.map +0 -1
  488. package/cjs/components/Select/variations/_view/base_x642ct.css +0 -1
  489. package/cjs/components/Steps/ui/StepItem/StepItem.styles_q5nnk6.css +0 -9
  490. package/cjs/components/TextField/variations/_label-placement/base_3domm.css +0 -1
  491. package/emotion/cjs/components/Select/reducers/focusedChipIndexReducer.js +0 -38
  492. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +0 -37
  493. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +0 -22
  494. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/ui/index.js +0 -16
  495. package/emotion/cjs/components/Select/variations/_size/base.js +0 -8
  496. package/emotion/cjs/components/Select/variations/_size/tokens.json +0 -9
  497. package/emotion/cjs/components/Select/variations/_view/base.js +0 -8
  498. package/emotion/cjs/components/Select/variations/_view/tokens.json +0 -1
  499. package/emotion/es/components/Select/reducers/focusedChipIndexReducer.js +0 -32
  500. package/emotion/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +0 -28
  501. package/emotion/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +0 -15
  502. package/emotion/es/components/Select/ui/Target/ui/Textfield/ui/index.js +0 -1
  503. package/emotion/es/components/Select/variations/_size/base.js +0 -2
  504. package/emotion/es/components/Select/variations/_size/tokens.json +0 -9
  505. package/emotion/es/components/Select/variations/_view/base.js +0 -2
  506. package/emotion/es/components/Select/variations/_view/tokens.json +0 -1
  507. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles_1fesyfv.css +0 -3
  508. package/es/components/Select/Select.styles_768h42.css +0 -5
  509. package/es/components/Select/reducers/focusedChipIndexReducer.js +0 -35
  510. package/es/components/Select/reducers/focusedChipIndexReducer.js.map +0 -1
  511. package/es/components/Select/ui/Inner/ui/Item/Item.styles_8oe5oy.css +0 -9
  512. package/es/components/Select/ui/Target/ui/Button/Button.styles_lxxm4p.css +0 -5
  513. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles_1damf5p.css +0 -12
  514. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.css +0 -21
  515. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +0 -32
  516. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js.map +0 -1
  517. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +0 -18
  518. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +0 -1
  519. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles_1a752pa.css +0 -1
  520. package/es/components/Select/variations/_size/base.js +0 -5
  521. package/es/components/Select/variations/_size/base.js.map +0 -1
  522. package/es/components/Select/variations/_size/base_x642ct.css +0 -1
  523. package/es/components/Select/variations/_view/base.js +0 -5
  524. package/es/components/Select/variations/_view/base.js.map +0 -1
  525. package/es/components/Select/variations/_view/base_x642ct.css +0 -1
  526. package/es/components/Steps/ui/StepItem/StepItem.styles_q5nnk6.css +0 -9
  527. package/es/components/TextField/variations/_label-placement/base_3domm.css +0 -1
  528. package/styled-components/cjs/components/Select/reducers/focusedChipIndexReducer.js +0 -38
  529. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +0 -37
  530. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +0 -21
  531. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/ui/index.js +0 -16
  532. package/styled-components/cjs/components/Select/variations/_size/base.js +0 -8
  533. package/styled-components/cjs/components/Select/variations/_size/tokens.json +0 -9
  534. package/styled-components/cjs/components/Select/variations/_view/base.js +0 -8
  535. package/styled-components/cjs/components/Select/variations/_view/tokens.json +0 -1
  536. package/styled-components/es/components/Select/reducers/focusedChipIndexReducer.js +0 -32
  537. package/styled-components/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +0 -28
  538. package/styled-components/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +0 -14
  539. package/styled-components/es/components/Select/ui/Target/ui/Textfield/ui/index.js +0 -1
  540. package/styled-components/es/components/Select/variations/_size/base.js +0 -2
  541. package/styled-components/es/components/Select/variations/_size/tokens.json +0 -9
  542. package/styled-components/es/components/Select/variations/_view/base.js +0 -2
  543. package/styled-components/es/components/Select/variations/_view/tokens.json +0 -1
  544. package/types/components/Select/reducers/focusedChipIndexReducer.d.ts +0 -11
  545. package/types/components/Select/reducers/focusedChipIndexReducer.d.ts.map +0 -1
  546. package/types/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.d.ts +0 -9
  547. package/types/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.d.ts.map +0 -1
  548. package/types/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.d.ts +0 -3
  549. package/types/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.d.ts.map +0 -1
  550. package/types/components/Select/ui/Target/ui/Textfield/ui/index.d.ts +0 -2
  551. package/types/components/Select/ui/Target/ui/Textfield/ui/index.d.ts.map +0 -1
  552. package/types/components/Select/variations/_size/base.d.ts +0 -2
  553. package/types/components/Select/variations/_size/base.d.ts.map +0 -1
  554. package/types/components/Select/variations/_view/base.d.ts +0 -2
  555. package/types/components/Select/variations/_view/base.d.ts.map +0 -1
@@ -29,7 +29,6 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
29
29
  focusedToValueMap = _ref.focusedToValueMap,
30
30
  handleListToggle = _ref.handleListToggle,
31
31
  handlePressDown = _ref.handlePressDown,
32
- multiselect = _ref.multiselect,
33
32
  setTextValue = _ref.setTextValue;
34
33
  var currentIndex = (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[focusedPath.length - 1]) || 0;
35
34
  var currentLength = pathMap.get(path === null || path === void 0 ? void 0 : path[focusedPath.length - 1]) || 0;
@@ -124,7 +123,6 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
124
123
  break;
125
124
  }
126
125
  var currentItem = getItemByFocused(focusedPath, focusedToValueMap);
127
- console.log('currentItem', currentItem, focusedPath, focusedToValueMap);
128
126
  if (currentItem !== null && currentItem !== void 0 && currentItem.items) {
129
127
  if (path.length > focusedPath.length) {
130
128
  dispatchFocusedPath({
@@ -141,32 +139,6 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
141
139
  }
142
140
  break;
143
141
  }
144
- case keys.Backspace:
145
- {
146
- if (!multiselect) break;
147
- break;
148
- }
149
-
150
- // case keys.Space: {
151
- // event.preventDefault();
152
- //
153
- // const currentItem = getItemByFocused(focusedPath, focusedToValueMap);
154
- //
155
- // if (!path[0]) {
156
- // dispatchPath({ type: 'opened_first_level' });
157
- // dispatchFocusedPath({ type: 'set_initial_focus' });
158
- // break;
159
- // }
160
- //
161
- // if (!currentItem || currentItem?.disabled) {
162
- // break;
163
- // }
164
- //
165
- // handlePressDown(currentItem);
166
- //
167
- // break;
168
- // }
169
-
170
142
  case keys.Enter:
171
143
  {
172
144
  event.preventDefault();
@@ -183,34 +155,12 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
183
155
  });
184
156
  break;
185
157
  }
186
-
187
- // if (currentItem?.items) {
188
- // if (path.length > focusedPath.length) {
189
- // dispatchFocusedPath({ type: 'add_focus', value: 0 });
190
- // } else {
191
- // dispatchPath({ type: 'added_next_level', value: currentItem.value.toString() });
192
- // }
193
- //
194
- // break;
195
- // }
196
-
197
158
  if (_currentItem) {
198
159
  handlePressDown(_currentItem);
199
160
  }
200
161
  break;
201
162
  }
202
163
  case keys.Tab:
203
- {
204
- dispatchPath({
205
- type: 'reset'
206
- });
207
- dispatchFocusedPath({
208
- type: 'reset'
209
- });
210
- handleListToggle(false);
211
- setTextValue('');
212
- break;
213
- }
214
164
  case keys.Escape:
215
165
  {
216
166
  dispatchPath({
@@ -220,6 +170,7 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
220
170
  type: 'reset'
221
171
  });
222
172
  handleListToggle(false);
173
+ setTextValue('');
223
174
  break;
224
175
  }
225
176
  case keys.Home:
@@ -9,7 +9,7 @@ export var SelectPerPageRoot = /*#__PURE__*/styled.div.withConfig({
9
9
  })(["display:flex;align-items:center;gap:0.5rem;"]);
10
10
  export var SelectPerPageSelect = /*#__PURE__*/styled(Select).withConfig({
11
11
  componentId: "plasma-new-hope__sc-1g304l9-1"
12
- })(["", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":0.125rem;", ":0.125rem;", ":var(", ");", ":calc(var(", ") - 0.125rem);", ":0 0.375rem 0 0;", ":1.5rem;", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");"], selectTokens.targetButtonColor, tokens.buttonColor, selectTokens.targetButtonColorHover, tokens.buttonColorHover, selectTokens.targetButtonColorActive, tokens.buttonColorActive, selectTokens.targetButtonBackgroundColor, tokens.buttonBackgroundColor, selectTokens.targetButtonBackgroundColorHover, tokens.buttonBackgroundColorHover, selectTokens.targetButtonBackgroundColorActive, tokens.buttonBackgroundColorActive, selectTokens.targetHeight, tokens.buttonHeight, selectTokens.targetButtonPadding, tokens.selectTargetPadding, selectTokens.borderRadius, tokens.buttonRadius, selectTokens.targetButtonArrowColor, tokens.buttonArrowColor, selectTokens.targetButtonArrowColorHover, tokens.buttonArrowColorHover, selectTokens.targetButtonArrowColorActive, tokens.buttonArrowColorActive, selectTokens.targetButtonArrowMargin, tokens.buttonArrowMargin, selectTokens.padding, selectTokens.focusOffset, selectTokens.itemPadding, tokens.selectItemPadding, selectTokens.itemBorderRadius, tokens.buttonRadius, selectTokens.itemIconMargin, selectTokens.itemIconSize, selectTokens.itemHeight, tokens.selectItemHeight, selectTokens.fontFamily, tokens.paginationFontFamily, selectTokens.fontSize, tokens.paginationFontSize, selectTokens.fontStyle, tokens.paginationFontStyle, selectTokens.fontWeight, tokens.paginationFontWeight, selectTokens.fontLetterSpacing, tokens.paginationLetterSpacing, selectTokens.fontLineHeight, tokens.paginationLineHeight);
12
+ })(["", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":0.125rem;", ":var(", ");", ":calc(var(", ") - 0.125rem);", ":0 0.375rem 0 0;", ":1.5rem;", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");"], selectTokens.buttonColor, tokens.buttonColor, selectTokens.buttonColorHover, tokens.buttonColorHover, selectTokens.buttonColorActive, tokens.buttonColorActive, selectTokens.buttonBackgroundColor, tokens.buttonBackgroundColor, selectTokens.buttonBackgroundColorHover, tokens.buttonBackgroundColorHover, selectTokens.buttonBackgroundColorActive, tokens.buttonBackgroundColorActive, selectTokens.targetHeight, tokens.buttonHeight, selectTokens.buttonPadding, tokens.selectTargetPadding, selectTokens.borderRadius, tokens.buttonRadius, selectTokens.buttonArrowColor, tokens.buttonArrowColor, selectTokens.buttonArrowColorHover, tokens.buttonArrowColorHover, selectTokens.buttonArrowColorActive, tokens.buttonArrowColorActive, selectTokens.buttonArrowMargin, tokens.buttonArrowMargin, selectTokens.padding, selectTokens.itemPadding, tokens.selectItemPadding, selectTokens.itemBorderRadius, tokens.buttonRadius, selectTokens.itemIconMargin, selectTokens.itemIconSize, selectTokens.itemHeight, tokens.selectItemHeight, selectTokens.fontFamily, tokens.paginationFontFamily, selectTokens.fontSize, tokens.paginationFontSize, selectTokens.fontStyle, tokens.paginationFontStyle, selectTokens.fontWeight, tokens.paginationFontWeight, selectTokens.fontLetterSpacing, tokens.paginationLetterSpacing, selectTokens.fontLineHeight, tokens.paginationLineHeight);
13
13
  export var SelectPerPageTypography = /*#__PURE__*/styled.div.withConfig({
14
14
  componentId: "plasma-new-hope__sc-1g304l9-2"
15
15
  })(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");"], tokens.paginationFontFamily, tokens.paginationFontSize, tokens.paginationFontStyle, tokens.paginationFontWeight, tokens.paginationLetterSpacing, tokens.paginationLineHeight);
@@ -0,0 +1,84 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import { flip, shift, size, useFloating, FloatingPortal, offset as offsetMiddleware } from '@floating-ui/react';
8
+ import React, { forwardRef } from 'react';
9
+ import { safeUseId } from '@salutejs/plasma-core';
10
+ import { getPlacement, getFallbackPlacements } from './utils';
11
+ var FloatingPopover = /*#__PURE__*/forwardRef(function (_ref, ref) {
12
+ var target = _ref.target,
13
+ children = _ref.children,
14
+ opened = _ref.opened,
15
+ onToggle = _ref.onToggle,
16
+ placement = _ref.placement,
17
+ portal = _ref.portal,
18
+ listWidth = _ref.listWidth,
19
+ _ref$offset = _ref.offset,
20
+ offset = _ref$offset === void 0 ? 0 : _ref$offset;
21
+ var _useFloating = useFloating({
22
+ placement: getPlacement(placement),
23
+ open: opened,
24
+ middleware: [offsetMiddleware(offset), flip({
25
+ fallbackPlacements: getFallbackPlacements(placement)
26
+ }), shift(), size({
27
+ apply: function apply(_ref2) {
28
+ var rects = _ref2.rects,
29
+ elements = _ref2.elements;
30
+ Object.assign(elements.floating.style, {
31
+ width: listWidth || "".concat(rects.reference.width, "px")
32
+ });
33
+ }
34
+ })]
35
+ }),
36
+ refs = _useFloating.refs,
37
+ floatingStyles = _useFloating.floatingStyles;
38
+ var wrappedId = safeUseId();
39
+ var handleClick = function handleClick() {
40
+ if (onToggle) {
41
+ onToggle(!opened);
42
+ }
43
+ };
44
+
45
+ // Проверка на target. Это может быть как ReactNode, так и функция, в которую пробрасывается ref.
46
+ // Это нужно для более тонкой настройки reference-элемента, вокруг которого и будет позиционироваться выпадашка.
47
+ // Пример: когда в Textfield под инпутом находится helperText (или еще что-либо),
48
+ // но выпадающий список должен позиционироваться непосредственно возле самого инпута.
49
+ var isTargetAsFunction = typeof target === 'function';
50
+ return /*#__PURE__*/React.createElement("div", {
51
+ ref: ref,
52
+ id: wrappedId
53
+ }, /*#__PURE__*/React.createElement("div", {
54
+ ref: isTargetAsFunction ? undefined : refs.setReference,
55
+ onClick: handleClick
56
+ }, typeof target === 'function' ? target(refs.setReference) : target), opened &&
57
+ /*#__PURE__*/
58
+ // root - принимает ref контейнера портала.
59
+ // id - если есть портал - не используется, если портала нет - подставляется 'wrappedId'.
60
+ React.createElement(FloatingPortal, getFloatingPortalProps(portal, wrappedId), /*#__PURE__*/React.createElement("div", {
61
+ ref: refs.setFloating,
62
+ style: _objectSpread(_objectSpread({}, floatingStyles), {}, {
63
+ zIndex: 1
64
+ })
65
+ }, children)));
66
+ });
67
+ // root - принимает ref контейнера портала.
68
+ // id - если есть портал - не используется, если портала нет - подставляется 'wrappedId'.
69
+ var getFloatingPortalProps = function getFloatingPortalProps(portal, wrappedId) {
70
+ if (!portal) {
71
+ return {
72
+ id: wrappedId
73
+ };
74
+ }
75
+ if (typeof portal === 'string') {
76
+ return {
77
+ id: portal
78
+ };
79
+ }
80
+ return {
81
+ root: portal
82
+ };
83
+ };
84
+ export { FloatingPopover };
@@ -1,4 +1,4 @@
1
- var _excluded = ["value", "onChange", "target", "items", "placement", "label", "labelPlacement", "placeholder", "helperText", "disabled", "view", "size", "listOverflow", "listHeight", "listWidth", "contentLeft", "onScrollBottom", "chipView", "variant", "portal", "renderValue", "renderItem", "status", "onItemSelect", "separator", "closeAfterSelect"];
1
+ var _excluded = ["value", "onChange", "target", "items", "placement", "label", "labelPlacement", "placeholder", "helperText", "disabled", "view", "size", "listOverflow", "listHeight", "listWidth", "contentLeft", "onScrollBottom", "chipView", "variant", "portal", "renderValue", "renderItem", "status", "onItemSelect", "separator", "closeAfterSelect", "isTargetAmount"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -8,17 +8,17 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
8
8
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
- import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect } from 'react';
12
- import { isEmpty, getPlacements } from '../../utils';
11
+ import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef } from 'react';
12
+ import { safeUseId } from '@salutejs/plasma-core';
13
+ import { isEmpty } from '../../utils';
13
14
  import { useOutsideClick } from '../../hooks';
14
- import { useKeyNavigation } from './hooks/useKeyboardNavigation';
15
+ import { useKeyNavigation, getItemByFocused } from './hooks/useKeyboardNavigation';
15
16
  import { initialItemsTransform, updateAncestors, updateDescendants, updateSingleAncestors, getView, getInitialValue } from './utils';
16
17
  import { Inner, Target } from './ui';
17
- import { pathReducer, focusedPathReducer, focusedChipIndexReducer } from './reducers';
18
+ import { pathReducer, focusedPathReducer } from './reducers';
18
19
  import { usePathMaps } from './hooks/usePathMaps';
19
- import { StyledPopover, Ul, base, OuterLabel, HelperText } from './Select.styles';
20
- import { base as viewCSS } from './variations/_view/base';
21
- import { base as sizeCSS } from './variations/_size/base';
20
+ import { Ul, base } from './Select.styles';
21
+ import { FloatingPopover } from './FloatingPopover';
22
22
  export var Context = /*#__PURE__*/createContext({});
23
23
 
24
24
  /**
@@ -26,21 +26,21 @@ export var Context = /*#__PURE__*/createContext({});
26
26
  */
27
27
  export var selectRoot = function selectRoot(Root) {
28
28
  return /*#__PURE__*/forwardRef(function (props, ref) {
29
+ var _getItemByFocused;
29
30
  var outerValue = props.value,
30
31
  outerOnChange = props.onChange,
31
32
  _props$target = props.target,
32
- target = _props$target === void 0 ? 'textfield-like' : _props$target,
33
+ _target = _props$target === void 0 ? 'textfield-like' : _props$target,
33
34
  items = props.items,
34
35
  _props$placement = props.placement,
35
36
  placement = _props$placement === void 0 ? 'bottom' : _props$placement,
36
37
  label = props.label,
37
- _props$labelPlacement = props.labelPlacement,
38
- labelPlacement = _props$labelPlacement === void 0 ? 'outer' : _props$labelPlacement,
38
+ labelPlacement = props.labelPlacement,
39
39
  placeholder = props.placeholder,
40
40
  helperText = props.helperText,
41
41
  _props$disabled = props.disabled,
42
42
  disabled = _props$disabled === void 0 ? false : _props$disabled,
43
- view = props.view,
43
+ outerView = props.view,
44
44
  size = props.size,
45
45
  listOverflow = props.listOverflow,
46
46
  listHeight = props.listHeight,
@@ -57,22 +57,28 @@ export var selectRoot = function selectRoot(Root) {
57
57
  onItemSelect = props.onItemSelect,
58
58
  separator = props.separator,
59
59
  outerCloseAfterSelect = props.closeAfterSelect,
60
+ isTargetAmount = props.isTargetAmount,
60
61
  rest = _objectWithoutProperties(props, _excluded);
61
62
  var transformedItems = useMemo(function () {
62
63
  return initialItemsTransform(items || []);
63
64
  }, [items]);
65
+
66
+ // Создаем структуры для быстрой работы с деревом
64
67
  var _usePathMaps = usePathMaps(transformedItems),
65
- _usePathMaps2 = _slicedToArray(_usePathMaps, 4),
68
+ _usePathMaps2 = _slicedToArray(_usePathMaps, 5),
66
69
  pathMap = _usePathMaps2[0],
67
70
  focusedToValueMap = _usePathMaps2[1],
68
71
  valueToCheckedMap = _usePathMaps2[2],
69
- valueToItemMap = _usePathMaps2[3];
70
- var value = getInitialValue(outerValue, valueToItemMap);
71
- var onChange = function onChange(e) {
72
- if (outerOnChange) {
73
- outerOnChange(e);
74
- }
75
- };
72
+ valueToItemMap = _usePathMaps2[3],
73
+ labelToItemMap = _usePathMaps2[4];
74
+ var _useState = useState(props.multiselect ? [] : ''),
75
+ _useState2 = _slicedToArray(_useState, 2),
76
+ internalValue = _useState2[0],
77
+ setInternalValue = _useState2[1];
78
+ var value = outerValue !== null && outerValue !== undefined ? getInitialValue(outerValue, valueToItemMap) : internalValue;
79
+ var floatingPopoverRef = useRef(null);
80
+
81
+ // Состояния дерева элементов
76
82
  var _useReducer = useReducer(pathReducer, []),
77
83
  _useReducer2 = _slicedToArray(_useReducer, 2),
78
84
  path = _useReducer2[0],
@@ -81,23 +87,53 @@ export var selectRoot = function selectRoot(Root) {
81
87
  _useReducer4 = _slicedToArray(_useReducer3, 2),
82
88
  focusedPath = _useReducer4[0],
83
89
  dispatchFocusedPath = _useReducer4[1];
84
- var _useReducer5 = useReducer(focusedChipIndexReducer, null),
85
- _useReducer6 = _slicedToArray(_useReducer5, 2),
86
- focusedChipIndex = _useReducer6[0],
87
- dispatchFocusedChipIndex = _useReducer6[1];
88
- var _useState = useState(valueToCheckedMap),
89
- _useState2 = _slicedToArray(_useState, 2),
90
- checked = _useState2[0],
91
- setChecked = _useState2[1];
90
+ var _useState3 = useState(valueToCheckedMap),
91
+ _useState4 = _slicedToArray(_useState3, 2),
92
+ checked = _useState4[0],
93
+ setChecked = _useState4[1];
94
+ var isCurrentListOpen = Boolean(path[0]);
95
+ var activeDescendantItemValue = ((_getItemByFocused = getItemByFocused(focusedPath, focusedToValueMap)) === null || _getItemByFocused === void 0 ? void 0 : _getItemByFocused.value.toString()) || '';
92
96
  var closeAfterSelect = outerCloseAfterSelect !== null && outerCloseAfterSelect !== void 0 ? outerCloseAfterSelect : !props.multiselect;
97
+ var treeId = safeUseId();
98
+ var view = _target === 'textfield-like' && disabled ? 'default' : getView(status, outerView);
93
99
  var targetRef = useOutsideClick(function () {
94
- if (focusedChipIndex != null) {
95
- dispatchFocusedChipIndex({
100
+ if (!isCurrentListOpen) {
101
+ return;
102
+ }
103
+ dispatchPath({
104
+ type: 'reset'
105
+ });
106
+ dispatchFocusedPath({
107
+ type: 'reset'
108
+ });
109
+ }, floatingPopoverRef);
110
+ var onChange = function onChange(newValue) {
111
+ if (outerOnChange) {
112
+ outerOnChange(newValue);
113
+ }
114
+ setInternalValue(newValue);
115
+ };
116
+ var handleClickArrow = function handleClickArrow() {
117
+ if (disabled) {
118
+ return;
119
+ }
120
+ if (isCurrentListOpen) {
121
+ dispatchPath({
96
122
  type: 'reset'
97
123
  });
124
+ } else {
125
+ dispatchPath({
126
+ type: 'opened_first_level'
127
+ });
128
+ }
129
+ dispatchFocusedPath({
130
+ type: 'reset'
131
+ });
132
+ };
133
+ var handleListToggle = function handleListToggle(opened) {
134
+ if (disabled) {
135
+ return;
98
136
  }
99
- });
100
- var handleToggle = function handleToggle(opened) {
101
137
  if (opened) {
102
138
  dispatchPath({
103
139
  type: 'opened_first_level'
@@ -109,39 +145,37 @@ export var selectRoot = function selectRoot(Root) {
109
145
  dispatchPath({
110
146
  type: 'reset'
111
147
  });
112
- dispatchFocusedChipIndex({
113
- type: 'reset'
114
- });
115
148
  }
116
149
  };
117
150
  var handleCheckboxChange = function handleCheckboxChange(item) {
118
- if (props.multiselect) {
119
- var checkedCopy = new Map(checked);
120
- if (!checkedCopy.get(item.value)) {
121
- checkedCopy.set(item.value, true);
122
- updateDescendants(item, checkedCopy, true);
123
- } else {
124
- checkedCopy.set(item.value, false);
125
- updateDescendants(item, checkedCopy, false);
151
+ if (!props.multiselect) {
152
+ return;
153
+ }
154
+ var checkedCopy = new Map(checked);
155
+ if (!checkedCopy.get(item.value)) {
156
+ checkedCopy.set(item.value, true);
157
+ updateDescendants(item, checkedCopy, true);
158
+ } else {
159
+ checkedCopy.set(item.value, false);
160
+ updateDescendants(item, checkedCopy, false);
161
+ }
162
+ updateAncestors(item, checkedCopy);
163
+ var newValues = [];
164
+ valueToItemMap.forEach(function (item, key) {
165
+ if (checkedCopy.get(key)) {
166
+ newValues.push(item.value);
126
167
  }
127
- updateAncestors(item, checkedCopy);
128
- var newValues = [];
129
- valueToItemMap.forEach(function (item, key) {
130
- if (checkedCopy.get(key)) {
131
- newValues.push(item.value);
132
- }
168
+ });
169
+ if (closeAfterSelect) {
170
+ dispatchPath({
171
+ type: 'reset'
133
172
  });
134
- if (closeAfterSelect) {
135
- dispatchPath({
136
- type: 'reset'
137
- });
138
- dispatchFocusedPath({
139
- type: 'reset'
140
- });
141
- }
142
- if (onChange) {
143
- onChange(newValues);
144
- }
173
+ dispatchFocusedPath({
174
+ type: 'reset'
175
+ });
176
+ }
177
+ if (onChange) {
178
+ onChange(newValues);
145
179
  }
146
180
  };
147
181
  var handleItemClick = function handleItemClick(item, e) {
@@ -150,29 +184,26 @@ export var selectRoot = function selectRoot(Root) {
150
184
  }
151
185
  if (props.multiselect) {
152
186
  handleCheckboxChange(item);
153
- } else {
154
- if (e) {
155
- e.stopPropagation();
156
- }
157
- var isCurrentChecked = checked.get(item.value);
158
- if (closeAfterSelect) {
159
- dispatchPath({
160
- type: 'reset'
161
- });
162
- dispatchFocusedPath({
163
- type: 'reset'
164
- });
165
- }
166
- if (onChange) {
167
- onChange(isCurrentChecked ? '' : item.value);
168
- }
169
- if (onItemSelect) {
170
- onItemSelect(item, e);
171
- }
187
+ return;
188
+ }
189
+ if (e) {
190
+ e.stopPropagation();
191
+ }
192
+ var isCurrentChecked = checked.get(item.value);
193
+ if (closeAfterSelect) {
194
+ dispatchPath({
195
+ type: 'reset'
196
+ });
197
+ dispatchFocusedPath({
198
+ type: 'reset'
199
+ });
200
+ }
201
+ if (onChange) {
202
+ onChange(isCurrentChecked ? '' : item.value);
203
+ }
204
+ if (onItemSelect) {
205
+ onItemSelect(item, e);
172
206
  }
173
- };
174
- var handleChipClick = function handleChipClick(currentValue) {
175
- handleCheckboxChange(valueToItemMap.get(currentValue));
176
207
  };
177
208
  var handlePressDown = function handlePressDown(item, e) {
178
209
  if (isEmpty(item.items)) {
@@ -189,25 +220,19 @@ export var selectRoot = function selectRoot(Root) {
189
220
  }
190
221
  };
191
222
  var _useKeyNavigation = useKeyNavigation({
192
- value: value,
193
223
  focusedPath: focusedPath,
194
224
  dispatchFocusedPath: dispatchFocusedPath,
195
225
  path: path,
196
226
  dispatchPath: dispatchPath,
197
227
  pathMap: pathMap,
198
228
  focusedToValueMap: focusedToValueMap,
199
- handleToggle: handleToggle,
200
- handlePressDown: handlePressDown,
201
- focusedChipIndex: focusedChipIndex,
202
- dispatchFocusedChipIndex: dispatchFocusedChipIndex,
203
- valueToItemMap: valueToItemMap,
204
- multiselect: props.multiselect,
205
- isTargetAmount: props.isTargetAmount
229
+ handleListToggle: handleListToggle,
230
+ handlePressDown: handlePressDown
206
231
  }),
207
232
  onKeyDown = _useKeyNavigation.onKeyDown;
208
- var isCurrentListOpen = Boolean(path[0]);
209
233
 
210
- // В данном эффекте мы следим за изменениями value и вносим коррективы в дерево чекбоксов.
234
+ // В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.
235
+ // Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.
211
236
  useLayoutEffect(function () {
212
237
  var checkedCopy = new Map(checked);
213
238
  checkedCopy.forEach(function (_, key) {
@@ -226,13 +251,18 @@ export var selectRoot = function selectRoot(Root) {
226
251
  }
227
252
  }
228
253
  setChecked(checkedCopy);
229
- }, [outerValue, items]);
254
+
255
+ // В deps мы кладем именно outerValue и internalValue, а не просто value.
256
+ // Т.к. вначале нужно отфильтровать и провалидировать outerValue и результат положить в переменную.
257
+ // А переменную, содержащую сложные типы данных, нельзя помещать в deps.
258
+ }, [outerValue, internalValue, items]);
230
259
  return /*#__PURE__*/React.createElement(Root, _extends({
231
- ref: ref,
260
+ view: view,
232
261
  size: size,
233
- view: status ? getView(status) : view,
234
- chipView: chipView
235
- }, rest), label && labelPlacement === 'outer' && target !== 'button-like' && /*#__PURE__*/React.createElement(OuterLabel, null, label), /*#__PURE__*/React.createElement(Context.Provider, {
262
+ labelPlacement: labelPlacement,
263
+ chipView: chipView,
264
+ disabled: disabled
265
+ }, rest), /*#__PURE__*/React.createElement(Context.Provider, {
236
266
  value: {
237
267
  focusedPath: focusedPath,
238
268
  checked: checked,
@@ -242,46 +272,63 @@ export var selectRoot = function selectRoot(Root) {
242
272
  handleItemClick: handleItemClick,
243
273
  variant: variant,
244
274
  renderItem: renderItem,
245
- valueToItemMap: valueToItemMap
275
+ valueToItemMap: valueToItemMap,
276
+ treeId: treeId
246
277
  }
247
- }, /*#__PURE__*/React.createElement(StyledPopover, {
248
- ref: targetRef,
278
+ }, /*#__PURE__*/React.createElement(FloatingPopover, {
279
+ ref: floatingPopoverRef,
249
280
  opened: isCurrentListOpen,
250
- placement: getPlacements(placement),
251
- usePortal: Boolean(portal),
252
- frame: portal,
253
- onToggle: handleToggle,
254
- trigger: "click",
255
- target: /*#__PURE__*/React.createElement(Target, {
256
- opened: isCurrentListOpen,
257
- value: value,
258
- valueToItemMap: valueToItemMap,
259
- focusedPath: focusedPath,
260
- focusedToValueMap: focusedToValueMap,
261
- onChipClick: handleChipClick,
262
- label: label,
263
- placeholder: placeholder,
264
- onKeyDown: onKeyDown,
265
- focusedChipIndex: focusedChipIndex,
266
- labelPlacement: labelPlacement,
267
- selectProps: props,
268
- size: size,
269
- contentLeft: contentLeft,
270
- disabled: disabled,
271
- renderValue: renderValue
272
- }),
273
- preventOverflow: false,
274
- closeOnOverlayClick: true,
275
- listWidth: listWidth
276
- }, items && /*#__PURE__*/React.createElement(Root, _extends({
277
- size: size
281
+ onToggle: function onToggle(opened) {
282
+ return opened && handleListToggle(true);
283
+ },
284
+ placement: placement,
285
+ portal: portal,
286
+ listWidth: listWidth,
287
+ target: function target(referenceRef) {
288
+ return /*#__PURE__*/React.createElement(Target, {
289
+ ref: ref,
290
+ target: _target,
291
+ value: value,
292
+ opened: isCurrentListOpen,
293
+ valueToItemMap: valueToItemMap,
294
+ label: label,
295
+ placeholder: placeholder,
296
+ onKeyDown: onKeyDown,
297
+ labelPlacement: labelPlacement,
298
+ size: size,
299
+ contentLeft: contentLeft,
300
+ disabled: disabled,
301
+ renderValue: renderValue,
302
+ selectProps: props,
303
+ inputWrapperRef: referenceRef,
304
+ multiselect: props.multiselect,
305
+ view: view,
306
+ handleClickArrow: handleClickArrow,
307
+ helperText: helperText,
308
+ treeId: treeId,
309
+ activeDescendantItemValue: activeDescendantItemValue,
310
+ isTargetAmount: isTargetAmount,
311
+ onChange: onChange,
312
+ labelToItemMap: labelToItemMap,
313
+ chipView: chipView,
314
+ separator: separator
315
+ });
316
+ }
317
+ }, /*#__PURE__*/React.createElement(Root, _extends({
318
+ view: view,
319
+ size: size,
320
+ labelPlacement: labelPlacement,
321
+ chipView: chipView,
322
+ disabled: disabled
278
323
  }, rest), /*#__PURE__*/React.createElement(Ul, {
279
324
  role: "tree",
280
- id: "tree_level_1",
325
+ id: "".concat(treeId, "_tree_level_1"),
326
+ "aria-multiselectable": Boolean(props.multiselect),
281
327
  listHeight: listHeight,
282
328
  listOverflow: listOverflow,
283
329
  onScroll: handleScroll,
284
- listWidth: listWidth
330
+ listWidth: listWidth,
331
+ ref: targetRef
285
332
  }, transformedItems.map(function (item, index) {
286
333
  return /*#__PURE__*/React.createElement(Inner, {
287
334
  key: "".concat(index, "/0"),
@@ -292,7 +339,7 @@ export var selectRoot = function selectRoot(Root) {
292
339
  index: index,
293
340
  listWidth: listWidth
294
341
  });
295
- }))))), helperText && target === 'textfield-like' && /*#__PURE__*/React.createElement(HelperText, null, helperText));
342
+ }))))));
296
343
  });
297
344
  };
298
345
  export var selectConfig = {
@@ -300,17 +347,11 @@ export var selectConfig = {
300
347
  tag: 'div',
301
348
  layout: selectRoot,
302
349
  base: base,
303
- variations: {
304
- view: {
305
- css: viewCSS
306
- },
307
- size: {
308
- css: sizeCSS
309
- }
310
- },
350
+ variations: {},
311
351
  defaults: {
312
352
  view: 'default',
313
- chipView: 'default',
314
- size: 'm'
353
+ size: 'm',
354
+ labelPlacement: 'outer',
355
+ chipView: 'default'
315
356
  }
316
357
  };