@salutejs/plasma-new-hope 0.192.0-canary.1550.11799501370.0 → 0.192.0-dev.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (731) hide show
  1. package/cjs/components/Autocomplete/Autocomplete.css +22 -21
  2. package/cjs/components/Breadcrumbs/Breadcrumbs.css +3 -3
  3. package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +7 -14
  4. package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  5. package/cjs/components/Breadcrumbs/{Breadcrumbs.styles_19b6ey4.css → Breadcrumbs.styles_1icsgdr.css} +1 -1
  6. package/cjs/components/Breadcrumbs/utils/index.css +3 -3
  7. package/cjs/components/Cell/Cell.js +1 -3
  8. package/cjs/components/Cell/Cell.js.map +1 -1
  9. package/cjs/components/Cell/ui/CellTextbox/CellTextbox.js +1 -7
  10. package/cjs/components/Cell/ui/CellTextbox/CellTextbox.js.map +1 -1
  11. package/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +1 -4
  12. package/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js.map +1 -1
  13. package/cjs/components/Chip/Chip.js +1 -3
  14. package/cjs/components/Chip/Chip.js.map +1 -1
  15. package/cjs/components/Combobox/ComboboxNew/Combobox.css +22 -21
  16. package/cjs/components/Combobox/ComboboxNew/Combobox.js +1 -0
  17. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  18. package/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +1 -0
  19. package/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js.map +1 -1
  20. package/cjs/components/Combobox/ComboboxNew/FloatingPopover.js +4 -18
  21. package/cjs/components/Combobox/ComboboxNew/FloatingPopover.js.map +1 -1
  22. package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  23. package/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +50 -1
  24. package/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js.map +1 -1
  25. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +22 -21
  26. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +22 -21
  27. package/cjs/components/DatePicker/RangeDate/RangeDate.css +22 -21
  28. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +22 -21
  29. package/cjs/components/DatePicker/SingleDate/SingleDate.css +22 -21
  30. package/cjs/components/Dropdown/FloatingPopover.js.map +1 -1
  31. package/cjs/components/Pagination/Pagination.css +37 -86
  32. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +37 -86
  33. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
  34. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  35. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles_1fesyfv.css +3 -0
  36. package/cjs/components/Range/Range.css +22 -21
  37. package/cjs/components/Select/Select.css +34 -83
  38. package/cjs/components/Select/Select.js +139 -179
  39. package/cjs/components/Select/Select.js.map +1 -1
  40. package/cjs/components/Select/Select.styles.js +50 -17
  41. package/cjs/components/Select/Select.styles.js.map +1 -1
  42. package/cjs/components/Select/Select.styles_768h42.css +5 -0
  43. package/cjs/components/Select/Select.tokens.js +78 -122
  44. package/cjs/components/Select/Select.tokens.js.map +1 -1
  45. package/cjs/components/Select/hooks/useKeyboardNavigation.js +72 -19
  46. package/cjs/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
  47. package/cjs/components/Select/hooks/usePathMaps.js +1 -4
  48. package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
  49. package/cjs/components/Select/reducers/focusedChipIndexReducer.js +39 -0
  50. package/cjs/components/Select/reducers/focusedChipIndexReducer.js.map +1 -0
  51. package/cjs/components/Select/ui/Inner/Inner.css +34 -83
  52. package/cjs/components/Select/ui/Inner/Inner.js +9 -9
  53. package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
  54. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +34 -83
  55. package/cjs/components/Select/ui/Inner/ui/Item/Item.js +12 -20
  56. package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  57. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +51 -34
  58. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  59. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles_8oe5oy.css +9 -0
  60. package/cjs/components/Select/ui/Target/Target.css +17 -58
  61. package/cjs/components/Select/ui/Target/Target.js +16 -34
  62. package/cjs/components/Select/ui/Target/Target.js.map +1 -1
  63. package/cjs/components/Select/ui/Target/ui/Button/Button.css +5 -5
  64. package/cjs/components/Select/ui/Target/ui/Button/Button.js +14 -10
  65. package/cjs/components/Select/ui/Target/ui/Button/Button.js.map +1 -1
  66. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +1 -1
  67. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  68. package/cjs/components/Select/ui/Target/ui/Button/Button.styles_lxxm4p.css +5 -0
  69. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +38 -53
  70. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +97 -84
  71. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  72. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +103 -38
  73. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  74. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_1damf5p.css +12 -0
  75. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.css +21 -0
  76. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +36 -0
  77. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js.map +1 -0
  78. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +22 -0
  79. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -0
  80. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles_1a752pa.css +1 -0
  81. package/cjs/components/Select/utils/getView.js +2 -2
  82. package/cjs/components/Select/utils/getView.js.map +1 -1
  83. package/cjs/components/Select/variations/_size/base.js +9 -0
  84. package/cjs/components/Select/variations/_size/base.js.map +1 -0
  85. package/cjs/components/Select/variations/_size/base_x642ct.css +1 -0
  86. package/cjs/components/Select/variations/_view/base.js +9 -0
  87. package/cjs/components/Select/variations/_view/base.js.map +1 -0
  88. package/cjs/components/Select/variations/_view/base_x642ct.css +1 -0
  89. package/cjs/components/Slider/Slider.css +22 -21
  90. package/cjs/components/Slider/components/Double/Double.css +22 -21
  91. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +22 -21
  92. package/cjs/components/Switch/Switch.css +11 -7
  93. package/cjs/components/Switch/Switch.js +16 -7
  94. package/cjs/components/Switch/Switch.js.map +1 -1
  95. package/cjs/components/Switch/Switch.styles.js +16 -4
  96. package/cjs/components/Switch/Switch.styles.js.map +1 -1
  97. package/cjs/components/Switch/Switch.styles_bei7bh.css +6 -0
  98. package/cjs/components/Switch/Switch.tokens.js +11 -0
  99. package/cjs/components/Switch/Switch.tokens.js.map +1 -1
  100. package/cjs/components/Switch/_focused/base.js +1 -1
  101. package/cjs/components/Switch/_focused/{base_j4murk.css → base_sz3n0x.css} +1 -1
  102. package/cjs/components/Switch/_size/base.js +1 -1
  103. package/cjs/components/Switch/_size/base.js.map +1 -1
  104. package/cjs/components/Switch/_size/base_1tcl212.css +1 -0
  105. package/cjs/components/Switch/_toggleSize/base.js +9 -0
  106. package/cjs/components/Switch/_toggleSize/base.js.map +1 -0
  107. package/cjs/components/Switch/_toggleSize/base_6i0904.css +1 -0
  108. package/cjs/components/Switch/_view/base.js +1 -1
  109. package/cjs/components/Switch/_view/base.js.map +1 -1
  110. package/cjs/components/Switch/_view/base_yxkf3s.css +1 -0
  111. package/cjs/components/TextField/TextField.js +2 -11
  112. package/cjs/components/TextField/TextField.js.map +1 -1
  113. package/cjs/components/TextField/TextField.styles.js +22 -14
  114. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  115. package/cjs/components/TextField/{TextField.styles_j7dqpn.css → TextField.styles_grgg7q.css} +7 -6
  116. package/cjs/components/TextField/TextField.tokens.js +1 -2
  117. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  118. package/cjs/components/TextField/ui/Hint/Hint.css +21 -20
  119. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -7
  120. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
  121. package/cjs/components/TextField/variations/_clear/base.js +1 -1
  122. package/cjs/components/TextField/variations/_clear/{base_1396md2.css → base_1i91sjp.css} +1 -1
  123. package/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  124. package/cjs/components/TextField/variations/_label-placement/base_3domm.css +1 -0
  125. package/cjs/components/TextField/variations/_read-only/base.js +1 -1
  126. package/cjs/components/TextField/variations/_read-only/{base_1jvcf9a.css → base_17ypmu7.css} +1 -1
  127. package/cjs/components/TextField/variations/_size/base.js +1 -1
  128. package/cjs/components/TextField/variations/_size/{base_1tei47x.css → base_1xdmaqh.css} +1 -1
  129. package/cjs/components/TextField/variations/_view/base.js +1 -1
  130. package/cjs/components/TextField/variations/_view/{base_8ogww5.css → base_qhyte8.css} +1 -1
  131. package/cjs/index.css +75 -56
  132. package/cjs/index.js +0 -2
  133. package/cjs/index.js.map +1 -1
  134. package/cjs/utils/index.js.map +1 -1
  135. package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +8 -11
  136. package/emotion/cjs/components/Cell/Cell.js +1 -3
  137. package/emotion/cjs/components/Cell/ui/CellTextbox/CellTextbox.js +1 -7
  138. package/emotion/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +1 -4
  139. package/emotion/cjs/components/Chip/Chip.js +1 -3
  140. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +1 -0
  141. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +1 -0
  142. package/emotion/cjs/components/Combobox/ComboboxNew/FloatingPopover.js +5 -19
  143. package/emotion/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +50 -1
  144. package/emotion/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +3 -3
  145. package/emotion/cjs/components/Select/Select.js +136 -177
  146. package/emotion/cjs/components/Select/Select.styles.js +31 -13
  147. package/emotion/cjs/components/Select/Select.tokens.js +60 -125
  148. package/emotion/cjs/components/Select/hooks/useKeyboardNavigation.js +73 -19
  149. package/emotion/cjs/components/Select/hooks/usePathMaps.js +1 -4
  150. package/emotion/cjs/components/Select/reducers/focusedChipIndexReducer.js +38 -0
  151. package/emotion/cjs/components/Select/reducers/index.js +11 -0
  152. package/emotion/cjs/components/Select/ui/Inner/Inner.js +9 -9
  153. package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +12 -19
  154. package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +50 -27
  155. package/emotion/cjs/components/Select/ui/Target/Target.js +18 -38
  156. package/emotion/cjs/components/Select/ui/Target/ui/Button/Button.js +16 -13
  157. package/emotion/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +6 -6
  158. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +99 -88
  159. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +74 -27
  160. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +37 -0
  161. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +22 -0
  162. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/ui/index.js +16 -0
  163. package/emotion/cjs/components/Select/utils/getView.js +2 -2
  164. package/emotion/cjs/components/Select/utils/index.js +1 -22
  165. package/emotion/cjs/components/Select/variations/_size/base.js +8 -0
  166. package/emotion/cjs/components/Select/variations/_size/tokens.json +9 -0
  167. package/emotion/cjs/components/Select/variations/_view/base.js +8 -0
  168. package/emotion/cjs/components/Select/variations/_view/tokens.json +1 -0
  169. package/emotion/cjs/components/Switch/Switch.js +17 -8
  170. package/emotion/cjs/components/Switch/Switch.styles.js +21 -5
  171. package/emotion/cjs/components/Switch/Switch.template-doc.mdx +37 -1
  172. package/emotion/cjs/components/Switch/Switch.tokens.js +11 -0
  173. package/emotion/cjs/components/Switch/_size/base.js +1 -1
  174. package/emotion/cjs/components/Switch/_toggleSize/base.js +10 -0
  175. package/emotion/cjs/components/Switch/_view/base.js +1 -1
  176. package/emotion/cjs/components/TextField/TextField.js +3 -12
  177. package/emotion/cjs/components/TextField/TextField.styles.js +40 -36
  178. package/emotion/cjs/components/TextField/TextField.tokens.js +1 -2
  179. package/emotion/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -7
  180. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
  181. package/emotion/cjs/examples/plasma_b2c/components/Select/Select.config.js +20 -28
  182. package/emotion/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +40 -47
  183. package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.config.js +11 -4
  184. package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.stories.tsx +7 -1
  185. package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +15 -13
  186. package/emotion/cjs/examples/plasma_web/components/Select/Select.config.js +20 -28
  187. package/emotion/cjs/examples/plasma_web/components/Select/Select.stories.tsx +40 -47
  188. package/emotion/cjs/examples/plasma_web/components/Switch/Switch.config.js +11 -4
  189. package/emotion/cjs/examples/plasma_web/components/Switch/Switch.stories.tsx +14 -1
  190. package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +14 -12
  191. package/emotion/cjs/index.js +0 -11
  192. package/emotion/cjs/utils/index.js +1 -9
  193. package/emotion/es/components/Breadcrumbs/Breadcrumbs.styles.js +8 -11
  194. package/emotion/es/components/Cell/Cell.js +1 -3
  195. package/emotion/es/components/Cell/ui/CellTextbox/CellTextbox.js +1 -7
  196. package/emotion/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +1 -4
  197. package/emotion/es/components/Chip/Chip.js +1 -3
  198. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +1 -0
  199. package/emotion/es/components/Combobox/ComboboxNew/Combobox.tokens.js +1 -0
  200. package/emotion/es/components/Combobox/ComboboxNew/FloatingPopover.js +4 -18
  201. package/emotion/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +50 -1
  202. package/emotion/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +3 -3
  203. package/emotion/es/components/Select/Select.js +141 -182
  204. package/emotion/es/components/Select/Select.styles.js +30 -12
  205. package/emotion/es/components/Select/Select.tokens.js +60 -125
  206. package/emotion/es/components/Select/hooks/useKeyboardNavigation.js +72 -18
  207. package/emotion/es/components/Select/hooks/usePathMaps.js +1 -4
  208. package/emotion/es/components/Select/reducers/focusedChipIndexReducer.js +32 -0
  209. package/emotion/es/components/Select/reducers/index.js +2 -1
  210. package/emotion/es/components/Select/ui/Inner/Inner.js +10 -10
  211. package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +15 -22
  212. package/emotion/es/components/Select/ui/Inner/ui/Item/Item.styles.js +49 -26
  213. package/emotion/es/components/Select/ui/Target/Target.js +17 -35
  214. package/emotion/es/components/Select/ui/Target/ui/Button/Button.js +16 -11
  215. package/emotion/es/components/Select/ui/Target/ui/Button/Button.styles.js +6 -6
  216. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +99 -86
  217. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +74 -27
  218. package/emotion/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +28 -0
  219. package/emotion/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +15 -0
  220. package/emotion/es/components/Select/ui/Target/ui/Textfield/ui/index.js +1 -0
  221. package/emotion/es/components/Select/utils/getView.js +2 -2
  222. package/emotion/es/components/Select/utils/index.js +1 -4
  223. package/emotion/es/components/Select/variations/_size/base.js +2 -0
  224. package/emotion/es/components/Select/variations/_size/tokens.json +9 -0
  225. package/emotion/es/components/Select/variations/_view/base.js +2 -0
  226. package/emotion/es/components/Select/variations/_view/tokens.json +1 -0
  227. package/emotion/es/components/Switch/Switch.js +13 -4
  228. package/emotion/es/components/Switch/Switch.styles.js +20 -4
  229. package/emotion/es/components/Switch/Switch.template-doc.mdx +37 -1
  230. package/emotion/es/components/Switch/Switch.tokens.js +11 -0
  231. package/emotion/es/components/Switch/_size/base.js +2 -2
  232. package/emotion/es/components/Switch/_toggleSize/base.js +4 -0
  233. package/emotion/es/components/Switch/_view/base.js +2 -2
  234. package/emotion/es/components/TextField/TextField.js +3 -12
  235. package/emotion/es/components/TextField/TextField.styles.js +40 -36
  236. package/emotion/es/components/TextField/TextField.tokens.js +1 -2
  237. package/emotion/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -7
  238. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
  239. package/emotion/es/examples/plasma_b2c/components/Select/Select.config.js +21 -29
  240. package/emotion/es/examples/plasma_b2c/components/Select/Select.stories.tsx +40 -47
  241. package/emotion/es/examples/plasma_b2c/components/Switch/Switch.config.js +11 -4
  242. package/emotion/es/examples/plasma_b2c/components/Switch/Switch.stories.tsx +7 -1
  243. package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +15 -13
  244. package/emotion/es/examples/plasma_web/components/Select/Select.config.js +21 -29
  245. package/emotion/es/examples/plasma_web/components/Select/Select.stories.tsx +40 -47
  246. package/emotion/es/examples/plasma_web/components/Switch/Switch.config.js +11 -4
  247. package/emotion/es/examples/plasma_web/components/Switch/Switch.stories.tsx +14 -1
  248. package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +14 -12
  249. package/emotion/es/index.js +0 -1
  250. package/emotion/es/utils/index.js +1 -2
  251. package/es/components/Autocomplete/Autocomplete.css +22 -21
  252. package/es/components/Breadcrumbs/Breadcrumbs.css +3 -3
  253. package/es/components/Breadcrumbs/Breadcrumbs.styles.js +7 -14
  254. package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  255. package/es/components/Breadcrumbs/{Breadcrumbs.styles_19b6ey4.css → Breadcrumbs.styles_1icsgdr.css} +1 -1
  256. package/es/components/Breadcrumbs/utils/index.css +3 -3
  257. package/es/components/Cell/Cell.js +1 -3
  258. package/es/components/Cell/Cell.js.map +1 -1
  259. package/es/components/Cell/ui/CellTextbox/CellTextbox.js +1 -7
  260. package/es/components/Cell/ui/CellTextbox/CellTextbox.js.map +1 -1
  261. package/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +1 -4
  262. package/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js.map +1 -1
  263. package/es/components/Chip/Chip.js +1 -3
  264. package/es/components/Chip/Chip.js.map +1 -1
  265. package/es/components/Combobox/ComboboxNew/Combobox.css +22 -21
  266. package/es/components/Combobox/ComboboxNew/Combobox.js +1 -0
  267. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  268. package/es/components/Combobox/ComboboxNew/Combobox.tokens.js +1 -0
  269. package/es/components/Combobox/ComboboxNew/Combobox.tokens.js.map +1 -1
  270. package/es/components/Combobox/ComboboxNew/FloatingPopover.js +4 -18
  271. package/es/components/Combobox/ComboboxNew/FloatingPopover.js.map +1 -1
  272. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  273. package/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +50 -1
  274. package/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js.map +1 -1
  275. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +22 -21
  276. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +22 -21
  277. package/es/components/DatePicker/RangeDate/RangeDate.css +22 -21
  278. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +22 -21
  279. package/es/components/DatePicker/SingleDate/SingleDate.css +22 -21
  280. package/es/components/Dropdown/FloatingPopover.js.map +1 -1
  281. package/es/components/Pagination/Pagination.css +37 -86
  282. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +37 -86
  283. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
  284. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  285. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles_1fesyfv.css +3 -0
  286. package/es/components/Range/Range.css +22 -21
  287. package/es/components/Select/Select.css +34 -83
  288. package/es/components/Select/Select.js +142 -182
  289. package/es/components/Select/Select.js.map +1 -1
  290. package/es/components/Select/Select.styles.js +48 -18
  291. package/es/components/Select/Select.styles.js.map +1 -1
  292. package/es/components/Select/Select.styles_768h42.css +5 -0
  293. package/es/components/Select/Select.tokens.js +78 -123
  294. package/es/components/Select/Select.tokens.js.map +1 -1
  295. package/es/components/Select/hooks/useKeyboardNavigation.js +73 -19
  296. package/es/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
  297. package/es/components/Select/hooks/usePathMaps.js +1 -4
  298. package/es/components/Select/hooks/usePathMaps.js.map +1 -1
  299. package/es/components/Select/reducers/focusedChipIndexReducer.js +35 -0
  300. package/es/components/Select/reducers/focusedChipIndexReducer.js.map +1 -0
  301. package/es/components/Select/ui/Inner/Inner.css +34 -83
  302. package/es/components/Select/ui/Inner/Inner.js +10 -10
  303. package/es/components/Select/ui/Inner/Inner.js.map +1 -1
  304. package/es/components/Select/ui/Inner/ui/Item/Item.css +34 -83
  305. package/es/components/Select/ui/Inner/ui/Item/Item.js +14 -22
  306. package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  307. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js +50 -33
  308. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  309. package/es/components/Select/ui/Inner/ui/Item/Item.styles_8oe5oy.css +9 -0
  310. package/es/components/Select/ui/Target/Target.css +17 -58
  311. package/es/components/Select/ui/Target/Target.js +17 -35
  312. package/es/components/Select/ui/Target/Target.js.map +1 -1
  313. package/es/components/Select/ui/Target/ui/Button/Button.css +5 -5
  314. package/es/components/Select/ui/Target/ui/Button/Button.js +15 -11
  315. package/es/components/Select/ui/Target/ui/Button/Button.js.map +1 -1
  316. package/es/components/Select/ui/Target/ui/Button/Button.styles.js +1 -1
  317. package/es/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  318. package/es/components/Select/ui/Target/ui/Button/Button.styles_lxxm4p.css +5 -0
  319. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +38 -53
  320. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +99 -86
  321. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  322. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +95 -39
  323. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  324. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles_1damf5p.css +12 -0
  325. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.css +21 -0
  326. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +32 -0
  327. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js.map +1 -0
  328. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +18 -0
  329. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -0
  330. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles_1a752pa.css +1 -0
  331. package/es/components/Select/utils/getView.js +2 -2
  332. package/es/components/Select/utils/getView.js.map +1 -1
  333. package/es/components/Select/variations/_size/base.js +5 -0
  334. package/es/components/Select/variations/_size/base.js.map +1 -0
  335. package/es/components/Select/variations/_size/base_x642ct.css +1 -0
  336. package/es/components/Select/variations/_view/base.js +5 -0
  337. package/es/components/Select/variations/_view/base.js.map +1 -0
  338. package/es/components/Select/variations/_view/base_x642ct.css +1 -0
  339. package/es/components/Slider/Slider.css +22 -21
  340. package/es/components/Slider/components/Double/Double.css +22 -21
  341. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +22 -21
  342. package/es/components/Switch/Switch.css +11 -7
  343. package/es/components/Switch/Switch.js +17 -8
  344. package/es/components/Switch/Switch.js.map +1 -1
  345. package/es/components/Switch/Switch.styles.js +15 -5
  346. package/es/components/Switch/Switch.styles.js.map +1 -1
  347. package/es/components/Switch/Switch.styles_bei7bh.css +6 -0
  348. package/es/components/Switch/Switch.tokens.js +11 -0
  349. package/es/components/Switch/Switch.tokens.js.map +1 -1
  350. package/es/components/Switch/_focused/base.js +1 -1
  351. package/es/components/Switch/_focused/{base_j4murk.css → base_sz3n0x.css} +1 -1
  352. package/es/components/Switch/_size/base.js +1 -1
  353. package/es/components/Switch/_size/base.js.map +1 -1
  354. package/es/components/Switch/_size/base_1tcl212.css +1 -0
  355. package/es/components/Switch/_toggleSize/base.js +5 -0
  356. package/es/components/Switch/_toggleSize/base.js.map +1 -0
  357. package/es/components/Switch/_toggleSize/base_6i0904.css +1 -0
  358. package/es/components/Switch/_view/base.js +1 -1
  359. package/es/components/Switch/_view/base.js.map +1 -1
  360. package/es/components/Switch/_view/base_yxkf3s.css +1 -0
  361. package/es/components/TextField/TextField.js +2 -11
  362. package/es/components/TextField/TextField.js.map +1 -1
  363. package/es/components/TextField/TextField.styles.js +22 -14
  364. package/es/components/TextField/TextField.styles.js.map +1 -1
  365. package/es/components/TextField/{TextField.styles_j7dqpn.css → TextField.styles_grgg7q.css} +7 -6
  366. package/es/components/TextField/TextField.tokens.js +1 -2
  367. package/es/components/TextField/TextField.tokens.js.map +1 -1
  368. package/es/components/TextField/ui/Hint/Hint.css +21 -20
  369. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -7
  370. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
  371. package/es/components/TextField/variations/_clear/base.js +1 -1
  372. package/es/components/TextField/variations/_clear/{base_1396md2.css → base_1i91sjp.css} +1 -1
  373. package/es/components/TextField/variations/_label-placement/base.js +1 -1
  374. package/es/components/TextField/variations/_label-placement/base_3domm.css +1 -0
  375. package/es/components/TextField/variations/_read-only/base.js +1 -1
  376. package/es/components/TextField/variations/_read-only/{base_1jvcf9a.css → base_17ypmu7.css} +1 -1
  377. package/es/components/TextField/variations/_size/base.js +1 -1
  378. package/es/components/TextField/variations/_size/{base_1tei47x.css → base_1xdmaqh.css} +1 -1
  379. package/es/components/TextField/variations/_view/base.js +1 -1
  380. package/es/components/TextField/variations/_view/{base_8ogww5.css → base_qhyte8.css} +1 -1
  381. package/es/index.css +75 -56
  382. package/es/index.js +0 -1
  383. package/es/index.js.map +1 -1
  384. package/es/utils/index.js.map +1 -1
  385. package/package.json +2 -2
  386. package/styled-components/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +5 -8
  387. package/styled-components/cjs/components/Cell/Cell.js +1 -3
  388. package/styled-components/cjs/components/Cell/ui/CellTextbox/CellTextbox.js +1 -7
  389. package/styled-components/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +1 -4
  390. package/styled-components/cjs/components/Chip/Chip.js +1 -3
  391. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +1 -0
  392. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +1 -0
  393. package/styled-components/cjs/components/Combobox/ComboboxNew/FloatingPopover.js +5 -19
  394. package/styled-components/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +50 -1
  395. package/styled-components/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
  396. package/styled-components/cjs/components/Select/Select.js +136 -177
  397. package/styled-components/cjs/components/Select/Select.styles.js +27 -12
  398. package/styled-components/cjs/components/Select/Select.tokens.js +60 -125
  399. package/styled-components/cjs/components/Select/hooks/useKeyboardNavigation.js +73 -19
  400. package/styled-components/cjs/components/Select/hooks/usePathMaps.js +1 -4
  401. package/styled-components/cjs/components/Select/reducers/focusedChipIndexReducer.js +38 -0
  402. package/styled-components/cjs/components/Select/reducers/index.js +11 -0
  403. package/styled-components/cjs/components/Select/ui/Inner/Inner.js +9 -9
  404. package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +12 -19
  405. package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +26 -20
  406. package/styled-components/cjs/components/Select/ui/Target/Target.js +18 -38
  407. package/styled-components/cjs/components/Select/ui/Target/ui/Button/Button.js +16 -13
  408. package/styled-components/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +3 -3
  409. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +99 -88
  410. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +61 -23
  411. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +37 -0
  412. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +21 -0
  413. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/ui/index.js +16 -0
  414. package/styled-components/cjs/components/Select/utils/getView.js +2 -2
  415. package/styled-components/cjs/components/Select/utils/index.js +1 -22
  416. package/styled-components/cjs/components/Select/variations/_size/base.js +8 -0
  417. package/styled-components/cjs/components/Select/variations/_size/tokens.json +9 -0
  418. package/styled-components/cjs/components/Select/variations/_view/base.js +8 -0
  419. package/styled-components/cjs/components/Select/variations/_view/tokens.json +1 -0
  420. package/styled-components/cjs/components/Switch/Switch.js +17 -8
  421. package/styled-components/cjs/components/Switch/Switch.styles.js +11 -5
  422. package/styled-components/cjs/components/Switch/Switch.template-doc.mdx +37 -1
  423. package/styled-components/cjs/components/Switch/Switch.tokens.js +11 -0
  424. package/styled-components/cjs/components/Switch/_size/base.js +1 -1
  425. package/styled-components/cjs/components/Switch/_toggleSize/base.js +10 -0
  426. package/styled-components/cjs/components/Switch/_view/base.js +1 -1
  427. package/styled-components/cjs/components/TextField/TextField.js +2 -11
  428. package/styled-components/cjs/components/TextField/TextField.styles.js +15 -12
  429. package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -2
  430. package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -7
  431. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +1 -1
  432. package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.config.js +20 -28
  433. package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +40 -47
  434. package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.config.js +9 -2
  435. package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.stories.tsx +7 -1
  436. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +15 -13
  437. package/styled-components/cjs/examples/plasma_web/components/Select/Select.config.js +20 -28
  438. package/styled-components/cjs/examples/plasma_web/components/Select/Select.stories.tsx +40 -47
  439. package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.config.js +9 -2
  440. package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.stories.tsx +14 -1
  441. package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +14 -12
  442. package/styled-components/cjs/index.js +0 -11
  443. package/styled-components/cjs/utils/index.js +1 -9
  444. package/styled-components/es/components/Breadcrumbs/Breadcrumbs.styles.js +5 -8
  445. package/styled-components/es/components/Cell/Cell.js +1 -3
  446. package/styled-components/es/components/Cell/ui/CellTextbox/CellTextbox.js +1 -7
  447. package/styled-components/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +1 -4
  448. package/styled-components/es/components/Chip/Chip.js +1 -3
  449. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +1 -0
  450. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.tokens.js +1 -0
  451. package/styled-components/es/components/Combobox/ComboboxNew/FloatingPopover.js +4 -18
  452. package/styled-components/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +50 -1
  453. package/styled-components/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
  454. package/styled-components/es/components/Select/Select.js +141 -182
  455. package/styled-components/es/components/Select/Select.styles.js +26 -11
  456. package/styled-components/es/components/Select/Select.tokens.js +60 -125
  457. package/styled-components/es/components/Select/hooks/useKeyboardNavigation.js +72 -18
  458. package/styled-components/es/components/Select/hooks/usePathMaps.js +1 -4
  459. package/styled-components/es/components/Select/reducers/focusedChipIndexReducer.js +32 -0
  460. package/styled-components/es/components/Select/reducers/index.js +2 -1
  461. package/styled-components/es/components/Select/ui/Inner/Inner.js +10 -10
  462. package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +15 -22
  463. package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.styles.js +25 -19
  464. package/styled-components/es/components/Select/ui/Target/Target.js +17 -35
  465. package/styled-components/es/components/Select/ui/Target/ui/Button/Button.js +16 -11
  466. package/styled-components/es/components/Select/ui/Target/ui/Button/Button.styles.js +3 -3
  467. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +99 -86
  468. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +61 -23
  469. package/styled-components/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +28 -0
  470. package/styled-components/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +14 -0
  471. package/styled-components/es/components/Select/ui/Target/ui/Textfield/ui/index.js +1 -0
  472. package/styled-components/es/components/Select/utils/getView.js +2 -2
  473. package/styled-components/es/components/Select/utils/index.js +1 -4
  474. package/styled-components/es/components/Select/variations/_size/base.js +2 -0
  475. package/styled-components/es/components/Select/variations/_size/tokens.json +9 -0
  476. package/styled-components/es/components/Select/variations/_view/base.js +2 -0
  477. package/styled-components/es/components/Select/variations/_view/tokens.json +1 -0
  478. package/styled-components/es/components/Switch/Switch.js +13 -4
  479. package/styled-components/es/components/Switch/Switch.styles.js +10 -4
  480. package/styled-components/es/components/Switch/Switch.template-doc.mdx +37 -1
  481. package/styled-components/es/components/Switch/Switch.tokens.js +11 -0
  482. package/styled-components/es/components/Switch/_size/base.js +2 -2
  483. package/styled-components/es/components/Switch/_toggleSize/base.js +4 -0
  484. package/styled-components/es/components/Switch/_view/base.js +2 -2
  485. package/styled-components/es/components/TextField/TextField.js +2 -11
  486. package/styled-components/es/components/TextField/TextField.styles.js +15 -12
  487. package/styled-components/es/components/TextField/TextField.tokens.js +1 -2
  488. package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -7
  489. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +1 -1
  490. package/styled-components/es/examples/plasma_b2c/components/Select/Select.config.js +21 -29
  491. package/styled-components/es/examples/plasma_b2c/components/Select/Select.stories.tsx +40 -47
  492. package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.config.js +9 -2
  493. package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.stories.tsx +7 -1
  494. package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +15 -13
  495. package/styled-components/es/examples/plasma_web/components/Select/Select.config.js +21 -29
  496. package/styled-components/es/examples/plasma_web/components/Select/Select.stories.tsx +40 -47
  497. package/styled-components/es/examples/plasma_web/components/Switch/Switch.config.js +9 -2
  498. package/styled-components/es/examples/plasma_web/components/Switch/Switch.stories.tsx +14 -1
  499. package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +14 -12
  500. package/styled-components/es/index.js +0 -1
  501. package/styled-components/es/utils/index.js +1 -2
  502. package/types/components/Attach/ui/Button/Button.styles.d.ts +2 -2
  503. package/types/components/Attach/ui/IconButton/IconButton.styles.d.ts +4 -4
  504. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts +16 -16
  505. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts.map +1 -1
  506. package/types/components/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -1
  507. package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.d.ts +2 -2
  508. package/types/components/Cell/Cell.d.ts.map +1 -1
  509. package/types/components/Cell/ui/CellTextbox/CellTextbox.d.ts.map +1 -1
  510. package/types/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.d.ts.map +1 -1
  511. package/types/components/Chip/Chip.d.ts.map +1 -1
  512. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  513. package/types/components/Combobox/ComboboxNew/Combobox.tokens.d.ts +1 -0
  514. package/types/components/Combobox/ComboboxNew/Combobox.tokens.d.ts.map +1 -1
  515. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +1 -1
  516. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  517. package/types/components/Combobox/ComboboxNew/FloatingPopover.d.ts.map +1 -1
  518. package/types/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.d.ts +3 -1
  519. package/types/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.d.ts.map +1 -1
  520. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts +16 -16
  521. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts.map +1 -1
  522. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts +16 -16
  523. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
  524. package/types/components/EmptyState/EmptyState.styles.d.ts +2 -2
  525. package/types/components/Notification/Notification.styles.d.ts +2 -2
  526. package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts +2 -2
  527. package/types/components/Pagination/Pagination.styles.d.ts +4 -4
  528. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +40 -40
  529. package/types/components/Panel/ui/PanelHeader/PanelHeader.styles.d.ts +2 -2
  530. package/types/components/Range/Range.styles.d.ts +16 -16
  531. package/types/components/Range/Range.styles.d.ts.map +1 -1
  532. package/types/components/Select/Select.d.ts +11 -5
  533. package/types/components/Select/Select.d.ts.map +1 -1
  534. package/types/components/Select/Select.styles.d.ts +9 -0
  535. package/types/components/Select/Select.styles.d.ts.map +1 -1
  536. package/types/components/Select/Select.tokens.d.ts +58 -121
  537. package/types/components/Select/Select.tokens.d.ts.map +1 -1
  538. package/types/components/Select/Select.types.d.ts +20 -41
  539. package/types/components/Select/Select.types.d.ts.map +1 -1
  540. package/types/components/Select/hooks/useKeyboardNavigation.d.ts +11 -5
  541. package/types/components/Select/hooks/useKeyboardNavigation.d.ts.map +1 -1
  542. package/types/components/Select/hooks/usePathMaps.d.ts +1 -2
  543. package/types/components/Select/hooks/usePathMaps.d.ts.map +1 -1
  544. package/types/components/Select/index.d.ts +1 -1
  545. package/types/components/Select/index.d.ts.map +1 -1
  546. package/types/components/Select/reducers/focusedChipIndexReducer.d.ts +11 -0
  547. package/types/components/Select/reducers/focusedChipIndexReducer.d.ts.map +1 -0
  548. package/types/components/Select/reducers/index.d.ts +1 -0
  549. package/types/components/Select/reducers/index.d.ts.map +1 -1
  550. package/types/components/Select/ui/Inner/Inner.d.ts.map +1 -1
  551. package/types/components/Select/ui/Inner/ui/Item/Item.d.ts.map +1 -1
  552. package/types/components/Select/ui/Inner/ui/Item/Item.styles.d.ts +2 -32
  553. package/types/components/Select/ui/Inner/ui/Item/Item.styles.d.ts.map +1 -1
  554. package/types/components/Select/ui/Inner/ui/Item/Item.types.d.ts +0 -9
  555. package/types/components/Select/ui/Inner/ui/Item/Item.types.d.ts.map +1 -1
  556. package/types/components/Select/ui/Target/Target.d.ts +2 -14
  557. package/types/components/Select/ui/Target/Target.d.ts.map +1 -1
  558. package/types/components/Select/ui/Target/Target.types.d.ts +9 -10
  559. package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
  560. package/types/components/Select/ui/Target/ui/Button/Button.d.ts +1 -1
  561. package/types/components/Select/ui/Target/ui/Button/Button.d.ts.map +1 -1
  562. package/types/components/Select/ui/Target/ui/Button/Button.styles.d.ts +2 -2
  563. package/types/components/Select/ui/Target/ui/Button/Button.types.d.ts +1 -1
  564. package/types/components/Select/ui/Target/ui/Button/Button.types.d.ts.map +1 -1
  565. package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts +1 -1
  566. package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
  567. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts +60 -628
  568. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
  569. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +4 -1
  570. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
  571. package/types/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.d.ts +9 -0
  572. package/types/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.d.ts.map +1 -0
  573. package/types/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.d.ts +3 -0
  574. package/types/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.d.ts.map +1 -0
  575. package/types/components/Select/ui/Target/ui/Textfield/ui/index.d.ts +2 -0
  576. package/types/components/Select/ui/Target/ui/Textfield/ui/index.d.ts.map +1 -0
  577. package/types/components/Select/utils/getView.d.ts +1 -1
  578. package/types/components/Select/utils/getView.d.ts.map +1 -1
  579. package/types/components/Select/utils/index.d.ts +0 -3
  580. package/types/components/Select/utils/index.d.ts.map +1 -1
  581. package/types/components/Select/variations/_size/base.d.ts +2 -0
  582. package/types/components/Select/variations/_size/base.d.ts.map +1 -0
  583. package/types/components/Select/variations/_view/base.d.ts +2 -0
  584. package/types/components/Select/variations/_view/base.d.ts.map +1 -0
  585. package/types/components/Slider/components/Double/Double.styles.d.ts +16 -16
  586. package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -1
  587. package/types/components/Switch/Switch.d.ts +3 -0
  588. package/types/components/Switch/Switch.d.ts.map +1 -1
  589. package/types/components/Switch/Switch.styles.d.ts +2 -0
  590. package/types/components/Switch/Switch.styles.d.ts.map +1 -1
  591. package/types/components/Switch/Switch.tokens.d.ts +9 -0
  592. package/types/components/Switch/Switch.tokens.d.ts.map +1 -1
  593. package/types/components/Switch/Switch.types.d.ts +10 -2
  594. package/types/components/Switch/Switch.types.d.ts.map +1 -1
  595. package/types/components/Switch/_size/base.d.ts.map +1 -1
  596. package/types/components/Switch/_toggleSize/base.d.ts +2 -0
  597. package/types/components/Switch/_toggleSize/base.d.ts.map +1 -0
  598. package/types/components/Switch/_view/base.d.ts.map +1 -1
  599. package/types/components/TextField/TextField.d.ts.map +1 -1
  600. package/types/components/TextField/TextField.styles.d.ts +3 -1
  601. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  602. package/types/components/TextField/TextField.tokens.d.ts +0 -1
  603. package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
  604. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts +1 -3
  605. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts.map +1 -1
  606. package/types/components/Toast/Toast.styles.d.ts +2 -2
  607. package/types/components/Toast/utils.d.ts +2 -2
  608. package/types/examples/plasma_b2c/components/Attach/Attach.d.ts +8 -8
  609. package/types/examples/plasma_b2c/components/Button/Button.d.ts +2 -2
  610. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +24 -24
  611. package/types/examples/plasma_b2c/components/IconButton/IconButton.d.ts +2 -2
  612. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts +16 -16
  613. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts.map +1 -1
  614. package/types/examples/plasma_b2c/components/Radiobox/Radiobox.d.ts +1 -1
  615. package/types/examples/plasma_b2c/components/Radiobox/Radiobox.d.ts.map +1 -1
  616. package/types/examples/plasma_b2c/components/Select/Select.config.d.ts +7 -15
  617. package/types/examples/plasma_b2c/components/Select/Select.config.d.ts.map +1 -1
  618. package/types/examples/plasma_b2c/components/Select/Select.d.ts +46 -53
  619. package/types/examples/plasma_b2c/components/Select/Select.d.ts.map +1 -1
  620. package/types/examples/plasma_b2c/components/Switch/Switch.config.d.ts +7 -0
  621. package/types/examples/plasma_b2c/components/Switch/Switch.config.d.ts.map +1 -1
  622. package/types/examples/plasma_b2c/components/Switch/Switch.d.ts +6 -0
  623. package/types/examples/plasma_b2c/components/Switch/Switch.d.ts.map +1 -1
  624. package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts +16 -16
  625. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +16 -16
  626. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
  627. package/types/examples/plasma_web/components/Attach/Attach.d.ts +8 -8
  628. package/types/examples/plasma_web/components/Button/Button.d.ts +2 -2
  629. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +24 -24
  630. package/types/examples/plasma_web/components/IconButton/IconButton.d.ts +2 -2
  631. package/types/examples/plasma_web/components/Mask/Mask.d.ts +16 -16
  632. package/types/examples/plasma_web/components/Mask/Mask.d.ts.map +1 -1
  633. package/types/examples/plasma_web/components/Radiobox/Radiobox.d.ts +1 -1
  634. package/types/examples/plasma_web/components/Radiobox/Radiobox.d.ts.map +1 -1
  635. package/types/examples/plasma_web/components/Select/Select.config.d.ts +7 -15
  636. package/types/examples/plasma_web/components/Select/Select.config.d.ts.map +1 -1
  637. package/types/examples/plasma_web/components/Select/Select.d.ts +46 -53
  638. package/types/examples/plasma_web/components/Select/Select.d.ts.map +1 -1
  639. package/types/examples/plasma_web/components/Switch/Switch.config.d.ts +7 -0
  640. package/types/examples/plasma_web/components/Switch/Switch.config.d.ts.map +1 -1
  641. package/types/examples/plasma_web/components/Switch/Switch.d.ts +6 -0
  642. package/types/examples/plasma_web/components/Switch/Switch.d.ts.map +1 -1
  643. package/types/examples/plasma_web/components/TextArea/TextArea.d.ts +16 -16
  644. package/types/examples/plasma_web/components/TextField/TextField.d.ts +16 -16
  645. package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
  646. package/types/index.d.ts +0 -1
  647. package/types/index.d.ts.map +1 -1
  648. package/types/types/index.d.ts +0 -2
  649. package/types/types/index.d.ts.map +1 -1
  650. package/types/utils/index.d.ts +0 -1
  651. package/types/utils/index.d.ts.map +1 -1
  652. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles_10zfeps.css +0 -3
  653. package/cjs/components/Select/FloatingPopover.js +0 -87
  654. package/cjs/components/Select/FloatingPopover.js.map +0 -1
  655. package/cjs/components/Select/Select.styles_1p5c9p3.css +0 -2
  656. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles_1x4bzlm.css +0 -9
  657. package/cjs/components/Select/ui/Target/ui/Button/Button.styles_10g64me.css +0 -5
  658. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_q4kc1p.css +0 -3
  659. package/cjs/components/Select/utils/getFallbackPlacements.js +0 -15
  660. package/cjs/components/Select/utils/getFallbackPlacements.js.map +0 -1
  661. package/cjs/components/Select/utils/getItemId.js +0 -10
  662. package/cjs/components/Select/utils/getItemId.js.map +0 -1
  663. package/cjs/components/Select/utils/getPlacement.js +0 -13
  664. package/cjs/components/Select/utils/getPlacement.js.map +0 -1
  665. package/cjs/components/Switch/Switch.styles_1kk0qzz.css +0 -4
  666. package/cjs/components/Switch/_size/base_1rjzpi4.css +0 -1
  667. package/cjs/components/Switch/_view/base_1mtyz12.css +0 -1
  668. package/cjs/components/TextField/variations/_label-placement/base_gttvto.css +0 -1
  669. package/cjs/utils/fixedForwardRef.js +0 -12
  670. package/cjs/utils/fixedForwardRef.js.map +0 -1
  671. package/emotion/cjs/components/Select/FloatingPopover.js +0 -91
  672. package/emotion/cjs/components/Select/utils/getFallbackPlacements.js +0 -14
  673. package/emotion/cjs/components/Select/utils/getItemId.js +0 -9
  674. package/emotion/cjs/components/Select/utils/getPlacement.js +0 -12
  675. package/emotion/cjs/types/DistributiveOmit.js +0 -5
  676. package/emotion/cjs/types/DistributivePick.js +0 -5
  677. package/emotion/cjs/utils/fixedForwardRef.js +0 -11
  678. package/emotion/es/components/Select/FloatingPopover.js +0 -84
  679. package/emotion/es/components/Select/utils/getFallbackPlacements.js +0 -8
  680. package/emotion/es/components/Select/utils/getItemId.js +0 -3
  681. package/emotion/es/components/Select/utils/getPlacement.js +0 -6
  682. package/emotion/es/types/DistributiveOmit.js +0 -1
  683. package/emotion/es/types/DistributivePick.js +0 -1
  684. package/emotion/es/utils/fixedForwardRef.js +0 -4
  685. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles_10zfeps.css +0 -3
  686. package/es/components/Select/FloatingPopover.js +0 -83
  687. package/es/components/Select/FloatingPopover.js.map +0 -1
  688. package/es/components/Select/Select.styles_1p5c9p3.css +0 -2
  689. package/es/components/Select/ui/Inner/ui/Item/Item.styles_1x4bzlm.css +0 -9
  690. package/es/components/Select/ui/Target/ui/Button/Button.styles_10g64me.css +0 -5
  691. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles_q4kc1p.css +0 -3
  692. package/es/components/Select/utils/getFallbackPlacements.js +0 -11
  693. package/es/components/Select/utils/getFallbackPlacements.js.map +0 -1
  694. package/es/components/Select/utils/getItemId.js +0 -6
  695. package/es/components/Select/utils/getItemId.js.map +0 -1
  696. package/es/components/Select/utils/getPlacement.js +0 -9
  697. package/es/components/Select/utils/getPlacement.js.map +0 -1
  698. package/es/components/Switch/Switch.styles_1kk0qzz.css +0 -4
  699. package/es/components/Switch/_size/base_1rjzpi4.css +0 -1
  700. package/es/components/Switch/_view/base_1mtyz12.css +0 -1
  701. package/es/components/TextField/variations/_label-placement/base_gttvto.css +0 -1
  702. package/es/utils/fixedForwardRef.js +0 -8
  703. package/es/utils/fixedForwardRef.js.map +0 -1
  704. package/styled-components/cjs/components/Select/FloatingPopover.js +0 -91
  705. package/styled-components/cjs/components/Select/utils/getFallbackPlacements.js +0 -14
  706. package/styled-components/cjs/components/Select/utils/getItemId.js +0 -9
  707. package/styled-components/cjs/components/Select/utils/getPlacement.js +0 -12
  708. package/styled-components/cjs/types/DistributiveOmit.js +0 -5
  709. package/styled-components/cjs/types/DistributivePick.js +0 -5
  710. package/styled-components/cjs/utils/fixedForwardRef.js +0 -11
  711. package/styled-components/es/components/Select/FloatingPopover.js +0 -84
  712. package/styled-components/es/components/Select/utils/getFallbackPlacements.js +0 -8
  713. package/styled-components/es/components/Select/utils/getItemId.js +0 -3
  714. package/styled-components/es/components/Select/utils/getPlacement.js +0 -6
  715. package/styled-components/es/types/DistributiveOmit.js +0 -1
  716. package/styled-components/es/types/DistributivePick.js +0 -1
  717. package/styled-components/es/utils/fixedForwardRef.js +0 -4
  718. package/types/components/Select/FloatingPopover.d.ts +0 -5
  719. package/types/components/Select/FloatingPopover.d.ts.map +0 -1
  720. package/types/components/Select/utils/getFallbackPlacements.d.ts +0 -4
  721. package/types/components/Select/utils/getFallbackPlacements.d.ts.map +0 -1
  722. package/types/components/Select/utils/getItemId.d.ts +0 -2
  723. package/types/components/Select/utils/getItemId.d.ts.map +0 -1
  724. package/types/components/Select/utils/getPlacement.d.ts +0 -4
  725. package/types/components/Select/utils/getPlacement.d.ts.map +0 -1
  726. package/types/types/DistributiveOmit.d.ts +0 -2
  727. package/types/types/DistributiveOmit.d.ts.map +0 -1
  728. package/types/types/DistributivePick.d.ts +0 -2
  729. package/types/types/DistributivePick.d.ts.map +0 -1
  730. package/types/utils/fixedForwardRef.d.ts +0 -3
  731. package/types/utils/fixedForwardRef.d.ts.map +0 -1
@@ -1,24 +1,26 @@
1
1
  import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
- import React, { forwardRef, useMemo, useState, useRef, useReducer, useLayoutEffect, createContext } from 'react';
3
- import { safeUseId } from '@salutejs/plasma-core';
4
- import { getItemByFocused, useKeyNavigation } from './hooks/useKeyboardNavigation.js';
2
+ import React, { forwardRef, useMemo, useReducer, useState, useLayoutEffect, createContext } from 'react';
3
+ import { useKeyNavigation } from './hooks/useKeyboardNavigation.js';
5
4
  import { usePathMaps } from './hooks/usePathMaps.js';
6
- import { Ul, base } from './Select.styles.js';
7
- import { FloatingPopover } from './FloatingPopover.js';
5
+ import { OuterLabel, StyledPopover, Ul, HelperText, base } from './Select.styles.js';
6
+ import { base as base$1 } from './variations/_view/base.js';
7
+ import { base as base$2 } from './variations/_size/base.js';
8
8
  import { initialItemsTransform } from './utils/initialItemsTransform.js';
9
9
  import { getInitialValue } from './utils/getInitialValue.js';
10
10
  import { pathReducer } from './reducers/pathReducer.js';
11
11
  import { focusedPathReducer } from './reducers/focusedPathReducer.js';
12
+ import { focusedChipIndexReducer } from './reducers/focusedChipIndexReducer.js';
12
13
  import { useOutsideClick } from '../../hooks/useOutsideClick.js';
13
14
  import { isEmpty } from '../../utils/isEmpty.js';
14
15
  import { updateDescendants } from './utils/updateDescendants.js';
15
16
  import { updateAncestors } from './utils/updateAncestors.js';
16
17
  import { updateSingleAncestors } from './utils/updateSingleAncestors.js';
18
+ import { getView } from './utils/getView.js';
19
+ import { getPlacements } from '../../utils/getPopoverPlacement.js';
17
20
  import { Target } from './ui/Target/Target.js';
18
21
  import { Inner } from './ui/Inner/Inner.js';
19
- import { getView } from './utils/getView.js';
20
22
 
21
- 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"];
23
+ 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"];
22
24
  var Context = /*#__PURE__*/createContext({});
23
25
 
24
26
  /**
@@ -26,21 +28,21 @@ var Context = /*#__PURE__*/createContext({});
26
28
  */
27
29
  var selectRoot = function selectRoot(Root) {
28
30
  return /*#__PURE__*/forwardRef(function (props, ref) {
29
- var _getItemByFocused;
30
31
  var outerValue = props.value,
31
32
  outerOnChange = props.onChange,
32
33
  _props$target = props.target,
33
- _target = _props$target === void 0 ? 'textfield-like' : _props$target,
34
+ target = _props$target === void 0 ? 'textfield-like' : _props$target,
34
35
  items = props.items,
35
36
  _props$placement = props.placement,
36
37
  placement = _props$placement === void 0 ? 'bottom' : _props$placement,
37
38
  label = props.label,
38
- labelPlacement = props.labelPlacement,
39
+ _props$labelPlacement = props.labelPlacement,
40
+ labelPlacement = _props$labelPlacement === void 0 ? 'outer' : _props$labelPlacement,
39
41
  placeholder = props.placeholder,
40
42
  helperText = props.helperText,
41
43
  _props$disabled = props.disabled,
42
44
  disabled = _props$disabled === void 0 ? false : _props$disabled,
43
- outerView = props.view,
45
+ view = props.view,
44
46
  size = props.size,
45
47
  listOverflow = props.listOverflow,
46
48
  listHeight = props.listHeight,
@@ -55,30 +57,23 @@ var selectRoot = function selectRoot(Root) {
55
57
  renderItem = props.renderItem,
56
58
  status = props.status,
57
59
  onItemSelect = props.onItemSelect,
58
- separator = props.separator,
59
60
  outerCloseAfterSelect = props.closeAfterSelect,
60
- isTargetAmount = props.isTargetAmount,
61
61
  rest = _objectWithoutProperties(props, _excluded);
62
62
  var transformedItems = useMemo(function () {
63
63
  return initialItemsTransform(items || []);
64
64
  }, [items]);
65
-
66
- // Создаем структуры для быстрой работы с деревом
67
65
  var _usePathMaps = usePathMaps(transformedItems),
68
- _usePathMaps2 = _slicedToArray(_usePathMaps, 5),
66
+ _usePathMaps2 = _slicedToArray(_usePathMaps, 4),
69
67
  pathMap = _usePathMaps2[0],
70
68
  focusedToValueMap = _usePathMaps2[1],
71
69
  valueToCheckedMap = _usePathMaps2[2],
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
- // Состояния дерева элементов
70
+ valueToItemMap = _usePathMaps2[3];
71
+ var value = getInitialValue(outerValue, valueToItemMap);
72
+ var onChange = function onChange(e) {
73
+ if (outerOnChange) {
74
+ outerOnChange(e);
75
+ }
76
+ };
82
77
  var _useReducer = useReducer(pathReducer, []),
83
78
  _useReducer2 = _slicedToArray(_useReducer, 2),
84
79
  path = _useReducer2[0],
@@ -87,53 +82,23 @@ var selectRoot = function selectRoot(Root) {
87
82
  _useReducer4 = _slicedToArray(_useReducer3, 2),
88
83
  focusedPath = _useReducer4[0],
89
84
  dispatchFocusedPath = _useReducer4[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()) || '';
85
+ var _useReducer5 = useReducer(focusedChipIndexReducer, null),
86
+ _useReducer6 = _slicedToArray(_useReducer5, 2),
87
+ focusedChipIndex = _useReducer6[0],
88
+ dispatchFocusedChipIndex = _useReducer6[1];
89
+ var _useState = useState(valueToCheckedMap),
90
+ _useState2 = _slicedToArray(_useState, 2),
91
+ checked = _useState2[0],
92
+ setChecked = _useState2[1];
96
93
  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);
99
94
  var targetRef = useOutsideClick(function () {
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({
95
+ if (focusedChipIndex != null) {
96
+ dispatchFocusedChipIndex({
122
97
  type: 'reset'
123
98
  });
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;
136
99
  }
100
+ });
101
+ var handleToggle = function handleToggle(opened) {
137
102
  if (opened) {
138
103
  dispatchPath({
139
104
  type: 'opened_first_level'
@@ -145,37 +110,39 @@ var selectRoot = function selectRoot(Root) {
145
110
  dispatchPath({
146
111
  type: 'reset'
147
112
  });
113
+ dispatchFocusedChipIndex({
114
+ type: 'reset'
115
+ });
148
116
  }
149
117
  };
150
118
  var handleCheckboxChange = function handleCheckboxChange(item) {
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);
119
+ if (props.multiselect) {
120
+ var checkedCopy = new Map(checked);
121
+ if (!checkedCopy.get(item.value)) {
122
+ checkedCopy.set(item.value, true);
123
+ updateDescendants(item, checkedCopy, true);
124
+ } else {
125
+ checkedCopy.set(item.value, false);
126
+ updateDescendants(item, checkedCopy, false);
167
127
  }
168
- });
169
- if (closeAfterSelect) {
170
- dispatchPath({
171
- type: 'reset'
128
+ updateAncestors(item, checkedCopy);
129
+ var newValues = [];
130
+ valueToItemMap.forEach(function (item, key) {
131
+ if (checkedCopy.get(key)) {
132
+ newValues.push(item.value);
133
+ }
172
134
  });
173
- dispatchFocusedPath({
174
- type: 'reset'
175
- });
176
- }
177
- if (onChange) {
178
- onChange(newValues);
135
+ if (closeAfterSelect) {
136
+ dispatchPath({
137
+ type: 'reset'
138
+ });
139
+ dispatchFocusedPath({
140
+ type: 'reset'
141
+ });
142
+ }
143
+ if (onChange) {
144
+ onChange(newValues);
145
+ }
179
146
  }
180
147
  };
181
148
  var handleItemClick = function handleItemClick(item, e) {
@@ -184,27 +151,30 @@ var selectRoot = function selectRoot(Root) {
184
151
  }
185
152
  if (props.multiselect) {
186
153
  handleCheckboxChange(item);
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);
154
+ } else {
155
+ if (e) {
156
+ e.stopPropagation();
157
+ }
158
+ var isCurrentChecked = checked.get(item.value);
159
+ if (closeAfterSelect) {
160
+ dispatchPath({
161
+ type: 'reset'
162
+ });
163
+ dispatchFocusedPath({
164
+ type: 'reset'
165
+ });
166
+ }
167
+ if (onChange) {
168
+ onChange(isCurrentChecked ? '' : item.value);
169
+ }
170
+ if (onItemSelect) {
171
+ onItemSelect(item, e);
172
+ }
206
173
  }
207
174
  };
175
+ var handleChipClick = function handleChipClick(currentValue) {
176
+ handleCheckboxChange(valueToItemMap.get(currentValue));
177
+ };
208
178
  var handlePressDown = function handlePressDown(item, e) {
209
179
  if (isEmpty(item.items)) {
210
180
  handleItemClick(item, e);
@@ -220,19 +190,25 @@ var selectRoot = function selectRoot(Root) {
220
190
  }
221
191
  };
222
192
  var _useKeyNavigation = useKeyNavigation({
193
+ value: value,
223
194
  focusedPath: focusedPath,
224
195
  dispatchFocusedPath: dispatchFocusedPath,
225
196
  path: path,
226
197
  dispatchPath: dispatchPath,
227
198
  pathMap: pathMap,
228
199
  focusedToValueMap: focusedToValueMap,
229
- handleListToggle: handleListToggle,
230
- handlePressDown: handlePressDown
200
+ handleToggle: handleToggle,
201
+ handlePressDown: handlePressDown,
202
+ focusedChipIndex: focusedChipIndex,
203
+ dispatchFocusedChipIndex: dispatchFocusedChipIndex,
204
+ valueToItemMap: valueToItemMap,
205
+ multiselect: props.multiselect,
206
+ isTargetAmount: props.isTargetAmount
231
207
  }),
232
208
  onKeyDown = _useKeyNavigation.onKeyDown;
209
+ var isCurrentListOpen = Boolean(path[0]);
233
210
 
234
- // В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.
235
- // Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.
211
+ // В данном эффекте мы следим за изменениями value и вносим коррективы в дерево чекбоксов.
236
212
  useLayoutEffect(function () {
237
213
  var checkedCopy = new Map(checked);
238
214
  checkedCopy.forEach(function (_, key) {
@@ -251,18 +227,13 @@ var selectRoot = function selectRoot(Root) {
251
227
  }
252
228
  }
253
229
  setChecked(checkedCopy);
254
-
255
- // В deps мы кладем именно outerValue и internalValue, а не просто value.
256
- // Т.к. вначале нужно отфильтровать и провалидировать outerValue и результат положить в переменную.
257
- // А переменную, содержащую сложные типы данных, нельзя помещать в deps.
258
- }, [outerValue, internalValue, items]);
230
+ }, [outerValue, items]);
259
231
  return /*#__PURE__*/React.createElement(Root, _extends({
260
- view: view,
232
+ ref: ref,
261
233
  size: size,
262
- labelPlacement: labelPlacement,
263
- chipView: chipView,
264
- disabled: disabled
265
- }, rest), /*#__PURE__*/React.createElement(Context.Provider, {
234
+ view: status ? getView(status) : view,
235
+ chipView: chipView
236
+ }, rest), label && labelPlacement === 'outer' && target !== 'button-like' && /*#__PURE__*/React.createElement(OuterLabel, null, label), /*#__PURE__*/React.createElement(Context.Provider, {
266
237
  value: {
267
238
  focusedPath: focusedPath,
268
239
  checked: checked,
@@ -272,63 +243,46 @@ var selectRoot = function selectRoot(Root) {
272
243
  handleItemClick: handleItemClick,
273
244
  variant: variant,
274
245
  renderItem: renderItem,
275
- valueToItemMap: valueToItemMap,
276
- treeId: treeId
246
+ valueToItemMap: valueToItemMap
277
247
  }
278
- }, /*#__PURE__*/React.createElement(FloatingPopover, {
279
- ref: floatingPopoverRef,
248
+ }, /*#__PURE__*/React.createElement(StyledPopover, {
249
+ ref: targetRef,
280
250
  opened: isCurrentListOpen,
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
251
+ placement: getPlacements(placement),
252
+ usePortal: Boolean(portal),
253
+ frame: portal,
254
+ onToggle: handleToggle,
255
+ trigger: "click",
256
+ target: /*#__PURE__*/React.createElement(Target, {
257
+ opened: isCurrentListOpen,
258
+ value: value,
259
+ valueToItemMap: valueToItemMap,
260
+ focusedPath: focusedPath,
261
+ focusedToValueMap: focusedToValueMap,
262
+ onChipClick: handleChipClick,
263
+ label: label,
264
+ placeholder: placeholder,
265
+ onKeyDown: onKeyDown,
266
+ focusedChipIndex: focusedChipIndex,
267
+ labelPlacement: labelPlacement,
268
+ selectProps: props,
269
+ size: size,
270
+ contentLeft: contentLeft,
271
+ disabled: disabled,
272
+ renderValue: renderValue
273
+ }),
274
+ preventOverflow: false,
275
+ closeOnOverlayClick: true,
276
+ listWidth: listWidth
277
+ }, items && /*#__PURE__*/React.createElement(Root, _extends({
278
+ size: size
323
279
  }, rest), /*#__PURE__*/React.createElement(Ul, {
324
280
  role: "tree",
325
- id: "".concat(treeId, "_tree_level_1"),
326
- "aria-multiselectable": Boolean(props.multiselect),
281
+ id: "tree_level_1",
327
282
  listHeight: listHeight,
328
283
  listOverflow: listOverflow,
329
284
  onScroll: handleScroll,
330
- listWidth: listWidth,
331
- ref: targetRef
285
+ listWidth: listWidth
332
286
  }, transformedItems.map(function (item, index) {
333
287
  return /*#__PURE__*/React.createElement(Inner, {
334
288
  key: "".concat(index, "/0"),
@@ -339,7 +293,7 @@ var selectRoot = function selectRoot(Root) {
339
293
  index: index,
340
294
  listWidth: listWidth
341
295
  });
342
- }))))));
296
+ }))))), helperText && target === 'textfield-like' && /*#__PURE__*/React.createElement(HelperText, null, helperText));
343
297
  });
344
298
  };
345
299
  var selectConfig = {
@@ -347,12 +301,18 @@ var selectConfig = {
347
301
  tag: 'div',
348
302
  layout: selectRoot,
349
303
  base: base,
350
- variations: {},
304
+ variations: {
305
+ view: {
306
+ css: base$1
307
+ },
308
+ size: {
309
+ css: base$2
310
+ }
311
+ },
351
312
  defaults: {
352
313
  view: 'default',
353
- size: 'm',
354
- labelPlacement: 'outer',
355
- chipView: 'default'
314
+ chipView: 'default',
315
+ size: 'm'
356
316
  }
357
317
  };
358
318
 
@@ -1 +1 @@
1
- {"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { isEmpty } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { useKeyNavigation, getItemByFocused } from './hooks/useKeyboardNavigation';\nimport {\n initialItemsTransform,\n updateAncestors,\n updateDescendants,\n updateSingleAncestors,\n getView,\n getInitialValue,\n} from './utils';\nimport { Inner, Target } from './ui';\nimport { pathReducer, focusedPathReducer } from './reducers';\nimport { usePathMaps } from './hooks/usePathMaps';\nimport { Ul, base } from './Select.styles';\nimport type { ItemContext, MergedSelectProps } from './Select.types';\nimport type { MergedDropdownNodeTransformed } from './ui/Inner/ui/Item/Item.types';\nimport { FloatingPopover } from './FloatingPopover';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Выпадающий список. Поддерживает выбор одного или нескольких значений.\n */\nexport const selectRoot = (Root: RootProps<HTMLButtonElement, Omit<MergedSelectProps, 'items'>>) =>\n forwardRef<HTMLButtonElement, MergedSelectProps>((props, ref) => {\n const {\n value: outerValue,\n onChange: outerOnChange,\n target = 'textfield-like',\n items,\n placement = 'bottom',\n label,\n labelPlacement,\n placeholder,\n helperText,\n disabled = false,\n view: outerView,\n size,\n listOverflow,\n listHeight,\n listWidth,\n contentLeft,\n onScrollBottom,\n chipView,\n variant = 'normal',\n portal,\n renderValue,\n renderItem,\n status,\n onItemSelect,\n separator,\n closeAfterSelect: outerCloseAfterSelect,\n isTargetAmount,\n ...rest\n } = props;\n const transformedItems = useMemo(() => initialItemsTransform(items || []), [items]);\n\n // Создаем структуры для быстрой работы с деревом\n const [pathMap, focusedToValueMap, valueToCheckedMap, valueToItemMap, labelToItemMap] = usePathMaps(\n transformedItems,\n );\n\n const [internalValue, setInternalValue] = useState<string | number | Array<string | number>>(\n props.multiselect ? [] : '',\n );\n\n const value =\n outerValue !== null && outerValue !== undefined\n ? getInitialValue(outerValue, valueToItemMap)\n : internalValue;\n\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n\n // Состояния дерева элементов\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n const [checked, setChecked] = useState(valueToCheckedMap);\n\n const isCurrentListOpen = Boolean(path[0]);\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value.toString() || '';\n const closeAfterSelect = outerCloseAfterSelect ?? !props.multiselect;\n const treeId = safeUseId();\n const view = target === 'textfield-like' && disabled ? 'default' : getView(status, outerView);\n\n const targetRef = useOutsideClick<HTMLUListElement>(() => {\n if (!isCurrentListOpen) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }, floatingPopoverRef);\n\n const onChange = (newValue: string | number | Array<string | number>) => {\n if (outerOnChange) {\n outerOnChange(newValue as any);\n }\n\n setInternalValue(newValue);\n };\n\n const handleClickArrow = () => {\n if (disabled) {\n return;\n }\n\n if (isCurrentListOpen) {\n dispatchPath({ type: 'reset' });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n }\n\n dispatchFocusedPath({ type: 'reset' });\n };\n\n const handleListToggle = (opened: boolean) => {\n if (disabled) {\n return;\n }\n\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n };\n\n const handleCheckboxChange = (item: MergedDropdownNodeTransformed) => {\n if (!props.multiselect) {\n return;\n }\n\n const checkedCopy = new Map(checked);\n\n if (!checkedCopy.get(item.value)) {\n checkedCopy.set(item.value, true);\n updateDescendants(item, checkedCopy, true);\n } else {\n checkedCopy.set(item.value, false);\n updateDescendants(item, checkedCopy, false);\n }\n\n updateAncestors(item, checkedCopy);\n\n const newValues: Array<string | number> = [];\n\n valueToItemMap.forEach((item, key) => {\n if (checkedCopy.get(key)) {\n newValues.push(item.value);\n }\n });\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(newValues);\n }\n };\n\n const handleItemClick = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (!isEmpty(item?.items)) {\n return;\n }\n\n if (props.multiselect) {\n handleCheckboxChange(item);\n return;\n }\n\n if (e) {\n e.stopPropagation();\n }\n\n const isCurrentChecked = checked.get(item.value);\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(isCurrentChecked ? '' : item.value);\n }\n\n if (onItemSelect) {\n onItemSelect(item, e!);\n }\n };\n\n const handlePressDown = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (isEmpty(item.items)) {\n handleItemClick(item, e);\n } else if (props.multiselect) {\n handleCheckboxChange(item);\n }\n };\n\n const handleScroll = (e: React.UIEvent<HTMLUListElement>) => {\n if (!onScrollBottom) return;\n\n const { target } = e;\n\n if (\n (target as HTMLElement).scrollHeight - (target as HTMLElement).scrollTop ===\n (target as HTMLElement).clientHeight\n ) {\n onScrollBottom(e);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n });\n\n // В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.\n // Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.\n useLayoutEffect(() => {\n const checkedCopy = new Map(checked);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isEmpty(value) || typeof value === 'number') {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n checkedCopy.set(val, true);\n updateDescendants(valueToItemMap.get(val)!, checkedCopy, true);\n updateAncestors(valueToItemMap.get(val)!, checkedCopy);\n });\n } else {\n checkedCopy.set(value, 'done');\n updateSingleAncestors(valueToItemMap.get(value)!, checkedCopy, 'dot');\n }\n }\n\n setChecked(checkedCopy);\n\n // В deps мы кладем именно outerValue и internalValue, а не просто value.\n // Т.к. вначале нужно отфильтровать и провалидировать outerValue и результат положить в переменную.\n // А переменную, содержащую сложные типы данных, нельзя помещать в deps.\n }, [outerValue, internalValue, items]);\n\n return (\n <Root\n view={view}\n size={size}\n labelPlacement={labelPlacement}\n chipView={chipView}\n disabled={disabled}\n {...(rest as any)}\n >\n <Context.Provider\n value={{\n focusedPath,\n checked,\n multiselect: props.multiselect,\n size,\n handleCheckboxChange,\n handleItemClick,\n variant,\n renderItem,\n valueToItemMap,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={(opened: boolean) => opened && handleListToggle(true)}\n placement={placement}\n portal={portal}\n listWidth={listWidth}\n target={(referenceRef) => (\n <Target\n ref={ref}\n target={target}\n value={value}\n opened={isCurrentListOpen}\n valueToItemMap={valueToItemMap}\n label={label}\n placeholder={placeholder}\n onKeyDown={onKeyDown}\n labelPlacement={labelPlacement}\n size={size}\n contentLeft={contentLeft}\n disabled={disabled}\n renderValue={renderValue}\n selectProps={props}\n inputWrapperRef={referenceRef as React.MutableRefObject<HTMLDivElement>}\n multiselect={props.multiselect}\n view={view}\n handleClickArrow={handleClickArrow}\n helperText={helperText}\n treeId={treeId}\n activeDescendantItemValue={activeDescendantItemValue}\n isTargetAmount={isTargetAmount}\n onChange={onChange}\n labelToItemMap={labelToItemMap}\n chipView={chipView}\n separator={separator}\n />\n )}\n >\n <Root\n view={view}\n size={size}\n labelPlacement={labelPlacement}\n chipView={chipView}\n disabled={disabled}\n {...(rest as any)}\n >\n <Ul\n role=\"tree\"\n id={`${treeId}_tree_level_1`}\n aria-multiselectable={Boolean(props.multiselect)}\n listHeight={listHeight}\n listOverflow={listOverflow}\n onScroll={handleScroll}\n listWidth={listWidth}\n ref={targetRef}\n >\n {transformedItems.map((item, index) => (\n <Inner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n </Root>\n );\n });\n\nexport const selectConfig = {\n name: 'Select',\n tag: 'div',\n layout: selectRoot,\n base,\n variations: {},\n defaults: {\n view: 'default',\n size: 'm',\n labelPlacement: 'outer',\n chipView: 'default',\n },\n};\n"],"names":["Context","createContext","selectRoot","Root","forwardRef","props","ref","_getItemByFocused","outerValue","value","outerOnChange","onChange","_props$target","target","items","_props$placement","placement","label","labelPlacement","placeholder","helperText","_props$disabled","disabled","outerView","view","size","listOverflow","listHeight","listWidth","contentLeft","onScrollBottom","chipView","_props$variant","variant","portal","renderValue","renderItem","status","onItemSelect","separator","outerCloseAfterSelect","closeAfterSelect","isTargetAmount","rest","_objectWithoutProperties","_excluded","transformedItems","useMemo","initialItemsTransform","_usePathMaps","usePathMaps","_usePathMaps2","_slicedToArray","pathMap","focusedToValueMap","valueToCheckedMap","valueToItemMap","labelToItemMap","_useState","useState","multiselect","_useState2","internalValue","setInternalValue","undefined","getInitialValue","floatingPopoverRef","useRef","_useReducer","useReducer","pathReducer","_useReducer2","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useState3","_useState4","checked","setChecked","isCurrentListOpen","Boolean","activeDescendantItemValue","getItemByFocused","toString","treeId","safeUseId","getView","targetRef","useOutsideClick","type","newValue","handleClickArrow","handleListToggle","opened","handleCheckboxChange","item","checkedCopy","Map","get","set","updateDescendants","updateAncestors","newValues","forEach","key","push","handleItemClick","e","isEmpty","stopPropagation","isCurrentChecked","handlePressDown","handleScroll","scrollHeight","scrollTop","clientHeight","_useKeyNavigation","useKeyNavigation","onKeyDown","useLayoutEffect","_","Array","isArray","val","updateSingleAncestors","React","createElement","_extends","Provider","FloatingPopover","onToggle","referenceRef","Target","selectProps","inputWrapperRef","Ul","role","id","concat","onScroll","map","index","Inner","currentLevel","selectConfig","name","tag","layout","base","variations","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;IAwBaA,OAAO,gBAAGC,aAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAAoE,EAAA;AAAA,EAAA,oBAC3FC,UAAU,CAAuC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAAA,IAAA,IAAAC,iBAAA,CAAA;AAC7D,IAAA,IACWC,UAAU,GA4BjBH,KAAK,CA5BLI,KAAK;MACKC,aAAa,GA2BvBL,KAAK,CA3BLM,QAAQ;MAAAC,aAAA,GA2BRP,KAAK,CA1BLQ,MAAM;AAANA,MAAAA,OAAM,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,gBAAgB,GAAAA,aAAA;MACzBE,KAAK,GAyBLT,KAAK,CAzBLS,KAAK;MAAAC,gBAAA,GAyBLV,KAAK,CAxBLW,SAAS;AAATA,MAAAA,SAAS,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,gBAAA;MACpBE,KAAK,GAuBLZ,KAAK,CAvBLY,KAAK;MACLC,cAAc,GAsBdb,KAAK,CAtBLa,cAAc;MACdC,WAAW,GAqBXd,KAAK,CArBLc,WAAW;MACXC,UAAU,GAoBVf,KAAK,CApBLe,UAAU;MAAAC,eAAA,GAoBVhB,KAAK,CAnBLiB,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,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A,IAAK;AACXC,QAAAA,YAAY,EAAEA,YAAa;AAC3BwE,QAAAA,KAAK,EAAEA,KAAM;AACbrH,QAAAA,SAAS,EAAEA,SAAAA;AAAU,OACxB,CAAC,CAAA;AAAA,KACL,CACD,CACF,CACO,CACH,CAChB,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMwH,YAAY,GAAG;AACxBC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAErJ,UAAU;AAClBsJ,EAAAA,IAAI,EAAJA,IAAI;EACJC,UAAU,EAAE,EAAE;AACdC,EAAAA,QAAQ,EAAE;AACNlI,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTP,IAAAA,cAAc,EAAE,OAAO;AACvBa,IAAAA,QAAQ,EAAE,SAAA;AACd,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { isEmpty, getPlacements } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport {\n initialItemsTransform,\n updateAncestors,\n updateDescendants,\n updateSingleAncestors,\n getView,\n getInitialValue,\n} from './utils';\nimport { Inner, Target } from './ui';\nimport { pathReducer, focusedPathReducer, focusedChipIndexReducer } from './reducers';\nimport { usePathMaps } from './hooks/usePathMaps';\nimport { StyledPopover, Ul, base, OuterLabel, HelperText } from './Select.styles';\nimport type { ItemContext, MergedSelectProps } from './Select.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport type { MergedDropdownNodeTransformed } from './ui/Inner/ui/Item/Item.types';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Выпадающий список. Поддерживает выбор одного или нескольких значений.\n */\nexport const selectRoot = (Root: RootProps<HTMLButtonElement, Omit<MergedSelectProps, 'items'>>) =>\n forwardRef<HTMLButtonElement, MergedSelectProps>((props, ref) => {\n const {\n value: outerValue,\n onChange: outerOnChange,\n target = 'textfield-like',\n items,\n placement = 'bottom',\n label,\n labelPlacement = 'outer',\n placeholder,\n helperText,\n disabled = false,\n view,\n size,\n listOverflow,\n listHeight,\n listWidth,\n contentLeft,\n onScrollBottom,\n chipView,\n variant = 'normal',\n portal,\n renderValue,\n renderItem,\n status,\n onItemSelect,\n separator,\n closeAfterSelect: outerCloseAfterSelect,\n ...rest\n } = props;\n\n const transformedItems = useMemo(() => initialItemsTransform(items || []), [items]);\n const [pathMap, focusedToValueMap, valueToCheckedMap, valueToItemMap] = usePathMaps(transformedItems);\n\n const value = getInitialValue(outerValue, valueToItemMap);\n\n const onChange = (e: string | number | Array<string | number>) => {\n if (outerOnChange) {\n outerOnChange(e as any);\n }\n };\n\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n const [focusedChipIndex, dispatchFocusedChipIndex] = useReducer(focusedChipIndexReducer, null);\n const [checked, setChecked] = useState(valueToCheckedMap);\n\n const closeAfterSelect = outerCloseAfterSelect ?? !props.multiselect;\n\n const targetRef = useOutsideClick<HTMLDivElement>(() => {\n if (focusedChipIndex != null) {\n dispatchFocusedChipIndex({ type: 'reset' });\n }\n });\n\n const handleToggle = (opened: boolean) => {\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n dispatchFocusedChipIndex({ type: 'reset' });\n }\n };\n\n const handleCheckboxChange = (item: MergedDropdownNodeTransformed) => {\n if (props.multiselect) {\n const checkedCopy = new Map(checked);\n\n if (!checkedCopy.get(item.value)) {\n checkedCopy.set(item.value, true);\n updateDescendants(item, checkedCopy, true);\n } else {\n checkedCopy.set(item.value, false);\n updateDescendants(item, checkedCopy, false);\n }\n\n updateAncestors(item, checkedCopy);\n\n const newValues: Array<string | number> = [];\n\n valueToItemMap.forEach((item, key) => {\n if (checkedCopy.get(key)) {\n newValues.push(item.value);\n }\n });\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(newValues);\n }\n }\n };\n\n const handleItemClick = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (!isEmpty(item?.items)) {\n return;\n }\n\n if (props.multiselect) {\n handleCheckboxChange(item);\n } else {\n if (e) {\n e.stopPropagation();\n }\n\n const isCurrentChecked = checked.get(item.value);\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(isCurrentChecked ? '' : item.value);\n }\n\n if (onItemSelect) {\n onItemSelect(item, e!);\n }\n }\n };\n\n const handleChipClick = (currentValue: string) => {\n handleCheckboxChange(valueToItemMap.get(currentValue)!);\n };\n\n const handlePressDown = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (isEmpty(item.items)) {\n handleItemClick(item, e);\n } else if (props.multiselect) {\n handleCheckboxChange(item);\n }\n };\n\n const handleScroll = (e: React.UIEvent<HTMLUListElement>) => {\n if (!onScrollBottom) return;\n\n const { target } = e;\n\n if (\n (target as HTMLElement).scrollHeight - (target as HTMLElement).scrollTop ===\n (target as HTMLElement).clientHeight\n ) {\n onScrollBottom(e);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n value,\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleToggle,\n handlePressDown,\n focusedChipIndex,\n dispatchFocusedChipIndex,\n valueToItemMap,\n multiselect: props.multiselect,\n isTargetAmount: props.isTargetAmount,\n });\n\n const isCurrentListOpen = Boolean(path[0]);\n\n // В данном эффекте мы следим за изменениями value и вносим коррективы в дерево чекбоксов.\n useLayoutEffect(() => {\n const checkedCopy = new Map(checked);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isEmpty(value) || typeof value === 'number') {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n checkedCopy.set(val, true);\n updateDescendants(valueToItemMap.get(val)!, checkedCopy, true);\n updateAncestors(valueToItemMap.get(val)!, checkedCopy);\n });\n } else {\n checkedCopy.set(value, 'done');\n updateSingleAncestors(valueToItemMap.get(value)!, checkedCopy, 'dot');\n }\n }\n\n setChecked(checkedCopy);\n }, [outerValue, items]);\n\n return (\n <Root ref={ref} size={size} view={status ? getView(status) : view} chipView={chipView} {...(rest as any)}>\n {label && labelPlacement === 'outer' && target !== 'button-like' && <OuterLabel>{label}</OuterLabel>}\n <Context.Provider\n value={{\n focusedPath,\n checked,\n multiselect: props.multiselect,\n size,\n handleCheckboxChange,\n handleItemClick,\n variant,\n renderItem,\n valueToItemMap,\n }}\n >\n <StyledPopover\n ref={targetRef}\n opened={isCurrentListOpen}\n placement={getPlacements(placement)}\n usePortal={Boolean(portal)}\n frame={portal}\n onToggle={handleToggle}\n trigger=\"click\"\n target={\n <Target\n opened={isCurrentListOpen}\n value={value}\n valueToItemMap={valueToItemMap}\n focusedPath={focusedPath}\n focusedToValueMap={focusedToValueMap}\n onChipClick={handleChipClick}\n label={label}\n placeholder={placeholder}\n onKeyDown={onKeyDown}\n focusedChipIndex={focusedChipIndex}\n labelPlacement={labelPlacement}\n selectProps={props}\n size={size}\n contentLeft={contentLeft}\n disabled={disabled}\n renderValue={renderValue}\n />\n }\n preventOverflow={false}\n closeOnOverlayClick\n listWidth={listWidth}\n >\n {items && (\n <Root size={size} {...(rest as any)}>\n <Ul\n role=\"tree\"\n id=\"tree_level_1\"\n listHeight={listHeight}\n listOverflow={listOverflow}\n onScroll={handleScroll}\n listWidth={listWidth}\n >\n {transformedItems.map((item, index) => (\n <Inner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </Root>\n )}\n </StyledPopover>\n </Context.Provider>\n\n {helperText && target === 'textfield-like' && <HelperText>{helperText}</HelperText>}\n </Root>\n );\n });\n\nexport const selectConfig = {\n name: 'Select',\n tag: 'div',\n layout: selectRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n chipView: 'default',\n size: 'm',\n },\n};\n"],"names":["Context","createContext","selectRoot","Root","forwardRef","props","ref","outerValue","value","outerOnChange","onChange","_props$target","target","items","_props$placement","placement","label","_props$labelPlacement","labelPlacement","placeholder","helperText","_props$disabled","disabled","view","size","listOverflow","listHeight","listWidth","contentLeft","onScrollBottom","chipView","_props$variant","variant","portal","renderValue","renderItem","status","onItemSelect","outerCloseAfterSelect","closeAfterSelect","rest","_objectWithoutProperties","_excluded","transformedItems","useMemo","initialItemsTransform","_usePathMaps","usePathMaps","_usePathMaps2","_slicedToArray","pathMap","focusedToValueMap","valueToCheckedMap","valueToItemMap","getInitialValue","e","_useReducer","useReducer","pathReducer","_useReducer2","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useReducer5","focusedChipIndexReducer","_useReducer6","focusedChipIndex","dispatchFocusedChipIndex","_useState","useState","_useState2","checked","setChecked","multiselect","targetRef","useOutsideClick","type","handleToggle","opened","handleCheckboxChange","item","checkedCopy","Map","get","set","updateDescendants","updateAncestors","newValues","forEach","key","push","handleItemClick","isEmpty","stopPropagation","isCurrentChecked","handleChipClick","currentValue","handlePressDown","handleScroll","scrollHeight","scrollTop","clientHeight","_useKeyNavigation","useKeyNavigation","isTargetAmount","onKeyDown","isCurrentListOpen","Boolean","useLayoutEffect","_","Array","isArray","val","updateSingleAncestors","React","createElement","_extends","getView","OuterLabel","Provider","StyledPopover","getPlacements","usePortal","frame","onToggle","trigger","Target","onChipClick","selectProps","preventOverflow","closeOnOverlayClick","Ul","role","id","onScroll","map","index","Inner","concat","currentLevel","HelperText","selectConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;IAwBaA,OAAO,gBAAGC,aAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAAoE,EAAA;AAAA,EAAA,oBAC3FC,UAAU,CAAuC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAC7D,IAAA,IACWC,UAAU,GA2BjBF,KAAK,CA3BLG,KAAK,CAAA;MACKC,aAAa,GA0BvBJ,KAAK,CA1BLK,QAAQ,CAAA;MAAAC,aAAA,GA0BRN,KAAK,CAzBLO,MAAM,CAAA;AAANA,MAAAA,MAAM,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,gBAAgB,GAAAA,aAAA,CAAA;MACzBE,KAAK,GAwBLR,KAAK,CAxBLQ,KAAK,CAAA;MAAAC,gBAAA,GAwBLT,KAAK,CAvBLU,SAAS,CAAA;AAATA,MAAAA,SAAS,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,gBAAA,CAAA;MACpBE,KAAK,GAsBLX,KAAK,CAtBLW,KAAK,CAAA;MAAAC,qBAAA,GAsBLZ,KAAK,CArBLa,cAAc,CAAA;AAAdA,MAAAA,cAAc,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,qBAAA,CAAA;MACxBE,WAAW,GAoBXd,KAAK,CApBLc,WAAW,CAAA;MACXC,UAAU,GAmBVf,KAAK,CAnBLe,UAAU,CAAA;MAAAC,eAAA,GAmBVhB,KAAK,CAlBLiB,QAAQ,CAAA;AAARA,MAAAA,QAAQ,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA,CAAA;MAChBE,IAAI,GAiBJlB,KAAK,CAjBLkB,IAAI,CAAA;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